本文整理汇总了PHP中ispos函数的典型用法代码示例。如果您正苦于以下问题:PHP ispos函数的具体用法?PHP ispos怎么用?PHP ispos使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了ispos函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: parsePayments
/**
* parses previously extracted payments and preprocess it to data private prop
*
* @return void
*/
public function parsePayments()
{
if (!empty($this->lines)) {
foreach ($this->lines as $io => $eachline) {
//setting empty tariff line counters
$this->data[$eachline]['summ'] = 0;
$this->data[$eachline]['count'] = 0;
if (!empty($this->payments)) {
foreach ($this->payments as $ia => $eachpayment) {
$userTariff = @$this->userTariffs[$eachpayment['login']];
if (ispos($eachline, '*')) {
$searchLine = str_replace('*', '', $eachline);
if (ispos($userTariff, $searchLine)) {
$this->data[$eachline]['summ'] = $this->data[$eachline]['summ'] + $eachpayment['summ'];
$this->data[$eachline]['count']++;
$this->totalsum = $this->totalsum + $eachpayment['summ'];
}
} else {
if ($userTariff == $eachline) {
$this->data[$eachline]['summ'] = $this->data[$eachline]['summ'] + $eachpayment['summ'];
$this->data[$eachline]['count']++;
$this->totalsum = $this->totalsum + $eachpayment['summ'];
}
}
}
} else {
show_error(__('No payments found'));
}
}
} else {
show_error(__('Undefined tariff lines'));
}
}
示例2: sendSMS
/**
* Stores SMS in sending queue
*
* @param string $number Mobile number in international format. Eg: +380506666666
* @param string $message Text message for sending
* @param bool $translit force message transliteration
* @param string $module module that inits SMS sending
*
* @return bool
*/
public function sendSMS($number, $message, $translit = true, $module = '')
{
$result = false;
$number = trim($number);
$module = !empty($module) ? ' MODULE ' . $module : '';
if (!empty($number)) {
if (ispos($number, '+')) {
$message = str_replace(array("\n\r", "\n", "\r"), ' ', $message);
if ($translit) {
$message = zb_TranslitString($message);
}
$message = trim($message);
$filename = self::QUEUE_PATH . 'us_' . zb_rand_string(8);
$storedata = 'NUMBER="' . $number . '"' . "\n";
$storedata .= 'MESSAGE="' . $message . '"' . "\n";
file_put_contents($filename, $storedata);
log_register('USMS SEND SMS `' . $number . '`' . $module);
$result = true;
}
}
return $result;
}
示例3: sendSMS
/**
* Stores SMS in sending queue
*
* @param string $number Mobile number in international format. Eg: +380506666666
* @param string $message Text message for sending
* @param bool $translit force message transliteration
* @return bool
*/
public function sendSMS($number, $message, $translit = true)
{
$result = false;
$number = trim($number);
if (!empty($number)) {
if (ispos($number, '+')) {
$message = str_replace('\\r\\n', ' ', $message);
if ($translit) {
$message = zb_TranslitString($message);
}
$message = trim($message);
$filename = self::QUEUE_PATH . 'us_' . zb_rand_string(8);
$storedata = 'NUMBER="' . $number . '"' . "\n";
$storedata .= 'MESSAGE="' . $message . '"' . "\n";
$result['number'] = $number;
$result['message'] = $message;
file_put_contents($filename, $storedata);
log_register("USMS SEND SMS `" . $number . "`");
$result = true;
}
}
return $result;
}
示例4: filterByDate
/**
* Extracts funds only with some date pattern
*
* @param array $fundsflow standard fundsflow array
* @param string $date
*
* @return array
*/
public function filterByDate($fundsflow, $date)
{
$result = array();
if (!empty($fundsflow)) {
foreach ($fundsflow as $timestamp => $flowdata) {
if (ispos($flowdata['date'], $date)) {
$result[$timestamp] = $flowdata;
}
}
}
return $result;
}
示例5: sm_MapDrawSwitches
}
}
}
}
if (wf_CheckGet(array('layers'))) {
$layers = $_GET['layers'];
//switches layer
if (ispos($layers, 'sw')) {
$placemarks .= sm_MapDrawSwitches();
}
//switches uplinks layer
if (ispos($layers, 'ul')) {
$placemarks .= sm_MapDrawSwitchUplinks();
}
//builds layer
if (ispos($layers, 'bs')) {
$placemarks .= um_MapDrawBuilds();
}
}
if (wf_CheckGet(array('mapedit', 'showmap'))) {
$editor = $custmaps->mapLocationEditor();
} else {
$editor = '';
}
show_window($custmaps->mapGetName($mapId), $custmaps->mapInit($placemarks, $editor));
}
} else {
show_error(__('This module is disabled'));
}
} else {
show_error(__('Access denied'));
示例6: reportSignup
/**
* renders users signup report
*
* @return void
*/
public function reportSignup()
{
$regdates = array();
$months = months_array();
$monthCount = array();
$showYear = wf_CheckPost(array('showyear')) ? vf($_POST['showyear'], 3) : curyear();
$showMonth = wf_CheckGet(array('month')) ? mysql_real_escape_string($_GET['month']) : curmonth();
$yearCount = 0;
if (!empty($this->users)) {
foreach ($this->users as $io => $each) {
if (!empty($each['regdate'])) {
$dateTime = explode(' ', $each['regdate']);
$regdates[$dateTime[0]][] = $each['id'];
}
}
}
// show year selector
$yearInputs = wf_YearSelector('showyear', ' ', false);
$yearInputs .= wf_Submit(__('Show'));
$yearForm = wf_Form('', 'POST', $yearInputs, 'glamour');
show_window(__('Year'), $yearForm);
//extract year signup count data
foreach ($months as $eachMonth => $monthName) {
$sigcount = 0;
if (!empty($regdates)) {
foreach ($regdates as $eachRegDate => $userIds) {
$dateMark = $showYear . '-' . $eachMonth;
if (ispos($eachRegDate, $dateMark)) {
$sigcount = $sigcount + count($regdates[$eachRegDate]);
}
$monthCount[$eachMonth] = $sigcount;
}
$yearCount = $yearCount + $sigcount;
}
}
//render per year grid
$cells = wf_TableCell('');
$cells .= wf_TableCell(__('Month'));
$cells .= wf_TableCell(__('Signups'));
$cells .= wf_TableCell(__('Visual'));
$rows = wf_TableRow($cells, 'row1');
foreach ($months as $eachMonth => $monthName) {
$cells = wf_TableCell($eachMonth);
$monthLink = wf_Link(self::URL_REPORTS_MGMT . 'reportSignup&month=' . $showYear . '-' . $eachMonth, rcms_date_localise($monthName), false);
$cells .= wf_TableCell($monthLink);
$cells .= wf_TableCell($monthCount[$eachMonth]);
$cells .= wf_TableCell(web_bar($monthCount[$eachMonth], $yearCount));
$rows .= wf_TableRow($cells, 'row3');
}
$result = wf_TableBody($rows, '100%', 0, 'sortable');
$result .= __('Total') . ': ' . $yearCount;
show_window(__('User signups by year') . ' ' . $showYear, $result);
//render per month registrations
$cells = wf_TableCell(__('ID'));
$cells .= wf_TableCell(__('Date'));
$cells .= wf_TableCell(__('Full address'));
$cells .= wf_TableCell(__('Real Name'));
$cells .= wf_TableCell(__('Tariff'));
$rows = wf_TableRow($cells, 'row1');
if (!empty($regdates)) {
foreach ($regdates as $eachRegDate => $eachRegUsers) {
if (ispos($eachRegDate, $showMonth)) {
foreach ($eachRegUsers as $ix => $eachUserId) {
$cells = wf_TableCell($eachUserId);
$cells .= wf_TableCell($this->users[$eachUserId]['regdate']);
$userLink = wf_Link(self::URL_USERS_PROFILE . $eachUserId, web_profile_icon() . ' ', false);
$cells .= wf_TableCell($userLink . $this->userGetFullAddress($eachUserId));
$cells .= wf_TableCell($this->users[$eachUserId]['realname']);
$cells .= wf_TableCell(@$this->tariffs[$this->users[$eachUserId]['tariffid']]['tariffname']);
$rows .= wf_TableRow($cells, 'row3');
}
}
}
}
$result = wf_TableBody($rows, '100%', '0', 'sortable');
if ($showMonth == curmonth()) {
$monthTitle = __('Current month user signups');
} else {
$monthTitle = __('User signups by month') . ' ' . $showMonth;
}
show_window($monthTitle, $result);
}
示例7: createSMS
/**
* Creates new SMS for queue
*
* @param string $number
* @param string $message
*
* @return string/void
*/
public function createSMS($number, $message)
{
$result = '';
$translit = wf_CheckPost(array('newsmstranslit')) ? true : false;
if (ispos($number, '+')) {
$this->sms->sendSMS($number, $message, $translit, 'TQUEUE');
} else {
$result = __('Number must be in international format');
}
return $result;
}
示例8: web_NdsPaymentsShow
/**
* Renders NDS users payments list
*
* @param string $query
* @return string
*/
function web_NdsPaymentsShow($query)
{
$alter_conf = rcms_parse_ini_file(CONFIG_PATH . 'alter.ini');
$alladrs = zb_AddressGetFulladdresslist();
$alltypes = zb_CashGetAllCashTypes();
$allapayments = simple_queryall($query);
$ndstax = $alter_conf['NDS_TAX_PERCENT'];
$allndsusers = zb_NdsGetAllUsers();
$ndspercent = zb_NdsGetPercent();
$allservicenames = zb_VservicesGetAllNamesLabeled();
$total = 0;
$ndstotal = 0;
$tablecells = wf_TableCell(__('ID'));
$tablecells .= wf_TableCell(__('IDENC'));
$tablecells .= wf_TableCell(__('Date'));
$tablecells .= wf_TableCell(__('Cash'));
$tablecells .= wf_TableCell(__('NDS'));
$tablecells .= wf_TableCell(__('Without NDS'));
$tablecells .= wf_TableCell(__('Login'));
$tablecells .= wf_TableCell(__('Full address'));
$tablecells .= wf_TableCell(__('Cash type'));
$tablecells .= wf_TableCell(__('Notes'));
$tablecells .= wf_TableCell(__('Admin'));
$tablerows = wf_TableRow($tablecells, 'row1');
if (!empty($allapayments)) {
foreach ($allapayments as $io => $eachpayment) {
if (zb_NdsCheckUser($eachpayment['login'], $allndsusers)) {
if ($alter_conf['TRANSLATE_PAYMENTS_NOTES']) {
if ($eachpayment['note'] == '') {
$eachpayment['note'] = __('Internet');
}
if (isset($allservicenames[$eachpayment['note']])) {
$eachpayment['note'] = $allservicenames[$eachpayment['note']];
}
if (ispos($eachpayment['note'], 'CARD:')) {
$cardnum = explode(':', $eachpayment['note']);
$eachpayment['note'] = __('Card') . " " . $cardnum[1];
}
if (ispos($eachpayment['note'], 'SCFEE')) {
$eachpayment['note'] = __('Credit fee');
}
if (ispos($eachpayment['note'], 'TCHANGE:')) {
$tariff = explode(':', $eachpayment['note']);
$eachpayment['note'] = __('Tariff change') . " " . $tariff[1];
}
if (ispos($eachpayment['note'], 'BANKSTA:')) {
$banksta = explode(':', $eachpayment['note']);
$eachpayment['note'] = __('Bank statement') . " " . $banksta[1];
}
}
$tablecells = wf_TableCell($eachpayment['id']);
$tablecells .= wf_TableCell(zb_NumEncode($eachpayment['id']));
$tablecells .= wf_TableCell($eachpayment['date']);
$tablecells .= wf_TableCell($eachpayment['summ']);
$paynds = zb_NdsCalc($eachpayment['summ'], $ndspercent);
$tablecells .= wf_TableCell($paynds);
$tablecells .= wf_TableCell($eachpayment['summ'] - $paynds);
$profilelink = wf_Link('?module=userprofile&username=' . $eachpayment['login'], web_profile_icon() . ' ' . $eachpayment['login'], false);
$tablecells .= wf_TableCell($profilelink);
$tablecells .= wf_TableCell(@$alladrs[$eachpayment['login']]);
$tablecells .= wf_TableCell(@__($alltypes[$eachpayment['cashtypeid']]));
$tablecells .= wf_TableCell($eachpayment['note']);
$tablecells .= wf_TableCell($eachpayment['admin']);
$tablerows .= wf_TableRow($tablecells, 'row3');
if ($eachpayment['summ'] > 0) {
$total = $total + $eachpayment['summ'];
$ndstotal = $ndstotal + $paynds;
}
}
}
}
$tablecells = wf_TableCell('');
$tablecells .= wf_TableCell('');
$tablecells .= wf_TableCell('');
$tablecells .= wf_TableCell($total);
$tablecells .= wf_TableCell($ndstotal);
$tablecells .= wf_TableCell($total - $ndstotal);
$tablecells .= wf_TableCell('');
$tablecells .= wf_TableCell('');
$tablecells .= wf_TableCell('');
$tablecells .= wf_TableCell('');
$tablecells .= wf_TableCell('');
$tablerows .= wf_TableRow($tablecells, 'row2');
$result = wf_TableBody($tablerows, '100%', '0', 'sortable');
$result .= '' . __('Total') . ': <strong>' . $total . '</strong> ' . __('ELVs for all payments of') . ': <strong>' . $ndstotal . '</strong>';
return $result;
}
示例9: renderGraphs
/**
* Renders per-payment system openpayz transaction charts
*
* @return string
*/
public function renderGraphs()
{
$psysdata = array();
$gcAllData = array();
$gcMonthData = array();
$result = wf_Link('?module=openpayz', __('Back'), true, 'ubButton');
if (!empty($this->allTransactions)) {
foreach ($this->allTransactions as $io => $each) {
$timestamp = strtotime($each['date']);
$curMonth = curmonth();
$date = date("Y-m-01", $timestamp);
if (isset($psysdata[$each['paysys']][$date]['count'])) {
$psysdata[$each['paysys']][$date]['count']++;
$psysdata[$each['paysys']][$date]['summ'] = $psysdata[$each['paysys']][$date]['summ'] + $each['summ'];
} else {
$psysdata[$each['paysys']][$date]['count'] = 1;
$psysdata[$each['paysys']][$date]['summ'] = $each['summ'];
}
//all time stats
if (isset($gcAllData[$each['paysys']])) {
$gcAllData[$each['paysys']]++;
} else {
$gcAllData[$each['paysys']] = 1;
}
//current month stats
if (ispos($date, $curMonth . '-')) {
if (isset($gcMonthData[$each['paysys']])) {
$gcMonthData[$each['paysys']]++;
} else {
$gcMonthData[$each['paysys']] = 1;
}
}
}
}
$chartOpts = "chartArea: { width: '90%', height: '90%' }, legend : {position: 'right'}, ";
if (!empty($gcAllData)) {
$gcAllPie = wf_gcharts3DPie($gcAllData, __('All time'), '400px', '400px', $chartOpts);
} else {
$gcAllPie = '';
}
if (!empty($gcMonthData)) {
$gcMonthPie = wf_gcharts3DPie($gcMonthData, __('Current month'), '400px', '400px', $chartOpts);
} else {
$gcMonthPie = '';
}
$gcells = wf_TableCell($gcAllPie);
$gcells .= wf_TableCell($gcMonthPie);
$grows = wf_TableRow($gcells);
$result .= wf_TableBody($grows, '100%', 0, '');
if (!empty($psysdata)) {
foreach ($psysdata as $psys => $opdate) {
$gdata = __('Date') . ',' . __('Count') . ',' . __('Cash') . "\n";
foreach ($opdate as $datestamp => $optrans) {
$gdata .= $datestamp . ',' . $optrans['count'] . ',' . $optrans['summ'] . "\n";
}
$result .= wf_tag('div', false, '', '');
$result .= wf_tag('h2') . $psys . wf_tag('h2', true) . wf_delimiter();
$result .= wf_Graph($gdata, '800', '200', false);
$result .= wf_tag('div', true);
}
}
return $result;
}
示例10: zb_UserGetStargazerData
$sudo_path = $config['SUDO'];
$userdata = zb_UserGetStargazerData($login);
$user_ip = $userdata['IP'];
$command = $sudo_path . ' ' . $arping_path . ' ' . $arping_iface . ' ' . $arping_options . ' ' . $user_ip;
$raw_result = shell_exec($command);
if (wf_CheckGet(array('ajax'))) {
die($raw_result);
}
$ping_result = wf_AjaxLoader();
$ping_result .= wf_AjaxLink('?module=pl_arping&username=' . $login . '&ajax=true', __('Renew'), 'ajaxarping', true, 'ubButton');
$ping_result .= wf_tag('pre', false, '', 'id="ajaxarping"') . $raw_result . wf_tag('pre', true);
//detecting duplicate MAC
$rawArray = explodeRows($raw_result);
if (!empty($rawArray)) {
foreach ($rawArray as $io => $eachline) {
if (ispos($eachline, 'packets transmitted')) {
$parseMe = $eachline;
}
}
}
if (!empty($parseMe)) {
$parseMe = explode(',', $parseMe);
if (sizeof($parseMe) == 3) {
$txCount = vf($parseMe[0], 3);
$rxCount = vf($parseMe[1], 3);
if ($rxCount > $txCount) {
$cloneFlag = true;
}
}
}
if ($cloneFlag) {
示例11: ts_SendSMS
/**
* Stores SMS for some employee for further sending with senddog run
*
* @param int $employeeid
* @param string $message
* @return array
* @throws Exception
*/
function ts_SendSMS($employeeid, $message)
{
$query = "SELECT `mobile`,`name` from `employee` WHERE `id`='" . $employeeid . "'";
$empData = simple_query($query);
$mobile = $empData['mobile'];
$result = array();
$sms = new UbillingSMS();
if (!empty($mobile)) {
if (ispos($mobile, '+')) {
$sms->sendSMS($mobile, $message, true, 'TASKMAN');
$result['number'] = $mobile;
$result['message'] = $message;
} else {
throw new Exception('BAD_MOBILE_FORMAT ' . $mobile);
}
}
return $result;
}
示例12: onuSignalHistory
/**
* Renders ONU signal history chart
*
* @param int $onuId
* @return string
*/
protected function onuSignalHistory($onuId)
{
$onuId = vf($onuId, 3);
$result = '';
if (isset($this->allOnu[$onuId])) {
//not empty MAC
if ($this->allOnu[$onuId]['mac']) {
if (file_exists(self::ONUSIG_PATH . md5($this->allOnu[$onuId]['mac']))) {
$historyKey = self::ONUSIG_PATH . md5($this->allOnu[$onuId]['mac']);
} elseif (file_exists(self::ONUSIG_PATH . md5($this->allOnu[$onuId]['serial']))) {
$historyKey = self::ONUSIG_PATH . md5($this->allOnu[$onuId]['serial']);
} else {
$historyKey = '';
}
if (!empty($historyKey)) {
$rawData = file_get_contents($historyKey);
$result .= wf_delimiter();
$result .= wf_tag('h2') . __('ONU signal history') . wf_tag('h2', true);
//current day signal levels
$todaySignal = '';
$curdate = curdate();
if (!empty($rawData)) {
$todayTmp = explodeRows($rawData);
if (!empty($todayTmp)) {
foreach ($todayTmp as $io => $each) {
if (ispos($each, $curdate)) {
$todaySignal .= $each . "\n";
}
}
}
}
$result .= __('Today');
$result .= wf_tag('div', false, '', '');
$result .= wf_Graph($todaySignal, '800', '300', false);
$result .= wf_tag('div', true);
$result .= wf_tag('br');
//current month signal levels
$monthSignal = '';
$curmonth = curmonth();
if (!empty($rawData)) {
$monthTmp = explodeRows($rawData);
if (!empty($monthTmp)) {
foreach ($monthTmp as $io => $each) {
if (ispos($each, $curmonth)) {
$monthSignal .= $each . "\n";
}
}
}
}
$result .= __('Month');
$result .= wf_tag('div', false, '', '');
$result .= wf_Graph($monthSignal, '800', '300', false);
$result .= wf_tag('div', true);
$result .= wf_tag('br');
//all time signal history
$result .= __('All time');
$result .= wf_tag('div', false, '', '');
$result .= wf_GraphCSV($historyKey, '800', '300', false);
$result .= wf_tag('div', true);
}
}
}
return $result;
}
示例13: vf
// Конец поиска
// Ловим сообщения о совершенных платежах в виде:
// ?action=bill_input&bill_identifier=2887647236&summ=10&pkey=aaa444455656&date=2012-04-02T18:20:15
if (isset($_GET['action'])) {
if ($_GET['action'] == 'bill_input') {
$customerid = vf($_GET['bill_identifier'], 3);
//если все нормально регистрируем новую транзакцию
if (!empty($customerid)) {
$summ = $_GET['sum'];
$hash = $_GET['pkey'];
$ophash = 'PB' . $_GET['pkey'];
$date = date("Y-M-d H:i:s");
//точно ли уникальный хеш?
if (pb_IsHashUnique($ophash)) {
//не нулевая ли сумма
if ($summ > 1 and !ispos($summ, ',')) {
op_TransactionAdd($ophash, $summ, $customerid, 'PBANK', $date);
op_ProcessHandlers();
$transaction_ok = '
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ResponseExtInputPay>
<extInputPay>
<inner_ref>' . $hash . '</inner_ref>
</extInputPay>
</ResponseExtInputPay>
';
print $transaction_ok;
} else {
$sum_fail = '
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ResponseExtInputPay>
示例14: zb_AsteriskParseCDR
function zb_AsteriskParseCDR($data)
{
global $altcfg;
$normalData = $data;
if (!empty($normalData)) {
$totalTime = 0;
$callsCounter = 0;
$cells = wf_TableCell('#');
$cells .= wf_TableCell(__('Time'));
$cells .= wf_TableCell(__('From'));
$cells .= wf_TableCell(__('To'));
$cells .= wf_TableCell(__('Type'));
$cells .= wf_TableCell(__('Status'));
$cells .= wf_TableCell(__('Talk time'));
$rows = wf_TableRow($cells, 'row1');
foreach ($normalData as $io => $each) {
$callsCounter++;
$debugData = wf_tag('pre') . print_r($each, true) . wf_tag('pre', true);
$startTime = explode(' ', $each['calldate']);
@($startTime = $startTime[1]);
$tmpTime = strtotime($each['calldate']);
$endTime = $tmpTime + $each['duration'];
$endTime = date("H:i:s", $endTime);
$answerTime = $tmpTime + ($each['duration'] - $each['billsec']);
$answerTime = date("H:i:s", $answerTime);
$tmpStats = __('Taken up the phone') . ': ' . $answerTime . "\n";
$tmpStats .= __('End of call') . ': ' . $endTime;
$sessionTimeStats = wf_tag('abbr', false, '', 'title="' . $tmpStats . '"');
$sessionTimeStats .= $startTime;
$sessionTimeStats .= wf_tag('abbr', true);
$callDirection = '';
$cells = wf_TableCell(wf_modal($callsCounter, $callsCounter, $debugData, '', '500', '600'), '', '', 'sorttable_customkey="' . $callsCounter . '"');
$cells .= wf_TableCell($sessionTimeStats, '', '', 'sorttable_customkey="' . $tmpTime . '"');
$cells .= wf_TableCell(zb_AsteriskGetNumAlias($each['src']));
$cells .= wf_TableCell(zb_AsteriskGetNumAlias($each['dst']));
$CallType = __('Dial');
if (ispos($each['lastapp'], 'internal-caller-transfer')) {
$CallType = __('Call transfer');
}
$cells .= wf_TableCell($CallType);
$callStatus = $each['disposition'];
$statusIcon = '';
if (ispos($each['disposition'], 'ANSWERED')) {
$callStatus = __('Answered');
$statusIcon = wf_img('skins/calls/phone_green.png');
}
if (ispos($each['disposition'], 'NO ANSWER')) {
$callStatus = __('No answer');
$statusIcon = wf_img('skins/calls/phone_red.png');
}
if (ispos($each['disposition'], 'BUSY')) {
$callStatus = __('Busy');
$statusIcon = wf_img('skins/calls/phone_yellow.png');
}
if (ispos($each['disposition'], 'FAILED')) {
$callStatus = __('Failed');
$statusIcon = wf_img('skins/calls/phone_fail.png');
}
$cells .= wf_TableCell($statusIcon . ' ' . $callStatus);
$speekTime = $each['billsec'];
$totalTime = $totalTime + $each['billsec'];
$speekTime = zb_AsteriskFormatTime($speekTime);
$cells .= wf_TableCell($speekTime, '', '', 'sorttable_customkey="' . $each['billsec'] . '"');
$rows .= wf_TableRow($cells, 'row3');
}
$result = wf_TableBody($rows, '100%', '0', 'sortable');
$result .= __('Time spent on calls') . ': ' . zb_AsteriskFormatTime($totalTime) . wf_tag('br');
$result .= __('Total calls') . ': ' . $callsCounter;
show_window('', $result);
}
}
示例15: str_replace
$table = "bd_rx_log";
$interval = 3024000;
$ip = str_replace('-3-R.png', '', $ip);
}
if (ispos($ip, '-3-S')) {
$table = "bd_tx_log";
$interval = 3024000;
$ip = str_replace('-3-S.png', '', $ip);
}
//yearly
if (ispos($ip, '-4-R')) {
$table = "bd_rx_log";
$interval = 34560000;
$ip = str_replace('-4-R.png', '', $ip);
}
if (ispos($ip, '-4-S')) {
$table = "bd_tx_log";
$interval = 34560000;
$ip = str_replace('-4-S.png', '', $ip);
}
if (isset($_GET['timestamp'])) {
$timestamp = $_GET['timestamp'];
} else {
$timestamp = time() - $interval + 0.05 * $interval;
}
$total = array();
$icmp = array();
$udp = array();
$tcp = array();
$ftp = array();
$http = array();