/**/
function ConvertirUrls($texte){
/* URL sans "http://" */
$texte = eregi_replace(
"(www\\.+)([^[:space:]]*)([[:alnum:]#?/&=])",
"\\1\\2\\3", $texte);
/* MAIL */
$texte= eregi_replace(
"([^[:space:]]*)([[:alnum:]#?/&=])@([^[:space:]]*)([[:alnum:]#?/&=])",
"\\1@\\2\\3", $texte);
return $texte;
}
/* connexion param*/
$host="213.251.165.29";
$login="root";
if($HTTP_HOST=="localhost:8080"){
$password="";
$base="defi_nuke";}
else{
$password="Fj7GvgaT";
$base="nuke_lr";}
$host_ref="LR";
$site="deficreation.com";
$snom="Déficréation";
/* Connexion */
mysql_connect($host, $login, $password)or die("La connexion a échoué: $host, $login, $password");
$db=@mysql_select_db("$base") or die("base = $base");
/* Table */
$table="nuke_links_links";
$table2="nuke_links_categories";
$ch_ref="lid";
$ch_ref2="cid";
$root="http://$HTTP_HOST";
// count
$sql ="SELECT $ch_ref from $table";
$sql_resu = mysql_query($sql) or print(mysql_error()."
".$sql);
$nbtot=mysql_num_rows($sql_resu);
// limit d'aff.
$prev=$ldeb-10;
$lastpage=$nbtot-8;
if($prev<0){$prev=0;}
if(!isset($ldeb) | $ldeb>=$nbtot) {$ldeb=0; }
$lfin=10;
// Requette
if(isset($ref) & $ref!=""){$query="select a.$ch_ref as ID, a.name as Nom, a.title as Titre, a.description as Description, a.url as Site, b.title as Categorie from $table a, $table2 b where $ch_ref like '$ref' and b.$ch_ref2=a.$ch_ref2 order by a.name";}
else{$query="select a.$ch_ref as ID, a.name as Nom, a.title as Titre, a.description as Description, a.url as Site, b.title as Categorie from $table a, $table2 b where b.$ch_ref2=a.$ch_ref2 order by a.name limit $ldeb, $lfin";}
$result=mysql_query($query) or die($query."
".mysql_error());
$nn=$ldeb+$lfin;
while($row=mysql_fetch_array($result)){
$liste.="
$row[Categorie]: $row[Titre]
$row[Description]
".ConvertirUrls($row[Site])."
Proposé par: $row[Nom]
deficreation.com est une association spécialisée dans l'aide à la création et reprise d'entrprises en Languedoc-Rousillon Nous avons développé un moteur de recherche des differentes aides proposées par les collectivités et autres organismes. Il vous permet de cibler les aides selon votre profile et votre localité. Vous pouvez également consulter nos partenaires pour votre communication documents.fr - citation.fr - convention.fr