<?PHP
/************************************************************************/
/* NPDS V : Net Portal Dynamic System .                                 */
/* ===========================                                          */
/*                                                                      */
/* Original Copyright (c) 2001 by Francisco Burzi (fburzi@ncc.org.ve)   */
/* http://phpnuke.org                                                   */
/*                                                                      */
/* This version name NPDS Copyright (c) 2001-2005 by Philippe Brunier   */
/*                                                                      */
/* This program 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 2 of the License.       */
/************************************************************************/
function Access_Error () {
  if (file_exists("meta/meta.php"))
     include ("meta/meta.php");
  echo "<title>NPDS</title></head><body bgcolor=\"white\"><br /><p align=\"center\"><span style=\"font-size: 14px; font-family: Arial; font-weight: bold; color: red;\">";
  echo "Access Denied / Acc&egrave;s Refus&eacute;";
  if (cur_charset=="utf-8") echo" / &#x901A;&#x5165;&#x88AB;&#x5426;&#x8BA4;";
  echo "</span>";
  echo "<br /><br /><span style=\"font-size: 12px; font-family: Arial; font-weight: bold; color: black;\">NPDS - Portal System";
  echo "</span></p></body></html>";
  die();
}
if (!eregi("admin.php", $PHP_SELF)) { Access_Error(); }
global $pdst; $pdst="0";

global $language;
$hlpfile = "manuels/$language/weblinks.html";
$result = mysql_query("select radminlink, radminsuper from authors where aid='$aid'");
list($radminlink, $radminsuper) = mysql_fetch_row($result);
if (($radminlink!=1) and ($radminsuper!=1)) {
   Access_Error();
}

// valeur du pas de pagination
$rupture=100;

