Changeset 2842
- Timestamp:
- 10/26/06 11:03:30 (6 years ago)
- Files:
-
- freepbx/trunk/amp_conf/htdocs/admin/common/mainstyle.css (modified) (2 diffs)
- freepbx/trunk/amp_conf/htdocs/admin/config.php (modified) (7 diffs)
- freepbx/trunk/amp_conf/htdocs/admin/functions.inc.php (modified) (4 diffs)
- freepbx/trunk/amp_conf/htdocs/admin/header.php (modified) (1 diff)
- freepbx/trunk/amp_conf/htdocs/admin/modules/core/page.ampusers.php (modified) (3 diffs)
- freepbx/trunk/amp_conf/htdocs/admin/modules/core/page.did.php (modified) (2 diffs)
- freepbx/trunk/amp_conf/htdocs/admin/modules/core/page.extensions.php (modified) (1 diff)
- freepbx/trunk/amp_conf/htdocs/admin/modules/core/page.routing.php (modified) (2 diffs)
- freepbx/trunk/amp_conf/htdocs/admin/modules/core/page.trunks.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
freepbx/trunk/amp_conf/htdocs/admin/common/mainstyle.css
r2840 r2842 63 63 color: #ee9a47; 64 64 } 65 #header a.current { 66 color: #E87B41; 67 font-weight:bold; 68 } 69 65 70 a.current { 66 71 color: #E87B41; 67 72 font-weight:bold; 68 73 } 74 75 ul.current { 76 color: #E87B41; 77 font-weight:bold; 78 } 79 69 80 #header img { 70 81 margin-top:10px; … … 148 159 border:1px solid #F2AF1D; 149 160 } 161 162 div.rnav ul { 163 display: block; 164 list-style: none; 165 margin: 0; 166 padding: 0; 167 } 168 150 169 div.rnav li{ 151 170 list-style-type: none; freepbx/trunk/amp_conf/htdocs/admin/config.php
r2829 r2842 23 23 // determine module type to show, default to 'setup' 24 24 if($type == "tool") { 25 $message ="Tools";25 $message = "Tools"; 26 26 $amp_sections = array( 27 27 'modules'=>_("Module Admin") 28 28 ); 29 29 } elseif($type == "cdrcost") { 30 $message ="Call Cost";30 $message = "Call Cost"; 31 31 } else { 32 $message ="Setup";32 $message = "Setup"; 33 33 } 34 34 … … 45 45 46 46 include 'header_auth.php'; 47 48 /*49 // only show AMP Users if they have authtype set approiately50 if (isset($amp_conf["AUTHTYPE"]) && ($amp_conf["AUTHTYPE"] != "none")) {51 $amp_sections[10] = _("AMP Users");52 }*/53 47 54 48 // get all enabled modules … … 109 103 unset($amp_sections["users"]); 110 104 } 111 112 105 113 106 // add the APPLY Changes bar as a section, so it shows in the Administrators module … … 136 129 } 137 130 138 // TODO why do we need the <div class='clear'> here ...?139 // echo "\t\t\n";140 // echo "\t\t<div class='clear'></div>\n";141 142 131 if (!$quietmode) { 143 echo " \t<div id=\"nav\"><ul>\n";132 echo "<div id=\"nav\"><ul>\n"; 144 133 ksort($amp_menu); 145 134 foreach ($amp_menu as $category => $items) { … … 148 137 foreach ($items as $key=>$value) { 149 138 if (preg_match("/^(<a.+>)(.+)(<\/a>)/",$value,$matches)) { 150 echo "\t \t<li>".$matches[1]._($matches[2]).$matches[3]."</li>\n";139 echo "\t<li>".$matches[1]._($matches[2]).$matches[3]."</li>\n"; 151 140 } else { 152 echo "\t \t<li><a" .141 echo "\t<li><a" . 153 142 (($display==$key) ? ' class="current"':'') . 154 143 " href=\"config.php?type=".$type."&display=".$key."\">"._($value)."</a></li>\n"; … … 156 145 } 157 146 } 158 echo " \t</ul></div>\n\n";147 echo "</ul></div>\n\n"; 159 148 echo "<div id=\"wrapper\"><div class=\"content\">\n"; 160 149 } … … 250 239 break; 251 240 case '': 252 /* $astman = new AGI_AsteriskManager();253 if ($res = $astman->connect("127.0.0.1", $amp_conf["AMPMGRUSER"] , $amp_conf["AMPMGRPASS"])) {254 $astman->disconnect();*/255 241 if ($astman) { 256 242 printf( "<h2>%s</h2>", dgettext("welcome page", "Welcome to freePBX.") ); freepbx/trunk/amp_conf/htdocs/admin/functions.inc.php
r2815 r2842 346 346 $index = 0; 347 347 if ($skip == "") $skip = 0; 348 echo "<li><a id=\"".($extdisplay=='' ? 'current':'')."\" href=\"config.php?type=".$type."&display=".$dispnum."\">"._("Add")." ".$description."</a></li>"; 348 echo "<ul>\n"; 349 echo "\t<li><a ".($extdisplay=='' ? 'class="current"':'')." href=\"config.php?type=".$type."&display=".$dispnum."\">"._("Add")." ".$description."</a></li>\n"; 349 350 350 351 if (isset($results)) { … … 360 361 } 361 362 362 $index= $index + 1; 363 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>"; 364 } 365 } 366 367 if ($index >= $perpage) { 368 print "<li><center>"; 363 $index= $index + 1; 364 echo "\t<li><a".($extdisplay==$result[0] ? ' class="current"':''). " href=\"config.php?type=".$type."&display=".$dispnum."&extdisplay={$result[0]}&skip={$skip}\">{$result[1]} <{$result[0]}></a></li>\n"; 365 } 369 366 } 370 367 … … 372 369 $prevskip= $skip - $perpage; 373 370 if ($prevskip<0) $prevskip= 0; 374 $prevtag_pre= "<a href='?type=".$type."&display=".$dispnum."&skip=$prevskip'>[PREVIOUS]</a>"; 371 $prevtag_pre= "<a href='?type=".$type."&display=".$dispnum."&skip=$prevskip'>" . 372 _("[PREVIOUS]") ."</a>"; 373 print "\t<li><center>"; 375 374 print "$prevtag_pre"; 375 print "</center></li>\n"; 376 376 } 377 377 … … 379 379 $nextskip= $skip + $index; 380 380 if ($prevtag_pre) $prevtag .= " | "; 381 print "$prevtag <a href='?type=".$type."&display=".$dispnum."&skip=$nextskip'>[NEXT]</a>"; 382 } 383 elseif ($skip) { 384 print "$prevtag"; 385 } 386 387 print "</center></li>"; 381 print "\t<li><center>"; 382 print "$prevtag <a href='?type=".$type."&display=".$dispnum."&skip=$nextskip'>" . 383 _("[NEXT]") . "</a>"; 384 print "</center></li>\n"; 385 } 386 echo "</ul>\n"; 388 387 } 389 388 freepbx/trunk/amp_conf/htdocs/admin/header.php
r2822 r2842 27 27 28 28 if ($is_current) 29 $html .= " id=\"current\" ";29 $html .= "class=\"current\" "; 30 30 31 31 $html .= "href=\"$href\"> $name</a></span>"; freepbx/trunk/amp_conf/htdocs/admin/modules/core/page.ampusers.php
r2748 r2842 91 91 92 92 <div class="rnav"> 93 <li><a id="<?php echo ($userdisplay=='' ? 'current':'') ?>" href="config.php?display=<?php echo urlencode($display)?>"><?php echo _("Add User")?></a></li>94 93 <ul> 94 <li><a <?php echo ($userdisplay=='' ? 'class="current"':'') ?> href="config.php?display=<?php echo urlencode($display)?>"><?php echo _("Add User")?></a></li> 95 95 <?php 96 96 //get existing trunk info … … 98 98 99 99 foreach ($tresults as $tresult) { 100 echo " <li><a id=\"".($userdisplay==$tresult[0] ? 'current':'')."\" href=\"config.php?display=".urlencode($display)."&userdisplay=".urlencode($tresult[0])."\">".$tresult[0]."</a></li>";101 } 102 103 ?>100 echo "\t<li><a ".($userdisplay==$tresult[0] ? 'class="current"':'')." href=\"config.php?display=".urlencode($display)."&userdisplay=".urlencode($tresult[0])."\">".$tresult[0]."</a></li>\n"; 101 } 102 ?> 103 </ul> 104 104 </div> 105 105 … … 121 121 122 122 ?> 123 <p><a href="config.php?display=<?php echo urlencode($display) ?>& userdisplay=<?php echo urlencode($userdisplay) ?>&action=delampuser"><?php echo _("Delete User")?> <?php echo $userdisplay; ?></a></p>123 <p><a href="config.php?display=<?php echo urlencode($display) ?>&userdisplay=<?php echo urlencode($userdisplay) ?>&action=delampuser"><?php echo _("Delete User")?> <?php echo $userdisplay; ?></a></p> 124 124 <?php 125 125 freepbx/trunk/amp_conf/htdocs/admin/modules/core/page.did.php
r2544 r2842 45 45 46 46 <div class="rnav"> 47 <li><a id="<?php echo ($extdisplay=='' ? 'current':'') ?>" href="config.php?display=<?php echo urlencode($dispnum)?>"><?php echo _("Add Incoming Route")?></a></li> 47 <ul> 48 <li><a <?php echo ($extdisplay=='' ? 'class="current"':'') ?> href="config.php?display=<?php echo urlencode($dispnum)?>"><?php echo _("Add Incoming Route")?></a></li> 48 49 <?php 49 50 //get unique incoming routes … … 55 56 $zapchan = ( strlen($inroute['channel'])? "Zaptel Channel {$inroute['channel']}" : "" ); 56 57 if ($zapchan != "") 57 echo " <li><a id=\"".($extdisplay==$inroute['extension']."/".$inroute['cidnum']."/".$inroute['channel'] ? 'current':'nul')."\" href=\"config.php?display=".urlencode($dispnum)."&extdisplay=".urlencode($inroute['extension'])."/".urlencode($inroute['cidnum'])."/".urlencode($inroute['channel'])."\">{$zapchan} </a></li>";58 echo "\t<li><a ".($extdisplay==$inroute['extension']."/".$inroute['cidnum']."/".$inroute['channel'] ? 'class="current"':'')." href=\"config.php?display=".urlencode($dispnum)."&extdisplay=".urlencode($inroute['extension'])."/".urlencode($inroute['cidnum'])."/".urlencode($inroute['channel'])."\">{$zapchan} </a></li>\n"; 58 59 else 59 echo " <li><a id=\"".($extdisplay==$inroute['extension']."/".$inroute['cidnum']."/".$inroute['channel'] ? 'current':'nul')."\" href=\"config.php?display=".urlencode($dispnum)."&extdisplay=".urlencode($inroute['extension'])."/".urlencode($inroute['cidnum'])."/".urlencode($inroute['channel'])."\">{$displaydid} / {$displaycid} {$zapchan} </a></li>";60 echo "\t<li><a ".($extdisplay==$inroute['extension']."/".$inroute['cidnum']."/".$inroute['channel'] ? 'class="current"':'')." href=\"config.php?display=".urlencode($dispnum)."&extdisplay=".urlencode($inroute['extension'])."/".urlencode($inroute['cidnum'])."/".urlencode($inroute['channel'])."\">{$displaydid} / {$displaycid} {$zapchan} </a></li>\n"; 60 61 } 61 62 } 62 63 ?> 64 </ul> 63 65 </div> 64 66 freepbx/trunk/amp_conf/htdocs/admin/modules/core/page.extensions.php
r2617 r2842 18 18 drawListMenu($extens, $skip, $type, $display, $extdisplay, _("Extension")); 19 19 ?> 20 <br /> 20 21 </div> freepbx/trunk/amp_conf/htdocs/admin/modules/core/page.routing.php
r2252 r2842 198 198 199 199 <div class="rnav"> 200 <li><a id="<?php echo ($extdisplay=='' ? 'current':'') ?>" href="config.php?display=<?php echo urlencode($display)?>"><?php echo _("Add Route")?></a></li> 200 <ul> 201 <li><a <?php echo ($extdisplay=='' ? 'class="current"':'') ?> href="config.php?display=<?php echo urlencode($display)?>"><?php echo _("Add Route")?></a></li> 201 202 <?php 202 203 $reporoutedirection = isset($_REQUEST['reporoutedirection'])?$_REQUEST['reporoutedirection']:''; … … 206 207 $positions=count($routepriority); 207 208 foreach ($routepriority as $tresult) { 208 $key++; 209 ?> 210 <?php // move up 211 echo "<li><a id=\"".($extdisplay==$tresult[0] ? 'current':'')."\" href=\"config.php?display=".urlencode($display)."&extdisplay=".urlencode($tresult[0])."\">$key ". substr($tresult[0],4)."</a>"; 212 if ($key > 0) {?> 213 <img src="images/scrollup.gif" onclick="repositionRoute('<?php echo $key ?>','up')" alt="<?php echo _("Move Up")?>" style="float:none; margin-left:0px; margin-bottom:0px;" width="9" height="11"> 214 <?php } else { ?> 215 <img src="images/blank.gif" style="float:none; margin-left:0px; margin-bottom:0px;" width="9" height="11"> 216 <?php } 217 218 // move down 219 220 if ($key < ($positions-1)) {?> 221 <img src="images/scrolldown.gif" onclick="repositionRoute('<?php echo $key ?>','down')" alt="<?php echo _("Move Down")?>" style="float:none; margin-left:0px; margin-bottom:0px;" width="9" height="11"> 222 <?php } else { ?> 223 <img src="images/blank.gif" style="float:none; margin-left:0px; margin-bottom:0px;" width="9" height="11"> 224 <?php } 225 echo "</li>";?> 226 227 <?php 209 $key++; 210 echo "\t<li>\n\t\t<a " . ($extdisplay==$tresult[0] ? 'class="current"':'') . 211 " href=\"config.php?display=" . 212 urlencode($display)."&extdisplay=" . 213 urlencode($tresult[0]) . "\">$key " . substr($tresult[0],4)."</a>\n"; 214 215 if ($key > 0) 216 echo "\t\t<img src=\"images/scrollup.gif\" onclick=\"repositionRoute('$key','up')\" alt='" . _("Move Up") . 217 "' style='float:none; margin-left:0px; margin-bottom:0px;' width='9' height='11'>\n"; 218 else 219 echo "\t\t<img src='images/blank.gif' style='float:none; margin-left:0px; margin-bottom:0px;' width='9' height='11'>\n"; 220 221 // move down 222 if ($key < ($positions-1)) 223 echo "\t\t<img src='images/scrolldown.gif' onclick=\"repositionRoute('$key>','down')\" alt='" . _("Move Down") . 224 "' style='float:none; margin-left:0px; margin-bottom:0px;' width='9' height='11'>\n"; 225 else 226 echo "\t\t<img src='images/blank.gif' style='loat:none; margin-left:0px; margin-bottom:0px;' width='9' height='11'>\n"; 227 echo "\t</li>\n"; 228 228 } // foreach 229 229 ?> 230 </ul> 230 231 </div> 231 232 freepbx/trunk/amp_conf/htdocs/admin/modules/core/page.trunks.php
r2754 r2842 169 169 170 170 <div class="rnav"> 171 <li><a id="<?php echo ($extdisplay=='' ? 'current':'') ?>" href="config.php?display=<?php echo urlencode($display)?>"><?php echo _("Add Trunk")?></a></li>172 171 <ul> 172 <li><a <?php echo ($extdisplay=='' ? 'class="current"':'') ?> href="config.php?display=<?php echo urlencode($display)?>"><?php echo _("Add Trunk")?></a></li> 173 173 <?php 174 174 //get existing trunk info … … 176 176 177 177 foreach ($tresults as $tresult) { 178 echo "<li><a id=\"".($extdisplay==$tresult[0] ? 'current':'')."\" href=\"config.php?display=".urlencode($display)."&extdisplay=".urlencode($tresult[0])."\" title=\"".urlencode($tresult[1])."\">"._("Trunk")." ".substr(ltrim($tresult[1],"AMP:"),0,15)."</a></li>"; 179 } 180 181 ?> 178 echo "\t<li><a ".($extdisplay==$tresult[0] ? 'class="current"':'')." href=\"config.php?display=".urlencode($display)."&extdisplay=".urlencode($tresult[0])."\" title=\"".urlencode($tresult[1])."\">"._("Trunk")." ".substr(ltrim($tresult[1],"AMP:"),0,15)."</a></li>\n"; 179 } 180 181 ?> 182 </ul> 182 183 </div> 183 184 … … 189 190 ?> 190 191 <h2><?php echo _("Add a Trunk")?></h2> 191 <a href="<?php echo $_SERVER['PHP_SELF'].'?display='.urlencode($display); ?>& tech=ZAP"><?php echo _("Add ZAP Trunk")?></a><br><br>192 <a href="<?php echo $_SERVER['PHP_SELF'].'?display='.urlencode($display); ?>& tech=IAX2"><?php echo _("Add IAX2 Trunk")?></a><br><br>193 <a href="<?php echo $_SERVER['PHP_SELF'].'?display='.urlencode($display); ?>& tech=SIP"><?php echo _("Add SIP Trunk")?></a><br><br>194 <a href="<?php echo $_SERVER['PHP_SELF'].'?display='.urlencode($display); ?>& tech=ENUM"><?php echo _("Add ENUM Trunk")?></a><br><br>195 <a href="<?php echo $_SERVER['PHP_SELF'].'?display='.urlencode($display); ?>& tech=CUSTOM"><?php echo _("Add Custom Trunk")?></a><br><br>192 <a href="<?php echo $_SERVER['PHP_SELF'].'?display='.urlencode($display); ?>&tech=ZAP"><?php echo _("Add ZAP Trunk")?></a><br><br> 193 <a href="<?php echo $_SERVER['PHP_SELF'].'?display='.urlencode($display); ?>&tech=IAX2"><?php echo _("Add IAX2 Trunk")?></a><br><br> 194 <a href="<?php echo $_SERVER['PHP_SELF'].'?display='.urlencode($display); ?>&tech=SIP"><?php echo _("Add SIP Trunk")?></a><br><br> 195 <a href="<?php echo $_SERVER['PHP_SELF'].'?display='.urlencode($display); ?>&tech=ENUM"><?php echo _("Add ENUM Trunk")?></a><br><br> 196 <a href="<?php echo $_SERVER['PHP_SELF'].'?display='.urlencode($display); ?>&tech=CUSTOM"><?php echo _("Add Custom Trunk")?></a><br><br> 196 197 <?php 197 198 } else { … … 254 255 echo "<h2>".sprintf(_("Edit %s Trunk"),strtoupper($tech))."</h2>"; 255 256 ?> 256 <p><a title="<?php echo $channelid ?>" href="config.php?display=<?php echo urlencode($display) ?>& extdisplay=<?php echo urlencode($extdisplay) ?>&action=deltrunk"><?php echo _("Delete Trunk")?> <?php echo substr($channelid,0,20); ?></a></p>257 <p><a title="<?php echo $channelid ?>" href="config.php?display=<?php echo urlencode($display) ?>&extdisplay=<?php echo urlencode($extdisplay) ?>&action=deltrunk"><?php echo _("Delete Trunk")?> <?php echo substr($channelid,0,20); ?></a></p> 257 258 <?php 258 259
