本文整理汇总了PHP中makeElement函数的典型用法代码示例。如果您正苦于以下问题:PHP makeElement函数的具体用法?PHP makeElement怎么用?PHP makeElement使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了makeElement函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: gridElement
function gridElement($num, $data, $attr = array())
{
# Merge Attr
$newAttr = array('maxlength' => $this->_length, 'style' => 'margin:0;width:' . (string) ($this->_length * 6.5) . 'px');
$attr = array_merge($attr, $newAttr);
# Create Element
$el = makeElement($this->_id . "_" . $num, $this->_type, $data, $attr, $this->_refer);
return $el;
}
示例2: prep
function prep()
{
global $dbname;
##=== Prep
# Field
$primeStr = "";
$advanceStr = "";
foreach ($this->_primeEls as $els) {
switch ($els->_type) {
case 'bulantahun':
$primeStr .= "##" . $els->_id . "_bulan##" . $els->_id . "_tahun";
break;
default:
$primeStr .= "##" . $els->_id;
}
}
foreach ($this->_advanceEls as $els) {
switch ($els->_type) {
case 'bulantahun':
$advanceStr .= "##" . $els->_id . "_bulan##" . $els->_id . "_tahun";
break;
default:
$advanceStr .= "##" . $els->_id;
}
}
##=== Form
$fReport = "";
#$fReport .= "<div align='center'><h3>".$this->_name."</h3></div>";
$fReport .= "<fieldset><legend><b>" . $this->_name . "</b></legend>";
$fReport .= "<div id='" . $this->_id . "'><table align='left'>";
//$fReport .= "<tr><td>".$_SESSION['lang']['kebun']."</td><td>:</td><td><select id=kebun name=kebun>".$optKbn."</select></td></tr>";
foreach ($this->_primeEls as $els) {
$fReport .= "<tr><td>" . makeElement($els->_id, 'label', $els->_name) . "</td>";
$fReport .= "<td>:</td><td>" . $els->genEls() . "</td></tr>";
}
$fReport .= "<tr><td colspan='4' align='left'>" . makeElement('btnPreview', 'btn', 'Preview', array('onclick' => "formPrint('preview',0,'" . $primeStr . "','" . $advanceStr . "','" . $this->_page . "',event)"));
if (!$this->_noPdf) {
$fReport .= makeElement('btnPDF', 'btn', 'PDF', array('onclick' => "formPrint('pdf',0,'" . $primeStr . "','" . $advanceStr . "','" . $this->_page . "',event)"));
}
// $fReport .= makeElement('btnExcel','btn','Excel',
// array('onclick'=>"formPrint('excel',0,'".$primeStr."','".$advanceStr."','".$this->_page."',event)"));
if (!$this->_noExcel) {
$fReport .= makeElement('btnExcel', 'btn', 'Excel', array('onclick' => "formPrint('excel',0,'" . $primeStr . "','" . $advanceStr . "','" . $this->_page . "',event)"));
}
$fReport .= "</td></tr>";
$fReport .= "</table></div></fieldset>";
##=== Work Field
$fReport .= "<fieldset><legend><b>Preview</b></legend>";
$fReport .= "<div id='" . $this->_workField . "' style='overflow:auto;height:" . $this->_detailHeight . "%'></div></fieldset>";
return $fReport;
}
示例3: createTabDetail
function createTabDetail($id, $data)
{
$table .= "<table id='kontakDetailTable'>";
# Header
$table .= "<thead>";
$table .= "<tr>";
$table .= "<td style='width: 150px;'>" . $_SESSION['lang']['nama'] . "</td>";
$table .= "<td style='width: 150px;'>" . $_SESSION['lang']['telepon'] . "</td>";
$table .= "<td style='width: 150px;'>" . $_SESSION['lang']['email'] . "</td>";
$table .= "<td style='width: 50px; text-align:center;'>" . $_SESSION['lang']['action'] . "</td>";
$table .= "</tr>";
$table .= "</thead></table>";
# Data
$table .= "<div style='overflow:auto;max-height:200px'><table><tbody id='detailBody'>";
$i = 0;
#======= Display Data =======
if ($data != array()) {
foreach ($data as $key => $row) {
$table .= "<tr id='detail_tr_" . $key . "' class='rowcontent'>";
$table .= "<td style='width: 150px;'>" . $row['nama'] . "</td>";
$table .= "<td style='width: 150px;'>" . $row['telepon'] . "</td>";
$table .= "<td style='width: 150px;'>" . $row['email'] . "</td>";
$table .= "<td style='text-align:center;'><img id='detail_delete_" . $key . "' title='Hapus' class=resicon onclick=\"deleteKontakPerson('" . $row['idkontak'] . "')\" src='images/delete_32.png'/></td>";
$i = $key;
}
$i++;
}
#======= New Row ===========
$table .= "<tr id='detail_tr_" . $i . "' class='rowcontent'>";
$table .= "<td style='width: 150px;'>" . makeElement("nama_" . $i . "", 'txt', '', array('onkeypress' => 'return tanpa_kutip(event)')) . "</td>";
$table .= "<td style='width: 150px;'>" . makeElement("telepon_" . $i . "", 'txt', '', array('onkeypress' => 'return angka_doang(event)')) . "</td>";
$table .= "<td style='width: 150px;'>" . makeElement("email_" . $i . "", 'txt', '', array('onkeypress' => 'return tanpa_kutip(event)')) . "</td>";
# Add, Container Delete
$table .= "<td style='width: 50px; text-align:center'><img id='detail_add_" . $i . "' title='Tambah' class=resicon onclick=\"addKontakPerson('" . $i . "')\" src='images/plus.png'/>";
$table .= " <img id='detail_delete_" . $i . "' /></td>";
$table .= "</tr>";
$table .= "</tbody>";
$table .= "</table></div>";
echo $table;
}
示例4: prep
function prep()
{
##=== Prep
# Field
$primeStr = "";
$advanceStr = "";
foreach ($this->_primeEls as $els) {
$primeStr .= "##" . $els->_id;
}
foreach ($this->_advanceEls as $els) {
$advanceStr .= "##" . $els->_id;
}
##=== Form
$fReport = "<div align='center'><h3>" . $this->_name . "</h3></div>";
$fReport .= "<fieldset><legend>Filter</legend>";
$fReport .= "<div id='" . $this->_id . "'><table align='center'>";
foreach ($this->_primeEls as $els) {
$fReport .= "<tr><td>" . makeElement($els->_id . "_check", 'checkbox', 1, array('checked' => 'checked', 'onclick' => "toggleActive(this,'" . $els->_id . "')")) . "</td>";
$fReport .= "<td>" . makeElement($els->_id, 'label', $els->_name) . "</td>";
$fReport .= "<td>:</td><td>" . $els->genEls() . "</td></tr>";
}
$fReport .= "<tr><td colspan='4' align='center'>" . makeElement('btnPreview', 'btn', 'Preview', array('onclick' => "print('preview','" . $primeStr . "','" . $advanceStr . "','" . $this->_page . "')")) . "</td></tr>";
$fReport .= "</table></div></fieldset>";
##=== Print Format
$fReport .= "<fieldset><legend>Print Format</legend>";
$fReport .= "<div id='printFormat' align='center'>";
# PDF
$fReport .= "<img id='report_pdf' title='PDF' src='images/" . $_SESSION['theme'] . "/pdf.jpg' ";
$fReport .= "class='zImgPrint' onclick=\"print('pdf','" . $primeStr . "','" . $advanceStr . "','" . $this->_page . "')\"></img> ";
# Excel
$fReport .= "<img id='report_xls' title='Excel' src='images/" . $_SESSION['theme'] . "/excel.jpg' ";
$fReport .= "class='zImgPrint' onclick=\"print('excel','" . $primeStr . "','" . $advanceStr . "','" . $this->_page . "')\"></img>";
$fReport .= "</div></fieldset>";
##=== Work Field
$fReport .= "<fieldset><legend>Preview</legend>";
$fReport .= "<div id='workField'></div></fieldset>";
return $fReport;
}
示例5: prep
function prep()
{
$table = "";
$table .= "<table id='" . $this->_id . "' name='" . $this->_name . "' class='sortable'>";
# Header
$table .= "<thead><tr class='rowheader'>";
$table .= "<td>Status</td>";
foreach ($this->_header as $head) {
$table .= "<td>" . $head . "</td>";
}
$table .= "</tr></thead>";
# Content
$table .= "<tbody id='tbody_" . $this->_id . "'>";
foreach ($this->_data as $key => $row) {
$table .= "<tr id='tr_" . $this->_id . "_" . $key . "' class='rowcontent'>";
$table .= "<td><img id='status_" . $this->_id . "_" . $key . "' class='zImgOffBtn' ";
$table .= "src='images/" . $_SESSION['theme'] . "/posting.png'></td>";
foreach ($row as $head => $cont) {
$table .= "<td id='" . $this->_id . "_" . $head . "_" . $key . "' ";
$table .= "value='" . $cont . "'>" . $this->_dataShow[$key][$head];
$table .= "</td>";
}
$table .= "</tr>";
}
$table .= "</tbody>";
# Footer (Post Button)
$table .= "<tfoot><tr><td align='center' colspan='" . (count($this->_header) + 1) . "'>";
if (empty($this->_data)) {
$table .= makeElement('btnPosting_' . $this->_id, 'btn', $_SESSION['lang']['posting'], array('disabled' => "disabled"));
} else {
$table .= makeElement('btnPosting_' . $this->_id, 'btn', $_SESSION['lang']['posting'], array('onclick' => "post('" . $this->_id . "',0,'" . $this->_colsStr . "','" . $_SESSION['theme'] . "')"));
}
$table .= "</td></tr></tfoot>";
$table .= "</table>";
$fieldset = makeFieldset($this->_title, 'fs_' . $this->_id, $table);
return $fieldset;
}
示例6: makeOption
}
}
# Setting drop down options
$optTopografi = makeOption($dbname, 'setup_topografi', 'topografi,keterangan');
$optTipeAng = getEnum($dbname, 'setup_kegiatannorma', 'tipeanggaran');
#$optBarang = makeOption($dbname,'log_5masterbarang','kodebarang,namabarang');
$content = "";
foreach ($field as $row) {
if ($row == 'topografi') {
$content .= "<td>" . makeElement($row . "_" . $j, 'select', '', array('style' => 'width:100px'), $optTopografi) . "</td>";
} elseif ($row == 'tipeanggaran') {
$content .= "<td>" . makeElement($row . "_" . $j, 'select', '', array('style' => 'width:100px'), $optTipeAng) . "</td>";
} elseif ($row == 'kodebarang') {
$content .= "<td>" . makeElement($row . "_" . $j, 'text', '', array('style' => 'width:70px', 'readonly' => 'readonly')) . makeElement('getInvBtn_' . $j, 'btn', 'Cari', array('onclick' => 'getInv(event,\'' . $j . '\')')) . "</td>";
} elseif ($row == 'namabarang') {
$content .= "<td>" . makeElement($row . "_" . $j, 'txt', '', array('style' => 'width:120px', 'readonly' => 'readonly')) . "</td>";
} elseif ($row == 'kuantitas1') {
$content .= "<td>" . makeElement($row . "_" . $j, 'textnum', '0', array('style' => 'width:40px', 'onkeypress' => 'return tanpa_kutip(event)')) . " <span id='uom1_" . $j . "'></span></td>";
} elseif ($row == 'kuantitas2') {
$content .= "<td>" . makeElement($row . "_" . $j, 'textnum', '0', array('style' => 'width:40px', 'onkeypress' => 'return tanpa_kutip(event)')) . " <span id='uom2_" . $j . "'></span></td>";
} else {
$content .= "<td>" . makeElement($row . "_" . $j, 'textnum', '0', array('style' => 'width:40px', 'onkeypress' => 'return tanpa_kutip(event)')) . "</td>";
}
}
$content .= "<td><img id='addNorma_" . $j . "' title='Tambah' class=zImgBtn onclick=\"addNorma('" . $j . "','" . $primaryStr . "','" . $fieldStr . "')\" src='images/plus.png'/>";
$content .= " <img id='deleteNorma_" . $j . "' /></td>";
echo $content;
break;
default:
break;
}
示例7: array
$els[] = array(makeElement('noteleponrumah', 'label', $_SESSION['lang']['noteleponrumah']), makeElement('noteleponrumah', 'text', $data[0]['noteleponrumah'], array('style' => 'width:250px', 'maxlength' => '15', 'onkeypress' => 'return angka_doang(event)')));
$els[] = array(makeElement('nohp', 'label', $_SESSION['lang']['nohp']), makeElement('nohp', 'text', $data[0]['nohp'], array('style' => 'width:250px', 'maxlength' => '15', 'onkeypress' => 'return angka_doang(event)')));
$els[] = array(makeElement('norekeningbank', 'label', $_SESSION['lang']['norekeningbank']), makeElement('norekeningbank', 'text', $data[0]['norekeningbank'], array('style' => 'width:250px', 'maxlength' => '30', 'onkeypress' => 'return angka_doang(event)')));
$els[] = array(makeElement('namabank', 'label', $_SESSION['lang']['namabank']), makeElement('namabank', 'text', $data[0]['namabank'], array('style' => 'width:250px', 'maxlength' => '45', 'onkeypress' => 'return tanpa_kutip(event)')));
$els[] = array(makeElement('sistemgaji', 'label', $_SESSION['lang']['sistemgaji']), makeElement('sistemgaji', 'text', $data[0]['sistemgaji'], array('style' => 'width:250px', 'maxlength' => '3', 'onkeypress' => 'return angka_doang(event)')));
$els[] = array(makeElement('nopaspor', 'label', $_SESSION['lang']['nopaspor']), makeElement('nopaspor', 'text', $data[0]['nopaspor'], array('style' => 'width:250px', 'maxlength' => '30', 'onkeypress' => 'return tanpa_kutip(event)')));
$els[] = array(makeElement('noktp', 'label', $_SESSION['lang']['noktp']), makeElement('noktp', 'text', $data[0]['noktp'], array('style' => 'width:250px', 'maxlength' => '30', 'onkeypress' => 'return tanpa_kutip(event)')));
$els[] = array(makeElement('notelepondarurat', 'label', $_SESSION['lang']['notelepondarurat']), makeElement('notelepondarurat', 'text', $data[0]['notelepondarurat'], array('style' => 'width:250px', 'maxlength' => '15', 'onkeypress' => 'return angka_doang(event)')));
$els[] = array(makeElement('tanggalmasuk', 'label', $_SESSION['lang']['tanggalmasuk']), makeElement('tanggalmasuk', 'text', $data[0]['tanggalmasuk'], array('style' => 'width:250px', 'readonly' => 'readonly', 'onmousemove' => 'setCalendar(this.id)')));
$els[] = array(makeElement('tanggalkeluar', 'label', $_SESSION['lang']['tanggalkeluar']), makeElement('tanggalkeluar', 'text', $data[0]['tanggalkeluar'], array('style' => 'width:250px', 'maxlength' => 'maxlength', 'onmousemove' => 'setCalendar(this.id)')));
$els[] = array(makeElement('tipekaryawan', 'label', $_SESSION['lang']['tipekaryawan']), makeElement('tipekaryawan', 'text', $data[0]['tipekaryawan'], array('style' => 'width:250px', 'maxlength' => '3', 'onkeypress' => 'return angka_doang(event)')));
$els[] = array(makeElement('jumlahanak', 'label', $_SESSION['lang']['jumlahanak']), makeElement('jumlahanak', 'text', $data[0]['jumlahanak'], array('style' => 'width:250px', 'maxlength' => '10', 'onkeypress' => 'return angka_doang(event)')));
$els[] = array(makeElement('jumlahtanggungan', 'label', $_SESSION['lang']['jumlahtanggungan']), makeElement('jumlahtanggungan', 'text', $data[0]['jumlahtanggungan'], array('style' => 'width:250px', 'maxlength' => '10', 'onkeypress' => 'return angka_doang(event)')));
$els[] = array(makeElement('statuspajak', 'label', $_SESSION['lang']['statuspajak']), makeElement('statuspajak', 'text', $data[0]['statuspajak'], array('style' => 'width:250px', 'maxlength' => '4', 'onkeypress' => 'return tanpa_kutip(event)')));
$els[] = array(makeElement('npwp', 'label', $_SESSION['lang']['npwp']), makeElement('npwp', 'text', $data[0]['npwp'], array('style' => 'width:250px', 'maxlength' => '25', 'onkeypress' => 'return angka_doang(event)')));
$els[] = array(makeElement('lokasipenerimaan', 'label', $_SESSION['lang']['lokasipenerimaan']), makeElement('lokasipenerimaan', 'text', $data[0]['lokasipenerimaan'], array('style' => 'width:250px', 'maxlength' => '30', 'onkeypress' => 'return tanpa_kutip(event)')));
$els[] = array(makeElement('kodeorganisasi', 'label', $_SESSION['lang']['kodeorganisasi']), makeElement('kodeorganisasi', 'select', $data[0]['kodeorganisasi'], array('style' => 'width:250px'), $optOrg));
$els[] = array(makeElement('bagian', 'label', $_SESSION['lang']['bagian']), makeElement('bagian', 'text', $data[0]['bagian'], array('style' => 'width:250px', 'maxlength' => '8', 'onkeypress' => 'return tanpa_kutip(event)')));
$els[] = array(makeElement('kodejabatan', 'label', $_SESSION['lang']['kodejabatan']), makeElement('kodejabatan', 'select', $data[0]['kodejabatan'], array('style' => 'width:250px'), $optJab));
$els[] = array(makeElement('kodegolongan', 'label', $_SESSION['lang']['kodegolongan']), makeElement('kodegolongan', 'select', $data[0]['kodegolongan'], array('style' => 'width:250px'), $optGol));
$els[] = array(makeElement('lokasitugas', 'label', $_SESSION['lang']['lokasitugas']), makeElement('lokasitugas', 'text', $data[0]['lokasitugas'], array('style' => 'width:250px', 'maxlength' => '8', 'onkeypress' => 'return tanpa_kutip(event)')));
$frm[0] = "<div style='width:783px;height:345px;overflow:auto'>" . genElementMultiDim('Header Data Karyawan', $els, 2) . "</div>";
#=========== Draw Tab and Content ==================
# Karyawan id
if ($mode == 'edit') {
echo makeElement('karyawanid', 'hidden', $idK);
} else {
echo makeElement('karyawanid', 'hidden', '');
}
# Tab
drawTab('tabKary', $hfrm, $frm, 80, 775);
示例8: foreach
$j = $i + 1;
}
}
# New Row
foreach ($fieldNew as $row) {
if ($row == 'topografi') {
$content[$j][$row] = makeElement($row . "_" . $j, 'select', '', array('style' => 'width:100px'), $optTopografi);
} elseif ($row == 'tipeanggaran') {
$content[$j][$row] = makeElement($row . "_" . $j, 'select', '', array('style' => 'width:100px'), $optTipeAng);
} elseif ($row == 'kodebarang') {
$content[$j][$row] = makeElement($row . "_" . $j, 'text', '', array('style' => 'width:70px', 'readonly' => 'readonly')) . makeElement('getInvBtn_' . $j, 'btn', 'Cari', array('onclick' => 'getInv(event,\'' . $j . '\')'));
} elseif ($row == 'namabarang') {
$content[$j][$row] = makeElement($row . "_" . $j, 'txt', '', array('style' => 'width:120px', 'readonly' => 'readonly'));
} elseif ($row == 'kuantitas1') {
$content[$j][$row] = makeElement($row . "_" . $j, 'textnum', '0', array('style' => 'width:40px', 'onkeypress' => 'return angka_doang(event)')) . " <span id='uom1_" . $j . "'></span>";
} elseif ($row == 'kuantitas2') {
$content[$j][$row] = makeElement($row . "_" . $j, 'textnum', '0', array('style' => 'width:40px', 'onkeypress' => 'return angka_doang(event)')) . " <span id='uom2_" . $j . "'>" . $uom . "</span>";
} else {
$content[$j][$row] = makeElement($row . "_" . $j, 'textnum', '0', array('style' => 'width:40px', 'onkeypress' => 'return angka_doang(event)'));
}
}
$content[$j]['Z'] = "<img id='addNorma_" . $j . "' title='Tambah' class=zImgBtn onclick=\"addNorma('" . $j . "','" . $primaryStr . "','" . $fieldStr . "')\" src='images/plus.png'/>";
$content[$j]['Z'] .= " <img id='deleteNorma_" . $j . "' />";
#============= Generate Main Table =======================
$mainTable = makeTable('normaTable', 'normaBody', $header, $content, array(), true, 'detail_tr');
echo "<div id='mainTable' style='float:left;'>";
echo "<fieldset><legend><b>Norma</b></legend>";
echo "<div style='overflow:auto;width:770px;max-height:270px'>";
echo $primary;
echo $mainTable;
echo "</div></fieldset></div>";
示例9: array
include 'master_mainMenu.php';
?>
<script language=javascript src='js/zMaster.js'></script>
<script language=javascript src='js/zSearch.js'></script>
<script language=javascript src='js/zTools.js'></script>
<script language=javascript src='js/formTable.js'></script>
<script language=javascript src='js/log_konosemen.js'></script>
<link rel=stylesheet type=text/css href='style/zTable.css'>
<?php
#=== Prep Control & Search
$ctl = array();
# Control
$ctl[] = "<div align='center'><img class=delliconBig src=images/" . $_SESSION['theme'] . "/addbig.png title='" . $_SESSION['lang']['new'] . "' onclick=\"showAdd()\"><br><span align='center'>" . $_SESSION['lang']['new'] . "</span></div>";
$ctl[] = "<div align='center'><img class=delliconBig src=images/" . $_SESSION['theme'] . "/list.png title='" . $_SESSION['lang']['list'] . "' onclick=\"defaultList()\"><br><span align='center'>" . $_SESSION['lang']['list'] . "</span></div>";
# Search
$ctl[] = "<fieldset><legend><b>" . $_SESSION['lang']['find'] . "</b></legend>" . makeElement('sNoKonosemen', 'label', $_SESSION['lang']['nokonosemen']) . makeElement('sNoKonosemen', 'text', '') . makeElement('sFind', 'btn', $_SESSION['lang']['find'], array('onclick' => "searchTrans()")) . "</fieldset>";
#=== Table Aktivitas
# Header
$header = array($_SESSION['lang']['nokonosemen'], $_SESSION['lang']['nokonosemen'] . ' Expeditor', $_SESSION['lang']['pt'], $_SESSION['lang']['tanggal'], $_SESSION['lang']['tanggalberangkat'], $_SESSION['lang']['tanggaltiba'], 'postingterimaby');
//cari nama orang
$str = "select karyawanid, namakaryawan from " . $dbname . ".datakaryawan";
$res = mysql_query($str);
while ($bar = mysql_fetch_object($res)) {
$nama[$bar->karyawanid] = $bar->namakaryawan;
}
# Content
$cols = "nokonosemen,nokonosemenexp,kodept,tanggal,tanggalberangkat,tanggaltiba,postingby,posting,postingkirim";
$order = "nokonosemen desc";
$query = selectQuery($dbname, 'log_konosemenht', $cols, null, $order, false, 10, 1);
$data = fetchData($query);
$totalRow = getTotalRow($dbname, 'log_suratjalanht');
示例10: open_body
echo open_body();
include 'master_mainMenu.php';
OPEN_BOX();
?>
<script language=javascript src=js/zMaster.js></script>
<link rel=stylesheet type=text/css href=style/zTable.css>
<p align="left"><u><b><font face="Arial" size="5" color="#000080">Jenis Bibit</font></b></u></p>
<?php
#======Select Prep======
#======End Select Prep======
#=======Form============
echo "<div style='margin-bottom:30px'>";
$els = array();
# Fields
$els[] = array(makeElement('jenisbibit', 'label', $_SESSION['lang']['jenisbibit']), makeElement('jenisbibit', 'text', '', array('style' => 'width:100px', 'maxlength' => '30', 'onkeypress' => 'return tanpa_kutip(event)')));
# Fields
$fieldStr = '##jenisbibit';
$fieldArr = explode("##", substr($fieldStr, 2, strlen($fieldStr) - 2));
# Button
$els['btn'] = array(genFormBtn($fieldStr, 'setup_jenisbibit', "##jenisbibit"));
# Generate Field
echo genElement($els);
echo "</div>";
#=======End Form============
#=======Table===============
# Display Table
echo "<div style='height:200px;overflow:auto'>";
echo masterTable($dbname, 'setup_jenisbibit', "*", array(), array(), null, array(), null, 'jenisbibit');
echo "</div>";
#=======End Table============
示例11: makeElement
$table .= "<td id='t_nopo_" . $key . "' value='" . $row['nopo'] . "'>";
$table .= makeElement('el_nopo_' . $key, 'text', $row['nopo'], array('onkeyup' => "changeBg(getById('detRow_" . $key . "'),'#FF00FF')"));
$table .= "</td>";
} else {
$table .= "<td id='t_nopo_" . $key . "' value='" . $row['nopo'] . "'>" . $row['nopo'] . "</td>";
}
if ($row['jenis'] == 'M') {
$table .= "<td id='t_nopp_" . $key . "' value='" . $row['nopp'] . "'>";
$table .= makeElement('el_nopp_' . $key, 'text', $row['nopp'], array('onkeyup' => "changeBg(getById('detRow_" . $key . "'),'#FF00FF')"));
$table .= "</td>";
} else {
$table .= "<td id='t_nopp_" . $key . "' value='" . $row['nopp'] . "'>" . $row['nopp'] . "</td>";
}
$table .= "<td id='t_jumlah_" . $key . "' align=right>";
if ($row['jenis'] != 'PL') {
$table .= makeElement('el_jumlah_' . $key, 'textnum', $row['jumlah'], array('onkeyup' => "changeBg(getById('detRow_" . $key . "'),'#FF00FF')"));
} else {
$table .= $row['jumlah'];
}
$table .= "</td>";
$table .= "<td id='t_satuan_" . $key . "'>" . $row['satuanpo'] . "</td><td>";
if ($row['jenis'] != 'PL') {
$table .= "<img src='images/save.png' class=zImgBtn onclick='saveDetail(" . $key . ")' style='cursor:pointer'>";
}
$table .= "</td><td><img src='images/delete_32.png' class=zImgBtn onclick='deleteDetail(" . $key . ")' style='cursor:pointer'></td>";
$table .= "</tr>";
}
$table .= "</tbody>";
$table .= "</table></fieldset>";
echo $table;
break;
示例12: makeElement
$mnt .= "<option value=" . $y . " " . ($y == 00 ? 'selected' : '') . ">" . $y . "</option>";
$y++;
}
$table .= "<tr id='detail_tr' class='rowcontent'>";
//$table .= "<td>".makeElement("krywnId",'select','',
// array('style'=>'width:150px','onchange'=>'bersihFormDetail()'),$optKry)."</td>";
$table .= "<td><select id=krywnId name=krywnId onchange=bersihFormDetail() >" . $optKry . "</select></td>";
$table .= "<td>" . makeElement("shiftId", 'text', '', array('style' => 'width:120px', 'onkeypress' => 'return tanpa_kutip(event)')) . "</td>";
$table .= "<td><select id=premiPil name=premiPil ><option value=1>Yes</option><option value=0>No</option></select></td>";
$table .= "<td>" . makeElement("absniId", 'select', '', array('style' => 'width:100px'), $optAbsen) . "</td>";
$table .= "<td><select id=jmId name=jmId >" . $jm . "</select>:<select id=mntId name=mntId onchange=getPremiTetap()>" . $mnt . "</select></td>";
$table .= "<td><select id=jmId2 name=jmId2 >" . $jm . "</select>:<select id=mntId2 name=mntId2 onchange=getPremiTetap()>" . $mnt . "</select></td>";
$table .= "<td style='display:none'><select id=catu name=catu><option value=1>Yes</option><option value=0>No</option></select></td>";
$table .= "<td><input type=text id=dendakehadiran class=myinputtextnumber size=12 onkeypress=\"return angka_doang(event)\" value=0></td>";
$table .= "<td><input type=text id=premiInsentif class=myinputtextnumber size=12 onkeypress=\"return angka_doang(event)\" /></td>";
$table .= "<td>" . makeElement("ktrng", 'text', '', array('style' => 'width:150px', 'onkeypress' => 'return tanpa_kutip(event)')) . "</td>";
# Add, Container Delete
$table .= "<td><input type=hidden id=insentif /><input type=hidden id=premi /><img id='detail_add' title='Simpan' class=zImgBtn onclick=\"addDetail()\" src='images/save.png'/>";
$table .= " <img id='detail_delete' /></td>";
$table .= "</tr>";
$table .= "</tbody>";
$table .= "</table>";
echo $table;
break;
case 'loadDetail':
$sDt = "select * from " . $dbname . ".sdm_absensidt where kodeorg='" . $kdOrg . "' and tanggal='" . $tgAbsn . "'";
$qDt = mysql_query($sDt) or die(mysql_error());
while ($rDet = mysql_fetch_assoc($qDt)) {
$optTipeKar = makeOption($dbname, 'sdm_5tipekaryawan', 'id,tipe');
$sNm = "select namakaryawan,nik,tipekaryawan from " . $dbname . ".datakaryawan where karyawanid='" . $rDet['karyawanid'] . "'";
$qNm = mysql_query($sNm) or die(mysql_error());
示例13: makeOption
$optOrg = makeOption($dbname, 'organisasi', 'kodeorganisasi,namaorganisasi', $where, '0');
$optPt = "<option value=''>" . $_SESSION['lang']['pilihdata'] . "</option>";
$sOPt = "select distinct kodeorganisasi,namaorganisasi from " . $dbname . ".organisasi where " . $where . "";
$qOpt = mysql_query($sOPt) or die(mysql_error($conn));
while ($rOpt = mysql_fetch_assoc($qOpt)) {
$optPt .= "<option value=" . $rOpt['kodeorganisasi'] . ">" . $rOpt['namaorganisasi'] . "</option>";
}
#======End Select Prep======
#=======Form============
echo "<div style='margin-bottom:30px'>";
$els = array();
# Fields
$els[] = array(makeElement('kodeorg', 'label', $_SESSION['lang']['kodeorg']), makeElement('kodeorg', 'select', '', array('style' => 'width:150px'), $optOrg));
$els[] = array(makeElement('kodekelompok', 'label', $_SESSION['lang']['kodekelompok']), makeElement('kodekelompok', 'text', '', array('style' => 'width:100px', 'maxlength' => '5', 'onkeypress' => 'return tanpa_kutip(event)')));
$els[] = array(makeElement('keterangan', 'label', $_SESSION['lang']['keterangan']), makeElement('keterangan', 'text', '', array('style' => 'width:250px', 'maxlength' => '45', 'onkeypress' => 'return tanpa_kutip(event)')));
$els[] = array(makeElement('nokounter', 'label', $_SESSION['lang']['nokounter']), makeElement('nokounter', 'text', '0', array('style' => 'width:70px', 'maxlength' => '11', 'onkeypress' => 'return angka_doang(event)')));
# Fields
$fieldStr = '##kodeorg##kodekelompok##keterangan##nokounter';
$fieldArr = explode("##", substr($fieldStr, 2, strlen($fieldStr) - 2));
# Button
$els['btn'] = array(genFormBtn($fieldStr, 'keu_5kelompokjurnal', "##kodeorg##kodekelompok"));
# Generate Field
echo genElTitle($_SESSION['lang']['kodekelompok'] . " " . $_SESSION['lang']['jurnal'], $els);
echo "</div><br /><br /><br /><br /><br /><br /><br /><br />";
#=======End Form============
echo "\r\n<fieldset style=width=30px;float:left;>\r\n<legend style='font-weight:bold'>Reset Counter</legend>\r\n<table cellpading=1 border=0>\r\n<tr><td><select id=kodePt name=kodePt style='width:150px;'>" . $optPt . "</select><button class=mybutton onclick=\"resetJurnal()\">" . $_SESSION['lang']['save'] . "</button>\r\n</table>\r\n</fieldset><br /><br /><br /><br />";
#=======Table===============
# Display Table
echo "<div style='clear:both;float:left'>";
echo masterTable($dbname, 'keu_5kelompokjurnal');
echo "</div>";
示例14: makeElement
?>
</td>
</tr>
<tr>
<td><?php
echo $_SESSION['lang']['sumberbibit'];
?>
</td>
<td><?php
echo makeElement('sumber', 'select', '', array('style' => 'width:150px'), $optSumber);
?>
</td>
</tr>
<tr>
<td><?php
echo makeElement('btnPreview', 'btn', $_SESSION['lang']['preview'], array('onclick' => 'preview()'));
?>
</td>
</tr>
</table>
</fieldset>
<?php
CLOSE_BOX();
OPEN_BOX();
?>
<fieldset>
<legend><b><?php
echo $_SESSION['lang']['preview'];
?>
示例15: mysql_query
}
if (!empty($param['sYm'])) {
$sPo .= " and a.tanggal like '%" . $param['sYm'] . "%'";
}
$sPo .= " order by a.tanggal asc";
$qPo = mysql_query($sPo) or die(mysql_error($conn));
$key = $no = 0;
while ($rPo = mysql_fetch_assoc($qPo)) {
// Cek Track Pelunasan
$sBayar = "select distinct sum(jumlah) as jmlhKas from " . $dbname . ".keu_kasbankdt where keterangan1='" . $rPo['noinvoice'] . "'";
$resBayar = fetchData($sBayar);
$sisa = $rPo['nilaiinvoice'] - $resBayar[0]['jmlhKas'];
if ($sisa > 0) {
$no += 1;
$dat .= "<tr class='rowcontent'>";
$dat .= "<td>" . makeElement('inv_' . $key, 'checkbox', '', array('class' => 'inv-chk', 'invNo' => $rPo['noinvoice'], 'sisa' => $sisa)) . "</td>";
$dat .= "<td>" . $rPo['noinvoice'] . "</td>";
$dat .= "<td>" . $rPo['nokontrak'] . "</td>";
$dat .= "<td>" . $optNmsupp[$rPo['kodecustomer']] . "</td>";
$dat .= "<td>" . $rPo['namabarang'] . "</td>";
$dat .= "<td align=right>" . number_format($rPo['nilaiinvoice'], 2) . "</td>";
$dat .= "<td align=right>" . number_format($rPo['nilaippn'], 2) . "</td>";
$dat .= "<td align=right>" . number_format($resBayar[0]['jmlhKas'], 2) . "</td>";
$dat .= "<td align=right>" . number_format($sisa, 2) . "</td>";
$key++;
}
}
// while
setIt($rJmlh['jmlhKas'], 0);
setIt($rCek['jmlhinvoice'], 0);
$dat .= "</tbody></table></div></fieldset>";