function links() {
    global $hlpfile;
    include ("header.php");
    GraphicAdmin($hlpfile);
    OpenTable();
    $result=mysql_query("select * from links_links");
    $numrows = mysql_num_rows($result);
    $result = mysql_query("select * from links_modrequest where brokenlink=1");
    $totalbrokenlinks = mysql_num_rows($result);
    $result2 = mysql_query("select * from links_modrequest where brokenlink=0");
    $totalmodrequests = mysql_num_rows($result2);
    echo "<table width=\"100%\" cellspacing=\"2\" cellpadding=\"2\" border=\"0\"><tr><td class=\"HEADER\">\n";
    echo adm_translate("Liens");
    echo " - ".adm_translate("Il y a")." <b>$numrows</b> ".adm_translate("Liens")."</td></tr>";
    echo "<tr><td align=\"center\"><br />[ <a href=\"admin.php?op=LinksListBrokenLinks\" class=\"NOIR\">".adm_translate("Soumission de Liens brisés")." ($totalbrokenlinks)</a> -
    <a href=\"admin.php?op=LinksListModRequests\" class=\"NOIR\">".adm_translate("Proposition de modifications de Liens")." ($totalmodrequests)</a> -
    <a href=\"admin.php?op=LinksCleanVotes\" class=\"ROUGE\">".adm_translate("Nettoyer la table des Liens")."</a> ]";
    echo "</td></tr></table><br />\n";

    $result = mysql_query("select lid, cid, sid, title, url, description, name, email, submitter from links_newlink ORDER BY lid ASC LIMIT 0,1");
    $numrows = mysql_num_rows($result);
    $adminform="";
    if ($numrows>0) {
       $adminform="adminForm";
       echo "<table width=\"100%\" cellspacing=\"2\" cellpadding=\"2\" border=\"0\"><tr><td class=\"HEADER\">\n";
       echo adm_translate("Liens en attente de validation");
       echo "</td></tr></table>\n";
       echo "<br /><table width=\"100%\" cellspacing=\"0\" cellpadding=\"2\" border=\"0\">";
       list($lid, $cid, $sid, $title, $url, $xtext, $name, $email, $submitter) = mysql_fetch_row($result);
          $rowcolor = tablos();
          echo "<tr $rowcolor><td>";
          echo "<form action=\"admin.php\" method=\"post\" name=\"$adminform\">";
          echo adm_translate("Lien N° : ")."<b>$lid</b> - ".adm_translate("Auteur")." : $submitter <br /><br />";
          echo adm_translate("Titre de la Page : ")."<br /><input class=\"textbox\" type=\"text\" name=\"title\" value=\"$title\" size=\"50\" maxlength=\"100\"><br /><br />";
          echo adm_translate("URL de la Page : ")."<br /><input class=\"textbox\" type=\"text\" name=\"url\" value=\"$url\" size=\"50\" maxlength=\"100\"> - [ <a href=\"$url\" target=\"_blank\" class=\"NOIR\">".adm_translate("Visite")."</a> ]<br /><br />";
          echo adm_translate("Description : ")."<br /><textarea class=\"textbox\" name=\"xtext\" cols=\"60\" rows=\"10\" style=\"width: 100%;\">$xtext</textarea><br /><br />";
          echo aff_editeur("xtext","false");
          echo adm_translate("Nom : ")."<input class=\"TEXTBOX_STANDARD\" type=\"text\" name=\"name\" size=\"40\" maxlength=\"100\" value=\"$name\"> - ";
          echo adm_translate("E-mail : ")."<input class=\"TEXTBOX_STANDARD\" type=\"text\" name=\"email\" size=\"40\" maxlength=\"100\" value=\"$email\"><br />";
          $result2=mysql_query("select cid, title from links_categories order by title");
          echo "<input type=\"hidden\" name=\"new\" value=\"1\">";
          echo "<input type=\"hidden\" name=\"lid\" value=\"$lid\">";
          echo "<input type=\"hidden\" name=\"submitter\" value=\"$submitter\">";
          echo "<br />".adm_translate("Catégorie : ")."<select class=\"TEXTBOX_STANDARD\" name=\"cat\">";
          while(list($ccid, $ctitle) = mysql_fetch_row($result2)) {
             $sel = "";
             if ($cid==$ccid AND $sid==0) {
                $sel = "selected";
             }
             echo "<option value=\"$ccid\" $sel>".aff_langue($ctitle)."</option>";
             $result3=mysql_query("select sid, title from links_subcategories where cid='$ccid' order by title");
             while (list($ssid, $stitle) = mysql_fetch_row($result3)) {
                $sel = "";
                if ($sid==$ssid) {
                   $sel = "selected";
                }
                echo "<option value=\"$ccid-$ssid\" $sel>".aff_langue($ctitle)." / ".aff_langue($stitle)."</option>";
             }
          }
          echo "<input type=\"hidden\" name=\"submitter\" value=\"$submitter\">";
          echo "</select> - <input type=\"hidden\" name=\"op\" value=\"LinksAddLink\"><input class=\"BOUTON_STANDARD\" type=\"submit\" value=".adm_translate("Ajouter")."> - [ <a href=\"admin.php?op=LinksDelNew&amp;lid=$lid\" class=\"ROUGE\">".adm_translate("Effacer")."</a> ]";
          echo "</form></td></tr></table><br />";
       // Fin de List
    }

    // Add a New Link to Database
    $result = mysql_query("select cid, title from links_categories");
    $numrows = mysql_num_rows($result);
    if ($numrows>0) {
       echo "<table width=\"100%\" cellspacing=\"2\" cellpadding=\"2\" border=\"0\"><tr><td class=\"HEADER\">\n";
       echo adm_translate("Ajouter un nouveau Lien");
       echo "</td></tr></table>\n";
       if ($adminform=="") {
          echo "<form method=\"post\" action=\"admin.php\" name=\"adminForm\">";
       } else {
          echo "<form method=\"post\" action=\"admin.php\">";
       }
       echo adm_translate("Titre de la Page : ")."<input class=\"textbox\" type=\"text\" name=\"title\" size=\"50\" maxlength=\"100\"><br /><br />
       ".adm_translate("URL de la Page : ")."<input class=\"textbox\" type=\"text\" name=\"url\" size=\"50\" maxlength=\"100\" value=\"http://\"><br /><br />";
       $result=mysql_query("select cid, title from links_categories order by title");
       echo adm_translate("Catégorie : ")."<select class=\"TEXTBOX_STANDARD\" name=\"cat\">";
       while(list($cid, $title) = mysql_fetch_row($result)) {
         echo "<option value=\"$cid\">".aff_langue($title)."</option>";
         $result2=mysql_query("select sid, title from links_subcategories where cid='$cid' order by title");
         while(list($sid, $stitle) = mysql_fetch_row($result2)) {
            echo "<option value=\"$cid-$sid\">".aff_langue($title)." / ".aff_langue($stitle)."</option>";
         }
       }
       echo "</select><br /><br />
       ".adm_translate("Description :  (255 caractères max)")."<br /><textarea class=\"textbox\" wrap=\"virtual\" name=\"xtext\" cols=\"70\" rows=\"10\" style=\"width: 100%;\"></textarea>";
       if ($adminform=="")
          echo aff_editeur("xtext","false");
       echo "<br /><br />";

       echo adm_translate("Nom : ")."<input class=\"TEXTBOX_STANDARD\" type=\"text\" name=\"name\" size=\"30\" maxlength=\"60\"> -
       ".adm_translate("E-mail : ")."<input class=\"TEXTBOX_STANDARD\" type=\"text\" name=\"email\" size=\"30\" maxlength=\"60\"><br /><br />
       <input type=\"hidden\" name=\"op\" value=\"LinksAddLink\">
       <input type=\"hidden\" name=\"new\" value=\"0\">
       <input type=\"hidden\" name=\"lid\" value=\"0\">
       <input class=\"BOUTON_STANDARD\" type=\"submit\" value=\"".adm_translate("Ajouter une URL")."\">
       </form>";
    }
    echo "<br />";

    // Add a Main category
    echo "<table width=\"100%\" cellspacing=\"2\" cellpadding=\"2\" border=\"0\"><tr><td class=\"HEADER\">\n";
    echo adm_translate("Ajouter une Catégorie principale");
    echo "</td></tr></table>\n";
    echo "<br />
    <form action=\"admin.php\" method=\"post\">
    ".adm_translate("Nom : ")."<input class=\"textbox\" type=\"text\" name=\"title\" size=\"30\" maxlength=\"100\"><br /><br />
    ".adm_translate("Description : ")."<br /><textarea class=\"textbox\" name=\"cdescription\" cols=\"60\" rows=\"7\"></textarea><br /><br />
    <input type=\"hidden\" name=\"op\" value=\"LinksAddCat\">
    <input class=\"BOUTON_STANDARD\" type=\"submit\" value=\"".adm_translate("Ajouter")."\">
    </form>";
    echo "<br />";

    // Add a New Sub-Category
    $result = mysql_query("select * from links_categories");
    $numrows = mysql_num_rows($result);
    if ($numrows>0) {
       echo "<table width=\"100%\" cellspacing=\"2\" cellpadding=\"2\" border=\"0\"><tr><td class=\"HEADER\">\n";
       echo adm_translate("Ajouter une Sous-catégorie");
       echo "</td></tr></table>\n";
       echo "<form method=\"post\" action=\"admin.php\">
       ".adm_translate("Nom : ")."<input class=\"textbox\" type=\"text\" name=\"title\" size=\"30\" maxlength=\"100\" style=\"width:70%;\">&nbsp;".adm_translate("dans")."&nbsp;";
       $result=mysql_query("select cid, title from links_categories order by title");
       echo "<select class=\"TEXTBOX_STANDARD\" name=\"cid\">";
       while(list($ccid, $ctitle) = mysql_fetch_row($result)) {
          echo "<option value=\"$ccid\">".aff_langue($ctitle)."</option>";
       }
       echo "</select>
       <input type=\"hidden\" name=\"op\" value=\"LinksAddSubCat\">
       <input class=\"BOUTON_STANDARD\" type=\"submit\" value=\"".adm_translate("Ajouter")."\"><br />
       </form>";
    }
    echo "<br />";

    // Modify Category
    $result = mysql_query("select * from links_categories");
    $numrows = mysql_num_rows($result);
    if ($numrows>0) {
       echo "<table width=\"100%\" cellspacing=\"2\" cellpadding=\"2\" border=\"0\"><tr><td class=\"HEADER\">\n";
       echo adm_translate("Modifier la Catégorie");
       echo "</td></tr></table>\n";
       echo "<form method=\"post\" action=\"admin.php\">";
       $result=mysql_query("select cid, title from links_categories order by title");
       echo adm_translate("Catégorie : ")."<select class=\"TEXTBOX_STANDARD\" name=\"cat\">";
       while(list($cid, $title) = mysql_fetch_row($result)) {
          echo "<option value=\"$cid\">".aff_langue($title)."</option>";
          $result2=mysql_query("select sid, title from links_subcategories where cid='$cid' order by title");
          while(list($sid, $stitle) = mysql_fetch_row($result2)) {
             echo "<option value=\"$cid-$sid\">".aff_langue($title)." / ".aff_langue($stitle)."</option>";
          }
       }
       echo "</select>
       <input type=\"hidden\" name=\"op\" value=\"LinksModCat\"> -
       <input class=\"BOUTON_STANDARD\" type=\"submit\" value=\"".adm_translate("Modifier")."\">
       </form>";
    }
    echo "<br />";

    // Modify Links
    $result=mysql_query("select lid from links_links");
    $numrow=mysql_num_rows($result);
    echo "<table width=\"100%\" cellspacing=\"2\" cellpadding=\"2\" border=\"0\"><tr><td class=\"HEADER\">\n";
    echo adm_translate("Modifier les Liens")." ($numrow)";
    echo "</td></tr></table>\n";
    echo "<table width=\"100%\" cellspacing=\"0\" cellpadding=\"2\" border=\"0\">";
    echo "<tr><td><b>ID</b></td><td><b>".adm_translate("Titre")."</b></td><td><b>URL</b></td></tr>";
    global $rupture,$deja_affiches;
    settype ($deja_affiches, "integer");
    if ($deja_affiches<0) {$sens=-1;} else {$sens=+1;}
    $deja_affiches=abs($deja_affiches);
    $result = mysql_query("select lid, title, url from links_links order by lid ASC LIMIT $deja_affiches,$rupture");
    while (list($lid, $title, $url) = mysql_fetch_row($result)) {
       $rowcolor = tablos();
       echo "<tr $rowcolor>";
       echo "<td nowrap=\"nowrap\">$lid</td>";
       echo "<td width=\"75%\"><a href=\"admin.php?op=LinksModLink&amp;lid=$lid\" class=\"NOIR\">$title</a></td>";
       echo "<td nowrap=\"nowrap\">$url</td>";
       echo "</tr>";
    }
    $deja_affiches_plus=$deja_affiches+$rupture;
    $deja_affiches_moin=$deja_affiches-$rupture;
    echo "<tr><td colspan=\"3\">";
    $precedent=false;
    if ($deja_affiches>=$rupture)  {
       echo "<a href=\"admin.php?op=suite_links&amp;deja_affiches=-".$deja_affiches_moin."\" class=\"NOIR\">".adm_translate("Précédent")."</a>";
       $precedent=true;
    }
    if ($deja_affiches_plus<$numrow) {
       if ($precedent) echo "&nbsp;|&nbsp;";
       echo "<a href=\"admin.php?op=suite_links&amp;deja_affiches=".$deja_affiches_plus."\" class=\"NOIR\">".adm_translate("Suivant")."</a>";
    }
    echo "</td></r></table>";
    closetable();
    include ("footer.php");
}

