当前位置: 首页>>代码示例>>PHP>>正文


PHP R::_方法代码示例

本文整理汇总了PHP中R::_方法的典型用法代码示例。如果您正苦于以下问题:PHP R::_方法的具体用法?PHP R::_怎么用?PHP R::_使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在R的用法示例。


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

示例1: processFilterDefault

 public static function processFilterDefault(array &$where)
 {
     if (R::_('date_start')) {
         $where[] = 'datetime > ' . F::$dbo->escape(R::_('date_start'), true);
     }
     if (R::_('date_end')) {
         $where[] = 'datetime < ' . F::$dbo->escape(R::_('date_end'), true);
     }
 }
开发者ID:EsterniTY,项目名称:dfl860e-logger,代码行数:9,代码来源:helper.php

示例2: array

        $pages[$i]['label'] = $i;
    }
    for ($i = $totalPages - 4; $i <= $totalPages; $i++) {
        $pages[$i] = array();
        $pages[$i]['liclass'] = $i == $active ? ' class="disabled"' : '';
        $pages[$i]['limitstart'] = $i - 1;
        $pages[$i]['label'] = $i;
    }
}
ksort($pages);
?>

<nav>
	<ul class="pagination">
		<li<?php 
echo R::_('limitstart') == 0 ? ' class="disabled"' : '';
?>
>
			<a href="#" <?php 
echo $active > 1 ? ' data-limitstart="' . ($active - 2) . '"' : '';
?>
>
				<span aria-hidden="true">&laquo;</span>
			</a>
		</li>
		<?php 
foreach ($pages as $i => $info) {
    if ($i > 1 && !array_key_exists($i - 1, $pages)) {
        echo '<li class="disabled">';
        echo '<a href="#">...</a>';
        echo '</li>';
开发者ID:EsterniTY,项目名称:dfl860e-logger,代码行数:31,代码来源:pagination.php

示例3: implode

    $select[] = '*';
    $select[] = 'sum(origsent) AS origsent';
    $select[] = 'sum(termsent) AS termsent';
    $select[] = 'sum(conntime) AS conntime';
}
helper::processFilterSimple($where, 'remote_ip', R::_('gate'));
helper::processFilterSimple($where, 'event', R::_('event'));
helper::processFilterSimple($where, 'rule', R::_('rule'));
helper::processFilterCanBeEmpty($where, 'connipproto', R::_('proto'));
helper::processFilterCanBeEmpty($where, 'connsrcip', R::_('connsrcip'));
if (R::_('connsrcip-group')) {
    $select[] = 'count(id) AS cnt';
    $group[] = 'conndestip';
}
helper::processFilterDefault($where);
helper::processFilterFreeText($where, R::_('free_text'), $highlight);
$select = 'SELECT' . (!empty($select) ? "\n " . implode(",\n ", $select) : ' *') . "\n";
$where = !empty($where) ? "WHERE " . implode("\nAND ", $where) . "\n" : '';
$group = !empty($group) ? "GROUP BY " . implode(' ', $group) . "\n" : '';
$rows = F::$dbo->fetchLimited($select . $from . $where . $group);
$group = !empty($group) ? $group : "GROUP BY id\n";
$q = F::$dbo->query('SELECT COUNT(id),min(datetime),max(datetime),sum(oSent),sum(tSent) FROM (SELECT id,datetime,sum(origsent) AS oSent, sum(termsent) AS tSent ' . $from . $where . $group . ') AS rows');
if ($result = $q->fetch_array()) {
    $resultsTotal = $result[0];
    $resultsStart = $result[1];
    $resultsEnd = $result[2];
    if (R::_('connsrcip')) {
        $resultsOrigSent = $result[3];
        $resultsTermSent = $result[4];
    }
}
开发者ID:EsterniTY,项目名称:dfl860e-logger,代码行数:31,代码来源:conn.php

示例4:

	<div class="col-sm-10"><b><?php 
    echo R::_('srcip');
    ?>
</b></div>
</div>
<?php 
}
?>

<?php 
if (R::_('destip')) {
    ?>
<div class="row">
	<div class="col-sm-2"><b>DestIp</b></div>
	<div class="col-sm-10"><b><?php 
    echo R::_('destip');
    ?>
</b></div>
</div>
<?php 
}
?>

<div class="row">
	<div class="col-sm-2">Время SQL запроса</div>
	<div class="col-sm-10"><?php 
echo F::$dbo->getTimer(false);
?>
</div>
</div>
开发者ID:EsterniTY,项目名称:dfl860e-logger,代码行数:30,代码来源:info.php

示例5: array

