Esempio n. 1
0
function code_aff($subject, $story, $bodytext, $notes)
{
    global $local_user_language;
    $subjectX = aff_code(preview_local_langue($local_user_language, $subject));
    $storyX = aff_code(preview_local_langue($local_user_language, $story));
    $bodytextX = aff_code(preview_local_langue($local_user_language, $bodytext));
    $notesX = aff_code(preview_local_langue($local_user_language, $notes));
    themepreview($subjectX, $storyX, $bodytextX, $notesX);
}
Esempio n. 2
0
function fab_feed($type, $filename, $timeout)
{
    global $sitename, $slogan, $nuke_url, $backend_image, $backend_title, $backend_width, $backend_height, $backend_language, $storyhome;
    include "lib/feedcreator.class.php";
    $rss = new UniversalFeedCreator();
    $rss->useCached($type, $filename, $timeout);
    $rss->title = $sitename;
    $rss->description = $slogan;
    $rss->descriptionTruncSize = 250;
    $rss->descriptionHtmlSyndicated = true;
    $rss->link = $nuke_url;
    $rss->syndicationURL = $nuke_url . "/backend.php?op=" . $type;
    $image = new FeedImage();
    $image->title = $sitename;
    $image->url = $backend_image;
    $image->link = $nuke_url;
    $image->description = $backend_title;
    $image->width = $backend_width;
    $image->height = $backend_height;
    $rss->image = $image;
    $xtab = news_aff("index", "where ihome='0' and archive='0'", $storyhome, "");
    $story_limit = 0;
    while ($story_limit < $storyhome and $story_limit < sizeof($xtab)) {
        list($sid, $catid, $aid, $title, $time, $hometext, $bodytext, $comments, $counter, $topic, $informant, $notes) = $xtab[$story_limit];
        $story_limit++;
        $item = new FeedItem();
        $item->title = preview_local_langue($backend_language, str_replace("&quot;", "\"", $title));
        $item->link = $nuke_url . "/article.php?sid={$sid}";
        $item->description = meta_lang(preview_local_langue($backend_language, $hometext));
        $item->descriptionHtmlSyndicated = true;
        $item->date = convertdateTOtimestamp($time) + $gmt * 3600;
        $item->source = $nuke_url;
        $item->author = $aid;
        $rss->addItem($item);
    }
    echo $rss->saveFeed($type, $filename);
}
Esempio n. 3
0
function Edit_Meta_Lang()
{
    global $hlpfile, $NPDS_Prefix, $ml, $local_user_language, $language, $f_meta_nom, $f_titre, $adminimg;
    $Q = sql_query("SELECT def, content, type_meta, type_uri, uri, description, obligatoire FROM " . $NPDS_Prefix . "metalang WHERE def = '" . $ml . "'");
    $Q = sql_fetch_assoc($Q);
    sql_free_result($Q);
    include "header.php";
    GraphicAdmin($hlpfile);
    adminhead($f_meta_nom, $f_titre, $adminimg);
    echo '<hr />';
    if ($Q['obligatoire'] != true) {
        echo '
   <h3>' . adm_translate("Modifier un ") . ' META-MOT</h3>';
    }
    echo aff_local_langue('<label class="form-control-label">' . adm_translate("Langue de Prévisualisation") . '</label>', '', 'local_user_language') . '<br />';
    echo '
   <div class="row">
      <div class="text-muted col-sm-3">META</div>
      <div class="col-sm-9"><code>' . $Q['def'] . '</code></div>
   </div>
   <div class="row">
      <div class="text-muted col-sm-3">Type</div>
      <div class="col-sm-9">' . $Q['type_meta'] . '</div>
   </div>
   <div class="row">
      <div class="text-muted col-sm-3">' . adm_translate("Description") . '</div>
      <div class="col-sm-9">';
    if ($Q['type_meta'] == 'smil') {
        eval($Q['content']);
        echo $cmd;
    } else {
        echo preview_local_langue($local_user_language, aff_langue($Q['description']));
    }
    echo '
      </div>
   </div>';
    if ($Q['type_meta'] != 'docu' and $Q['type_meta'] != 'them') {
        echo '
   <div class="row">
      <div class="text-muted col-sm-12">' . adm_translate("Script") . '</div>
      <div class=" col-sm-12" style="overflow-x:scroll;">
         <pre><code>' . htmlspecialchars($Q['content'], ENT_QUOTES) . '</code></pre>
      </div>
   </div>';
    }
    if ($Q['obligatoire'] != true) {
        echo '
   <form name="edit_meta_lang" action="admin.php" method="post">
      <div class="form-group row">
         <label class="form-control-label col-sm-12" for="def">META</label>
         <div class="col-sm-12">
            <input class="form-control" type="text" name="def" value="' . $Q['def'] . '" readonly="readonly" />
         </div>
      </div>
      <div class="form-group row">
         <label class="form-control-label col-sm-12" for="type_meta">' . adm_translate("Type") . '</label>
         <div class="col-sm-12">
            <input class="form-control" type="text" name="type_meta" value="' . $Q['type_meta'] . '" maxlength="10" readonly="readonly" />
         </div>
      </div>
      <div class="form-group row">
         <label class="form-control-label col-sm-12" for="desc">' . adm_translate("Description") . '</label>
         <div class="col-sm-12">';
        if ($Q['type_meta'] == 'smil') {
            eval($Q['content']);
            echo $cmd . '</div></div>';
        } else {
            echo '
            <textarea class="form-control" name="desc" rows="7" >' . $Q['description'] . '</textarea>
         </div>
      </div>';
        }
        if ($Q['type_meta'] != "docu" and $Q['type_meta'] != "them") {
            echo '
      <div class="form-group row">
         <label class="form-control-label col-sm-12" for="content">' . adm_translate("Script") . '</label>
         <div class="col-sm-12">
            <textarea class="form-control" name="content" rows="20" >' . $Q['content'] . '</textarea>
         </div>
      </div>';
        }
        echo '
      <div class="form-group row">
         <label class="form-control-label col-sm-4" for="type_uri">' . adm_translate("Restriction") . '</label>';
        if ($Q['type_uri'] == '+') {
            if ($Q['obligatoire'] == true) {
                $sel1 = 'selected="selected"';
            } else {
                $sel1 = ' selected';
            }
        } else {
            if ($Q['obligatoire'] == true) {
                $sel0 = 'selected="selected"';
            } else {
                $sel0 = ' selected';
            }
        }
        echo '
      <div class="col-sm-8">
         <select class="custom-select" name="type_uri">
            <option' . $sel0 . ' value="moins">' . adm_translate("Tous sauf pour ...") . '</option>
            <option' . $sel1 . ' value="plus">' . adm_translate("Seulement pour ...") . '</option>
         </select>
         <div class="help-block">...
      ' . adm_translate("les URLs que vous aurez renseignés ci-après (ne renseigner que la racine de l'URI)") . '<br />
      ' . adm_translate("Exemple") . ' : index.php user.php forum.php static.php<br />
      ' . adm_translate("Par défaut, rien ou Tout sauf pour ... [aucune URI] = aucune restriction") . '
         </div>
         </div>
      </div>
      <div class="form-group row">
         <div class="col-sm-12">
            <textarea class="form-control" name="uri" rows="7">' . $Q['uri'] . '</textarea>
         </div>
      </div>
      <div class="form-group row">
         <div class="col-sm-12">
            <input type="hidden" name="Maj_Bdd_ML" value="edit_meta" />
            <input type="hidden" name="op" value="Valid_Meta_Lang" />
            <button class="btn btn-primary" type="submit">' . adm_translate("Valider") . '</button>
         </div>
      </div>
   </form>';
    } else {
        go_back('');
    }
    adminfoot('', '', '', '');
}
Esempio n. 4
0
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', '', '', '');
}
Esempio n. 5
0
function Edit_Meta_Lang()
{
    global $hlpfile, $NPDS_Prefix, $ml, $local_user_language, $language, $f_meta_nom, $f_titre, $adminimg;
    $Q = sql_query("SELECT def, content, type_meta, type_uri, uri, description, obligatoire FROM " . $NPDS_Prefix . "metalang WHERE def = '" . $ml . "'");
    $Q = sql_fetch_assoc($Q);
    sql_free_result($Q);
    include "header.php";
    GraphicAdmin($hlpfile);
    adminhead($f_meta_nom, $f_titre, $adminimg);
    if ($Q['obligatoire'] != true) {
        echo '<h3>' . adm_translate("Modifier un ") . ' META-MOT</h3>';
    }
    //   inc_head($title);
    echo '
   <table border="0" width="100%" cellpadding="0" cellspacing="1" class="header">
   <tr>
   <td>';
    echo "<table width=\"100%\" border=\"0\" cellpadding=\"8\" cellspacing=\"1\" class=\"lignb\">\n";
    echo "<tr>\n";
    echo "<td colspan=\"2\" valign=\"top\"><b>" . aff_local_langue("<b>" . adm_translate("Langue de Prévisualisation") . "</b> : ", "", "local_user_language") . "<br /></td>\n";
    echo "</tr>\n";
    echo "<tr>\n";
    echo "<td width=\"110\"><b>META</b> : </td><td>" . $Q['def'] . "</td>\n";
    echo "</tr>\n";
    echo "<tr>\n";
    echo "<td><b>Type</b> :</td><td>" . $Q['type_meta'] . "</td>\n";
    echo "</tr>\n";
    echo "<tr>\n";
    echo "<td><b>" . adm_translate("Description") . "</b></td>\n";
    if ($Q['type_meta'] == "smil") {
        eval($Q['content']);
        echo "<td>" . $cmd . "</td>\n";
    } else {
        echo '<td>' . preview_local_langue($local_user_language, aff_langue($Q['description'])) . '</td>' . "\n";
    }
    echo "</tr>\n";
    if ($Q['type_meta'] != "docu" and $Q['type_meta'] != "them") {
        echo "<tr " . $rowcolor . ">\n";
        echo "<td valign=\"top\"><b>" . adm_translate("Script") . "</b> :</td>\n";
        echo "<td>";
        echo "<textarea name=\"content\" class=\"textbox_standard\" rows=\"20\" style=\"width: 100%;\" readonly=\"readonly\">\n";
        echo $Q['content'];
        echo "</textarea>";
        echo '</td>
      </tr>';
    }
    echo '
   </table>
   </td>
   </tr>
   </table>' . "\n";
    if ($Q['obligatoire'] != true) {
        opentable();
        echo "<table width=\"100%\" border=\"0\" cellpadding=\"8\" cellspacing=\"1\">\n";
        echo "<form name=\"edit_meta_lang\" action=\"admin.php\" method=\"post\">\n";
        echo "<tr>\n";
        echo "<td width=\"110\"><b>META</b> : </td>\n";
        echo "<td>";
        echo "<input class=\"textbox_standard\" type=\"text\" name=\"def\" value=\"" . $Q['def'] . "\" size=\"50\" readonly=\"readonly\" /></td>\n";
        echo "</tr>\n";
        echo "<tr>\n";
        echo "<td><b>" . adm_translate("Type") . "</b> :</td>\n";
        echo "<td>";
        echo "<input class=\"textbox_standard\" type=\"text\" name=\"type_meta\" value=\"" . $Q['type_meta'] . "\" size=\"10\" maxlength=\"10\" readonly=\"readonly\" />";
        echo "</td>\n";
        echo "</tr>\n";
        echo "<tr>\n";
        echo "<td><b>" . adm_translate("Description") . "</b> :</td>\n";
        if ($Q['type_meta'] == "smil") {
            eval($Q['content']);
            echo "<td>" . $cmd . "</td>\n";
        } else {
            echo "<td>";
            echo "<textarea class=\"textbox_standard\" name=\"desc\" rows=\"7\" style=\"width: 100%;\" >";
            echo $Q['description'];
            echo "</textarea>";
            echo "</td>\n";
        }
        echo "</tr>\n";
        if ($Q['type_meta'] != "docu" and $Q['type_meta'] != "them") {
            echo "<tr>\n";
            echo "<td valign=\"top\"><b>" . adm_translate("Script") . "</b> : </td>\n";
            echo "<td>";
            echo "<textarea class=\"textbox_standard\" name=\"content\" rows=\"20\" style=\"width: 100%;\" >\n";
            echo $Q['content'];
            echo "</textarea>";
            echo "</td>\n";
            echo "</tr>\n";
        }
        echo "<tr>\n";
        echo "<td><b>" . adm_translate("Restriction") . " :</b></td>\n";
        echo "<td>";
        if ($Q['type_uri'] == "+") {
            if ($Q['obligatoire'] == true) {
                $sel1 = "selected=\"selected\"";
            } else {
                $sel1 = " selected";
            }
        } else {
            if ($Q['obligatoire'] == true) {
                $sel0 = "selected=\"selected\"";
            } else {
                $sel0 = " selected";
            }
        }
        echo '
      <select class="textbox_standard" name="type_uri">
         <option' . $sel0 . ' value="moins">' . adm_translate("Tous sauf pour ...") . '</option>
         <option' . $sel1 . ' value="plus">' . adm_translate("Seulement pour ...") . '</option>
      </select>';
        echo "&nbsp;..." . adm_translate("les URLs que vous aurez renseignés ci-aprés&nbsp;<i>(ne renseigner que la racine de l'URI)</i>") . "";
        echo "<br />" . adm_translate("Exemple") . " : index.php user.php forum.php static.php\n";
        echo "<br />" . adm_translate("Par defaut, rien ou Tout sauf pour ... [aucune URI] = aucune restriction");
        echo "<br />\n";
        echo "<textarea class=\"textbox_standard\" name=\"uri\" rows=\"7\" style=\"width: 100%;\" >";
        echo $Q['uri'] . "</textarea>";
        echo '
         </td>
      </tr>
      <tr>
         <td width="100%" colspan="2" align="center">
            <input type="hidden" name="Maj_Bdd_ML" value="edit_meta" />
            <input type="hidden" name="op" value="Valid_Meta_Lang" />
            <button class="btn btn-primary" type="submit">' . adm_translate("Valider") . '</button>
         </td>
      </tr>
      </table>
      </form>' . "\n";
        closetable();
    } else {
        go_back("");
    }
    closetable();
    include "footer.php";
}