CON003_4.php 1.87 KB
<?php 
//*****************************************************************************
//* 
//* プログラム名:部門情報DB設定処理(削除)
//* プログラムID:CON003_4
//* 機能        :部門情報をDB設定する
//* 作成者      :
//* 
//*****************************************************************************
header("Content-type: text/html; charset=EUC-JP");

//***************************
//* インクルードファイル
//***************************
include("./include/session_start.inc");			//セッション開始
include("./include/SessionChk.inc");				//セッションチェック
include("./include/dbcon.inc");							//DB接続

$strSQL = "SELECT syain_tbl.syain_cd ".
			" FROM syain_tbl,syozoku_tbl ".
			" Where syozoku_cd = ".$_POST["syozoku_cd"] ." AND syozoku_tbl.syain_cd = syain_tbl.syain_cd AND syain_tbl.del_flg = true ".
			" Order by syain_tbl.syain_cd";
$objRecSet = pg_exec($strSQL);
if($objRecSet==false){
	echo("SQL実行に失敗しました(SELECT)");
	exit;
}

if (pg_numrows($objRecSet) > 0){
	$intGmflg=1;
}else{
	$strSql = "UPDATE mst_bumon SET del_flg=1,disp_rank=9999999 ".
				" WHERE syozoku_cd=".$_POST["syozoku_cd"] ;
	$rsResult = pg_exec($pg_con,$strSql);
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML>
<HEAD>
<META http-equiv="Content-Type" content="text/html; charset=EUC-JP">
<META http-equiv="Content-Style-Type" content="text/css">
<link rel="stylesheet" type="text/css" href="basefont.css">
<TITLE>e-グル 設定</TITLE>
<SCRIPT LANGUAGE="JAVASCRIPT">
<!--
function load_screen(intGmflg){
	if (intGmflg==1){
		document.e_gru.action = "CON003_3.php";
	}else{
		document.e_gru.action = "CON003.php";
	}
	document.e_gru.method="POST";
	document.e_gru.submit();
}
-->
</SCRIPT>
</HEAD>
<BODY onLoad="return load_screen(<?php  echo $intGmflg; ?>);">
<form name="e_gru">
	<input type="hidden" name = "syozoku_cd" value = "<?php echo $_POST["syozoku_cd"];?>">
</form>
</BODY>
</HTML>