Changeset 2779

Show
Ignore:
Timestamp:
03/10/10 19:37:12 (2 years ago)
Author:
areski
Message:

agent : new info CallerID, SpeedDial?, SIP/IAX Config, DID Info

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/agent/Public/A2B_card_info.php

    r2703 r2779  
    420420</table> 
    421421<br/> 
     422<table width="95%"> 
     423        <tr> 
     424 
     425                <td valign="top" width="50%" > 
     426        <?php 
     427        $callerid_table = new Table('cc_callerid','*'); 
     428        $callerid_clause = "id_cc_card  = ".$id; 
     429        $callerid_result = $callerid_table -> Get_list($DBHandle, $callerid_clause, 0); 
     430        $callerid = $callerid_result[0]; 
     431        if(sizeof($callerid_result)>0 && $callerid_result[0]!=null) { 
     432        ?> 
     433                        <table width="100%" class="editform_table1"> 
     434                           <tr> 
     435                                        <th colspan="2" background="../Public/templates/default/images/background_cells.gif"> 
     436                                                <?php echo gettext("CALLER-ID LIST ") ?> 
     437                                        </th> 
     438                           </tr> 
     439               <tr class="form_head"> 
     440                <td class="tableBody"  width="15%" align="center" style="padding: 2px;"> 
     441                 <?php echo gettext("CID"); ?> 
     442                </td> 
     443                <td class="tableBody"  width="20%" align="center" style="padding: 2px;"> 
     444                <?php echo gettext("ACTIVATED"); ?> 
     445                </td> 
     446              </tr> 
     447           <?php 
     448            $i=0; 
     449            foreach ($callerid_result as $callerid) { 
     450                if($i%2==0) $bg="#fcfbfb"; 
     451                else  $bg="#f2f2ee"; 
     452           ?> 
     453                        <tr bgcolor="<?php echo $bg; ?>"  > 
     454                                <td class="tableBodyRight"  background="../Public/templates/default/images/background_cells.gif" width="70%" align="center"> 
     455                                  <?php echo $callerid['cid']; ?> 
     456                                </td> 
     457 
     458                                <td class="tableBodyRight"  background="../Public/templates/default/images/background_cells.gif" width="70%" align="center"> 
     459                                  <?php echo ($callerid['activated']=="t"?"Active":"Inactive"); ?> 
     460                                </td> 
     461                        </tr> 
     462                <?php 
     463                $i++; 
     464                } 
     465                ?> 
     466 
     467                </table> 
     468        <? 
     469          } 
     470        ?> 
     471                </td> 
     472 
     473                <td valign="top" width="50%" > 
     474        <?php 
     475        $speeddial_table = new Table('cc_speeddial','*'); 
     476        $speeddial_clause = "id_cc_card  = ".$id; 
     477        $speeddial_result = $speeddial_table -> Get_list($DBHandle, $speeddial_clause, 0); 
     478        $speeddial = $speeddial_result[0]; 
     479        if(sizeof($speeddial_result)>0 && $speeddial_result[0]!=null) { 
     480        ?> 
     481                        <table width="100%" class="editform_table1"> 
     482                           <tr> 
     483                                        <th colspan="3" background="../Public/templates/default/images/background_cells.gif"> 
     484                                                <?php echo gettext("SPEED-DIAL LIST ") ?> 
     485                                        </th> 
     486                           </tr> 
     487               <tr class="form_head"> 
     488                    <td class="tableBody"  width="15%" align="center" style="padding: 2px;"> 
     489                     <?php echo gettext("PHONE"); ?> 
     490                    </td> 
     491                    <td class="tableBody"  width="20%" align="center" style="padding: 2px;"> 
     492                    <?php echo gettext("NAME"); ?> 
     493                    </td> 
     494                    <td class="tableBody"  width="15%" align="center" style="padding: 2px;"> 
     495                    <?php echo gettext("SPEEDDIAL"); ?> 
     496                    </td> 
     497                </tr> 
     498               <?php 
     499                $i=0; 
     500                foreach ($speeddial_result as $speeddial) { 
     501                    if($i%2==0) $bg="#fcfbfb"; 
     502                    else  $bg="#f2f2ee"; 
     503               ?> 
     504                    <tr bgcolor="<?php echo $bg; ?>"  > 
     505                        <td class="tableBodyRight"  background="../Public/templates/default/images/background_cells.gif" width="70%" align="center"> 
     506                          <?php echo $speeddial['phone']; ?> 
     507                        </td> 
     508 
     509                        <td class="tableBodyRight"  background="../Public/templates/default/images/background_cells.gif" width="70%" align="center"> 
     510                          <?php echo $speeddial['name']; ?> 
     511                        </td> 
     512 
     513                        <td class="tableBodyRight"  background="../Public/templates/default/images/background_cells.gif" width="70%"  align="center"> 
     514                          <?php echo $speeddial['speeddial']; ?> 
     515                        </td> 
     516                    </tr> 
     517                <?php 
     518                $i++; 
     519                } 
     520                ?> 
     521 
     522                </table> 
     523        <? 
     524          } 
     525        ?> 
     526                </td> 
     527        </tr> 
     528</table> 
     529 
     530<br/> 
     531<table width="95%"> 
     532        <tr> 
     533 
     534                <td valign="top" width="50%" > 
     535        <?php 
     536        $sip_buddies_table = new Table('cc_sip_buddies','*'); 
     537        $sip_buddies_clause = "id_cc_card  = ".$id; 
     538        $sip_buddies_result = $sip_buddies_table -> Get_list($DBHandle, $sip_buddies_clause, 0); 
     539        $sip_buddies = $sip_buddies_result[0]; 
     540        if(sizeof($sip_buddies_result)>0 && $sip_buddies_result[0]!=null) { 
     541        ?> 
     542                        <table width="100%" class="editform_table1"> 
     543                           <tr> 
     544                                        <th colspan="2" background="../Public/templates/default/images/background_cells.gif"> 
     545                                                <?php echo gettext("SIP-BUDDIES") ?> 
     546                                        </th> 
     547                           </tr> 
     548               <tr class="form_head"> 
     549                <td class="tableBody"  width="15%" align="center" style="padding: 2px;"> 
     550                 <?php echo gettext("USERNAME"); ?> 
     551                </td> 
     552                <td class="tableBody"  width="20%" align="center" style="padding: 2px;"> 
     553                <?php echo gettext("SECRET"); ?> 
     554                </td> 
     555              </tr> 
     556               <?php 
     557                $i=0; 
     558                foreach ($sip_buddies_result as $sip_buddies) { 
     559                    if($i%2==0) $bg="#fcfbfb"; 
     560                    else  $bg="#f2f2ee"; 
     561               ?> 
     562                    <tr bgcolor="<?php echo $bg; ?>"  > 
     563                        <td class="tableBodyRight"  background="../Public/templates/default/images/background_cells.gif" width="70%" align="center"> 
     564                          <?php echo $sip_buddies['username']; ?> 
     565                        </td> 
     566                        <td class="tableBodyRight"  background="../Public/templates/default/images/background_cells.gif" width="70%"  align="center"> 
     567                          <?php echo $sip_buddies['secret']; ?> 
     568                        </td> 
     569                    </tr> 
     570                <?php 
     571                $i++; 
     572                } 
     573                ?> 
     574 
     575                </table> 
     576        <? 
     577          } 
     578        ?> 
     579                </td> 
     580 
     581                <td valign="top" width="50%" > 
     582        <?php 
     583        $iax_buddies_table = new Table('cc_iax_buddies','*'); 
     584        $iax_buddies_clause = "id_cc_card  = ".$id; 
     585        $iax_buddies_result = $iax_buddies_table -> Get_list($DBHandle, $iax_buddies_clause, 0); 
     586        $iax_buddies = $iax_buddies_result[0]; 
     587        if(sizeof($iax_buddies_result)>0 && $iax_buddies_result[0]!=null) { 
     588        ?> 
     589                        <table width="100%" class="editform_table1"> 
     590                           <tr> 
     591                                        <th colspan="2" background="../Public/templates/default/images/background_cells.gif"> 
     592                                                <?php echo gettext("IAX-BUDDIES") ?> 
     593                                        </th> 
     594                           </tr> 
     595               <tr class="form_head"> 
     596                <td class="tableBody"  width="15%" align="center" style="padding: 2px;"> 
     597                 <?php echo gettext("USERNAME"); ?> 
     598                </td> 
     599                <td class="tableBody"  width="20%" align="center" style="padding: 2px;"> 
     600                <?php echo gettext("SECRET"); ?> 
     601                </td> 
     602              </tr> 
     603               <?php 
     604                $i=0; 
     605                foreach ($iax_buddies_result as $iax_buddies) { 
     606                    if($i%2==0) $bg="#fcfbfb"; 
     607                    else  $bg="#f2f2ee"; 
     608               ?> 
     609                    <tr bgcolor="<?php echo $bg; ?>"  > 
     610                        <td class="tableBodyRight"  background="../Public/templates/default/images/background_cells.gif" width="70%" align="center"> 
     611                          <?php echo $iax_buddies['username']; ?> 
     612                        </td> 
     613                        <td class="tableBodyRight"  background="../Public/templates/default/images/background_cells.gif" width="70%"  align="center"> 
     614                          <?php echo $iax_buddies['secret']; ?> 
     615                        </td> 
     616                    </tr> 
     617                <?php 
     618                $i++; 
     619                } 
     620                ?> 
     621 
     622                </table> 
     623        <? 
     624          } 
     625        ?> 
     626                </td> 
     627        </tr> 
     628</table> 
     629<br/> 
    422630<div style="width : 90%; text-align : right; margin-left:auto;margin-right:auto;" > 
    423631        <a class="cssbutton_big"  href="A2B_entity_card.php?section=1"> 
     
    658866                ?> 
    659867</table> 
     868<?php 
     869$did_destination_table = new Table('cc_did_destination,cc_did ','*'); 
     870$did_destination_clause = " cc_did_destination.id_cc_did = cc_did.id and cc_did_destination.id_cc_card  = ".$id; 
     871$did_destination_result = $did_destination_table -> Get_list($DBHandle, $did_destination_clause, 0); 
     872$did_destination = $did_destination_result[0]; 
     873if(sizeof($did_destination_result)>0 && $did_destination_result[0]!=null) { 
     874?> 
     875<table class="toppage_maintable"> 
     876        <tr> 
     877                <td height="20" align="center"> 
     878                        <font class="toppage_maintable_text"> 
     879                          <?php echo gettext("DIDs & DID Destination"); ?>                <br/> 
     880                        </font> 
     881                </td> 
     882        </tr> 
     883</table> 
     884 
     885<table width="95%"  cellspacing="2" cellpadding="2" border="0"> 
     886 
     887        <tr class="form_head"> 
     888                <td class="tableBody"  width="15%" align="center" style="padding: 2px;"> 
     889                 <?php echo gettext("DID"); ?> 
     890                </td> 
     891                <td class="tableBody"  width="20%" align="center" style="padding: 2px;"> 
     892                <?php echo gettext("DESTINATION"); ?> 
     893                </td> 
     894        <td class="tableBody"  width="15%" align="center" style="padding: 2px;"> 
     895                 <?php echo gettext("ACTIVATED"); ?> 
     896                </td> 
     897        <td class="tableBody"  width="15%" align="center" style="padding: 2px;"> 
     898                 <?php echo gettext("VOIP"); ?> 
     899                </td> 
     900        </tr> 
     901 
     902        <?php 
     903                $i=0; 
     904                foreach ($did_destination_result as $did_destination) { 
     905                        if($i%2==0) $bg="#fcfbfb"; 
     906                        else  $bg="#f2f2ee"; 
     907        ?> 
     908                        <tr bgcolor="<?php echo $bg; ?>"  > 
     909                                <td class="tableBody" align="center"> 
     910                                  <?php echo $did_destination['did']; ?> 
     911                                </td> 
     912                <td class="tableBody" align="center"> 
     913                                  <?php echo $did_destination['destination']; ?> 
     914                                </td> 
     915                                <td class="tableBody" align="center"> 
     916                                  <?php echo ($did_destination['activated']=="1"?"Active":"Inactive"); ?> 
     917                                </td> 
     918                <td class="tableBody" align="center"> 
     919                                  <?php echo ($did_destination['voip_call']=="1"?"Active":"Inactive"); ?> 
     920                                </td> 
     921                        </tr> 
     922                <?php 
     923                $i++; 
     924                } 
     925                ?> 
     926</table> 
     927<?php 
     928} 
     929?> 
    660930<?php  
    661931} ?>