Ejemplo n.º 1
0
function convert_ressources($Xcontent)
{
    global $op;
    for ($i = 0; $i < strlen($Xcontent); $i++) {
        if (strtoupper(substr($Xcontent, $i, 4)) == "src=") {
            if (strtoupper(substr($Xcontent, $i + 4, 3)) != "HTT" and strtoupper(substr($Xcontent, $i + 4, 4)) != "\"HTT") {
                $Xcontent = substr_replace($Xcontent, "src=getfile.php?att_id={$op}&amp;apli=minisite&amp;att_type=&amp;att_size=&amp;att_name=", $i, 4);
            }
            $i = $i + 4;
        }
    }
    return aff_langue($Xcontent);
}
Ejemplo n.º 2
0
function footmsg()
{
    global $foot1, $foot2, $foot3, $foot4;
    $foot = '<p align="center">';
    if ($foot1) {
        $foot .= stripslashes($foot1) . '<br />';
    }
    if ($foot2) {
        $foot .= stripslashes($foot2) . '<br />';
    }
    if ($foot3) {
        $foot .= stripslashes($foot3) . '<br />';
    }
    if ($foot4) {
        $foot .= stripslashes($foot4);
    }
    $foot .= '</p>';
    echo aff_langue($foot);
}
Ejemplo n.º 3
0
function footmsg()
{
    global $foot1, $foot2, $foot3, $foot4;
    $foot = "<p align=\"center\">";
    if ($foot1) {
        $foot .= stripslashes($foot1) . "<br />";
    }
    if ($foot2) {
        $foot .= stripslashes($foot2) . "<br />";
    }
    if ($foot3) {
        $foot .= stripslashes($foot3) . "<br />";
    }
    if ($foot4) {
        $foot .= stripslashes($foot4);
    }
    $foot .= "</p>";
    echo aff_langue($foot);
}
Ejemplo n.º 4
0
function ShowFaqAll($id_cat)
{
    global $NPDS_Prefix;
    $result = sql_query("SELECT id, id_cat, question, answer FROM " . $NPDS_Prefix . "faqanswer WHERE id_cat='{$id_cat}'");
    while (list($id, $id_cat, $question, $answer) = sql_fetch_row($result)) {
        echo '
      <div class="card" id="accordion_' . $id . '" role="tablist" aria-multiselectable="true">
         <div class="card-block">
            <h4 class="card-title">
            <a data-toggle="collapse" data-parent="#accordion_' . $id . '" href="#faq_' . $id . '" aria-expanded="true" aria-controls="' . $id . '"><i class="fa fa-bars"></i></a>&nbsp;' . aff_langue($question) . '
            </h4>
            <div class="collapse" id="faq_' . $id . '" >
               <div class="card-text">
               ' . aff_langue($answer) . '
               </div>
            </div>
         </div>
      </div>';
    }
}
Ejemplo n.º 5
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.º 6
0
function poll_createPoll()
{
    global $hlpfile, $maxOptions, $f_meta_nom, $f_titre, $adminimg;
    include 'header.php';
    GraphicAdmin($hlpfile);
    adminhead($f_meta_nom, $f_titre, $adminimg);
    //
    echo '
        <h3>' . adm_translate("Liste des sondages") . '</h3>
        <table id="tad_pool" data-toggle="table" data-striped="true" data-show-toggle="true" data-search="true" data-mobile-responsive="true" data-icons="icons" data-icons-prefix="fa">
         <thead>
            <tr>
               <th data-sortable="true">ID</th>
               <th data-sortable="true">' . adm_translate("Intitulé du Sondage") . '</th>
               <th data-sortable="true">' . adm_translate("Vote") . '</th>
               <th>' . adm_translate("Fonctions") . '</th>
            </tr>
         </thead>
         <tbody>';
    $result = sql_query("SELECT pollID, pollTitle, voters FROM " . $NPDS_Prefix . "poll_desc ORDER BY timeStamp");
    while ($object = sql_fetch_assoc($result)) {
        echo '
            <tr>
               <td>' . $object["pollID"] . '</td>
               <td>' . aff_langue($object["pollTitle"]) . '</td>
               <td>' . $object["voters"] . '</td>
               <td>
                  <a href="admin.php?op=editpollPosted&amp;id=' . $object["pollID"] . '"><i class="fa fa-edit fa-lg" title="' . adm_translate("Editer ce sondage") . '" data-toggle="tooltip"></i></a>
                  <a href="admin.php?op=removePosted&amp;id=' . $object["pollID"] . '"><i class="fa fa-trash-o fa-lg text-danger" title="' . adm_translate("Effacer ce sondage") . '" data-toggle="tooltip"></i></a>
               </td>
        </tr>';
        $result2 = sql_query("SELECT SUM(optionCount) AS SUM FROM " . $NPDS_Prefix . "poll_data WHERE pollID='{$id}'");
        list($sum) = sql_fetch_row($result2);
    }
    echo '
         </tbody>
      </table>';
    echo '<h3>' . adm_translate("Créer un nouveau Sondage") . '</h3>
   <form action="admin.php" method="post">
      <input type="hidden" name="op" value="createPosted" />
      <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" 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++) {
        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") . '</label>
               <div class="col-sm-9 col-md-9">
                  <input class="form-control" type="text" id="optionText' . $i . '" name="optionText[' . $i . ']" maxlength="255" />
               </div>
            </div>
         </div>';
    }
    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" />' . adm_translate("Seulement aux membres") . '
                  </label>
               </div>
            </div>
         </div>
         <div class="form-group">
            <div class="row">
               <div class="col-sm-offset-3 col-sm-9">
                  <button type="submit" class="btn btn-primary">' . adm_translate("Créer") . '</button>
               </div>
            </div>
         </div>
      </fieldset>
   </form>';
    adminfoot('fv', '', '', '');
}
Ejemplo n.º 7
0
function AddLink()
{
    global $ModPath, $ModStart, $links_DB, $NPDS_Prefix, $links_anonaddlinklock;
    include "header.php";
    $mainlink = 'ad_l';
    global $user;
    mainheader();
    if (autorisation($links_anonaddlinklock)) {
        echo '
   <div class="card card-block">
      <h3>Proposer un lien</h3>
      <ul>
         <li>' . translate("Submit a unique link only once.") . '</li>
         <li>' . translate("All links are posted pending verification.") . '</li>
         <li>' . translate("Username and IP are recorded, so please don't abuse the system.") . '</li>
      </ul>
      <form class="" method="post" action="modules.php" name="adminForm">
         <input type="hidden" name="ModPath" value="' . $ModPath . '" />
         <input type="hidden" name="ModStart" value="' . $ModStart . '" />
         <div class="form-group row">
            <label class="form-control-label col-sm-3" for="title">' . translate("Title") . '</label>
            <div class="col-sm-9">
               <input class="form-control" type="text" id="title" name="title" maxlength="100" required="required" />
           </div>
        </div>';
        global $links_url;
        if ($links_url or $links_url == -1) {
            echo '
         <div class="form-group row">
            <label class="form-control-label col-sm-3" for="url">URL</label>
            <div class="col-sm-9">
               <input class="form-control" type="url" id="url" name="url" maxlength="100" value="http://" required="required" />
           </div>
        </div>';
        }
        $result = sql_query("SELECT cid, title FROM " . $links_DB . "links_categories ORDER BY title");
        echo '
         <div class="form-group row">
            <label class="form-control-label col-sm-3" for="cat">' . translate("Category") . '</label>
            <div class="col-sm-9">
               <select class="c-select form-control" name="cat">';
        while (list($cid, $title) = sql_fetch_row($result)) {
            echo '
                  <option value="' . $cid . '">' . aff_langue($title) . '</option>';
            $result2 = sql_query("select sid, title from " . $links_DB . "links_subcategories WHERE cid='{$cid}' ORDER BY title");
            while (list($sid, $stitle) = sql_fetch_row($result2)) {
                echo '
                  <option value="' . $cid . '-' . $sid . '">' . aff_langue($title . '/' . $stitle) . '</option>';
            }
        }
        echo '
              </select>
           </div>
        </div>';
        global $links_topic;
        if ($links_topic) {
            echo '
         <div class="form-group row">
            <label class="form-control-label col-sm-3" for="topicL">' . translate("Topics") . '</label>
            <div class="col-sm-9">
               <select class="c-select form-control" name="topicL">';
            $toplist = sql_query("SELECT topicid, topictext FROM " . $NPDS_Prefix . "topics ORDER BY topictext");
            echo '
                  <option value="">' . translate("All Topics") . '</option>';
            while (list($topicid, $topics) = sql_fetch_row($toplist)) {
                echo '
                  <option value="' . $topicid . '">' . $topics . '</option>';
            }
            echo '
               </select>
            </div>
         </div>';
        }
        echo '
         <div class="form-group row">
            <label class="form-control-label col-sm-12" for="xtext">' . translate("Description") . '</label>
            <div class="col-sm-12">
               <textarea class="tin form-control" name="xtext" rows="10"></textarea>
            </div>
         </div>';
        echo aff_editeur('xtext', '');
        global $cookie;
        echo '
         <div class="form-group row">
            <label class="form-control-label col-sm-3" for="name">' . translate("Your Name") . '</label>
            <div class="col-sm-9">
               <input type="text" class="form-control" id="name" name="name" maxlength="60" value="' . $cookie[1] . '" required="required" />
            </div>
         </div>
         <div class="form-group row">
            <label class="form-control-label col-sm-3" for="email">' . translate("Your Email") . '</label>
            <div class="col-sm-9">
               <input type="email" class="form-control" id="email" name="email" maxlength="60" required="required" />
            </div>
         </div>';
        echo Q_spambot();
        echo '
         <div class="form-group row">
            <input type="hidden" name="op" value="Add" />
            <div class="col-sm-12">
               <input type="submit" class="btn btn-primary" value="' . translate("Add URL") . '" />
            </div>
         </div>
      </form>';
    } else {
        echo '
        <p align="center>' . translate("You are not a registered user or you have not logged in.") . '<br />
        ' . translate("If you were registered you could add links on this website.") . '</p>';
    }
    echo '
   </div>';
    adminfoot('fv', '', '', '');
}
Ejemplo n.º 8
0
<?php

