当前位置: 首页>>代码示例>>PHP>>正文


PHP adm_translate函数代码示例

本文整理汇总了PHP中adm_translate函数的典型用法代码示例。如果您正苦于以下问题:PHP adm_translate函数的具体用法?PHP adm_translate怎么用?PHP adm_translate使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了adm_translate函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: ConfigureBan

function ConfigureBan($ModPath, $ModStart)
{
    global $f_meta_nom, $f_titre, $adminimg;
    if (file_exists("slogs/spam.log")) {
        $fd = fopen("slogs/spam.log", "r");
        while (!feof($fd)) {
            $ip_ban .= fgets($fd, 4096);
        }
        fclose($fd);
    }
    adminhead($f_meta_nom, $f_titre, $adminimg);
    echo '
   <div>
      <p>' . ipban_translate("Chaque ligne ne doit contenir qu'une adresse IP de la forme : a.b.c.d:<b>X</b> (ex : 168.192.1.1:5)<br />si <b>X</b> >= 5 alors l'accès sera refusé<br /><br />Ce fichier est mis à jour automatiquement par l'anti-spam de NPDS.") . '</p>
      <form id="ipban_mod" action="admin.php" method="post">
         <div class="form-group">
            <label class="control-label" for="ip_ban">' . ipban_translate("Liste des IP") . '</label>
            <textarea id="ip_ban" class="form-control" name="ipban" rows="20">' . $ip_ban . '</textarea>
         </div>
         <div class="form-group">
            <button class="btn btn-primary" type="submit">' . adm_translate("Sauver les modifications") . '</button>
            <input type="hidden" name="op" value="Extend-Admin-SubModule" />
            <input type="hidden" name="ModPath" value="' . $ModPath . '" />
            <input type="hidden" name="ModStart" value="' . $ModStart . '" />
            <input type="hidden" name="subop" value="SaveSetBan" />
         </div>
      </form>
   </div>
</div>';
}
开发者ID:Jireck-npds,项目名称:npds_dune,代码行数:30,代码来源:setban.php

示例2: mblock

function mblock()
{
    global $hlpfile, $NPDS_Prefix, $f_meta_nom, $f_titre, $adminimg;
    include "header.php";
    GraphicAdmin($hlpfile);
    adminhead($f_meta_nom, $f_titre, $adminimg);
    echo '
   <hr />
   <h3>' . adm_translate("Edition du Bloc Principal") . '</h3>';
    $result = sql_query("SELECT title, content FROM " . $NPDS_Prefix . "mainblock");
    if (sql_num_rows($result) > 0) {
        while (list($title, $content) = sql_fetch_row($result)) {
            echo '
         <form id="fad_mblock" action="admin.php" method="post">
            <div class="form-group row">
               <label class="form-control-label col-xs-12" for="title">' . adm_translate("Titre") . '</label>
               <div class="col-xs-12">
                  <textarea class="form-control" type="text" id="title" name="title" maxlength="255" placeholder="' . adm_translate("Titre :") . '">' . $title . '</textarea>
                  <span class="help-block text-xs-right"><span id="countcar_title"></span></span>
               </div>
            </div>
            <div class="form-group row">
               <label class="form-control-label col-xs-12" for="content">' . adm_translate("Contenu") . '</label>
               <div class="col-xs-12">
                  <textarea class="form-control" rows="25" id="content" name="content">' . $content . '</textarea>
               </div>
            </div>
            <input type="hidden" name="op" value="changemblock" />
            <div class="form-group row">
               <div class="col-xs-12">
                  <button class="btn btn-outline-primary btn-block" type="submit"><i class ="fa fa-check fa-lg"></i>&nbsp;' . adm_translate("Valider") . '</button>
               </div>
            </div>
         </form>
         <script type="text/javascript">
         //<![CDATA[
            $(document).ready(function() {
               inpandfieldlen("title",255);
            });
         //]]>
         </script>';
        }
    }
    adminfoot('fv', '', '', '');
}
开发者ID:npds,项目名称:npds_dune,代码行数:45,代码来源:mainblock.php

示例3: hreferer

