Changeset 374 for minimanager/header.php
- Timestamp:
- Sep 11, 2008, 9:10:27 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
minimanager/header.php
r142 r374 29 29 require_once("lang/$lang.php"); 30 30 require_once("scripts/global_lib.php"); 31 require_once("scripts/id_tab.php"); 31 32 32 33 //application/xhtml+xml 33 34 $output .= "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\"> 34 <html >35 <html xmlns=\"http://www.w3.org/1999/xhtml\" xml:lang=\"en\" lang=\"en\"> 35 36 <head> 36 37 <title>$title</title> 37 <meta http-equiv=\"Content-Type\" content=\"text/html; charset= $site_encoding\" />38 < link rel=\"stylesheet\" type=\"text/css\" href=\"templates/".$css_template."/".$css_template."_1024.css\" title=\"default\" />38 <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" /> 39 <meta http-equiv=\"Content-Type\" content=\"text/javascript; charset=utf-8\" /> 39 40 <link rel=\"stylesheet\" type=\"text/css\" href=\"templates/".$css_template."/".$css_template."_1024.css\" title=\"1024\" /> 40 41 <link rel=\"stylesheet\" type=\"text/css\" href=\"templates/".$css_template."/".$css_template."_1280.css\" title=\"1280\" /> 42 <link rel=\"SHORTCUT ICON\" href=\"img/favicon.ico\" /> 43 <script type=\"text/javascript\" charset=\"utf-8\"></script> 44 <script src=\"js/general.js\"></script> 45 <script src=\"js/layout.js\"></script> 46 <script src=\"$tt_scrip\"></script> 41 47 42 <link rel=\"SHORTCUT ICON\" href=\"img/favicon.ico\" />43 <script type=\"text/javascript\" src=\"js/general.js\"></script>44 <script type=\"text/javascript\" src=\"js/layout.js\"></script>45 48 <!--[if lte IE 7]> 46 49 <style> … … 77 80 $realm_id = (isset($_GET['r_id'])) ? addslashes($_GET['r_id']) : $_SESSION['realm_id']; 78 81 82 $user_lvl_name = get_gm_level($user_lvl); 83 79 84 //override PHP error reporting 80 85 if ($debug) error_reporting (E_ALL); … … 90 95 if(!isset($menu_array[$user_lvl])) error("Wrong menu_array configuration.<br />Level $user_lvl menu missing..."); 91 96 92 foreach ($menu_array[$user_lvl][1] as $trunk){ 93 $output .= "<li><a href=\"{$trunk[0]}\">{$lang_header[$trunk[1]]}</a>"; 94 if(isset($trunk[2][0])) $output .= "<ul>"; 95 foreach ($trunk[2] as $branch){ 96 $output .= "<li><a href=\"{$branch[0]}\">{$lang_header[$branch[1]]}</a></li>"; 97 } 98 if(isset($trunk[2][0])) $output .= "</ul>"; 99 $output .= "</li>"; 100 } 97 // get file we are executing 98 $array = explode ( '/', $_SERVER['PHP_SELF']); 99 $lookup_file = $array[sizeof($array)-1]; 100 101 foreach ($menu_array as $trunk){ 102 if ($trunk[1] != "invisible") // ignore "invisible array" this is for setting security read/write values for not accessible elements not in the navbar! 103 { 104 $output .= "<li><a href=\"{$trunk[0]}\">{$lang_header[$trunk[1]]}</a>"; 105 if(isset($trunk[2][0])) $output .= "<ul>"; 106 foreach ($trunk[2] as $branch){ 107 108 if($branch[0] == $lookup_file) 109 { 110 $action_permission['read'] = $branch[2]; 111 $action_permission['update'] = $branch[3]; 112 $action_permission['insert'] = $branch[4]; 113 $action_permission['delete'] = $branch[5]; 114 } 115 116 if ( $user_lvl >= $branch[2] ) 117 $output .= "<li><a href=\"{$branch[0]}\">{$lang_header[$branch[1]]}</a></li>"; 118 } 119 if(isset($trunk[2][0])) $output .= "</ul>"; 120 $output .= "</li>"; 121 } 122 else 123 { 124 foreach ($trunk[2] as $branch){ 125 126 if($branch[0] == $lookup_file) 127 $action_permission['read']=$branch[2]; 128 } 129 } 130 131 } 132 133 // secure non secure settings 134 // some pages don't have security yet, because they dont use header.php... like pomm.php and login.php 135 if(!isset($action_permission['read'])) $action_permission['read'] = 3; 136 if(!isset($action_permission['update']) || $action_permission['update'] < $action_permission['read'] ) $action_permission['update'] = $action_permission['read']; 137 if(!isset($action_permission['insert']) || $action_permission['insert'] < $action_permission['update'] ) $action_permission['insert'] = $action_permission['update']; 138 if(!isset($action_permission['delete']) || $action_permission['delete'] < $action_permission['insert'] ) $action_permission['delete'] = $action_permission['insert']; 101 139 102 140 $output .= "<li><a class=\"trigger\" href=\"edit.php\">{$lang_header['my_acc']}</a> … … 117 155 </div></td> 118 156 <td class=\"table_top_middle\"> 119 <div id=\"username\">$user_name .:{$ menu_array[$user_lvl][0]}'s {$lang_header['menu']}:.</div></td>157 <div id=\"username\">$user_name .:{$user_lvl_name}'s {$lang_header['menu']}:.</div></td> 120 158 <td class=\"table_top_right\"></td> 121 159 </tr>
Note:
See TracChangeset
for help on using the changeset viewer.