• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP values函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中values函数的典型用法代码示例。如果您正苦于以下问题:PHP values函数的具体用法?PHP values怎么用?PHP values使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



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

示例1: test

 function test()
 {
     $input = [3 => 1, 1 => 3, 2 => 2];
     $expect = [1, 3, 2];
     $actual = iterator_to_array(values($input), false);
     $this->assertEquals($expect, $actual);
 }
开发者ID:morrisonlevi,项目名称:algorithm,代码行数:7,代码来源:ValuesTest.php


示例2: debugging_values

function debugging_values($query, $db = 1, $enc = 0)
{
    global $debug;
    if ($debug) {
        file_put_contents('softphone_debugging.htm', Date("H:i:s") . ": " . $query . "<br><br>", FILE_APPEND | LOCK_EX);
    }
    return values($query, $db, $enc);
}
开发者ID:kipkaev55,项目名称:asterisk,代码行数:8,代码来源:get_adressbook.php


示例3: update

function update($table = NULL)
{
    if (!$table) {
        $table = $GLOBALS['table'];
    }
    $id = format_int($_REQUEST['id']);
    db_update($table, fields($table), values($table), "where id={$id}");
}
开发者ID:JoshuaGrams,项目名称:wfpl,代码行数:8,代码来源:form.php


示例4: difference

function difference()
{
    $collections = func_get_args();
    $union = union($collections);
    $intersection = intersection($collections);
    $difference = without($union, $intersection);
    $difference = values($difference);
    // Re-indexes array
    return $difference;
}
开发者ID:mpetrovich,项目名称:dash,代码行数:10,代码来源:difference.php


示例5: get_today_stats2

