コード例 #1
0
ファイル: phpbbforum.php プロジェクト: Jireck-npds/npds_dune
function ForumGoEdit($forum_id, $ctg)
{
    global $hlpfile, $NPDS_Prefix, $f_meta_nom, $f_titre, $adminimg;
    include "header.php";
    GraphicAdmin($hlpfile);
    $result = sql_query("SELECT forum_id, forum_name, forum_desc, forum_access, forum_moderator, cat_id, forum_type, forum_pass, arbre, attachement, forum_index FROM " . $NPDS_Prefix . "forums WHERE forum_id='{$forum_id}'");
    list($forum_id, $forum_name, $forum_desc, $forum_access, $forum_mod, $cat_id_1, $forum_type, $forum_pass, $arbre, $attachement, $forum_index) = sql_fetch_row($result);
    adminhead($f_meta_nom, $f_titre, $adminimg);
    echo '
   <h3>' . adm_translate("Editer") . ' : <span class="text-muted">' . $forum_name . '</span></h3>
   <form id="fad_editforu" action="admin.php" method="post">
   <input type="hidden" name="forum_id" value="' . $forum_id . '" />
      <div class="form-group">
         <div class="row">
            <label class="form-control-label col-sm-4 col-md-4" for="forum_index">' . adm_translate("Index") . '</label>
            <div class="col-sm-8">
               <input class="form-control" type="number" name="forum_index" max="9999" value="' . $forum_index . '" />
            </div>
         </div>
      </div>
      <div class="form-group">
         <div class="row">
            <label class="form-control-label col-sm-4 col-md-4" for="forum_name">' . adm_translate("Nom du forum") . '</label>
            <div class="col-sm-8">
               <input class="form-control" type="text" name="forum_name" value="' . $forum_name . '" />
               <span class="help-block">' . adm_translate("(Redirection sur un forum externe : <.a href...)") . '</span>
            </div>
         </div>
      </div>
      <div class="form-group">
         <div class="row">
            <label class="form-control-label col-sm-4 col-md-4" for="forum_desc">' . adm_translate("Description") . '</label>
            <div class="col-sm-8">
               <textarea class="form-control" name="forum_desc" rows="5">' . $forum_desc . '</textarea>
            </div>
         </div>
      </div>
      <div class="form-group">
         <div class="row">
            <label class="form-control-label col-sm-4 col-md-4" for="forum_mod">' . adm_translate("Modérateur(s)") . '</label>';
    $moderator = str_replace(" ", ",", get_moderator($forum_mod));
    echo '
            <div class="col-sm-8">
               <input id="forum_mod" class="form-control" type="text" name="forum_mod" value="' . $moderator . '," />
            </div>
         </div>
      </div>';
    echo '
      <div class="form-group">
         <div class="row">
            <label class="form-control-label col-sm-4 col-md-4" for="forum_access">' . adm_translate("Niveau d'accès") . '</label>
            <div class="col-sm-8">
               <select class="c-select form-control" name="forum_access">';
    if ($forum_access == 0) {
        $sel0 = ' selected="selected"';
    }
    if ($forum_access == 1) {
        $sel1 = ' selected="selected"';
    }
    if ($forum_access == 2) {
        $sel2 = ' selected="selected"';
    }
    if ($forum_access == 9) {
        $sel9 = ' selected="selected"';
    }
    echo '
                  <option value="0"' . $sel0 . '>' . adm_translate("Publication Anonyme autorisée") . '</option>
                  <option value="1"' . $sel1 . '>' . adm_translate("Utilisateur enregistré uniquement") . '</option>
                  <option value="2"' . $sel2 . '>' . adm_translate("Modérateurs uniquement") . '</option>
                  <option value="9"' . $sel9 . '>' . adm_translate("Fermé") . '</option>
               </select>
            </div>
         </div>
      </div>
      <div class="form-group">
         <div class="row">
            <label class="form-control-label col-sm-4" for="cat_id">' . adm_translate("Catégories") . ' </label>
            <div class="col-sm-8">
               <select class="c-select form-control" name="cat_id">';
    $result = sql_query("SELECT cat_id, cat_title FROM " . $NPDS_Prefix . "catagories");
    while (list($cat_id, $cat_title) = sql_fetch_row($result)) {
        if ($cat_id == $cat_id_1) {
            echo '
                  <option value="' . $cat_id . '" selected="selected">' . StripSlashes($cat_title) . '</option>';
        } else {
            echo '
                  <option value="' . $cat_id . '">' . StripSlashes($cat_title) . '</option>';
        }
    }
    echo '
               </select>
            </div>
         </div>
      </div>
      <div class="form-group">
         <div class="row">
            <label class="form-control-label col-sm-4 col-md-4" for="forum_type">' . adm_translate("Type") . '</label>
            <div class="col-sm-8">
               <select class="c-select form-control" name="forum_type">';
    if ($forum_type == 0) {
        $sel0 = ' selected="selected"';
    } else {
        $sel0 = '';
    }
    if ($forum_type == 1) {
        $sel1 = ' selected="selected"';
    } else {
        $sel1 = '';
    }
    if ($forum_type == 5) {
        $sel5 = ' selected="selected"';
    } else {
        $sel5 = '';
    }
    if ($forum_type == 6) {
        $sel6 = ' selected="selected"';
    } else {
        $sel6 = '';
    }
    if ($forum_type == 7) {
        $sel7 = ' selected="selected"';
    } else {
        $sel7 = '';
    }
    if ($forum_type == 8) {
        $sel8 = ' selected="selected"';
    } else {
        $sel8 = '';
    }
    if ($forum_type == 9) {
        $sel9 = ' selected="selected"';
    } else {
        $sel9 = '';
    }
    echo '
                  <option value="0"' . $sel0 . '>' . adm_translate("Public") . '</option>
                  <option value="1"' . $sel1 . '>' . adm_translate("Privé") . '</option>
                  <option value="5"' . $sel5 . '>PHP Script + ' . adm_translate("Groupe") . '</option>
                  <option value="6"' . $sel6 . '>PHP Script</option>
                  <option value="7"' . $sel7 . '>' . adm_translate("Groupe") . '</option>
                  <option value="8"' . $sel8 . '>' . adm_translate("Texte étendu") . '</option>
                  <option value="9"' . $sel9 . '>' . adm_translate("Caché") . '</option>
               </select>
            </div>
         </div>
      </div>
      <div class="form-group">
         <div class="row">
            <label class="form-control-label col-sm-4 col-md-4" for="arbre">' . adm_translate("Mode") . '</label>
            <div class="col-sm-8">
               <select class="c-select form-control" name="arbre">';
    if ($arbre) {
        echo '
                  <option value="0">' . adm_translate("Standard") . '</option>
                  <option value="1" selected="selected">' . adm_translate("Arbre") . '</option>';
    } else {
        echo '
                  <option value="0" selected="selected">' . adm_translate("Standard") . '</option>
                  <option value="1">' . adm_translate("Arbre") . '</option>';
    }
    echo '
               </select>
            </div>
         </div>
      </div>
      <div class="form-group">
         <div class="row">
            <label class="form-control-label col-sm-4 col-md-4" for="attachement">' . adm_translate("Attachement") . '</label>
            <div class="col-sm-8">
               <select class="c-select form-control" name="attachement">';
    if ($attachement) {
        echo '
                  <option value="0">' . adm_translate("Non") . '</option>
                  <option value="1" selected="selected">' . adm_translate("Oui") . '</option>';
    } else {
        echo '
                  <option value="0" selected="selected">' . adm_translate("Non") . '</option>
                  <option value="1">' . adm_translate("Oui") . '</option>';
    }
    echo '
               </select>
            </div>
         </div>
      </div>
      <div class="form-group">
         <div class="row">
            <label class="form-control-label col-sm-4 col-md-4" for="forum_pass">' . adm_translate("- Mot de Passe (si Privé) - Le nom du fichier de formulaire (si Texte étendu) => modules/sform/forum - Les Groupes ID (si Groupe)") . '</label>
            <div class="col-sm-8">
               <input class="form-control" type="text" name="forum_pass" value="' . $forum_pass . '" />
            </div>
         </div>
      </div>
      <input type="hidden" name="ctg" value="' . StripSlashes($ctg) . '" />
      <input type="hidden" name="op" value="ForumGoSave" />
      <div class="form-group">
         <div class="row">
            <div class="col-sm-offset-4 col-sm-8">
                <button class="btn btn-primary" type="submit">' . adm_translate("Sauver les modifications") . '</button>
            </div>
         </div>
      </div>
   </form>';
    echo auto_complete_multi('modera', 'uname', 'users', 'forum_mod', 'WHERE uid<>1');
    adminfoot('fv', '', '', '');
}
コード例 #2
0
ファイル: phpbbforum.php プロジェクト: npds/npds_dune
function ForumGoEdit($forum_id, $ctg)
{
    global $hlpfile, $NPDS_Prefix, $f_meta_nom, $f_titre, $adminimg;
    include "header.php";
    GraphicAdmin($hlpfile);
    $result = sql_query("SELECT forum_id, forum_name, forum_desc, forum_access, forum_moderator, cat_id, forum_type, forum_pass, arbre, attachement, forum_index FROM " . $NPDS_Prefix . "forums WHERE forum_id='{$forum_id}'");
    list($forum_id, $forum_name, $forum_desc, $forum_access, $forum_mod, $cat_id_1, $forum_type, $forum_pass, $arbre, $attachement, $forum_index) = sql_fetch_row($result);
    adminhead($f_meta_nom, $f_titre, $adminimg);
    echo '
   <hr />
   <h3>' . adm_translate("Editer") . ' : <span class="text-muted">' . $forum_name . '</span></h3>
   <form id="fad_editforu" action="admin.php" method="post">
   <input type="hidden" name="forum_id" value="' . $forum_id . '" />
      <div class="form-group row">
         <label class="form-control-label col-sm-4" for="forum_index">' . adm_translate("Index") . '</label>
         <div class="col-sm-8">
            <input class="form-control" type="number" name="forum_index" max="9999" value="' . $forum_index . '" />
         </div>
      </div>
      <div class="form-group row">
         <label class="form-control-label col-sm-4" for="forum_name">' . adm_translate("Nom du forum") . '</label>
         <div class="col-sm-8">
            <input class="form-control" type="text" id="forum_name" name="forum_name" value="' . $forum_name . '" />
            <span class="help-block">' . adm_translate("(Redirection sur un forum externe : <.a href...)") . '<span id="countcar_forum_name"></span></span>
         </div>
      </div>
      <div class="form-group row">
         <label class="form-control-label col-sm-4" for="forum_desc">' . adm_translate("Description") . '</label>
         <div class="col-sm-8">
            <textarea class="form-control" name="forum_desc" rows="5">' . $forum_desc . '</textarea>
         </div>
      </div>
      <div class="form-group row">
         <label class="form-control-label col-sm-4" for="forum_mod">' . adm_translate("Modérateur(s)") . '</label>';
    $moderator = str_replace(' ', ',', get_moderator($forum_mod));
    echo '
         <div class="col-sm-8">
            <input id="forum_mod" class="form-control" type="text" name="forum_mod" value="' . $moderator . '," />
         </div>
      </div>';
    echo '
      <div class="form-group row">
         <label class="form-control-label col-sm-4" for="forum_access">' . adm_translate("Niveau d'accès") . '</label>
         <div class="col-sm-8">
            <select class="custom-select form-control" name="forum_access">';
    if ($forum_access == 0) {
        $sel0 = ' selected="selected"';
    }
    if ($forum_access == 1) {
        $sel1 = ' selected="selected"';
    }
    if ($forum_access == 2) {
        $sel2 = ' selected="selected"';
    }
    if ($forum_access == 9) {
        $sel9 = ' selected="selected"';
    }
    echo '
               <option value="0"' . $sel0 . '>' . adm_translate("Publication Anonyme autorisée") . '</option>
               <option value="1"' . $sel1 . '>' . adm_translate("Utilisateur enregistré uniquement") . '</option>
               <option value="2"' . $sel2 . '>' . adm_translate("Modérateurs uniquement") . '</option>
               <option value="9"' . $sel9 . '>' . adm_translate("Fermé") . '</option>
            </select>
         </div>
      </div>
      <div class="form-group row">
         <label class="form-control-label col-sm-4" for="cat_id">' . adm_translate("Catégories") . ' </label>
         <div class="col-sm-8">
            <select class="custom-select form-control" name="cat_id">';
    $result = sql_query("SELECT cat_id, cat_title FROM " . $NPDS_Prefix . "catagories");
    while (list($cat_id, $cat_title) = sql_fetch_row($result)) {
        if ($cat_id == $cat_id_1) {
            echo '
               <option value="' . $cat_id . '" selected="selected">' . StripSlashes($cat_title) . '</option>';
        } else {
            echo '
               <option value="' . $cat_id . '">' . StripSlashes($cat_title) . '</option>';
        }
    }
    echo '
            </select>
         </div>
      </div>
      <div class="form-group row">
         <label class="form-control-label col-sm-4" for="forum_type">' . adm_translate("Type") . '</label>
         <div class="col-sm-8">
            <select class="custom-select form-control" id="forum_type" name="forum_type">';
    if ($forum_type == 0) {
        $sel0 = ' selected="selected"';
    } else {
        $sel0 = '';
    }
    if ($forum_type == 1) {
        $sel1 = ' selected="selected"';
    } else {
        $sel1 = '';
    }
    if ($forum_type == 5) {
        $sel5 = ' selected="selected"';
    } else {
        $sel5 = '';
    }
    if ($forum_type == 6) {
        $sel6 = ' selected="selected"';
    } else {
        $sel6 = '';
    }
    if ($forum_type == 7) {
        $sel7 = ' selected="selected"';
    } else {
        $sel7 = '';
    }
    if ($forum_type == 8) {
        $sel8 = ' selected="selected"';
    } else {
        $sel8 = '';
    }
    if ($forum_type == 9) {
        $sel9 = ' selected="selected"';
    } else {
        $sel9 = '';
    }
    echo '
               <option value="0"' . $sel0 . '>' . adm_translate("Public") . '</option>
               <option value="1"' . $sel1 . '>' . adm_translate("Privé") . '</option>
               <option value="5"' . $sel5 . '>PHP Script + ' . adm_translate("Groupe") . '</option>
               <option value="6"' . $sel6 . '>PHP Script</option>
               <option value="7"' . $sel7 . '>' . adm_translate("Groupe") . '</option>
               <option value="8"' . $sel8 . '>' . adm_translate("Texte étendu") . '</option>
               <option value="9"' . $sel9 . '>' . adm_translate("Caché") . '</option>
            </select>
         </div>
      </div>
      <div class="form-group row" id="the_multi_input_lol">
      </div>
      <div class="form-group row">
         <label class="form-control-label col-sm-4" for="arbre">' . adm_translate("Mode") . '</label>
         <div class="col-sm-8">
            <select class="custom-select form-control" name="arbre">';
    if ($arbre) {
        echo '
               <option value="0">' . adm_translate("Standard") . '</option>
               <option value="1" selected="selected">' . adm_translate("Arbre") . '</option>';
    } else {
        echo '
               <option value="0" selected="selected">' . adm_translate("Standard") . '</option>
               <option value="1">' . adm_translate("Arbre") . '</option>';
    }
    echo '
            </select>
         </div>
      </div>
      <div class="form-group row">
         <label class="form-control-label col-sm-4" for="attachement">' . adm_translate("Attachement") . '</label>
         <div class="col-sm-8">
            <select class="custom-select form-control" name="attachement">';
    if ($attachement) {
        echo '
               <option value="0">' . adm_translate("Non") . '</option>
               <option value="1" selected="selected">' . adm_translate("Oui") . '</option>';
    } else {
        echo '
               <option value="0" selected="selected">' . adm_translate("Non") . '</option>
               <option value="1">' . adm_translate("Oui") . '</option>';
    }
    echo '
            </select>
         </div>
      </div>
      <input type="hidden" name="ctg" value="' . StripSlashes($ctg) . '" />
      <input type="hidden" name="op" value="ForumGoSave" />
      <div class="form-group row">
         <div class="col-sm-8 offset-sm-4">
             <button class="btn btn-primary" type="submit">' . adm_translate("Sauver les modifications") . '</button>
         </div>
      </div>
   </form>';
    echo auto_complete_multi('modera', 'uname', 'users', 'forum_mod', 'WHERE uid<>1');
    echo '
   <script type="text/javascript">
   //<![CDATA[
      var inp = $("#the_multi_input_lol");
      var htmh="",htmhe="",htmf="",lab="",inp_para="";
      htmh +=\'            <label class="form-control-label col-sm-4" for="forum_pass">\'
      htmhe +=\'</label>\\n\';
      htmhe +=\'            <div class="col-sm-8">\\n\';
      htmf +=\'            </div>\\n\';
      var select = $("#forum_type");
      select.change(function(){
         var type = $(this).val();
         switch (type) {
            case "1":
            lab="' . adm_translate("Mot de Passe") . '";
            inp_para=\'<input class="form-control" type="password" name="forum_pass" id="forum_pass" maxlength="60" required="required" />\\n\';
            inp.html(htmh+lab+htmhe+inp_para+htmf);
            break;
            case "7": case"5":
            lab="' . adm_translate("Groupe ID") . '";
            inp_para=\'<input class="form-control" type="number" name="forum_pass" id="forum_pass" required="required" />\\n\';
            inp.html(htmh+lab+htmhe+inp_para+htmf);
            break;
            case "8":
            lab="' . adm_translate("Fichier de formulaire") . '";
            inp_para=\'<input class="form-control" type="text" name="forum_pass" id="forum_pass" />\\n<span class="help-block">=> modules/sform/forum</span>\\n\';
            inp.html(htmh+lab+htmhe+inp_para+htmf);
            break;
            default:
            inp.html("");
            break;
         }
      }).change();
      $(document).ready(function() {
         inpandfieldlen("forum_name",150);
//         inpandfieldlen("add_name",50);
      });
   //]]>
   </script>';
    adminfoot('fv', '', '', '');
}
コード例 #3
0
ファイル: groupes.php プロジェクト: Jireck-npds/npds_dune
function membre_add($gp)
{
    global $hlpfile, $f_meta_nom, $f_titre, $adminimg;
    include 'header.php';
    GraphicAdmin($hlpfile);
    adminhead($f_meta_nom, $f_titre, $adminimg);
    echo '
   <h3>' . adm_translate("Ajouter des membres") . ' / ' . adm_translate("Groupe") . ' : ' . $gp . '</h3>
   <form id="form_ad_mb_gr" class="admform" action="admin.php" method="post">
      <fieldset>
         <legend>&nbsp;&nbsp;<i class="glyphicons glyphicons-group x2 light"></i></legend>
         <div class="form-group">
            <label class="form-control-label" for="luname">' . adm_translate("Liste des membres") . '</label>
            <input type="text" class="form-control" id="luname" name="luname" maxlength="255" value="" />
         </div>
         <input type="hidden" name="op" value="membre_add_finish" />
         <input type="hidden" name="groupe_id" value="' . $gp . '" />
         <div class="form-group">
            <input class="btn btn-primary" type="submit" name="sub_op" value="' . adm_translate("Sauver les modifications") . '" />
         </div>
      </fieldset>
   </form>';
    echo auto_complete_multi('membre', 'uname', 'users', 'luname', 'inner join users_status on users.uid=users_status.uid WHERE users.uid<>1 and groupe not regexp \'[[:<:]]' . $gp . '[[:>:]]\'');
    adminfoot('fv', '', '', '');
}
コード例 #4
0
ファイル: topics.php プロジェクト: Jireck-npds/npds_dune
function topicedit($topicid)
{
    global $hlpfile, $tipath, $NPDS_Prefix, $f_meta_nom, $f_titre, $adminimg, $radminsuper;
    include "header.php";
    GraphicAdmin($hlpfile);
    $result = sql_query("SELECT topicid, topicname, topicimage, topictext, topicadmin FROM " . $NPDS_Prefix . "topics WHERE topicid='{$topicid}'");
    list($topicid, $topicname, $topicimage, $topictext, $topicadmin) = sql_fetch_row($result);
    adminhead($f_meta_nom, $f_titre, $adminimg);
    echo '<h3>' . adm_translate("Editer le Sujet :") . ' ' . aff_langue($topictext) . '</h3>';
    if ($topicimage != "") {
        echo '
        <div class="thumbnail">
            <img class="img-fluid " src="' . $tipath . $topicimage . '" alt="" />
        </div>';
    }
    echo '
    <form class="form-horizontal" role="form" action="admin.php" method="post">
    <fieldset>
        <div class="form-group">
            <label class="col-sm-4" for="topicname">' . adm_translate("Intitulé") . '</label>
            <div class="col-sm-8">
                <input id="topicname" class="form-control" type="text" name="topicname" maxlength="20" value="' . $topicname . '" placeholder="' . adm_translate("cesiteestgénial") . '" />
                <span class="help-block">' . adm_translate("(un simple nom sans espaces)") . ' - ' . adm_translate("max caractères") . ' : <span id="countcar_topicname"></span></span>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-4" for="topictext">' . adm_translate("Texte") . '</label>
            <div class="col-sm-8">
                <textarea id="topictext" class="form-control" rows="3" name="topictext" maxlength="250" placeholder="' . adm_translate("ce site est génial") . '">' . $topictext . '</textarea>
                <span class="help-block">' . adm_translate("(description ou nom complet du sujet)") . ' - ' . adm_translate("max caractères") . ' : <span id="countcar_topictext"></span></span>
            </div>
        </div>
        <div class="form-group">
        <label class="col-sm-4" for="topicimage">' . adm_translate("Image") . '</label>
            <div class="col-sm-8">
                <input id="topicimage" class="form-control" type="text" name="topicimage" size="21" maxlength="20" value="' . $topicimage . '" placeholder="genial.png" />
                <span class="help-block">' . adm_translate("(nom de l'image + extension)") . ' (' . $tipath . '). - ' . adm_translate("max caractères") . ' : <span id="countcar_topicimage"></span></span>
            </div>
        </div>
        
        <div class="form-group">
            <label class="col-sm-4" for="topicadmin">' . adm_translate("Administrateur(s) du sujet") . '</label>
            <div class="col-sm-8">
               <div class="input-group">
                     <span class="input-group-btn">
                       <button class="btn btn-primary"><i class="fa fa-user fa-lg"></i></button>
                     </span>
                   <input id="topicadmin" class="form-control" type="text" name="topicadmin" maxlength="255" value="' . $topicadmin . '" />
               </div>
            </div>
        </div>
        
    </fieldset>
    <fieldset>
        <h4>' . adm_translate("Ajouter des Liens relatifs au Sujet") . '</h4>
        <div class="form-group">
            <label class="col-sm-4" for="name">' . adm_translate("Nom du site") . '</label>
            <div class="col-sm-8">
                <input class="form-control" type="text" name="name" id="name" maxlength="30" />
                <span class="help-block">' . adm_translate("max caractères") . ' : <span id="countcar_name"></span></span>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-4" for="url">' . adm_translate("URL") . '</label>
            <div class="col-sm-8">
               <input class="form-control" type="url" name="url" id="url" maxlength="200" placeholder="http://www.valideurl.org" />
               <span class="help-block">' . adm_translate("max caractères") . ' : <span id="countcar_url"></span></span>
            </div>
        </div>
    </fieldset>
    
    <input type="hidden" name="topicid" value="' . $topicid . '" />
    <input type="hidden" name="op" value="topicchange" />
    <div class="form-group">
        <div class="col-sm-offset-4 col-sm-8">
         <div class="btn-group" role="group" aria-label="...">
        <button class="btn btn-primary" type="submit"><i class="fa fa-check-square fa-lg"></i>&nbsp;&nbsp;' . adm_translate("Sauver les modifications") . '</button>
        <button class="btn btn-default" onclick="javascript:document.location.href=\'admin.php?op=topicsmanager\'">' . adm_translate("Retour en arrière") . '</button>
        <button class="btn btn-danger"><i class="fa fa-trash-o fa-lg"></i>&nbsp;&nbsp;' . adm_translate("Effacer le Sujet !") . '</button>
         </div>
        </div>
    </div>

   </form>
   <form id="fad_deltop" action="admin.php" method="post">
       <input type="hidden" name="topicid" value="' . $topicid . '" />
       <input type="hidden" name="op" value="topicdelete" />
   </form>';
    echo '<h3>' . adm_translate("Gérer les Liens Relatifs : ") . ' ' . aff_langue($topictext) . '</h3>';
    $res = sql_query("SELECT rid, name, url FROM " . $NPDS_Prefix . "related WHERE tid='{$topicid}'");
    echo '
    <table id="tad_linkrel" data-toggle="table" data-striped="true" data-icons="icons" data-icons-prefix="fa">
        <thead>
            <th data-sortable="true" >' . adm_translate('Nom') . '</th>
            <th data-sortable="true">' . adm_translate('Url') . '</th>
            <th>' . adm_translate('Fonctions') . '</th>
       </thead>
       <tbody>
    ';
    while (list($rid, $name, $url) = sql_fetch_row($res)) {
        echo '
            <tr>
                <td>' . $name . '</td>
                <td><a href="' . $url . '" target="_blank">' . $url . '</a></td>
                <td>
                   <a href="admin.php?op=relatededit&amp;tid=' . $topicid . '&amp;rid=' . $rid . '" class="noir"><i class="fa fa-edit fa-lg" data-toggle="tooltip" title="' . adm_translate("Editer") . '"></i></a>&nbsp;
                   <a href="' . $url . '" target="_blank"><i class="fa fa-external-link fa-lg"></i></a>&nbsp;
                   <a href="admin.php?op=relateddelete&amp;tid=' . $topicid . '&amp;rid=' . $rid . '" class=""><i class="fa fa-trash-o fa-lg text-danger" data-toggle="tooltip" title="' . adm_translate("Effacer") . '"></i></a>
                </td>
            </tr>';
    }
    echo '
        </tbody>
    </table>';
    $fv_parametres = '
   topicadmin: {
      validators: {
         callback: {
            message: "Please choose an administrator from the provided list.",
            callback: function(value, validator, $field) {
            diff="";
            var value = $field.val();
            if (value === "") {return true;}
            function split( n ) {
               return n.split( /,\\s*/ );
            }
            diff = $(split(value)).not(admin).get();
            console.log(diff);
            if (diff!="") {return false;}
            return true;
            }
         }
      }
   },
   topicimage: {
      validators: {
         regexp: {
            regexp: /^[\\w]+\\.(jpg|jpeg|png|gif)$/,
            message: "This must be a valid file name with one of this extension jpg, jpeg, png, gif."
         }
      }
   },
   topicname: {
      validators: {
         regexp: {
            regexp: /^[a-z]+$/i,
            message: "This must be a simple word without space."
         }
      }
   },
   ';
    $fields = sql_num_fields($result);
    echo auto_complete_multi('admin', 'aid', 'authors', 'topicadmin', '');
    adminfieldinp($result);
    adminfieldinp($res);
    adminfoot('fv', $fv_parametres, '', '');
}