MST1150.php
1.28 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
<?PHP
//*****************************************************************************
//*
//* プログラム名:め〜るNiポン!V2
//* プログラムID:MST1150.asp
//* 機能 :CSV処理
//*
//*****************************************************************************
header("Content-type: text/html; charset=EUC-JP");
//***************************
//* インクルードファイル
//***************************
include('./include/smarty.conf');
include("./include/session_start.inc");
include("./include/SessionChk.inc");
include("./include/jcode.phps");
//********** ヘッダー処理 **********//
include("./include/headr_data.inc");
//***************************
//* 内部変数
//***************************
include("./include/dbcon.inc");
if ($_SESSION["PHP_CSV_FLG"]!=1){
header("Location:login_err.php");
}
//*** グループ ***//
$Group_Data = array();
$strSQL = "SELECT group_id, group_name FROM mst_group ORDER BY group_id";
$objRec = pg_exec($strSQL);
if($objRec==false){
echo("SQL実行に失敗しました(SELECT)");
exit;
}
for($intI = 0; $intI < pg_numrows($objRec) ; $intI++) {
$objData = pg_fetch_object($objRec, $intI);
$Group_Data[$intI][0] = $objData->group_id;
$Group_Data[$intI][1] = $objData->group_name;
}
$o_smarty->assign('Group_Data', $Group_Data);
$o_smarty->display('MST1150.tpl');
?>