當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。