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


PHP Campaign::fetchData方法代码示例

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


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

 <tr>
     <th>Dispo Name</th>
     <th>Total Calls</th>
     <th>Percentage of Total</th>
     <th>Average Talk Time</th>
     <th>Average Hold Time</th>
     <th>Average Dispo Time</th>
     <th>Average Dead Time</th>
     <th>Average Handle Time</th>
     <th>Average Wrap Time</th>
 </tr>
 <?php 
 $total = $data->byInbound()->byQueue($queue)->getTotalAnswered();
 foreach ($data->byInbound()->byQueue($queue)->getTotalByDispo() as $d => $c) {
     echo "<tr>\n";
     echo "<td>" . $data->fetchData()->getDispoName($d) . "</td>\n";
     echo "<td>" . $c . "</td>\n";
     echo "<td>" . @round($c / $total * 100) . "</td>\n";
     echo "<td>" . gmdate("H:i:s", (int) $data->byInbound()->fetchCallTimes()->byQueue($queue)->byDispo($d)->getAVGTalkTime()) . "</td>\n";
     echo "<td>" . gmdate("H:i:s", (int) $data->byInbound()->fetchCallTimes()->byQueue($queue)->byDispo($d)->getAVGHoldTime()) . "</td>\n";
     echo "<td>" . gmdate("H:i:s", (int) $data->byInbound()->fetchCallTimes()->byQueue($queue)->byDispo($d)->getAVGDispoTime()) . "</td>\n";
     echo "<td>" . gmdate("H:i:s", (int) $data->byInbound()->fetchCallTimes()->byQueue($queue)->byDispo($d)->getAVGDeadTime()) . "</td>\n";
     echo "<td>" . gmdate("H:i:s", (int) $data->byInbound()->fetchCallTimes()->byQueue($queue)->byDispo($d)->getAVGHandleTime()) . "</td>\n";
     echo "<td>" . gmdate("H:i:s", (int) $data->byInbound()->fetchCallTimes()->byQueue($queue)->byDispo($d)->getAVGWrapTime()) . "</td>\n";
     echo "</tr>\n";
 }
 echo "<tr>\n";
 echo "<td><b>Total</b></td>\n";
 echo "<td>" . $total . "</td>\n";
 echo "<td>100%</td>\n";
 echo "<td>" . gmdate("H:i:s", (int) $data->byInbound()->fetchCallTimes()->byQueue($queue)->getAVGTalkTime()) . "</td>\n";
开发者ID:avinaszh,项目名称:vicidial-agent-reporting,代码行数:31,代码来源:inboundHandledByDispoByQueueYesterday.php

示例3: gmdate

$data->setTimePeriod($yday_start, $yday_end);
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";
开发者ID:avinaszh,项目名称:vicidial-agent-reporting,代码行数:31,代码来源:inboundCallsByAgentYesterday.php

示例4: Campaign

<?php

require "../config.php";
$camp = @$_GET['camp'] != "" ? $_GET['camp'] : 'CS';
$data = new Campaign($camp);
$yday_start = mktime(0, 0, 0) - 24 * 3600;
$yday_end = mktime(23, 59, 59) - 24 * 3600;
$data->setTimePeriod($yday_start, $yday_end);
echo "<h1>Data For Campaign: " . $camp . "</h1>\n";
foreach ($data->fetchData()->getAgents() as $agent) {
    $data->setAgent($agent);
    echo "<h2>Agent: " . $agent . "</h2>\n";
    ?>
<table border="1">
    <tr>
        <th>Dispo Name</th>
        <th>Total Calls</th>
        <th>Percentage of Total</th>
        <th>Average Talk Time</th>
        <th>Average Hold Time</th>
        <th>Average Dispo Time</th>
        <th>Average Dead Time</th>
        <th>Average Handle Time</th>
        <th>Average Wrap Time</th>
    </tr>
    <?php 
    $queues = $data->byInbound()->queues;
    if (($key = array_search("AGENTDIRECT", $queues)) !== false) {
        unset($queues[$key]);
    }
    $total = $data->byInbound()->byQueue($queues)->getTotalAnswered();
开发者ID:avinaszh,项目名称:vicidial-agent-reporting,代码行数:31,代码来源:inboundHandledByDispoByAgentYesterday.php

示例5: gmdate

        <th>Direct %</th>
        <th>Calls Answered</th>
        <th>% Answered</th>
        <th>% SLA of Ans</th>
        <th>OOH</th>
        <th>% OOH</th>
        <th>Drop</th>
        <th>% Drop</th>
        <th>Avg Handle</th>
        <th>Avg Wait</th>
        <th>Avg Wrap</th>
    </tr>
    <?php 
foreach ($data->byInbound()->queues as $queue) {
    echo "<tr>\n";
    echo "<td>" . $data->fetchData()->getQueueName($queue) . "</td>\n";
    echo "<td>" . $data->byInbound()->byQueue($queue)->getTotalOffered() . "</td>\n";
    echo "<td>" . $data->byInbound()->byQueue($queue)->getTotalDirectOffered() . "</td>\n";
    echo "<td>" . @round($data->byInbound()->byQueue($queue)->getTotalDirectOffered() / $data->byInbound()->byQueue($queue)->getTotalOffered() * 100) . "%</td>\n";
    echo "<td>" . $data->byInbound()->byQueue($queue)->getTotalAnswered() . "</td>\n";
    echo "<td>" . @round($data->byInbound()->byQueue($queue)->getTotalAnswered() / $data->byInbound()->byQueue($queue)->getTotalOffered() * 100) . "%</td>\n";
    echo "<td>N/A</td>\n";
    echo "<td>" . $data->byInbound()->byQueue($queue)->getTotalOOH() . "</td>\n";
    echo "<td>" . @round($data->byInbound()->byQueue($queue)->getTotalOOH() / $data->byInbound()->byQueue($queue)->getTotal() * 100) . "%</td>\n";
    echo "<td>" . $data->byInbound()->byQueue($queue)->getTotalDrop() . "</td>\n";
    echo "<td>" . @round($data->byInbound()->byQueue($queue)->getTotalDrop() / $data->byInbound()->byQueue($queue)->getTotalOffered() * 100) . "%</td>\n";
    echo "<td>" . gmdate("H:i:s", (int) $data->byInbound()->fetchCallTimes()->byQueue($queue)->getAVGHandleTime()) . "</td>\n";
    echo "<td>" . gmdate("H:i:s", (int) $data->byInbound()->fetchCallTimes()->byQueue($queue)->getAVGWaitTime()) . "</td>\n";
    echo "<td>" . gmdate("H:i:s", (int) $data->byInbound()->fetchCallTimes()->byQueue($queue)->getAVGWrapTime()) . "</td>\n";
    echo "</tr>\n";
}
开发者ID:avinaszh,项目名称:vicidial-agent-reporting,代码行数:31,代码来源:callsByBrandYesterday.php


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