function LinksModLink($lid) {
    global $hlpfile;
    include ("header.php");
    GraphicAdmin($hlpfile);
    global $anonymous;
    $result = mysql_query("select cid, sid, title, url, description, name, email, hits from links_links where lid='$lid'");
    OpenTable();
    echo "<table width=\"100%\" cellspacing=\"2\" cellpadding=\"2\" border=\"0\"><tr><td class=\"HEADER\">\n";
    echo adm_translate("Modifier les Liens")." - ".adm_translate("Lien N° : ")."<b>$lid</b>";
    echo "</td></tr></table>\n";
    echo "<br />\n";
    list($cid, $sid, $title, $url, $xtext, $name, $email, $hits) = mysql_fetch_row($result);
    $title = stripslashes($title); $xtext = stripslashes($xtext);
    echo "<form action=admin.php method=post name=adminForm>";
    echo adm_translate("Titre de la Page : ")."<br /><input class=\"textbox\" type=\"text\" name=\"title\" value=\"$title\" size=\"50\" maxlength=\"100\"><br /><br />";
    echo adm_translate("URL de la Page : ")."<br /><input class=\"textbox\" type=\"text\" name=\"url\" value=\"$url\" size=\"40\" maxlength=\"100\"> -[ <a href=\"$url\" target=\"_blank\" class=\"NOIR\">".adm_translate("Visite")."</a> ]<br /><br />";
    echo adm_translate("Description : ")."<br /><textarea class=\"textbox\" wrap=\"virtual\" name=\"xtext\" cols=\"70\" rows=\"10\" style=\"width: 100%;\">$xtext</textarea>";
    echo aff_editeur("xtext","false");
    echo "<br /><br />";
    echo adm_translate("Nom : ")."<input class=\"TEXTBOX_STANDARD\" type=\"text\" name=\"name\" size=\"30\" maxlength=\"100\" value=\"$name\"> - ";
    echo adm_translate("E-mail : ")."<input class=\"TEXTBOX_STANDARD\" type=\"text\" name=\"email\" size=\"30\" maxlength=\"100\" value=\"$email\"><br /><br />";
    echo adm_translate("Nombre de Hits : ")."<input class=\"TEXTBOX_STANDARD\" type=\"text\" name=\"hits\" value=\"$hits\" size=\"12\" maxlength=\"11\"> - ";
    $result2=mysql_query("select cid, title from links_categories order by title");
    echo "<input type=\"hidden\" name=\"lid\" value=\"$lid\">";
    echo adm_translate("Catégorie : ")."<select class=\"TEXTBOX_STANDARD\" name=\"cat\">";
    while (list($ccid, $ctitle) = mysql_fetch_row($result2)) {
       $sel = "";
       if ($cid==$ccid AND $sid==0) {
          $sel = "selected";
       }
       echo "<option value=\"$ccid\" $sel>".aff_langue($ctitle)."</option>";
       $result3=mysql_query("select sid, title from links_subcategories where cid='$ccid' order by title");
       while (list($ssid, $stitle) = mysql_fetch_row($result3)) {
          $sel = "";
          if ($sid==$ssid) {
             $sel = "selected";
          }
          echo "<option value=\"$ccid-$ssid\" $sel>".aff_langue($ctitle)." / ".aff_langue($stitle)."</option>";
       }
    }

    echo "</select><br /><br /><input type=\"hidden\" name=\"op\" value=\"LinksModLinkS\"><input class=\"BOUTON_STANDARD\" type=\"submit\" value=\"".adm_translate("Modifier")."\"> - [ <a href=\"admin.php?op=LinksDelLink&amp;lid=$lid\" class=\"ROUGE\">".adm_translate("Effacer")."</a> ]</form>";

    //Modify or Add Editorial
    $resulted2 = mysql_query("select adminid, editorialtimestamp, editorialtext, editorialtitle from links_editorials where linkid='$lid'");
    $recordexist = Mysql_num_rows($resulted2);
    if ($recordexist == 0) {
       echo "<table width=\"100%\" cellspacing=\"2\" cellpadding=\"2\" border=\"0\"><tr><td class=\"HEADER\">\n";
       echo adm_translate("Ajouter un Editorial")." :";
       echo "</td></tr></table>\n";
       echo "<form action=\"admin.php\" method=\"post\">";
       echo "<input type=\"hidden\" name=\"linkid\" value=\"$lid\">";
       echo adm_translate("Titre")." :<br /><input class=\"textbox\" type=\"text\" name=\"editorialtitle\" value=\"$editorialtitle\" size=\"50\" maxlength=\"100\"><br />";
       echo adm_translate("Texte complet")." :<br /><textarea class=\"TEXTBOX\" name=\"editorialtext\" cols=\"60\" rows=\"10\">$editorialtext</textarea><br /><br />";
       echo "<input type=\"hidden\" name=\"op\" value=\"LinksAddEditorial\"><input class=\"BOUTON_STANDARD\" type=\"submit\" value=\"".adm_translate("Ajouter")."\"><br />";
    } else {
      while(list($adminid, $editorialtimestamp, $editorialtext, $editorialtitle) = mysql_fetch_row($resulted2)) {
         $editorialtitle = stripslashes($editorialtitle);
         $editorialtext = stripslashes($editorialtext);
         echo "<table width=\"100%\" cellspacing=\"2\" cellpadding=\"2\" border=\"0\"><tr><td class=\"HEADER\">\n";
         echo "<b>".adm_translate("Modifier l'Editorial")."</b> - ".adm_translate("Auteur")." : $adminid : ".formatTimeStamp($editorialtimestamp);
         echo "</td></tr></table>\n";
         echo "<form action=\"admin.php\" method=\"post\">";
         echo "<input type=\"hidden\" name=\"linkid\" value=\"$lid\">";
         echo adm_translate("Titre")." :<br /><input class=\"textbox\" type=\"text\" name=\"editorialtitle\" value=\"$editorialtitle\" size=\"50\" maxlength=\"100\"><br /><br />";
         echo adm_translate("Texte complet")." :<br /><textarea class=\"textbox\" name=\"editorialtext\" cols=\"60\" rows=\"10\">$editorialtext</textarea><br /><br />";
         echo "<input type=\"hidden\" name=\"op\" value=\"LinksModEditorial\"><input class=\"BOUTON_STANDARD\" type=\"submit\" value=\"".adm_translate("Modifier")."\"> - [ <a href=\"admin.php?op=LinksDelEditorial&amp;linkid=$lid\"  class=\"ROUGE\">".adm_translate("Effacer")."</a> ]<br />";
      }
    }

    // Show Comments
    $result5=mysql_query("SELECT ratingdbid, ratinguser, ratingcomments FROM links_votedata WHERE ratinglid='$lid' AND ratingcomments !='' ORDER BY ratingtimestamp DESC");
    $totalcomments = Mysql_num_rows($result5);
    echo "<br /><table width=\"100%\" cellspacing=\"2\" cellpadding=\"2\" border=\"0\"><tr><td class=\"HEADER\">\n";
    echo adm_translate("Commentaires sur le Lien")." : $totalcomments";
    echo "</td></tr></table>\n";
    echo "<table width=\"100%\" cellspacing=\"0\" cellpadding=\"2\" border=\"0\">";
    echo "<tr><td width=\"20%\" class=\"ONGL\">".adm_translate("Utilisateur")."</td><td class=\"ONGL\">".adm_translate("Commentaire")."</td><td width=\"10%\" class=\"ONGL\" align=\"center\">".adm_translate("Effacer")."</td></tr>\n";
    if ($totalcomments == 0) echo "<tr><td colspan=\"7\" align=\"center\"><span class=\"ROUGE\">".adm_translate("Pas de Commentaires")."<br /></span></td></tr>\n";
    while (list($ratingdbid, $ratinguser, $ratingcomments)=mysql_fetch_row($result5)) {
       $ratingcomments = stripslashes($ratingcomments);
       $rowcolor = tablos();
       echo "<tr $rowcolor><td valign=\"top\">$ratinguser</td><td valign=\"top\" wrap=\"wrap\">$ratingcomments</td><td align=\"center\" class=\"ROUGE\"><a href=\"admin.php?op=LinksDelComment&amp;lid=$lid&amp;rid=$ratingdbid\" class=\"ROUGE\">X</a></td></tr>\n";
    }
    echo "</table>";

    // Show Registered Users Votes
    $result5=mysql_query("SELECT ratingdbid, ratinguser, rating, ratinghostname, ratingtimestamp FROM links_votedata WHERE ratinglid='$lid' AND ratinguser!='outside' AND ratinguser!='$anonymous' ORDER BY ratingtimestamp DESC");
    $totalvotes = Mysql_num_rows($result5);
    echo "<br /><table width=\"100%\" cellspacing=\"2\" cellpadding=\"2\" border=\"0\"><tr><td class=\"HEADER\">\n";
    echo "<b>".adm_translate("Votes d'Utilisateurs enregistrés")." : $totalvotes</b>";
    echo "</td></tr></table>\n";
    echo "<table width=\"100%\" cellspacing=\"0\" cellpadding=\"2\" border=\"0\">";
    echo "<tr><td class=\"ONGL\"><b>".adm_translate("Utilisateur")."</b></td><td class=\"ONGL\" align=\"center\"><b>IP</b></td><td class=\"ONGL\" align=\"center\"><b>".adm_translate("Notation")."</b></td><td class=\"ONGL\" align=\"center\"><b>".adm_translate("Note")."</b></td><td class=\"ONGL\" align=\"center\"><b>".adm_translate("Nb.Notes")."</b></td><td class=\"ONGL\" align=\"center\"><b>".adm_translate("Date")."</b></td><td class=\"ONGL\" align=\"center\" width=\"10%\"><b>".adm_translate("Effacer")."</b></td></tr>";
    if ($totalvotes == 0) echo "<tr><td colspan=\"7\" align=\"center\"><span class=\"ROUGE\">".adm_translate("Votes d'Utilisateurs enregistrés")."</span></td></tr>";
    $x=0;
    while (list($ratingdbid, $ratinguser, $rating, $ratinghostname, $ratingtimestamp)=mysql_fetch_row($result5)) {
       $formatted_date=formatTimestamp($ratingtimestamp);
       //Individual user information
       $result2=mysql_query("SELECT rating FROM links_votedata WHERE ratinguser = '$ratinguser'");
       $usertotalcomments = Mysql_num_rows($result2);
       $useravgrating = 0;
       while (list($rating2)=mysql_fetch_row($result2))  $useravgrating = $useravgrating + $rating2;
       $useravgrating = $useravgrating / $usertotalcomments;
       $useravgrating = number_format($useravgrating, 1);
       $rowcolor = tablos();
       echo "<tr $rowcolor><td>$ratinguser</td><td align=\"center\">$ratinghostname</td><td align=\"center\">$rating</td><td align=\"center\">$useravgrating</td><td align=\"center\">$usertotalcomments</td><td align=\"center\">$formatted_date</b></td><td align=\"center\"><b><a href=\"admin.php?op=LinksDelVote&amp;lid=$lid&amp;rid=$ratingdbid\" class=\"ROUGE\">X</a></b></td></tr>\n";
    }
    echo "</table>";

    // Show Unregistered Users Votes
    $result5=mysql_query("SELECT ratingdbid, rating, ratinghostname, ratingtimestamp FROM links_votedata WHERE ratinglid='$lid' AND ratinguser='$anonymous' ORDER BY ratingtimestamp DESC");
    $totalvotes = Mysql_num_rows($result5);
    echo "<br /><table width=\"100%\" cellspacing=\"2\" cellpadding=\"2\" border=\"0\"><tr><td class=\"HEADER\">\n";
    echo "<b>".adm_translate("Votes d'Utilisateurs non enregistrés"). " : $totalvotes</b>";
    echo "</td></tr></table>\n";
    echo "<table width=\"100%\" cellspacing=\"0\" cellpadding=\"2\" border=\"0\">";
    echo "<tr><td class=\"ONGL\"><b>IP</b></td><td class=\"ONGL\" align=\"center\"><b>".adm_translate("Notation")."</b></td><td class=\"ONGL\" align=\"center\"><b>".adm_translate("Date")."</b></td><td class=\"ONGL\" width=\"10%\" align=\"center\"><b>".adm_translate("Effacer")."</b></td></tr>";
    if ($totalvotes == 0) echo "<tr><td colspan=\"7\" align=\"center\"><span class=\"ROUGE\">".adm_translate("Votes d'Utilisateurs non enregistrés")."</span></td></tr>";
    while (list($ratingdbid, $rating, $ratinghostname, $ratingtimestamp)=mysql_fetch_row($result5)) {
       $formatted_date=formatTimestamp($ratingtimestamp);
       $rowcolor = tablos();
       echo "<tr $rowcolor><td>$ratinghostname</td><td align=\"center\">$rating</td><td align=\"center\">$formatted_date</td><td align=\"center\"><b><a href=\"admin.php?op=LinksDelVote&amp;lid=$lid&amp;rid=$ratingdbid\" class=\"ROUGE\">X</a></b></td></tr>\n";
    }
    echo "</table>";
    echo "</form>";
    closetable();
    include ("footer.php");
}

