<?php include '../../library/loader.php'; echo "\r\n\r\n//var hide_empty_list=true; //uncomment this line to hide empty selection lists\r\n\r\nvar disable_empty_list=true; //uncomment this line to disable empty selection lists\r\n\r\naddListGroup('group', 'car-makers');\r\n\r\naddOption('car-makers', 'Chọn chủng loại rượu', 'null', '', 1); //Empty starter option\r\n\r\n"; $tbl = new table('sections2'); $res = $tbl->loadAll(); if ($res) { while ($row = mysql_fetch_object($res)) { echo " addList('car-makers', '{$row->name}', '{$row->id}', '{$row->name}.{$row->id}'); "; echo " addOption('{$row->name}.{$row->id}', 'Chọn danh mục rượu', 'null', '', 1); "; // list category $tblCate = new table('category2'); $resCate = $tblCate->loadOne("sections = {$row->id}"); if ($resCate) { while ($rowCate = mysql_fetch_object($resCate)) { echo " addList('{$row->name}.{$row->id}', '{$rowCate->name}', '{$rowCate->id}', '{$rowCate->name}.{$rowCate->id}'); "; // list subcate $tblSub = new table('subcate2'); $resSub = $tblSub->loadOne("secid = {$row->id} and catid = {$rowCate->id}"); if ($resSub) { echo " addOption('{$rowCate->name}.{$rowCate->id}', 'Chọn danh mục con', 'null'); "; while ($rowSub = mysql_fetch_object($resSub)) { echo " addOption('{$rowCate->name}.{$rowCate->id}', '{$rowSub->name}', '{$rowSub->id}'); "; } } } } } }
</tr> <tr> <td class="first" width="75"><strong>Id </strong></td> <td width="536" class="last">#<?php echo $tbl->getLastId() + 1; ?> </td> </tr> <tr> <td class="first" width="75"><strong>Danh mục (*)</strong></td> <td colspan="2" class="last"> <select name="catid" id="danhmuc"> <option value="">---[Chọn một]---</option> <?php $tbl_cat = new table('category_adv'); $res_cat = $tbl_cat->loadAll(); while ($row_cat = mysql_fetch_array($res_cat)) { ?> <option value="<?php echo $row_cat['id']; ?> "><?php echo $row_cat['name']; ?> </option> <?php } ?> </select> </td> </tr>
</tr> <tr> <td class="first"><strong>Mã hàng</strong></td> <td colspan="3" class="last"><input name="mavach" type="text" class="text" /></td> </tr> <tr> <td class="first"><strong>Ghi chú</strong></td> <td colspan="3" class="last"><input name="ghichu" type="text" class="text" /></td> </tr> <tr> <td class="first"><strong>Nhà sản xuất</strong></td> <td colspan="3" class="last"> <select name="nsx"> <?php $tbl_nsx = new table('nsx'); $res_nsx = $tbl_nsx->loadAll('order by id'); while ($row_nsx = mysql_fetch_object($res_nsx)) { ?> <option value="<?php echo $row_nsx->id; ?> "><?php echo $row_nsx->name; ?> </option> <?php } ?> </select> </td> </tr>
<th class="full" colspan="2">NỘI DUNG</th> </tr> <tr> <td class="first" width="75"><strong>Id </strong></td> <td width="536" class="last">#<?php echo $id; ?> </td> </tr> <tr> <td class="first"><strong>Danh mục 1</strong></td> <td class="last"><select name="catid1" onchange="get_('components/category3/xuly.php',this.value,'cat2')"> <option value="">---[Chọn một]---</option> <?php $tbl_cat = new table('category1'); $res_cat = $tbl_cat->loadAll('order by ordering'); while ($row_cat = mysql_fetch_array($res_cat)) { ?> <option value="<?php echo $row_cat['id']; ?> " <?php if ($row['catid1'] == $row_cat['id']) { echo 'selected'; } ?> ><?php echo $row_cat['name']; ?> </option> <?php
<div class="table"> <img src="img/bg-th-left.gif" width="8" height="7" alt="" class="left" /> <img src="img/bg-th-right.gif" width="7" height="7" alt="" class="right" /> <form method="post" enctype="multipart/form-data"> <table class="listing form" cellpadding="0" cellspacing="0"> <tr> <th class="full" colspan="3">NỘI DUNG</th> </tr> <tr class="bg"> <td class="first"><strong>Permission</strong></td> <td colspan="2" class="last"> <select name="per" id="per"> <?php $tblPer = new table('permission'); $resPer = $tblPer->loadAll(); if ($resPer) { while ($rowPer = mysql_fetch_array($resPer)) { ?> <option value="<?php echo $rowPer['id']; ?> "><?php echo $rowPer['name']; ?> </option> <?php } } ?> </select>