<?php
include("../../common/connect.php");  
include("../../common/function.php");  
error_reporting(0);
$sid=$_REQUEST['sid'];
$mobile=$_REQUEST['mobile'];
$email=$_REQUEST['email'];
$course=$_REQUEST['course'];
$name=$_REQUEST['name'];
$fname=$_REQUEST['fname'];
$sem=$_REQUEST['sem'];
$fee=$_REQUEST['fee'];
$exam=$_REQUEST['exam'];


function convert_number_to_words($number) {
   
    $hyphen      = '-';
    $conjunction = '  ';
    $separator   = ' ';
    $negative    = 'negative ';
    $decimal     = ' point ';
    $dictionary  = array(
        0                   => 'Zero',
        1                   => 'One',
        2                   => 'Two',
        3                   => 'Three',
        4                   => 'Four',
        5                   => 'Five',
        6                   => 'Six',
        7                   => 'Seven',
        8                   => 'Eight',
        9                   => 'Nine',
        10                  => 'Ten',
        11                  => 'Eleven',
        12                  => 'Twelve',
        13                  => 'Thirteen',
        14                  => 'Fourteen',
        15                  => 'Fifteen',
        16                  => 'Sixteen',
        17                  => 'Seventeen',
        18                  => 'Eighteen',
        19                  => 'Nineteen',
        20                  => 'Twenty',
        30                  => 'Thirty',
        40                  => 'Fourty',
        50                  => 'Fifty',
        60                  => 'Sixty',
        70                  => 'Seventy',
        80                  => 'Eighty',
        90                  => 'Ninety',
        100                 => 'Hundred',
        1000                => 'Thousand',
        1000000             => 'Million',
        1000000000          => 'Billion',
        1000000000000       => 'Trillion',
        1000000000000000    => 'Quadrillion',
        1000000000000000000 => 'Quintillion'
    );
   
    if (!is_numeric($number)) {
        return false;
    }
   
    if (($number >= 0 && (int) $number < 0) || (int) $number < 0 - PHP_INT_MAX) {
        // overflow
        trigger_error(
            'convert_number_to_words only accepts numbers between -' . PHP_INT_MAX . ' and ' . PHP_INT_MAX,
            E_USER_WARNING
        );
        return false;
    }

    if ($number < 0) {
        return $negative . convert_number_to_words(abs($number));
    }
   
    $string = $fraction = null;
   
    if (strpos($number, '.') !== false) {
        list($number, $fraction) = explode('.', $number);
    }
   
    switch (true) {
        case $number < 21:
            $string = $dictionary[$number];
            break;
        case $number < 100:
            $tens   = ((int) ($number / 10)) * 10;
            $units  = $number % 10;
            $string = $dictionary[$tens];
            if ($units) {
                $string .= $hyphen . $dictionary[$units];
            }
            break;
        case $number < 1000:
            $hundreds  = $number / 100;
            $remainder = $number % 100;
            $string = $dictionary[$hundreds] . ' ' . $dictionary[100];
            if ($remainder) {
                $string .= $conjunction . convert_number_to_words($remainder);
            }
            break;
        default:
            $baseUnit = pow(1000, floor(log($number, 1000)));
            $numBaseUnits = (int) ($number / $baseUnit);
            $remainder = $number % $baseUnit;
            $string = convert_number_to_words($numBaseUnits) . ' ' . $dictionary[$baseUnit];
            if ($remainder) {
                $string .= $remainder < 100 ? $conjunction : $separator;
                $string .= convert_number_to_words($remainder);
            }
            break;
    }
   
    if (null !== $fraction && is_numeric($fraction)) {
        $string .= $decimal;
        $words = array();
        foreach (str_split((string) $fraction) as $number) {
            $words[] = $dictionary[$number];
        }
        $string .= implode(' ', $words);
    }
   
    return $string;
}

		  


?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<style>
@page  
{ 
    size: auto;   /* auto is the initial value */ 

    /* this affects the margin in the printer settings */ 
    margin: 10mm 10mm 10mm 10mm;  
} 

body  
{ 
    /* this affects the margin on the content before sending to printer */ 
    margin: 0px;  
} </style>
</head>

