Server IP : 2a02:4780:3:1493:0:3736:a38e:7 / Your IP : 216.73.216.139 Web Server : LiteSpeed System : Linux sg-nme-web1393.main-hosting.eu 4.18.0-553.40.1.lve.el8.x86_64 #1 SMP Wed Feb 12 18:54:57 UTC 2025 x86_64 User : u926327694 ( 926327694) PHP Version : 7.4.33 Disable Function : system, exec, shell_exec, passthru, mysql_list_dbs, ini_alter, dl, symlink, link, chgrp, leak, popen, apache_child_terminate, virtual, mb_send_mail MySQL : OFF | cURL : ON | WGET : ON | Perl : OFF | Python : OFF Directory (0755) : /home/u926327694/domains/smsoft.in/public_html/demo/accounts/ |
[ Home ] | [ C0mmand ] | [ Upload File ] |
---|
<?php include"../config/dbconnect.php"; $SchoolCode=$_SESSION['code']; $sel_School=mysqli_query($con,"select schoolname from schools where schoolCode='$SchoolCode'"); $SchoolName=""; while($res_school=mysqli_fetch_array($sel_School)) { $SchoolName=$res_school['schoolname']; } mysqli_close($con); // First we execute our common code to connection to the database and start the session // require("../common.php"); session_start(); // At the top of the page we check to see whether the user is logged in or not if(!isset($_SESSION['user']) && !isset($_SESSION['Mng_User'])) { // If they are not, we redirect them to the login page. header("Location: ../index.php"); // Remember that this die statement is absolutely critical. Without it, // people can view your members-only content without logging in. die("Redirecting to ../index.php"); } // Everything below this point in the file is secured by the login system // We can display the user's username to them by reading it from the session array. Remember that because // a username is user submitted content we must use htmlentities on it before displaying it to the user. ?> <?php include "config/config.php"; $NumberOfVochers_res=mysqli_query($con,"SELECT cOUNT(`V_Id`) FROM `vochers`"); $NumberOfVochers=mysqli_fetch_array($NumberOfVochers_res); $NumberOfRecipts_res=mysqli_query($con,"SELECT COUNT(`V_Id`) FROM `vochers` where `Type` = 'Recipt'"); $NumberOfRecipts=mysqli_fetch_array($NumberOfRecipts_res); $NumberOfPayments_res=mysqli_query($con,"SELECT COUNT(`V_Id`) FROM `vochers` where `Type` = 'Payment'"); $NumberOfPayments=mysqli_fetch_array($NumberOfPayments_res); $NumberOfLedgers_res=mysqli_query($con,"SELECT COUNT(*) FROM `ledger`"); $NumberOfLedgers=mysqli_fetch_array($NumberOfLedgers_res); $NumberOfCashinHand_res=""; ?> <!DOCTYPE html> <html lang="en"> <?php include "html-head.php"; ?> <body> <!-- Navigation --> <nav class="navbar navbar-default navbar-static-top" role="navigation" style="margin-bottom: 0"> <div class="navbar-header"> <button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-collapse"> <span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button> <h4 style="padding: 21px;color: Red" href="#"><b><?php include "Name.txt"; ?></b> <span>- <?php echo $SchoolName; ?></span></h4> </div> <!-- /.navbar-header --> <!-- /.navbar-top-links --> <?php include "header.php"; ?> <!-- /.navbar-static-side --> </nav> <div id="wrapper"> <div id="page-wrapper"> <br> <div class="tab-content"> <div class="tab-pane fade in active"> <div class="row"> <div class="col-lg-12"> <div class="panel panel-default"> <div class="panel-body"> <!-- Form Content Start --> <div class="col-lg-4 col-md-4"> <div class="panel panel-primary"> <div class="panel-heading"> <div class="row"> <div class="col-xs-3"> <i class="fa fa-home fa-5x"></i> </div> <div class="col-xs-9 text-right"> <div><h3><?php echo "$NumberOfVochers[0]"; ?></h3></div> </div> </div> </div> <div class="panel-footer"> <span class="pull-left">Number of Vochers</span> <div class="clearfix"></div> </div> </a> </div> </div> <div class="col-lg-4 col-md-4"> <div class="panel panel-primary"> <div class="panel-heading"> <div class="row"> <div class="col-xs-3"> <i class="fa fa-home fa-5x"></i> </div> <div class="col-xs-9 text-right"> <div><h3><?php echo "$NumberOfLedgers[0]"; ?></h3></div> </div> </div> </div> <div class="panel-footer"> <span class="pull-left">Number of Ledgers</span> <div class="clearfix"></div> </div> </a> </div> </div> <div class="col-lg-4 col-md-4"> <div class="panel panel-primary"> <div class="panel-heading"> <div class="row"> <div class="col-xs-3"> <i class="fa fa-home fa-5x"></i> </div> <div class="col-xs-9 text-right"> <div><h3><?php echo "$NumberOfRecipts[0]"." and ".$NumberOfPayments[0]; ?></h3></div> </div> </div> </div> <div class="panel-footer"> <span class="pull-left">Recipts and Payments</span> <div class="clearfix"></div> </div> </a> </div> </div> <div class="col-lg-4 col-md-4"> <div class="panel panel-primary"> <div class="panel-heading"> <div class="row"> <div class="col-xs-3"> <i class="fa fa-home fa-5x"></i> </div> <div class="col-xs-9 text-right"> <?php /*<div><h3><?php echo "Rs."; include "CashinHandCalculation.php"; ?></h3></div> */ ?> <div><h3> <?php echo "Rs."; $cr_query = mysqli_query($con,"select SUM(Cr_Amount) as total_cr from vochers WHERE `Type` = 'Recipt'"); $cr_result = mysqli_fetch_array($cr_query); $total_cr_amt = $cr_result['total_cr']; $dr_query = mysqli_query($con,"select SUM(Dr_Amount) as total_dr from vochers WHERE `Type` = 'Payment'"); $dr_result = mysqli_fetch_array($dr_query); $total_dr_amt = $dr_result['total_dr']; echo number_format($total_cr_amt-$total_dr_amt,2); ?> </h3></div> </div> </div> </div> <div class="panel-footer"> <span class="pull-left">Cash in Hand</span> <div class="clearfix"></div> </div> </a> </div> </div> <!-- Form Content Start --> </div> </div> <!-- /.panel-body --> <table width="100%" class="table table-striped table-bordered table-hover" id="example"> <thead><tr> <th>Particular</th> <th>Debit</th> <th>Credit</th> <th>Closing Balance</th> </tr></thead><tbody> <?php $ledger_list_res=mysqli_query($con,"SELECT * FROM `ledger` WHERE `Type` = 'Current Assets' ORDER BY `Name` ASC"); while($ledger_list=mysqli_fetch_array($ledger_list_res)) { if($ledger_list[Name]!="") { ?> <tr> <?php $Present_Payment_res=mysqli_query($con,"SELECT SUM(`Cr_Amount`) FROM `vochers` WHERE `Cr_Ledger` = '$ledger_list[Name]' ORDER BY `vochers`.`Cr_Ledger` ASC"); /* echo "SELECT SUM(`Cr_Amount`) FROM `vochers` WHERE `Cr_Ledger` = '$ledger_list[Name]' ORDER BY `vochers`.`Cr_Ledger` ASC"; exit;*/ $Present_Payment=mysqli_fetch_array($Present_Payment_res); $Present_Recipt_res=mysqli_query($con,"SELECT SUM(`Cr_Amount`) FROM `vochers` WHERE `Dr_Ledger` = '$ledger_list[Name]' ORDER BY `vochers`.`Cr_Ledger` ASC"); $Present_Recipt=mysqli_fetch_array($Present_Recipt_res); if($Present_Recipt[0] != "" || $Present_Payment[0] != "") { ?> <td><?php echo "$ledger_list[Name]"; ?></td> <td><?php echo number_format($Present_Recipt[0],2);?></td> <td><?php echo number_format($Present_Payment[0],2);?></td> <?php $Closig_Balance=$Present_Recipt['0']-$Present_Payment['0']; if($Closig_Balance < 0) { $sign="Cr"; } else $sign="Dr"; ?> <td><?php echo number_format($Closig_Balance,2)." "."$sign";?></td> </tr> <?php } } else { ?> <td></td><td></td><td></td><td></td> <?php } } ?> </tbody> </table> <!-- /.panel --> </div> <!-- /.col-lg-12 --> </div> <!-- /.ROW --> </div> </div></div> </div> </div> <!-- /#wrapper --> <?php include "html-footer.php"; ?> </body> </html>