function LinksDelComment($lid, $rid) {
    mysql_query("UPDATE links_votedata SET ratingcomments='' WHERE ratingdbid = '$rid'");
    mysql_query("UPDATE links_links SET totalcomments = (totalcomments - 1) WHERE lid = '$lid'");
    Header("Location: admin.php?op=LinksModLink&lid=$lid");
}

function LinksDelVote($lid, $rid) {
    mysql_query("delete from links_votedata where ratingdbid='$rid'");
    $voteresult = mysql_query("select rating, ratinguser, ratingcomments FROM links_votedata WHERE ratinglid='$lid'");
    $totalvotesDB = mysql_num_rows($voteresult);
    include ("voteinclude.php");
    mysql_query("UPDATE links_links SET linkratingsummary='$finalrating', totalvotes='$totalvotesDB', totalcomments='$truecomments' WHERE lid = '$lid'");
    Header("Location: admin.php?op=LinksModLink&lid=$lid");
}

function LinksListBrokenLinks() {
    global $hlpfile, $anonymous;
    $resultBrok = mysql_query("select requestid, lid, modifysubmitter from links_modrequest where brokenlink='1' order by requestid");
    $totalbrokenlinks = mysql_num_rows($resultBrok);
    if ($totalbrokenlinks==0) {
       header("location: admin.php?op=links");
    }
    include ("header.php");
    GraphicAdmin($hlpfile);
    opentable();
    echo "<table width=\"100%\" cellspacing=\"2\" cellpadding=\"2\" border=\"0\"><tr><td class=\"HEADER\">\n";
    echo adm_translate("Liens cassés rapportés par un ou plusieurs Utilisateurs")." ($totalbrokenlinks)";
    echo "</td></tr></table><br />\n";

    echo "- ".adm_translate("Ignorer (Efface toutes les <b>demandes</b> pour un Lien donné)")."<br />
    - ".adm_translate("Effacer (Efface les <b>Liens cassés</b> et <b>les avis</b> pour un Lien donné)");

    if ($totalbrokenlinks==0) {
       echo "<br /><br /><p align=\"center\" class=\"ROUGE\">".adm_translate("Aucun lien brisé rapporté.")."</span>";
    } else {
       echo "<br /><br /><table width=\"100%\" cellspacing=\"0\" cellpadding=\"2\" border=\"0\"><tr><td class=\"ONGL\">\n";
       echo "<tr>
             <td class=\"ONGL\"><b>".adm_translate("Liens")."</b></td>
             <td class=\"ONGL\"><b>".adm_translate("Auteur")."</b></td>
             <td class=\"ONGL\"><b>".adm_translate("Propriétaire")."</b></td>
             <td class=\"ONGL\" align=center><b>".adm_translate("Ignorer")."</b></td>
             <td class=\"ONGL\" align=center><b>".adm_translate("Effacer")."</b></td>
             </tr>";

       while (list($requestid, $lid, $modifysubmitter)=mysql_fetch_row($resultBrok)) {
          $result2 = mysql_query("select title, url, submitter from links_links where lid='$lid'");
          if ($modifysubmitter != $anonymous) {
             $result3 = mysql_query("select email from users where uname='$modifysubmitter'");
             list ($email)=mysql_fetch_row($result3);
          }
          list ($title, $url, $owner)=mysql_fetch_row($result2);
          $result4 = mysql_query("select email from users where uname='$owner'");
          list($owneremail)=mysql_fetch_row($result4);
          $rowcolor=tablos();
          echo "<tr $rowcolor><td><a href=$url target=\"_blank\" class=\"NOIR\">$title</a></td>";
          if ($email=='') {
             echo "<td>$modifysubmitter";
          } else {
             echo "<td><a href=\"mailto:$email\" class=\"NOIR\">$modifysubmitter</a>";
          }
          echo "</td>";
          if ($owneremail=='') {
             echo "<td>$owner";
          } else {
             echo "<td><a href=\"mailto:$owneremail\" class=\"NOIR\">$owner</a>";
          }
          echo "</td>
               <td align=\"center\"><a href=\"admin.php?op=LinksIgnoreBrokenLinks&amp;lid=$lid\" class=\"NOIR\">X</a></td>
               <td align=\"center\"><a href=admin.php?op=LinksDelBrokenLinks&amp;lid=$lid\" class=\"ROUGE\">X</a></td>
               </tr>";
       }
    }
    echo "</table>";
    closetable();
    include ("footer.php");
}