function get_today_stats2($current_queue = '%', $operator_restr = '')
{
    global $conf_cdr_db, $conf_realtime_db;
    if ($operator_restr == '') {
        $agent_need = '%';
    } else {
        $agent_need = mysql_escape_string($operator_restr);
    }
    $calls_c = values("SELECT COUNT(*) AS c, SUM(callduration) AS timesum, AVG(callduration) AS timeavg FROM " . $conf_realtime_db . ".call_status WHERE timestamp BETWEEN '" . Date("Y-m-d") . " 00:00:00' AND '" . Date("Y-m-d") . " 23:59:59' AND queue LIKE '" . $current_queue . "' AND agent LIKE '" . $agent_need . "'");
    $calls_num = $calls_c[0]['c'];
    $input_calls_time = format_time(round($calls_c[0]['timesum']), 1);
    if ($operator_restr != '') {
        $out_calls = values("SELECT COUNT(*) AS c FROM `cdr` WHERE src='" . $agent_need . "' AND calldate BETWEEN '" . Date("Y-m-d") . " 00:00:00' AND '" . Date("Y-m-d") . " 23:59:59'");
    }
    $pick = values("SELECT COUNT(*) AS c FROM " . $conf_realtime_db . ".call_status WHERE timestamp BETWEEN '" . Date("Y-m-d") . " 00:00:00' AND '" . Date("Y-m-d") . " 23:59:59' AND queue LIKE '" . $current_queue . "' AND agent LIKE '" . $agent_need . "' AND (status='COMPLETEAGENT' OR status='COMPLETECALLER' OR status='CONNECT')");
    $taken_calls = $pick[0]['c'];
    if ($calls_num != 0) {
        $taken_calls_perc = round(100 * $taken_calls / $calls_num) . '%';
    } else {
        $taken_calls_perc = '---';
    }
    $avgvoicecalls_c = values("SELECT AVG(callduration) AS timeavg FROM `" . $conf_realtime_db . "`.`call_status` WHERE `queue` LIKE '" . $current_queue . "' AND `callduration`>0 AND `timestamp` BETWEEN '" . Date("Y-m-d") . " 00:00:00' AND '" . Date("Y-m-d") . " 23:59:59' AND agent LIKE '" . $agent_need . "'");
    $avg_call_time = round($avgvoicecalls_c[0]['timeavg']) . ' с';
    if ($avg_call_time == 0) {
        $avg_call_time = '---';
    }
    $scalls20_c = values("SELECT COUNT(*) AS c FROM `" . $conf_realtime_db . "`.`call_status` WHERE `queue` LIKE '" . $current_queue . "' AND holdtime<=20 AND `timestamp` BETWEEN '" . Date("Y-m-d") . " 00:00:00' AND '" . Date("Y-m-d") . " 23:59:59' AND agent LIKE '" . $agent_need . "'");
    if ($calls_c[0]['c'] != 0) {
        $service_level = round($scalls20_c[0]['c'] / $calls_c[0]['c'] * 100) . '%';
    } else {
        $service_level = '---';
    }
    $maxacalls_c = values("SELECT MAX(holdtime) AS maxhold FROM `" . $conf_realtime_db . "`.`call_status` WHERE `queue` LIKE '" . $current_queue . "' AND `timestamp` BETWEEN '" . Date("Y-m-d") . " 00:00:00' AND '" . Date("Y-m-d") . " 23:59:59' AND agent LIKE '" . $agent_need . "' AND status!='TRANSFER'");
    if (count($maxacalls_c) == 0 or $maxacalls_c[0]['maxhold'] == 0) {
        $max_await = '---';
    } else {
        $max_await = $maxacalls_c[0]['maxhold'] . ' с';
    }
    if ($operator_restr == '') {
        return '
	<table border=0>
	<tr><td>' . __('Принято') . ':</td><td>' . $taken_calls . '</td></tr>
	<tr><td>' . __('Обслужено') . ':</td><td>' . $taken_calls_perc . '</td></tr>
	<tr><td>' . __('Время') . ':</td><td>' . $input_calls_time . '</td></tr>
	<tr><td>' . __('Среднее') . ':</td><td>' . $avg_call_time . '</td></tr>
	<tr><td>Service lvl:</td><td>' . $service_level . '</td></tr>
	</table>';
    } else {
        return '<span title="' . __('Количество принятых звонков за сегодня') . '">' . __('Принял') . ':</span> ' . $taken_calls . '<br>
<span title="' . __('Количество сделаных звонков за сегодня') . '">' . __('Исходящих') . ':</span>' . $out_calls[0]['c'] . '<br>
<span title="' . __('Общее время разговоров за сегодня') . '">' . __('Время') . ':</span> ' . $input_calls_time . '<br>
<span title="' . __('Среднее время разговора за сегодня') . '">' . __('Среднее') . ':</span> ' . $avg_call_time;
    }
}
开发者ID:kipkaev55,项目名称:asterisk,代码行数:54,代码来源:operators_status.php


示例6: testValues

 public function testValues()
 {
     $expectedValuesFirstViewSuccessful = array(1 => 100, 3 => 300);
     $expectedValuesFirstViewAll = array(1 => 100, 2 => 200, 3 => 300);
     $expectedValuesRepeatViewSuccessful = array(2 => 300);
     $expectedValuesRepeatViewAll = array(1 => 200, 2 => 300);
     $this->assertEquals($expectedValuesFirstViewSuccessful, values($this->pageData, 0, 'TTFB', true));
     $this->assertEquals($expectedValuesFirstViewAll, values($this->pageData, 0, 'TTFB', false));
     $this->assertEquals($expectedValuesRepeatViewSuccessful, values($this->pageData, 1, 'TTFB', true));
     $this->assertEquals($expectedValuesRepeatViewAll, values($this->pageData, 1, 'TTFB', false));
 }
开发者ID:lucasRolff,项目名称:webpagetest,代码行数:11,代码来源:pageDataTest.php


示例7: intersection

function intersection($collections)
{
    if (func_num_args() > 1) {
        $collections = func_get_args();
    }
    $intersection = array_shift($collections);
    foreach ($collections as $collection) {
        foreach ($intersection as $key => $value) {
            if (!contains($collection, $value)) {
                // @todo Test whether unset() works with all Traversable
                unset($intersection[$key]);
            }
        }
    }
    $intersection = values($intersection);
    // Re-indexes due to unset() holes
    return $intersection;
}
开发者ID:mpetrovich,项目名称:dash,代码行数:18,代码来源:intersection.php


