Advertisement
Guest User

Untitled

a guest
May 19th, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.38 KB | None | 0 0
  1. <?php
  2. session_start();
  3. print <<<EOF
  4. <html>
  5. <head>
  6. <title>Future wonders</title>
  7. <script language="JavaScript">
  8. <!--
  9.  
  10. function getCookieVal (offset) {
  11. var endstr = document.cookie.indexOf (";", offset);
  12. if (endstr == -1)
  13. endstr = document.cookie.length;
  14. return unescape(document.cookie.substring(offset, endstr));
  15. }
  16. function GetCookie (name) {
  17. var arg = name + "=";
  18. var alen = arg.length;
  19. var clen = document.cookie.length;
  20. var i = 0;
  21. while (i < clen) {
  22. var j = i + alen;
  23. if (document.cookie.substring(i, j) == arg)
  24. return getCookieVal (j);
  25. i = document.cookie.indexOf(" ", i) + 1;
  26. if (i == 0) break;
  27. }
  28. return null;
  29. }
  30. function SetCookie (name,value,expires,path,domain,secure) {
  31. document.cookie = name + "=" + escape (value) +
  32. ((expires) ? "; expires=" + expires.toGMTString() : "") +
  33. ((path) ? "; path=" + path : "") +
  34. ((domain) ? "; domain=" + domain : "") +
  35. ((secure) ? "; secure" : "");
  36. }
  37.  
  38. function DeleteCookie (name,path,domain) {
  39. if (GetCookie(name)) {
  40. document.cookie = name + "=" +
  41. ((path) ? "; path=" + path : "") +
  42. ((domain) ? "; domain=" + domain : "") +
  43. "; expires=Thu, 01-Jan-70 00:00:01 GMT";
  44. }
  45. }
  46. // -->
  47. </script>
  48.  
  49. <script language="JavaScript">
  50. var usr;
  51. var pw;
  52. var sv;
  53. function getme()
  54. {
  55. usr = document.login.username;
  56. pw = document.login.password;
  57. sv = document.login.save;
  58.  
  59. if (GetCookie('player') != null)
  60. {
  61. usr.value = GetCookie('username')
  62. pw.value = GetCookie('password')
  63. if (GetCookie('save') == 'true')
  64. {
  65. sv[0].checked = true;
  66. }
  67. }
  68.  
  69. }
  70. function saveme()
  71. {
  72. if (usr.value.length != 0 && pw.value.length != 0)
  73. {
  74. if (sv[0].checked)
  75. {
  76. expdate = new Date();
  77. expdate.setTime(expdate.getTime()+(365 * 24 * 60 * 60 * 1000));
  78. SetCookie('username', usr.value, expdate);
  79. SetCookie('password', pw.value, expdate);
  80. SetCookie('save', 'true', expdate);
  81. }
  82. if (sv[1].checked)
  83. {
  84. DeleteCookie('username');
  85. DeleteCookie('password');
  86. DeleteCookie('save');
  87. }
  88. }
  89. else
  90. {
  91. alert('You must enter a username/password.');
  92. return false;
  93. }
  94. }
  95. </script>
  96. <style>
  97. body { font-family:Verdana;font-size:9pt;color: lime;
  98. background-color:#000000;
  99. scrollbar-base-color: #00ff00;
  100. scrollbar-arrow-color: #00ff00;
  101. scrollbar-DarkShadow-Color: #ffffff; }
  102. a:visited,a:active,a:hover,a:link { color: lime;text-decoration: none; }
  103. table,tr,td { font-size:9pt; }
  104. { border:none; }
  105. </style>
  106. </head>
  107. <body onload=getme();><img src=>
  108.  
  109. "<center><h2>The Day After</h2></center>
  110. <table width=80%><tr><td width=50%><fieldset><legend>About us</legend>You've seen online games, but not like this.
  111. Future wonders takes you into what the future could look like, where robots and flying cars are not a dream, there reality.
  112. Where people will no longer suffer, where the world will be a better place, and people can live together in hermany...or that's what we hoped.
  113. </fieldset></td><td>
  114.  
  115. <fieldset><legend>Login</legend> <form action=authenticate.php method=post name=login onsubmit=\"return saveme();\">Username: <input type=text name=username><br>
  116. Password: <input type=password name=password ><br>
  117. <input type=submit value=Submit></form></fieldset></td></tr></table><br>
  118. <h3>Not a user?
  119. <a href='register.php'>REGISTER NOW!</a></h3><br />
  120. <i><center> Copyright &copy; 2010 Future wonders.</center></i>
  121.  
  122. <?></html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement