Newer
Older
<?php
function dispAdminEdito () {
if ($_SESSION["user_right"] < $GLOBALS["EPTV"] )
{
return("T'es ouf");
}
$result = getAllEdito();
$str = '
<table width="80%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td bgcolor="#000000">
<table width="100%" border="0" cellspacing="1" cellpadding="2">
<tr>
<td>
<b>
<font class="titre_rubrique">
e d i t o
</font>
<FORM name="new_edito" method="post" action="index.php?html=AdminHome§ion_admin=AdminAddEdito">
<INPUT class="button" TYPE="submit" NAME="action" VALUE=" NOUVEL EDITO "><BR> </TD>
</FORM>
</td>
</tr>
<table cellpadding="2" cellspacing="2" width="100%">
<tr>
<td>
<table width="100%" border="0" cellspacing="2" cellpadding="2">
';
while ($edito = mysql_fetch_array($result)) {
$result_user = getOneUserById($edito["edito_id_user"]);
$member = mysql_fetch_array($result_user);
$edito_id = $edito["edito_id"];
$str .= '
<tr><td>
<font class="texte_date">
'.$edito["edito_date"].'
</font>
par: '
.$member["user_pseudo"].
'</td></tr>
<tr><td>
<font class="texte_normal">
<b>'
.$edito["edito_title"].
'</b>
</td></tr>
<td width=60%>
<font class="texte_normal">
<small>'
.$edito["edito_comment"].
'</small>
</td>
<FORM name="update_edito" method="post" action="index.php?html=AdminHome§ion_admin=AdminModifEdito&edito_id='.$edito_id.'">
<INPUT class="button" TYPE="submit" NAME="action" VALUE=" MODIFIER ">
<FORM name="supp_edito" method="post" action="index.php?html=AdminHome§ion_admin=AdminDelEdito&edito_id='.$edito_id.'">
<INPUT class="button" TYPE="submit" NAME="action" VALUE=" SUPPRIMER ">
}
$str .= '
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
';
return $str;
}
function dispAdminAddEdito () {
$date = get_date();
<table width="80%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td bgcolor="#000000">
<table width="100%" border="0" cellspacing="1" cellpadding="2">
<tr>
<td>
<b>
<font color="#ffffff">
  a d d   e d i t o   t o   d a t a b a s e
</font>
<tr>
<form name="saisie" method="post" action="index.php?html=AdminHome§ion_admin=AddEdito&edito_id='.$edito_id.'">
<TR><TD> Titre: </TD>
<TD> <INPUT TYPE="text" NAME="edito_get_title" VALUE="" SIZE="50" MAXLENGTH="52"> </TD>
</TR>
<TR><TD> Date: </TD>
<TD> <INPUT TYPE="text" NAME="edito_get_date" VALUE="'.$date.'" SIZE="8" MAXLENGTH="10"> </TD>
</TR>
<TR><TD>Edito: </TD>
<TD>
<TEXTAREA rows="12" cols="38" name="edito_get_comment" ONFOCUS=""></textarea>
</TD>
</TR>
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
<TR>
<TD> </TD>
<TD> <INPUT class="button" TYPE="submit" NAME="action" VALUE=" UPLOADER "> </TD>
</TR>
<TR>
<TD> </TD>
<TD> <INPUT class="button" TYPE="reset" NAME="action" VALUE=" RESET "> </TD>
</TR>
</TABLE>
</FORM>
</TR>
</TABLE>
</TD>
</TR>
</TABLE>
';
return $str;
}
function dispAdminModifEdito () {
$edito_id =$_GET['edito_id'];
$result = getOneEdito($edito_id);
<table width="80%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td bgcolor="#000000">
<table width="100%" border="0" cellspacing="1" cellpadding="2">
<tr>
<td>
<b>
<font color="#ffffff">
  m o d i f y   e d i t o
</font>
<form name="saisie" method="post" action="index.php?html=AdminHome§ion_admin=ModifEdito&edito_id='.$edito_id.'">
<TABLE CELLSPACING="0" CELLPADDING="10" BORDER="0">
<TR>
<TD> Titre: </TD>
<TD> <INPUT TYPE="text" NAME="edito_get_uptitle" VALUE="'.$edito["edito_title"].'" SIZE="50" MAXLENGTH="52"> </TD>
</TR>
<TR>
<TD> Date: </TD>
<TD> <INPUT TYPE="text" NAME="edito_get_update" VALUE="'.$edito["edito_date"].'" SIZE="8" MAXLENGTH="10"> </TD>
</TR>
<TR>
<TD> Edito: </TD>
<TD> <TEXTAREA rows="12" cols="38" name="edito_get_upcomment" ONFOCUS="">'.$edito["edito_comment"].'</TEXTAREA> </TD>
</TR>
<TR><TD>Poste par: </TD>
<TD>
';
$id_user = getOneUserById($edito["edito_id_user"]);
if (mysql_num_rows($id_user)){
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
}
$str .= $id_user["user_pseudo"].'</TD></TR>';
$str .= '
<TR>
<TD> </TD>
<TD> <INPUT class="button" TYPE="submit" NAME="action" VALUE=" UPDATE "> </TD>
</TR>
<TR>
<TD> </TD>
<TD> <INPUT class="button" TYPE="reset" NAME="action" VALUE=" RESET "> </TD>
</TR>
</TABLE>
</FORM>
</TR>
</TABLE>
</TD>
</TR>
</TABLE>
';
return $str;
}
function dispAdminDelEdito () {
$edito_id =$_GET['edito_id'];
$result = getOneEdito($edito_id);
<table width="80%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td bgcolor="#000000">
<table width="100%" border="0" cellspacing="1" cellpadding="2">
<tr>
<td>
<b>
<font color="#ffffff">
  d e l e t e   e d i t o
</font>
<form name="saisie" method="post" action="index.php?html=AdminHome§ion_admin=DelEdito&edito_id='.$edito_id.'">
<TR><TD> Titre: </TD>
<TD>'.$edito["edito_title"].'</TD>
</TR>
<TR><TD> Date: </TD>
<TD> '.$edito["edito_date"].'</TD>
</TR>
<TR><TD>Commentaire: </TD>
<TD>
'.$edito["edito_comment"].'
</TD>
</TR>';
<TR><TD>Poste par: </TD>
<TD>
';
$id_user = getOneUserById($edito["edito_id_user"]);
if (mysql_num_rows($id_user)){
}
$str .= $id_user["user_pseudo"].'</TD></TR>';
$str .= '
<TR>
<TD> </TD>
<TD> <INPUT class="button" TYPE="submit" NAME="action" VALUE=" SUPPRIMER "> </TD>