<?php

/**

* @version		0.9.1

* @package		DJ Classifieds

* @subpackage	DJ Classifieds Items Module

* @copyright	Copyright (C) 2010 Blue Constant Media LTD, All rights reserved.

* @license		http://www.gnu.org/licenses GNU/GPL

* @autor url    http://design-joomla.eu

* @autor email  contact@design-joomla.eu

* @Developer    Lukasz Ciastek - lukasz.ciastek@design-joomla.eu

* 

* 

* DJ Classifieds is free software: you can redistribute it and/or modify

* it under the terms of the GNU General Public License as published by

* the Free Software Foundation, either version 3 of the License, or

* (at your option) any later version.

*

* DJ Classifieds is distributed in the hope that it will be useful,

* but WITHOUT ANY WARRANTY; without even the implied warranty of

* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the

* GNU General Public License for more details.

*

* You should have received a copy of the GNU General Public License

* along with DJ Classifieds. If not, see <http://www.gnu.org/licenses/>.

* 

*/

?>





<div class="mod_djclassifieds_items clearfix">

<div class="items">

<?php	

	foreach($items as $i){

		echo '<div class="item" style="margin-bottom:10px;">';

		echo '<div class="title">';

		if($i->image_url!='' && $params->get('show_img')==1){

			$images=explode(';',$i->image_url);			

			echo '<img style="margin-right:3px;" src="'.JURI::base().'/components/com_djclassifieds/images/'.$images[0].'.ths.jpg"  />';

		}

		echo '<a class="title" href="index.php?option=com_djclassifieds&view=showitem&cid='.$i->cat_id.'&id='.$i->id.'&Itemid='.$itemid.'">'.$i->name.'</a>';

		echo '</div>';

		if(($params->get('show_date')==1) || ($params->get('show_cat')==1)){

			echo '<div class="date_cat" style="padding-top:2px;" >';

			if($params->get('show_date')==1){

				echo '<span style="margin-right:3px; font-size:0.9em;" class="date">'.$i->date_start.'</span>';

			}

			if($params->get('show_cat')==1){

				echo '<span style="font-size:0.9em;" class="category">'.$i->c_name.'</span>';

			}	

			echo '</div>';

		}		

		if($params->get('show_description')==1){

			echo '<div class="desc" style="padding-top:2px;">';

			if($params->get('desc_link')==1){

				echo '<a href="index.php?option=com_djclassifieds&view=showitem&cid='.$i->cat_id.'&id='.$i->id.'&Itemid='.$itemid.'">';

			}

				$desc_c = $params->get('char_desc_nr');

				if($desc_c!=0 && $i->intro_desc!='' && strlen($i->intro_desc)>$desc_c){

					echo mb_substr($i->intro_desc, 0, $desc_c,'utf-8').' ...';

				}else{

					echo $i->intro_desc;

				}

			if($params->get('desc_link')==1){

				echo '</a>';

			}

			echo '</div>';

		}

		echo '</div>';

	}

?>

</div>

</div>