Browse Source

Added login.htm

Victor De la Rocha 15 years ago
parent
commit
a35cf470c0
2 changed files with 100 additions and 98 deletions
  1. 89 0
      admin/themes/admin/login.htm
  2. 11 98
      login.php

+ 89 - 0
admin/themes/admin/login.htm View File

@@ -0,0 +1,89 @@
1
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2
+	<html xmlns="http://www.w3.org/1999/xhtml">
3
+	<head>
4
+		<title>gelato :: {__("login screen")}</title>
5
+		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
6
+		<meta name="generator" content="gelato cms {version}" />
7
+		<link rel="shortcut icon" href="{conf.urlGelato}/images/favicon.ico" />
8
+		<script language="javascript" type="text/javascript" src="{conf.urlGelato}/admin/scripts/jquery.js"></script>
9
+		<script language="javascript" type="text/javascript" src="{conf.urlGelato}/admin/scripts/jquery.validate.min.js"></script>
10
+
11
+		<script type="text/javascript">
12
+		$(document).ready(function(){
13
+	
14
+			$("#valida").validate({
15
+				rules: {
16
+					login: "required",
17
+					pass: "required"
18
+				},
19
+				errorElement: "span",
20
+				errorClass: "validate_span", 
21
+				errorPlacement: function(label, element) { 
22
+					label.prependTo(element.prev())
23
+				} 
24
+			});
25
+
26
+		});
27
+		</script>
28
+		<style type="text/css" media="screen">	
29
+			@import "{conf.urlGelato}/admin/css/style.css";
30
+		</style>
31
+	</head>
32
+	
33
+	<body>
34
+		<div id="div-process" style="display:none;">{__("Processing request&hellip;")}</div>
35
+		<div id="cont">
36
+			<div id="head">
37
+				<h1><a href="{conf.urlGelato}/" title="gelato :: {__("home")}">gelato cms</a></h1>
38
+				<ul id="nav">
39
+					<li><a href="{conf.urlGelato}/" title="{__("Take me to the tumblelog")}">{__("Back to the Tumblelog")}</a></li>
40
+			  	</ul>
41
+			</div>
42
+			<div id="main">				
43
+				
44
+				<div class="box">
45
+					<ul class="menu manage">
46
+					<h3>{__("Start session")}</h3>
47
+					<li class="selected"><a>{__("Login")}</a></li>
48
+					</ul>
49
+				
50
+					<div class="tabla">
51
+
52
+								<form action="login.php" method="post" id="valida" autocomplete="off" class="newpost">
53
+									{if $redirect_url}
54
+									<input type="hidden" name="url_redirect" value="{redirect_url}" />
55
+									<input type="hidden" name="sel" value="{sel}" />
56
+									{/if}
57
+									<fieldset>
58
+									<ul>
59
+										<li><label for="login">{__("User:")}</label>
60
+											<input id="login" name="login" type="text" class="txt" /></li>
61
+										<li><label for="pass">{__("Password:")}</label>
62
+											<input id="pass" name="pass" type="password" class="txt" /></li>
63
+										<li><label for="save_pass">{__("Remember me:")}</label>
64
+											<input id="save_pass" name="save_pass" type="checkbox" /></li>
65
+										<li><input name="btnLogin" type="submit" value="Login" /></li>
66
+									</ul>
67
+									</fieldset>
68
+								</form>
69
+
70
+								{if $error==1}
71
+								<div class="error">
72
+									{__("&nbsp;You must be registered to use gelato.")}
73
+								</div>
74
+								{elseif $error==2}
75
+								<div class="error">
76
+									{__("&nbsp;You must be logged on the system.")}
77
+								</div>
78
+								{/if}
79
+					</div>
80
+
81
+					<div class="footer-box">&nbsp;</div>
82
+				</div>
83
+			</div>
84
+			<div id="foot">
85
+				<a href="http://www.gelatocms.com/" title="gelato CMS">gelato CMS</a> :: PHP/MySQL Tumblelog Content Management System.
86
+			</div>
87
+		</div>
88
+	</body>
89
+	</html>

+ 11 - 98
login.php View File

@@ -33,103 +33,16 @@ if ($user->isAuthenticated()) {
33 33
 			header("Location: ".$conf->urlGelato."/login.php?error=1");
34 34
 			exit();
35 35
 		}
