Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 122 lines (102 sloc) 3.295 kb
d9cc0c9 Vincent van Haaff adding to github
authored
1 <?php
2 ##############################################################################################
3 ##Please go through the script prior to use as multiple customizations are required.
4 ##The HTML for the form can be completely modified please feel free to chnage them.
5 ##If you require additional support or would like new features then please E-mail me webmaster@spiders-design.co.uk
6 ##############################################################################################
7
8 session_start();
9 if(isset($_REQUEST['password'])){
10 $password = $_REQUEST['password'];
11 //change password value
12 if($password == "<yourpassword>") {//---------------------------------------------edit required
13 $_SESSION['authenticated'] = "yes";
14 $do = "redirect";
15 }
16 else {
17 $do = "incorrect";
18 }
19 }
20 else{
21 $do = "showform";
22 }
23 //done processing
24 if($do == "showform"){
25 $formhtml = <<<EOT
26 <html>
27
28 <head>
29 <title>Your Site | Login</title>
30 <style type="text/css">
31 body {
32 /* background: url(http://yoursite.com/images/1.jpg) no-repeat; */
33 background-size: 100%;
34 font-family:Verdana, Geneva, sans-serif;
35 }
36 #form {
37 opacity: 0.5;filter:alpha(opacity=50);zoom:1;
38 }
39 #form:hover {
40 opacity: 0.8;filter:alpha(opacity=80);zoom:1;
41 }
42 </style>
43 </head>
44
45 <body>
46
47 <img src="http://coccoon.flyingoctopus.net/flyingoctopus_little.png" style="float:right; position:absolute; right:10%;" alt="Coming Soon">
48 <div class="form" style="position:absolute; width:450px; height:430px; margin: -215px 0 0 -397.5px; left: 50%; top: 50%;">
49 <img src="http://coccoon.flyingoctopus.net/mind_blown.gif" alt="Coming Soon">
50
51
52 <div style="position:absolute;width:300px; height: 300px; margin:-150px 0 0 -150px; left:50%; top: 90%; font-size: 8px;">
53 <form method="post" action="http://coccoon.flyingoctopus.net/login.php">
54 <br /><input type="password" title="Enter your password" name="password" /></p>
55 <p><input type="submit" name="submit" /></p>
56 </form>
57 </div>
58
59 </div>
60
61
62 </body>
63
64 </html>
65 EOT;
66 echo($formhtml);
67 }
68 else if($do == "incorrect") {
69 $formhtml = <<<formhtml
70 <html>
71
72 <head>
73 <title>Your Site | Login</title>
74 <style type="text/css">
75 body {
76 background: url(http://coccoon.flyingoctopus.net/images/1.jpg) no-repeat;
77 background-size: 100%;
78 font-family:Verdana, Geneva, sans-serif;
79 }
80 #form {
81 opacity: 0.5;filter:alpha(opacity=50);zoom:1;
82 }
83 #form:hover {
84 opacity: 0.8;filter:alpha(opacity=80);zoom:1;
85 }
86 </style>
87 </head>
88
89 <body>
90
91 <img src="http://coccoon.flyingoctopus.net/flyingoctopus_little.png" style="float:right; position:absolute; right:10%;" alt="Coming Soon">
92
93 <div align="center" id="form" class="form"style="margin-top:400px; margin-left:40%; margin-right:40%;; background-color:#000; color:#FFF"><h2>Your Site Login</h2>
94 <form action="login.php" method="post">
95 <div style="color:#F00" >Incorrect password</div>
96 Password: <input type="password" name="password"></input><br></br>
97 <input type="submit"></input></form></div>
98
99
100
101 </body>
102
103 </html>
104
105 formhtml;
106 echo($formhtml);
107 }
108 elseif($do == "redirect") {
109 echo <<<redirect
110 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
111 <html>
112 <head>
113 <title>Redirecting</title>
114 <meta http-equiv="REFRESH" content="0;url=http://coccoon.flyingoctopus.net"></HEAD>
115 <BODY>
116 <a href="http://coccoon.flyingoctopus.net">Authenticated - redirecting...</a>
117 </BODY>
118 </HTML>
119 redirect;
120 }
121 ?>
Something went wrong with that request. Please try again.