当前位置: 首页>>代码示例>>PHP>>正文


PHP astercrm::getAllCdrRecords方法代码示例

本文整理汇总了PHP中astercrm::getAllCdrRecords方法的典型用法代码示例。如果您正苦于以下问题:PHP astercrm::getAllCdrRecords方法的具体用法?PHP astercrm::getAllCdrRecords怎么用?PHP astercrm::getAllCdrRecords使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在astercrm的用法示例。


在下文中一共展示了astercrm::getAllCdrRecords方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: createCdrGrid

 function createCdrGrid($customerid = '', $cdrtype = '', $start = 0, $limit = 1, $filter = null, $content = null, $stype = null, $order = null, $divName = "formCdr", $ordering = "")
 {
     global $locate;
     $_SESSION['ordering'] = $ordering;
     if ($filter == null || $content == null || !is_array($content) && $content == 'Array' || !is_array(filter) && $filter == 'Array') {
         $content = null;
         $filter = null;
         $numRows =& astercrm::getCdrNumRows($customerid, $cdrtype);
         $arreglo =& astercrm::getAllCdrRecords($customerid, $cdrtype, $start, $limit, $order);
     } else {
         foreach ($content as $value) {
             if (trim($value) != "") {
                 //搜索内容有值
                 $flag = "1";
                 break;
             }
         }
         foreach ($filter as $value) {
             if (trim($value) != "") {
                 //搜索条件有值
                 $flag2 = "1";
                 break;
             }
         }
         foreach ($stype as $value) {
             if (trim($value) != "") {
                 //搜索方式有值
                 $flag3 = "1";
                 break;
             }
         }
         if ($flag != "1" || $flag2 != "1") {
             //无值
             $order = null;
             $numRows =& astercrm::getCdrNumRows($customerid, $cdrtype);
             $arreglo =& astercrm::getAllCdrRecords($customerid, $cdrtype, $start, $limit, $order);
         } elseif ($flag3 != 1) {
             //未选择搜索方式
             $order = "calldate";
             $numRows =& astercrm::getCdrNumRowsMore($customerid, $cdrtype, $filter, $content);
             $arreglo =& astercrm::getCdrRecordsFilteredMore($customerid, $cdrtype, $start, $limit, $filter, $content, $order);
         } else {
             $order = "calldate";
             $numRows =& astercrm::getCdrNumRowsMorewithstype($customerid, $cdrtype, $filter, $content, $stype);
             $arreglo =& astercrm::getCdrRecordsFilteredMorewithstype($customerid, $cdrtype, $start, $limit, $filter, $content, $stype, $order);
         }
     }
     // Databse Table: fields
     if ($cdrtype == 'recent') {
         $fields = array();
         $fields[] = 'calldate';
         $fields[] = 'src';
         $fields[] = 'dst';
         $fields[] = 'didnumber';
         $fields[] = 'dstchannel';
         $fields[] = 'duration';
         $fields[] = 'billsec';
         $fields[] = 'record';
         // HTML table: Headers showed
         $headers = array();
         $headers[] = $locate->Translate("Calldate") . '<br>';
         $headers[] = $locate->Translate("Src") . '<br>';
         $headers[] = $locate->Translate("Dst") . '<br>';
         $headers[] = $locate->Translate("Callee Id") . '<br>';
         $headers[] = $locate->Translate("Agent") . '<br>';
         $headers[] = $locate->Translate("Duration") . '<br>';
         $headers[] = $locate->Translate("Billsec") . '<br>';
         $headers[] = $locate->Translate("record") . '<br>';
         // HTML table: hearders attributes
         $attribsHeader = array();
         $attribsHeader[] = 'width=""';
         $attribsHeader[] = 'width=""';
         $attribsHeader[] = 'width=""';
         $attribsHeader[] = 'width=""';
         $attribsHeader[] = 'width=""';
         $attribsHeader[] = 'width=""';
         $attribsHeader[] = 'width=""';
         $attribsHeader[] = 'width=""';
         // HTML Table: columns attributes
         $attribsCols = array();
         $attribsCols[] = 'style="text-align: left"';
         $attribsCols[] = 'style="text-align: left"';
         $attribsCols[] = 'style="text-align: left"';
         $attribsCols[] = 'style="text-align: left"';
         $attribsCols[] = 'style="text-align: left"';
         $attribsCols[] = 'style="text-align: left"';
         $attribsCols[] = 'style="text-align: left"';
         $attribsCols[] = 'style="text-align: left"';
         // HTML Table: If you want ascendent and descendent ordering, set the Header Events.
         $eventHeader = array();
         $eventHeader[] = 'onClick=\'showRecentCdrGrid("","' . $cdrtype . '",0,' . $limit . ',"' . $filter . '","' . $content . '","calldate","' . $divName . '","ORDERING","' . $stype . '");return false;\'';
         $eventHeader[] = 'onClick=\'showRecentCdrGrid("","' . $cdrtype . '",0,' . $limit . ',"' . $filter . '","' . $content . '","src","' . $divName . '","ORDERING","' . $stype . '");return false;\'';
         $eventHeader[] = 'onClick=\'showRecentCdrGrid("","' . $cdrtype . '",0,' . $limit . ',"' . $filter . '","' . $content . '","dst","' . $divName . '","ORDERING","' . $stype . '");return false;\'';
         $eventHeader[] = 'onClick=\'showRecentCdrGrid("","' . $cdrtype . '",0,' . $limit . ',"' . $filter . '","' . $content . '","didnumber","' . $divName . '","ORDERING","' . $stype . '");return false;\'';
         $eventHeader[] = 'onClick=\'showRecentCdrGrid("","' . $cdrtype . '",0,' . $limit . ',"' . $filter . '","' . $content . '","dstchannel","' . $divName . '","ORDERING","' . $stype . '");return false;\'';
         $eventHeader[] = 'onClick=\'showRecentCdrGrid("","' . $cdrtype . '",0,' . $limit . ',"' . $filter . '","' . $content . '","duration","' . $divName . '","ORDERING");return false;\'';
         $eventHeader[] = 'onClick=\'showRecentCdrGrid("","' . $cdrtype . '",0,' . $limit . ',"' . $filter . '","' . $content . '","billsec","' . $divName . '","ORDERING","' . $stype . '");return false;\'';
         $eventHeader[] = 'onClick=\'showRecentCdrGrid("","' . $cdrtype . '",0,' . $limit . ',"' . $filter . '","id","billsec","' . $divName . '","ORDERING","' . $stype . '");return false;\'';
         // Select Box: fields table.
         $fieldsFromSearch = array();
//.........这里部分代码省略.........
开发者ID:ljhcj,项目名称:IRISCC,代码行数:101,代码来源:astercrm.class.php


注:本文中的astercrm::getAllCdrRecords方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。