www.pudn.com > smartstarwap.rar > del_news.php, change:2005-10-04,size:1233b


<? 
    /* ====================================== 
	 * ******smartstar firm wap system****** 
	 * ====================================== 
	 * AUTHOR : 
     * ======= 
     * Copyright (C) 2006 Wap-system - A wap system designed for firm 
     * by smartstar. 
	 */ 
?> 
<? 
include("function.inc.php"); 
?> 
<link href=js/common.css rel=stylesheet type=text/css> 
<? 
   include("../db_connect.php"); 
   if(isset($_GET['Submit'])) 
   { 
	   if(!empty($id)) 
	   { 
		   $delid=""; 
		   foreach ($id as $did=>$value) 
		   { 
			   $did=intval($did); 
			   $delid.=$did.","; 
		   } 
		   $delid=substr($delid,0,strlen($delid)-1); 
	   mysql_query("delete from wap_news where id in ($delid)",$db) or die ("query failed"); 
	   mysql_close($db); 
	echo "<p align=center>被选中内容删除成功,3秒后自动返回内容管理页!"; 
	echo "<script>window.setTimeout(\"location.href='admin_news.php'\",3000);</script></p>"; 
	   } 
   } 
   else 
   { 
	$id=intval($id); 
   mysql_query("delete from wap_news where id='$id'",$db) or die ("query failed"); 
   mysql_close($db); 
   echo "<p align=center>内容删除成功,3秒后自动返回内容管理页!"; 
	echo "<script>window.setTimeout(\"location.href='admin_news.php'\",3000);</script></p>"; 
   } 
?>