function LinksDelBrokenLinks($lid) {
    mysql_query("delete from links_modrequest where lid='$lid'");
    mysql_query("delete from links_links where lid='$lid'");
    Header("Location: admin.php?op=LinksListBrokenLinks");
}

function LinksIgnoreBrokenLinks($lid) {
    mysql_query("delete from links_modrequest where lid='$lid' and brokenlink='1'");
    Header("Location: admin.php?op=LinksListBrokenLinks");
}

function LinksListModRequests() {
    global $hlpfile;
    $resultLink = mysql_query("select requestid, lid, cid, sid, title, url, description, modifysubmitter from links_modrequest where brokenlink='0' order by requestid");
    $totalmodrequests = mysql_num_rows($resultLink);
    if ($totalmodrequests==0) {
       header("location: admin.php?op=links");
    }
    include ("header.php");
    GraphicAdmin($hlpfile);
    opentable();
    echo "<table width=\"100%\" cellspacing=\"2\" cellpadding=\"2\" border=\"0\"><tr><td class=\"HEADER\">\n";
    echo adm_translate("Requête de modification d'un Lien Utilisateur")." ($totalmodrequests)";
    echo "</td></tr></table>\n";
    while(list($requestid, $lid, $cid, $sid, $title, $url, $description, $modifysubmitter)=mysql_fetch_row($resultLink)) {
       $result2 = mysql_query("select cid, sid, title, url, description, submitter from links_links where lid='$lid'");
       list($origcid, $origsid, $origtitle, $origurl, $origdescription, $owner)=mysql_fetch_row($result2);
       $result3 = mysql_query("select title from links_categories where cid='$cid'");
       $result4 = mysql_query("select title from links_subcategories where cid='$cid' and sid='$sid'");
       $result5 = mysql_query("select title from links_categories where cid='$origcid'");
       $result6 = mysql_query("select title from links_subcategories where cid='$origcid' and sid='$origsid'");
       $result7 = mysql_query("select email from users where uname='$modifysubmitter'");
       $result8 = mysql_query("select email from users where uname='$owner'");
       list($cidtitle)=mysql_fetch_row($result3);
       list($sidtitle)=mysql_fetch_row($result4);
       list($origcidtitle)=mysql_fetch_row($result5);
       list($origsidtitle)=mysql_fetch_row($result6);
       list($modifysubmitteremail)=mysql_fetch_row($result7);
       list($owneremail)=mysql_fetch_row($result8);
       $title = stripslashes($title);
       $description = stripslashes($description);
       if ($owner=="") { $owner="administration"; }
       if ($origsidtitle=="") { $origsidtitle= "-----"; }
       if ($sidtitle=="") { $sidtitle= "-----"; }
       echo "<table width=\"100%\" cellspacing=\"2\" cellpadding=\"2\" border=\"0\">\n";
       $rowcolor=tablos();
       echo "<tr $rowcolor><td><hr noshade class=\"ONGL\">
             <table width=\"100%\"><tr>
             <td valign=\"top\" width=\"45%\"><span class=\"NOIR\"><b>".adm_translate("Original")."</b></span></td>
             <td rowspan=\"5\" valign=\"top\" align=\"left\" valign=\"top\"><span class=\"NOIR\"><b>".adm_translate("Description:")."</b></span><br />$origdescription</td></tr>
             <tr><td valign=\"top\" width=\"45%\">".adm_translate("Titre :")." $origtitle</td></tr>
             <tr><td valign=\"top\" width=\"45%\">".adm_translate("URL : ")." <a href=\"$origurl\" target=\"_blank\" class=\"NOIR\">$origurl</a></td></tr>
             <tr><td valign=\"top\" width=\"45%\">".adm_translate("Catégorie :")." $origcidtitle</td></tr>
             <tr><td valign=\"top\" width=\"45%\">".adm_translate("Sous-catégorie :")." $origsidtitle</td></tr>
             </table>
             </td></tr>";
       $rowcolor=tablos();
       echo "<tr $rowcolor><td>
             <table width=\"100%\"><tr>
             <td valign=\"top\" width=\"45%\"><b>".adm_translate("Proposé")."</b></td>
             <td rowspan=\"5\" valign=\"top\" align=\"left\" valign=\"top\"><span class=\"NOIR\"><b>".adm_translate("Description:")."</b></span><br />$description</td></tr>
             <tr><td valign=\"top\" width=\"45%\">".adm_translate("Titre :")." $title</td></tr>
             <tr><td valign=\"top\" width=\"45%\">".adm_translate("URL : ")." <a href=\"$url\" target=\"_blank\" class=\"NOIR\">$url</a></td></tr>
             <tr><td valign=\"top\" width=\"45%\">".adm_translate("Catégorie :")." $cidtitle</td></tr>
             <tr><td valign=\"top\" width=\"45%\">".adm_translate("Sous-catégorie :")." $sidtitle</td></tr>
             </table>
             </td></tr>";
       echo "</table>";
       echo "<table width=\"100%\" callspacing=\"0\" cellpadding=\"0\" border=\"0\"><tr><td class=\"HEADER\">\n";
       if ($modifysubmitteremail=="") {
          echo adm_translate("Auteur")." :  $modifysubmitter</td>";
       } else {
          echo adm_translate("Auteur")." : <a href=\"mailto:$modifysubmitteremail\" class=\"BOX\">$modifysubmitter</a></td>";
       }
       echo "<td class=\"HEADER\">";
       if ($owneremail=="") {
          echo adm_translate("Propriétaire")." :  $owner</td>";
       } else {
          echo adm_translate("Propriétaire")." : <a href=\"mailto:$owneremail\" class=\"BOX\">$owner</a></td>";
       }
       echo "<td align=\"right\">[ <a href=\"admin.php?op=LinksChangeModRequests&amp;requestid=$requestid\" class=\"ROUGE\">".adm_translate("Accepter")."</a> | <a href=\"admin.php?op=LinksChangeIgnoreRequests&amp;requestid=$requestid\" class=\"NOIR\">".adm_translate("Ignorer")."</a> ]</td>
       </tr></table><hr noshade class=\"ONGL\"><br />\n";
    }
    closetable();
    include ("footer.php");
}

