ADR006.php
1.57 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
54
55
<?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');
?>