head_make.php 1.32 KB
<?
//*****************************************************************************
//* 
//* プログラム名: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');

?>