<body>
<div align="center" style="font-size:12px"><font face="Arial, Helvetica, sans-serif">
<table cellpadding="0" cellspacing="0" style="100%">
<tr><td width="32%">

<table cellpadding="0" cellspacing="0" style="width:320px; border:1px #000000 solid">

<tr height="25"><td style="border-bottom:1px #000000 solid"><img src="http://www.gyanvihar.org/student-new/gv.jpg" width="300px" /></td></tr>
<tr><td><table cellpadding="0" cellspacing="0" width="100%"><tr height="25">
  <td width="54%" style="padding-left:5px">SID.No. <font face="Calibri"><?php echo $sid; ?></font></td>
<td width="46%">Session: 2017-2018</td>
</tr><tr height="25">
  <td width="54%" style="padding-left:5px">Date: <?php echo date('d-m-Y');?></td>
<td width="46%">
Valid For Today</td>
</tr>
</table></td></tr>
<tr height="25">
  <td style=" border-bottom:1px #000000 solid;padding-left:5px">Axis Bank A/c No: 910010042104192</td>
</tr>
<tr height="25"><td style=" padding-left:5px">AXIS BANK BRANCH..........................................</td></tr>
<tr height="25"><td style="border-bottom:1px #000000 solid; padding-left:5px ">Name of the Student: <?php echo $name; ?></td></tr>


<tr height="25">
  <td style="padding-left:5px ">Program: <?php 
  $GetCourse=mysql_query("SELECT * FROM `sgvu_courses` WHERE `course_id` = '$course'");
   $GetCourse1=mysql_fetch_assoc($GetCourse);
   echo $GetCourse1['coursename'];
   ?></td>
</tr>
<tr height="25">
  <td style="padding-left:5px ">Year/Sem: <?php echo $sem; ?> Sem</td>
</tr>
<tr height="25"><td style="padding-left:5px ">Father&acute;s Name: <?php echo $fname; ?></td></tr>
<tr height="25"><td style="padding-left:5px ">Mobile No. <?php echo $mobile; ?></td></tr>

<tr height="25"><td style="padding-left:5px "><div style="line-height:20px">(If pay by Cheque/DD)Cheque/DD No: <?php
if($mode <= 0)
{
echo '..........................';
}
else
{
echo $cheque_dd; 
}
?><br />
Name of Bank: 
<?php
if($mode <=0)
{
echo '....................................................................';
}
else
{
echo $bank; 
}
?><br />
Cheque/DD Amount: 
<?php
if($mode <=0)
{
echo '..........................................................';
}
else
{
echo $cd_amt; 
}
?></div></td></tr>



<tr height="25"><td style=" padding-top:20px" valign="top">

<table cellpadding="0" cellspacing="0" width="100%"><tr>
<td width="50%" style="padding-left:5px" valign="top">
<table cellpadding="0" cellspacing="0" width="100%" style="height:100px; border:1px #000000 solid"><tr>
<td align="" style="padding-left:3px" valign=""><div style="line-height:20px">Tution Fee: <?php  echo $fee1=$_REQUEST['fee']; ?><br />
Exam Fee: <?php echo $_REQUEST['exam']; ?><br />
Hostel Fee: <?php echo $_REQUEST['hostel']+00; ?><br />
Late Fee: <?php echo $_REQUEST['late']+00; ?><br />
Community Fee: <?php echo $_REQUEST['comm']+00; ?><br />
Bank Charges: <?php echo $_REQUEST['bank']+00; ?><br />

Total = <?php echo $tot=$_REQUEST['fee']+$_REQUEST['exam']+$_REQUEST['hostel']+$_REQUEST['late']+$_REQUEST['comm']+$_REQUEST['bank']; ?> </div></td>
</tr></table>
<br />
<table cellpadding="0" cellspacing="0" width="100%">
<tr><td>Scroll No ......................</td></tr>
<tr><td>Cashier ......................</td></tr>
</table></td><td valign="top" style=" padding-left:5px">

