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


PHP Campaign::setAgent方法代码示例

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


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

示例1: yday

function yday($time)
{
    return $time - 24 * 3600;
}
$yday_start = yday(mktime(0, 0, 0));
$yday_end = yday(mktime(23, 59, 59));
$data->setTimePeriod($yday_start, $yday_end);
echo "<h1>Data For Campaign: " . $camp . "</h1>\n";
?>
<table border="1">
    <tr>
        <th>Agent Name</th>
        <th>First Login</th>
        <th>Last Activity</th>
        <th>Time Difference</th>
    </tr>
    <?php 
foreach ($data->fetchData()->getAgents() as $agent) {
    $data->setAgent($agent);
    echo "<tr>\n";
    echo "<td>" . $agent . "</td>\n";
    $start = $data->fetchData()->getLoginTimes();
    echo "<td>" . date("H:i:s", $start) . "</td>\n";
    $end = $data->fetchData()->getLastActivity();
    echo "<td>" . date("H:i:s", $end) . "</td>\n";
    echo "<td>" . gmdate("H:i:s", $end - $start) . "</td>\n";
    echo "</tr>\n";
}
?>
</table>
开发者ID:avinaszh,项目名称:vicidial-agent-reporting,代码行数:30,代码来源:loginActivityTimes.php

示例2: gmdate

echo "<h1>Data For Campaign: " . $camp . "</h1>\n";
?>
<table border="1">
    <tr>
        <th>Agent Name</th>
        <th>Calls Answered</th>
        <th>Average Talk Time</th>
        <th>Average Park Time</th>
        <th>Average Dispo Time</th>
        <th>Average Dead Time</th>
        <th>Average Handle Time</th>
        <th>Average Wrap Time</th>
    </tr>
<?php 
foreach ($data->fetchData()->getAgents() as $agent) {
    $data->setAgent($agent);
    echo "<tr>\n";
    echo "<td>" . $agent . "</td>\n";
    echo "<td>" . $data->byInbound()->byQueue($data->byInbound()->queues)->getTotalAnswered() . "</td>\n";
    echo "<td>" . gmdate("H:i:s", (int) $data->byInbound()->fetchCallTimes()->getAVGTalkTime()) . "</td>\n";
    echo "<td>" . gmdate("H:i:s", (int) $data->byInbound()->fetchCallTimes()->getAVGHoldTime()) . "</td>\n";
    echo "<td>" . gmdate("H:i:s", (int) $data->byInbound()->fetchCallTimes()->getAVGDispoTime()) . "</td>\n";
    echo "<td>" . gmdate("H:i:s", (int) $data->byInbound()->fetchCallTimes()->getAVGDeadTime()) . "</td>\n";
    echo "<td>" . gmdate("H:i:s", (int) $data->byInbound()->fetchCallTimes()->getAVGHandleTime()) . "</td>\n";
    echo "<td>" . gmdate("H:i:s", (int) $data->byInbound()->fetchCallTimes()->getAVGWrapTime()) . "</td>\n";
    echo "</tr>\n";
}
$data->setAgent(NULL);
echo "<tr>\n";
echo "<td><b>Total</b></td>\n";
echo "<td>" . $data->byInbound()->byQueue($data->byInbound()->queues)->getTotalAnswered() . "</td>\n";
开发者ID:avinaszh,项目名称:vicidial-agent-reporting,代码行数:31,代码来源:inboundCallsByAgentYesterday.php


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