Viewing file: receipt_printBACKUP.php (6.39 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php include ('receipt2.php'); ?>
<!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=utf-8" /> <title>Untitled Document</title> <script src="SpryAssets/SpryMenuBar.js" type="text/javascript"></script> <link href="SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" /> <style type="text/css"> a:link { text-decoration: none; } a:visited { text-decoration: none; } a:hover { text-decoration: none; } a:active { text-decoration: none; } body { background-color: #CCC; } </style> </head> <center> <body> <table width="953" border="0" bgcolor="#FFFFFF"> <tr> <td width="153"><img src="images/basera logo.jpg" width="101" height="100" /></td> <td width="537" align="center"><h1>WELCOME IN BASERA BRANCH</h1></td> </tr> <tr> <td colspan="2"><table width="945" border="0"> <tr> <td colspan="3" bgcolor="#CCCCCC"><?php include('menubar.php'); ?></td> </tr> <tr> <td width="210" bgcolor="#6699CC">Welcome <?php echo $login_session; ?></td> <td width="335" bgcolor="#6699CC"><a href="logout.php">Logout</a></td> <td width="386" bgcolor="#6699CC"><?php echo "Today is " . date("d/m/y") . "<br>";?></td> </tr> </table></td> </tr> <tr> <td colspan="2" align="left">
<script type="text/javascript">
function print1(strid) { if(confirm("Do you want to print?")) { var values = document.getElementById(strid); var printing = window.open('','','left=0,top=0,width=550,height=400,toolbar=0,scrollbars=0,sta?tus=0'); printing.document.write(values.innerHTML); printing.document.close(); printing.focus(); printing.print(); printing.close(); } } </script>
<div id="print2">
<?php $con=mysqli_connect("localhost","baserain_dba838","rb!bsa838mau","baserain_db838"); // Check connection if (mysqli_connect_errno()) { echo "Failed to connect to MySQL: " . mysqli_connect_error(); }
$sql = "INSERT INTO create_receipt (acc_no, receive_date, branch_name, mode_payment, cheque_no, bank_name, amount, noofinstallment) VALUES ('$_POST[account]', '$_POST[date]', '$_POST[branchname]', '$_POST[mpayment]', '$_POST[chequeno]', '$_POST[bankno]', '$_POST[amount]', '$_POST[noofinst]')";
if (!mysqli_query($con,$sql)) { die('Error: ' . mysqli_error($con)); }
mysqli_close($con); ?>
<?php
$var ="$_POST[accountname]" ; $trimmed = trim($var); //trim whitespace from the stored variable
// rows to return $limit=10;
// check for an empty string and display a message. if ($trimmed == "") { echo "<p>Please enter Registration No</p>"; exit; }
// check for a search parameter if (!isset($var)) { echo "<p>We dont seem to have a search parameter!</p>"; exit; } $con=mysqli_connect("localhost","baserain_dba838","rb!bsa838mau","baserain_db838"); // Check connection if (mysqli_connect_errno()) { echo "Failed to connect to MySQL: " . mysqli_connect_error(); } $field = 'acc_no'; $sql = "SELECT * FROM new_acc where $field like \"$trimmed\" order by $field";
$numresults=mysql_query($query); $numrows=mysql_num_rows($numresults); if ($numrows == 0) { echo " Sorry, $trimmed this Number is not found";
}
// next determine if s has been passed to script, if not use 0 if (empty($s)) { $s=0; }
// get results $query .= " limit $s,$limit"; $result = mysql_query($query) or die("Couldn't execute query");
// begin to show results set echo "<h3>Your Details:-</h3>"; $count = 1 + $s ;
// now you can display the results returned while ($row= mysql_fetch_array($result)) { $title = $row['certificate_no']." ".$row['serail_no']. "".$row['roll_no']. " " . $row['student_name']. " " .$row['date_of_birth']. " " .$row['issue_date']." ". $row['course_name'];
echo "<img src='images/basera logo.jpg' width='101' height='100' />"; echo "<table width=\"703\" border=\"0\">\n"; echo " <tr>\n"; echo " <td width=\"103\">Receipt</td>\n";
echo " <td width=\"166\">$receiptnew</td>\n"; echo " <td width=\"186\">Account Holder Name</td>\n"; echo " <td width=\'220\'>".$row['name']."</td>\n"; echo " </tr>\n"; echo " <tr>\n"; echo " <td>Account No</td>\n"; echo " <td>$_POST[accountname]</td>\n"; echo " <td>No Installment</td>\n"; echo " <td>".$row['no_installment']."</td>\n"; echo " </tr>\n"; echo " <tr>\n"; echo " <td>Address</td>\n"; echo " <td>".$row['address']."</td>\n"; echo " <td>Payment Mod</td>\n"; echo " <td>$_POST[mpayment]</td>\n"; echo " </tr>\n"; echo " <tr>\n"; echo " <td>Receipt Date</td>\n"; echo " <td>".$_POST[date]."</td>\n"; echo " <td>Bank</td>\n"; echo " <td>".$row['bank_name']."</td>\n"; echo " </tr>\n"; echo " <tr>\n"; echo " <td>Branch Name</td>\n"; echo " <td>".$login_session."</td>\n"; echo " <td>Next Ins. Date</td>\n"; echo " <td></td>\n"; echo " </tr>\n"; echo " <tr>\n"; echo " <td>Chque No</td>\n"; echo " <td>$_POST[chequeno]</td>\n"; echo " <td>Agent Code</td>\n"; echo " <td> </td>\n"; echo " </tr>\n"; echo " <tr>\n"; echo " <td>Ins. Time</td>\n"; echo " <td> </td>\n"; echo " <td> </td>\n"; echo " <td> </td>\n"; echo " </tr>\n"; echo " <tr>\n"; echo " <td>Amount</td>\n"; echo " <td>$_POST[amount]</td>\n"; echo " <td> </td>\n"; echo " <td> </td>\n"; echo " </tr>\n"; echo " <tr>\n"; echo " <td>Agent Name</td>\n"; echo " <td> </td>\n"; echo " <td> </td>\n"; echo " <td> </td>\n"; echo " </tr>\n"; echo " <tr>\n"; echo " <td>Duplicate Bill</td>\n"; echo " <td> </td>\n"; echo " <td> </td>\n"; echo " <td> </td>\n"; echo " </tr>\n"; echo " <tr>\n"; echo " <td> </td>\n"; echo " <td> </td>\n"; echo " <td>\n"; echo " </td>\n"; echo " <td> </td>\n"; echo " </tr>\n"; echo "</table>\n"; echo "\n"; } mysqli_close($con); ?> </div> <br/><br/>
<input type="button" name="printbutton" value="Prin table" onclick="return print1('print2')"/> </form>
</td> </tr> <tr> <td colspan="2" bgcolor="#CCCCCC"><p> </p> <form action=""> <input type="button" value="New" onclick="window.location.href='createaccount.php';"/> </form> <p> </p></td> </tr> </table>
</body></center> </html>
|