/************************************************************** **********/
/* Modification par Jireck      BaseRoc                                          */
/* 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.       */
/************************************************************************/
global $theme;
$rep = false;
if (file_exists("themes/" . $theme . "/html/central.html")) {
    $rep = $theme;
} elseif (file_exists("themes/default/html/central.html")) {
    $rep = "default";
} else {
    echo "central.html manquant / not find !< br />";
    die;
}
if ($rep) {
    ob_start();
    include "themes/" . $rep . "/html/central.html";
    $Xcontent = ob_get_contents();
    ob_end_clean();
    echo meta_lang(aff_langue($Xcontent));
}
Ejemplo n.º 9
0
$remp = '';
include "header.php";
echo '<div id="static_cont">';
if ($op != '' and $op) {
    // Troll Control for security
    if (preg_match('#^[a-z0-9_\\.-]#i', $op) and !stristr($op, ".*://") and !stristr($op, "..") and !stristr($op, "../") and !stristr($op, "script") and !stristr($op, "cookie") and !stristr($op, "iframe") and !stristr($op, "applet") and !stristr($op, "object") and !stristr($op, "meta")) {
        if (file_exists("static/{$op}")) {
            if (!$metalang and !$nl) {
                include "static/{$op}";
            } else {
                ob_start();
                include "static/{$op}";
                $remp = ob_get_contents();
                ob_end_clean();
                if ($metalang) {
                    $remp = meta_lang(aff_code(aff_langue($remp)));
                }
                if ($nl) {
                    $remp = nl2br(str_replace(' ', '&nbsp;', htmlentities($remp, ENT_QUOTES, cur_charset)));
                }
                echo $remp;
            }
            if (!($imgtmp = theme_image("box/print.gif"))) {
                $imgtmp = "images/print.gif";
            }
            echo '<p><a href="print.php?sid=static:' . $op . '&amp;metalang=' . $metalang . '&amp;nl=' . $nl . '" title="' . translate("Printer Friendly Page") . '"><i class="fa fa-2x fa-print"></i></a></p>';
            // Si vous voulez tracer les appels au pages statiques : supprimer les // devant la ligne ci-dessous
            // Ecr_Log("security", "static/$op", "");
        } else {
            echo "<p class=\"text-danger text-xs-center\">" . translate("Please enter information according to the specifications") . "</p>";
        }
Ejemplo n.º 10
0
function instant_members_message()
{
    global $user, $admin, $long_chain, $NPDS_Prefix;
    if (!$long_chain) {
        $long_chain = 13;
    }
    global $block_title;
    if ($block_title == '') {
        $block_title = translate("M2M box");
    }
    if ($user) {
        global $cookie;
        $boxstuff = '
      <ul class="">';
        $ibid = online_members();
        $rank1 = '';
        for ($i = 1; $i <= $ibid[0]; $i++) {
            $timex = time() - $ibid[$i]['time'];
            if ($timex >= 60) {
                $timex = '<i class="fa fa-plug text-muted" title="' . $ibid[$i]['username'] . ' ' . translate("is not connected !") . '" data-toggle="tooltip" data-placement="right"></i>&nbsp;';
            } else {
                $timex = '<i class="fa fa-plug faa-flash animated text-primary" title="' . $ibid[$i]['username'] . ' ' . translate("is connected !") . '" data-toggle="tooltip" data-placement="right" ></i>&nbsp;';
            }
            global $member_invisible;
            if ($member_invisible) {
                if ($admin) {
                    $and = '';
                } else {
                    if ($ibid[$i]['username'] == $cookie[1]) {
                        $and = '';
                    } else {
                        $and = "AND is_visible=1";
                    }
                }
            } else {
                $and = '';
            }
            $result = sql_query("SELECT uid FROM " . $NPDS_Prefix . "users WHERE uname='" . $ibid[$i]['username'] . "' {$and}");
            list($userid) = sql_fetch_row($result);
            if ($userid) {
                $rowQ1 = Q_Select("SELECT rank FROM " . $NPDS_Prefix . "users_status WHERE uid='{$userid}'", 3600);
                list(, $myrow) = each($rowQ1);
                $rank = $myrow['rank'];
                $tmpR = '';
                if ($rank) {
                    if ($rank1 == '') {
                        if ($rowQ2 = Q_Select("SELECT rank1, rank2, rank3, rank4, rank5 FROM " . $NPDS_Prefix . "config", 86400)) {
                            list(, $myrow) = each($rowQ2);
                            $rank1 = $myrow['rank1'];
                            $rank2 = $myrow['rank2'];
                            $rank3 = $myrow['rank3'];
                            $rank4 = $myrow['rank4'];
                            $rank5 = $myrow['rank5'];
                        }
                    }
                    if ($ibidR = theme_image("forum/rank/" . $rank . ".gif")) {
                        $imgtmpA = $ibidR;
                    } else {
                        $imgtmpA = "images/forum/rank/" . $rank . ".gif";
                    }
                    $messR = 'rank' . $rank;
                    $tmpR = "<img src=\"" . $imgtmpA . "\" border=\"0\" alt=\"" . aff_langue(${$messR}) . "\" title=\"" . aff_langue(${$messR}) . "\" />";
                } else {
                    $tmpR = '&nbsp;';
                }
                $new_messages = sql_num_rows(sql_query("SELECT msg_id FROM " . $NPDS_Prefix . "priv_msgs WHERE to_userid = '{$userid}' AND read_msg='0' AND type_msg='0'"));
                if ($new_messages > 0) {
                    $PopUp = JavaPopUp("readpmsg_imm.php?op=new_msg", "IMM", 600, 500);
                    $PopUp = "<a href=\"javascript:void(0);\" onclick=\"window.open({$PopUp});\">";
                    if ($ibid[$i]['username'] == $cookie[1]) {
                        $icon = $PopUp;
                    } else {
                        $icon = "";
                    }
                    if (!($imgtmp = theme_image("powerpack/newmail.gif"))) {
                        $imgtmp = "images/powerpack/newmail.gif";
                    }
                    $icon .= '<i class="fa fa-envelope fa-lg faa-shake animated" title="' . translate("New") . ' : ' . $new_messages . '" data-toggle="tooltip"></i>';
                    if ($ibid[$i]['username'] == $cookie[1]) {
                        $icon .= '</a>';
                    }
                } else {
                    $messages = sql_num_rows(sql_query("SELECT msg_id FROM " . $NPDS_Prefix . "priv_msgs WHERE to_userid = '{$userid}' AND type_msg='0' AND dossier='...'"));
                    if ($messages > 0) {
                        $PopUp = JavaPopUp("readpmsg_imm.php?op=msg", "IMM", 600, 500);
                        $PopUp = '<a href="javascript:void(0);" onclick="window.open(' . $PopUp . ');">';
                        if ($ibid[$i]['username'] == $cookie[1]) {
                            $icon = $PopUp;
                        } else {
                            $icon = '';
                        }
                        $icon .= '<i class="fa fa-envelope-open-o fa-lg " title="' . translate("New") . ' : ' . $new_messages . '" data-toggle="tooltip"></i></a>';
                    } else {
                        $icon = '&nbsp;';
                    }
                }
                $N = $ibid[$i]['username'];
                if (strlen($N) > $long_chain) {
                    $M = substr($N, 0, $long_chain) . '.';
                } else {
                    $M = $N;
                }
                $boxstuff .= '
         <li class="">' . $timex . '&nbsp;<a href="powerpack.php?op=instant_message&amp;to_userid=' . $N . '" title="' . translate("Send internal Message") . '" data-toggle="tooltip" >' . $M . '</a><span class="float-xs-right">' . $icon . '</span></li>';
            }
            //suppression temporaire ... rank  '.$tmpR.'
        }
        $boxstuff .= '
      </ul>';
        themesidebox($block_title, $boxstuff);
    } else {
        if ($admin) {
            $boxstuff = "<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\">";
            $ibid = online_members();
            if ($ibid[0]) {
                for ($i = 1; $i <= $ibid[0]; $i++) {
                    $N = $ibid[$i]['username'];
                    if (strlen($N) > $long_chain) {
                        $M = substr($N, 0, $long_chain) . '.';
                    } else {
                        $M = $N;
                    }
                    $boxstuff .= "<tr><td valign=\"top\" class=\"titboxcont\">{$M}</td></tr>";
                }
                $boxstuff .= "</table>";
                themesidebox("<i>" . $block_title . "</i>", $boxstuff);
            }
        }
    }
}
Ejemplo n.º 11
0
function userinfo($uname)
{
    global $NPDS_Prefix;
    global $user, $sitename, $smilies, $short_user, $site_font;
    global $name, $email, $url, $bio, $user_avatar, $user_icq, $user_aim, $user_yim, $user_msnm, $user_from, $user_occ, $user_intrest, $user_sig, $user_journal;
    $uname = removeHack($uname);
    $result = sql_query("SELECT uid, name, femail, url, bio, user_avatar, user_icq, user_aim, user_yim, user_msnm, user_from, user_occ, user_intrest, user_sig, user_journal, mns FROM " . $NPDS_Prefix . "users WHERE uname='{$uname}'");
    list($uid, $name, $femail, $url, $bio, $user_avatar, $user_icq, $user_aim, $user_yim, $user_msnm, $user_from, $user_occ, $user_intrest, $user_sig, $user_journal, $mns) = sql_fetch_row($result);
    if (!$uid) {
        header("location: index.php");
    }
    global $cookie;
    include "header.php";
    include_once "functions.php";
    if ($uname == $cookie[1]) {
        echo '
      <h2>' . translate("User") . '</h2>
      <h3>' . $uname . ', ' . translate("Welcome to") . ' ' . $sitename . '</h3>
      <p class="lead">' . translate("This is your personal page") . '</p>';
        nav($mns);
    }
    $email = removeHack($femail);
    $name = stripslashes(removeHack($name));
    $url = removeHack($url);
    $bio = stripslashes(removeHack($bio));
    $user_icq = stripslashes(removeHack($user_icq));
    $user_aim = stripslashes(removeHack($user_aim));
    $user_yim = stripslashes(removeHack($user_yim));
    $user_msnm = stripslashes(removeHack($user_msnm));
    $user_from = stripslashes(removeHack($user_from));
    $user_occ = stripslashes(removeHack($user_occ));
    $user_intrest = stripslashes(removeHack($user_intrest));
    $user_sig = nl2br(removeHack($user_sig));
    $user_journal = stripslashes(removeHack($user_journal));
    $op = "userinfo";
    //    include("modules/sform/extend-user/aff_extend-user.php");// nul quel est l'intérêt d'afficher un form quui n'a pas la fonction de form ? mais une fonctions d'affichage désépérément figé dans la structure du form ????
    if (stristr($user_avatar, "users_private")) {
        $direktori = "";
    } else {
        global $theme;
        $direktori = "images/forum/avatar/";
        if (function_exists("theme_image")) {
            if (theme_image("forum/avatar/blank.gif")) {
                $direktori = "themes/{$theme}/images/forum/avatar/";
            }
        }
    }
    if ($uname == $cookie[1]) {
        echo '
   <div class="card text-xs-center">
      <div class="card-header">
         <img src="' . $direktori . $user_avatar . '" class="" />
         <p class="card-text card-title "></p>
      </div>
      <div class="card-block">
         <h3 class="card-title">' . $name . ' <span class="text-muted">alias</span> ' . $uname . '</h3>
         <p class="card-text">You can contact me @ ' . $email . ' ' . $user_icq . '</p>
         <p class="card-text">Don not forget to visit <a href="' . $url . '" class="oo">my web-site</a>';
        if ($mns) {
            echo ' OR my <a href="minisite.php?op=' . $uname . '" target="_blank">' . translate("Mini-Web site") . '</a>';
        }
        echo '
         </p>
      </div>
      <div class="card-footer text-muted">
         ' . $user_sig . '
      </div>
   </div>';
    }
    echo "<br />";
    echo '
    <h4>' . translate("Online journal for") . ' ' . $uname . '.</h4>
    <div id="online_user_journal" class="card card-block">' . $user_journal . '</div>';
    $file = '';
    $handle = opendir('modules/comments');
    while (false !== ($file = readdir($handle))) {
        if (!preg_match('#\\.conf\\.php$#i', $file)) {
            continue;
        }
        $topic = "#topic#";
        include "modules/comments/{$file}";
        $filelist[$forum] = $url_ret;
    }
    closedir($handle);
    echo '
    <h4>' . translate("Last 10 comments by") . ' ' . $uname . '.</h4>
    <div id="last_ten_comment" class="card card-block">';
    $url = '';
    $result = sql_query("SELECT topic_id, forum_id, post_text, post_time FROM " . $NPDS_Prefix . "posts WHERE forum_id<0 and poster_id='{$uid}' ORDER BY post_time DESC LIMIT 0,10");
    while (list($topic_id, $forum_id, $post_text, $post_time) = sql_fetch_row($result)) {
        $url = str_replace("#topic#", $topic_id, $filelist[$forum_id]);
        echo "<p><a href=\"" . $url . "\">" . translate("Posted: ") . convertdate($post_time) . "</a></p>";
        $message = smilie(stripslashes($post_text));
        $message = aff_video_yt($message);
        $message = str_replace('[addsig]', '', $message);
        if (stristr($message, "<a href")) {
            $message = preg_replace('#_blank(")#i', '_blank\\1 class=\\1noir\\1', $message);
        }
        echo $message . '<hr />';
    }
    echo '</div>';
    echo '
    <h4>' . translate("Last 10 news submissions sent by") . ' ' . $uname . '.</h4>
    <div id="last_ten_comment" class="card card-block">';
    $xtab = news_aff("libre", "WHERE informant='{$uname}' ORDER BY sid DESC LIMIT 10", "", 10);
    $story_limit = 0;
    while ($story_limit < 10 and $story_limit < sizeof($xtab)) {
        list($sid, $catid, $aid, $title) = $xtab[$story_limit];
        $story_limit++;
        echo "<p><a href=\"article.php?sid={$sid}\">" . aff_langue($title) . "</a></p>";
    }
    echo '</div>';
    include "footer.php";
}
Ejemplo n.º 12
0
 if ($result) {
     $nrows = sql_num_rows($result);
 }
 $x = 0;
 echo "<table width=\"100%\" cellspacing=\"0\" cellpadding=\"2\" border=\"0\">\n";
 if ($nrows > 0) {
     while (list($artid, $secid, $title, $content) = sql_fetch_row($result)) {
         $rowcolor = tablos();
         $rowQ2 = Q_Select("SELECT secname, rubid FROM " . $NPDS_Prefix . "sections WHERE secid='{$secid}'", 3600);
         list(, $row2) = each($rowQ2);
         $rowQ3 = Q_Select("SELECT rubname FROM " . $NPDS_Prefix . "rubriques WHERE rubid='" . $row2['rubid'] . "'", 3600);
         list(, $row3) = each($rowQ3);
         if ($row3['rubname'] != "Divers" and $row3['rubname'] != "Presse-papiers") {
             $surl = "sections.php?op=listarticles&amp;secid={$secid}";
             $furl = "sections.php?op=viewarticle&amp;artid={$artid}";
             echo "<tr {$rowcolor}><td><a href=\"{$furl}\" class=\"noir\">" . aff_langue($title) . "</a> " . translate("in the sub-section") . " <a href=\"{$surl}\" class=\"noir\">" . aff_langue($row2['secname']) . "</a></td></tr>\n";
             echo "<tr><td><hr noshade=\"noshade\" class=\"ongl\" /></td></tr>";
             $x++;
         }
     }
     if ($x == 0) {
         echo "<tr><td align=\"center\" class=\"rouge\">" . translate("No matches found to your query") . "<br />";
         echo "</td></tr>";
     }
 } else {
     echo "<tr><td align=\"center\" class=\"rouge\">" . translate("No matches found to your query") . "<br />";
     echo "</td></tr>";
 }
 echo "</table>";
 $prev = $min - $offset;
 echo "<br /><p align=\"right\">";
Ejemplo n.º 13
0
    } else {
        $def_modifier = $def;
    }
    echo '
         <tr>
            <td valign="top" align="left"><strong>' . $def_modifier . '</strong></td>
            <td class="table-info" valign="top" align="left">' . $type_meta . '</td>';
    if ($type_meta == "smil") {
        eval($content);
        echo '
            <td valign="top" align="left">' . $cmd . '</td>
         </tr>';
    } else {
        if ($type_meta == "mot") {
            echo '
            <td valign="top" align="left">' . $content . '</td>
         </tr>';
        } else {
            echo '
            <td valign="top" align="left">' . split_string_without_space(aff_langue($description), 15) . '</td>
         </tr>';
        }
    }
    $ibid++;
}
echo '
         <tr><td colspan="3" >Meta-lang pour <a href="http://www.npds.org" >NPDS</a> ==> ' . $ibid . ' META(s)
            </td>
         </tr>
      </tbody>
   </table>';
