Просмотр файла fastwap/admin/index.php

Размер файла: 3.04Kb
  1. <?php
  2. include "../../../fastwap.inc.php";
  3.  
  4. //============================================================================
  5. //Fastwap v.1.3 - a Linkmamager for WAP-Phones
  6. //Copyright (C) 2001/2002 webDessert.ch <fastwap@webdessert.ch>
  7. //
  8. // This program is free software; you can redistribute it and/or
  9. // modify it under the terms of the GNU General Public License
  10. // as published by the Free Software Foundation; either version 2
  11. // of the License, or (at your option) any later version.
  12. //
  13. // This program is distributed in the hope that it will be useful,
  14. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  16. // GNU General Public License for more details.
  17. //
  18. // You should have received a copy of the GNU General Public License
  19. // along with this program; if not, write to the Free Software
  20. // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 021111307, USA.
  21. // ==============================================================================
  22.  
  23.  
  24. if(!$Submit){
  25. setcookie ("password_admin", "", time() - 3600);
  26. setcookie ("username_admin", "", time() - 3600);
  27. }
  28.  
  29. if($Submit){
  30. $pwo_admin = md5($pwo_admin);
  31. setcookie ("password_admin", $pwo_admin, time() + 3600);
  32. setcookie ("username_admin", $u_admin, time() + 3600);
  33. }
  34. ?>
  35. <?
  36.  
  37. if($Submit)
  38. {
  39.  
  40. if(!$u_admin)
  41. {
  42. echo("Please insert your username.");
  43. exit();
  44. }
  45. if(!$pwo_admin)
  46. {
  47. echo("Please insert your password.");
  48. exit();
  49. }
  50.  
  51. echo("<html><head>");
  52. echo("<meta http-equiv=\"refresh\" content=\"0; URL=admin.php\">");
  53. echo("<meta http-equiv=\"Pragma\" content=\"no-cache\">");
  54. echo("<meta http-equiv=\"expires\" content=\"0\">");
  55. echo("</head><body>");
  56.  
  57.  
  58. }
  59.  
  60.  
  61. //Form
  62. if(!$Submit)
  63. {
  64. echo "<html><head><title>Admin Login Fastwap</title>
  65. <meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">
  66. <link rel=\"STYLESHEET\" media=\"screen\" href=\"../site.css\" type=\"text/css\">
  67. </head>
  68. <body bgcolor=\"#ffffff\" text=\"#000000\" marginwidth=\"3\" marginheight=\"3\">
  69. <table width=\"700\" border=\"0\" cellspacing=\"7\" cellpadding=\"0\">
  70. <tr>
  71. <td valign=\"top\" colspan=\"2\" height=\"37\">
  72. <b><div class=\"title\"> Fastwap Login</div></b>
  73. <div class=\"content\">
  74. </div></td></tr><tr>
  75. <td valign=\"top\" colspan=\"2\" height=\"57\">
  76. <form name=\"loginform\" method=\"post\" action=\"$PHP_SELF\">
  77. <table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">
  78. <tr>
  79. <td height=\"33\" width=\"110\">Username</td>
  80. <td height=\"33\">
  81. <input type=\"text\" name=\"u_admin\" class=\"form\">
  82. </td></tr><tr>
  83. <td>Password<br> (Case sensitive)</td>
  84. <td>
  85. <input type=\"password\" name=\"pwo_admin\" class=\"form\">
  86. </td></tr><tr>
  87. <td>&nbsp;</td>
  88. <td><input type=\"submit\" name=\"Submit\" value=\"Login\" class=\"button\">
  89. </td></tr><tr>
  90. <td>&nbsp;</td><td><br>
  91. </p></td></tr></table> <p><br><br></p></form>
  92. </td></tr></table>
  93. <br><br><br><br>
  94. <div class=\"bottom\">fastwap by <a href=\"http://www.webdessert.ch\" target=\"_blank\">Nico Schefer, 2001</div>
  95. </body></html>";
  96. }
  97. ?>