menu_sub1.php 1.26 KB
<?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>