function LinksChangeModRequests($Xrequestid) {
    $result = mysql_query("select requestid, lid, cid, sid, title, url, description from links_modrequest where requestid='$Xrequestid'");
    while (list($requestid, $lid, $cid, $sid, $title, $url, $description)=mysql_fetch_row($result)) {
       $title = stripslashes($title);
       $description = stripslashes($description);
       mysql_query("UPDATE links_links SET cid='$cid', sid='$sid', title='$title', url='$url', description='$description' WHERE lid = '$lid'");
    }
    mysql_query("delete from links_modrequest where requestid='$Xrequestid'");
    Header("Location: admin.php?op=LinksListModRequests");
}

function LinksChangeIgnoreRequests($requestid) {
    mysql_query("delete from links_modrequest where requestid='$requestid'");
    Header("Location: admin.php?op=LinksListModRequests");
}

function LinksCleanVotes() {
    $result = mysql_query("select lid from links_links");
    if ($result) {
       while (list($lid)=mysql_fetch_row($result)) {
          mysql_query("UPDATE links_links SET linkratingsummary='', totalvotes='', totalcomments='' WHERE lid = '$lid'");
       }
    }
    $result = mysql_query("delete from links_votedata");
    Header("Location: admin.php?op=links");
}

function LinksModLinkS($lid, $title, $url, $xtext, $name, $email, $hits, $cat) {
    $cat = explode("-", $cat);
    if ($cat[1]=="") { $cat[1] = 0; }
    $title = stripslashes(FixQuotes($title));
    $url = stripslashes(FixQuotes($url));
    $xtext = stripslashes(FixQuotes($xtext));
    $name = stripslashes(FixQuotes($name));
    $email = stripslashes(FixQuotes($email));
    mysql_query("update links_links set cid='$cat[0]', sid='$cat[1]', title='$title', url='$url', description='$xtext', name='$name', email='$email', hits='$hits' where lid='$lid'");
    Header("Location: admin.php?op=links");
}

