MST1113.php 1.29 KB
<?PHP 
	//*****************************************************************************
	//* 
	//* プログラム名:め〜るNiポン!V2
	//* プログラムID:MST1113.php
	//* 機能				:ユーザー一括削除処理
	//* 
	//*****************************************************************************
	header("Content-type: text/html; charset=EUC-JP");

	//***************************
	//* インクルードファイル
	//***************************
	include("./include/session_start.inc");
	include("./include/SessionChk.inc");
	include("./include/dbcon.inc");


	$User_List = split ("," , $_POST["del_User_cd"]);

	for($intI = 0; $intI < count($User_List); $intI++){
		//***** 削除 *****
		//* syain_tbl *//
		$strSQL  = "DELETE ";
		$strSQL .= "FROM";
		$strSQL .= " syain_tbl ";
		$strSQL .= "WHERE ";
		$strSQL .= " syain_cd = ".$User_List[$intI]." ";
		$objRec = pg_exec($strSQL);

		//* syain_biko_tbl *//
		$strSQL  = "DELETE ";
		$strSQL .= "FROM";
		$strSQL .= " syain_biko_tbl ";
		$strSQL .= "WHERE ";
		$strSQL .= " syain_cd = ".$User_List[$intI]." ";
		$objRec = pg_exec($strSQL);

		//* group_info *//
		$strSQL  = "DELETE ";
		$strSQL .= "FROM";
		$strSQL .= " group_info ";
		$strSQL .= "WHERE ";
		$strSQL .= " syain_cd = ".$User_List[$intI]." ";
		$objRec = pg_exec($strSQL);

	}

	header("Location:./MST1100.php");
	exit;

?>