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


PHP osc_item_pub_date函数代码示例

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


在下文中一共展示了osc_item_pub_date函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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: aam_pub_repub_date

function aam_pub_repub_date()
{
    $conn = getConnection();
    $rePubTime = $conn->osc_dbFetchResult("SELECT * FROM %st_item_adManage_limit WHERE fk_i_item_id = '%d'", DB_TABLE_PREFIX, osc_item_id());
    if ($rePubTime['r_times'] >= 1) {
        return (string) __('Republished Date: ', 'adManage') . osc_format_date(osc_item_pub_date());
    } else {
        return (string) __('Published Date: ', 'adManage') . osc_format_date(osc_item_pub_date());
    }
}
开发者ID:oanav,项目名称:closetshare,代码行数:10,代码来源:index.php

示例4: osc_item_mod_date

function osc_item_mod_date()
{
    $date = osc_item_field("dt_mod_date");
    if ($date != '') {
        return $date;
    } else {
        return osc_item_pub_date();
    }
}
开发者ID:hashemgamal,项目名称:OSClass,代码行数:9,代码来源:hItems.php

示例5: osc_item_is_expired

/**
 * Return true if item is expired, else return false
 * 
 * @return boolean  
 */
function osc_item_is_expired()
{
    if (osc_item_is_premium()) {
        return false;
    } else {
        $category = Category::newInstance()->findByPrimaryKey(osc_item_category_id());
        $expiration = $category['i_expiration_days'];
        if ($expiration == 0) {
            return false;
        } else {
            $date_expiration = strtotime(date("Y-m-d H:i:s", strtotime(osc_item_pub_date())) . " +{$expiration} day");
            $now = strtotime(date('Y-m-d H:i:s'));
            if ($date_expiration < $now) {
                return true;
            } else {
                return false;
            }
        }
    }
}
开发者ID:acharei,项目名称:OSClass,代码行数:25,代码来源:hItems.php

示例6: osc_item_formated_price

</a>
                     </h3>
                     <p>
                         <strong><?php 
    if (osc_price_enabled_at_items()) {
        echo osc_item_formated_price();
        ?>
 - <?php 
    }
    echo osc_item_city();
    ?>
 (<?php 
    echo osc_item_region();
    ?>
) - <?php 
    echo osc_format_date(osc_item_pub_date());
    ?>
</strong>
                     </p>
                     <p><?php 
    echo osc_highlight(strip_tags(osc_item_description()));
    ?>
</p>
                 </td>
             </tr>
            <?php 
    $class = $class == 'even' ? 'odd' : 'even';
    ?>
        <?php 
}
?>
开发者ID:jmcclenon,项目名称:Osclass,代码行数:31,代码来源:search_list.php

示例7: implode

if (count($location) > 0) {
    ?>
                    <div class="item-location">
                        <i class="fa fa-map-marker"></i>
                        <?php 
    echo implode(', ', $location);
    ?>
                    </div>
                    <?php 
}
?>
                    <div class="item-date">
                        <i class="fa fa-calendar"></i>
                        <?php 
if (osc_item_pub_date() !== '') {
    printf(__('%1$s', 'pop'), osc_format_date(osc_item_pub_date()));
}
?>
                    </div>

                    <?php 
voting_item_detail();
?>

                </div>
                <?php 
