forked from rahulyhg/Deal4loans
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathBillingAdmin.php
176 lines (147 loc) · 4.06 KB
/
BillingAdmin.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
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
<?php
require 'scripts/db_init.php';
require 'scripts/functions.php';
// require 'scripts/session_checkBilling.php';
session_start();
$Msg = "";
if ($_SERVER['REQUEST_METHOD'] == 'POST')
formHandler();
function formHandler(){
foreach($_POST as $a=>$b)
$$a=$b;
$sql = "select * from Billing_User where Billing_UserName='$UserName' and Billing_Password='$PWD'";
//$result = ExecQuery($sql);
list($rowscount,$row)=MainselectfuncNew($sql,$array = array());
$cntr=0;
$num_rows = count($row);
if($num_rows > 0){
/* Get Resultset */
//$row = mysql_fetch_array($result);
$_SESSION['UserName'] = $row[$cntr]['Billing_UserName'];
$_SESSION['Name'] = $row[$cntr]['Billing_Name'];
$_SESSION['UName'] = $row[$cntr]['Billing_Name'];
$_SESSION['TMU_ID'] = $row[$cntr]['Billing_ID'];
$IP = getenv("REMOTE_ADDR");
//echo $sql;
// echo $_SESSION['ReplyType'];
/* Redirect browser */
$strDir = dir_name();
header("Location: http://".$_SERVER['HTTP_HOST'].$strDir."billing_index.php");
exit;
}
else{
global $Msg;
$Msg = "** Invalid UserName. Please try again **";
}
}
?>
<?php
$agent = getenv("HTTP_USER_AGENT");
if (preg_match("/MSIE/i", $agent)) {
?>
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
<title>Login(Billing Administration)</title>
<script Language="JavaScript" Type="text/javascript" src="scripts/common.js"></script>
<link href="includes/style1.css" rel="stylesheet" type="text/css">
<link href="style.css" rel="stylesheet" type="text/css" />
<?php include '~TopTM.php';?>
<div id="dvMainbanner">
</div>
<!-- End Main Banner Menu Panel -->
<!-- Start Main Container Panel -->
<div id="dvContentPanel">
<div id="dvMaincontent"><Script Language="JavaScript">
function validateMe(theFrm){
if(!checkData(theFrm.Email, 'Email', 4))
{
return false;
}
var str=theFrm.Email.value
var aa=str.indexOf("@")
var bb=str.indexOf(".")
var cc=str.charAt(aa)
if(aa==-1)
{
alert("Please enter the valid Email Address");
theFrm.Email.focus();
return false;
}
else if(bb==-1)
{
alert("Please enter the valid Email Address");
theFrm.Email.focus();
return false;
}
if(!checkData(theFrm.PWD, 'Password', 3))
return false;
return true;
}
</Script>
<div align="center">
<table width="100%" border="0" cellspacing="0" cellpadding="0" style="border-collapse: collapse" bordercolor="#111111">
<tr>
<td align="center" width="100%">
<table width="100%" border="0">
<?php
if(isset($_GET['lv']))
{
echo "<tr><td>".$_GET['lv']."</td></tr>";
}
?>
<tr><td width="140"> </td>
<td align="center">
<form method="post" action="<? echo $_SERVER['PHP_SELF'] ?>" onSubmit="return validateMe(this);">
<p> </p>
<p> </p>
<table width="250" border="0" cellpadding="4" cellspacing="0" class="blueborder" id="frm">
<tr>
<td colspan="2" class="head1">Login </td>
</tr>
<tr>
<td colspan="2" align="center" id="Alert"> <span class="bodyarial11"><? echo $Msg ?></span></td>
</tr>
<tr>
<td width="50%" class="bodyarial11">User Name</td>
<td width="50%"><input type="text" name="UserName" size="20" maxlength="50"></td>
</tr>
<tr>
<td width="50%" class="bodyarial11">Password</td>
<td width="50%"><input type="password" name="PWD" size="20" maxlength="50"></td>
</tr>
<tr>
<td width="100%" colspan="2" align="center"><input type="submit" class="bluebutton" value="Submit"></td>
</tr>
</table>
</form></td>
</table>
</td>
<tr>
<td> </td></tr>
<tr>
<td> </td></tr>
<tr>
<td> </td></tr>
<tr>
<td align="center" width="100%">
<table width="100%" border="0">
<tr><td width="140"> </td>
</table>
</td>
</tr>
</table>
</div>
<?php //include '~Right1.php';?>
</div>
</div>
<?php // include '~Bottom.php';?>
</body>
</html>
</html>
<?php
} else {
echo "Browser Specific Viewed Only on Internet Explorer";
}
?>