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


PHP CommonFunctions::extractSingleValueFromMultiValueArray方法代碼示例

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


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

示例1:

<?php

if (sizeof($chartLegendValues) == 0) {
    ?>
		<h1><i class="fa fa-line-chart hidden-xs"></i> График авторизаций<span class="hidden-xs"> в&nbsp;сети</span></h1>
		<div class="page-wrapper">
			<p class="text-center">Нет данных</p>
		</div>
	<?php 
} else {
    // Соц. сети и их названия
    $loginOptions = $database->getLoginOptions();
    $socialNetworksNames = CommonFunctions::extractSingleValueFromMultiValueArray($loginOptions, 'NAME');
    ?>
<div class="complex-h1">
	<i class="fa fa-line-chart hidden-xs"></i>
	<h1>График авторизаций<span class="hidden-xs"> в&nbsp;сети</span></h1>
	
	<h2 class="hidden-xs">Количество пользователей за&nbsp;последние <?php 
    echo $temp;
    ?>
&nbsp;дней</h2>
	<span class="options hidden-xs">
		<select id="main-stats-chart-period">
			<option value="365"<?php 
    if ($temp == 365) {
        echo ' selected';
    }
    ?>
>1 год</option>
			<option value="183"<?php 
開發者ID:anthonyboutinov,項目名稱:WiFiAuth,代碼行數:31,代碼來源:mainStatsChart.php

示例2: getDBUsersCount

 /**
  *	@author Anthony Boutinov
  *	
  *	@param bool $count_deactivated		(Опционально) Считать вмете с деактивированными. По умолчанию, не считать их.
  *	@retval int
  */
 public function getDBUsersCount($count_deactivated = false)
 {
     $sql = 'select count(ID_DB_USER) as COUNT from CM$DB_USER where IS_SUPERADMIN=\'F\' ' . 'union select count(ID_DB_USER) as COUNT from CM$DB_USER where IS_SUPERADMIN=\'T\'';
     if ($count_deactivated == false) {
         $sql = $sql . ' and IS_ACTIVE=\'T\'';
     }
     $array = $this->toArray($this->getQueryResultWithErrorNoticing($sql));
     return CommonFunctions::extractSingleValueFromMultiValueArray($array, 'COUNT');
 }
開發者ID:anthonyboutinov,項目名稱:WiFiAuth,代碼行數:15,代碼來源:DBWiFiInterface.php

示例3: drawChart

        $height = $charthHeight + 30;
    }
    include_once 'googleChartAPI.html';
    ?>
<script type="text/javascript">
	// Set a callback to run when the Google Visualization API is loaded.
	google.setOnLoadCallback(drawChart);

	// Callback that creates and populates a data table,
	// instantiates the pie chart, passes in the data and
	// draws it.
	function drawChart() {
		var data = new google.visualization.arrayToDataTable([
			[{type: 'date', label: 'День'},
			<?php 
    echo CommonFunctions::arrayToString(CommonFunctions::extractSingleValueFromMultiValueArray($database->getLoginOptions(), 'NAME'), false, true, true, ' ', '],', "{type: 'number', label: '", "'}");
    if (isset($_SESSION['main-stats-chart-data-offset']) && isset($_SESSION['main-stats-chart-data-limit'])) {
        echo CommonFunctions::arrayToString($database->getMainStatsTable($_SESSION['main-stats-chart-data-limit'], $_SESSION['main-stats-chart-data-offset']), false, false, false);
    } else {
        echo CommonFunctions::arrayToString($database->getMainStatsTable(30), false, false, false);
    }
    ?>
		]);

		var options = {
			animation: {duration: 1000, startup: true, easing: 'inAndOut' },
			explorer: {},
			selectionMode: 'single',
			tooltip: {trigger: 'selection'},
			backgroundColor: { fill:'transparent' },
			fontName: 'Fontatigo, "Helvetica Nueue", Helvetica, Arial, "Lucida Grande", sans-serif',
開發者ID:anthonyboutinov,項目名稱:WiFiAuth,代碼行數:31,代碼來源:mainStatsChartGoogleChartJS.php


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