function hreferer($filter)
{
    global $hlpfile, $f_meta_nom, $adminimg, $admf_ext, $f_titre;
    include "header.php";
    GraphicAdmin($hlpfile);
    adminhead($f_meta_nom, $f_titre, $adminimg);
    settype($filter, "integer");
    if (!$filter) {
        $filter = 2048;
    }
    echo '
   <h3>' . adm_translate("Qui parle de nous ?") . '</h3>
   <form action="admin.php" method="post">
      <input type="hidden" name="op" value="hreferer" />
      <div class="form-group">
      <div class="row>">
         <label class="form-control-label col-sm-4" for="filter">' . adm_translate("Filtre") . '</label>
         <div class="col-sm-4">
            <input type="number" class="form-control" name="filter" min="0" max="99999" value="' . $filter . '" />
         </div>
         <div class="col-sm-4 xs-hidden"></div><div class="clearfix"></div>
      </div>
   </div>
   </form>
   <table id ="tad_refe" data-toggle="table" data-striped="true" data-search="true" data-show-toggle="true" data-mobile-responsive="true" data-icons="icons" data-icons-prefix="fa">
   <thead>
      <tr>
         <th data-sortable="true">Url</th>
         <th data-sortable="true">Hit</th>
      </tr>
   </thead>
   <tbody>';
    $hresult = sql_query("SELECT url, COUNT(url) AS TheCount, substring(url,1,{$filter}) AS filter FROM " . $NPDS_Prefix . "referer GROUP BY filter ORDER BY TheCount DESC");
    while (list($url, $TheCount) = sql_fetch_row($hresult)) {
        echo '
      <tr>
         <td>';
        if ($TheCount == 1) {
            echo '<a href="' . $url . '" target="_blank">';
        }
        if ($filter != 2048) {
            echo '<span>' . substr($url, 0, $filter) . '</span><span class="text-muted">' . substr($url, $filter) . '</span>';
        } else {
            echo $url;
        }
        if ($TheCount == 1) {
            echo '</a>';
        }
        echo '</a>
         </td>
         <td align="right">' . $TheCount . '</td>
      </tr>';
    }
    echo '
   </tbody>
   </table>
   <br />
   <ul class="nav nav-pills">
      <li><a href="admin.php?op=delreferer" class="text-danger">' . adm_translate("Effacer les Référants") . '</a></li>
      <li><a href="admin.php?op=archreferer&amp;filter=' . $filter . '">' . adm_translate("Archiver les Référants") . '</a></li>
   </ul>';
    adminfoot('', '', '', '');
}
开发者ID:Jireck-npds,项目名称:npds_dune,代码行数:63,代码来源:referers.php

示例4: ForumGoDel

function ForumGoDel($forum_id, $ok = 0)
{
    global $hlpfile;
    global $NPDS_Prefix;
    if ($ok == 1) {
        sql_query("DELETE FROM " . $NPDS_Prefix . "forumtopics WHERE forum_id='{$forum_id}'");
        sql_query("DELETE FROM " . $NPDS_Prefix . "forum_read WHERE forum_id='{$forum_id}'");
        control_efface_post("forum_npds", "", "", $forum_id);
        sql_query("DELETE FROM " . $NPDS_Prefix . "forums WHERE forum_id='{$forum_id}'");
        Q_Clean();
        global $aid;
        Ecr_Log("security", "DeleteForum({$forum_id}) by AID : {$aid}", "");
        Header("Location: admin.php?op=ForumAdmin");
    } else {
        include "header.php";
        GraphicAdmin($hlpfile);
        opentable();
        echo "<p align=\"center\" class=\"rouge\"><b>" . adm_translate("ATTENTION :  êtes-vous certain de vouloir effacer ce Forum et tous ses Sujets ?") . "</b><br /><br />";
    }
    echo "[ <a href=\"admin.php?op=ForumGoDel&amp;forum_id={$forum_id}&amp;ok=1\" class=\"rouge\">" . adm_translate("Oui") . "</a> | <a href=\"admin.php?op=ForumAdmin\" class=\"noir\">" . adm_translate("Non") . "</a> ]<br /><br />";
    closetable();
    include "footer.php";
}
开发者ID:Jireck-npds,项目名称:npds_dune,代码行数:23,代码来源:phpbbforum.php

示例5: Access_Error

/* DUNE by NPDS                                                         */
/* ===========================                                          */
/*                                                                      */
/* Session and log Viewer Copyright (c) 2009 - Tribal-Dolphin           */
/*                                                                      */
/* NPDS Copyright (c) 2002-2012 by Philippe Brunier                     */
/*                                                                      */
/* This program is free software. You can redistribute it and/or modify */
/* it under the terms of the GNU General Public License as published by */
/* the Free Software Foundation; either version 2 of the License.       */
/************************************************************************/
if (!stristr($_SERVER['PHP_SELF'], "admin.php")) {
    Access_Error();
}
$f_meta_nom = 'session_log';
$f_titre = adm_translate("Gestion des Logs");
//==> controle droit
admindroits($aid, $f_meta_nom);
//<== controle droit
global $language, $ModPath, $ModStart;
$old_language = $language;
include_once "modules/upload/upload.conf.php";
if ($DOCUMENTROOT == "") {
    global $DOCUMENT_ROOT;
    if ($DOCUMENT_ROOT) {
        $DOCUMENTROOT = $DOCUMENT_ROOT;
    } else {
        $DOCUMENTROOT = $_SERVER['DOCUMENT_ROOT'];
    }
}
$FileSecure = $DOCUMENTROOT . $racine . "/slogs/security.log";
开发者ID:Jireck-npds,项目名称:npds_dune,代码行数:31,代码来源:session-log.php

示例6: EditReseaux

