mail_body.php
2.31 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
<?PHP
//*****************************************************************************
//*
//* プログラム名:め〜るNiポン
//* プログラムID:menu.php
//* 機能 :ASP管理用メニュー(ユーザー一覧)
//* 作成者 :Y.Hamaya(MTC)
//*
//*****************************************************************************
header("Content-type: text/html; charset=EUC-JP");
include("include/allinc.inc");
if($seq==""){$seq=0;}
$sql = "SELECT * FROM mail_body_tbl ";
$sql .= "where seq=".$seq;
$rtn = pg_exec($pg_con, $sql);
if($rtn == false){
echo "SQLの実行に失敗しました。(#1)";
exit;
}
$num = pg_numrows($rtn);
$data = pg_fetch_object($rtn, $i);
?>
<HTML>
<HEAD>
<META name="GENERATOR" content="Microsoft FrontPage 4.0">
<META http-equiv="Content-Type" content="text/html; charset=EUC-JP">
<META http-equiv="Content-Style-Type" content="text/css">
<TITLE>め〜るNiポン 〜ASP管理〜</TITLE>
<SCRIPT LANGUAGE="JAVASCRIPT">
<!--
function edit(flg){
document.forms[0].action = "mail_body_edit.php?flg="+flg;
document.forms[0].method="POST";
document.forms[0].submit();}
-->
</SCRIPT>
</HEAD>
<body>
<form>
<div align="center"><strong><font color="blue" size="5">メール本文</font></strong></div>
<HR>
<div align="center"><br>
<br>
<table border="1">
<tr>
<th width="116" height="17" scope="col">パターン名</th>
<th width="406" align="left" scope="col"><input name="name" type="text" size="50" value="<?PHP echo $data->name; ?>"><div align="left">
</div></th>
</tr>
<tr>
<th height="17" scope="col">タイトル</th>
<th align="left" scope="col"><input name="title" type="text" size="50" value="<?PHP echo $data->title; ?>"></th>
</tr>
<tr>
<th valign="top" scope="col">本文</th>
<th valign="top" align="left" scope="col"><textarea name="body" cols="80" rows="30"><?PHP echo $data->body; ?></textarea><div align="left">
</div></th>
</tr>
</table>
</div>
<INPUT TYPE="hidden" NAME="seq" VALUE="<?PHP echo $seq; ?>">
<p align="center">
<?PHP if($seq==0){ ?>
<input type="button" name="Submit" value="追加" onclick="return edit(1)">
<?PHP }else{ ?>
<input type="button" name="Submit" value="修正" onclick="return edit(2)">
<input type="button" name="Submit" value="削除" onclick="return edit(3)">
<?PHP } ?>
</p>
</form>
</body>
</HTML>