Changeset 2617
- Timestamp:
- 09/26/06 06:43:51 (6 years ago)
- Files:
-
- freepbx/trunk/amp_conf/htdocs/admin/components.class.php (modified) (4 diffs)
- freepbx/trunk/amp_conf/htdocs/admin/config.php (modified) (5 diffs)
- freepbx/trunk/amp_conf/htdocs/admin/functions.inc.php (modified) (5 diffs)
- freepbx/trunk/amp_conf/htdocs/admin/header.php (modified) (1 diff)
- freepbx/trunk/amp_conf/htdocs/admin/modules/core/page.devices.php (modified) (1 diff)
- freepbx/trunk/amp_conf/htdocs/admin/modules/core/page.extensions.php (modified) (1 diff)
- freepbx/trunk/amp_conf/htdocs/admin/modules/core/page.users.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
freepbx/trunk/amp_conf/htdocs/admin/components.class.php
r2547 r2617 3 3 4 4 class component { 5 var $_compname; // Component name (e.g. users, devices, etc.etc.) 5 var $_compname; // Component name (e.g. users, devices, etc.) 6 var $_type; // Type name of this component ( e.g. setup, tool etc.) 6 7 7 8 var $_guielems_top; // Array of guielements … … 20 21 var $_lists; // Array of lists 21 22 22 function component($compname ) {23 function component($compname, $type = 'setup') { 23 24 $this->_compname = $compname; 25 $this->_type = $type; 24 26 25 27 $this->_sorted_guielems = true; … … 236 238 // Start of form 237 239 $htmlout .= "<form name=\"$formname\" action=\"".$_SERVER['PHP_SELF']."\" method=\"post\" onsubmit=\"return ".$formname."_onsubmit();\">\n"; 238 $htmlout .= "<input type=\"hidden\" name=\"display\" value=\"$this->_compname\">\n\n"; 240 $htmlout .= "<input type=\"hidden\" name=\"display\" value=\"$this->_compname\">\n"; 241 $htmlout .= "<input type=\"hidden\" name=\"type\" value=\"$this->_type\">\n\n"; 239 242 240 243 // Start of table … … 367 370 } 368 371 } 372 373 function isequal($compname, $type) { 374 return $this->_compname == $compname && $this->_type == $type; 375 } 369 376 } 370 377 freepbx/trunk/amp_conf/htdocs/admin/config.php
r2563 r2617 14 14 $title="freePBX administration"; 15 15 16 $type = isset($_REQUEST['type'])?$_REQUEST['type']:'setup'; 17 $display = isset($_REQUEST['display'])?$_REQUEST['display']:''; 18 $extdisplay = isset($_REQUEST['extdisplay'])?$_REQUEST['extdisplay']:null; 19 $skip = isset($_REQUEST['skip'])?$_REQUEST['skip']:0; 20 $action = isset($_REQUEST['action'])?$_REQUEST['action']:null; 21 $quietmode = isset($_REQUEST['quietmode'])?$_REQUEST['quietmode']:''; 22 16 23 // determine module type to show, default to 'setup' 17 if( isset($_REQUEST['type']) && $_REQUEST['type']== "tool") {24 if($type == "tool") { 18 25 $message="Tools"; 26 $amp_sections = array( 27 'modules'=>_("Module Admin") 28 ); 29 } elseif($type == "cdrcost") { 30 $message="Call Cost"; 19 31 } else { 20 32 $message="Setup"; 21 33 } 22 34 23 $quietmode = isset($_REQUEST['quietmode'])?$_REQUEST['quietmode']:'';24 35 require_once('functions.inc.php'); 25 36 … … 29 40 30 41 include 'header_auth.php'; 31 32 if (isset($_REQUEST['display'])) {33 $display=$_REQUEST['display'];34 } else {35 $display='';36 }37 38 // if we are looking at tools, then show module admin39 if ($_REQUEST['type'] == "tool") {40 $amp_sections = array(41 'modules'=>_("Module Admin")42 );43 }44 42 45 43 /* … … 49 47 }*/ 50 48 51 // determine module type to show, default to 'setup'52 if(isset($_REQUEST['type']) && $_REQUEST['type'] == "tool") {53 $type='tool';54 } else {55 $type='setup';56 }57 49 // get all enabled modules 58 50 // active_modules array used below and in drawselects function and genConf function … … 140 132 echo "<li>".$matches[1]._($matches[2]).$matches[3]."</li>\n"; 141 133 else 142 echo "<li><a id=\"".(($display==$key) ? 'current':'')."\" href=\"config.php? ".(isset($_REQUEST['type'])?"type={$_REQUEST['type']}&":"")."display=".$key."\">"._($value)."</a></li>\n";134 echo "<li><a id=\"".(($display==$key) ? 'current':'')."\" href=\"config.php?type=".$type."&display=".$key."\">"._($value)."</a></li>\n"; 143 135 } 144 136 } … … 158 150 // load the component from the loaded modules 159 151 if ( $display != '' && isset($configpageinits) && is_array($configpageinits) ) { 160 $currentcomponent = new component($display); 152 153 $currentcomponent = new component($display,$type); 161 154 162 155 // call every modules _configpageinit function which should just freepbx/trunk/amp_conf/htdocs/admin/functions.inc.php
r2392 r2617 324 324 325 325 // draw list for users and devices with paging 326 function drawListMenu($results, $skip, $ dispnum, $extdisplay, $description) {326 function drawListMenu($results, $skip, $type, $dispnum, $extdisplay, $description) { 327 327 $perpage=20; 328 328 … … 330 330 $index = 0; 331 331 if ($skip == "") $skip = 0; 332 echo "<li><a id=\"".($extdisplay=='' ? 'current':'')."\" href=\"config.php? display=".$dispnum."\">"._("Add")." ".$description."</a></li>";332 echo "<li><a id=\"".($extdisplay=='' ? 'current':'')."\" href=\"config.php?type=".$type."&display=".$dispnum."\">"._("Add")." ".$description."</a></li>"; 333 333 334 334 if (isset($results)) { … … 345 345 346 346 $index= $index + 1; 347 echo "<li><a id=\"".($extdisplay==$result[0] ? 'current':'')."\" href=\"config.php? display=".$dispnum."&extdisplay={$result[0]}&skip={$skip}\">{$result[1]} <{$result[0]}></a></li>";347 echo "<li><a id=\"".($extdisplay==$result[0] ? 'current':'')."\" href=\"config.php?type=".$type."&display=".$dispnum."&extdisplay={$result[0]}&skip={$skip}\">{$result[1]} <{$result[0]}></a></li>"; 348 348 } 349 349 } … … 356 356 $prevskip= $skip - $perpage; 357 357 if ($prevskip<0) $prevskip= 0; 358 $prevtag_pre= "<a href='? display=".$dispnum."&skip=$prevskip'>[PREVIOUS]</a>";358 $prevtag_pre= "<a href='?type=".$type."&display=".$dispnum."&skip=$prevskip'>[PREVIOUS]</a>"; 359 359 print "$prevtag_pre"; 360 360 } … … 363 363 $nextskip= $skip + $index; 364 364 if ($prevtag_pre) $prevtag .= " | "; 365 print "$prevtag <a href='? display=".$dispnum."&skip=$nextskip'>[NEXT]</a>";365 print "$prevtag <a href='?type=".$type."&display=".$dispnum."&skip=$nextskip'>[NEXT]</a>"; 366 366 } 367 367 elseif ($skip) { freepbx/trunk/amp_conf/htdocs/admin/header.php
r1874 r2617 86 86 <?php } ?> 87 87 88 <a id="<?php echo ($currentFile=='config.php' && $_REQUEST['type'] !='tool' ? 'current':'') ?>" href="config.php?type=setup">88 <a id="<?php echo ($currentFile=='config.php' && $_REQUEST['type']=='setup' ? 'current':'') ?>" href="config.php?type=setup"> 89 89 • 90 90 <li><?php echo _("Setup") ?></li> freepbx/trunk/amp_conf/htdocs/admin/modules/core/page.devices.php
r2399 r2617 16 16 <?php 17 17 $devices = core_devices_list(); 18 drawListMenu($devices, $ _REQUEST['skip'], $_REQUEST['display'], $_REQUEST['extdisplay'], _("Device"));18 drawListMenu($devices, $skip, $type, $display, $extdisplay, _("Device")); 19 19 ?> 20 20 </div> freepbx/trunk/amp_conf/htdocs/admin/modules/core/page.extensions.php
r2547 r2617 15 15 <div class="rnav"> 16 16 <?php 17 $skip = isset($_REQUEST['skip'])?$_REQUEST['skip']:null;18 $display = isset($_REQUEST['display'])?$_REQUEST['display']:null;19 $extdisplay = isset($_REQUEST['extdisplay'])?$_REQUEST['extdisplay']:null;20 17 $extens = core_users_list(); 21 22 drawListMenu($extens, $skip, $display, $extdisplay, _("Extension")); 18 drawListMenu($extens, $skip, $type, $display, $extdisplay, _("Extension")); 23 19 ?> 24 20 </div> freepbx/trunk/amp_conf/htdocs/admin/modules/core/page.users.php
r2392 r2617 19 19 20 20 $extens = core_users_list(); 21 drawListMenu($extens, $ _REQUEST['skip'], $_REQUEST['display'], $_REQUEST['extdisplay'], _("User"));21 drawListMenu($extens, $skip, $type, $display, $extdisplay, _("User")); 22 22 ?> 23 23 </div>
