コード例 #1
0
ファイル: minisite.php プロジェクト: Jireck-npds/npds_dune
function MNSremoveHack($Xstring)
{
    global $op, $userdata, $tiny_mce, $tiny_mce_theme, $tiny_mce_relurl;
    static $blog_editor;
    if ($tiny_mce) {
        if (!$blog_editor) {
            $tiny_mce_theme = "full";
            $blog_editor = aff_editeur("tiny_mce", "begin") . aff_editeur("story", "false") . aff_editeur("tiny_mce", "end");
        }
    }
    $npds_forbidden_words = array("'&#(33|x21|65281|xFF01);'i" => chr(33), "'&#(34|x22|65282|xFF02);'i" => chr(34), "'&#(35|x23|65283|xFF03);'i" => chr(35), "'&#(36|x24|65284|xFF04);'i" => chr(36), "'&#(37|x25|65285|xFF05);'i" => chr(37), "'&#(38|x26|65286|xFF06);'i" => chr(38), "'&#(39|x27|65287|xFF07);'i" => chr(39), "'&#(40|x28|65288|xFF08);'i" => chr(40), "'&#(41|x29|65289|xFF09);'i" => chr(41), "'&#(42|x2A|65290|xFF0A);'i" => chr(42), "'&#(43|x2B|65291|xFF0B);'i" => chr(43), "'&#(44|x2C|65292|xFF0C);'i" => chr(44), "'&#(45|x2D|65293|xFF0D);'i" => chr(45), "'&#(46|x2E|65294|xFF0E);'i" => chr(46), "'&#(47|x2F|65295|xFF0F);'i" => chr(47), "'&#(48|x30|65296|xFF10);'i" => chr(48), "'&#(49|x31|65297|xFF11);'i" => chr(49), "'&#(50|x32|65298|xFF12);'i" => chr(50), "'&#(51|x33|65299|xFF13);'i" => chr(51), "'&#(52|x34|65300|xFF14);'i" => chr(52), "'&#(53|x35|65301|xFF15);'i" => chr(53), "'&#(54|x36|65302|xFF16);'i" => chr(54), "'&#(55|x37|65303|xFF17);'i" => chr(55), "'&#(56|x38|65304|xFF18);'i" => chr(56), "'&#(57|x39|65305|xFF19);'i" => chr(57), "'&#(58|x3A|65306|xFF1A);'i" => chr(58), "'&#(59|x3B|65307|xFF1B);'i" => chr(59), "'&#(60|x3C|65308|xFF1C);'i" => chr(60), "'&#(61|x3D|65309|xFF1D);'i" => chr(61), "'&#(62|x3E|65310|xFF1E);'i" => chr(62), "'&#(63|x3F|65311|xFF1F);'i" => chr(63), "'&#(64|x40|65312|xFF20);'i" => chr(64), "'&#(65|x41|65313|xFF21);'i" => chr(65), "'&#(66|x42|65314|xFF22);'i" => chr(66), "'&#(67|x43|65315|xFF23);'i" => chr(67), "'&#(68|x44|65316|xFF24);'i" => chr(68), "'&#(69|x45|65317|xFF25);'i" => chr(69), "'&#(70|x46|65318|xFF26);'i" => chr(70), "'&#(71|x47|65319|xFF27);'i" => chr(71), "'&#(72|x48|65320|xFF28);'i" => chr(72), "'&#(73|x49|65321|xFF29);'i" => chr(73), "'&#(74|x4A|65322|xFF2A);'i" => chr(74), "'&#(75|x4B|65323|xFF2B);'i" => chr(75), "'&#(76|x4C|65324|xFF2C);'i" => chr(76), "'&#(77|x4D|65325|xFF2D);'i" => chr(77), "'&#(78|x4E|65326|xFF2E);'i" => chr(78), "'&#(79|x4F|65327|xFF2F);'i" => chr(79), "'&#(80|x50|65328|xFF30);'i" => chr(80), "'&#(81|x51|65329|xFF31);'i" => chr(81), "'&#(82|x52|65330|xFF32);'i" => chr(82), "'&#(83|x53|65331|xFF33);'i" => chr(83), "'&#(84|x54|65332|xFF34);'i" => chr(84), "'&#(85|x55|65333|xFF35);'i" => chr(85), "'&#(86|x56|65334|xFF36);'i" => chr(86), "'&#(87|x57|65335|xFF37);'i" => chr(87), "'&#(88|x58|65336|xFF38);'i" => chr(88), "'&#(89|x59|65337|xFF39);'i" => chr(89), "'&#(90|x5A|65338|xFF3A);'i" => chr(90), "'&#(91|x5B|65339|xFF3B);'i" => chr(91), "'&#(92|x5C|65340|xFF3C);'i" => chr(92), "'&#(93|x5D|65341|xFF3D);'i" => chr(93), "'&#(94|x5E|65342|xFF3E);'i" => chr(94), "'&#(95|x5F|65343|xFF3F);'i" => chr(95), "'&#(96|x60|65344|xFF40);'i" => chr(96), "'&#(97|x61|65345|xFF41);'i" => chr(97), "'&#(98|x62|65346|xFF42);'i" => chr(98), "'&#(99|x63|65347|xFF43);'i" => chr(99), "'&#(100|x64|65348|xFF44);'i" => chr(100), "'&#(101|x65|65349|xFF45);'i" => chr(101), "'&#(102|x66|65350|xFF46);'i" => chr(102), "'&#(103|x67|65351|xFF47);'i" => chr(103), "'&#(104|x68|65352|xFF48);'i" => chr(104), "'&#(105|x69|65353|xFF49);'i" => chr(105), "'&#(106|x6A|65354|xFF4A);'i" => chr(106), "'&#(107|x6B|65355|xFF4B);'i" => chr(107), "'&#(108|x6C|65356|xFF4C);'i" => chr(108), "'&#(109|x6D|65357|xFF4D);'i" => chr(109), "'&#(110|x6E|65358|xFF4E);'i" => chr(110), "'&#(111|x6F|65359|xFF4F);'i" => chr(111), "'&#(112|x70|65360|xFF50);'i" => chr(112), "'&#(113|x71|65361|xFF51);'i" => chr(113), "'&#(114|x72|65362|xFF52);'i" => chr(114), "'&#(115|x73|65363|xFF53);'i" => chr(115), "'&#(116|x74|65364|xFF54);'i" => chr(116), "'&#(117|x75|65365|xFF55);'i" => chr(117), "'&#(118|x76|65366|xFF56);'i" => chr(118), "'&#(119|x77|65367|xFF57);'i" => chr(119), "'&#(120|x78|65368|xFF58);'i" => chr(120), "'&#(121|x79|65369|xFF59);'i" => chr(121), "'&#(122|x7A|65370|xFF5A);'i" => chr(122), "'&#(123|x7B|65371|xFF5B);'i" => chr(123), "'&#(124|x7C|65372|xFF5C);'i" => chr(124), "'&#(125|x7D|65373|xFF5D);'i" => chr(125), "'&#(126|x7E|65374|xFF5E);'i" => chr(126), "'&#(8232|x2028);'i" => "_", "'&#(8233|x2029);'i" => "_", "'&#(8234|x202A);'i" => "_", "'&#(8235|x202B);'i" => "_", "'&#(8236|x202C);'i" => "_", "'&#(8237|x202D);'i" => "_", "'&#(8238|x202E);'i" => "_", "'&#(8298|x206A);'i" => "_", "'&#(8299|x206B);'i" => "_", "'&#(8300|x206C);'i" => "_", "'&#(8301|x206D);'i" => "_", "'&#(8302|x206E);'i" => "_", "'&#(8303|x206F);'i" => "_", "'&#(65529|xFFF9);'i" => "_", "'&#(65530|xFFFA);'i" => "_", "'&#(65531|xFFFB);'i" => "_", "'&#(65532|xFFFC);'i" => "_", "'&#(65279|xFEFF);'i" => "&#x2060;", "'&#(119155|x1D173);'i" => "_", "'&#(119156|x1D174);'i" => "_", "'&#(119157|x1D175);'i" => "_", "'&#(119158|x1D176);'i" => "_", "'&#(119159|x1D177);'i" => "_", "'&#(119160|x1D178);'i" => "_", "'&#(119161|x1D179);'i" => "_", "'&#(119162|x1D17A);'i" => "_", "'&#xE000(0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F);'i" => "_", "'&#xE001(0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F);'i" => "_", "'&#xE002(0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F);'i" => "_", "'&#xE003(0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F);'i" => "_", "'&#xE004(0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F);'i" => "_", "'&#xE005(0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F);'i" => "_", "'&#xE006(0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F);'i" => "_", "'&#xE007(0|1|2|3|4|5|6|7|8|9|A|B|C|D|E|F);'i" => "_", "'&#91750(4|5|6|7|8|9);'i" => "_", "'&#91751(0|1|2|3|4|5|6|7|8|9);'i" => "_", "'&#91752(0|1|2|3|4|5|6|7|8|9);'i" => "_", "'&#91753(0|1|2|3|4|5|6|7|8|9);'i" => "_", "'&#91754(0|1|2|3|4|5|6|7|8|9);'i" => "_", "'&#91755(0|1|2|3|4|5|6|7|8|9);'i" => "_", "'&#91756(0|1|2|3|4|5|6|7|8|9);'i" => "_", "'&#91757(0|1|2|3|4|5|6|7|8|9);'i" => "_", "'&#91758(0|1|2|3|4|5|6|7|8|9);'i" => "_", "'&#91759(0|1|2|3|4|5|6|7|8|9);'i" => "_", "'&#91760(0|1|2|3|4|5|6|7|8|9);'i" => "_", "'&#91761(0|1|2|3|4|5|6|7|8|9);'i" => "_", "'&#91762(0|1|2|3|4|5|6|7|8|9);'i" => "_", "'&#91763(0|1|);'i" => "_", "'from:'i" => "!from:!", "'subject:'i" => "!subject:!", "'bcc:'i" => "!bcc:!", "'mime-version:'i" => "!mime-version:!", "'base64'i" => "base_64", "'content-type:'i" => "!content-type:!", "'content-transfer-encoding:'i" => "!content-transfer-encoding:!", "'content-disposition:'i" => "!content-disposition:!", "'content-location:'i" => "!content-location:!", "'include'i" => "!include!", "'<script'i" => "&lt;script", "'</script'i" => "&lt;/script", "'javascript'i" => "!javascript!", "'embed'i" => "!embed!", "'iframe'i" => "!iframe!", "'refresh'i" => "!refresh!", "'document\\.cookie'i" => "!document.cookie!", "'onload'i" => "!onload!", "'onstart'i" => "!onstart!", "'onerror'i" => "!onerror!", "'onkey'i" => "!onkey!", "'onmouse'i" => "!onmouse!", "'onclick'i" => "!onclick!", "'ondblclick'i" => "!ondblclick!", "'onhelp'i" => "!onhelp!", "'onmousedown'i" => "!onmousedown!", "'onmousemove'i" => "!onmousemove!", "'onmouseout'i" => "!onmouseout!", "'onmouseover'i" => "!onmouseover!", "'onmouseup'i" => "!onmouseup!", "'onblur'i" => "!onblur!", "'onafterupdate'i" => "!onafterupdate!", "'onbeforeupdate'i" => "!onbeforeupdate!", "'onkeydown'i" => "!onkeydown!", "'onkeypress'i" => "!onkeypress!", "'onkeyup'i" => "!onkeyup!", "'onfocus'i" => "!onfocus!", "'onunload'i" => "!onunload!", "'jscript'i" => "!jscript!", "'vbscript'i" => "!vbscript!", "'pearlscript'i" => "!pearlscript!", "'&#(8216|x2018);'i" => chr(39), "'&#(8217|x2019);'i" => chr(39), "'&#39;'i" => '\\\'', "'&#(8220|x201C);'i" => chr(34), "'&#(8221|x201D);'i" => chr(34), "'&#160;'i" => '&nbsp;', "'.htaccess'i" => "", "'!blog_editeur!'i" => $blog_editor, "'!l_blog_ajouterOK!'i" => "<a class=\"btn btn-secondary\" href=\"minisite.php?op={$op}&amp;action=A\" class=\"blog_lien\">" . translate("Add articles") . "</a>", "'\\<\\?php'i" => "&lt;?php", "'\\<\\?'i" => "&lt;?", "'\\?\\>'i" => "?&gt;", "'\\<\\%'i" => "&lt;%", "'\\%\\>'i" => "%&gt;");
    $Xstring = preg_replace(array_keys($npds_forbidden_words), array_values($npds_forbidden_words), $Xstring);
    return $Xstring;
}
コード例 #2
0
ファイル: email_user.php プロジェクト: npds/npds_dune
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', '', '', '');
}
コード例 #3
0
ファイル: adminedito.php プロジェクト: Jireck-npds/npds_dune
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', '', '', '');
}
コード例 #4
0
ファイル: f-manager.php プロジェクト: npds/npds_dune
     popup = window.open('', 'imagePreview', 'width=600,height=450,left=100,top=75,screenX=100,screenY=75,scrollbars,location,menubar,status,toolbar,resizable=1');

     //start writing in the html code
     popup.document.writeln("<html><body style='background-color: #FFFFFF;'>");
     popup.document.writeln("<img src='" + filename + "'></body></html>");
   }
   //]]>
   </script>
   <?php 
    // l'insertion de la FORM d'édition doit intervenir à la fin du calcul de l'interface ... sinon on modifie le contenu
    // Meta_lang n'est pas chargé car trop lent pour une utilisation sur de gros répertoires
    $Xcontent = aff_langue($Xcontent);
    $Xcontent = str_replace("_edt_file", $edit_file, $Xcontent);
    echo $Xcontent;
    // Foot banner de présentation F-Manager
    if (file_exists("themes/{$Default_Theme}/html/modules/f-manager/foot.html")) {
        echo "\n";
        include "themes/{$Default_Theme}/html/modules/f-manager/foot.html";
        echo "\n";
    }
    if (!$NPDS_fma) {
        echo "</body></html>";
        if ($tiny_mce) {
            if ($tiny_mce_init) {
                echo aff_editeur("tiny_mce", "end");
            }
        }
    } else {
        include "footer.php";
    }
}
コード例 #5
0
ファイル: email_user.php プロジェクト: Jireck-npds/npds_dune
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 '
      <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">
               <div class="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>
            <div class="form-group">
               <div class="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="' . $uname . '" />
                  </div>
               </div>
            </div>
            <div class="form-group">
               <div class="row">
                  <label class="form-control-label col-sm-4" for="groupe">' . adm_translate("Groupe") . '</label>
                  <div class="col-sm-8">
                     <select id="groupe" class="c-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>
            <div class="form-group">
               <div class="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>
            <div class="form-group">
               <div class="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" size="100" name="subject" />
                  </div>
               </div>
            </div>
            <div class="form-group">
               <div class="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>
            </div>';
    echo aff_editeur("AdmMI", "true");
    echo '
      <div class="form-group">
         <div class="row">
            <div class="col-sm-12">
               <button type="submit" class="btn btn-primary">' . adm_translate("Envoyer") . '</button>
            </div>
         </div>
      </div>
      </fieldset>
   </form>';
    adminfoot('fv', '', '', '');
}
コード例 #6
0
ファイル: links-1.php プロジェクト: Jireck-npds/npds_dune
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', '', '', '');
}
コード例 #7
0
ファイル: sections.php プロジェクト: Jireck-npds/npds_dune
function secartupdate($artid)
{
    global $hlpfile, $aid, $radminsuper;
    global $NPDS_Prefix;
    $result = sql_query("SELECT author, artid, secid, title, content, userlevel, crit1, crit2, crit3, crit4, crit5, crit6, crit7, crit8, crit9, crit10, crit11, crit12, crit13, crit14, crit15, crit16, crit17, crit18, crit19, crit20 FROM " . $NPDS_Prefix . "seccont_tempo WHERE artid='{$artid}'");
    list($author, $artid, $secid, $title, $content, $userlevel, $crit1, $crit2, $crit3, $crit4, $crit5, $crit6, $crit7, $crit8, $crit9, $crit10, $crit11, $crit12, $crit13, $crit14, $crit15, $crit16, $crit17, $crit18, $crit19, $crit20) = sql_fetch_row($result);
    $testpubli = sql_query("SELECT type FROM " . $NPDS_Prefix . "publisujet WHERE secid2='{$secid}' and aid='{$aid}' and type='1'");
    list($test_publi) = sql_fetch_row($testpubli);
    if ($test_publi == 1) {
        $debut = "<span class=\"text-danger\">" . adm_translate("Vos droits de publications vous permettent de mettre à jour ou de supprimer ce contenu mais pas de la mettre en ligne sur le site.") . "<br /></span>";
        $fin = "<select class=\"textbox_standard form-control \" name=\"op\">\n      <option value=\"secartchangeup\" selected=\"selected\">" . adm_translate("Mettre à jour") . "</option>\n      <option value=\"secartdelete2\">" . adm_translate("Supprimer") . "</option>\n      </select>&nbsp;&nbsp;<input type=\"submit\" class=\"bouton_standard\" name=\"submit\" value=\"" . adm_translate("Ok") . "\" />";
    }
    $testpubli = sql_query("SELECT type FROM " . $NPDS_Prefix . "publisujet WHERE secid2='{$secid}' and aid='{$aid}' and type='2'");
    list($test_publi) = sql_fetch_row($testpubli);
    if ($test_publi == 2 or $radminsuper == 1) {
        $debut = "<span class=\"text-danger\">" . adm_translate("Vos droits de publications vous permettent de mettre à jour, de supprimer ou de le mettre en ligne sur le site ce contenu.") . "<br /></span>";
        $fin = "<select class=\"textbox_standard form-control\" name=\"op\">\n      <option value=\"secartchangeup\" selected=\"selected\">" . adm_translate("Mettre à jour") . "</option>\n      <option value=\"secartdelete2\">" . adm_translate("Supprimer") . "</option>\n      <option value=\"secartpublish\">" . adm_translate("Publier") . "</option>\n      </select>&nbsp;&nbsp;<input type=\"submit\" class=\"bouton_standard\" name=\"submit\" value=\"" . adm_translate("Ok") . "\" />";
    }
    $fin .= "&nbsp;&nbsp;<input class=\"bouton_standard\" type=\"button\" value=\"" . adm_translate("Retour en arrière") . "\" onclick=\"javascript:history.back()\" />";
    include "header.php";
    GraphicAdmin($hlpfile);
    opentable();
    echo '<h3>' . adm_translate("Editer une publication") . '</h3>';
    echo "<br />\n";
    echo $debut;
    echo "<br />\n";
    $title = stripslashes($title);
    $content = stripslashes($content);
    echo "<table border=\"0\" width=\"100%\" cellpadding=\"2\" cellspacing=\"1\">\n      <form action=\"admin.php\" method=\"post\" name=\"adminForm\"><input type=\"hidden\" name=\"artid\" value=\"{$artid}\" />";
    $rowcolor = tablos();
    echo "<tr {$rowcolor}><td width=\"20%\"><b>" . adm_translate("sous-rubrique") . "</b></td>";
    echo "<td width=\"80%\">";
    $tmp_autorise = sousrub_select($secid);
    if ($tmp_autorise) {
        echo $tmp_autorise;
    } else {
        $result = sql_query("SELECT secname FROM " . $NPDS_Prefix . "sections WHERE secid='{$secid}'");
        list($secname) = sql_fetch_row($result);
        echo "<b>" . aff_langue($secname) . "</b>";
        echo "<input type=\"hidden\" name=\"secid\" value=\"{$secid}\" />";
    }
    echo "</td></tr>";
    echo "<tr {$rowcolor}><td><b>" . adm_translate("Titre") . "</b></td>";
    echo "<td><textarea class=\"textbox_no_mceEditor\" name=\"title\" cols=\"60\" rows=\"2\">{$title}</textarea></td></tr>";
    echo "<tr {$rowcolor}><td><b>" . adm_translate("Contenu") . "</b></td>";
    echo "<td><textarea class=\"textbox\" name=\"content\" cols=\"60\" rows=\"30\" style=\"width: 100%;\">{$content}</textarea>";
    echo aff_editeur("content", "false");
    echo '</td></tr>';
    echo "<input type=\"hidden\" name=\"crit1\" value=\"{$crit1}\" /><input type=\"hidden\" name=\"crit2\" value=\"{$crit2}\" />\n            <input type=\"hidden\" name=\"crit3\" value=\"{$crit3}\" /><input type=\"hidden\" name=\"crit4\" value=\"{$crit4}\" />\n            <input type=\"hidden\" name=\"crit5\" value=\"{$crit5}\" /><input type=\"hidden\" name=\"crit6\" value=\"{$crit6}\" />\n            <input type=\"hidden\" name=\"crit7\" value=\"{$crit7}\" /><input type=\"hidden\" name=\"crit8\" value=\"{$crit8}\" />\n            <input type=\"hidden\" name=\"crit9\" value=\"{$crit9}\" /><input type=\"hidden\" name=\"crit10\" value=\"{$crit10}\" />\n            <input type=\"hidden\" name=\"crit11\" value=\"{$crit11}\" /><input type=\"hidden\" name=\"crit12\" value=\"{$crit12}\" />\n            <input type=\"hidden\" name=\"crit13\" value=\"{$crit13}\" /><input type=\"hidden\" name=\"crit14\" value=\"{$crit14}\" />\n            <input type=\"hidden\" name=\"crit15\" value=\"{$crit15}\" /><input type=\"hidden\" name=\"crit16\" value=\"{$crit16}\" />\n            <input type=\"hidden\" name=\"crit17\" value=\"{$crit17}\" /><input type=\"hidden\" name=\"crit18\" value=\"{$crit18}\" />\n            <input type=\"hidden\" name=\"crit19\" value=\"{$crit19}\" /><input type=\"hidden\" name=\"crit20\" value=\"{$crit20}\" />";
    echo "<tr {$rowcolor}><td></td><td>";
    droits($userlevel);
    echo "</td></tr><tr {$rowcolor}><td colspan=\"2\">" . $fin . "</td><tr>";
    echo '</form></table>';
    closetable();
    include "footer.php";
}
コード例 #8
0
ファイル: footer.php プロジェクト: npds/npds_dune
        if ($cookie[9] == '') {
            $cookie[9] = $Default_Theme;
        }
        if (!($file = @opendir("themes/{$cookie['9']}"))) {
            include "themes/{$Default_Theme}/footer.php";
        } else {
            include "themes/{$cookie['9']}/footer.php";
        }
    } else {
        include "themes/{$Default_Theme}/footer.php";
    }
    $cookie9 = $cookie[9];
}
global $tiny_mce, $cookie9, $Default_Theme;
if ($tiny_mce) {
    echo aff_editeur('tiny_mce', 'end');
}
// include externe file from modules/include for functions, codes ...
if (file_exists("modules/include/footer_before.inc")) {
    include "modules/include/footer_before.inc";
}
foot();
// include externe file from modules/themes include for functions, codes ...
if (isset($user)) {
    if (file_exists("themes/{$cookie9}/include/footer_after.inc")) {
        include "themes/{$cookie9}/include/footer_after.inc";
    } else {
        if (file_exists("modules/include/footer_after.inc")) {
            include "modules/include/footer_after.inc";
        }
    }
コード例 #9
0
ファイル: links.php プロジェクト: Jireck-npds/npds_dune
function LinksModLink($lid, $modifylinkrequest_adv_infos)
{
    global $ModPath, $ModStart, $links_DB, $hlpfile, $NPDS_Prefix;
    include "header.php";
    echo "<script type=\"text/javascript\">\n";
    echo "//<![CDATA[\n";
    echo "function openwindow(){\n";
    echo " window.open (\"{$hlpfile}\",\"Help\",\"toolbar=no,location=no,directories=no,status=no,scrollbars=yes,resizable=no,copyhistory=no,width=600,height=400\");\n";
    echo "}\n";
    echo "//]]>\n";
    echo "</script>\n";
    $result = sql_query("SELECT cid, sid, title, url, description, name, email, hits, topicid_card FROM " . $links_DB . "links_links WHERE lid='{$lid}'");
    echo '
    <h2>' . translate("Modify Links") . '</h2>
    <h3>' . translate("Web link") . '&nbsp;<span class="text-muted">#' . $lid . '</span></h3>
    ';
    echo "[ <a href=\"modules.php?ModStart={$ModStart}&amp;ModPath={$ModStart}\" class=\"box\">" . translate("Links Main") . "</a> ][ <a href=\"javascript:openwindow();\" class=\"box\">" . translate("Online Manual") . "</a> ]";
    while (list($cid, $sid, $title, $url, $description, $name, $email, $hits, $topicid_card) = sql_fetch_row($result)) {
        $title = stripslashes($title);
        $description = stripslashes($description);
        echo '
      <form action="modules.php" method="post" name="adminForm">
         <input type="hidden" name="ModPath" value="' . $ModPath . '" />
         <input type="hidden" name="ModStart" value="' . $ModStart . '" />';
        //       echo translate("Link ID: ")."<b>$lid</b><br />";
        echo '
         <div class="form-group row">
            <label class="form-control-label col-sm-4" for="title">' . translate("Title") . '</label>
            <div class="col-sm-8">
               <input class="form-control" type="text" name="title" value="' . $title . '" maxlength="100" />
            </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-4" for="url">URL</label>
            <div class="col-sm-8">
               <input class="form-control" type="text" name="url" value="' . $url . '" maxlength="100" /><a href="' . $url . '" target="_blank" >' . translate("Visit") . '</a>
            </div>
         </div>';
        }
        $result2 = 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-4" for="cat">' . translate("Category") . '</label>
            <div class="col-sm-8">
               <select class="c-select form-control" name="cat">';
        while (list($ccid, $ctitle) = sql_fetch_row($result2)) {
            $sel = '';
            if ($cid == $ccid and $sid == 0) {
                $sel = 'selected="selected"';
            }
            echo '
                  <option value="' . $ccid . '" ' . $sel . '>' . aff_langue($ctitle) . '</option>';
            $result3 = sql_query("SELECT sid, title FROM " . $links_DB . "links_subcategories WHERE cid='{$ccid}' ORDER BY title");
            while (list($ssid, $stitle) = sql_fetch_row($result3)) {
                $sel = '';
                if ($sid == $ssid) {
                    $sel = 'selected="selected"';
                }
                echo '
                  <option value="' . $ccid . '-' . $ssid . '" ' . $sel . '>' . aff_langue($ctitle . ' / ' . $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-4" for="topicL">' . translate("Topics") . '</label>
            <div class="col-sm-8">
               <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)) {
                if ($topicid == $topicid_card) {
                    $sel = "selected=\"selected\" ";
                }
                echo '
                  <option ' . $sel . ' value="$topicid">' . aff_langue($topics) . '</option>';
                $sel = '';
            }
            echo '
               </select>
            </div>
         </div>';
        }
        echo '
         <div class="form-group row">
            <label class="form-control-label col-sm-4" for="hits">' . translate("Hits") . '</label>
            <div class="col-sm-8">
               <input class="form-control" type="number" name="hits" value="' . $hits . '" />
            </div>
         </div>
         <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">' . $description . '</textarea>
            </div>
         </div>';
        echo aff_editeur('xtext', '');
        echo '
         <div class="form-group row">
            <label class="form-control-label col-sm-4" for="name">' . translate("Name") . '</label>
            <div class="col-sm-8">
            <input class="form-control" type="text" name="name" maxlength="100" value="' . $name . '" />
            </div>
         </div>
         <div class="form-group row">
            <label class="form-control-label col-sm-4" for="email">' . translate("E-Mail") . '</label>
            <div class="col-sm-8">
               <input class="form-control" type="text" name="email" maxlength="100" value="' . $email . '" />
            </div>
         </div>
         <div class="form-group row">
            <div class="col-sm-offset-4 col-sm-8">
               <input type="hidden" name="lid" value="' . $lid . '" />
               <input type="hidden" name="op" value="LinksModLinkS" />
               <input class="btn btn-primary" type="submit" value="' . translate("Modify") . '" />&nbsp;
               <a class="btn btn-danger" href="modules.php?ModStart=' . $ModStart . '&amp;ModPath=' . $ModPath . '&op=LinksDelLink&lid=' . $lid . '" >' . translate("Delete") . '</a>
            </div>
         </div>
       </form>';
        echo "<hr noshade=\"noshade\" class=\"ongl\" />";
        $resulted2 = sql_query("SELECT adminid, editorialtimestamp, editorialtext, editorialtitle FROM " . $links_DB . "links_editorials WHERE linkid='{$lid}'");
        $recordexist = sql_num_rows($resulted2);
        if ($recordexist == 0) {
            echo '
      <h4>' . translate("Add Editorial") . '</h4>
      <form action="modules.php" method="post">
         <input type="hidden" name="ModPath" value="' . $ModPath . '" />
         <input type="hidden" name="ModStart" value="' . $ModStart . '" />
         <input type="hidden" name="linkid" value="' . $lid . '" />
         <div class="form-group row">
            <label class="form-control-label col-sm-4" for="editorialtitle">' . translate("Title") . '</label>
            <div class="col-sm-8">
               <input class="form-control" type="text" name="editorialtitle" value="" maxlength="100" />
            </div>
         </div>
         <div class="form-group row">
            <label class="form-control-label col-sm-12" for="editorialtext">' . translate("Full Text") . '</label>
            <div class="col-sm-12">
               <textarea class="form-control" name="editorialtext" rows="10"></textarea>
            </div>
         </div>
          <input type="hidden" name="op" value="LinksAddEditorial" />
          <input class="btn btn-primary" type="submit" value="' . translate("Add") . '" />
      </form>';
        } else {
            list($adminid, $editorialtimestamp, $editorialtext, $editorialtitle) = sql_fetch_row($resulted2);
            $formatted_date = formatTimestamp($editorialtimestamp);
            echo translate("Modify Editorial") . " : " . translate("Author") . " : {$adminid} / {$formatted_date}<br /><br />";
            echo '
      <form action="modules.php" method="post">
         <input type="hidden" name="ModPath" value="' . $ModPath . '" />
         <input type="hidden" name="ModStart" value="' . $ModStart . '" />
         <input type="hidden" name="linkid" value="' . $lid . '" />
         <div class="form-group row">
            <label class="form-control-label col-sm-4" for="editorialtitle">' . translate("Title") . '</label>
            <div class="col-sm-8">
               <input class="form-control" type="text" name="editorialtitle" value="' . $editorialtitle . '" maxlength="100" />
            </div>
         </div>
         <div class="form-group row">
            <label class="form-control-label col-sm-12" for="editorialtext">' . translate("Full Text") . '</label>
            <div class="col-sm-12">
               <textarea class="form-control" name="editorialtext" rows="10">' . $editorialtext . '</textarea>
            </div>
         </div>
         <input type="hidden" name="op" value="LinksModEditorial" />
         <input class="btn btn-primary" type="submit" value="' . translate("Modify") . '" />
         <a href="modules.php?ModStart=' . $ModStart . '&amp;ModPath=' . $ModPath . '&op=LinksDelEditorial&linkid=' . $lid . '" >' . translate("Delete") . '</a>
         </form>';
        }
        echo "<hr noshade=\"noshade\" class=\"ongl\" />";
        $pos = strpos($ModPath, "/admin");
        $browse_key = $lid;
        include "modules/sform/" . substr($ModPath, 0, $pos) . "/link_maj.php";
    }
    include "footer.php";
}
コード例 #10
0
ファイル: adminfaq.php プロジェクト: npds/npds_dune
function FaqCatGoEdit($id)
{
    global $hlpfile, $NPDS_Prefix, $local_user_language, $admf_ext, $f_meta_nom, $f_titre, $adminimg;
    include "header.php";
    GraphicAdmin($hlpfile);
    $result = sql_query("SELECT fa.question, fa.answer, fa.id_cat, fc.categories FROM " . $NPDS_Prefix . "faqanswer fa LEFT JOIN " . $NPDS_Prefix . "faqcategories fc ON fa.id_cat = fc.id_cat WHERE fa.id='{$id}'");
    list($question, $answer, $id_cat, $faq_cat) = sql_fetch_row($result);
    adminhead($f_meta_nom, $f_titre, $adminimg);
    echo '
   <hr />
   <h3>' . $faq_cat . '</h3>
   <h4>' . $question . '</h4>
   <h4>' . adm_translate("Prévisualiser") . '</h4>';
    echo '
   <label class="form-control-label" for="">' . aff_local_langue(adm_translate("Langue de Prévisualisation"), '', 'local_user_language') . '
   </label>
   <div class="card card-block">
   <p>' . preview_local_langue($local_user_language, $question) . '</p>';
    $answer = aff_code($answer);
    echo '<p>' . meta_lang(preview_local_langue($local_user_language, $answer)) . '</p>
   </div>';
    echo '
   <h4>' . adm_translate("Editer Question & Réponse") . '</h4>
   <form action="admin.php" method="post" name="adminForm">
      <fieldset>
         <div class="form-group row">
            <label class="form-control-label col-xs-12" for="question">' . adm_translate("Question") . '</label>
            <div class="col-sm-12">
               <textarea class="form-control" type="text" name="question" id="question" maxlength="255">' . $question . '</textarea>
               <span class="help-block text-xs-right"><span id="countcar_question"></span></span>
            </div>
         </div>
         <div class="form-group row">
            <label class="form-control-label col-xs-12" for="answer">' . adm_translate("Réponse") . '</label>
            <div class="col-sm-12">
               <textarea class="tin form-control" name="answer" rows="15">' . $answer . '</textarea>
            </div>
         </div>
         ' . aff_editeur('answer', '') . '
         <div class="form-group row">
            <div class="col-sm-12">
               <input type="hidden" name="id" value="' . $id . '" />
               <input type="hidden" name="op" value="FaqCatGoSave" />
               <button class="btn btn-outline-primary col-xs-12 col-sm-6" type="submit"><i class="fa fa-check-square fa-lg"></i>&nbsp;' . adm_translate("Sauver les modifications") . '</button>
               <button class="btn btn-outline-secondary col-xs-12 col-sm-6" href="admin.php?op=FaqCatGo&amp;id_cat=' . $id_cat . '" >' . adm_translate("Retour en arrière") . '</a>
            </div>
         </div>
      </fieldset>
   </form>
   <script type="text/javascript">
   //<![CDATA[
      $(document).ready(function() {
         inpandfieldlen("question",255);
      });
   //]]>
   </script>';
    adminfoot('fv', '', '', '');
}
コード例 #11
0
ファイル: header.php プロジェクト: Jireck-npds/npds_dune
function head($tiny_mce_init, $css_pages_ref, $css, $tmp_theme, $js, $m_description, $m_keywords)
{
    global $slogan, $site_font, $Titlesitename, $banners, $Default_Theme, $theme, $gzhandler, $language;
    global $topic, $hlpfile, $user, $hr, $bgcolor1, $bgcolor2, $bgcolor3, $bgcolor4, $bgcolor5, $bgcolor6, $textcolor1, $textcolor2, $long_chain;
    global $bargif, $theme_width, $bloc_width, $page_width;
    if ($gzhandler == 1) {
        ob_start("ob_gzhandler");
    }
    include "themes/{$tmp_theme}/theme.php";
    // Meta
    if (file_exists("meta/meta.php")) {
        $meta_op = '';
        include "meta/meta.php";
    }
    // Favicon
    if (file_exists("themes/{$tmp_theme}/images/favicon.ico")) {
        $favico = "themes/{$tmp_theme}/images/favicon.ico";
    } else {
        $favico = 'images/favicon.ico';
    }
    echo '
<link rel="shortcut icon" href="' . $favico . '" type="image/x-icon" />';
    // Syndication RSS & autres
    global $sitename, $nuke_url, $REQUEST_URI;
    // Canonical
    $uri = $REQUEST_URI;
    $drname = dirname($uri);
    if ($drname == '.') {
        $uri = $nuke_url . '/' . $uri;
    } elseif ($drname == '/') {
        $uri = $nuke_url . $uri;
    } else {
        $uri = 'http://' . $_SERVER['SERVER_NAME'] . $uri;
    }
    echo '
<link rel="canonical" href="' . str_replace('&', '&amp;', str_replace('&amp;', '&', $uri)) . '" />';
    // humans.txt
    if (file_exists("humans.txt")) {
        echo '
<link type="text/plain" rel="author" href="' . $nuke_url . '/humans.txt" />';
    }
    echo '
<link href="backend.php?op=RSS0.91" title="' . $sitename . ' - RSS 0.91" rel="alternate" type="text/xml" />
<link href="backend.php?op=RSS1.0" title="' . $sitename . ' - RSS 1.0" rel="alternate" type="text/xml" />
<link href="backend.php?op=RSS2.0" title="' . $sitename . ' - RSS 2.0" rel="alternate" type="text/xml" />
<link href="backend.php?op=ATOM" title="' . $sitename . ' - ATOM" rel="alternate" type="application/atom+xml" />';
    //   echo import_css($tmp_theme, $language, $site_font, $css_pages_ref, $css);//move down
    // Tiny_mce
    if ($tiny_mce_init) {
        echo aff_editeur("tiny_mce", "begin");
    }
    // include externe JAVASCRIPT file from modules/include or themes/.../include for functions, codes in the <body onload="..." event...
    $body_onloadH = "<script type=\"text/javascript\">\n";
    $body_onloadH .= "//<![CDATA[\n";
    $body_onloadH .= "function init() {\n";
    $body_onloadF = "}\n";
    $body_onloadF .= "//]]>\n";
    $body_onloadF .= "</script>\n";
    if (file_exists("modules/include/body_onload.inc")) {
        echo $body_onloadH;
        include "modules/include/body_onload.inc";
        echo $body_onloadF;
    }
    if (file_exists("themes/{$tmp_theme}/include/body_onload.inc")) {
        echo $body_onloadH;
        include "themes/{$tmp_theme}/include/body_onload.inc";
        echo $body_onloadF;
    }
    // include externe file from modules/include or themes/.../include for functions, codes ...
    if (file_exists("modules/include/header_head.inc")) {
        include "modules/include/header_head.inc";
    }
    if (file_exists("themes/{$tmp_theme}/include/header_head.inc")) {
        include "themes/{$tmp_theme}/include/header_head.inc";
    }
    echo import_css($tmp_theme, $language, $site_font, $css_pages_ref, $css);
    // Mod by Jireck - Chargeur de JS via PAGES.PHP
    if ($js) {
        if (is_array($js)) {
            foreach ($js as $k => $tab_js) {
                if (stristr($tab_js, "http://")) {
                    echo "<script type=\"text/javascript\" src=\"{$tab_js}\"></script>\n";
                } else {
                    if (file_exists("themes/{$tmp_theme}/js/{$tab_js}") and $tab_js != "") {
                        echo "<script type=\"text/javascript\" src=\"themes/{$tmp_theme}/js/{$tab_js}\"></script>\n";
                    } elseif (file_exists("{$tab_js}") and $tab_js != "") {
                        echo "<script type=\"text/javascript\" src=\"{$tab_js}\"></script>\n";
                    }
                }
            }
        } else {
            if (file_exists("themes/{$tmp_theme}/js/{$js}")) {
                echo "<script type=\"text/javascript\" src=\"themes/{$tmp_theme}/js/{$js}\"></script>\n";
            } elseif (file_exists("{$js}")) {
                echo "<script type=\"text/javascript\" src=\"{$js}\"></script>\n";
            }
        }
    }
    echo "</head>\n";
    include "themes/{$tmp_theme}/header.php";
}
コード例 #12
0
ファイル: download.php プロジェクト: Jireck-npds/npds_dune
function DownloadEdit($did)
{
    global $hlpfile;
    global $NPDS_Prefix;
    include "header.php";
    GraphicAdmin($hlpfile);
    $result = sql_query("SELECT did, dcounter, durl, dfilename, dfilesize, ddate, dweb, duser, dver, dcategory, ddescription, perms FROM " . $NPDS_Prefix . "downloads WHERE did='{$did}'");
    list($did, $dcounter, $durl, $dfilename, $dfilesize, $ddate, $dweb, $duser, $dver, $dcategory, $ddescription, $privs) = sql_fetch_row($result);
    opentable();
    echo "<table width=\"100%\" cellspacing=\"2\" cellpadding=\"2\" border=\"0\"><tr><td class=\"header\">\n";
    echo adm_translate("Editer un Téléchargement");
    echo "</td></tr></table>\n";
    echo "<form action=\"admin.php\" method=\"post\" name=\"adminForm\">\n       <input type=\"hidden\" name=\"did\" value=\"{$did}\" />\n       <input type=\"hidden\" name=\"dcounter\" value=\"{$dcounter}\" />\n       <table width=\"100%\" cellspacing=\"0\" cellpadding=\"2\" border=\"0\">\n       <tr>\n          <td width=\"20%\">" . adm_translate("Télécharger URL : ") . " (255 cars)</td>\n          <td><input class=\"textbox\" type=\"text\" name=\"durl\" size=\"30\" maxlenght=\"255\" value=\"{$durl}\" /></td>\n       </tr>\n       <tr>\n          <td width=\"20%\">" . adm_translate("Nom de fichier : ") . " (255 cars)</td>\n          <td><input class=\"textbox\" type=\"text\" name=\"dfilename\" size=\"30\" maxlength=\"255\" value=\"{$dfilename}\" /></td>\n       </tr>\n       <tr>\n          <td width=\"20%\">" . adm_translate("Version : ") . "</td>\n          <td><input class=\"textbox\" type=\"text\" name=\"dver\" size=\"5\" maxlength=\"6\" value=\"{$dver}\" /></td>\n       </tr>\n       <tr>\n          <td width=\"20%\">" . adm_translate("Taille de fichier : ") . " (bytes)</td>\n          <td><input class=\"textbox\" type=\"text\" name=\"dfilesize\" size=\"30\" maxlength=\"31\" value=\"{$dfilesize}\" /></td>\n       </tr>\n       <tr>\n          <td width=\"20%\">" . adm_translate("Propriétaire de la page Web : ") . " (255 cars)</td>\n          <td><input class=\"textbox\" type=\"text\" name=\"dweb\" size=\"30\" maxlenght=\"255\" value=\"{$dweb}\" /></td>\n       </tr>\n       <tr>\n          <td width=\"20%\">" . adm_translate("Propriétaire : ") . "</td>\n          <td><input class=\"textbox\" type=\"text\" name=\"duser\" size=\"30\" maxlength=\"31\" value=\"{$duser}\" /></td>\n       </tr>\n       <tr>\n          <td width=\"20%\">" . adm_translate("Categorie : ") . "</td>\n          <td><input class=\"textbox_standard\" type=\"text\" name=\"dcategory\" size=\"35\" maxlength=\"250\" value=\"" . stripslashes($dcategory) . "\" /> - ";
    echo "<select class=\"textbox_standard\" name=\"sdcategory\" onchange=\"adminForm.dcategory.value=options[selectedIndex].value\">";
    $result = sql_query("SELECT distinct dcategory FROM " . $NPDS_Prefix . "downloads ORDER BY dcategory");
    while (list($Xdcategory) = sql_fetch_row($result)) {
        if ($Xdcategory == $dcategory) {
            $sel = "selected";
        } else {
            $sel = "";
        }
        $Xdcategory = stripslashes($Xdcategory);
        echo "<option {$sel} value=\"{$Xdcategory}\">" . aff_langue($Xdcategory) . "</option>";
    }
    echo "</select>\n          </td>\n       </tr>\n       <tr><td width=\"20%\">" . adm_translate("Description:") . "</td>";
    $ddescription = stripslashes($ddescription);
    echo "<td><textarea class=\"tin form-control\" name=\"xtext\" cols=\"70\" rows=\"20\" style=\"width: 100%;\">{$ddescription}</textarea>";
    echo aff_editeur("xtext", "false");
    echo "</td></tr>\n       <tr>\n          <td width=\"20%\">" . adm_translate("Changer la date ? : ") . "</td>\n          <td>" . adm_translate("Oui") . " <input type=\"checkbox\" name=\"ddate\" value=\"yes\" /></td>\n       </tr>";
    echo "<tr><td colspan=\"2\" align=\"center\" valign=\"top\">";
    droits($privs);
    echo "</td>\n       </tr>\n      </table><br />\n      <input type=\"hidden\" name=\"op\" value=\"DownloadSave\" />\n      <input class=\"bouton_standard\" type=\"submit\" value=\"" . adm_translate("Sauver les modifications") . "\" />\n      </form>";
    closetable();
    include "footer.php";
}
コード例 #13
0
ファイル: links-3.php プロジェクト: npds/npds_dune
function modifylinkrequest($lid, $modifylinkrequest_adv_infos, $author)
{
    global $ModPath, $ModStart, $links_DB, $NPDS_Prefix;
    if (autorise_mod($lid, false)) {
        if ($author == '-9') {
            Header("Location: modules.php?ModStart={$ModStart}&ModPath={$ModPath}/admin&op=LinksModLink&lid={$lid}");
        }
        include "header.php";
        mainheader();
        $result = sql_query("SELECT cid, sid, title, url, description, topicid_card FROM " . $links_DB . "links_links WHERE lid='{$lid}'");
        list($cid, $sid, $title, $url, $description, $topicid_card) = sql_fetch_row($result);
        $title = stripslashes($title);
        $description = stripslashes($description);
        echo '
   <h3>' . translate("Request Link Modification") . ' : <span class="text-muted">' . $title . '</span></h3>
   <form action="modules.php" method="post" 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" name="title" value="' . $title . '"  maxlength="100" />
         </div>
      </div>';
        global $links_url;
        if ($links_url) {
            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" name="url" value="' . $url . '" maxlength="100" />
         </div>
      </div>';
        }
        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="custom-select form-control" name="cat">';
        $result2 = sql_query("SELECT cid, title FROM " . $links_DB . "links_categories ORDER BY title");
        while (list($ccid, $ctitle) = sql_fetch_row($result2)) {
            $sel = '';
            if ($cid == $ccid and $sid == 0) {
                $sel = 'selected';
            }
            echo '
               <option value="' . $ccid . '" ' . $sel . '>' . aff_langue($ctitle) . '</option>';
            $result3 = sql_query("SELECT sid, title FROM " . $links_DB . "links_subcategories WHERE cid='{$ccid}' ORDER BY title");
            while (list($ssid, $stitle) = sql_fetch_row($result3)) {
                $sel = '';
                if ($sid == $ssid) {
                    $sel = 'selected="selected"';
                }
                echo '
               <option value="' . $ccid . '-' . $ssid . '" ' . $sel . '>' . aff_langue($ctitle . ' / ' . $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="custom-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)) {
                if ($topicid == $topicid_card) {
                    $sel = 'selected="selected" ';
                }
                echo '
               <option value="' . $topicid . '" ' . $sel . '>' . $topics . '</option>';
                $sel = '';
            }
            echo '
            </select>
         </div>
      </div>';
        }
        echo '
      <div class="form-group row">
         <label class="form-control-label col-sm-12" for="xtext">' . translate("Description: (255 characters max)") . '</label>
         <div class="col-sm-12">
            <textarea class="form-control tin" name="xtext" rows="10">' . $description . '</textarea>
         </div>
      </div>';
        aff_editeur('xtext', '');
        echo '
      <div class="form-group row">
         <input type="hidden" name="lid" value="' . $lid . '" />
         <input type="hidden" name="modifysubmitter" value="' . $author . '" />
         <input type="hidden" name="op" value="modifylinkrequestS" />
         <div class="col-sm-12">
            <input type="submit" class="btn btn-primary" value="' . translate("Send Request") . '" />
         </div>
      </div>
   </form>';
        $browse_key = $lid;
        include "modules/sform/{$ModPath}/link_maj.php";
        adminfoot('fv', '', '', 'nodiv');
        include "footer.php";
    } else {
        header("Location: modules.php?ModStart={$ModStart}&ModPath={$ModPath}");
    }
}
コード例 #14
0
ファイル: download.php プロジェクト: npds/npds_dune
function DownloadEdit($did)
{
    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 did, dcounter, durl, dfilename, dfilesize, ddate, dweb, duser, dver, dcategory, ddescription, perms FROM " . $NPDS_Prefix . "downloads WHERE did='{$did}'");
    list($did, $dcounter, $durl, $dfilename, $dfilesize, $ddate, $dweb, $duser, $dver, $dcategory, $ddescription, $privs) = sql_fetch_row($result);
    $ddescription = stripslashes($ddescription);
    echo '
   <h3>' . adm_translate("Editer un Téléchargement") . '</h3>
   <form action="admin.php" method="post" name="adminForm">
      <input type="hidden" name="did" value="' . $did . '" />
      <input type="hidden" name="dcounter" value="' . $dcounter . '" />
      <div class="form-group row">
         <label class="form-control-label col-sm-4" for="durl">' . adm_translate("Télécharger URL") . '</label>
         <div class="col-sm-8">
            <input class="form-control" type="text" id="durl" name="durl" value="' . $durl . '" maxlength="255" required="required" />
            <span class="help-block text-xs-right"><span id="countcar_durl"></span></span>
         </div>
      </div>
      <div class="form-group row">
         <label class="form-control-label col-sm-4" for="dfilename">' . adm_translate("Nom de fichier") . '</label>
         <div class="col-sm-8">
            <input class="form-control" type="text" id="dfilename" name="dfilename" id="dfilename" value="' . $dfilename . '" maxlength="255" required="required" />
            <span class="help-block text-xs-right"><span id="countcar_dfilename"></span></span>
         </div>
      </div>
      <div class="form-group row">
         <label class="form-control-label col-sm-4" for="dver">' . adm_translate("Version") . '</label>
         <div class="col-sm-8">
            <input class="form-control" type="text" name="dver" id="dver" value="' . $dver . '" maxlength="6" />
            <span class="help-block text-xs-right"><span id="countcar_dver"></span></span>
         </div>
      </div>
      <div class="form-group row">
         <label class="form-control-label col-sm-4" for="dfilesize">' . adm_translate("Taille de fichier") . ' (bytes)</label>
         <div class="col-sm-8">
            <input class="form-control" type="text" name="dfilesize" value="' . $dfilesize . '" maxlength="31" />
         </div>
      </div>
      <div class="form-group row">
         <label class="form-control-label col-sm-4" for="dweb">' . adm_translate("Propriétaire de la page Web") . '</label>
         <div class="col-sm-8">
            <input class="form-control" type="text" id="dweb" name="dweb" value="' . $dweb . '" maxlength="255" />
            <span class="help-block text-xs-right"><span id="countcar_dweb"></span></span>
         </div>
      </div>
      <div class="form-group row">
         <label class="form-control-label col-sm-4" for="duser">' . adm_translate("Propriétaire") . '</label>
         <div class="col-sm-8">
            <input class="form-control" type="text" id="duser" name="duser" value="' . $duser . '" maxlength="30" />
            <span class="help-block text-xs-right"><span id="countcar_duser"></span></span>
         </div>
      </div>
      <div class="form-group row">
         <label class="form-control-label col-sm-4" for="dcategory">' . adm_translate("Catégorie") . '</label>
         <div class="col-sm-8">
            <input class="form-control" type="text" id="dcategory" name="dcategory" value="' . stripslashes($dcategory) . '" maxlength="250" />
            <span class="help-block text-xs-right"><span id="countcar_dcategory"></span></span>
            <select class="custom-select form-control" name="sdcategory" onchange="adminForm.dcategory.value=options[selectedIndex].value">';
    $result = sql_query("SELECT distinct dcategory FROM " . $NPDS_Prefix . "downloads ORDER BY dcategory");
    while (list($Xdcategory) = sql_fetch_row($result)) {
        if ($Xdcategory == $dcategory) {
            $sel = 'selected';
        } else {
            $sel = '';
        }
        $Xdcategory = stripslashes($Xdcategory);
        echo '
               <option ' . $sel . ' value="' . $Xdcategory . '">' . aff_langue($Xdcategory) . '</option>';
    }
    echo '
            </select>
         </div>
      </div>
      <div class="form-group row">
         <label class="form-control-label col-sm-12" for="xtext">' . adm_translate("Description") . '</label>
         <div class="col-sm-12">
            <textarea class="tin form-control" name="xtext" rows="20" >' . $ddescription . '</textarea>
         </div>
      </div>
      ' . aff_editeur('xtext', '');
    echo '
      <fieldset>
         <legend>' . adm_translate("Droits") . '</legend>';
    droits($privs);
    echo '
      </fieldset>
      <div class="form-group row">
         <div class="col-sm-12">
            <label>' . adm_translate("Changer la date") . '
               <input type="checkbox" name="ddate" value="yes" />&nbsp;' . adm_translate("Oui") . '
            </label>
         </div>
      </div>
      <div class="form-group row">
         <div class="col-sm-12">
            <input type="hidden" name="op" value="DownloadSave" />
            <input class="btn btn-primary" type="submit" value="' . adm_translate("Sauver les modifications") . '" />
         </div>
      </div>
   </form>
   <script type="text/javascript">
   //<![CDATA[
      $(document).ready(function() {
         inpandfieldlen("durl",255);
         inpandfieldlen("dfilename",255);
         inpandfieldlen("dver",6);
         inpandfieldlen("dfilesize",31);
         inpandfieldlen("dweb",255);
         inpandfieldlen("duser",30);
         inpandfieldlen("dcategory",250);
      });
   //]]>
   </script>';
    adminfoot('fv', '', '', '');
}
コード例 #15
0
ファイル: gal_func.php プロジェクト: phrev/npds_galeries
function PrintFormEcard($galid, $pos, $pid)
{
    global $NPDS_Prefix, $ThisRedo, $ThisFile, $ModPath, $MaxSizeThumb, $user, $anonymous;
    settype($galid, "integer");
    $gal = sql_fetch_row(sql_query("SELECT acces FROM " . $NPDS_Prefix . "tdgal_gal WHERE id='" . $galid . "'"));
    if (autorisation($gal[0])) {
        settype($pos, "integer");
        settype($pid, "integer");
        $query = sql_query("SELECT * FROM " . $NPDS_Prefix . "tdgal_img WHERE id='" . $pid . "' and noaff='0'");
        $row = sql_fetch_row($query);
        if (@file_exists("modules/{$ModPath}/mini/" . $row[2])) {
            list($width, $height, $type, $attr) = @getimagesize("modules/{$ModPath}/mini/{$row['2']}");
            $ibid = "<img class=\"img-fluid\" src=\"modules/{$ModPath}/mini/{$row['2']}\" alt=\"" . stripslashes($row[3]) . "\" border=\"0\" {$attr} />";
        } else {
            $ibid = ReducePic($row[2], stripslashes($row[3]), $MaxSizeThumb);
        }
        $cookie = cookiedecode($user);
        $username = $cookie[1];
        if ($username == "") {
            $username = $anonymous;
        }
        echo '<h4 class="breadcrumb"><a href="' . $ThisFile . '">' . gal_trans("Accueil") . '</a></h4>';
        echo "{$ibid}";
        echo '<br />';
        echo '<p class="lead">' . gal_trans("Envoyer une E-carte de la part de") . '</p>';
        echo '<form action="' . $ThisFile . '" method="post" name="FormCard">';
        echo "<input type=\"hidden\" name=\"op\" value=\"sendcard\">";
        echo "<input type=\"hidden\" name=\"galid\" value=\"{$galid}\">";
        echo "<input type=\"hidden\" name=\"pos\" value=\"{$pos}\">";
        echo "<input type=\"hidden\" name=\"pid\" value=\"{$pid}\">";
        echo '
  <fieldset class="form-group">
    <label for="">' . gal_trans("Votre nom") . '</label>
    <input type="text" class="form-control" id=""  name="from_name" placeholder="' . $username . '">
  </fieldset>';
        echo '
  <fieldset class="form-group">
    <label for="">' . gal_trans("Votre adresse e-mail") . '</label>
    <input type="email" class="form-control" name="from_mail" id="" placeholder="' . gal_trans("Votre adresse e-mail") . '">
  </fieldset>';
        echo '
  <fieldset class="form-group">
    <label for="">' . gal_trans("Nom du destinataire") . '</label>
    <input type="text" class="form-control" id=""  name="to_name" placeholder="' . gal_trans("Nom du destinataire") . '">
  </fieldset>';
        echo '
  <fieldset class="form-group">
    <label for="">' . gal_trans("Adresse e-mail du destinataire") . '</label>
    <input type="email" class="form-control" name="to_mail" id="" placeholder="' . gal_trans("Adresse e-mail du destinataire") . '">
  </fieldset>';
        echo '
  <fieldset class="form-group">
    <label for="">' . gal_trans("Sujet") . '</label>
    <input type="text" class="form-control" id=""  name="card_sujet" placeholder="' . gal_trans("Sujet") . '">
  </fieldset>';
        echo '
  <fieldset class="form-group">
    <label for="exampleTextarea">' . gal_trans("Message") . '</label>
    <textarea class="tin form-control form-control" name="card_msg" rows="5"></textarea>
  </fieldset>';
        aff_editeur("card_msg", "true");
        echo "<input class=\"btn btn-primary\" type=\"submit\" value=" . gal_trans("Envoyer comme e-carte") . ">";
        echo "</form>";
    }
}
コード例 #16
0
ファイル: sections.php プロジェクト: npds/npds_dune
function secartupdate($artid)
{
    global $hlpfile, $aid, $radminsuper, $NPDS_Prefix, $f_meta_nom, $f_titre, $adminimg;
    $result = sql_query("SELECT author, artid, secid, title, content, userlevel FROM " . $NPDS_Prefix . "seccont_tempo WHERE artid='{$artid}'");
    list($author, $artid, $secid, $title, $content, $userlevel) = sql_fetch_row($result);
    $testpubli = sql_query("SELECT type FROM " . $NPDS_Prefix . "publisujet WHERE secid2='{$secid}' AND aid='{$aid}' AND type='1'");
    list($test_publi) = sql_fetch_row($testpubli);
    if ($test_publi == 1) {
        $debut = '
   <div class="alert alert-info">' . adm_translate("Vos droits de publications vous permettent de mettre à jour ou de supprimer ce contenu mais pas de la mettre en ligne sur le site.") . '</div>';
        $fin = '
      <select class="custom-select" name="op">
         <option value="secartchangeup" selected="selected">' . adm_translate("Mettre à jour") . '</option>
         <option value="secartdelete2">' . adm_translate("Supprimer") . '</option>
      </select>
      <input type="submit" class="btn btn-primary" name="submit" value="' . adm_translate("Ok") . '" />';
    }
    $testpubli = sql_query("SELECT type FROM " . $NPDS_Prefix . "publisujet WHERE secid2='{$secid}' AND aid='{$aid}' AND type='2'");
    list($test_publi) = sql_fetch_row($testpubli);
    if ($test_publi == 2 or $radminsuper == 1) {
        $debut = '
      <div class="alert alert-info">' . adm_translate("Vos droits de publications vous permettent de mettre à jour, de supprimer ou de le mettre en ligne sur le site ce contenu.") . '<br /></div>';
        $fin = '
      <select class="custom-select" name="op">
         <option value="secartchangeup" selected="selected">' . adm_translate("Mettre à jour") . '</option>
         <option value="secartdelete2">' . adm_translate("Supprimer") . '</option>
         <option value="secartpublish">' . adm_translate("Publier") . '</option>
      </select>
      <input type="submit" class="btn btn-primary" name="submit" value="' . adm_translate("Ok") . '" />';
    }
    $fin .= '&nbsp;<input class="btn btn-secondary" type="button" value="' . adm_translate("Retour en arrière") . '" onclick="javascript:history.back()" />';
    include "header.php";
    GraphicAdmin($hlpfile);
    adminhead($f_meta_nom, $f_titre, $adminimg);
    echo '
   <hr />
   <h3>' . adm_translate("Editer une publication") . '</h3>';
    echo $debut;
    $title = stripslashes($title);
    $content = stripslashes($content);
    echo '
   <form action="admin.php" method="post" name="adminForm">
      <input type="hidden" name="artid" value="' . $artid . '" />
      <div class="form-group row">
         <label class="form-control-label col-sm-4" for="secid">' . adm_translate("Sous-rubrique") . '</label>
         <div class="col-sm-8">';
    $tmp_autorise = sousrub_select($secid);
    if ($tmp_autorise) {
        echo $tmp_autorise;
    } else {
        $result = sql_query("SELECT secname FROM " . $NPDS_Prefix . "sections WHERE secid='{$secid}'");
        list($secname) = sql_fetch_row($result);
        echo '
            <strong>' . aff_langue($secname) . '</strong>
            <input type="hidden" name="secid" value="' . $secid . '" />';
    }
    echo '
         </div>
      </div>
      <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" name="title" rows="2">' . $title . '</textarea>
         </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="tin form-control" name="content" rows="30">' . $content . '</textarea>
         </div>
      </div>
            ' . aff_editeur('content', '');
    droits($userlevel);
    echo "</td></tr><tr {$rowcolor}><td colspan=\"2\">" . $fin . "</td><tr>";
    echo '
      </form>';
    include "footer.php";
}
コード例 #17
0
ファイル: user.php プロジェクト: Jireck-npds/npds_dune
function editjournal()
{
    global $user;
    include "header.php";
    $userinfo = getusrinfo($user);
    nav($userinfo['mns']);
    echo '
   <h2>' . translate("Edit your journal") . '</h2>
   <form class="" role="form" action="user.php" method="post" name="adminForm">
      <div class="form-group row">
         <div class="col-sm-12">
            <textarea class="tin form-control" rows="25" name="journal">' . $userinfo['user_journal'] . '</textarea>' . aff_editeur('journal', '') . '
         </div>
      </div>
      <input type="hidden" name="uname" value="' . $userinfo['uname'] . '" />
      <input type="hidden" name="uid" value="' . $userinfo['uid'] . '" />
      <input type="hidden" name="op" value="savejournal" />
      <div class="form-group row">
         <div class="col-xs-12">
            <div class="checkbox">
               <label>
               <input type="checkbox" name="datetime" value="1" />&nbsp;' . translate("Add date and time stamp") . '
               </label>
            </div>
         </div>
      </div>
      <div class="form-group row">
         <div class="col-xs-12">
            <input class="btn btn-primary" type="submit" value="' . translate("Save Journal") . '" />
      </div>
      </div>
   </form>';
    include "footer.php";
}
コード例 #18
0
ファイル: links.php プロジェクト: Jireck-npds/npds_dune
function LinksModLink($lid)
{
    global $NPDS_Prefix, $hlpfile, $f_meta_nom, $f_titre, $adminimg;
    include "header.php";
    GraphicAdmin($hlpfile);
    global $anonymous;
    $result = sql_query("SELECT cid, sid, title, url, description, name, email, hits FROM " . $NPDS_Prefix . "links_links WHERE lid='{$lid}'");
    adminhead($f_meta_nom, $f_titre, $adminimg);
    echo '<h3>' . adm_translate("Modifier le lien") . ' - ' . $lid . '</h3>';
    list($cid, $sid, $title, $url, $xtext, $name, $email, $hits) = sql_fetch_row($result);
    $title = stripslashes($title);
    $xtext = stripslashes($xtext);
    echo '
   <form action="admin.php" method="post" name="adminForm">
      <div class="form-group">
         <div class="row">
            <label class="form-control-label col-sm-4 " for="title">' . adm_translate("Titre de la Page") . '</label>
            <div class="col-sm-8">
               <input class="form-control" type="text" name="title" id="title" value="' . $title . '" maxlength="100" required="required" />
               <span class="help-block text-xs-right"><span id="countcar_title"></span></span>
            </div>
         </div>
      </div>
      <div class="form-group">
         <div class="row">
            <label class="form-control-label col-sm-4 " for="url">' . adm_translate("URL de la Page") . '</label>
            <div class="col-sm-8">
               <div class="input-group">
                  <span class="input-group-btn">
                    <button class="btn btn-secondary" ><a href="' . $url . '" target="_blank"><i class="fa fa-external-link fa-lg"></i></a></button>
                  </span>
                  <input class="form-control" type="text" name="url" id="url" value="' . $url . '" maxlength="100" required="required" />
                </div>
                <span class="help-block text-xs-right"><span id="countcar_url"></span></span>
            </div>
         </div>
      </div>
      <div class="form-group">
         <div class="row">
            <label class="form-control-label col-sm-4 " for="xtext">' . adm_translate("Description") . '</label>
            <div class="col-sm-8">
               <textarea class="form-control" name="xtext" rows="10">' . $xtext . '</textarea>
            </div>
         </div>
      </div>';
    echo aff_editeur("xtext", "false");
    echo '
      <div class="form-group">
         <div class="row">
            <label class="form-control-label col-sm-4 " for="name">' . adm_translate("Nom") . '</label>
            <div class="col-sm-8">
               <input class="form-control" type="text" name="name" id="name" maxlength="100" value="' . $name . '" />
               <span class="help-block text-xs-right"><span id="countcar_name"></span></span>
            </div>
         </div>
      </div>
      <div class="form-group">
         <div class="row">
            <label class="form-control-label col-sm-4 " for="email">' . adm_translate("E-mail") . '</label>
            <div class="col-sm-8">
               <input class="form-control" type="email" name="email" id="email" maxlength="100" value="' . $email . '" />
               <span class="help-block text-xs-right"><span id="countcar_email"></span></span>
            </div>
         </div>
      </div>
      <div class="form-group">
         <div class="row">
            <label class="form-control-label col-sm-4 " for="hits">' . adm_translate("Nombre de Hits") . '</label>
            <div class="col-sm-8">
               <input class="form-control" type="number" name="hits" value="' . $hits . '" min="0" max="99999999999" />
            </div>
         </div>
      </div>
      <div class="form-group">
         <div class="row">';
    $result2 = sql_query("SELECT cid, title FROM " . $NPDS_Prefix . "links_categories ORDER BY title");
    echo '
            <input type="hidden" name="lid" value="' . $lid . '" />
            <label class="form-control-label col-sm-4 " for="hits">' . adm_translate("Catégorie") . '</label>
            <div class="col-sm-8">
               <select class="c-select form-control" name="cat">';
    while (list($ccid, $ctitle) = sql_fetch_row($result2)) {
        $sel = "";
        if ($cid == $ccid and $sid == 0) {
            $sel = "selected";
        }
        echo '<option value="' . $ccid . '" ' . $sel . '>' . aff_langue($ctitle) . '</option>';
        $result3 = sql_query("SELECT sid, title FROM " . $NPDS_Prefix . "links_subcategories WHERE cid='{$ccid}' ORDER BY title");
        while (list($ssid, $stitle) = sql_fetch_row($result3)) {
            $sel = "";
            if ($sid == $ssid) {
                $sel = "selected";
            }
            echo "<option value=\"{$ccid}-{$ssid}\" {$sel}>" . aff_langue($ctitle) . " / " . aff_langue($stitle) . "</option>";
        }
    }
    echo '
               </select>
            </div>
         </div>
      </div>
      <div class="form-group">
         <div class="row">
            <div class="col-sm-offset-4 col-sm-8">
               <input type="hidden" name="op" value="LinksModLinkS" />
               <button class="btn btn-primary col-xs-6" type="submit"><i class="fa fa-check fa-lg"></i>&nbsp;' . adm_translate("Modifier") . ' </button>
               <button href="admin.php?op=LinksDelLink&amp;lid=' . $lid . '" class="btn btn-danger col-xs-6"><i class="fa fa-trash-o fa-lg"></i>&nbsp;' . adm_translate("Effacer") . '</button>
            </div>
         </div>
      </div>
   </form>';
    //Modify or Add Editorial
    $resulted2 = sql_query("SELECT adminid, editorialtimestamp, editorialtext, editorialtitle FROM " . $NPDS_Prefix . "links_editorials WHERE linkid='{$lid}'");
    $recordexist = sql_num_rows($resulted2);
    if ($recordexist == 0) {
        echo '
   <h3>' . adm_translate("Ajouter un Editorial") . '</h3>
   <form action="admin.php" method="post">
      <div class="form-group">
         <div class="row">
            <label class="form-control-label col-sm-4 " for="editorialtitle">' . adm_translate("Titre") . '</label>
            <div class="col-sm-8">
               <input class="form-control" type="text" name="editorialtitle" id="editorialtitle" maxlength="100" />
               <span class="help-block text-xs-right"><span id="countcar_editorialtitle"></span></span>
            </div>
         </div>
      </div>
      <div class="form-group">
         <div class="row">
            <label class="form-control-label col-sm-4 " for="editorialtext">' . adm_translate("Texte complet") . '</label>
            <div class="col-sm-8">
               <textarea class="form-control" name="editorialtext" rows="10"></textarea>
            </div>
         </div>
      </div>
      <div class="form-group">
         <div class="row">
            <div class="col-sm-offset-4 col-sm-8">
               <input type="hidden" name="linkid" value="' . $lid . '" />
               <input type="hidden" name="op" value="LinksAddEditorial" />
               <button class="btn btn-primary col-xs-12" type="submit"><i class="fa fa-plus-square fa-lg"></i>&nbsp;' . adm_translate("Ajouter un Editorial") . '</button>
            </div>
         </div>
      </div>';
    } else {
        while (list($adminid, $editorialtimestamp, $editorialtext, $editorialtitle) = sql_fetch_row($resulted2)) {
            $editorialtitle = stripslashes($editorialtitle);
            $editorialtext = stripslashes($editorialtext);
            echo '
   <h3>' . adm_translate("Modifier l'Editorial") . '</h3> - ' . adm_translate("Auteur") . ' : ' . $adminid . ' : ' . formatTimeStamp($editorialtimestamp);
            echo '
   <form action="admin.php" method="post">
      <div class="form-group">
         <div class="row">
            <label class="form-control-label col-sm-4 " for="editorialtitle">' . adm_translate("Titre") . '</label>
            <div class="col-sm-8">
               <input class="form-control" type="text" name="editorialtitle" id="editorialtitle" value="' . $editorialtitle . '" maxlength="100" />
               <span class="help-block text-xs-right"><span id="countcar_editorialtitle"></span></span>
            </div>
         </div>
      </div>
      <div class="form-group">
         <div class="row">
            <label class="form-control-label col-sm-4 " for="editorialtext">' . adm_translate("Texte complet") . '</label>
            <div class="col-sm-8">
               <textarea class="form-control" name="editorialtext" rows="10">' . $editorialtext . '</textarea>
            </div>
         </div>
      </div>
      <div class="form-group">
         <div class="row">
            <div class="col-sm-offset-4 col-sm-8">
               <input type="hidden" name="linkid" value="' . $lid . '" />
               <input type="hidden" name="op" value="LinksModEditorial" />
               <button class="btn btn-primary col-xs-6" type="submit"><i class="fa fa-check fa-lg"></i>&nbsp;' . adm_translate("Modifier") . '</button>
               <button href="admin.php?op=LinksDelEditorial&amp;linkid=' . $lid . '" class="btn btn-danger col-xs-6"><i class="fa fa-trash-o fa-lg"></i>&nbsp;' . adm_translate("Effacer") . '</button>
            </div>
         </div>
      </div>';
        }
    }
    echo '
   </form>';
    adminfieldinp($result);
    adminfieldinp($resulted2);
    adminfoot('fv', '', '', '');
}
コード例 #19
0
ファイル: wspad.php プロジェクト: npds/npds_dune
function Page($page, $ranq)
{
    global $NPDS_Prefix, $ModPath, $ModStart, $gmt, $auteur, $groupe, $mess;
    $tmp = "\n   <script type='text/javascript'>\n   //<![CDATA[\n   // timerID=10 secondes (verrou) : timerTTL=20 minutes (force la deconnexion)// 240000 pour debug\n   var timerID = null;\n   var timerTTL = null;\n   function TimerInit() {\n       timerID = setTimeout('TimerAct()',10000);\n       timerTTL= setTimeout('TimerDes()',240000);\n   }\n   function TimerAct() {\n       clearTimeout(timerID);\n          ws_verrou('{$auteur}', '{$page}', '{$groupe}');\n       TimerInit();\n   }\n   function TimerDes() {\n       if (timerID != 0) {\n       bootbox.alert('" . wspad_trans("note : Enregistrer votre travail") . "', function() {});\n       }\n       clearTimeout(timerID);\n       timerID = 0;\n       clearTimeout(timerTTL);\n       timerTTL = 0;\n   }\n   function ws_verrou(xuser, xpage, xgroupe) {\n      var xmlhttp;\n      if (window.XMLHttpRequest) {\n         xmlhttp=new XMLHttpRequest();\n      } else {\n         xmlhttp=new ActiveXObject(\"Microsoft.XMLHTTP\");\n      }\n      var url='modules/{$ModPath}/ws_verrou.php?verrou_user='******'&verrou_page='+xpage+'&verrou_groupe='+xgroupe+'&random='+Math.random();\n      xmlhttp.open('GET', url, true);\n      xmlhttp.send();\n      document.getElementById('verrous').src='modules/{$ModPath}/images/ajax_waiting.gif';\n      document.getElementById('mess').innerHTML='';\n   }\n\n   document.getElementsByTagName('body')[0].setAttribute('onload','TimerInit();');\n   //]]>\n   </script>";
    // Analyse des verrous
    $filename = "modules/{$ModPath}/locks/{$page}-vgp-{$groupe}.txt";
    $refresh = 15;
    clearstatcache();
    if (file_exists($filename)) {
        if (filemtime($filename) > time() - $refresh) {
            // propriétaire de ce verrou ?
            $cont = file($filename);
            if ($cont[0] == $auteur) {
                $edition = true;
                echo $tmp;
            } else {
                $edition = false;
            }
        } else {
            // pose le verrou
            $fp = fopen($filename, "w");
            fwrite($fp, $auteur);
            fclose($fp);
            sql_query("UPDATE " . $NPDS_Prefix . "wspad SET verrou='' WHERE verrou='{$auteur}'");
            sql_query("UPDATE " . $NPDS_Prefix . "wspad SET verrou='{$auteur}' WHERE page='{$page}' AND member='{$groupe}'");
            $edition = true;
            echo $tmp;
        }
    } else {
        // pose le verrou
        $fp = fopen($filename, "w");
        fwrite($fp, $auteur);
        fclose($fp);
        sql_query("UPDATE " . $NPDS_Prefix . "wspad SET verrou='' WHERE verrou='{$auteur}'");
        sql_query("UPDATE " . $NPDS_Prefix . "wspad SET verrou='{$auteur}' WHERE page='{$page}' AND member='{$groupe}'");
        $edition = true;
        echo $tmp;
    }
    // Analyse des verrous
    $row = sql_fetch_assoc(sql_query("SELECT content, modtime, editedby, ranq FROM " . $NPDS_Prefix . "wspad WHERE page='{$page}' AND member='{$groupe}' AND ranq='{$ranq}'"));
    if (!$edition) {
        $mess = wspad_trans("Mode lecture seulement");
    }
    echo '';
    if (!is_array($row)) {
        $row['ranq'] = 1;
        $row['editedby'] = $auteur;
        $row['modtime'] = time();
    } else {
        $row['ranq'] += 1;
    }
    global $surlignage;
    echo '
   <h4>' . wspad_trans("Document : ") . $page . '<span class="text-muted">&nbsp;[ ' . wspad_trans("révision") . ' : ' . $row['ranq'] . ' - ' . $row['editedby'] . ' / ' . date(translate("dateinternal"), $row['modtime'] + $gmt * 3600) . ' ] </span> <span style="float: right;"><img src="modules/' . $ModPath . '/images/ajax_waiting.gif" id="verrous" title="wspad locks" /></span></h4>
   <div id="mess" class="alert alert-success" role="alert">test debug' . $mess . '</div>
   <form action="modules.php?ModPath=' . $ModPath . '&amp;ModStart=' . $ModStart . '&amp;member=' . $groupe . '" method="post" name="wspadformcont">
   <div class="form-group">
      <textarea class="tin form-control" rows="30" name="content" ><div class="mceNonEditable">' . $row['content'] . '</div></textarea>
   </div>';
    echo aff_editeur('content', '');
    if ($edition) {
        echo '
      <div class="form-group">
         <input class="btn btn-primary" type="submit" name="sauve" value="' . wspad_trans("Sauvegarder") . '" />
         <a class="btn btn-secondary" href="modules.php?ModPath=' . $ModPath . '&amp;ModStart=' . $ModStart . '&amp;member=' . $groupe . '" >' . wspad_trans("Abandonner") . '</a>
         <input type="hidden" name="page" value="' . $page . '" />
         <input type="hidden" name="op" value="sauve" />
      </div>';
    }
    echo '</form>';
}
コード例 #20
0
ファイル: submit.php プロジェクト: Jireck-npds/npds_dune
function PreviewStory($name, $subject, $story, $bodytext, $topic, $deb_day, $deb_month, $deb_year, $deb_hour, $deb_min, $fin_day, $fin_month, $fin_year, $fin_hour, $fin_min, $epur)
{
    global $tipath, $NPDS_Prefix, $topictext, $topicimage;
    $topiclogo = '<span class="label label-default pull-right"><strong>' . aff_langue($topictext) . '</strong></span>';
    include 'header.php';
    $subject = stripslashes(str_replace('"', '&quot;', strip_tags($subject)));
    $story = stripslashes($story);
    $bodytext = stripslashes($bodytext);
    echo '
   <h2>' . translate("Submit News") . '</h2>
   <form class="" action="submit.php" method="post" name="adminForm">
      <p class="lead"><strong>' . translate("Your Name") . '</strong> : ' . $name . '</p>
      <input type="hidden" name="name" value="' . $name . '" />';
    echo '<div class="card card-block">';
    if ($topic == '') {
        //      $topicimage='all-topics.gif';
        $warning = '<strong class="text-danger">' . translate("Select Topic") . '</strong>';
    } else {
        $warning = '';
        $result = sql_query("SELECT topictext, topicimage FROM " . $NPDS_Prefix . "topics WHERE topicid='{$topic}'");
        list($topictext, $topicimage) = sql_fetch_row($result);
    }
    if ($topicimage !== '') {
        if (!($imgtmp = theme_image('topics/' . $topicimage))) {
            $imgtmp = $tipath . $topicimage;
        }
        $timage = $imgtmp;
        if (file_exists($imgtmp)) {
            $topiclogo = '<img class="img-fluid N_sujetsize" src="' . $timage . '" align="right" alt="" />';
        }
    }
    $storyX = aff_code($story);
    $bodytextX = aff_code($bodytext);
    themepreview('<h3>' . $subject . $topiclogo . '</h3>', '<div class="text-muted">' . $storyX . '</div>', $bodytextX);
    //    if ($no_img) {
    //       echo '<strong>'.aff_langue($topictext).'</strong>';
    //    }
    echo '
   </div>
      <div class="form-group row">
         <label class="form-control-label col-sm-3" for="subject">' . translate("Title") . '</label>
         <div class="col-sm-9">
            <input type="text" name="subject" class="form-control" value="' . $subject . '" />
         </div>
      </div>
      <div class="form-group row">
         <label class="form-control-label col-sm-3" for="topic">' . translate("Topic") . '</label>
         <div class="col-sm-9">
            <select class="c-select form-control" name="topic">';
    $toplist = sql_query("SELECT topicid, topictext FROM " . $NPDS_Prefix . "topics ORDER BY topictext");
    echo '
               <option value="">' . translate("Select Topic") . '</option>';
    while (list($topicid, $topics) = sql_fetch_row($toplist)) {
        if ($topicid == $topic) {
            $sel = 'selected="selected" ';
        }
        echo '
               <option ' . $sel . ' value="' . $topicid . '">' . aff_langue($topics) . '</option>';
        $sel = '';
    }
    echo '
            </select>
            <span class="help-block text-danger">' . $warning . '</span>
         </div>
      </div>
      <div class="form-group row">
         <label class="form-control-label col-sm-12" for="story">' . translate("Intro Text") . '</label>
         <div class="col-sm-12">
            <span class="help-block">' . translate("HTML is fine, but double check those URLs and HTML tags!") . '</span>
            <textarea class="tin form-control" rows="25" name="story">' . $story . '</textarea>';
    echo aff_editeur('story', '');
    echo '</div>
      </div>
         <div class="form-group row">
            <label class="form-control-label col-sm-12">' . translate("Full Text") . '</label>
            <div class="col-sm-12">
               <textarea class="tin form-control" rows="25" name="bodytext">' . $bodytext . '</textarea>';
    echo aff_editeur('bodytext', '');
    echo '
            </div>
         </div>';
    publication($deb_day, $deb_month, $deb_year, $deb_hour, $deb_min, $fin_day, $fin_month, $fin_year, $fin_hour, $fin_min, $epur);
    echo '' . Q_spambot() . '';
    echo '
         <div class="form-group">
            <div class="col-sm-12">
               <input class="btn btn-secondary" type="submit" name="op" value="' . translate("Preview") . '" />
            </div>
      </div>';
    echo '
      <div class="form-group">
         <div class="col-sm-12">
            <input class="btn btn-primary" type="submit" name="op" value="Ok" />
         </div>
      </div>
   </form>';
    include 'footer.php';
}
コード例 #21
0
ファイル: stories.php プロジェクト: Jireck-npds/npds_dune
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';
}
コード例 #22
0
ファイル: lnl.php プロジェクト: Jireck-npds/npds_dune
function Add_Header_Footer($ibid)
{
    global $hlpfile, $f_meta_nom, $f_titre, $adminimg;
    include "header.php";
    GraphicAdmin($hlpfile);
    adminhead($f_meta_nom, $f_titre, $adminimg);
    $t = '';
    $v = '';
    if ($ibid == "HED") {
        $ti = "message d'entête";
        $va = 'lnl_Add_Header_Submit';
    } else {
        $ti = "Message de pied de page";
        $va = 'lnl_Add_Footer_Submit';
    }
    echo '
      <h3>' . ucfirst(adm_translate("{$ti}")) . '</h3>
      <form action="admin.php" method="post" name="adminForm">
      <fieldset>
         <div class="form-group">
               <label class="form-control-label" for="html">' . adm_translate("Format de donn&#xE9;es") . '</label>
               <div>
                  <input class="form-control" type="number" min="0" max="1" value="1" name="html" required="required" />
                  <span class="help-block"> <code>html</code> ==&#x3E; [1] / <code>text</code> ==&#x3E; [0]</span>
               </div>
            </div>
         <div class="form-group">
               <label class="form-control-label" for="xtext">' . adm_translate("Texte") . '</label>
               <div>
                  <textarea class="form-control" rows="20" name="xtext" ></textarea>
               </div>
         </div>
         <div class="form-group">';
    global $tiny_mce_relurl;
    $tiny_mce_relurl = "false";
    echo aff_editeur("xtext", "false");
    echo '
            <input type="hidden" name="op" value="' . $va . '" />
            <button class="btn btn-primary col-xs-12 col-md-6" type="submit"><i class="fa fa-plus-square fa-lg"></i>&nbsp;' . adm_translate("Ajouter") . ' ' . adm_translate("{$ti}") . '</button>
            <a href="admin.php?op=lnl" class="btn btn-secondary col-xs-12 col-md-6">' . adm_translate("Retour en arriére") . '</a>
         </div>
      </fieldset>
   </form>';
    adminfoot('fv', '', '', '');
}
コード例 #23
0
ファイル: automated.php プロジェクト: Jireck-npds/npds_dune
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', '', '', '');
}
コード例 #24
0
ファイル: links-3.php プロジェクト: Jireck-npds/npds_dune
function modifylinkrequest($lid, $modifylinkrequest_adv_infos, $author)
{
    global $ModPath, $ModStart, $links_DB, $NPDS_Prefix;
    if (autorise_mod($lid, false)) {
        if ($author == "-9") {
            Header("Location: modules.php?ModStart={$ModStart}&ModPath={$ModPath}/admin&op=LinksModLink&lid={$lid}");
        }
        include "header.php";
        mainheader();
        $result = sql_query("SELECT cid, sid, title, url, description, topicid_card FROM " . $links_DB . "links_links WHERE lid='{$lid}'");
        list($cid, $sid, $title, $url, $description, $topicid_card) = sql_fetch_row($result);
        $title = stripslashes($title);
        echo '
      <h3>' . translate("Request Link Modification") . ' : ' . $title . '</h3>';
        $description = stripslashes($description);
        echo '
      <form action="modules.php" method="post" name="adminForm">
         <input type="hidden" name="ModPath" value="' . $ModPath . '" />
         <input type="hidden" name="ModStart" value="' . $ModStart . '" />';
        echo "<table width=\"100%\" cellspacing=\"2\" cellpadding=\"2\" border=\"0\">";
        echo "<tr><td width=\"15%\">" . translate("Title:") . "</td><td><input class=\"textbox\" type=\"text\" name=\"title\" value=\"{$title}\" size=\"50\" maxlength=\"100\" /></td></tr>";
        global $links_url;
        if ($links_url) {
            echo "<tr><td width=\"15%\">URL :</td><td><input class=\"textbox\" type=\"text\" name=\"url\" value=\"{$url}\" size=\"50\" maxlength=\"100\" /></td></tr>";
        }
        echo "<tr><td width=\"15%\">" . translate("Category: ") . "</td><td>\n      <select class=\"c-select form-control\" name=\"cat\">";
        $result2 = sql_query("SELECT cid, title FROM " . $links_DB . "links_categories ORDER BY title");
        while (list($ccid, $ctitle) = sql_fetch_row($result2)) {
            $sel = '';
            if ($cid == $ccid and $sid == 0) {
                $sel = 'selected';
            }
            echo "<option value=\"{$ccid}\" {$sel}>" . aff_langue($ctitle) . "</option>";
            $result3 = sql_query("SELECT sid, title FROM " . $links_DB . "links_subcategories WHERE cid='{$ccid}' ORDER BY title");
            while (list($ssid, $stitle) = sql_fetch_row($result3)) {
                $sel = '';
                if ($sid == $ssid) {
                    $sel = 'selected="selected"';
                }
                echo "<option value=\"{$ccid}-{$ssid}\" {$sel}>" . aff_langue("{$ctitle} / {$stitle}") . "</option>";
            }
        }
        echo "</select></td></tr>";
        global $links_topic;
        if ($links_topic) {
            echo "<tr><td width=\"15%\">" . translate("Topics") . " : </td><td><select class=\"textbox_standard\" name=\"topicL\">";
            $toplist = sql_query("select topicid, topictext from " . $NPDS_Prefix . "topics order by topictext");
            echo "<option value=\"\">" . translate("All Topics") . "</option>\n";
            while (list($topicid, $topics) = sql_fetch_row($toplist)) {
                if ($topicid == $topicid_card) {
                    $sel = "selected=\"selected\" ";
                }
                echo "<option {$sel} value=\"{$topicid}\">{$topics}</option>\n";
                $sel = "";
            }
            echo "</select></td></tr>";
        }
        echo "</table>";
        echo "<br />" . translate("Description: (255 characters max)") . "<br /><textarea class=\"textbox\" name=\"xtext\" cols=\"50\" rows=\"10\" style=\"width: 100%;\">{$description}</textarea>";
        aff_editeur("xtext", "false");
        echo "<br />";
        echo "<input type=\"hidden\" name=\"lid\" value=\"{$lid}\" />";
        echo "<input type=\"hidden\" name=\"modifysubmitter\" value=\"{$author}\" />";
        echo "<input type=\"hidden\" name=\"op\" value=\"modifylinkrequestS\" /><input type=\"submit\" class=\"bouton_standard\" value=\"" . translate("Send Request") . "\" /></form>";
        closetable();
        $browse_key = $lid;
        include "modules/sform/{$ModPath}/link_maj.php";
        include "footer.php";
    } else {
        header("Location: modules.php?ModStart={$ModStart}&ModPath={$ModPath}");
    }
}