本文整理汇总了PHP中osc_item_id函数的典型用法代码示例。如果您正苦于以下问题:PHP osc_item_id函数的具体用法?PHP osc_item_id怎么用?PHP osc_item_id使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了osc_item_id函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: digitalgoods_item_detail
function digitalgoods_item_detail()
{
if (osc_is_this_category('digitalgoods', osc_item_category_id())) {
$dg_files = DGModel::newInstance()->getFilesFromItem(osc_item_id());
require_once 'item_detail.php';
}
}
示例2: show_qrcode
function show_qrcode()
{
$filename = osc_item_id() . "_" . md5(osc_item_url()) . "_" . osc_get_preference("code_size", "qrcode") . ".png";
if (!file_exists(osc_get_preference('upload_path', 'qrcode') . $filename)) {
qrcode_generateqr(osc_item_url(), osc_item_id());
}
echo '<img src="' . osc_get_preference('upload_url', 'qrcode') . $filename . '" alt="QR CODE" id="qrcode_' . osc_item_id() . '" class="qrcode" />';
}
示例3: 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>';
}
示例4: 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>';
}
示例5: watchlist
function watchlist()
{
if (osc_is_web_user_logged_in()) {
$id = osc_item_id();
$class = '';
$title = '';
if (watchlist_exists($id)) {
$class = 'full';
$title = __('Remove from watchlist', 'watchlist');
} else {
$class = 'empty';
$title = __('Add to watchlist', 'watchlist');
}
echo '<a class="watchlist ' . $class . '" id="' . $id . '"><span title="' . $title . '"></span>';
if ($class == 'empty') {
echo __('Add to watchlist', 'watchlist');
} else {
echo __('Remove from watchlist', 'watchlist');
}
echo '</a>';
} else {
echo '<a class="watchlist empty" onclick="swal(' ' . __('You must login to save favorites', 'pop') . ' ')"><span title="' . $title . '"></span>' . __('Add to watchlist', 'watchlist') . '</a>';
}
}
示例6:
if (can_vote($itemId, $userId, $hash)) {
ModelVoting::newInstance()->insertItemVote($itemId, $userId, $iVote, $hash);
}
} else {
if ($user == 1 && is_null($hash)) {
if (can_vote($itemId, $userId, $hash)) {
ModelVoting::newInstance()->insertItemVote($itemId, $userId, $iVote, $hash);
}
}
}
}
// return updated voting
$item = Item::newInstance()->findByPrimaryKey($itemId);
View::newInstance()->_exportVariableToView('item', $item);
if (osc_is_this_category('voting', osc_item_category_id())) {
$aux_vote = ModelVoting::newInstance()->getItemAvgRating(osc_item_id());
$aux_count = ModelVoting::newInstance()->getItemNumberOfVotes(osc_item_id());
$vote['vote'] = $aux_vote['vote'];
$vote['total'] = $aux_count['total'];
$vote['can_vote'] = true;
if (osc_get_preference('user', 'voting') == 1) {
if (!osc_is_web_user_logged_in()) {
$vote['can_vote'] = false;
}
}
if (!can_vote(osc_item_id(), osc_logged_user_id(), $hash)) {
$vote['can_vote'] = false;
}
require 'view_votes.php';
}
}
示例7: osc_item_send_friend_url
/**
* Gets url of send a friend (current item)
*
* @return string
*/
function osc_item_send_friend_url()
{
if (osc_rewrite_enabled()) {
return osc_base_url() . osc_get_preference('rewrite_item_send_friend') . '/' . osc_item_id();
} else {
return osc_base_url(true) . "?page=item&action=send_friend&id=" . osc_item_id();
}
}
示例8: osclass_pm_link
function osclass_pm_link($class = '')
{
if (osc_is_ad_page() && osc_is_web_user_logged_in() && osc_item_user_id() != '') {
$user = User::newInstance()->findByPrimaryKey(osc_item_user_id());
echo '<a class="' . $class . '" href="' . osc_base_url(true) . '?page=custom&file=osclass_pm/user-send.php&userId=' . osc_item_user_id() . '&itemId=' . osc_item_id() . '&mType=new">Postavi pitanje prodavcu </a>';
} elseif (osc_is_ad_page() && !osc_is_web_user_logged_in()) {
$user = User::newInstance()->findByPrimaryKey(osc_item_user_id());
echo '<a class="' . $class . '" href="' . osc_user_login_url() . '&http_referer=' . osc_base_url(true) . '?page=custom&file=osclass_pm/user-send.php&userId=' . osc_item_user_id() . '&itemId=' . osc_item_id() . '&mType=new">' . __('Login to contact seller.', 'osclass_pm') . '</a>';
}
}
示例9: _e
<div class="header">
<h1><?php
_e('Send to a friend', 'bender');
?>
</h1>
</div>
<div class="resp-wrapper">
<ul id="error_list"></ul>
<form name="sendfriend" action="<?php
echo osc_base_url(true);
?>
" method="post" >
<input type="hidden" name="action" value="send_friend_post" />
<input type="hidden" name="page" value="item" />
<input type="hidden" name="id" value="<?php
echo osc_item_id();
?>
" />
<?php
if (osc_is_web_user_logged_in()) {
?>
<input type="hidden" name="yourName" value="<?php
echo osc_esc_html(osc_logged_user_name());
?>
" />
<input type="hidden" name="yourEmail" value="<?php
echo osc_logged_user_email();
?>
" />
<?php
} else {
示例10: _e
_e('Attachment', 'bender');
?>
:</label>
<div class="controls"><?php
ContactForm::your_attachment();
?>
</div>
</div>
<?php
}
?>
<div class="control-group">
<div class="controls">
<?php
osc_run_hook('item_contact_form', osc_item_id());
?>
<?php
if (osc_recaptcha_public_key()) {
?>
<script type="text/javascript">
var RecaptchaOptions = {
theme : 'custom',
custom_theme_widget: 'recaptcha_widget'
};
</script>
<style type="text/css">
div#recaptcha_widget, div#recaptcha_image > img { width:240px; margin-top: 5px; }
div#recaptcha_image { margin-bottom: 15px; }
</style>
<div id="recaptcha_widget">
示例11: osc_get_item_meta
/**
* Gets item meta fields
*
* @return array
*/
function osc_get_item_meta()
{
if (!View::newInstance()->_exists('metafields')) {
View::newInstance()->_exportVariableToView('metafields', Item::newInstance()->metaFields(osc_item_id()));
}
return View::newInstance()->_get('metafields');
}
示例12: osc_route_url
?>
">Edit</a></span></td>
<td>
<td>
<?php
if (osc_item_is_premium()) {
?>
<h5>Premium Item</h5>
<?php
} else {
?>
<?php
if (nc_osc_premium_fee_enabled()) {
?>
<h5><a style="text-decoration:underline;" href="<?php
echo osc_route_url('payment-publish', array('itemId' => osc_item_id()));
?>
">Mark Premium</a></h5>
<?php
}
?>
<?php
}
?>
</td>
</tr>
<?php
}
?>
<?php
}
示例13: osc_run_hook
?>
<div class="hook-item-detail">
<?php
osc_run_hook('item_detail', osc_item());
?>
</div>
<span><i class="ico-location_pin"></i><?php
echo osc_item_city();
?>
</span>
</div>
<div class="item-location">
<img src="<?php
echo pop_get_listing_map_image(osc_item_id());
?>
"/>
</div>
<div class="share-links">
<span><?php
_e('Share it!', 'pop');
?>
</span>
<p>
<a href="<?php
echo osc_esc_html(pop_facebook_share_url());
?>
" class="share-icon-bg facebook-icon"></a>
<a href="<?php
echo osc_esc_html(pop_twitter_share_url());
示例14: osc_item_contact_name
if (osc_count_custom_items() >= 2) {
?>
<div class="widget">
<h3><?php
echo osc_item_contact_name();
?>
<?php
_e('Listings', 'flatter');
?>
</h3>
<div class="wblock sellerlisting">
<?php
while (osc_has_custom_items()) {
?>
<div class="item <?php
if ($ltd == osc_item_id()) {
echo "current";
}
?>
clearfix">
<div class="row">
<?php
if (osc_images_enabled_at_items()) {
?>
<div class="col-md-4 col-sm-4 col-xs-4 picture">
<?php
if (osc_count_item_resources() >= 1) {
?>
<a href="<?php
echo osc_item_url();
示例15: _e
" ><?php
_e('Delete', 'bender');
?>
</a>
<?php
if (osc_item_is_inactive()) {
?>
<span>|</span>
<a href="<?php
echo osc_item_activate_url();
?>
" ><?php
_e('Activate', 'bender');
?>
</a>
<?php
}
?>
<?php
if (function_exists("republish_pro_link")) {
republish_pro_link(osc_item_id());
}
?>
</span>
<?php
}
?>
</div>
</div>
</div>
</li>