Changeset 6561

Show
Ignore:
Timestamp:
09/04/08 13:22:50 (3 months ago)
Author:
mickecarlsson
Message:

Fixed 3153 and added Swedish translation

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • modules/branches/2.5/asteriskinfo/page.asteriskinfo.php

    r6557 r6561  
    1717$extdisplay = isset($_REQUEST['extdisplay'])?$_REQUEST['extdisplay']:'summary'; 
    1818 
     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 
    1942$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 
    3053); 
    3154$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", 
    4467); 
    4568$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", 
    4871); 
    4972$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", 
    5376); 
    5477$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", 
    5780); 
    5881$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", 
    6184); 
    6285$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", 
    6588); 
    6689$arr_conferences = array( 
    67         "Conference Info" => "meetme", 
     90        $conferenceinfo => "meetme", 
    6891); 
    6992$arr_subscriptions = array( 
    70         "Subscribe/Notify" => "show hints" 
     93        $subscribenotify => "show hints" 
    7194); 
    7295$arr_voicemail = array( 
    73         "Voicemail users" => "show voicemail users", 
     96        $voicemailusers => "show voicemail users", 
    7497); 
    7598 
     
    78101 
    79102if (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"; 
    87110} 
    88111 
     
    119142                                        <td align="left"> 
    120143                                                        <?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>")
    122145                                                        ?> 
    123146                                        </td> 
     
    273296        global $astman; 
    274297        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 
    275306         
    276307        $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",        
    284315        ); 
    285316         
    286317        if (version_compare($astver, '1.4', 'ge')) { 
    287                 $arr['Uptime'] = 'core show uptime'; 
     318                $arr[$uptime] = 'core show uptime'; 
    288319        } 
    289320         
     
    297328 
    298329                switch ($key) { 
    299                         case 'Uptime'
     330                        case $uptime
    300331                                $uptime = $astout; 
    301332                                $htmlOutput .= '<tr><td colspan="2">'.$uptime[1]."<br />".$uptime[2]."<br /></td>"; 
    302333                                $htmlOutput .= '</tr>'; 
    303334                        break; 
    304                         case 'Active SIP Channel(s)'
     335                        case $activesipchannels
    305336                                $activeSipChannel = $astout; 
    306337                                $activeSipChannel_count = getActiveChannel($activeSipChannel, $channelType = 'SIP'); 
    307338                                $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
    311342                                $activeIAX2Channel = $astout; 
    312343                                $activeIAX2Channel_count = getActiveChannel($activeIAX2Channel, $channelType = 'IAX2'); 
    313                                 $htmlOutput .= "<td>Active IAX2 Channels: ".$activeIAX2Channel_count."</td>"; 
     344                                $htmlOutput .= "<td>".$key.$activeIAX2Channel_count."</td>"; 
    314345                                $htmlOutput .= '</tr>'; 
    315346                        break; 
    316347                        break; 
    317                         case 'Sip Registry'
     348                        case $sipregistry
    318349                                $sipRegistration = $astout; 
    319350                                $sipRegistration_count = getRegistration($sipRegistration, $channelType = 'SIP'); 
    320351                                $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
    324355                                $iax2Registration = $astout; 
    325356                                $iax2Registration_count = getRegistration($iax2Registration, $channelType = 'IAX2'); 
    326                                 $htmlOutput .= "<td>IAX2 Registrations: ".$iax2Registration_count."</td>"; 
     357                                $htmlOutput .= "<td>".$key.$iax2Registration_count."</td>"; 
    327358                                $htmlOutput .= '</tr>'; 
    328359                        break; 
    329                         case 'Sip Peers'
     360                        case $sippeers
    330361                                $sipPeer = $astout; 
    331362                                $sipPeer_arr = getPeer($sipPeer, $channelType = 'SIP'); 
     
    336367                                } 
    337368                                $htmlOutput .= '<tr>'; 
    338                                 $htmlOutput .= "<td>SIP Peers<br />&nbsp;&nbsp;&nbsp;&nbsp;Online: ".$sipPeer_arr['online']."<br />&nbsp;&nbsp;&nbsp;&nbsp;Offline: <span style=\"color:".$sipPeerColor.";font-weight:bold;\">".$sipPeer_arr['offline']."</span></td>"; 
    339                         break; 
    340                         case 'IAX2 Peers'
     369                                $htmlOutput .= "<td>".$key."<br />&nbsp;&nbsp;&nbsp;&nbsp;"._("Online: ").$sipPeer_arr['online']."<br />&nbsp;&nbsp;&nbsp;&nbsp;"._("Offline: ")."<span style=\"color:".$sipPeerColor.";font-weight:bold;\">".$sipPeer_arr['offline']."</span></td>"; 
     370                        break; 
     371                        case $iax2peers
    341372                                $iax2Peer = $astout; 
    342373                                $iax2Peer_arr = getPeer($iax2Peer, $channelType = 'IAX2'); 
     
    346377                                        $iax2PeerColor = '#000000'; 
    347378                                } 
    348                                 $htmlOutput .= "<td>IAX2 Peers<br />&nbsp;&nbsp;&nbsp;&nbsp;Online: ".$iax2Peer_arr['online']."<br />&nbsp;&nbsp;&nbsp;&nbsp;Offline: <span style=\"color:".$iax2PeerColor.";font-weight:bold;\">".$iax2Peer_arr['offline']."</span><br />&nbsp;&nbsp;&nbsp;&nbsp;Unmonitored: ".$iax2Peer_arr['unmonitored']."</td>"; 
     379                                $htmlOutput .= "<td>".$key."<br />&nbsp;&nbsp;&nbsp;&nbsp;"._("Online: ").$iax2Peer_arr['online']."<br />&nbsp;&nbsp;&nbsp;&nbsp;"._("Offline: ")."<span style=\"color:".$iax2PeerColor.";font-weight:bold;\">".$iax2Peer_arr['offline']."</span><br />&nbsp;&nbsp;&nbsp;&nbsp;"._("Unmonitored: ").$iax2Peer_arr['unmonitored']."</td>"; 
    349380                                $htmlOutput .= '</tr>'; 
    350381                        break; 
Donate



Support
Download
Develop
Forums
News
Documentation
Paid Support
About

Paid Ads