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


PHP osc_item函数代码示例

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


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

示例1: google_maps_location

function google_maps_location()
{
    $item = osc_item();
    if (osc_google_maps_key() != '') {
        osc_google_maps_header();
        require 'map.php';
    }
}
开发者ID:hashemgamal,项目名称:OSClass,代码行数:8,代码来源:index.php

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

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

示例4: item_address

function item_address()
{
    ?>
        <?php 
    $item = osc_item() != null ? osc_item() : array();
    ?>
        <input type="text" id="address" name="address" value="<?php 
    echo get_item_address($item);
    ?>
" />
        <?php 
}
开发者ID:ricktaylord,项目名称:osclass-themes,代码行数:12,代码来源:functions.php

示例5: printLocaleDescription

function printLocaleDescription($locales = null, $item = null)
{
    if ($locales == null) {
        $locales = osc_get_locales();
    }
    if ($item == null) {
        $item = osc_item();
    }
    $num_locales = count($locales);
    foreach ($locales as $locale) {
        $name = 'description' . '[' . $locale['pk_c_code'] . ']';
        echo '<div><label for="description">' . __('Description') . ' *</label>';
        $description = isset($item) && isset($item['locale'][$locale['pk_c_code']]) && isset($item['locale'][$locale['pk_c_code']]['s_description']) ? $item['locale'][$locale['pk_c_code']]['s_description'] : '';
        if (Session::newInstance()->_getForm('description') != "") {
            $description_ = Session::newInstance()->_getForm('description');
            if ($description_[$locale['pk_c_code']] != "") {
                $description = $description_[$locale['pk_c_code']];
            }
        }
        echo '<textarea id="' . $name . '" name="' . $name . '" rows="10">' . $description . '</textarea></div>';
    }
}
开发者ID:naneri,项目名称:Osclass,代码行数:22,代码来源:functions.php

示例6: osc_esc_html

                        <a href="<?php 
echo osc_esc_html(pop_email_share_url());
?>
" title="Share" class="share-icon email-icon"></a>
                        <p>
                </div>
            </div>

            <div class="item-details">
                <div class="header"><?php 
_e('Details', 'pop');
?>
 </div>

                <?php 
osc_run_hook('item_detail', osc_item());
?>

                <div id="custom_fields">
                    <?php 
