|
Server IP : 2a02:4780:3:1493:0:3736:a38e:7 / Your IP : 216.73.216.60 Web Server : LiteSpeed System : Linux sg-nme-web1393.main-hosting.eu 4.18.0-553.77.1.lve.el8.x86_64 #1 SMP Wed Oct 8 14:21:00 UTC 2025 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/conver2pdf/../ |
| [ Home ] | [ C0mmand ] | [ Upload File ] |
|---|
<?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']))
{
// If they are not, we redirect them to the login page.
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
//include "config/config.php";
include "config/config.php";
$key=$_GET['key'];
$reci="Detailed";
$row_res=mysqli_query($con,"SELECT * FROM `paid_fees` WHERE `Fees_id`= '$key'");
$row=mysqli_fetch_array($row_res);
$code=$row['Recipt_No'];
$sid=$row['Stud_Id'];
?>
<!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 -->
<link href="vendor/font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
<script src="jquery-1.12.4.min.js" integrity="sha256-ZosEbRLbNQzLpnKIkEdrPv7lOy9C27hHQ+Xp8a4MxAQ=" crossorigin="anonymous"></script>
<script src="jspdf.min.js"></script>
<script src="https://code.jquery.com/jquery-1.12.4.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/1.3.3/jspdf.min.js"></script>
<script src="https://html2canvas.hertzen.com/dist/html2canvas.js"></script>
<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;
}
</style>
<style>
table {
font-family: arial, sans-serif;
border-collapse: collapse;
width: 100%;
}
td, th {
border: 0px solid #dddddd;
text-align: left;
padding: 5px;
}
tr:nth-child(even) {
}
</style>
<style>
body {
background: rgb(204,204,204);
}
page[size="A4"] {
background: white;
width: 30cm;
height: 26cm;
display: block;
margin: 0 auto;
margin-bottom: 0.5cm;
margin-top: 0.5cm;
box-shadow: 0 0 0.5cm rgba(0,0,0,0.5);
page-break-after: always;
}
@media print {
body, page[size="A4"] {
margin: 0;
box-shadow: 0;
}
}
</style>
</head>
<body align="center">
<page size="A4"><center>
<div class="canvas_div_pdf mt-2" style="display: block;border:2px solid #ccc; padding:15px;">
<input type="button" onclick="getPDF()" 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-3 customDiv">
<?php include "Recipt_head.txt"; ?>
<?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 = date('d-m-Y h:i:s a');
$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; ?> -->
<p align="right"> <b>Date :</b><?php echo $current_date;?></p>
</td></tr></table>
<table border="1">
<thead>
<tr>
<td><b>Name</b></td>
<td><?php echo "$row1[Name]"; ?></td></tr>
<tr> <td><b>Class/Division</b></td><td><?php echo "$row1[Class]"; ?>/<?php echo "$row1[Division]"; ?></td>
<!-- <td align="center"><?php //echo "$row1[Reg_No]"; ?></td> -->
<!-- <th align="center"><?php //echo "$row1[Phone]"; ?></th> -->
</tr>
</table>
<table> <tr>
<td>
<div align="right">
<?php
$ReciptList=$code;
echo "<b>Receipt Number</b>".":"."$ReciptList<br>";?></div>
<?php
$ListR[0]=$code;
$z=1;
?>
</td>
</tr>
</table>
<table border="0">
<tr>
<?php foreach ($ListR as $headcode)
{
if($headcode != "")
{
$i=0;
$fetch_res=mysqli_query($con,"SELECT * FROM `paid_fees` WHERE `Recipt_No` = '$headcode' and `Stud_Id` = '$sid'");
$fetch=mysqli_fetch_array($fetch_res);
$_SESSION["Mode"]=$fetch['Mode'];
$paymentmode=$fetch['Mode'];
$head_res=mysqli_query($con,"SELECT * FROM `head` WHERE `Head_Id` = '$fetch[Head_Id]'");
$head=mysqli_fetch_array($head_res);
?>
<td>
<h3><?php echo "<b>$z.$head[Name]<b>"; $z++; ?></h3></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")
{
?>
<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><tr><td></td><td><div align="right"><b><?php echo $head_total; ?></b></div></td></tr>
<?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>
<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>
</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", NumberFormatter::SPELLOUT);
?>
<h3 align="right"><?php echo "In Words : ".$f->format($Grand_Total)." Only"; ?></h3>
</td></tr></table>
</div>
<!-- 2nd Copy of Receipt -->
<div class="col-lg-3 customDiv">
<?php include "Recipt_head.txt"; ?>
<?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 = date('d-m-Y h:i:s a');
$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; ?> -->
<p align="right"> <b>Date :</b><?php echo $current_date;?></p>
</td></tr></table>
<table border="1">
<thead>
<tr>
<td><b>Name</b></td>
<td><?php echo "$row1[Name]"; ?></td></tr>
<tr> <td><b>Class/Division</b></td><td><?php echo "$row1[Class]"; ?>/<?php echo "$row1[Division]"; ?></td>
<!-- <td align="center"><?php //echo "$row1[Reg_No]"; ?></td> -->
<!-- <th align="center"><?php //echo "$row1[Phone]"; ?></th> -->
</tr>
</table>
<table> <tr>
<td>
<div align="right">
<?php
$ReciptList=$code;
echo "<b>Receipt Number</b>".":"."$ReciptList<br>";?></div>
<?php
$ListR[0]=$code;
$z=1;
?>
</td>
</tr>
</table>
<table border="0">
<tr>
<?php foreach ($ListR as $headcode)
{
if($headcode != "")
{
$i=0;
$fetch_res=mysqli_query($con,"SELECT * FROM `paid_fees` WHERE `Recipt_No` = '$headcode' and `Stud_Id` = '$sid'");
$fetch=mysqli_fetch_array($fetch_res);
$_SESSION["Mode"]=$fetch['Mode'];
$paymentmode=$fetch['Mode'];
$head_res=mysqli_query($con,"SELECT * FROM `head` WHERE `Head_Id` = '$fetch[Head_Id]'");
$head=mysqli_fetch_array($head_res);
?>
<td>
<h3><?php echo "<b>$z.$head[Name]<b>"; $z++; ?></h3></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")
{
?>
<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><tr><td></td><td><div align="right"><b><?php echo $head_total; ?></b></div></td></tr>
<?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>
<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>
</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", NumberFormatter::SPELLOUT);
?>
<h3 align="right"><?php echo "In Words : ".$f->format($Grand_Total)." Only"; ?></h3>
</td></tr></table>
</div>
<!-- 3rd Copy of Receipt -->
<div class="col-lg-3 customDiv">
<?php include "Recipt_head.txt"; ?>
<?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 = date('d-m-Y h:i:s a');
$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; ?> -->
<p align="right"> <b>Date :</b><?php echo $current_date;?></p>
</td></tr></table>
<table border="1">
<thead>
<tr>
<td><b>Name</b></td>
<td><?php echo "$row1[Name]"; ?></td></tr>
<?php $name="$row1[Name]"; ?>
<tr> <td><b>Class/Division</b></td><td><?php echo "$row1[Class]"; ?>/<?php echo "$row1[Division]"; ?></td>
<!-- <td align="center"><?php //echo "$row1[Reg_No]"; ?></td> -->
<!-- <th align="center"><?php //echo "$row1[Phone]"; ?></th> -->
</tr>
</table>
<table> <tr>
<td>
<div align="right">
<?php
$ReciptList=$code;
echo "<b>Receipt Number</b>".":"."$ReciptList<br>";?></div>
<?php
$ListR[0]=$code;
$z=1;
?>
</td>
</tr>
</table>
<table border="0">
<tr>
<?php foreach ($ListR as $headcode)
{
if($headcode != "")
{
$i=0;
$fetch_res=mysqli_query($con,"SELECT * FROM `paid_fees` WHERE `Recipt_No` = '$headcode' and `Stud_Id` = '$sid'");
$fetch=mysqli_fetch_array($fetch_res);
$_SESSION["Mode"]=$fetch['Mode'];
$paymentmode=$fetch['Mode'];
$head_res=mysqli_query($con,"SELECT * FROM `head` WHERE `Head_Id` = '$fetch[Head_Id]'");
$head=mysqli_fetch_array($head_res);
?>
<td>
<h3><?php echo "<b>$z.$head[Name]<b>"; $z++; ?></h3></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")
{
?>
<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><tr><td></td><td><div align="right"><b><?php echo $head_total; ?></b></div></td></tr>
<?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>
<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>
</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", NumberFormatter::SPELLOUT);
?>
<h3 align="right"><?php echo "In Words : ".$f->format($Grand_Total)." Only"; ?></h3>
</td></tr></table>
</div>
</div>
</div>
</form>
</div></center>
</page>
<center><a href="recpt_report_excle.php"><input type="button" value="EXIT" name=""></a></center>
</body>
</html>
<script>
function getPDF(){
var HTML_Width = $(".canvas_div_pdf").width();
var HTML_Height = $(".canvas_div_pdf").height();
var top_left_margin = 15;
var PDF_Width = HTML_Width+(top_left_margin*2);
var PDF_Height = (PDF_Width*1.5)+(top_left_margin*2);
var canvas_image_width = HTML_Width;
var canvas_image_height = HTML_Height;
var totalPDFPages = Math.ceil(HTML_Height/PDF_Height)-1;
html2canvas($(".canvas_div_pdf")[0],{allowTaint:true}).then(function(canvas) {
canvas.getContext('2d');
console.log(canvas.height+" "+canvas.width);
var imgData = canvas.toDataURL("image/jpeg", 1.0);
var pdf = new jsPDF('p', 'pt', [PDF_Width, PDF_Height]);
pdf.addImage(imgData, 'JPG', top_left_margin, top_left_margin,canvas_image_width,canvas_image_height);
for (var i = 1; i <= totalPDFPages; i++) {
pdf.addPage();
pdf.addImage(imgData, 'JPG', top_left_margin, -(PDF_Height*i)+(top_left_margin*4),canvas_image_width,canvas_image_height);
}
pdf.save("<?php echo "$name"; ?>.pdf");
});
};
</script>