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

PHP osc_search_url函数代码示例

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

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



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

示例1: osc_get_category

<?php

$category = osc_get_category('id', osc_item_category_id());
$category_url = osc_search_url(array('sCategory' => $category['s_slug']));
?>
<div class="item <?php 
echo $class;
if (osc_item_is_premium()) {
    echo ' premium';
}
?>
">
    <?php 
if (osc_images_enabled_at_items()) {
    ?>
        <?php 
    if (osc_count_item_resources()) {
        ?>
            <a class="" href="<?php 
        echo osc_item_url();
        ?>
" title="<?php 
        echo osc_esc_html(osc_item_title());
        ?>
"><img src="<?php 
        echo osc_resource_original_url();
        ?>
" title="" alt="<?php 
        echo osc_esc_html(osc_item_title());
        ?>
" width="220" ></a>
开发者ID:michaelxizhou,项目名称:myeden69-original-backup,代码行数:31,代码来源:loop-single.php


示例2: pop_ajax_load_more

function pop_ajax_load_more()
{
    $array = Params::getParamsAsArray();
    if ($array['_page'] == 'user') {
        if ($array['_action'] == 'pub_profile') {
            if ($array['username'] != '') {
                $_user = User::newInstance()->findByUsername($array['username']);
                $array['id'] = $_user['pk_i_id'];
            }
            $params['author'] = $array['id'];
            $params['results_per_page'] = isset($array['_offset']) ? $array['_offset'] : osc_default_results_per_page_at_search();
            $params['page'] = isset($array['iPage']) ? $array['iPage'] - 1 : 0;
        }
        if ($array['_action'] == 'items') {
            $params['author'] = osc_logged_user_id();
            $params['results_per_page'] = 10;
            // core default
            $params['page'] = isset($array['iPage']) ? $array['iPage'] - 1 : 0;
        }
        osc_query_item($params);
        $result = View::newInstance()->_get('customItems');
        echo _pop_print_listing_card($result);
        exit;
    }
    if ($array['_page'] == 'search' || $array['_page'] == '') {
        if (osc_rewrite_enabled()) {
            if (REL_WEB_URL != '/') {
                $base_url = str_replace(REL_WEB_URL, '', osc_base_url());
            } else {
                $base_url = osc_base_url();
            }
            $_SERVER['REQUEST_URI'] = preg_replace('|^' . $base_url . '|', '', osc_search_url(Params::getParamsAsArray()));
            osc_add_hook('before_html', 'pop_ob_start_');
            osc_add_hook('after_html', 'pop_ob_clean_');
            osc_add_hook('after_search', 'pop_echo_pop_print_listing_card');
        }
        require_once osc_lib_path() . 'osclass/controller/search.php';
        $do = new CWebSearch();
        $do->doModel();
        exit;
    }
}
开发者ID:michaelxizhou,项目名称:myeden69-original-backup,代码行数:42,代码来源:functions.php


示例3: osc_list_city_url

/**
 * Gets the url of current "list city""
 *
 * @return string
 */
function osc_list_city_url()
{
    if (osc_rewrite_enabled()) {
        $url = osc_base_url();
        if (osc_get_preference('seo_url_search_prefix') != '') {
            $url .= osc_get_preference('seo_url_search_prefix') . '/';
        }
        $url .= osc_sanitizeString(osc_list_city_name()) . '-c' . osc_list_city_id();
        return $url;
    } else {
        return osc_search_url(array('sCity' => osc_list_city_id()));
    }
}
开发者ID:jmcclenon,项目名称:Osclass,代码行数:18,代码来源:hSearch.php


示例4: doModel

 function doModel()
 {
     osc_run_hook('before_search');
     if (osc_rewrite_enabled()) {
         // IF rewrite is not enabled, skip this part, preg_match is always time&resources consuming task
         $p_sParams = "/" . Params::getParam('sParams', false, false);
         if (preg_match_all('|\\/([^,]+),([^\\/]*)|', $p_sParams, $m)) {
             $l = count($m[0]);
             for ($k = 0; $k < $l; $k++) {
                 switch ($m[1][$k]) {
                     case osc_get_preference('rewrite_search_country'):
                         $m[1][$k] = 'sCountry';
                         break;
                     case osc_get_preference('rewrite_search_region'):
                         $m[1][$k] = 'sRegion';
                         break;
                     case osc_get_preference('rewrite_search_city'):
                         $m[1][$k] = 'sCity';
                         break;
                     case osc_get_preference('rewrite_search_city_area'):
                         $m[1][$k] = 'sCityArea';
                         break;
                     case osc_get_preference('rewrite_search_category'):
                         $m[1][$k] = 'sCategory';
                         break;
                     case osc_get_preference('rewrite_search_user'):
                         $m[1][$k] = 'sUser';
                         break;
                     case osc_get_preference('rewrite_search_pattern'):
                         $m[1][$k] = 'sPattern';
                         break;
                     default:
                         // custom fields
                         if (preg_match("/meta(\\d+)-?(.*)?/", $m[1][$k], $results)) {
                             $meta_key = $m[1][$k];
                             $meta_value = $m[2][$k];
                             $array_r = array();
                             if (Params::existParam('meta')) {
                                 $array_r = Params::getParam('meta');
                             }
                             if ($results[2] == '') {
                                 // meta[meta_id] = meta_value
                                 $meta_key = $results[1];
                                 $array_r[$meta_key] = $meta_value;
                             } else {
                                 // meta[meta_id][meta_key] = meta_value
                                 $meta_key = $results[1];
                                 $meta_key2 = $results[2];
                                 $array_r[$meta_key][$meta_key2] = $meta_value;
                             }
                             $m[1][$k] = 'meta';
                             $m[2][$k] = $array_r;
                         }
                         break;
                 }
                 Params::setParam($m[1][$k], $m[2][$k]);
             }
             Params::unsetParam('sParams');
         }
     }
     $uriParams = Params::getParamsAsArray();
     $searchUri = osc_search_url($uriParams);
     if ($this->uri != 'feed') {
         if (str_replace("%20", '+', $searchUri) != str_replace("%20", '+', WEB_PATH . $this->uri)) {
             $this->redirectTo($searchUri, 301);
         }
     }
     ////////////////////////////////
     //GETTING AND FIXING SENT DATA//
     ////////////////////////////////
     $p_sCategory = Params::getParam('sCategory');
     if (!is_array($p_sCategory)) {
         if ($p_sCategory == '') {
             $p_sCategory = array();
         } else {
             $p_sCategory = explode(",", $p_sCategory);
         }
     }
     $p_sCityArea = Params::getParam('sCityArea');
     if (!is_array($p_sCityArea)) {
         if ($p_sCityArea == '') {
             $p_sCityArea = array();
         } else {
             $p_sCityArea = explode(",", $p_sCityArea);
         }
     }
     $p_sCity = Params::getParam('sCity');
     if (!is_array($p_sCity)) {
         if ($p_sCity == '') {
             $p_sCity = array();
         } else {
             $p_sCity = explode(",", $p_sCity);
         }
     }
     $p_sRegion = Params::getParam('sRegion');
     if (!is_array($p_sRegion)) {
         if ($p_sRegion == '') {
             $p_sRegion = array();
         } else {
             $p_sRegion = explode(",", $p_sRegion);
//.........这里部分代码省略.........
开发者ID:mylastof,项目名称:os-class,代码行数:101,代码来源:search.php


示例5: osc_city_area_url

/**
 * Gets city area's url
 *
 * @return string
 */
function osc_city_area_url()
{
    return osc_search_url(array('sCityArea' => osc_city_area_name()));
}
开发者ID:oanav,项目名称:closetshare,代码行数:9,代码来源:hLocation.php


示例6: osc_footer_link_url

function osc_footer_link_url($f = null)
{
    if ($f == null) {
        if (View::newInstance()->_exists('footer_link')) {
            $f = View::newInstance()->_get('footer_link');
        } else {
            return '';
        }
    } else {
        View::newInstance()->_exportVariableToView('footer_link', $f);
    }
    $params = array();
    $tmp = osc_search_category_id();
    if (!empty($tmp)) {
        $params['sCategory'] = $f['fk_i_category_id'];
    }
    if (osc_search_region() == '') {
        $params['sRegion'] = $f['fk_i_region_id'];
    } else {
        $params['sCity'] = $f['fk_i_city_id'];
    }
    return osc_search_url($params);
}
开发者ID:oanav,项目名称:closetshare,代码行数:23,代码来源:functions.php


示例7: _e

                <div id="sidebar">
                    <div class="navigation">
                        <?php 
if (osc_count_list_regions() > 0) {
    ?>
                        <div class="box location">
                            <h3><strong><?php 
    _e("Location", 'modern');
    ?>
</strong></h3>
                            <ul>
                            <?php 
    while (osc_has_list_regions()) {
        ?>
                                <li><a href="<?php 
        echo osc_search_url(array('sRegion' => osc_list_region_name()));
        ?>
"><?php 
        echo osc_list_region_name();
        ?>
</a> <em>(<?php 
        echo osc_list_region_items();
        ?>
)</em></li>
                            <?php 
    }
    ?>
                            </ul>
                        </div>
                        <?php 
}
开发者ID:acharei,项目名称:OSClass,代码行数:31,代码来源:main.php


示例8: breadcrumbs

function breadcrumbs($separator = '/')
{
    $text = '';
    $location = Rewrite::newInstance()->get_location();
    $section = Rewrite::newInstance()->get_section();
    $separator = ' ' . trim($separator) . ' ';
    $page_title = '<a href="' . osc_base_url() . '"><span class="bc_root">' . osc_page_title() . '</span></a>';
    switch ($location) {
        case 'item':
            switch ($section) {
                case 'item_add':
                    break;
                default:
                    $aCategories = Category::newInstance()->toRootTree((string) osc_item_category_id());
                    $category = '';
                    if (count($aCategories) == 0) {
                        break;
                    }
                    $deep = 1;
                    foreach ($aCategories as $aCategory) {
                        $list[] = '<a href="' . breadcrumbs_category_url($aCategory['pk_i_id']) . '"><span class="bc_level_' . $deep . '">' . $aCategory['s_name'] . '</span></a>';
                        $deep++;
                    }
                    $category = implode($separator, $list) . $separator;
                    $category = preg_replace('|' . trim($separator) . '\\s*$|', '', $category);
                    break;
            }
            switch ($section) {
                case 'item_add':
                    $text = $page_title . $separator . '<span class="bc_last">' . __('Publish an item', 'breadcrumbs');
                    break;
                case 'item_edit':
                    $text = $page_title . $separator . $category . $separator . '<a href="' . osc_item_url() . '"><span class="bc_item">' . osc_item_title() . '</span></a>' . $separator . '<span class="bc_last">' . __('Edit your item', 'breadcrumbs') . '</span>';
                    break;
                case 'send_friend':
                    $text = $page_title . $separator . $category . $separator . '<a href="' . osc_item_url() . '"><span class="bc_item">' . osc_item_title() . '</span></a>' . $separator . '<span class="bc_last">' . __('Send to a friend', 'breadcrumbs') . '</span>';
                    break;
                case 'contact':
                    $text = $page_title . $separator . $category . $separator . '<a href="' . osc_item_url() . '"><span class="bc_item">' . osc_item_title() . '</span></a>' . $separator . '<span class="bc_last">' . __('Contact seller', 'breadcrumbs') . '</span>';
                    break;
                default:
                    $text = $page_title . $separator . $category . $separator . '<span class="bc_last">' . osc_item_title() . '</span>';
                    break;
            }
            break;
        case 'page':
            $text = $page_title . $separator . '<span class="bc_last">' . osc_static_page_title() . '</span>';
            break;
        case 'search':
            $region = osc_search_region();
            $city = osc_search_city();
            $pattern = osc_search_pattern();
            $category = osc_search_category_id();
            $category = count($category) == 1 ? $category[0] : '';
            $b_show_all = $pattern == '' && $category == '' && $region == '' && $city == '';
            $b_category = $category != '';
            $b_pattern = $pattern != '';
            $b_region = $region != '';
            $b_city = $city != '';
            $b_location = $b_region || $b_city;
            if ($b_show_all) {
                $text = $page_title . $separator . '<span class="bc_last">' . __('Search', 'breadcrumbs') . '</span>';
                break;
            }
            // init
            $result = $page_title . $separator;
            if ($b_category) {
                $list = array();
                $aCategories = Category::newInstance()->toRootTree($category);
                if (count($aCategories) > 0) {
                    $deep = 1;
                    foreach ($aCategories as $single) {
                        $list[] = '<a href="' . breadcrumbs_category_url($single['pk_i_id']) . '"><span class="bc_level_' . $deep . '">' . $single['s_name'] . '</span></a>';
                        $deep++;
                    }
                    // remove last link
                    if (!$b_pattern && !$b_location) {
                        $list[count($list) - 1] = preg_replace('|<a href.*?>(.*?)</a>|', '$01', $list[count($list) - 1]);
                    }
                    $result .= implode($separator, $list) . $separator;
                }
            }
            if ($b_location) {
                $list = array();
                $params = array();
                if ($b_category) {
                    $params['sCategory'] = $category;
                }
                if ($b_city) {
                    $aCity = City::newInstance()->findByName($city);
                    if (count($aCity) == 0) {
                        $params['sCity'] = $city;
                        $list[] = '<a href="' . osc_search_url($params) . '"><span class="bc_city">' . $city . '</span></a>';
                    } else {
                        $aRegion = Region::newInstance()->findByPrimaryKey($aCity['fk_i_region_id']);
                        $params['sRegion'] = $aRegion['s_name'];
                        $list[] = '<a href="' . osc_search_url($params) . '"><span class="bc_region">' . $aRegion['s_name'] . '</span></a>';
                        $params['sCity'] = $aCity['s_name'];
                        $list[] = '<a href="' . osc_search_url($params) . '"><span class="bc_city">' . $aCity['s_name'] . '</span></a>';
                    }
//.........这里部分代码省略.........
开发者ID:oanav,项目名称:closetshare,代码行数:101,代码来源:index.php


示例9: osc_search_category_url

/**
 * Create automatically the url of a category
 *
 * @param string $pattern
 * @return string the url
 */
function osc_search_category_url()
{
    return osc_search_url(array('sCategory' => osc_category_id()));
}
开发者ID:oanav,项目名称:closetshare,代码行数:10,代码来源:hDefines.php


示例10: osc_item_formated_price

    echo '<div class="price">' . osc_item_formated_price() . '</div>';
}
if (osc_item_country() != "" || osc_item_region() != '') {
    echo '<div class="has-icon"><div class="ico-location ico"></div>';
    if (osc_item_region() != "") {
        $tempData = osc_item_region();
        if (osc_item_field("fk_i_region_id") != "") {
            $tempData = '<a href="' . osc_search_url(array('sRegion' => osc_item_field("fk_i_region_id"))) . '">' . osc_item_region() . '</a>';
        }
        echo $tempData;
    }
    echo '<div class="mini">';
    if (osc_item_city() != "") {
        $tempData = osc_item_city();
        if (osc_item_field("fk_i_city_id") != "") {
            $tempData = '<a href="' . osc_search_url(array('sCity' => osc_item_field("fk_i_city_id"))) . '">' . osc_item_city() . '</a>';
        }
        echo $tempData;
    }
    echo '</div>';
    echo '</div>';
}
//echo join(', ',$regionData);
?>
                <div class="has-icon dates">
                    <div class="ico-dates ico"></div>
                    <div><?php 
if (osc_item_pub_date() != '') {
    echo __('Published', 'realestate') . ': ' . osc_format_date(osc_item_pub_date());
}
?>
开发者ID:blairmain,项目名称:theme-realestate,代码行数:31,代码来源:item.php


示例11: nc_osc_get_public_picture_link

                              <img src="<?php 
echo nc_osc_get_public_picture_link(osc_item_user_id());
?>
" class="img-responsive">
                            </div>
                            <div class="row">
                                <?php 
if (osc_logged_user_id() != osc_item_user_id()) {
    ?>
                                
                                    <!--<a href="<?php 
    echo osc_route_url('seller-items', array('seller' => osc_item_user_id()));
    ?>
" >-->
                                    <a href="<?php 
    echo osc_search_url(array('seller_post' => osc_item_user_id()));
    ?>
">See other items from seller</a>
                                <?php 
}
?>
                            </div>  
                            <div class="row">
                                <?php 
if (osc_is_web_user_logged_in()) {
    ?>
                                    <?php 
    if (osc_logged_user_id() != osc_item_user_id()) {
        ?>
                                        <?php 
        osc_current_web_theme_path('seller-ratings.php');
开发者ID:jhalendra,项目名称:classmandu,代码行数:31,代码来源:item.php


示例12: _e

                <div id="sidebar">
                    <div class="navigation">
                        <?php 
if (osc_count_list_cities() > 0) {
    ?>
                        <div class="box location">
                            <h3><strong><?php 
    _e("Location", 'modern');
    ?>
</strong></h3>
                            <ul>
                            <?php 
    while (osc_has_list_cities()) {
        ?>
                                <li><a href="<?php 
        echo osc_search_url(array('sCity' => osc_list_city_name()));
        ?>
"><?php 
        echo osc_list_city_name();
        ?>
</a> <em>(<?php 
        echo osc_list_city_items();
        ?>
)</em></li>
                            <?php 
    }
    ?>
                            </ul>
                        </div>
                        <?php 
}
开发者ID:nsswaga,项目名称:OSClass,代码行数:31,代码来源:main.php


示例13: init

 public function init()
 {
     if (in_array($this->getLocation(), array('item', 'page', 'search', 'login', 'register', 'user', 'contact'))) {
         $l = array('url' => osc_base_url(), 'title' => osc_page_title());
         $this->addLevel($l);
     }
     switch ($this->getLocation()) {
         case 'item':
             if ($this->getSection() == 'item_add') {
                 $l = array('title' => $this->title['item_add']);
                 $this->addLevel($l);
                 break;
             }
             $aCategory = osc_get_category('id', osc_item_category_id());
             // remove
             View::newInstance()->_erase('categories');
             View::newInstance()->_erase('subcategories');
             View::newInstance()->_exportVariableToView('category', $aCategory);
             $l = array('url' => osc_search_category_url(), 'title' => osc_category_name());
             $this->addLevel($l);
             switch ($this->getSection()) {
                 case 'item_edit':
                     $l = array('url' => osc_item_url(), 'title' => osc_item_title());
                     $this->addLevel($l);
                     $l = array('title' => $this->title['item_edit']);
                     $this->addLevel($l);
                     break;
                 case 'send_friend':
                     $l = array('url' => osc_item_url(), 'title' => osc_item_title());
                     $this->addLevel($l);
                     $l = array('title' => $this->title['item_send_friend']);
                     $this->addLevel($l);
                     break;
                 case 'contact':
                     $l = array('url' => osc_item_url(), 'title' => osc_item_title());
                     $this->addLevel($l);
                     $l = array('title' => $this->title['item_contact']);
                     $this->addLevel($l);
                     break;
                 case '':
                     $l = array('title' => osc_item_title());
                     $this->addLevel($l);
                     break;
             }
             break;
         case 'search':
             $region = osc_search_region();
             $city = osc_search_city();
             $pattern = osc_search_pattern();
             $category = osc_search_category_id();
             $category = count($category) == 1 ? $category[0] : '';
             $b_show_all = $pattern == '' && $category == '' && $region == '' && $city == '';
             $b_category = $category != '';
             $b_pattern = $pattern != '';
             $b_region = $region != '';
             $b_city = $city != '';
             $b_location = $b_region || $b_city;
             // show all
             if ($b_show_all) {
                 $l = array('title' => $this->title['search']);
                 $this->addLevel($l);
                 break;
             }
             // category
             if ($b_category) {
                 $aCategories = Category::newInstance()->toRootTree($category);
                 foreach ($aCategories as $c) {
                     View::newInstance()->_erase('categories');
                     View::newInstance()->_erase('subcategories');
                     View::newInstance()->_exportVariableToView('category', $c);
                     $l = array('url' => osc_search_category_url(), 'title' => osc_category_name());
                     $this->addLevel($l);
                 }
             }
             // location
             if ($b_location) {
                 $params = array();
                 if ($b_category) {
                     $params['sCategory'] = $category;
                 }
                 if ($b_city) {
                     //print_r("~~~~~~~~~~~~~~~~~~~".$city."~~~~~~~~~~~~~~~~~~~~");
                     $aCity = City::newInstance()->findByName($city);
                     if (count($aCity) == 0) {
                         $params['sCity'] = $city;
                         $l = array('url' => osc_search_url($params), 'title' => $city);
                         $this->addLevel($l);
                     } else {
                         $aRegion = Region::newInstance()->findByPrimaryKey($aCity['fk_i_region_id']);
                         $params['sRegion'] = $aRegion['s_name'];
                         $l = array('url' => osc_search_url($params), 'title' => $aRegion['s_name']);
                         $this->addLevel($l);
                         $params['sCity'] = $aCity['s_name'];
                         $l = array('url' => osc_search_url($params), 'title' => $aCity['s_name']);
                         $this->addLevel($l);
                     }
                 } else {
                     if ($b_region) {
                         $params['sRegion'] = $region;
                         $l = array('url' => osc_search_url($params), 'title' => $region);
//.........这里部分代码省略.........
开发者ID:jmcclenon,项目名称:Osclass,代码行数:101,代码来源:Breadcrumb.php


示例14: twitter_breadcrumb

function twitter_breadcrumb($separator = '/')
{
    $breadcrumb = array();
    $text = '';
    $location = Rewrite::newInstance()->get_location();
    $section = Rewrite::newInstance()->get_section();
    $separator = '<span class="divider">' . trim($separator) . '</span>';
    $page_title = '<li><a href="' . osc_base_url() . '">' . osc_page_title() . '</a>' . $separator . '</li>';
    switch ($location) {
        case 'item':
            switch ($section) {
                case 'item_add':
                    break;
                default:
                    $aCategories = Category::newInstance()->toRootTree((string) osc_item_category_id());
                    $category = '';
                    if (count($aCategories) == 0) {
                        break;
                    }
                    foreach ($aCategories as $aCategory) {
                        $list[] = '<li><a href="' . osc_item_category_url($aCategory['pk_i_id']) . '">' . $aCategory['s_name'] . '</a>' . $separator . '</li>';
                    }
                    $category = implode('', $list);
                    break;
            }
            switch ($section) {
                case 'item_add':
                    $text = $page_title . '<li>' . __('Publish an item', 'twitter') . '</li>';
                    break;
                case 'item_edit':
                    $text = $page_title . '<li><a href="' . osc_item_url() . '">' . osc_item_title() . '</a>' . $separator . '</li><li>' . __('Edit your item', 'twitter') . '</li>';
                    break;
                case 'send_friend':
                    $text = $page_title . $category . '<li><a href="' . osc_item_url() . '">' . osc_item_title() . '</a>' . $separator . '</li><li>' . __('Send to a friend', 'twitter') . '</li>';
                    break;
                case 'contact':
                    $text = $page_title . $category . '<li><a href="' . osc_item_url() . '">' . osc_item_title() . '</a>' . $separator . '<li><li>' . __('Contact seller', 'twitter') . '</li>';
                    break;
                default:
                    $text = $page_title . $category . '<li>' . osc_item_title() . '</li>';
                    break;
            }
            break;
        case 'page':
            $text = $page_title . '<li>' . osc_static_page_title() . '</li>';
            break;
        case 'search':
            $region = Params::getParam('sRegion');
            $city = Params::getParam('sCity');
            $pattern = Params::getParam('sPattern');
            $category = osc_search_category_id();
            $category = count($category) == 1 ? $category[0] : '';
            $b_show_all = $pattern == '' && $category == '' && $region == '' && $city == '';
            $b_category = $category != '';
            $b_pattern = $pattern != '';
            $b_region = $region != '';
            $b_city = $city != '';
            $b_location = $b_region || $b_city;
            if ($b_show_all) {
                $text = $page_title . '<li>' . __('Search', 'twitter') . '</li>';
                break;
            }
            // init
            $result = $page_title;
            if ($b_category) {
                $list = array();
                $aCategories = Category::newInstance()->toRootTree($category);
                if (count($aCategories) > 0) {
                    $deep = 1;
                    foreach ($aCategories as $single) {
                        $list[] = '<li><a href="' . osc_item_category_url($single['pk_i_id']) . '">' . $single['s_name'] . '</a>' . $separator . '</li>';
                        $deep++;
                    }
                    // remove last link
                    if (!$b_pattern && !$b_location) {
                        $list[count($list) - 1] = preg_replace('|<li><a href.*?>(.*?)</a>.*?</li>|', '$01', $list[count($list) - 1]);
                    }
                    $result .= implode('', $list);
                }
            }
            if ($b_location) {
                $list = array();
                $params = array();
                if ($b_category) {
                    $params['sCategory'] = $category;
                }
                if ($b_city) {
                    $aCity = City::newInstance()->findByName($city);
                    if (count($aCity) == 0) {
                        $params['sCity'] = $city;
                        $list[] = '<li><a href="' . osc_search_url($params) . '">' . $city . '</a>' . $separator . '</li>';
                    } else {
                        $aRegion = Region::newInstance()->findByPrimaryKey($aCity['fk_i_region_id']);
                        $params['sRegion'] = $aRegion['s_name'];
                        $list[] = '<li><a href="' . osc_search_url($params) . '">' . $aRegion['s_name'] . '</a>' . $separator . '</li>';
                        $params['sCity'] = $aCity['s_name'];
                        $list[] = '<li><a href="' . osc_search_url($params) . '">' . $aCity['s_name'] . '</a>' . $separator . '</li>';
                    }
                    if (!$b_pattern) {
                        $list[count($list) - 1] = preg_replace('|<li><a href.*?>(.*?)</a>.*?</li>|', '$01', $list[count($list) - 1]);
//.........这里部分代码省略.........
开发者ID:ricktaylord,项目名称:osclass-themes,代码行数:101,代码来源:functions.php


示例15: osclasswizards_popular_cities

    }
    ?>
    <?php 
    if (osclasswizards_show_popular_cities()) {
        ?>
    <section id='Cities'>
      <div class="popular_cities">
        <?php 
        $cities = osclasswizards_popular_cities(osclasswizards_popular_cities_limit());
        ?>
        <ul>
          <?php 
        foreach ($cities as $city => $count) {
            ?>
          <li><a href="<?php 
            echo osc_search_url(array('sCity' => $city));
            ?>
"><i class="fa fa-map-marker"></i><?php 
            echo $city;
            ?>
 <em>(<?php 
            echo $count;
            ?>
)</em></a></li>
          <?php 
        }
        ?>
        </ul>
      </div>
    </section>
    <?php 
开发者ID:syedfiraat4,项目名称:bikade.com,代码行数:31,代码来源:main.php


示例16: osc_list_city_url

/**
 * Gets the url of current "list city""
 *
 * @return string
 */
function osc_list_city_url()
{
    return osc_search_url(array('sCity' => osc_list_city_name()));
}
开发者ID:acharei,项目名称:OSClass,代码行数:9,代码来源:hSearch.php


示例17: ping_search_engines

function ping_search_engines($bool)
{
    $mPreference = Preference::newInstance();
    if ($bool == 1) {
        $mPreference->insert(array('s_section' => 'osclass', 's_name' => 'ping_search_engines', 's_value' => '1', 'e_type' => 'BOOLEAN'));
        // GOOGLE
        osc_doRequest('http://www.google.com/webmasters/sitemaps/ping?sitemap=' . urlencode(osc_search_url(array('sFeed' => 'rss'))), array());
        // BING
        osc_doRequest('http://www.bing.com/webmaster/ping.aspx?siteMap=' . urlencode(osc_search_url(array('sFeed' => 'rss'))), array());
        // YAHOO!
        osc_doRequest('http://search.yahooapis.com/SiteExplorerService/V1/ping?sitemap=' . urlencode(osc_search_url(array('sFeed' => 'rss'))), array());
    } else {
        $mPreference->insert(array('s_section' => 'osclass', 's_name' => 'ping_search_engines', 's_value' => '0', 'e_type' => 'BOOLEAN'));
    }
}
开发者ID:randomecho,项目名称:OSClass,代码行数:15,代码来源:install-functions.php


示例18: osc_search_url

    ?>
 " + this.value );
								}
							});
						});
					</script>
                    <?php 
}
?>
                    <button class="btn btn-default"><i class="fa fa-search fa-lg"></i><?php 
//_e("Search", 'flatter');
?>
</button>
                </form>
                <span><a href="<?php 
echo osc_search_url();
?>
" id="#advsrch" class="nav-toggle"><?php 
_e('Advanced search', 'flatter');
?>
 <i class="fa fa-caret-right"></i></a></span>             
            </div>
            </div>
        </div>
    </div>
    <!-- Big Search -->
    
	<?php 
if (osc_get_preference('position1_enable', 'flatter_theme') != '0') {
    ?>
    <div id="position_widget"><!------ Home page widget 1--------------------->
开发者ID:abhi143u11,项目名称:ads,代码行数:31,代码来源:main.php


示例19: seo_sitemap_generator

function seo_sitemap_generator()
{
    $start_time = microtime(true);
    $min = 1;
    $show_items = '';
    if (Params::getParam('sitemap_items') != '') {
        $show_items = Params::getParam('sitemap_items');
    } else {
        $show_items = osc_get_preference('allSeo_sitemap_items', 'plugin-all_in_one') != '' ? osc_get_preference('allSeo_sitemap_items', 'plugin-all_in_one') : '';
    }
    $limit_items = '';
    if (Params::getParam('sitemap_items_limit') != '') {
        $limit_items = Params::getParam('sitemap_items_limit');
    } else {
        $limit_items = osc_get_preference('allSeo_sitemap_items_limit', 'plugin-all_in_one') != '' ? osc_get_preference('allSeo_sitemap_items_limit', 'plugin-all_in_one') : '';
    }
    $limit_items = intval($limit_items);
    $locales = osc_get_locales();
    $filename = osc_base_path() . 'sitemap.xml';
    //link sitemap
    @unlink($filename);
    //remove original sitemap
    $start_xml = '<?xml version="1.0" encoding="UTF-8"?>' . PHP_EOL . '<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">' . PHP_EOL;
    file_put_contents($filename, $start_xml);
    // INDEX
    seo_sitemap_add_url(osc_base_url(), date('Y-m-d'), 'always');
    $categories = Category::newInstance()->listAll(false);
    $countries = Country::newInstance()->listAll();
    foreach ($categories as $c) {
        $search = new Search();
        $search->addCategory($c['pk_i_id']);
        if ($search->count() >= $min) {
            seo_sitemap_add_url(osc_search_url(array('sCategory' => $c['s_slug'])), date('Y-m-d'), 'hourly');
            foreach ($countries as $country) {
                if (count($countries) > 1) {
                    $search = new Search();
                    $search->addCategory($c['pk_i_id']);
                    $search->addCountry($country['pk_c_code']);
                    if ($search->count() > $min) {
                        seo_sitemap_add_url(osc_search_url(array('sCategory' => $c['s_slug'], 'sCountry' => $country['s_name'])), date('Y-m-d'), 'hourly');
                    }
                }
                $regions = Region::newInstance()->findByCountry($country['pk_c_code']);
                foreach ($regions as $region) {
                    $search = new Search();
                    $search->addCategory($c['pk_i_id']);
                    $search->addCountry($country['pk_c_code']);
                    $search->addRegion($region['pk_i_id']);
                    if ($search->count() > $min) {
                        seo_sitemap_add_url(osc_search_url(array('sCategory' => $c['s_slug'], 'sCountry' => $country['s_name'], 'sRegion' => $region['s_name'])), date('Y-m-d'), 'hourly');
                        $cities = City::newInstance()->findByRegion($region['pk_i_id']);
                        foreach ($cities as $city) {
                            $search = new Search();
                            $search->addCategory($c['pk_i_id']);
                            $search->addCountry($country['pk_c_code']);
                            $search->addRegion($region['pk_i_id']);
                            $search->addCity($city['pk_i_id']);
                            if ($search->count() > $min) {
                                seo_sitemap_add_url(osc_search_url(array('sCategory' => $c['s_slug'], 'sCountry' => $country['s_name'], 'sRegion' => $region['s_name'], 'sCity' => $city['s_name'])), date('Y-m-d'), 'hourly');
                            }
                        }
                    }
                }
            }
        }
    }
    foreach ($countries as $country) {
        $regions = Region::newInstance()->findByCountry($country['pk_c_code']);
        foreach ($regions as $region) {
            $cities = CityStats::newInstance()->listCities($region['pk_i_id']);
            $l = min(count($cities), 30);
            for ($k = 0; $k < $l; $k++) {
                if ($cities[$k]['items'] > $min) {
                    seo_sitemap_add_url(osc_search_url(array('sCountry' => $country['s_name'], 'sRegion' => $region['s_name'], 'sCity' => $cities[$k]['city_name'])), date('Y-m-d'), 'hourly');
                }
            }
        }
    }
    // ITEMS
    if ($show_items == 1) {
        $max_secure = 10000;
        $mSearch = new Search();
        $mSearch->limit(0, $limit_items);
        // fetch number of item for sitemap
        $aItems = $mSearch->doSearch();
        View::newInstance()->_exportVariableToView('items', $aItems);
        //exporting our searched item array
        if (osc_count_items() > 0) {
            $i = 0;
   

鲜花

握手

雷人

路过

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

请发表评论

全部评论

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

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

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

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

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