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


PHP osc_item_country函数代码示例

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


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

示例1: indeed

function indeed()
{
    echo '<?xml version="1.0" encoding="utf-8"?>
    <source>
    <publisher>' . osc_page_title() . '</publisher>
    <publisherurl>' . osc_base_url() . '</publisherurl>
    <lastBuildDate>' . date("D, j M Y G:i:s T") . '</lastBuildDate>';
    if (osc_count_items()) {
        while (osc_has_items()) {
            $item = feed_get_job_data(osc_item());
            $salary = "";
            if (isset($item['i_salary_min']) && $item['i_salary_min'] != '') {
                $salary = $item['i_salary_min'];
            }
            if (isset($item['i_salary_max']) && $item['i_salary_max'] != '') {
                if ($salary != "") {
                    $salary .= ' - ';
                }
                $salary .= $item['i_salary_max'];
            }
            if (isset($item['e_salary_period']) && $item['e_slary_period'] != '') {
                if ($salary != "") {
                    $salary .= ' ';
                    $salary .= $item['e_salary_period'];
                }
            }
            $locale = current($item['locale']);
            if (isset($locale['s_desired_exp']) && $locale['s_desired_exp'] != '') {
                $experience = $locale['s_desired_exp'];
            } else {
                $experience = '';
            }
            if (isset($locale['s_studies']) && $locale['s_studies'] != '') {
                $education = $locale['s_studies'];
            } else {
                $education = '';
            }
            echo '<job>
            <title><![CDATA[' . osc_item_title() . ']]></title>
            <date><![CDATA[' . osc_item_pub_date() . ']]></date>
            <referencenumber><![CDATA[' . osc_item_id() . ']]></referencenumber>
            <url><![CDATA[' . osc_item_url() . ']]></url>
            <company><![CDATA[' . (isset($item['s_company_name']) && $item['s_company_name'] != NULL ? $item['s_company_name'] : '') . ']]></company>
            <city><![CDATA[' . (osc_item_city() != NULL ? osc_item_city() : '') . ']]></city>
            <state><![CDATA[' . (osc_item_region() != NULL ? osc_item_region() : '') . ']]></state>
            <country><![CDATA[' . (osc_item_country() != NULL ? osc_item_country() : '') . ']]></country>
            <postalcode><![CDATA[' . (osc_item_zip() != NULL ? osc_item_zip() : '') . ']]></postalcode>
            <description><![CDATA[' . (osc_item_description() != NULL ? osc_item_description() : '') . ']]></description>
            <salary><![CDATA[' . $salary . ']]></salary>
            <education><![CDATA[' . $education . ']]></education>
            <jobtype><![CDATA[' . (isset($item['e_position_type']) && $item['e_position_type'] != NULL ? $item['e_position_type'] : '') . ']]></jobtype>
            <category><![CDATA[]]></category>
            <experience><![CDATA[' . $experience . ']]></experience>
            </job>';
        }
    }
    echo '</source>';
}
开发者ID:oanav,项目名称:closetshare,代码行数:58,代码来源:indeed.php

示例2: google_cars

function google_cars()
{
    echo '<rss version ="2.0" xmlns:g="http://base.google.com/ns/1.0"> 
     
    <channel> 
	    <title>' . osc_page_title() . '</title> 
	    <description>' . osc_page_description() . '</description> 
	    <link>' . osc_base_url() . '</link>';
    if (osc_count_items()) {
        while (osc_has_items()) {
            $item = feed_get_car_data(osc_item());
            $date = date('d/m/Y');
            $time = date('H:i');
            if (preg_match('|([0-9]{4})-([0-9]{2})-([0-9]{2})|', osc_item_pub_date(), $tmp)) {
                $date = $tmp[3] . "/" . $tmp[2] . "/" . $tmp[1];
            }
            echo '<item> 
            <title>' . osc_item_title() . '</title> 
            <description>' . osc_item_description() . '</description> 
            <g:id>' . osc_item_id() . '</g:id> 
            <link>' . osc_item_url() . '</link> 
            <g:location>' . (osc_item_address() != '' ? osc_item_address() : '') . ', ' . (osc_item_city() != '' ? osc_item_city() : '') . ', ' . (osc_item_region() != '' ? osc_item_region() : '') . ', ' . (osc_item_zip() != '' ? osc_item_zip() : '') . ' ' . (osc_item_country() != '' ? osc_item_country() : '') . '</g:location> 
            <g:publish_date>' . $date . '</g:publish_date> 
            <g:color>' . (isset($item['s_color']) ? $item['s_color'] : '') . '</g:color> 
            <g:condition>' . (isset($item['b_new']) && $item['b_new'] == 1 ? 'new' : 'used') . '</g:condition>';
            if (osc_count_item_resources() > 0) {
                while (osc_has_item_resources()) {
                    if (strpos(osc_resource_type(), 'image') !== FALSE) {
                        echo '<g:image_link>' . osc_resource_path() . '</g:image_link>';
                    }
                }
            }
            echo '<g:make>' . (isset($item['s_make']) ? $item['s_make'] : '') . '</g:make> 
            <g:mileage>' . (isset($item['i_mileage']) ? $item['i_mileage'] : '') . '</g:mileage> 
            <g:model>' . (isset($item['s_model']) ? $item['s_model'] : '') . '</g:model> 
            <g:price>' . (osc_item_price() != '' ? osc_item_price() : '') . '</g:price> 
            <g:vehicle_type>' . (isset($item['s_name']) ? $item['s_name'] : '') . '</g:vehicle_type> 
            <g:year>' . (isset($item['i_year']) ? $item['i_year'] : '') . '</g:year>
            </item>';
        }
    }
    echo '</channel> 
    </rss>';
}
开发者ID:oanav,项目名称:closetshare,代码行数:44,代码来源:google.php

