delete_profile1.php

来自「通达OA部分源代码」· PHP 代码 · 共 42 行

PHP
42
字号
<?php
	include_once('logincheck.php');
	include_once('myconnect.php');
	
	$strinlist="0";
	
	foreach($_POST as $key => $value)
	{
		if(stristr($key,"checkbox"))
				$strinlist.=",".$value;
	}

//	echo $strinlist;
//	die();
	
	$strquery=" and sb_id in ($strinlist) ";

		$query_msg_del="delete from sbbleads_profile where 1 $strquery";
		$rs_del=mysql_query($query_msg_del);
		$msgdeleted=mysql_affected_rows();
	if($msgdeleted > 0)
	{	
	/////-----removing from categories
		$query="delete from sbbleads_profile_cats where 1 and sb_offer_id in ($strinlist)";
		mysql_query($query);
	/////------removing images
		$query1="delete from sbbleads_profile_images where 1 and sb_offer_id in ($strinlist)";
		mysql_query($query1);
////-----remove favorites
		$query2="delete from sbbleads_favorites where sb_type='profile' and sb_offer_id in ($strinlist)";
		mysql_query($query2);
	
	//	header("Location: msg_deleted.php");
		header("Location: profiles.php?msg=".urlencode("$msgdeleted company profile(s) removed"));
		die();
	}
	else
	{
		header("Location: profiles.php?msg=".urlencode("Unable to remove company profile(s), please try again"));
		die();
	}
?>

⌨️ 快捷键说明

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