Location: PHPKode > scripts > Linker IMG > linker-img/manage/del_coment.php
<?php

//=====================================
// LINKER Category Engine
//=====================================
// Filename : del_comment.php
// Path  : Manage directory
// last update : 2002/03/13
// Desc : Delete Comment
//=====================================

//=====================================
// File include part
//=====================================

include ("./authen.php");
include ("../function/$Sdb_type.php"); 
include ("../function/main_func.php"); 
include ("../$Slang/m_common.php"); 

$db = new DB_Sql($Sdb_host,$Sdb_user,$Sdb_pass,$Sselect_db);

//=====================================
// Delete part
//=====================================


 while(list($post, $val)=each($HTTP_POST_VARS)) 
 { 
	if ($val=='delete') {
	 $i++;
	 
	 // Minus comment number

	$db->query("select parent from LINKER_COM where sid='$post'");
	$row = $db->nrecord();
	$db->query("update LINKER_LINK set comment = comment -1 where sid='$row[parent]'");
	//

	$db->query("delete from LINKER_COM where sid='$post'");
 	}
}
 
//=====================================
// Print result
//=====================================

print <<<EOF

<head>
<LINK rel='stylesheet' type='text/css' href='./linker.css'>
<meta http-equiv='Content-Type' content='text/html; charset=$Scharset'>
<meta http-equiv='refresh' content='2; url=view_coment.php'>
</head>

<body bgcolor="#E9E9E9">
<table width="500" border="1"><tr><td bgcolor="#000066" align="center">
<font color="white" size="2"><b>$i $l_del_comment</b></font>
</td></tr></table>

EOF;

 ?>
Return current item: Linker IMG