home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
csi.uticak12.org
/
csi.uticak12.org.tar
/
csi.uticak12.org
/
back
/
_delentry.php
next >
Wrap
PHP Script
|
2011-10-20
|
774b
|
21 lines
<?
include 'guard.php';
mysql_connect(HostName,UserName,Password) or die("<html><body>Can not connect to MySql server!<br></body></html>");
mysql_select_db (DBName) or die ("<html><body>Could not select database ".DBName."<br></body></html>");
if ($mode=='cats') {
$res=mysql_query("DELETE FROM `gal_cats` WHERE `id`='$id'");
if (file_exists('cats/photo_'.$id.'.jpg')) {unlink ('cats/photo_'.$id.'.jpg');};
echo '<script>location.href="cats.php?pn='.$pn.'"</script>';
};
if ($mode=='photos') {
$res=mysql_query("DELETE FROM `gal_photos` WHERE `id`='$id'");
if (file_exists('photos/photo_'.$id.'.jpg')) {unlink ('photos/photo_'.$id.'.jpg');};
echo '<script>location.href="photos.php?pn='.$pn.'&cat_id='.$cat_id.'&title='.$title.'"</script>';
};
?>