function EditReseaux($ModPath, $ModStart, $f_meta_nom, $f_titre, $adminimg, $rs_id, $rs_url, $rs_ico, $subop)
{
    if (file_exists("modules/{$ModPath}/reseaux-sociaux.conf.php")) {
        include "modules/{$ModPath}/reseaux-sociaux.conf.php";
    }
    adminhead($f_meta_nom, $f_titre, $adminimg);
    if ($subop == 'AddReseaux') {
        echo '
   <hr /><h3>' . adm_translate("Ajouter") . '</h3>';
    } else {
        echo '
   <hr /><h3>' . adm_translate("Editer") . '</h3>';
    }
    echo '
   <form id="reseaux_adm" action="admin.php" method="post">
      <div class="form-group row">
         <label class="form-control-label col-sm-3" for="rs_id">' . adm_translate("Nom") . '</label>
         <div class="col-sm-9">
            <input id="rs_id" class="form-control" type="text" name="rs_id"  maxlength="50"  placeholder="' . adm_translate("") . '" value="' . urldecode($rs_id) . '" required="required" />
            <span class="help-block text-xs-right"><span id="countcar_rs_id"></span></span>
         </div>
      </div>
      <div class="form-group row">
         <label class="form-control-label col-sm-3" for="rs_url">' . adm_translate("URL") . '</label>
         <div class="col-sm-9">
            <input id="rs_url" class="form-control" type="text" name="rs_url"  maxlength="100" placeholder="' . adm_translate("") . '" value="' . urldecode($rs_url) . '" required="required" />
            <span class="help-block text-xs-right"><span id="countcar_rs_url"></span></span>
         </div>
      </div>
      <div class="form-group row">
         <label class="form-control-label col-sm-3" for="rs_ico">' . adm_translate("Icône") . '</label>
         <div class="col-sm-9">
            <input id="rs_ico" class="form-control" type="text" name="rs_ico"  maxlength="40" placeholder="' . adm_translate("") . '" value="' . stripcslashes(urldecode($rs_ico)) . '" required="required" />
            <span class="help-block text-xs-right"><span id="countcar_rs_ico"></span></span>
         </div>
      </div>
      <div class="form-group row">
         <div class="col-sm-9 offset-sm-3">
            <button class="btn btn-primary col-xs-12" type="submit"><i class="fa fa-check-square fa-lg"></i>&nbsp;' . adm_translate("Sauver") . '</button>
            <input type="hidden" name="op" value="Extend-Admin-SubModule" />
            <input type="hidden" name="ModPath" value="' . $ModPath . '" />
            <input type="hidden" name="ModStart" value="' . $ModStart . '" />
            <input type="hidden" name="subop" value="SaveSetReseaux" />
            <input type="hidden" name="adm_img_mod" value="1" />
         </div>
      </div>
   </form>
   <script type="text/javascript">
   //<![CDATA[
   $(document).ready(function() {
      inpandfieldlen("rs_id",50);
      inpandfieldlen("rs_url",100);
      inpandfieldlen("rs_ico",40);
   })
   //]]>
   </script>';
    adminfoot('fv', '', '', '');
}
开发者ID:npds,项目名称:npds_dune,代码行数:58,代码来源:reseaux-sociaux_set.php

示例7: autoEdit

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 ' 
//.........这里部分代码省略.........
开发者ID:Jireck-npds,项目名称:npds_dune,代码行数:101,代码来源:automated.php

示例8: liste_group

function liste_group()
{
    global $NPDS_Prefix;
    $r = sql_query("SELECT groupe_id, groupe_name FROM " . $NPDS_Prefix . "groupes ORDER BY groupe_id ASC");
    $tmp_groupe[0] = "-> " . adm_translate("Supprimer") . "/" . adm_translate("Choisir un groupe") . " <-";
    while ($mX = sql_fetch_assoc($r)) {
        $tmp_groupe[$mX['groupe_id']] = aff_langue($mX['groupe_name']);
    }
    sql_free_result($r);
    return $tmp_groupe;
}
开发者ID:npds,项目名称:npds_dune,代码行数:11,代码来源:mainfile.php

示例9: ForumMaintAdmin