Ejemplo n.º 14
0
function listdownloads($dcategory, $sortby, $sortorder)
{
    global $perpage, $page, $download_cat, $user;
    global $NPDS_Prefix;
    if ($dcategory == "") {
        $dcategory = addslashes($download_cat);
    }
    if (!$sortby) {
        $sortby = "dfilename";
    }
    if ($sortorder != "ASC" && $sortorder != "DESC") {
        $sortorder = "ASC";
    }
    echo '<p class="lead">';
    echo translate("Display filtered with") . "&nbsp;<i>";
    if ($dcategory == translate("All")) {
        echo translate("All");
    } else {
        echo aff_langue(stripslashes($dcategory));
    }
    echo "</i>&nbsp;&nbsp;" . translate("sorted by") . "&nbsp;";
    // Shiney SQL Injection 11/2011
    $sortby2 = "";
    if ($sortby == 'dfilename') {
        $sortby2 = translate("Name") . "";
    }
    if ($sortby == 'dfilesize') {
        $sortby2 = translate("File Size") . "";
    }
    if ($sortby == 'dcategory') {
        $sortby2 = translate("Category") . "";
    }
    if ($sortby == 'ddate') {
        $sortby2 = translate("Creation Date") . "";
    }
    if ($sortby == 'dver') {
        $sortby2 = translate("Version") . "";
    }
    if ($sortby == 'dcounter') {
        $sortby2 = translate("Downloads") . "";
    }
    // Shiney SQL Injection 11/2011
    if ($sortby2 == '') {
        $sortby = 'dfilename';
    }
    echo '&nbsp;' . translate("of") . '&nbsp;<i>' . $sortby2 . '</i>
  </p>';
    echo '<table class="table table-hover" id ="lst_downlo" data-toggle="table" data-striped="true" data-search="true" data-show-toggle="true" data-mobile-responsive="true" data-icons-prefix="fa" data-icons="icons">';
    sortlinks($dcategory, $sortby);
    echo '<tbody>';
    if ($dcategory == translate("All")) {
        $sql = "SELECT COUNT(*) FROM " . $NPDS_Prefix . "downloads";
    } else {
        $sql = "SELECT COUNT(*) FROM " . $NPDS_Prefix . "downloads WHERE dcategory='" . addslashes($dcategory) . "'";
    }
    $result = sql_query($sql);
    list($total) = sql_fetch_row($result);
    if ($total > $perpage) {
        $pages = ceil($total / $perpage);
        if ($page > $pages) {
            $page = $pages;
        }
        if (!$page) {
            $page = 1;
        }
        $offset = ($page - 1) * $perpage;
    } else {
        $offset = 0;
        $pages = 1;
        $page = 1;
    }
    settype($offset, "integer");
    settype($perpage, "integer");
    if ($dcategory == translate("All")) {
        $sql = "SELECT * FROM " . $NPDS_Prefix . "downloads ORDER BY {$sortby} {$sortorder} LIMIT {$offset},{$perpage}";
    } else {
        $sql = "SELECT * FROM " . $NPDS_Prefix . "downloads WHERE dcategory='" . addslashes($dcategory) . "' ORDER BY {$sortby} {$sortorder} LIMIT {$offset},{$perpage}";
    }
    $result = sql_query($sql);
    while (list($did, $dcounter, $durl, $dfilename, $dfilesize, $ddate, $dweb, $duser, $dver, $dcat, $ddescription, $dperm) = sql_fetch_row($result)) {
        $Fichier = new File($durl);
        // keep for extension
        $FichX = new FileManagement();
        // essai class
        $okfile = autorisation($dperm);
        echo '
         <tr>
            <td class="text-xs-center">';
        if ($okfile == true) {
            echo popuploader($did, $ddescription, $dcounter, $dfilename, true);
        } else {
            echo popuploader($did, $ddescription, $dcounter, $dfilename, false);
            echo '<span class="text-warning">' . translate("Private") . '</span>';
        }
        echo "</td><td class=\"text-xs-center\"><img src=\"" . $Fichier->Affiche_Extention() . "\" alt=\"" . $Fichier->Affiche_Extention() . "\" border=\"0\" /></td>\n           <td>";
        if ($okfile == true) {
            echo "<a href=\"download.php?op=mydown&amp;did={$did}\" target=\"_blank\">{$dfilename}</a>";
        } else {
            echo '...';
        }
        echo '</td>
            <td>';
        if ($dfilesize != 0) {
            //               echo $Fichier->Pretty_Size($dfilesize);
            echo $FichX->file_size_auto($durl, 2);
        } else {
            //               echo $Fichier->Affiche_Size();
            echo $FichX->file_size_auto($durl, 2);
        }
        echo '</td>
            <td>' . aff_langue(stripslashes($dcat)) . '</td>
            <td>' . convertdate($ddate) . '</td>
            <td class="text-xs-center">' . $dver . '</td>
            <td class="text-xs-center">' . wrh($dcounter) . '</td>
            <td>';
        if ($okfile == true and $user) {
            echo "<a href=\"download.php?op=broken&amp;did={$did}\" title=\"" . translate("Report Broken Link") . "\"><i class=\"fa fa-lg fa-chain-broken\"></i></a>";
        }
        echo '
            </td>
         </tr>';
    }
    echo '
      </tbody>
   </table>';
    $dcategory = StripSlashes($dcategory);
    echo '<ul class="pagination pagination-sm">';
    if ($pages > 1) {
        $pcnt = 1;
        if ($page > 1) {
            echo '
      <li class="page-item">
      <a class="page-link" href="download.php?dcategory=' . $dcategory . '&amp;sortby=' . $sortby . '&amp;sortorder=' . $sortorder . '&amp;page=' . ($page - 1) . '" aria-label="Previous" title="' . translate("Previous Page") . '">
        <span aria-hidden="true">&laquo;</span>
        <span class="sr-only">Previous</span>
      </a>
    </li>';
        }
        while ($pcnt < $page) {
            echo "<li class=\"page-item\"><a class=\"page-link\" href=\"download.php?dcategory={$dcategory}&amp;sortby={$sortby}&amp;sortorder={$sortorder}&amp;page={$pcnt}\">{$pcnt}</a></li>";
            $pcnt++;
        }
        echo '<li class="page-item active"><a class="page-link" href="#">' . $page . '</a></li>';
        $pcnt++;
        while ($pcnt <= $pages) {
            echo "<li class=\"page-item\"><a class=\"page-link\" href=\"download.php?dcategory={$dcategory}&amp;sortby={$sortby}&amp;sortorder={$sortorder}&amp;page={$pcnt}\">{$pcnt}</a></li>";
            $pcnt++;
        }
        if ($page < $pages) {
            echo "<li class=\"page-item\">\n      <a class=\"page-link\" href=\"download.php?dcategory={$dcategory}&amp;sortby={$sortby}&amp;sortorder={$sortorder}&amp;page=" . ($page + 1) . "\" aria-label=\"Next\" title=\"" . translate("Next Page") . "\">\n         <span aria-hidden=\"true\">&raquo;</span>\n         <span class=\"sr-only\">Next</span>\n      </a>\n      </li>\n";
        }
    }
    echo '</ul>';
}
Ejemplo n.º 15
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.º 16
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.º 17
0
function fab_espace_groupe($gr, $t_gr, $i_gr)
{
    global $NPDS_Prefix, $chat_info;
    $rsql = sql_fetch_assoc(sql_query("SELECT groupe_id, groupe_name, groupe_description, groupe_forum, groupe_mns, groupe_chat, groupe_blocnote, groupe_pad FROM " . $NPDS_Prefix . "groupes WHERE groupe_id='{$gr}'"));
    $content = '
   <script type="text/javascript">
   //<![CDATA[
   //==> chargement css
   if (!document.getElementById(\'bloc_ws_css\')) {
      var l_css = document.createElement(\'link\');
      l_css.href = "modules/groupe/bloc_ws.css";
      l_css.rel = "stylesheet";
      l_css.id = "bloc_ws_css";
      l_css.type = "text/css";
      document.getElementsByTagName("head")[0].appendChild(l_css);
   }
   //]]>
   </script>';
    $content .= '
   <div id="bloc_ws_' . $gr . '" class="">' . "\n";
    if ($t_gr == 1) {
        $content .= '<img src="images/admin/ws/groupe.gif" class="img-fluid mx-auto d-block rounded" title="ID:' . $gr . '" alt="' . translate("Group") . '" />  <span style="font-size: 120%; font-weight:bolder;">' . aff_langue($rsql['groupe_name']) . '</span>' . "\n";
    }
    $content .= '<p>' . aff_langue($rsql['groupe_description']) . '</p>' . "\n";
    if (file_exists('users_private/groupe/' . $gr . '/groupe.png') and $i_gr == 1) {
        $content .= '<img src="users_private/groupe/' . $gr . '/groupe.png" class="img-fluid mx-auto d-block rounded" alt="' . translate("Group") . '" />';
    }
    //=> liste des membres
    $li_mb = '';
    $li_ic = '';
    $result = sql_query("SELECT uid, groupe FROM " . $NPDS_Prefix . "users_status WHERE groupe REGEXP '[[:<:]]" . $gr . "[[:>:]]' ORDER BY uid ASC");
    $nb_mb = sql_num_rows($result);
    $li_mb .= '
      <div class="my-2">
      <a data-toggle="collapse" data-target="#lst_mb_ws_' . $gr . '" class="text-primary" id="show_lst_mb_ws_' . $gr . '" title="' . translate("Show list") . '"><i id="i_lst_mb_ws_' . $gr . '" class="toggle-icon fa fa-caret-down fa-2x" >&nbsp;</i></a><i class="fa fa-users fa-2x text-muted ml-1" title="' . translate("Group members list.") . '" data-toggle="tooltip"></i>&nbsp;<a href="memberslist.php?gr_from_ws=' . $gr . '" class="text-uppercase">' . translate("Members") . '</a><span class="tag tag-default float-xs-right">' . $nb_mb . '</span>';
    $tab = online_members();
    $li_mb .= '
         <ul id="lst_mb_ws_' . $gr . '" class="list-group ul_bloc_ws collapse">' . "\n";
    while (list($uid, $groupe) = sql_fetch_row($result)) {
        list($uname, $user_avatar, $mns, $url) = sql_fetch_row(sql_query("SELECT uname, user_avatar, mns, url FROM " . $NPDS_Prefix . "users WHERE uid='{$uid}'"));
        $conn = '<i class="fa fa-plug text-muted" title="' . $uname . ' ' . translate('is not connected !') . '" data-toggle="tooltip" ></i>';
        if (!$user_avatar) {
            $imgtmp = "images/forum/avatar/blank.gif";
        } else {
            if (stristr($user_avatar, "users_private")) {
                $imgtmp = $user_avatar;
            } else {
                if ($ibid = theme_image("forum/avatar/{$user_avatar}")) {
                    $imgtmp = $ibid;
                } else {
                    $imgtmp = "images/forum/avatar/{$user_avatar}";
                }
                if (!file_exists($imgtmp)) {
                    $imgtmp = "images/forum/avatar/blank.gif";
                }
            }
        }
        $timex = false;
        for ($i = 1; $i <= $tab[0]; $i++) {
            if ($tab[$i]['username'] == $uname) {
                $timex = time() - $tab[$i]['time'];
            }
        }
        if ($timex !== false and $timex < 60) {
            $conn = '<i class="fa fa-plug faa-flash animated text-primary" title="' . $uname . ' ' . translate('is connected !') . '" data-toggle="tooltip" ></i>';
        }
        $li_ic .= '<img class="n-smil" src="' . $imgtmp . '" alt="avatar" />&nbsp;';
        $li_mb .= '
      <li class="list-group-item list-group-item-action li_mb">
      <div id="li_mb_' . $uname . '_' . $gr . '">' . $conn . '   <a href="user.php?op=userinfo&uname=' . $uname . '" class="tooltip_ws"><em style="width:90px"><img src="' . $imgtmp . '" height="80" width="80" alt="avatar" /></em><img class="n-smil" src="' . $imgtmp . '" alt="avatar" title="' . $uname . '" data-toggle="tooltip" data-placement="right" />&nbsp;' . $uname . '</a>
      </div><br />
      <span class="float-xs-right">
      <a href="powerpack.php?op=instant_message&amp;to_userid=' . $uname . '" title="' . translate("Send internal Message") . '" data-toggle="tooltip" data-placement="right"><i class="fa fa-envelope-o fa-lg ml-0.5"></i></a>' . "\n";
        if ($url != '') {
            $li_mb .= '<a href="' . $url . '" target="_blank" title="' . translate("Visit this Website") . '" data-toggle="tooltip" data-placement="right"><i class="fa fa-external-link fa-lg ml-1"></i></a>';
        }
        if ($mns == 1) {
            $li_mb .= '<a href="minisite.php?op=' . $uname . '" target="_blank" title="' . translate("Visit the Mini Web Site !") . '" data-toggle="tooltip" data-placement="right" ><i class="fa fa-desktop fa-lg ml-1"></i></a>';
        }
        $li_mb .= '
      </span><span class="clearfix"></span>
      </li>';
    }
    $li_mb .= '
         <li style="clear:left;line-height:6px; background:none;">&nbsp;</li>
         <li class="list-group-item" style="clear:left;line-height:24px;padding:6px; margin-top:0px;">' . $li_ic . '</li>
      </ul>
   </div>';
    $content .= $li_mb;
    //<== liste des membres
    //=> Forum
    $lst_for = '';
    if ($rsql['groupe_forum'] == 1) {
        $res_forum = sql_query("SELECT forum_id, forum_name FROM " . $NPDS_Prefix . "forums WHERE forum_pass REGEXP '{$gr}'");
        $nb_foru = sql_num_rows($res_forum);
        if ($nb_foru >= 1) {
            $lst_for_tog = '<a data-toggle="collapse" data-target="#lst_for_gr_' . $gr . '" class="text-primary" id="show_lst_for_' . $gr . '" title="' . translate("Show list") . '" ><i id="i_lst_for_gr_' . $gr . '" class="toggle-icon fa fa-caret-down fa-2x" >&nbsp;</i></a>';
            $lst_for .= '<ul id="lst_for_gr_' . $gr . '" class="ul_bloc_ws collapse" style ="list-style-type:none;">';
            $nb_for_gr = '  <span class="tag tag-default float-xs-right">' . $nb_foru . '</span>';
            while (list($id_fo, $fo_name) = sql_fetch_row($res_forum)) {
                $lst_for .= '
            <li class="list-group-item list-group-item-action"><a href="viewforum.php?forum=' . $id_fo . '">' . $fo_name . '</a></li>';
            }
            $lst_for .= '</ul>';
        }
        $content .= '
      <hr /><div class="">' . $lst_for_tog . '<i class="fa fa-list-alt fa-2x text-muted ml-1" title="' . translate("Group") . '(' . $gr . '): ' . translate("forum") . '." data-toggle="tooltip" ></i>&nbsp;<a class="text-uppercase" href="forum.php">' . translate("Forum") . '</a>' . $nb_for_gr . $lst_for . '</div>' . "\n";
    }
    //<= Forum
    //=> wspad
    if ($rsql['groupe_pad'] == 1) {
        settype($lst_doc, 'string');
        settype($nb_doc_gr, 'string');
        settype($lst_doc_tog, 'string');
        include "modules/wspad/config.php";
        $docs_gr = sql_query("SELECT page, editedby, modtime, ranq FROM " . $NPDS_Prefix . "wspad WHERE (ws_id) IN (SELECT MAX(ws_id) FROM " . $NPDS_Prefix . "wspad WHERE member='{$gr}' GROUP BY page) ORDER BY page ASC");
        $nb_doc = sql_num_rows($docs_gr);
        if ($nb_doc >= 1) {
            $lst_doc_tog = '<a data-toggle="collapse" data-target="#lst_doc_gr_' . $gr . '" class="text-primary" id="show_lst_doc_' . $gr . '" title="' . translate("Show list") . '"><i id="i_lst_doc_gr_' . $gr . '" class="toggle-icon fa fa-caret-down fa-2x" >&nbsp;</i></a>';
            $lst_doc .= '
         <ul id="lst_doc_gr_' . $gr . '" class="list-group ul_bloc_ws mt-1 collapse">';
            $nb_doc_gr = '  <span class="tag tag-default float-xs-right">' . $nb_doc . '</span>';
            while (list($p, $e, $m, $r) = sql_fetch_row($docs_gr)) {
                $surlignage = $couleur[hexfromchr($e)];
                $lst_doc .= '
            <li class="list-group-item list-group-item-action" style="line-height:14px;"><div id="last_editor_' . $p . '" data-toggle="tooltip" data-placement="right" title="' . translate("Last editor") . ' : ' . $e . ' ' . date(translate("dateinternal"), $m) . '" style="float:left; width:1rem; height:1rem; background-color:' . $surlignage . '"></div><i class="fa fa-edit text-muted mx-1" data-toggle="tooltip" title="' . translate("Multi-writers document") . '." ></i><a href="modules.php?ModPath=wspad&amp;ModStart=wspad&amp;op=relo&amp;page=' . $p . '&amp;member=' . $gr . '&amp;ranq=' . $r . '">' . $p . '</a></li>';
            }
            $lst_doc .= '
         </ul>';
        }
        $content .= '
      <hr /><div class="">' . $lst_doc_tog . '<i class="fa fa-edit fa-2x text-muted ml-1" title="' . translate("Co-writing") . '" data-toggle="tooltip" data-placement="right"></i>&nbsp;<a class="text-uppercase" href="modules.php?ModPath=wspad&ModStart=wspad&member=' . $gr . '" >' . translate("Co-writing") . '</a>' . $nb_doc_gr . $lst_doc . '</div>' . "\n";
    }
    //<= wspad
    //=> bloc-notes
    if ($rsql['groupe_blocnote'] == 1) {
        settype($lst_blocnote_tog, 'string');
        settype($lst_blocnote, 'string');
        include_once "modules/bloc-notes/bloc-notes.php";
        $lst_blocnote_tog = '<a data-toggle="collapse" data-target="#lst_blocnote_' . $gr . '" class="text-primary" id="show_lst_blocnote" title="' . translate("Show list") . '"><i id="i_lst_blocnote" class="toggle-icon fa fa-caret-down fa-2x" >&nbsp;</i></a><i class="fa fa-sticky-note-o fa-2x text-muted ml-1"></i>&nbsp;<span class="text-uppercase">Bloc note</span>';
        $lst_blocnote = '
      <div id="lst_blocnote_' . $gr . '" class="mt-1 collapse">
      ' . blocnotes("shared", "WS-BN" . $gr, "100%", "7", "", false) . '
      </div>';
        $content .= '<hr /><div class="mb-2">' . $lst_blocnote_tog . $lst_blocnote . '</div>';
    }
    //=> bloc-notes
    $content .= '<div class="card card-block text-muted text-xs-center">';
    //=> Filemanager
    if (file_exists('modules/f-manager/users/groupe_' . $gr . '.conf.php')) {
        $content .= '<a class="mr-1" href="modules.php?ModPath=f-manager&amp;ModStart=f-manager&amp;FmaRep=groupe_' . $gr . '" title="' . translate("File manager") . '" data-toggle="tooltip" data-placement="right"><i class="fa fa-folder fa-2x"></i></a>' . "\n";
    }
    //<= Filemanager
    //=> Minisite
    if ($rsql['groupe_mns'] == 1) {
        $content .= '<a class="mr-1" href="minisite.php?op=groupe/' . $gr . '" target="_blank" title= "' . translate("Mini-Web site") . '" data-toggle="tooltip" data-placement="right"><i class="fa fa-desktop fa-2x"></i></a>';
    }
    //<= Minisite
    //=> Chat
    if ($rsql['groupe_chat'] == 1) {
        $PopUp = JavaPopUp("chat.php?id={$gr}&amp;auto=" . encrypt(serialize($gr)), "chat" . $gr, 380, 480);
        if ($chat_info) {
            $chat_img = 'images/admin/ws/comment_reply.gif';
        } else {
            $chat_img = 'images/admin/ws/comment_user.gif';
        }
        $content .= '<a class="mr-1" href="javascript:void(0);" onclick="window.open(' . $PopUp . ');" title="' . translate("Open a chat for the group.") . '" data-toggle="tooltip" data-placement="right" ><i class="fa fa-comments fa-2x"></i></a>';
    }
    //<= Chat
    //=> admin
    if (autorisation(-127)) {
        $content .= '<a class="mr-1" href="admin.php?op=groupes" ><i title="' . translate("Groups setting.") . '" data-toggle="tooltip" class="fa fa-cogs fa-2x"></i></a>';
    }
    //<= admin
    $content .= '</div>
   </div>';
    return $content;
}
Ejemplo n.º 18
0
function SendStory($sid, $yname, $ymail, $fname, $fmail, $archive, $asb_question, $asb_reponse)
{
    global $user;
    if (!$user) {
        //anti_spambot
        if (!R_spambot($asb_question, $asb_reponse, '')) {
            Ecr_Log('security', "Send-Story Anti-Spam : name=" . $yname . " / mail=" . $ymail, '');
            redirect_url("index.php");
            die;
        }
    }
    global $sitename, $nuke_url;
    global $NPDS_Prefix;
    settype($sid, 'integer');
    settype($archive, 'integer');
    $result2 = sql_query("SELECT title, time, topic FROM " . $NPDS_Prefix . "stories WHERE sid='{$sid}'");
    list($title, $time, $topic) = sql_fetch_row($result2);
    $result3 = sql_query("SELECT topictext FROM " . $NPDS_Prefix . "topics WHERE topicid='{$topic}'");
    list($topictext) = sql_fetch_row($result3);
    $subject = translate("Interesting Article at") . " {$sitename}";
    $fname = removeHack($fname);
    $message = "" . translate("Hello") . " {$fname} :\n\n" . translate("Your Friend") . " {$yname} " . translate("considered the following article interesting and wanted to send it to you.") . "\n\n" . aff_langue($title) . "\n" . translate("Date:") . " {$time}\n" . translate("Topic:") . " " . aff_langue($topictext) . "\n\n" . translate("The Article") . " : <a href=\"{$nuke_url}/article.php?sid={$sid}&amp;archive={$archive}\">{$nuke_url}/article.php?sid={$sid}&amp;archive={$archive}</a>\n\n";
    include "signat.php";
    $fmail = removeHack($fmail);
    $subject = removeHack($subject);
    $message = removeHack($message);
    $yname = removeHack($yname);
    $ymail = removeHack($ymail);
    $stop = false;
    if (!$fmail || $fmail == "" || !preg_match('#^[_\\.0-9a-z-]+@[0-9a-z-\\.]+\\.+[a-z]{2,4}$#i', $fmail)) {
        $stop = true;
    }
    if (!$ymail || $ymail == "" || !preg_match('#^[_\\.0-9a-z-]+@[0-9a-z-\\.]+\\.+[a-z]{2,4}$#i', $ymail)) {
        $stop = true;
    }
    if (!$stop) {
        send_email($fmail, $subject, $message, $ymail, false, 'html');
    } else {
        $title = '';
        $fname = '';
    }
    $title = urlencode(aff_langue($title));
    $fname = urlencode($fname);
    Header("Location: friend.php?op=StorySent&title={$title}&fname={$fname}");
}
Ejemplo n.º 19
0
if (!isset($C2)) {
    $C2 = '';
}
if (!isset($T1)) {
    $T1 = '';
}
if (!isset($M2)) {
    $M2 = '';
}
$m->add_comment(aff_langue('<div class="row"><p class="lead">[french]En savoir plus[/french][english]More[/english]</p></div>'));
$m->add_field('C1', aff_langue('[french]Activit&#x00E9; professionnelle[/french][english]Professional activity[/english]'), $C1, 'text', false, 100, '', '');
$m->add_extender('C1', '', '<span class="help-block"><span class="float-xs-right" id="countcar_C1"></span></span>');
$m->add_field('C2', aff_langue('[french]Code postal[/french][english]Postal code[/english]'), $C2, 'text', false, 5, '', '');
$m->add_extender('C2', '', '<span class="help-block"><span class="float-xs-right" id="countcar_C2"></span></span>');
$m->add_date('T1', aff_langue('[french]Date de naissance[/french][english]Birth date[/english]'), $T1, 'date', '', false, 20);
$m->add_extender('T1', '', '<span class="help-block">JJ/MM/AAAA</span>');
$m->add_extra('<div class="form-group row collapse">');
$m->add_field('M2', "R&#x00E9;seaux sociaux", $M2, 'text', false);
$m->add_extra('</div>');
$m->add_comment(aff_langue('<div class="row"><p class="lead"><a href="modules.php?ModPath=geoloc&amp;ModStart=geoloc"><i class="fa fa-map-marker fa-2x" title="[french]Modifier ou d&#xE9;finir votre position[/french][english]Define or change your geolocation[/english][chinese]Define or change your geolocation[/chinese]" data-toggle="tooltip"></i></a>&nbsp;[french]G&#xE9;olocalisation[/french][english]Geolocation[/english][chinese][/chinese][spanish][/spanish]</p></div>'));
$m->add_field('C7', aff_langue('[french]Latitude[/french][english]Latitude[/english][chinese]&#x7ECF;&#x5EA6;[/chinese]'), $C7, 'text', false);
$m->add_field('C8', aff_langue('[french]Longitude[/french][english]Longitude[/english][chinese]&#x7EAC;&#x5EA6;[/chinese]'), $C8, 'text', false);
// Si vous avez besoin des champs ci-dessous - les définir selon vos besoins - sinon les laisser en hidden
$m->add_field('C3', 'C3', '', 'hidden', false);
$m->add_field('C4', 'C4', '', 'hidden', false);
$m->add_field('C5', 'C5', '', 'hidden', false);
$m->add_field('C6', 'C6', '', 'hidden', false);
// idem pour les champ Mx
$m->add_field('M1', 'M1', '', 'hidden', false);
$m->add_field('T2', 'T2', '', 'hidden', false);
// Les champ B1 et M2 sont utilisé par NPDS dans le cadre des fonctions USERs
Ejemplo n.º 20
0
     }
     $printP = "<a href=\"print.php?sid={$s_sid}&amp;archive={$arch}\"><img src=\"" . $imgtmpP . "\" border=\"0\" alt=\"" . translate("Printer Friendly Page") . "\" /></a>&nbsp;";
     $sendF = "<a href=\"friend.php?op=FriendSend&amp;sid={$s_sid}&amp;archive={$arch}\"><img src=\"" . $imgtmpF . "\" border=\"0\" alt=\"" . translate("Send this Story to a Friend") . "\" /></a>";
     $sid = $s_sid;
     if ($catid != 0) {
         $resultm = sql_query("SELECT title FROM " . $NPDS_Prefix . "stories_cat WHERE catid='{$catid}'");
         list($title1) = sql_fetch_row($resultm);
         $title = "<a href=\"article.php?sid={$sid}&amp;archive={$arch}\" class=\"noir\">{$title}</a> [ <a href=\"index.php?op=newindex&amp;catid={$catid}\" class=\"ongl\">{$title1}</a> ]";
     }
     setlocale(LC_TIME, aff_langue($locale));
     preg_match('#^(\\d{4})-(\\d{1,2})-(\\d{1,2}) (\\d{1,2}):(\\d{1,2}):(\\d{1,2})$#', $time, $datetime);
     $datetime = strftime("%d-%m-%Y %H:%M:%S", mktime($datetime[4] + $gmt, $datetime[5], $datetime[6], $datetime[2], $datetime[3], $datetime[1]));
     if (cur_charset != "utf-8") {
         $datetime = ucfirst($datetime);
     }
     echo "<tr align=\"center\">\n        <td align=\"left\" width=\"50%\"><a href=\"article.php?sid={$sid}&amp;archive={$arch}\" class=\"noir\">" . aff_langue($title) . "</a></td>\n        <td align=\"center\">{$counter}</td>\n        <td align=\"center\" width=\"25%\">{$datetime}</td>\n        <td align=\"left\"><a href=\"user.php?op=userinfo&amp;uname={$informant}\" class=\"noir\">{$informant}</a></td>\n        <td align=\"center\">{$printP}&nbsp;{$sendF}</td>\n        </tr>";
 }
 echo '
      </tbody>
   </table><br />';
 $start = $start + $maxcount - 1;
 if ($count - $start > 0) {
     if ($ibid = theme_image("box/right.gif")) {
         $imgtmp = $ibid;
     } else {
         $imgtmp = "images/download/right.gif";
     }
     echo "<a href=\"modules.php?ModPath=archive-stories&amp;ModStart=archive-stories&amp;start={$start}&amp;count={$count}\" class=\"noir\">" . translate("next matches") . " <img src=\"" . $imgtmp . "\" border=\"0\" align=\"center\" alt=\"\" /></a>";
 }
 echo "<p align=\"center\"><br />" . translate("Nb of articles") . " : {$count} - [ <a href=\"modules.php?ModPath=archive-stories&amp;ModStart=archive-stories\" class=\"noir\">" . translate("Go Back") . "</a> ]</p>";
 closetable();
