menu_sub1.php
1.26 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
<?php
header("Content-type: text/html; charset=EUC-JP");
require_once "jcode.phps";
//*****************************************************************************
//* インクル〖ドファイル
//*****************************************************************************
include("include/session_start.inc");
include("include/SessionChk.inc");
include('./include/smarty.conf');
include("./include/dbcon.inc");
$menu_id = (int)$menu_id +1;
$strSql = "SELECT * FROM sub_menu_TBL WHERE main_index = ".$menu_id." and disp_flg =1 ORDER BY index_no";
$rsRecset = pg_exec($pg_con,$strSql);
$intRsCnt2 = pg_numrows($rsRecset);
?>
<table width="100%" border="0">
<tr>
<td><hr></td>
</tr>
<tr>
<td style="padding: 0px 0px 10px 0px;">
<?php
for ($j = 0 ; $j <= $intRsCnt2-1 ; $j++) {
$sub_name[$j] = htmlspecialchars(JCodeConvert(pg_result($rsRecset,$j,"name"),0,1));
$jumpURL[$j] = JCodeConvert(pg_result($rsRecset,$j,"url"),0,1);
$img_URL[$j] = JCodeConvert(pg_result($rsRecset,$j,"img"),0,1);
echo '<a href="'.$jumpURL[$j].'"><img src="image/'.$img_URL[$j]. '"height="19" width="20" border="0"> '.JCodeConvert($sub_name[$j],0,0).' </a> ';
if (($j+1)%4 == 0 && $j != $intRsCnt2-1){
echo '<br><br>';
}
}
?>
</td>
</tr>
</table>