コード例 #1
0
		</script>
		<form action="index.php?view=user" method="post" name="frmRegister" id="frmRegister" >
			<input name="btUpdate" type="hidden" value="Cập nhật" />
			<input name="uid" id="uid" type="hidden" value="<?php 
echo $user[0];
?>
" />	
			<table align="center" border="0" cellpadding="0" cellspacing="0">
				<tr>
					<td width="130px">Số tiền: <span style="color:red;">(*)</span></td>
					<td width="280px">
						<input type="text" id="txtSotien" onkeypress="return keypress(event);" onkeyup="FormatCurrency(this);" />
                        <select id="cbbDvTien">
                        <?php 
include_once "../BUS/DonviTienBUS.php";
$dvTien = DonViTienBUS::GetAllDonViTien();
for ($i = 0; $i < count($dvTien); $i++) {
    if ($dvTien[$i]['id'] == 2) {
        echo '<option value="' . $dvTien[$i]['id'] . '" selected>' . $dvTien[$i]['ten'] . '</option>';
    } else {
        echo '<option value="' . $dvTien[$i]['id'] . '">' . $dvTien[$i]['ten'] . '</option>';
    }
}
?>
                        </select>
                        </td>
				</tr>
				<tr>
					<td valign="top" style="padding-top:6px;">Công việc: <span style="color:red;">(*)</td>
					<td>
						<textarea style="width:99%;" id="txtCongviec"></textarea>
コード例 #2
0
												<td width="200px" ><b>Giá:</b><span style="color:red;"> *</span></td>
												<td>
												<div style="width:310px;float:left;">
													<?php 
    if (isset($_GET['update']) && $_GET['update'] != null) {
        echo "<input name='txtGia' id='txtGia' type='text' onkeypress='return keypress(event);' onkeyup='FormatCurrency(this);' style='width:123px;text-align:right;' value='" . number_format($capnhatDV['giaban']) . "'>";
    } else {
        ?>
													<input id="txtGia" name="txtGia" class="Textbox" type="text" style="width:123px;text-align:right;" onkeypress="return keypress(event);" onkeyup="FormatCurrency(this);" />
													<?php 
    }
    ?>
													<select id="cbbDonViTien" class="DropDownList" name="cbbDonViTien">
													<?php 
    include "../BUS/DonViTienBUS.php";
    $rs = DonViTienBUS::GetAllDonViTien();
    for ($i = 0; $i < count($rs); $i++) {
        if (isset($_GET['update']) && $_GET['update'] != null && $capnhatDV['donvitien'] == $rs[$i][0]) {
            echo "<option value='" . ($i + 1) . "' selected>" . $rs[$i][1] . "</option>";
        } else {
            if ($rs[$i][0] == 2) {
                echo "<option selected value='" . ($i + 1) . "'>" . $rs[$i][1] . "</option>";
            } else {
                echo "<option value='" . ($i + 1) . "'>" . $rs[$i][1] . "</option>";
            }
        }
    }
    ?>
													</select> / 
													<select id="cbbDonViDichVu" name="cbbDonViDichVu" class="DropDownList" >
													<?php