layout_reg.php 1.81 KB
<?PHP 
//*****************************************************************************
//* 
//* プログラム名: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");

?>