本文整理汇总了PHP中astercrm::getRecord方法的典型用法代码示例。如果您正苦于以下问题:PHP astercrm::getRecord方法的具体用法?PHP astercrm::getRecord怎么用?PHP astercrm::getRecord使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类astercrm
的用法示例。
在下文中一共展示了astercrm::getRecord方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: init
/**
* initialize page elements
*
*/
function init()
{
global $locate, $config;
$objResponse = new xajaxResponse();
$myAsterisk = new Asterisk();
$myAsterisk->config['asmanager'] = $config['asterisk'];
$res = $myAsterisk->connect();
if (!$res) {
$objResponse->addAssign("AMIStatudDiv", "innerHTML", $locate->Translate("AMI connection failed"));
}
$group_row = astercrm::getRecord($_SESSION['curuser']['groupid'], 'accountgroup');
if ($group_row['grouplogo'] != '' && $group_row['grouplogostatus']) {
$logoPath = $config['system']['upload_file_path'] . '/callshoplogo/' . $group_row['grouplogo'];
if (is_file($logoPath)) {
$titleHtml = '<img src="' . $logoPath . '" style="float:left;" >';
}
}
if ($group_row['grouptitle'] != '') {
$titleHtml .= '<h1 style="padding: 0 0 0 0;position: relative;font-size: 16pt;">' . $group_row['grouptitle'] . '</h1>';
}
if ($group_row['grouptagline'] != '') {
$titleHtml .= '<h2 style="padding: 0 0 0 0;position: relative;font-size: 11pt;color: #FJDSKB;">' . $group_row['grouptagline'] . '</h2>';
}
if (isset($titleHtml)) {
//$titleHtml .= '<div style="position:absolute;top:85px;left:0px;width:800px"><hr color="#F1F1F1"></div>';
$objResponse->addAssign("divTitle", "innerHTML", $titleHtml);
} else {
$objResponse->addAssign("divTitle", "style.height", '0px');
$objResponse->addAssign("divMain", "style.top", '0px');
}
$_SESSION['status'] = array();
$peers = $_SESSION['curuser']['extensions'];
# 获得当前的channel
$curchannels = array();
$curchannels = astercc::checkPeerStatus($_SESSION['curuser']['groupid'], $peers);
foreach ($peers as $peer) {
// check if the booth is locked
$clid = astercc::readRecord('clid', 'clid', $peer);
if ($clid['isshow'] == 'yes') {
$i++;
// read booth display
//$display = astercc::readField('clid','display','clid',$peer);
$status = $clid['status'];
$display = $clid['display'];
if ($curchannels[$peer] && $curchannels[$peer]['creditlimit'] > 0) {
$objResponse->addScript('addDiv("divMainContainer","' . $peer . '","' . $curchannels[$peer]['creditlimit'] . '","' . $i . '","' . $status . '","' . $display . '","' . $config['customers']['enable'] . '")');
} else {
$objResponse->addScript('addDiv("divMainContainer","' . $peer . '","","' . $i . '","' . $status . '","' . $display . '","' . $config['customers']['enable'] . '")');
}
$objResponse->addScript('xajax_addUnbilled("' . $peer . '");');
}
}
if (!isset($_SESSION['callbacks'])) {
$_SESSION['callbacks'] = array();
}
//print_r($_SESSION['callbacks']);
// get callback from database
$callback = astercc::getCallback($_SESSION['curuser']['groupid']);
while ($callback->fetchInto($mycallback)) {
if ($mycallback['dst'] != $mycallback['src']) {
// legB connected
$_SESSION['callbacks'][$mycallback['dst'] . $mycallback['src']] = array('legA' => $mycallback['src'], 'legB' => $mycallback['dst'], 'start' => 1, 'creditLimit' => $mycallback['creditlimit']);
}
}
//print_r($_SESSION['callbacks']);
// get callback from session
foreach ($_SESSION['callbacks'] as $callback) {
if ($callback['creditlimit'] > 0) {
$objResponse->addScript('addDiv("divMainContainer","local/' . $callback['legB'] . '","' . $callback['creditlimit'] . '","","","' . $config['customers']['enable'] . '")');
} else {
$objResponse->addScript('addDiv("divMainContainer","local/' . $callback['legB'] . '","","","","' . $config['customers']['enable'] . '")');
}
$objResponse->addScript('xajax_addUnbilled("' . $callback['legB'] . '","' . $callback['legA'] . '");');
}
//print_r($_SESSION['callbacks']);
//$objResponse->addAssign("divNav","innerHTML",common::generateManageNav($skin));
//$objResponse->addAssign("divCopyright","innerHTML",common::generateCopyright($skin));
$objResponse->addScript("checkHangup()");
$objResponse->addScript("xajax_setGroupBalance();");
$objResponse->addAssign("creditlimittype", "value", $config['system']['creditlimittype']);
return $objResponse;
}
示例2: split
$file = split('\\.', $_FILES['callshopLogo']['name']);
$file_count = count($file) - 1;
$file_ext = $file[$file_count];
$filename = 'callshoplogo_' . $_REQUEST['group_id'] . '.' . $file_ext;
$filepath = $config['system']['upload_file_path'] . '/callshoplogo/';
if (!is_dir($filepath)) {
if (!mkdir($filepath)) {
echo "<script>alert('" . $locate->Translate("Logo upload faild please check your upload directory") . "');</script>";
exit;
}
}
if (!move_uploaded_file($_FILES['callshopLogo']['tmp_name'], $filepath . $filename)) {
echo "<script>alert('" . $locate->Translate("Logo upload faild1") . "');</script>";
} else {
echo "<script>alert('" . $locate->Translate("Logo upload success") . "');</script>";
$group_row = astercrm::getRecord($_REQUEST['group_id'], 'accountgroup');
if ($group_row['grouplogo'] != $filename) {
unlink($filepath . $group_row['grouplogo']);
astercrm::updateField('accountgroup', 'grouplogo', $filename, $_REQUEST['group_id'], 'id');
}
//echo "<script>window.parent.location.reload();</script>";
}
} else {
echo "<script>alert('" . $locate->Translate("Logo file must be a image file") . "');</script>";
}
}
exit;
}
//for import
if (isset($_POST['CHECK']) && trim($_POST['CHECK']) == '1') {
$upload_msg = '';
示例3: header
<?php
header('Content-Type: text/html; charset=utf-8');
require_once 'systemstatus.common.php';
require_once 'systemstatus.server.php';
$GLOBALS['locate'] = new Localization($_SESSION['curuser']['country'], $_SESSION['curuser']['language'], 'systemstatus');
$reseller = astercc::readField('resellergroup', 'resellername', 'id', $_SESSION['curuser']['resellerid']);
$callshop = astercc::readField('accountgroup', 'groupname', 'id', $_SESSION['curuser']['groupid']);
$group_row = astercrm::getRecord($_SESSION['curuser']['groupid'], 'accountgroup');
if ($group_row['grouplogo'] != '' && $group_row['grouplogostatus']) {
$logoPath = $config['system']['upload_file_path'] . '/callshoplogo/' . $group_row['grouplogo'];
if (is_file($logoPath)) {
$titleHtml = '<img src="' . $logoPath . '" style="float:left;" width="80" height="80">';
}
}
if ($group_row['grouptitle'] != '') {
$titleHtml .= '<h1 style="padding: 0 0 0 0;position: relative;font-size: 16pt;">' . $group_row['grouptitle'] . '</h1>';
}
if ($group_row['grouptagline'] != '') {
$titleHtml .= '<h2 style="padding: 0 0 0 0;position: relative;font-size: 11pt;">' . $group_row['grouptagline'] . '</h2>';
}
if (strstr($_REQUEST['peer'], 'local/')) {
//for callback
$peer = ltrim($peer, 'local/');
foreach ($_SESSION['callbacks'] as $key => $callback) {
if ($key == $peer . $callback['legA'] && $callback['legB'] == $peer) {
$leg = $callback['legA'];
}
}
} else {
$peer = trim($_REQUEST['peer']);