function ForumMaintAdmin()
{
    global $hlpfile, $NPDS_Prefix, $f_meta_nom, $f_titre, $adminimg;
    include "header.php";
    GraphicAdmin($hlpfile);
    adminhead($f_meta_nom, $f_titre, $adminimg);
    echo '
   <hr />
   <h3>' . adm_translate("Maintenance des Forums") . '</h3>';
    // Mark Topics, Synchro Forum_read table, Merge Forums
    echo '
   <div class="row">
      <div class="col-xs-12">
         <form id="fad_forumaction" action="admin.php" method="post">
            <input type="hidden" name="op" value="MaintForumMarkTopics" />
            <button class="btn btn-primary btn-block btn-lg" type="submit" name="Topics_Mark"><i class="fa fa-check-square-o fa-lg"></i>&nbsp;' . adm_translate("Marquer tous les Topics comme lus") . '</button>
         </form>
      </div>
      <div class="col-xs-12">
         <form action="admin.php" method="post">
            <input type="hidden" name="op" value="SynchroForum" />
            <button class="btn btn-primary btn-block btn-lg" type="submit" name="Synchro_Forum"><i class="fa fa-refresh fa-lg"></i>&nbsp;' . adm_translate("Synchroniser les forums") . '</button>
         </form>
      </div>
      <div class="col-xs-12">
         <form action="admin.php" method="post">
            <input type="hidden" name="op" value="MergeForum" />
            <button class="btn btn-primary btn-block btn-lg" type="submit" name="Merge_Forum"><i class="fa fa-compress fa-lg"></i>&nbsp;' . adm_translate("Fusionner des forums") . '</button>
         </form>
      </div>
   </div>
   <br />
   <form id="fad_forumdelete" action="admin.php" method="post">
      <legend>' . adm_translate("Supprimer massivement les Topics") . '</legend>
      <div class="form-group row">
         <label class="form-control-label col-sm-4" for="forum_name">' . adm_translate("Nom du forum") . '</label>
         <div class="col-sm-8">
            <input type="text" class="form-control" name="forum_name" id="forum_name" maxlength="150" />
         </div>
      </div>
      <div class="form-group row">
         <label class="form-control-label col-sm-4" for="before">' . adm_translate("Date") . '</label>
         <div class="col-sm-8">
            <div id="embeddingDatePicker"></div>
            <input type="hidden" class="form-control" name="before" id="before" value="" maxlength="11" placeholder="AAAA-MM-JJ" />
         </div>
      </div>
      <div class="form-group row">
         <div class="col-sm-8 offset-sm-4">
            <input type="hidden" name="op" value="MaintForumTopics" />
            <button class="btn btn-primary" type="submit" name="Topics_Mark">' . adm_translate("Envoyer") . '</button>
         </div>
      </div>
   </form>
   <script>
   $(document).ready(function() {
    $("#embeddingDatePicker")
        .datepicker({
            format: "yyyy-mm-dd",
            language:"' . language_iso(1, '', '') . '",
            title:"Avant cette date"
        })
        .on("changeDate", function(e) {
            $("#before").val($("#embeddingDatePicker").datepicker("getFormattedDate"));
            $("#fad_forumdelete").formValidation("revalidateField", "before");
        });
   });
   </script>';
    $fv_parametres = '
   
              before: {
                excluded: false,
                validators: {
                    notEmpty: {
                        message: "The date is required"
                    },
                    date: {
                        format: "YYYY-MM-DD",
                        message: "The date is not a valid"
                    }
                }
            },
';
    echo auto_complete("forname", "forum_name", "forums", "forum_name", "86400");
    adminfoot('fv', $fv_parametres, '', '');
}
开发者ID:npds,项目名称:npds_dune,代码行数:86,代码来源:phpbbmaint.php

示例10: Ephemeridsedit

function Ephemeridsedit($eid, $did, $mid)
{
    global $hlpfile, $NPDS_Prefix, $f_meta_nom, $f_titre, $adminimg;
    include "header.php";
    GraphicAdmin($hlpfile);
    adminhead($f_meta_nom, $f_titre, $adminimg);
    $result = sql_query("SELECT yid, content FROM " . $NPDS_Prefix . "ephem WHERE eid='{$eid}'");
    list($yid, $content) = sql_fetch_row($result);
    echo '
   <h3>' . adm_translate("Editer Ephéméride") . '</h3>
   <form action="admin.php" method="post">
      <div class="form-group">
          <label class="form-control-label" for="yid">' . adm_translate("Année : ") . '</label>
          <input class="form-control" type="number" name="yid" value="' . $yid . '" max="2500" />
      </div>
      <div class="form-group">
         <label class="form-control-label" for="content">' . adm_translate("Description de l'Ephéméride : ") . '</label>
         <textarea name="content" id="content" cols="55" class="textbox" rows="10">' . $content . '</textarea>
      </div>
      <input type="hidden" name="did" value="' . $did . '" />
      <input type="hidden" name="mid" value="' . $mid . '" />
      <input type="hidden" name="eid" value="' . $eid . '" />
      <input type="hidden" name="op" value="Ephemeridschange" />
      <button class="btn btn-primary" type="submit">' . adm_translate("Envoyer") . '</button>
   </form>';
    include 'footer.php';
}
开发者ID:Jireck-npds,项目名称:npds_dune,代码行数:27,代码来源:ephemerids.php

示例11: publishrights