示例3: item_detail_location

 function item_detail_location()
 {
     $location = array();
     if (osc_item_address() != '') {
         $location[] = osc_item_address();
     }
     if (osc_item_city_area() != '') {
         $location[] = osc_item_city_area();
     }
     if (osc_item_city() != '') {
         $location[] = osc_item_city();
     }
     if (osc_item_region() != '') {
         $location[] = osc_item_region();
     }
     if (osc_item_country() != '') {
         $location[] = osc_item_country();
     }
     return $location;
 }
开发者ID:ricktaylord,项目名称:osclass-themes,代码行数:20,代码来源:functions.php

示例4: osc_format_price

            echo osc_format_price(osc_item_price());
            ?>
</span><?php 
        }
        ?>
                                        </div>
                                        <div class="col-md-7 col-sm-7 col-xs-7 location">
                                            <i class="glyphicon glyphicon-map-marker"></i><?php 
        if (osc_item_region()) {
            ?>
 <?php 
            echo osc_item_region();
        } else {
            ?>
 <?php 
            echo osc_item_country();
        }
        ?>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <?php 
    }
    ?>
                        <?php 
}
?>
                    </div><!-- owl carousel -->
                    </div>
开发者ID:abhi143u11,项目名称:ads,代码行数:31,代码来源:main.php

示例5: pop_get_listing_location_string

function pop_get_listing_location_string($aItem)
{
    $aux_item = View::newInstance()->_get('item');
    View::newInstance()->_exportVariableToView('item', $aItem);
    $location = array();
    if (osc_item_city_area() !== '') {
        $location[] = osc_item_city_area();
    }
    if (osc_item_city() !== '') {
        $location[] = osc_item_city();
    }
    if (osc_item_region() !== '') {
        $location[] = osc_item_region();
    }
    if (osc_item_country() !== '') {
        $location[] = osc_item_country();
    }
    View::newInstance()->_exportVariableToView('item', $aux_item);
    return implode(', ', $location);
}
开发者ID:michaelxizhou,项目名称:myeden69-original-backup,代码行数:20,代码来源:functions.php

示例6: _e

            ?>
 <span class="label success"><?php 
            _e('Premium', 'twitter');
            ?>
</span><?php 
        }
        ?>
</h3>
            <p><?php 
        printf(__('<strong>Publish date</strong>: %s', 'twitter'), osc_format_date(osc_item_pub_date()));
        ?>
</p>
            <?php 
        $location = array();
        if (osc_item_country() != '') {
            $location[] = sprintf(__('<strong>Country</strong>: %s', 'twitter'), osc_item_country());
        }
        if (osc_item_region() != '') {
            $location[] = sprintf(__('<strong>Region</strong>: %s', 'twitter'), osc_item_region());
        }
        if (osc_item_city() != '') {
            $location[] = sprintf(__('<strong>City</strong>: %s', 'twitter'), osc_item_city());
        }
        if (count($location) > 0) {
            ?>
            <p><?php 
            echo implode(' &middot; ', $location);
            ?>
</p>
            <?php 
        }
开发者ID:ricktaylord,项目名称:osclass-themes,代码行数:31,代码来源:search_list.php

示例7: doModel


