Location: PHPKode > projects > Esvon Personals > esvon-personals/inc/blocks/block-Latest_Ads.php
<?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/
//
// --------------------------------------------------------------------------

// Recently added/updated listings list (category specific)

function block_Latest_Ads(&$tpl, $args = ''){

  $amt = isset($args['amount']) ? abs(intval($args['amount'])) : 10;

  if($args['cid']) $cid = (int)$args['cid'];
  elseif($_REQUEST['cid']) $cid = (int)$_REQUEST['cid'];
  elseif($_REQUEST['cat']) $cid = (int)$_REQUEST['cat'];
  else $cid = 0;

  $cache = &Factory::singleton('Hw_Cache');
  $a_v = $cache->get("b_Latest_Ads_$cid", "hwGetTopAds($cid,'hw_updated',$amt)", TRUE);

  if($a_v) foreach($a_v as $v){
    $tpl->AddCell('b_Latest_Ads',$v);
  }

}

?>
Return current item: Esvon Personals