|
@@ -47,141 +47,142 @@ if ($user->isAdmin()) {
|
47
|
47
|
if ($isEdition) {
|
48
|
48
|
$register = $user->getUserByID($userId);
|
49
|
49
|
}
|
50
|
|
- ?>
|
51
|
|
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
52
|
|
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
53
|
|
- <head>
|
54
|
|
- <title>gelato :: Add user</title>
|
55
|
|
- <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
56
|
|
- <link rel="shortcut icon" href="<?=$conf->urlGelato;?>/images/favicon.ico" />
|
57
|
|
- <script language="javascript" type="text/javascript" src="<?=$conf->urlGelato;?>/admin/scripts/mootools.js"></script>
|
58
|
|
- <script language="javascript" type="text/javascript">
|
59
|
|
- function validateFrmAddUser() {
|
60
|
|
- if ($('login').value == "") {
|
61
|
|
- alert("The username field cannot be left blank.");
|
62
|
|
- document.frm_add.login.select();
|
63
|
|
- return false;
|
64
|
|
- }
|
65
|
|
- if ($('password').value == "") {
|
66
|
|
- alert("The password field cannot be left blank.");
|
67
|
|
- document.frm_add.password.select();
|
68
|
|
- return false;
|
69
|
|
- }
|
70
|
|
- if ($('password').value != $('repass').value) {
|
71
|
|
- alert("The password must match,\nplease verify them.");
|
72
|
|
- document.frm_add.password.focus();
|
73
|
|
- return false;
|
74
|
|
- }
|
75
|
|
- return true;
|
76
|
|
- }
|
77
|
|
-
|
78
|
|
- function verifyExistingUser() {
|
79
|
|
- $('div-process').style.display="block";
|
80
|
|
- el = $('target');
|
81
|
|
- el.style.display="block";
|
82
|
|
- var path = 'ajax.php?action=verify&login='+$('login').value;
|
83
|
|
- new Ajax(path, {
|
84
|
|
- onComplete:function(e) {
|
85
|
|
- el.setHTML(e);
|
86
|
|
- $('div-process').style.display="none";
|
87
|
|
- }
|
88
|
|
- }).request();
|
89
|
|
- return false;
|
|
50
|
+?>
|
|
51
|
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
52
|
+ <html xmlns="http://www.w3.org/1999/xhtml">
|
|
53
|
+ <head>
|
|
54
|
+ <title>gelato :: add user</title>
|
|
55
|
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
56
|
+ <link rel="shortcut icon" href="<?=$conf->urlGelato;?>/images/favicon.ico" />
|
|
57
|
+ <script language="javascript" type="text/javascript" src="<?=$conf->urlGelato;?>/admin/scripts/mootools.js"></script>
|
|
58
|
+ <script language="javascript" type="text/javascript">
|
|
59
|
+ function validateFrmAddUser() {
|
|
60
|
+ if ($('login').value == "") {
|
|
61
|
+ alert("The username field cannot be left blank.");
|
|
62
|
+ document.frm_add.login.select();
|
|
63
|
+ return false;
|
90
|
64
|
}
|
91
|
|
- </script>
|
92
|
|
- <style type="text/css" media="screen">
|
93
|
|
- @import "<?=$conf->urlGelato;?>/admin/css/style-codice.css";
|
94
|
|
- </style>
|
95
|
|
- </head>
|
96
|
|
- <body>
|
97
|
|
- <div id="div-process" style="display:none;">Processing request...</div>
|
98
|
|
- <div id="titulo">
|
99
|
|
- <img src="<?=$conf->urlGelato;?>/images/logo.jpg" alt="gelato CMS" title="gelato CMS" />
|
100
|
|
- </div>
|
|
65
|
+ if ($('password').value == "") {
|
|
66
|
+ alert("The password field cannot be left blank.");
|
|
67
|
+ document.frm_add.password.select();
|
|
68
|
+ return false;
|
|
69
|
+ }
|
|
70
|
+ if ($('password').value != $('repass').value) {
|
|
71
|
+ alert("The password must match,\nplease verify them.");
|
|
72
|
+ document.frm_add.password.focus();
|
|
73
|
+ return false;
|
|
74
|
+ }
|
|
75
|
+ return true;
|
|
76
|
+ }
|
101
|
77
|
|
102
|
|
- <div id="menuContenedor">
|
103
|
|
- <ul>
|
104
|
|
- <li id="active"><a href="#" id="current">Users</a></li>
|
105
|
|
- <ul>
|
106
|
|
- <li id="subactive"><a href="#" id="subcurrent"><? echo ($isEdition) ? "Edit" : "Add"; ?></a></li>
|
107
|
|
- <li><a href="admin.php">Manage</a></li>
|
108
|
|
- </ul>
|
109
|
|
- </li>
|
110
|
|
- <li><a href="index.php">Control Panel</a></li>
|
111
|
|
- </ul>
|
|
78
|
+ function verifyExistingUser() {
|
|
79
|
+ $('div-process').style.display="block";
|
|
80
|
+ el = $('target');
|
|
81
|
+ el.style.display="block";
|
|
82
|
+ var path = 'ajax.php?action=verify&login='+$('login').value;
|
|
83
|
+ new Ajax(path, {
|
|
84
|
+ onComplete:function(e) {
|
|
85
|
+ el.setHTML(e);
|
|
86
|
+ $('div-process').style.display="none";
|
|
87
|
+ }
|
|
88
|
+ }).request();
|
|
89
|
+ return false;
|
|
90
|
+ }
|
|
91
|
+ </script>
|
|
92
|
+ <style type="text/css" media="screen">
|
|
93
|
+ @import "<?=$conf->urlGelato;?>/admin/css/style.css";
|
|
94
|
+ </style>
|
|
95
|
+ </head>
|
|
96
|
+
|
|
97
|
+ <body>
|
|
98
|
+ <div id="div-process" style="display:none;">Processing request...</div>
|
|
99
|
+ <div id="cont">
|
|
100
|
+ <div id="head">
|
|
101
|
+ <h1><a href="<?=$conf->urlGelato;?>/" title="gelato :: home">gelato cms</a></h1>
|
|
102
|
+ <ul id="nav">
|
|
103
|
+ <li><a href="<?=$conf->urlGelato;?>/" title="Take me to the tumblelog">Back to the Tumblelog</a></li>
|
|
104
|
+ </ul>
|
112
|
105
|
</div>
|
113
|
|
-
|
114
|
|
- <div id="contenido">
|
115
|
|
- <div class="center">
|
116
|
|
- <div class="ventana">
|
117
|
|
- <p class="titulo"><span class="handle"><? echo ($isEdition) ? "Edit" : "Add"; ?> the user information</span></p>
|
118
|
|
- <div id="formulario">
|
119
|
|
-
|
120
|
|
- <form action="user.php" method="post" onSubmit="return validateFrmAddUser();" name="frm_add">
|
121
|
|
- <fieldset>
|
|
106
|
+ <div id="main">
|
|
107
|
+
|
|
108
|
+ <div class="box">
|
|
109
|
+ <ul class="menu manage">
|
|
110
|
+ <h3>Start session</h3>
|
|
111
|
+ <li><a href="index.php">Post</a></li>
|
|
112
|
+ <li><a href="admin.php">Users</a></li>
|
|
113
|
+ <li class="selected"><a href="#"><? echo ($isEdition) ? "Edit" : "Add"; ?></a></li>
|
|
114
|
+ </ul>
|
|
115
|
+
|
|
116
|
+ <div class="tabla">
|
|
117
|
+
|
|
118
|
+ <form action="user.php" method="post" onSubmit="return validateFrmAddUser();" name="frm_add" class="newpost">
|
|
119
|
+ <fieldset>
|
|
120
|
+ <ul>
|
122
|
121
|
<?
|
123
|
|
- if ($isEdition) {
|
|
122
|
+ if ($isEdition) {
|
124
|
123
|
?>
|
125
|
|
- <input type="hidden" name="id_user" id="id_user" value="<?=$userId;?>" />
|
|
124
|
+ <input type="hidden" name="id_user" id="id_user" value="<?=$userId;?>" />
|
126
|
125
|
<?
|
127
|
|
- }
|
|
126
|
+ }
|
128
|
127
|
?>
|
129
|
|
- <p>
|
130
|
|
- <label for="login">user:</label>
|
131
|
|
- <input class="input-text" name="login" id="login" type="text" autocomplete="off" value="<?=isset($register["login"])?$register["login"]:"";?>" />
|
|
128
|
+ <li>
|
|
129
|
+ <label for="login">user:</label>
|
|
130
|
+ <input class="txt" name="login" id="login" type="text" autocomplete="off" value="<?=isset($register["login"])?$register["login"]:"";?>" />
|
132
|
131
|
<?
|
133
|
|
- if (!$isEdition) {
|
|
132
|
+ if (!$isEdition) {
|
134
|
133
|
?>
|
135
|
|
- <script language="javascript" type="text/javascript">
|
136
|
|
- document.write("<br /><input class='submit_normal_azul' name='btnVerifyUser' id='btnVerifyUser' type='button' value='Check availability' onclick='verifyExistingUser()' />");
|
137
|
|
- </script>
|
|
134
|
+ <script language="javascript" type="text/javascript">
|
|
135
|
+ document.write("<br /><input class='submit_normal_azul' name='btnVerifyUser' id='btnVerifyUser' type='button' value='Check availability' onclick='verifyExistingUser()' />");
|
|
136
|
+ </script>
|
138
|
137
|
<?
|
139
|
|
- }
|
|
138
|
+ }
|
140
|
139
|
?>
|
141
|
|
- </p>
|
142
|
|
- <p>
|
143
|
|
- <div id="target" style="display:none;"></div>
|
144
|
|
- </p>
|
145
|
|
- <p>
|
146
|
|
- <label for="pass">password:</label>
|
147
|
|
- <input class="input-text" name="password" id="password" type="password" />
|
148
|
|
- </p>
|
149
|
|
- <p>
|
150
|
|
- <label for="repass">retype password:</label>
|
151
|
|
- <input class="input-text" name="repass" id="repass" type="password" />
|
152
|
|
- </p>
|
153
|
|
- <p>
|
154
|
|
- <label for="name">name:</label>
|
155
|
|
- <input class="input-text" name="name" id="name" type="text" value="<?=isset($register["name"])?$register["name"]:"";?>" />
|
156
|
|
- </p>
|
157
|
|
- <p>
|
158
|
|
- <label for="email">e-mail:</label>
|
159
|
|
- <input class="input-text" name="email" id="email" type="text" value="<?=isset($register["email"])?$register["email"]:"";?>" />
|
160
|
|
- </p>
|
161
|
|
- <p>
|
162
|
|
- <label for="website">website:</label>
|
163
|
|
- <input class="input-text" name="website" id="website" type="text" value="<?=isset($register["website"])?$register["website"]:"";?>" />
|
164
|
|
- </p>
|
165
|
|
- <p>
|
166
|
|
- <label for="about">about:</label><br />
|
167
|
|
- <textarea rows="5" cols="50" name="about" id="about" tabindex="7"><?=isset($register["about"])?$register["about"]:"";?></textarea>
|
168
|
|
- </p>
|
169
|
|
- <p>
|
170
|
|
- <input class="submit" name="btnAdd" type="submit" value="<? echo ($isEdition) ? "Modify" : "Add"; ?> user" />
|
171
|
|
- </p>
|
172
|
|
- </fieldset>
|
173
|
|
- </form>
|
174
|
|
- </div>
|
175
|
|
- </div>
|
176
|
|
- </div>
|
177
|
|
- <div id="pie">
|
178
|
|
- <p>
|
179
|
|
- <a href="http://www.gelatocms.com/" title="gelato CMS" target="_blank">gelato CMS</a> :: PHP/MySQL Tumblelog Content Management System.
|
180
|
|
- </p>
|
181
|
|
- </div>
|
|
140
|
+ </li>
|
|
141
|
+ <li>
|
|
142
|
+ <div id="target" style="display:none;"></div>
|
|
143
|
+ </li>
|
|
144
|
+ <li>
|
|
145
|
+ <label for="pass">password:</label>
|
|
146
|
+ <input class="txt" name="password" id="password" type="password" />
|
|
147
|
+ </li>
|
|
148
|
+ <li>
|
|
149
|
+ <label for="repass">retype password:</label>
|
|
150
|
+ <input class="txt" name="repass" id="repass" type="password" />
|
|
151
|
+ </li>
|
|
152
|
+ <li>
|
|
153
|
+ <label for="name">name:</label>
|
|
154
|
+ <input class="txt" name="name" id="name" type="text" value="<?=isset($register["name"])?$register["name"]:"";?>" />
|
|
155
|
+ </li>
|
|
156
|
+ <li>
|
|
157
|
+ <label for="email">e-mail:</label>
|
|
158
|
+ <input class="txt" name="email" id="email" type="text" value="<?=isset($register["email"])?$register["email"]:"";?>" />
|
|
159
|
+ </li>
|
|
160
|
+ <li>
|
|
161
|
+ <label for="website">website:</label>
|
|
162
|
+ <input class="txt" name="website" id="website" type="text" value="<?=isset($register["website"])?$register["website"]:"";?>" />
|
|
163
|
+ </li>
|
|
164
|
+ <li>
|
|
165
|
+ <label for="about">about:</label><br />
|
|
166
|
+ <textarea rows="5" cols="50" name="about" id="about" tabindex="7"><?=isset($register["about"])?$register["about"]:"";?></textarea>
|
|
167
|
+ </li>
|
|
168
|
+ <li>
|
|
169
|
+ <input name="btnAdd" type="submit" value="<? echo ($isEdition) ? "Modify" : "Add"; ?> user" />
|
|
170
|
+ </li>
|
|
171
|
+ </ul>
|
|
172
|
+ </fieldset>
|
|
173
|
+ </form>
|
|
174
|
+
|
|
175
|
+ </div>
|
|
176
|
+
|
|
177
|
+ <div class="footer-box"> </div>
|
|
178
|
+ </div>
|
|
179
|
+ </div>
|
|
180
|
+ <div id="foot">
|
|
181
|
+ <a href="http://www.gelatocms.com/" title="gelato CMS" target="_blank">gelato CMS</a> :: PHP/MySQL Tumblelog Content Management System.
|
182
|
182
|
</div>
|
183
|
|
- </body>
|
184
|
|
- </html>
|
|
183
|
+ </div>
|
|
184
|
+ </body>
|
|
185
|
+ </html>
|
185
|
186
|
<?
|
186
|
187
|
}
|
187
|
188
|
} else {
|