//.........这里部分代码省略.........
     $iTotalItems = null;
     if ($cache) {
         $aItems = $cache['aItems'];
         $iTotalItems = $cache['iTotalItems'];
     } else {
         $aItems = $this->mSearch->doSearch();
         $iTotalItems = $this->mSearch->count();
         $_cache['aItems'] = $aItems;
         $_cache['iTotalItems'] = $iTotalItems;
         osc_cache_set($key, $_cache, OSC_CACHE_TTL);
     }
     $iStart = $p_iPage * $p_iPageSize;
     $iEnd = min(($p_iPage + 1) * $p_iPageSize, $iTotalItems);
     $iNumPages = ceil($iTotalItems / $p_iPageSize);
     // works with cache enabled ?
     osc_run_hook('search', $this->mSearch);
     //preparing variables...
     $countryName = $p_sCountry;
     if (strlen($p_sCountry) == 2) {
         $c = Country::newInstance()->findByCode($p_sCountry);
         if ($c) {
             $countryName = $c['s_name'];
         }
     }
     $regionName = $p_sRegion;
     if (is_numeric($p_sRegion)) {
         $r = Region::newInstance()->findByPrimaryKey($p_sRegion);
         if ($r) {
             $regionName = $r['s_name'];
         }
     }
     $cityName = $p_sCity;
     if (is_numeric($p_sCity)) {
         $c = City::newInstance()->findByPrimaryKey($p_sCity);
         if ($c) {
             $cityName = $c['s_name'];
         }
     }
     $this->_exportVariableToView('search_start', $iStart);
     $this->_exportVariableToView('search_end', $iEnd);
     $this->_exportVariableToView('search_category', $p_sCategory);
     // hardcoded - non pattern and order by relevance
     $p_sOrder = $old_order;
     $this->_exportVariableToView('search_order_type', $p_iOrderType);
     $this->_exportVariableToView('search_order', $p_sOrder);
     $this->_exportVariableToView('search_pattern', $p_sPattern);
     $this->_exportVariableToView('search_from_user', $p_sUser);
     $this->_exportVariableToView('search_total_pages', $iNumPages);
     $this->_exportVariableToView('search_page', $p_iPage);
     $this->_exportVariableToView('search_has_pic', $p_bPic);
     $this->_exportVariableToView('search_only_premium', $p_bPremium);
     $this->_exportVariableToView('search_country', $countryName);
     $this->_exportVariableToView('search_region', $regionName);
     $this->_exportVariableToView('search_city', $cityName);
     $this->_exportVariableToView('search_price_min', $p_sPriceMin);
     $this->_exportVariableToView('search_price_max', $p_sPriceMax);
     $this->_exportVariableToView('search_total_items', $iTotalItems);
     $this->_exportVariableToView('items', $aItems);
     $this->_exportVariableToView('search_show_as', $p_sShowAs);
     $this->_exportVariableToView('search', $this->mSearch);
     // json
     $json = $this->mSearch->toJson();
     $encoded_alert = base64_encode(osc_encrypt_alert($json));
     // Create the HMAC signature and convert the resulting hex hash into base64
     $stringToSign = osc_get_alert_public_key() . $encoded_alert;
     $signature = hex2b64(hmacsha1(osc_get_alert_private_key(), $stringToSign));
     $server_signature = Session::newInstance()->_set('alert_signature', $signature);
     $this->_exportVariableToView('search_alert', $encoded_alert);
     // calling the view...
     if (count($aItems) === 0) {
         header('HTTP/1.1 404 Not Found');
     }
     osc_run_hook("after_search");
     if (!Params::existParam('sFeed')) {
         $this->doView('search.php');
     } else {
         if ($p_sFeed == '' || $p_sFeed == 'rss') {
             // FEED REQUESTED!
             header('Content-type: text/xml; charset=utf-8');
             $feed = new RSSFeed();
             $feed->setTitle(__('Latest listings added') . ' - ' . osc_page_title());
             $feed->setLink(osc_base_url());
             $feed->setDescription(__('Latest listings added in') . ' ' . osc_page_title());
             if (osc_count_items() > 0) {
                 while (osc_has_items()) {
                     if (osc_count_item_resources() > 0) {
                         osc_has_item_resources();
                         $feed->addItem(array('title' => osc_item_title(), 'link' => htmlentities(osc_item_url(), ENT_COMPAT, "UTF-8"), 'description' => osc_item_description(), 'country' => osc_item_country(), 'region' => osc_item_region(), 'city' => osc_item_city(), 'city_area' => osc_item_city_area(), 'category' => osc_item_category(), 'dt_pub_date' => osc_item_pub_date(), 'image' => array('url' => htmlentities(osc_resource_thumbnail_url(), ENT_COMPAT, "UTF-8"), 'title' => osc_item_title(), 'link' => htmlentities(osc_item_url(), ENT_COMPAT, "UTF-8"))));
                     } else {
                         $feed->addItem(array('title' => osc_item_title(), 'link' => htmlentities(osc_item_url(), ENT_COMPAT, "UTF-8"), 'description' => osc_item_description(), 'country' => osc_item_country(), 'region' => osc_item_region(), 'city' => osc_item_city(), 'city_area' => osc_item_city_area(), 'category' => osc_item_category(), 'dt_pub_date' => osc_item_pub_date()));
                     }
                 }
             }
             osc_run_hook('feed', $feed);
             $feed->dumpXML();
         } else {
             osc_run_hook('feed_' . $p_sFeed, $aItems);
         }
     }
 }
