public function shoes($name, $size) { $this->load->helper("string"); echo "This product {$name} size {$size}"; $uri = '<ol>'; $uri .= '<li>' . $this->uri->segment(1) . '</li>'; $uri .= '<li>' . $this->uri->segment(2) . '</li>'; $uri .= '<li>' . $this->uri->segment(3) . '</li>'; $uri .= '<li>' . $this->uri->segment(4) . '</li>'; $uri .= '<li>' . $this->uri->segment(5) . '</li>'; $uri .= '<li>' . $this->uri->segment(6, 'oye') . '</li>'; echo $uri; echo "Price : " . duit($this->harga(4000000)); }
case 'jenis': $sql->db_Select('meta', 'lid, value', 'where type=3 order by lid desc'); $jenis = array(); while ($data = $sql->db_Fetch()) { $res = array('id' => $data['lid'], 'value' => $data['value']); array_push($jenis, $res); } $parsing['item'] = $jenis; if (!empty($jenis)) { $parsing['stat'] = true; } echo json_encode($parsing); break; case 'total': $sql->db_Select('meta', 'value', 'where type = 2 limit 1'); $data = $sql->db_Fetch(); echo json_encode(array('stat' => true, 'total' => duit($data['value']))); break; } } function hapus_img($name_file) { $src = '../../../vendor/dist/file/'; $ret = false; if (is_file($src . $name_file) && is_file($src . 'syah_' . $name_file)) { if (unlink($src . $name_file) && unlink($src . 'syah_' . $name_file)) { $ret = true; } } return $ret; }
<td border="1 1 1 1" width="45" align="right" >' . duit($v['total']) . ' </td> </tr>'; } for ($i = count($ro); $i < 9; $i++) { $tbl .= '<tr> <td border="1 1 1 1" width="10"></td> <td border="1 1 1 1" width="20"></td> <td border="1 1 1 1" width="95"></td> <td border="1 1 1 1" width="25"></td> <td border="1 1 1 1" width="45"></td> </tr>'; } $tbl .= '<tr> <td colspan="3" style="italic" border="1 1 1 1">NB. BARANG YANG DIBELI TIDAK DAPAT DIKEMBALIKAN!!</td> <td bgcolor="#dddddd" style="bold" border="1 1 1 1" width="25">TOTAL</td> <td align="right" bgcolor="#dddddd" style="bold" border="1 1 1 1" width="45">' . duit($dt['total']) . ' </td> </tr>'; $tbl .= '<tr> <td colspan="2" style="italic" border="0"></td> <td border="0" align="center"> <br><br><br> Penerima <br><br><br><br><br> (..................) </td> <td colspan="2" align="center" border="0"> <br><br><br> Hormat Kami <br><br><br><br><br> ( ' . $dt['kasir'] . ') </td> </tr>'; $tbl .= '<tr>
array_push($item, $a); } if (!empty($jenis)) { $sql->db_Select('meta', 'value', 'where type = 1 or type = 2'); $total = array(); while ($data = $sql->db_Fetch()) { array_push($total, $data['value']); } $list['d_tot'] = "Rp" . duit($total[0]); $list['k_tot'] = "Rp" . duit($total[1]); $list['saldo'] = 'Rp.' . duit($total[0] - $k); } else { $list['saldo'] = 'Rp.' . duit($s); } $list['debit'] = 'Rp.' . duit($d); $list['kredit'] = 'Rp.' . duit($k); $list['item'] = $item; header('content-type: application/json'); echo json_encode($list); break; case 'img': $src = @mysql_real_escape_string($_GET['src']); $jenis = @mysql_real_escape_string($_GET['jenis']); $src = explode('-', $src); $m = $src[0]; $y = $src[1]; $filter = ' '; if (!empty($jenis)) { $filter = ' and jenis =' . $jenis . ' '; } $sql->db_Select('transaksi', 'memo, `name`', 'where type=2 and DATE_FORMAT(date, "%Y") = ' . $y . ' AND DATE_FORMAT(date, "%m") = ' . $m . $filter);
<?php /** * @package Dyn 5.0 * @version Dev : 5.0 * @author agus Diyansyah * @license http://creativecommons.org/licenses/by-nc/3.0/ CC BY-NC 3.0 * @copyright 2015 * @since File available since 5.0 * @category ajax.php */ include '../../../core/db_class.php'; include '../../function/duit.php'; include '../../function/tgl-indo.php'; if ($_GET) { switch (trim(strip_tags($_GET['ac']))) { case 'total': $sql->db_Select('meta m left join meta j on (j.type = 2)', 'm.value d, j.value k', 'where m.type = 1 limit 1'); $saldo = $sql->db_Fetch(); $sisa = $saldo['d'] - $saldo['k']; header('content-type: application/json'); echo json_encode(array('stat' => true, 'total' => duit($sisa))); break; } } /* End of file ajax.php */ /* Location: .//D/backup/WempServer/www/pesantren/module/engine/home/ajax.php */