<table cellpadding="0" cellspacing="0" width="100%" style="border:1px solid #000000" >
<tr height="20"><td style="padding-left:5px"><font size="1">DENOMINATION OF NOTE </font></td></tr>
<tr height="20">
  <td style="padding-left:5px">1000 X ............ = ..............</td>
</tr>
<tr height="20"><td style="padding-left:5px">500 X .............. = ..............</td></tr>
<tr height="20"><td style="padding-left:5px">100 X .............. = ..............</td></tr>
<tr height="20"><td style="padding-left:5px">50 X .............. = ..............</td></tr>
<tr height="20"><td style="padding-left:5px">20 X .............. = ..............</td></tr>
<tr height="20"><td style="padding-left:5px">10 X .............. = ..............</td></tr>
<tr height="20"><td style="padding-left:5px">5 X .............. = ..............</td></tr>
<tr height="20"><td style="padding-left:5px">Total Amount in Words<br />
  <?php $amt_w = convert_number_to_words($tot); 
 echo str_replace("-","&nbsp;", $amt_w);
 ?></td>
</tr>
</table>

</td>


</tr></table>


</td>

</tr>
<tr><td style="padding:5px"><font  style="font-size:11px">University copy challan will be submit at university finance department.</font><br />
<div style="padding-top:7px">S.No.</div>
</td></tr>
<tr height="25"><td style=" "></td></tr>
</table>



</td>
<td width="1%"></td>
<td width="32%">

<table cellpadding="0" cellspacing="0" style="width:320px; border:1px #000000 solid">

<tr height="25"><td style="border-bottom:1px #000000 solid"><img src="http://www.gyanvihar.org/student-new/gv2.jpg" width="300px" /></td></tr>
<tr><td><table cellpadding="0" cellspacing="0" width="100%"><tr height="25">
  <td width="54%" style="padding-left:5px">SID.No. <font face="Calibri"><?php echo $GetDetails1['sid']; ?></font></td>
<td width="46%">2017-2018</td>
</tr><tr height="25">
  <td width="54%" style="padding-left:5px">Date: <?php echo date('d-m-Y');?></td>
<td width="46%">
Valid For Today</td>
</tr>
</table></td></tr>
<tr height="25">
  <td style=" border-bottom:1px #000000 solid;padding-left:5px">Axis Bank A/c No: 910010042104192</td>
</tr>
<tr height="25"><td style=" padding-left:5px">AXIS BANK BRANCH..........................................</td></tr>
<tr height="25"><td style="border-bottom:1px #000000 solid; padding-left:5px ">Name of the Student: <?php echo $name; ?></td></tr>


<tr height="25">
  <td style="padding-left:5px ">Program: <?php 
  $GetCourse=mysql_query("SELECT * FROM `sgvu_courses` WHERE `course_id` = '$course'");
   $GetCourse1=mysql_fetch_assoc($GetCourse);
   echo $GetCourse1['coursename'];
   ?></td>
</tr>
<tr height="25">
  <td style="padding-left:5px ">Year/Sem: <?php echo $sem; ?> Sem</td>
</tr>
<tr height="25"><td style="padding-left:5px ">Father&acute;s Name: <?php echo $fname; ?></td></tr>
<tr height="25"><td style="padding-left:5px ">Mobile No. <?php echo $mobile; ?></td></tr>

<tr height="25"><td style="padding-left:5px "><div style="line-height:20px">(If pay by Cheque/DD)Cheque/DD No: <?php
if($mode <=0)
{
echo '..........................';
}
else
{
echo $cheque_dd; 
}
?><br />
Name of Bank: 
<?php
if($mode <=0)
{
echo '....................................................................';
}
else
{
echo $bank; 
}
?><br />
Cheque/DD Amount: 
<?php
if($mode <=0)
{
echo '..........................................................';
}
else
{
echo $cd_amt; 
}
?></div></td></tr>



<tr height="25"><td style=" padding-top:20px" valign="top">