开发者ID:mylastof,项目名称:os-class,代码行数:101,代码来源:search.php

示例8: SeoGenerateTitleListing

function SeoGenerateTitleListing()
{
    $sort_order = array();
    $elements = array();
    $del = Delimiter();
    if (osc_get_preference('allSeo_city_show', 'plugin-all_in_one') == 1) {
        if (osc_item_city() != '') {
            $elements[] = osc_item_city();
            $sort_order[] = osc_get_preference('allSeo_city_order', 'plugin-all_in_one');
        }
    }
    if (osc_get_preference('allSeo_region_show', 'plugin-all_in_one') == 1) {
        if (osc_item_region() != '') {
            $elements[] = osc_item_region();
            $sort_order[] = osc_get_preference('allSeo_region_order', 'plugin-all_in_one');
        }
    }
    if (osc_get_preference('allSeo_country_show', 'plugin-all_in_one') == 1) {
        if (osc_item_country() != '') {
            $elements[] = osc_item_country();
            $sort_order[] = osc_get_preference('allSeo_country_order', 'plugin-all_in_one');
        }
    }
    if (osc_get_preference('allSeo_title_show', 'plugin-all_in_one') == 1) {
        if (osc_get_preference('allSeo_page_title', 'plugin-all_in_one') == '') {
            $elements[] = osc_page_title();
        } else {
            $elements[] = osc_get_preference('allSeo_page_title', 'plugin-all_in_one');
        }
        $sort_order[] = osc_get_preference('allSeo_title_order', 'plugin-all_in_one');
    }
    if (osc_get_preference('allSeo_category_show', 'plugin-all_in_one') == 1) {
        $elements[] = osc_item_category();
        $sort_order[] = osc_get_preference('allSeo_category_order', 'plugin-all_in_one');
    }
    if (GetItemTitle(osc_item_id()) == '') {
        $elements[] = osc_item_title();
    } else {
        $elements[] = GetItemTitle(osc_item_id());
    }
    $sort_order[] = osc_get_preference('allSeo_body_order', 'plugin-all_in_one');
    array_multisort($sort_order, $elements);
    $elements = array_filter($elements);
    return implode($del, $elements);
}
开发者ID:michaelxizhou,项目名称:myeden69-original-backup,代码行数:45,代码来源:index.php

示例9: array

// osc_add_hook('after-main','sidebar');
// function sidebar(){
//     osc_current_web_theme_path('item-sidebar.php');
// }
$location = array();
if (osc_item_city_area() !== '') {
    $location[] = osc_item_city_area();
}
if (osc_item_city() !== '') {
    $location[] = osc_item_city();
}
if (osc_item_region() !== '') {
    $location[] = osc_item_region();
}
if (osc_item_country() !== '') {
    $location[] = osc_item_country();
}
osc_current_web_theme_path('header.php');
?>
<div id="item-content" class="columns small-12">
        <h1><strong><?php 
echo osc_item_title();
?>
</strong></h1>
        <!-- <div class="item-header">
            <div>
                <?php 
if (osc_item_pub_date() !== '') {
    printf(__('<strong class="publish">Published date</strong>: %1$s', 'osclassclsx'), osc_format_date(osc_item_pub_date()));
}
?>
开发者ID:kraymond70,项目名称:osclassclsx,代码行数:31,代码来源:item.php

示例10: osc_item_link_offensive

?>
</a>
                    <a id="item_offensive" href="<?php 
echo osc_item_link_offensive();
?>
" rel="nofollow"><?php 
_e('offensive', 'realestate');
?>
</a>
                </div>
                <div class="ui-content-box details-box">
                    <?php 