function publishrights($author)
{
    global $NPDS_Prefix, $hlpfile, $radminsuper, $f_meta_nom, $f_titre, $adminimg;
    if ($radminsuper != 1) {
        Header("Location: admin.php?op=sections");
    }
    include "header.php";
    GraphicAdmin($hlpfile);
    adminhead($f_meta_nom, $f_titre, $adminimg);
    echo '
   <hr />
   <h3 class="mb-1">' . adm_translate("Droits des auteurs") . ' : <span class="text-muted">' . $author . '</span></h3>
   <form action="admin.php" method="post">';
    $result1 = sql_query("SELECT rubid, rubname FROM " . $NPDS_Prefix . "rubriques ORDER BY ordre");
    $numrow = sql_num_rows($result1);
    $i = 0;
    $scrr = '';
    $scrsr = '';
    while (list($rubid, $rubname) = sql_fetch_row($result1)) {
        echo '
         <table data-toggle="table" data-striped="true"  data-icons-prefix="fa" data-icons="icons">
            <thead>
               <tr>
                  <th class="n-t-col-xs-1" data-halign="center" data-align="center"><input id="ckbrall_' . $rubid . '" type="checkbox" /></th>
                  <th class="n-t-col-xs-3" data-sortable="true">';
        echo aff_langue($rubname) . '</th>
                  <th class="n-t-col-xs-2" data-halign="center" data-align="center">' . adm_translate("Créer") . '</th>
                  <th class="n-t-col-xs-2" data-halign="center" data-align="center">' . adm_translate("Publier") . '</th>
                  <th class="n-t-col-xs-2" data-halign="center" data-align="center">' . adm_translate("Modifier") . '</th>
                  <th class="n-t-col-xs-2" data-halign="center" data-align="center">' . adm_translate("Supprimer") . '</th>
               </tr>
            </thead>
            <tbody>';
        $scrr .= '
               $("#ckbrall_' . $rubid . '").change(function(){
                  $(".ckbr_' . $rubid . '").prop("checked", $(this).prop("checked"));
               });';
        $result2 = sql_query("SELECT secid, secname FROM " . $NPDS_Prefix . "sections WHERE rubid='{$rubid}' ORDER BY ordre");
        while (list($secid, $secname) = sql_fetch_row($result2)) {
            $result3 = sql_query("SELECT type FROM " . $NPDS_Prefix . "publisujet WHERE secid2='{$secid}' AND aid='{$author}'");
            $i++;
            $crea = '';
            $publi = '';
            $modif = '';
            $supp = '';
            if (sql_num_rows($result3) > 0) {
                while (list($type) = sql_fetch_row($result3)) {
                    if ($type == 1) {
                        $crea = 'checked="checked"';
                    } else {
                        if ($type == 2) {
                            $publi = 'checked="checked"';
                        } else {
                            if ($type == 3) {
                                $modif = 'checked="checked"';
                            } else {
                                if ($type == 4) {
                                    $supp = 'checked="checked"';
                                }
                            }
                        }
                    }
                }
            }
            echo '
               <tr>
                  <td><input id="ckbsrall_' . $secid . '" type="checkbox" /></td>
                  <td>' . aff_langue($secname) . '</td>
                  <td><input class="ckbsr_' . $secid . ' ckbr_' . $rubid . '" type="checkbox" name="creation[' . $i . ']" value="' . $secid . '" ' . $crea . ' /></td>
                  <td><input class="ckbsr_' . $secid . ' ckbr_' . $rubid . '" type="checkbox" name="publication[' . $i . ']" value="' . $secid . '" ' . $publi . ' /></td>
                  <td><input class="ckbsr_' . $secid . ' ckbr_' . $rubid . '" type="checkbox" name="modification[' . $i . ']" value="' . $secid . '" ' . $modif . ' /></td>
                  <td><input class="ckbsr_' . $secid . ' ckbr_' . $rubid . '" type="checkbox" name="suppression[' . $i . ']" value="' . $secid . '" ' . $supp . ' /></td>
               </tr>';
            $scrsr .= '
               $("#ckbsrall_' . $secid . '").change(function(){
                  $(".ckbsr_' . $secid . '").prop("checked", $(this).prop("checked"));
               });';
        }
        echo '
            </tbody>
         </table>
      <br />';
    }
    echo '<input type="hidden" name="chng_aid" value="' . $author . '" />
         <input type="hidden" name="op" value="updatedroitauteurs" />
         <input type="hidden" name="maxindex" value="' . $i . '" />
         <input class="btn btn-primary" type="submit" value="' . adm_translate("Valider") . '" />&nbsp;&nbsp;
         <input class="btn btn-secondary" type="button" onclick="javascript:history.back()" value="' . adm_translate("Retour en arrière") . '" />
         </form>';
    echo '
   <script type="text/javascript">
   //<![CDATA[
   $(document).ready(function(){
   ' . $scrr . $scrsr . '
   });
   //]]>
   </script>';
    include "footer.php";
}
开发者ID:npds,项目名称:npds_dune,代码行数:99,代码来源:sections.php

示例12: updateUser

