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 // 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"; ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <meta name="description" content=""> <meta name="author" content=""> <title>Student Attendance System</title> <!-- Bootstrap Core CSS --> <link href="vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet"> <!-- MetisMenu CSS --> <link href="vendor/metisMenu/metisMenu.min.css" rel="stylesheet"> <!-- Custom CSS --> <link href="dist/css/sb-admin-2.css" rel="stylesheet"> <!-- Morris Charts CSS --> <link href="vendor/morrisjs/morris.css" rel="stylesheet"> <!-- Custom Fonts --> <link href="vendor/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css"> <link href="dist/css/select2.min.css" rel="stylesheet" /> <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries --> <!-- WARNING: Respond.js doesnt work if you view the page via file:// --> <!--[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]--> <link href="../report_js/bootstrap.min.css" rel="stylesheet"> <link href="../report_js/dataTables.bootstrap.min.css" rel="stylesheet"> <link href="../report_js/buttons.bootstrap.min.css" rel="stylesheet"> </head> <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> <h3 style="margin-left: 20px;margin-bottom: 20px;color: Red" href="#"><b><?php include "Name.txt"; ?></b></h3> </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-heading"> <center>Ledger Display</center> </div> <div class="panel-body"> <?php $FromDate=date('Y-m-01', strtotime("now")); $ToDate=date('Y-m-t', strtotime("now")); if(isset($_POST['btnSubmit'])) { $FromDate=$_POST['from']; $ToDate=$_POST['to']; } ?> <!-- Form Content Start --> <form role="form" action="" method="POST"> <div class="col-lg-4"> <div class="form-group"> <label>From Date</label> <input type="date" class="form-control" name="from" id="to" required value="<?php echo $FromDate; ?>"> </div> </div> <div class="col-lg-4"> <div class="form-group"> <label>To Date</label> <input type="date" class="form-control" name="to" id="to" required value="<?php echo $ToDate; ?>"> </div> </div> <div class="col-lg-4"> <div class="form-group"> <label>Ledger</label> <select class="form-control select2" name="ledger" required > <?php $r5=mysqli_query($con,"SELECT * FROM `ledger`"); while($row5=mysqli_fetch_array($r5)) { ?> <option value="<?php echo $row5['Name']; ?>"> <?php echo $row5['Name']."-".$row5['Type']; ?></option> <?php } ?> </select> </div> </div> <div class="col-lg-12"> <center> <button type="submit" class="btn btn-default">Submit Button</button></a> <button type="reset" class="btn btn-default">Reset Button</button> </center> </div> </form> <!-- Form Content Start --> </div> <!-- /.panel-body --> </div> <!-- /.panel --> <?php if ($_SERVER['REQUEST_METHOD'] == 'POST') { $ledgers_res= mysqli_query($con,"SELECT * FROM `vochers` WHERE (`Cr_Ledger`= '$_POST[ledger]' OR `Dr_Ledger`='$_POST[ledger]') AND `Date` between '$_POST[from]' AND '$_POST[to]' ORDER BY Date asc ") or die(mysqli_error($con)); /* Echo "SELECT * FROM `vochers` WHERE (`Cr_Ledger`= '$_POST[ledger]' OR `Dr_Ledger`='$_POST[ledger]') AND `Date` >= '$_POST[from]' AND `Date` <= '$_POST[to]' ORDER BY Date asc ";*/ /* echo "SELECT * FROM `vochers` WHERE (`Cr_Ledger`= '$_POST[ledger]' OR `Dr_Ledger`='$_POST[ledger]') AND `Date` between '$_POST[from]' AND '$_POST[to]' ORDER BY Date asc " ; */ ?> <div class="panel panel-default"> <div class="panel-heading"> <center> Ledgers</center> </div> <div class="panel-body"> <table width="100%" class="table table-striped table-bordered table-hover" id="example"> <thead> <tr> <th style="width:12%;">Date</th> <th>Particular</th> <th>Type</th> <th>Debit</th> <th>Credit</th> <th>Narration</th> </tr> </thead> <tbody> <?php while($Ledgers=mysqli_fetch_array($ledgers_res)) { $cr_amt=""; $dr_amt=""; if($_POST['ledger'] == $Ledgers['Cr_Ledger']) { $ledger_dis="$Ledgers[Dr_Ledger]"; $cr_amt="$Ledgers[Cr_Amount]"; $lb="Cash is in Debit side"; } else { $ledger_dis="$Ledgers[Cr_Ledger]"; $dr_amt="$Ledgers[Dr_Amount]"; $lb="Cash is in Credit side"; } ?> <tr> <td><?php echo Date('d-m-Y',strtotime($Ledgers['Date'])); ?></td> <td><?php echo $ledger_dis; ?></td> <td><?php echo $Ledgers['Type']."-".$Ledgers['v_counter']; ?></td> <td><?php echo $dr_amt; ?></td> <td><?php echo $cr_amt; ?></td> <td><?php echo $Ledgers['Nrtn']; ?></td> </tr> <?php } ?> </tbody> </table> </div> </div> <?php } ?> </div> <!-- /.col-lg-12 --> </div> <!-- /.ROW --> </div> </div></div> </div> </div> <!-- /#wrapper --> <!-- DataTables JavaScript --> <!-- Custom Theme JavaScript --> <!-- Page-Level Demo Scripts - Tables - Use for reference --> <script src="vendor/jquery/jquery.min.js"></script> <!-- Bootstrap Core JavaScript --> <script src="vendor/bootstrap/js/bootstrap.min.js"></script> <!-- Metis Menu Plugin JavaScript --> <script src="vendor/metisMenu/metisMenu.min.js"></script> <!-- Morris Charts JavaScript --> <script src="vendor/raphael/raphael.min.js"></script> <script src="vendor/morrisjs/morris.min.js"></script> <script src="data/morris-data.js"></script> <!-- Custom Theme JavaScript --> <script src="dist/js/sb-admin-2.js"></script> <script src="dist/js/select2.min.js"></script> <script> $(".select2").select2(); </script> <script src="report_js/jquery-3.3.1.js"></script> <script src="../report_js/jquery.dataTables.min.js"></script> <script src="../report_js/dataTables.bootstrap.min.js"></script> <script src="../report_js/dataTables.buttons.min.js"></script> <script src="../report_js/buttons.bootstrap.min.js"></script> <script src="../report_js/jszip.min.js"></script> <script src="../report_js/pdfmake.min.js"></script> <script src="../report_js/vfs_fonts.js"></script> <script src="../report_js/buttons.html5.min.js"></script> <script src="../report_js/buttons.print.min.js"></script> <script src="../report_js/buttons.colVis.min.js"></script> <script> $(document).ready(function() { var table = $('#example').DataTable( { lengthChange: false, "ordering": false, buttons: [ 'copy', 'excel', 'pdf', 'colvis' ] } ); table.buttons().container() .appendTo( '#example_wrapper .col-sm-6:eq(0)' ); } ); </script> </body> </html>