if (osc_count_item_meta() >= 1) {
    ?>
                    <div class="meta_list">
                        <?php 
    while (osc_has_item_meta()) {
        ?>
                        <?php 
        if (osc_item_meta_value() != '') {
            ?>
                        <div class="meta">
                            <strong><?php 
开发者ID:oanav,项目名称:closetshare,代码行数:31,代码来源:item.php

示例7: _e

?>
" ;
            twitter_theme.max_images_fields_txt   = "<?php 
_e('Sorry, you have reached the maximum number of images per ad', 'twitter_bootstrap');
?>
" ;
            twitter_theme.country_select_id       = "<?php 
echo get_country_id(osc_item() != null ? osc_item() : array());
?>
" ;
            twitter_theme.region_select_id        = "<?php 
echo get_region_id(osc_item() != null ? osc_item() : array());
?>
" ;
            twitter_theme.city_select_id          = "<?php 
echo get_city_id(osc_item() != null ? osc_item() : array());
?>
" ;
            twitter_theme.ajax_url                = "<?php 
echo osc_base_url(true) . '?page=ajax';
?>
" ;
            twitter_theme.text_select_country     = "<?php 
_e('Select a country...', 'twitter_bootstrap');
?>
" ;
            twitter_theme.text_select_region      = "<?php 
_e('Select a region...', 'twitter_bootstrap');
?>
" ;
            twitter_theme.text_select_city        = "<?php 
开发者ID:nsswaga,项目名称:OSClass,代码行数:31,代码来源:item-post.php

示例8: google_maps_location

function google_maps_location()
{
    $item = osc_item();
    osc_google_maps_header();
    require 'map.php';
}
开发者ID:keramist,项目名称:Osclass,代码行数:6,代码来源:index.php

示例9: osc_item_views

/**
 * return number of views of current item
 *
 * @return int
 */
function osc_item_views()
{
    $item = osc_item();
    if (isset($item['i_num_views'])) {
        return (int) osc_item_field("i_num_views");
    } else {
        return ItemStats::newInstance()->getViews(osc_item_id());
    }
}
开发者ID:randomecho,项目名称:OSClass,代码行数:14,代码来源:hItems.php

示例10: multilanguage_form

function multilanguage_form($fields)
{
    $locales = osc_get_locales();
    $item = osc_item();
    $num_locales = count($locales);
    foreach ($locales as $locale) {
        foreach ($fields as $field) {
            if ($num_locales > 1) {
                echo '<div class="switch-locale locale-' . $locale['pk_c_code'] . '">';
            }
            multilanguage_form_create_field($locale, $field);
            if ($num_locales > 1) {
                echo '</div>';
            }
        }
    }
}
开发者ID:blairmain,项目名称:theme-realestate,代码行数:17,代码来源:functions.php

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

示例12: osc_item_field

function osc_item_field($field, $locale = "")
{
    return osc_field(osc_item(), $field, $locale);
}
开发者ID:hashemgamal,项目名称:OSClass,代码行数:4,代码来源:hItems.php

示例13: _e

                            <label class="control-label" for="city"><?php 
_e('City', 'pop');
?>
</label>
                            <div class="controls">
                                <?php 
if ($action == 'item_add_post') {
    ?>
                                <?php 
    ItemForm::city_select(osc_get_cities(osc_user_region_id()), osc_user());
    ?>
                                <?php 
} else {
    ?>
                                <?php 
    ItemForm::city_select(null, osc_item());
    ?>
                                <?php 
}
?>
                            </div>
                        </div>
                        <div class="control-group">
                            <label class="control-label" for="cityArea"><?php 
_e('City Area', 'pop');
?>
</label>
                            <div class="controls">
                                <?php 
ItemForm::city_area_text(osc_user());
?>
开发者ID:oanav,项目名称:closetshare,代码行数:31,代码来源:item-post.php

示例14: osc_item_url

/**
 * Create automatically the url of the item details page
 *
 * @param string $locale
 * @return string
 */
function osc_item_url($locale = '')
{
    return osc_item_url_from_item(osc_item(), $locale);
}
开发者ID:oanav,项目名称:closetshare,代码行数:10,代码来源:hDefines.php

示例15: oodle_realstate

function oodle_realstate()
{
    echo '<?xml version="1.0" encoding="utf-8"?><listings>';
    if (osc_count_items()) {
        while (osc_has_items()) {
            $item = feed_get_house_data(osc_item());
            $time = explode(" ", osc_item_pub_date());
            if (isset($item['s_square_meters'])) {
                $lot_size = $item['s_square_meters'] * 10.7639104;
            } else {
                $lot_size = 0;
            }
            $amenities = array();
            if (isset($item['b_heating']) && $item['b_heating']) {
                $amenities[] = __('Heating', 'extra_feeds');
            }
            if (isset($item['b_air_condition']) && $item['b_air_condition']) {
                $amenities[] = __('Air condition', 'extra_feeds');
            }
            if (isset($item['b_elevator']) && $item['b_elevator']) {
                $amenities[] = __('Elevator', 'extra_feeds');
            }
            if (isset($item['b_terrace']) && $item['b_terrace']) {
                $amenities[] = __('Terrace', 'extra_feeds');
            }
            if (isset($item['b_parking']) && $item['b_parking']) {
                $amenities[] = __('Parking', 'extra_feeds');
            }
            echo '<listing>
                <category>' . osc_item_category() . '</category> 
                <description><![CDATA[' . osc_item_description() . ']]></description> 
                <id>' . osc_item_id() . '</id> 
                <title><![CDATA[' . osc_item_title() . ']]></title> 
                <url>' . osc_item_url() . '</url> 
                <address>' . osc_item_address() . '</address> 
                <city>' . osc_item_city() . '</city> 
                <country>' . osc_item_country_code() . '</country> 
                <neighborhood>' . osc_item_city_area() . '</neighborhood> 
                <state>' . osc_item_region() . '</state> 
                <zip_code>' . osc_item_zip() . '</zip_code> 
                <longitude>' . osc_item_longitude() . '</longitude>
                <latitude>' . osc_item_latitude() . '</latitude>
                <amenities>' . implode(", ", $amenities) . '</amenities>
                <bathrooms>' . @$item['i_num_bathrooms'] . '</bathrooms>
                <bedrooms>' . @$item['i_num_rooms'] . '</bedrooms>
                <condition>' . @$item['e_status'] . '</condition>
                <create_time>' . $time[0] . '</create_time>
                <currency>' . osc_item_currency() . '</currency>
                <furnished>' . (@$item['b_furnished'] ? 'Furnished' : '') . '</furnished>';
            if (osc_count_item_resources() > 0) {
                if (strpos(osc_resource_type(), 'image') !== FALSE) {
                    echo '<image_url><![CDATA[' . osc_resource_path() . ']]></image_url>';
                }
            }
            echo '<lot_size>' . $lot_size . '</lot_size>
                <lot_size_units>square feet</lot_size_units>
                <price>' . osc_item_price() . '</price>
                <seller_email>' . osc_item_contact_email() . '</seller_email> 
                <seller_name><![CDATA[' . osc_item_contact_name() . ']]></seller_name> 
                <year>' . @$item['i_year'] . '</year>
        </listing>';
        }
    }
    echo '</listings>';
}
开发者ID:oanav,项目名称:closetshare,代码行数:65,代码来源:oodle.php


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