function LinksDelLink($lid) {
    mysql_query("delete from links_links where lid='$lid'");
    Header("Location: admin.php?op=links");
}

function LinksModCat($cat) {
    global $hlpfile;
    include ("header.php");
    GraphicAdmin($hlpfile);
    $cat = explode("-", $cat);
    if ($cat[1]=="") { $cat[1] = 0; }
    OpenTable();
    if ($cat[1]==0) {
        echo "<table width=\"100%\" cellspacing=\"2\" cellpadding=\"2\" border=\"0\"><tr><td class=\"HEADER\">\n";
        echo adm_translate("Modifier la Catégorie");
        echo "</td></tr></table><br />\n";
        $result=mysql_query("select title, cdescription from links_categories where cid='$cat[0]'");
        list($title,$cdescription) = mysql_fetch_row($result);
        $cdescription = stripslashes($cdescription);
        echo "<form action=\"admin.php\" method=\"get\">
        ".adm_translate("Nom : ")."<input class=\"textbox\" type=\"text\" name=\"title\" value=\"$title\" size=\"51\" maxlength=\"50\"><br /><br />
        ".adm_translate("Description : ")."<br /><textarea class=\"textbox\" name=\"cdescription\" cols=\"60\" rows=\"10\">$cdescription</textarea><br />
        <input type=\"hidden\" name=\"sub\" value=\"0\">
        <input type=\"hidden\" name=\"cid\" value=\"$cat[0]\">
        <input type=\"hidden\" name=\"op\" value=\"LinksModCatS\">
        <br /><input class=\"BOUTON_STANDARD\" type=\"submit\" value=".adm_translate("Sauver les modifications")."> -
        <a href=\"admin.php?op=LinksDelCat&amp;sub=0&amp;cid=$cat[0]\" class=\"ROUGE\">".adm_translate("Effacer")."</a></form>";
    } else {
        $result=mysql_query("select title from links_categories where cid='$cat[0]'");
        list($ctitle) = mysql_fetch_row($result);
        $result2=mysql_query("select title from links_subcategories where sid='$cat[1]'");
        list($stitle) = mysql_fetch_row($result2);
        echo "<table width=\"100%\" cellspacing=\"2\" cellpadding=\"2\" border=\"0\"><tr><td class=\"HEADER\">\n";
        echo adm_translate("Modifier la Catégorie")." - ".adm_translate("Nom de la Catégorie : ").aff_langue($ctitle);
        echo "</td></tr></table><br />\n";
        echo "<form action=\"admin.php\" method=\"get\">
        ".adm_translate("Nom de la Sous-catégorie : ")."<input class=\"textbox\" type=\"text\" name=\"title\" value=\"$stitle\" size=\"51\" maxlength=\"50\"><br />
        <input type=\"hidden\" name=\"sub\" value=\"1\">
        <input type=\"hidden\" name=\"cid\" value=\"$cat[0]\">
        <input type=\"hidden\" name=\"sid\" value=\"$cat[1]\">
        <input type=\"hidden\" name=\"op\" value=\"LinksModCatS\">
        <br /><input class=\"BOUTON_STANDARD\" type=\"submit\" value=\"".adm_translate("Sauver les modifications")."\"> -
        <a href=\"admin.php?op=LinksDelCat&amp;sub=1&amp;cid=$cat[0]&amp;sid=$cat[1]\" class=\"ROUGE\">".adm_translate("Effacer")."</a></form>";
    }
    closetable();
    include("footer.php");
}

function LinksModCatS($cid, $sid, $sub, $title, $cdescription) {
    if ($sub==0) {
        mysql_query("update links_categories set title='$title', cdescription='$cdescription' where cid='$cid'");
    } else {
        mysql_query("update links_subcategories set title='$title' where sid='$sid'");
    }
    Header("Location: admin.php?op=links");
}

