Commit e9dde6c8 authored by Seblu's avatar Seblu

Initial commit.

With www.eptv.fr site web version of 31/01/2010
parents
Order allow,deny
deny from all
This diff is collapsed.
<?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">
&nbsp;e d i t o&nbsp;
</font>
</b>
</td>
</tr>
<tr>
<td>
<FORM name="new_edito" method="post" action="index.php?section=AdminHome&section_admin=AdminAddEdito">
<INPUT class="button" TYPE="submit" NAME="action" VALUE=" NOUVEL EDITO "><BR> </TD>
</FORM>
</td>
</tr>
<tr>
<td bgcolor="#d3d3df">
<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>
<TD width=10% align=right>
<FORM name="update_edito" method="post" action="index.php?section=AdminHome&section_admin=AdminModifEdito&edito_id='.$edito_id.'">
<INPUT class="button" TYPE="submit" NAME="action" VALUE=" MODIFIER ">
</FORM>
<FORM name="supp_edito" method="post" action="index.php?section=AdminHome&section_admin=AdminDelEdito&edito_id='.$edito_id.'">
<INPUT class="button" TYPE="submit" NAME="action" VALUE=" SUPPRIMER ">
</FORM>
</TD>
</tr>
';
$str .= '
<tr>
<TD> <hr width="90%"> </TD>
</tr>
';
}
$str .= '
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
';
return $str;
}
function dispAdminAddEdito () {
$date = get_date();
$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 color="#ffffff">
&nbsp a d d &nbsp e d i t o &nbsp t o &nbsp d a t a b a s e
</font>
</b>
</td>
</tr>
<tr>
<td bgcolor="#d3d3df">
<table cellpadding="0" cellspacing="0" width="100%">
<tr>
<form name="saisie" method="post" action="index.php?section=AdminHome&section_admin=AddEdito&edito_id='.$edito_id.'">
<TABLE CELLSPACING="0" CELLPADDING="10" BORDER="0">
<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>
<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);
$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 color="#ffffff">
&nbsp m o d i f y &nbsp e d i t o
</font>
</b>
</td>
</tr>
<tr>
<td bgcolor="#d3d3df">
<table cellpadding="0" cellspacing="0" width="100%">
<tr>
';
if (mysql_num_rows($result)){
$edito = mysql_fetch_array($result);
}
$str .= '
<form name="saisie" method="post" action="index.php?section=AdminHome&section_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)){
$id_user = mysql_fetch_array($id_user);
}
$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);
$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 color="#ffffff">
&nbsp d e l e t e &nbsp e d i t o
</font>
</b>
</td>
</tr>
<tr>
<td bgcolor="#d3d3df">
<table cellpadding="0" cellspacing="0" width="100%">
<tr>
';
if (mysql_num_rows($result)){
$edito = mysql_fetch_array($result);
}
$str .= '
<form name="saisie" method="post" action="index.php?section=AdminHome&section_admin=DelEdito&edito_id='.$edito_id.'">
<TABLE CELLSPACING="0" CELLPADDING="10" BORDER="0">
<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>';
$str .= '
<TR><TD>Poste par: </TD>
<TD>
';
$id_user = getOneUserById($edito["edito_id_user"]);
if (mysql_num_rows($id_user)){
$id_user = mysql_fetch_array($id_user);
}
$str .= $id_user["user_pseudo"].'</TD></TR>';
$str .= '
<TR>
<TD> </TD>
<TD> <INPUT class="button" TYPE="submit" NAME="action" VALUE=" SUPPRIMER "> </TD>
</TR>
</TABLE>
</FORM>
</TR>
</TABLE>
</TD>
</TR>
</TABLE>
';
return $str;
}
?>
\ No newline at end of file
<?
function dispAdminForum () {
if ($_SESSION["user_right"] < $GLOBALS["EPTV"] )
{
return("t'es ouf");
}
$str = 'Bon voici le forum pour pas y passer des annees entier a le faire marcher en interne <br><br><a href="http://www.link-asso.com/~eptv/forum">OKAY?</a>';
return $str;
}
?>
\ No newline at end of file
<?
function dispAdminHome() {
include_once "admin/admin_tables.php";
include_once "admin/functions_sql_admin.php";
include_once "admin/admin_menu.php";
include_once "admin/admin_videos.php";
include_once "admin/admin_photos.php";
include_once "admin/admin_news.php";
include_once "admin/admin_edito.php";
include_once "admin/admin_forum.php";
include_once "admin/admin_links.php";
include_once "admin/admin_members.php";
include_once "admin/admin_users.php";
include_once "admin/admin_blacklist.php";
if ($_SESSION["user_right"] >= $GLOBALS["REPORTER"] )
{
$str = '
<table width="100%">
<tr>
<td height="589" valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="4">
<tr>
<td width="20%" valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td bgcolor="#000000">
<!-- Start of news content -->
<table width="100%" border="0" cellspacing="1" cellpadding="2">
<tr>
<td bgcolor="#000000">
<b>
<font color="#ffffff">
&nbsp;a d m i n
</font>
</b>
</td>
</tr>
<tr>
<td bgcolor="#d3d3df">
<table width="100%" cellpadding="2" cellspacing="2" align="center">';
$str .= dispAdminMenu();
$str .= '
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
<td width="85%" valign="top" align="center">
';
if ($_GET['section_admin']) {
$section_admin= $_GET['section_admin'];
$str .= $tab_section_admin[$section_admin]();
}
else
{
$total_size_videos = 0;
$nb_videos_publics = 0;
$nb_videos_tendus = 0;
$nb_videos_privates = 0;
$nb_videos_eptv = 0;
$nb_videos_bonus = 0;
$nb_videos_adm = 0;
$result = getAllVideos();
for ($nb_videos = 0; $video = mysql_fetch_array($result); $nb_videos++) {
$total_size_videos += $video["video_size"];
if ($video["video_tendu"] == 0)
$nb_videos_publics++;
else if ($video["video_tendu"] == 1)
$nb_videos_tendus++;
else if ($video["video_tendu"] == 2)
$nb_videos_privates++;
if ($video["video_type"] == 'eptvprod')
$nb_videos_eptv++;
else if ($video["video_type"] == 'eptvbonus')
$nb_videos_bonus++;
else if ($video["video_type"] == 'eptv.adm')
$nb_videos_adm++;
;}
$total_size_photos = 0;
$nb_photos_publics = 0;
$nb_photos_tendus = 0;
$nb_photos_privates = 0;
$nb_photos_eptv = 0;
$nb_photos_bonus = 0;
$nb_photos_adm = 0;
$result = getAllPhotos();
for ($nb_photos = 0; $photo = mysql_fetch_array($result); $nb_photos++) {
$total_size_photos += $photo["photo_size"];
if ($photo["photo_tendu"] == '0')
$nb_photos_publics++;
else if ($photo["photo_tendu"] == '1')
$nb_photos_tendus++;
else if ($photo["photo_tendu"] == '2')
$nb_photos_privates++;
if ($photo["photo_type"] == 'eptvprod'