MEM001.php
2.35 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
<?php
//*****************************************************************************
//*
//* プログラム名:メモ帳
//* プログラムID:MEM001.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/MEM001.inc");
//**** メニュー ****//
include("menu_opacity.php");
$strDBinc="include/dbcon.inc";
include($strDBinc);
//*** メモ帳初期表示設定取得 ***
$strSQL="SELECT memo FROM kojin_data_tbl WHERE seq=1 AND syain_cd='$PHP_SYAIN_CD'";
$objRec = pg_exec($strSQL);
if($objRec==false){
echo("SQL実行に失敗しました(SELECT)");
exit;
}
if (pg_numrows($objRec) > 0){
$objData=pg_fetch_object($objRec, 0);
$Disp_Mode=$objData->memo;
if ($Disp_Mode==""){
$Disp_Mode = 0;
$memo = "";
}
}else{
$Disp_Mode=0;
$memo="";
}
//*** メモ帳取得 ***
$strSQL="SELECT seq,title,memo FROM mymemo_tbl WHERE syain_cd = '$PHP_SYAIN_CD' ORDER BY title";
$objRec = pg_exec($strSQL);
if($objRec==false){
echo("SQL実行に失敗しました(SELECT)");
exit;
}
$SEL_title='<OPTION value=0 ';
if ($Disp_Mode==0){
$SEL_title.="selected";
}
$SEL_title.='>新規作成</OPTION>';
$memo = "";
$title_Data = "";
if (pg_numrows($objRec) > 0){
for ($intCnt=0; $intCnt < pg_numrows($objRec); $intCnt++){
$objData = pg_fetch_object($objRec, $intCnt);
$SEL_title.='<OPTION value="'.$objData->seq.'"';
if ($title==""){
if ($Disp_Mode==$objData->seq){
$SEL_title .= " selected";
$memo = $objData->memo;
$title_Data = htmlspecialchars($objData->title);
$chkInfo = "checked";
}
}else{
if ($title==$objData->seq){
$SEL_title.=" selected";
$memo = $objData->memo;
$title_Data = htmlspecialchars($objData->title);
if ($Disp_Mode==$objData->seq){
$chkInfo = "checked";
}
}
}
$SEL_title.='>'.$objData->title.'</OPTION>';
}
}
$o_smarty->assign('memo' ,$memo);
$o_smarty->assign('title_Data' ,$title_Data);
$o_smarty->assign('SEL_title' ,$SEL_title);
$o_smarty->assign('chkInfo' ,$chkInfo);
$o_smarty->assign('PHP_TITLE_NAME',$PHP_TITLE_NAME[12]);
$o_smarty->display('MEM001.tpl');
?>