Beispiel #1
0
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";
}
Beispiel #2
0
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";
}
Beispiel #3
0
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";
}
Beispiel #4
0
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', '', '', '');
}