Просмотр файла script/admin/ecard.php

Размер файла: 2.95Kb
<?php
/*-----------------------------------------------------------------------------------------
mcGalleryPRO
All code is © 2003 Marc Cagninacci.
No files may be redistributed in whole or significant part.
----------------- mcgalleryPRO IS NOT FREE SOFTWARE -------------------
You should have receive a file called license.txt in this package
--------------------------------------------------------------------------------------------*/

session_start();
if (empty($_SESSION['private_login']))
{
include "./sess.php";
exit;
}
include './header.php';

$connect = mysql_connect($host,$login,$pass);
mysql_select_db($base, $connect);

if ($act == 'del')
{
 $query = "DELETE FROM mcgallery_card WHERE id=$id";
 mysql_query($query);
}

$file = urldecode(str_replace("small/", "", substr($image, 3, -3)));

$query = "SELECT * FROM mcgallery_card WHERE image LIKE '$file%' ORDER BY date DESC, id DESC";
$res = mysql_query($query);
$nbre = mysql_num_rows($res);

echo '<table align="center" border="0" cellspacing="1" cellpadding="1">';
echo '<tr><td bgcolor="black" align="center" colspan="6"><font face="verdana" color="white" size="2">';
echo '<img src="'.urldecode($image).'" border="0" alt="">&nbsp;&nbsp;'.$nbre.' '.$l_Ecard.'</font></td></tr>';
 echo '<tr><td bgcolor="black"><font face="verdana" color="white" size="1">';
 echo $l_Date_sent.'</font></td>';
 echo '<td bgcolor="black"><font face="verdana" color="white" size="1">';
 echo $l_From.'</font></td>';
 echo '<td bgcolor="black"><font face="verdana" color="white" size="1">';
 echo $l_Date_read.'</font></td>';
 echo '<td bgcolor="black"><font face="verdana" color="white" size="1">';
 echo $l_To.'</font></td>';
 echo '<td bgcolor="black"><font face="verdana" color="white" size="1">';
 echo $l_Message.'</font></td>';
 echo '<td bgcolor="black"><font face="verdana" color="white" size="1">';
 echo $l_Suppr.'</font></td></tr>';

while ($row = mysql_fetch_array($res))
{
 echo '<tr><td bgcolor="#CCCCCC"><font face="verdana" color="black" size="1">';
 echo $row['date'].'</font></td>';
 echo '<td bgcolor="#CCCCCC"><font face="verdana" color="black" size="1">';
 echo stripslashes($row['nom_exp']).' ('.$row['email_exp'].')</font></td>';
 echo '<td bgcolor="#CCCCCC"><font face="verdana" color="black" size="1">';
 if ($row['lecture']  ==  '0000-00-00') { $row['lecture']  =  '&nbsp;'; }
 echo $row['lecture'].'</font></td>';
 echo '<td bgcolor="#CCCCCC"><font face="verdana" color="black" size="1">';
 echo stripslashes($row['nom_dest']).' ('.$row['email_dest'].')</font></td>';
 echo '<td bgcolor="#CCCCCC"><font face="verdana" color="black" size="1">';
 echo nl2br(stripslashes($row['message'])).'</font></td>';
 echo '<td bgcolor="#CCCCCC" align="center"><font face="verdana" color="black" size="3">';
 echo '<a href="ecard.php?act=del&id='.$row['id'].'&image='.$image.'"><img src="../images/b_del.gif" border="0"></a></font></td></tr>';

}
echo '</table>';
include './footer.php';
?>