if (osc_price_enabled_at_items() && osc_item_price()) {
    ?>
                <div class="item-price">
                    <?php 
    echo osc_item_formated_price();
开发者ID:oanav,项目名称:closetshare,代码行数:31,代码来源:item.php

示例8: 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

示例9: osc_item_formated_price

      <ul class="item-header">
        <li>
          <?php 
if (osc_price_enabled_at_items()) {
    ?>
          <i class="fa fa-money"></i><?php 
    echo osc_item_formated_price();
    ?>
          <?php 
}
?>
        </li>
        <li>
          <?php 
if (osc_item_pub_date() !== '') {
    printf(__('<i class="fa fa-calendar-o"></i> Published date: %1$s', OSCLASSWIZARDS_THEME_FOLDER), osc_format_date(osc_item_pub_date()));
}
?>
        </li>
        <li>
          <?php 
if (osc_item_mod_date() !== '') {
    printf(__('<span class="update"><i class="fa fa-calendar"></i> Modified date:</span> %1$s', OSCLASSWIZARDS_THEME_FOLDER), osc_format_date(osc_item_mod_date()));
}
?>
        </li>
        <?php 
if (count($location) > 0) {
    ?>
        <li>
          <ul id="item_location">
开发者ID:syedfiraat4,项目名称:bikade.com,代码行数:31,代码来源:item.php

示例10: trovit_cars

function trovit_cars()
{
    echo '<?xml version="1.0" encoding="utf-8"?>
            <trovit>';
    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}) ([0-9]{2}):([0-9]{2})|', osc_item_pub_date(), $tmp)) {
                $date = $tmp[3] . "/" . $tmp[2] . "/" . $tmp[1];
                $time = $tmp[4] . ":" . $tmp[5];
            }
            echo '<ad>
                    <id><![CDATA[' . osc_item_id() . ']]></id>
                    <url><![CDATA[' . osc_item_url() . ']]></url>
                    <title><![CDATA[' . osc_item_title() . ']]></title>

                    <content><![CDATA[' . osc_item_description() . ']]></content>

                    <price><![CDATA[' . osc_item_price() . ']]></price>

                    <make><![CDATA[' . (isset($item['s_make']) ? $item['s_make'] : '') . ']]></make>
                    <model><![CDATA[' . (isset($item['s_model']) ? $item['s_model'] : '') . ']]></model>
                    <color><![CDATA[' . (isset($item['s_color']) ? $item['s_color'] : '') . ']]></color>

                    <mileage><![CDATA[' . (isset($item['i_mileage']) ? $item['i_mileage'] : '') . ']]></mileage>
                    <doors><![CDATA[' . (isset($item['i_doors']) ? $item['i_doors'] : '') . ']]></doors>
                    <fuel><![CDATA[' . (isset($item['e_fuel']) ? $item['e_fuel'] : '') . ']]></fuel>
                    <transmission><![CDATA[' . (isset($item['e_transmission']) ? $item['e_transmission'] : '') . ']]></transmission>
                    <engine_size><![CDATA[' . (isset($item['i_engine_size']) ? $item['i_engine_size'] : '') . ']]></engine_size>
                    <cylinders><![CDATA[' . (isset($item['i_cylinders']) ? $item['i_cylinders'] : '') . ']]></cylinders>
                    <power unit="' . (isset($item['e_power_unit']) ? $item['e_power_unit'] : '') . '"><![CDATA[' . (isset($item['i_power']) ? $item['i_power'] : '') . ']]></power>
                    <seats><![CDATA[' . (isset($item['i_seats']) ? $item['i_seats'] : '') . ']]></seats>
                    <gears><![CDATA[' . (isset($item['i_gears']) ? $item['i_gears'] : '') . ']]></gears>

                    <address><![CDATA[' . (osc_item_address() != '' ? osc_item_address() : '') . ']]></address>
                    <city><![CDATA[' . (osc_item_city() != '' ? osc_item_city() : '') . ']]></city>

                    <city_area><![CDATA[' . (osc_item_city_area() != '' ? osc_item_city_area() : '') . ']]></city_area>
                    <postcode><![CDATA[' . (osc_item_zip() != '' ? osc_item_zip() : '') . ']]></postcode>
                    <region><![CDATA[' . (osc_item_region() != '' ? osc_item_region() : '') . ']]></region>

                    <latitude><![CDATA[' . (osc_item_latitude() != '' ? osc_item_latitude() : '') . ']]></latitude>
                    <longitude><![CDATA[' . (osc_item_longitude() != '' ? osc_item_longitude() : '') . ']]></longitude>';
            $res_string = '';
            if (osc_count_item_resources() > 0) {
                while (osc_has_item_resources()) {
                    if (strpos(osc_resource_type(), 'image') !== FALSE) {
                        $res_string .= '<picture>
                                            <picture_url><![CDATA[' . osc_resource_path() . ']]></picture_url>
                                            <picture_title><![CDATA[' . osc_resource_name() . ']]></picture_title>
                                        </picture>';
                    }
                }
            }
            if ($res_string != '') {
                echo '<pictures>' . $res_string . '</pictures>';
            }
            echo '
                <date><![CDATA[' . $date . ']]></date>
                <time><![CDATA[' . $time . ']]></time>
            </ad>';
        }
    }
    echo '</trovit>';
}
开发者ID:oanav,项目名称:closetshare,代码行数:67,代码来源:trovit.php