function updateUser($chng_uid, $chng_uname, $chng_name, $chng_url, $chng_email, $chng_femail, $chng_user_from, $chng_user_occ, $chng_user_intrest, $chng_user_viewemail, $chng_avatar, $chng_user_sig, $chng_bio, $chng_pass, $chng_pass2, $level, $open_user, $chng_groupe, $chng_send_email, $chng_is_visible, $chng_mns, $C1, $C2, $C3, $C4, $C5, $C6, $C7, $C8, $M1, $M2, $T1, $T2, $B1, $raz_avatar, $chng_rank, $chng_lnl)
{
    global $NPDS_Prefix;
    $tmp = 0;
    if ($chng_pass2 != '') {
        if ($chng_pass != $chng_pass2) {
            global $hlpfile, $f_meta_nom, $f_titre, $adminimg;
            include "header.php";
            GraphicAdmin($hlpfile);
            adminhead($f_meta_nom, $f_titre, $adminimg);
            echo error_handler(adm_translate("Désolé, les nouveaux Mots de Passe ne correspondent pas. Cliquez sur retour et recommencez") . "<br />");
            adminfoot('', '', '', '');
            return;
        }
        $tmp = 1;
    }
    $result = sql_query("SELECT mns FROM " . $NPDS_Prefix . "users WHERE uid='{$chng_uid}'");
    list($tmp_mns) = sql_fetch_row($result);
    if ($tmp_mns == 0 and $chng_mns == 1) {
        Minisites($chng_mns, $chng_uname);
    }
    if ($chng_send_email == '') {
        $chng_send_email = '0';
    }
    if ($chng_is_visible == '') {
        $chng_is_visible = '1';
    } else {
        $chng_is_visible = '0';
    }
    if ($raz_avatar) {
        $chng_avatar = "blank.gif";
    }
    if ($tmp == 0) {
        sql_query("UPDATE " . $NPDS_Prefix . "users SET uname='{$chng_uname}', name='{$chng_name}', email='{$chng_email}', femail='{$chng_femail}', url='{$chng_url}', user_from='{$chng_user_from}', user_occ='{$chng_user_occ}', user_intrest='{$chng_user_intrest}', user_viewemail='{$chng_user_viewemail}', user_avatar='{$chng_avatar}', user_sig='{$chng_user_sig}', bio='{$chng_bio}', send_email='{$chng_send_email}', is_visible='{$chng_is_visible}', mns='{$chng_mns}', user_lnl='{$chng_lnl}' WHERE uid='{$chng_uid}'");
    }
    if ($tmp == 1) {
        global $system;
        if (!$system) {
            $cpass = crypt($chng_pass, $chng_pass);
        } else {
            $cpass = $chng_pass;
        }
        sql_query("UPDATE " . $NPDS_Prefix . "users SET uname='{$chng_uname}', name='{$chng_name}', email='{$chng_email}', femail='{$chng_femail}', url='{$chng_url}', user_from='{$chng_user_from}', user_occ='{$chng_user_occ}', user_intrest='{$chng_user_intrest}', user_viewemail='{$chng_user_viewemail}', user_avatar='{$chng_avatar}', user_sig='{$chng_user_sig}', bio='{$chng_bio}', send_email='{$chng_send_email}', is_visible='{$chng_is_visible}', mns='{$chng_mns}', pass='{$cpass}', user_lnl='{$chng_lnl}' WHERE uid='{$chng_uid}'");
    }
    if ($chng_user_viewemail) {
        $attach = 1;
    } else {
        $attach = 0;
    }
    if ($open_user == '') {
        $open_user = 0;
    }
    if (preg_match('#[a-zA-Z_]#', $chng_groupe)) {
        $chng_groupe = '';
    }
    if ($chng_groupe != '') {
        $tab_groupe = explode(',', $chng_groupe);
        if ($tab_groupe) {
            foreach ($tab_groupe as $groupevalue) {
                if ($groupevalue == "0" and $groupevalue != '') {
                    $chng_groupe = '';
                }
                if ($groupevalue == "1") {
                    $chng_groupe = '';
                }
                if ($groupevalue > "127") {
                    $chng_groupe = '';
                }
            }
        }
    }
    sql_query("UPDATE " . $NPDS_Prefix . "users_status SET attachsig='{$attach}', level='{$level}', open='{$open_user}', groupe='{$chng_groupe}', rank='{$chng_rank}' WHERE uid='{$chng_uid}'");
    sql_query("UPDATE " . $NPDS_Prefix . "users_extend SET C1='{$C1}', C2='{$C2}', C3='{$C3}', C4='{$C4}', C5='{$C5}', C6='{$C6}', C7='{$C7}', C8='{$C8}', M1='{$M1}', M2='{$M2}', T1='{$T1}', T2='{$T2}', B1='{$B1}' WHERE uid='{$chng_uid}'");
    global $aid;
    Ecr_Log("security", "UpdateUser({$chng_uid}, {$chng_uname}) by AID : {$aid}", "");
    global $referer;
    if ($referer != "memberslist.php") {
        Header("Location: admin.php?op=mod_users");
    } else {
        Header("Location: memberslist.php");
    }
}
开发者ID:npds,项目名称:npds_dune,代码行数:82,代码来源:users.php

示例13: send_email_to_user