示例8: autoload

 /**
  * 自动加载
  * @param ClassName 类名
  * @author Colin <[email protected]>
  */
 public static function autoload($ClassName)
 {
     $getModule = values('get', Config('DEFAULT_MODULE_VAR'));
     $getModule = $getModule ? $getModule : Config('DEFAULT_MODULE');
     //处理模块文件载入
     $module = defined('MODULE_NAME') ? MODULE_NAME : $getModule;
     //处理多模块文件载入问题
     $extra_module = Config('EXTRA_MODULE');
     array_push($extra_module, $module);
     $extra_module = array_unique($extra_module);
     foreach ($extra_module as $key => $value) {
         if (preg_match("/{$value}/", $ClassName)) {
             $ClassName = preg_replace("/{$value}/", ltrim(APP_NAME, './') . '\\' . $value, $ClassName);
         }
     }
     if (preg_match("/\\\\/", $ClassName)) {
         //是否为命名空间加载
         $ClassName = preg_replace("/\\\\/", "/", $ClassName);
         require_file(ROOT_PATH . $ClassName . '.class.php');
     }
 }
开发者ID:a1586256143,项目名称:MyClassPHP,代码行数:26,代码来源:MyClass.php


示例9: median

function median($collection)
{
    $size = size($collection);
    if ($size === 0) {
        $median = null;
    } else {
        $sorted = values(sort($collection));
        if ($size % 2 === 0) {
            // For an even number of values,
            // the median is the average of the middle two values
            $start = $size / 2 - 1;
            $end = $start + 1;
            $median = average(array(at($sorted, $start), at($sorted, $end)));
        } else {
            // For an odd number of values,
            // the median is the middle value
            $index = floor($size / 2);
            $median = at($sorted, $index);
        }
    }
    return $median;
}
开发者ID:mpetrovich,项目名称:dash,代码行数:22,代码来源:median.php