if (osc_price_enabled_at_items()) {
    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;
开发者ID:blairmain,项目名称:theme-realestate,代码行数:31,代码来源:item.php

示例11: get_row_location

        /**
         * Get the location separated by commas of a row
         *
         * @since 3.2
         *
         * @return string Location separated by commas
         */
        private function get_row_location()
        {
            $location = array();
            if( osc_item_city() !== '' ) {
                $location[] = osc_item_city();
            }
            if( osc_item_region() !== '' ) {
                $location[] = osc_item_region();
            }
            if( osc_item_country() !== '' ) {
                $location[] = osc_item_country();
            }

            return implode(', ', $location);
        }
开发者ID:pombredanne,项目名称:ArcherSys,代码行数:22,代码来源:ItemsDataTable.php

示例12: logbee_header

function logbee_header()
{
    $location = Rewrite::newInstance()->get_location();
    $section = Rewrite::newInstance()->get_section();
    if ($location == 'item' && $section == '') {
        echo '
<style type="text/css">
  .logbee ul { margin: 10px 0; list-style: none; }
  .logbee ul li { float: left; }
  .logbee .clear { clear:both; }
</style>';
        // meta-tags
        $address_array = array();
        if (osc_item_address() != "") {
            $address_array[] = osc_item_address();
        }
        if (osc_item_city_area() != "") {
            $address_array[] = osc_item_city_area();
        }
        if (osc_item_zip() != "") {
            $address_array[] = osc_item_zip();
        }
        if (osc_item_city() != "") {
            $address_array[] = osc_item_city();
        }
        if (osc_item_region() != "") {
            $address_array[] = osc_item_region();
        }
        if (osc_item_country() != "") {
            $address_array[] = osc_item_country();
        }
        $address = implode(", ", $address_array);
        $price = '';
        if (osc_item_formated_price() != "") {
            $price = osc_item_formated_price();
        }
        $email = '';
        if (osc_item_show_email()) {
            $email = osc_item_contact_email();
        }
        echo '
 <meta property="logbee:title" content="' . osc_esc_html(osc_item_title()) . '"/>
 <meta property="logbee:url"   content="' . osc_esc_html(osc_item_url()) . '"/>
 <meta property="logbee:desc"  content="' . osc_esc_html(osc_item_description()) . '"/>
 <meta property="logbee:addr"  content="' . osc_esc_html($address) . '"/>
 <meta property="logbee:email" content="' . osc_esc_html($email) . '"/>
 <meta property="logbee:price" content="' . osc_esc_html($price) . '"/>';
        // do we have the cars_plugin enabled?
        if (osc_plugin_is_enabled('cars_attributes/index.php')) {
            require_once osc_plugin_path('') . '/cars_attributes/ModelCars.php';
            if (osc_is_this_category('cars_plugin', osc_item_category_id())) {
                $detail = ModelCars::newInstance()->getCarAttr(osc_item_id());
                echo '
 <meta property="logbee:type" content="car"/>
 <meta property="logbee:mileage" content="' . osc_esc_html(@$detail['i_mileage']) . '"/>
 <meta property="logbee:firstreg" content="' . osc_esc_html(@$detail['i_year']) . '"/>';
            }
        }
        // do we have the realestate_plugin enabled?
        if (osc_plugin_is_enabled('realestate_attributes/index.php')) {
            require_once osc_plugin_path('') . '/realestate_attributes/ModelRealEstate.php';
            if (osc_is_this_category('realestate_plugin', osc_item_category_id())) {
                $detail = ModelRealEstate::newInstance()->getAttributes(osc_item_id());
                echo '
 <meta property="logbee:type" content="realty"/>
 <meta property="logbee:rooms" content="' . osc_esc_html(@$detail['i_num_rooms']) . '"/>
 <meta property="logbee:size" content="' . osc_esc_html(@$detail['s_square_meters']) . ' sqm"/>';
            }
        }
        // images
        osc_reset_resources();
        $images_array = array();
        for ($i = 0; osc_has_item_resources(); $i++) {
            $images_array[] = osc_esc_html(osc_resource_url());
        }
        $images = implode("|", $images_array);
        echo '
 <meta property="logbee:imgurl" content="' . $images . '"/>
 ';
        osc_reset_resources();
        echo "\n";
    }
}
开发者ID:bomvendador,项目名称:soroka_r,代码行数:83,代码来源:index.php

示例13: seo_format_value

function seo_format_value($value)
{
    switch ($value) {
        case 'country':
            return osc_item_country();
            break;
        case 'region':
            return osc_item_region();
            break;
        case 'city':
            return osc_item_city();
            break;
        default:
            return $value;
            break;
    }
}
开发者ID:syedfiraat4,项目名称:bikade.com,代码行数:17,代码来源:functions.php


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