function displayUsers() { global $hlpfile, $admf_ext, $f_meta_nom, $f_titre, $adminimg; include "header.php"; GraphicAdmin($hlpfile); adminhead($f_meta_nom, $f_titre, $adminimg); echo ' <hr /> <h3>' . adm_translate("Extraire l'annuaire") . '</h3> <form method="post" class="form-inline" action="admin.php"> <fieldset> <div class="form-group"> <label for="op">' . adm_translate("Format de fichier") . '</label> <select class="custom-select form-control" name="op"> <option value="extractUserCSV">' . adm_translate("Au format CSV") . '</option> </select> </div> <button class="btn btn-primary" type="submit">' . adm_translate("Ok") . ' </button> </fieldset> </form> <hr /> <h3>' . adm_translate("Rechercher utilisateur") . '</h3> <form method="post" class="form-inline" action="admin.php"> <fieldset> <div class="form-group"> <label for="chng_uid">' . adm_translate("Identifiant Utilisateur") . '</label> <input class="form-control" type="text" id="chng_uid" name="chng_uid" size="20" maxlength="10" /> </div> <select class="custom-select form-control" name="op"> <option value="modifyUser">' . adm_translate("Modifier un utilisateur") . '</option> <option value="unsubUser">' . adm_translate("Désabonner un utilisateur") . '</option> <option value="delUser">' . adm_translate("Supprimer un utilisateur") . '</option> </select> <button class="btn btn-primary" type="submit" >' . adm_translate("Ok") . ' </button> </fieldset> </form>'; $chng_is_visible = 1; echo ' <hr /> <h3>' . adm_translate("Créer utilisateur") . '</h3>'; $op = 'displayUsers'; include "modules/sform/extend-user/adm_extend-user.php"; echo auto_complete('membre', 'uname', 'users', 'chng_uid', '86400'); adminfoot('', '', '', ''); }
function displayadmins() { global $hlpfile, $NPDS_Prefix, $admf_ext, $fieldnames, $listdroits, $listdroitsmodulo, $f_meta_nom, $f_titre, $adminimg, $scri_check; include "header.php"; GraphicAdmin($hlpfile); adminhead($f_meta_nom, $f_titre, $adminimg); $result = sql_query("SELECT aid, name, url, email, radminsuper FROM " . $NPDS_Prefix . "authors"); echo ' <hr /> <h3>' . adm_translate("Les administrateurs") . '</h3> <table id="tab_adm" data-toggle="table" data-striped="true" data-search="true" data-show-toggle="true" data-mobile-responsive="true" data-show-export="true" data-icons="icons" data-icons-prefix="fa"> <thead> <tr> <th data-sortable="true" data-halign="center">' . adm_translate('Nom') . '</th> <th data-sortable="true" data-halign="center">' . adm_translate('E-mail') . '</th> <th data-halign="center" data-align="right">' . adm_translate('Fonctions') . '</th> </tr> </thead> <tbody>'; while (list($a_aid, $name, $url, $email, $supadm) = sql_fetch_row($result)) { if ($supadm == 1) { echo ' <tr class="table-danger">'; } else { echo ' <tr>'; } echo ' <td>' . $a_aid . '</td> <td>' . $email . '</td> <td align="right" nowrap="nowrap"> <a href="admin.php?op=modifyadmin&chng_aid=' . $a_aid . '" class=""><i class="fa fa-edit fa-lg" title="' . adm_translate("Modifier l'information") . '" data-toggle="tooltip"></i></a> <a href="mailto:' . $email . '"><i class="fa fa-at fa-lg" title="' . adm_translate("Envoyer un courriel à") . ' ' . $a_aid . '" data-toggle="tooltip"></i></a> '; if ($url != '') { echo ' <a href="' . $url . '"><i class="fa fa-external-link fa-lg" title="' . adm_translate("Visiter le site web") . '" data-toggle="tooltip"></i></a> '; } echo ' <a href="admin.php?op=deladmin&del_aid=' . $a_aid . '" ><i class="fa fa-trash-o fa-lg text-danger" title="' . adm_translate("Effacer l'Auteur") . '" data-toggle="tooltip" ></i></a> </td> </tr>'; } echo ' </tbody> </table> <hr /> <h3>' . adm_translate("Nouvel administrateur") . '</h3> <form id="nou_adm" action="admin.php" method="post"> <fieldset> <legend><img src="' . $adminimg . 'authors.' . $admf_ext . '" class="vam" border="0" width="24" height="24" alt="' . adm_translate("Informations") . '" /> ' . adm_translate("Informations") . ' </legend> <br /><div class="form-group row"> <label class="form-control-label col-sm-4" for="add_aid">' . adm_translate("Surnom") . '</label> <div class="col-sm-8"> <input id="add_aid" class="form-control" type="text" name="add_aid" maxlength="30" placeholder="' . adm_translate("Surnom") . '" required="required" /> <span class="help-block text-xs-right"><span id="countcar_add_aid"></span></span> </div> </div> <div class="form-group row"> <label class="form-control-label col-sm-4 " for="add_name">' . adm_translate("Nom") . '</label> <div class="col-sm-8"> <input id="add_name" class="form-control" type="text" name="add_name" maxlength="50" placeholder="' . adm_translate("Nom") . '" required="required" /> <span class="help-block text-xs-right"><span id="countcar_add_name"></span></span> </div> </div> <div class="form-group row"> <label class="form-control-label col-sm-4 " for="add_email">' . adm_translate("E-mail") . '</label> <div class="col-sm-8"> <input id="add_email" class="form-control" type="email" name="add_email" maxlength="60" placeholder="' . adm_translate("E-mail") . '" required="required" /> <span class="help-block text-xs-right"><span id="countcar_add_email"></span></span> </div> </div> <div class="form-group row"> <label class="form-control-label col-sm-4 " for="add_url">' . adm_translate("URL") . '</label> <div class="col-sm-8"> <input id="add_url" class="form-control" type="url" name="add_url" maxlength="60" placeholder="' . adm_translate("URL") . '" /> <span class="help-block text-xs-right"><span id="countcar_add_url"></span></span> </div> </div> <div class="form-group row"> <label class="form-control-label col-sm-4 " for="add_pwd">' . adm_translate("Mot de Passe") . '</label> <div class="col-sm-8"> <input id="add_pwd" class="form-control" type="password" name="add_pwd" maxlength="12" placeholder="' . adm_translate("Mot de Passe") . '" required="required" /> <span class="help-block text-xs-right"><span id="countcar_add_pwd"></span></span> <progress id="passwordMeter_cont" class="progress password-meter" value="0" max="100"> <div class="progress"> <span id="passwordMeter" class="progress-bar" style="width: 0%;"></span> </div> </progress> <span id="pass-level" class="help-block text-xs-right"></span> </div> </div> <div class="form-group row"> <label class="form-control-label col-sm-4 text-danger" for="cb_radminsuper" >' . adm_translate("Super administrateur") . '</label> <div class="col-sm-8"> <input id="cb_radminsuper" class="" type="checkbox" name="add_radminsuper" value="1" /> <span class="help-block">' . adm_translate("Si Super administrateur est coché, cet administrateur aura TOUS les droits.") . '</span> </div> </div> </fieldset> <fieldset> <legend><img src="' . $adminimg . 'authors.' . $admf_ext . '" class="vam" border="0" width="24" height="24" alt="' . adm_translate("Droits") . '" /> ' . adm_translate("Droits") . ' </legend> <div id="adm_droi_f" class="container-fluid "> <div class="form-group"> <input type="checkbox" id="ckball_f" /> <span class="small text-muted" id="ckb_status_f">' . adm_translate("Tout cocher") . '</span> </div>'; echo $listdroits; echo ' </div> </fieldset> <fieldset> <legend><img src="' . $adminimg . 'authors.' . $admf_ext . '" class="vam" border="0" width="24" height="24" alt="' . adm_translate("Droits modules") . '" /> ' . adm_translate("Droits modules") . ' </legend> <div id="adm_droi_m" class="container-fluid"> <div class="form-group"> <input type="checkbox" id="ckball_m" /> <span class="small text-muted" id="ckb_status_m">' . adm_translate("Tout cocher") . '</span> </div>'; echo $listdroitsmodulo; echo ' </div> <br /> <div class="form-group"> <div class=" col-md-6 col-xs-12"> <button class="btn btn-primary col-xs-12" type="submit"><i class="fa fa-plus-square fa-lg"></i> ' . adm_translate("Ajouter un administrateur") . '</button> </div> </div> <input type="hidden" name="op" value="AddAuthor" /> </fieldset> </form> </div> ' . $scri_check . ' <script type="text/javascript"> //<![CDATA[ $(document).ready(function() { inpandfieldlen("add_aid",30); inpandfieldlen("add_name",50); inpandfieldlen("add_email",60); inpandfieldlen("add_url",60); inpandfieldlen("add_pwd",12); }); //]]> </script>'; $fv_parametres = ' add_aid: { validators: { callback: { message: "Ce surnom n\'est pas disponible", callback: function(value, validator, $field) { return $.inArray(value, admin) == -1; } } } }, add_name: { validators: { callback: { message: "Ce nom n\'est pas disponible", callback: function(value, validator, $field) { return $.inArray(value, adminname) == -1; } } } }, add_pwd: { validators: { notEmpty: { message: "The password is required and cannot be empty" }, callback: { callback: function(value, validator, $field) { var score = 0; if (value === "") { return { valid: true, score: null }; } // Check the password strength score += ((value.length >= 8) ? 1 : -1); // The password contains uppercase character if (/[A-Z]/.test(value)) {score += 1;} // The password contains uppercase character if (/[a-z]/.test(value)) {score += 1;} // The password contains number if (/[0-9]/.test(value)) {score += 1;} // The password contains special characters if (/[!#$%&^~*_]/.test(value)) {score += 1;} return { valid: true, score: score // We will get the score later }; } } } }, '; echo auto_complete('admin', 'aid', 'authors', '', '0'); echo auto_complete('adminname', 'name', 'authors', '', '0'); adminfoot('fv', $fv_parametres, '', ''); }
function email_user() { global $hlpfile, $NPDS_Prefix, $f_meta_nom, $f_titre, $adminimg; include 'header.php'; GraphicAdmin($hlpfile); adminhead($f_meta_nom, $f_titre, $adminimg); echo ' <hr /> <form id="fad_emailuser" action="admin.php" method="post" name="AdmMI"> <fieldset> <legend>' . adm_translate("Message") . '</legend> <input type="hidden" name="op" value="send_email_to_user" /> <div class="form-group row"> <label class="form-control-label col-sm-4" for="expediteur">' . adm_translate("Expédier en tant") . '</label> <div class="col-sm-8"> <label class="radio-inline"> <input type="radio" name="expediteur" value="1" checked="checked">' . adm_translate("qu'administrateur") . ' / </label> <label class="radio-inline"> <input type="radio" name="expediteur" value="0">' . adm_translate("que membre") . ' </label> </div> </div> <div id="div_username" class="form-group row"> <label class="form-control-label col-sm-4" for="username">' . adm_translate("Utilisateur") . '</label> <div class="col-sm-8"> <input id="username" class="form-control" type="text" name="username" value="" /> </div> </div> <div id="div_groupe" class="form-group row"> <label class="form-control-label col-sm-4" for="groupe">' . adm_translate("Groupe") . '</label> <div class="col-sm-8"> <select id="groupe" class="custom-select form-control" name="groupe" > <option value="0" selected="selected">' . adm_translate("Choisir un groupe"); $resultID = sql_query("SELECT groupe_id, groupe_name FROM " . $NPDS_Prefix . "groupes ORDER BY groupe_id ASC"); while (list($groupe_id, $groupe_name) = sql_fetch_row($resultID)) { echo ' <option value="' . $groupe_id . '">' . $groupe_id . ' - ' . aff_langue($groupe_name); } echo ' </select> </div> </div> <div id="div_all" class="form-group row"> <label class="form-control-label checkbox col-sm-4" for="all">' . adm_translate("Envoyer à tous les membres") . '</label> <div class="col-sm-8 "> <input id="all" type="checkbox" name="all" value="1" /> </div> </div> <div class="form-group row"> <label class="form-control-label col-sm-4" for="subject">' . adm_translate("Sujet") . '</label> <div class="col-sm-8"> <input id="subject" class="form-control" type="text" maxlength="100" name="subject" /> <span class="help-block text-xs-right"><span id="countcar_subject"></span></span> </div> </div> <div class="form-group row"> <label class="form-control-label col-sm-12" for="message">' . adm_translate("Corps de message") . '</label> <div class="col-sm-12"> <textarea id="message" class="tin form-control" rows="25" name="message"></textarea> </div> </div>'; echo aff_editeur('AdmMI', ''); echo ' <div class="form-group row"> <div class="col-sm-12"> <button type="submit" class="btn btn-primary">' . adm_translate("Envoyer") . '</button> </div> </div> </fieldset> </form> <script type="text/javascript"> //<![CDATA[ $("#all").on("click", function(){ check = $("#all").is(":checked"); if(check) { $("#div_username").addClass("collapse"); $("#div_groupe").addClass("collapse"); } else { $("#div_username").removeClass("collapse in"); $("#div_groupe").removeClass("collapse in"); } }); $("#groupe").on("change", function(){ sel = $("#groupe").val(); if(sel!=0) { $("#div_username").addClass("collapse"); $("#div_all").addClass("collapse"); } else { $("#div_username").removeClass("collapse in"); $("#div_all").removeClass("collapse in"); } }); $("#username").bind("change paste keyup", function() { ibid = $(this).val(); if(ibid!="") { $("#div_groupe").addClass("collapse"); $("#div_all").addClass("collapse"); } else { $("#div_groupe").removeClass("collapse in"); $("#div_all").removeClass("collapse in"); } }); $(document).ready(function() { inpandfieldlen("subject",100); }); //]]> </script>'; echo auto_complete('membre', 'uname', 'users', 'username', '86400'); adminfoot('fv', '', '', ''); }
function ForumMaintAdmin() { global $hlpfile, $NPDS_Prefix, $f_meta_nom, $f_titre, $adminimg; include "header.php"; GraphicAdmin($hlpfile); adminhead($f_meta_nom, $f_titre, $adminimg); echo ' <hr /> <h3>' . adm_translate("Maintenance des Forums") . '</h3>'; // Mark Topics, Synchro Forum_read table, Merge Forums echo ' <div class="row"> <div class="col-xs-12"> <form id="fad_forumaction" action="admin.php" method="post"> <input type="hidden" name="op" value="MaintForumMarkTopics" /> <button class="btn btn-primary btn-block btn-lg" type="submit" name="Topics_Mark"><i class="fa fa-check-square-o fa-lg"></i> ' . adm_translate("Marquer tous les Topics comme lus") . '</button> </form> </div> <div class="col-xs-12"> <form action="admin.php" method="post"> <input type="hidden" name="op" value="SynchroForum" /> <button class="btn btn-primary btn-block btn-lg" type="submit" name="Synchro_Forum"><i class="fa fa-refresh fa-lg"></i> ' . adm_translate("Synchroniser les forums") . '</button> </form> </div> <div class="col-xs-12"> <form action="admin.php" method="post"> <input type="hidden" name="op" value="MergeForum" /> <button class="btn btn-primary btn-block btn-lg" type="submit" name="Merge_Forum"><i class="fa fa-compress fa-lg"></i> ' . adm_translate("Fusionner des forums") . '</button> </form> </div> </div> <br /> <form id="fad_forumdelete" action="admin.php" method="post"> <legend>' . adm_translate("Supprimer massivement les Topics") . '</legend> <div class="form-group row"> <label class="form-control-label col-sm-4" for="forum_name">' . adm_translate("Nom du forum") . '</label> <div class="col-sm-8"> <input type="text" class="form-control" name="forum_name" id="forum_name" maxlength="150" /> </div> </div> <div class="form-group row"> <label class="form-control-label col-sm-4" for="before">' . adm_translate("Date") . '</label> <div class="col-sm-8"> <div id="embeddingDatePicker"></div> <input type="hidden" class="form-control" name="before" id="before" value="" maxlength="11" placeholder="AAAA-MM-JJ" /> </div> </div> <div class="form-group row"> <div class="col-sm-8 offset-sm-4"> <input type="hidden" name="op" value="MaintForumTopics" /> <button class="btn btn-primary" type="submit" name="Topics_Mark">' . adm_translate("Envoyer") . '</button> </div> </div> </form> <script> $(document).ready(function() { $("#embeddingDatePicker") .datepicker({ format: "yyyy-mm-dd", language:"' . language_iso(1, '', '') . '", title:"Avant cette date" }) .on("changeDate", function(e) { $("#before").val($("#embeddingDatePicker").datepicker("getFormattedDate")); $("#fad_forumdelete").formValidation("revalidateField", "before"); }); }); </script>'; $fv_parametres = ' before: { excluded: false, validators: { notEmpty: { message: "The date is required" }, date: { format: "YYYY-MM-DD", message: "The date is not a valid" } } }, '; echo auto_complete("forname", "forum_name", "forums", "forum_name", "86400"); adminfoot('fv', $fv_parametres, '', ''); }
<th data-sortable="true">' . translate("Author") . '</th> <th data-sortable="true">' . translate("Posted") . '</th> </tr> </thead> <tbody>'; } echo ' <tr> <td align="left">' . ($count + 1) . '</td> <td align="left"><a href="viewforum.php?forum=' . $row['forum_id'] . '">' . stripslashes($row['forum_name']) . '</a></td>'; if ($row['arbre']) { $Hplus = "H"; } else { $Hplus = ""; } $ancre = ancre($row['forum_id'], $row['topic_id'], $row['post_id'], $posts_per_page); echo ' <td align="left"><a href="viewtopic' . $Hplus . '.php?topic=' . $row['topic_id'] . '&forum=' . $row['forum_id'] . $ancre . '" >' . stripslashes($row['topic_title']) . '</a></td> <td align="left"><a href="user.php?op=userinfo&uname=' . $row['uname'] . '" >' . $row['uname'] . '</a></td> <td align="left">' . convertdate($row['post_time']) . '</td> </tr>'; $count++; } } while ($row = sql_fetch_assoc($result)); echo ' </tbody> </table>'; } sql_free_result(); echo auto_complete('membre', 'uname', 'users', 'username', '86400'); include 'footer.php';
function ForumMaintAdmin() { global $hlpfile, $NPDS_Prefix, $f_meta_nom, $f_titre, $adminimg; include "header.php"; GraphicAdmin($hlpfile); adminhead($f_meta_nom, $f_titre, $adminimg); echo '<h3>' . adm_translate("Maintenance des Forums") . '</h3>'; // Mark Topics, Synchro Forum_read table, Merge Forums echo ' <div class="row"> <div class="col-xs-12"> <form id="fad_forumaction" action="admin.php" method="post"> <input type="hidden" name="op" value="MaintForumMarkTopics" /> <button class="btn btn-primary btn-block btn-lg" type="submit" name="Topics_Mark"><i class="fa fa-check-square-o fa-lg"></i> ' . adm_translate("Marquer tous les Topics comme lus") . '</button> </form> </div> <div class="col-xs-12"> <form action="admin.php" method="post"> <input type="hidden" name="op" value="SynchroForum" /> <button class="btn btn-primary btn-block btn-lg" type="submit" name="Synchro_Forum"><i class="fa fa-refresh fa-lg"></i> ' . adm_translate("Synchroniser les forums") . '</button> </form> </div> <div class="col-xs-12"> <form action="admin.php" method="post"> <input type="hidden" name="op" value="MergeForum" /> <button class="btn btn-primary btn-block btn-lg" type="submit" name="Merge_Forum"><i class="fa fa-compress fa-lg"></i> ' . adm_translate("Fusionner des forums") . '</button> </form> </div> </div> <br /> <form id="fad_forumdelete" class="form-horizontal" action="admin.php" method="post"> <fieldset> <legend>' . adm_translate("Supprimer massivement les Topics") . '</legend> <div class="form-group"> <label class="form-control-label col-sm-4" for="forum_name">' . adm_translate("Nom du forum") . '</label> <div class="col-sm-8"> <input type="text" class="form-control" name="forum_name" id="forum_name" size="20" maxlength="150" value="" /> </div> </div> <div class="form-group"> <label class="form-control-label col-sm-4" for="before">' . adm_translate("Date") . '</label> <div class="col-sm-8"> <input type="text" class="form-control" name="before" id="before" value="" size="10" maxlength="11" placeholder="AAAA-MM-JJ" data-provide="datepicker" data-date-format="yyyy-mm-dd" data-date-language="' . language_iso(1, '', '') . '" /> </div> </div> <div class="form-group"> <div class="col-sm-offset-4 col-sm-8"> <input type="hidden" name="op" value="MaintForumTopics"> <button class="btn btn-warning" type="submit" name="Topics_Mark">' . adm_translate("Envoyer") . '</button> </div> </div> </fieldset> </form>'; echo auto_complete("forname", "forum_name", "forums", "forum_name", "86400"); adminfoot('', '', '', ''); }