/
main_privilage_by_table.php
executable file
·197 lines (180 loc) · 8.82 KB
/
main_privilage_by_table.php
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
<?
require_once('master_validation.php');
include('lib/nangkoelib.php');
echo open_body();
?>
<script language=javascript1.2 src='js/main_privilage_by_table.js'></script>
<?
include('master_mainMenu.php');
OPEN_BOX();
echo OPEN_THEME($_SESSION['lang']['menusettings'].":");
//=================================================================================
//menuSettings
//==================================================================================================================================================================
echo"<div id=menuOrderContainer style='position:relative;display:block'>
<hr><b>Assign a menu for users:</b>:
";
echo"<ul>
<a class=lab id=orderlab0 href=# onclick=showEditor('0','false',event) title='Click to arrange master menu (the top most menu)'>".$_SESSION['lang']['mastermenu']."</a>
<div id=ordergroup0>";
$str="select * from ".$dbname.".menu
where type='master' order by urut";
$res=mysql_query($str);
while($bar=mysql_fetch_object($res))
{
echo "<li class=mmgr><img title=expand class=arrow src='images/foldc_.png' height=17px onclick=show_sub('orderchild".$bar->id."',this);>
<a class=lab title='Click to show this submenu order editor' id=orderlab".$bar->id." onclick=showEditor('".$bar->id."','true',event)>".$bar->caption."</a>";
//=========================================================
$str1="select * from ".$dbname.".menu
where parent=".$bar->id." order by urut";
$res1=mysql_query($str1);
echo"<ul id=orderchild".$bar->id." style='display:none;')>
<div id=ordergroup".$bar->id.">";
while($bar1=mysql_fetch_object($res1))
{
if(strtolower($bar1->class)=='devider')
{
$bar1->caption="------------";
}
if(strtolower($bar1->class)=='title' or strtolower($bar1->class)=='devider')
{
echo "<li class=mmgr><img src='images/menu/arrow_10.gif'>
".$bar1->caption;
}
else{
echo "<li class=mmgr><img title=Expand class=arrow src='images/foldc_.png' height=17px onclick=show_sub('orderchild".$bar1->id."',this);>
<a class=lab title='Click to show this submenu order editor' id=orderlab".$bar1->id." onclick=showEditor('".$bar1->id."','true',event)>".$bar1->caption."</a>";
}
//=========================================================
$str2="select * from ".$dbname.".menu
where parent=".$bar1->id." order by urut";
$res2=mysql_query($str2);
echo"<ul id=orderchild".$bar1->id." style='display:none;')>
<div id=ordergroup".$bar1->id.">";
while($bar2=mysql_fetch_object($res2))
{
if(strtolower($bar2->class)=='devider')
$bar2->caption="------------";
if(strtolower($bar2->class)=='title' or strtolower($bar2->class)=='devider')
{
echo "<li class=mmgr><img src='images/menu/arrow_10.gif'>
".$bar2->caption;
}
else{
echo "<li class=mmgr><img title=Expand class=arrow src='images/foldc_.png' height=17px onclick=show_sub('orderchild".$bar2->id."',this);>
<a class=lab title='Click to show this submenu order editor' id=orderlab".$bar2->id." onclick=showEditor('".$bar2->id."','true',event)>".$bar2->caption."</a>";
}
//=========================================================
$str3="select * from ".$dbname.".menu
where parent=".$bar2->id." order by urut";
$res3=mysql_query($str3);
echo"<ul id=orderchild".$bar2->id." style='display:none;'>
<div id=ordergroup".$bar2->id.">";
while($bar3=mysql_fetch_object($res3))
{
if(strtolower($bar3->class)=='devider')
$bar3->caption="------------";
if(strtolower($bar3->class)=='title' or strtolower($bar3->class)=='devider')
{
echo "<li class=mmgr><img src='images/menu/arrow_10.gif'>
".$bar3->caption;
}
else{
echo "<li class=mmgr><img title=Expand class=arrow src='images/foldc_.png' height=17px onclick=show_sub('orderchild".$bar3->id."',this);>
<a class=lab title='Click to show this submenu order editor' id=orderlab".$bar3->id." onclick=showEditor('".$bar3->id."','true',event)>".$bar3->caption."</a>";
}
//=========================================================
$str4="select * from ".$dbname.".menu
where parent=".$bar3->id." order by urut";
$res4=mysql_query($str4);
echo"<ul id=orderchild".$bar3->id." style='display:none;'>
<div id=ordergroup".$bar3->id.">";
while($bar4=mysql_fetch_object($res4))
{
if(strtolower($bar4->class)=='devider')
$bar4->caption="------------";
if(strtolower($bar4->class)=='title' or strtolower($bar4->class)=='devider')
{
echo "<li class=mmgr><img src='images/menu/arrow_10.gif'>
".$bar4->caption;
}
else{
echo "<li class=mmgr><img title=Expand class=arrow src='images/foldc_.png' height=17px onclick=show_sub('orderchild".$bar4->id."',this);>
<a class=lab title='Click to show this submenu order editor' id=orderlab".$bar4->id." onclick=showEditor('".$bar4->id."','true',event)>".$bar4->caption."</a>";
}
//=========================================================
$str5="select * from ".$dbname.".menu
where parent=".$bar4->id." order by urut";
$res5=mysql_query($str5);
echo"<ul id=orderchild".$bar4->id." style='display:none;'>
<div id=ordergroup".$bar4->id.">";
while($bar5=mysql_fetch_object($res5))
{
if(strtolower($bar5->class)=='devider')
$bar5->caption="------------";
if(strtolower($bar5->class)=='title' or strtolower($bar5->class)=='devider')
{
echo "<li class=mmgr><img src='images/menu/arrow_10.gif'>
".$bar5->caption;
}
else{
echo "<li class=mmgr><img class=arrow title='Expand' src='images/foldc_.png' height=17px onclick=show_sub('orderchild".$bar5->id."',this);>
<a class=lab title='Click to show this submenu order editor' id=orderlab".$bar5->id." onclick=showEditor('".$bar5->id."','true',event)>".$bar5->caption."</a>";
}
//=========================================================
$str6="select * from ".$dbname.".menu
where parent=".$bar5->id." order by urut";
$res6=mysql_query($str6);
echo"<ul id=orderchild".$bar5->id." style='display:none;'>
<div id=ordergroup".$bar5->id.">";
while($bar6=mysql_fetch_object($res6))
{
if(strtolower($bar6->class)=='devider')
$bar6->caption="------------";
echo "<li>".$bar6->caption."</li>";
}
echo"</div>
</ul>";
//========================================================
echo "</li>";
}
echo"</div>
</ul>";
//========================================================
echo "</li>";
}
echo"</div>
</ul>";
//========================================================
echo "</li>";
}
echo"</div>
</ul>";
//========================================================
echo "</li>";
}
echo"</div>
</ul>";
//========================================================
echo "</li>";
}
echo"</div>
</ul>";
//========================================================
echo "</li>";
}
echo "</ul></div>";
echo"</div>";
//*****************************
//menu order editor
echo"<div id=ordereditor style='display:none;position:absolute;'>";
echo OPEN_THEME('Choose user:');
echo"<div id=ordereditorcontent></div>";
echo CLOSE_THEME();
echo"</div>";
//end menuOrder
//==================================================================================================================================================================
echo CLOSE_THEME();
CLOSE_BOX();
echo close_body();
?>