<?php
// --------------------------------------------------------------------------
//
// Esvon Classifieds v.4.0
// Copyright(C), Esvon LTD, 2001-2010, All Rights Reserved.
// E-mail: hide@address.com
//
// All forms of reproduction, including, but not limited to, internet posting,
// printing, e-mailing, faxing and recording are strictly prohibited.
// One license required per site running Esvon Classifieds.
// To obtain a license for using Esvon Classifieds, please register at
// http://www.esvon.com/pg/products/p_classifieds/
//
// --------------------------------------------------------------------------
function block_Ad_Details_Reviews(&$tpl){
global $db,$DATE_FMT,$a_Ad;
$res = $db->query('SELECT id AS rev_id, review AS rev_txt, caption AS rev_title, username AS rev_username,UNIX_TIMESTAMP(date) AS rev_date FROM '.
hwModTable('Reviews','data').' WHERE link_id='.$a_Ad['link_id'].' AND approved="1" ORDER BY date DESC');
$z = array();
$z['rev_num'] = mysql_num_rows($res);
$tpl->AddCell('b_Reviews',$z,'start');
if($z['rev_num']<1) $tpl->AddCell('b_Reviews','','no');
else{
while($z = mysql_fetch_assoc($res)){
$z['rev_date'] = strftime($DATE_FMT, $z['rev_date']);
$tpl->AddCell('b_Reviews',$z,'row');
}
}
$tpl->AddCell('b_Reviews','','end');
}
?>