Ejemplo n.º 21
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.º 22
0
function Liste_Page()
{
    global $NPDS_Prefix, $ModPath, $ModStart, $ThisFile, $gmt, $auteur, $groupe, $couleur;
    echo '
   <script type="text/javascript">
   //<![CDATA[
   function confirm_deletedoc(page, gp) {
      var xhr_object = null;
      if (window.XMLHttpRequest) // FF
         xhr_object = new XMLHttpRequest();
      else if(window.ActiveXObject) // IE
         xhr_object = new ActiveXObject("Microsoft.XMLHTTP");
      if (confirm("' . wspad_trans("Vous allez supprimer le document") . ' : "+page)) {
         xhr_object.open("GET", location.href="modules.php?ModPath=' . $ModPath . '&ModStart=' . $ModStart . '&op=suppdoc&page="+page+"&member="+gp, false);
      }
   }
   //]]>
   </script>';
    $aff = '
   <h3><a class="arrow-toggle text-primary" id="show_cre_page" data-toggle="collapse" data-target="#cre_page" title="' . wspad_trans("Déplier la liste") . '"><i id="i_cre_page" class="toggle-icon fa fa-caret-down fa-lg" ></i></a>&nbsp;' . wspad_trans("Créer un document") . '</h3>
   <div id="cre_page" class="collapse" style ="padding-left:10px;">
      <form action="modules.php?ModPath=' . $ModPath . '&amp;ModStart=' . $ModStart . '&amp;member=' . $groupe . '" method="post" name="wspadformfic">
         <div class="form-group row">
            <label class="form-control-label col-sm-4" for="page">' . wspad_trans("Nom du document") . '</label>
            <div class="col-sm-8">
               <input class="form-control" type="text" name="page" size="30" maxlength="255" value="" />
               <span class="help-block small">' . wspad_trans("Caractères autorisés : a-z, A-Z, 0-9, -_.") . '</span>
            </div>
         </div>
         <div class="form-group row">
            <div class="col-sm-8 offset-sm-4">
               <input class="btn btn-primary" type="submit" name="creer" value="' . wspad_trans("Créer") . '" />
               <input type="hidden" name="op" value="creer" />
            </div>
         </div>
      </form>
   </div>';
    echo $aff . '<br />';
    $aff = '
   <h3><a class="arrow-toggle text-primary" id="show_paddoc" data-toggle="collapse" data-target="#lst_paddoc" title="' . wspad_trans("Déplier la liste") . '">&nbsp;<i id="i_lst_paddoc" class="toggle-icon fa fa-caret-down fa-lg" ></i></a>&nbsp;';
    $nb_pages = sql_num_rows(sql_query("SELECT COUNT(page) FROM " . $NPDS_Prefix . "wspad WHERE member='{$groupe}' GROUP BY page"));
    if ($groupe > 0) {
        $gp = sql_fetch_assoc(sql_query("SELECT groupe_name FROM " . $NPDS_Prefix . "groupes WHERE groupe_id='{$groupe}'"));
        $aff .= $nb_pages . ' ' . wspad_trans("Document(s) et révision(s) disponible(s) pour le groupe") . " " . aff_langue($gp['groupe_name']) . " [{$groupe}]</h3>";
    } else {
        $aff .= $nb_pages . ' ' . wspad_trans("Document(s) et révision(s) disponible(s) pour les administrateurs") . "</strong><br />";
    }
    $aff .= '<div id="lst_paddoc" class="collapse" style =" padding-left:10px;">';
    if ($nb_pages > 0) {
        $ibid = 0;
        $pgibid = 0;
        $result = sql_query("SELECT DISTINCT page FROM " . $NPDS_Prefix . "wspad WHERE member='{$groupe}' ORDER BY page ASC");
        while (list($page) = sql_fetch_row($result)) {
            // Supression des verrous de mon groupe
            clearstatcache();
            $refresh = 15;
            $filename = "modules/{$ModPath}/locks/{$page}-vgp-{$groupe}.txt";
            if (file_exists($filename)) {
                if (time() - $refresh > filemtime($filename)) {
                    sql_query("UPDATE " . $NPDS_Prefix . "wspad SET verrou='' WHERE page='{$page}' and member='{$groupe}'");
                    @unlink($filename);
                    $verrou = '';
                }
            }
            // Supression des verrous de mon groupe
            $pgibid = $pgibid + 1;
            $aff .= '
         <div class="modal fade" id="renomeModal_' . $page . '" tabindex="-1" role="dialog" aria-labelledby="Login" aria-hidden="true">
            <div class="modal-dialog">
               <div class="modal-content">
                  <div class="modal-header">
                     <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                        <span aria-hidden="true">&times;</span>
                     </button>
                     <h5 class="modal-title">' . $page . '</h5>
                  </div>
                  <div class="modal-body">
                     <!-- The form is placed inside the body of modal -->
                     <form id="renameForm" method="post" class="form-horizontal" name="wspadformfic">
                        <div class="form-group row">
                           <label class="col-xs-3 control-label">Nouveau nom</label>
                           <div class="col-xs-9">
                              <input type="text" class="form-control" name="newpage" />
                              <span class="help-block" >' . wspad_trans("Caractères autorisés : a-z, A-Z, 0-9, -_.") . '</span>
                           </div>
                        </div>
                        <div class="form-group row">
                           <div class="col-sm-9 offset-sm-3">
                              <input type="hidden" name="page" value="' . $page . '" />
                              <input type="hidden" name="op" value="renomer" />
                              <button type="submit" class="btn btn-primary" name="creer">' . wspad_trans("Renommer") . '</button>
                              <button type="button" class="btn btn-secondary" data-dismiss="modal">' . wspad_trans("Cancel") . '</button>
                           </div>
                        </div>
                     </form>
                  </div>
               </div>
            </div>
         </div>';
            $aff .= '
         <hr />
         <h4><a class="arrow-toggle text-primary" id="show_lst_page_' . $pgibid . '" data-toggle="collapse" data-target="#lst_page_' . $pgibid . '" title="' . wspad_trans("Déplier la liste") . '"><i id="i_lst_page_' . $pgibid . '" class="fa fa-caret-down fa-lg" ></i></a>&nbsp;' . $page . '
            <span class="float-xs-right">
               <a href="#" data-toggle="modal" data-target="#renomeModal_' . $page . '" ><i class="fa fa-edit " title="' . wspad_trans("Renommer le document et toutes ses révisions") . '" data-toggle="tooltip"></i></a>&nbsp;
               <a class="text-danger" href="javascript:" onclick="confirm_deletedoc(\'' . $page . '\',\'' . $groupe . '\');" title="' . wspad_trans("Supprimer le document et toutes ses révisions") . '" data-toggle="tooltip"><i class="fa fa-trash-o"></i></a>&nbsp;
            </span>
         </h4>
         <div id="lst_page_' . $pgibid . '" class="collapse" style ="padding-left:10px;">';
            $result2 = sql_query("SELECT modtime, editedby, ranq, verrou FROM " . $NPDS_Prefix . "wspad WHERE page='{$page}' AND member='{$groupe}' ORDER BY ranq ASC");
            $aff .= '
         <table class=" table-sm" data-toggle="table" data-striped="true">
            <thead>
               <tr>
                  <th data-sortable="true" data-halign="center" data-align="right">' . wspad_trans("Rev.") . '</th>
                  <th data-sortable="true" data-halign="center">' . wspad_trans("Auteur") . '</th>
                  <th data-sortable="true" data-halign="center" data-align="right">' . wspad_trans("Date") . '</th>';
            $act = 0;
            while (list($modtime, $editedby, $ranq, $verrou) = sql_fetch_row($result2)) {
                if ($act == 0) {
                    if ($auteur == $verrou or $verrou == '') {
                        $aff .= '
                  <th data-halign="center" data-align="right">' . wspad_trans("Actions") . '</th>';
                        $divid = uniqid(mt_rand());
                        $aff .= '
               </tr>
               </thead>
               <tbody>';
                    } else {
                        $aff .= '
                  <th>&nbsp;</th>
               </tr>
               </thead>
               <tbody>';
                    }
                    $act = 1;
                }
                if ($ranq >= 100) {
                    $ibid = '';
                } elseif ($ranq < 100 and $ranq >= 10) {
                    $ibid = '0';
                } else {
                    $ibid = '00';
                }
                $aff .= '
               <tr>
                  <td>' . $ibid . $ranq . '</td>
                  <td><div style="float: left; margin-top: 2px; width: 1rem; height: 1.5rem; background-color: ' . $couleur[hexfromchr($editedby)] . ';"></div>&nbsp;' . $editedby . '</td>
                  <td>' . date(translate("dateinternal"), $modtime + $gmt * 3600) . '</td>';
                // voir la révision du ranq x
                $PopUp = JavaPopUp("modules.php?ModPath={$ModPath}&amp;ModStart=preview&amp;pad=" . encrypt($page . "#wspad#" . $groupe . "#wspad#" . $ranq), "NPDS_wspad", 500, 400);
                $aff .= '
                  <td>
                     <a href="javascript:void(0);" onclick="window.open(' . $PopUp . ');" title="' . wspad_trans("Prévisualiser") . '" data-toggle="tooltip" data-placement="left"><img src="modules/' . $ModPath . '/images/preview.gif" /></a>&nbsp';
                if ($auteur == $verrou or $verrou == '') {
                    // recharger la révision du ranq x
                    $aff .= '
                     <a href="' . $ThisFile . '&amp;op=relo&amp;page=' . urlencode($page) . '&amp;member=' . $groupe . '&amp;ranq=' . $ranq . '" title="' . wspad_trans("Choisir") . '" data-toggle="tooltip" data-placement="left"><img src="modules/' . $ModPath . '/images/reload.gif" /></a>&nbsp';
                    // supprimer la révision du ranq x
                    $aff .= '
                     <a href="' . $ThisFile . '&amp;op=supp&amp;page=' . urlencode($page) . '&amp;member=' . $groupe . '&amp;ranq=' . $ranq . '" title="' . wspad_trans("Supprimer la révision") . '" data-toggle="tooltip" data-placement="left"><img src="modules/' . $ModPath . '/images/delete.gif" /></a>&nbsp';
                    // exporter la révision du ranq x
                    $PopUp = JavaPopUp("modules.php?ModPath={$ModPath}&amp;ModStart=export&amp;type=doc&amp;pad=" . encrypt($page . "#wspad#" . $groupe . "#wspad#" . $ranq), "NPDS_wspad", 5, 5);
                    $aff .= '
                     <a href="javascript:void(0);" onclick="window.open(' . $PopUp . ');" title="' . wspad_trans("Exporter .doc") . '" data-toggle="tooltip" data-placement="left"><img src="modules/' . $ModPath . '/images/export.gif" /></a>&nbsp';
                    // exporter en article
                    $aff .= '
                     <a href="' . $ThisFile . '&amp;op=conv_new&amp;page=' . urlencode($page) . '&amp;member=' . $groupe . '&amp;ranq=' . $ranq . '" title="' . wspad_trans("Transformer en New") . '" data-toggle="tooltip" data-placement="left"><img src="modules/' . $ModPath . '/images/news.gif" /></a>
                  </td>';
                } else {
                    $aff .= '
                  <td>' . wspad_trans("Verrouillé par : ") . $verrou . '</td>';
                }
                $aff .= '
               </tr>';
            }
            $aff .= '
            </tbody>
         </table>';
            $aff .= '
         </div>';
        }
    }
    echo $aff . '
   </div>
   <br />';
}
Ejemplo n.º 23
0
function member_qualif($poster, $posts, $rank)
{
    global $anonymous;
    $tmp = '';
    if ($ibid = theme_image('forum/rank/post.gif')) {
        $imgtmpP = $ibid;
    } else {
        $imgtmpP = 'images/forum/rank/post.gif';
    }
    if ($ibid = theme_image('forum/rank/level.gif')) {
        $imgtmpN = $ibid;
    } else {
        $imgtmpN = 'images/forum/rank/level.gif';
    }
    $tmp = '<img class="n-smil" src="' . $imgtmpP . '" alt="" />' . $posts . '&nbsp;';
    if ($poster != $anonymous) {
        $nux = 0;
        if ($posts >= 10 and $posts < 30) {
            $nux = 1;
        }
        if ($posts >= 30 and $posts < 100) {
            $nux = 2;
        }
        if ($posts >= 100 and $posts < 300) {
            $nux = 3;
        }
        if ($posts >= 300 and $posts < 1000) {
            $nux = 4;
        }
        if ($posts >= 1000) {
            $nux = 5;
        }
        for ($i = 0; $i < $nux; $i++) {
            $tmp .= '<i class="fa fa-star-o text-success"></i>&nbsp;';
        }
        if ($rank) {
            if ($ibid = theme_image("forum/rank/" . $rank . ".gif")) {
                $imgtmpA = $ibid;
            } else {
                $imgtmpA = "images/forum/rank/" . $rank . ".gif";
            }
            $rank = 'rank' . $rank;
            global ${$rank};
            $tmp .= '<br /><img src="' . $imgtmpA . '" border="" alt="" />&nbsp;' . aff_langue(${$rank});
        }
    }
    return $tmp;
}
Ejemplo n.º 24
0
     if ($smilies) {
         if ($myrow['msg_image'] != "") {
             if ($ibid = theme_image("forum/subject/" . $myrow['msg_image'])) {
                 $imgtmp = $ibid;
             } else {
                 $imgtmp = "images/forum/subject/" . $myrow['msg_image'];
             }
             echo "<td width=\"5%\" align=\"center\"><img class=\"smil\" src=\"{$imgtmp}\" alt=\"\" border=\"0\" /></td>";
         } else {
             echo '<td width="5%" align="center">&nbsp;</td>';
         }
     }
     $myrow['subject'] = strip_tags($myrow['subject']);
     $posterdata = get_userdata_from_id($myrow['to_userid']);
     echo "<td align=\"center\" width=\"10%\"><a href=\"readpmsg.php?start={$count}&amp;total_messages={$total_messages}&amp;type=outbox\" class=\"noir\">" . $posterdata['uname'] . "</a></td>";
     echo "<td>" . aff_langue($myrow['subject']) . "</td>";
     echo "<td align=\"center\" width=\"20%\">" . $myrow['msg_time'] . "</td></tr>";
     $count++;
 }
 if ($display) {
     echo '
      <tr class="table-danger">
         <td colspan="6"><button class="btn btn-danger-outline btn-sm" type="submit" name="delete_messages" value="delete_messages" >' . translate("Delete") . '</button></td>
      </tr>
      <input type="hidden" name="total_messages" value="' . $total_messages . '" />
      <input type="hidden" name="type" value="outbox" />';
 }
 echo '
      </tbody>
      </table>
   </form>
