function showMenu($lstmenu) { $idnhomquyen = $_SESSION['idnhomquyen']; echo "<ul class='drop'>"; if (count($lstmenu) > 0) { foreach ($lstmenu as $i) { if (checkExistentQ_NQ($idnhomquyen, $i["IDDM"])) { echo "<li> <a href='#'> " . $i[Constants::$Ten_DM_name] . "</a>"; $rs = getDMCon($i[Constants::$ID_DM_name]); if (count($rs) > 0) { showMenu($rs); } echo "</li>"; } } } echo "</ul>"; }
} ?> <input type="text" name="txt_idnhomquyen" id="txt_idnhomquyen" value="<?php $idnhomquyen = @$_REQUEST['idnhomquyen']; echo $idnhomquyen; ?> " /> </div> <!--Hiển thị các danh mục--> <div style="width:600px; float: left;"> <?php $rs = getAllDM(); if (count($rs) > 0) { foreach ($rs as $r) { echo "<input type='checkbox' "; if (checkExistentQ_NQ($idnhomquyen, $r["IDDM"])) { echo "checked"; } echo " name='cbx[]' id='cbx" . $r["IDDM"] . "' value=" . $r["IDDM"] . ">" . $r['TenDM'] . "</input><br>"; } } ?> <div> <input type="submit" name="btn_OK" id="btn_OK" value="OK"/> </div> </div> </form> <!-- <input type="checkbox" checked name="cbx" id="cbx1" value="1" onclick="getvalueCbx();"> <input type="checkbox" checked name="cbx" id="cbx2" value="2" onclick="getvalueCbx();">--> </body>