phpBMS

Changeset 469 for branches

Show
Ignore:
Timestamp:
03/26/09 17:30:24 (3 years ago)
Author:
brieb
Message:
  • Added recording of application name and administrative e-mail address to install procedure. When core is installed, it will attempt to e-mail the user with the login information.
  • Reformatted Complete Installation section of installer so the do not navigate away without at least seeing the e-mail.
Location:
branches/nathan/install
Files:
5 modified

Legend:

Unmodified
Added
Removed
  • branches/nathan/install/index.php

    r460 r469  
    290290                                <h1>Populate Core Data</h1> 
    291291 
    292                                 <p>phpBMS needs to create the core functionality tables and populate them with the default data needed to run the program.</p> 
     292                                <p> 
     293                                        phpBMS needs to create the core functionality tables and 
     294                                        populate them with the default data needed to run the program. 
     295                                </p> 
     296 
     297                                <p> 
     298                                        <label for="appname">application name</label><br /> 
     299                                        <input type="text" id="appname" value="phpBMS"/> 
     300                                </p> 
     301 
     302                                <p> 
     303                                        <label for="email">administrator e-mail address</label><br /> 
     304                                        <input type="text" id="email" value=""/> 
     305                                </p> 
    293306 
    294307                                <p><input type="button" value="Install Core Data" class="Buttons" id="coreDataButton" /> <strong id="coreDataNoDebug"></strong></p> 
     
    397410                                <h1>Complete Installation</h1> 
    398411 
    399                                 <p> 
    400                                         phpBMS installation has completed. Remember that before you log in, you will need 
    401                                         to remove the install folder, and any modules' install folders. 
    402                                 </p> 
    403  
    404  
    405  
    406                                 <h2>Administrator log in information</h2> 
    407                                 <table> 
     412 
     413                                <h2>Administrator Information</h2> 
     414                                <table id="userpassTable"> 
    408415                                        <tbody> 
    409416                                                <tr> 
    410                                                         <td class="large" align="right">login: </td> 
    411                                                         <td class="large"><strong>admin</strong></td> 
    412                                                 </tr> 
    413                                                 <tr> 
    414                                                         <td class="large" align="right">password: </td> 
    415                                                         <td class="large"><strong id="pass2">password is set after core data installed</strong></td> 
     417                                                        <td align="right">login: </td> 
     418                                                        <td ><strong>admin</strong></td> 
     419                                                </tr> 
     420                                                <tr> 
     421                                                        <td align="right">password: </td> 
     422                                                        <td ><strong id="pass2">no password set</strong></td> 
    416423                                                </tr> 
    417424                                        </tbody> 
    418425                                </table> 
    419426 
    420                                 <p><input type="button" id="login" name="login" value="phpBMS Log In" class="Buttons" onclick="document.location='../'" /></p> 
     427                                <p class="notes"> 
     428                                        <strong>Note:</strong> Remember to remove the install folder and any modules' install folder 
     429                                        before logging in. You may want to write down the password above before navigating to the 
     430                                        <a href="../" >application page</a>. 
     431                                </p> 
    421432 
    422433                                <h2>Troubleshooting</h2> 
  • branches/nathan/install/install.css

    r459 r469  
    108108    min-width: 120px; 
    109109} 
     110 
     111#userpassTable{ 
     112 
     113    margin: 0 auto; 
     114 
     115} 
     116 
     117    #userpassTable td{ 
     118 
     119        font-size: 22px; 
     120 
     121    } 
  • branches/nathan/install/install.js

    r459 r469  
    4444                noDebug.innerHTML = "Running..."; 
    4545 
    46                 var response = installer.runCommand("coredatainstall"); 
     46 
     47                //we pass the entered application name and e-mail address as a "::" separated pair 
     48                var appname = getObjectFromID("appname"); 
     49                var email = getObjectFromID("email"); 
     50 
     51                var extras = encodeURIComponent(appname.value + "::" + email.value) 
     52 
     53                var response = installer.runCommand("coredatainstall", extras); 
    4754 
    4855                if(response.success === true){ 
  • branches/nathan/install/installajax.php

    r467 r469  
    7474 
    7575 
    76         function coreDataInstall(){ 
     76        function coreDataInstall($extras){ 
     77 
     78                $extras = explode("::", $extras); 
    7779 
    7880                if(!$this->db->connect()) 
     
    150152                                `users` 
    151153                        SET 
     154                                `email` = '".$extras[1]."', 
    152155                                `password` = ENCODE('".$newPass."' , '".$newSeed."') 
    153156                        WHERE 
     
    158161                        return $this->returnJSON(false, "Error Updating Admin Password: ".$this->db->error); 
    159162 
     163                //Update Application Name 
     164                $updatestatement = " 
     165                        UPDATE 
     166                                `settings` 
     167                        SET 
     168                                `value` = '".mysql_real_escape_string($extras["0"])."' 
     169                        WHERE 
     170                                `name` = 'application_name'"; 
     171 
     172                $this->db->query($updatestatement); 
     173                if($this->db->error) 
     174                        return $this->returnJSON(false, "Error Updating Admin Password: ".$this->db->error); 
    160175 
    161176                if($thereturn) 
    162177                        return $this->returnJSON(false, $thereturn); 
    163                 else 
     178                else{ 
     179 
     180                        //Let's also sen an e-mail to the administrator with his password 
     181                        if($extras[1]){ 
     182 
     183                                $to = $extras[1]; 
     184                                $from = "From: DoNotReply@phpbms.org"; 
     185                                $subject = "Your phpBMS login information"; 
     186                                $message ="phpBMS Core Program was installed successfully.  Your initial login information is: 
     187 
     188        username: admin 
     189        password: ".$newPass." 
     190 
     191If you need further assistance, please use the community forum at http://www.phpbms.org/forum"; 
     192 
     193                                //attempt to e-mail person 
     194                                @ mail($to, $subject, $message, $from); 
     195 
     196                        }//end if 
     197 
     198 
    164199                        return $this->returnJSON(true, "Core Data Installed Successfully.", $newPass); 
     200 
     201                }//endif thereturn 
    165202 
    166203        }//end function coreDataInstall 
     
    213250 
    214251                        case "coredatainstall": 
    215                                 echo $this->coreDataInstall(); 
     252                                echo $this->coreDataInstall($extras); 
    216253                                break; 
    217254 
  • branches/nathan/install/install_include.php

    r459 r469  
    168168                                                        <h3><strong><?php echo $module["name"]?></strong></h3> 
    169169                                                        <p><?php echo $module["description"]?></p> 
    170                                                         <p class="notes"><strong>Requirements:</strong> <?php echo $module["requirements"]?> 
     170                                                        <p class="notes"><strong>Requirements:</strong> <?php echo $module["requirements"]?></p> 
    171171                                                </td> 
    172172                                                <td><?php echo $module["version"] ?></td> 
phpBMS vulnerability assesment provided by Orvant Inc. Copyright © 2010 Kreotek, LLC. All Rights reserved.