Advertisement
Guest User

Untitled

a guest
May 24th, 2017
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.42 KB | None | 0 0
  1. <title>Login - <?php echo Config::$_SITE_NAME; ?></title>
  2. </div>
  3. <div class="main-content">
  4. <div class="main-content-inner">
  5. <div class="breadcrumbs" id="breadcrumbs">
  6. <script type="text/javascript">
  7. try{ace.settings.check('breadcrumbs' , 'fixed')}catch(e){}
  8. </script>
  9.  
  10. <ul class="breadcrumb">
  11. <li>
  12. <i class="ace-icon fa fa-home home-icon"></i>
  13. <a href="<?php echo Config::$_PAGE_URL; ?>">Home</a>
  14. </li>
  15. <li class="active">Login page</li>
  16. </ul><!-- /.breadcrumb -->
  17.  
  18. <div class="nav-search" id="nav-search">
  19. <form method="POST" action="<?php echo Config::$_PAGE_URL; ?>search">
  20. <span class="input-icon">
  21. <input type="text" placeholder="Search ..." name="sname" id="username" type="submit" class="nav-search-input" autocomplete="on">
  22. <i class="ace-icon fa fa-search nav-search-icon"></i>
  23. </span>
  24. </form>
  25. </div> <!-- /.nav-search -->
  26. </div>
  27.  
  28. <div class="page-content">
  29. <div class="row-fluid">
  30. <div class="span12">
  31. <?php
  32. if(!defined('panel'))
  33. die('Nope.');
  34. if(isset($_SESSION['user'])) echo '<script> location.replace("'.Config::$_PAGE_URL.'"); </script>';
  35. if(isset($_POST['submit'])) {
  36. if(!$_POST['username_'] || !$_POST['password_']) {
  37. echo '<div class="alert alert-block alert-danger"><button type="button" class="close" data-dismiss="alert"><i class="ace-icon fa fa-times"></i></button>Complete all fields.</div>';
  38. } else {
  39. $q = Config::$g_con->prepare('SELECT * FROM `users` WHERE `name` = ? AND `password` = ?');
  40. $q->execute(array($_POST['username_'],$_POST['password_']));
  41. if($q->rowCount()) {
  42. $d = Config::$g_con->prepare('SELECT * FROM `panel_restrict` WHERE `PlayerName` = ?');
  43. $d->execute(array($_POST['username_']));
  44. $row1 = $d->fetch(PDO::FETCH_OBJ);
  45. if($d->rowCount() && date("Y-m-d H:i:s") <= gmdate("Y-m-d H:i:s", $row1->Time)) {
  46.  
  47. if($row1->Permanent == 1) {
  48. $expira = "<b>permanent</b>";
  49. } else {
  50. $expira = "pana la data de <b>". gmdate("Y-m-d H:i:s", $row1->Time) ."</b>";
  51. }
  52. echo '<div class="alert alert-block alert-danger">
  53. Contul tau este suspendat '.$expira.'.<br />
  54. Motiv: <b>'.$row1->Reason.'</b><br />
  55. Banat pe data de <b>'.$row1->BanTimeDate.'</b></div>';
  56. } else {
  57.  
  58. $dele = Config::$g_con->prepare("DELETE FROM panel_restrict WHERE PlayerName = ?");
  59. $dele->execute(array($_POST['username_']));
  60.  
  61. $row = $q->fetch(PDO::FETCH_OBJ);
  62. $_SESSION['user'] = $row->id;
  63.  
  64. echo '<script> location.replace("'.Config::$_PAGE_URL.'"); </script>';
  65. //setcookie ("user",$_POST['username_'],time()+3600*24*60);
  66. //setcookie ("password",$_POST['password_'],time()+3600*24*60);
  67. //header ('Location: ' . $_PAGE_URL);
  68. }
  69.  
  70. }
  71. else echo '<div class="alert alert-block alert-danger"><button type="button" class="close" data-dismiss="alert"><i class="ace-icon fa fa-times"></i></button>Invalid username or password.</div>';
  72. }
  73. }
  74. ?>
  75.  
  76. <center>
  77. <h3>Funky RPG Server login</h2>
  78. <form method="post" action="">
  79. <br />
  80. Username:<br>
  81. <input type="text" name="username_"/><br/>
  82. <br>Password:<br>
  83. <input type="password" name="password_"/><br/>
  84. <br>
  85. <input type="submit" name="submit" value="login" class="btn btn-inverse">
  86. </form>
  87. <br/>
  88. Forgot your password? Click <a href="<?php echo Config::$_PAGE_URL; ?>recover">here</a>!
  89. </center>
  90. <br/><br/>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement