| 40 | | include("install_include.php"); |
| 41 | | include("version.php"); |
| 42 | | |
| | 40 | include("update_include.php"); |
| | 41 | |
| | 42 | $updater = new updater(); |
| | 43 | $updater->buildList(); |
| | 44 | |
| | 45 | |
| | 46 | //check for php version |
| | 47 | $neededVer = "5.2.0"; |
| | 48 | $phpVer = phpversion(); |
| | 49 | if(floatval($neededVer) <= floatval($phpVer)) |
| | 50 | $phpVerClass = "success"; |
| | 51 | else |
| | 52 | $phpVerClass = "fail"; |
| | 53 | |
| | 54 | //check to see if mysql plugin present |
| | 55 | if(phpversion("mysql")) |
| | 56 | $mysqlPresent = "success"; |
| | 57 | else |
| | 58 | $mysqlPresent = "fail"; |
| | 59 | |
| | 60 | //check the web server |
| | 61 | $webServer = explode(" ",$_SERVER['SERVER_SOFTWARE']); |
| | 62 | $webServer = explode("/", $webServer[0]); |
| | 63 | |
| | 64 | if(strtolower($webServer[0]) == "apache"){ |
| | 65 | |
| | 66 | if(floatval($webServer[1]) > 2) |
| | 67 | $webServerReport["class"] = "success"; |
| | 68 | else |
| | 69 | $webServerReport["class"] = "warning"; |
| | 70 | |
| | 71 | $webServerReport["message"] = $webServer[0]."/".$webServer[1]; |
| | 72 | |
| | 73 | } else { |
| | 74 | $webServerReport["class"] = "warning"; |
| | 75 | $webServerReport["message"] = "Non-Apache servers are untested and may have problems."; |
| | 76 | } |
| | 77 | |
| | 78 | $mysqlVer = $updater->getMySQLVersion(); |
| | 79 | |
| | 80 | if(floatval($mysqlVer) >= 5) |
| | 81 | $mysqlPassFailClass = "success"; |
| | 82 | else |
| | 83 | $mysqlPassFailClass = "fail"; |
| | 84 | |
| 61 | | <h1 id="topTitle">phpBMS v<?php echo $modules["base"]["version"]?> Update</h1> |
| 62 | | |
| 63 | | <div class="bodyline" id="step1"> |
| 64 | | <h1>Before Updating</h1> |
| 65 | | |
| 66 | | <p class="important">Backup all of your data and program files before running any update.</p> |
| 67 | | <p> |
| 68 | | By downloading and decompressing this update, you may have already replaced script files |
| 69 | | from the previous version of phpBMS. If you have decompressed these files to a separate |
| 70 | | directory and have made custom changes directly to the system we recommend backing up |
| 71 | | those files before continuing. |
| 72 | | </p> |
| 73 | | <p>For the latest information about phpBMS check the <a href="http://www.phpbms.org">phpBMS Project web site</a>.</p> |
| 74 | | |
| 75 | | <p class="nextprevP"> |
| 76 | | <button type="button" class="disabledButtons nextprevButtons" onclick="goSection('back')" disabled="disabled">back</button> |
| 77 | | <button type="button" class="Buttons nextprevButtons" onclick="goSection('next')">next</button> |
| 78 | | </p> |
| | 100 | <noscript> |
| | 101 | <div class="bodyline"> |
| | 102 | <h1>Javascript Support Disabled</h1> |
| | 103 | <p>Both the installer and the main phpBMS program require JavaScript support in order to run.</p> |
| | 104 | </div> |
| | 105 | </noscript> |
| | 106 | |
| | 107 | <h1 id="topTitle">phpBMS v<?php echo $updater->list["base"]["version"]?> Update</h1> |
| | 108 | |
| | 109 | <div class="bodyline"> |
| | 110 | |
| | 111 | <div id="navPanel"> |
| | 112 | <select id="navSelect" size="10"> |
| | 113 | <option value="1" selected="selected">* Preparing For Update</option> |
| | 114 | <option value="2">* Update Core Program</option> |
| | 115 | <option value="3">* Update Modules</option> |
| | 116 | <option value="4">* Finish Update</option> |
| | 117 | </select> |
| | 118 | <p><input type="checkbox" id="debug" /><label for="debug">updating debug</label></p> |
| | 119 | </div> |
| | 120 | <div id="stepsPanel"> |
| | 121 | |
| | 122 | <div class="steps" id="step1"> |
| | 123 | |
| | 124 | <p class="nextprevP"> |
| | 125 | <button type="button" class="disabledButtons prevButtons" disabled="disabled">back</button> |
| | 126 | <button type="button" class="Buttons nextButtons">next</button> |
| | 127 | </p> |
| | 128 | |
| | 129 | <h1>Preparing For Update</h1> |
| | 130 | <p> |
| | 131 | Before updating, There are several steps to take and insure that backup runs smoothly. |
| | 132 | </p> |
| | 133 | <ul> |
| | 134 | <li> |
| | 135 | <strong>Backup</strong> your data file. If you have access to a shell, using |
| | 136 | the mysqldump command is a fast way of creating a reliable backup of your data. |
| | 137 | </li> |
| | 138 | |
| | 139 | <li> |
| | 140 | By downloading and decompressing this update, you may have already replaced script files |
| | 141 | from the previous version of phpBMS. If you have decompressed these files to a separate |
| | 142 | directory and have made custom changes directly to the system we recommend backing up |
| | 143 | those files before continuing. |
| | 144 | </li> |
| | 145 | |
| | 146 | <li> |
| | 147 | For the latest information about phpBMS check the <a href="http://www.phpbms.org">phpBMS Project web site</a>. |
| | 148 | </li> |
| | 149 | </ul> |
| | 150 | |
| | 151 | <h2>Server Requirements</h2> |
| | 152 | <table id="sysRequirements" cellpadding="0" cellspacing="0" border="0"> |
| | 153 | <thead> |
| | 154 | <tr> |
| | 155 | <td>requirement</td> |
| | 156 | <td>server</td> |
| | 157 | </tr> |
| | 158 | </thead> |
| | 159 | <tbody> |
| | 160 | <tr> |
| | 161 | <td>PHP 5.2.0 or higher</td> |
| | 162 | <td><span class="<?php echo $phpVerClass?>"><?php echo $phpVer?></span></td> |
| | 163 | </tr> |
| | 164 | <tr> |
| | 165 | <td>PHP MySQL Support</td> |
| | 166 | <td><span class="<?php echo $mysqlPresent?>"><?php echo $mysqlPresent?></span></td> |
| | 167 | </tr> |
| | 168 | <tr> |
| | 169 | <td>Apache 2.0 or higher</td> |
| | 170 | <td><span class="<?php echo $webServerReport["class"]?>"><?php echo $webServerReport["message"]?></span></td> |
| | 171 | </tr> |
| | 172 | <tr> |
| | 173 | <td>MySQL Server 5.0 or higher</td> |
| | 174 | <td><span class="<?php echo $mysqlPassFailClass ?>"><?php echo $mysqlVer ?></span></td> |
| | 175 | </tr> |
| | 176 | |
| | 177 | </tbody> |
| | 178 | </table> |
| | 179 | |
| | 180 | </div> |
| | 181 | |
| | 182 | <div class="steps" id="step2"> |
| | 183 | |
| | 184 | <p class="nextprevP"> |
| | 185 | <button type="button" class="Buttons prevButtons">back</button> |
| | 186 | <button type="button" class="Buttons nextButtons">next</button> |
| | 187 | </p> |
| | 188 | |
| | 189 | <h1>Update Core Program</h1> |
| | 190 | |
| | 191 | <p> |
| | 192 | The database reports the current version is <strong><?php echo $updater->list["base"]["currentversion"] ?></strong>. |
| | 193 | The application files show the application version to upgrade to is <strong><?php echo $updater->list["base"]["version"] ?></strong>. |
| | 194 | </p> |
| | 195 | |
| | 196 | <?php if($updater->checkBaseUpdate()) { ?> |
| | 197 | |
| | 198 | <p class="notes"><strong>Versions match. No update is necessary.</strong></p> |
| | 199 | |
| | 200 | <?php } else { ?> |
| | 201 | |
| | 202 | <p class="notes"><strong>You must update the phpBMS Core Program before updating any modules.</strong></p> |
| | 203 | |
| | 204 | |
| | 205 | <p><button class="Buttons" id="updatecoreButton">Update Core Program</button> <span id="coreDataNoDebug"></span></p> |
| | 206 | |
| | 207 | <div class="debugResults"> |
| | 208 | <h3>Update Core Results</h3> |
| | 209 | <p><textarea name="results" id="coredataupdateresults" cols="40" rows="4" class="results"></textarea></p> |
| | 210 | </div> |
| | 211 | |
| | 212 | <?php } //endif ?> |
| | 213 | </div> |
| | 214 | |
| | 215 | <div class="steps" id="step3"> |
| | 216 | |
| | 217 | <p class="nextprevP"> |
| | 218 | <button type="button" class="Buttons prevButtons">back</button> |
| | 219 | <button type="button" class="Buttons nextButtons">next</button> |
| | 220 | </p> |
| | 221 | |
| | 222 | <h1>Udate Modules</h1> |
| | 223 | |
| | 224 | <?php $updater->showModulesUpdate(); ?> |
| | 225 | |
| | 226 | <div class="debugResults"> |
| | 227 | <h3>Module Installation Results</h3> |
| | 228 | <p><textarea name="results" id="moduleupdateresults" class="results" cols="80" rows="10"></textarea></p> |
| | 229 | </div> |
| | 230 | |
| | 231 | </div> |
| | 232 | |
| | 233 | <div class="steps" id="step4"> |
| | 234 | |
| | 235 | <p class="nextprevP"> |
| | 236 | <button type="button" class="Buttons prevButtons">back</button> |
| | 237 | <button type="button" class="disabledButtons nextButtons" disabled="disabled">next</button> |
| | 238 | </p> |
| | 239 | |
| | 240 | <h1>Finish Update</h1> |
| | 241 | <p> |
| | 242 | To finish the update process you will need to: |
| | 243 | </p> |
| | 244 | <ul> |
| | 245 | <li> |
| | 246 | <h3>Delete Install Folders</h3> |
| | 247 | <p> |
| | 248 | You must delete both the core installation folder, as well as all modules' installation |
| | 249 | folders before you can use the system |
| | 250 | </p> |
| | 251 | </li> |
| | 252 | <li> |
| | 253 | <h3>Clear your Browser Cache</h3> |
| | 254 | <p> |
| | 255 | Part of the update process may have replaced javascript and stylesheet (css) files. |
| | 256 | Most browsers cache these files to speed loading times. In order to insure that |
| | 257 | your web application is using all of the latest updates, you will need to |
| | 258 | clear the browser cache of all client browsers that access the application. |
| | 259 | </p> |
| | 260 | <p> |
| | 261 | Most browsers will clear this cache automatically if you simply restart the browser |
| | 262 | </p> |
| | 263 | </li> |
| | 264 | |
| | 265 | </ul> |
| | 266 | <h2>Troubleshooting</h2> |
| | 267 | <h3>General Help </h3> |
| | 268 | <p> |
| | 269 | If you have problems during updating, have questions about how the program works, or would like additional |
| | 270 | information about phpBMS, please visit the <a href="http://www.phpbms.org">phpBMS Project web site</a>. The phpBMS project web site |
| | 271 | has many resources to help you including a user wiki, users forum, and mailing list that can help you.</p> |
| | 272 | <h3>Paid Customization, Update, Support Options</h3> |
| | 273 | <p>Paid technical support and phpBMS customization is available from <a href="http://www.kreotek.com">Kreotek</a>,</p> |
| | 274 | |
| | 275 | </div> |
| | 276 | |
| | 277 | </div> |
| | 278 | |
| 81 | | |
| 82 | | <div class="bodyline" id="step2"> |
| 83 | | <h1>Enter Administrative Log In Information</h1> |
| 84 | | <p> |
| 85 | | Running the update requires administrative access privleges. Please enter the login credentials |
| 86 | | that have administrative priveleges. |
| 87 | | </p> |
| 88 | | |
| 89 | | <fieldset> |
| 90 | | <legend>administrative login</legend> |
| 91 | | <p> |
| 92 | | <label for="username">name</label><br /> |
| 93 | | <input name="name" type="text" id="username" size="32" maxlength="64" /> |
| 94 | | <input name="name" type="hidden" id="version" value="<?php echo $modules["base"]["version"] ?>" /> |
| 95 | | </p> |
| 96 | | <p> |
| 97 | | <label for="password">password</label><br /> |
| 98 | | <input name="password" type="password" id="password" size="32" maxlength="24" /> |
| 99 | | </p> |
| 100 | | <p> |
| 101 | | <input type="button" value="Verify" class="Buttons" onclick="runCommand('verifyLogin')" /> |
| 102 | | </p> |
| 103 | | </fieldset> |
| 104 | | <h3>Administrative Verification Results</h3> |
| 105 | | <p> |
| 106 | | <textarea name="results" id="verifyLoginresults" class="results" cols="80" rows="2"></textarea> |
| 107 | | </p> |
| 108 | | |
| 109 | | <p class="nextprevP"> |
| 110 | | <button type="button" class="Buttons nextprevButtons" onclick="goSection('back')">back</button> |
| 111 | | <button type="button" class="Buttons nextprevButtons" onclick="goSection('next')">next</button> |
| 112 | | </p> |
| 113 | | </div> |
| 114 | | |
| 115 | | |
| 116 | | <div class="bodyline" id="step3"> |
| 117 | | <h1>Check for phpBMS Core Update Availability</h1> |
| 118 | | |
| 119 | | <p>Check to see if the phpBMS core needs to be updated</p> |
| 120 | | <p class="testButtonsP"> |
| 121 | | <input type="button" value="Check Core Availability" class="Buttons" onclick="runCommand('checkBaseUpdate')" /> |
| 122 | | </p> |
| 123 | | <h3>Availability Results</h3> |
| 124 | | <p> |
| 125 | | <textarea name="results" id="checkBaseUpdateresults" class="results" cols="80" rows="2"></textarea> |
| 126 | | </p> |
| 127 | | |
| 128 | | |
| 129 | | <p class="nextprevP"> |
| 130 | | <button type="button" class="Buttons nextprevButtons" onclick="goSection('back')">back</button> |
| 131 | | <button type="button" class="Buttons nextprevButtons" onclick="goSection('next')">next</button> |
| 132 | | </p> |
| 133 | | </div> |
| 134 | | |
| 135 | | |
| 136 | | <div class="bodyline" id="step4"> |
| 137 | | <h1>Update phpBMS Core</h1> |
| 138 | | |
| 139 | | <p>If an update was reported as available in the previous section, you should run the update to the phpBMS core.</p> |
| 140 | | |
| 141 | | <p class="notes"> |
| 142 | | If no update is available, running the update on an already updated version of phpBMS |
| 143 | | can cause data corruption and break the application. |
| 144 | | </p> |
| 145 | | |
| 146 | | <p class="testButtonsP"> |
| 147 | | <input type="button" value="Update Core" class="Buttons" onclick="runCommand('updateBaseVersion')" /> |
| 148 | | </p> |
| 149 | | <h3>Core Update Results</h3> |
| 150 | | <p> |
| 151 | | <textarea name="results" id="updateBaseVersionresults" class="results" cols="80" rows="8"></textarea> |
| 152 | | </p> |
| 153 | | |
| 154 | | <p class="nextprevP"> |
| 155 | | <button type="button" class="Buttons nextprevButtons" onclick="goSection('back')">back</button> |
| 156 | | <button type="button" class="Buttons nextprevButtons" onclick="goSection('next')">next</button> |
| 157 | | </p> |
| 158 | | </div> |
| 159 | | |
| 160 | | |
| 161 | | <div class="bodyline" id="step5"> |
| 162 | | <h1>Update Installed Modules</h1> |
| 163 | | <p>Before updating an installed module, make sure that you meet any module requirements listed.</p> |
| 164 | | |
| 165 | | <p> |
| 166 | | <label for="modules">available modules</label><br /> |
| 167 | | <select id="modules" name="modules" onchange="changeModule()"> |
| 168 | | <option value="0">Select a module to update...</option> |
| 169 | | <?php showModules($modules);?> |
| 170 | | </select> |
| 171 | | </p> |
| 172 | | |
| 173 | | <div id="moduleInformation" class="box" style="display:none"> |
| 174 | | <h2>Module Information</h2> |
| 175 | | <p> |
| 176 | | module Name<br /> |
| 177 | | <strong id="modulename"></strong> |
| 178 | | </p> |
| 179 | | <p> |
| 180 | | version: <strong id="moduleversion"></strong> |
| 181 | | </p> |
| 182 | | <p class="notes"> |
| 183 | | The version above is not necessarily the current data version. Use the |
| 184 | | "Check For Updates" button to see if an update is necessary. |
| 185 | | </p> |
| 186 | | <p> |
| 187 | | description<br /> |
| 188 | | <strong id="moduledescription"></strong> |
| 189 | | </p> |
| 190 | | <p> |
| 191 | | requirements<br /> |
| 192 | | <strong id="modulerequirements"></strong> |
| 193 | | </p> |
| 194 | | <p class="notes">make sure your system meets all of the module's requirements.</p> |
| 195 | | <p class="testButtonsP"> |
| 196 | | <input type="button" id="checkModule" value="Check For Updates" class="Buttons" onclick="runCommand('checkModuleUpdate')" /> |
| 197 | | <input type="button" id="updatemodule" name="updatemodule" value="Update Module" class="Buttons" onclick="runModuleUpdate()" disabled="disabled"/> |
| 198 | | </p> |
| 199 | | </div> |
| 200 | | |
| 201 | | |
| 202 | | <h3>Module Update Results</h3> |
| 203 | | <p> |
| 204 | | <textarea name="results" id="checkModuleUpdateresults" class="results" cols="80" rows="8"></textarea> |
| 205 | | </p> |
| 206 | | |
| 207 | | |
| 208 | | <p class="nextprevP"> |
| 209 | | <button type="button" class="Buttons nextprevButtons" onclick="goSection('back')">back</button> |
| 210 | | <button type="button" class="Buttons nextprevButtons" onclick="goSection('next')">next</button> |
| 211 | | </p> |
| 212 | | </div> |
| 213 | | |
| 214 | | <div class="bodyline" id="step6"> |
| 215 | | <h1>Complete the Update Process</h1> |
| 216 | | |
| 217 | | <p> |
| 218 | | To complete the update process, you may need to <strong>restart your browser</strong>, or <strong>clear site cookies and browser |
| 219 | | cache</strong> in order for all the changes to take affect. |
| 220 | | </p> |
| 221 | | |
| 222 | | <p class="testButtonsP"><input type="button" id="login" name="login" value="phpBMS Log In" class="Buttons" onclick="document.location='../'" /></p> |
| 223 | | |
| 224 | | <p class="nextprevP"> |
| 225 | | <button type="button" class="Buttons nextprevButtons" onclick="goSection('back')">back</button> |
| 226 | | <button type="button" class="disabledButtons nextprevButtons" onclick="goSection('next')" disabled="disabled">next</button> |
| 227 | | </p> |
| 228 | | </div> |
| 229 | | |