]*script*\"?[^>]*>", $secvalue)) { die ("I don't like you..."); } } if (eregi("functions.php",$PHP_SELF)) { Header("Location: index.php"); die(); } $module_name = basename(dirname(__FILE__)); function MenuNukeC($home=0) { /*1 = print link to home ; 0= dont print homelink*/ global $days,$user,$prefix,$db,$module_name,$sitename,$bgcolor2,$bgcolor3,$bgcolor4,$MemberorNot; global $id_catg,$multilingual,$currentlang,$dbname; OpenTable(); echo "
\"$sitename-$module_name\"
"; echo ""; echo ""; if ($home == 1) { echo ""; } $postlink = "modules.php?name=$module_name&file=postads"; if ($id_catg != "") { $postlink .= "&id_catg=$id_catg"; } echo ""; echo ""; echo ""; echo ""; echo "
\n" ."\n" ."\""._NUKECHOME."\"\n" ."" ."\n" ."\""._NUKECPOSTNEWADS."\"\n" ."\n" ."\n" ."\""._NUKECYOURADSBOX."\"\n" ."\n" ."\n" ."\""._NUKECMOSTPOP."\"\n" ."
"; echo ""; echo ""; echo "\n" ."" ."
"; echo ""._NUKECVIEWADSFOR." " ."\""._NUKECVIEW."\""; echo "
\n" .""._NUKECSEARCHADS." " ."\""._NUKECSEARCH."\"
"; $sqldisc = "select no from $prefix"."_ads_disclaimer"; if ($multilingual) { $sqldisc .= " where language='$currentlang'"; } else { $sqldisc .= " where language=''"; } $db->dbname = "enfermeria"; mysql_select_db($db->dbname); $re = $db->sql_query($sqldisc); if ($db->sql_numrows($re) > 0) { list ($no) = $db->sql_fetchrow($re); $db->dbname = $dbname; mysql_select_db($db->dbname); echo "
"._NUKECAGREE1.""._NUKECAGREE2."
"; } $db->dbname = $dbname; mysql_select_db($db->dbname); CloseTable(); } function printnotallowforanonymouse() { echo "
"._NUKECNOTUSER1."
" .""._NUKECNOTUSER2."

" .""._NUKECNOTUSER21."
" .""._NUKECNOTUSER22."
" .""._NUKECNOTUSER23."


" .""._NUKECNOTUSER3."
" .""._NUKECNOTUSER4."
" .""._NUKECNOTUSER5."
" .""._NUKECNOTUSER6."
" .""._NUKECNOTUSER7."

" .""._NUKECNOTUSER8."" ."
"; } function getparent($parentid,$title) { global $prefix, $db,$dbname; $db->dbname = "enfermeria"; mysql_select_db($db->dbname); $result = $db->sql_query("select id_catg, catg, parentid from ".$prefix."_ads_catg where id_catg=$parentid"); list($cid, $ptitle, $pparentid) = $db->sql_fetchrow($result); if ($ptitle!="") $title=$ptitle." >> ".$title; if ($pparentid!=0) { $title=getparent($pparentid,$title); } $db->dbname = $dbname; mysql_select_db($db->dbname); return $title; } function FormatDateAds($strDate){ $Adob = explode ("-",$strDate); $newdob = $Adob[2]; if ($Adob[1] == 1)$month = _JANUARY; if ($Adob[1] == 2)$month = _FEBRUARY; if ($Adob[1] == 3)$month = _MARCH; if ($Adob[1] == 4)$month = _APRIL; if ($Adob[1] == 5)$month = _MAY; if ($Adob[1] == 6)$month = _JUNE; if ($Adob[1] == 7)$month = _JULY; if ($Adob[1] == 8)$month = _AUGUST; if ($Adob[1] == 9)$month = _SEPTEMBER; if ($Adob[1] == 10)$month = _OCTOBER; if ($Adob[1] == 11)$month = _NOVEMBER; if ($Adob[1] == 12)$month = _DECEMBER; $newdob = "$month"." ".$newdob.", ".$Adob[0]; return $newdob; } function FormatDateAdsShort($strDate){ $Adob = explode ("-",$strDate); $newdob = $Adob[2]; if ($Adob[1] == 1)$month = _JANUARYSHRT; if ($Adob[1] == 2)$month = _FEBRUARYSHRT; if ($Adob[1] == 3)$month = _MARCHSHRT; if ($Adob[1] == 4)$month = _APRILSHRT; if ($Adob[1] == 5)$month = _MAYSHRT; if ($Adob[1] == 6)$month = _JUNESHRT; if ($Adob[1] == 7)$month = _JULYSHRT; if ($Adob[1] == 8)$month = _AUGUSTSHRT; if ($Adob[1] == 9)$month = _SEPTEMBERSHRT; if ($Adob[1] == 10)$month = _OCTOBERSHRT; if ($Adob[1] == 11)$month = _NOVEMBERSHRT; if ($Adob[1] == 12)$month = _DECEMBERSHRT; $newdob = "$month"." ".$newdob.", ".$Adob[0]; return $newdob; } function getcategoryname($id_catgtemp){ global $prefix,$db,$dbname; $db->dbname = "enfermeria"; mysql_select_db($db->dbname); $resultcatgname = $db->sql_query("select catg from $prefix"."_ads_catg where id_catg=$id_catgtemp"); list($title) = $db->sql_fetchrow($resultcatgname); $db->dbname = $dbname; mysql_select_db($db->dbname); return $title; } function getcategoryimage($id_catg){ global $module_name,$db,$dbname,$prefix,$currentlang; $db->dbname = "enfermeria"; mysql_select_db($db->dbname); $resultpic = $db->sql_query("select image from $prefix"."_ads_catg where id_catg='$id_catg'"); list ($catgpic) = $db->sql_fetchrow($resultpic); $db->dbname = $dbname; mysql_select_db($db->dbname); return $catgpic; } function getchildcategories($id_catg) { global $module_name,$db,$prefix,$currentlang,$dbname; $db->dbname = "enfermeria"; mysql_select_db($db->dbname); $child_categories = $db->sql_query("select id_catg from $prefix"."_ads_catg where parentid = '$id_catg'"); if ($db->sql_numrows($child_categories) > 1) { while ($child_categories_values = $db->sql_fetchrow($child_categories)) { $childcatg = getchildcategories($child_categories_values['id_catg']).$child_categories_values['id_catg']."_".$childcatg; } } else { $childcatg = $child_categories_values['id_catg']; } $db->dbname = $dbname; mysql_select_db($db->dbname); return $childcatg; } function countads_incategory($listchildx){ global $module_name,$db,$prefix,$currentlang,$multilingual,$dbname; $nowdate = date("Y-m-d"); $catg_array = explode("_",$listchildx); $parent = $catg_array[0]; $sql_ads = "select count(*) as total from $prefix"."_ads_ads where "; if ($multilingual) { $where .= " language='$currentlang' and "; } $jml = sizeof($catg_array) -2; if ($jml > 1) { $where .= "("; } $where .= " id_catg='$parent' "; if ($jml > 1) { $where .= " or "; } if ($jml > 1) { $k = 0; for ($i = 1;$i<= $jml;$i++) { $where .= "id_catg='$catg_array[$i]' "; if ($i != $jml) { $where .= "or "; } if ($i == $jml) { $where .= ")"; } $k++; } } $where .= " and validuntil > '$nowdate' and active = '1'"; $db->dbname = "enfermeria"; mysql_select_db($db->dbname); $resultads = $db->sql_query($sql_ads.$where); if (!$resultads) { $mensaje="
".$sql_ads.$where."
".mysql_error(); $db->dbname = $dbname; mysql_select_db($db->dbname); return $mensaje; } else { $totalads = $db->sql_fetchrow($resultads); //return $sql_ads.$where; $total=$totalads['total']; $db->dbname = $dbname; mysql_select_db($db->dbname); return $total; } } function themeads ($xid_ads,$xid_catg,$xtitle,$xads_desc,$ximageads,$curr,$xprice,$xsubmitter,$xemail,$xwebsite,$xdateposted,$xhits) { global $module_name,$bgcolor1,$bgcolor2,$bgcolor3,$prefix,$db,$usecatgimg,$dbname; $memberinfo = MemberInfo($xsubmitter); echo "\n"; echo " \n"; echo "\n"; echo "\n"; echo "\n"; echo " \n"; echo "\n"; echo "\n"; echo "
\n"; echo "\n"; echo " \n"; echo "\n"; echo "\n"; echo "
$xtitle
\n"; echo "
Posted On ".FormatDateAdsShort($xdateposted)." By ".$memberinfo[username]."
\n"; echo "
\n"; $imagemenu = ""; $imagemenu .= ""; if ($xsubmitter != 1) { $db->dbname = $dbname; mysql_select_db($db->dbname); $imagemenu .= ""; } if ($xemail != "") { $imagemenu .= ""; } $imagemenu .= ""; $imagemenu .= ""; $imagemenu .= ""; $imagemenu .= ""; $imagemenu .= "
\""._NUKECALTSENDPV."\"\""._NUKECCONTACTBYMAIL."\"\""._NUKECALTCOMMENT."\"\""._NUKECALTPUTINHOTADSBOX."\"\""._NUKECALTREFERTOFRIEND."\"
"; echo "
$imagemenu
\n"; echo "
\n"; echo "\n"; echo " \n"; echo " \n"; if ($ximageads != "") { $gbrsize = @getimagesize("modules/$module_name/imageads/".$ximageads); $gbr_width = $gbrsize[0]; $gbr_height = $gbrsize[1]; $img = "\"$xtitle\""; } elseif ($usecatgimg) { $sql = "select catg,image from $prefix"."_ads_catg where id_catg='$xid_catg'"; $db->dbname = "enfermeria"; mysql_select_db($db->dbname); $rescatgimg = $db->sql_query($sql); list($catg,$imagecatgsrc) = $db->sql_fetchrow($rescatgimg); $db->dbname = $dbname; mysql_select_db($db->dbname); if ($imagecatgsrc != "") { $imgdimension = @getimagesize("modules/$module_name/imagecatg/$imagecatgsrc"); if ($imgdimension) { $imgcatgwidth = $imgdimension[0]; $imgcatgheight = $imgdimension[1]; } $img = ""; $img .= "\"$catg\""; $img .= "
$catg"; } else { $img = ""; } } echo "\n"; echo "\n"; echo " \n"; echo "\n"; echo "\n"; echo "
$xads_desc
\n"; if (($xprice != "") and ($xprice != 0)) { echo ""._NUKECADSPRICE." : ".formatPrice($curr,$xprice); } echo "
$img
\n"; $ads_detail = ""._NUKECVIEWDETAIL.""; echo "
[ "._NUKECADSCATG." : ".getcategoryname($xid_catg)." "; if ($xwebsite != "") { echo "| "._NUKECADSURL." : $xwebsite "; } echo "| $xhits \n"; echo ""._NUKECREAD." | $ads_detail ]
\n"; echo "
\n"; echo "
\n"; } function themeadsdetail ($xid_ads,$xid_catg,$xtitle,$xads_desc,$ximageads,$xcurr,$xprice,$xsubmitter,$xemail,$xwebsite,$xdateposted,$xvaliduntil,$xhits) { global $usecatgimg,$module_name,$bgcolor1,$bgcolor2,$bgcolor3,$prefix,$db,$admin,$dbname; $memberinfo = MemberInfo($xsubmitter); echo "\n"; echo " \n"; echo "\n"; echo "\n"; echo "\n"; echo " \n"; echo "\n"; echo "\n"; echo "
\n"; echo "\n"; echo " \n"; echo "\n"; echo "\n"; if (is_admin($admin)) { echo ""; } echo "
$xtitle\n"; echo "
\""._NUKECEDIT."\" \""._NUKECDELETECOMM."\"
\n"; echo "
\n"; $imagemenu = ""; $imagemenu .= ""; if ($xsubmitter != 1) { $imagemenu .= ""; } if ($xemail != "") { $imagemenu .= ""; } $imagemenu .= ""; $imagemenu .= ""; $imagemenu .= ""; $imagemenu .= "
\""._NUKECALTSENDPV."\"\""._NUKECCONTACTBYMAIL."\"\""._NUKECALTPUTINHOTADSBOX."\"\""._NUKECALTREFERTOFRIEND."\"
"; echo "
$imagemenu
\n"; echo "
\n"; echo "\n"; echo " \n"; echo " \n"; echo "\n"; echo " \n"; echo "\n"; echo "\n"; echo ""; echo "
"; echo ""; echo ""; if ($ximageads != "") { $gbrsize = @getimagesize("modules/$module_name/imageads/".$ximageads); $gbr_width = $gbrsize[0]; $gbr_height = $gbrsize[1]; $img = ""; } elseif ($usecatgimg) { $sql = "select catg,image from $prefix"."_ads_catg where id_catg='$xid_catg'"; $db->dbname = "enfermeria"; mysql_select_db($db->dbname); $rescatgimg = $db->sql_query($sql); list($catg,$imagecatgsrc) = $db->sql_fetchrow($rescatgimg); $db->dbname = $dbname; mysql_select_db($db->dbname); if ($imagecatgsrc != "") { $imgdimension = @getimagesize("modules/$module_name/imagecatg/$imagecatgsrc"); if ($imgdimension) { $imgcatgwidth = $imgdimension[0]; $imgcatgheight = $imgdimension[1]; } $img = ""; } else { $img = ""; } } echo $img; echo "\n"; echo ""; echo "\n"; echo ""; echo ""; if (($xprice != "") and ($xprice != 0)) { echo ""; } $daysremain = countremaindays($xvaliduntil); echo ""; echo ""; echo ""; echo "
$xads_desc"; $img .= "\"$xtitle\""; $img .= ""; $img .= "\"$catg\""; $img .= "
$catg
"._NUKECBY." : ".$memberinfo[username]."
"._NUKECPOSTEDON." : ".FormatDateAdsShort($xdateposted)."
"._NUKECEXPDON." : ".FormatDateAdsShort($xvaliduntil)."
"._NUKECADSPRICE." : ".formatPrice($xcurr,$xprice)."
"._NUKECDAYSREMAIN." : ".$daysremain." "._NUKECADSDAYS."
"._NUKECREAD." : ".$xhits." "._NUKECREAD."
"._NUKECADSCOMMENT." :\n"; if (is_admin($admin)) { $adm = 1; } $db->dbname = "enfermeria"; mysql_select_db($db->dbname); $rescomment = $db->sql_query("select no_comment,commentby,subject,comment,hostname,date from $prefix"."_ads_comments where id_ads='$xid_ads' and activo='1'"); $jmlcomment = $db->sql_numrows($rescomment); if ($jmlcomment > 0) { $k = 0; while (list($xno_comment,$xcommentby,$xsubject,$xcomment,$xhostname,$xdate) = $db->sql_fetchrow($rescomment)) { $k++; $memberinfocomm = MemberInfo($xcommentby); echo "\n" ."" ."" ."" ."
 "._NUKECBY." $memberinfocomm[username] "._NUKECON." ".FormatDateAdsShort($xdate)." "; echo "[ "._NUKECUSERINFO." | "; echo " "._NUKECSENDMSG." | IP : $xhostname] "; if ($adm == 1) { echo " \""._NUKECDELETECOMM."\" "; } echo "
 $xsubject
 $xcomment
"; if ($k != $jmlcomment) { echo "
"; } } $db->dbname = $dbname; mysql_select_db($db->dbname); } else { echo "
"._NUKECNOCOMMENT.""; } echo "
"; echo "
\n"; $ads_detail = ""._NUKECVIEWDETAIL.""; echo "
[ "._NUKECADSCATG." : ".getcategoryname($xid_catg)." "; if ($xwebsite != "") { echo "| "._NUKECADSURL." : $xwebsite "; } echo " ]
\n"; echo "
"; echo "[ "._NUKECSAVE2ADSBOX." "; if ($xsubmitter != 1) { echo " | "._NUKECSENDMSG." "; } if ($xemail != "") { echo " | "._NUKECCONTACTBYMAIL.""; } echo " | "._NUKEREFER2FRIEND.""; echo " ]"; echo "
"; echo "
"; echo "
\n"; echo "
\n"; } function savedadsdetail ($xid_save,$xid_ads,$xowner,$xid_catg,$xtitle,$xads_desc,$ximageads,$xcurr,$xprice,$xsubmitter,$xemail,$xwebsite,$xdateposted,$xvaliduntil) { global $usecatgimg,$module_name,$bgcolor1,$bgcolor2,$bgcolor3,$prefix,$db,$admin,$dbname; $memberinfo = MemberInfo($xsubmitter); echo "\n"; echo " \n"; echo "\n"; echo "\n"; echo "\n"; echo " \n"; echo "\n"; echo "\n"; echo "
\n"; echo "\n"; echo " \n"; echo "\n"; echo "\n"; echo "
$xtitle\n"; echo "
\n"; echo "
\n"; $imagemenu = ""; $imagemenu .= ""; if ($xsubmitter != 1) { $imagemenu .= ""; } if ($xemail != "") { $imagemenu .= ""; } $imagemenu .= ""; $imagemenu .= ""; $imagemenu .= "
\""._NUKECALTSENDPV."\"\""._NUKECCONTACTBYMAIL."\"\""._NUKECALTREFERTOFRIEND."\"
"; echo "
$imagemenu
\n"; echo "
\n"; echo "\n"; echo " \n"; echo " \n"; if ($ximageads != "") { $gbrsize = @getimagesize("modules/$module_name/imageads/".$ximageads); $gbr_width = $gbrsize[0]; $gbr_height = $gbrsize[1]; $ads_img = "\"$xtitle\""; } echo "\n"; echo "\n"; echo " \n"; echo "\n"; echo "\n"; echo ""; echo "
"; echo ""; echo ""; if ($ximageads != "") { $gbrsize = @getimagesize("modules/$module_name/imageads/".$ximageads); $gbr_width = $gbrsize[0]; $gbr_height = $gbrsize[1]; $img = ""; } elseif ($usecatgimg) { $sql = "select catg,image from $prefix"."_ads_catg where id_catg='$xid_catg'"; $db->dbname = "enfermeria"; mysql_select_db($db->dbname); $rescatgimg = $db->sql_query($sql); list($catg,$imagecatgsrc) = $db->sql_fetchrow($rescatgimg); $db->dbname = $dbname; mysql_select_db($db->dbname); if ($imagecatgsrc != "") { $imgdimension = @getimagesize("modules/$module_name/imagecatg/$imagecatgsrc"); if ($imgdimension) { $imgcatgwidth = $imgdimension[0]; $imgcatgheight = $imgdimension[1]; } $img = ""; } else { $img = ""; } } echo $img; echo "\n"; echo "\n"; echo ""; echo ""; if (($xprice != "") and ($xprice != 0)) { echo ""; } echo ""; echo "
$xads_desc"; $img .= "\"$xtitle\""; $img .= ""; $img .= "\"$catg\""; $img .= "
$catg
"._NUKECBY." : ".$memberinfo[username]."
"._NUKECPOSTEDON." : ".FormatDateAdsShort($xdateposted)."
"._NUKECEXPDON." : ".FormatDateAdsShort($xvaliduntil)."
"._NUKECADSPRICE." : ".formatPrice($xcurr,$xprice)."
"._NUKECADSCOMMENT." :\n"; if (is_admin($admin)) { $adm = 1; } $db->dbname = "enfermeria"; mysql_select_db($db->dbname); $rescomment = $db->sql_query("select no_comment,commentby,subject,comment,hostname,date from $prefix"."_ads_comments where id_ads='$xid_ads' and activo='1'"); $jmlcomment = $db->sql_numrows($rescomment); if ($jmlcomment > 0) { $k = 0; while (list($xno_comment,$xcommentby,$xsubject,$xcomment,$xhostname,$xdate) = $db->sql_fetchrow($rescomment)) { $k++; $memberinfocomm = MemberInfo($xcommentby); echo "\n" ."" ."" ."" ."
 "._NUKECBY." $memberinfocomm[username] "._NUKECON." ".FormatDateAdsShort($xdate)." "; $db->dbname = $dbname; mysql_select_db($db->dbname); echo "[ "._NUKECUSERINFO." | "; echo " "._NUKECSENDMSG." | IP : $xhostname] "; if ($adm == 1) { echo " [ \""._NUKECDELETECOMM."\" "; } echo "
 $xsubject
 $xcomment