function send_email_to_user($username, $subject, $message, $all, $groupe, $expediteur)
{
    global $NPDS_Prefix, $f_meta_nom, $f_titre, $adminimg;
    if ($subject != '') {
        if ($expediteur == 1) {
            $emetteur = 1;
        } else {
            global $user;
            if ($user) {
                $userX = base64_decode($user);
                $userdata = explode(':', $userX);
                $emetteur = $userdata[0];
            } else {
                $emetteur = 1;
            }
        }
        if ($all) {
            $result = sql_query("SELECT uid, user_langue FROM " . $NPDS_Prefix . "users");
            while (list($to_userid, $user_langue) = sql_fetch_row($result)) {
                $tab_to_userid[] = $to_userid . ':' . $user_langue;
            }
        } else {
            if ($groupe) {
                $result = sql_query("SELECT s.uid, s.groupe, u.user_langue FROM " . $NPDS_Prefix . "users_status s, " . $NPDS_Prefix . "users u WHERE s.uid=u.uid AND s.groupe!='' ORDER BY s.uid ASC");
                while (list($to_userid, $groupeX, $user_langue) = sql_fetch_row($result)) {
                    $tab_groupe = explode(',', $groupeX);
                    if ($tab_groupe) {
                        foreach ($tab_groupe as $groupevalue) {
                            if ($groupevalue == $groupe) {
                                $tab_to_userid[] = $to_userid . ':' . $user_langue;
                            }
                        }
                    }
                }
            } else {
                $result = sql_query("SELECT uid, user_langue FROM " . $NPDS_Prefix . "users WHERE uname='{$username}'");
                while (list($to_userid, $user_langue) = sql_fetch_row($result)) {
                    $tab_to_userid[] = $to_userid . ':' . $user_langue;
                }
            }
        }
        if ($subject == '' or $message == '') {
            header("location: admin.php");
        }
        $message = str_replace('\\n', '<br />', $message);
        global $gmt;
        $time = date(translate("dateinternal"), time() + $gmt * 3600);
        $pasfin = false;
        $count = 0;
        include_once "language/lang-multi.php";
        while ($count < sizeof($tab_to_userid)) {
            $to_tmp = explode(':', $tab_to_userid[$count]);
            $to_userid = $to_tmp[0];
            if ($to_userid != '' and $to_userid != 1) {
                $sql = "INSERT INTO " . $NPDS_Prefix . "priv_msgs (msg_image, subject, FROM_userid, to_userid, msg_time, msg_text) ";
                $sql .= "VALUES ('{$image}', '{$subject}', '{$emetteur}', '{$to_userid}', '{$time}', '{$message}')";
                if ($resultX = sql_query($sql)) {
                    $pasfin = true;
                }
                // A copy in email if necessary
                global $nuke_url, $subscribe;
                if ($subscribe) {
                    $old_message = $message;
                    $sujet = translate_ml($to_tmp[1], 'Vous avez un nouveau message.');
                    $message = translate_ml($to_tmp[1], 'Bonjour') . ",<br /><br /><a href=\"{$nuke_url}/viewpmsg.php\">" . translate_ml($to_tmp[1], "Cliquez ici pour lire votre nouveau message.") . "</a><br /><br />";
                    include "signat.php";
                    copy_to_email($to_userid, $sujet, $message);
                    $message = $old_message;
                }
            }
            $count++;
        }
    }
    global $aid;
    Ecr_Log('security', "SendEmailToUser({$subject}) by AID : {$aid}", '');
    global $hlpfile;
    include 'header.php';
    GraphicAdmin($hlpfile);
    adminhead($f_meta_nom, $f_titre, $adminimg);
    echo '
   <hr />';
    if ($pasfin) {
        echo '
   <div class="alert alert-success"><strong>"' . stripslashes($subject) . '"</strong> ' . adm_translate("a été envoyée") . '.</div>';
    } else {
        echo '
   <div class="alert alert-danger"><strong>"' . stripslashes($subject) . '"</strong>' . adm_translate("n'a pas été envoyée") . '.</div>';
    }
    adminfoot('', '', '', '');
}
开发者ID:npds,项目名称:npds_dune,代码行数:90,代码来源:email_user.php

示例14: edito

