-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpayment.php
executable file
·157 lines (129 loc) · 4.58 KB
/
payment.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
<?php
session_start();
include_once('connect_db.php');
if(isset($_SESSION['username'])){
$id=$_SESSION['cashier_id'];
$fname=$_SESSION['first_name'];
$lname=$_SESSION['last_name'];
$sid=$_SESSION['staff_id'];
$user=$_SESSION['username'];
}else{
header("location:http://".$_SERVER['HTTP_HOST'].dirname($_SERVER['PHP_SELF'])."/index.php");
exit();
}
?>
<!DOCTYPE html>
<html>
<head>
<title><?php echo $user;?>Agadi Sunrise Hospital</title>
<link rel="stylesheet" type="text/css" href="style/mystyle.css">
<link rel="stylesheet" href="style/style.css" type="text/css" media="screen" />
<link rel="stylesheet" href="style/table.css" type="text/css" media="screen" />
<script src="js/function.js" type="text/javascript"></script>
<script type="text/javascript" SRC="js/jquery-1.4.2.min.js"></script>
<script type="text/javascript" SRC="js/superfish/hoverIntent.js"></script>
<script type="text/javascript" SRC="js/superfish/superfish.js"></script>
<script type="text/javascript" SRC="js/superfish/supersubs.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("ul.sf-menu").supersubs({
minWidth: 12,
maxWidth: 27,
extraWidth: 1
}).superfish();
});
</script>
<script SRC="js/cufon-yui.js" type="text/javascript"></script>
<script SRC="js/Liberation_Sans_font.js" type="text/javascript"></script>
<script SRC="js/jquery.pngFix.pack.js"></script>
<script type="text/javascript">
Cufon.replace('h1,h2,h3,h4,h5,h6');
Cufon.replace('.logo', { color: '-linear-gradient(0.5=#FFF, 0.7=#DDD)' });
</script>
<style>#left-column {height: 477px;}
#main {height: 500px;}
</style>
</head>
<body>
<div id="content">
<div id="header">
<h1><a href="#"><img src="images/ash.gif"></a>Agadi Sunrise Hospital</h1></div>
<div id="left_column">
<div id="button">
<ul>
<li><a href="cashier.php">Dashboard</a></li>
<li><a href="payment.php"target="_top">Process payment</a></li>
<li><a href="logout.php">Logout</a></li>
</ul>
</div>
</div>
<div id="main">
-- <div id="tabbed_box" class="tabbed_box">
<h4> Manage Payments</h4>
<hr/>
<div class="tabbed_area">
<ul class="tabs">
<li><a href="javascript:tabSwitch('tab_1', 'content_1');" id="tab_1">Process payments</a></li>
</ul>
<script>
$(document).ready(function()
{
$("#invoice_no").change(function()
{
var invoice_no=$("#invoice_no").val();
if(invoice_no.length >0)
{
$.ajax(
{
type: "POST", url: "check.php", data: 'invoice_no='+invoice_no , success: function(msg)
{
$("#viewer2").ajaxComplete(function(event, request, settings)
{
if(msg)
{
$(this).html(msg);
}
else
{
$(this).html('<font color="red"><strong>Invoice does not exist</strong></font>');
}
});
}
});
}
});
});
</script>
<?php
$_SESSION['invoice_no']=$invoice_no;
$_SESSION['amount']=$amount;
$_SESSION['payType']=$payType;
$_SESSION['serial_no']=$serial_no;
?>
<div id="content_1" class="content">
<div id="viewer1"><span id="viewer2"></span></div>
<form name="myform" onsubmit="return validateForm(this);" action="receipt.php" method="post" >
<table width="220" height="106" border="0" >
<tr><td ><input name="invoice_no" type="text" style="width:170px" placeholder="Invoice No" required="required" id="invoice_no" /></td></tr>
<tr><td ><input name="amount" type="text" style="width:170px" placeholder="Amount" required="required" id="amount"/></td></tr>
<tr><td ><?php
echo"<select class=\"input-small\" name=\"payType\" style=\"width:170px\" id=\"payment_type\">";
$getpayType=mysql_query("SELECT Name FROM paymentTypes");
echo"<option>Select Payment</option>";
while($pType=mysql_fetch_array($getpayType))
{
echo"<option>".$pType['Name']."</option>";
}
echo"</select>";?> </td></tr>
<tr><td ><input name="serial_no" type="text" style="width:170px" placeholder="Serial No" id="serial_no" /></td></tr>
<tr><td><input name="tuma" id="tuma" type="submit" value="Submit"/></td></tr>
</table>
</form>
</div>
</div>
</div>
</div>
<div id="footer" align="Center">Developed by IT$ MINE</div>
</div>
</body>
</html>