head_input.php
1.06 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
<?PHP
//*****************************************************************************
//*
//* プログラム名:e-イベント
//* プログラムID:head_input.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_header_tbl WHERE group_cd = '".$_SESSION["PHP_CAL_CODE"]."'";
$objRec = pg_exec($strSQL);
if($objRec==false){
echo("SQL実行に失敗しました(DELETE)");
exit;
}
//INSERT
$strSQL = "INSERT INTO group_header_tbl (";
$strSQL .= " group_cd ,";
$strSQL .= " header_memo ";
$strSQL .= " )values(";
$strSQL .= "'".$_SESSION["PHP_CAL_CODE"]."',";
$strSQL .= "'".mb_convert_encoding($_POST["txtHeader"], "EUC-JP", "SJIS" )."'";
$strSQL .= ")";
$objRec = pg_exec($strSQL);
if($objRec==false){
echo("SQL実行に失敗しました(INSERT)");
exit;
}
header("Location:./head_make.php");
?>