layout_reg.php
1.8 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
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<?
//*****************************************************************************
//*
//* プログラム名:e-イベント
//* プログラムID:layout_reg.php
//* 機能 :レイアウト登録
//*
//*****************************************************************************
header("Content-type: text/html; charset=shift-jis");
include('./include/smarty.conf');
//セッション開始
require_once("./include/session_start.inc");
include("./include/dbcon.inc");
//*** 画面構成情報 ***//
$strSQL = "DELETE FROM group_style_tbl WHERE group_cd = '".$_SESSION["PHP_CAL_CODE"]."'";
$objRec = pg_exec($strSQL);
if($objRec==false){
echo("SQL実行に失敗しました(DELETE)");
exit;
}
//INSERT
$strSQL = "INSERT INTO group_style_tbl (";
$strSQL .= " group_cd ,";
$strSQL .= " group_template,";
$strSQL .= " group_style ";
$strSQL .= " )values(";
$strSQL .= "'".$_SESSION["PHP_CAL_CODE"]."',";
$strSQL .= $_POST["cboTemplate"].",";
$strSQL .= $_POST["cboColor"];
$strSQL .= ")";
$objRec = pg_exec($strSQL);
if($objRec==false){
echo("SQL実行に失敗しました(INSERT)");
exit;
}
//*** ヘッダー情報 ***//
$strSQL = "DELETE FROM group_header_tbl WHERE group_cd = '".$_SESSION["PHP_CAL_CODE"]."'";
$objRec = pg_exec($strSQL);
if($objRec==false){
echo("SQL実行に失敗しました(DELETE)");
exit;
}
$strSQL = "INSERT INTO group_header_tbl (";
$strSQL .= " group_cd ,";
$strSQL .= " header_memo,";
$strSQL .= " type ";
$strSQL .= " )values(";
$strSQL .= "'".$_SESSION["PHP_CAL_CODE"]."',";
$strSQL .= "'".mb_convert_encoding($_POST["cboHeader"], "EUC-JP", "SJIS" )."',";
switch($_POST["cboHeader"]){
case "H01":
case "H02":
case "H03":
$strSQL .= "1";
break;
default:
$strSQL .= "2";
break;
}
$strSQL .= ")";
$objRec = pg_exec($strSQL);
if($objRec==false){
echo("SQL実行に失敗しました(INSERT)");
exit;
}
header("Location:./layout_make.php");
?>