Changeset 6561
- Timestamp:
- 09/04/08 13:22:50 (3 months ago)
- Files:
-
- modules/branches/2.5/asteriskinfo/i18n (added)
- modules/branches/2.5/asteriskinfo/i18n/sv_SE (added)
- modules/branches/2.5/asteriskinfo/i18n/sv_SE/LC_MESSAGES (added)
- modules/branches/2.5/asteriskinfo/i18n/sv_SE/LC_MESSAGES/asteriskinfo.mo (added)
- modules/branches/2.5/asteriskinfo/i18n/sv_SE/LC_MESSAGES/asteriskinfo.po (added)
- modules/branches/2.5/asteriskinfo/page.asteriskinfo.php (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
modules/branches/2.5/asteriskinfo/page.asteriskinfo.php
r6557 r6561 17 17 $extdisplay = isset($_REQUEST['extdisplay'])?$_REQUEST['extdisplay']:'summary'; 18 18 19 $modesummary = _("Summary"); 20 $moderegistries = _("Registries"); 21 $modechannels = _("Channels"); 22 $modepeers = _("Peers"); 23 $modesip = _("Sip Info"); 24 $modeiax = _("IAX Info"); 25 $modeconferences = _("Conferences"); 26 $modesubscriptions = _("Subscriptions"); 27 $modeall = _("Full Report"); 28 29 $uptime = _("Uptime"); 30 $activechannels = _("Active Channel(s)"); 31 $sipchannels = _("Sip Channel(s)"); 32 $iax2channels = _("IAX2 Channel(s)"); 33 $iax2peers = _("IAX2 Peers"); 34 $sipregistry = _("Sip Registry"); 35 $sippeers = _("Sip Peers"); 36 $iax2registry = _("IAX2 Registry"); 37 $subscribenotify = _("Subscribe/Notify"); 38 $zapteldriverinfo = _("Zaptel driver info"); 39 $conferenceinfo = _("Conference Info"); 40 $voicemailusers = _("Voicemail Users"); 41 19 42 $modes = array( 20 "summary" => "Summary",21 "registries" => "Registries",22 "channels" => "Channels",23 "peers" => "Peers",24 "sip" => "Sip Info",25 "iax" => "IAX Info",26 "conferences" => "Conferences",27 "subscriptions" => "Subscriptions",28 "voicemail" => "Voicemail Users",29 "all" => "Full Report"43 "summary" => $modesummary, 44 "registries" => $moderegistries, 45 "channels" => $modechannels, 46 "peers" => $modepeers, 47 "sip" => $modesip, 48 "iax" => $modeiax, 49 "conferences" => $modeconferences, 50 "subscriptions" => $modesubscriptions, 51 "voicemail" => $voicemailusers, 52 "all" => $modeall 30 53 ); 31 54 $arr_all = array( 32 "Uptime"=> "show uptime",33 "Active Channel(s)"=> "show channels",34 "Sip Channel(s)"=> "sip show channels",35 "IAX2 Channel(s)"=> "iax2 show channels",36 "Sip Registry"=> "sip show registry",37 "Sip Peers"=> "sip show peers",38 "IAX2 Registry"=> "iax2 show registry",39 "IAX2 Peers"=> "iax2 show peers",40 "Subscribe/Notify"=> "show hints",41 "Zaptel driver info"=> "zap show channels",42 "Conference Info"=> "meetme",43 "Voicemail users"=> "show voicemail users",55 $uptime => "show uptime", 56 $activechannels => "show channels", 57 $sipchannels => "sip show channels", 58 $iax2channels => "iax2 show channels", 59 $sipregistry => "sip show registry", 60 $sippeers => "sip show peers", 61 $iax2registry => "iax2 show registry", 62 $iax2peers => "iax2 show peers", 63 $subscribenotify => "show hints", 64 $zapteldriverinfo => "zap show channels", 65 $conferenceinfo => "meetme", 66 $voicemailusers => "show voicemail users", 44 67 ); 45 68 $arr_registries = array( 46 "Sip Registry"=> "sip show registry",47 "IAX2 Registry"=> "iax2 show registry",69 $sipregistry => "sip show registry", 70 $iax2registry => "iax2 show registry", 48 71 ); 49 72 $arr_channels = array( 50 "Active Channel(s)"=> "show channels",51 "Sip Channel(s)"=> "sip show channels",52 "IAX2 Channel(s)"=> "iax2 show channels",73 $activechannels => "show channels", 74 $sipchannels => "sip show channels", 75 $iax2channels => "iax2 show channels", 53 76 ); 54 77 $arr_peers = array( 55 "Sip Peers"=> "sip show peers",56 "IAX2 Peers"=> "iax2 show peers",78 $sippeers => "sip show peers", 79 $iax2peers => "iax2 show peers", 57 80 ); 58 81 $arr_sip = array( 59 "Sip Registry"=> "sip show registry",60 "Sip Peers"=> "sip show peers",82 $sipregistry => "sip show registry", 83 $sippeers => "sip show peers", 61 84 ); 62 85 $arr_iax = array( 63 "IAX2 Registry"=> "iax2 show registry",64 "IAX2 Peers"=> "iax2 show peers",86 $iax2registry => "iax2 show registry", 87 $iax2peers => "iax2 show peers", 65 88 ); 66 89 $arr_conferences = array( 67 "Conference Info"=> "meetme",90 $conferenceinfo => "meetme", 68 91 ); 69 92 $arr_subscriptions = array( 70 "Subscribe/Notify"=> "show hints"93 $subscribenotify => "show hints" 71 94 ); 72 95 $arr_voicemail = array( 73 "Voicemail users"=> "show voicemail users",96 $voicemailusers => "show voicemail users", 74 97 ); 75 98 … … 78 101 79 102 if (version_compare($astver, '1.4', 'ge')) { 80 $arr_all[ "Uptime"]="core show uptime";81 $arr_all[ "Active Channel(s)"]="core show channels";82 $arr_all[ "Subscribe/Notify"]="core show hints";83 $arr_all[ "Voicemail users"]="voicemail show users";84 $arr_channels[ "Active Channel(s)"]="core show channels";85 $arr_subscriptions[ "Subscribe/Notify"]="core show hints";86 $arr_voicemail[ "Voicemail users"]="voicemail show users";103 $arr_all[$uptime]="core show uptime"; 104 $arr_all[$activechannels]="core show channels"; 105 $arr_all[$subscribenotify]="core show hints"; 106 $arr_all[$voicemailusers]="voicemail show users"; 107 $arr_channels[$activechannels]="core show channels"; 108 $arr_subscriptions[$subscribenotify]="core show hints"; 109 $arr_voicemail[$voicemailusers]="voicemail show users"; 87 110 } 88 111 … … 119 142 <td align="left"> 120 143 <?php 121 echo "<br> The module was unable to connect to the asterisk manager.<br>Make sure Asterisk is running and your manager.conf settings are proper.<br><br>";144 echo "<br>"._("The module was unable to connect to the Asterisk manager.<br>Make sure Asterisk is running and your manager.conf settings are proper.<br><br>"); 122 145 ?> 123 146 </td> … … 273 296 global $astman; 274 297 global $astver; 298 $uptime = _("Uptime: "); 299 $activesipchannels = _("Active SIP Channel(s): "); 300 $activeiax2channels = _("Active IAX2 Channel(s): "); 301 $sipregistry = _("Sip Registry: "); 302 $iax2registry = _("IAX2 Registry: "); 303 $sippeers = _("Sip Peers: "); 304 $iax2peers = _("IAX2 Peers: "); 305 275 306 276 307 $arr = array( 277 "Uptime"=> "show uptime",278 "Active SIP Channel(s)"=> "sip show channels",279 "Active IAX2 Channel(s)"=> "iax2 show channels",280 "Sip Registry"=> "sip show registry",281 "IAX2 Registry"=> "iax2 show registry",282 "Sip Peers" => "sip show peers",283 "IAX2 Peers" => "iax2 show peers",308 $uptime => "show uptime", 309 $activesipchannels => "sip show channels", 310 $activeiax2channels => "iax2 show channels", 311 $sipregistry => "sip show registry", 312 $iax2registry => "iax2 show registry", 313 $sippeers => "sip show peers", 314 $iax2peers => "iax2 show peers", 284 315 ); 285 316 286 317 if (version_compare($astver, '1.4', 'ge')) { 287 $arr[ 'Uptime'] = 'core show uptime';318 $arr[$uptime] = 'core show uptime'; 288 319 } 289 320 … … 297 328 298 329 switch ($key) { 299 case 'Uptime':330 case $uptime: 300 331 $uptime = $astout; 301 332 $htmlOutput .= '<tr><td colspan="2">'.$uptime[1]."<br />".$uptime[2]."<br /></td>"; 302 333 $htmlOutput .= '</tr>'; 303 334 break; 304 case 'Active SIP Channel(s)':335 case $activesipchannels: 305 336 $activeSipChannel = $astout; 306 337 $activeSipChannel_count = getActiveChannel($activeSipChannel, $channelType = 'SIP'); 307 338 $htmlOutput .= '<tr>'; 308 $htmlOutput .= "<td> Active Sip Channels: ".$activeSipChannel_count."</td>";309 break; 310 case 'Active IAX2 Channel(s)':339 $htmlOutput .= "<td>".$key.$activeSipChannel_count."</td>"; 340 break; 341 case $activeiax2channels: 311 342 $activeIAX2Channel = $astout; 312 343 $activeIAX2Channel_count = getActiveChannel($activeIAX2Channel, $channelType = 'IAX2'); 313 $htmlOutput .= "<td> Active IAX2 Channels: ".$activeIAX2Channel_count."</td>";344 $htmlOutput .= "<td>".$key.$activeIAX2Channel_count."</td>"; 314 345 $htmlOutput .= '</tr>'; 315 346 break; 316 347 break; 317 case 'Sip Registry':348 case $sipregistry: 318 349 $sipRegistration = $astout; 319 350 $sipRegistration_count = getRegistration($sipRegistration, $channelType = 'SIP'); 320 351 $htmlOutput .= '<tr>'; 321 $htmlOutput .= "<td> SIP Registrations: ".$sipRegistration_count."</td>";322 break; 323 case 'IAX2 Registry':352 $htmlOutput .= "<td>".$key.$sipRegistration_count."</td>"; 353 break; 354 case $iax2registry: 324 355 $iax2Registration = $astout; 325 356 $iax2Registration_count = getRegistration($iax2Registration, $channelType = 'IAX2'); 326 $htmlOutput .= "<td> IAX2 Registrations: ".$iax2Registration_count."</td>";357 $htmlOutput .= "<td>".$key.$iax2Registration_count."</td>"; 327 358 $htmlOutput .= '</tr>'; 328 359 break; 329 case 'Sip Peers':360 case $sippeers: 330 361 $sipPeer = $astout; 331 362 $sipPeer_arr = getPeer($sipPeer, $channelType = 'SIP'); … … 336 367 } 337 368 $htmlOutput .= '<tr>'; 338 $htmlOutput .= "<td> SIP Peers<br /> Online: ".$sipPeer_arr['online']."<br /> Offline:<span style=\"color:".$sipPeerColor.";font-weight:bold;\">".$sipPeer_arr['offline']."</span></td>";339 break; 340 case 'IAX2 Peers':369 $htmlOutput .= "<td>".$key."<br /> "._("Online: ").$sipPeer_arr['online']."<br /> "._("Offline: ")."<span style=\"color:".$sipPeerColor.";font-weight:bold;\">".$sipPeer_arr['offline']."</span></td>"; 370 break; 371 case $iax2peers: 341 372 $iax2Peer = $astout; 342 373 $iax2Peer_arr = getPeer($iax2Peer, $channelType = 'IAX2'); … … 346 377 $iax2PeerColor = '#000000'; 347 378 } 348 $htmlOutput .= "<td> IAX2 Peers<br /> Online: ".$iax2Peer_arr['online']."<br /> Offline: <span style=\"color:".$iax2PeerColor.";font-weight:bold;\">".$iax2Peer_arr['offline']."</span><br /> Unmonitored: ".$iax2Peer_arr['unmonitored']."</td>";379 $htmlOutput .= "<td>".$key."<br /> "._("Online: ").$iax2Peer_arr['online']."<br /> "._("Offline: ")."<span style=\"color:".$iax2PeerColor.";font-weight:bold;\">".$iax2Peer_arr['offline']."</span><br /> "._("Unmonitored: ").$iax2Peer_arr['unmonitored']."</td>"; 349 380 $htmlOutput .= '</tr>'; 350 381 break;
