Changeset 19 for minimanager/header.php
- Timestamp:
- Aug 13, 2007, 9:05:34 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
minimanager/header.php
r5 r19 15 15 require_once("scripts/config.php"); 16 16 if($debug) $tot_queries = 0; 17 require_once("scripts/db_layer.php"); 17 18 18 19 if (isset($_COOKIE["lang"])){ … … 22 23 23 24 if (isset($_COOKIE["css_template"])){ 24 $template = $_COOKIE["css_template"]; 25 if (is_dir("templates/$template")) { 26 if (is_file("templates/$template/$template"."_1024.css")) $css_template = $template; 27 } 25 if (is_dir("templates/".$_COOKIE["css_template"])) 26 if (is_file("templates/".$_COOKIE["css_template"]."/".$_COOKIE["css_template"]."_1024.css")) $css_template = $_COOKIE["css_template"]; 28 27 } 29 28 30 29 require_once("lang/$lang.php"); 31 30 require_once("scripts/global_lib.php"); 32 require_once("scripts/mysql.php"); 31 33 32 //application/xhtml+xml 34 33 $output .= "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\"> … … 44 43 <script type=\"text/javascript\" src=\"js/general.js\"></script> 45 44 <script type=\"text/javascript\" src=\"js/layout.js\"></script> 46 47 <!--[if lte IE 7]> 45 <!--[if lte IE 7]> 48 46 <style> 49 47 #menuwrapper, #menubar ul a {height: 1%;} 50 48 a:active {width: auto;} 51 </style> 49 legend{margin:5px 0px 20px 0px;} 50 span.button{margin:15px 0px 0px 0px;} 51 </style> 52 52 <![endif]--> 53 53 54 54 </head> 55 <body onload=\"dynamicLayout(); Menu();\">55 <body onload=\"dynamicLayout();\"> 56 56 <center> 57 57 <table class=\"table_top\"> … … 61 61 if ( (isset($_SESSION['user_lvl'])) && (isset($_SESSION['uname'])) && (isset($_SESSION['realm_id']))&& (!isset($_GET['err'])) ){ 62 62 63 if(ini_get('max_execution_time') < 1200 ){ 64 if(!ini_set('max_execution_time',1200)) error("Error - max_execution_time not set.<br /> Please set it manually to 1200 or more, in php.ini for full functionality."); 63 if(ini_get('max_execution_time') < 1800){ 64 if(!ini_set('max_execution_time',0)) 65 error("Error - max_execution_time not set.<br /> Please set it manually to 0, in php.ini for full functionality."); 65 66 } 66 67 … … 72 73 $user_lvl = $_SESSION['user_lvl']; 73 74 $user_name = $_SESSION['uname']; 74 $realm_id = $_SESSION['realm_id'];75 75 $user_id = $_SESSION['user_id']; 76 $realm_id = (isset($_GET['r_id'])) ? addslashes($_GET['r_id']) : $_SESSION['realm_id']; 76 77 77 78 //override PHP error reporting … … 79 80 else error_reporting (E_COMPILE_ERROR); 80 81 81 $ mysql = new MySQL;82 $ mysql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']);83 $result = $ mysql->query("SELECT id,name FROM `realmlist` LIMIT 10");82 $sql = new SQL; 83 $sql->connect($realm_db['addr'], $realm_db['user'], $realm_db['pass'], $realm_db['name']); 84 $result = $sql->query("SELECT id,name FROM `realmlist` LIMIT 10"); 84 85 85 86 $output .= "<div id=\"menuwrapper\"> … … 89 90 90 91 foreach ($menu_array[$user_lvl][1] as $trunk){ 91 $output .= "<li><a href=\"{$trunk[0]}\">{$lang_header[$trunk[1]]}</a>"; 92 $output .= "<li><a href=\"{$trunk[0]}\">{$lang_header[$trunk[1]]}<!--[if IE 7]><!--></a><!--<![endif]--> 93 <!--[if lte IE 6]><table><tr><td><![endif]-->"; 92 94 if(isset($trunk[2][0])) $output .= "<ul>"; 93 95 foreach ($trunk[2] as $branch){ … … 95 97 } 96 98 if(isset($trunk[2][0])) $output .= "</ul>"; 97 $output .= "< /li>";99 $output .= "<!--[if lte IE 6]></td></tr></table></a><![endif]--></li>"; 98 100 } 99 101 100 $output .= "<li><a class=\"trigger\" href=\"edit.php\">{$lang_header['my_acc']}</a> 102 $output .= "<li><a class=\"trigger\" href=\"edit.php\">{$lang_header['my_acc']}<!--[if IE 7]><!--></a><!--<![endif]--> 103 <!--[if lte IE 6]><table><tr><td><![endif]--> 101 104 <ul>"; 102 if ($ mysql->num_rows($result) > 1){103 while ($realm = $ mysql->fetch_row($result)){105 if ($sql->num_rows($result) > 1){ 106 while ($realm = $sql->fetch_row($result)){ 104 107 $set = ($realm[0] == $realm_id) ? ">" : ""; 105 108 $output .= "<li><a href=\"realm.php?action=set_def_realm&id=$realm[0]&url={$_SERVER['PHP_SELF']}\">$set $realm[1]</a></li>"; … … 110 113 <li><a href=\"logout.php\">{$lang_header['logout']}</a></li> 111 114 </ul> 115 <!--[if lte IE 6]></td></tr></table></a><![endif]--> 112 116 </li> 113 117 </ul> … … 120 124 </table>"; 121 125 122 $ mysql->close();126 $sql->close(); 123 127 124 128 } else {
Note:
See TracChangeset
for help on using the changeset viewer.