-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathresolve.php
More file actions
138 lines (123 loc) · 7.13 KB
/
Copy pathresolve.php
File metadata and controls
138 lines (123 loc) · 7.13 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
<section id="topbox">
<?php
$error_message = "";
if($_POST["submitBtn"]=="REQUEST VERIFICATION CODE" && $_POST["Mobile"]=="") {
$error_message .= 'You must fill in your registered mobile number.<br />';
}
if($_POST["submitBtn"]=="REQUEST VERIFICATION CODE" && $err=="1")
{
echo "<p align='center' style='color:#fff000; font-size:11px;'>".$error_message."</p>";
}
if(($_POST["Mobile"]=="" && $_POST["submitBtn"]=="REQUEST VERIFICATION CODE") || $_POST["submitBtn"]=="")
{
echo "<div style=' color:#fff; font-weight:bold; width: 98%; max-width:480px; padding:0%; margin-left:auto; margin-right:auto;' align='center'>";
echo "<form action='' method='POST'>";
echo "<div style='float: left; color:#fff; font-weight:normal; background-color:#1f1f1f; font-size:11px; width: 100%; margin:0px; padding:0px; border-radius:0px;'><div style='float: left; padding:7px;'>Welcome to UAgro.co! Fill the form below to recover your account:</div></div>";
echo "<div style='float: left; width: 98%; max-width:480px; padding:1%; color:#333; font-size:11px; font-weight:normal; background-color: #eee;'><table align='center' style='float: left;'>";
echo "<tr>";
echo "<td align='left'>";
echo "<b>YOUR REGISTERED MOBILE NUMBER: </b>";
echo "</td>";
echo "<td>";
echo "<input name='Mobile' type='text' size='25' value='".$_POST["Mobile"]."' style='margin:5px;' placeholder='eg +260977665544'>";
echo "</td>";
echo "</tr>";
echo "<tr>";
echo "<td align='left'>";
echo "<label><div style='background-color:#fff; margin:5px; padding:5px; width:120px;'>GET NEW CODE <input name='t_Type' type='radio' size='25' value='NEW' style='width:13px; height:13px;'></div></label>";
echo "<b></b>";
echo "</td>";
echo "<td>";
echo "<label><div style='background-color:#fff; margin:5px; padding:5px; width:140px;'>ALREADY HAVE CODE <input name='t_Type' type='radio' size='25' value='OLD' style='width:13px; height:13px;'></div></label>";
echo "</td>";
echo "</tr>";
echo "<tr>";
echo "<td width='50%'>";
echo "</td>";
echo "<td align='right' width='50%'>";
echo "<input name='submitBtn' class='button' type='submit' size='25' value='REQUEST VERIFICATION CODE' style='margin:5px; background-color:#888; font-weight: bold;'>";
echo "</td>";
echo "</tr>";
echo "</table></div>";
echo "</form></div>";
}
elseif($_POST["submitBtn"]=="REQUEST VERIFICATION CODE" && !($_POST["Mobile"]==""))
{
if($_POST["t_Type"]=="OLD")
{
echo "<div style=' color:#fff; font-weight:bold; width: 98%; max-width:480px; padding:0%; margin-left:auto; margin-right:auto;' align='center'>";
echo "<form action='' method='POST'>";
echo "<div style='float: left; color:#fff; font-weight:normal; background-color:#1f1f1f; font-size:11px; width: 100%; margin:0px; padding:0px; border-radius:0px;'><div style='float: left; padding:7px;'>Welcome to UAgro.co! Fill the form below to recover your account:</div></div>";
echo "<div style='float: left; width: 98%; max-width:480px; padding:1%; color:#333; font-size:11px; font-weight:normal; background-color: #eee;'><table align='center' style='float: left;'>";
echo "<tr>";
echo "<td align='left'>";
echo "<b>THE VERIFICATION CODE SENT TO YOUR MOBILE: </b>";
echo "</td>";
echo "<td>";
echo "<input name='Mobile' type='hidden' size='25' value='".$_POST["Mobile"]."'>";
echo "<input name='vCode' type='text' size='25' style='margin:5px;' placeholder='eg 01234'>";
echo "</td>";
echo "</tr>";
echo "<tr>";
echo "<td width='50%'>";
echo "</td>";
echo "<td align='right' width='50%'>";
echo "<input name='submitBtn' class='button' type='submit' size='25' value='VERIFY' style='margin:5px; background-color:#888; font-weight: bold;'>";
echo "</td>";
echo "</tr>";
echo "</table></div>";
echo "</form></div>";
}
elseif($_POST["t_Type"]=="NEW")
{
$vCode = genAccountVCode($_POST["Mobile"]);
if($vCode==0)
{
echo "<div style='float: left; color:#fff; font-weight:normal; background-color:#1f1f1f; font-size:11px; width: 100%; margin:0px; padding:0px; border-radius:0px;'><div style='float: left; padding:7px;'>Sorry. There is a problem with your account. Please contact the VPortal Support Team for help: support@vehicleportal.co.zm</div></div>";
}
elseif($vCode=="-1")
{
echo "<div style='float: left; color:#fff; font-weight:normal; background-color:#1f1f1f; font-size:11px; width: 100%; margin:0px; padding:0px; border-radius:0px;'><div style='float: left; padding:7px;'>Sorry. You have already generated a Verification Code. You can generate a new one after 15 minutes or you can contact the UAgro Support Team for help: support@uagro.co</div></div>";
}
else
{
sendVCode($_POST["Mobile"],$vCode);
echo "<div style=' color:#fff; font-weight:bold; width: 98%; max-width:480px; padding:0%; margin-left:auto; margin-right:auto;' align='center'>";
echo "<form action='' method='POST'>";
echo "<div style='float: left; color:#fff; font-weight:normal; background-color:#1f1f1f; font-size:11px; width: 100%; margin:0px; padding:0px; border-radius:0px;'><div style='float: left; padding:7px;'>Welcome to UAgro.co! Fill the form below to recover your account:</div></div>";
echo "<div style='float: left; width: 98%; max-width:480px; padding:1%; color:#333; font-size:11px; font-weight:normal; background-color: #eee;'><table align='center' style='float: left;'>";
echo "<tr>";
echo "<td align='left'>";
echo "<b>THE VERIFICATION CODE SENT TO YOUR MOBILE: </b>";
echo "</td>";
echo "<td>";
echo "<input name='Mobile' type='hidden' size='25' value='".$_POST["Mobile"]."'>";
echo "<input name='vCode' type='text' size='25' style='margin:5px;' placeholder='eg 01234'>";
echo "</td>";
echo "</tr>";
echo "<tr>";
echo "<td width='50%'>(Please note the code is valid only for 15 minutes from the time you request for it)";
echo "</td>";
echo "<td align='right' width='50%'>";
echo "<input name='submitBtn' class='button' type='submit' size='25' value='VERIFY' style='margin:5px; background-color:#888; font-weight: bold;'>";
echo "</td>";
echo "</tr>";
echo "</table></div>";
echo "</form></div>";
}
}
}
elseif($_POST["submitBtn"]=="VERIFY" && !($_POST["Mobile"]==""))
{
if(endActiveSession($_POST["vCode"],$_POST["Mobile"])==1)
{
echo "<div style='float: left; color:#fff; font-weight:normal; background-color:#1f1f1f; font-size:11px; width: 100%; margin:0px; padding:0px; border-radius:0px;'><div style='float: left; padding:7px;'>SUCCESS! YOUR PREVIOUS SESSION HAS BEEN ENDED FOR YOU. <a href='./?ref=login' class='button'>CLICK HERE</a> TO LOGIN</div></div>";
}
else
{
echo "<div style='float: left; color:#fff; font-weight:normal; background-color:#1f1f1f; font-size:11px; width: 100%; margin:0px; padding:0px; border-radius:0px;'><div style='float: left; padding:7px;'>Sorry. The Verification Code you have provided is not correct. You can generate a new one after 15 minutes or contact the Uagro Support Team for help: support@uagro.co</div></div>";
}
}
?>
<br class="clear"/>
</section>