本文整理汇总了PHP中GraphicAdmin函数的典型用法代码示例。如果您正苦于以下问题:PHP GraphicAdmin函数的具体用法?PHP GraphicAdmin怎么用?PHP GraphicAdmin使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了GraphicAdmin函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: show
function show($mode, $tablelist, $query)
{
global $db, $bgcolor2, $bgcolor3, $type, $dbname;
require_once 'header.php';
GraphicAdmin('_AMENU0');
OpenTable();
if ($query === null) {
echo 'Mode: <b>' . $mode . '</b> not available yet';
return;
}
if (count($tablelist)) {
$result = $db->sql_query($query);
$numfields = $db->sql_numfields($result);
echo '<span class="genmed"><strong>' . _DATABASE . ':</strong> ' . $dbname . '</span><br /><br />Here are the results of your ' . strtolower($type) . '<br /><br />
<table border="0" cellpadding="2"><tr bgcolor="' . $bgcolor2 . '">';
for ($j = 0; $j < $numfields; $j++) {
echo '<td><strong>' . $db->sql_fieldname($j, $result) . '</strong></td>';
}
echo '</tr>';
$bgcolor = $bgcolor3;
while ($row = $db->sql_fetchrow($result)) {
$bgcolor = $bgcolor == '' ? ' bgcolor="' . $bgcolor3 . '"' : '';
echo '<tr' . $bgcolor . '>';
for ($j = 0; $j < $numfields; $j++) {
echo '<td>' . $row[$j] . '</td>';
}
echo '</tr>';
}
echo '</table>';
}
CloseTable();
}
示例2: hreferer
function hreferer()
{
global $bgcolor2, $prefix, $db, $admin_file;
include "header.php";
GraphicAdmin();
OpenTable();
echo "<center><font class=\"title\"><b>" . _HTTPREFERERS . "</b></font></center>";
CloseTable();
echo "<br>";
OpenTable();
echo "<center><b>" . _WHOLINKS . "</b></center><br><br>" . "<table border=\"0\" width=\"100%\">";
$row = $db->sql_fetchrow($db->sql_query("SELECT httprefmode from " . $prefix . "_config"));
$httprefmode = intval($row['httprefmode']);
$result = $db->sql_query("SELECT rid, url from " . $prefix . "_referer");
while ($row = $db->sql_fetchrow($result)) {
$rid = intval($row['rid']);
$url = filter($row['url'], "nohtml");
$url2 = urlencode($url);
$title = $url;
if ($httprefmode == 1) {
$url = explode("/", $url);
$url = "http://{$url['2']}";
}
echo "<tr><td bgcolor=\"{$bgcolor2}\"><font class=\"content\">{$rid}</td>" . "<td bgcolor=\"{$bgcolor2}\"><font class=\"content\"><a href=\"index.php?url={$url2}\" target=\"_new\" title=\"{$title}\">{$url}</a></td></tr>";
}
echo "</table>" . "<form action=\"" . $admin_file . ".php\" method=\"post\">" . "<input type=\"hidden\" name=\"op\" value=\"delreferer\">" . "<center><input type=\"submit\" value=\"" . _DELETEREFERERS . "\"></center>";
CloseTable();
include "footer.php";
}
示例3: showheader
function showheader()
{
global $pagetitle;
require 'header.php';
GraphicAdmin('_AMENU2');
OpenTable();
echo '<table border="0" width="100%"><tr><td valign="top">';
}
示例4: group_head
function group_head()
{
global $lang;
require_once 'header.php';
GraphicAdmin('_AMENU2');
OpenTable();
echo '<div style="text-align:center;"><h1>Groups Administration</h1></div>';
}
示例5: showheader
function showheader()
{
global $modheader;
$modheader .= '
<link rel="stylesheet" href="themes/default/style/tabletree.css" type="text/css" media="screen"/>
<script type="text/javascript" src="includes/javascript/framework.js"></script>
<script type="text/javascript" src="includes/javascript/dragndrop.js"></script>
<script type="text/javascript" src="includes/javascript/tabletree.js"></script>
<script type="text/javascript" src="includes/javascript/tasktable.js"></script>
';
require_once 'header.php';
GraphicAdmin('_AMENU1');
OpenTable();
echo '<div style="text-align:center;">';
}
示例6: cpg_mm_admin_header
function cpg_mm_admin_header($title, $content = '')
{
global $pagetitle, $cpgtpl, $modheader;
$pagetitle .= ' ' . _BC_DELIM . ' ' . _CPG_MMADMIN;
$modheader .= '
<link rel="stylesheet" href="themes/default/style/tabletree.css" type="text/css" media="screen"/>
<script type="text/javascript" src="includes/javascript/framework.js"></script>
<script type="text/javascript" src="includes/javascript/dragndrop.js"></script>
<script type="text/javascript" src="includes/javascript/tabletree.js"></script>
<script type="text/javascript" src="includes/javascript/tree.js"></script>
';
require 'header.php';
GraphicAdmin('_AMENU1');
$cpgtpl->assign_vars(array('L_CPGMM' => URL::admin('cpgmm'), 'ICON_SELECT' => 'images/blocks/CPG_Main_Menu/icon_select.gif', 'ICON_FORBID' => 'images/blocks/CPG_Main_Menu/icon_cantselect.gif', 'ICON_HIDDEN' => 'images/blocks/CPG_Main_Menu/icon_hideselect.gif', 'HEAD_TITLE' => $title, 'HEAD_CONTENT' => $content));
$cpgtpl->set_handle('head', 'admin/cpgmm_header.html');
$cpgtpl->display('head');
}
示例7: mblock
function mblock()
{
global $hlpfile, $NPDS_Prefix, $f_meta_nom, $f_titre, $adminimg;
include "header.php";
GraphicAdmin($hlpfile);
adminhead($f_meta_nom, $f_titre, $adminimg);
echo '
<hr />
<h3>' . adm_translate("Edition du Bloc Principal") . '</h3>';
$result = sql_query("SELECT title, content FROM " . $NPDS_Prefix . "mainblock");
if (sql_num_rows($result) > 0) {
while (list($title, $content) = sql_fetch_row($result)) {
echo '
<form id="fad_mblock" action="admin.php" method="post">
<div class="form-group row">
<label class="form-control-label col-xs-12" for="title">' . adm_translate("Titre") . '</label>
<div class="col-xs-12">
<textarea class="form-control" type="text" id="title" name="title" maxlength="255" placeholder="' . adm_translate("Titre :") . '">' . $title . '</textarea>
<span class="help-block text-xs-right"><span id="countcar_title"></span></span>
</div>
</div>
<div class="form-group row">
<label class="form-control-label col-xs-12" for="content">' . adm_translate("Contenu") . '</label>
<div class="col-xs-12">
<textarea class="form-control" rows="25" id="content" name="content">' . $content . '</textarea>
</div>
</div>
<input type="hidden" name="op" value="changemblock" />
<div class="form-group row">
<div class="col-xs-12">
<button class="btn btn-outline-primary btn-block" type="submit"><i class ="fa fa-check fa-lg"></i> ' . adm_translate("Valider") . '</button>
</div>
</div>
</form>
<script type="text/javascript">
//<![CDATA[
$(document).ready(function() {
inpandfieldlen("title",255);
});
//]]>
</script>';
}
}
adminfoot('fv', '', '', '');
}
示例8: publishrights
function publishrights($author)
{
global $NPDS_Prefix, $hlpfile, $radminsuper, $f_meta_nom, $f_titre, $adminimg;
if ($radminsuper != 1) {
Header("Location: admin.php?op=sections");
}
include "header.php";
GraphicAdmin($hlpfile);
adminhead($f_meta_nom, $f_titre, $adminimg);
echo '
<h3>' . adm_translate("Droits des auteurs") . ' :: ' . $author . '</h3>
<form action="admin.php" method="post">';
include_once "lib/togglediv.class.php";
$result1 = sql_query("SELECT rubid, rubname FROM " . $NPDS_Prefix . "rubriques ORDER BY ordre");
$numrow = sql_num_rows($result1);
$toggle = new ToggleDiv($numrow);
echo $toggle->All();
echo "<hr noshade=\"noshade\" class=\"ongl\" />";
$i = 0;
while (list($rubid, $rubname) = sql_fetch_row($result1)) {
echo "<table width=\"100%\" cellspacing=\"1\" cellpadding=\"0\" border=\"0\">\n <tr>\n <td class=\"header\" width=\"40%\">";
echo $toggle->Img();
echo aff_langue($rubname) . "</td>\n <td class=\"header\"align=\"center\" width=\"15%\">" . adm_translate("Créer") . "</td>\n <td class=\"header\"align=\"center\" width=\"15%\">" . adm_translate("Publier") . "</td>\n <td class=\"header\"align=\"center\" width=\"15%\">" . adm_translate("Modifier") . "</td>\n <td class=\"header\"align=\"center\" width=\"15%\">" . adm_translate("Supprimer") . "</td>\n </tr></table>";
echo $toggle->Begin();
$result2 = sql_query("SELECT secid, secname FROM " . $NPDS_Prefix . "sections WHERE rubid='{$rubid}' ORDER BY ordre");
echo "<table width=\"100%\" cellspacing=\"1\" cellpadding=\"2\" border=\"0\">";
$rowcolor = tablos();
while (list($secid, $secname) = sql_fetch_row($result2)) {
$result3 = sql_query("SELECT type FROM " . $NPDS_Prefix . "publisujet WHERE secid2='{$secid}' and aid='{$author}'");
$i++;
$crea = "";
$publi = "";
$modif = "";
$supp = "";
if (sql_num_rows($result3) > 0) {
while (list($type) = sql_fetch_row($result3)) {
if ($type == 1) {
$crea = "checked=\"checked\"";
} else {
if ($type == 2) {
$publi = "checked=\"checked\"";
} else {
if ($type == 3) {
$modif = "checked=\"checked\"";
} else {
if ($type == 4) {
$supp = "checked=\"checked\"";
}
}
}
}
}
}
echo "<tr>\n <td width=\"40%\">" . aff_langue($secname) . "</td>\n <td align=\"center\" width=\"15%\"><input type=\"checkbox\" name=\"creation[{$i}]\" value=\"{$secid}\" {$crea} /></td>\n <td align=\"center\" width=\"15%\"><input type=\"checkbox\" name=\"publication[{$i}]\" value=\"{$secid}\" {$publi} /></td>\n <td align=\"center\" width=\"15%\"><input type=\"checkbox\" name=\"modification[{$i}]\" value=\"{$secid}\" {$modif} /></td>\n <td align=\"center\" width=\"15%\"><input type=\"checkbox\" name=\"suppression[{$i}]\" value=\"{$secid}\" {$supp} /></td>\n </tr>";
}
echo '</table>';
echo $toggle->End();
echo '<br />';
}
echo '<input type="hidden" name="chng_aid" value="' . $author . '" />
<input type="hidden" name="op" value="updatedroitauteurs" />
<input type="hidden" name="maxindex" value="' . $i . '" />
<input class="btn btn-primary" type="submit" value="' . adm_translate("Valider") . '" />
<input class="btn btn-secondary" type="button" onclick="javascript:history.back()" value="' . adm_translate("Retour en arrière") . '" />
</form>';
closetable();
include "footer.php";
}
示例9: deladmin2
function deladmin2($del_aid)
{
global $admin, $prefix, $db, $admin_file;
if (is_admin($admin)) {
$del_aid = substr("{$del_aid}", 0, 25);
$result = $db->sql_query("SELECT admins FROM " . $prefix . "_modules WHERE title='News'");
$row2 = $db->sql_fetchrow($db->sql_query("SELECT name FROM " . $prefix . "_authors WHERE aid='{$del_aid}'"));
while ($row = $db->sql_fetchrow($result)) {
$admins = explode(",", $row['admins']);
$auth_user = 0;
for ($i = 0; $i < sizeof($admins); $i++) {
if ($row2['name'] == "{$admins[$i]}") {
$auth_user = 1;
}
}
if ($auth_user == 1) {
$radminarticle = 1;
}
}
if ($radminarticle == 1) {
$row2 = $db->sql_fetchrow($db->sql_query("SELECT sid from " . $prefix . "_stories where aid='{$del_aid}'"));
$sid = intval($row2['sid']);
if ($sid != "") {
include "header.php";
GraphicAdmin();
OpenTable();
echo "<center><font class=\"title\"><b>" . _AUTHORSADMIN . "</b></font></center>";
CloseTable();
echo "<br>";
OpenTable();
echo "<center><font class=\"option\"><b>" . _PUBLISHEDSTORIES . "</b></font><br><br>" . "" . _SELECTNEWADMIN . ":<br><br>";
$result3 = $db->sql_query("SELECT aid from " . $prefix . "_authors where aid!='{$del_aid}'");
echo "<form action=\"" . $admin_file . ".php\" method=\"post\"><select name=\"newaid\">";
while ($row3 = $db->sql_fetchrow($result3)) {
$oaid = filter($row3['aid'], "nohtml");
$oaid = substr("{$oaid}", 0, 25);
echo "<option name=\"newaid\" value=\"{$oaid}\">{$oaid}</option>";
}
echo "</select><input type=\"hidden\" name=\"del_aid\" value=\"{$del_aid}\">" . "<input type=\"hidden\" name=\"op\" value=\"assignstories\">" . "<input type=\"submit\" value=\"" . _OK . "\">" . "</form>";
CloseTable();
include "footer.php";
return;
}
}
Header("Location: " . $admin_file . ".php?op=deladminconf&del_aid={$del_aid}");
} else {
include 'header.php';
GraphicAdmin();
OpenTable();
echo "<center><font class=\"title\"><b>Authors Admin</b></font></center>";
CloseTable();
echo "<br>";
OpenTable();
echo "<center><b>Not Authorized</b><br><br>" . "Unauthorized editing of authors detected<br><br>" . "" . _GOBACK . "";
CloseTable();
include "footer.php";
}
}
示例10: FaqCatGoDel
function FaqCatGoDel($id, $ok = 0)
{
global $prefix, $db, $admin_file;
if ($ok == 1) {
$id = intval($id);
$db->sql_query("delete from " . $prefix . "_faqanswer where id='{$id}'");
Header("Location: " . $admin_file . ".php?op=FaqAdmin");
} else {
include "header.php";
GraphicAdmin();
OpenTable();
echo "<center><font class=\"title\"><b>" . _FAQADMIN . "</b></font></center>";
CloseTable();
echo "<br>";
OpenTable();
echo "<br><center><b>" . _QUESTIONDEL . "</b><br><br>";
}
echo "[ <a href=\"" . $admin_file . ".php?op=FaqCatGoDel&id={$id}&ok=1\">" . _YES . "</a> | <a href=\"" . $admin_file . ".php?op=FaqAdmin\">" . _NO . "</a> ]</center><br><br>";
CloseTable();
include "footer.php";
}
示例11: Wysiwyg
<hr />
</td>
</tr>';
$submit = '
<input type="submit" name="send" value="' . _SEND . ' ' . _NEWSLETTER . '" class="mainoption"' . $status . ' />
<input type="submit" name="discard" value="' . _DISCARD . '" class="liteoption" />
<input type="hidden" name="n_group" value="' . $group . '" />';
}
// Load the required wysiwyg class
require CORE_PATH . 'wysiwyg/wysiwyg.inc';
// Create as many wysiwyg instances as you need
$wysiwyg = new Wysiwyg('newsletter', 'content', '90%', '300px', $content);
// Set all the required wysiwyg headers
$wysiwyg->setHeader();
require 'header.php';
GraphicAdmin('_AMENU5');
OpenTable();
echo '<form name="newsletter" action="' . URL::admin() . '" method="post" enctype="multipart/form-data" accept-charset="utf-8">
' . $wysiwyg->getSelect() . '
<table border="0" cellpadding="3" cellspacing="1" width="100%" class="forumline" style="margin:auto;">
<tr>
<td align="center" class="catleft" colspan="2"><b><span class="gen">' . $title . '</span></b></td>
</tr>' . $preview . '<tr>
<td class="row1"><span class="gen">' . _SUBJECT . '</span></td>
<td class="row2"><input type="text" name="subject" size="50" maxlength="255" value="' . htmlprepare($subject) . '" /></td>
</tr><tr>
<td class="row1"><span class="gen">' . _CONTENT . '</span></td>
<td class="row2">' . $wysiwyg->getHTML() . '</td>
</tr><tr>
<td class="row1"><span class="gen">' . _NL_RECIPS . '</span></td>
<td class="row2">' . newsletter_selection('group', $group) . '</td>
示例12: poll_editPollPosted
function poll_editPollPosted()
{
global $id, $maxOptions, $NPDS_Prefix, $f_meta_nom, $f_titre, $adminimg;
if ($id) {
global $hlpfile;
include 'header.php';
GraphicAdmin($hlpfile);
adminhead($f_meta_nom, $f_titre, $adminimg);
$result = sql_query("SELECT pollID, pollTitle, timeStamp FROM " . $NPDS_Prefix . "poll_desc WHERE pollID='{$id}'");
$holdtitle = sql_fetch_row($result);
$result = sql_query("SELECT optionText, voteID, pollType FROM " . $NPDS_Prefix . "poll_data WHERE pollID='{$id}' ORDER BY voteID ASC");
echo '
<h3>' . adm_translate("Edition des sondages") . '</h3>
<form method="post" action="admin.php">
<input type="hidden" name="op" value="SendEditPoll">
<input type="hidden" name="pollID" value="' . $id . '" />
<div class="form-group">
<div class="row">
<label class="form-control-label col-sm-3 col-md-3" for="pollTitle">' . adm_translate("Intitulé du Sondage") . '</label>
<div class="col-sm-9 col-md-9">
<input class="form-control" type="text" id="pollTitle" name="pollTitle" value="' . $holdtitle[1] . '" maxlength="100" />
<span class="help-block">' . adm_translate("S.V.P. entrez chaque option disponible dans un seul champ") . '</span>
</div>
</div>
</div>';
for ($i = 1; $i <= $maxOptions; $i++) {
list($optionText, $voteID, $pollType) = sql_fetch_row($result);
echo '
<div class="form-group">
<div class="row">
<label class="form-control-label col-sm-3 col-md-3" for="optionText' . $i . '">' . adm_translate("Option") . ' ' . $i . '</label>
<div class="col-sm-9 col-md-9">
<input class="form-control" type="text" id="optionText' . $i . '" name="optionText[' . $voteID . ']" maxlength="255" value="' . $optionText . '" />
</div>
</div>
</div>';
}
$pollClose = $pollType / 128 >= 1 ? 1 : 0;
$pollType = $pollType % 128;
echo '
<div class="checkbox">
<div class="row">
<div class="col-sm-offset-3 col-sm-9">
<label>
<input type="checkbox" name="poll_type" value="1"';
if ($pollType == "1") {
echo ' checked="checked"';
}
echo ' />' . adm_translate("Seulement aux membres") . '
</label>
</div>
</div>
</div>
<div class="checkbox">
<div class="row">
<div class="col-sm-offset-3 col-sm-9">
<label class="text-danger">
<input type="checkbox" name="poll_close" value="1"';
if ($pollClose == 1) {
echo ' checked="checked"';
}
echo ' />' . adm_translate("Vote fermé") . '
</label>
</div>
</div>
</div>
<div class="form-group">
<div class="row">
<div class="col-sm-offset-3 col-sm-9">
<button class="btn btn-primary" type="submit">Ok</button>
</div>
</div>
</div>
</form>';
adminfoot('fv', '', '', '');
} else {
header("location: admin.php?op=editpoll");
}
}
示例13: autoEdit
function autoEdit($anid)
{
global $aid, $hlpfile, $tipath, $radminsuper, $NPDS_Prefix, $adminimg;
$f_meta_nom = 'autoStory';
$f_titre = adm_translate("Editer un Article");
//==> controle droit
admindroits($aid, $f_meta_nom);
//<== controle droit
$result = sql_query("SELECT catid, title, time, hometext, bodytext, topic, informant, notes, ihome, date_debval,date_finval,auto_epur FROM " . $NPDS_Prefix . "autonews WHERE anid='{$anid}'");
list($catid, $title, $time, $hometext, $bodytext, $topic, $informant, $notes, $ihome, $date_debval, $date_finval, $epur) = sql_fetch_row($result);
sql_free_result($result);
$titre = stripslashes($title);
$hometext = stripslashes($hometext);
$bodytext = stripslashes($bodytext);
$notes = stripslashes($notes);
if ($topic < 1) {
$topic = 1;
}
$affiche = false;
$result2 = sql_query("SELECT topictext, topicimage, topicadmin FROM " . $NPDS_Prefix . "topics WHERE topicid='{$topic}'");
list($topictext, $topicimage, $topicadmin) = sql_fetch_row($result2);
if ($radminsuper) {
$affiche = true;
} else {
$topicadminX = explode(',', $topicadmin);
for ($i = 0; $i < count($topicadminX); $i++) {
if (trim($topicadminX[$i]) == $aid) {
$affiche = true;
}
}
}
if (!$affiche) {
header("location: admin.php?op=autoStory");
}
$topiclogo = '<span class="label label-default pull-right"><strong>' . aff_langue($topictext) . '</strong></span>';
include 'header.php';
GraphicAdmin($hlpfile);
adminhead($f_meta_nom, $f_titre, $adminimg);
echo '<h3>' . adm_translate("Editer l'Article Automatique") . '</h3>';
echo aff_local_langue(adm_translate("Langue de Prévisualisation"), '', 'local_user_language');
echo '<div class="card card-block">';
if ($topicimage !== '') {
if (!($imgtmp = theme_image('topics/' . $topicimage))) {
$imgtmp = $tipath . $topicimage;
}
$timage = $imgtmp;
if (file_exists($imgtmp)) {
$topiclogo = '<img class="img-fluid " src="' . $timage . '" align="right" alt="" />';
}
}
// $no_img=false;
// if ((file_exists("$tipath$topicimage")) and ($topicimage!="")) {
// echo "<img src=\"$tipath$topicimage\" border=\"0\" align=\"right\" alt=\"\" />";
// } else {
// $no_img=true;
// }
code_aff('<h3>' . $subject . $topiclogo . '</h3>', '<div class="text-muted">' . $hometext . '</div>', $bodytext, $notes);
if ($no_img) {
echo "<b>" . aff_langue($topictext) . "</b>";
}
echo '<b>' . adm_translate("Utilisateur") . '</b>' . $informant . '<br /><br />';
echo '
</div>
<form action="admin.php" method="post" name="adminForm">
<div class="form-group row">
<label class="form-control-label col-sm-4" for="title">' . adm_translate("Titre") . '</label>
<div class="col-sm-8">
<input class="form-control" type="text" name="title" size="50" value="' . $titre . '" />
</div>
</div>
<div class="form-group row">
<label class="form-control-label col-sm-4" for="topic">' . adm_translate("Sujet") . '</label>
<div class="col-sm-8">
<select class="c-select form-control" name="topic">';
$toplist = sql_query("SELECT topicid, topictext, topicadmin FROM " . $NPDS_Prefix . "topics ORDER BY topictext");
if ($radminsuper) {
echo '
<option value="">' . adm_translate("Tous les Sujets") . '</option>';
}
while (list($topicid, $topics, $topicadmin) = sql_fetch_row($toplist)) {
$affiche = false;
if ($radminsuper) {
$affiche = true;
} else {
$topicadminX = explode(",", $topicadmin);
for ($i = 0; $i < count($topicadminX); $i++) {
if (trim($topicadminX[$i]) == $aid) {
$affiche = true;
}
}
}
if ($affiche) {
if ($topicid == $topic) {
$sel = 'selected="selected" ';
}
echo "<option {$sel} value=\"{$topicid}\">" . aff_langue($topics) . "</option>\n";
$sel = '';
}
}
echo '
//.........这里部分代码省略.........
示例14: reviews
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>
//.........这里部分代码省略.........
示例15: updateadmin
function updateadmin($chng_aid, $chng_name, $chng_email, $chng_url, $chng_radminfilem, $chng_radminsuper, $chng_pwd, $chng_pwd2, $temp_system_md5)
{
global $NPDS_Prefix, $modu;
if (!($chng_aid && $chng_name && $chng_email)) {
Header("Location: admin.php?op=mod_authors");
}
// Gestion du fichier pour filemanager
$result = sql_query("SELECT radminfilem,radminsuper FROM " . $NPDS_Prefix . "authors WHERE aid='{$chng_aid}'");
list($ori_radminfilem, $ori_radminsuper) = sql_fetch_row($result);
if ($ori_radminsuper and !$chng_radminsuper) {
@unlink("modules/f-manager/users/" . strtolower($chng_aid) . ".conf.php");
}
if (!$ori_radminsuper and $chng_radminsuper) {
@copy("modules/f-manager/users/modele.admin.conf.php", "modules/f-manager/users/" . strtolower($chng_aid) . ".conf.php");
}
if ($ori_radminfilem and !$chng_radminfilem) {
@unlink("modules/f-manager/users/" . strtolower($chng_aid) . ".conf.php");
}
if (!$ori_radminfilem and $chng_radminfilem) {
@copy("modules/f-manager/users/modele.admin.conf.php", "modules/f-manager/users/" . strtolower($chng_aid) . ".conf.php");
}
if ($chng_pwd2 != '') {
if ($chng_pwd != $chng_pwd2) {
global $hlpfile;
include "header.php";
GraphicAdmin($hlpfile);
echo error_handler(adm_translate("Désolé, les nouveaux Mots de Passe ne correspondent pas. Cliquez sur retour et recommencez") . "<br />");
include "footer.php";
exit;
}
global $system_md5;
if ($system_md5 or $temp_system_md5) {
$chng_pwd = crypt($chng_pwd2, $chng_pwd);
}
if ($chng_radminsuper == 1) {
$result = sql_query("UPDATE " . $NPDS_Prefix . "authors SET name='{$chng_name}', email='{$chng_email}', url='{$chng_url}', radminfilem='0', radminsuper='{$chng_radminsuper}', pwd='{$chng_pwd}' WHERE aid='{$chng_aid}'");
} else {
$result = sql_query("UPDATE " . $NPDS_Prefix . "authors SET name='{$chng_name}', email='{$chng_email}', url='{$chng_url}', radminfilem='{$chng_radminfilem}', radminsuper='0', pwd='{$chng_pwd}' WHERE aid='{$chng_aid}'");
}
} else {
if ($chng_radminsuper == 1) {
$result = sql_query("UPDATE " . $NPDS_Prefix . "authors SET name='{$chng_name}', email='{$chng_email}', url='{$chng_url}', radminfilem='0', radminsuper='{$chng_radminsuper}' WHERE aid='{$chng_aid}'");
deletedroits($chng_aid);
} else {
$result = sql_query("UPDATE " . $NPDS_Prefix . "authors SET name='{$chng_name}', email='{$chng_email}', url='{$chng_url}', radminfilem='{$chng_radminfilem}', radminsuper='0' WHERE aid='{$chng_aid}'");
deletedroits($chng_aid);
updatedroits($chng_aid);
}
}
global $aid;
Ecr_Log('security', "ModifyAuthor({$chng_name}) by AID : {$aid}", '');
Header("Location: admin.php?op=mod_authors");
}