Ejemplo n.º 25
0
function reviews($field, $order)
{
    global $NPDS_Prefix;
    include 'header.php';
    $result = sql_query("SELECT title, description FROM " . $NPDS_Prefix . "reviews_main");
    list($title, $description) = sql_fetch_row($result);
    echo '
   <h2>' . translate("Reviews") . '</h2>
   <h3>' . aff_langue($title) . '</h3>
   <p class="lead">' . aff_langue($description) . '</p>
   <h4><a href="reviews.php?op=write_review"><i class="fa fa-edit"></i></a>&nbsp;' . translate("Write a Review") . '</h4><br />';
    if ($order != "ASC" and $order != "DESC") {
        $order = "ASC";
    }
    switch ($field) {
        case "reviewer":
            $result = sql_query("SELECT id, title, hits, reviewer, score, date FROM " . $NPDS_Prefix . "reviews ORDER by reviewer {$order}");
            break;
        case "score":
            $result = sql_query("SELECT id, title, hits, reviewer, score, date FROM " . $NPDS_Prefix . "reviews ORDER by score {$order}");
            break;
        case "hits":
            $result = sql_query("SELECT id, title, hits, reviewer, score, date FROM " . $NPDS_Prefix . "reviews ORDER by hits {$order}");
            break;
        case "date":
            $result = sql_query("SELECT id, title, hits, reviewer, score, date FROM " . $NPDS_Prefix . "reviews ORDER by id {$order}");
            break;
        default:
            $result = sql_query("SELECT id, title, hits, reviewer, score, date FROM " . $NPDS_Prefix . "reviews ORDER by title {$order}");
            break;
    }
    $numresults = sql_num_rows($result);
    if ($numresults > 0) {
        echo '
      <table class="" 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-align="center" data-sortable="true">
                  <a href="reviews.php?op=sort&amp;field=date&amp;order=ASC"><i class="fa fa-sort-amount-asc"></i></a> ' . translate("Date") . ' <a href="reviews.php?op=sort&amp;field=date&amp;order=DESC"><i class="fa fa-sort-amount-desc"></i></a>
               </th>
               <th data-align="center" data-sortable="true">
                  <a href="reviews.php?op=sort&amp;field=title&amp;order=ASC"><i class="fa fa-sort-amount-asc"></i></a> ' . translate("Title") . ' <a href="reviews.php?op=sort&amp;field=title&amp;order=DESC"><i class="fa fa-sort-amount-desc"></i></a>
               </th>
               <th data-align="center" data-sortable="true">
                  <a href="reviews.php?op=sort&amp;field=reviewer&amp;order=ASC"><i class="fa fa-sort-amount-asc"></i></a> ' . translate("Posted by") . ' <a href="reviews.php?op=sort&amp;field=reviewer&amp;order=DESC"><i class="fa fa-sort-amount-desc"></i></a>
               </th>
               <th data-align="center" data-sortable="true">
                  <a href="reviews.php?op=sort&amp;field=score&amp;order=ASC"><i class="fa fa-sort-amount-asc"></i></a> Score <a href="reviews.php?op=sort&amp;field=score&amp;order=DESC"><i class="fa fa-sort-amount-desc"></i></a>
               </th>
               <th data-align="right" data-sortable="true">
                  <a href="reviews.php?op=sort&amp;field=hits&amp;order=ASC"><i class="fa fa-sort-amount-asc"></i></a> Hits <a href="reviews.php?op=sort&amp;field=hits&amp;order=DESC"><i class="fa fa-sort-amount-desc"></i></a>
               </th>
            </tr>
      </thead>
      <tbody>';
        while ($myrow = sql_fetch_assoc($result)) {
            $title = $myrow["title"];
            $id = $myrow["id"];
            $reviewer = $myrow["reviewer"];
            $score = $myrow["score"];
            $hits = $myrow["hits"];
            $date = $myrow["date"];
            echo '
            <tr>
               <td>' . f_date($date) . '</td>
               <td><a href="reviews.php?op=showcontent&amp;id=' . $id . '">' . $title . '</a></td>
               <td>';
            if ($reviewer != '') {
                echo $reviewer;
            }
            echo '</td>
               <td><span class="text-success">';
            display_score($score);
            echo '</span></td>
               <td>' . $hits . '</td>
            </tr>';
        }
        echo '
         </tbody>
      </table>';
    }
    echo '<p class="label label-default">' . $numresults . ' ' . translate("Total Review(s) found.") . '</p>';
    sql_free_result($result);
    include "footer.php";
}
Ejemplo n.º 26
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.º 27
0
     $sendF = '<a href="friend.php?op=FriendSend&amp;sid=' . $s_sid . '&amp;archive=' . $arch . '"><i class="fa fa-at fa-lg" title="' . translate("Send this Story to a Friend") . '" data-toggle="tooltip" data-placement="left" ></i></a>';
     $sid = $s_sid;
     if ($catid != 0) {
         $resultm = sql_query("SELECT title FROM " . $NPDS_Prefix . "stories_cat WHERE catid='{$catid}'");
         list($title1) = sql_fetch_row($resultm);
         $title = "<a href=\"article.php?sid={$sid}&amp;archive={$arch}\" class=\"noir\">{$title}</a> [ <a href=\"index.php?op=newindex&amp;catid={$catid}\" class=\"ongl\">{$title1}</a> ]";
     }
     setlocale(LC_TIME, aff_langue($locale));
     preg_match('#^(\\d{4})-(\\d{1,2})-(\\d{1,2}) (\\d{1,2}):(\\d{1,2}):(\\d{1,2})$#', $time, $datetime);
     $datetime = strftime("%d-%m-%Y %H:%M:%S", mktime($datetime[4] + $gmt, $datetime[5], $datetime[6], $datetime[2], $datetime[3], $datetime[1]));
     if (cur_charset != "utf-8") {
         $datetime = ucfirst($datetime);
     }
     echo '
     <tr>
        <td><a href="article.php?sid=' . $sid . '&amp;archive=' . $arch . '" >' . aff_langue($title) . '</a></td>
        <td>' . $counter . '</td>
        <td>' . $datetime . '</td>
        <td><a href="user.php?op=userinfo&amp;uname=' . $informant . '" >' . $informant . '</a></td>
        <td>' . $printP . '&nbsp;' . $sendF . '</td>
     </tr>';
 }
 echo '
      </tbody>
   </table><br />';
 $start = $start + $maxcount - 1;
 echo '
   <ul class="pagination pagination-sm">
      <li class="page-item disabled"><a class="page-link" href="#" >' . translate("Nb of articles") . ' ' . $count . ' </a></li>';
 if ($count - $start > 0) {
     echo '
Ejemplo n.º 28
0
$m->add_submit_value("ok");
$m->add_url("modules.php");
$m->add_field("ModStart", "", $ModStart, 'hidden', false);
$m->add_field("ModPath", "", $ModPath, 'hidden', false);
/************************************************/
include $sform_path . "contact/formulaire.php";
/************************************************/
// Manage the <form>
switch ($ok) {
    case 'Soumettre':
    case 'Submit':
        if (!$sformret) {
            $m->make_response();
            //anti_spambot
            if (!R_spambot($asb_question, $asb_reponse, $message)) {
                Ecr_Log("security", "Contact", "");
                $ok = "";
            } else {
                $message = $m->aff_response("class=\"ligna\"", "not_echo", "");
                global $notify_email;
                send_email($notify_email, "Contact site", aff_langue($message), "", "", "html");
                echo "<p class=\"lead text-xs-center\">" . aff_langue("[french]Votre demande est prise en compte. Nous y r&#xE9;pondrons au plus vite[/french][english]Your request is taken into account. We will answer it as fast as possible.[/english]") . "</p>";
                break;
            }
        } else {
            $ok = "";
        }
    default:
        echo aff_langue($m->print_form("class=\"ligna\""));
        break;
}
Ejemplo n.º 29
0
function nmig_txt($txtfin)
{
    include "header.php";
    global $ModInstall, $display;
    $display = "<div style=\"text-align: left;\">\n";
    $display .= "<b>" . aff_langue($txtfin) . "</b>\n";
    $display .= "<br /><br />\n";
    $display .= "</div><div style=\"text-align: center;\">\n";
    $display .= "<br />[&nbsp;<a href=\"admin.php?op=Module-Install&amp;ModInstall=" . $ModInstall . "&amp;nmig=e10\" class=\"noir\">" . adm_translate("Etape suivante") . "</a>&nbsp;]<br />\n";
    $display .= "</div>\n";
    $display .= "<br />\n";
    $display .= nmig_copyright();
}
Ejemplo n.º 30
0
/*                                                                      */
/* Collab WS-Pad 1.44 by Developpeur and Jpb                            */
/*                                                                      */
/* NPDS Copyright (c) 2002-2015 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.       */
/************************************************************************/
// For More security
if (!stristr($_SERVER['PHP_SELF'], "modules.php")) {
    die;
}
if (strstr($ModPath, "..") || strstr($ModStart, "..") || stristr($ModPath, "script") || stristr($ModPath, "cookie") || stristr($ModPath, "iframe") || stristr($ModPath, "applet") || stristr($ModPath, "object") || stristr($ModPath, "meta") || stristr($ModStart, "script") || stristr($ModStart, "cookie") || stristr($ModStart, "iframe") || stristr($ModStart, "applet") || stristr($ModStart, "object") || stristr($ModStart, "meta")) {
    die;
}
global $NPDS_Prefix;
$wspad = rawurldecode(decrypt($pad));
$wspad = explode("#wspad#", $wspad);
switch ($type) {
    case "doc":
        include "lib/html2doc.php";
        $htmltodoc = new HTML_TO_DOC();
        $row = sql_fetch_assoc(sql_query("SELECT content FROM " . $NPDS_Prefix . "wspad WHERE page='" . $wspad[0] . "' AND member='" . $wspad[1] . "' AND ranq='" . $wspad[2] . "'"));
        // nettoyage des SPAN
        $tmp = preg_replace('#style="[^\\"]*\\"#', "", aff_langue($row['content']));
        $htmltodoc->createDoc($tmp, $wspad[0] . "-" . $wspad[2], true);
        break;
    default:
        break;
}