示例11: _e

    ?>
            <?php 
    _e('Price', 'osclasswizards');
    ?>
: <?php 
    echo osc_item_formated_price();
    ?>
            <?php 
}
?>
        </div>
        <div class="item-date">
            <i class="fa fa-calendar"></i>
            <?php 
if (osc_item_pub_date() !== '') {
    printf(__('%1$s', 'osclasswizards'), osc_format_date(osc_item_pub_date()));
}
?>
        </div>
        <?php 
if (count($location) > 0) {
    ?>
        <div id="item_location">
            <i class="fa fa-map-marker"></i>
            <?php 
    echo implode(', ', $location);
    ?>
        </div>
        <?php 
}
?>
开发者ID:oanav,项目名称:closetshare,代码行数:31,代码来源:item-sidebar.php

示例12: osc_current_web_theme_path

        <meta name="googlebot" content="index, follow" />
    </head>
    <body class="container-fluid">
        <?php 
osc_current_web_theme_path('header.php');
?>
            
            <div class="featurette col-md-8">
                <div class="text-right">
                    <h1><?php 
echo osc_item_title();
?>
</h1>
                    <em class="publish"><?php 
if (osc_item_pub_date() != '') {
    echo __('Published date', 'nepcoders') . ': ' . osc_format_date(osc_item_pub_date());
}
?>
</em>
                    <em class="update"><?php 
if (osc_item_mod_date() != '') {
    echo __('Modified date', 'nepcoders') . ': ' . osc_format_date(osc_item_mod_date());
}
?>
</em>
                </div>
                <!--Image-->
                <div class="col-md-5">
                <?php 
if (osc_images_enabled_at_items()) {
    ?>
开发者ID:jhalendra,项目名称:classmandu,代码行数:31,代码来源:item2.php

示例13: osc_resource_thumbnail_url

            echo osc_resource_thumbnail_url();
            ?>
";
                <?php 
        } else {
            ?>
                image ="<?php 
            echo osc_current_web_theme_url('images/no_photo.gif');
            ?>
";
            <?php 
        }
        ?>
    
            pub_date = "<?php 
        echo osc_item_pub_date();
        ?>
";
            lat = "<?php 
        echo osc_item_latitude();
        ?>
";
            lon = "<?php 
        echo osc_item_longitude();
        ?>
";
            var arr = {
                name:name,
                url:url,
                category:category,
                address:address, 
开发者ID:jhalendra,项目名称:classmandu,代码行数:31,代码来源:google-maps.php

示例14: 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;
            while (osc_has_items() and $i < $limit_items and $i < $max_secure) {
                seo_sitemap_add_url(osc_item_url(), substr(osc_item_mod_date() != '' ? osc_item_mod_date() : osc_item_pub_date(), 0, 10), 'daily');
                $i++;
            }
        }
    }
    $end_xml = '</urlset>';
    file_put_contents($filename, $end_xml, FILE_APPEND);
    // PING SEARCH ENGINES
    seo_sitemap_ping_engines();
    $time_elapsed = microtime(true) - $start_time;
//.........这里部分代码省略.........
开发者ID:michaelxizhou,项目名称:myeden69-original-backup,代码行数:101,代码来源:sitemap.php

示例15: osc_item_country

}
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()));
}
?>
            </div>
            <div>
                <?php 
if (osc_item_mod_date() !== '') {
    printf(__('<strong class="update">Modified date:</strong> %1$s', 'osclassclsx'), osc_format_date(osc_item_mod_date()));
}
?>
            </div>
            <?php 
if (count($location) > 0) {
    ?>
                <ul id="item_location">
                    <li><strong><?php 
开发者ID:kraymond70,项目名称:osclassclsx,代码行数:31,代码来源:item.php


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