本文整理汇总了PHP中osc_item_is_premium函数的典型用法代码示例。如果您正苦于以下问题:PHP osc_item_is_premium函数的具体用法?PHP osc_item_is_premium怎么用?PHP osc_item_is_premium使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了osc_item_is_premium函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: while
$listcount = 0;
while (osc_has_items()) {
if ($listcount % 3 == 0) {
echo '</ul><ul class="row">';
}
$listcount++;
$admin = false;
if (View::newInstance()->_exists("listAdmin")) {
$admin = true;
}
?>
<?php
$size = explode('x', osc_thumbnail_dimensions());
?>
<li class="col-sm-6 col-md-4 <?php
if (osc_item_is_premium()) {
echo ' premium';
}
?>
">
<div class="listing-card">
<?php
if (osc_images_enabled_at_items()) {
?>
<?php
if (osc_count_item_resources()) {
?>
<a class="listing-thumb" href="<?php
echo osc_item_url();
?>
" title="<?php
示例2: 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 {
return osc_isExpired(osc_item_dt_expiration());
}
}
示例3: get_row_status
/**
* Get the status of the row. There are five status:
* - spam
* - blocked
* - inactive
* - premium
* - active
*
* @since 3.2
*
* @return array Array with the class and text of the status of the listing in this row. Example:
* array(
* 'class' => '',
* 'text' => ''
* )
*/
private function get_row_status()
{
if( osc_item_is_spam() ) {
return array(
'class' => 'status-spam',
'text' => __('Spam')
);
}
if( !osc_item_is_enabled() ) {
return array(
'class' => 'status-blocked',
'text' => __('Blocked')
);
}
if( !osc_item_is_active() ) {
return array(
'class' => 'status-inactive',
'text' => __('Inactive')
);
}
if( osc_item_is_premium() ) {
return array(
'class' => 'status-premium',
'text' => __('Premium')
);
}
return array(
'class' => 'status-active',
'text' => __('Active')
);
}
示例4: _e
_e('No Latest Items', 'modern');
?>
</p>
<?php
} else {
?>
<table border="0" cellspacing="0">
<tbody>
<?php
$class = "even";
?>
<?php
while (osc_has_latest_items()) {
?>
<tr class="<?php
echo $class . (osc_item_is_premium() ? " premium" : "");
?>
">
<?php
if (osc_images_enabled_at_items()) {
?>
<td class="photo">
<?php
if (osc_count_item_resources()) {
?>
<a href="<?php
echo osc_item_url();
?>
">
<img src="<?php
echo osc_resource_thumbnail_url();
示例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;
}
}
}
}