CON003_4.php
1.87 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<?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>