<table cellpadding="0" cellspacing="0" width="100%"><tr>
<td width="50%" style="padding-left:5px" valign="top">
<table cellpadding="0" cellspacing="0" width="100%" style="height:100px; border:1px #000000 solid"><tr>
<td align="" style="padding-left:3px" valign=""><div style="line-height:20px">Tution Fee: <?php  echo $fee1=$_REQUEST['fee']; ?><br />
Exam Fee: <?php echo $_REQUEST['exam']; ?><br />
Hostel Fee: <?php echo $_REQUEST['hostel']+00; ?><br />
Late Fee: <?php echo $_REQUEST['late']+00; ?><br />
Community Fee: <?php echo $_REQUEST['comm']+00; ?><br />
Bank Charges: <?php echo $_REQUEST['bank']+00; ?><br />

Total = <?php echo $tot=$_REQUEST['fee']+$_REQUEST['exam']+$_REQUEST['hostel']+$_REQUEST['late']+$_REQUEST['comm']+$_REQUEST['bank']; ?> </div></td>
</tr></table>
<br />
<table cellpadding="0" cellspacing="0" width="100%">
<tr><td>Scroll No ......................</td></tr>
<tr><td>Cashier ......................</td></tr>
</table></td><td valign="top" style=" padding-left:5px">

<table cellpadding="0" cellspacing="0" width="100%" style="border:1px solid #000000" >
<tr height="20"><td style="padding-left:5px"><font size="1">DENOMINATION OF NOTE </font></td></tr>
<tr height="20">
  <td style="padding-left:5px">1000 X ............ = ..............</td>
</tr>
<tr height="20"><td style="padding-left:5px">500 X .............. = ..............</td></tr>
<tr height="20"><td style="padding-left:5px">100 X .............. = ..............</td></tr>
<tr height="20"><td style="padding-left:5px">50 X .............. = ..............</td></tr>
<tr height="20"><td style="padding-left:5px">20 X .............. = ..............</td></tr>
<tr height="20"><td style="padding-left:5px">10 X .............. = ..............</td></tr>
<tr height="20"><td style="padding-left:5px">5 X .............. = ..............</td></tr>
<tr height="20"><td style="padding-left:5px">Total Amount in Words<br />
  <?php $amt_w = convert_number_to_words($tot); 
 echo str_replace("-","&nbsp;", $amt_w);
 ?></td>
</tr>
</table>

</td>


</tr></table>


</td>

</tr>
<tr><td style="padding:5px"><font  style="font-size:11px">University copy challan will be submit at university finance department.</font><br />
<div style="padding-top:7px">S.No.</div>
</td></tr>
<tr height="25"><td style=" "></td></tr>
</table>



</td>
<td width="1%"></td>
<td width="32%">

<table cellpadding="0" cellspacing="0" style="width:320px; border:1px #000000 solid">

<tr height="25"><td style="border-bottom:1px #000000 solid"><img src="http://www.gyanvihar.org/student-new/gv1.jpg" width="300px" /></td></tr>
<tr><td><table cellpadding="0" cellspacing="0" width="100%"><tr height="25">
  <td width="54%" style="padding-left:5px">SID.No. <font face="Calibri"><?php echo $GetDetails1['sid']; ?></font></td>
<td width="46%">2017-2018</td>
</tr><tr height="25">
  <td width="54%" style="padding-left:5px">Date: <?php echo date('d-m-Y');?></td>
<td width="46%">
Valid For Today</td>
</tr>
</table></td></tr>
<tr height="25">
  <td style=" border-bottom:1px #000000 solid;padding-left:5px">Axis Bank A/c No: 910010042104192</td>
</tr>
<tr height="25"><td style=" padding-left:5px">AXIS BANK BRANCH..........................................</td></tr>
<tr height="25"><td style="border-bottom:1px #000000 solid; padding-left:5px ">Name of the Student: <?php echo $name; ?></td></tr>


<tr height="25">
  <td style="padding-left:5px ">Program: <?php 
  $GetCourse=mysql_query("SELECT * FROM `sgvu_courses` WHERE `course_id` = '$course'");
   $GetCourse1=mysql_fetch_assoc($GetCourse);
   echo $GetCourse1['coursename'];
   ?></td>
</tr>
<tr height="25">
  <td style="padding-left:5px ">Year/Sem: <?php echo $sem; ?> Sem</td>
