MST1410.php
1.82 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
<?PHP
//*****************************************************************************
//*
//* プログラム名:め〜るNiポン!V2
//* プログラムID:MST1410.php
//* 機能 :回答パターン一覧
//*
//*****************************************************************************
header("Content-type: text/html; charset=EUC-JP");
//***************************
//* インクルードファイル
//***************************
include('./include/smarty.conf');
include("./include/session_start.inc");
include("./include/SessionChk2.inc");
include("./include/jcode.phps");
//********** ヘッダー処理 **********//
include("./include/headr_data.inc");
//***************************
//* 内部変数
//***************************
include("./include/dbcon.inc");
$sql = "SELECT * FROM mst_answer";
$sql .= " WHERE del_flg = 0";
$sql .= " ORDER BY pattern_id";
$rtn = pg_exec($sql);
if($rtn == false){
echo("SQL実行に失敗しました(SELECT)");
exit;
}
$num = pg_numrows($rtn);
if($num >= 0){
$count = 1;
for ($i = 0; $i < $num; $i++){
$data = pg_fetch_object($rtn, $i);
$kaito_ptn[$i] = "<TD ALIGN=\"LEFT\"><FONT size=\"2\"><a href=\"MST1420.php?e=1&p=".$data->pattern_id."\">".$data->pattern_nm."</a></FONT></TD>";
$kaito_ptn[$i] = $kaito_ptn[$i]."<TD ALIGN=\"CENTER\"><FONT size=\"2\">".$data->select_nm."</FONT></TD>";
$kaito_ptn[$i] = $kaito_ptn[$i]."<TD ALIGN=\"CENTER\"><input type=\"radio\" name=\"default_flg[]\" value=\"".$data->pattern_id."\" ";
if ($data->default_flg == 1){
$kaito_ptn[$i] = $kaito_ptn[$i]." checked ></td>";
}else{
$kaito_ptn[$i] = $kaito_ptn[$i]." ></td>";
}
$kaito_ptn[$i] = $kaito_ptn[$i]."<TD ALIGN=\"CENTER\"><input type=\"checkbox\" name=\"del_flg[]\" value=\"".$data->pattern_id."\"></TD>";
}
}
$o_smarty->assign('num' , $num);
$o_smarty->assign('kaito_ptn' , $kaito_ptn);
$o_smarty->display('MST1410.tpl');
?>