function edito($edito_type, $contents, $Xaff_jours, $Xaff_jour, $Xaff_nuit)
{
    global $hlpfile, $language, $f_meta_nom, $f_titre, $adminimg;
    include "header.php";
    GraphicAdmin($hlpfile);
    adminhead($f_meta_nom, $f_titre, $adminimg);
    if ($contents == '') {
        echo '
      <form id="fad_edi_choix" action="admin.php?op=Edito_load" method="post">
         <fieldset>
            <legend>' . adm_translate("Type d'éditorial") . '</legend>
            <div class="form-group">
               <select class="c-select form-control" name="edito_type" onchange="submit()">
                  <option value="0">' . adm_translate("Modifier l'Editorial") . ' ...</option>
                  <option value="G">' . adm_translate("Anonyme") . '</option>
                  <option value="M">' . adm_translate("Membre") . '</option>
               </select>
            </div>
         </fieldset>
      </form>';
    } else {
        if ($edito_type == 'G') {
            $edito_typeL = ' ' . adm_translate("Anonyme");
        } elseif ($edito_type == 'M') {
            $edito_typeL = ' ' . adm_translate("Membre");
        }
        if (strpos($contents, "[/jour]") > 0) {
            $contentJ = substr($contents, strpos($contents, "[jour]") + 6, strpos($contents, "[/jour]") - 6);
            $contentN = substr($contents, strpos($contents, "[nuit]") + 6, strpos($contents, "[/nuit]") - 19 - strlen($contentJ));
        }
        if (!$contentJ and !$contentN and !strpos($contents, "[/jour]")) {
            $contentJ = $contents;
        }
        echo '
      <form id="fad_edi_mod" action="admin.php" method="post" name="adminForm">
      <fieldset>
         <legend>' . adm_translate("Edito") . ' :' . $edito_typeL . '</legend>
         <div class="form-group">
            <label class="form-control-label" for="XeditoJ">' . adm_translate("Le jour") . '</label>';
        echo aff_editeur("XeditoJ", "false");
        echo '
            <textarea class="tin form-control" name="XeditoJ" rows="20" >';
        echo htmlspecialchars($contentJ, ENT_COMPAT | ENT_SUBSTITUTE | ENT_HTML401, cur_charset);
        echo '</textarea>
         </div>
         <div class="form-group">
            <label class="form-control-label" for="XeditoN">' . adm_translate("La nuit") . '</label>';
        echo aff_editeur("XeditoN", "false");
        echo '
            <textarea class="tin form-control" name="XeditoN" rows="20">';
        echo htmlspecialchars($contentN, ENT_COMPAT | ENT_SUBSTITUTE | ENT_HTML401, cur_charset);
        echo '</textarea>
         </div>
         <div class="form-group">
         <div class="row">
            <label class="col-sm-4 form-control-label" for="aff_jours">' . adm_translate("Afficher pendant") . '</label>
            <div class="col-sm-8">
               <div class="input-group">
                  <span class="input-group-addon">' . adm_translate("jour(s)") . '</span>
                  <input class="form-control" type="number" name="aff_jours" id="aff_jours" min="0" step="1" max="999" value="' . $Xaff_jours . '" data-fv-digits="true" required="required" />
               </div>
            </div>
         </div>
      </div>
         <div class="col-sm-offset-4 col-sm-8">
         <div class="form-group">
            <label class="checkbox-inline">
               <input type="checkbox" name="aff_jour" value="checked" ' . $Xaff_jour . ' />' . adm_translate("Le jour") . '
            </label> 
            <label class="checkbox-inline">
               <input type="checkbox" name="aff_nuit" value="checked" ' . $Xaff_nuit . ' />' . adm_translate("La nuit") . '
            </label>
            </div>
         </div>
      <input type="hidden" name="op" value="Edito_save" />
      <input type="hidden" name="edito_type" value="' . $edito_type . '" />
      <div class="form-group row">
         <div class="col-sm-offset-4 col-sm-8">
            <button class="btn btn-primary col-xs-12" type="submit" name="edito_confirm"><i class="fa fa-check fa-lg"></i>&nbsp;' . adm_translate("Sauver les modifications") . ' </button>
         </div>
         <div class="col-sm-offset-4 col-sm-8">
            <a href="admin.php?op=Edito" class="btn btn-secondary col-xs-12">' . adm_translate("Abandonner") . '</a>
         </div>
      </div>
      </fieldset>
      </form>';
    }
    adminfoot('fv', '', '', '');
}
开发者ID:Jireck-npds,项目名称:npds_dune,代码行数:89,代码来源:adminedito.php

示例15: HeadlinesDel

function HeadlinesDel($hid, $ok = 0)
{
    global $NPDS_Prefix;
    if ($ok == 1) {
        sql_query("DELETE FROM " . $NPDS_Prefix . "headlines WHERE hid='{$hid}'");
        Header("Location: admin.php?op=HeadlinesAdmin");
    } else {
        global $hlpfile;
        include "header.php";
        GraphicAdmin($hlpfile);
        echo "<p align=\"center\"><br />";
        echo "<span class=\"rouge\">";
        echo "<b>" . adm_translate("Etes-vous sûr de vouloir supprimer cette boÓte de Titres ?") . "</b><br /><br /></span>";
    }
    echo "[ <a href=\"admin.php?op=HeadlinesDel&amp;hid={$hid}&amp;ok=1\" class=\"rouge\">" . adm_translate("Oui") . "</a> | <a href=\"admin.php?op=HeadlinesAdmin\" class=\"noir\">" . adm_translate("Non") . "</a> ]<br /><br />";
    include "footer.php";
}
开发者ID:Jireck-npds,项目名称:npds_dune,代码行数:17,代码来源:headlines.php


注:本文中的adm_translate函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。