function BuildForm($section, $button = false, $width = '100%', $idTable = '', $buttonCount = '2') { $zm = new zetro_manager(); $jml = $zm->Count($section, $this->path); $idTable !== '' ? $idt = $idTable : ($idt = 'fmrTable'); //echo "<form id='frm1' name='frm1' method='post' action=''> echo "<table id='" . $idt . "' width='{$width}'>\n"; // add baris kosong echo $this->brs; for ($i = 1; $i <= $jml; $i++) { $fld = explode(',', $zm->rContent($section, $i, $this->path)); echo "<tr id='{$i}'>\n\r\n\t\t\t\t <td id='c1{$i}' "; if ($fld[0] == '') { echo "class=''"; } else { echo "class='border_b'"; } echo " width='42%'> " . $fld[0] . "</td>\n\r\n\t\t\t\t <td id='c2{$i}' width='60%' >"; //if ($fld[1]!='') switch ($fld[1]) { case 'input': echo "<" . $fld[1] . " type='" . $fld[2] . "' id='" . $fld[3] . "' name='" . $fld[3] . "' value='" . $fld[5] . "' class='" . $fld[4] . "'></td>"; break; case 'select': echo "<" . $fld[1] . " id='" . $fld[3] . "' name='" . $fld[3] . "' class='" . $fld[4] . "'>"; if (count($fld) == 9) { if ($fld[7] == 'RS') { echo "<option></option>"; for ($x = 1; $x <= $zm->Count($fld[8], $this->path); $x++) { $data = explode(",", $zm->rContent($fld[8], $x, $this->path)); echo "<option value='" . $data[0] . "'>" . $data[1] . "</option>\n\r"; } } } echo "</select>"; break; case 'textarea': echo "<" . $fld[1] . " id='" . $fld[3] . "' name='" . $fld[3] . "' class='" . $fld[4] . "'></textarea>"; break; case 'button': //echo "<".$fld[1]." type='".$fld[2]."' id='".$fld[3]."' value='".$fld[5]."' class='".$fld[4]."'></td>"; break; } echo "\n<td id='c3{$i}' width='8%'> </td>\n</tr>"; } if ($button == false) { echo "</table></form>"; } else { if ($fld[1] == 'button') { $this->BuildFormButton($fld[5], $fld[4], $buttonCount); } } }
function table_created() { $sql = ''; $pri = 1; $zn = new zetro_manager(); $jml_field = $zn->Count($this->sec, $this->path); $sql = "CREATE TABLE IF NOT EXISTS `" . $this->name . "` (\n"; for ($i = 1; $i <= $jml_field; $i++) { $fld = explode(",", $zn->rContent($this->sec, $i, $this->path)); if ($fld[1] != 'N') { $sql .= "`" . $fld[2] . "` " . $fld[3] . ",\n"; } else { $sql = $sql; } } for ($z = 1; $z <= $jml_field; $z++) { $fld2 = explode(",", $zn->rContent($this->sec, $z, $this->path)); if ($fld2[1] == 'P') { $sql .= "PRIMARY KEY (" . $fld2[2] . ")\n"; $pri = 1; } else { $pri = 0; } } //($pri==0)?$sql2=substr($sql,0,(strlen($sql)-14)):$sql2=$sql; $sql .= " )\nCOLLATE='latin1_swedish_ci'\nENGINE=MyISAM;"; return mysql_query($sql) or die("<br>" . $sql . "<br/>" . mysql_error()); }
function ListBuilder($section, $total = false, $tp = 'list') { $n = 0; $zm = new zetro_manager(); $jml = $zm->Count($section, $this->path); $this->rs = mysql_query($this->sql, $this->con) or die(mysql_error()); while ($row = mysql_fetch_array($this->rs)) { $n++; echo "<tr align='center' class='xx'>\n\r\n\t\t\t\t<td id='c00' class='kotak'>No.</td>"; for ($i = 1; $i <= $jml; $i++) { $fld = explode(',', $zm->rContent($section, $i, $this->path)); echo "<td id='c{$i}{$n}' class='kotak'>" . $row[$fld[3]] . "</td>"; } echo $this->tp == 'list' ? "<td id='c" . ($jml + 1) . "' class='kotak'>" . $this->event($n) . "</td></tr>" : "</tr>"; } echo "</table>"; }
$a = new reportProduct(); $zn = new zetro_manager(); //$a->Header(); $a->setKriteria("transkip"); $a->setNama("LAPORAN STOCK OBAT"); $a->setFilter(array($nm_jenis, $nm_kategori, $nm_golongan)); $a->setReferer(array('Jenis Obat', 'Kategori Obat', 'Sub Kategori')); $a->setFilename('asset/bin/zetro_inv.frm'); $a->setSection("liststock_rpt"); $a->AliasNbPages(); $a->AddPage("P", "A4"); $a->SetFont('Arial', '', 10); // set lebar tiap kolom tabel transaksi // set align tiap kolom tabel transaksi $width = ''; $jml_record = $zn->Count($a->getSection(), $a->getFilename()); for ($i = 1; $i <= $jml_record; $i++) { $d = explode(',', $zn->rContent($a->getSection(), $i, $a->getFilename())); $width .= $d[9] . ","; } $a->SetWidths(array(10, 20, 20, 25, 55, 20, 15, 25)); $a->SetAligns(array("C", "L", "L", "L", "L", "R", "C", "R")); $a->SetFont('Arial', '', 9); //$rec = $temp_rec->result(); $n = 0; $harga = 0; foreach ($temp_rec->result_object() as $r) { $n++; $a->Row(array($n, $r->nm_jenis, $r->nm_kategori, $r->nm_golongan, $r->nm_barang, number_format($r->stock, 2), $r->nm_satuan, number_format($r->harga_beli, 2))); //sub tlot $harga = $harga + $r->harga_beli;
function tab_head($section = 'Menu Utama', $bg = '', $file = 'asset/bin/zetro_menu.dll') { $data = array(); $zn = new zetro_manager(); $jml = $zn->Count($section, $file); for ($i = 1; $i <= $jml; $i++) { $mnu = explode("|", $zn->rContent($section, $i, $file)); if (strtolower($mnu[2]) == 'y') { $data[] = $mnu[0]; } } echo "<table width='100%' style='border-collapse:collapse' border='0' bordercolor='#CCC' id='tab'>\n\r\n\t\t\t<tr height='35px' align='center'>\n"; foreach ($data as $menu) { echo "<td width='100px' style='padding:5px' class='tab_button' id='" . strtolower(str_replace(" ", '', $menu)) . "'>" . $menu . "</td>\n"; } echo "<td class='tab_kosong' id='kosong' {$bg}> </td></tr></table>\r\n\t\t<div id='v_panel' class='pn_contents tab_content' style='height:75%; overflow:auto'>\r\n\t\t"; }
function Header() { $zn = new zetro_manager(); $nfile = 'asset/bin/zetro_config.dll'; if ($this->kriteria == "transkip") { $co = $zn->rContent('InfoCo', 'subtitle', $nfile); $address = $zn->rContent('InfoCo', 'Address', $nfile); $kota = $zn->rContent('InfoCo', 'Kota', $nfile); $prop = $zn->rContent('InfoCo', 'Propinsi', $nfile); $telp = $zn->rContent('InfoCo', 'Telp', $nfile); $fax = $zn->rContent('InfoCo', 'Fax', $nfile); $BH = $zn->rContent('InfoCo', 'BH', $nfile); $this->Ln(2); //$this->Image(base_url().'asset/img/about.jpg',10,6,50,15); $this->Ln(2); //$this->SetFont('Arial','B',15); // $this->Cell(5); // $this->MultiCell(120,5,$co,0,1,'L'); //$this->Cell(5); $this->SetFont('Arial', 'B', 11); //$this->MultiCell(100,5,$BH,0,1,'C'); $this->SetFont('Arial', '', 10); //$this->Cell(3); $this->MultiCell(0, 6, "", 0, 1, 'C'); $this->SetFont('Arial', '', 10); //$this->Cell(5); $this->MultiCell(0, 6, $address . " " . $kota . " " . $prop, 0, 1, 'C'); $this->MultiCell(0, 4, $telp . " " . $fax, 0, 1, 'C'); $this->Ln(5); $this->SetFont('Arial', 'B', 10); $this->CurOrientation == 'P' ? $this->MultiCell(0, 4, str_repeat("_", 95), 0, 1, 'C') : $this->MultiCell(0, 4, str_repeat("_", 140), 0, 1, 'C'); $this->SetFont('Arial', 'B', 14); $this->Cell(0, 10, $this->nama, 2, 1, 'C'); $this->SetFont('Arial', 'B', 10); $this->Ln(2); // spasi enter $this->SetFont('Arial', 'B', 11); // set font,size,dan properti (B=Bold) $n = 0; foreach ($this->refer as $rr) { $this->Cell(40, 6, $rr, 0, 0, 'L'); $this->Cell(130, 6, ': ' . $this->filter[$n], 0, 1, 'L'); $n++; } $this->Ln(2); // set nama header tabel transaksi $this->SetFillColor(225, 225, 225); $kol = $zn->Count($this->section, $this->nfilex); $this->Cell(10, 8, 'No.', 1, 0, 'C', true); for ($i = 1; $i <= $kol; $i++) { $d = explode(',', $zn->rContent($this->section, $i, $this->nfilex)); $this->Cell($d[9], 8, $d[0], 1, 0, 'C', true); } $this->Ln(); } if ($this->kriteria == 'faktur') { $co = $zn->rContent('InfoCo', 'Name', $nfile); $address = $zn->rContent('InfoCo', 'Address', $nfile); $kota = $zn->rContent('InfoCo', 'Kota', $nfile); $telp = $zn->rContent('InfoCo', 'Telp', $nfile); $fax = $zn->rContent('InfoCo', 'Fax', $nfile); $npwp = $zn->rContent('InfoCo', 'NPWP', $nfile); $nppkp = $zn->rContent('InfoCo', 'NPPKP', $nfile); $this->SetFont('Arial', 'B', 14); $this->Cell(110, 4, $co, 0, 0, 'L'); $this->SetFont('Arial', '', 10); $this->Cell(120, 6, $this->nama, 0, 1, 'L'); $this->Cell(110, 6, $address . " " . $kota, 0, 0, 'L'); $this->Cell(120, 6, 'Customer :', 0, 1, 'L'); $this->Cell(110, 6, $telp . " " . $fax, 0, 0, 'L'); $this->SetFont('Arial', 'IB', 10); $this->Cell(120, 6, ' ' . $this->refer, 0, 1, 'L'); $this->SetFont('Arial', '', 10); $this->Cell(110, 6, $npwp, 0, 0, 'L'); $this->SetFont('Arial', 'IB', 10); $this->Cell(125, 6, ' ' . $this->filter, 0, 1, 'L'); $this->SetFont('Arial', '', 10); $this->Cell(110, 6, $nppkp, 0, 0, 'L'); $this->Cell(120, 6, 'NPWP :', 0, 1, 'L'); $this->Cell(110, 4, 'Nomor Seri faktur: ' . $this->nofaktur, 0, 0, 'L'); $this->Cell(120, 6, 'Tanggal : ' . $this->dataset, 0, 1, 'L'); $this->SetFont('Arial', 'B', 10); $this->SetLineWidth(0.4); $this->Line(10, 50, 197, 50); $this->Ln(); $this->SetLineWidth(0.2); $this->SetFont('Arial', 'B', 12); //header table // set nama header tabel transaksi $this->Ln(2); $this->SetFillColor(225, 225, 225); $kol = $zn->Count($this->section, $this->nfilex); $this->Cell(10, 8, 'No.', 1, 0, 'C', true); for ($i = 1; $i <= $kol; $i++) { $d = explode(',', $zn->rContent($this->section, $i, $this->nfilex)); $this->Cell($d[9], 8, $d[0], 1, 0, 'C', true); } $this->Ln(); } if ($this->kriteria == 'neraca') { $co = $zn->rContent('InfoCo', 'subtitle', $nfile); $address = $zn->rContent('InfoCo', 'Address', $nfile); $kota = $zn->rContent('InfoCo', 'Kota', $nfile); $prop = $zn->rContent('InfoCo', 'Propinsi', $nfile); $telp = $zn->rContent('InfoCo', 'Telp', $nfile); $fax = $zn->rContent('InfoCo', 'Fax', $nfile); $BH = $zn->rContent('InfoCo', 'BH', $nfile); $this->Ln(2); $this->Image(base_url() . 'asset/img/about.jpg', 10, 6, 50, 15); $this->Ln(2); //$this->SetFont('Arial','B',15); // $this->Cell(5); // $this->MultiCell(120,5,$co,0,1,'L'); //$this->Cell(5); $this->SetFont('Arial', 'B', 11); //$this->MultiCell(100,5,$BH,0,1,'C'); $this->SetFont('Arial', '', 10); //$this->Cell(3); $this->MultiCell(0, 6, "", 0, 1, 'C'); $this->SetFont('Arial', '', 10); //$this->Cell(5); $this->MultiCell(0, 6, $address . " " . $kota . " " . $prop, 0, 1, 'C'); $this->MultiCell(0, 4, $telp . " " . $fax, 0, 1, 'C'); $this->Ln(5); $this->SetFont('Arial', 'B', 10); $this->CurOrientation == 'P' ? $this->MultiCell(0, 4, str_repeat("_", 95), 0, 1, 'C') : $this->MultiCell(0, 4, str_repeat("_", 140), 0, 1, 'C'); $this->SetFont('Arial', 'B', 14); $this->Cell(0, 10, $this->nama, 2, 1, 'L'); $this->SetFont('Arial', 'B', 10); //$this->Ln(1); // spasi enter $this->SetFont('Arial', 'B', 11); // set font,size,dan properti (B=Bold) $n = 0; if (!empty($this->refer)) { foreach ($this->refer as $rr) { $this->Cell(30, 6, $rr, 0, 0, 'L'); $this->Cell(100, 6, ': ' . $this->filter[$n], 0, 1, 'L'); $n++; } } $this->Ln(1); $this->SetFont('Arial', 'B', 10); $this->CurOrientation == 'P' ? $this->MultiCell(0, 4, str_repeat("_", 95), 0, 1, 'C') : $this->MultiCell(0, 4, str_repeat("_", 140), 0, 1, 'C'); } }
?> </title> </head> <body> <div id="menu-atas"> <div class='logo'> <?php echo $zz->rContent("InfoCo", "Name", $z_config); ?> </div> <div class="menu"> <?php if ($this->session->userdata('login') == true) { echo "<div class='welcome judul sorot' style='padding:5px;display:none'>Selamat datang \r\n <span class='sorot'>" . $this->session->userdata('username') . "</span></div>"; } $jml = $zz->Count('Menu Utama', $file); for ($i = 1; $i <= $jml; $i++) { $rst = explode('|', $zz->rContent('Menu Utama', $i, $file)); $jml_sub = $zz->Count($rst[0], $file); if ($jml_sub == 0) { echo "<div class='sub-menu'><a href='" . base_url() . "index.php/" . $rst[1] . "'>" . $rst[0] . "</a></div>"; } else { echo $rst[1] != Null ? "<div id='parent_{$i}' class='sample_attach'><a href='" . base_url() . "index.php/" . $rst[1] . "'>" . $rst[0] . "</a></div>" : "<div id='parent_{$i}' class='sample_attach'>" . $rst[0] . "</div>"; } if ($jml_sub > 0) { echo "<div id='child_{$i}'>"; for ($z = 1; $z <= $jml_sub; $z++) { $rst1 = explode('|', $zz->rContent($rst[0], $z, $file)); echo "\r\n\t\t\t\t <a class='sample_attach' href='" . base_url() . "index.php/" . $rst1[1] . "'>" . $rst1[0] . "</a>"; } echo "</div>";
$menune = empty($menul) ? '' : base64_decode($menul); ?> <div id="menu-atas" style='z-index:9990'> <div class='logo' style=" vertical-align:middle"> <?php echo empty($menul) ? $zz->rContent("InfoCo", "Name", $z_config) : 'Modul ' . base64_decode($menul); ?> </div><?php echo "<b><strong>" . $verses . "</strong></b>"; ?> <div class="menu"> <?php if ($this->session->userdata('login') == true) { echo "<div class='welcome judul sorot' style='padding:5px;display:none'>User Login \r\n \t\t<span class='sorot'>" . $this->session->userdata('username') . "</span></div>\n"; } $jml = $zz->Count($menune, $file); for ($i = 1; $i <= $jml; $i++) { $rst = explode('|', $zz->rContent($menune, $i, $file)); $jml_sub = $zz->Count($rst[0], $file); if ($jml_sub == 0) { echo "<div class='sub-menu'><a href='" . base_url() . "index.php/" . $rst[1] . "'>" . $rst[0] . "</a></div>\n"; } else { echo $rst[1] != Null ? "<div id='parent_{$i}' class='sample_attach'><a href='" . base_url() . "index.php/" . $rst[1] . "'>" . $rst[0] . "</a></div>\n" : "<div id='parent_{$i}' class='sample_attach'>" . $rst[0] . "</div>\n"; } if ($jml_sub > 0) { echo "<div id='child_{$i}'>\n"; for ($z = 1; $z <= $jml_sub; $z++) { $rst1 = explode('|', $zz->rContent($rst[0], $z, $file)); echo $rst1[1] == 'x' ? "<a class='sample_attach2' href='#'>" . $rst1[0] . "</a>\n" : "<a class='sample_attach' href='" . base_url() . "index.php/" . $rst1[1] . "'>" . $rst1[0] . "</a>\n"; } echo "</div>\n";
?> <table width="100%" border='0'> <tr><td colspan="" align="center"><img src='<?php echo base_url(); ?> asset/img/PoS.png' /></td><td> </td></td></tr> <tr valign="bottom" align="" style="padding:20px"> <td width='40%' align="center" valign="middle"><img src='<?php echo base_url(); ?> asset/img/about2.png' /></td> <td width='60%' valign="top"> <table width='70%' border="0" id='x'> <tr align="center" valign="middle"> <?php $mnu = $zz->Count('Menu Utama', $file); $x = 0; $klik = ''; $ver = $this->session->userdata('version'); for ($i = 1; $i <= $mnu; $i++) { $gbr = explode('|', $zz->rContent('Menu Utama', $i, $file)); if ($gbr[3] != '') { $x++; $klik = encode_php($ver) >= '100' ? '' : "onclick=\"kliked('" . base64_encode($gbr[4]) . "');\""; if ($x > 1) { echo tr('') . td("<img src='" . base_url() . "asset/img/" . $gbr[3] . "' class='menux' {$klik}>", 'left', ' \' height=\'69px\' valign=\'middle') . _tr(); } else { echo td("<img src='" . base_url() . "asset/img/" . $gbr[3] . "' class='menux' {$klik}>", 'left', ' \' height=\'69px\' valign=\'middle'); } } else { echo '';
echo $zz->rContent("WebPage", "Title", $z_config) . "-" . $zz->rContent("WebPage", "subtitle", $z_config); ?> </title> </head></head> <body> <div id="menu-atas"> <div class='logo'> <img src='<?php echo base_url(); ?> application/views/admin/images/logo.png' /></div> <div class="menu"> <?php if ($this->session->userdata('login') == true) { echo "<div class='welcome judul'><img src='" . base_url() . "asset/images/icon/document.png'> <span class='sorot'>REPORTS</span></div>"; $jml = $zz->Count('Laporan', $file); for ($i = 1; $i <= $jml; $i++) { $rst = explode('|', $zz->rContent('Laporan', $i, $file)); $jml_sub = $zz->Count($rst[0], $file); if ($jml_sub == 0) { echo "<div class='sub-menu'><a href='" . base_url() . "index.php/" . $rst[1] . "'>" . $rst[0] . "</a></div>"; } else { echo "<div id='parent_{$i}' class='sample_attach'>" . $rst[0] . "</div>"; } if ($jml_sub > 0) { echo "<div id='child_{$i}'>"; for ($z = 1; $z <= $jml_sub; $z++) { $rst1 = explode('|', $zz->rContent($rst[0], $z, $file)); echo "\r\n\t\t\t\t <a class='sample_attach' href='" . base_url() . "index.php/" . $rst1[1] . "'>" . $rst1[0] . "</a>"; } echo "</div>";
echo $zz->rContent("WebPage", "Title", $z_config) . "-" . $zz->rContent("WebPage", "subtitle", $z_config); ?> </title> </head></head> <body> <div id="menu-atas"> <div class='logo'> <img src='<?php echo base_url(); ?> application/views/admin/images/logo.png' /></div> <div class="menu"> <?php if ($this->session->userdata('login') == true) { echo "<div class='welcome judul'><img src='" . base_url() . "asset/images/icon/settings.png'> <span class='sorot'> MASTER DATA</span></div>"; $jml = $zz->Count('Master', $file); for ($i = 1; $i <= $jml; $i++) { $rst = explode('|', $zz->rContent('Master', $i, $file)); $jml_sub = $zz->Count($rst[0], $file); if ($jml_sub == 0) { echo "<div class='sub-menu'><a href='" . base_url() . "index.php/" . $rst[1] . "'>" . $rst[0] . "</a></div>"; } else { echo "<div id='parent_{$i}' class='sample_attach'>" . $rst[0] . "</div>"; } if ($jml_sub > 0) { echo "<div id='child_{$i}'>"; for ($z = 1; $z <= $jml_sub; $z++) { $rst1 = explode('|', $zz->rContent($rst[0], $z, $file)); echo "\r\n\t\t\t\t <a class='sample_attach' href='" . base_url() . "index.php/" . $rst1[1] . "'>" . $rst1[0] . "</a>"; } echo "</div>";
?> </title> </head></head> <body> <div id="menu-atas"> <div class='logo'> <img src='<?php echo base_url(); ?> application/views/admin/images/logo.png' /></div> <div class="menu"> <?php if ($this->session->userdata('login') == true) { echo "<div class='welcome judul sorot' style='padding:5px;'><img src='" . base_url() . "asset/images/icon/user.png'> SDM MANAGER</div>"; //------tampilkan menu terplilih-------------- $jml = $zz->Count('SDM', $file); for ($i = 1; $i <= $jml; $i++) { $rst = explode('|', $zz->rContent('SDM', $i, $file)); $jml_sub = $zz->Count($rst[0], $file); if ($jml_sub == 0) { echo "<div class='sub-menu'><a href='" . base_url() . "index.php/" . $rst[1] . "'>" . $rst[0] . "</a></div>"; } else { echo "<div id='parent_{$i}' class='sample_attach'>" . $rst[0] . "</div>"; } if ($jml_sub > 0) { echo "<div id='child_{$i}'>"; for ($z = 1; $z <= $jml_sub; $z++) { $rst1 = explode('|', $zz->rContent($rst[0], $z, $file)); echo "\r\n\t\t\t\t\t <a class='sample_attach' href='" . base_url() . "index.php/" . $rst1[1] . "'>" . $rst1[0] . "</a>"; } echo "</div>";
<tr id='d1' class='isi'> <td class='judul' colspan="9"> <img src='<?php echo base_url(); ?> asset/images/arrows/down.png' id='d1' style='display:'> <img src='<?php echo base_url(); ?> asset/images/arrows/right.png' id='d1' style='display:none'><?php echo nbs(2); ?> Control Menu</td> </tr> <?php $jml = $zz->Count('Menu', $file); //main-menu for ($i = 1; $i <= $jml; $i++) { $jml_sub = 0; $xx = explode('|', $zz->rContent('Menu', $i, $file)); $jml_sub = $zz->Count($xx[0], $file); $jml_sub == 0 ? $cs = 'colspan="3"' : ($cs = 'colspan="3"'); ?> <tr id='cd1' class='<?php echo $xx[0]; ?> isi' style='display:none'> <td width="20px" align="right"><img src='<?php echo base_url(); ?> asset/images/3.png'></td>