Repository navigation
Expand file tree
/
Copy pathsubmit_without_payment.php
More file actions
312 lines (233 loc) · 12.2 KB
/
Copy pathsubmit_without_payment.php
File metadata and controls
312 lines (233 loc) · 12.2 KB
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
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
<?php
require '../vendor/autoload.php';
include("admin/config.php");
include('mailgun/RPAMailGun.php');
?>
<!DOCTYPE html>
<!--[if lt IE 7 ]><html class="ie ie6" lang="en"> <![endif]-->
<!--[if IE 7 ]><html class="ie ie7" lang="en"> <![endif]-->
<!--[if IE 8 ]><html class="ie ie8" lang="en"> <![endif]-->
<!--[if (gte IE 9)|!(IE)]><!--><html class="not-ie" lang="en"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<title>Get Your Real Estate Clients Pre Approved Online</title>
<meta name="description" content="RePreApproval, a revolution in real estate pre approval letters. Lenders and realtors, have your clients' pre approval letter modified and printed online">
<meta name="keywords" content="repreapproval, preapproval letters online, online preapproval letters, print preapproval letter, real estate, realtors, realtos, mortgage lender, lenders">
<?php include("includes/head.php"); ?>
</head>
<body>
<?php include_once("analyticstracking.php") ?>
<header>
<?php include("includes/header.php"); ?>
</header>
<?php
if(isset($_SESSION['upgradeplan']) and $_SESSION['upgradeplan']=='yes')
{
if($_SESSION['plan']=='platinumPlan')
{
$plan='Platinum Plan';
}
else if($_SESSION['plan']=='goldPlan')
{
$plan='Gold Plan';
}
else if($_SESSION['plan']=='silverPlan')
{
$plan='Silver Plan';
}
$date=0;
$pro='NO';
$initialpayment=0;
$Discount=$_SESSION['Discount'];
$tty= time();
$inser= mysql_query("update userthree set plan='".$_SESSION['plan']."' where id='".$_SESSION['logge']['id']."'");
if($inser)// send Plan Upgrade Message message
{
$LanderId=$_SESSION['logge']['id'];
$selec= mysql_fetch_assoc(mysql_query("select * from userthree where id = '".$LanderId."'"));
$_SESSION['logge']=$selec;
$insert=mysql_query("insert into companyinvoices(profile_id,lender_id,date_billing,amount,discount,exp_date,status)values('".$pro."','".$LanderId."','".$tty."','".$initialpayment."','".$_SESSION['Discount']."','".$date."','f')");
$subject= "Payment information";
$to= $_SESSION['email']['user_email'];
$from= "admin@repreapproval.com";
$mess= '<table width="550px">
<tr><td colspan="2" style="background-color:#93CE52"><img src="http://www.repreapproval.com/images/logo2.png" width="340px" style=""width:340px" /></td></tr>
<tr><td colspan="2" style="background-color:#045D92;height:10px"></td></tr>
<tr><td colspan="2" style="color:#000;">Hello '.$_SESSION['logge']['email'].',<br /><br/>This is the receipt for your membership plan upgrade at <strong>RePreApproval</strong>.<br/><br/>
Following is the details of your payment for your record.</td></tr>
<tr><td colspan="2"> </td></tr>
<tr><td><strong style="color:#000;">Payment Type</strong></td><td><strong style="color:#045D92;">Purchase</strong></td></tr>
<tr><td><strong style="color:#000;">Plan</strong></td><td><strong style="color:#045D92;">'.$plan.'</strong></td></tr>
<tr><td><strong style="color:#000;">Amount</strong></td><td><strong style="color:#045D92;">$0</strong></td></tr>
<tr><td><strong style="color:#000;">Discount</strong> <i>(if applicable)</i></td><td><strong style="color:#045D92;">$'.$_SESSION['Discount'].'</strong></td></tr>
<tr><td colspan="2"> </td></tr>
<tr><td colspan="2">If you require additional assistance, do not hesitate to email us or visit our <a href="http://www.repreapproval.com/faq.php" style="color:#26609E;text-decoration:none;">Frequently Asked Questions</a> page.</td></tr>
<tr><td colspan="2"> </td></tr>
<tr><td colspan="2">Thank you for choosing <strong>RePreApproval</strong>.</td></tr>
<tr><td colspan="2"> </td></tr>
<tr><td colspan="2">We wish you great success.</td></tr>
<tr><td colspan="2"> </td></tr>
<tr><td colspan="2">The Team at <strong>RePreApproval</strong></td></tr>
<tr><td colspan="2"> </td></tr>
<tr><td colspan="2" style="background-color:#93CE52;height:20px;color:#fff;text-align:center;font-weight:bold;">To login, simply go to the <a href="http://www.repreapproval.com/login.php" style="color:#26609E;text-decoration:none;"> Login Page</a>.</td></tr>
<tr><td colspan="2" style="background-color:#045D92;height:2px"></td></tr>
<tr><td colspan="2"> </td></tr>
</table>';
// $headers = 'MIME-Version: 1.0' . "\r\n";
// $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
// $headers .= 'From: '.$from. "\r\n";
// mail($to, $subject, $mess, $headers);
$mailgun = new RPAMailGun();
if($mailgun->mail($to, $subject, $mess, array('receipt','upgrade'))) {
}
}
$_SESSION['upgradeplan']='';
header('location:lenderdashboard.php?tab=profile');
}
else
{
if($_SESSION['plan']=='platinumPlan')
{
$plan='Platinum Plan';
}
else if($_SESSION['plan']=='goldPlan')
{
$plan='Gold Plan';
}
else if($_SESSION['plan']=='silverPlan')
{
$plan='Silver Plan';
}
//mail payment info to user
$subject= "Payment information";
$to= $_SESSION['user_email'];
$from= "admin@repreapproval.com";
$mess= '<table width="550px">
<tr><td colspan="2" style="background-color:#93CE52"><img src="http://www.repreapproval.com/images/logo2.png" width="340px" style=""width:340px" /></td></tr>
<tr><td colspan="2" style="background-color:#045D92;height:10px"></td></tr>
<tr><td colspan="2" style="color:#000;">Hello '.$_SESSION['first_name'].',<br /><br/>This is the receipt for your membership purchase at <strong>RePreApproval</strong>.<br/><br/>
Following is the details of your payment for your record.</td></tr>
<tr><td colspan="2"> </td></tr>
<tr><td><strong style="color:#000;">Payment Type</strong></td><td><strong style="color:#045D92;">Purchase</strong></td></tr>
<tr><td><strong style="color:#000;">Plan</strong></td><td><strong style="color:#045D92;">'.$plan.'</strong></td></tr>
<tr><td><strong style="color:#000;">Amount</strong></td><td><strong style="color:#045D92;">0</strong></td></tr>
<tr><td><strong style="color:#000;">Discount</strong> <i>(if applicable)</i></td><td><strong style="color:#045D92;">$'.$_SESSION['Discount'].'</strong></td></tr>
<tr><td colspan="2"> </td></tr>
<tr><td colspan="2">If you require additional assistance, do not hesitate to email us or visit our <a href="http://www.repreapproval.com/faq.php" style="color:#26609E;text-decoration:none;">Frequently Asked Questions</a> page.</td></tr>
<tr><td colspan="2"> </td></tr>
<tr><td colspan="2">Thank you for choosing <strong>RePreApproval</strong>.</td></tr>
<tr><td colspan="2"> </td></tr>
<tr><td colspan="2">We wish you great success.</td></tr>
<tr><td colspan="2"> </td></tr>
<tr><td colspan="2">The Team at <strong>RePreApproval</strong></td></tr>
<tr><td colspan="2"> </td></tr>
<tr><td colspan="2" style="background-color:#93CE52;height:20px;color:#fff;text-align:center;font-weight:bold;">To login, simply go to the <a href="http://www.repreapproval.com/login.php" style="color:#26609E;text-decoration:none;"> Login Page</a>.</td></tr>
<tr><td colspan="2" style="background-color:#045D92;height:2px"></td></tr>
<tr><td colspan="2"> </td></tr>
</table>';
// $headers = 'MIME-Version: 1.0' . "\r\n";
// $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
// $headers .= 'From: '.$from. "\r\n";
// mail($to, $subject, $mess, $headers);
$mailgun = new RPAMailGun();
if($mailgun->mail($to, $subject, $mess, array('receipt'))) {
}
//mail payment info finish
$date=0;
$pro='NO';
$initialpayment=0;
$Discount=$_SESSION['Discount'];
$tty= time();
if($_SESSION['first_name']!='' and $_SESSION['phone']!='' and $_SESSION['user_email']!='' and $_SESSION['pass1']!='' and $_SESSION['zip']!='')
{
$inser= mysql_query("insert into userthree (`firstname`, `lastname`, `companyname`, `phone`, `email`,`password`, `accounttype`, `street`, `suite`, `city`, `state`, `zip`, `comment`, `createdby`, `created`,license,DRE,plan) values ('".$_SESSION['first_name']."', '".$_SESSION['last_name']."', '".$_SESSION['company']."', '".$_SESSION['phone']."', '".$_SESSION['user_email']."','".$_SESSION['pass1']."', 'LENDER', '".$_SESSION['streetaddress']."', '".$_SESSION['suite']."', '".$_SESSION['city']."', '".$_SESSION['state']."', '".$_SESSION['zip']."', '".$_SESSION['comment']."', '', '".$tty."','".$_SESSION['nmls']."','".$_SESSION['dre']."','".$_SESSION['plan']."')");
}
if($inser)// send welcome message
{
$LanderId=mysql_insert_id();
$selec= mysql_fetch_assoc(mysql_query("select * from userthree where id = '".$LanderId."'"));
$_SESSION['logge']=$selec;
$insert=mysql_query("insert into companyinvoices ( profile_id, lender_id, date_billing,amount, discount, exp_date, status )values('".$pro."','".$LanderId."','".$tty."','".$initialpayment."','".$_SESSION['Discount']."','".$date."','f')");
$subject= "Welcome to RePreApproval - You have successfully registered";
$to= $_SESSION['user_email'];
$from= "admin@repreapproval.com";
$mess= '<table width="550px">
<tr><td colspan="2" style="background-color:#93CE52"><img src="http://www.repreapproval.com/images/logo2.png" width="340px" style="width:340px" /></td></tr>
<tr><td colspan="2" style="background-color:#045D92;height:10px"></td></tr>
<tr><td colspan="2" style="color:#000;">Congratulations! You have successfully registered with <strong>RePreApproval</strong>.</td></tr>
<tr><td colspan="2"> </td></tr>
<tr><td><strong style="color:#000;">Username</strong></td><td><strong style="color:#045D92;">'.$_SESSION['user_email'].'</strong></td></tr>
<tr><td><strong style="color:#000;">Password</strong></td><td><strong style="color:#045D92;">'.$_SESSION['pass1'].'</strong></td></tr>
<tr><td colspan="2"> </td></tr>
<tr><td colspan="2">Please keep your login information in a secured location.</td></tr>
<tr><td colspan="2"> </td></tr>
<tr><td colspan="2">If you require additional assistance, do not hesitate to email us or visit our <a href="http://www.repreapproval.com/faq.php">Frequently Asked Questions</a> page.</td></tr>
<tr><td colspan="2"> </td></tr>
<tr><td colspan="2">Thank you for choosing <strong>RePreApproval</strong>.</td></tr>
<tr><td colspan="2"> </td></tr>
<tr><td colspan="2">We wish you great success.</td></tr>
<tr><td colspan="2"> </td></tr>
<tr><td colspan="2">The Team at <strong>RePreApproval</strong></td></tr>
<tr><td colspan="2"> </td></tr>
<tr><td colspan="2" style="background-color:#93CE52;height:20px;color:#fff;text-align:center;font-weight:bold;">To login, simply click on this <a href="http://www.repreapproval.com/login.php">link</a>.</td></tr>
<tr><td colspan="2" style="background-color:#045D92;height:2px"></td></tr>
<tr><td colspan="2"> </td></tr>
</table>';
// $headers = 'MIME-Version: 1.0' . "\r\n";
// $headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";
// $headers .= 'From: '.$from. "\r\n";
// if(mail($to, $subject, $mess, $headers))
// {
// $_SESSION['first_name']='';
// $_SESSION['last_name']='';
// $_SESSION['company']='';
// $_SESSION['phone']='';
// $_SESSION['user_email']='';
// $_SESSION['plan']='';
// $_SESSION['nmls']='';
// $_SESSION['dre']='';
// $_SESSION['Discount']='';
// // $_SESSION['user_login']='';
// $_SESSION['pass1']='';
//
// $_SESSION['streetaddress']='';
// $_SESSION['suite']='';
// $_SESSION['city']='';
// $_SESSION['state']='';
// $_SESSION['zip']='';
// $_SESSION['comment']='';
// }
$mailgun = new RPAMailGun();
if($mailgun->mail($to, $subject, $mess, array('receipt', 'welcome'))) {
// $_SESSION['first_name']='';
$_SESSION['last_name']='';
$_SESSION['company']='';
$_SESSION['phone']='';
$_SESSION['user_email']='';
$_SESSION['plan']='';
$_SESSION['nmls']='';
$_SESSION['dre']='';
$_SESSION['Discount']='';
// $_SESSION['user_login']='';
$_SESSION['pass1']='';
$_SESSION['streetaddress']='';
$_SESSION['suite']='';
$_SESSION['city']='';
$_SESSION['state']='';
$_SESSION['zip']='';
$_SESSION['comment']='';
}
}
header('location:lenderdashboard.php?tab=profile');
}
?>
<div class="space60"></div>
<footer class="footer">
<?php
include("includes/topfooter.php");
include("includes/footer.php");
?>
</footer>
<?php include("includes/javascript.php"); ?>
</body>
</html>