CON121.php
2.18 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
<?php
//*****************************************************************************
//*
//* プログラム名:メニュー名称変更
//* プログラムID:CON121.php
//* 機能 :メニュー名称変更画面
//* 作成者 :
//*
//*****************************************************************************
header("Content-type: text/html; charset=EUC-JP");
include("include/session_start.inc");
include("include/SessionChk.inc");
include("inc/input_chk.inc");
include('./include/smarty.conf');
include("inc/header.inc");
include("inc/CON121.inc");
//メニューセット
include("menu_opacity.php");
$strDBinc="include/dbcon.inc";
include($strDBinc);
if ($PHP_BIT[0]!=1){
echo "<br><br><br>";
echo "<a href='TOP000.php'><span class='Normalfont'>マスタ変更権限がありません</span></a>";
echo "<br><br><br>";
echo "<form name='e_gru'></form>";
include("include/copyright.inc");
exit;
}
$strSQL = "select index_no, name, org_name, sub_menu_num from main_menu_tbl order by index_no asc";
$objRec = pg_exec($strSQL);
if($objRec == false){
echo("SQL実行に失敗しました(SELECT)");
exit;
}
for($i=0;$i<pg_numrows($objRec);$i++){
$objftc = pg_fetch_object($objRec, $i);
$strMain[$i] = htmlspecialchars($objftc->name);
$strMainOrg[$i] = $objftc->org_name;
$keyMain[$i] = $objftc->index_no;
//使用中サブ取得
$strSQL2 = "select main_index, index_no, name, org_name, url, img, disp_flg from sub_menu_tbl where main_index = ".$objftc->index_no." and disp_flg = 1 order by index_no asc";
$objRec2 = pg_exec($strSQL2);
if($objRec2 == false){
echo("SQL実行に失敗しました(SELECT)");
exit;
}
if(pg_numrows($objRec2)>0){
for($j=0;$j<pg_numrows($objRec2);$j++){
$objftc2 = pg_fetch_object($objRec2, $j);
$strSub[$i][$j] = htmlspecialchars($objftc2->name);
$strSubOrg[$i][$j] = $objftc2->org_name;
$keySub[$i][$j] = $objftc2->main_index."/".$objftc2->index_no;
}
}
}
$o_smarty->assign('strMain',$strMain);
$o_smarty->assign('strMainOrg',$strMainOrg);
$o_smarty->assign('keyMain',$keyMain);
$o_smarty->assign('strSub',$strSub);
$o_smarty->assign('strSubOrg',$strSubOrg);
$o_smarty->assign('keySub',$keySub);
if ($PHP_BIT[0]==1){
$o_smarty->display('CON121.tpl');
}else{
$o_smarty->display('CON999.tpl');
}
?>