Ejemplo n.º 1
0
function ConfigureBan($ModPath, $ModStart)
{
    global $f_meta_nom, $f_titre, $adminimg;
    if (file_exists("slogs/spam.log")) {
        $fd = fopen("slogs/spam.log", "r");
        while (!feof($fd)) {
            $ip_ban .= fgets($fd, 4096);
        }
        fclose($fd);
    }
    adminhead($f_meta_nom, $f_titre, $adminimg);
    echo '
   <div>
      <p>' . ipban_translate("Chaque ligne ne doit contenir qu'une adresse IP de la forme : a.b.c.d:<b>X</b> (ex : 168.192.1.1:5)<br />si <b>X</b> >= 5 alors l'accès sera refusé<br /><br />Ce fichier est mis à jour automatiquement par l'anti-spam de NPDS.") . '</p>
      <form id="ipban_mod" action="admin.php" method="post">
         <div class="form-group">
            <label class="control-label" for="ip_ban">' . ipban_translate("Liste des IP") . '</label>
            <textarea id="ip_ban" class="form-control" name="ipban" rows="20">' . $ip_ban . '</textarea>
         </div>
         <div class="form-group">
            <button class="btn btn-primary" type="submit">' . adm_translate("Sauver les modifications") . '</button>
            <input type="hidden" name="op" value="Extend-Admin-SubModule" />
            <input type="hidden" name="ModPath" value="' . $ModPath . '" />
            <input type="hidden" name="ModStart" value="' . $ModStart . '" />
            <input type="hidden" name="subop" value="SaveSetBan" />
         </div>
      </form>
   </div>
</div>';
}
Ejemplo n.º 2
0
function mblock()
{
    global $hlpfile, $NPDS_Prefix, $f_meta_nom, $f_titre, $adminimg;
    include "header.php";
    GraphicAdmin($hlpfile);
    adminhead($f_meta_nom, $f_titre, $adminimg);
    echo '
   <hr />
   <h3>' . adm_translate("Edition du Bloc Principal") . '</h3>';
    $result = sql_query("SELECT title, content FROM " . $NPDS_Prefix . "mainblock");
    if (sql_num_rows($result) > 0) {
        while (list($title, $content) = sql_fetch_row($result)) {
            echo '
         <form id="fad_mblock" action="admin.php" method="post">
            <div class="form-group row">
               <label class="form-control-label col-xs-12" for="title">' . adm_translate("Titre") . '</label>
               <div class="col-xs-12">
                  <textarea class="form-control" type="text" id="title" name="title" maxlength="255" placeholder="' . adm_translate("Titre :") . '">' . $title . '</textarea>
                  <span class="help-block text-xs-right"><span id="countcar_title"></span></span>
               </div>
            </div>
            <div class="form-group row">
               <label class="form-control-label col-xs-12" for="content">' . adm_translate("Contenu") . '</label>
               <div class="col-xs-12">
                  <textarea class="form-control" rows="25" id="content" name="content">' . $content . '</textarea>
               </div>
            </div>
            <input type="hidden" name="op" value="changemblock" />
            <div class="form-group row">
               <div class="col-xs-12">
                  <button class="btn btn-outline-primary btn-block" type="submit"><i class ="fa fa-check fa-lg"></i>&nbsp;' . adm_translate("Valider") . '</button>
               </div>
            </div>
         </form>
         <script type="text/javascript">
         //<![CDATA[
            $(document).ready(function() {
               inpandfieldlen("title",255);
            });
         //]]>
         </script>';
        }
    }
    adminfoot('fv', '', '', '');
}
Ejemplo n.º 3
0
function hreferer($filter)
{
    global $hlpfile, $f_meta_nom, $adminimg, $admf_ext, $f_titre;
    include "header.php";
    GraphicAdmin($hlpfile);
    adminhead($f_meta_nom, $f_titre, $adminimg);
    settype($filter, "integer");
    if (!$filter) {
        $filter = 2048;
    }
    echo '
   <h3>' . adm_translate("Qui parle de nous ?") . '</h3>
   <form action="admin.php" method="post">
      <input type="hidden" name="op" value="hreferer" />
      <div class="form-group">
      <div class="row>">
         <label class="form-control-label col-sm-4" for="filter">' . adm_translate("Filtre") . '</label>
         <div class="col-sm-4">
            <input type="number" class="form-control" name="filter" min="0" max="99999" value="' . $filter . '" />
         </div>
         <div class="col-sm-4 xs-hidden"></div><div class="clearfix"></div>
      </div>
   </div>
   </form>
   <table id ="tad_refe" data-toggle="table" data-striped="true" data-search="true" data-show-toggle="true" data-mobile-responsive="true" data-icons="icons" data-icons-prefix="fa">
   <thead>
      <tr>
         <th data-sortable="true">Url</th>
         <th data-sortable="true">Hit</th>
      </tr>
   </thead>
   <tbody>';
    $hresult = sql_query("SELECT url, COUNT(url) AS TheCount, substring(url,1,{$filter}) AS filter FROM " . $NPDS_Prefix . "referer GROUP BY filter ORDER BY TheCount DESC");
    while (list($url, $TheCount) = sql_fetch_row($hresult)) {
        echo '
      <tr>
         <td>';
        if ($TheCount == 1) {
            echo '<a href="' . $url . '" target="_blank">';
        }
        if ($filter != 2048) {
            echo '<span>' . substr($url, 0, $filter) . '</span><span class="text-muted">' . substr($url, $filter) . '</span>';
        } else {
            echo $url;
        }
        if ($TheCount == 1) {
            echo '</a>';
        }
        echo '</a>
         </td>
         <td align="right">' . $TheCount . '</td>
      </tr>';
    }
    echo '
   </tbody>
   </table>
   <br />
   <ul class="nav nav-pills">
      <li><a href="admin.php?op=delreferer" class="text-danger">' . adm_translate("Effacer les Référants") . '</a></li>
      <li><a href="admin.php?op=archreferer&amp;filter=' . $filter . '">' . adm_translate("Archiver les Référants") . '</a></li>
   </ul>';
    adminfoot('', '', '', '');
}
Ejemplo n.º 4
0
function ForumGoDel($forum_id, $ok = 0)
{
    global $hlpfile;
    global $NPDS_Prefix;
    if ($ok == 1) {
        sql_query("DELETE FROM " . $NPDS_Prefix . "forumtopics WHERE forum_id='{$forum_id}'");
        sql_query("DELETE FROM " . $NPDS_Prefix . "forum_read WHERE forum_id='{$forum_id}'");
        control_efface_post("forum_npds", "", "", $forum_id);
        sql_query("DELETE FROM " . $NPDS_Prefix . "forums WHERE forum_id='{$forum_id}'");
        Q_Clean();
        global $aid;
        Ecr_Log("security", "DeleteForum({$forum_id}) by AID : {$aid}", "");
        Header("Location: admin.php?op=ForumAdmin");
    } else {
        include "header.php";
        GraphicAdmin($hlpfile);
        opentable();
        echo "<p align=\"center\" class=\"rouge\"><b>" . adm_translate("ATTENTION :  êtes-vous certain de vouloir effacer ce Forum et tous ses Sujets ?") . "</b><br /><br />";
    }
    echo "[ <a href=\"admin.php?op=ForumGoDel&amp;forum_id={$forum_id}&amp;ok=1\" class=\"rouge\">" . adm_translate("Oui") . "</a> | <a href=\"admin.php?op=ForumAdmin\" class=\"noir\">" . adm_translate("Non") . "</a> ]<br /><br />";
    closetable();
    include "footer.php";
}
Ejemplo n.º 5
0
/* DUNE by NPDS                                                         */
/* ===========================                                          */
/*                                                                      */
/* Session and log Viewer Copyright (c) 2009 - Tribal-Dolphin           */
/*                                                                      */
/* NPDS Copyright (c) 2002-2012 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.       */
/************************************************************************/
if (!stristr($_SERVER['PHP_SELF'], "admin.php")) {
    Access_Error();
}
$f_meta_nom = 'session_log';
$f_titre = adm_translate("Gestion des Logs");
//==> controle droit
admindroits($aid, $f_meta_nom);
//<== controle droit
global $language, $ModPath, $ModStart;
$old_language = $language;
include_once "modules/upload/upload.conf.php";
if ($DOCUMENTROOT == "") {
    global $DOCUMENT_ROOT;
    if ($DOCUMENT_ROOT) {
        $DOCUMENTROOT = $DOCUMENT_ROOT;
    } else {
        $DOCUMENTROOT = $_SERVER['DOCUMENT_ROOT'];
    }
}
$FileSecure = $DOCUMENTROOT . $racine . "/slogs/security.log";
Ejemplo n.º 6
0
function EditReseaux($ModPath, $ModStart, $f_meta_nom, $f_titre, $adminimg, $rs_id, $rs_url, $rs_ico, $subop)
{
    if (file_exists("modules/{$ModPath}/reseaux-sociaux.conf.php")) {
        include "modules/{$ModPath}/reseaux-sociaux.conf.php";
    }
    adminhead($f_meta_nom, $f_titre, $adminimg);
    if ($subop == 'AddReseaux') {
        echo '
   <hr /><h3>' . adm_translate("Ajouter") . '</h3>';
    } else {
        echo '
   <hr /><h3>' . adm_translate("Editer") . '</h3>';
    }
    echo '
   <form id="reseaux_adm" action="admin.php" method="post">
      <div class="form-group row">
         <label class="form-control-label col-sm-3" for="rs_id">' . adm_translate("Nom") . '</label>
         <div class="col-sm-9">
            <input id="rs_id" class="form-control" type="text" name="rs_id"  maxlength="50"  placeholder="' . adm_translate("") . '" value="' . urldecode($rs_id) . '" required="required" />
            <span class="help-block text-xs-right"><span id="countcar_rs_id"></span></span>
         </div>
      </div>
      <div class="form-group row">
         <label class="form-control-label col-sm-3" for="rs_url">' . adm_translate("URL") . '</label>
         <div class="col-sm-9">
            <input id="rs_url" class="form-control" type="text" name="rs_url"  maxlength="100" placeholder="' . adm_translate("") . '" value="' . urldecode($rs_url) . '" required="required" />
            <span class="help-block text-xs-right"><span id="countcar_rs_url"></span></span>
         </div>
      </div>
      <div class="form-group row">
         <label class="form-control-label col-sm-3" for="rs_ico">' . adm_translate("Icône") . '</label>
         <div class="col-sm-9">
            <input id="rs_ico" class="form-control" type="text" name="rs_ico"  maxlength="40" placeholder="' . adm_translate("") . '" value="' . stripcslashes(urldecode($rs_ico)) . '" required="required" />
            <span class="help-block text-xs-right"><span id="countcar_rs_ico"></span></span>
         </div>
      </div>
      <div class="form-group row">
         <div class="col-sm-9 offset-sm-3">
            <button class="btn btn-primary col-xs-12" type="submit"><i class="fa fa-check-square fa-lg"></i>&nbsp;' . adm_translate("Sauver") . '</button>
            <input type="hidden" name="op" value="Extend-Admin-SubModule" />
            <input type="hidden" name="ModPath" value="' . $ModPath . '" />
            <input type="hidden" name="ModStart" value="' . $ModStart . '" />
            <input type="hidden" name="subop" value="SaveSetReseaux" />
            <input type="hidden" name="adm_img_mod" value="1" />
         </div>
      </div>
   </form>
   <script type="text/javascript">
   //<![CDATA[
   $(document).ready(function() {
      inpandfieldlen("rs_id",50);
      inpandfieldlen("rs_url",100);
      inpandfieldlen("rs_ico",40);
   })
   //]]>
   </script>';
    adminfoot('fv', '', '', '');
}
Ejemplo n.º 7
0
function autoEdit($anid)
{
    global $aid, $hlpfile, $tipath, $radminsuper, $NPDS_Prefix, $adminimg;
    $f_meta_nom = 'autoStory';
    $f_titre = adm_translate("Editer un Article");
    //==> controle droit
    admindroits($aid, $f_meta_nom);
    //<== controle droit
    $result = sql_query("SELECT catid, title, time, hometext, bodytext, topic, informant, notes, ihome, date_debval,date_finval,auto_epur FROM " . $NPDS_Prefix . "autonews WHERE anid='{$anid}'");
    list($catid, $title, $time, $hometext, $bodytext, $topic, $informant, $notes, $ihome, $date_debval, $date_finval, $epur) = sql_fetch_row($result);
    sql_free_result($result);
    $titre = stripslashes($title);
    $hometext = stripslashes($hometext);
    $bodytext = stripslashes($bodytext);
    $notes = stripslashes($notes);
    if ($topic < 1) {
        $topic = 1;
    }
    $affiche = false;
    $result2 = sql_query("SELECT topictext, topicimage, topicadmin FROM " . $NPDS_Prefix . "topics WHERE topicid='{$topic}'");
    list($topictext, $topicimage, $topicadmin) = sql_fetch_row($result2);
    if ($radminsuper) {
        $affiche = true;
    } else {
        $topicadminX = explode(',', $topicadmin);
        for ($i = 0; $i < count($topicadminX); $i++) {
            if (trim($topicadminX[$i]) == $aid) {
                $affiche = true;
            }
        }
    }
    if (!$affiche) {
        header("location: admin.php?op=autoStory");
    }
    $topiclogo = '<span class="label label-default pull-right"><strong>' . aff_langue($topictext) . '</strong></span>';
    include 'header.php';
    GraphicAdmin($hlpfile);
    adminhead($f_meta_nom, $f_titre, $adminimg);
    echo '<h3>' . adm_translate("Editer l'Article Automatique") . '</h3>';
    echo aff_local_langue(adm_translate("Langue de Prévisualisation"), '', 'local_user_language');
    echo '<div class="card card-block">';
    if ($topicimage !== '') {
        if (!($imgtmp = theme_image('topics/' . $topicimage))) {
            $imgtmp = $tipath . $topicimage;
        }
        $timage = $imgtmp;
        if (file_exists($imgtmp)) {
            $topiclogo = '<img class="img-fluid " src="' . $timage . '" align="right" alt="" />';
        }
    }
    //     $no_img=false;
    //     if ((file_exists("$tipath$topicimage")) and ($topicimage!="")) {
    //       echo "<img src=\"$tipath$topicimage\" border=\"0\" align=\"right\" alt=\"\" />";
    //     } else {
    //       $no_img=true;
    //     }
    code_aff('<h3>' . $subject . $topiclogo . '</h3>', '<div class="text-muted">' . $hometext . '</div>', $bodytext, $notes);
    if ($no_img) {
        echo "<b>" . aff_langue($topictext) . "</b>";
    }
    echo '<b>' . adm_translate("Utilisateur") . '</b>' . $informant . '<br /><br />';
    echo '
    </div>
   <form action="admin.php" method="post" name="adminForm">
      <div class="form-group row">
         <label class="form-control-label col-sm-4" for="title">' . adm_translate("Titre") . '</label>
         <div class="col-sm-8">
            <input class="form-control" type="text" name="title" size="50" value="' . $titre . '" />
         </div>
      </div>
      <div class="form-group row">
         <label class="form-control-label col-sm-4" for="topic">' . adm_translate("Sujet") . '</label>
         <div class="col-sm-8">
            <select class="c-select form-control" name="topic">';
    $toplist = sql_query("SELECT topicid, topictext, topicadmin FROM " . $NPDS_Prefix . "topics ORDER BY topictext");
    if ($radminsuper) {
        echo '
               <option value="">' . adm_translate("Tous les Sujets") . '</option>';
    }
    while (list($topicid, $topics, $topicadmin) = sql_fetch_row($toplist)) {
        $affiche = false;
        if ($radminsuper) {
            $affiche = true;
        } else {
            $topicadminX = explode(",", $topicadmin);
            for ($i = 0; $i < count($topicadminX); $i++) {
                if (trim($topicadminX[$i]) == $aid) {
                    $affiche = true;
                }
            }
        }
        if ($affiche) {
            if ($topicid == $topic) {
                $sel = 'selected="selected" ';
            }
            echo "<option {$sel} value=\"{$topicid}\">" . aff_langue($topics) . "</option>\n";
            $sel = '';
        }
    }
    echo ' 
            </select>
         </div>
      </div>';
    SelectCategory($catid);
    echo "<br />";
    puthome($ihome);
    echo '
      <div class="form-group row">
         <label class="form-control-label col-sm-12" for="hometext">' . adm_translate("Texte d'introduction") . '</label>
         <div class="col-sm-12">
            <textarea class="tin form-control" rows="25" name="hometext" >' . $hometext . '</textarea>
         </div>
      </div>
      ' . aff_editeur('hometext', '') . '
      <div class="form-group row">
         <label class="form-control-label col-sm-12" for="bodytext">' . adm_translate("Texte étendu") . '</label>
         <div class="col-sm-12">
            <textarea class="tin form-control" rows="25" name="bodytext" >' . $bodytext . '</textarea>
         </div>
      </div>
      ' . aff_editeur('bodytext', '');
    if ($aid != $informant) {
        echo '
      <div class="form-group row">
         <label class="form-control-label col-sm-12" for="notes">' . adm_translate("Notes") . '</label>
         <div class="col-sm-12">
            <textarea class="tin form-control" rows="7" name="notes">' . $notes . '</textarea>
         </div>
      </div>
      ' . aff_editeur('notes', '');
    }
    $deb_day = substr($date_debval, 8, 2);
    $deb_month = substr($date_debval, 5, 2);
    $deb_year = substr($date_debval, 0, 4);
    $deb_hour = substr($date_debval, 11, 2);
    $deb_min = substr($date_debval, 14, 2);
    //
    $fin_day = substr($date_finval, 8, 2);
    $fin_month = substr($date_finval, 5, 2);
    $fin_year = substr($date_finval, 0, 4);
    $fin_hour = substr($date_finval, 11, 2);
    $fin_min = substr($date_finval, 14, 2);
    //
    publication($deb_day, $deb_month, $deb_year, $deb_hour, $deb_min, $fin_day, $fin_month, $fin_year, $fin_hour, $fin_min, $epur);
    echo '
      <div class="form-group row">
         <div class="col-sm-12">
            <input type="hidden" name="anid" value="' . $anid . '" />
            <input type="hidden" name="op" value="autoSaveEdit" />
            <input class="btn btn-primary" type="submit" value="' . adm_translate("Sauver les modifications") . '" />
         </div>
      </div>
   </form>';
    adminfoot('fv', '', '', '');
}
Ejemplo n.º 8
0
function liste_group()
{
    global $NPDS_Prefix;
    $r = sql_query("SELECT groupe_id, groupe_name FROM " . $NPDS_Prefix . "groupes ORDER BY groupe_id ASC");
    $tmp_groupe[0] = "-> " . adm_translate("Supprimer") . "/" . adm_translate("Choisir un groupe") . " <-";
    while ($mX = sql_fetch_assoc($r)) {
        $tmp_groupe[$mX['groupe_id']] = aff_langue($mX['groupe_name']);
    }
    sql_free_result($r);
    return $tmp_groupe;
}
Ejemplo n.º 9
0
function ForumMaintAdmin()
{
    global $hlpfile, $NPDS_Prefix, $f_meta_nom, $f_titre, $adminimg;
    include "header.php";
    GraphicAdmin($hlpfile);
    adminhead($f_meta_nom, $f_titre, $adminimg);
    echo '
   <hr />
   <h3>' . adm_translate("Maintenance des Forums") . '</h3>';
    // Mark Topics, Synchro Forum_read table, Merge Forums
    echo '
   <div class="row">
      <div class="col-xs-12">
         <form id="fad_forumaction" action="admin.php" method="post">
            <input type="hidden" name="op" value="MaintForumMarkTopics" />
            <button class="btn btn-primary btn-block btn-lg" type="submit" name="Topics_Mark"><i class="fa fa-check-square-o fa-lg"></i>&nbsp;' . adm_translate("Marquer tous les Topics comme lus") . '</button>
         </form>
      </div>
      <div class="col-xs-12">
         <form action="admin.php" method="post">
            <input type="hidden" name="op" value="SynchroForum" />
            <button class="btn btn-primary btn-block btn-lg" type="submit" name="Synchro_Forum"><i class="fa fa-refresh fa-lg"></i>&nbsp;' . adm_translate("Synchroniser les forums") . '</button>
         </form>
      </div>
      <div class="col-xs-12">
         <form action="admin.php" method="post">
            <input type="hidden" name="op" value="MergeForum" />
            <button class="btn btn-primary btn-block btn-lg" type="submit" name="Merge_Forum"><i class="fa fa-compress fa-lg"></i>&nbsp;' . adm_translate("Fusionner des forums") . '</button>
         </form>
      </div>
   </div>
   <br />
   <form id="fad_forumdelete" action="admin.php" method="post">
      <legend>' . adm_translate("Supprimer massivement les Topics") . '</legend>
      <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 type="text" class="form-control" name="forum_name" id="forum_name" maxlength="150" />
         </div>
      </div>
      <div class="form-group row">
         <label class="form-control-label col-sm-4" for="before">' . adm_translate("Date") . '</label>
         <div class="col-sm-8">
            <div id="embeddingDatePicker"></div>
            <input type="hidden" class="form-control" name="before" id="before" value="" maxlength="11" placeholder="AAAA-MM-JJ" />
         </div>
      </div>
      <div class="form-group row">
         <div class="col-sm-8 offset-sm-4">
            <input type="hidden" name="op" value="MaintForumTopics" />
            <button class="btn btn-primary" type="submit" name="Topics_Mark">' . adm_translate("Envoyer") . '</button>
         </div>
      </div>
   </form>
   <script>
   $(document).ready(function() {
    $("#embeddingDatePicker")
        .datepicker({
            format: "yyyy-mm-dd",
            language:"' . language_iso(1, '', '') . '",
            title:"Avant cette date"
        })
        .on("changeDate", function(e) {
            $("#before").val($("#embeddingDatePicker").datepicker("getFormattedDate"));
            $("#fad_forumdelete").formValidation("revalidateField", "before");
        });
   });
   </script>';
    $fv_parametres = '
   
              before: {
                excluded: false,
                validators: {
                    notEmpty: {
                        message: "The date is required"
                    },
                    date: {
                        format: "YYYY-MM-DD",
                        message: "The date is not a valid"
                    }
                }
            },
';
    echo auto_complete("forname", "forum_name", "forums", "forum_name", "86400");
    adminfoot('fv', $fv_parametres, '', '');
}
Ejemplo n.º 10
0
function Ephemeridsedit($eid, $did, $mid)
{
    global $hlpfile, $NPDS_Prefix, $f_meta_nom, $f_titre, $adminimg;
    include "header.php";
    GraphicAdmin($hlpfile);
    adminhead($f_meta_nom, $f_titre, $adminimg);
    $result = sql_query("SELECT yid, content FROM " . $NPDS_Prefix . "ephem WHERE eid='{$eid}'");
    list($yid, $content) = sql_fetch_row($result);
    echo '
   <h3>' . adm_translate("Editer Ephéméride") . '</h3>
   <form action="admin.php" method="post">
      <div class="form-group">
          <label class="form-control-label" for="yid">' . adm_translate("Année : ") . '</label>
          <input class="form-control" type="number" name="yid" value="' . $yid . '" max="2500" />
      </div>
      <div class="form-group">
         <label class="form-control-label" for="content">' . adm_translate("Description de l'Ephéméride : ") . '</label>
         <textarea name="content" id="content" cols="55" class="textbox" rows="10">' . $content . '</textarea>
      </div>
      <input type="hidden" name="did" value="' . $did . '" />
      <input type="hidden" name="mid" value="' . $mid . '" />
      <input type="hidden" name="eid" value="' . $eid . '" />
      <input type="hidden" name="op" value="Ephemeridschange" />
      <button class="btn btn-primary" type="submit">' . adm_translate("Envoyer") . '</button>
   </form>';
    include 'footer.php';
}
Ejemplo n.º 11
0
function publishrights($author)
{
    global $NPDS_Prefix, $hlpfile, $radminsuper, $f_meta_nom, $f_titre, $adminimg;
    if ($radminsuper != 1) {
        Header("Location: admin.php?op=sections");
    }
    include "header.php";
    GraphicAdmin($hlpfile);
    adminhead($f_meta_nom, $f_titre, $adminimg);
    echo '
   <hr />
   <h3 class="mb-1">' . adm_translate("Droits des auteurs") . ' : <span class="text-muted">' . $author . '</span></h3>
   <form action="admin.php" method="post">';
    $result1 = sql_query("SELECT rubid, rubname FROM " . $NPDS_Prefix . "rubriques ORDER BY ordre");
    $numrow = sql_num_rows($result1);
    $i = 0;
    $scrr = '';
    $scrsr = '';
    while (list($rubid, $rubname) = sql_fetch_row($result1)) {
        echo '
         <table data-toggle="table" data-striped="true"  data-icons-prefix="fa" data-icons="icons">
            <thead>
               <tr>
                  <th class="n-t-col-xs-1" data-halign="center" data-align="center"><input id="ckbrall_' . $rubid . '" type="checkbox" /></th>
                  <th class="n-t-col-xs-3" data-sortable="true">';
        echo aff_langue($rubname) . '</th>
                  <th class="n-t-col-xs-2" data-halign="center" data-align="center">' . adm_translate("Créer") . '</th>
                  <th class="n-t-col-xs-2" data-halign="center" data-align="center">' . adm_translate("Publier") . '</th>
                  <th class="n-t-col-xs-2" data-halign="center" data-align="center">' . adm_translate("Modifier") . '</th>
                  <th class="n-t-col-xs-2" data-halign="center" data-align="center">' . adm_translate("Supprimer") . '</th>
               </tr>
            </thead>
            <tbody>';
        $scrr .= '
               $("#ckbrall_' . $rubid . '").change(function(){
                  $(".ckbr_' . $rubid . '").prop("checked", $(this).prop("checked"));
               });';
        $result2 = sql_query("SELECT secid, secname FROM " . $NPDS_Prefix . "sections WHERE rubid='{$rubid}' ORDER BY ordre");
        while (list($secid, $secname) = sql_fetch_row($result2)) {
            $result3 = sql_query("SELECT type FROM " . $NPDS_Prefix . "publisujet WHERE secid2='{$secid}' AND aid='{$author}'");
            $i++;
            $crea = '';
            $publi = '';
            $modif = '';
            $supp = '';
            if (sql_num_rows($result3) > 0) {
                while (list($type) = sql_fetch_row($result3)) {
                    if ($type == 1) {
                        $crea = 'checked="checked"';
                    } else {
                        if ($type == 2) {
                            $publi = 'checked="checked"';
                        } else {
                            if ($type == 3) {
                                $modif = 'checked="checked"';
                            } else {
                                if ($type == 4) {
                                    $supp = 'checked="checked"';
                                }
                            }
                        }
                    }
                }
            }
            echo '
               <tr>
                  <td><input id="ckbsrall_' . $secid . '" type="checkbox" /></td>
                  <td>' . aff_langue($secname) . '</td>
                  <td><input class="ckbsr_' . $secid . ' ckbr_' . $rubid . '" type="checkbox" name="creation[' . $i . ']" value="' . $secid . '" ' . $crea . ' /></td>
                  <td><input class="ckbsr_' . $secid . ' ckbr_' . $rubid . '" type="checkbox" name="publication[' . $i . ']" value="' . $secid . '" ' . $publi . ' /></td>
                  <td><input class="ckbsr_' . $secid . ' ckbr_' . $rubid . '" type="checkbox" name="modification[' . $i . ']" value="' . $secid . '" ' . $modif . ' /></td>
                  <td><input class="ckbsr_' . $secid . ' ckbr_' . $rubid . '" type="checkbox" name="suppression[' . $i . ']" value="' . $secid . '" ' . $supp . ' /></td>
               </tr>';
            $scrsr .= '
               $("#ckbsrall_' . $secid . '").change(function(){
                  $(".ckbsr_' . $secid . '").prop("checked", $(this).prop("checked"));
               });';
        }
        echo '
            </tbody>
         </table>
      <br />';
    }
    echo '<input type="hidden" name="chng_aid" value="' . $author . '" />
         <input type="hidden" name="op" value="updatedroitauteurs" />
         <input type="hidden" name="maxindex" value="' . $i . '" />
         <input class="btn btn-primary" type="submit" value="' . adm_translate("Valider") . '" />&nbsp;&nbsp;
         <input class="btn btn-secondary" type="button" onclick="javascript:history.back()" value="' . adm_translate("Retour en arrière") . '" />
         </form>';
    echo '
   <script type="text/javascript">
   //<![CDATA[
   $(document).ready(function(){
   ' . $scrr . $scrsr . '
   });
   //]]>
   </script>';
    include "footer.php";
}
Ejemplo n.º 12
0
function updateUser($chng_uid, $chng_uname, $chng_name, $chng_url, $chng_email, $chng_femail, $chng_user_from, $chng_user_occ, $chng_user_intrest, $chng_user_viewemail, $chng_avatar, $chng_user_sig, $chng_bio, $chng_pass, $chng_pass2, $level, $open_user, $chng_groupe, $chng_send_email, $chng_is_visible, $chng_mns, $C1, $C2, $C3, $C4, $C5, $C6, $C7, $C8, $M1, $M2, $T1, $T2, $B1, $raz_avatar, $chng_rank, $chng_lnl)
{
    global $NPDS_Prefix;
    $tmp = 0;
    if ($chng_pass2 != '') {
        if ($chng_pass != $chng_pass2) {
            global $hlpfile, $f_meta_nom, $f_titre, $adminimg;
            include "header.php";
            GraphicAdmin($hlpfile);
            adminhead($f_meta_nom, $f_titre, $adminimg);
            echo error_handler(adm_translate("Désolé, les nouveaux Mots de Passe ne correspondent pas. Cliquez sur retour et recommencez") . "<br />");
            adminfoot('', '', '', '');
            return;
        }
        $tmp = 1;
    }
    $result = sql_query("SELECT mns FROM " . $NPDS_Prefix . "users WHERE uid='{$chng_uid}'");
    list($tmp_mns) = sql_fetch_row($result);
    if ($tmp_mns == 0 and $chng_mns == 1) {
        Minisites($chng_mns, $chng_uname);
    }
    if ($chng_send_email == '') {
        $chng_send_email = '0';
    }
    if ($chng_is_visible == '') {
        $chng_is_visible = '1';
    } else {
        $chng_is_visible = '0';
    }
    if ($raz_avatar) {
        $chng_avatar = "blank.gif";
    }
    if ($tmp == 0) {
        sql_query("UPDATE " . $NPDS_Prefix . "users SET uname='{$chng_uname}', name='{$chng_name}', email='{$chng_email}', femail='{$chng_femail}', url='{$chng_url}', user_from='{$chng_user_from}', user_occ='{$chng_user_occ}', user_intrest='{$chng_user_intrest}', user_viewemail='{$chng_user_viewemail}', user_avatar='{$chng_avatar}', user_sig='{$chng_user_sig}', bio='{$chng_bio}', send_email='{$chng_send_email}', is_visible='{$chng_is_visible}', mns='{$chng_mns}', user_lnl='{$chng_lnl}' WHERE uid='{$chng_uid}'");
    }
    if ($tmp == 1) {
        global $system;
        if (!$system) {
            $cpass = crypt($chng_pass, $chng_pass);
        } else {
            $cpass = $chng_pass;
        }
        sql_query("UPDATE " . $NPDS_Prefix . "users SET uname='{$chng_uname}', name='{$chng_name}', email='{$chng_email}', femail='{$chng_femail}', url='{$chng_url}', user_from='{$chng_user_from}', user_occ='{$chng_user_occ}', user_intrest='{$chng_user_intrest}', user_viewemail='{$chng_user_viewemail}', user_avatar='{$chng_avatar}', user_sig='{$chng_user_sig}', bio='{$chng_bio}', send_email='{$chng_send_email}', is_visible='{$chng_is_visible}', mns='{$chng_mns}', pass='******', user_lnl='{$chng_lnl}' WHERE uid='{$chng_uid}'");
    }
    if ($chng_user_viewemail) {
        $attach = 1;
    } else {
        $attach = 0;
    }
    if ($open_user == '') {
        $open_user = 0;
    }
    if (preg_match('#[a-zA-Z_]#', $chng_groupe)) {
        $chng_groupe = '';
    }
    if ($chng_groupe != '') {
        $tab_groupe = explode(',', $chng_groupe);
        if ($tab_groupe) {
            foreach ($tab_groupe as $groupevalue) {
                if ($groupevalue == "0" and $groupevalue != '') {
                    $chng_groupe = '';
                }
                if ($groupevalue == "1") {
                    $chng_groupe = '';
                }
                if ($groupevalue > "127") {
                    $chng_groupe = '';
                }
            }
        }
    }
    sql_query("UPDATE " . $NPDS_Prefix . "users_status SET attachsig='{$attach}', level='{$level}', open='{$open_user}', groupe='{$chng_groupe}', rank='{$chng_rank}' WHERE uid='{$chng_uid}'");
    sql_query("UPDATE " . $NPDS_Prefix . "users_extend SET C1='{$C1}', C2='{$C2}', C3='{$C3}', C4='{$C4}', C5='{$C5}', C6='{$C6}', C7='{$C7}', C8='{$C8}', M1='{$M1}', M2='{$M2}', T1='{$T1}', T2='{$T2}', B1='{$B1}' WHERE uid='{$chng_uid}'");
    global $aid;
    Ecr_Log("security", "UpdateUser({$chng_uid}, {$chng_uname}) by AID : {$aid}", "");
    global $referer;
    if ($referer != "memberslist.php") {
        Header("Location: admin.php?op=mod_users");
    } else {
        Header("Location: memberslist.php");
    }
}
Ejemplo n.º 13
0
function send_email_to_user($username, $subject, $message, $all, $groupe, $expediteur)
{
    global $NPDS_Prefix, $f_meta_nom, $f_titre, $adminimg;
    if ($subject != '') {
        if ($expediteur == 1) {
            $emetteur = 1;
        } else {
            global $user;
            if ($user) {
                $userX = base64_decode($user);
                $userdata = explode(':', $userX);
                $emetteur = $userdata[0];
            } else {
                $emetteur = 1;
            }
        }
        if ($all) {
            $result = sql_query("SELECT uid, user_langue FROM " . $NPDS_Prefix . "users");
            while (list($to_userid, $user_langue) = sql_fetch_row($result)) {
                $tab_to_userid[] = $to_userid . ':' . $user_langue;
            }
        } else {
            if ($groupe) {
                $result = sql_query("SELECT s.uid, s.groupe, u.user_langue FROM " . $NPDS_Prefix . "users_status s, " . $NPDS_Prefix . "users u WHERE s.uid=u.uid AND s.groupe!='' ORDER BY s.uid ASC");
                while (list($to_userid, $groupeX, $user_langue) = sql_fetch_row($result)) {
                    $tab_groupe = explode(',', $groupeX);
                    if ($tab_groupe) {
                        foreach ($tab_groupe as $groupevalue) {
                            if ($groupevalue == $groupe) {
                                $tab_to_userid[] = $to_userid . ':' . $user_langue;
                            }
                        }
                    }
                }
            } else {
                $result = sql_query("SELECT uid, user_langue FROM " . $NPDS_Prefix . "users WHERE uname='{$username}'");
                while (list($to_userid, $user_langue) = sql_fetch_row($result)) {
                    $tab_to_userid[] = $to_userid . ':' . $user_langue;
                }
            }
        }
        if ($subject == '' or $message == '') {
            header("location: admin.php");
        }
        $message = str_replace('\\n', '<br />', $message);
        global $gmt;
        $time = date(translate("dateinternal"), time() + $gmt * 3600);
        $pasfin = false;
        $count = 0;
        include_once "language/lang-multi.php";
        while ($count < sizeof($tab_to_userid)) {
            $to_tmp = explode(':', $tab_to_userid[$count]);
            $to_userid = $to_tmp[0];
            if ($to_userid != '' and $to_userid != 1) {
                $sql = "INSERT INTO " . $NPDS_Prefix . "priv_msgs (msg_image, subject, FROM_userid, to_userid, msg_time, msg_text) ";
                $sql .= "VALUES ('{$image}', '{$subject}', '{$emetteur}', '{$to_userid}', '{$time}', '{$message}')";
                if ($resultX = sql_query($sql)) {
                    $pasfin = true;
                }
                // A copy in email if necessary
                global $nuke_url, $subscribe;
                if ($subscribe) {
                    $old_message = $message;
                    $sujet = translate_ml($to_tmp[1], 'Vous avez un nouveau message.');
                    $message = translate_ml($to_tmp[1], 'Bonjour') . ",<br /><br /><a href=\"{$nuke_url}/viewpmsg.php\">" . translate_ml($to_tmp[1], "Cliquez ici pour lire votre nouveau message.") . "</a><br /><br />";
                    include "signat.php";
                    copy_to_email($to_userid, $sujet, $message);
                    $message = $old_message;
                }
            }
            $count++;
        }
    }
    global $aid;
    Ecr_Log('security', "SendEmailToUser({$subject}) by AID : {$aid}", '');
    global $hlpfile;
    include 'header.php';
    GraphicAdmin($hlpfile);
    adminhead($f_meta_nom, $f_titre, $adminimg);
    echo '
   <hr />';
    if ($pasfin) {
        echo '
   <div class="alert alert-success"><strong>"' . stripslashes($subject) . '"</strong> ' . adm_translate("a été envoyée") . '.</div>';
    } else {
        echo '
   <div class="alert alert-danger"><strong>"' . stripslashes($subject) . '"</strong>' . adm_translate("n'a pas été envoyée") . '.</div>';
    }
    adminfoot('', '', '', '');
}
Ejemplo n.º 14
0
function edito($edito_type, $contents, $Xaff_jours, $Xaff_jour, $Xaff_nuit)
{
    global $hlpfile, $language, $f_meta_nom, $f_titre, $adminimg;
    include "header.php";
    GraphicAdmin($hlpfile);
    adminhead($f_meta_nom, $f_titre, $adminimg);
    if ($contents == '') {
        echo '
      <form id="fad_edi_choix" action="admin.php?op=Edito_load" method="post">
         <fieldset>
            <legend>' . adm_translate("Type d'éditorial") . '</legend>
            <div class="form-group">
               <select class="c-select form-control" name="edito_type" onchange="submit()">
                  <option value="0">' . adm_translate("Modifier l'Editorial") . ' ...</option>
                  <option value="G">' . adm_translate("Anonyme") . '</option>
                  <option value="M">' . adm_translate("Membre") . '</option>
               </select>
            </div>
         </fieldset>
      </form>';
    } else {
        if ($edito_type == 'G') {
            $edito_typeL = ' ' . adm_translate("Anonyme");
        } elseif ($edito_type == 'M') {
            $edito_typeL = ' ' . adm_translate("Membre");
        }
        if (strpos($contents, "[/jour]") > 0) {
            $contentJ = substr($contents, strpos($contents, "[jour]") + 6, strpos($contents, "[/jour]") - 6);
            $contentN = substr($contents, strpos($contents, "[nuit]") + 6, strpos($contents, "[/nuit]") - 19 - strlen($contentJ));
        }
        if (!$contentJ and !$contentN and !strpos($contents, "[/jour]")) {
            $contentJ = $contents;
        }
        echo '
      <form id="fad_edi_mod" action="admin.php" method="post" name="adminForm">
      <fieldset>
         <legend>' . adm_translate("Edito") . ' :' . $edito_typeL . '</legend>
         <div class="form-group">
            <label class="form-control-label" for="XeditoJ">' . adm_translate("Le jour") . '</label>';
        echo aff_editeur("XeditoJ", "false");
        echo '
            <textarea class="tin form-control" name="XeditoJ" rows="20" >';
        echo htmlspecialchars($contentJ, ENT_COMPAT | ENT_SUBSTITUTE | ENT_HTML401, cur_charset);
        echo '</textarea>
         </div>
         <div class="form-group">
            <label class="form-control-label" for="XeditoN">' . adm_translate("La nuit") . '</label>';
        echo aff_editeur("XeditoN", "false");
        echo '
            <textarea class="tin form-control" name="XeditoN" rows="20">';
        echo htmlspecialchars($contentN, ENT_COMPAT | ENT_SUBSTITUTE | ENT_HTML401, cur_charset);
        echo '</textarea>
         </div>
         <div class="form-group">
         <div class="row">
            <label class="col-sm-4 form-control-label" for="aff_jours">' . adm_translate("Afficher pendant") . '</label>
            <div class="col-sm-8">
               <div class="input-group">
                  <span class="input-group-addon">' . adm_translate("jour(s)") . '</span>
                  <input class="form-control" type="number" name="aff_jours" id="aff_jours" min="0" step="1" max="999" value="' . $Xaff_jours . '" data-fv-digits="true" required="required" />
               </div>
            </div>
         </div>
      </div>
         <div class="col-sm-offset-4 col-sm-8">
         <div class="form-group">
            <label class="checkbox-inline">
               <input type="checkbox" name="aff_jour" value="checked" ' . $Xaff_jour . ' />' . adm_translate("Le jour") . '
            </label> 
            <label class="checkbox-inline">
               <input type="checkbox" name="aff_nuit" value="checked" ' . $Xaff_nuit . ' />' . adm_translate("La nuit") . '
            </label>
            </div>
         </div>
      <input type="hidden" name="op" value="Edito_save" />
      <input type="hidden" name="edito_type" value="' . $edito_type . '" />
      <div class="form-group row">
         <div class="col-sm-offset-4 col-sm-8">
            <button class="btn btn-primary col-xs-12" type="submit" name="edito_confirm"><i class="fa fa-check fa-lg"></i>&nbsp;' . adm_translate("Sauver les modifications") . ' </button>
         </div>
         <div class="col-sm-offset-4 col-sm-8">
            <a href="admin.php?op=Edito" class="btn btn-secondary col-xs-12">' . adm_translate("Abandonner") . '</a>
         </div>
      </div>
      </fieldset>
      </form>';
    }
    adminfoot('fv', '', '', '');
}
Ejemplo n.º 15
0
function HeadlinesDel($hid, $ok = 0)
{
    global $NPDS_Prefix;
    if ($ok == 1) {
        sql_query("DELETE FROM " . $NPDS_Prefix . "headlines WHERE hid='{$hid}'");
        Header("Location: admin.php?op=HeadlinesAdmin");
    } else {
        global $hlpfile;
        include "header.php";
        GraphicAdmin($hlpfile);
        echo "<p align=\"center\"><br />";
        echo "<span class=\"rouge\">";
        echo "<b>" . adm_translate("Etes-vous sûr de vouloir supprimer cette boÓte de Titres ?") . "</b><br /><br /></span>";
    }
    echo "[ <a href=\"admin.php?op=HeadlinesDel&amp;hid={$hid}&amp;ok=1\" class=\"rouge\">" . adm_translate("Oui") . "</a> | <a href=\"admin.php?op=HeadlinesAdmin\" class=\"noir\">" . adm_translate("Non") . "</a> ]<br /><br />";
    include "footer.php";
}
Ejemplo n.º 16
0
function submissions()
{
    global $hlpfile, $NPDS_Prefix, $aid, $radminsuper, $f_meta_nom, $f_titre, $adminimg;
    $dummy = 0;
    include "header.php";
    GraphicAdmin($hlpfile);
    adminhead($f_meta_nom, $f_titre, $adminimg);
    $result = sql_query("SELECT qid, subject, timestamp, topic, uname FROM " . $NPDS_Prefix . "queue ORDER BY timestamp");
    if (sql_num_rows($result) == 0) {
        echo '
   <hr />
   <h3>' . adm_translate("Pas de nouveaux Articles postés") . '</h3>';
    } else {
        echo '
   <hr />
   <h3>' . adm_translate("Nouveaux Articles postés") . '&nbsp;<span class="tag tag-pill tag-default">' . sql_num_rows($result) . '</span></h3>
   <table id="tad_subm" data-toggle="table" data-striped="true" data-show-toggle="true" data-mobile-responsive="true" data-icons="icons" data-icons-prefix="fa">
      <thead>
         <tr>
            <th data-sortable="true" data-halign="center"><i class="fa fa-user fa-lg"></i></th>
            <th data-sortable="true" data-halign="center">' . adm_translate("Sujet") . '</th>
            <th data-sortable="true" data-halign="center">' . adm_translate("Titre") . '</th>
            <th data-sortable="true" data-halign="center">' . adm_translate("Date") . '</th>
            <th data-halign="center" data-align="right">' . adm_translate("Fonctions") . '</th>
         </tr>
      </thead>
      <tbody>';
        while (list($qid, $subject, $timestamp, $topic, $uname) = sql_fetch_row($result)) {
            if ($topic < 1) {
                $topic = 1;
            }
            $affiche = false;
            $result2 = sql_query("SELECT topicadmin, topictext, topicimage FROM " . $NPDS_Prefix . "topics WHERE topicid='{$topic}'");
            list($topicadmin, $topictext, $topicimage) = sql_fetch_row($result2);
            if ($radminsuper) {
                $affiche = true;
            } else {
                $topicadminX = explode(',', $topicadmin);
                for ($i = 0; $i < count($topicadminX); $i++) {
                    if (trim($topicadminX[$i]) == $aid) {
                        $affiche = true;
                    }
                }
            }
            echo '
         <tr>
            <td>' . $uname . '</td>
            <td>';
            if ($subject == '') {
                $subject = adm_translate("Aucun Sujet");
            }
            $subject = aff_langue($subject);
            if ($affiche) {
                echo '<img class=" " src="images/topics/' . $topicimage . '" height="30" width="30" alt="avatar" />&nbsp;<a href="admin.php?op=topicedit&amp;topicid=' . $topic . '" class="adm_tooltip">' . aff_langue($topictext) . '</a></td>
             <td align="left"><a href="admin.php?op=DisplayStory&amp;qid=' . $qid . '">' . $subject . '</a></td>';
            } else {
                echo aff_langue($topictext) . '</td>
            <td align="left"><i>' . $subject . '</i></td>';
            }
            echo '
             <td align="right">' . formatTimestamp($timestamp) . '</td>';
            if ($affiche) {
                echo '
             <td><a class="" href="admin.php?op=DisplayStory&amp;qid=' . $qid . '"><i class="fa fa-edit fa-lg" title="' . adm_translate("Editer") . '" data-toggle="tooltip" ></i></a>&nbsp;<a class="text-danger" href="admin.php?op=DeleteStory&amp;qid=' . $qid . '"><i class="fa fa-trash-o fa-lg" title="' . adm_translate("Effacer") . '" data-toggle="tooltip" ></i></a></td>
         </tr>';
            } else {
                echo '
            <td>&nbsp;</td>
         </tr>';
            }
            $dummy++;
        }
        if ($dummy < 1) {
            echo '<h3>' . adm_translate("Pas de nouveaux Articles postés") . '</h3>';
        } else {
            echo '
      </tbody>
   </table>';
        }
    }
    adminfoot('', '', '', '');
}
Ejemplo n.º 17
0
function adminMain($deja_affiches)
{
    global $language, $admart, $hlpfile, $aid, $admf_ext, $NPDS_Prefix;
    $hlpfile = "manuels/{$language}/admin.html";
    include "header.php";
    global $short_menu_admin;
    $short_menu_admin = false;
    $radminsuper = GraphicAdmin($hlpfile);
    ///????????
    echo '
   <div id="adm_men_art" class="adm_workarea">
   <h2><img src="images/admin/submissions.' . $admf_ext . '" class="adm_img" title="' . adm_translate("Articles") . '" alt="icon_' . adm_translate("Articles") . '" />&nbsp;' . adm_translate("Derniers") . ' ' . $admart . ' ' . adm_translate("Articles") . '</h2>';
    $resul = sql_query("SELECT sid FROM " . $NPDS_Prefix . "stories");
    $nbre_articles = sql_num_rows($resul);
    settype($deja_affiches, "integer");
    settype($admart, "integer");
    $result = sql_query("SELECT sid, title, hometext, topic, informant, time, archive FROM " . $NPDS_Prefix . "stories ORDER BY sid DESC LIMIT {$deja_affiches},{$admart}");
    if ($nbre_articles) {
        echo '
      <table id ="lst_art_adm" data-toggle="table" data-striped="true" data-search="true" data-show-toggle="true" data-mobile-responsive="true" data-icons-prefix="fa" data-icons="icons">
                <thead>
                    <tr>
                        <th data-sortable="true" data-halign="center" data-align="right">ID</th>
                        <th data-sortable="true" data-halign="center">' . adm_translate("Titre") . '</th>
                        <th data-sortable="true" data-halign="center">' . adm_translate("Sujet") . '</th>
                        <th data-halign="center" data-align="right">' . adm_translate("Fonctions") . '</th>
                    </tr>
                </thead>
                <tbody>';
        $i = 0;
        while (list($sid, $title, $hometext, $topic, $informant, $time, $archive) = sql_fetch_row($result) and $i < $admart) {
            $affiche = false;
            $result2 = sql_query("SELECT topicadmin, topictext, topicimage FROM " . $NPDS_Prefix . "topics WHERE topicid='{$topic}'");
            list($topicadmin, $topictext, $topicimage) = sql_fetch_row($result2);
            if ($radminsuper) {
                $affiche = true;
            } else {
                $topicadminX = explode(',', $topicadmin);
                for ($iX = 0; $iX < count($topicadminX); $iX++) {
                    if (trim($topicadminX[$iX]) == $aid) {
                        $affiche = true;
                    }
                }
            }
            $hometext = strip_tags($hometext, '<br><br />');
            $lg_max = 200;
            if (strlen($hometext) > $lg_max) {
                $hometext = substr($hometext, 0, $lg_max) . ' ...';
            }
            echo '
         <tr>
            <td>' . $sid . '</td>
            <td>';
            $title = aff_langue($title);
            if ($archive) {
                echo $title . ' <i>(archive)</i>';
            } else {
                if ($affiche) {
                    echo '<a data-toggle="popover" data-placement="bottom" data-trigger="hover" href="article.php?sid=' . $sid . '" data-content=\'   <div class="thumbnail"><img class="img-rounded" src="images/topics/' . $topicimage . '" height="80" width="80" alt="topic_logo" /><div class="caption">' . htmlentities($hometext, ENT_QUOTES) . '</div></div>\' title="' . $sid . '" data-html="true">' . $title . '</a>';
                } else {
                    echo '<i>' . $title . '</i>';
                }
            }
            if ($topictext == '') {
                echo '</td>
            <td>';
            } else {
                echo '</td>
            <td>' . $topictext . '<a href="index.php?op=newtopic&amp;topic=' . $topic . '" class="tooltip">' . aff_langue($topictext) . '</a>';
            }
            if ($affiche) {
                echo '</td>
            <td>
            <a href="admin.php?op=EditStory&amp;sid=' . $sid . '" ><i class="fa fa-edit fa-lg" title="' . adm_translate("Editer") . '" data-toggle="tooltip"></i></a>
            <a href="admin.php?op=RemoveStory&amp;sid=' . $sid . '" ><i class="fa fa-trash-o fa-lg text-danger" title="' . adm_translate("Effacer") . '" data-toggle="tooltip"></i></a>';
            } else {
                echo '</td>
            <td>';
            }
            echo '</td>
         </tr>';
            $i++;
        }
        echo '
         </tbody>
      </table>
      <ul class="pagination pagination-sm">
         <li class="page-item disabled"><a class="page-link" href="#">' . $nbre_articles . ' Articles</a></li>
         <li class="page-item"><a class="page-link" href="admin.php?op=suite_articles&amp;deja_affiches=0">' . adm_translate("Les plus récents") . '</a></li>';
        if ($deja_affiches >= $admart) {
            echo '
         <li class="page-item"><a class="page-link" href="admin.php?op=suite_articles&amp;deja_affiches=' . ($deja_affiches - $admart) . '" >' . adm_translate("Précédent") . '</a></li>';
        }
        if ($deja_affiches + $i < $nbre_articles) {
            $deja_affiches += $admart;
            echo '
         <li class="page-item"><a class="page-link" href="admin.php?op=suite_articles&amp;deja_affiches=' . $deja_affiches . '" >' . adm_translate("Suivant") . '</a></li>';
        }
        echo '
      </ul>';
        echo '
      <form id="fad_articles" class="form-inline" action="admin.php" method="post">
         <div class="form-group">
            <label class="form-control-label">' . adm_translate("ID Article:") . '</label>
               <input class="form-control" type="number" name="sid" size="10" />
         </div>
         <div class="form-group">
            <select class="custom-select form-control" name="op">
               <option value="EditStory" selected="selected">' . adm_translate(" Editer un Article ") . '</option>
               <option value="RemoveStory">' . adm_translate(" Effacer l'Article") . '</option>
            </select>
         </div>
         <div class="form-group">
            <button class="btn btn-primary" type="submit">' . adm_translate("Ok") . ' </button>
         </div>
      </form>';
    }
    echo '</div>';
    include "footer.php";
}
Ejemplo n.º 18
0
function copy_sample($fileX)
{
    global $hlpfile, $f_meta_nom, $f_titre, $adminimg;
    include "header.php";
    GraphicAdmin($hlpfile);
    adminhead($f_meta_nom, $f_titre, $adminimg);
    echo '
   <hr />
   <div class="card card-block">
       <p>' . adm_translate("Créer le fichier en utilisant le modèle") . ' ? <br /><br /><a class="btn btn-primary" href="admin.php?op=ConfigFiles_create&amp;modele=' . $fileX . '" >' . adm_translate("Oui") . '</a>&nbsp;&nbsp;<a class="btn btn-secondary" href="admin.php?op=ConfigFiles" >' . adm_translate("Non") . '</a></p>
   </div>';
    adminfoot('', '', '', '');
}
Ejemplo n.º 19
0
function publishrights($author)
{
    global $NPDS_Prefix, $hlpfile, $radminsuper, $f_meta_nom, $f_titre, $adminimg;
    if ($radminsuper != 1) {
        Header("Location: admin.php?op=sections");
    }
    include "header.php";
    GraphicAdmin($hlpfile);
    adminhead($f_meta_nom, $f_titre, $adminimg);
    echo '
   <h3>' . adm_translate("Droits des auteurs") . ' :: ' . $author . '</h3>
   <form action="admin.php" method="post">';
    include_once "lib/togglediv.class.php";
    $result1 = sql_query("SELECT rubid, rubname FROM " . $NPDS_Prefix . "rubriques ORDER BY ordre");
    $numrow = sql_num_rows($result1);
    $toggle = new ToggleDiv($numrow);
    echo $toggle->All();
    echo "<hr noshade=\"noshade\" class=\"ongl\" />";
    $i = 0;
    while (list($rubid, $rubname) = sql_fetch_row($result1)) {
        echo "<table width=\"100%\" cellspacing=\"1\" cellpadding=\"0\" border=\"0\">\n            <tr>\n            <td class=\"header\" width=\"40%\">";
        echo $toggle->Img();
        echo aff_langue($rubname) . "</td>\n            <td class=\"header\"align=\"center\" width=\"15%\">" . adm_translate("Créer") . "</td>\n            <td class=\"header\"align=\"center\" width=\"15%\">" . adm_translate("Publier") . "</td>\n            <td class=\"header\"align=\"center\" width=\"15%\">" . adm_translate("Modifier") . "</td>\n            <td class=\"header\"align=\"center\" width=\"15%\">" . adm_translate("Supprimer") . "</td>\n            </tr></table>";
        echo $toggle->Begin();
        $result2 = sql_query("SELECT secid, secname FROM " . $NPDS_Prefix . "sections WHERE rubid='{$rubid}' ORDER BY ordre");
        echo "<table width=\"100%\" cellspacing=\"1\" cellpadding=\"2\" border=\"0\">";
        $rowcolor = tablos();
        while (list($secid, $secname) = sql_fetch_row($result2)) {
            $result3 = sql_query("SELECT type FROM " . $NPDS_Prefix . "publisujet WHERE secid2='{$secid}' and aid='{$author}'");
            $i++;
            $crea = "";
            $publi = "";
            $modif = "";
            $supp = "";
            if (sql_num_rows($result3) > 0) {
                while (list($type) = sql_fetch_row($result3)) {
                    if ($type == 1) {
                        $crea = "checked=\"checked\"";
                    } else {
                        if ($type == 2) {
                            $publi = "checked=\"checked\"";
                        } else {
                            if ($type == 3) {
                                $modif = "checked=\"checked\"";
                            } else {
                                if ($type == 4) {
                                    $supp = "checked=\"checked\"";
                                }
                            }
                        }
                    }
                }
            }
            echo "<tr>\n               <td width=\"40%\">" . aff_langue($secname) . "</td>\n               <td align=\"center\" width=\"15%\"><input type=\"checkbox\" name=\"creation[{$i}]\" value=\"{$secid}\" {$crea} /></td>\n               <td align=\"center\" width=\"15%\"><input type=\"checkbox\" name=\"publication[{$i}]\" value=\"{$secid}\" {$publi} /></td>\n               <td align=\"center\" width=\"15%\"><input type=\"checkbox\" name=\"modification[{$i}]\" value=\"{$secid}\" {$modif} /></td>\n               <td align=\"center\" width=\"15%\"><input type=\"checkbox\" name=\"suppression[{$i}]\" value=\"{$secid}\" {$supp} /></td>\n               </tr>";
        }
        echo '</table>';
        echo $toggle->End();
        echo '<br />';
    }
    echo '<input type="hidden" name="chng_aid" value="' . $author . '" />
         <input type="hidden" name="op" value="updatedroitauteurs" />
         <input type="hidden" name="maxindex" value="' . $i . '" />
         <input class="btn btn-primary" type="submit" value="' . adm_translate("Valider") . '" />&nbsp;&nbsp;
         <input class="btn btn-secondary" type="button" onclick="javascript:history.back()" value="' . adm_translate("Retour en arrière") . '" />
         </form>';
    closetable();
    include "footer.php";
}
Ejemplo n.º 20
0
function reviews()
{
    global $hlpfile;
    global $NPDS_Prefix, $f_meta_nom, $f_titre, $adminimg;
    include "header.php";
    GraphicAdmin($hlpfile);
    adminhead($f_meta_nom, $f_titre, $adminimg);
    $resultrm = sql_query("SELECT title, description FROM " . $NPDS_Prefix . "reviews_main");
    list($title, $description) = sql_fetch_row($resultrm);
    echo '
   <h3>' . adm_translate("Configuration de la page") . '</h3>
   <form id="fad_pagereviews" class="" action="admin.php" method="post">
      <fieldset>
         <div class="form-group">
            <label for="tit_cri">' . adm_translate("Titre de la Page des Critiques") . '</label>
            <input id="tit_cri" type="text" class="form-control" name="title" value="' . $title . '" maxlength="100" />
         </div>
         <div class="form-group">
            <label for="description">' . adm_translate("Description de la Page des Critiques") . '</label>
            <textarea id="description" class="form-control" name="description" rows="10">' . $description . '</textarea>
         </div>
         <div class="form-group">
            <input type="hidden" name="op" value="mod_main" />
            <button class="btn btn-primary col-xs-12" type="submit"><i class="fa fa-check-square fa-lg"></i>&nbsp;' . adm_translate("Sauver les modifications") . '</button>
         </div>
      </fieldset>
   </form>
   <h3>' . adm_translate("Critiques en attente de validation") . '</h3>';
    $result = sql_query("SELECT * FROM " . $NPDS_Prefix . "reviews_add ORDER BY id");
    $numrows = sql_num_rows($result);
    if ($numrows > 0) {
        while (list($id, $date, $title, $text, $reviewer, $email, $score, $url, $url_title) = sql_fetch_row($result)) {
            $title = stripslashes($title);
            $text = stripslashes($text);
            echo '
   <h4>' . adm_translate("Ajouter la critique N° : ") . ' ' . $id . '</h4>
   <form id="fad_valreviews' . $id . '" action="admin.php" method="post">
   <input type="hidden" name="id" value="' . $id . '" />
      <div class="form-group">
         <div class="row">
            <label class="form-control-label col-sm-4" for="date">' . adm_translate("Date") . '</label>
            <div class="col-sm-8">
               <div class="input-group input-append date" id="datePicker">
                  <input class="form-control" type="text" name="date" value="' . $date . '" maxlength="10" data-provide="datepicker" data-date-format="yyyy-mm-dd"  data-date-language="' . language_iso(1, '', '') . '" />
                  <span class="input-group-addon add-on"><span class="glyphicon glyphicon-calendar"></span></span>
               </div>
            </div>
         </div>
      </div>
      <div class="form-group">
         <div class="row">
            <label class="form-control-label col-sm-4" for="title">' . adm_translate("Nom du produit") . '</label>
            <div class="col-sm-8">
               <input class="form-control" type="text" name="title" value="' . $title . '" maxlength="40" />
            </div>
         </div>
      </div>
      <div class="form-group">
         <div class="row">
         <label class="form-control-label col-sm-4 col-md-4" for="text' . $id . '">' . adm_translate("Texte") . '</label>
            <div class="col-sm-8">
               <textarea class="form-control" name="text" rows="6">' . $text . '</textarea>
            </div>
         </div>
      </div>
      <div class="form-group">
         <div class="row">
            <label class="form-control-label col-sm-4 col-md-4" for="reviewer">' . adm_translate("Le critique") . '</label>
            <div class="col-sm-8">
               <input class="form-control" type="text" name="reviewer" value="' . $reviewer . '" maxlength="20" />
               <span class="help-block text-xs-right"><span id="countcar_reviewer"></span></span>
            </div>
         </div>
      </div>
      <div class="form-group">
         <div class="row">
            <label class="form-control-label col-sm-4 col-md-4" for="email">' . adm_translate("E-mail") . '</label>
            <div class="col-sm-8">
               <input class="form-control" type="email" id="email" name="email" value="' . $email . '" maxlength="30" />
               <span class="help-block text-xs-right"><span id="countcar_email"></span></span>
            </div>
         </div>
      </div>
      <div class="form-group">
         <div class="row">
            <label class="form-control-label col-sm-4 col-md-4" for="score">' . adm_translate("Note") . '</label>
            <div class="col-sm-8">
               <input class="form-control" type="number" id="score" name="score" value="' . $score . '"  min="1" max="10" />
            </div>
         </div>
      </div>';
            if ($url != '') {
                echo '
      <div class="form-group">
         <div class="row">
            <label class="form-control-label col-sm-4 col-md-4" for="url">' . adm_translate("Liens relatifs") . '</label>
            <div class="col-sm-8">
               <input class="form-control" type="url" id="url" name="url" value="' . $url . '" maxlength="100" />
               <span class="help-block text-xs-right"><span id="countcar_url"></span></span>
            </div>
         </div>
      </div>
      <div class="form-group">
         <div class="row">
            <label class="form-control-label col-sm-4 col-md-4" for="url_title">' . adm_translate("Titre du lien") . '</label>
            <div class="col-sm-8">
               <input class="form-control" type="text" id="url_title" name="url_title" value="' . $url_title . '" maxlength="50" />
               <span class="help-block text-xs-right"><span id="countcar_url_title"></span></span>
            </div>
         </div>
      </div>';
            }
            echo '
      <div class="form-group">
         <div class="row">
            <label class="form-control-label col-sm-4" for="cover">' . adm_translate("Image de garde") . '</label>
            <div class="col-sm-8">
               <input class="form-control" type="text" id="cover" name="cover" maxlength="100" />
               <span class="help-block">150*150 pixel => images/covers</span>
            </div>
         </div>
      </div>
      <div class="form-group">
         <input type="hidden" name="op" value="add_review">
         <button class="btn btn-primary" type="submit"><i class="fa fa-plus-square fa-lg"></i>&nbsp;' . adm_translate("Ajouter cette critique") . '</button>
         <a href="admin.php?op=deleteNotice&amp;id=' . $id . '&amp;op_back=reviews" class="btn btn-danger" role="button">' . adm_translate("Supprimer cette Critique") . '</a>
      </div>
   </form>';
        }
    } else {
        echo "<br />" . adm_translate("Aucune critique à ajouter") . "<br />";
    }
    echo "<hr noshade=\"noshade\" class=\"ongl\" /><p align=\"center\"><a href=\"reviews.php?op=write_review\" class=\"noir\">" . adm_translate("Cliquer ici pour proposer une Critique.") . "</a></p><hr noshade class=\"ongl\">";
    echo adm_translate("Effacer / Modifier une Critique");
    echo "<br />";
    echo adm_translate("Vous pouvez simplement Effacer / Modifier les Critiques en naviguant sur") . " <a href=\"reviews.php\" class=\"noir\">reviews.php</a> " . adm_translate("en tant qu'Administrateur.") . "<br />";
    adminfieldinp($result);
    sql_free_result($result);
    adminfoot('fv', '', '', '');
}
Ejemplo n.º 21
0
function Get_Name_Group($ordre, $GrpActu)
{
    $tmp_groupe = liste_group("");
    $tmp_groupe[127] = gal_trans("Administrateurs");
    $tmp_groupe[0] = adm_translate("Public");
    $tmp_groupe[1] = adm_translate("Utilisateur enregistré");
    if ($ordre == "list") {
        asort($tmp_groupe);
        return $tmp_groupe;
    } else {
        return $tmp_groupe[abs($GrpActu)];
    }
}
Ejemplo n.º 22
0
function lnl_user_list()
{
    global $hlpfile, $NPDS_Prefix, $f_meta_nom, $f_titre, $adminimg;
    include "header.php";
    GraphicAdmin($hlpfile);
    adminhead($f_meta_nom, $f_titre, $adminimg);
    $result = sql_query("SELECT email, date, status FROM " . $NPDS_Prefix . "lnl_outside_users ORDER BY date");
    echo '
   <h3>' . adm_translate("Liste des prospects") . '</h3>
   <table id="tad_prospect" data-toggle="table" data-search="true" data-striped="true" data-mobile-responsive="true" data-show-export="true" data-icons="icons" data-icons-prefix="fa">
      <thead>
         <tr>
            <th class="col-md-6" data-sortable="true">' . adm_translate("E-mail") . '</th>
            <th class="col-md-4" data-sortable="true">' . adm_translate("Date") . '</th>
            <th class="col-md-1" data-sortable="true">' . adm_translate("Status") . '</th>
            <th class="col-md-1" data-sortable="true">' . adm_translate("Fonctions") . '</th>
         </tr>
      </thead>
      <tbody>';
    while (list($email, $date, $status) = sql_fetch_row($result)) {
        echo '
         <tr>
            <td>' . $email . '</td>
            <td>' . $date . '</td>';
        if ($status == "NOK") {
            echo '
            <td class="text-danger">' . $status . '</td>';
        } else {
            echo '
            <td class="text-success">' . $status . '</td>';
        }
        echo '
            <td><a href="admin.php?op=lnl_Sup_User&amp;lnl_user_email=' . $email . '" class="text-danger"><i class="fa fa-trash-o fa-lg text-danger" data-toggle="tooltip" title="' . adm_translate("Effacer") . '"></i></a></td>
         </tr>';
    }
    echo '
      </tbody>
   </table>
   <br /><a href="javascript:history.go(-1)" class="btn btn-secondary">' . adm_translate("Retour en arriére") . '</a>';
    adminfoot('', '', '', '');
}
Ejemplo n.º 23
0
function previewAdminStory($subject, $hometext, $bodytext, $topic, $catid, $ihome, $members, $Mmembers, $deb_day, $deb_month, $deb_year, $deb_hour, $deb_min, $fin_day, $fin_month, $fin_year, $fin_hour, $fin_min, $epur)
{
    global $NPDS_Prefix, $tipath, $hlpfile, $language, $aid, $radminsuper, $adminimg, $topicimage;
    $hlpfile = "manuels/{$language}/newarticle.html";
    $subject = stripslashes(str_replace('"', '&quot;', $subject));
    $hometext = stripslashes($hometext);
    $bodytext = stripslashes($bodytext);
    if ($topic < 1) {
        $topic = 1;
    }
    $affiche = false;
    $result2 = sql_query("SELECT topictext, topicimage, topicadmin FROM " . $NPDS_Prefix . "topics WHERE topicid='{$topic}'");
    list($topictext, $topicimage, $topicadmin) = sql_fetch_row($result2);
    if ($radminsuper) {
        $affiche = true;
    } else {
        $topicadminX = explode(',', $topicadmin);
        for ($i = 0; $i < count($topicadminX); $i++) {
            if (trim($topicadminX[$i]) == $aid) {
                $affiche = true;
            }
        }
    }
    if (!$affiche) {
        header("location: admin.php");
    }
    $f_meta_nom = 'adminStory';
    $f_titre = adm_translate("Nouvel Article");
    //==> controle droit
    //   admindroits($aid,$f_meta_nom); // à voir l'intégrationavec les droits sur les topics ...
    //<== controle droit
    $topiclogo = '<span class="label label-default pull-right"><strong>' . aff_langue($topictext) . '</strong></span>';
    include 'header.php';
    GraphicAdmin($hlpfile);
    global $local_user_language;
    adminhead($f_meta_nom, $f_titre, $adminimg);
    echo '
   <h3>' . adm_translate("Prévisualiser l'Article") . '</h3>
   <form action="admin.php" method="post" name="adminForm">
   <label class="form-control-label">' . adm_translate("Langue de Prévisualisation") . '</label> ' . aff_localzone_langue("local_user_language");
    echo '<div class="card card-block">';
    if ($topicimage !== '') {
        if (!($imgtmp = theme_image('topics/' . $topicimage))) {
            $imgtmp = $tipath . $topicimage;
        }
        $timage = $imgtmp;
        if (file_exists($imgtmp)) {
            $topiclogo = '<img class="img-fluid " src="' . $timage . '" align="right" alt="" />';
        }
    }
    code_aff('<h3>' . $subject . $topiclogo . '</h3>', '<div class="text-muted">' . $hometext . '</div>', $bodytext, '');
    echo '
   </div>
      <div class="form-group row">
         <label class="col-sm-4 form-control-label" for="subject">' . adm_translate("Titre") . '</label>
         <div class="col-sm-8">
            <input class="form-control" type="text" name="subject" value="' . $subject . '" />
         </div>
      </div>
      <div class="form-group row">
         <label class="col-sm-4 form-control-label" for="topic">' . adm_translate("Sujet") . '</label>
         <div class="col-sm-8">
            <select class="c-select form-control" name="topic">';
    $toplist = sql_query("SELECT topicid, topictext, topicadmin FROM " . $NPDS_Prefix . "topics ORDER BY topictext");
    if ($radminsuper) {
        echo '
               <option value="">' . adm_translate("Tous les Sujets") . '</option>';
    }
    while (list($topicid, $topics, $topicadmin) = sql_fetch_row($toplist)) {
        $affiche = false;
        if ($radminsuper) {
            $affiche = true;
        } else {
            $topicadminX = explode(",", $topicadmin);
            for ($i = 0; $i < count($topicadminX); $i++) {
                if (trim($topicadminX[$i]) == $aid) {
                    $affiche = true;
                }
            }
        }
        if ($affiche) {
            if ($topicid == $topic) {
                $sel = 'selected="selected"';
            }
            echo '
               <option ' . $sel . ' value="' . $topicid . '">' . aff_langue($topics) . '</option>';
            $sel = '';
        }
    }
    echo '
            </select>
         </div>
      </div>';
    $cat = $catid;
    SelectCategory($catid);
    echo "<br />";
    if ($members == 1 and $Mmembers == "") {
        $ihome = "-127";
    }
    if ($members == 1 and ($Mmembers > 1 and $Mmembers <= 127)) {
        $ihome = $Mmembers;
    }
    puthome($ihome);
    echo '
      <div class="form-group row">
         <label class="form-control-label col-xs-12" for="hometext">' . adm_translate("Texte d'introduction") . '</label>
         <div class="col-xs-12">
            <textarea class="tin form-control" rows="25" name="hometext">' . $hometext . '</textarea>
         </div>
      </div>';
    echo aff_editeur("hometext", "true");
    echo '
      <div class="form-group row">
         <label class="form-control-label col-xs-12" for="bodytext">' . adm_translate("Texte étendu") . '</label>
         <div class="col-xs-12">
            <textarea class="tin form-control" rows="25" name="bodytext" >' . $bodytext . '</textarea>
         </div>
      </div>';
    echo aff_editeur('bodytext', '');
    publication($deb_day, $deb_month, $deb_year, $deb_hour, $deb_min, $fin_day, $fin_month, $fin_year, $fin_hour, $fin_min, $epur);
    echo '
      <div class="form-group row">
         <input type="hidden" name="author" value="' . $aid . '" />
         <div class="col-xs-7">
            <select class="c-select form-control" name="op">
               <option value="PreviewAdminStory" selected>' . adm_translate("Prévisualiser") . '</option>
               <option value="PostStory">' . adm_translate("Poster un Article Admin") . '</option>
            </select>
         </div>
         <div class="col-xs-5">
             <input class="btn btn-primary" type="submit" value="' . adm_translate("Ok") . '" />
         </div>
      </div>
   </form>';
    include 'footer.php';
}
Ejemplo n.º 24
0
function blocks()
{
    global $hlpfile, $NPDS_Prefix, $f_meta_nom, $f_titre, $adminimg, $aid;
    //==> controle droit
    //admindroits($aid,$f_meta_nom);
    //<== controle droit
    include "header.php";
    include_once "lib/togglediv.class.php";
    GraphicAdmin($hlpfile);
    adminhead($f_meta_nom, $f_titre, $adminimg);
    echo '
   <h3>' . adm_translate("Edition des Blocs de gauche") . '</h3>';
    $result = sql_query("SELECT id, title, content, member, Lindex, cache, actif, aide, css FROM " . $NPDS_Prefix . "lblocks ORDER BY Lindex ASC");
    $num_row = sql_num_rows($result);
    $toggle = new ToggleDiv($num_row);
    if ($num_row > 0) {
        echo '
   <table id="tad_blocgauc" class="table table-hover table-striped" >
      <thead>
         <tr>
            <th><span class="togxy"><i class="fa fa-navicon" title="' . adm_translate("Déplier la liste la liste") . '"></i></span>&nbsp;' . adm_translate("Titre") . '</th>
            <th>' . adm_translate("Actif") . '</th>
            <th>Index</th>
            <th>' . adm_translate("Rétention") . '</th>
            <th>ID</th>
         </tr>
      </thead>
      <tbody>';
        while (list($id, $title, $content, $member, $Lindex, $Scache, $Sactif, $BLaide, $css) = sql_fetch_row($result)) {
            $funct = "";
            if ($title == "") {
                //$title=adm_translate("Sans nom");
                $pos_func = strpos($content, "function#");
                $pos_nl = strpos($content, chr(13), $pos_func);
                if ($pos_func !== false) {
                    $funct = "<span style=\"font-size: 10px;\"> (";
                    if ($pos_nl !== false) {
                        $funct .= substr($content, $pos_func, $pos_nl - $pos_func);
                    } else {
                        $funct .= substr($content, $pos_func);
                    }
                    $funct .= ")</span>";
                }
                $funct = adm_translate("Sans nom") . $funct;
            }
            if ($Sactif) {
                echo '
         <tr class="success">';
            } else {
                echo '
         <tr class="danger">';
            }
            echo '
            <td align="left">';
            echo '<a class="tog" id="show_bloga_' . $id . '" title="' . adm_translate("Déplier la liste") . '"><i id="i_bloga_' . $id . '" class="fa fa-caret-down fa-lg" ></i></a>&nbsp;';
            echo aff_langue($title) . ' ' . $funct . '</td>';
            if ($Sactif) {
                echo '
         <td align="right">' . adm_translate("Oui") . '</td>';
            } else {
                echo '
         <td class="text-danger" align="right">' . adm_translate("Non") . '</td>';
            }
            echo '
         <td align="right">' . $Lindex . '</td>
         <td align="right">' . $Scache . '</td>
         <td align="right">' . $id . '</td>
         </tr>
         <tr>
         <td id="bloga_' . $id . '" class="togx" style="display:none;" colspan="5">
            <form id="fad_bloga_' . $id . '" action="admin.php" method="post">
               <div class="row">
                  <div class="col-md-8">
                     <fieldset>
                        <legend>' . adm_translate("Contenu") . '</legend>
                        <div class="form-group">
                           <label class="form-control-label" for="title">' . adm_translate("Titre") . '</label>
                           <input class="form-control" type="text" name="title" maxlength="255" value="' . $title . '" />
                        </div>
                        <div class="form-group">
                           <label class="form-control-label" for="content">' . adm_translate("Contenu") . '</label>
                           <textarea class="form-control" rows="5" name="content">' . $content . '</textarea>
                           <span class="help-block"><a href="javascript:void(0);" onclick="window.open(\'autodoc.php?op=blocs\', \'windocu\', \'width=720, height=400, resizable=yes,menubar=no,location=no,directories=no,status=no,copyhistory=no,toolbar=no,scrollbars=yes\');">' . adm_translate("Manuel en ligne") . '</a></span>
                        </div>
                        <div class="form-group">
                           <label class="form-control-label" for="BLaide">' . adm_translate("Aide en ligne de ce bloc") . '</label>
                           <textarea class="form-control" rows="2" name="BLaide">' . $BLaide . '</textarea>
                        </div>
                     </fieldset>
                     <fieldset>
                        <legend>' . adm_translate("Droits") . '</legend>';
            echo droits_bloc($member);
            echo '
                     </fieldset>
                     <div class="form-group">
                        <select class="c-select form-control" name="op">
                           <option value="changelblock" selected="selected">' . adm_translate("Modifier un Bloc gauche") . '</option>
                           <option value="deletelblock">' . adm_translate("Effacer un Bloc gauche") . '</option>
                           <option value="droitelblock">' . adm_translate("Transférer à Droite") . '</option>
                        </select>
                     </div>
                  </div>
                  <div class="col-md-4">
                     <fieldset>
                        <legend>' . adm_translate("Paramètres") . '</legend>
                        <div class="form-group">
                           <label class="form-control-label" for="Lindex">Index</label>
                           <input class="form-control" type="number" name="Lindex" max="9999" value="' . $Lindex . '" />
                        </div>
                        <div class="form-group">
                           <label class="form-control-label" for="Scache">' . adm_translate("Rétention") . '</label>
                           <input class="form-control" type="number" name="Scache" id="Scache" min="0" max="99999" value="' . $Scache . '" />
                           <span class="help-block">' . adm_translate("Chaque bloc peut utiliser SuperCache. La valeur du délai de rétention 0 indique que le bloc ne sera pas caché (obligatoire pour le bloc function#adminblock).") . '</span>
                        </div>
                        <div class="form-group">
                           <label class="checkbox-inline" for="Sactif">
                           <input type="checkbox" name="Sactif" value="ON" ';
            if ($Sactif) {
                echo 'checked="checked" ';
            }
            echo '/>' . adm_translate("Activer le Bloc") . '
                           </label>
                        </div>
                        <div class="form-group">
                           <label class="checkbox-inline" for="css">
                           <input type="checkbox" name="css" value="1" ';
            if ($css == "1") {
                echo 'checked="checked" ';
            }
            echo '/>' . adm_translate("CSS Specifique") . '
                           </label>
                        </div>
                     </fieldset>
                  </div>
                  <input type="hidden" name="id" value="' . $id . '" />
               </div>
               <div class="row">
                  <div class="col-xs-12"
                     <div class="form-group">
                        <button class="btn btn-primary-outline btn-block" type="submit"><i class ="fa fa-check fa-lg"></i>&nbsp;' . adm_translate("Ok") . '</button>
                     </div>
                  </div>
               </div>
            </form>
            <script type="text/javascript">
            //<![CDATA[
               tog(\'bloga_' . $id . '\',\'show_bloga_' . $id . '\',\'hide_bloga_' . $id . '\');
            //]]>
            </script>
            </td>
         </tr>';
        }
        echo '
      </tbody>
   </table>';
    }
    echo '
   <h3>' . adm_translate("Edition des Blocs de droite") . '</h3>';
    $result = sql_query("SELECT id, title, content, member, Rindex, cache, actif, aide, css  FROM " . $NPDS_Prefix . "rblocks ORDER BY Rindex ASC");
    $num_row = sql_num_rows($result);
    if ($num_row > 0) {
        echo '
   <script type="text/javascript">
      //<![CDATA[
         $("#adm_workarea").on("click", "span.togxy",function() {
            $(".fa.fa-navicon").attr("title","' . adm_translate("Replier la liste") . '")
            $("#tad_blocdroi td.togx").attr("style","display: none")
            $("#tad_blocdroi a.tog i").attr("class","fa fa-caret-down fa-lg")
            $("#tad_blocdroi a.tog").attr("title","' . adm_translate("Déplier la liste") . '")
            $( "#tad_blocdroi a.tog" ).each(function( index ) {
               var idi= $(this).attr("id")
               var idir = idi.replace("hide", "show");
               $(this).attr("id",idir)
                 console.log( index + ": " + $( this ).text() + idir );
            });
         });
         //]]>
   </script>';
        echo '
   <table id="tad_blocdroi" class="table table-hover table-striped" >
      <thead>
         <tr>
            <th><span class="togxy"><i class="fa fa-navicon" title="' . adm_translate("Déplier la liste la liste") . '"></i></span>&nbsp;' . adm_translate("Titre") . '</th>
            <th>' . adm_translate("Actif") . '</th>
            <th>Index</th>
            <th>' . adm_translate("Rétention") . '</th>
            <th>ID</th>
         </tr>
      </thead>
      <tbody>';
        while (list($id, $title, $content, $member, $Rindex, $Scache, $Sactif, $BRaide, $css) = sql_fetch_row($result)) {
            $funct = "";
            if ($title == "") {
                //$title=adm_translate("Sans nom");
                $pos_func = strpos($content, "function#");
                $pos_nl = strpos($content, chr(13), $pos_func);
                if ($pos_func !== false) {
                    $funct = "<span style=\"font-size: 10px;\"> (";
                    if ($pos_nl !== false) {
                        $funct .= substr($content, $pos_func, $pos_nl - $pos_func);
                    } else {
                        $funct .= substr($content, $pos_func);
                    }
                    $funct .= ")</span>";
                }
                $funct = adm_translate("Sans nom") . $funct;
            }
            if ($Sactif) {
                echo '
      <tr class="success">';
            } else {
                echo '
      <tr class="danger">';
            }
            echo '
         <td align="left">';
            echo '<a class="tog" id="show_blodr_' . $id . '" title="' . adm_translate("Déplier la liste") . '"><i id="i_blodr_' . $id . '" class="fa fa-caret-down fa-lg" ></i></a>&nbsp;';
            echo aff_langue($title) . ' ' . $funct . '</td>';
            if ($Sactif) {
                echo '
         <td align="right">' . adm_translate("Oui") . '</td>';
            } else {
                echo '
         <td class="text-danger" align="right">' . adm_translate("Non") . '</td>';
            }
            echo '
         <td align="right">' . $Rindex . '</td>
         <td align="right">' . $Scache . '</td>
         <td align="right">' . $id . '</td>
      </tr>
      <tr>
         <td id="blodr_' . $id . '" class="togx" style="display:none;" colspan="5">
            <form id="fad_blodr_' . $id . '" action="admin.php" method="post">
               <div class="row">
                  <div class="col-md-8">
                     <fieldset>
                        <legend>' . adm_translate("Contenu") . '</legend>
                        <div class="form-group">
                           <label class="form-control-label" for="title">' . adm_translate("Titre") . '</label>
                           <input class="form-control" type="text" name="title" maxlength="255" value="' . $title . '" />
                        </div>
                        <div class="form-group">
                           <label class="form-control-label" for="content">' . adm_translate("Contenu") . '</label>
                           <textarea class="form-control" cols="70" rows="5" name="content">' . $content . '</textarea>
                           <span class="help-block"><a href="javascript:void(0);" onclick="window.open(\'autodoc.php?op=blocs\', \'windocu\', \'width=720, height=400, resizable=yes,menubar=no,location=no,directories=no,status=no,copyhistory=no,toolbar=no,scrollbars=yes\');">' . adm_translate("Manuel en ligne") . '</a></span>
                        </div>
                        <div class="form-group">
                           <label class="form-control-label" for="BRaide">' . adm_translate("Aide en ligne de ce bloc") . '</label>
                           <textarea class="form-control" rows="2" name="BRaide">' . $BRaide . '</textarea>
                        </div>
                     </fieldset>
                     <fieldset>
                        <legend>' . adm_translate("Droits") . '</legend>';
            echo droits_bloc($member);
            echo '
                     </fieldset>
                     <div class="form-group">
                        <select class="c-select form-control" name="op">
                           <option value="changerblock" selected="selected">' . adm_translate("Modifier un Bloc droit") . '</option>
                           <option value="deleterblock">' . adm_translate("Effacer un Bloc droit") . '</option>
                           <option value="gaucherblock">' . adm_translate("Transférer à Gauche") . '</option>
                        </select>
                     </div>
                  </div>
                  <div class="col-md-4">
                     <fieldset>
                        <legend>' . adm_translate("Paramètres") . '</legend>
                        <div class="form-group">
                           <label class="form-control-label" for="Rindex">Index</label>
                           <input class="form-control" type="number" name="Rindex" min="0" max="9999" value="' . $Rindex . '" />
                        </div>
                        <div class="form-group">
                           <label class="form-control-label" for="Scache">' . adm_translate("Rétention") . '</label>
                           <input class="form-control" type="number" name="Scache" id="Scache" min="0" max="99999" value="' . $Scache . '" />
                           <span class="help-block">' . adm_translate("Chaque bloc peut utiliser SuperCache. La valeur du délai de rétention 0 indique que le bloc ne sera pas caché (obligatoire pour le bloc function#adminblock).") . '</span>
                        </div>
                        <div class="form-group">
                           <label class="checkbox-inline" for="Sactif">
                           <input type="checkbox" name="Sactif" value="ON" ';
            if ($Sactif) {
                echo 'checked="checked" ';
            }
            echo '/>' . adm_translate("Activer le Bloc") . '
                           </label>
                        </div>
                        <div class="form-group">
                           <label class="checkbox-inline" for="css">
                           <input type="checkbox" name="css" value="1" ';
            if ($css == "1") {
                echo 'checked="checked" ';
            }
            echo '/>' . adm_translate("CSS Specifique") . '
                           </label>
                        </div>
                     </fieldset>
                  </div>
                  <input type="hidden" name="id" value="' . $id . '" />
               </div>
               <div class="row">
                  <div class="col-xs-12"
                     <div class="form-group">
                        <button id="" class="btn btn-primary-outline btn-block" type="submit"><i class ="fa fa-check fa-lg"></i>&nbsp;' . adm_translate("Ok") . '</button>
                     </div>
                  </div>
               </div>
            </form>
            <script type="text/javascript">
            //<![CDATA[
               tog(\'blodr_' . $id . '\',\'show_blodr_' . $id . '\',\'hide_blodr_' . $id . '\');
            //]]>
            </script>
            </td>
         </tr>';
        }
        echo '
      </tbody>
   </table>';
    }
    echo '
   <h3>' . adm_translate("Créer un nouveau Bloc") . '</h3>
   <form id="fad_newblock" action="admin.php" method="post" name="adminForm">
      <div class="row">
         <div class="col-md-8">
            <fieldset>
               <legend>' . adm_translate("Contenu") . '</legend>
               <div class="form-group">
                  <label class="form-control-label" for="title">' . adm_translate("Titre") . '</label>
                  <input class="form-control" type="text" name="title" id="title" maxlength="255" />
               </div>
               <div class="form-group">
                  <label class="form-control-label" for="xtext">' . adm_translate("Contenu") . '</label>
                  <textarea class="form-control" name="xtext" id="xtext" rows="5"></textarea>
                  <span class="help-block"><a href="javascript:void(0);" onclick="window.open(\'autodoc.php?op=blocs\', \'windocu\', \'width=720, height=400, resizable=yes,menubar=no,location=no,directories=no,status=no,copyhistory=no,toolbar=no,scrollbars=yes\');">' . adm_translate("Manuel en ligne") . '</a></span>
               </div>
               <div class="form-group">
                  <label class="form-control-label" for="Baide">' . adm_translate("Aide en ligne") . '</label>
                  <textarea class="form-control" rows="2" name="Baide" id="Baide"></textarea>
               </div>
            </fieldset>
            <fieldset>
               <legend>' . adm_translate("Droits") . '</legend>';
    echo droits_bloc("0");
    echo '
            </fieldset>
            <div class="form-group">
               <label class="form-control-label" for="op">' . adm_translate("Position") . '</label>
               <div>
                  <label class="radio-inline">
                     <input type="radio" name="op" value="makelblock" checked="checked" />' . adm_translate("Créer un Bloc gauche") . '
                  </label>
                  <label class="radio-inline">
                     <input type="radio" name="op" value="makerblock" /> ' . adm_translate("Créer un Bloc droite") . '
                  </label>
               </div>
            </div>
         </div>
         <div class="col-md-4">
            <fieldset>
               <legend>' . adm_translate("Paramètres") . '</legend>
                  <div class="form-group">
                     <label class="form-control-label" for="index">Index</label>
                     <input class="form-control" type="number" name="index" id="index" min="0" max="9999" />
                  </div>
                  <div class="form-group">
                     <label class="form-control-label" for="Scache">' . adm_translate("Rétention") . '</label>
                     <input class="form-control" type="number" name="Scache" id="Scache" min="0" max="99999" value="60" />
                     <span class="help-block">' . adm_translate("Chaque bloc peut utiliser SuperCache. La valeur du délai de rétention 0 indique que le bloc ne sera pas caché (obligatoire pour le bloc function#adminblock).") . '</span>
                  </div>
                  <div class="form-group">
                     <label class="checkbox-inline text-danger" for="SHTML">
                        <input class="" type="checkbox" name="SHTML" id="SHTML" value="ON" />HTML
                     </label>
                     <label class="checkbox-inline text-danger" for="CSS">
                        <input class="" type="checkbox" name="CSS" id="CSS" value="ON" />CSS
                     </label>
                  </div>
            </fieldset>
         </div>
      </div>
      <div class="form-group">
         <button class="btn btn-primary-outline btn-block" type="submit"><i class ="fa fa-check fa-lg"></i>&nbsp;' . adm_translate("Valider") . '</button>
     </div>
   </form>';
    include "footer.php";
}
Ejemplo n.º 25
0
function error_handler($ibid)
{
    opentable();
    echo "<p class=\"errorhandler\" align=\"center\">" . adm_translate("Merci d'entrer l'information en fonction des spécifications") . "<br /><br />";
    echo "{$ibid}<br /><a href=\"admin.php?op=mod_authors\" class=\"noir\">" . adm_translate("Retour en arrière") . "</a></p>";
    closetable();
}
Ejemplo n.º 26
0
function Configure()
{
    global $hlpfile, $filemanager, $f_meta_nom, $f_titre, $adminimg;
    include "config.php";
    include "header.php";
    GraphicAdmin($hlpfile);
    adminhead($f_meta_nom, $f_titre, $adminimg);
    echo '
   <form id="fad_pref" action="admin.php" method="post">
   <fieldset>
   <legend><a class="tog" id="show_info_gene" title="' . adm_translate("Replier la liste") . '"><i id="i_info_gene" class="fa fa-caret-down fa-lg" ></i></a>&nbsp;' . adm_translate("Informations générales du site") . '</legend>
      <div id="info_gene" class="adminsidefield" style="display:none;">
         <div class="form-group">
            <div class="row">
               <label class="form-control-label text-danger col-sm-4" for="xparse">Parse algo</label>
               <div class="col-sm-8">
                  <label class="radio-inline">';
    if ($parse == 0) {
        echo '
                     <input type="radio" name="xparse" value="0" checked>FixQuotes
                  </label>
                  <label class="radio-inline">
                     <input type="radio" name="xparse" value="1">StripSlashes';
    } else {
        echo '
                     <input type="radio" name="xparse" value="0" />FixQuotes
                  </label>
                  <label class="radio-inline">
                     <input type="radio" name="xparse" value="1" checked="checked" />StripSlashes';
    }
    echo '
                  </label>
               </div>
            </div>
         </div>
         <input type="hidden" name="xgzhandler" value="0" />
   ';
    echo '
         <div class="form-group">
            <div class="row">
               <label class="form-control-label text-danger col-sm-4" for="xfilemanager">FileManager</label>
               <div class="col-sm-8">
                  <label class="radio-inline">';
    if ($filemanager == 1) {
        echo '
                     <input type="radio" name="xfilemanager" value="1" checked="checked" />' . adm_translate("Oui") . '
                  </label>
                  <label class="radio-inline">
                     <input type="radio" name="xfilemanager" value="0" />' . adm_translate("Non");
    } else {
        echo '
                     <input type="radio" name="xfilemanager" value="1" />' . adm_translate("Oui") . '
                  </label>
                  <label class="radio-inline">
                     <input type="radio" name="xfilemanager" value="0" checked="checked" />' . adm_translate("Non");
    }
    echo '
                  </label>
               </div>
            </div>
         </div>
         <div class="form-group">
            <div class="row">
               <label class="form-control-label text-danger col-sm-4" for="xadmin_cook_duration">' . adm_translate("Durée de vie en heure du cookie Admin") . '</label>
               <div class="col-sm-8">
                  <input class="form-control" type="number" name="xadmin_cook_duration" value="' . $admin_cook_duration . '" min="0" max="9999999999" />
               </div>
            </div>
         </div>
         <div class="form-group">
            <div class="row">
               <label class="form-control-label text-danger col-sm-4" for="xuser_cook_duration">' . adm_translate("Durée de vie en heure du cookie User") . '</label>
               <div class="col-sm-8">
                  <input class="form-control" type="number" name="xuser_cook_duration" value="' . $user_cook_duration . '" min="0" max="9999999999" />
               </div>
            </div>
         </div>
         <div class="form-group">
            <div class="row">
               <label class="form-control-label col-sm-4" for="xsitename">' . adm_translate("Nom du site") . '</label>
               <div class="col-sm-8">
                  <input class="form-control" type="text" name="xsitename" value="' . $sitename . '" size="50" maxlength="100" />
               </div>
            </div>
         </div>
         <div class="form-group">
            <div class="row">
               <label class="form-control-label col-sm-4" for="xTitlesitename">' . adm_translate("Nom du site pour la balise title") . '</label>
               <div class="col-sm-8">
                  <input class="form-control" type="text" name="xTitlesitename" value="' . $Titlesitename . '" size="50" maxlength="100" />
               </div>
            </div>
         </div>
         <div class="form-group">
            <div class="row">
               <label class="form-control-label col-sm-4" for="xnuke_url">' . adm_translate("URL du site") . '</label>
               <div class="col-sm-8">
                  <input class="form-control" type="text" name="xnuke_url" value="' . $nuke_url . '" size="50" maxlength="200" />
               </div>
            </div>
         </div>
         <div class="form-group">
            <div class="row">
               <label class="form-control-label col-sm-4" for="xsite_logo">' . adm_translate("Logo du site pour les impressions") . '</label>
               <div class="col-sm-8">
                  <input class="form-control" type="text" name="xsite_logo" value="' . $site_logo . '" size="50" maxlength="255" />
               </div>
            </div>
         </div>
         <div class="form-group">
            <div class="row">
               <label class="form-control-label col-sm-4" for="xslogan">' . adm_translate("Slogan du site") . '</label> 
               <div class="col-sm-8">
                  <input class="form-control" type="text" name="xslogan" value="' . $slogan . '" size="50" maxlength="100" />
               </div>
            </div>
         </div>
         <div class="form-group">
            <div class="row">
               <label class="form-control-label col-sm-4" for="xstartdate">' . adm_translate("Date de démarrage du site") . '</label> 
               <div class="col-sm-8">
                  <input class="form-control" type="text" name="xstartdate" value="' . $startdate . '" size="20" maxlength="30" />
               </div>
            </div>
         </div>
         <div class="form-group">
            <div class="row">
               <label class="form-control-label col-sm-4" for="xtop">' . adm_translate("Nombre d'éléments dans la page top") . '</label> 
               <div class="col-sm-8">
                  <input class="form-control" type="number" name="xtop" value="' . $top . '" size="5" maxlength="4" />
               </div>
            </div>
         </div>
         <div class="form-group">
            <div class="row">
               <label class="form-control-label col-sm-4" for="xstoryhome">' . adm_translate("Nombre d'articles en page principale") . '</label>
               <div class="col-sm-8">
                  <input class="form-control" type="number" name="xstoryhome" value="' . $storyhome . '" min="0" max="9999" />
               </div>
            </div>
         </div>
         <div class="form-group">
            <div class="row">
               <label class="form-control-label col-sm-4" for="xoldnum">' . adm_translate("Nombre d'articles dans le bloc des anciens articles") . '</label>
               <div class="col-sm-8">
                   <input class="form-control" type="number" name="xoldnum" value="' . $oldnum . '" min="0" max="9999" />
               </div>
            </div>
         </div>
         <div class="form-group">
            <div class="row">
               <label class="form-control-label col-sm-4" for="xanonymous">' . adm_translate("Nom par défaut de user anonyme") . '</label>
               <div class="col-sm-8">
                  <input class="form-control" type="text" name="xanonymous" value="' . $anonymous . '" />
               </div>
            </div>
         </div>
         <div class="form-group">
            <div class="row">
               <label class="form-control-label col-sm-4" for="xmod_admin_news">' . adm_translate("Autoriser la création de news pour") . '</label>
               <div class="col-sm-8">
                  <label class="radio-inline">';
    if ($mod_admin_news == 1) {
        echo '
                     <input type="radio" name="xmod_admin_news" value="1" checked="checked" />' . adm_translate("Administrateurs") . ' / ' . adm_translate("Modérateurs") . '
                  </label>
                  <label class="radio-inline">
                     <input type="radio" name="xmod_admin_news" value="2" />' . adm_translate("Membres") . '
                  </label>
                     <input type="radio" name="xmod_admin_news" value="0" />' . adm_translate("Tous");
    } elseif ($mod_admin_news == 2) {
        echo '
                     <input type="radio" name="xmod_admin_news" value="1" />' . adm_translate("Administrateurs") . ' / ' . adm_translate("Modérateurs") . '
                  </label>
                  <label class="radio-inline">
                     <input type="radio" name="xmod_admin_news" value="2" checked="checked" />' . adm_translate("Membres") . '
                  </label>
                  <label class="radio-inline">
                     <input type="radio" name="xmod_admin_news" value="0" />' . adm_translate("Tous");
    } else {
        echo '
                     <input type="radio" name="xmod_admin_news" value="1" />' . adm_translate("Administrateurs") . ' / ' . adm_translate("Modérateurs") . '
                  </label>
                  <label class="radio-inline">
                     <input type="radio" name="xmod_admin_news" value="2" />' . adm_translate("Membres") . '
                  </label>
                  <label class="radio-inline">
                     <input type="radio" name="xmod_admin_news" value="0" checked="checked" />' . adm_translate("Tous");
    }
    echo '
                  </label>
               </div>
            </div>
         </div>
         <div class="form-group">
            <div class="row">
               <label class="form-control-label col-sm-4" for="xnot_admin_count">' . adm_translate("Ne pas enregistrer les 'hits' des auteurs dans les statistiques") . '</label>
               <div class="col-sm-8">
                  <label class="radio-inline">';
    if ($not_admin_count == 1) {
        echo '
                     <input type="radio" name="xnot_admin_count" value="1" checked="checked" />' . adm_translate("Oui") . '
                  </label>
                  <label class="radio-inline">
                     <input type="radio" name="xnot_admin_count" value="0" />' . adm_translate("Non");
    } else {
        echo '
                     <input type="radio" name="xnot_admin_count" value="1" />' . adm_translate("Oui") . '
                  </label>
                  <label class="radio-inline">
                     <input type="radio" name="xnot_admin_count" value="0" checked="checked" />' . adm_translate("Non");
    }
    echo '
                  </label>
               </div>
            </div>
         </div>
         <div class="form-group">
            <div class="row">
               <label class="form-control-label col-sm-4" for="xDefault_Theme">' . adm_translate("Thème d'affichage par défaut") . '</label>
               <div class="col-sm-8">
                  <select class="c-select form-control" name="xDefault_Theme">';
    include "themes/list.php";
    $themelist = explode(" ", $themelist);
    for ($i = 0; $i < sizeof($themelist); $i++) {
        if ($themelist[$i] != "") {
            echo '
                     <option value="' . $themelist[$i] . '" ';
            if ($themelist[$i] == $Default_Theme) {
                echo 'selected="selected"';
            }
            echo '>' . $themelist[$i] . '</option>';
        }
    }
    echo '
                  </select>
               </div>
            </div>
         </div>
         <div class="form-group">
            <div class="row">
               <label class="form-control-label col-sm-4" for="xstart_page">' . adm_translate("Page de démarrage") . '</label>
               <div class="col-sm-8">
                  <input class="form-control" type="text" name="xstart_page" value="' . $Start_Page . '" size="50" maxlength="100" />
               </div>
            </div>
         </div>
         <div class="form-group">
            <div class="row">
               <label class="form-control-label col-sm-4" for="xlanguage">' . adm_translate("Sélectionner la langue du site") . '</label>
               <div class="col-sm-8">
                  <select class="c-select form-control" name="xlanguage">';
    include "manuels/list.php";
    $languageslist = explode(" ", $languageslist);
    for ($i = 0; $i < sizeof($languageslist); $i++) {
        if ($languageslist[$i] != "") {
            echo '
                     <option value="' . $languageslist[$i] . '" ';
            if ($languageslist[$i] == $language) {
                echo 'selected="selected"';
            }
            echo '>' . $languageslist[$i] . '</option>';
        }
    }
    echo '
                  </select>
               </div>
            </div>
         </div>
         <div class="form-group">
            <div class="row">
               <label class="form-control-label col-sm-4" for="xmulti_langue">' . adm_translate("Activer le multi-langue") . '</label>
               <div class="col-sm-8">
                  <label class="radio-inline">';
    if ($multi_langue == true) {
        echo '
                     <input type="radio" name="xmulti_langue" value="true" checked="checked" />' . adm_translate("Oui") . '
                  </label>
                  <label class="radio-inline">
                     <input type="radio" name="xmulti_langue" value="false" />' . adm_translate("Non");
    } else {
        echo '
                     <input type="radio" name="xmulti_langue" value="true" />' . adm_translate("Oui") . '
                  </label>
                  <label class="radio-inline">
                     <input type="radio" name="xmulti_langue" value="false" checked="checked" />' . adm_translate("Non");
    }
    echo '
                  </label>
               </div>
            </div>
         </div>
         <div class="form-group">
            <div class="row">
               <label class="form-control-label col-sm-4" for="xlocale">' . adm_translate("Heure locale") . '</label>
               <div class="col-sm-8">
                  <input class="form-control" type="text" name="xlocale" value="' . $locale . '" size="20" maxlength="100" />
               </div>
            </div>
         </div>';
    if ($lever == "") {
        $lever = "08:00";
    }
    if ($coucher == "") {
        $coucher = "20:00";
    }
    echo '
         <div class="form-group">
            <div class="row">
               <label class="form-control-label col-sm-4" for="xlever">' . adm_translate("Le jour commence à") . '</label>
               <div class="col-sm-8">
                  <input class="form-control" type="text" name="xlever" value="' . $lever . '" size="6" maxlength="5" /> (HH:MM)
               </div>
            </div>
         </div>
         <div class="form-group">
            <div class="row">
               <label class="form-control-label col-sm-4" for="xcoucher">' . adm_translate("La nuit commence à") . '</label>
               <div class="col-sm-8">
                  <input class="form-control" type="text" name="xcoucher" value="' . $coucher . '" size="6" maxlength="5" /> (HH:MM)
               </div>
            </div>
         </div>
         <div class="form-group">
            <div class="row">
               <label class="form-control-label col-sm-4" for="xgmt">GMT</label>
               <div class="col-sm-8">
                  <input class="form-control" type="text" name="xgmt" value="' . $gmt . '" size="4" maxlength="3" /> (+- x)
               </div>
            </div>
         </div>';
    echo '
      </div>
      <script type="text/javascript">
      //<![CDATA[
      tog(\'info_gene\',\'show_info_gene\',\'hide_info_gene\');
      //]]>
      </script>
   </fieldset>
   <fieldset>
   <legend><a class="tog" id="show_banner" title="' . adm_translate("Replier la liste") . '"><i id="i_banner" class="fa fa-caret-down fa-lg" ></i></a>&nbsp;' . adm_translate("Options pour les Bannières") . '</legend>
      <div id="banner" class="adminsidefield" style="display:none;">
         <div class="form-group">
            <div class="row">
               <label class="form-control-label col-sm-4" for="xbanners">' . adm_translate("Options pour les Bannières") . '</label>
               <div class="col-sm-8">
                  <label class="radio-inline">';
    if ($banners == 1) {
        echo '
                     <input type="radio" name="xbanners" value="1" checked="checked" />' . adm_translate("Oui") . ' &nbsp;
                  </label>
                  <label class="radio-inline">
                     <input type="radio" name="xbanners" value="0" />' . adm_translate("Non");
    } else {
        echo '
                     <input type="radio" name="xbanners" value="1" />' . adm_translate("Oui") . ' &nbsp;
                  </label>
                  <label class="radio-inline">
                     <input type="radio" name="xbanners" value="0" checked="checked" />' . adm_translate("Non");
    }
    echo '
                  </label>
               </div>
            </div>
         </div>
         <div class="form-group">
            <div class="row">
               <label class="form-control-label col-sm-4" for="xbanners">' . adm_translate("Votre adresse IP pour ne pas comptabiliser les hits qui en proviennent") . '</label>
               <div class="col-sm-8">
                  <input class="form-control" type="text" name="xmyIP" value="' . $myIP . '" />
               </div>
            </div>
         </div>
      </div>
      <script type="text/javascript">
      //<![CDATA[
      tog(\'banner\',\'show_banner\',\'hide_banner\');
      //]]>
      </script>
   </fieldset>
   <fieldset>
   <legend><a class="tog" id="show_mes_ppage" title="' . adm_translate("Replier la liste") . '"><i id="i_mes_ppage" class="fa fa-caret-down fa-lg" ></i></a>&nbsp;' . adm_translate("Message de pied de page") . '</legend>
      <div id="mes_ppage" class="adminsidefield" style="display:none;">
         <div class="form-group">
            <label class="form-control-label" for="xfoot1">' . adm_translate("Ligne 1") . '</label>
            <textarea class="form-control" name="xfoot1" rows="5">' . htmlentities(stripslashes($foot1), ENT_QUOTES, cur_charset) . '</textarea>
         </div>
         <div class="form-group">
            <label class="form-control-label" for="xfoot2">' . adm_translate("Ligne 2") . '</label>
            <textarea class="form-control" name="xfoot2" rows="5">' . htmlentities(stripslashes($foot2), ENT_QUOTES, cur_charset) . '</textarea>
         </div>
         <div class="form-group">
            <label class="form-control-label" for="xfoot3">' . adm_translate("Ligne 3") . '</label>
            <textarea class="form-control" name="xfoot3" rows="5">' . htmlentities(stripslashes($foot3), ENT_QUOTES, cur_charset) . '</textarea>
         </div>
         <div class="form-group">
            <label class="form-control-label" for="xfoot4">' . adm_translate("Ligne 4") . '</label>
            <textarea class="form-control" name="xfoot4" rows="5">' . htmlentities(stripslashes($foot4), ENT_QUOTES, cur_charset) . '</textarea>
         </div>
      </div>
      <script type="text/javascript">
      //<![CDATA[
      tog(\'mes_ppage\',\'show_mes_ppage\',\'hide_mes_ppage\');
      //]]>
      </script>
   </fieldset>
   <fieldset>
   <legend><a class="tog" id="show_bakend_rs" title="' . adm_translate("Replier la liste") . '"><i id="i_bakend_rs" class="fa fa-caret-down fa-lg" ></i></a>&nbsp;' . adm_translate("Configuration des infos en Backend & Réseaux Sociaux") . '</legend>
      <div id="bakend_rs" class="adminsidefield" style="display:none;">
         <div class="form-group">
            <div class="row">
               <label class="form-control-label col-sm-4" for="xbackend_title">' . adm_translate("Titre du backend") . '</label>
               <div class="col-sm-8">
                  <input class="form-control" type="text" name="xbackend_title" value="' . $backend_title . '" size="50" maxlength="100" />
               </div>
            </div>
         </div>
         <div class="form-group">
            <div class="row">
               <label class="form-control-label col-sm-4" for="xbackend_language">' . adm_translate("Langue du backend") . '</label>
               <div class="col-sm-8">
                  <input class="form-control" type="text" name="xbackend_language" value="' . $backend_language . '" size="11" maxlength="10" />
               </div>
            </div>
         </div>
         <div class="form-group">
            <div class="row">
               <label class="form-control-label col-sm-4" for="xbackend_image">' . adm_translate("URL de l'image du backend") . '</label>
               <div class="col-sm-8">
                  <input class="form-control" type="text" name="xbackend_image" value="' . $backend_image . '" size="50" maxlength="200" />
               </div>
            </div>
         </div>
         <div class="form-group">
            <div class="row">
               <label class="form-control-label col-sm-4" for="xbackend_width">' . adm_translate("Largeur de l'image du backend") . '</label>
               <div class="col-sm-8">
                  <input class="form-control" type="number" name="xbackend_width" value="' . $backend_width . '" min="0" max="9999" />
               </div>
            </div>
         </div>
         <div class="form-group">
            <div class="row">
               <label class="form-control-label col-sm-4" for="xbackend_height">' . adm_translate("Hauteur de l'image du backend") . '</label>
               <div class="col-sm-8">
                  <input class="form-control" type="number" name="xbackend_height" value="' . $backend_height . '" min="0" max="9999" />
               </div>
            </div>
         </div>
         <div class="form-group">
            <div class="row">
               <label class="form-control-label col-sm-4" for="xultramode">' . adm_translate("Activer export-news") . '</label>
               <div class="col-sm-8">
                  <label class="radio-inline">';
    if ($ultramode == 1) {
        echo '
                     <input type="radio" name="xultramode" value="1" checked="checked" />' . adm_translate("Oui") . '
                  </label>
                  <label class="radio-inline">
                     <input type="radio" name="xultramode" value="0" />' . adm_translate("Non");
    } else {
        echo '
                     <input type="radio" name="xultramode" value="1" />' . adm_translate("Oui") . '
                  </label>
                  <label class="radio-inline">
                     <input type="radio" name="xultramode" value="0" checked="checked" />' . adm_translate("Non");
    }
    echo '
                  </label>
               </div>
            </div>
         </div>
         <div class="form-group">
            <div class="row">
               <label class="form-control-label col-sm-4" for="xnpds_twi">' . adm_translate("Activer Twitter") . '</label>
               <div class="col-sm-8">
                  <label class="radio-inline">';
    if ($npds_twi == 1) {
        echo '
                     <input type="radio" name="xnpds_twi" value="1" checked="checked" />' . adm_translate("Oui") . '
                  </label>
                  <label class="radio-inline">
                     <input type="radio" name="xnpds_twi" value="0" />' . adm_translate("Non");
    } else {
        echo '
                     <input type="radio" name="xnpds_twi" value="1" />' . adm_translate("Oui") . '
                  </label>
                  <label class="radio-inline">
                     <input type="radio" name="xnpds_twi" value="0" checked="checked" />' . adm_translate("Non");
    }
    echo '
                  </label>
               </div>
            </div>
         </div>
         <div class="form-group">
            <div class="row">
               <label class="form-control-label col-sm-4" for="xnpds_fcb">' . adm_translate("Activer Facebook") . '</label>
               <div class="col-sm-8">
                  <label class="radio-inline">';
    if ($npds_fcb == 1) {
        echo '
                     <input type="radio" name="xnpds_fcb" value="1" checked="checked" />' . adm_translate("Oui") . '
                  </label>
                  <label class="radio-inline">
                     <input type="radio" name="xnpds_fcb" value="0" />' . adm_translate("Non");
    } else {
        echo '
                     <input type="radio" name="xnpds_fcb" value="1" />' . adm_translate("Oui") . '
                  </label>
                  <label class="radio-inline">
                     <input type="radio" name="xnpds_fcb" value="0" checked="checked" />' . adm_translate("Non");
    }
    echo '
                  </label>
               </div>
            </div>
         </div>
      </div>
      <script type="text/javascript">
      //<![CDATA[
      tog(\'bakend_rs\',\'show_bakend_rs\',\'hide_bakend_rs\');
      //]]>
      </script>
   </fieldset>
   <fieldset>
   <legend><a class="tog" id="show_lien_web" title="' . adm_translate("Replier la liste") . '"><i id="i_lien_web" class="fa fa-caret-down fa-lg" ></i></a>&nbsp;' . adm_translate("Configuration par défaut des Liens Web") . '</legend>
      <div id="lien_web" class="adminsidefield" style="display:none;">
         <div class="form-group">
            <div class="row">
               <label class="form-control-label col-sm-4" for="xperpage">' . adm_translate("Nombre de liens par page") . '</label>
               <div class="col-sm-8">
                  <select class="c-select form-control" name="xperpage">
                     <option  value="' . $perpage . '" selected="selected">' . $perpage . '</option>
                     <option value="10">10</option>
                     <option value="15">15</option>
                     <option value="20">20</option>
                     <option value="25">25</option>
                     <option value="30">30</option>
                     <option value="50">50</option>
                  </select>
               </div>
            </div>
         </div>
         <div class="form-group">
            <div class="row">
               <label class="form-control-label col-sm-4" for="xpopular">' . adm_translate("Nombre de hits sur un lien pour qu'il devienne populaire") . '</label>
               <div class="col-sm-8">
                  <select class="c-select form-control" name="xpopular">
                     <option value="' . $popular . '" selected="selected">' . $popular . '</option>
                     <option value="10">10</option>
                     <option value="20">20</option>
                     <option value="50">50</option>
                     <option value="100">100</option>
                     <option value="250">250</option>
                     <option value="500">500</option>
                  </select>
               </div>
            </div>
         </div>
         <div class="form-group">
            <div class="row">
               <label class="form-control-label col-sm-4" for="xnewlinks">' . adm_translate("Nombre de clics sur un lien pour avoir l'icône nouveau") . '</label>
               <div class="col-sm-8">
                  <select class="c-select form-control" name="xnewlinks">
                     <option value="' . $newlinks . '" selected="selected">' . $newlinks . '</option>
                     <option value="10">10</option>
                     <option value="15">15</option>
                     <option value="20">20</option>
                     <option value="25">25</option>
                     <option value="30">30</option>
                     <option value="50">50</option>
                  </select>
               </div>
            </div>
         </div>
         <div class="form-group">
            <div class="row">
               <label class="form-control-label col-sm-4" for="xtoplinks">' . adm_translate("Nombre de clics sur un lien pour avoir l'icône le plus vu") . '</label>
               <div class="col-sm-8">
                  <select class="c-select form-control" name="xtoplinks">
                     <option value="' . $toplinks . '" selected="selected">' . $toplinks . '</option>
                     <option value="10">10</option>
                     <option value="15">15</option>
                     <option value="20">20</option>
                     <option value="25">25</option>
                     <option value="30">30</option>
                     <option value="50">50</option>
                  </select>
               </div>
            </div>
         </div>
         <div class="form-group">
            <div class="row">
               <label class="form-control-label col-sm-4" for="xlinksresults">' . adm_translate("Nombre de liens dans les résultats des recherches") . '</label>
               <div class="col-sm-8">
                  <select class="c-select form-control" name="xlinksresults">
                     <option value="' . $linksresults . '" selected="selected">' . $linksresults . '</option>
                     <option value="10">10</option>
                     <option value="15">15</option>
                     <option value="20">20</option>
                     <option value="25">25</option>
                     <option value="30">30</option>
                     <option value="50">50</option>
                  </select>
               </div>
            </div>
         </div>
         <div class="form-group">
            <div class="row">
               <label class="form-control-label col-sm-4" for="xlinks_anonaddlinklock">' . adm_translate("Laisser les utilisateurs anonymes poster de nouveaux liens") . '</label>
               <div class="col-sm-8">
                  <label class="radio-inline">';
    if ($links_anonaddlinklock == 0) {
        echo '
                     <input type="radio" name="xlinks_anonaddlinklock" value="0" checked="checked" />' . adm_translate("Oui") . '
                  </label>
                  <label class="radio-inline">
                     <input type="radio" name="xlinks_anonaddlinklock" value="1" />' . adm_translate("Non");
    } else {
        echo '
                     <input type="radio" name="xlinks_anonaddlinklock" value="0" />' . adm_translate("Oui") . '
                  </label>
                  <label class="radio-inline">
                     <input type="radio" name="xlinks_anonaddlinklock" value="1" checked="checked" />' . adm_translate("Non");
    }
    echo '
                  </label>
               </div>
            </div>
         </div>
         <div class="form-group">
            <div class="row">
               <label class="form-control-label col-sm-4" for="xlinkmainlogo">' . adm_translate("Afficher le logo sur la page web links") . '</label>
               <div class="col-sm-8">
                  <label class="radio-inline">';
    if ($linkmainlogo == 1) {
        echo '
                     <input type="radio" name="xlinkmainlogo" value="1" checked="checked" />' . adm_translate("Oui") . '
                  </label>
                  <label class="radio-inline">
                     <input type="radio" name="xlinkmainlogo" value="0" />' . adm_translate("Non");
    } else {
        echo '
                     <input type="radio" name="xlinkmainlogo" value="1" />' . adm_translate("Oui") . '
                  </label>
                  <label class="radio-inline">
                     <input type="radio" name="xlinkmainlogo" value="0" checked="checked" />' . adm_translate("Non");
    }
    echo '
                  </label>
               </div>
            </div>
         </div>
         <div class="form-group">
            <div class="row">
               <label class="form-control-label col-sm-4" for="xOnCatNewLink">' . adm_translate("Activer l'icône [N]ouveau pour les catégories") . '</label>
               <div class="col-sm-8">
                  <label class="radio-inline">';
    if ($OnCatNewLink == 1) {
        echo '
                     <input type="radio" name="xOnCatNewLink" value="1" checked="checked" />' . adm_translate("Oui") . '
                  </label>
                  <label class="radio-inline">
                     <input type="radio" name="xOnCatNewLink" value="0" />' . adm_translate("Non");
    } else {
        echo '
                     <input type="radio" name="xOnCatNewLink" value="1" />' . adm_translate("Oui") . '
                  </label>
                  <label class="radio-inline">
                     <input type="radio" name="xOnCatNewLink" value="0" checked="checked" />' . adm_translate("Non");
    }
    echo '
                  </label>
               </div>
            </div>
         </div>
      </div>
      <script type="text/javascript">
      //<![CDATA[
      tog(\'lien_web\',\'show_lien_web\',\'hide_lien_web\');
      //]]>
      </script>
   </fieldset>
   <fieldset>
   <legend><a class="tog" id="show_sys_mes" title="' . adm_translate("Replier la liste") . '"><i id="i_sys_mes" class="fa fa-caret-down fa-lg" ></i></a>&nbsp;' . adm_translate("Système de Messagerie (Email)") . '</legend>
      <div id="sys_mes" class="adminsidefield" style="display:none;">
         <div class="form-group">
            <div class="row">
               <label class="form-control-label col-sm-4" for="xadminmail">' . adm_translate("Adresse mél de l'administrateur") . '</label> 
               <div class="col-sm-8">
                  <input class="form-control" type="text" name="xadminmail" value="' . $adminmail . '" size="50" maxlength="100" />
               </div>
            </div>
         </div>
         <div class="form-group">
            <div class="row">
            <label class="form-control-label col-sm-4" for="xmail_fonction">' . adm_translate("Quelle fonction mail utilisée") . '</label>
               <div class="col-sm-8">
                  <label class="radio-inline">
   ';
    if (!$mail_fonction) {
        $mail_fonction = 1;
    }
    if ($mail_fonction == 1) {
        echo '
                     <input type="radio" name="xmail_fonction" value="1" checked="checked" />function (fonction) => mail
                  </label>
                  <label class="radio-inline">
                     <input type="radio" name="xmail_fonction" value="2" />function (fonction) => email';
    } else {
        echo '
                     <input type="radio" name="xmail_fonction" value="1" />function (fonction) => mail &nbsp;
                  </label>
                  <label class="radio-inline">
                     <input type="radio" name="xmail_fonction" value="2" checked="checked" />function (fonction) => email';
    }
    // Footer of Email send by NPDS
    include "signat.php";
    echo '
                  </label>
               </div>
            </div>
         </div>
         <div class="form-group">
            <label class="form-control-label" for="xEmailFooter">' . adm_translate("Pied") . ' ' . adm_translate("de") . ' mél</label> 
            <textarea class="form-control" name="xEmailFooter" cols="45" rows="8">' . $message . '</textarea>
         </div>
         <div class="form-group">
            <div class="row">
               <label class="form-control-label col-sm-4" for="xnotify">' . adm_translate("Notifier les nouvelles contributions par mél") . '</label>
               <div class="col-sm-8">
                  <label class="radio-inline">';
    //    adm_translate("Envoyer par E-mail les nouveaux Articles à l'Administrateur").
    if ($notify == 1) {
        echo '
                    <input type="radio" name="xnotify" value="1" checked="checked" />' . adm_translate("Oui") . '
                  </label>
                  <label class="radio-inline">
                     <input type="radio" name="xnotify" value="0" />' . adm_translate("Non");
    } else {
        echo '
                     <input type="radio" name="xnotify" value="1" />' . adm_translate("Oui") . '
                  </label>
                  <label class="radio-inline">
                     <input type="radio" name="xnotify" value="0" checked="checked" />' . adm_translate("Non");
    }
    echo '
                  </label>
               </div>
            </div>
         </div>
         <div class="form-group">
            <div class="row">
               <label class="form-control-label col-sm-4" for="xnotify_email">' . adm_translate("Adresse mél où envoyer le message") . '</label>
               <div class="col-sm-8">
                  <input class="form-control" type="text" name="xnotify_email" value="' . $notify_email . '" size="50" maxlength="100" />
               </div>
            </div>
         </div>
         <div class="form-group">
            <div class="row">
               <label class="form-control-label col-sm-4" for="xnotify_subject">' . adm_translate("Sujet du mél") . '</label>
               <div class="col-sm-8">
                  <input class="form-control" type="text" name="xnotify_subject" value="' . $notify_subject . '" size="50" maxlength="100" />
               </div>
            </div>
         </div>
         <div class="form-group">
            <div class="row">
               <label class="form-control-label col-sm-4" for="xnotify_message">' . adm_translate("Message du mél") . '</label>
               <div class="col-sm-8">
                  <textarea class="form-control" name="xnotify_message" cols="45" rows="8">' . $notify_message . '</textarea>
               </div>
            </div>
         </div>
         <div class="form-group">
            <div class="row">
               <label class="form-control-label col-sm-4" for="xnotify_from">' . adm_translate("Identification du mél émetteur") . '</label>
               <div class="col-sm-8">
                  <input class="form-control" type="text" name="xnotify_from" value="' . $notify_from . '" size="50" maxlength="100" />
               </div>
            </div>
         </div>
      </div>
      <script type="text/javascript">
      //<![CDATA[
      tog(\'sys_mes\',\'show_sys_mes\',\'hide_sys_mes\');
      //]]>
      </script>
   </fieldset>
   <fieldset>
   <legend><a class="tog" id="show_opt_comment" title="' . adm_translate("Replier la liste") . '"><i id="i_opt_comment" class="fa fa-caret-down fa-lg" ></i></a>&nbsp;' . adm_translate("Options pour les Commentaires") . '</legend>
      <div id="opt_comment" class="adminsidefield" style="display:none;">
         <div class="form-group">
            <div class="row">
               <label class="form-control-label col-sm-7 col-md-7" for="xmoderate">' . adm_translate("Type de modération") . '</label>
               <div class="col-sm-5 col-md-5">
                  <select class="c-select form-control" name="xmoderate">';
    if ($moderate == 1) {
        echo '
                     <option value="1" selected="selected">' . adm_translate("Modération par l'Administrateur") . '</option>
                     <option value="2">' . adm_translate("Modération par les Utilisateurs") . '</option>
                     <option value="0">' . adm_translate("Pas de modération") . '</option>';
    } elseif ($moderate == 2) {
        echo '
                     <option value="1">' . adm_translate("Modération par l'Administrateur") . '</option>
                     <option value="2" selected="selected">' . adm_translate("Modération par les Utilisateurs") . '</option>
                     <option value="0">' . adm_translate("Pas de modération") . "</option>";
    } elseif ($moderate == 0) {
        echo '
                     <option value="1">' . adm_translate("Modération par l'Administrateur") . '</option>
                     <option value="2">' . adm_translate("Modération par les Utilisateurs") . '</option>
                     <option value="0" selected="selected">' . adm_translate("Pas de modération") . '</option>';
    }
    echo '
                  </select>
               </div>
            </div>
         </div>
         <div class="form-group">
            <div class="row">
               <label class="form-control-label col-sm-7 col-md-7" for="xanonpost">' . adm_translate("Autoriser les commentaires anonymes") . '</label>
               <div class="col-sm-5 col-md-5">
                  <label class="radio-inline">';
    if ($anonpost == 1) {
        echo '
                     <input type="radio" name="xanonpost" value="1" checked="checked" />' . adm_translate("Oui") . '
                  </label>
                  <label class="radio-inline">
                     <input type="radio" name="xanonpost" value="0" />' . adm_translate("Non");
    } else {
        echo '
                     <input type="radio" name="xanonpost" value="1" />' . adm_translate("Oui") . '
                  </label>
                  <label class="radio-inline">
                     <input type="radio" name="xanonpost" value="0" checked="checked" />' . adm_translate("Non");
    }
    echo '
                  </label>
               </div>
            </div>
         </div>
         <div class="form-group">
            <div class="row">
               <label class="form-control-label col-sm-7 col-md-7" for="xtroll_limit">' . adm_translate("Nombre maximum de commentaire par utilisateur en 24H") . '</label>
               <div class="col-sm-5 col-md-5">';
    if ($troll_limit == "") {
        $troll_limit = "6";
    }
    echo '
                  <input class="form-control" type="number" name="xtroll_limit" value="' . $troll_limit . '" min="0" max="99999" required="required" />
               </div>
            </div>
         </div>
      </div>
      <script type="text/javascript">
      //<![CDATA[
      tog(\'opt_comment\',\'show_opt_comment\',\'hide_opt_comment\');
      //]]>
      </script>
   </fieldset>
   <fieldset>
   <legend><a class="tog" id="show_opt_sond" title="' . adm_translate("Replier la liste") . '"><i id="i_opt_sond" class="fa fa-caret-down fa-lg" ></i></a>&nbsp;' . adm_translate("Options des sondages") . '</legend>
      <div id="opt_sond" class="adminsidefield" style="display:none;">
         <div class="form-group">
            <div class="row">
               <label class="form-control-label col-sm-5 col-md-5" for="xmaxOptions">' . adm_translate("Nombre maximum de choix pour les sondages") . '</label>
               <div class="col-sm-7 col-md-7">
                  <select class="c-select form-control" name="xmaxOptions">
                     <option value="' . $maxOptions . '">' . $maxOptions . '</option>
                     <option value="10">10</option>
                     <option value="12">12</option>
                     <option value="15">15</option>
                     <option value="20">20</option>
                  </select>
               </div>
            </div>
         </div>
         <div class="form-group">
            <div class="row">
               <label class="form-control-label col-sm-5 col-md-5" for="xsetCookies">' . adm_translate("Autoriser les utilisateurs à voter plusieurs fois") . '</label>
               <div class="col-sm-7 col-md-7">
                  <label class="radio-inline">';
    if ($setCookies == 0) {
        echo '
                     <input type="radio" name="xsetCookies" value="0" checked="checked" />' . adm_translate("Oui") . '
                  </label>
                  <label class="radio-inline">
                     <input type="radio" name="xsetCookies" value="1" />' . adm_translate("Non");
    } else {
        echo '
                     <input type="radio" name="xsetCookies" value="0" />' . adm_translate("Oui") . '
                  </label>
                  <label class="radio-inline">
                     <input type="radio" name="xsetCookies" value="1" checked="checked" />' . adm_translate("Non");
    }
    echo '
                  </label>
               </div>
            </div>
         </div>
         <div class="form-group">
            <div class="row">
               <label class="form-control-label col-sm-5 col-md-5" for="xpollcomm">' . adm_translate("Activer les commentaires des sondages") . '</label>
               <div class="col-sm-7 col-md-7">
                  <label class="radio-inline">';
    if ($pollcomm == 1) {
        echo '
                     <input type="radio" name="xpollcomm" value="1" checked="checked" />' . adm_translate("Oui") . '
                  </label>
                  <label class="radio-inline">
                     <input type="radio" name="xpollcomm" value="0" />' . adm_translate("Non");
    } else {
        echo '
                     <input type="radio" name="xpollcomm" value="1" />' . adm_translate("Oui") . '
                  </label>
                  <label class="radio-inline">
                     <input type="radio" name="xpollcomm" value="0" checked="checked" />' . adm_translate("Non");
    }
    echo '
                  </label>
               </div>
            </div>
         </div>
      </div>
      <script type="text/javascript">
      //<![CDATA[
      tog(\'opt_sond\',\'show_opt_sond\',\'hide_opt_sond\');
      //]]>
      </script>
   </fieldset>
   <fieldset>
   <legend><a class="tog" id="show_para_illu" title="' . adm_translate("Replier la liste") . '"><i id="i_para_illu" class="fa fa-caret-down fa-lg" ></i></a>&nbsp;' . adm_translate("Paramètres liés à l'illustration") . '</legend>
      <div id="para_illu" class="adminsidefield" style="display:none;">
         <div class="form-group">
            <div class="row">
               <label class="form-control-label col-sm-4" for="xtipath">' . adm_translate("Chemin des images des sujets") . '</label>
               <div class="col-sm-8">
                  <input class="form-control" type="text" name="xtipath" value="' . $tipath . '" size="50" maxlength="100" />
               </div>
            </div>
         </div>
         <div class="form-group">
            <div class="row">
               <label class="form-control-label col-sm-4" for="xuserimg">' . adm_translate("Chemin de certaines images (vote, ...)") . '</label>
               <div class="col-sm-8">
                  <input class="form-control" type="text" name="xuserimg" value="' . $userimg . '" size="50" maxlength="100" />
               </div>
            </div>
         </div>
         <div class="form-group">
            <div class="row">
               <label class="form-control-label col-sm-4" for="xadminimg">' . adm_translate("Chemin des images du menu administrateur") . '</label>
               <div class="col-sm-8">
                  <input class="form-control" type="text" name="xadminimg" value="' . $adminimg . '" size="50" maxlength="100" />
               </div>
            </div>
         </div>
         <div class="form-group">
            <div class="row">
               <label class="form-control-label col-sm-4" for="xadmingraphic">' . adm_translate("Activer les images dans le menu administration") . '</label>
               <div class="col-sm-8">
                  <label class="radio-inline">';
    if ($admingraphic == 1) {
        echo '
                     <input type="radio" name="xadmingraphic" value="1" checked="checked" />' . adm_translate("Oui") . '
                  </label>
                  <label class="radio-inline">
                     <input type="radio" name="xadmingraphic" value="0" />' . adm_translate("Non");
    } else {
        echo '
                     <input type="radio" name="xadmingraphic" value="1" />' . adm_translate("Oui") . '
                  </label>
                  <label class="radio-inline">
                     <input type="radio" name="xadmingraphic" value="0" checked="checked" />' . adm_translate("Non");
    }
    echo '
                  </label>
               </div>
            </div>
         </div>';
    if (!$admf_ext) {
        $admf_ext = "gif";
    }
    echo '
         <div class="form-group">
            <div class="row">
               <label class="form-control-label col-sm-4" for="xadmf_ext">' . adm_translate("Extension des fichiers d'image") . '</label>
               <div class="col-sm-8">
                  <input class="form-control" type="text" name="xadmf_ext" value="' . $admf_ext . '" size="4" maxlength="3" />
               </div>
            </div>
         </div>
         <div class="form-group">
            <div class="row">
               <label class="form-control-label col-sm-4" for="xshort_menu_admin">' . adm_translate("Activer les menus courts pour l'administration") . '</label>
               <div class="col-sm-8">
                  <label class="radio-inline">';
    if ($short_menu_admin == 1) {
        echo '
                     <input type="radio" name="xshort_menu_admin" value="1" checked="checked" />' . adm_translate("Oui") . '
                  </label>
                  <label class="radio-inline">
                     <input type="radio" name="xshort_menu_admin" value="0" />' . adm_translate("Non");
    } else {
        echo '
                     <input type="radio" name="xshort_menu_admin" value="1" />' . adm_translate("Oui") . '
                  </label>
                  <label class="radio-inline">
                     <input type="radio" name="xshort_menu_admin" value="0" checked="checked" />' . adm_translate("Non");
    }
    echo '
                  </label>
               </div>
            </div>
         </div>
         <div class="form-group">
            <div class="row">
               <label class="form-control-label col-sm-4" for="xsite_font">' . adm_translate("Polices du site") . '</label>
               <div class="col-sm-8">
                  <input class="form-control" type="text" name="xsite_font" value="' . $site_font . '" size="50" maxlength="100" />
               </div>
            </div>
         </div>
      </div>
      <script type="text/javascript">
      //<![CDATA[
      tog("para_illu","show_para_illu","hide_para_illu");
      //]]>
      </script>
   </fieldset>
   <fieldset>
   <legend><a class="tog" id="show_divers" title="' . adm_translate("Replier la liste") . '"><i id="i_divers" class="fa fa-caret-down fa-lg" ></i></a>&nbsp;' . adm_translate("Divers") . '</legend>
      <div id="divers" class="adminsidefield" style="display:none;">
         <div class="form-group">
            <div class="row">
               <label class="form-control-label col-sm-8" for="xadmart">' . adm_translate("Nombres d'articles en mode administration") . '</label>
               <div class="col-sm-4">
                  <select class="c-select form-control" name="xadmart">
                     <option value="' . $admart . '">' . $admart . '</option>
                     <option value="10">10</option>
                     <option value="15">15</option>
                     <option value="20">20</option>
                     <option value="25">25</option>
                     <option value="30">30</option>
                  </select>
               </div>
            </div>
         </div>
         <div class="form-group">
            <div class="row">
               <label class="form-control-label col-sm-8" for="xminpass">' . adm_translate("Longueur minimum du mot de passe des utilisateurs") . '</label>
               <div class="col-sm-4">
                  <select class="c-select form-control" name="xminpass">
                     <option value="' . $minpass . '">' . $minpass . '</option>
                     <option value="3">3</option>
                     <option value="4">4</option>
                     <option value="5">5</option>
                     <option value="8">8</option>
                     <option value="10">10</option>
                  </select>
               </div>
            </div>
         </div>
         <div class="form-group">
            <div class="row">
               <label class="form-control-label col-sm-8" for="xshow_user">' . adm_translate("Nombre d'utilisateurs listés") . '</label>
               <div class="col-sm-4">
                  <select class="c-select form-control" name="xshow_user">
                     <option value="' . $show_user . '">' . $show_user . '</option>
                     <option value="10">10</option>
                     <option value="20">20</option>
                     <option value="30">30</option>
                     <option value="40">40</option>
                  </select>
               </div>
            </div>
         </div>
         <div class="form-group">
            <div class="row">
               <label class="form-control-label col-sm-8" for="xsmilies">' . adm_translate("Activer les avatars") . '</label>
               <div class="col-sm-4">
                  <label class="radio-inline">';
    if ($smilies == 1) {
        echo '
                     <input type="radio" name="xsmilies" value="1" checked="checked" />' . adm_translate("Oui") . '
                  </label>
                  <label class="radio-inline">
                     <input type="radio" name="xsmilies" value="0" />' . adm_translate("Non");
    } else {
        echo '
                     <input type="radio" name="xsmilies" value="1" />' . adm_translate("Oui") . '
                  </label>
                  <label class="radio-inline">
                     <input type="radio" name="xsmilies" value="0" checked="checked" />' . adm_translate("Non");
    }
    echo '
                  </label>
               </div>
            </div>
         </div>
         <div class="form-group">
            <div class="row">
               <label class="form-control-label col-sm-8" for="xavatar_size">' . adm_translate("Taille maximum des avatars personnels (largeur * hauteur / 60*80) en pixel") . '</label>
               <div class="col-sm-4">';
    if (!$avatar_size) {
        $avatar_size = "60*80";
    }
    echo '
                  <input class="form-control" type="text" name="xavatar_size" value="' . $avatar_size . '" size="11" maxlength="10" />
               </div>
            </div>
         </div>
         <div class="form-group">
            <div class="row">
               <label class="form-control-label col-sm-8" for="xshort_user">' . adm_translate("Activer la description simplifiée des utilisateurs") . '</label>
               <div class="col-sm-4">
                  <label class="radio-inline">';
    if ($short_user == 1) {
        echo '
                     <input type="radio" name="xshort_user" value="1" checked="checked" />' . adm_translate("Oui") . '
                  </label>
                  <label class="radio-inline">
                     <input type="radio" name="xshort_user" value="0" />' . adm_translate("Non");
    } else {
        echo '
                     <input type="radio" name="xshort_user" value="1" />' . adm_translate("Oui") . '
                  </label>
                  <label class="radio-inline">
                     <input type="radio" name="xshort_user" value="0" checked="checked" />' . adm_translate("Non");
    }
    echo '
                  </label>
               </div>
            </div>
         </div>
         <div class="form-group">
            <div class="row">
               <label class="form-control-label col-sm-8" for="xAutoRegUser">' . adm_translate("Autoriser la création automatique des membres") . '</label>
               <div class="col-sm-4">
                  <label class="radio-inline">';
    if ($AutoRegUser == "" and $AutoRegUser != 0) {
        $AutoRegUser = 1;
    }
    if ($AutoRegUser == 1) {
        echo '
                     <input type="radio" name="xAutoRegUser" value="1" checked="checked" />' . adm_translate("Oui") . '
                  </label>
                  <label class="radio-inline">
                     <input type="radio" name="xAutoRegUser" value="0" />' . adm_translate("Non");
    } else {
        echo '
                     <input type="radio" name="xAutoRegUser" value="1" />' . adm_translate("Oui") . '
                  </label>
                  <label class="radio-inline">
                     <input type="radio" name="xAutoRegUser" value="0" checked="checked" />' . adm_translate("Non");
    }
    echo '
                  </label>
               </div>
            </div>
         </div>
         <div class="form-group">
            <div class="row">
               <label class="form-control-label col-sm-8" for="xmemberpass">' . adm_translate("Autoriser les utilisateurs à choisir leur mot de passe") . '</label>
               <div class="col-sm-4">
                  <label class="radio-inline">';
    if ($memberpass == "" and $memberpass != 0) {
        $memberpass = 1;
    }
    if ($memberpass == 1) {
        echo '
                     <input type="radio" name="xmemberpass" value="1" checked="checked" />' . adm_translate("Oui") . '
                  </label>
                  <label class="radio-inline">
                     <input type="radio" name="xmemberpass" value="0" />' . adm_translate("Non");
    } else {
        echo '
                     <input type="radio" name="xmemberpass" value="1" />' . adm_translate("Oui") . '
                  </label>
                  <label class="radio-inline">
                     <input type="radio" name="xmemberpass" value="0" checked="checked" />' . adm_translate("Non");
    }
    echo '
                  </label>
               </div>
            </div>
         </div>
         <div class="form-group">
            <div class="row">
               <label class="form-control-label col-sm-8" for="xsubscribe">' . adm_translate("Autoriser les abonnements") . '</label>
               <div class="col-sm-4">
                  <label class="radio-inline">';
    if ($subscribe == 1) {
        echo '
                     <input type="radio" name="xsubscribe" value="1" checked="checked" />' . adm_translate("Oui") . '
                  </label>
                  <label class="radio-inline">
                     <input type="radio" name="xsubscribe" value="0" />' . adm_translate("Non");
    } else {
        echo '
                     <input type="radio" name="xsubscribe" value="1" />' . adm_translate("Oui") . '
                  </label>
                  <label class="radio-inline">
                     <input type="radio" name="xsubscribe" value="0" checked="checked" />' . adm_translate("Non");
    }
    echo '
                  </label>
               </div>
            </div>
         </div>
         <div class="form-group">
            <div class="row">
               <label class="form-control-label col-sm-8" for="xmember_invisible">' . adm_translate("Autoriser les membres invisibles") . '</label>
               <div class="col-sm-4">
                  <label class="radio-inline">';
    if ($member_invisible == 1) {
        echo '
                     <input type="radio" name="xmember_invisible" value="1" checked="checked" />' . adm_translate("Oui") . '
                  </label>
                  <label class="radio-inline">
                     <input type="radio" name="xmember_invisible" value="0" />' . adm_translate("Non");
    } else {
        echo '
                     <input type="radio" name="xmember_invisible" value="1" />' . adm_translate("Oui") . '
                  </label>
                  <label class="radio-inline">
                     <input type="radio" name="xmember_invisible" value="0" checked="checked" />' . adm_translate("Non");
    }
    echo '
                  </label>
               </div>
            </div>
         </div>
         <div class="form-group">
            <div class="row">
               <label class="form-control-label col-sm-8" for="xCloseRegUser">' . adm_translate("Fermer les nouvelles inscriptions") . '</label>
               <div class="col-sm-4">
                  <label class="radio-inline">';
    if ($CloseRegUser == "" and $CloseRegUser != 1) {
        $AutoRegUser = 0;
    }
    if ($CloseRegUser == 1) {
        echo '
                     <input type="radio" name="xCloseRegUser" value="1" checked="checked" />' . adm_translate("Oui") . '
                  </label>
                  <label class="radio-inline">
                     <input type="radio" name="xCloseRegUser" value="0" />' . adm_translate("Non");
    } else {
        echo '
                     <input type="radio" name="xCloseRegUser" value="1" />' . adm_translate("Oui") . '
                  </label>
                  <label class="radio-inline">
                     <input type="radio" name="xCloseRegUser" value="0" checked="checked" />' . adm_translate("Non");
    }
    echo '
                  </label>
               </div>
            </div>
         </div>
         <div class="form-group">
            <div class="row">
               <label class="form-control-label col-sm-8" for="xhttpref">' . adm_translate("Activer les référants HTTP") . '</label>
               <div class="col-sm-4">
                  <label class="radio-inline">';
    if ($httpref == 1) {
        echo '
                     <input type="radio" name="xhttpref" value="1" checked="checked" />' . adm_translate("Oui") . '
                  </label>
                  <label class="radio-inline">
                     <input type="radio" name="xhttpref" value="0" />' . adm_translate("Non");
    } else {
        echo '
                     <input type="radio" name="xhttpref" value="1" />' . adm_translate("Oui") . '
                  </label>
                  <label class="radio-inline">
                     <input type="radio" name="xhttpref" value="0" checked="checked" />' . adm_translate("Non");
    }
    echo '
                  </label>
               </div>
            </div>
         </div>
         <div class="form-group">
            <div class="row">
               <label class="form-control-label col-sm-8" for="xhttprefmax">' . adm_translate("Combien de référants au maximum") . '</label>
               <div class="col-sm-4">
                  <select class="c-select form-control" name="xhttprefmax">
                     <option value="' . $httprefmax . '">' . $httprefmax . '</option>
                     <option value="100">100</option>
                     <option value="250">250</option>
                     <option value="500">500</option>
                     <option value="1000">1000</option>
                     <option value="2000">2000</option>
                     <option value="4000">4000</option>
                     <option value="8000">8000</option>
                  </select>
               </div>
            </div>
         </div>
         <div class="form-group">
            <div class="row">
               <label class="form-control-label col-sm-8" for="xmember_list">' . adm_translate("Liste des membres") . ' : ' . adm_translate("Privé") . '</label>
               <div class="col-sm-4">
                  <label class="radio-inline">';
    if ($member_list == 1) {
        echo '
                     <input type="radio" name="xmember_list" value="1" checked="checked" />' . adm_translate("Oui") . '
                  </label>
                  <label class="radio-inline">
                     <input type="radio" name="xmember_list" value="0" />' . adm_translate("Non");
    } else {
        echo '
                     <input type="radio" name="xmember_list" value="1" />' . adm_translate("Oui") . '
                  </label>
                  <label class="radio-inline">
                     <input type="radio" name="xmember_list" value="0" checked="checked" />' . adm_translate("Non");
    }
    echo '
                  </label>
               </div>
            </div>
         </div>
         <div class="form-group">
            <div class="row">
               <label class="form-control-label col-sm-8" for="xdownload_cat">' . adm_translate("Rubrique de téléchargement") . '</label>
               <div class="col-sm-4">
                  <select class="c-select form-control" name="xdownload_cat">
                     <option value="' . $download_cat . '">' . aff_langue($download_cat) . '</option>';
    $result = sql_query("SELECT distinct dcategory FROM " . $NPDS_Prefix . "downloads");
    while (list($category) = sql_fetch_row($result)) {
        $category = stripslashes($category);
        echo '
                     <option value="' . $category . '">' . aff_langue($category) . '</option>';
    }
    echo '
                     <option value="' . adm_translate("Tous") . '">- ' . adm_translate("Tous") . '</option>
                     <option value="' . adm_translate("Aucune catégorie") . '">- ' . adm_translate("Aucune catégorie") . '</option>
                  </select>
               </div>
            </div>
         </div>
         <div class="form-group">
            <div class="row">
               <label class="form-control-label col-sm-8" for="xshort_review">' . adm_translate("Critiques") . ' : ' . adm_translate("courtes") . '</label>
               <div class="col-sm-4">
                  <label class="radio-inline">';
    if ($short_review == 1) {
        echo '
                     <input type="radio" name="xshort_review" value="1" checked="checked" />' . adm_translate("Oui") . '
                  </label>
                  <label class="radio-inline">
                     <input type="radio" name="xshort_review" value="0" />' . adm_translate("Non");
    } else {
        echo '
                     <input type="radio" name="xshort_review" value="1" />' . adm_translate("Oui") . '
                  </label>
                  <label class="radio-inline">
                     <input type="radio" name="xshort_review" value="0" checked="checked" />' . adm_translate("Non");
    }
    echo '
                  </label>
               </div>
            </div>
         </div>
      </div>
      <script type="text/javascript">
      //<![CDATA[
      tog("divers","show_divers","hide_divers");
      //]]>
      </script>
   </fieldset>
   <fieldset>
   <legend><a class="tog" id="show_divers_http" title="' . adm_translate("Replier la liste") . '"><i id="i_divers_http" class="fa fa-caret-down fa-lg" ></i>&nbsp;</a>' . adm_translate("Divers") . ' HTTP</legend>
      <div id="divers_http" class="adminsidefield" style="display:none;">
         <div class="form-group">
            <div class="row">
               <label class="form-control-label col-sm-8" for="xrss_host_verif">' . adm_translate("Pour les grands titres de sites de news, activer la vérification de l'existance d'un web sur le Port 80") . '</label>
               <div class="col-sm-4">
                  <label class="radio-inline">
    ';
    if ($rss_host_verif == true) {
        echo '
                     <input type="radio" name="xrss_host_verif" value="true" checked="checked" />' . adm_translate("Oui") . '
                  </label>
                  <label class="radio-inline">
                     <input type="radio" name="xrss_host_verif" value="false" />' . adm_translate("Non");
    } else {
        echo '
                     <input type="radio" name="xrss_host_verif" value="true" />' . adm_translate("Oui") . '
                  </label>
                  <label class="radio-inline">
                     <input type="radio" name="xrss_host_verif" value="false" checked="checked" />' . adm_translate("Non");
    }
    echo '
                  </label>
               </div>
            </div>
         </div>
         <div class="form-group">
            <div class="row">
               <label class="form-control-label col-sm-8" for="xcache_verif">' . adm_translate("Pour les pages HTML générées, activer les tags avancés de gestion du cache") . '</label>
               <div class="col-sm-4">
                  <label class="radio-inline">';
    if ($cache_verif == true) {
        echo '
                     <input type="radio" name="xcache_verif" value="true" checked="checked" />' . adm_translate("Oui") . ' &nbsp;
                  </label>
                  <label class="radio-inline">
                     <input type="radio" name="xcache_verif" value="false" />' . adm_translate("Non") . ' <span style="font-size: 10px;">(Multimania)</span>';
    } else {
        echo '
                     <input type="radio" name="xcache_verif" value="true" />' . adm_translate("Oui") . ' &nbsp;
                  </label>
                  <label class="radio-inline">
                     <input type="radio" name="xcache_verif" value="false" checked="checked" />' . adm_translate("Non") . ' <span style="font-size: 10px;">(Multimania)</span>';
    }
    echo '
               </label>
            </div>
         </div>
         </div>
         <div class="form-group">
            <div class="row">
               <label class="form-control-label col-sm-8" for="xdns_verif">' . adm_translate("Activer la résolution DNS pour les posts des forums, IP-Ban, ...") . '</label>
               <div class="col-sm-4">
                  <label class="radio-inline">';
    if ($dns_verif == true) {
        echo '
                     <input type="radio" name="xdns_verif" value="true" checked="checked" />' . adm_translate("Oui") . '
                  </label>
                  <label class="radio-inline">
                     <input type="radio" name="xdns_verif" value="false" />' . adm_translate("Non");
    } else {
        echo '
                     <input type="radio" name="xdns_verif" value="true" />' . adm_translate("Oui") . '
                  </label>
                  <label class="radio-inline">
                     <input type="radio" name="xdns_verif" value="false" checked="checked" />' . adm_translate("Non");
    }
    echo '
               </label>
            </div>
         </div>
      </div>
   </div>
   <script type="text/javascript">
      //<![CDATA[ 
      tog(\'divers_http\',\'show_divers_http\',\'hide_divers_http\');
       //]]>
   </script>
   </fieldset>
   <fieldset>
      <legend><a class="tog" id="show_divers_syst" title="' . adm_translate("Replier la liste") . '"><i id="i_divers_syst" class="fa fa-caret-down fa-lg" ></i>&nbsp;</a>' . adm_translate("Divers") . ' SYSTEM</legend>
      <div id="divers_syst" class="adminsidefield" style="display:none;">';
    if (!$savemysql_size) {
        $savemysql_size = "256";
    } else {
        if ($savemysql_size == "256") {
            $sel_size256 = 'selected="selected"';
        } else {
            $sel_size256 = '';
        }
        if ($savemysql_size == "512") {
            $sel_size512 = 'selected="selected"';
        } else {
            $sel_size512 = '';
        }
        if ($savemysql_size == "1024") {
            $sel_size1024 = 'selected="selected"';
        } else {
            $sel_size1024 = '';
        }
    }
    echo '
   <div class="form-group">
      <div class="row">
         <label class="form-control-label col-sm-4" for="xsavemysql_size">' . adm_translate("Taille maximum des fichiers de sauvegarde SaveMysql") . '</label>
         <div class="col-sm-8">
            <select class="c-select form-control" name="xsavemysql_size">
               <option value="256" ' . $sel_size256 . '>256 Ko</option>
               <option value="512" ' . $sel_size512 . '>512 Ko</option>
               <option value="1024" ' . $sel_size1024 . '>1024 Ko</option>
            </select>
         </div>
      </div>
   </div>';
    if (!$savemysql_mode) {
        $savemysql_mode = "1";
    } else {
        if ($savemysql_mode == "1") {
            $type_save1 = 'selected="selected"';
        } else {
            $type_save1 = '';
        }
        if ($savemysql_mode == "2") {
            $type_save2 = 'selected="selected"';
        } else {
            $type_save2 = '';
        }
        if ($savemysql_mode == "3") {
            $type_save3 = 'selected="selected"';
        } else {
            $type_save3 = '';
        }
    }
    echo '
   <div class="form-group">
      <div class="row">
         <label class="form-control-label col-sm-4" for="xsavemysql_mode">' . adm_translate("Type de sauvegarde SaveMysql") . '</label>
         <div class="col-sm-8">
            <select class="c-select form-control" name="xsavemysql_mode">
               <option value="1" ' . $type_save1 . '>' . adm_translate("Toute tables. Fichier envoyé au navigateur. Pas de limite de taille") . '</option>
               <option value="2" ' . $type_save2 . '>' . adm_translate("Fichiers dans /slogs. table par table, tables non scindées : limite") . '&nbsp;' . $savemysql_size . ' Ko</option>
               <option value="3" ' . $type_save3 . '>' . adm_translate("Fichiers dans /slogs. table par table, lignes par lignes, tables scindées : limite") . '&nbsp;' . $savemysql_size . ' Ko</option>
            </select>
         </div>
      </div>
   </div>
   <div class="form-group">
      <div class="row">
         <label class="form-control-label col-sm-4" for="xtiny_mce">' . adm_translate("Activer l'éditeur Tinymce") . '</label>
         <div class="col-sm-8">
            <label class="radio-inline">';
    if ($tiny_mce) {
        echo '
               <input type="radio" name="xtiny_mce" value="true" checked="checked" />' . adm_translate("Oui") . '
            </label>
            <label class="radio-inline">
               <input type="radio" name="xtiny_mce" value="false" />' . adm_translate("Non");
    } else {
        echo '
               <input type="radio" name="xtiny_mce" value="true" />' . adm_translate("Oui") . '
            </label>
            <label class="radio-inline">
               <input type="radio" name="xtiny_mce" value="false" checked="checked" />' . adm_translate("Non");
    }
    echo '
            </label>
         </div>
      </div>
   </div>

   </div>
   <script type="text/javascript">
      //<![CDATA[
      tog(\'divers_syst\',\'show_divers_syst\',\'hide_divers_syst\');
      //]]>
   </script>
   </fieldset>
   <input type="hidden" name="op" value="ConfigSave" />
   <div class="form-group">
      <button class="btn btn-primary" type="submit">' . adm_translate("Sauver les modifications") . '</button>
   </div>
   </form>';
    adminfoot('fv', '', '', '');
}
Ejemplo n.º 27
0
function poll_editPollPosted()
{
    global $id, $maxOptions, $NPDS_Prefix, $f_meta_nom, $f_titre, $adminimg;
    if ($id) {
        global $hlpfile;
        include 'header.php';
        GraphicAdmin($hlpfile);
        adminhead($f_meta_nom, $f_titre, $adminimg);
        $result = sql_query("SELECT pollID, pollTitle, timeStamp FROM " . $NPDS_Prefix . "poll_desc WHERE pollID='{$id}'");
        $holdtitle = sql_fetch_row($result);
        $result = sql_query("SELECT optionText, voteID, pollType FROM " . $NPDS_Prefix . "poll_data WHERE pollID='{$id}' ORDER BY voteID ASC");
        echo '
   <h3>' . adm_translate("Edition des sondages") . '</h3>
   <form method="post" action="admin.php">
      <input type="hidden" name="op" value="SendEditPoll">
      <input type="hidden" name="pollID" value="' . $id . '" />
      <div class="form-group">
         <div class="row">
            <label class="form-control-label col-sm-3 col-md-3" for="pollTitle">' . adm_translate("Intitulé du Sondage") . '</label>
            <div class="col-sm-9 col-md-9">
               <input class="form-control" type="text" id="pollTitle" name="pollTitle" value="' . $holdtitle[1] . '" maxlength="100" />
               <span class="help-block">' . adm_translate("S.V.P. entrez chaque option disponible dans un seul champ") . '</span>
            </div>
         </div>
      </div>';
        for ($i = 1; $i <= $maxOptions; $i++) {
            list($optionText, $voteID, $pollType) = sql_fetch_row($result);
            echo '
      <div class="form-group">
         <div class="row">
            <label class="form-control-label col-sm-3 col-md-3" for="optionText' . $i . '">' . adm_translate("Option") . ' ' . $i . '</label>
            <div class="col-sm-9 col-md-9">
               <input class="form-control" type="text" id="optionText' . $i . '" name="optionText[' . $voteID . ']" maxlength="255" value="' . $optionText . '" />
            </div>
         </div>
      </div>';
        }
        $pollClose = $pollType / 128 >= 1 ? 1 : 0;
        $pollType = $pollType % 128;
        echo '
      <div class="checkbox">
         <div class="row">
            <div class="col-sm-offset-3 col-sm-9">
               <label>
                  <input type="checkbox" name="poll_type" value="1"';
        if ($pollType == "1") {
            echo ' checked="checked"';
        }
        echo ' />' . adm_translate("Seulement aux membres") . '
               </label>
            </div>
         </div>
      </div>
      <div class="checkbox">
         <div class="row">
            <div class="col-sm-offset-3 col-sm-9">
               <label class="text-danger">
                  <input type="checkbox" name="poll_close" value="1"';
        if ($pollClose == 1) {
            echo ' checked="checked"';
        }
        echo ' />' . adm_translate("Vote fermé") . '
               </label>
            </div>
         </div>
      </div>
      <div class="form-group">
         <div class="row">
            <div class="col-sm-offset-3 col-sm-9">
               <button class="btn btn-primary" type="submit">Ok</button>
            </div>
         </div>
      </div>
   </form>';
        adminfoot('fv', '', '', '');
    } else {
        header("location: admin.php?op=editpoll");
    }
}
Ejemplo n.º 28
0
function ConfigureArchive($ModPath, $ModStart, $f_meta_nom, $f_titre, $adminimg)
{
    if (file_exists("modules/{$ModPath}/archive-stories.conf.php")) {
        include "modules/{$ModPath}/archive-stories.conf.php";
    }
    adminhead($f_meta_nom, $f_titre, $adminimg);
    echo '
   <hr />
   <a href= "modules.php?ModPath=' . $ModPath . '&amp;ModStart=' . $ModPath . '" ><i class="fa fa-external-link fa-lg" title="Voir le module en mode utilisation." data-toggle="tooltip" data-placement="right"></i></a>
   <h3>' . adm_translate("Paramètres") . '</h3>
   <form id="archive_adm" class="form-horizontal" action="admin.php" method="post">
      <fieldset>
         <div class="form-group row">
            <label class="form-control-label col-sm-4" for="arch_titre">' . adm_translate("Titre de la page") . '</label>
            <div class="col-sm-8">
               <textarea id="arch_titre" class="form-control" type="text" name="arch_titre"  maxlength="400" rows="5" placeholder="' . adm_translate("Titre de votre page") . '" >' . $arch_titre . '</textarea>
               <span class="help-block text-xs-right"><span id="countcar_arch_titre"></span></span>
            </div>
         </div>
         <div class="form-group row">
            <label class="form-control-label col-sm-4" for="arch">' . adm_translate("Affichage") . '</label>
            <div class="col-sm-8">
               <select class="custom-select form-control" name="arch">';
    if ($arch == 1) {
        $sel_a = 'selected="selected"';
    } else {
        $sel_i = 'selected="selected"';
    }
    echo '
                  <option name="status" value="1" ' . $sel_a . '>' . adm_translate("Les articles en archive") . '</option>
                  <option name="status" value="0" ' . $sel_i . '>' . adm_translate("Les articles en ligne") . '</option>
               </select>
            </div>
         </div>
         <div class="form-group row">
            <label class="form-control-label col-sm-4" for="maxcount">' . adm_translate("Nombre d'article par page") . '</label>
            <div class="col-sm-8">
              <input id="maxcount" class="form-control" type="number" name="maxcount" value="' . $maxcount . '" min="0" max="500" required="required" />
            </div>
         </div>
         <div class="form-group row">
            <label class="form-control-label col-sm-4" for="retcache">' . adm_translate("Rétention") . '</label>
            <div class="col-sm-8">
              <input id="retcache" class="form-control" type="number" name="retcache" value="' . $retcache . '" min="0" required="required" />
               <span class="help-block text-xs-right">' . adm_translate("Temps de rétention en secondes") . '</span>
            </div>
         </div>
         <div class="form-group row">
            <div class="col-sm-8 offset-sm-4">
               <button class="btn btn-primary col-xs-12" type="submit"><i class="fa fa-check-square fa-lg"></i>&nbsp;' . adm_translate("Sauver") . '</button>
               <input type="hidden" name="op" value="Extend-Admin-SubModule" />
               <input type="hidden" name="ModPath" value="' . $ModPath . '" />
               <input type="hidden" name="ModStart" value="' . $ModStart . '" />
               <input type="hidden" name="subop" value="SaveSetArchive_stories" />
               <input type="hidden" name="adm_img_mod" value="1" />
            </div>
         </div>
      </fieldset>
   </form>';
    $arg1 = 'inpandfieldlen("arch_titre",400);';
    adminfoot('fv', '', $arg1, '');
}
Ejemplo n.º 29
0
function nmig_End($name_module, $end_link)
{
    include "header.php";
    global $ModInstall, $display, $NPDS_Prefix;
    sql_query("UPDATE " . $NPDS_Prefix . "modules SET minstall='1' WHERE mnom='" . $ModInstall . "'");
    $display = ' 
   <div class="">
      <p class="text-success"><strong>' . adm_translate("L'installation automatique du module") . ' "' . $name_module . '" ' . adm_translate("est terminée !") . '</strong></p>
   </div>
   <div style="text-align: center;">
      <a href="' . $end_link . '" class="btn btn-primary">' . adm_translate("Ok") . '</a>
   </div><br />
   ' . nmig_copyright();
}
Ejemplo n.º 30
0
list($gainopt, $countopt) = sql_fetch_row($result);
// Affichage
adminhead($f_meta_nom, $f_titre, $adminimg);
echo adm_translate("Optimisation effectuée ") . ' : ' . adm_translate("Gain total réalisé") . ' ' . $total_gain . ' Ko</br>';
echo $last_opti;
echo "<p>" . adm_translate("A ce jour, vous avez effectué ") . " " . $countopt . " optimisation(s) " . adm_translate(" et réalisé un gain global de ") . " " . $gainopt . " Ko.</p>\n";
echo '<table id="tad_opti" data-toggle="table" data-striped="true" data-show-toggle="true" data-mobile-responsive="true" data-icons="icons" data-icons-prefix="fa">
    <thead>
        <tr>
            <th data-sortable="true" align="center">' . adm_translate('Table') . '</th>
            <th align="center">' . adm_translate('Taille actuelle') . '</th>
            <th data-sortable="true" align="center">' . adm_translate('Etat') . '</th>
            <th align="center">' . adm_translate('Gain réalisable') . '</th>
        </tr>
    </thead>
    <tfoot>
        <tr>
            <td></td>
            <td></td>
            <td>' . adm_translate("Gain total réalisé") . ' : </td>
            <td>' . $total_gain . ' Ko</td>
        </tr>
    </tfoot>
    <tbody>' . "\n";
echo $li_tab_opti;
echo '
    </tbody>
    </table>';
adminfoot('', '', '', '');
global $aid;
Ecr_Log("security", "OptiMySql() by AID : {$aid}", "");