Initial revision
This commit is contained in:
parent
1ba4e8011b
commit
bbfcb3d4f4
104 changed files with 3100 additions and 0 deletions
9
code/User/edit.skin
Normal file
9
code/User/edit.skin
Normal file
|
@ -0,0 +1,9 @@
|
|||
<FORM METHOD="POST">
|
||||
<P>Old password: <% this.input type="password" name="oldpwd" %><BR>
|
||||
New password: <% this.input type="password" name="newpwd1" %><BR>
|
||||
Confirm password: <% this.input type="password" name="newpwd2" %><BR>
|
||||
URL: <% currentUser.url as="editor" %><BR>
|
||||
eMail: <% this.email as="editor" %><BR>
|
||||
Description: <% this.description as="editor" %><BR>
|
||||
<% this.input type="button" value="save" %> <% this.input type="button" value="cancel" %></P>
|
||||
</FORM>
|
64
code/User/macros.js
Normal file
64
code/User/macros.js
Normal file
|
@ -0,0 +1,64 @@
|
|||
/**
|
||||
* macro rendering username
|
||||
*/
|
||||
|
||||
function name_macro(param) {
|
||||
renderPrefix(param);
|
||||
res.write(this.name);
|
||||
renderSuffix(param);
|
||||
}
|
||||
|
||||
/**
|
||||
* macro rendering password
|
||||
*/
|
||||
|
||||
function password_macro(param) {
|
||||
renderPrefix(param);
|
||||
if (param.as == "editor")
|
||||
this.renderInputPassword(this.createInputParam("password",param));
|
||||
else
|
||||
res.write(this.password);
|
||||
renderSuffix(param);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* macro rendering URL
|
||||
*/
|
||||
|
||||
function url_macro(param) {
|
||||
renderPrefix(param);
|
||||
if (param.as == "editor")
|
||||
this.renderInputText(this.createInputParam("url",param));
|
||||
else
|
||||
res.write(this.url);
|
||||
renderSuffix(param);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* macro rendering email
|
||||
*/
|
||||
|
||||
function email_macro(param) {
|
||||
renderPrefix(param);
|
||||
if (param.as == "editor")
|
||||
this.renderInputText(this.createInputParam("email",param));
|
||||
else
|
||||
res.write(this.email);
|
||||
renderSuffix(param);
|
||||
}
|
||||
|
||||
/**
|
||||
* macro rendering description
|
||||
*/
|
||||
|
||||
function description_macro(param) {
|
||||
renderPrefix(param);
|
||||
if (param.as == "editor")
|
||||
this.renderInputTextarea(this.createInputParam("description",param));
|
||||
else
|
||||
res.write(this.description);
|
||||
renderSuffix(param);
|
||||
}
|
||||
|
37
code/User/objectFunctions.js
Normal file
37
code/User/objectFunctions.js
Normal file
|
@ -0,0 +1,37 @@
|
|||
/**
|
||||
* send a mail to confirm registration
|
||||
*/
|
||||
|
||||
function sendConfirmationMail() {
|
||||
var mail = new Mail();
|
||||
mail.setFrom(getProperty("adminEmail"));
|
||||
mail.setTo(user.email);
|
||||
mail.setSubject("Welcome to Antville!");
|
||||
mail.setText(this.renderSkinAsString("regConfirm"));
|
||||
mail.send();
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* check if user is blocked
|
||||
*/
|
||||
|
||||
function isBlocked() {
|
||||
if (parseInt(user.blocked,10)) {
|
||||
res.message = "Sorry, you were blocked by an Administrator!";
|
||||
return true;
|
||||
} else
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* check if user owns a weblog
|
||||
* returns true|false
|
||||
*/
|
||||
|
||||
function getWeblog() {
|
||||
if (user.weblog)
|
||||
return true;
|
||||
return false;
|
||||
}
|
9
code/User/regConfirm.skin
Normal file
9
code/User/regConfirm.skin
Normal file
|
@ -0,0 +1,9 @@
|
|||
Welcome to Antville!
|
||||
|
||||
Here's your login info:
|
||||
|
||||
Username: <% this.name %>
|
||||
Password: <% this.password %>
|
||||
|
||||
Have fun!
|
||||
|
14
code/User/type.properties
Normal file
14
code/User/type.properties
Normal file
|
@ -0,0 +1,14 @@
|
|||
_datasource=antville
|
||||
_tablename=USER
|
||||
|
||||
_id=ID
|
||||
_name=USERNAME
|
||||
weblog=WEBLOG_ID>weblog.ID
|
||||
name=USERNAME
|
||||
password=PASSWORD
|
||||
email=EMAIL
|
||||
description=DESCRIPTION
|
||||
url=URL
|
||||
registered=REGISTERED
|
||||
lastVisit=LASTVISIT
|
||||
blocked=ISBLOCKED
|
Loading…
Add table
Add a link
Reference in a new issue