本文整理汇总了PHP中Konek::getField方法的典型用法代码示例。如果您正苦于以下问题:PHP Konek::getField方法的具体用法?PHP Konek::getField怎么用?PHP Konek::getField使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Konek
的用法示例。
在下文中一共展示了Konek::getField方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: ucwords
function get_icopim($id, $detil_id, $nama, $biaya) {
$kon = new Konek;
$objResponse = new xajaxResponse;
$parent = md5(microtime());
//get icopim_detil
$kon->sql = "SELECT * FROM icopim_detil WHERE id = '".$detil_id."'";
$kon->execute();
$data_icopim_detil = $kon->getOne();
$field_icopim_detil = $kon->getField();
$ret .= "<tr id=\"input_icopim_tr_".$parent."\" style=\"background-color: #EDEDED;\">";
//Tindakan
$ret .= "<td><b>".$nama."</b></td>";
$ret .= "<td><a href=\"javascript:void(0)\" title=\"Hapus Tindakan\" onclick=\"hapus_kunjungan_kamar_icopim('','input_icopim_tr_".$parent."','input_icopim_table_".$parent."')\"><img src=\"".IMAGES_URL."remove.png\" alt=\"Hapus Tindakan\" border=\"0\" /></a>";
$ret .= "<input type=\"hidden\" name=\"input_kunjungan_icopim_id[".$parent."]\" value=\"\" />";
$ret .= "<input type=\"hidden\" name=\"input_icopim[".$parent."]\" value=\"".$id."\" />";
$ret .= "<input type=\"hidden\" name=\"input_icopim_nama[".$parent."]\" value=\"".$nama."\" />";
$ret .= "<input type=\"hidden\" name=\"input_icopim_parent[]\" value=\"".$parent."\" />";
$ret .= "<input type=\"hidden\" name=\"input_icopim_detil[".$parent."]\" value=\"".$data_icopim_detil[id]."\" />";
$ret .= "</td>";
$ret .= "<tr id=\"input_icopim_table_".$parent."\"><td colspan=\"2\">";
$ret .= "<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\" class=\"tabel_biaya\"><tr><th style=\"width:200px;\">Jasa</th><th>Hak</th><th>Biaya</th><th>Sifat</th><th style=\"width:70px;\">Jml</th><th style=\"width:100px;\">Bayar</th><th style=\"width:20px;\"> </th></tr>";
//get hak
$data_hak = $_SESSION[igd][hak];
$opt_hak = "";
for($i=0;$i<sizeof($data_hak);$i++) {
if($data_hak[$i][id] == 25) $opt_hak .= "<option value=\"".$data_hak[$i][id]."\" selected=\"\">".$data_hak[$i][nama]."</option>";
else $opt_hak .= "<option value=\"".$data_hak[$i][id]."\">".$data_hak[$i][nama]."</option>";
}
//get sifat
$data_sifat = $_SESSION[igd][sifat];
$opt_sifat = "";
for($i=0;$i<sizeof($data_sifat);$i++) {
$opt_sifat .= "<option value=\"".$data_sifat[$i][nilai]."\">".$data_sifat[$i][nama]."</option>";
}
for($j=11;$j<26;$j++) {
if($data_icopim_detil[$field_icopim_detil[$j]->name] == "0") continue;
$n = md5(microtime());
$nama_baris = ucwords(str_replace("_", " ", $field_icopim_detil[$j]->name));
$ret .= "<tr id=\"input_icopim_detil_tr_".$n."\">";
$ret .= "<td>".$nama_baris."</td>";
//HAK
$hak = "<select name=\"input_icopim_detil_hak[".$parent."][]\" id=\"input_icopim_detil_hak_".$n."\" class=\"inputan\" onkeypress=\"focusNext( 'input_icopim_detil_biaya_".$n."', event, 'input_icopim_detil_bayar_".$n."', this)\">" . $opt_hak . "</select>";
$ret .= "<td style=\"text-align:center;\">".$hak."</td>";
//BIAYA
$ret .= "<td style=\"text-align:right;\">";
$ret .= "<input type=\"text\" name=\"input_icopim_detil_biaya[".$parent."][]\" id=\"input_icopim_detil_biaya_".$n."\" value=\"".$data_icopim_detil[$field_icopim_detil[$j]->name]."\" class=\"inputan_angka\" size=\"10\" onkeyup=\"kaliKan2('input_icopim_detil_bayar_".$n."', this.value, document.getElementById('input_icopim_detil_sifat_".$n."').value, document.getElementById('input_icopim_detil_jml_".$n."').value);\" onkeypress=\"focusNext( 'input_icopim_detil_sifat_".$n."', event, 'input_icopim_detil_hak_".$n."', this)\" />";
$ret .= "</td>";
//SIFAT
$sifat = "<select name=\"input_icopim_detil_sifat[".$parent."][]\" id=\"input_icopim_detil_sifat_".$n."\" class=\"inputan\" onchange=\"kaliKan2('input_icopim_detil_bayar_".$n."', this.value, document.getElementById('input_icopim_detil_biaya_".$n."').value, document.getElementById('input_icopim_detil_jml_".$n."').value);\" onkeypress=\"focusNext( 'input_icopim_detil_jml_".$n."', event, 'input_icopim_detil_biaya_".$n."', this)\">" . $opt_sifat . "</select>";
$ret .= "<td style=\"text-align:center;\">".$sifat."</td>";
//JUMLAH
$ret .= "<td style=\"text-align:center;\">";
$ret .= "<input type=\"text\" name=\"input_icopim_detil_jml[".$parent."][]\" id=\"input_icopim_detil_jml_".$n."\" value=\"1\" class=\"inputan_angka\" size=\"3\" onkeyup=\"kaliKan2('input_icopim_detil_bayar_".$n."', this.value, document.getElementById('input_icopim_detil_sifat_".$n."').value, document.getElementById('input_icopim_detil_biaya_".$n."').value);\" onkeypress=\"focusNext( 'input_icopim_detil_bayar_".$n."', event, 'input_icopim_detil_sifat_".$n."', this)\" />";
$ret .= "</td>";
//BAYAR
$ret .= "<td style=\"text-align:right;\">";
$ret .= "<input type=\"text\" name=\"input_icopim_detil_bayar[".$parent."][]\" id=\"input_icopim_detil_bayar_".$n."\" value=\"".$data_icopim_detil[$field_icopim_detil[$j]->name]."\" class=\"inputan_angka\" size=\"10\" onkeypress=\"focusNext( 'input_icopim_detil_hak_".$n."', event, 'input_icopim_detil_jml_".$n."', this)\" />";
$ret .= "</td>";
//HAPUS
$ret .= "<td><a href=\"javascript:void(0)\" title=\"Hapus ".$nama_baris."\" onclick=\"hapus_kunjungan_bayar('','input_icopim_detil_tr_".$n."')\" class=\"tombol_hapus\"><img src=\"".IMAGES_URL."remove.png\" alt=\"Hapus ".$nama_baris."\" border=\"0\" /></a>";
$ret .= "<input type=\"hidden\" name=\"input_kunjungan_icopim_detil_id[".$parent."][]\" value=\"\" />";
$ret .= "<input type=\"hidden\" name=\"input_icopim_detil_field[".$parent."][]\" value=\"".$field_icopim_detil[$j]->name."\" />";
$ret .= "</td>";
$ret .= "</tr>";
}
$ret .= "</table></td></tr>";
$objResponse->addAppend("tbody_input_icopim", "innerHTML", $ret);
return $objResponse;
}