本文整理汇总了PHP中astercrm::getCdrNumRows方法的典型用法代码示例。如果您正苦于以下问题:PHP astercrm::getCdrNumRows方法的具体用法?PHP astercrm::getCdrNumRows怎么用?PHP astercrm::getCdrNumRows使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类astercrm
的用法示例。
在下文中一共展示了astercrm::getCdrNumRows方法的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();
//.........这里部分代码省略.........