function LinksDelCat($cid, $sid, $sub, $ok=0) {
    if ($ok==1) {
        if ($sub>0) {
           mysql_query("delete from links_subcategories where sid='$sid'");
           mysql_query("delete from links_links where sid='$sid'");
        } else {
           mysql_query("delete from links_categories where cid='$cid'");
           mysql_query("delete from links_subcategories where cid='$cid'");
           mysql_query("delete from links_links where cid='$cid' AND sid=0");
        }
        Header("Location: admin.php?op=links");
    } else {
        message_error("<span class=\"ROUGE\"><b>".adm_translate("ATTENTION : Etes-vous sûr de vouloir effacer cette Catégorie et tous ses Liens ?")."</b></span><br /><br />
        [ <a href=\"admin.php?op=LinksDelCat&amp;cid=$cid&amp;sid=$sid&amp;sub=$sub&amp;ok=1\" class=\"ROUGE\">".adm_translate("Oui")."</a> | <a href=\"admin.php?op=links\" class=\"NOIR\">".adm_translate("Non")."</a> ]");
    }
}

function LinksDelNew($lid) {
    mysql_query("delete from links_newlink where lid='$lid'");
    Header("Location: admin.php?op=links");
}

function LinksAddCat($title, $cdescription) {
    $result = mysql_query("select cid from links_categories where title='$title'");
    $numrows = mysql_num_rows($result);
    if ($numrows>0) {
        message_error("<span class=\"ROUGE\"><b>".adm_translate("Erreur : La Catégorie")." $title ".adm_translate("existe déjà !")."</b></span>");
    } else {
        mysql_query("insert into links_categories values (NULL, '$title', '$cdescription')");
        Header("Location: admin.php?op=links");
    }
}

function LinksAddSubCat($cid, $title) {
    $result = mysql_query("select cid from links_subcategories where title='$title' AND cid='$cid'");
    $numrows = mysql_num_rows($result);
    if ($numrows>0) {
        message_error("<span class=\"ROUGE\"><b>".adm_translate("Erreur : La Sous-catégorie")." $title ".adm_translate("existe déjà !")."</b></span>");
    } else {
        mysql_query("insert into links_subcategories values (NULL, '$cid', '$title')");
        Header("Location: admin.php?op=links");
    }
}

function LinksAddEditorial($linkid, $editorialtitle, $editorialtext) {
    global $aid;
    $editorialtext = stripslashes(FixQuotes($editorialtext));
    mysql_query("insert into links_editorials values ('$linkid', '$aid', now(), '$editorialtext', '$editorialtitle')");
    message_error("<span class=\"NOIR\"><b>".adm_translate("Editorial ajouté à la base de données")."</b></span>");
}

function LinksModEditorial($linkid, $editorialtitle, $editorialtext) {
    $editorialtext = stripslashes(FixQuotes($editorialtext));
    mysql_query("update links_editorials set editorialtext='$editorialtext', editorialtitle='$editorialtitle' where linkid='$linkid'");
    message_error("<span class=\"NOIR\"><b>".adm_translate("Editorial modifié")."</b></span>");
}

function LinksDelEditorial($linkid) {
    mysql_query("delete from links_editorials where linkid='$linkid'");
    message_error("<span class=\"NOIR\"><b>".adm_translate("Editorial supprimé de la base de données")."</b></span>");
}

function message_error($ibid) {
    global $hlpfile;
    include("header.php");
    GraphicAdmin($hlpfile);
    OpenTable();
    echo "<p align=\"center\"><br />";
    echo $ibid;
    echo "<br /><br /><a href=\"admin.php?op=links\" class=\"NOIR\">".adm_translate("Retour en arrière")."</a>";
    echo "<br /></p>";
    closetable();
    include("footer.php");
}

function LinksAddLink($new, $lid, $title, $url, $cat, $xtext, $name, $email, $submitter) {
    $result = mysql_query("select url from links_links where url='$url'");
    $numrows = mysql_num_rows($result);
    if ($numrows>0) {
        message_error("<span class=\"ROUGE\"><b>".adm_translate("Erreur : cette URL est déjà présente dans la base de données !")."</b></span>");
    } else {
       // Check if Title exist
       if ($title=="") {
           message_error("<span class=\"ROUGE\"><b>".adm_translate("Erreur : vous devez saisir un TITRE pour votre Lien !")."</b></span>");
       }
       // Check if URL exist
       if ($url=="") {
          message_error("<span class=\"ROUGE\"><b>".adm_translate("Erreur : vous devez saisir une URL pour votre Lien !")."</b></span>");
       }
       // Check if Description exist
       if ($xtext=="") {
          message_error("<span class=\"ROUGE\"><b>".adm_translate("Erreur : vous devez saisir une DESCRIPTION pour votre Lien !")."</b></span>");
       }
       $cat = explode("-", $cat);
       if ($cat[1]=="") {
          $cat[1] = 0;
       }
       $title = stripslashes(FixQuotes($title));
       $url = stripslashes(FixQuotes($url));
       $xtext = stripslashes(FixQuotes($xtext));
       $name = stripslashes(FixQuotes($name));
       $email = stripslashes(FixQuotes($email));
       mysql_query("insert into links_links values (NULL, '$cat[0]', '$cat[1]', '$title', '$url', '$xtext', now(), '$name', '$email', '0','$submitter',0,0,0,'')");
       if ($new==1) {
          mysql_query("delete from links_newlink where lid='$lid'");
          if ($email!="") {
             global $sitename, $nuke_url;
             $subject = "".adm_translate("Votre Lien")." : $sitename";
             $message = "".adm_translate("Bonjour")." $name :\n\n".adm_translate("Nous avons approuvé votre contribution à notre moteur de recherche.")."\n\n".adm_translate("Titre de la Page : ")."$title\n".adm_translate("URL de la Page : ")."$url\n".adm_translate("Description : ")."$description\n\n\n".adm_translate("Vous pouvez utiliser notre moteur de recherche sur : ")." $nuke_url/links.php\n\n".adm_translate("Merci pour votre Contribution !")."\n\n";
             include("signat.php");
             send_email($email, $subject, $message, "", false, "text");
          }
       }
       message_error("<span class=\"NOIR\"><b>".adm_translate("Nouveau Lien ajouté dans la base de données")."</b></span>");
    }
}

switch ($op) {
    case "links":
    case "suite_links":
         links();
         break;

    case "LinksDelNew":
         LinksDelNew($lid);
         break;

    case "LinksAddCat":
         LinksAddCat($title, $cdescription);
         break;

    case "LinksAddSubCat":
         LinksAddSubCat($cid, $title);
         break;

    case "LinksAddLink":
         LinksAddLink($new, $lid, $title, $url, $cat, $xtext, $name, $email, $submitter);
         break;

    case "LinksAddEditorial":
         LinksAddEditorial($linkid, $editorialtitle, $editorialtext);
         break;

    case "LinksModEditorial":
         LinksModEditorial($linkid, $editorialtitle, $editorialtext);
         break;

    case "LinksDelEditorial":
         LinksDelEditorial($linkid);
         break;

    case "LinksCleanVotes":
         LinksCleanVotes();
         break;

    case "LinksListBrokenLinks":
         LinksListBrokenLinks();
         break;

    case "LinksDelBrokenLinks":
         LinksDelBrokenLinks($lid);
         break;

    case "LinksIgnoreBrokenLinks":
         LinksIgnoreBrokenLinks($lid);
         break;

    case "LinksListModRequests":
         LinksListModRequests();
         break;

    case "LinksChangeModRequests":
         LinksChangeModRequests($requestid);
         break;

    case "LinksChangeIgnoreRequests":
         LinksChangeIgnoreRequests($requestid);
         break;

    case "LinksDelCat":
         LinksDelCat($cid, $sid, $sub, $ok);
         break;

    case "LinksModCat":
         LinksModCat($cat);
         break;

    case "LinksModCatS":
         LinksModCatS($cid, $sid, $sub, $title, $cdescription);
         break;

    case "LinksModLink":
         LinksModLink($lid);
         break;

    case "LinksModLinkS":
         LinksModLinkS($lid, $title, $url, $xtext, $name, $email, $hits, $cat);
         break;

    case "LinksDelLink":
         LinksDelLink($lid);
         break;

    case "LinksDelVote":
         LinksDelVote($lid, $rid);
         break;

    case "LinksDelComment":
         LinksDelComment($lid, $rid);
         break;
}
?>