1+ <!DOCTYPE html>
2+ <html lang="en">
3+ <head>
4+ <meta charset="UTF-8" />
5+ <meta name="viewport" content="width=device-width, initial-scale=0.7" />
6+ <link rel="icon" type="image/jpg" href="https://athena-dbms.42web.io/account/img/logo.ico" />
7+ <script
8+ src="https://kit.fontawesome.com/64d58efce2.js"
9+ crossorigin="anonymous"
10+ ></script>
11+ <script src="https://unpkg.com/sweetalert/dist/sweetalert.min.js"></script>
12+ <script src="https://athena-dbms.42web.io/account/js/sweetalert2.all.min.js"> </script>
13+ <script src="https://athena-dbms.42web.io/account/js/jquery-3.4.1.min.js"></script>
14+ <link rel="stylesheet" href="https://athena-dbms.42web.io/account/css/sweetalert2.min.css" />
15+ <script src="https://cdn.jsdelivr.net/npm/sweetalert2@9"></script>
16+ <link rel="stylesheet" href="css/style.css" />
17+ <script>
18+ $(document).bind("contextmenu",function(e) {
19+ e.preventDefault();
20+ });
21+ $(document).keydown(function(e){
22+ if(e.which === 123){
23+ return false;
24+ }
25+ });
26+ </script>
27+ <script language="text/javascript">
28+ document.onmousedown=disableclick;
29+ status="Right Click Disabled";
30+ function disableclick(event){
31+ if(event.button==2) {
32+ alert(status);
33+ return false; }
34+ }
35+ .</script>
36+ <script>
37+ document.addEventListener('contextmenu', event=> event.preventDefault());
38+ document.onkeydown = function(e) {
39+ if(event.keyCode == 123) {
40+ return false;
41+ }
42+ if(e.ctrlKey && e.shiftKey && e.keyCode == 'I'.charCodeAt(0)){
43+ return false;
44+ }
45+ if(e.ctrlKey && e.shiftKey && e.keyCode == 'J'.charCodeAt(0)){
46+ return false;
47+ }
48+ if(e.ctrlKey && e.keyCode == 'U'.charCodeAt(0)){
49+ return false;
50+ }
51+ }
52+ </script>
53+
54+ <title>HARIKET SHETH</title>
55+ </head>
56+ <body oncontextmenu="return false;" bgcolor="#6a6a6e">
57+ <?php
58+ session_start ();
59+ require_once ('connection.php ' );
60+ $ email =$ _POST ['uname ' ];
61+ $ test1 =$ _SESSION ['connectiondb ' ];
62+ $ fetch_data = "SELECT * FROM users WHERE username = ' " .$ _POST ['uname ' ]."' " ;
63+ $ run_query = mysqli_query ($ con , $ fetch_data );
64+ $ fetch_info = mysqli_fetch_assoc ($ run_query );
65+
66+ if (((strlen ($ _POST ['uname ' ]) == 0 ) && (strlen (md5 ($ _POST ['pass ' ])) == 0 )))
67+ {
68+ echo "<script>
69+ Swal.fire('Stop There!',
70+ 'Without entering details, you cannot access anything. Your IP address is copied & sent to Cyber Security Team. If it was done by mistake, please do not click the button without entering details next time',
71+ 'warning'
72+
73+ ).then((value) => {
74+ location.href='https://athena-dbms.42web.io/account/login.php'
75+ });</script> " ;
76+ }
77+
78+ else if ((strlen ($ _POST ['uname ' ]) != 0 ) || (strlen (md5 ($ _POST ['pass ' ])) != 0 ) ) {
79+
80+ if (($ _SESSION ['connectiondb ' ]=="false " ) ){
81+ ?>
82+
83+ <script>Swal.fire({
84+ title: 'Internal Server Issue !!',
85+ text: "We weren't able to connect to our servers at this point of time. Please try in some time.",
86+ icon: 'error',
87+ confirmButtonColor: '#d73',
88+ confirmButtonText: 'Continue'
89+ })
90+ .then((value) => {
91+ location.href='https://athena-dbms.42web.io/account/login.php'
92+ });
93+ </script>
94+ <?php
95+ }
96+
97+ else if (($ _SESSION ['connectiondb ' ]=="true " )){
98+
99+ if ($ _POST ['uname ' ]== $ fetch_info ['username ' ] && md5 ($ _POST ['pass ' ])==$ fetch_info ['codekey ' ] && $ fetch_info ['role_1 ' ]=="active " ){
100+ if ($ fetch_info ['status ' ]==1 ){
101+ $ _SESSION ['uname ' ]=$ _POST ['uname ' ];
102+ $ _SESSION ['last_login_timestamp ' ] = time ();
103+ $ _SESSION ['status ' ]="active " ;
104+ ?>
105+ <script>
106+ swal.fire( 'Greetings <?php echo $ fetch_info ['name ' ]; ?> ' ,
107+ 'You have successfully logged in.<br> Press the <b>OK</b> to continue to your account.<br>Please contact us if you face any difficulty.' ,
108+ 'success' )
109+ .then((value) => {
110+ location.href='welcome/index.php'
111+ });
112+ </script>
113+ <?php
114+ }
115+ else {
116+ echo "<script>
117+ Swal.fire('Account Not Verified !!',
118+ 'To maintain the integrity of portal and ensure security, it is mandatory to verify your identity. Hence, Please check your mail (<b>Including SPAM folder</b>) for the verification mail.<br><br><b>If you have not recieved the mail, its possible that you have entered the wrong mail ID. In that case, Please SIGN UP again carefully' ,
119+ 'info'
120+
121+ ).then((value) => {
122+ location.href='https://athena-dbms.42web.io/account/login.php'
123+ });</script> " ;
124+ }
125+ }
126+
127+
128+
129+ else if ($ _POST ['uname ' ]== $ fetch_info ['username ' ] && md5 ($ _POST ['pass ' ])==$ fetch_info ['codekey ' ] && $ fetch_info ['role_1 ' ]=="inactive " ){
130+ $ _SESSION ['uname ' ]=$ _POST ['uname ' ];
131+ $ _SESSION ['last_login_timestamp ' ] = time ();
132+ $ _SESSION ['status ' ]="inactive " ;
133+ ?>
134+ <script>Swal.fire({
135+ title: 'Greetings <?php echo $ fetch_info ['name ' ]; ?> ' ,
136+ text: 'Your account is temporarily banned because of suspicious activity. Please notify us at hariket.sukeshkumar2020@gmail.com if you want to re-activate your account' ,
137+ icon: 'warning',
138+ confirmButtonColor: '#d73',
139+ confirmButtonText: 'RE-ACTIVATE'
140+ })
141+ .then((value) => {
142+ location.href='mailto:hariket.sukeshkumar2020@gmail.com'
143+ location.href='https://athena-dbms.42web.io/account/login.php'
144+ });
145+ </script>
146+
147+ <?php
148+ }
149+
150+ else if ( ($ _POST ['uname ' ]==$ fetch_info ['username ' ] && md5 ($ _POST ['pass ' ])!=$ fetch_info ['codekey ' ]) && ((strlen ($ _POST ['uname ' ]) != 0 ) &&( (strlen (md5 ($ _POST ['pass ' ])) >= 6 ) ) )) {
151+ ?>
152+ <script>
153+ const swalWithBootstrapButtons = Swal.mixin({
154+ customClass: {
155+ confirmButton: 'btn btn-success',
156+ cancelButton: 'btn btn-danger'
157+ },
158+ buttonsStyling: true
159+ })
160+
161+ swalWithBootstrapButtons.fire({
162+ title: 'Incorrect Password',
163+ text: "Check the details sent on your mail. Have you entered correct Password?",
164+ icon: 'info',
165+ showCancelButton: true,
166+ confirmButtonColor: '#ec3e13',
167+ cancelButtonColor: '#00ad42',
168+ confirmButtonText: 'No, made mistake!',
169+ cancelButtonText: 'Yes, correct!',
170+ reverseButtons: true
171+ }).then((result) => {
172+ if (result.value) {
173+ swalWithBootstrapButtons.fire(
174+ 'Humans can make mistakes :)',
175+ 'You can enter the correct details and login to your account',
176+ 'success'
177+ )
178+ .then((value) => {
179+ location.href='https://athena-dbms.42web.io/account/login.php'
180+ });
181+ } else if (
182+
183+ result.dismiss === Swal.DismissReason.cancel
184+ ) {
185+ swalWithBootstrapButtons.fire(
186+ 'Sorry for the inconvenience',
187+ 'You can leave a mail at hariket.sukeshkumar2020@gmail.com.',
188+ 'error'
189+ )
190+ .then((value) => {
191+ location.href='https://athena-dbms.42web.io/account/login.php'
192+ });
193+ }
194+ })</script>
195+ <?php
196+ }
197+ else if ((strlen ($ _POST ['uname ' ]) > 0 ) && ($ _POST ['uname ' ]==$ fetch_info ['username ' ] && md5 ($ _POST ['pass ' ])!=$ fetch_info ['codekey ' ]) && ((strlen (md5 ($ _POST ['pass ' ])) > 0 ) &&( (strlen (md5 ($ _POST ['pass ' ])) < 6 ) ) )) {
198+ ?>
199+
200+
201+ <script>Swal.fire({
202+ title: 'PASSWORD ERROR:',
203+ text: "We will not permit you to enter the Portal. If you have lost your password then you can contact us!",
204+ icon: 'warning',
205+ showCancelButton: true,
206+ confirmButtonColor: '#06a944',
207+ cancelButtonColor: '#68bf00',
208+ confirmButtonText: 'Forgot Password'
209+ }).then((result) => {
210+ if (result.value) {
211+ Swal.fire({
212+ title: 'PASSWORD RECOVERY',
213+ text: "<?php echo $ fetch_info ['name ' ]; ?> proceed to contact us via mail. Please mention your name & username in the mail to get your password.",
214+ icon: 'success',
215+ confirmButtonText: 'Proceed',
216+ confirmButtonColor: '#06a944'
217+ })
218+
219+ .then((value) => {
220+ window.open("mailto:hariket.sukeshkumar2020@gmail.com?subject=LOST MY PORTAL PASSWORD");
221+ location.href='https://athena-dbms.42web.io/account/login.php'
222+ });
223+ }
224+ else {
225+ location.href='https://athena-dbms.42web.io/account/login.php'
226+ }
227+ }) </script>
228+ <?php
229+ }
230+ else if ((strlen (md5 ($ _POST ['pass ' ])) > 0 ) && (strlen ($ _POST ['uname ' ]) == 0 ))
231+ {
232+ ?>
233+ <script>Swal.fire({
234+ title: 'Where is your Username?',
235+ text: "Without entering Username, we will not permit you to enter the Portal.",
236+ icon: 'question',
237+ showCancelButton: true,
238+ confirmButtonColor: '#06a944',
239+ cancelButtonColor: '#68bf00',
240+ confirmButtonText: 'Lost my Username'
241+ }).then((result) => {
242+ if (result.value) {
243+ Swal.fire(
244+ 'Not an Issue',
245+ 'Your data & assignments are still safe with us. Please write a mail at hariket.sukeshkumar2020@gmail.com to get your username',
246+ 'success'
247+ )
248+ .then((value) => {
249+ window.open("mailto:hariket.sukeshkumar2020@gmail.com?subject=LOST MY PORTAL USERNAME");
250+ location.href='https://athena-dbms.42web.io/account/login.php'
251+ });
252+ }
253+ else {
254+ location.href='https://athena-dbms.42web.io/account/login.php'
255+ }
256+ }) </script>
257+ <?php
258+ }
259+ else if ((strlen ($ _POST ['uname ' ]) > 0 ) && (strlen (md5 ($ _POST ['pass ' ])) == 0 ))
260+ {
261+ ?>
262+ <script>Swal.fire({
263+ title: 'Where is your Password?',
264+ text: "Without entering Password, we will not permit you to enter the Portal.",
265+ icon: 'question',
266+ showCancelButton: true,
267+ confirmButtonColor: '#06a944',
268+ cancelButtonColor: '#68bf00',
269+ confirmButtonText: 'Lost my Password'
270+ }).then((result) => {
271+ if (result.value) {
272+ Swal.fire(
273+ 'Uhh.. Ohh !',
274+ 'Please write a mail at hariket.sukeshkumar2020@gmail.com to get your password. Please mention your username while requesting for password in the mail.',
275+ 'success'
276+ )
277+ .then((value) => {
278+ window.open("mailto:hariket.sukeshkumar2020@gmail.com?subject=LOST MY PORTAL PASSWORD");
279+ location.href='https://athena-dbms.42web.io/account/login.php'
280+ });
281+ }
282+
283+ else {
284+ location.href='https://athena-dbms.42web.io/account/login.php'
285+ }
286+ }) </script>
287+ <?php
288+ }
289+ else if (($ _POST ['uname ' ]!= $ fetch_info ['username ' ]) && (strlen (md5 ($ _POST ['pass ' ])) != 0 ) ){
290+ echo "<script>swal.fire( 'Sorry !!' ,
291+ 'This username does not exist. If you are a new member, then please SIGN UP first' ,
292+ 'error' )
293+ .then((value) => {
294+ location.href='https://athena-dbms.42web.io/account/login.php'
295+ });
296+ </script> " ;
297+ }
298+ else {
299+ echo "<script>swal.fire( 'Sorry !!' ,
300+ 'Error. Something unexpected as happened. Please wait, we will repair it soon' ,
301+ 'error' )
302+ .then((value) => {
303+ location.href='https://athena-dbms.42web.io/account/login.php'
304+ });
305+ </script> " ;
306+ }
307+
308+
309+
310+ }
311+ else {
312+ echo "<script>swal.fire( 'Sorry !!' ,
313+ 'Error. Something unexpected as happened. Please wait, we will repair it soon' ,
314+ 'error' )
315+ .then((value) => {
316+ location.href='https://athena-dbms.42web.io/account/login.php'
317+ });
318+ </script> " ;
319+ }
320+ }
321+ else
322+ {
323+ echo "<script>swal.fire( 'Sorry !!' ,
324+ 'Error. Something unexpected as happened. Please wait, we will repair it soon' ,
325+ 'error' )
326+ .then((value) => {
327+ location.href='https://athena-dbms.42web.io/account/login.php'
328+ });
329+ </script> " ;
330+ }
331+ ?>
332+
333+ </body>
334+ </html>
0 commit comments