Exemplo n.º 1
0
if ($vAct == 'add' || $vAct == 'edit') {
    ?>


<fieldset>
<legend>Thêm mới và điều chỉnh thông tin người dùng</legend>

<form method="post" action="" id="mmenus_Form" enctype="multipart/form-data" >
<table border="0" cellspacing="0" cellpadding="5">
	<tr>
		<td>Menu cha:</td>
		<td>
			<select name="cboMenuParent">
				<option value="0">--Root--</option>
				<?php 
    echo combobox_menu_Left($eParentID);
    ?>
			</select>
		</td>
	</tr>
	<tr>
		<td>Tên module:</td>
		<td>
			<select name="cboModuleName">
				<option value="administrator">administrator</option>
				<?php 
    $arrModule = scandir('modules');
    if (count($arrModule) >= 2) {
        for ($m = 2; $m < count($arrModule); $m++) {
            $selectedModule = '';
            if ($arrModule[$m] == $eModuleName) {
Exemplo n.º 2
0
function combobox_menu_Left($pSelectedID = -1, $pParentID = 0, $pSpaceBlank = "")
{
    global $vConn;
    $vSQL = "SELECT * FROM menus_left \n\t\tWHERE (ParentID_Left={$pParentID}) AND (IFNULL(Visible_Left,0)=1) \n\t\tORDER BY Possition_Left ASC";
    $vResult = mysql_query($vSQL);
    $vOutput = "";
    if (mysql_num_rows($vResult) > 0) {
        while ($row = mysql_fetch_array($vResult)) {
            $MenuID = $row["ID"];
            $MenuName = $row["MenuName_Left"];
            $MenuPath = $row["Path_Left"];
            $vSelectedStyle = "";
            if ($pSelectedID == $MenuID) {
                $vSelectedStyle = 'selected="selected"';
            }
            $pSpaceBlank = "";
            if ($pParentID != 0) {
                $pSpaceBlank = "&nbsp;&nbsp;&nbsp;";
            }
            $vOutput .= "<option value=\"{$MenuID}\" {$vSelectedStyle}>{$pSpaceBlank} {$MenuName}</option>\n";
            $vOutput .= combobox_menu_Left($pSelectedID, $MenuID, $pSpaceBlank);
        }
    }
    return $vOutput;
}