|
@@ -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…")?></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 __(" 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 __(" You must be logged on the system.")?>
|
116
|
|
- </div>
|
117
|
|
-<?php
|
118
|
|
- }
|
119
|
|
- }
|
120
|
|
-?>
|
121
|
|
- </div>
|
122
|
|
-
|
123
|
|
- <div class="footer-box"> </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
|
+?>
|