本文整理汇总了PHP中osc_update_search_url函数的典型用法代码示例。如果您正苦于以下问题:PHP osc_update_search_url函数的具体用法?PHP osc_update_search_url怎么用?PHP osc_update_search_url使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了osc_update_search_url函数的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: osc_search_pagination
/**
* Gets the pagination links of search pagination
*
* @return string pagination links
*/
function osc_search_pagination()
{
$params = array();
if (View::newInstance()->_exists('search_uri')) {
// CANONICAL URL
$params['url'] = osc_base_url() . View::newInstance()->_get('search_uri') . '/{PAGE}';
$params['first_url'] = osc_base_url() . View::newInstance()->_get('search_uri');
} else {
$params['first_url'] = osc_update_search_url(array('iPage' => null));
}
$pagination = new Pagination($params);
return $pagination->doPagination();
}
示例2: __construct
public function __construct($params = null)
{
$this->total = isset($params['total']) ? $params['total'] : osc_search_total_pages();
$this->selected = isset($params['selected']) ? $params['selected'] : osc_search_page();
$this->class_first = isset($params['class_first']) ? $params['class_first'] : 'searchPaginationFirst';
$this->class_last = isset($params['class_last']) ? $params['class_last'] : 'searchPaginationLast';
$this->class_prev = isset($params['class_prev']) ? $params['class_prev'] : 'searchPaginationPrev';
$this->class_next = isset($params['class_next']) ? $params['class_next'] : 'searchPaginationNext';
$this->text_first = isset($params['text_first']) ? $params['text_first'] : '«';
$this->text_last = isset($params['text_last']) ? $params['text_last'] : '»';
$this->text_prev = isset($params['text_prev']) ? $params['text_prev'] : '<';
$this->text_next = isset($params['text_next']) ? $params['text_next'] : '>';
$this->class_selected = isset($params['class_selected']) ? $params['class_selected'] : 'searchPaginationSelected';
$this->class_non_selected = isset($params['class_non_selected']) ? $params['class_non_selected'] : 'searchPaginationNonSelected';
$this->delimiter = isset($params['delimiter']) ? $params['delimiter'] : " ";
$this->force_limits = isset($params['force_limits']) ? (bool) $params['delimiter'] : false;
$this->sides = isset($params['sides']) ? $params['sides'] : 2;
$this->url = isset($params['url']) ? $params['url'] : osc_update_search_url(array('iPage' => '{PAGE}'));
}
示例3: osc_current_web_theme_path
<?php
osc_current_web_theme_path('search_list.php');
?>
<?php
osc_alert_form();
?>
<?php
}
?>
<div class="paginate" >
<?php
for ($i = 0; $i < osc_search_total_pages(); $i++) {
if ($i == osc_search_page()) {
printf('<a class="searchPaginationSelected" href="%s">%d</a>', osc_update_search_url(array('iPage' => $i)), $i + 1);
} else {
printf('<a class="searchPaginationNonSelected" href="%s">%d</a>', osc_update_search_url(array('iPage' => $i)), $i + 1);
}
}
?>
</div>
</div>
</div>
<div id="sidebar">
<div class="filters">
<form action="<?php
echo osc_base_url(true);
?>
" method="get" onSubmit="return checkEmptyCategories()">
<input type="hidden" name="page" value="search" />
<h3 class="your_search"><strong><?php
_e('Your search', 'masjob');
示例4: twitter_search_pagination
/**
* Helper to use twitter pagination in search results
*/
function twitter_search_pagination()
{
$params = array('total' => osc_search_total_pages(), 'selected' => osc_search_page(), 'class_first' => '', 'class_last' => '', 'class_prev' => 'prev', 'class_next' => 'next', 'delimiter' => '', 'text_prev' => sprintf(__('%s Previous', 'twitter'), '←'), 'text_next' => sprintf(__('Next %s', 'twitter'), '→'), 'class_selected' => 'active', 'class_non_selected' => '', 'force_limits' => false, 'url' => osc_update_search_url(array('iPage' => '{PAGE}')));
$pagination = new TwitterPagination($params);
return $pagination->doPagination();
}
示例5: pop_print_sidebar_category_search
function pop_print_sidebar_category_search($aCategories, $current_category = null, $i = 0)
{
$class = '';
if (!isset($aCategories[$i])) {
return null;
}
if ($i === 0) {
$class = 'class="category"';
}
$c = $aCategories[$i];
$i++;
if (!isset($c['pk_i_id'])) {
echo '<ul ' . $class . '>';
if ($i == 1) {
echo '<li><a href="' . osc_esc_html(osc_update_search_url(array('sCategory' => null, 'iPage' => null))) . '">' . __('All categories', 'pop') . "</a></li>";
}
foreach ($c as $key => $value) {
?>
<li>
<a id="cat_<?php
echo osc_esc_html($value['pk_i_id']);
?>
" href="<?php
echo osc_esc_html(osc_update_search_url(array('sCategory' => $value['pk_i_id'], 'iPage' => null)));
?>
">
<?php
if (isset($current_category) && $current_category == $value['pk_i_id']) {
echo '<strong>' . $value['s_name'] . '</strong>';
} else {
echo $value['s_name'];
}
?>
</a>
</li>
<?php
}
if ($i == 1) {
echo "</ul>";
} else {
echo "</ul>";
}
} else {
?>
<ul <?php
echo $class;
?>
>
<?php
if ($i == 1) {
?>
<li><a href="<?php
echo osc_esc_html(osc_update_search_url(array('sCategory' => null, 'iPage' => null)));
?>
"><?php
_e('All categories', 'pop');
?>
</a></li>
<?php
}
?>
<li>
<a id="cat_<?php
echo osc_esc_html($c['pk_i_id']);
?>
" href="<?php
echo osc_esc_html(osc_update_search_url(array('sCategory' => $c['pk_i_id'], 'iPage' => null)));
?>
">
<?php
if (isset($current_category) && $current_category == $c['pk_i_id']) {
echo '<strong>' . $c['s_name'] . '</strong>';
} else {
echo $c['s_name'];
}
?>
</a>
<?php
pop_print_sidebar_category_search($aCategories, $current_category, $i);
?>
</li>
<?php
if ($i == 1) {
?>
<?php
}
?>
</ul>
<?php
}
}
示例6: osc_update_search_url
?>
<?php
if (osc_search_order() == $params['sOrder'] && osc_search_order_type() == $orderType) {
?>
<a class="current" href="<?php
echo osc_update_search_url($params);
?>
"><?php
echo $label;
?>
</a>
<?php
} else {
?>
<a href="<?php
echo osc_update_search_url($params);
?>
"><?php
echo $label;
?>
</a>
<?php
}
?>
<?php
if ($i != count($orders) - 1) {
?>
<span>·</span>
<?php
}
?>
示例7: osc_esc_html
?>
<?php
if (osc_search_order() == $params['sOrder'] && osc_search_order_type() == $orderType) {
?>
<li><a class="current" href="<?php
echo osc_esc_html(osc_update_search_url($params));
?>
"><?php
echo $label;
?>
</a></li>
<?php
} else {
?>
<li><a href="<?php
echo osc_esc_html(osc_update_search_url($params));
?>
"><?php
echo $label;
?>
</a></li>
<?php
}
?>
<?php
$i++;
?>
<?php
}
?>
</ul>
示例8: osc_search_show_all_url
/**
* Gets for a default search (all categories, noother option)
*
* @return string
*/
function osc_search_show_all_url($params = array())
{
$params['page'] = 'search';
return osc_update_search_url($params);
}
示例9: toggleMenu
toggleMenu();
}
}
document.getElementById('toggle').addEventListener('click', function (e) {
toggleMenu();
});
window.addEventListener(WINDOW_CHANGE_EVENT, closeMenu);
})(this, this.document);
</script>
<script type="text/javascript">
var sUrl = '<?php
echo osc_update_search_url(array('sPattern' => ' '));
?>
';
var sUrl = '<?php
echo osc_search_url();
?>
';
var sQuery = '-';
function doSearch(_class) {
if( $('form.' + _class + ' input[name=sPattern]').val().length < 3 ) {
$('form.' + _class + ' input[name=sPattern]').css('background', '#FFC6C6');
return false;
} else {
<?php
if (osc_rewrite_enabled()) {
?>
示例10: osc_update_search_url
?>
' href="<?php
echo osc_update_search_url(array('sCity' => osc_list_city_name()));
?>
"><?php
echo osc_list_city_name();
?>
</a>
<?php
if ($active != '') {
?>
<a class="<?php
echo $active;
?>
" href="<?php
echo osc_update_search_url(array('sCity' => null));
?>
"><i class="fa fa-times-circle"></i> </a>
<?php
}
?>
</div>
<?php
$i++;
if ($i == $limit_cities) {
?>
<?php
break;
}
?>