示例10: AND

         $client_select .= " OR cdr.src LIKE '" . $add_perc . $aClient[0][$aColumns[$i]] . "' OR cdr.dst LIKE '" . $add_perc . $aClient[0][$aColumns[$i]] . "'";
     }
 }
 if ($client_select != '') {
     $client_select = ' AND (' . substr($client_select, 4) . ')';
 }
 if ($client_select == '') {
     $client_select = " AND cdr.src LIKE 'no'";
 }
 $where_query = "WHERE 1" . $client_select;
 //echo "SELECT calldate, userfield, src, dst AS dest, duration, uniqueid, randdata, disposition, comment, operator FROM `asteriskcdrdb`.`cdr` cdr LEFT JOIN `hilti`.`calls_ver3` calls ON cdr.uniqueid=calls.unique_id
 //WHERE 1".$client_select." ORDER BY calldate DESC LIMIT ".($page2-1)*$perpage2.", ".$perpage2."<br>";
 //exit;
 values("SET SQL_BIG_SELECTS=1");
 $result_set = values("SELECT calldate, userfield, src, dst AS dest, duration, uniqueid, randdata, disposition, comment, operator FROM `asteriskcdrdb`.`cdr` cdr\nWHERE 1" . $client_select . " ORDER BY calldate DESC LIMIT " . ($page2 - 1) * $perpage2 . ", " . $perpage2);
 $duration_select = values("SELECT COUNT(*) AS c, SUM(duration) AS dur FROM `asteriskcdrdb`.`cdr` cdr WHERE 1" . $client_select);
 $dur_sec = $duration_select[0]['dur'];
 $cal_num = $duration_select[0]['c'];
 $dur_h = floor($dur_sec / 3600);
 $dur_m = floor(($dur_sec - $dur_h * 3600) / 60);
 $dur_s = $dur_sec - $dur_m * 60 - $dur_h * 3600;
 if ($dur_s < 10) {
     $dur_s = '0' . $dur_s;
 }
 if ($dur_m < 10) {
     $dur_m = '0' . $dur_m;
 }
 $rusult_num = count($result_set);
 if ($rusult_num > 0) {
     $pstring2 = '';
     $pages2 = ceil($cal_num / $perpage2);
开发者ID:kipkaev55,项目名称:asterisk,代码行数:31,代码来源:adressbook.php


示例11: LENGTH

    if ($fromstatsmonth < 10) {
        $fromstatsmonth = '0' . $fromstatsmonth;
    }
    if ($tostatsday < 10) {
        $tostatsday = '0' . $tostatsday;
    }
    if ($tostatsmonth < 10) {
        $tostatsmonth = '0' . $tostatsmonth;
    }
    $from = $fromstatsyear . '-' . $fromstatsmonth . '-' . $fromstatsday . ' 00:00:01';
    $to = $tostatsyear . '-' . $tostatsmonth . '-' . $tostatsday . ' 23:59:59';
    $direction_restr = " AND dcontext LIKE '%_out'";
    $status_restr = " AND disposition = 'ANSWERED' AND dcontext NOT LIKE '%noans%' AND dstchannel!=''";
    $where_query = "WHERE calldate BETWEEN '" . $from . "' AND '" . $to . "' AND LENGTH(dst)>7" . $direction_restr . $status_restr;
    $cdr_query = "SELECT SUBSTRING(dst FROM -9 FOR 2) AS dt, COUNT(*) AS c, SUM(billsec) AS bs FROM asteriskcdrdb.cdr\n\t" . $where_query . " GROUP BY dt ORDER BY dt";
    $result_set = values($cdr_query);
    echo '<!-- Тестирование системы: ' . $cdr_query . ' -->';
    if (count($result_set) > 0) {
        ?>
	<center>
	<h3>Исходящие вызовы:</h3>
<TABLE border=0 cellPadding=0 cellSpacing=0 width="60%">
<TBODY>
                <TR bgColor=#F0F0F0>
                  <TD width="7%" align=middle class="tableBody" style="PADDING-BOTTOM: 2px; PADDING-LEFT: 2px; PADDING-RIGHT: 2px; PADDING-TOP: 2px">
                    <center><strong><font color="Black">Код</font></strong></center></TD>
                  <TD width="12%" align=middle class="tableBody" style="PADDING-BOTTOM: 2px; PADDING-LEFT: 2px; PADDING-RIGHT: 2px; PADDING-TOP: 2px">
                    <center><strong><font color="Black">Оператор</font></strong></center></TD>
                  <TD width="10%" align=middle class="tableBody" style="PADDING-BOTTOM: 2px; PADDING-LEFT: 2px; PADDING-RIGHT: 2px; PADDING-TOP: 2px">
                    <center><strong><font color="Black">Звонков</font></strong></center></TD>
                  <TD width="10%" align=middle class="tableBody" style="PADDING-BOTTOM: 2px; PADDING-LEFT: 2px; PADDING-RIGHT: 2px; PADDING-TOP: 2px">
开发者ID:kipkaev55,项目名称:asterisk,代码行数:31,代码来源:gsm_billing.php


示例12: value

function value($name)
{
    $values = values();
    return isset($values[$name]) ? $values[$name] : null;
}
开发者ID:mrjovanovic,项目名称:miniflux,代码行数:5,代码来源:Request.php


示例13: values

            //сюда вписать абонента, если он есть
            $choose_src_abonents = values("SELECT phone_number, abonent FROM " . $conf_statistic_db . ".addressbook WHERE phone_number = \"" . $find_param[0] . "\"");
            $choose_dest_abonents = values("SELECT phone_number, abonent FROM " . $conf_statistic_db . ".addressbook WHERE phone_number = \"" . $find_param[1] . "\"");
            $abonents = [];
            if (count($choose_src_abonents) > 0) {
                $abonents[0] = "" . $choose_src_abonents[0][1] . "<br>";
            } else {
                $abonents[0] = "";
            }
            if (count($choose_dest_abonents) > 0) {
                $abonents[1] = "" . $choose_dest_abonents[0][1] . "<br>";
            } else {
                $abonents[1] = "";
            }
            $sqlStatus = "SELECT id, status FROM " . $conf_cdr_db . ".catalog_status WHERE id = " . $result_set[$i]['status'] . "";
            $choose_status = values($sqlStatus);
            if (count($choose_status) == 0) {
                $result_set[$i]['status'] = 0;
            }
            echo '               		 <TR bgcolor="' . $status_color . '"  onMouseOver="bgColor=\'#C4FFD7\'" onMouseOut="bgColor=\'' . $status_color . '\'" onMouseClick="bgColor=\'#C4FFD7\'">
						<TD vAlign=top align="" class=tableBody>' . (($page - 1) * $perpage + $i + 1) . '.&nbsp;</TD>
						<TD vAlign=top align="" class=tableBody>' . $direct_icon . '</TD>

						                 		 <TD vAlign=top align="center" class=tableBody>' . $result_set[$i]['calldate'] . '</TD>
						                 		 <TD vAlign=top align="right" class=tableBody>' . $abonents[0] . " " . $result_set[$i]['src'] . '</TD>
						                 		 <TD vAlign=top align="right" class=tableBody>' . $abonents[1] . " " . $result_set[$i]['dst'] . '</TD>';
            if ($show_name) {
                echo '    		                 		 <TD vAlign=top align="center" class=tableBody>' . $out_name . '</TD>
        <TD vAlign=top align="center" class=tableBody>' . $out_name2 . '</TD>';
            }
            echo '    		                 		 <TD vAlign=top align="center" class=tableBody>' . $result_set[$i]['disposition'] . '</TD>
开发者ID:kipkaev55,项目名称:asterisk,代码行数:31,代码来源:statistic.php


示例14: substr

     $short_src = substr($result_set[$i]['src'], 1);
 } else {
     $short_src = $result_set[$i]['src'];
 }
 $sel_name = values("SELECT name, contact FROM hilti.clients_ver1 WHERE phone1='" . $short_src . "' OR phone2='" . $short_src . "' OR phone3='" . $short_src . "' OR fax='" . $short_src . "' OR main_number='" . $short_src . "'");
 if (count($sel_name) > 0) {
     $out_name = $sel_name[0]["name"] . " " . $sel_name[0]["contact"];
 } else {
     $out_name = '';
 }
 if (strpos(' ' . $result_set[$i]['dst'], '0') == 1) {
     $short_dst = substr($result_set[$i]['dst'], 1);
 } else {
     $short_dst = $result_set[$i]['dst'];
 }
 $sel_name2 = values("SELECT name, contact FROM hilti.clients_ver1 WHERE phone1='" . $short_dst . "' OR phone2='" . $short_dst . "' OR phone3='" . $short_dst . "' OR fax='" . $short_dst . "' OR main_number='" . $short_dst . "'");
 if (count($sel_name2) > 0) {
     $out_name2 = $sel_name2[0]["name"] . " " . $sel_name2[0]["contact"];
 } else {
     $out_name2 = '';
 }
 $status_color = '#F2F8FF';
 if ($result_set[$i]['disposition'] == "NO ANSWER") {
     $result_set[$i]['disposition'] = "Нет ответа";
 } elseif ($result_set[$i]['disposition'] == "ANSWERED") {
     $result_set[$i]['disposition'] = "Принят";
 } elseif ($result_set[$i]['disposition'] == "BUSY") {
     $result_set[$i]['disposition'] = "Занято";
 } elseif ($result_set[$i]['disposition'] == "FAILED") {
     $result_set[$i]['disposition'] = "Ошибка";
 }
开发者ID:kipkaev55,项目名称:asterisk,代码行数:31,代码来源:export_csv_old.php


示例15: list

// GET FILTERS AND THEM RESULT
list($from, $to) = prepare_dates($fromstatsday, $fromstatsmonth, $fromstatsyear, $tostatsday, $tostatsmonth, $tostatsyear);
if (isset($posted)) {
    if (isset($callerid)) {
        $query_clid = " AND cdr.src LIKE '%" . $callerid . "%'";
    } else {
        $query_clid = "";
    }
    if (isset($clientname)) {
        $query_clname = " AND (cl.name LIKE '%" . $clientname . "%' OR cl.contact LIKE '%" . $clientname . "%' OR cl.client_code LIKE '%" . $clientname . "%')";
    } else {
        $query_clname = "";
    }
    $where_query = "WHERE calls.call_date BETWEEN '" . $from . "' AND '" . $to . "'" . $add_sipusr . $query_clid . $query_clname . " AND lastapp != 'Transferred Call' ORDER BY calls.call_date DESC";
    $result_set = values("SELECT cl.id AS clid, cl.name AS clname, cl.contact AS clcontact, cl.ttk AS ttk, calls.call_date, calldate, userfield, src, dst AS dest, duration, uniqueid, randdata, disposition, comment, operator FROM " . $conf_statistic_db . ".`calls_ver3` calls LEFT JOIN " . $conf_cdr_db . ".`cdr` cdr ON cdr.uniqueid=calls.unique_id LEFT JOIN " . $conf_statistic_db . ".`clients_ver3` cl  ON cl.id=calls.client_id " . $where_query . " LIMIT " . ($page - 1) * $perpage . ", " . $perpage);
    $duration_select = values("SELECT COUNT(*) AS c, SUM(duration) AS dur FROM " . $conf_statistic_db . ".calls_ver3 calls LEFT JOIN " . $conf_cdr_db . ".`cdr` cdr ON cdr.uniqueid=calls.unique_id LEFT JOIN " . $conf_statistic_db . ".`clients_ver3` cl  ON cl.id=calls.client_id " . $where_query);
    $dur_sec = @$duration_select[0]['dur'];
    $cal_num = @$duration_select[0]['c'];
    $rusult_num = count($result_set);
    if ($rusult_num > 0) {
        $pstring = '';
        $pages = ceil($cal_num / $perpage);
        for ($i = 0; $i < $pages; $i++) {
            if ($i + 1 == $page) {
                $pstring .= '<b>[' . ($i + 1) . ']</b> ';
            } else {
                $pstring .= '<a href="index.php?page=' . ($i + 1) . '">' . ($i + 1) . '</a> ';
            }
        }
        ?>
	<center>
开发者ID:kipkaev55,项目名称:asterisk,代码行数:31,代码来源:clients_calls.php


示例16: set_time_limit

#!/usr/bin/php -q
<?php 
set_time_limit(30);
require_once 'phpagi.php';
require_once 'db_work.php';
$agi = new AGI();
$agi->answer();
$callerid = $agi->get_variable("CALLERID(name)");
$incoming_num = mysql_escape_string($callerid['data']);
$incoming_num = substr(preg_replace("/[^0-9]/", "", $incoming_num), -9);
$agi->exec('NoOp', 'CONTEXT:' . $incoming_num);
$client = values("SELECT lastdata FROM asteriskcdrdb.`cdr` WHERE (src LIKE '%" . $incoming_num . "' OR srcplus LIKE '%" . $incoming_num . "') AND calldate > '" . date("Y-m-d H:i:s", time() - 604800) . "' AND dcontext='work' AND dstchannel!='' AND lastapp='Dial' AND disposition='ANSWERED' ORDER BY calldate DESC LIMIT 1");
if (count($client) > 0 and strlen($incoming_num) > 6) {
    $arr = explode(',', $client[0]["lastdata"]);
    $agi->exec('Dial', $arr[0] . ',10,r');
    $ds = $agi->get_variable("DIALSTATUS");
    if ($ds['data'] == "ANSWER") {
        $agi->hangup();
    }
    $agi->exec('NoOp', 'GOTO:' . $arr[0]);
}
开发者ID:kipkaev55,项目名称:asterisk,代码行数:21,代码来源:es_feedback.php


示例17: set_time_limit

#!/usr/bin/php -q
<?php 
set_time_limit(30);
$callerid = $argv[1];
require_once 'phpagi.php';
require_once 'db_work.php';
$agi = new AGI();
//$phone = preg_replace("/[^0-9]/", "", $callerid['data']);
$phone = substr($callerid, -9);
$agi->exec('NoOP', $phone);
if (strlen($phone) == 9) {
    $agi->exec('NoOP', '11111' . $phone);
    $op = values("SELECT dstchannel FROM `cdr` WHERE src LIKE '%" . $phone . "' AND dcontext = 'phones_incom' AND dstchannel!='' ORDER BY calldate DESC LIMIT 1");
    $agi->exec('NoOP', '22222-Count' . count($op));
    if (count($op) < 1) {
        //$agi->exec('NoOP','3333'.$op[0]["dstchannel"]);
        //header ('Content-type: text/html; charset=utf-8');
        $client = new SoapClient('http://turbosms.in.ua/api/wsdl.html');
        //$agi->exec('NoOP','444');
        $auth = array('login' => 'oyv1979', 'password' => 'Av1979');
        //$agi->exec('NoOP','555');
        $result = $client->Auth($auth);
        //$agi->exec('NoOP','666');
        $text = 'Krainashin.com - любые шины и диски. Бесплатная линия 0(800)300-305';
        $sms = array('sender' => 'KRAINASHIN', 'destination' => '+380' . $phone, 'text' => $text);
        $agi->exec('NoOP', '777');
        //$result = $client->SendSMS ($sms);
        $agi->exec('NoOP', $result);
    }
}
?>
开发者ID:kipkaev55,项目名称:asterisk,代码行数:31,代码来源:soap_sms.php


示例18: round

    if ($avgholdtime_c[0]['avghold'] != NULL) {
        $vals[$i][12] = round($avgholdtime_c[0]['avghold']) . ' с';
    } else {
        $vals[$i][12] = '---';
    }
    $count_per_date_c = values("SELECT DATE_FORMAT(timestamp, '%Y-%m-%d') AS dt, COUNT(*) AS c FROM `asteriskrealtime`.`call_status` WHERE `queue` LIKE '" . $queue . "%' AND `timestamp` BETWEEN " . $period[$i] . "" . str_replace("calldate", "timestamp", $time[$i]) . " AND agent LIKE '" . $agent_need . "' GROUP BY dt");
    $all_calls = 0;
    for ($z = 0; $z < count($count_per_date_c); $z++) {
        $all_calls += $count_per_date_c[$z]['c'];
    }
    if (count($count_per_date_c) != 0) {
        $vals[$i][13] = round($all_calls / count($count_per_date_c));
    } else {
        $vals[$i][13] = '---';
    }
    $max_count_per_h_c = values("SELECT DATE_FORMAT(timestamp, '%Y-%m-%d-%H') AS dt, COUNT(*) AS c FROM `asteriskrealtime`.`call_status` WHERE `queue` LIKE '" . $queue . "%' AND `timestamp` BETWEEN " . $period[$i] . "" . str_replace("calldate", "timestamp", $time[$i]) . " AND agent LIKE '" . $agent_need . "' GROUP BY dt ORDER BY c DESC LIMIT 1");
    if (count($max_count_per_h_c) > 0) {
        $vals[$i][14] = $max_count_per_h_c[0]['c'];
    } else {
        $vals[$i][14] = '---';
    }
}
echo '
<center><h2>' . __('Параметры работы Call-центра') . '</h2><br>
<TABLE border=0 cellPadding=3 cellSpacing=0 width="900">
<TBODY>
                <TR bgColor=#F0F0F0>
                  <TD width="35%" align=middle class="tableBody" style="PADDING-BOTTOM: 2px; PADDING-LEFT: 2px; PADDING-RIGHT: 2px; PADDING-TOP: 2px">
                    <center><strong>&nbsp;</strong></center></TD>
                  <TD width="13%" align=middle class="tableBody" style="PADDING-BOTTOM: 2px; PADDING-LEFT: 2px; PADDING-RIGHT: 2px; PADDING-TOP: 2px">
                    <center><strong>' . __('Сегодня') . '</strong></center></TD>
开发者ID:kipkaev55,项目名称:asterisk,代码行数:31,代码来源:callcenter.php


示例19: InsertChart

/**
 * InsertChart adds a chart for the given $metric, with the given $label, to
 * global $chartData, and outputs the HTML container elements for the chart.
 *
 * @param string $metric Metric to add
 * @param string $label Label corresponding to metric
 */
function InsertChart($metric, $label)
{
    global $chartData;
    global $num_runs;
    // @var integer Number of runs
    global $views;
    global $colors;
    global $light_colors;
    global $median_metric;
    global $pagesData;
    global $testsInfo;
    global $testsId;
    global $testsLabel;
    global $median_value;
    global $median_run;
    global $statControl;
    $num_runs = max(array_map("numRunsFromTestInfo", $testsInfo));
    // Write HTML for chart
    $div = "{$metric}Chart";
    echo "<h2 id=\"{$metric}\">" . htmlspecialchars($label) . "</h2>";
    if (!$testsInfo) {
        return;
    }
    $chartColumns = array(ChartColumn::runs($num_runs));
    $compareTable = array();
    $view_index = 0;
    // For each view (first / repeat) that we want to show
    foreach ($views as $cached) {
        $statValues = array();
        $statLabels = array();
        // For each run in that view
        foreach ($pagesData as $key => $pageData) {
            // Construct label from those descriptive attributes that are not
            // common to all variants.
            $labels = array();
            if (count($pagesData) > 1) {
                $labels[] = $testsLabel[$key];
            }
            if (count($views) > 1) {
                $labels[] = $cached == '1' ? 'Repeat View' : 'First View';
            }
            // Prepare Chart object and add to $chartData for later chart construction.
            // If $view_index is greater than the number of colors, we will pass NULL
            // as a color, which will lead to GViz choosing a color.
            $chartColumnsAdd = ChartColumn::dataMedianColumns($pageData, $cached, $metric, $median_metric, $colors[$view_index], $light_colors[$view_index], $labels, $num_runs, $median_run, $median_value);
            $chartColumns = array_merge($chartColumns, $chartColumnsAdd);
            $view_index++;
            // If doing a statistical comparison, prepare raw values and labels.
            if ($statControl !== 'NOSTAT' && count($pagesData) >= 1) {
                $statValues[] = values($pageData, $cached, $metric, true);
                $statLabels[] = implode(" ", $labels);
            }
        }
        if ($statControl !== 'NOSTAT' && count($pagesData) >= 1) {
            // First populate compareFrom for statistical control, if it has values
            if (count($statValues[$statControl]) > 0) {
                $statDiv = "{$metric}Stat{$cached}";
                $compareFrom = array();
                $confData = ConfData::fromArr($statLabels[$statControl], $statValues[$statControl]);
                $compareFrom[$statControl] = new CompareFrom($confData, NULL, NULL);
                foreach ($pagesData as $key => $pageData) {
                    // Skip the statistical control (we already handled it)
                    if ($key == $statControl) {
                        continue;
                    }
                    // Skip runs with missing values for the statistic.
                    if (count($statValues[$key]) == 0) {
                        continue;
                    }
                    // Populate compareFrom for $key
                    $confData = ConfData::fromArr($statLabels[$key], $statValues[$key]);
                    $pValue = \PHPStats\StatisticalTests::twoSampleTTest($statValues[$statControl], $statValues[$key]);
                    $diff = $confData->mean - $compareFrom[$statControl]->confData->mean;
                    // Derive 2-tailed p-value from 1-tailed p-view returned by twoSampleTTest.
                    $pValue = $diff > 0 ? 2 * $pValue : 2 * (1 - $pValue);
                    $compareFrom[$key] = new CompareFrom($confData, $diff, $pValue);
                }
                $compareTable[] = new CompareTable($statDiv, $compareFrom);
                echo "<div id=\"{$statDiv}\"></div>\n";
            }
        }
    }
    $chart = new Chart($div, $chartColumns, $compareTable);
    $chartData[$metric] = $chart;
    echo "<div id=\"{$div}\" class=\"chart\"></div>\n";
}
开发者ID:JHand93,项目名称:WebPerformanceTestSuite,代码行数:93,代码来源:graph_page_data.php


示例20: _parstring

 /**
  * 解析字符串
  * @param  string 要处理的值
  * @author Colin <[email protected]>
  */
 protected function _parstring($string)
 {
     if (empty($string)) {
         $string = $this->string;
     }
     //获取值
     $this->string = values('request', $string);
     //设置name
     $this->name = $string;
 }
开发者ID:a1586256143,项目名称:MyClassPHP,代码行数:15,代码来源:Validate.class.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP vamDBquery函数代码示例发布时间:2022-05-23
下一篇:
PHP value_or_default函数代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap