本文整理汇总了PHP中astercrm::readReportAgent方法的典型用法代码示例。如果您正苦于以下问题:PHP astercrm::readReportAgent方法的具体用法?PHP astercrm::readReportAgent怎么用?PHP astercrm::readReportAgent使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类astercrm
的用法示例。
在下文中一共展示了astercrm::readReportAgent方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: array
}
}
if ($table != 'report') {
$res = $db->query($sql);
}
global $locate;
if ($table == 'report') {
$groupid = 0;
$accountid = 0;
if (!empty($_REQUEST['groupid'])) {
$groupid = $_REQUEST['groupid'];
}
if (!empty($_REQUEST['accountid'])) {
$accountid = $_REQUEST['accountid'];
}
$rows = astercrm::readReportAgent($groupid, $accountid, $_REQUEST['sdate'], $_REQUEST['edate']);
$data = array();
if ($rows['type'] == 'grouplist') {
foreach ($rows as $key => $row) {
$data_tmp = array();
if ($key != 'type') {
$hour = intval($row['seconds'] / 3600);
if ($hour < 3) {
$data_tmp['color'] = 'FF0000';
}
$minute = intval($row['seconds'] % 3600 / 60);
$sec = intval($row['seconds'] % 60);
$asr = round($row['arecordNum'] / $row['recordNum'] * 100, 2);
$acd = round($row['seconds'] / $row['arecordNum'], 2);
$acdminute = intval($acd / 60);
$acdsec = intval($acd % 60);
示例2: listReport
function listReport($aFormValues)
{
global $locate;
$objResponse = new xajaxResponse();
list($syear, $smonth, $sday, $stime) = split("[ -]", $aFormValues['sdate']);
$syear = (int) $syear;
$smonth = (int) $smonth;
$sday = (int) $sday;
list($shours, $smins) = split("[ :]", $stime);
$shours = (int) $shours;
if ($shours == 0) {
$shours = '00';
}
$smins = (int) $smins;
if ($smins == 0) {
$smins = '00';
}
list($eyear, $emonth, $eday, $etime) = split("[ -]", $aFormValues['edate']);
$eyear = (int) $eyear;
$emonth = (int) $emonth;
$eday = (int) $eday;
list($ehours, $emins) = split("[ :]", $etime);
$ehours = (int) $ehours;
if ($ehours == 0) {
$ehours = '00';
}
$emins = (int) $emins;
if ($emins == 0) {
$emins = '00';
}
$ary = array();
$aFormValues['sdate'] = $syear . "-" . $smonth . "-" . $sday . ' ' . $shours . ':' . $smins;
$aFormValues['edate'] = $eyear . "-" . $emonth . "-" . $eday . ' ' . $ehours . ':' . $emins;
$res = astercrm::readReport($aFormValues['groupid'], $aFormValues['accountid'], $aFormValues['sdate'], $aFormValues['edate'], 'both');
if ($aFormValues['listType'] == "none") {
if ($res['all']->fetchInto($myreport)) {
$myreport['answeredNum'] = $res['answered'];
$result = parseReport($myreport, " ");
$html .= "<b>" . $result['html'] . "</b>";
}
$objResponse->addAssign("divGeneralList", "innerHTML", $html);
$objResponse->addScript("document.getElementById('exportlist').innerHTML = '';");
$objResponse->addScript("document.getElementById('frmFilter').action = '';");
return $objResponse;
} elseif ($aFormValues['listType'] == "list") {
if ($aFormValues['reporttype'] == "flash") {
$objResponse->addScript("actionFlash('" . $aFormValues["resellerid"] . "','" . $aFormValues["groupid"] . "','" . $aFormValues["sltBooth"] . "','" . $aFormValues["sdate"] . "','" . $aFormValues["edate"] . "','" . $aFormValues["listType"] . "','" . $aFormValues["hidCurpeer"] . "');");
$html = "";
} else {
$exportlist = '<input type="submit" value="' . $locate->Translate("export") . '">';
$objResponse->addAssign("exportlist", "innerHTML", $exportlist);
$objResponse->addScript("document.getElementById('frmFilter').action = 'dataexport.php';");
$rows = astercrm::readReportAgent($aFormValues['groupid'], $aFormValues['accountid'], $aFormValues["sdate"], $aFormValues["edate"]);
$html = '<table class="adminlist" border="1" style="width:800px;">';
$class = 'row1';
if ($rows['type'] == 'grouplist') {
$html .= '<tr><th>' . $locate->Translate("groupname") . '</th>
<th>' . $locate->Translate("total calls") . '</th>
<th>' . $locate->Translate("answered calls") . '</th>
<th>' . $locate->Translate("answered duration") . '</th>
<th>' . $locate->Translate("ASR") . '</th>
<th>' . $locate->Translate("ACD") . '</th></tr>';
$class = 'row1';
foreach ($rows as $key => $row) {
if ($key != 'type') {
$hour = intval($row['seconds'] / 3600);
if ($hour < 3) {
$hour = '<font color="red">' . $hour;
}
$minute = intval($row['seconds'] % 3600 / 60);
$sec = intval($row['seconds'] % 60);
$asr = round($row['arecordNum'] / $row['recordNum'] * 100, 2);
$acd = round($row['seconds'] / $row['arecordNum'], 2);
$acdminute = intval($acd / 60);
$acdsec = intval($acd % 60);
$html .= '<tr class="' . $class . '"><td>' . $row['groupname'] . '</td>
<td>' . $row['recordNum'] . '</td>
<td>' . $row['arecordNum'] . '</td>
<td>' . $hour . $locate->Translate("hour") . $minute . $locate->Translate("minute") . $sec . $locate->Translate("sec") . '</td>
<td>' . $asr . '%</td>
<td>' . $acdminute . $locate->Translate("minute") . $acdsec . $locate->Translate("sec") . '</td></tr>';
if ($class == 'row1') {
$class = 'row0';
} else {
$class = 'row1';
}
}
}
} elseif ($rows['type'] == 'agentlist') {
//print_r($rows);exit;
$group = astercrm::getRecordByID($aFormValues['groupid'], "astercrm_accountgroup");
$html .= '<tr><th>' . $locate->Translate("groupname") . '</th>
<th>' . $locate->Translate("username") . '</th>
<th>' . $locate->Translate("name") . '</th>
<th>' . $locate->Translate("total calls") . '</th>
<th>' . $locate->Translate("answered calls") . '</th>
<th>' . $locate->Translate("answered duration") . '</th>
<th>' . $locate->Translate("ASR") . '</th>
<th>' . $locate->Translate("ACD") . '</th></tr>';
$class = 'row1';
//.........这里部分代码省略.........