本文整理汇总了PHP中vRequest::getGET方法的典型用法代码示例。如果您正苦于以下问题:PHP vRequest::getGET方法的具体用法?PHP vRequest::getGET怎么用?PHP vRequest::getGET使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类vRequest
的用法示例。
在下文中一共展示了vRequest::getGET方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getLimitBox
function getLimitBox($sequence = 0)
{
$app = JFactory::getApplication();
// Initialize variables
$limits = array();
$selected = $this->limit;
// Build the select list
if ($app->isAdmin()) {
if (empty($sequence)) {
$sequence = VmConfig::get('pagseq', 0);
}
if (!empty($sequence)) {
$sequenceArray = explode(',', $sequence);
if (count($sequenceArray > 1)) {
foreach ($sequenceArray as $items) {
$limits[$items] = JHtml::_('select.option', $items);
}
}
}
if (empty($limits)) {
$limits[15] = JHtml::_('select.option', 15);
$limits[30] = JHtml::_('select.option', 30);
$limits[50] = JHtml::_('select.option', 50);
$limits[100] = JHtml::_('select.option', 100);
$limits[200] = JHtml::_('select.option', 200);
$limits[400] = JHtml::_('select.option', 400);
}
if (!array_key_exists($this->limit, $limits)) {
$limits[$this->limit] = JHtml::_('select.option', $this->limit);
ksort($limits);
}
$namespace = 'Joomla.';
$html = JHtml::_('select.genericlist', $limits, 'limit', 'class="inputbox" size="1" onchange="' . $namespace . 'submitform();"', 'value', 'text', $selected);
} else {
$getArray = vRequest::getGET();
$link = '';
unset($getArray['limit']);
// foreach ($getArray as $key => $value ) $link .= '&'.$key.'='.$value;
foreach ($getArray as $key => $value) {
if (is_array($value)) {
foreach ($value as $k => $v) {
$link .= '&' . $key . '[' . $k . ']' . '=' . $v;
}
} else {
$link .= '&' . $key . '=' . $value;
}
}
$link = 'index.php?' . ltrim($link, '&');
if (empty($sequence)) {
$sequence = VmConfig::get('pagseq_' . $this->_perRow);
}
if (!empty($sequence)) {
$sequenceArray = explode(',', $sequence);
if (count($sequenceArray > 1)) {
foreach ($sequenceArray as $items) {
$limits[$items] = JHtml::_('select.option', JRoute::_($link . '&limit=' . $items, false), $items);
}
}
}
if (empty($limits) or !is_array($limits)) {
if ($this->_perRow === 1) {
$this->_perRow = 5;
}
$limits[$this->_perRow * 5] = JHtml::_('select.option', JRoute::_($link . '&limit=' . $this->_perRow * 5, false), $this->_perRow * 5);
$limits[$this->_perRow * 10] = JHtml::_('select.option', JRoute::_($link . '&limit=' . $this->_perRow * 10, false), $this->_perRow * 10);
$limits[$this->_perRow * 20] = JHtml::_('select.option', JRoute::_($link . '&limit=' . $this->_perRow * 20, false), $this->_perRow * 20);
$limits[$this->_perRow * 50] = JHtml::_('select.option', JRoute::_($link . '&limit=' . $this->_perRow * 50, false), $this->_perRow * 50);
}
if (!array_key_exists($this->limit, $limits)) {
$limits[$this->limit] = JHtml::_('select.option', JRoute::_($link . '&limit=' . $this->limit, false), $this->limit);
ksort($limits);
}
$selected = JRoute::_($link . '&limit=' . $selected, false);
$js = 'onchange="window.top.location.href=this.options[this.selectedIndex].value"';
$html = JHtml::_('select.genericlist', $limits, '', 'class="inputbox" size="1" ' . $js, 'value', 'text', $selected);
}
return $html;
}