</tr>
<tr height="25"><td style="padding-left:5px ">Father&acute;s Name: <?php echo $fname; ?></td></tr>
<tr height="25"><td style="padding-left:5px ">Mobile No. <?php echo $mobile; ?></td></tr>

<tr height="25"><td style="padding-left:5px "><div style="line-height:20px">(If pay by Cheque/DD)Cheque/DD No: <?php
if($mode <=0)
{
echo '..........................';
}
else
{
echo $cheque_dd; 
}
?><br />
Name of Bank: 
<?php
if($mode <=0)
{
echo '....................................................................';
}
else
{
echo $bank; 
}
?><br />
Cheque/DD Amount: 
<?php
if($mode <=0)
{
echo '..........................................................';
}
else
{
echo $cd_amt; 
}
?></div></td></tr>



<tr height="25"><td style=" padding-top:20px" valign="top">

<table cellpadding="0" cellspacing="0" width="100%"><tr>
<td width="50%" style="padding-left:5px" valign="top">
<table cellpadding="0" cellspacing="0" width="100%" style="height:100px; border:1px #000000 solid"><tr>
<td align="" style="padding-left:3px" valign=""><div style="line-height:20px">Tution Fee: <?php  echo $fee1=$_REQUEST['fee']; ?><br />
Exam Fee: <?php echo $_REQUEST['exam']; ?><br />
Hostel Fee: <?php echo $_REQUEST['hostel']+00; ?><br />
Late Fee: <?php echo $_REQUEST['late']+00; ?><br />
Community Fee: <?php echo $_REQUEST['comm']+00; ?><br />
Bank Charges: <?php echo $_REQUEST['bank']+00; ?><br />

Total = <?php echo $tot=$_REQUEST['fee']+$_REQUEST['exam']+$_REQUEST['hostel']+$_REQUEST['late']+$_REQUEST['comm']+$_REQUEST['bank']; ?> </div></td>
</tr></table>
<br />
<table cellpadding="0" cellspacing="0" width="100%">
<tr><td>Scroll No ......................</td></tr>
<tr><td>Cashier ......................</td></tr>
</table></td><td valign="top" style=" padding-left:5px">

<table cellpadding="0" cellspacing="0" width="100%" style="border:1px solid #000000" >
<tr height="20"><td style="padding-left:5px"><font size="1">DENOMINATION OF NOTE </font></td></tr>
<tr height="20">
  <td style="padding-left:5px">1000 X ............ = ..............</td>
</tr>
<tr height="20"><td style="padding-left:5px">500 X .............. = ..............</td></tr>
<tr height="20"><td style="padding-left:5px">100 X .............. = ..............</td></tr>
<tr height="20"><td style="padding-left:5px">50 X .............. = ..............</td></tr>
<tr height="20"><td style="padding-left:5px">20 X .............. = ..............</td></tr>
<tr height="20"><td style="padding-left:5px">10 X .............. = ..............</td></tr>
<tr height="20"><td style="padding-left:5px">5 X .............. = ..............</td></tr>
<tr height="20"><td style="padding-left:5px">Total Amount in Words<br />
  <?php $amt_w = convert_number_to_words($tot); 
 echo str_replace("-","&nbsp;", $amt_w);
 ?></td>
</tr>
</table>

</td>


</tr></table>


</td>

</tr>
<tr><td style="padding:5px"><font  style="font-size:11px">University copy challan will be submit at university finance department.</font><br />
<div style="padding-top:7px">S.No.</div>
</td></tr>
<tr height="25"><td style=" "></td></tr>
</table>



</td></tr>






</table>
<br />
<script type="text/javascript">
    function printpage() {
        //Get the print button and put it into a variable
        var printButton = document.getElementById("printpagebutton");
        //Set the print button visibility to 'hidden' 
        printButton.style.visibility = 'hidden';
        //Print the page content
        window.print()
        //Set the print button to 'visible' again 
        //[Delete this line if you want it to stay hidden after printing]
        printButton.style.visibility = 'visible';
    }
</script>

 
<input id="printpagebutton" type="button" value="Print this page" onclick="printpage()"/></font>



</div>



</body>
</html>
