JezK
Edit File: temp-invoice.php
<?php get_header(); $invoice = @$_GET['id']; $get_email = @$_GET['email']; $t = $oketheme['translate']; if ($invoice != '' && $get_email != '') { global $wpdb; $tb_booking = $wpdb->prefix . 'bookingan'; $data = $wpdb->get_row("SELECT * FROM $tb_booking WHERE invoice = '$invoice' AND email_cust = '$get_email'");?> <div id="headback"> <div class="titleheader"> <h1>INVOICE ID: <?php echo $invoice;?></h1> <?php if ($data) { ?> <a onclick="printDiv('areaprint');" title="Print"><button><i class="glyphicon glyphicon-print"></i> Print Invoice</button></a> <?php } ?> </div> </div> <div id="conwrap"> <?php if ($data) { $dp = $data->dp; $status = $data->status; $email_cust = $data->email_cust; $dp_ammount = $data->dp_ammount; $sdp_ammount= $data->sdp_ammount; $ammount = $data->ammount; $payment = explode("|",$data->payment); $pricetour = number_format(str_replace(".","",$data->hargatour)/str_replace(".","",$data->kurs),2);?> <div class="elementjudul" style="font-size:110%;padding:8px 15px"><i class="glyphicon glyphicon-tree-conifer"></i> <?=$t=='id'?'Detail Tour':'Tour Details';?></div> <div id="areaprint" class="toursent"> <div id="tourgoal"> <img width="140" height="90" src="<?=$data->imgtour; ?>" alt="<?=$data->judultour; ?>"> Invoice ID : <b><span class="t2"><?=$invoice;?></span></b> <h3><?=$data->judultour; ?></h3> <?php if($data->pil) {echo $data->pil;}?> <div style="clear: both"></div> <table width="100%"> <tr> <td class="tede1"><strong><?=$t=='id'?'Durasi':'Duration';?></strong></td> <td class="tede2"><?=$data->durasi;?></td> </tr> <tr> <td class="tede1"><strong><?=$t=='id'?'Berangkat':'Date of Trip';?></strong></td> <td class="tede2"><?=$data->datetour;?></td> </tr> <tr> <td class="tede1"><strong><?=$t=='id'?'Tamu':'Guest';?></strong></td> <td class="tede2"><?=$data->tamu;?> <?=$t=='id'?'orang':'person';?></td> </tr> <tr> <td class="tede1"><strong><?=$t=='id'?'Harga':'Price';?></strong></td> <td class="tede2"><?=$oketheme['currency'].' '.($oketheme['currency']=='Rp'?$data->hargatour:$pricetour);?> /<span class="vsmall"><?=$oketheme['t_pax'];?></span></td> </tr> </table> <div class="tedetotal"> <strong style="margin-right:10px">TOTAL</strong> <strong style="font-size:120%" class="t2"><?=$oketheme['currency'].' '.($oketheme['currency']=='Rp'?$data->hargatotal:$data->ammount);?></strong> </div> <div class="tedetotal" style="margin-top:15px;display:block;text-align:left"> <?php if ($data->dp_paydata || $data->paydata) { echo '<h4><i class="glyphicon glyphicon-list-alt"></i> '.($t=='id'?'Riwayat Pembayaran':'Payment History').'</h4><ul style="margin-bottom:20px">'; if ($data->dp_paydata) { $y = explode("|",$data->dp_paydata); echo '<li>'.$y[3].' <b class="tgreen">'.$oketheme['currency'].' '.($oketheme['currency']=='Rp'?$data->depe:$data->dp_ammount).'</b> '.$y[2].'<br>'.$y[1].'<br><span class="small">'.date('d M Y - H:i', strtotime($y[0])).'</span></li>'; } if ($data->paydata) { $y = explode("|",$data->paydata); if ($data->dp_paydata) { echo '<li>'.($t=='id'?'Pelunasan':'Redemption').' <b class="tgreen">'.$oketheme['currency'].' '.($oketheme['currency']=='Rp'?$data->sdepe:$data->sdp_ammount).'</b> '.$y[2].'<br>'.$y[1].'<br><span class="small">'.date('d M Y - H:i', strtotime($y[0])).'</span></li>'; } else { echo '<li>Full payment <b class="tgreen">'.$oketheme['currency'].' '.($oketheme['currency']=='Rp'?$data->hargatotal:$data->ammount).'</b> '.$y[2].'<br>'.$y[1].'<br><span class="small">'.date('d M Y - H:i', strtotime($y[0])).'</span></li>'; } } echo '</ul>'; }?> <?php // STATUS DP if ($data->dp != '100' && $data->status == 'dp' ) { ?> <strong style="margin-right:10px">Status </strong> <strong style="font-size:120%" class="t1">DP PAID</strong><br/> <strong style="margin-right:10px">DP <?php echo $data->dp;?>%</strong> <strong style="font-size:120%" class="t1"><?php echo $oketheme['currency'].' '.($oketheme['currency']=='Rp'?$data->depe:$data->dp_ammount);?></strong><br/> <?=$t=='id'?'Sisa pembayaran sebesar':'Remaining payment of';?> <strong class="t2"><?php echo $oketheme['currency'].' '.($oketheme['currency']=='Rp'?$data->sdepe:$data->sdp_ammount);?></strong> <p class="small" style="margin-bottom:0"><?php echo $oketheme['dp_info']?></p> <?php } // STATUS PAID else if ($data->status == 'paid' ){ ?> <strong style="margin-right:10px">Status </strong> <strong style="font-size:120%" class="t1">PAID</strong> <?php } // STATUS UNPAID else if ($data->status == 'unpaid' ) { ?> <?php if ($data->dp != '100' ) { ?> <strong style="margin-right:10px">Status </strong> <strong style="font-size:120%" class="t2">UNPAID</strong><br> <strong style="margin-right:10px">DP <?php echo $data->dp;?>%</strong> <strong style="font-size:120%" class="t2"><?php echo $oketheme['currency'].' '.($oketheme['currency']=='Rp'?$data->depe:$data->dp_ammount);?></strong><br/> <?=$t=='id'?'Pembayaran berikutnya sebesar':'The next payment is';?> <strong><?php echo $oketheme['currency'].' '.($oketheme['currency']=='Rp'?$data->sdepe:$data->sdp_ammount);?></strong> <p class="small" style="margin-bottom:0"><?php echo $oketheme['dp_info']?></p> <?php } else { ?> <strong style="margin-right:10px">Status </strong> <strong style="font-size:120%" class="t2">UNPAID</strong> <?php } ?> <?php }?> </div> </div> <div id="tourgoal2"> <h4><i class="glyphicon glyphicon-user"></i> <?=$t=='id'?'Pemesan':'Customer';?></h4> <table width="100%" style="margin-bottom: 30px"> <tr> <td class="tede1"><strong><?=$t=='id'?'Nama':'Name';?></strong></td> <td class="tede2"><?php echo $data->titel_cust;?> <b><?php echo $data->nama1_cust;?> <?php echo $data->nama2_cust;?></b></td> </tr> <tr> <td class="tede1"><strong><?=$t=='id'?'Telpon/HP':'Phone';?></strong></td> <td class="tede2"><?php echo $data->hp_cust;?></td> </tr> <tr> <td class="tede1"><strong>Email</strong></td> <td class="tede2"><?php echo $data->email_cust;?></td> </tr> </table> <?php if ($oketheme['guestlist']['yes'] && $data->guestlist) { ?> <h4><i class="glyphicon glyphicon-list-alt"></i> <?=$t=='id'?'Daftar Tamu':'Guest List';?></h4> <?php echo $data->guestlist;?> <?php } ?> <div style="clear: both"></div> <?php if ($data->pesan_cust) { ?> <h4><i class="glyphicon glyphicon-pushpin"></i> <?=$t=='id'?'Ket. Tambahan':'Additional Details';?></h4> <?php echo $data->pesan_cust; ?> <?php } ?> </div> <div style="clear: both"></div> </div> <?php if ($data->status != 'paid') { ?> <div class="elementjudul" style="font-size:110%;padding:8px 15px"><i class="glyphicon glyphicon-ok"></i> <?=$t=='id'?'Pembayaran':'Payment';?></div> <div class="tabdetail toursent" style="margin-top:0"> <!-- MUST BE PAY --> <?php if ($data->dp != '100' && $data->status == 'unpaid' ) { ?> <p style="margin-top:0;border-bottom:1px solid #f5f5f5;padding-bottom:10px"> <?=$t=='id'?'Yang harus dibayar':'Bills to pay';?>:<br><strong style="margin-right:10px">DP <?php echo $data->dp;?>%</strong> <strong style="font-size:120%" class="t2"><?php echo $oketheme['currency'].' '.($oketheme['currency']=='Rp'?$data->depe:$data->dp_ammount);?></strong> </p> <?php } else if ($data->status == 'dp') { ?> <p style="margin-top:0;border-bottom:1px solid #f5f5f5;padding-bottom:10px"> <?=$t=='id'?'Yang harus dibayar':'Bills to pay';?>:<br><strong style="margin-right:10px"><?=$t=='id'?'Pelunasan':'Redemption';?></strong> <strong style="font-size:120%" class="t2"><?php echo $oketheme['currency'].' '.($oketheme['currency']=='Rp'?$data->sdepe:$data->sdp_ammount);?></strong> </p> <?php } else { ?> <p style="margin-top:0;border-bottom:1px solid #f5f5f5;padding-bottom:10px"> <?=$t=='id'?'Yang harus dibayar':'Bills to pay';?>:<br><strong style="margin-right:10px">Full Payment</strong> <strong style="font-size:120%" class="t2"><?php echo $oketheme['currency'].' '.($oketheme['currency']=='Rp'?$data->hargatotal:$data->ammount);?></strong> </p> <?php } ?> <div id="tabs"> <ul> <?php if (@$oketheme['autopay_act']) {?> <li><a href="#tab1"><?=ucfirst($oketheme['autopay_act']);?></a></li> <?php } if (@$oketheme['paypal_act']) {?> <li><a href="#tab3">Paypal</a></li> <?php } ?> <li><a href="#tab2"><?=$t=='id'?'Transfer Bank':'Bank Transfer';?></a></li> </ul> <!-- OTOMATIS --> <?php if (@$oketheme['autopay_act']) {?> <div id="tab1" style="background:#FFF;padding:10px"> <?php if (@$oketheme['autopay_act'] == 'tripay') { include('functions/inc/tripay/tripay-pay.php'); } else { echo 'Payment gateway '.ucfirst($oketheme['autopay_act']).' is not available now!'; }?> </div> <?php } ?> <!-- TRANSFER MANUAL --> <div id="tab2" style="background:#FFF;padding:10px"> <?php if($t=='id') {?> <ul> <li> Silahkan transfer pembayaran ke nomor rekening kami di bawah ini:<br> <?php rekbank();?> </li> <li> Selanjutnya, lakukan konfirmasi pembayaran pada halaman <a href="<?php echo home_url(); ?>/konfirmasi" target="blank"><strong>konfirmasi</strong></a> berikut. <li> Booking dianggap batal apabila Anda tidak melakukan pembayaran. </li> </ul> <?php } else {?> <ul> <li> Please transfer payment to our account number below:<br> <?php rekbank();?> </li> <li> Next, confirm payment on the <a href="<?php echo home_url(); ?>/konfirmasi" target="blank"><b>confirmation</b></a> page. </li> <li>Booking is considered void if you do not make payment.</li> </ul> <?php }?> </div> <!-- PAYPAL --> <?php if (@$oketheme['paypal_act']) {?> <div id="tab3" style="background:#FFF;padding:10px"> <?php if($t=='id') {?> Klik tombol di bawah ini untuk melakukan pembayaran melalui Paypal:<br> <?php include('functions/inc/paypal/paypal-pay.php');?> <span class="small">*Opsi pembayaran menggunakan Kartu Debit atau Kredit tersedia di halaman PayPal setelah Anda mengklik tombol di atas.</span> <?php } else { ?> Click the button below to make a payment via PayPal:<br> <?php include('functions/inc/paypal/paypal-pay.php');?> <span class="small">*Payment options using Debit or Credit Card are available on the Paypal page after you click the above button.</span> <?php }?> </div> <?php } ?> </div> </div> <?php } } else { ?> <div class="wrap-post" style="text-align:center"> <?php if($t=='id') {?> <h2>Data yang Anda cari tidak ditemukan...</h2> <p>Pastikan <b>ID invoice</b> & <b>alamat email</b> yang Anda masukkan benar, silahkan diulangi.</p> <?php } else {?> <h2>The data you're looking for wasn't found...</h2> <p>Make sure the <b>invoice ID</b> & <b>email address</b> you entered are correct, please repeat.</p> <?php } ?> <form action="<?php echo home_url().'/invoice'; ?>" method="get" style="text-align:center" class="invsearch" > <input type="text" name="id" placeholder="Invoice ID" required> <input type="text" name="email" placeholder="Email Address" required> <button type="submit"><?=$t=='id'?'Cari':'Search';?></button> </form> </div> <?php } ?> <p align="center" style="margin-top:40px"> <?php if($t=='id') {?> Bila ada pertanyaan, silahkan hubungi <a href="#kontak" data-fancybox="kontak" class="pop">layanan pelanggan</a> kami. <?php } else { ?> If you need help, please <a href="#kontak" data-fancybox="kontak" class="pop">contact</a> us. <?php } ?> </p> </div> <?php } else { ?> <div id="headback"> <div class="titleheader"> <?php if ($t == 'id') { ?> <h1>Cek Booking</h1> <p>Gunakan form dibawah ini untuk melihat detail booking Anda.</p> <?php } else { ?> <h1>Booking Checker</h1> <p>Use form below to view your booking details.</p> <?php } ?> </div> </div> <div id="conwrap"> <div class="wrap-post" style="text-align:center"> <p> <?php if($t=='id') {?> Pastikan <b>ID invoice</b> & <b>alamat email</b> yang Anda masukkan benar, silahkan diulangi. <?php } else { ?> Make sure the <b>invoice ID</b> & <b>email address</b> you entered are correct, please repeat. <?php } ?> </p> <form action="<?php echo home_url().'/invoice'; ?>" method="get" style="text-align:center" class="invsearch" > <input type="text" name="id" placeholder="<?=$t=='id'?'ID Invoice':'Invoice ID';?>" required> <input type="text" name="email" placeholder="<?=$t=='id'?'Alamat Email':'Email Address';?>" required> <button type="submit" class="ibtn"><i class="glyphicon glyphicon-search"></i> <?=$t=='id'?'Cari':'Check';?></button> </form> </div> <p align="center" style="margin-top:40px"> <?php if($t=='id') {?> Bila ada pertanyaan, silahkan hubungi <a href="#kontak" data-fancybox="kontak" class="pop">layanan pelanggan</a> kami. <?php } else { ?> If you need help, please <a href="#kontak" data-fancybox="kontak" class="pop">contact</a> us. <?php } ?> </p> </div> <?php } get_footer(); ?>