Changeset 4348
- Timestamp:
- 07/10/07 20:45:41 (6 years ago)
- Files:
-
- freepbx/branches/2.3/amp_conf/htdocs/admin/common/jquery.tabs.css (copied) (copied from freepbx/branches/2.3.views/amp_conf/htdocs/admin/common/jquery.tabs.css)
- freepbx/branches/2.3/amp_conf/htdocs/admin/common/jquery.tabs.js (copied) (copied from freepbx/branches/2.3.views/amp_conf/htdocs/admin/common/jquery.tabs.js)
- freepbx/branches/2.3/amp_conf/htdocs/admin/common/mainstyle.css (modified) (1 diff)
- freepbx/branches/2.3/amp_conf/htdocs/admin/config.php (modified) (9 diffs)
- freepbx/branches/2.3/amp_conf/htdocs/admin/header.php (modified) (4 diffs)
- freepbx/branches/2.3/amp_conf/htdocs/admin/header_auth.php (modified) (1 diff)
- freepbx/branches/2.3/amp_conf/htdocs/admin/panel.php (modified) (1 diff)
- freepbx/branches/2.3/amp_conf/htdocs/admin/reports.php (modified) (5 diffs)
- freepbx/branches/2.3/amp_conf/htdocs/admin/views (copied) (copied from freepbx/branches/2.3.views/amp_conf/htdocs/admin/views)
- freepbx/branches/2.3/amp_conf/htdocs/admin/views/freepbx.php (copied) (copied from freepbx/branches/2.3.views/amp_conf/htdocs/admin/views/freepbx.php)
- freepbx/branches/2.3/amp_conf/htdocs/admin/views/freepbx_admin.php (copied) (copied from freepbx/branches/2.3.views/amp_conf/htdocs/admin/views/freepbx_admin.php)
- freepbx/branches/2.3/amp_conf/htdocs/admin/views/noaccess.php (copied) (copied from freepbx/branches/2.3.views/amp_conf/htdocs/admin/views/noaccess.php)
- freepbx/branches/2.3/amp_conf/htdocs/admin/views/panel.php (copied) (copied from freepbx/branches/2.3.views/amp_conf/htdocs/admin/views/panel.php)
- freepbx/branches/2.3/amp_conf/htdocs/admin/views/reports.php (copied) (copied from freepbx/branches/2.3.views/amp_conf/htdocs/admin/views/reports.php)
- freepbx/branches/2.3/amp_conf/htdocs/admin/views/welcome.php (copied) (copied from freepbx/branches/2.3.views/amp_conf/htdocs/admin/views/welcome.php)
- freepbx/branches/2.3/amp_conf/htdocs/admin/views/welcome_nomanager.php (copied) (copied from freepbx/branches/2.3.views/amp_conf/htdocs/admin/views/welcome_nomanager.php)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
freepbx/branches/2.3/amp_conf/htdocs/admin/common/mainstyle.css
r4113 r4348 200 200 } 201 201 202 203 #nav #nav-tabs li, #nav #nav-tabs li a { 204 display:inline; 205 padding-left:0 206 } 207 #nav #nav-tabs { 208 margin-bottom:0; 209 padding-left:12px; 210 } 211 #nav #nav-tabs li { 212 border-top:#ccc; 213 margin-right:12px; 214 } 215 #nav #nav-tabs li a{ 216 font-weight:bold; 217 } 218 #nav #nav-tabs li.tabs-selected { 219 border-top:2px solid #ff8a00; 220 } 221 222 223 /***** report nav *****/ 224 #reportnav { 225 position:absolute; 226 top:55px; 227 left:10px; 228 border:1; 229 padding: 0 0 0 0; 230 list-style-type: none; 231 font-size:12px; 232 border-right:1px solid black; 233 } 234 #reportnav ul { 235 margin:0; 236 padding:0; 237 } 238 #reportnav li { 239 display: inline; 240 border-left:1px solid black; 241 padding-left:6px; 242 padding-right:6px; 243 } 202 244 /***** footer *****/ 203 245 #footer { freepbx/branches/2.3/amp_conf/htdocs/admin/config.php
r4336 r4348 12 12 //GNU General Public License for more details. 13 13 14 $title = "FreePBX administration";15 16 14 $type = isset($_REQUEST['type'])?$_REQUEST['type']:'setup'; 17 15 $display = isset($_REQUEST['display'])?$_REQUEST['display']:''; … … 22 20 23 21 // determine module type to show, default to 'setup' 24 if($type == "tool") { 25 $message = "Tools"; 26 $fpbx_menu = array( 27 'modules' => array('category' => 'System Administration', 'name' => 'Module Admin', 'sort' => 0) 28 ); 29 } elseif($type == "cdrcost") { 30 $message = "Call Cost"; 31 } else { 32 $message = "Setup"; 33 } 34 35 require_once('common/php-asmanager.php'); 36 require_once('functions.inc.php'); 37 38 // get settings 39 $amp_conf = parse_amportal_conf("/etc/amportal.conf"); 40 $asterisk_conf = parse_asterisk_conf(rtrim($amp_conf["ASTETCDIR"],"/")."/asterisk.conf"); 41 $astman = new AGI_AsteriskManager(); 42 //if (! $res = $astman->connect("127.0.0.1:".$amp_conf["ASTMANAGERPORT"], $amp_conf["AMPMGRUSER"] , $amp_conf["AMPMGRPASS"])) { 43 44 if (!isset($amp_conf["ASTMANAGERPROXYPORT"]) || !$res = $astman->connect("127.0.0.1:".$amp_conf["ASTMANAGERPROXYPORT"], $amp_conf["AMPMGRUSER"] , $amp_conf["AMPMGRPASS"])) { 45 if (!$res = $astman->connect("127.0.0.1:".$amp_conf["ASTMANAGERPORT"], $amp_conf["AMPMGRUSER"] , $amp_conf["AMPMGRPASS"])) { 46 unset( $astman ); 47 } 48 } 49 50 session_start(); 51 include 'header_auth.php'; 22 $type_names = array( 23 'tool'=>'Tools', 24 'setup'=>'Setup', 25 'cdrcost'=>'Call Cost', 26 ); 27 28 include('header.php'); 52 29 53 30 // get all enabled modules … … 55 32 $active_modules = module_getinfo(false, MODULE_STATUS_ENABLED); 56 33 34 // initialize menu with module admin 35 $fpbx_menu = array( 36 'modules' => array('type'=>'tool', 'category' => 'System Administration', 'name' => 'Module Admin', 'sort' => 0) 37 ); 38 57 39 // include any module global functions 58 40 // add module sections to $fpbx_menu 41 $types = array(); 59 42 if(is_array($active_modules)){ 60 43 foreach($active_modules as $key => $module) { … … 70 53 // loop through the types 71 54 foreach($module['items'] as $itemKey => $item) { 72 if ($item['type'] == $type) { 73 // item is an assoc array, with at least array(name=>, category=>, type=>) 74 $fpbx_menu[$itemKey] = $item; 75 } 76 } 77 78 } 79 55 if (!in_array($item['type'], $types)) { 56 $types[] = $item['type']; 57 } 58 // item is an assoc array, with at least array(name=>, category=>, type=>) 59 $fpbx_menu[$itemKey] = $item; 60 } 61 } 80 62 } 81 63 } 64 sort($types); 82 65 83 66 // new gui hooks … … 132 115 } 133 116 134 if (!$quietmode) {135 if (is_array($fpbx_menu)) {136 $category = Array();137 $sort = Array();138 $name = Array();139 // Sorting menu by category and name140 foreach ($fpbx_menu as $key => $row) {141 $category[$key] = $row['category'];142 $sort[$key] = $row['sort'];143 $name[$key] = $row['name'];144 }145 146 if ($amp_conf['USECATEGORIES']) {147 array_multisort(148 $category, SORT_ASC,149 $sort, SORT_ASC, SORT_NUMERIC,150 $name, SORT_ASC,151 $fpbx_menu152 );153 } else {154 array_multisort(155 $sort, SORT_ASC, SORT_NUMERIC,156 $name, SORT_ASC,157 $fpbx_menu158 );159 }160 161 // Printing menu162 echo "<div id=\"nav\"><ul>\n";163 164 $prev_category = '';165 166 foreach ($fpbx_menu as $key => $row) {167 if ($amp_conf['USECATEGORIES'] && ($row['category'] != $prev_category)) {168 echo "\t\t<li>"._($row['category'])."</li>\n";169 $prev_category = $row['category'];170 }171 172 $href = isset($row['href']) ? $row['href'] : "config.php?type=".$type."&display=".$key;173 $extra_attributes = '';174 if (isset($row['target'])) {175 $extra_attributes .= ' target="'.$row['target'].'"';176 }177 178 echo "\t<li" .179 (($display==$key) ? ' class="current"':'') .180 '><a href="'.$href.'" '.$extra_attributes.' >'._($row['name'])."</a></li>\n";181 182 }183 echo "</ul></div>\n\n";184 }185 186 echo "<div id=\"wrapper\"><div id=\"background-wrapper\">\n";187 188 echo "<div id=\"left-corner\"></div>\n";189 echo "<div id=\"right-corner\"></div>\n";190 191 echo "<div class=\"content\">\n";192 193 194 echo "<noscript><div class=\"attention\">"._("WARNING: Javascript is disabled in your browser. The FreePBX administration interface requires Javascript to run properly. Please enable javascript or switch to another browser that supports it.")."</div></noscript>";195 }196 197 117 198 118 199 119 // check access 200 120 if ( ($display != '') && !isset($fpbx_menu[$display]) ) { 201 $display = "noaccess"; 121 showview("noaccess"); 122 exit; 202 123 } 203 124 … … 218 139 $currentcomponent->buildconfigpage(); 219 140 } 141 142 // note: we buffer all the output from the 'page' being loaded.. 143 // This may change in the future, with proper returns, but for now, it's a simple 144 // way to support the old page.item.php include module format. 145 ob_start(); 220 146 221 147 // show the appropriate page … … 281 207 } 282 208 break; 283 case 'noaccess':284 echo "<h2>"._("Not found")."</h2>";285 echo "<p>"._("The section you requested does not exist or you do not have access to it.")."</p>";286 break;287 209 case 'modules': 288 210 include 'page.modules.php'; … … 290 212 case '': 291 213 if ($astman) { 214 /* 292 215 printf( "<h2>%s</h2>", dgettext("welcome page", "Welcome to FreePBX.") ); 293 216 … … 377 300 echo _("Asterisk may not be running."); 378 301 echo "</div></p>\n"; 302 */ 303 showview('welcome', array('AMP_CONF' => &$amp_conf)); 304 } else { 305 // no manager, no connection to asterisk 306 showview('welcome_nomanager', array('mgruser' => $amp_conf["AMPMGRUSER"])); 379 307 } 380 308 break; 381 382 } 383 384 if (!$quietmode) { 385 echo "\t</div> <!-- /content -->\n"; 386 387 include('footer.php'); 388 echo "</div></div> <!-- /background-wrapper, /wrapper -->\n"; 389 390 echo "</div> <!-- /page -->\n"; 391 echo "</body>\n"; 392 echo "</html>\n"; 393 } 309 } 310 311 if ($quietmode) { 312 // send the output buffer 313 ob_end_flush(); 314 } else { 315 $admin_template = $template = array(); 316 317 318 $admin_template['content'] = ob_get_contents(); 319 ob_end_clean(); 320 321 // build the admin interface (with menu) 322 $admin_template['fpbx_types'] = $types; 323 $admin_template['fpbx_type_names'] = $type_names; 324 $admin_template['fpbx_menu'] = $fpbx_menu; 325 $admin_template['fpbx_usecategories'] = $amp_conf['USECATEGORIES']; 326 $admin_template['fpbx_type'] = $type; 327 $admin_template['display'] = $display; 328 329 // then load it and put it into the main freepbx interface 330 $template['content'] = loadview('freepbx_admin', $admin_template); 331 332 // setup main template 333 $template['display'] = $display; 334 $template['title'] = "FreePBX administration"; 335 $template['amp_conf'] = &$amp_conf; 336 337 338 showview('freepbx', $template); 339 } 340 394 341 ?> freepbx/branches/2.3/amp_conf/htdocs/admin/header.php
r4338 r4348 12 12 //GNU General Public License for more details. 13 13 14 // helper function, to draw the upper links 15 function print_sub_tool( $name, $page, $is_current, $href=NULL, $new_window=false ) 16 { 17 if (!is_file($page)) 18 return; 19 20 $html = "<li"; 14 /** Loads a view (from the views/ directory) with a number of named parameters created as local variables. 15 * @param string The name of the view. 16 * @param array The parameters to pass. Note that the key will be turned into a variable name for use by the view. 17 * For example, passing array('foo'=>'bar'); will create a variable $foo that can be used by 18 * the code in the view. 19 */ 20 function loadview($viewname, $parameters = false) { 21 ob_start(); 22 showview($viewname, $parameters); 23 $contents = ob_get_contents(); 24 ob_end_clean(); 25 return $contents; 26 } 27 /** Outputs the contents of a view. 28 * @param string The name of the view. 29 * @param array The parameters to pass. Note that the key will be turned into a variable name for use by the view. 30 * For example, passing array('foo'=>'bar'); will create a variable $foo that can be used by 31 * the code in the view. 32 */ 33 function showview($viewname, $parameters = false) { 34 if (is_array($parameters)) { 35 extract($parameters); 36 } 21 37 22 if ($is_current) 23 $html .= " class=\"current\""; 24 25 $html .= "><a "; 26 if ($href == NULL) 27 $href .= $page; 28 29 if ($new_window != NULL) 30 $html .= "target=\"_blank\" "; 31 32 $html .= "href=\"$href\">$name</a></li>"; 33 34 print("\t\t$html\n"); 38 $viewname = str_replace('..','.',$viewname); // protect against going to subdirectories 39 if (file_exists('views/'.$viewname.'.php')) { 40 include('views/'.$viewname.'.php'); 41 } 35 42 } 36 37 38 // start output buffering39 ob_start();40 43 41 44 //get the current file name 42 45 $currentFile = $_SERVER["PHP_SELF"]; 43 $parts = Explode('/', $currentFile);46 $parts = explode('/', $currentFile); 44 47 //header('Content-type: text/html; charset=utf-8'); 45 48 $currentFile = $parts[count($parts) - 1]; 49 //todo: can this be removed? what is it used for? 50 46 51 47 52 // Emulate gettext extension functions if gettext is not available … … 62 67 } 63 68 64 69 // setup locale 65 70 if (extension_loaded('gettext')) { 66 71 if (isset($_COOKIE['lang'])) { … … 74 79 textdomain('amp'); 75 80 } 81 76 82 77 83 // systems running on sqlite3 (or pgsql) this function is not available … … 93 99 } 94 100 95 if (!$quietmode) { 101 // include base functions 102 require_once('functions.inc.php'); 103 require_once('common/php-asmanager.php'); 104 105 // get settings 106 $amp_conf = parse_amportal_conf("/etc/amportal.conf"); 107 $asterisk_conf = parse_asterisk_conf(rtrim($amp_conf["ASTETCDIR"],"/")."/asterisk.conf"); 108 $astman = new AGI_AsteriskManager(); 109 110 // attempt to connect to asterisk manager proxy 111 if (!isset($amp_conf["ASTMANAGERPROXYPORT"]) || !$res = $astman->connect("127.0.0.1:".$amp_conf["ASTMANAGERPROXYPORT"], $amp_conf["AMPMGRUSER"] , $amp_conf["AMPMGRPASS"])) { 112 // attempt to connect directly to asterisk, if no proxy or if proxy failed 113 if (!$res = $astman->connect("127.0.0.1:".$amp_conf["ASTMANAGERPORT"], $amp_conf["AMPMGRUSER"] , $amp_conf["AMPMGRPASS"])) { 114 // couldn't connect at all 115 unset( $astman ); 116 } 117 } 118 119 // always run a session 120 session_start(); 121 122 // do authentication - header_auth exits if unauthorized 123 include('header_auth.php'); 124 96 125 ?> 97 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">98 99 <html>100 101 <head>102 <title><?php echo _($title) ?></title>103 <meta http-equiv="Content-Type" content="text/html">104 <link href="common/mainstyle.css" rel="stylesheet" type="text/css">105 <link rel="shortcut icon" type="image/vnd.microsoft.icon" href="favicon.ico" >106 <!--[if IE]>107 <link href="common/ie.css" rel="stylesheet" type="text/css">108 <![endif]-->109 <meta http-equiv="Content-Type" content="text/html;charset=utf-8" >110 <?php111 // check if in the amp configuration the user has set that112 // he wants to use an alternative style-sheet.113 // on Xorcom's TS1, it's used when the system is in rescue mode.114 if (isset($amp_conf["ALTERNATIVE_CSS"]))115 {116 if (($amp_conf["ALTERNATIVE_CSS"] == "1") ||117 ($amp_conf["ALTERNATIVE_CSS"] == "yes") ||118 ($amp_conf["ALTERNATIVE_CSS"] == "true"))119 echo "\t<link href=\"common/mainstyle-alternative.css\" rel=\"stylesheet\" type=\"text/css\">";120 }121 122 if (isset($display) && is_file("modules/{$display}/{$display}.css")) {123 echo "\t<link href=\"modules/{$display}/{$display}.css\" rel=\"stylesheet\" type=\"text/css\">\n";124 }125 ?>126 127 <script type="text/javascript" src="common/script.js.php"></script>128 <script type="text/javascript" src="common/jquery.js"></script>129 <!--[if IE]>130 <style type="text/css">div.inyourface a{position:absolute;}</style>131 <![endif]-->132 </head>133 134 <body onload="body_loaded();" <?135 // Check if it's a RIGHT TO LEFT character set (eg, hebrew, arabic, whatever)136 //$_COOKIE['lang']="he_IL";137 if (isset($_COOKIE['lang']) && $_COOKIE['lang']==="he_IL")138 echo "dir=\"rtl\"";139 140 ?> >141 <div id="page">142 <div id="header">143 <?php144 145 echo "\t\t<div id=\"version\">";146 echo sprintf(_("%s %s on %s"),147 "<a href=\"index.php\">"._("FreePBX")."</a>",148 getversion(),149 "<a href=\"http".(isset($_SERVER['HTTPS'])&&$_SERVER['HTTPS']!=''?'s':'')."://".$_SERVER['HTTP_HOST']."\">".$_SERVER["SERVER_NAME"]."</a>"150 );151 echo "</div>\n";152 153 echo "\t\t<ul id=\"metanav\">\n";154 print_sub_tool( _("Management"), "manage.php" , $currentFile=='manage.php' );155 print_sub_tool( _("Setup") , "config.php" , $currentFile=='config.php' && isset($_REQUEST['type']) && ($_REQUEST['type']=='setup' || $_REQUEST['type'] == ""), "config.php?type=setup", false );156 print_sub_tool( _("Tools") , "config.php" , $currentFile=='config.php' && isset($_REQUEST['type']) && $_REQUEST['type']=='tool' , "config.php?type=tool", false );157 print_sub_tool( _("Reports") , "reports.php", $currentFile=='reports.php' );158 print_sub_tool( _("Panel") , "panel.php" , $currentFile=='panel.php' );159 print_sub_tool( _("Recordings"), "../recordings/index.php" ,0, NULL, true );160 ?>161 <li><a href="http://support.freepbx.org" title="FreePBX Support" target="_blank">Help</a></li>162 <?php163 echo "\t\t</ul>\n";164 165 $freepbx_alt = _("FreePBX");166 $freepbx_logo = (isset($amp_conf["AMPADMINLOGO"]) && is_file($amp_conf["AMPWEBROOT"]."/admin/images/".$amp_conf["AMPADMINLOGO"])) ? $amp_conf["AMPADMINLOGO"] : 'freepbx_small.png';167 echo "\t\t<div id=\"logo\"><a href=\"http://www.freepbx.org\" target=\"_blank\" title=\"".$freepbx_alt."\"><img src=\"images/".$freepbx_logo."\" alt=\"".$freepbx_alt."\" /></a></div>\n";168 169 echo "\t</div>";170 171 // need reload bar - hidden by default172 echo "\n\t\t<div class=\"attention\" id=\"need_reload_block\" style=\"display:none;\"><a href=\"javascript:void(null);\" onclick=\"amp_apply_changes();\" class=\"info\">";173 echo _("Apply Configuration Changes");174 echo "<span>".sprintf(_("You have made changes to the configuration that have not yet been applied. When you are ".175 "finished making all changes, click on %s to put them into effect."), "<strong>"._("Apply Configuration Changes")."</strong>");176 echo "</span></a></div>\n\n";177 178 179 echo "\t<div id=\"message\">";180 181 // TODO: this is ugly, need to code this better!182 // mixing php + html is bad!183 if (extension_loaded('gettext')) {184 if (!isset($_COOKIE['lang'])) {185 $_COOKIE['lang'] = "en_US";186 }187 ?>188 <?php echo _("Language:") ?>189 190 <select onchange="javascript:changeLang(this.value)">191 <option value="en_US" <? echo ($_COOKIE['lang']=="en_US" ? "selected" : "") ?> >English</option>192 <option value="fr_FR" <? echo ($_COOKIE['lang']=="fr_FR" ? "selected" : "") ?> >Français</option>193 <option value="de_DE" <? echo ($_COOKIE['lang']=="de_DE" ? "selected" : "") ?> >Deutsch</option>194 <option value="it_IT" <? echo ($_COOKIE['lang']=="it_IT" ? "selected" : "") ?> >Italiano</option>195 <option value="es_ES" <? echo ($_COOKIE['lang']=="es_ES" ? "selected" : "") ?> >Español</option>196 <option value="ru_RU" <? echo ($_COOKIE['lang']=="ru_RU" ? "selected" : "") ?> >Russki</option>197 <option value="pt_PT" <? echo ($_COOKIE['lang']=="pt_PT" ? "selected" : "") ?> >Portuguese</option>198 <option value="he_IL" <? echo ($_COOKIE['lang']=="he_IL" ? "selected" : "") ?> >Hebrew</option>199 </select>200 <?php201 }202 ?>203 204 <script type="text/javascript">205 <!--206 function changeLang(lang) {207 document.cookie='lang='+lang;208 window.location.reload();209 }210 //-->211 </script>212 213 <?php214 if ( isset($_SESSION['AMP_user']) && $amp_conf['AUTHTYPE'] != 'none' ) {215 echo _('Logged in: ').$_SESSION['AMP_user']->username;216 echo ' (<a href="http'.(isset($_SERVER['HTTPS'])&&$_SERVER['HTTPS']!=''?'s':'').'://';217 218 if (!ereg('MSIE', $_SERVER['HTTP_USER_AGENT'])) {219 // use other logout for Firefox and other browsers220 echo 'logout:logout@';221 }222 223 $pathLength = strrpos($_SERVER['PHP_SELF'],'/');224 $logoutPath = ($pathLength === false) ? '' : substr($_SERVER['PHP_SELF'],0,$pathLength);225 226 echo $_SERVER['HTTP_HOST'].$logoutPath.'/logout.php">Logout</a>) :: ';227 }228 echo _($message);229 ?></div>230 231 <?php232 } // End 'quietmode' check233 ?>freepbx/branches/2.3/amp_conf/htdocs/admin/header_auth.php
r4170 r4348 110 110 } 111 111 112 include 'header.php';112 //todo .. delete // include 'header.php'; 113 113 114 114 if ( !(isset($result) ? $result : false) ) { 115 echo "\t<br><br><br><br><center><h2>"; 116 echo _("You must log in first before you can access this page."); 117 echo "</h2></center><br><br><br><br>\n"; 118 include 'footer.php'; 115 showview("noaccess"); 119 116 exit; 120 117 } freepbx/branches/2.3/amp_conf/htdocs/admin/panel.php
r4170 r4348 17 17 $message="Flash Operator Panel"; 18 18 19 require_once('functions.inc.php');19 include 'header.php'; 20 20 21 // get settings 22 $amp_conf = parse_amportal_conf("/etc/amportal.conf"); 23 24 include 'header_auth.php'; 21 showview('panel', array('title'=>$title, 'deptname' => $_SESSION["AMP_user"]->_deptname)); 25 22 ?> 26 </div>27 <iframe width="97%" height="600" frameborder="0" align="top" src="../panel/index_amp.php?context=<?php echo $_SESSION["AMP_user"]->_deptname?>"></iframe>28 29 </body>30 </html>freepbx/branches/2.3/amp_conf/htdocs/admin/reports.php
r4170 r4348 17 17 $message="Call Detail Reports"; 18 18 19 require_once('functions.inc.php'); 20 21 // get settings 22 $amp_conf = parse_amportal_conf("/etc/amportal.conf"); 19 include 'header.php'; 23 20 24 21 // BUILD an SQL clause for any AMP User restrictions 25 session_register('AMP_SQL');22 //session_register('AMP_SQL'); 26 23 $low = $_SESSION["AMP_user"]->_extension_low; 27 24 $high = $_SESSION["AMP_user"]->_extension_high; … … 35 32 } 36 33 37 include 'header_auth.php';38 39 34 $display=1; 40 35 if (isset($_REQUEST['display'])) { … … 43 38 44 39 // setup menu 45 $ amp_sections= array(40 $menu = array( 46 41 1=>_("Call Logs"), 47 42 2=>_("Compare Calls"), … … 51 46 52 47 echo "<div id=\"cdr\"><ul id=\"metanav\">"; 53 foreach ($ amp_sectionsas $key=>$value) {48 foreach ($menu as $key=>$value) { 54 49 echo "<li class=\"".(($display==$key) ? 'current':'')."\"><a href=\"reports.php?display=".$key."\">".$value."</a></li>"; 55 50 } … … 59 54 // Changes for -- AMP -- commented in: 60 55 // cdr.php, defines.php, call-log.php, call-comp.php, graph_hourdetail.php, graph_statbar.php, graph_pie.php 56 57 showview('reports', array('title'=>$title, 'display'=>$display, 'menu' => $menu)); 61 58 ?> 62 59 </div> 63 60 64 < iframe width="100%" height="600" frameborder="0" align="top" scrolling="yes" src="cdr/cdr.php?s=<?php echo $display; echo ($display=='1' ? '&posted=1' : '');?>"></iframe>61 <!-- iframe width="100%" height="600" frameborder="0" align="top" scrolling="yes" src="cdr/cdr.php?s=<?php echo $display; echo ($display=='1' ? '&posted=1' : '');?>"></iframe> --> 65 62