$actions = helper::getCount('cat_rule', 'action');
$proto = helper::getCount('cat_rule', 'ipproto');
helper::fixFilterLabels($proto);
$select = array('*');
$from = "FROM cat_rule\n";
$where = array();
$group = array();
helper::processFilterSimple($where, 'remote_ip', R::_('gate'));
helper::processFilterSimple($where, 'event', R::_('event'));
helper::processFilterSimple($where, 'action', R::_('action'));
helper::processFilterSimple($where, 'rule', R::_('rule'));
helper::processFilterCanBeEmpty($where, 'ipproto', R::_('proto'));
helper::processFilterCanBeEmpty($where, 'srcip', R::_('srcip'));
helper::processFilterCanBeEmpty($where, 'destip', R::_('destip'));
if (R::_('srcip-group')) {
    $select[] = 'count(id) AS cnt';
    $group[] = 'destip';
}
helper::processFilterDefault($where);
helper::processFilterFreeText($where, R::_('free_text'), $highlight);
$select = 'SELECT' . (!empty($select) ? "\n " . implode(",\n ", $select) : ' *') . "\n";
$where = !empty($where) ? "WHERE " . implode("\nAND ", $where) . "\n" : '';
$group = !empty($group) ? "GROUP BY " . implode(' ', $group) . "\n" : '';
$rows = F::$dbo->fetchLimited($select . $from . $where . $group);
$group = !empty($group) ? $group : "GROUP BY id\n";
$q = F::$dbo->query('SELECT COUNT(id),min(datetime),max(datetime) FROM (SELECT id,datetime ' . $from . $where . $group . ') AS rows');
if ($result = $q->fetch_array()) {
    $resultsTotal = $result[0];
    $resultsStart = $result[1];
    $resultsEnd = $result[2];
}
开发者ID:EsterniTY,项目名称:dfl860e-logger,代码行数:31,代码来源:rule.php

示例6: max

			Текст для поиска
			<span class="small text-muted">Одна строка - одно устовие</span>
			<span class="small text-muted">Префикс "!" для исключения</span>
			<span class="small text-muted">Префикс "+" для включения</span>
		</label>
		<div>
			<textarea id="free_text"
				name="free_text"
				class="form-control"
				wrap='off'
				rows="<?php 
echo max(4, count(explode("\n", trim(R::_('free_text')))) + 1);
?>
"
			><?php 
echo R::_('free_text');
?>
</textarea>
		</div>
	</div>

	<div class="form-group">
		<button type="submit" class="btn btn-primary btn-block">Применить</button>
	</div>
	<div class="form-group">
		<button type="button" id="refresh" class="btn btn-default btn-block">Обновить</button>
	</div>
	<div class="form-group">
		<button type="button" id="reset" class="btn btn-warning btn-block">Очистить</button>
	</div>
</form>
开发者ID:EsterniTY,项目名称:dfl860e-logger,代码行数:31,代码来源:filter.php

示例7: foreach

						<li<?php 
echo R::_('category') == '' ? ' class="disabled"' : '';
?>
>
							<a href="#"
									data-role="filter"
									data-key="category"
									data-value="">
									- Все категории -
								</a>
						</li>
						<?php 
foreach (R::categories() as $row) {
    ?>
							<li<?php 
    echo $row['label'] == R::_('category') ? ' class="disabled"' : '';
    ?>
>
								<a href="#"
									data-role="filter"
									data-key="category"
									data-value="<?php 
    echo $row['label'];
    ?>
">
									<?php 
    echo $row['label'];
    ?>
 (<?php 
    echo $row['count'];
    ?>
开发者ID:EsterniTY,项目名称:dfl860e-logger,代码行数:31,代码来源:top_bar.php

示例8:

    }
    ?>

			<?php 
    if (!R::_('proto')) {
        ?>
				<td><?php 
        echo $row['ipproto'];
        ?>
</td>
			<?php 
    }
    ?>

			<?php 
    if (R::_('srcip-group')) {
        ?>
				<td><?php 
        echo $row['cnt'];
        ?>
</td>
			<?php 
    }
    ?>

			<td><?php 
    echo $row['srcip'];
    ?>
</td>
			<td><?php 
    echo $row['destip'];
开发者ID:EsterniTY,项目名称:dfl860e-logger,代码行数:31,代码来源:content.php

示例9: getLimit

 public function getLimit()
 {
     return ' LIMIT ' . R::_('limit') * R::_('limitstart') . ', ' . R::_('limit');
 }
开发者ID:EsterniTY,项目名称:dfl860e-logger,代码行数:4,代码来源:dbo.php


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