예제 #1
0
function iSelect($d, $a, $s = '', $y = '', $cb = '')
{
    $r = "<select class=\"iSelect\" id=\"" . $d . "\" name=\"" . $d . "\" " . ($y == "" ? "" : " style=\"" . $y . "\" ") . ($cb == "" ? "" : " onchange=\"" . $cb . "\" ") . " onfocus=\"this.className='iSelectx'\" onblur=\"this.className='iSelect'\">";
    foreach ($a as $k => $v) {
        $r .= "<option value=\"" . $k . "\"" . isSelect($k, $s) . ">" . $v . "</option>";
    }
    $r .= "</select>";
    return $r;
}
예제 #2
0
function iSelectOpt($a, $s = '')
{
    if (is_array($s)) {
        $s = $s[$d];
    }
    $r = "";
    if (is_array($a)) {
        if (count($a) > 0) {
            foreach ($a as $k => $v) {
                $r .= "<option value=\"" . $k . "\"" . isSelect($k, $s) . ">" . $v . "</option>";
            }
        }
    }
    return $r;
}
예제 #3
0
?>
>Staff</option>
					<option value="General Staff"<?php 
echo isSelect("General Staff", $r['staff']);
?>
>General Staff</option>
				</select>
			</td></tr>
			<tr><td>Golongan:</td><td>
				<select class="ifield" id="golongan" style="width:140px">
					<option value="Lokal"<?php 
echo isSelect("Lokal", $r['golongan']);
?>
>Lokal</option>
					<option value="Ekspatriat"<?php 
echo isSelect("Ekspatriat", $r['golongan']);
?>
>Ekspatriat</option>
				</select>
			</td></tr>
		</table>
		<br/>
		<br/>
		<table cellspacing="0" cellpadding="3px" width="100%"><tr>
			<td align="center">
				<input type="button" class="btn" onclick="close_fform()" value="Batal"/>
				<input type="button" class="btnx" value="Simpan" onclick="save_ipf1()"/>
			</td>
		</tr></table>
	</div>
</div>
예제 #4
0
						<td>&nbsp;</td>
						<td width="200px">Apakah pernah ke luar negeri?</td>
						<td>
							<script language="javascript" type="text/javascript">
								function getAbroad(a){
									if(a=='Y') document.getElementById('abroadx').style.display='';
									else document.getElementById('abroadx').style.display='none';
								}
							</script>
							<select class="ifield" onchange="getAbroad(this.value)" name="abroad" id="abroad">
								<option value="Y" <?php 
echo isSelect($empp['abroad'], "Y");
?>
>Pernah</option>
								<option value="N" <?php 
echo isSelect($empp['abroad'], "N");
?>
>Belum pernah</option>
							</select>
						</td>
					</tr>
					<tr id="abroadx" style="display:<?php 
echo $empp['abroad'] != "N" ? "" : "none";
?>
">
						<td>&nbsp;</td>
						<td width="200px">Kemana? Untuk apa?</td>
						<td><input type="text" class="ifield" style="width:100%" name="abroad_where" id="abroad_where" value="<?php 
echo $empp['abroad_where'];
?>
"/></td>