當前位置: 首頁>>代碼示例>>PHP>>正文


PHP astercrm::getGroupCurcdr方法代碼示例

本文整理匯總了PHP中astercrm::getGroupCurcdr方法的典型用法代碼示例。如果您正苦於以下問題:PHP astercrm::getGroupCurcdr方法的具體用法?PHP astercrm::getGroupCurcdr怎麽用?PHP astercrm::getGroupCurcdr使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在astercrm的用法示例。


在下文中一共展示了astercrm::getGroupCurcdr方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: showChannelsInfo

/**
*  initialize page elements
*  @return	objResponse		object		xajax response object
*/
function showChannelsInfo()
{
    global $locate, $config, $db;
    $aDyadicArray[] = array($locate->Translate("src"), $locate->Translate("dst"), $locate->Translate("srcchan"), $locate->Translate("dstchan"), $locate->Translate("starttime"), $locate->Translate("answertime"), $locate->Translate("disposition"));
    $objResponse = new xajaxResponse();
    if ($config['system']['eventtype'] == 'curcdr') {
        if ($_SESSION['curuser']['usertype'] == 'admin') {
            $curcdr = astercrm::getAll("curcdr");
        } else {
            //print_r($_SESSION['curuser']['memberExtens']);exit;
            $curcdr = astercrm::getGroupCurcdr();
        }
        while ($curcdr->fetchInto($row)) {
            $systemCDR[] = array($row["src"], $row["dst"], $row["srcchan"], $row["dstchan"], $row["starttime"], $row["answertime"], $row["disposition"]);
        }
        $activeCalls = "  " . count($systemCDR) . " " . $locate->Translate("active calls");
        $objResponse->addAssign("divActiveCalls", "innerHTML", $activeCalls);
        $systemChannels = common::generateTabelHtml(array_merge($aDyadicArray, $systemCDR));
        $objResponse->addAssign("channels", "innerHTML", nl2br(trim($systemChannels)));
        return $objResponse;
    }
    $channels = split(chr(13), asterisk::getCommandData('show channels verbose'));
    /*
    	if ($channels == null){
    			$objResponse->addAssign("channels", "innerHTML", "can not connect to AMI, please check config.php");
    			return $objResponse;
    	}
    */
    $channels = split(chr(10), $channels[1]);
    //trim the first two records and the last three records
    //	array_pop($channels);
    array_pop($channels);
    $activeCalls = array_pop($channels);
    $activeChannels = array_pop($channels);
    array_shift($channels);
    $title = array_shift($channels);
    $title = split("_", implode("_", array_filter(split(" ", $title))));
    $myInfo[] = $title;
    foreach ($channels as $channel) {
        if (strstr($channel, " Dial")) {
            $myItem = split("_", implode("_", array_filter(split(" ", $channel))));
            $myInfo[] = $myItem;
        }
    }
    $myChannels = common::generateTabelHtml($myInfo);
    $objResponse->addAssign("divActiveCalls", "innerHTML", $activeCalls);
    $objResponse->addAssign("channels", "innerHTML", nl2br(trim($myChannels)));
    return $objResponse;
}
開發者ID:ljhcj,項目名稱:IRISCC,代碼行數:53,代碼來源:systemstatus.server.php


注:本文中的astercrm::getGroupCurcdr方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。