36
-	} else {
37
-?>
38
-	<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
39
-	<html xmlns="http://www.w3.org/1999/xhtml">
40
-	<head>
41
-		<title>gelato :: <?php echo __("login screen")?></title>
42
-		<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
43
-		<meta name="generator" content="gelato cms <?php echo util::version();?>" />
44
-		<link rel="shortcut icon" href="<?php echo $conf->urlGelato;?>/images/favicon.ico" />
45
-		<script language="javascript" type="text/javascript" src="<?php echo $conf->urlGelato;?>/admin/scripts/jquery.js"></script>
46
-		<script language="javascript" type="text/javascript" src="<?php echo $conf->urlGelato;?>/admin/scripts/jquery.validate.min.js"></script>
47
-
48
-		<script type="text/javascript">
49
-		$(document).ready(function(){
50
-	
51
-			$("#valida").validate({
52
-				rules: {
53
-					login: "required",
54
-					pass: "required"
55
-				},
56
-				errorElement: "span",
57
-				errorClass: "validate_span", 
58
-				errorPlacement: function(label, element) { 
59
-					label.prependTo(element.prev())
60
-				} 
61
-			});
62
-
63
-		});
64
-		</script>
65
-		<style type="text/css" media="screen">	
66
-			@import "<?php echo $conf->urlGelato;?>/admin/css/style.css";
67
-		</style>
68
-	</head>
69
-	
70
-	<body>
71
-		<div id="div-process" style="display:none;"><?php echo __("Processing request&hellip;")?></div>
72
-		<div id="cont">
73
-			<div id="head">
74
-				<h1><a href="<?php echo $conf->urlGelato;?>/" title="gelato :: <?php echo __("home")?>">gelato cms</a></h1>
75
-				<ul id="nav">
76
-					<li><a href="<?php echo $conf->urlGelato;?>/" title="<?php echo __("Take me to the tumblelog")?>"><?php echo __("Back to the Tumblelog")?></a></li>
77
-			  	</ul>
78
-			</div>
79
-			<div id="main">				
80
-				
81
-				<div class="box">
82
-					<ul class="menu manage">
83
-					<h3><?php echo __("Start session")?></h3>
84
-					<li class="selected"><a><?php echo __("Login")?></a></li>
85
-					</ul>
86
-				
87
-					<div class="tabla">
88
-
89
-								<form action="login.php" method="post" id="valida" autocomplete="off" class="newpost">
90
-									<?php echo (isset($_GET['redirect_url']))? "<input type=\"hidden\" name=\"url_redirect\" value=\"".$_GET['redirect_url']."\" /><input type=\"hidden\" name=\"sel\" value=\"".$_GET['sel']."\" />" : ""; ?>
91
-									<fieldset>
92
-									<ul>
93
-										<li><label for="login"><?php echo __("User:")?></label>
94
-											<input id="login" name="login" type="text" class="txt" /></li>
95
-										<li><label for="pass"><?php echo __("Password:")?></label>
96
-											<input id="pass" name="pass" type="password" class="txt" /></li>
97
-										<li><label for="save_pass"><?php echo __("Remember me:")?></label>
98
-											<input id="save_pass" name="save_pass" type="checkbox" /></li>
99
-										<li><input name="btnLogin" type="submit" value="Login" /></li>
100
-									</ul>
101
-									</fieldset>
102
-								</form>
103
-<?php				
104
-								if (isset($_GET["error"])) {
105
-									if ($_GET["error"]==1) {
106
-?>
107
-								<div class="error">
108
-									<?php echo __("&nbsp;You must be registered to use gelato.")?>
109
-								</div>
110
-<?php
111
-									}
112
-									elseif ($_GET["error"]==2) {
113
-?>
114
-								<div class="error">
115
-									<?php echo __("&nbsp;You must be logged on the system.")?>
116
-								</div>
117
-<?php
118
-									}									
119
-								}
120
-?>
121
-					</div>
122
-
123
-					<div class="footer-box">&nbsp;</div>
124
-				</div>
125
-			</div>
126
-			<div id="foot">
127
-				<a href="http://www.gelatocms.com/" title="gelato CMS">gelato CMS</a> :: PHP/MySQL Tumblelog Content Management System.
128
-			</div>
129
-		</div>
130
-	</body>
131
-	</html>
132
-<?php
36
+	} else {
37
+		$theme = new themes;
38
+		$theme->set('version',util::version());
39
+		$theme->set('redirect_url',(isset($_GET['redirect_url'])?$_GET['redirect_url']:''));
40
+		$theme->set('sel',(isset($_GET['sel'])?$_GET['sel']:''));
41
+		$theme->set('error',(isset($_GET['error'])?$_GET['error']:''));
42
+		$theme->set('conf',array(
43
+			"urlGelato"=>$conf->urlGelato
44
+		));
45
+		$theme->display(Absolute_Path.'admin/themes/admin/login.htm');
133 46
 	}
134 47
 }
135
-?>
48
+?>