ADR006.php 1.57 KB
<?php 
//*****************************************************************************
//* 
//* プログラム名:アドレス帳
//* プログラムID:ADR006.php
//* 機能        :個人アドレス帳入力画面
//* 作成者      :
//* 
//*****************************************************************************
header("Content-type: text/html; charset=EUC-JP");

//***************************
//* インクルードファイル
//***************************
include("./include/session_start.inc");
include("./include/SessionChk.inc");
include('./include/smarty.conf');
include("./inc/header.inc");
include("./inc/STRING.inc");

//**** DB接続 ****//
include("./include/dbcon.inc");

//修正の場合
if ($seq !=0){
	$strSQLedit="Select view_name,view_name_kana,mail_address from mail_address_tbl Where syain_cd='$PHP_SYAIN_CD' and seq=$seq";
	$objRecedit = pg_exec($strSQLedit);
	if($objRecedit==false){
		echo("SQL実行に失敗しました(SELECT)");
		exit;
	}

	$objData        = pg_fetch_object($objRecedit, 0);
	$view_name      = htmlspecialchars($objData->view_name);
	$view_name_kana = $objData->view_name_kana;
	$mail_address   = $objData->mail_address;
	$kind_flg       = 2;
}else{
	if (($strName!="") || ($strAddress!=""))
	{
		$view_name=htmlspecialchars($strName);
		$strAddress=str_replace("<","",$strAddress);
		$mail_address=str_replace(">","",$strAddress);
	}
	$kind_flg       = 1;
}

$o_smarty->assign('PhpName',$view_name);
$o_smarty->assign('PhpKana',$view_name_kana);
$o_smarty->assign('PhpMail',$mail_address);
$o_smarty->assign('PhpSeq',$seq);
$o_smarty->assign('kind_flg',$kind_flg);
$o_smarty->display('ADR006.tpl');

?>