Changeset 12061

Show
Ignore:
Timestamp:
05/02/11 16:36:12 (2 years ago)
Author:
mbrevda
Message:

closes #5120 - add support for dst-channel and user field in cdr. Thanks SkykingOH!

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • freepbx/branches/2.9/amp_conf/htdocs/admin/cdr/call-log.php

    r11599 r12061  
    66// correct 31 +1 = 32 for the date 
    77//@session_start(); 
    8 getpost_ifset(array('posted', 'Period', 'frommonth', 'fromstatsmonth', 'tomonth', 'tostatsmonth', 'fromday', 'fromstatsday_sday', 'fromstatsmonth_sday', 'today', 'tostatsday_sday', 'tostatsmonth_sday', 'dsttype', 'srctype', 'clidtype', 'channel', 'resulttype', 'stitle', 'atmenu', 'current_page', 'order', 'sens', 'dst', 'src', 'clid', 'userfieldtype', 'userfield', 'accountcodetype', 'accountcode', 'duration1', 'duration1type', 'duration2', 'duration2type')); 
     8getpost_ifset(array('posted', 'Period', 'frommonth', 'fromstatsmonth', 'tomonth', 'tostatsmonth', 'fromday', 'fromstatsday_sday', 'fromstatsmonth_sday', 'today', 'tostatsday_sday', 'tostatsmonth_sday', 'dsttype', 'srctype', 'clidtype', 'channel', 'resulttype', 'stitle', 'atmenu', 'current_page', 'order', 'sens', 'dst', 'src', 'clid', 'userfieldtype', 'userfield', 'dstchanneltype', 'dstchannel', 'accountcodetype', 'accountcode', 'duration1', 'duration1type', 'duration2', 'duration2type')); 
    99 
    1010if (isset($resulttype) && (($resulttype == null) || ($resulttype == ""))) unset($resulttype); 
     
    8585if (!file_exists($amp_conf['ASTETCDIR'].'/call-log-table.php') || !@include($amp_conf['ASTETCDIR'].'/call-log-table.php')) { 
    8686 
    87   $FG_TABLE_COL[]=array ("Calldate", "calldate", "18%", "center", "SORT", "19"); 
    88   $FG_TABLE_COL[]=array ("Channel", "channel", "13%", "center", "", "30", "", "", "", "", "", "display_acronym"); 
    89   $FG_TABLE_COL[]=array ("Source", "src", "14%", "center", "", "30"); 
    90   $FG_TABLE_COL[]=array ("Clid", "clid", "26%", "center", "", "80",'','','','','','filter_html'); 
    91  
    92   $FG_TABLE_COL[]=array ("Dst", "dst", "14%", "center", "SORT", "30"); 
    93  
    94   $FG_TABLE_COL[]=array ("Disposition", "disposition", "9%", "center", "", "30"); 
     87  $FG_TABLE_COL[]=array ("Calldate", "calldate", "15%", "center", "SORT", "19"); 
     88  $FG_TABLE_COL[]=array ("Channel", "channel", "10%", "center", "", "30", "", "", "", "", "", "display_acronym"); 
     89  $FG_TABLE_COL[]=array ("Source", "src", "10%", "center", "", "30"); 
     90  $FG_TABLE_COL[]=array ("Clid", "clid", "20%", "center", "", "80",'','','','','','filter_html'); 
     91 
     92  $FG_TABLE_COL[]=array ("Dst", "dst", "10%", "center", "SORT", "30"); 
     93  $FG_TABLE_COL[]=array ("Dst Channel", "dstchannel", "10%", "center", "", "40", "", "", "", "", "", "display_acronym"); 
     94 
     95  $FG_TABLE_COL[]=array ("Disposition", "disposition", "10%", "center", "", "30"); 
    9596  if ((!isset($resulttype)) || ($resulttype=="min")) $minute_function= "display_minute"; 
    96   $FG_TABLE_COL[]=array ("Duration", "duration", "6%", "center", "SORT", "30", "", "", "", "", "", "$minute_function"); 
     97  $FG_TABLE_COL[]=array ("Duration", "duration", "5%", "center", "SORT", "30", "", "", "", "", "", "$minute_function"); 
     98  $FG_TABLE_COL[]=array ("Userfield", "userfield", "10%", "center", "", "20"); 
    9799 
    98100  $FG_TABLE_DEFAULT_ORDER = "calldate"; 
     
    102104  //$FG_COL_QUERY='calldate, channel, src, clid, lastapp, lastdata, dst, dst, serverid, disposition, duration'; 
    103105 
    104   $FG_COL_QUERY='calldate, channel, src, clid, dst, disposition, duration'; 
     106  $FG_COL_QUERY='calldate, channel, src, clid, dst, dstchannel, disposition, duration, userfield'; 
    105107 
    106108  /* --AMP End -- */ 
     
    196198  $SQLcmd = do_field($SQLcmd, 'dst'); 
    197199  $SQLcmd = do_field($SQLcmd, 'userfield'); 
     200  $SQLcmd = do_field($SQLcmd, 'dstchannel'); 
    198201  $SQLcmd = do_field($SQLcmd, 'accountcode'); 
    199202  $SQLcmd = do_field($SQLcmd, 'channel'); 
     
    500503        <td class="bar-search" align="center" bgcolor="#cddeff"><input type="radio" NAME="clidtype" value="4" <?php if($clidtype==4){?>checked<?php }?>>Ends with</td> 
    501504        </tr></table></td> 
    502       </tr> 
     505      </tr>--> 
    503506      <tr> 
    504507        <td align="left" bgcolor="#000033">          
     
    513516        </tr></table></td> 
    514517      </tr> 
    515     <tr> 
     518<!-- AMP    <tr> 
    516519        <td class="bar-search" align="left" bgcolor="#555577">         
    517520          <font face="verdana" size="1" color="#ffffff"><b>&nbsp;&nbsp;ACCOUNTCODE</b></font> 
     
    534537        </tr></table></td> 
    535538      </tr> 
    536  
     539      <tr> 
     540        <td align="left" bgcolor="#000033">          
     541          <font face="verdana" size="1" color="#ffffff"><b>&nbsp;&nbsp;DST CHANNEL</b></font> 
     542        </td>        
     543        <td class="bar-search" align="left" bgcolor="#acbdee"> 
     544        <table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#acbdee"><tr><td>&nbsp;&nbsp;<INPUT TYPE="text" NAME="dstchannel" value="<?php echo "$dstchannel";?>"></td> 
     545        <td class="bar-search" align="center" bgcolor="#acbdee"><input type="radio" NAME="dstchanneltype" value="1" <?php if((!isset($dstchanneltype))||($dstchanneltype==1)){?>checked<?php }?>>Exact</td> 
     546        <td class="bar-search" align="center" bgcolor="#acbdee"><input type="radio" NAME="dstchanneltype" value="2" <?php if($dstchanneltype==2){?>checked<?php }?>>Begins with</td> 
     547        <td class="bar-search" align="center" bgcolor="#acbdee"><input type="radio" NAME="dstchanneltype" value="3" <?php if($dstchanneltype==3){?>checked<?php }?>>Contains</td> 
     548        <td class="bar-search" align="center" bgcolor="#acbdee"><input type="radio" NAME="dstchanneltype" value="4" <?php if($dstchanneltype==4){?>checked<?php }?>>Ends with</td> 
     549        </tr></table></td> 
     550      </tr> 
    537551      <tr> 
    538552        <td class="bar-search" align="left" bgcolor="#555577">         
     
    742756                    <?php if ($current_page<$nb_record_max-1){?> 
    743757                    - <a href="<?php echo $_SERVER['PHP_SELF']?>?handler=cdr&s=1&t=<?php echo $t?>&order=<?php echo $order?>&sens=<?php echo $sens?>&current_page=<?php  echo ($current_page+1)?><?php  if (!is_null($letter) && ($letter!="")){ echo "&letter=$letter";}  
    744           echo "&posted=$posted&Period=$Period&frommonth=$frommonth&fromstatsmonth=$fromstatsmonth&tomonth=$tomonth&tostatsmonth=$tostatsmonth&fromday=$fromday&fromstatsday_sday=$fromstatsday_sday&fromstatsmonth_sday=$fromstatsmonth_sday&today=$today&tostatsday_sday=$tostatsday_sday&tostatsmonth_sday=$tostatsmonth_sday&dsttype=$dsttype&srctype=$srctype&clidtype=$clidtype&channel=$channel&resulttype=$resulttype&dst=$dst&src=$src&clid=$clid&channel=$channel&resulttype=$resulttype&dst=$dst&src=$src&clid=$clid&userfieldtype=$userfieldtype&userfield=$userfield&accountcodetype=$accountcodetype&accountcode=$accountcode&duration1=$duration1&duration1type=$duration1type&duration2=$duration2&duration2type=$duration2type";?>">  
     758          echo "&posted=$posted&Period=$Period&frommonth=$frommonth&fromstatsmonth=$fromstatsmonth&tomonth=$tomonth&tostatsmonth=$tostatsmonth&fromday=$fromday&fromstatsday_sday=$fromstatsday_sday&fromstatsmonth_sday=$fromstatsmonth_sday&today=$today&tostatsday_sday=$tostatsday_sday&tostatsmonth_sday=$tostatsmonth_sday&dsttype=$dsttype&srctype=$srctype&clidtype=$clidtype&channel=$channel&resulttype=$resulttype&dst=$dst&src=$src&clid=$clid&channel=$channel&resulttype=$resulttype&dst=$dst&src=$src&clid=$clid&userfieldtype=$userfieldtype&userfield=$userfield&dstchanneltype=$dstchanneltype&dstchannel=$dstchannel&accountcodetype=$accountcodetype&accountcode=$accountcode&duration1=$duration1&duration1type=$duration1type&duration2=$duration2&duration2type=$duration2type";?>">  
    745759                    Next </a> <img src="cdr/images/fleche-d.gif" width="5" height="10">  
    746760                    </B></SPAN>  
  • freepbx/branches/2.9/amp_conf/htdocs/admin/cdr/cdr.php

    r11047 r12061  
    5959'duration2type', 
    6060'dst', 
     61'dstchannel', 
     62'dstchanneltype', 
    6163'dsttype', 
    6264'fromday',