LaRutaMoskitia.com
 

setValue("avis_enviaurl","http://".$_SERVER["HTTP_HOST"].$_SERVER["PHP_SELF"]); $monthArr = array($lang['avisos']['january'], $lang['avisos']['february'], $lang['avisos']['march'], $lang['avisos']['april'], $lang['avisos']['may'], $lang['avisos']['june'], $lang['avisos']['july'], $lang['avisos']['august'], $lang['avisos']['september'], $lang['avisos']['october'], $lang['avisos']['november'], $lang['avisos']['december']); /***** Avis Listing *****/ if($avis_id==""){ $listno = $AW_System->getValue("avis_avisno"); $fechactual = date("Y-m-d"); $AW_Avis->data = array("avis_id","titulo", "resumen", "date_format(publicacion,' %d, %Y')", "date_format(publicacion,'%m')","imgmini"); if($condicion_id!="" && $condicion_id!=0){ $AW_Avis->where = "avistipo='avis' and revelar='Si' and (expiracion='0000-00-00' or expiracion>date_format('$fechactual', '%Y-%m-%d')) and publicacion<=date_format('$fechactual', '%Y-%m-%d') and condicion_id='$condicion_id'"; $toptitulo = $lang['avisos']['titulocondicion']." - ".stripslashes($AW_Avis_Condicion->getName($condicion_id)); }else if($arcyear!="" && $arcmonth!=""){ $AW_Avis->where = "revelar='Si' and avistipo='avis' and date_format(publicacion,'%Y')=$arcyear and date_format(publicacion,'%c')=$arcmonth"; $month = date("m",mktime(0,0,0,$arcmonth,1,$arcyear))-1; $toptitulo = $lang['avisos']['tituloarchive']." - ".$monthArr[$month].date(" Y",mktime(0,0,0,$arcmonth,1,$arcyear)); }else{ $AW_Avis->where = "revelar='Si' and avistipo='avis' and (expiracion='0000-00-00' or expiracion>date_format('$fechactual', '%Y-%m-%d')) and publicacion<=date_format('$fechactual', '%Y-%m-%d') "; $toptitulo = $lang['avisos']['titulolatest']; } $AW_Avis->order = "publicacion desc"; $derivado=$AW_Avis->getList(); if(mysql_num_rows($derivado)!=0){ $total=mysql_num_rows($derivado); }else{ $total=0; } if($start=="" || $start==0){ $start=0; } $prev=$start-$listno; $next=$start+$listno; $from=$start+1; $to=$listno+$from-1; if($to>=$total){ $to=$total; }if($to<$from){ $from=0; } //CESAR $mostrando="Resultados ".$from." a ".$to." de ".$total; //FIN CESAR if($prev>=0){ $prevlink="".$lang['avisos']['prev'].""; }else{ $prevlink=""; } if($next<$total){ $nextlink="".$lang['avisos']['next'].""; }else{ $nextlink=""; } if($prevlink!="" && $nextlink!=""){ $navline=" || "; } echo "
$toptitulo


$mostrando || $navline $prevlink $navline $nextlink

"; $AW_Avis->order = "publicacion desc limit $start, $listno"; $derivado = $AW_Avis->getList(); if (mysql_num_rows($derivado)>0){ while($decfila=mysql_fetch_row($derivado)){ $decfila[1] = stripslashes($decfila[1]); $decfila[2] = stripslashes($decfila[2]); $posted = $monthArr[$decfila[4]-1].$decfila[3]; $imgmini = ($decfila[5]!=""?"":""); echo " "; } }else{ echo ""; } echo "
$imgmini
$posted

$decfila[2]...



".$lang['avisos']['noavisfound']."


"; } /***** Avis Details *****/ if($avis_id!=""){ /*****Navigation Link Calculation*****/ $fechactual = date("Y-m-d"); $AW_Avis->data=array("avis_id"); $AW_Avis->data = array("avis_id","date_format(publicacion,'%M %d, %Y')", "titulo", "resumen", "contenido"); if($condicion_id!="" && $condicion_id!=0){ $AW_Avis->where = "avistipo='avis' and revelar='Si' and (expiracion='0000-00-00' or expiracion>date_format('$fechactual', '%Y-%m-%d')) and publicacion<=date_format('$fechactual', '%Y-%m-%d') and condicion_id='$condicion_id'"; }else if($arcyear!="" && $arcmonth!=""){ $AW_Avis->where = "revelar='Si' and avistipo='avis' and date_format(publicacion,'%Y')=$arcyear and date_format(publicacion,'%c')=$arcmonth"; }else{ $AW_Avis->where = "revelar='Si' and avistipo='avis' and (expiracion='0000-00-00' or expiracion>date_format('$fechactual', '%Y-%m-%d')) and publicacion<=date_format('$fechactual', '%Y-%m-%d') "; } $AW_Avis->order = "publicacion desc"; $derivado=$AW_Avis->getList(); $count=0; while($decfila=mysql_fetch_row($derivado)){ if($decfila[0]==$avis_id){ $curpos=$count; } $count++; } $prevpos=$curpos-1; $nextpos=$curpos+1; $curpos=$curpos+1; $total=mysql_num_rows($derivado); if($prevpos>=0){ mysql_data_seek($derivado,$prevpos); if($decfila=mysql_fetch_row($derivado)){ $previd=$decfila[0]; }} if($nextpos<$total){ mysql_data_seek($derivado,$nextpos); if($decfila=mysql_fetch_row($derivado)){ $nextid=$decfila[0]; }} mysql_free_result($derivado); /*****Begin Previous and Next Navigation Link. Modify To Match Your Display*****/ if($previd!=""){ $prevlink="".$lang['avisos']['prev']."";} if($nextid!=""){ $nextlink="".$lang['avisos']['next']."";} if($prevlink!="" && $nextlink!=""){ $navline="  "; } /*****Get Avis Details*****/ $AW_Avis->data = array("titulo", "contenido", "date_format(publicacion,' %d, %Y')", "date_format(publicacion,'%m')"); $derivado = $AW_Avis->getDetail($avis_id); if($decfila=mysql_fetch_row($derivado)){ $titulo = stripslashes($decfila[0]); $contenido = stripslashes($decfila[1]); $posted = $monthArr[$decfila[3]-1].$decfila[2]; } mysql_free_result($derivado); echo "
".$lang['avisos']['backtolist']."

$titulo
".$lang['avisos']['postedon']." $posted      ".$lang['avisos']['emailthis']."      ".$lang['avisos']['printthis']."

$contenido


"; } ?>

getValue("avis_bloquecat")=="Si"){ echo "
".$lang['avisos']['menucondicion']."

"; if($prede_id=="" || $prede_id==0){ $prede_id=0; echo ""; } $AW_Avis_Condicion->data = array("condicion_id","prede_id","name"); $AW_Avis_Condicion->where = "prede_id=$prede_id"; $AW_Avis_Condicion->order = "name"; $derivado = $AW_Avis_Condicion->getList(); if(mysql_num_rows($derivado)!=0){ while($decfila=mysql_fetch_row($derivado)){ $AW_Avis_Condicion->where = "prede_id=$decfila[0]"; $derivadochild = $AW_Avis_Condicion->getList(); $decfila[2] = stripslashes($decfila[2]); if(mysql_num_rows($derivadochild)!=0){ echo ""; }else{ echo ""; } mysql_free_result($derivadochild); } mysql_free_result($derivado); $AW_Avis_Condicion->data = array("prede_id","name"); $AW_Avis_Condicion->where = "condicion_id=$prede_id"; $AW_Avis_Condicion->order = ""; $derivado = $AW_Avis_Condicion->getList(); if($decfila=mysql_fetch_row($derivado)){ echo ""; } mysql_free_result($derivado); }else{ echo ""; } echo "
".$lang['avisos']['all']."
$decfila[2]
$decfila[2]

".$lang['avisos']['backtop']."

".$lang['avisos']['nocategories']."

"; } /***** Archives Block *****/ if($AW_System->getValue("avis_bloquefech")=="Si"){ echo "

".$lang['avisos']['menuarchive']."

".$lang['avisos']['all']."
"; $AW_Avis->data = array("distinct date_format(publicacion,'%m %Y')","date_format(publicacion,'%Y')","date_format(publicacion,'%c')"); $AW_Avis->order = "publicacion desc"; $derivado = $AW_Avis->getList(); if(mysql_num_rows($derivado)!=0){ while($decfila=mysql_fetch_row($derivado)){ $month = substr($decfila[0],0,2)-1; $year = substr($decfila[0],3,4); echo ""; } mysql_free_result($derivado); }else{ echo ""; } echo "
$monthArr[$month] $year
".$lang['avisos']['noarchives']."

"; } ?>