MMCT TEAM
Server IP : 2a02:4780:3:1378:0:3736:a38e:10  /  Your IP : 3.138.123.118
Web Server : LiteSpeed
System : Linux sg-nme-web1278.main-hosting.eu 4.18.0-513.11.1.lve.el8.x86_64 #1 SMP Thu Jan 18 16:21:02 UTC 2024 x86_64
User : u926327694 ( 926327694)
PHP Version : 7.4.33
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : OFF  |  Python : OFF
Directory (0755) :  /home/u926327694/domains/smsoft.in/public_html/demo/src/../

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/u926327694/domains/smsoft.in/public_html/demo/src/../re-print-receipt_origin.php
 <?php 

    // First we execute our common code to connection to the database and start the session 
    require("common.php"); 
     
    // At the top of the page we check to see whether the user is logged in or not 
    if(empty($_SESSION['user'])) 
    { 
        header("Location: login.php"); 
         
        // Remember that this die statement is absolutely critical.  Without it, 
        // people can view your members-only content without logging in. 
        die("Redirecting to login.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. 
  $a=$_SESSION['user'];  

?> 



<?php

if(isset($_SESSION['sid_receipt']))
{
include "config/config.php";
$i=0;
$head_total=0;
$today= date("Y-m-d");
$sid=$_SESSION['receipt_sid'];
$sid_receipt=$_SESSION['sid_receipt'];
?>
<!DOCTYPE html>
<html lang="en">
<head>

  
  <!-- start: Meta -->
  <meta charset="utf-8">
<title>Fees Management</title>  <meta name="description" content="Bootstrap Metro Dashboard">
  <meta name="author" content="Dennis Ji">
  <meta name="keyword" content="Metro, Metro UI, Dashboard, Bootstrap, Admin, Template, Theme, Responsive, Fluid, Retina">
  <!-- end: Meta -->
  
  <!-- start: Mobile Specific -->
    <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/css/bootstrap.min.css">
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/js/bootstrap.min.js"></script>
<!-- start: CSS -->
  <!--link id="bootstrap-style" href="../paper/paper/css/bootstrap.min.css" rel="stylesheet"-->
  <link href="../paper/paper/css/bootstrap-responsive.min.css" rel="stylesheet">
  <link id="base-style" href="paper/paper/css/style.css" rel="stylesheet">
  <link id="base-style-responsive" href="paper/paper/css/style-responsive.css" rel="stylesheet">
  <link href='http://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800&subset=latin,cyrillic-ext,latin-ext' rel='stylesheet' type='text/css'>
  <!-- end: CSS -->
  

  <!-- The HTML5 shim, for IE6-8 support of HTML5 elements -->
  <!--[if lt IE 9]>
      <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
    <link id="ie-style" href="css/ie.css" rel="stylesheet">
  <![endif]-->
  
  <!--[if IE 9]>
    <link id="ie9style" href="css/ie9.css" rel="stylesheet">
  <![endif]-->
    
  <!-- start: Favicon -->
  <link rel="shortcut icon" href="../paper/paper/img/favicon.ico">
  <!-- end: Favicon -->
  
		<style type="text/css">
<!--
.style1 {
	color: #3300CC;
	font-weight: bold;
}
.style2 {
	color: #FF0000;
	font-weight: bold;
}
.style4 {
	color: #CC00FF;
	font-weight: bold;
}
hr.style1{
	border-top: 1px solid #8c8b8b;
}


hr.style2 {
	border-top: 3px double #8c8b8b;
}

hr.style3 {
	border-top: 1px dashed #8c8b8b;
}

hr.style4 {
	border-top: 1px dotted #8c8b8b;
}

hr.style5 {
	background-color: #fff;
	border-top: 2px dashed #8c8b8b;
}


hr.style6 {
	background-color: #fff;
	border-top: 2px dotted #8c8b8b;
}

hr.style7 {
	border-top: 1px solid #8c8b8b;
	border-bottom: 1px solid #fff;
}


hr.style8 {
	border-top: 1px solid #8c8b8b;
	border-bottom: 1px solid #fff;
}
hr.style8:after {
	content: '';
	display: block;
	margin-top: 2px;
	border-top: 1px solid #8c8b8b;
	border-bottom: 1px solid #fff;
}

hr.style9 {
	border-top: 1px dashed #8c8b8b;
	border-bottom: 1px dashed #fff;
}

hr.style10 {
	border-top: 1px dotted #8c8b8b;
	border-bottom: 1px dotted #fff;
}


hr.style11 {
	height: 6px;
	background: url(http://ibrahimjabbari.com/english/images/hr-11.png) repeat-x 0 0;
    border: 0;
}


hr.style12 {
	height: 6px;
	background: url(http://ibrahimjabbari.com/english/images/hr-12.png) repeat-x 0 0;
    border: 0;
}

hr.style13 {
	height: 5px;
	border: 0;
	box-shadow: 0 5px 5px -5px #8c8b8b inset;
}


hr.style14 { 
  border: 0; 
  height: 1px; 
  background-image: -webkit-linear-gradient(left, #f0f0f0, #8c8b8b, #f0f0f0);
  background-image: -moz-linear-gradient(left, #f0f0f0, #8c8b8b, #f0f0f0);
  background-image: -ms-linear-gradient(left, #f0f0f0, #8c8b8b, #f0f0f0);
  background-image: -o-linear-gradient(left, #f0f0f0, #8c8b8b, #f0f0f0); 
}


hr.style15 {
	border-top: 4px double #8c8b8b;
	text-align: center;
}
hr.style15:after {
	content: '\002665';
	display: inline-block;
	position: relative;
	top: -15px;
	padding: 0 10px;
	background: #f0f0f0;
	color: #8c8b8b;
	font-size: 18px;
}

hr.style16 { 
  border-top: 1px dashed #8c8b8b; 
} 
hr.style16:after { 
  content: '\002702'; 
  display: inline-block; 
  position: relative; 
  top: -12px; 
  left: 40px; 
  padding: 0 3px; 
  background: #f0f0f0; 
  color: #8c8b8b; 
  font-size: 18px; 
}


hr.style17 {
	border-top: 1px solid #8c8b8b;
	text-align: center;
}
hr.style17:after {
	content: '?';
	display: inline-block;
	position: relative;
	top: -14px;
	padding: 0 10px;
	background: #f0f0f0;
	color: #8c8b8b;
	font-size: 18px;
	-webkit-transform: rotate(60deg);
	-moz-transform: rotate(60deg);
	transform: rotate(60deg);
}


hr.style18 { 
  height: 30px; 
  border-style: solid; 
  border-color: #8c8b8b; 
  border-width: 1px 0 0 0; 
  border-radius: 20px; 
} 
hr.style18:before { 
  display: block; 
  content: ""; 
  height: 30px; 
  margin-top: -31px; 
  border-style: solid; 
  border-color: #8c8b8b; 
  border-width: 0 0 1px 0; 
  border-radius: 20px; 
}
.customDiv{
  margin: 3px;
  min-height: 600px;
  background-color: white;
}

@media print 
{
    .customDiv {
        width:calc(98% / 2 - 15px);
        float:left;
        margin-top:15px;
        padding:5px;
        margin-left:20px;
    }
    .customDiv:first-child {
     margin-left:0;   
    }
    .btnexit
    {
        display:none;
    }
}


</style>
<style>
        table {
            font-family: arial, sans-serif;
            border-collapse: collapse;
            width: 100%;
        }

        td, th {
            border: 0px solid #dddddd;
            text-align: left;
            padding: 0px;
        }

        tr:nth-child(even) {
            
        }
    </style>
       <script src="https://code.jquery.com/jquery-1.12.4.min.js" integrity="sha256-ZosEbRLbNQzLpnKIkEdrPv7lOy9C27hHQ+Xp8a4MxAQ=" crossorigin="anonymous"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/1.3.5/jspdf.min.js"></script>

</head>

<body>
      
  <!--<input type="button" id="create_pdf" value="Generate PDF">-->

    <form class="form" style="max-width: none; width: 1005px;">


           <div class="container">

          <div class="row">


<!-- 1st Copy  of Receipt -->

<div class="col-lg-4 customDiv">
    <br> <br>
 <?php 
  session_start();
 include "Recipt_head.php"; ?>
 <?php

 
		
									
									?>
<?php
$total=0;
$Grand_Total=0;
$fine=0;
date_default_timezone_set('Asia/Kolkata');


//$date = date('FORMAT'); // FORMAT Eg : Y-m-d H:i:s

$current_date =  $_SESSION['today'];
$date=date_create("$current_date");
//echo date_format($date,"d/m/Y");


$r1=mysqli_query($con,"select * from `stud_basic` where `Stud_Id` = '$sid'");
$row1=mysqli_fetch_array($r1);


    
    
?>


    <table border="0">
    <tr>
  <td>
      
      
  <!--  <p align="left">Recipt Number : <?php //echo $ReciptCounter; ?> -->
    <div style="margin-top:3px;">
        <p style="width:50%;float:left;"><b>Office Copy</b></p>
        <p style="width:50%;float:right;" align="right"> <b>Print Date :</b><?php echo date_format($date,"d/m/Y");?></p>
    </div>
  
    
    
    </td></tr></table> 
<table  border="1">
              <thead>
                <tr>
                  <td style="padding-left:10px;"><b>Name</b></td>
                 
        
            <td style="padding-left:10px;"><?php echo "$row1[Name]"; ?></td></tr>
            <tr> <td style="padding-left:10px;"><b>Class/Division</b></td>
            <td style="padding-left:10px;"><?php echo "$row1[Class]"; ?>/<?php echo "$row1[Division]"; ?> <?php ?> </td>
             <!-- <td align="center"><?php //echo "$row1[Reg_No]"; ?></td> -->
            <!-- <th align="center"><?php //echo "$row1[Phone]"; ?></th> -->
            </tr>
            <tr>
                <td style="padding-left:10px;"><b>Reg. No. : </b></td>
                <td style="padding-left:10px;"><?php echo $row1['Reg_No']; ?></td>
            </tr>
          
            
            </table>

<table>       <tr>
          <td>
          <div align="left">
           <?php
           $sql_paid_fees=mysqli_query($con,"SELECT * FROM `paid_fees` where Fees_id in ($sid_receipt) and Stud_Id=$sid");
           $ReciptBookNumbers="";
           while($fees_row=mysqli_fetch_array($sql_paid_fees))
           {
               if($ReciptBookNumbers=="")
               {
                   $ReciptBookNumbers=$fees_row['Recipt_No'];
               }
               else
               {
                   $ReciptBookNumbers=$ReciptBookNumbers."/".$fees_row['Recipt_No'];
               }
           }
            echo "<b>Receipt  Numbers</b>".":2021/22-"."$ReciptBookNumbers<br>";?></div>
            
            <div align="right">
           <?php
            //echo "<b>Receipt Numbers</b>".":"."$ReciptList<br>";?></div>
            <?php   
            $ListR=explode("/", $ReciptList);

            $z=1;
?>
</td>
</tr>
</table>

<table border="0">
            <tr>
<?php     
$smsbl="";
$ListR=explode(',',$sid_receipt);
foreach ($ListR as $headcode) 
             {
              if($headcode != "")
              {
                $i=0;
    $fetch_res=mysqli_query($con,"SELECT * FROM `paid_fees` WHERE `Fees_id` = '$headcode' and `Stud_Id` = '$sid'");
    $fetch=mysqli_fetch_array($fetch_res);

    $_SESSION["Mode"]=$fetch['Mode'];
     $_SESSION["DateNumber"]=$fetch['DateNumber'];
    
    $paymentmode=$fetch['Mode'];
   $cheque=$fetch['DateNumber'];
   
    $head_res=mysqli_query($con,"SELECT * FROM `head` WHERE `Head_Id` = '$fetch[Head_Id]'");
    $head=mysqli_fetch_array($head_res);
  
  
    $Balance_res=mysqli_query($con,"SELECT sum(`Balance`) FROM `stud_basic2` WHERE  `Head_Id`='$fetch[Head_Id]' and `Stud_Id` = '$sid'");
    $Balance1=mysqli_fetch_array($Balance_res);
            
    $Total_res=mysqli_query($con,"SELECT sum(`Total_Amount`) FROM `stud_basic2` WHERE  `Head_Id`='$fetch[Head_Id]' and `Stud_Id` = '$sid'");
    $Total1=mysqli_fetch_array($Total_res);
    
    $Paid1_res=mysqli_query($con,"SELECT sum(`Paid`) FROM `stud_basic2` WHERE  `Head_Id`='$fetch[Head_Id]' and `Stud_Id` = '$sid'");
    $Paid1=mysqli_fetch_array($Paid1_res);
  
  
  
  
            ?>
      <td>  
     <h3 style="margin-bottom:3px;"><?php echo "<b>$z.$head[Name]<b>"; $z++; ?></h3></td></tr>
     <tr>
         <td colspan="2"><b style="margin-bottom:7px;display:inline-block;">Rn. No.-<?php echo $fetch['Recipt_No']; ?> / Date-<?php echo Date('d/m/Y',strtotime($fetch['Paid_date'])); ?></b></td>
     </tr>
               <?php
               $head_total=0;

               $SubListR=explode("/", $fetch['Subhead_Ids']);
               $SubAmountListR=explode("/", $fetch['Sub_Amounts']);
               $aa=sizeof($SubListR);
               $ab=sizeof($SubAmountListR);
              // echo "aa=$aa///////////ab=$ab";
               foreach (array_combine($SubListR, $SubAmountListR) as $subid => $subamt) 
             //foreach ($SubListR as $subheadcode and $SubAmountListR as $SubAmountsR) 
             {
              //$ar=sizeof($SubListR);
              //echo "$ar<br>";
              if($subid != "")
              {
              $subhead_res=mysqli_query($con,"SELECT * FROM `sub_head` WHERE `Sub_Id` = '$subid'");
              $subhead=mysqli_fetch_array($subhead_res);
              $c=$i+1;
            

                if($reci != "Detailed")
                {
                    if($subamt>0)
                    {
                ?>

              <tr><td>
            <?php echo "$c.$subhead[Name]";?> </td><td> <div align="right" ><?php  echo "$subamt"; 
       $i++;  

     ?> </div>

      </td>
      <?php
      } // nOT DetILED
                }
      $head_total=$head_total+$subamt;
     ?>

     <?php
      }  // sUB iF
    }  // sUb looP
    
     //echo "$i";
       
       ?> 
      </tr>
      <?php if($Total1[0]>0) { ?>
      <tr><td> <?php  echo "TOT:$Total1[0] / "; echo "PD: $Paid1[0] / "; echo "BLC :$Balance1[0]<br>";?> </td><td><div align="right"><b><?php   echo $head_total; ?></b></div></td></tr>
      <?php } ?>
    <?php
    $total=$total+$fetch['Total_Amount'];
  $Grand_Total=$Grand_Total+$fetch['Grand_Total'];
  $fine=$fine+$fetch['Fine_Amount'];
    } // hEAD bLAnk iF
  } // HeaD lOOP
  $_SESSION["tota"]=$total;
  $_SESSION["Grand_Total"]=$Grand_Total;
  $_SESSION["Fine"]=$fine;
 
  
  
        ?>
<tr><td><b>Total<b></td><td><div align="right"><b><?php echo $total; ?></b></div></td></tr>
 <?php if($fine>0) 
  {?>
  <tr> 
  <td><b>Fine<b></td><td><div align="right"><b><?php echo $fine; ?></b></div></td></tr>
  <tr><td><b>Grand Total<b></td><td><div align="right"><b><?php echo $Grand_Total; ?></b></div></td>
  
  </tr>
  <?php } ?>
</table>
     
        
       
       <hr class="style6">


       <?php

       //$gt=$gt+$head_total;
       $gt="0";
       $message="Dear $row1[Name] We Received Rs $gt on $current_date in the Mode of $paymentmode Thanking You";

      // head loop
?>
<h3 align="right"><?php echo "Grand Total  -  $Grand_Total";   ?></h3>
<?php
$f = new NumberFormatter("en_US", NumberFormatter::SPELLOUT);

 ?>
<h3 align="right"><?php echo "In Words : ".ucwords($f->format($Grand_Total))." Only";   ?></h3>
</td></tr></table>

    <?php
    if ($paymentmode=="Cheque" || $paymentmode=="Challan" || $paymentmode=="DD")
    {?>
    
  <p align="right"> <b>Payment Mode:</b><?php  echo $paymentmode;    echo " No : ". $cheque; ?></p> 
    <?php
    }
    else
    {?>
         <p align="right"> <b>Payment Mode:</b><?php  echo $paymentmode;  ?></p> <?php
    }?>

</div>




<!-- 2nd Copy  of Receipt -->


<div class="col-lg-4 customDiv">
    <br> <Br>
<?php include "Recipt_head.php"; ?>
<?php
$total=0;
$Grand_Total=0;
$fine=0;
date_default_timezone_set('Asia/Kolkata');




$r1=mysqli_query($con,"select * from `stud_basic` where `Stud_Id` = '$sid'");
$row1=mysqli_fetch_array($r1);
?>


    <table border="0">
    <tr>
  <td>
  <!--  <p align="left">Recipt Number : <?php //echo $ReciptCounter; ?> -->
 
     <div style="margin-top:3px;">
        <p style="width:50%;float:left;"><b>Student Copy</b></p>
        <p style="width:50%;float:left;" align="right"> <b>Print Date :</b><?php echo date_format($date,"d/m/Y");?></p>
    </div>
    </td></tr></table> 
<table  border="1">
              <thead>
                <tr>
                  <td style="padding-left:10px;"><b>Name</b></td>
                 
        
            <td style="padding-left:10px;"><?php echo "$row1[Name]"; ?></td></tr>
            <tr> <td style="padding-left:10px;"><b>Class/Division</b></td>
            <td style="padding-left:10px;"><?php echo "$row1[Class]"; ?>/<?php echo "$row1[Division]"; ?>  <?php  ?> </td>
             <!-- <td align="center"><?php //echo "$row1[Reg_No]"; ?></td> -->
            <!-- <th align="center"><?php //echo "$row1[Phone]"; ?></th> -->
            </tr>
            
          <tr>
                <td style="padding-left:10px;"><b>Reg. No. : </b></td>
                <td style="padding-left:10px;"><?php echo $row1['Reg_No']; ?></td>
            </tr>
            
            </table>

<table>       <tr>
          <td>
          <div align="left">
           <?php
            echo "<b>Receipt Numbers</b>".":2021/22-"."$ReciptBookNumbers";?></div>
            <?php   
            $ListR=explode("/", $ReciptList);

            $z=1;
?>
</td>
</tr>
</table>

<table border="0">
            <tr>
<?php     
$smsbl="";
$ListR=explode(',',$sid_receipt);
foreach ($ListR as $headcode) 
             {
              if($headcode != "")
              {
                $i=0;
               
    
    $fetch_res=mysqli_query($con,"SELECT * FROM `paid_fees` WHERE `Fees_id` = '$headcode' and `Stud_Id` = '$sid'");
    $fetch=mysqli_fetch_array($fetch_res);

    $_SESSION["Mode"]=$fetch['Mode'];
    $_SESSION["DateNumber"]=$fetch['DateNumber'];
    
    $paymentmode=$fetch['Mode'];
   $cheque=$fetch['DateNumber'];
    
    
    
    $head_res=mysqli_query($con,"SELECT * FROM `head` WHERE `Head_Id` = '$fetch[Head_Id]'");
    $head=mysqli_fetch_array($head_res);
    
     $Balance_res=mysqli_query($con,"SELECT sum(`Balance`) FROM `stud_basic2` WHERE  `Head_Id`='$fetch[Head_Id]' and `Stud_Id` = '$sid'");
    $Balance1=mysqli_fetch_array($Balance_res);
            
    $Total_res=mysqli_query($con,"SELECT sum(`Total_Amount`) FROM `stud_basic2` WHERE  `Head_Id`='$fetch[Head_Id]' and `Stud_Id` = '$sid'");
    $Total1=mysqli_fetch_array($Total_res);
    
    $Paid1_res=mysqli_query($con,"SELECT sum(`Paid`) FROM `stud_basic2` WHERE  `Head_Id`='$fetch[Head_Id]' and `Stud_Id` = '$sid'");
    $Paid1=mysqli_fetch_array($Paid1_res);
    
    
    
            ?>
      <td>  
     <h3 style="margin-bottom:3px;"><?php echo "<b>$z.$head[Name]<b>"; $z++; ?></h3></td></tr>
     <tr>
         <td colspan="2"><b style="margin-bottom:7px;display:inline-block;">Rn. No.-<?php echo $fetch['Recipt_No']; ?> / Date-<?php echo Date('d/m/Y',strtotime($fetch['Paid_date'])); ?></b></td>
     </tr>
               <?php
               $head_total=0;

               $SubListR=explode("/", $fetch['Subhead_Ids']);
               $SubAmountListR=explode("/", $fetch['Sub_Amounts']);
               $aa=sizeof($SubListR);
               $ab=sizeof($SubAmountListR);
              // echo "aa=$aa///////////ab=$ab";
               foreach (array_combine($SubListR, $SubAmountListR) as $subid => $subamt) 
             //foreach ($SubListR as $subheadcode and $SubAmountListR as $SubAm$Balance1ountsR) 
             {
              //$ar=sizeof($SubListR);
              //echo "$ar<br>";
              if($subid != "")
              {
              $subhead_res=mysqli_query($con,"SELECT * FROM `sub_head` WHERE `Sub_Id` = '$subid'");
              $subhead=mysqli_fetch_array($subhead_res);
              $c=$i+1;
            

                if($reci != "Detailed")
                {
                    if($subamt>0)
                    {
                ?>

              <tr><td>
            <?php echo "$c.$subhead[Name]";?> </td><td> <div align="right" ><?php  echo "$subamt"; 
       $i++;  

     ?> </div>

      </td>
      <?php
      } // nOT DetILED
                }
      $head_total=$head_total+$subamt;
     ?>

     <?php
      }  // sUB iF
    }  // sUb looP
    
     //echo "$i";
      $smsbl= $smsbl." $head[Name] : TOT:$Total1[0] / PD: $Paid1[0] / BLC :$Balance1[0]";
       ?> 
    </tr>
    <?php if($Total1[0]>0) { ?>
    <tr><td> <?php  echo "TOT:$Total1[0] / PD: $Paid1[0] / BLC :$Balance1[0]<br>";?> </td><td><div align="right"><b><?php   echo $head_total; ?></b></div></td></tr>
    <?php } ?>
    <?php
    $total=$total+$fetch['Total_Amount'];
  $Grand_Total=$Grand_Total+$fetch['Grand_Total'];
  $fine=$fine+$fetch['Fine_Amount'];
    } // hEAD bLAnk iF
  } // HeaD lOOP
  $_SESSION["tota"]=$total;
  $_SESSION["Grand_Total"]=$Grand_Total;
  $_SESSION["Fine"]=$fine;
  
  
        ?>
       
<tr><td><b>Total<b></td><td><div align="right"><b><?php echo $total; ?></b></div></td></tr>
  
  <?php if($fine>0) 
  {?>
  <tr> 
  <td><b>Fine<b></td><td><div align="right"><b><?php echo $fine; ?></b></div></td></tr>
  <tr><td><b>Grand Total<b></td><td><div align="right"><b><?php echo $Grand_Total; ?></b></div></td>
  
  </tr>
  <?php }
 $_SESSION['addM']=$smsbl;
  ?>
</table>
     
        
       
       <hr class="style6">


       <?php

       //$gt=$gt+$head_total;
       $gt="0";
       $message="Dear $row1[Name] We Received $gt ($_SESSION[addM]) on $current_date in the Mode of $paymentmode Thanking You";

      // head loop
?>
<h3 align="right"><?php echo "Grand Total  -  $Grand_Total";   ?></h3>
<?php
$f = new NumberFormatter("en", NumberFormatter::SPELLOUT);

 ?>
<h3 align="right"><?php echo "In Words : ".ucwords($f->format($Grand_Total))." Only";   ?></h3>
</td></tr></table>
 <?php
    if ($paymentmode=="Cheque" || $paymentmode=="Challan" || $paymentmode=="DD")
    {?>
    
  <p align="right"> <b>Payment Mode:</b><?php  echo $paymentmode;    echo " No : ". $cheque; ?></p> 
    <?php
    }
    else
    {?>
         <p align="right"> <b>Payment Mode:</b><?php  echo $paymentmode;  ?></p> <?php
    }?>

</div>







































</div>
</div>









      

</form>


<!--center><a class="btnexit" href="stud_profile.php"><input type="button" value="EXIT" name=""></a></center-->
</body>



<?php
/*
 class MainSms
    {
        public function call()
        {
          include "config/config.php";
          $total=$_SESSION["tota"];


 // $_SESSION["Fine"]=$fine;
          $Grand_Total=$_SESSION["Grand_Total"];
          $paymentmode=$_SESSION["Mode"];
          $sid=$_SESSION['key'];
          $today= date("Y-m-d");
          $r1=mysqli_query($con,"select * from `stud_basic` where `Stud_Id` = '$sid'");
          $row1=mysqli_fetch_array($r1);
         // $to="9880832454";
           //$message=$row1['Name'];
           $me=urlencode("Dear ". $row1['Name']." We Received Rs ".$Grand_Total." on ".$today." in the Mode of ".$paymentmode.$_SESSION['addM']."Thanking You");
           $message=$me;
           //echo "$message";
          if($trustieNumbers != ''){
            $to = $row1['Phone'].",".$trustieNumbers;     
           }else{
               $to = $row1['Phone'];
           } 
          
         
        //   include "smsapi.txt";
            //instantiate a new Sms Rest Client with argument api,senderID,base_URL.
           
            $sms     = new Sms("$api","$smsId" ,"$url");
            $dlr_url = 'https://solutionsinfini.net/dlr/trigger.php?sent={sent}&delivered={delivered}&msgid={msgid}&sid={sid}&status={status}&reference={reference}&custom1={custom1}&custom2={custom2}';

            $obj = $sms->sendSms("$to", "$message", [
                //'dlr_url' => $dlr_url,
                //'time'    => '2017-06-11 11:17:55 AM',
                //'unicode' => '1',
                //'flash' => '1',
                //'format'  => 'json',
                //'port'    => '8223',
                ]);


           //echo '<pre>';
            //print_r($obj);
              
   }
 }
  $main = new MainSms();
    $main->call(); */
?>




</html>
<script>
    (function () 
  {
  
        var
         form = $('.form'),
         cache_width = form.width(),
         a4 = [800, 841.89]; // for a4 size paper width and height
             $('body').scrollTop(0);
            
            window.setTimeout( createPDF, 1000 )
            //createPDF();
       
        //create pdf
        function createPDF() {
    
            getCanvas().then(function (canvas) {
                var
                 img = canvas.toDataURL("image/png"),
                 doc = new jsPDF({
                     unit: 'px',
                     format: 'a4'
                 });
                doc.addImage(img, 'JPEG', 5, 5);
                 // doc.save('');
               doc.save('<?php echo "$row1[Name]"."-"."$code".".pdf"; ?>');
                form.width(cache_width);
            });
        }

        // create canvas object
        function getCanvas() {
            form.width((a4[0] * 1.33333) - 80).css('max-width', 'none');
            return html2canvas(form, {
                imageTimeout: 2000,
                removeContainer: true
            });
        }

    }());
</script>
<?php
}
?>

MMCT - 2023