Guest User

Untitled

a guest
May 10th, 2018
240
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.50 KB | None | 0 0
  1. <?PHP
  2.  
  3. $id = "username";
  4. $pw = "123456789";
  5.  
  6. echo "<head>";
  7. echo '<style type="text/css">
  8.    <!--
  9.  
  10. body {
  11.     background-color:#AFEEEE;
  12.     }
  13.  
  14. .textbox {
  15.     background-color : #f8f8f8;
  16.     border : 1px solid #ccc;
  17.     }
  18. .button {
  19.     background-position: center;
  20.     //background-color: #9BCCCA;
  21.     }
  22. }
  23.  
  24.  
  25.    -->
  26.  </style>';
  27.  
  28. echo "</head>";
  29.  
  30. if (isset($_GET["login"]))
  31. {
  32. //Einlogg-Funktion
  33.  
  34.     $username = $_POST['username'];
  35.     $password = $_POST['password'];
  36.    
  37.  
  38.     if ($password == $pw and $username == $id)
  39.     {
  40.         echo '<meta http-equiv="refresh" content="0; URL=index_ok.php">';
  41.     }
  42.     else
  43.     {
  44.         echo '<meta http-equiv="refresh" content="0; URL=index_wrong.php">';
  45.     }
  46. }
  47.  
  48. echo "<div id='login'><form name='post' method='post' action='admincp.php?login'>
  49. <table frame='box' width='100px' align='center'>
  50.     <tr>
  51.         <td colspan='2'><h2 style='color:#A4A4A4' align='left'><b>Admin CP - Login</b></h1></td>
  52.     </tr>
  53.     <tr valign='middle'>
  54.         <td class='tbl2' align='center'>Userame:</td>
  55.         <td class='tbl2' align='center'><input type='text' name='username' value='".$username."' maxlength='50' class='textbox' style='width: 180px;'></td>
  56.     </tr>
  57.     <tr>
  58.         <td class='tbl2' align='center'>Password:</td>
  59.         <td class='tbl2' align='center'><input type='password' name='password' maxlength='50' class='textbox' style='width: 180px;'></td>
  60.     </tr>
  61.     <tr>
  62.         <td class='tbl2' align='center'> </td>
  63.         <td align='right'><input name='login' value='Login' type='submit' class='button'></td>
  64.     </tr>
  65. </table>
  66. </div>";
  67. ?>d
Add Comment
Please, Sign In to add comment