Solved this finally.....
In theme functions.php
function item_sms_premium_expire_date($item_id = null) {
$item_id = ($item_id < 1 ) ? ((osc_premium_id() > 0) ? osc_premium_id() : ((osc_item_id() > 0) ? osc_item_id() : null)) : $item_id;
$dao = new DAO();
$table = 't_item_sms_premium_expire';
$dao->dao->select('*');
$dao->dao->where('item_id', $item_id);
$dao->dao->from(DB_TABLE_PREFIX . $table);
$result = $dao->dao->get();
if (!$result->row()) {
return NULL;
}
$date = $result->row();
return $date['expire_date'];
}
And in user_items.php
<span>
<?php if (osc_item_is_premium()) { ?>
<span class="label"><?php _e('Premium ends', 'veronika'); ?>:</span> <?php echo date('d/m/Y', strtotime(item_sms_premium_expire_date())); ?></span>
<?php } ?></span>