本文整理汇总了PHP中Table::build方法的典型用法代码示例。如果您正苦于以下问题:PHP Table::build方法的具体用法?PHP Table::build怎么用?PHP Table::build使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Table
的用法示例。
在下文中一共展示了Table::build方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: xajaxResponse
function list_data($hal = 0) {
$paging = new MyPagina;
$paging->rows_on_page = 20;
$paging->sql = "SELECT id, nama, alamat FROM ref_perujuk ORDER BY nama";
$paging->get_page_result();
$paging->hal = $hal;
$_SESSION[hal] = $hal;
$paging->get_page_result();
$data = $paging->data;
$no = $paging->start_number();
$navi = $paging->navi();
$table = new Table;
$table->tbody_height = 420;
$table->addTh("No", "Nama", "Alamat", "Hapus");
$table->addExtraTh(" style=\"width: 50px;\"", " style=\"width: 200px;\"", "", " style=\"width: 70px;\" ");
for($i=0;$i<sizeof($data);$i++) {
$table->addRow(
($no+$i),
$data[$i][nama],
$data[$i][alamat],
"<a href=\"javascript:void(0)\" title=\"Hapus\" onclick=\"hapus_perujuk('".$data[$i][id]."', this)\" class=\"tombol_hapus\"><img src=\"".IMAGES_URL."remove.png\" alt=\"Hapus\" border=\"0\" /></a>");
$table->addExtraTd(
" onclick=\"xajax_get_perujuk('".$data[$i][id]."')\" ",
" onclick=\"xajax_get_perujuk('".$data[$i][id]."')\" ",
" onclick=\"xajax_get_perujuk('".$data[$i][id]."')\" ");
}
$ret = $table->build();
$objResponse = new xajaxResponse();
$objResponse->addAssign("navi", "innerHTML", $navi);
$objResponse->addAssign("list_data", "innerHTML", $ret);
return $objResponse;
}
示例2: xajaxResponse
function list_data($hal = 0) {
$_SESSION[hal] = $hal;
$objResponse = new xajaxResponse();
$paging = new MyPagina;
$paging->rows_on_page = 20;
$paging->sql = "SELECT
i.id as icid,
i.kode as kode,
i.nama as nama,
id.id as idid,
id.*
FROM
icopim i
LEFT JOIN icopim_detil id ON (id.tingkat = i.tingkat)
GROUP BY i.id, id.kelas
ORDER BY i.nama, id.kelas
";
$paging->hal = $hal;
$paging->get_page_result();
$data = $paging->data;
$no = $paging->start_number();
$navi = $paging->navi();
$tabel = new Table;
$tabel->tbody_height = 400;
$tabel->addTh(
"No",
"Kode",
"Tindakan",
"Tingkat",
"Kelas",
"Biaya",
"Hapus"
);
for($i=0;$i<sizeof($data);$i++) {
$tabel->addRow(
($no+$i),
$data[$i][kode],
$data[$i][nama],
$data[$i][tingkat],
$data[$i][kelas],
$data[$i][biaya],
"<a href=\"javascript:void(0)\" title=\"Hapus\" onclick=\"hapus_tindakan('".$data[$i][icid]."', '".$data[$i][idid]."', this)\" class=\"tombol_hapus\"><img src=\"".IMAGES_URL."remove.png\" alt=\"Hapus\" border=\"0\" /></a>");
$tabel->addOnclickTd(
"xajax_get_tindakan('".$data[$i][icid]."', '".$data[$i][tingkat]."', '".$data[$i][kelas]."')",
"xajax_get_tindakan('".$data[$i][icid]."', '".$data[$i][tingkat]."', '".$data[$i][kelas]."')",
"xajax_get_tindakan('".$data[$i][icid]."', '".$data[$i][tingkat]."', '".$data[$i][kelas]."')",
"xajax_get_tindakan('".$data[$i][icid]."', '".$data[$i][tingkat]."', '".$data[$i][kelas]."')",
"xajax_get_tindakan('".$data[$i][icid]."', '".$data[$i][tingkat]."', '".$data[$i][kelas]."')",
"xajax_get_tindakan('".$data[$i][icid]."', '".$data[$i][tingkat]."', '".$data[$i][kelas]."')"
);
}
$buka = $tabel->build();
$objResponse->addAssign("list_data", "innerHTML", $buka);
$objResponse->addAssign("navi", "innerHTML", $navi);
return $objResponse;
}
示例3: xajaxResponse
function list_kamar($hal = 0) {
$paging = new MyPagina;
$paging->sql = "select p.nama as bangsal,
k.id as kamar_id,
k.nama as nama_kamar,
rk.nomor as no_kamar,
rk.status as status
from kamar k, ref_kamar rk,
pelayanan p
where k.id = rk.kamar_id and k.pelayanan_id = p.id
and p.jenis = 'RAWAT INAP'
order by p.nama, k.kelas, k.nama";
$paging->rows_on_page = 15;
$paging->hal = $hal;
$_SESSION[modul_setting][no_kamar][hal] = $hal;
$paging->get_page_result();
$data = $paging->data;
$no = $paging->start_number();
$navi = $paging->navi();
$table = new Table;
$table->tbody_height = 350;
$table->addTh(
"No",
"Nama Bangsal",
"Nama Kamar",
"No Bed",
"Status",
"Hapus"
);
$table->addExtraTh("style=\"width:50px;\"","style=\"width:200px;\"","","","","","","style=\"width:70px;\"");
$kon = new Konek;
for($i=0;$i<sizeof($data);$i++) {
$table->addRow(
($no+$i),
$data[$i][bangsal],
$data[$i][nama_kamar],
$data[$i][no_kamar],
$data[$i][status],
"<a href=\"javascript:void(0)\" title=\"Hapus\" onclick=\"hapus_kamar('".$data[$i][id]."', this)\" class=\"tombol_hapus\"><img src=\"".IMAGES_URL."remove.png\" alt=\"Hapus\" border=\"0\" /></a>"
);
$table->addOnclickTd(
"xajax_get_info('".$data[$i][id]."')",
"xajax_get_info('".$data[$i][id]."')",
"xajax_get_info('".$data[$i][id]."')",
"xajax_get_info('".$data[$i][id]."')",
"xajax_get_info('".$data[$i][id]."')"
);
}
$buka = $table->build();
$objResponse = new xajaxResponse();
$objResponse->addAssign("navi", "innerHTML", $navi);
$objResponse->addAssign("list_kamar", "innerHTML", $buka);
return $objResponse;
}
示例4: xajaxResponse
function list_data_radio($hal = 0) {
$_SESSION[setting_radiologi_spesimen][hal] = $hal;
$objResponse = new xajaxResponse();
$paging = new MyPagina;
$paging->rows_on_page = 15;
$paging->sql = "
SELECT
rp.id as id,
rp.nama as nama,
rp.biaya_bhp as biaya_bhp,
rpd.biaya_jasa as biaya_jasa,
rpd.kelas as kelas
FROM
radio_pemeriksaan rp
JOIN radio_pemeriksaan_detil rpd ON (rpd.tingkat = rp.tingkat)
ORDER BY
rp.nama
";
$paging->hal = $hal;
$paging->get_page_result();
$data = $paging->data;
$no = $paging->start_number();
$navi = $paging->navi();
$table = new Table;
$table->tbody_height = 350;
$table->addTh(
"No",
"Nama",
"Biaya BHP",
"Biaya Jasa",
"Kelas",
"Hapus"
);
//$table->addExtraTh("style=\"width:50px;\"","style=\"width:200px;\"","","","");
//$kon = new Konek;
for($i=0;$i<sizeof($data);$i++) {
$table->addRow(
($no+$i),
$data[$i][nama],
$data[$i][biaya_bhp],
$data[$i][biaya_jasa],
$data[$i][kelas],
"<a href=\"javascript:void(0)\" title=\"Hapus\" onclick=\"hapus_kamar('".$data[$i][id]."', this)\" class=\"tombol_hapus\"><img src=\"".IMAGES_URL."remove.png\" alt=\"Hapus\" border=\"0\" /></a>"
);
$table->addOnclickTd(
"xajax_get_info('".$data[$i][id]."')",
"xajax_get_info('".$data[$i][id]."')",
"xajax_get_info('".$data[$i][id]."')",
"xajax_get_info('".$data[$i][id]."')",
"xajax_get_info('".$data[$i][id]."')"
);
}
$buka = $table->build();
$objResponse->addAssign("list_data_radio", "innerHTML", $buka);
$objResponse->addAssign("navi", "innerHTML", $navi);
return $objResponse;
}
示例5: xajaxResponse
function list_data($hal = 0) {
$_SESSION[hal] = $hal;
$objResponse = new xajaxResponse();
$paging = new MyPagina;
$paging->rows_on_page = 20;
$paging->sql = "
SELECT
d.id as id,
d.nama as nama,
spc.id as spc_id,
spc.nama as spc_nama,
sub.id as sub_id,
sub.nama as sub_nama,
d.telp as telp,
d.aktif as aktif,
CASE
WHEN (d.aktif = '1') THEN 'Ya'
ELSE 'Tidak'
END AS aktif_nama
FROM
dokter d
JOIN subspesialisasi sub ON (sub.id = d.subspesialisasi_id)
JOIN spesialisasi spc ON (spc.id = sub.spesialisasi_id)
ORDER BY
spc.nama, sub.nama, d.nama
";
$paging->hal = $hal;
$paging->get_page_result();
$_SESSION[modul_setting][dokter][hal] = $hal;
$data = $paging->data;
$no = $paging->start_number();
$navi = $paging->navi();
$tabel = new Table;
$tabel->tbody_height = 380;
$tabel->addTh("No", "Nama", "Spesialisasi/<br />Sub Spesialisasi", "Telp", "Aktif", "Hapus");
$tabel->addExtraTh(" style=\"width:50px;\"", "style=\"width:200px;\"", "", "", "", " style=\"width:70px;\" ");
for($i=0;$i<sizeof($data);$i++) {
$tabel->addRow(
($no+$i),
$data[$i][nama],
$data[$i][spc_nama] . "<br />" . $data[$i][sub_nama],
$data[$i][telp], $data[$i][aktif_nama],
"<a href=\"javascript:void(0)\" title=\"Hapus\" onclick=\"hapus_dokter('".$data[$i][id]."', this)\" class=\"tombol_hapus\"><img src=\"".IMAGES_URL."remove.png\" alt=\"Hapus\" border=\"0\" /></a>");
$tabel->addOnclickTd(
"xajax_get_dokter('".$data[$i][id]."')",
"xajax_get_dokter('".$data[$i][id]."')",
"xajax_get_dokter('".$data[$i][id]."')",
"xajax_get_dokter('".$data[$i][id]."')"
);
}
$buka = $tabel->build();
$objResponse->addAssign("list_data", "innerHTML", $buka);
$objResponse->addAssign("navi", "innerHTML", $navi);
return $objResponse;
}
示例6: xajaxResponse
function list_data($hal = 0, $prop_id = "", $kab_id = "") {
$_SESSION[setting_kecamatan][hal] = $hal;
//$all_id = @explode("|", $prop_kab_id);
if($prop_id) $s .= " AND p.id = '".$prop_id."'";
if($kab_id) $s .= " AND k.id = '".$kab_id."'";
$objResponse = new xajaxResponse();
$paging = new MyPagina;
$paging->rows_on_page = 20;
$paging->setOnclickValue($prop_id, $kab_id);
//$paging->onclick2_value = "'" . $prop_kab_id . "'";
$paging->sql = "
SELECT
kec.id AS id,
p.id AS prop_id,
p.nama AS prop,
k.id AS kab_id,
k.nama AS kab,
kec.nama AS nama,
COUNT(d.id) as jml_desa
FROM
ref_kecamatan kec
JOIN ref_kabupaten k ON (k.id = kec.kabupaten_id)
JOIN ref_propinsi p ON (p.id = k.propinsi_id)
LEFT JOIN ref_desa d ON (d.kecamatan_id = kec.id)
WHERE
1=1
$s
GROUP BY kec.id
ORDER BY p.nama, k.nama, kec.nama
";
$paging->hal = $hal;
$paging->get_page_result();
$data = $paging->data;
$no = $paging->start_number();
$navi = $paging->navi();
$tabel = new Table;
$tabel->tbody_height = 370;
$tabel->addTh("No", "Propinsi", "Kabupaten", "Kecamatan", "Jml<br />Kelurahan", "Hapus");
$tabel->addExtraTh(" style=\"width: 50px;\"", " style=\"width: 200px;\"", "", "", "style=\"width: 100px;\"", " style=\"width: 70px;\" ");
for($i=0;$i<sizeof($data);$i++) {
if($data[$i][prop_id] != $data[$i-1][prop_id]) $prop = $data[$i][prop];
else $prop = "";
if($data[$i][kab_id] != $data[$i-1][kab_id]) $kab = $data[$i][kab];
else $kab = "";
$tabel->addRow(($no+$i), $prop, $kab, $data[$i][nama], $data[$i][jml_desa], "<a href=\"javascript:void(0)\" title=\"Hapus\" onclick=\"hapus_kecamatan('".$data[$i][id]."', this)\" class=\"tombol_hapus\"><img src=\"".IMAGES_URL."remove.png\" alt=\"Hapus\" border=\"0\" /></a>");
$tabel->addOnclickTd("xajax_get_kecamatan('".$data[$i][id]."')","xajax_get_kecamatan('".$data[$i][id]."')", "xajax_get_kecamatan('".$data[$i][id]."')", "xajax_get_kecamatan('".$data[$i][id]."')");
}
$buka = $tabel->build();
$objResponse->addAssign("list_data", "innerHTML", $buka);
$objResponse->addAssign("navi", "innerHTML", $navi);
return $objResponse;
}
示例7: ON
function list_data($hal = 0) {
$paging = new MyPagina;
$paging->rows_on_page = 20;
$paging->sql = "SELECT
p.id as id,
p.nama as nama,
p.username as username,
pg.nama as `group`,
pel.nama as pelayanan
FROM
pengguna p
JOIN pengguna_group pg ON (pg.id = p.pengguna_group_id)
LEFT JOIN pelayanan pel ON (pel.id = p.pelayanan_id)
WHERE pg.id <> 1
ORDER BY
pg.nama,
p.nama";
$paging->get_page_result();
$paging->hal = $hal;
$_SESSION[hal] = $hal;
$paging->get_page_result();
$data = $paging->data;
$no = $paging->start_number();
$navi = $paging->navi();
$table = new Table;
$table->tbody_height = 300;
$table->addTh("No", "Nama", "Username", "Group", "Bangsal/<br />Klinik", "Hapus");
$table->addExtraTh(" style=\"width: 50px;\"", "", "", "", "", " style=\"width: 70px;\" ");
for($i=0;$i<sizeof($data);$i++) {
$table->addRow(
($no+$i),
$data[$i][nama],
$data[$i][username],
$data[$i][group],
$data[$i][pelayanan],
"<a href=\"javascript:void(0)\" title=\"Hapus\" onclick=\"hapus_pengguna('".$data[$i][id]."', this)\" class=\"tombol_hapus\"><img src=\"".IMAGES_URL."remove.png\" alt=\"Hapus\" border=\"0\" /></a>");
$table->addOnclickTd(
"xajax_get_pengguna('".$data[$i][id]."')",
"xajax_get_pengguna('".$data[$i][id]."')",
"xajax_get_pengguna('".$data[$i][id]."')",
"xajax_get_pengguna('".$data[$i][id]."')",
"xajax_get_pengguna('".$data[$i][id]."')"
);
}
$ret = $table->build();
$objResponse = new xajaxResponse();
$objResponse->addAssign("navi", "innerHTML", $navi);
$objResponse->addAssign("list_data", "innerHTML", $ret);
return $objResponse;
}
示例8: ON
function list_data($hal = 0) {
$paging = new MyPagina;
$paging->sql = "
SELECT
pel.id as id,
pel.jenis as jenis,
pel.nama as nama,
spc.nama as spec,
pel.hari_buka as hari_buka
FROM
pelayanan pel
JOIN spesialisasi spc ON (spc.id = pel.spesialisasi_id)
WHERE
pel.jenis IN ('RAWAT JALAN', 'RAWAT INAP')
ORDER BY pel.jenis, spc.nama";
$paging->rows_on_page = 20;
$paging->hal = $hal;
$paging->get_page_result();
$_SESSION[hal] = $hal;
$data = $paging->data;
$no = $paging->start_number();
$navi = $paging->navi();
$table = new Table;
$table->addTh("No", "Jenis<br />Pelayanan", "Spesialisasi", "Nama Poliklinik/<br />Bangsal", "Hari Buka<br />Seminggu", "Hapus");
$table->addExtraTh("style=\"width:50px;\"","","","","","style=\"width:70px;\"");
for($i=0;$i<sizeof($data);$i++) {
if($data[$i][jenis] == $data[$i-1][jenis])
$jenis = "";
else
$jenis = $data[$i][jenis];
$table->addRow(
($no+$i),
$jenis,
$data[$i][spec],
$data[$i][nama],
$data[$i][hari_buka],
"<input type=\"button\" value=\"[ x ]\" name=\"hapus\" class=\"inputan\" onclick=\"xajax_hapus_pelayanan_confirm('".$data[$i][id]."', '".addslashes($data[$i][nama])."')\" />"
);
$table->addOnclickTd(
"xajax_get_pelayanan('".$data[$i][id]."')",
"xajax_get_pelayanan('".$data[$i][id]."')",
"xajax_get_pelayanan('".$data[$i][id]."')",
"xajax_get_pelayanan('".$data[$i][id]."')",
"xajax_get_pelayanan('".$data[$i][id]."')"
);
}
$ret = $table->build();
$objResponse = new xajaxResponse();
$objResponse->addAssign("navi", "innerHTML", $navi);
$objResponse->addAssign("list_data", "innerHTML", $ret);
return $objResponse;
}
示例9: ON
function list_data($hal = 0) {
$paging = new MyPagina;
$paging->sql = "
SELECT
pel.id as id,
pel.nama as nama,
spc.nama as spec,
pel.hari_buka as hari_buka,
pel.tarif as tarif
FROM
pelayanan pel
JOIN spesialisasi spc ON (spc.id = pel.spesialisasi_id)
WHERE
pel.jenis ='RAWAT JALAN'
ORDER BY spc.nama";
$paging->rows_on_page = 20;
$paging->hal = $hal;
$paging->get_page_result();
$_SESSION[hal] = $hal;
$data = $paging->data;
$no = $paging->start_number();
$navi = $paging->navi();
$table = new Table;
$table->tbody_height = 390;
$table->addTh("No", "Nama Poliklinik", "Spesialisasi", "Hari Buka<br />Seminggu", "Tarif","Hapus");
$table->addExtraTh("style=\"width:50px;\"","","","","","style=\"width:70px;\"");
for($i=0;$i<sizeof($data);$i++) {
$table->addRow(
($no+$i),
$data[$i][nama],
$data[$i][spec],
$data[$i][hari_buka],$data[$i][tarif],
"<a href=\"javascript:void(0)\" title=\"Hapus\" onclick=\"hapus_pelayanan('".$data[$i][id]."', this)\" class=\"tombol_hapus\"><img src=\"".IMAGES_URL."remove.png\" alt=\"Hapus\" border=\"0\" /></a>"
);
$table->addOnclickTd(
"xajax_get_pelayanan('".$data[$i][id]."')",
"xajax_get_pelayanan('".$data[$i][id]."')",
"xajax_get_pelayanan('".$data[$i][id]."')",
"xajax_get_pelayanan('".$data[$i][id]."')",
"xajax_get_pelayanan('".$data[$i][id]."')"
);
}
$ret = $table->build();
$objResponse = new xajaxResponse();
$objResponse->addAssign("navi", "innerHTML", $navi);
$objResponse->addAssign("list_data", "innerHTML", $ret);
return $objResponse;
}
示例10: createContent
function createContent($data) {
$table = new Table;
$table->scroll = false;
$table->cellpadding = "2";
$table->cellspacing = "0";
$table->anime_bg_color = "";
$table->Th = $this->Th;
$table->extra_th = $this->extra_th;
$table->jml_kolom = sizeof($this->Th);
for($i=0;$i<sizeof($data);$i++) {
for($j=0;$j<sizeof($data[$i]);$j++) {
$table->Row[$i][$j] = $data[$i][$j];
}
}
$content = $table->build();
return $content;
}
示例11: xajaxResponse
function list_data($hal = 0) {
$_SESSION[setting_bhp][hal] = $hal;
$objResponse = new xajaxResponse();
$paging = new MyPagina;
$paging->rows_on_page = 20;
$paging->sql = "SELECT id, nama, biaya, bhp_p, bhp_rs, bhp_rs_adm, bhp_rs_op FROM bhp ORDER BY nama";
$paging->hal = $hal;
$paging->get_page_result();
$data = $paging->data;
$no = $paging->start_number();
$navi = $paging->navi();
$tabel = new Table;
$tabel->tbody_height = 430;
$tabel->addTh("No", "BHP", "Biaya", "bhp p", "bhp rs", "bhp rs adm", "bhp rs op", "Hapus");
//$tabel->addExtraTh("style=\"width: 50px;\"", "", " style=\"width: 70px;\"");
for($i=0;$i<sizeof($data);$i++) {
$tabel->addRow(
($no+$i),
$data[$i][nama],
$data[$i][biaya],
$data[$i][bhp_p],
$data[$i][bhp_rs],
$data[$i][bhp_rs_adm],
$data[$i][bhp_rs_op],
"<a href=\"javascript:void(0)\" title=\"Hapus\" onclick=\"hapus_bhp('".$data[$i][id]."', this)\" class=\"tombol_hapus\"><img src=\"".IMAGES_URL."remove.png\" alt=\"Hapus\" border=\"0\" /></a>");
$tabel->addOnclickTd(
"xajax_get_bhp('".$data[$i][id]."')",
"xajax_get_bhp('".$data[$i][id]."')",
"xajax_get_bhp('".$data[$i][id]."')",
"xajax_get_bhp('".$data[$i][id]."')",
"xajax_get_bhp('".$data[$i][id]."')",
"xajax_get_bhp('".$data[$i][id]."')",
"xajax_get_bhp('".$data[$i][id]."')"
);
}
$buka = $tabel->build();
$objResponse->addAssign("list_data", "innerHTML", $buka);
$objResponse->addAssign("navi", "innerHTML", $navi);
return $objResponse;
}
示例12: xajaxResponse
function list_data($hal = 0) {
$_SESSION[setting_karcis][hal] = $hal;
$objResponse = new xajaxResponse();
$paging = new MyPagina;
$paging->rows_on_page = 20;
$paging->sql = "SELECT * FROM karcis ORDER BY jenis, nama";
$paging->hal = $hal;
$paging->get_page_result();
$data = $paging->data;
$no = $paging->start_number();
$navi = $paging->navi();
$tabel = new Table;
$tabel->tbody_height = 430;
$tabel->addTh("No", "Nama", "Jenis", "Kelas", "Jasa", "Hapus");
//$tabel->addExtraTh("style=\"width: 50px;\"", "", " style=\"width: 70px;\"");
for($i=0;$i<sizeof($data);$i++) {
if($data[$i][jenis] == "IGD") $jenis = "IRD";
else $jenis = $data[$i][jenis];
$tabel->addRow(
($no+$i),
$data[$i][nama],
$jenis,
$data[$i][kelas],
$data[$i][biaya_jasa],
"<a href=\"javascript:void(0)\" title=\"Hapus\" onclick=\"hapus_karcis('".$data[$i][id]."', this)\" class=\"tombol_hapus\"><img src=\"".IMAGES_URL."remove.png\" alt=\"Hapus\" border=\"0\" /></a>");
$tabel->addOnclickTd(
"xajax_get_karcis('".$data[$i][id]."')",
"xajax_get_karcis('".$data[$i][id]."')",
"xajax_get_karcis('".$data[$i][id]."')",
"xajax_get_karcis('".$data[$i][id]."')",
"xajax_get_karcis('".$data[$i][id]."')"
);
}
$buka = $tabel->build();
$objResponse->addAssign("list_data", "innerHTML", $buka);
$objResponse->addAssign("navi", "innerHTML", $navi);
return $objResponse;
}
示例13: xajaxResponse
function list_data($hal = 0) {
$_SESSION[setting_propinsi][hal] = $hal;
$objResponse = new xajaxResponse();
$paging = new MyPagina;
$paging->rows_on_page = 20;
$paging->sql = "
SELECT
p.id AS id,
p.nama AS nama,
COUNT(k.id) AS jml_kab
FROM
ref_propinsi p
LEFT JOIN ref_kabupaten k ON (k.propinsi_id = p.id)
GROUP BY
p.id
ORDER BY
p.nama
";
$paging->hal = $hal;
$paging->get_page_result();
$data = $paging->data;
$no = $paging->start_number();
$navi = $paging->navi();
$tabel = new Table;
$tabel->tbody_height = 420;
$tabel->addTh("No", "Propinsi", "Jml<br />Kabupaten", "Hapus");
$tabel->addExtraTh(" style=\"width: 50px;\"", "", " style=\"width: 100px;\"", " style=\"width: 70px;\" ");
for($i=0;$i<sizeof($data);$i++) {
$tabel->addRow(($no+$i), $data[$i][nama], $data[$i][jml_kab], "<a href=\"javascript:void(0)\" title=\"Hapus\" onclick=\"hapus_propinsi('".$data[$i][id]."', this)\" class=\"tombol_hapus\"><img src=\"".IMAGES_URL."remove.png\" alt=\"Hapus\" border=\"0\" /></a>");
$tabel->addOnclickTd("xajax_get_propinsi('".$data[$i][id]."')", "xajax_get_propinsi('".$data[$i][id]."')", "xajax_get_propinsi('".$data[$i][id]."')");
}
$buka = $tabel->build();
$objResponse->addAssign("list_data", "innerHTML", $buka);
$objResponse->addAssign("navi", "innerHTML", $navi);
return $objResponse;
}
示例14: xajaxResponse
function list_data($hal = 0) {
$_SESSION[setting_imunisasi][hal] = $hal;
$objResponse = new xajaxResponse();
$paging = new MyPagina;
$paging->rows_on_page = 20;
$paging->sql = "
SELECT
id as id,
nama as nama,
sebab_sakit as sebab_sakit
FROM
imunisasi
ORDER BY
nama
";
$paging->hal = $hal;
$paging->get_page_result();
$data = $paging->data;
$no = $paging->start_number();
$navi = $paging->navi();
$tabel = new Table;
$tabel->tbody_height = 350;
$tabel->addTh("No", "Nama", "Sebab Sakit", "Hapus");
$tabel->addExtraTh(" style=\"width:50px;\"", "style=\"width:200px;\"", "", " style=\"width:70px;\"");
for($i=0;$i<sizeof($data);$i++) {
$tabel->addRow(($i+1), $data[$i][nama], $data[$i][sebab_sakit], "<a href=\"javascript:void(0)\" title=\"Hapus\" onclick=\"hapus_imunisasi('".$data[$i][id]."', this)\" class=\"tombol_hapus\"><img src=\"".IMAGES_URL."remove.png\" alt=\"Hapus\" border=\"0\" /></a>");
$tabel->addOnclickTd(
"xajax_get_imunisasi('".$data[$i][id]."')",
"xajax_get_imunisasi('".$data[$i][id]."')",
"xajax_get_imunisasi('".$data[$i][id]."')"
);
}
$buka = $tabel->build();
$objResponse->addAssign("list_data", "innerHTML", $buka);
$objResponse->addAssign("navi", "innerHTML", $navi);
return $objResponse;
}
示例15: SUBSTRING
function list_data($jenis = "BELUM", $limit = 5, $auto = "0", $tgl="") {
if($jenis == "BELUM") $s .= " AND trc.cetak = 'BELUM' ";
elseif($jenis == "SUDAH") $s .= " AND trc.cetak = 'SUDAH' ";
if($tgl) $s .= "AND DATE(trc.tgl_keluar) = '".$tgl."' ";
$kon = new Konek;
$sql = "
SELECT
k.id as id_kunjungan,
kk.id as id_kunjungan_kamar,
CONCAT_WS('-', SUBSTRING(p.id, 1,2), SUBSTRING(p.id, 3,2), SUBSTRING(p.id, 5,2), SUBSTRING(p.id, 7,2)) as no_rm,
p.id as pasien_id,
p.nama as nama,
kmr.nama as kamar,
kk.tgl_daftar as tgl_daftar,
kk.tgl_periksa as tgl_periksa,
d.nama as nama_dokter,
trc.cetak as tercetak
FROM
kunjungan k
JOIN pasien p ON (p.id = k.pasien_id)
JOIN kunjungan_kamar kk ON (kk.kunjungan_id = k.id)
JOIN tracer trc ON (trc.kunjungan_kamar_id = kk.id)
JOIN kamar kmr ON (kmr.id = kk.kamar_id)
LEFT JOIN dokter d ON (d.id = kk.dokter_id)
WHERE
trc.cetak IS NOT NULL
$s
ORDER BY
kk.id
";
$kon->sql = $sql;
$kon->execute();
$data = $kon->getAll();
$table = new Table;
$table->tbody_height = 340;
$table->addTh(
"No",
"No.<br />Kjg",
"No. RM",
"Pasien",
"Pelayanan",
"Dokter",
"Tgl<br />Daftar",
"Tgl<br />Periksa",
"Tracer<br />Tercetak",
"Cetak<br />Sendiri"
);
$table->addExtraTh("style=\"width:50px;\"","style=\"width:50px;\"","style=\"width:80px;\"","style=\"width:200px;\"","","","","","","style=\"width:50px;\"");
for($i=0;$i<sizeof($data);$i++) {
$table->addRow(
($i+1),
$data[$i][id_kunjungan],
$data[$i][no_rm],
$data[$i][nama],
$data[$i][kamar],
$data[$i][nama_dokter],
tanggalIndo($data[$i][tgl_daftar], 'j M Y'),
tanggalIndo($data[$i][tgl_periksa], 'j M Y'),
$data[$i][tercetak],
"<a href=\"javascript:void(0)\" title=\"Cetak ini saja\" style=\"display:block;\" onclick=\"cetak('".URL."filing/cetak_tracer_cetak/?kkid=".$data[$i][id_kunjungan_kamar]."',350,300)\"><img src=\"".IMAGES_URL."printer_hitam.png\" alt=\"Cetak\" border=\"0\" /></a>");
$table->addOnclickTd(
"xajax_list_semua_kunjungan('0', '".$data[$i][pasien_id]."')",
"xajax_list_semua_kunjungan('0', '".$data[$i][pasien_id]."')",
"xajax_list_semua_kunjungan('0', '".$data[$i][pasien_id]."')",
"xajax_list_semua_kunjungan('0', '".$data[$i][pasien_id]."')",
"xajax_list_semua_kunjungan('0', '".$data[$i][pasien_id]."')",
"xajax_list_semua_kunjungan('0', '".$data[$i][pasien_id]."')",
"xajax_list_semua_kunjungan('0', '".$data[$i][pasien_id]."')",
"xajax_list_semua_kunjungan('0', '".$data[$i][pasien_id]."')",
"xajax_list_semua_kunjungan('0', '".$data[$i][pasien_id]."')"
);
}
$ret = $table->build();
$objResponse = new xajaxResponse();
//$objResponse->addAssign("debug", "innerHTML", $auto);
$objResponse->addAssign("navi", "innerHTML", $navi);
$objResponse->addAssign("list_data", "innerHTML", $ret);
//jika ada pasien dan auto cetak dihidupkan, maka jalankan skrip membuka window cetak
if(!empty($data) && $auto == "1") {
$tgl = str_replace("-", "|", $tgl);
$objResponse->addScriptCall("cetak_tracer", URL . "filing/cetak_tracer_cetak/?jenis=" . $jenis . "&limit=" . $limit . "&tgl=" . $tgl, 350, 600);
}
return $objResponse;
}