function reviews() { global $hlpfile; global $NPDS_Prefix, $f_meta_nom, $f_titre, $adminimg; include "header.php"; GraphicAdmin($hlpfile); adminhead($f_meta_nom, $f_titre, $adminimg); $resultrm = sql_query("SELECT title, description FROM " . $NPDS_Prefix . "reviews_main"); list($title, $description) = sql_fetch_row($resultrm); echo ' <h3>' . adm_translate("Configuration de la page") . '</h3> <form id="fad_pagereviews" class="" action="admin.php" method="post"> <fieldset> <div class="form-group"> <label for="tit_cri">' . adm_translate("Titre de la Page des Critiques") . '</label> <input id="tit_cri" type="text" class="form-control" name="title" value="' . $title . '" maxlength="100" /> </div> <div class="form-group"> <label for="description">' . adm_translate("Description de la Page des Critiques") . '</label> <textarea id="description" class="form-control" name="description" rows="10">' . $description . '</textarea> </div> <div class="form-group"> <input type="hidden" name="op" value="mod_main" /> <button class="btn btn-primary col-xs-12" type="submit"><i class="fa fa-check-square fa-lg"></i> ' . adm_translate("Sauver les modifications") . '</button> </div> </fieldset> </form> <h3>' . adm_translate("Critiques en attente de validation") . '</h3>'; $result = sql_query("SELECT * FROM " . $NPDS_Prefix . "reviews_add ORDER BY id"); $numrows = sql_num_rows($result); if ($numrows > 0) { while (list($id, $date, $title, $text, $reviewer, $email, $score, $url, $url_title) = sql_fetch_row($result)) { $title = stripslashes($title); $text = stripslashes($text); echo ' <h4>' . adm_translate("Ajouter la critique N° : ") . ' ' . $id . '</h4> <form id="fad_valreviews' . $id . '" action="admin.php" method="post"> <input type="hidden" name="id" value="' . $id . '" /> <div class="form-group"> <div class="row"> <label class="form-control-label col-sm-4" for="date">' . adm_translate("Date") . '</label> <div class="col-sm-8"> <div class="input-group input-append date" id="datePicker"> <input class="form-control" type="text" name="date" value="' . $date . '" maxlength="10" data-provide="datepicker" data-date-format="yyyy-mm-dd" data-date-language="' . language_iso(1, '', '') . '" /> <span class="input-group-addon add-on"><span class="glyphicon glyphicon-calendar"></span></span> </div> </div> </div> </div> <div class="form-group"> <div class="row"> <label class="form-control-label col-sm-4" for="title">' . adm_translate("Nom du produit") . '</label> <div class="col-sm-8"> <input class="form-control" type="text" name="title" value="' . $title . '" maxlength="40" /> </div> </div> </div> <div class="form-group"> <div class="row"> <label class="form-control-label col-sm-4 col-md-4" for="text' . $id . '">' . adm_translate("Texte") . '</label> <div class="col-sm-8"> <textarea class="form-control" name="text" rows="6">' . $text . '</textarea> </div> </div> </div> <div class="form-group"> <div class="row"> <label class="form-control-label col-sm-4 col-md-4" for="reviewer">' . adm_translate("Le critique") . '</label> <div class="col-sm-8"> <input class="form-control" type="text" name="reviewer" value="' . $reviewer . '" maxlength="20" /> <span class="help-block text-xs-right"><span id="countcar_reviewer"></span></span> </div> </div> </div> <div class="form-group"> <div class="row"> <label class="form-control-label col-sm-4 col-md-4" for="email">' . adm_translate("E-mail") . '</label> <div class="col-sm-8"> <input class="form-control" type="email" id="email" name="email" value="' . $email . '" maxlength="30" /> <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 col-md-4" for="score">' . adm_translate("Note") . '</label> <div class="col-sm-8"> <input class="form-control" type="number" id="score" name="score" value="' . $score . '" min="1" max="10" /> </div> </div> </div>'; if ($url != '') { echo ' <div class="form-group"> <div class="row"> <label class="form-control-label col-sm-4 col-md-4" for="url">' . adm_translate("Liens relatifs") . '</label> <div class="col-sm-8"> <input class="form-control" type="url" id="url" name="url" value="' . $url . '" maxlength="100" /> <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 col-md-4" for="url_title">' . adm_translate("Titre du lien") . '</label> <div class="col-sm-8"> <input class="form-control" type="text" id="url_title" name="url_title" value="' . $url_title . '" maxlength="50" /> <span class="help-block text-xs-right"><span id="countcar_url_title"></span></span> </div> </div> </div>'; } echo ' <div class="form-group"> <div class="row"> <label class="form-control-label col-sm-4" for="cover">' . adm_translate("Image de garde") . '</label> <div class="col-sm-8"> <input class="form-control" type="text" id="cover" name="cover" maxlength="100" /> <span class="help-block">150*150 pixel => images/covers</span> </div> </div> </div> <div class="form-group"> <input type="hidden" name="op" value="add_review"> <button class="btn btn-primary" type="submit"><i class="fa fa-plus-square fa-lg"></i> ' . adm_translate("Ajouter cette critique") . '</button> <a href="admin.php?op=deleteNotice&id=' . $id . '&op_back=reviews" class="btn btn-danger" role="button">' . adm_translate("Supprimer cette Critique") . '</a> </div> </form>'; } } else { echo "<br />" . adm_translate("Aucune critique à ajouter") . "<br />"; } echo "<hr noshade=\"noshade\" class=\"ongl\" /><p align=\"center\"><a href=\"reviews.php?op=write_review\" class=\"noir\">" . adm_translate("Cliquer ici pour proposer une Critique.") . "</a></p><hr noshade class=\"ongl\">"; echo adm_translate("Effacer / Modifier une Critique"); echo "<br />"; echo adm_translate("Vous pouvez simplement Effacer / Modifier les Critiques en naviguant sur") . " <a href=\"reviews.php\" class=\"noir\">reviews.php</a> " . adm_translate("en tant qu'Administrateur.") . "<br />"; adminfieldinp($result); sql_free_result($result); adminfoot('fv', '', '', ''); }
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> ' . adm_translate("Modifier") . ' </button> <button href="admin.php?op=LinksDelLink&lid=' . $lid . '" class="btn btn-danger col-xs-6"><i class="fa fa-trash-o fa-lg"></i> ' . 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> ' . 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> ' . adm_translate("Modifier") . '</button> <button href="admin.php?op=LinksDelEditorial&linkid=' . $lid . '" class="btn btn-danger col-xs-6"><i class="fa fa-trash-o fa-lg"></i> ' . adm_translate("Effacer") . '</button> </div> </div> </div>'; } } echo ' </form>'; adminfieldinp($result); adminfieldinp($resulted2); adminfoot('fv', '', '', ''); }
function HeadlinesEdit($hid) { global $hlpfile, $NPDS_Prefix, $f_meta_nom, $f_titre, $adminimg; include "header.php"; $vars = get_defined_vars(); GraphicAdmin($hlpfile); $result = sql_query("SELECT sitename, url, headlinesurl, status FROM " . $NPDS_Prefix . "headlines WHERE hid='{$hid}'"); list($xsitename, $url, $headlinesurl, $status) = sql_fetch_row($result); adminhead($f_meta_nom, $f_titre, $adminimg); echo ' <h3 class="m-t-md">' . adm_translate("Editer paramètres Grand Titre") . '</h3> <form action="admin.php" method="post"> <fieldset> <input type="hidden" name="hid" value="' . $hid . '" /> <div class="form-group"> <div class="row"> <label class="form-control-label col-sm-4" for="xsitename">' . adm_translate("Nom du site") . '</label> <div class="col-sm-8"> <input class="form-control" type="text" name="xsitename" maxlength="30" value="' . $xsitename . '" required="required" /> </div> </div> </div> <div class="form-group"> <div class="row"> <label class="form-control-label col-sm-4" for="url">' . adm_translate("URL") . '</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="url" id="url" name="url" maxlength="100" value="' . $url . '" required="required" /> <span class="help-block text-xs-right"><span id="countcar_url"></span></span> </div> </div> </div> </div> <div class="form-group"> <div class="row"> <label class="form-control-label col-sm-4" for="headlinesurl">' . adm_translate("URL pour le fichier RDF/XML") . '</label> <div class="col-sm-8"> <div class="input-group"> <span class="input-group-btn"> <button class="btn btn-secondary" ><a href="' . $headlinesurl . '" target="_blank"><i class="fa fa-external-link fa-lg"></i></a></button> </span> <input class="form-control" type="url" name="headlinesurl" maxlength="200" value="' . $headlinesurl . '" required="required" /> </div> </div> </div> </div> <div class="form-group"> <div class="row"> <label class="form-control-label col-sm-4" for="status">' . adm_translate("Etat") . '</label> <div class="col-sm-8"> <select class="c-select form-control" name="status">'; if ($status == 1) { $sel_a = 'selected="selected"'; } else { $sel_i = 'selected="selected"'; } echo ' <option name="status" value="1" ' . $sel_a . '>' . adm_translate("Actif(s)") . '</option> <option name="status" value="0" ' . $sel_i . '>' . adm_translate("Inactif(s)") . '</option> </select> </div> </div> </div> <div class="form-group"> <div class="row"> <input type="hidden" name="op" value="HeadlinesSave" /> <div class="col-sm-offset-4 col-sm-8"> <button class="btn btn-primary col-xs-12" type="submit"><i class="fa fa-edit fa-lg"></i> ' . adm_translate("Sauver les modifications") . '</button> </div> </div> </div> </fieldset> </form>'; adminfieldinp($result); adminfoot('fv', '', '', ''); }
function relatededit($tid, $rid) { global $hlpfile, $tipath, $NPDS_Prefix, $f_meta_nom, $f_titre, $adminimg; include "header.php"; GraphicAdmin($hlpfile); $result = sql_query("SELECT name, url FROM " . $NPDS_Prefix . "related WHERE rid='{$rid}'"); list($name, $url) = sql_fetch_row($result); $result2 = sql_query("SELECT topictext, topicimage FROM " . $NPDS_Prefix . "topics WHERE topicid='{$tid}'"); list($topictext, $topicimage) = sql_fetch_row($result2); adminhead($f_meta_nom, $f_titre, $adminimg); echo ' <h3>' . adm_translate("Sujet : ") . ' ' . $topictext . '</h3> <h4>' . adm_translate("Editer les Liens Relatifs") . '</h4>'; if ($topicimage != "") { echo ' <div class="thumbnail"> <img class="img-fluid " src="' . $tipath . $topicimage . '" alt="' . $topictext . '" /> </div>'; } echo ' <form class="form-horizontal" action="admin.php" method="post"> <fieldset> <div class="form-group row"> <label class="form-control-label col-sm-4" for="name">' . adm_translate("Nom du site") . '</label> <div class="col-sm-8"> <input type="text" class="form-control" name="name" id="name" value="' . $name . '" maxlength="30" /> <span class="help-block text-xs-right"><span id="countcar_name"></span></span> </div> </div> <div class="form-group row"> <label class="form-control-label col-sm-4" for="url">' . adm_translate("URL") . '</label> <div class="col-sm-8"> <div class="input-group"> <span class="input-group-btn"> <button class="btn"><a href="' . $url . '" target="_blank"><i class="fa fa-external-link fa-lg"></i></a></button> </span> <input type="url" class="form-control" name="url" id="url" value="' . $url . '" maxlength="200" /> </div> <span class="help-block text-xs-right"><span id="countcar_url"></span></span> </div> <input type="hidden" name="op" value="relatedsave" /> <input type="hidden" name="tid" value="' . $tid . '" /> <input type="hidden" name="rid" value="' . $rid . '" /> </fieldset> <div class="form-group row"> <div class="col-sm-offset-4 col-sm-8"> <button class="btn btn-primary col-xs-12" type="submit"><i class="fa fa-check-square fa-lg"></i> ' . adm_translate("Sauver les modifications") . '</button> </div> </div> </form>'; adminfieldinp($result); adminfoot('fv', '', '', ''); }