del_pass.php

来自「php 報修系統」· PHP 代码 · 共 34 行

PHP
34
字号
<?php
	include("../config.php");
	include("../function.php");
	

	$sql="delete from $table where kind=$kind id in(";


	$flag=0;
	$del_count=0;
	for($i=0;$i<$pagesize;$i++){
		$check="checkbox".$i;
		if ($$check==1){
			$del_count++;
			if($flag==0){
				$del_id=$del_id.$id[$i];
				$flag=1;
			}else{
				$del_id=$del_id.",".$id[$i];								
			}
				
		}
		
	}

	if($del_id!="")
		$sql="delete from $table where kind=$kind and id in (".$del_id.")";		
	else
		$sql="delete from $table where kind=$kind and id in (0)";

	($link=mysql_pconnect($host,$user,$password))||(die("can not link mysql"));
	mysql_db_query($db,$sql)||die("cna not run sql");
	header("location:del.php?pagenow=$pagenow&kind=$kind&del_count=$del_count&alert=1");
?>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?