"; if ($k != $jmlcomment) { echo "
"; } } $db->dbname = $dbname; mysql_select_db($db->dbname); } else { echo "
"._NUKECNOCOMMENT.""; } echo "
"; echo "
$ads_img
\n"; $ads_detail = ""._NUKECVIEWDETAIL.""; echo "
[ "._NUKECADSCATG." : ".getcategoryname($xid_catg)." "; if ($xwebsite != "") { echo "| "._NUKECADSURL." : $xwebsite "; } echo " ]
\n"; echo "
"; echo "[ "; if ($xsubmitter != 1) { echo " "._NUKECSENDMSG." | "; } if ($xemail != "") { echo " "._NUKECCONTACTBYMAIL." | "; } echo " "._NUKEREFER2FRIEND.""; echo " ]"; echo "
"; echo "
"; echo "
\n"; echo "
\n"; } function AdsInfo($xid_ads) { global $prefix,$db,$user_prefix,$dbname; $sql = "select * from $prefix"."_ads_ads where id_ads='$xid_ads'"; $db->dbname = "enfermeria"; mysql_select_db($db->dbname); $res = $db->sql_query($sql); $AdsInfo = $db->sql_fetchrow($res); $db->dbname = $dbname; mysql_select_db($db->dbname); return $AdsInfo; } function MemberInfo($xuid) { global $prefix,$db,$user_prefix,$dbname; $db->dbname = $dbname; mysql_select_db($db->dbname); $sql = "select name,username from $user_prefix"."_users where user_id='$xuid'"; $res = $db->sql_query($sql); $memberinfo = $db->sql_fetchrow($res); return $memberinfo; } function pathcatg($id_catg){ global $prefix,$db,$module_name,$dbname; if (($id_catg != "") || (isset($id_catg))) { $db->dbname = "enfermeria"; mysql_select_db($db->dbname); $resultpath = $db->sql_query("select catg,parentid from ".$prefix."_ads_catg where id_catg=$id_catg"); list($catg, $parentid)=$db->sql_fetchrow($resultpath); $db->dbname = $dbname; mysql_select_db($db->dbname); $path=getparentlink($parentid,$catg); $path = ""._NUKECMAIN." >> $path"; $path = "".$path.""; } else { $path= ""; } return $path; } function getparentlink($parentid,$title) { global $prefix, $db,$module_name,$dbname; $db->dbname = "enfermeria"; mysql_select_db($db->dbname); $result=$db->sql_query("select id_catg, catg, parentid from ".$prefix."_ads_catg where id_catg=$parentid"); list($cid, $ptitle, $pparentid) = $db->sql_fetchrow($result); $db->dbname = $dbname; mysql_select_db($db->dbname); if ($ptitle!="") $title="$ptitle >> ".$title; if ($pparentid!=0) { $title=getparentlink($pparentid,$title); } return $title; } function countremaindays($valid_until) { global $prefix,$db,$dbname; $nowdate = date("Y-m-d"); $db->dbname = "enfermeria"; mysql_select_db($db->dbname); $resultnowdatedays = $db->sql_query("select TO_DAYS('$nowdate') as nowdatedays"); list ($nowdatedays) = $db->sql_fetchrow($resultnowdatedays); $resultvaliddatedays = $db->sql_query("select TO_DAYS('$valid_until') as validdatedays"); list ($validdatedays) = $db->sql_fetchrow($resultvaliddatedays); $db->dbname = $dbname; mysql_select_db($db->dbname); return $sisa = $validdatedays - $nowdatedays; } function datesub($enddate,$begindate) { global $prefix,$db,$dbname; $db->dbname = "enfermeria"; mysql_select_db($db->dbname); $res = $db->sql_query("select TO_DAYS('$enddate') - TO_DAYS('$begindate')"); if (!$res) { return mysql_error(); } else { list($daysduration) = $db->sql_fetchrow($res); return $daysduration; } $db->dbname = $dbname; mysql_select_db($db->dbname); } function formatPrice($currency,$valueprice) { return $theprice = "$currency ".number_format($valueprice,2); } function buildcurrency($sel = "") { global $prefix,$db,$dbname; $db->dbname = "enfermeria"; mysql_select_db($db->dbname); $rescurr = $db->sql_query("select no,curr,country from $prefix"."_ads_currency"); while (list($no,$curr,$country) = $db->sql_fetchrow($rescurr)) { echo "\n"; } $db->dbname = $dbname; mysql_select_db($db->dbname); } echo "\n"; echo "\n"; ?> Web www.enfermeriasoria.com - Clasificados
Contactar
portada
análisis
cuentas
descargas
secciones
tópicos
enlaces
CorreoArgo