[ Index ] |
|
Code source de e107 0.7.8 |
1 <?php 2 /* 3 + ----------------------------------------------------------------------------+ 4 | e107 website system 5 | 6 | ©Steve Dunstan 2001-2002 7 | http://e107.org 8 | jalist@e107.org 9 | 10 | Released under the terms and conditions of the 11 | GNU General Public License (http://gnu.org). 12 | 13 | $Source: /cvsroot/e107/e107_0.7/e107_admin/e107_update.php,v $ 14 | $Revision: 1.12 $ 15 | $Date: 2006/01/09 17:02:15 $ 16 | $Author: sweetas $ 17 +----------------------------------------------------------------------------+ 18 */ 19 require_once ("../class2.php"); 20 $e_sub_cat = 'database'; 21 require_once ("auth.php"); 22 require_once ("update_routines.php"); 23 24 function run_updates($dbupdate) { 25 global $ns; 26 foreach($dbupdate as $func => $rmks) { 27 $installed = call_user_func("update_".$func); 28 if ((LAN_UPDATE == $_POST[$func]) && !$installed) { 29 if (function_exists("update_".$func)) { 30 $message .= LAN_UPDATE_7." {$rmks}<br />"; 31 $error=call_user_func("update_".$func, "do"); 32 if ($error!='') { 33 $message = $error; 34 } 35 } 36 } 37 } 38 if ($message) { 39 $ns->tablerender(LAN_UPDATE, $message); 40 } 41 } 42 43 function show_updates($dbupdate, $additional = false) { 44 global $ns; 45 $text = "<form method='POST' action='".e_SELF."'> 46 <div style='width:100%'> 47 <table class='fborder' style='".ADMIN_WIDTH."'> 48 <tr> 49 <td class='fcaption'>".LAN_UPDATE."</td> 50 <td class='fcaption'>".LAN_UPDATE_2."</td> 51 </tr> 52 "; 53 54 $updates = 0; 55 56 foreach($dbupdate as $func => $rmks) { 57 if (function_exists("update_".$func)) { 58 $text .= "<tr><td class='forumheader3' style='width: 60%'>{$rmks}</td>"; 59 if (call_user_func("update_".$func)) { 60 $text .= "<td class='forumheader3' style='text-align:center; width: 40%'>".LAN_UPDATE_3."</td>"; 61 } else { 62 $updates++; 63 $text .= "<td class='forumheader3' style='text-align:center; width: 40%'><input class='button' type='submit' name='{$func}' value='".LAN_UPDATE."' /></td>"; 64 } 65 $text .= "</tr>"; 66 } 67 } 68 69 $text .= "</table></div></form>"; 70 $ns->tablerender(($additional ? (defined("LAN_UPDATE_11") ? LAN_UPDATE_11 : '.617 to .7 Update Continued') : LAN_UPDATE_10), $text); 71 } 72 73 if ($_POST) { 74 $message = run_updates($dbupdate); 75 } 76 77 if($sql->db_Select("plugin", "plugin_version", "plugin_path = 'forum' AND plugin_installflag='1' ")) { 78 if(file_exists(e_PLUGIN.'forum/forum_update_check.php')) 79 { 80 include_once(e_PLUGIN.'forum/forum_update_check.php'); 81 } 82 } 83 if ($sql -> db_Query("SHOW COLUMNS FROM ".MPREFIX."stat_info") && $sql -> db_Select("plugin", "*", "plugin_path = 'log' AND plugin_installflag='1'")) { 84 if(file_exists(e_PLUGIN.'log/log_update_check.php')) 85 { 86 include_once(e_PLUGIN.'log/log_update_check.php'); 87 } 88 } 89 90 if($sql->db_Select("plugin", "plugin_version", "plugin_path = 'content' AND plugin_installflag='1' ")) 91 { 92 if(file_exists(e_PLUGIN.'content/content_update_check.php')) 93 { 94 include_once(e_PLUGIN.'content/content_update_check.php'); 95 } 96 } 97 98 if ($sql->db_Select("plugin", "plugin_version", "plugin_path = 'pm' AND plugin_installflag='1' ")) 99 { 100 if(file_exists(e_PLUGIN.'pm/pm_update_check.php')) 101 { 102 include_once(e_PLUGIN.'pm/pm_update_check.php'); 103 } 104 } 105 106 if ($_POST) { 107 $message = run_updates($dbupdatep); 108 } 109 110 if (isset($dbupdatep)) { 111 show_updates($dbupdatep, true); 112 } 113 show_updates($dbupdate); 114 115 require_once ("footer.php"); 116 117 ?>
titre
Description
Corps
titre
Description
Corps
titre
Description
Corps
titre
Corps
Généré le : Sun Apr 1 01:23:32 2007 | par Balluche grâce à PHPXref 0.7 |