head_make.php
1.33 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
<?PHP
//*****************************************************************************
//*
//* プログラム名:e-イベント
//* プログラムID:head_make.php
//* 機能 :イベント表示画面
//* 作成者 :
//*
//*****************************************************************************
header("Content-type: text/html; charset=shift-jis");
include('./include/smarty.conf');
//セッション開始
require_once("./include/session_start.inc");
include("./ini.php");
include("./include/dbcon.inc");
//*** トップ画像の取得 ***//
$strSQL = "SELECT ";
$strSQL .= " * ";
$strSQL .= "FROM ";
$strSQL .= " group_header_tbl ";
$strSQL .= "WHERE";
$strSQL .= " group_cd = '".$_SESSION["PHP_CAL_CODE"]."' ";
$objRec = pg_exec($strSQL);
if($objRec==false){
echo("エラー(SELECT)");
exit;
}
if(pg_numrows($objRec) <= 0){
$header_memo = '<img src="'.$_ROOT_URL_.'/image/base_header.jpg" />';
}else{
$objData = pg_fetch_object($objRec, 0);
$header_memo = mb_convert_encoding($objData->header_memo, "SJIS", "EUC-JP" );
}
if ($_POST["txtHeader"]==""){
$txtHeader = $header_memo;
}else{
$txtHeader = stripslashes($_POST["txtHeader"]);
}
$o_smarty->assign('header_memo', $header_memo);
$o_smarty->assign('txtHeader' , $txtHeader);
$o_smarty->display('head_make_h.tpl');
$o_smarty->display('head_make.tpl');
$o_smarty->display('head_make_f.tpl');
?>