Initial revision
This commit is contained in:
parent
1ba4e8011b
commit
bbfcb3d4f4
104 changed files with 3100 additions and 0 deletions
12
code/Global/main.skin
Normal file
12
code/Global/main.skin
Normal file
|
@ -0,0 +1,12 @@
|
|||
<HTML>
|
||||
<HEAD>
|
||||
<TITLE><% response.title %></TITLE>
|
||||
<% response.head %>
|
||||
</HEAD>
|
||||
|
||||
<BODY>
|
||||
|
||||
<% response.body %>
|
||||
|
||||
</BODY>
|
||||
</HTML>
|
48
code/Global/objectFunctions.js
Normal file
48
code/Global/objectFunctions.js
Normal file
|
@ -0,0 +1,48 @@
|
|||
/**
|
||||
* check if email-adress is syntactically correct
|
||||
*/
|
||||
|
||||
function checkEmail(address) {
|
||||
var m = new Mail();
|
||||
m.addTo(address);
|
||||
if (m.status)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* function checks if req.data.date[Year|Month|Date|Hours|Minutes] is valid
|
||||
* if correct, creates dateobject and returns it
|
||||
* otherwise false
|
||||
*/
|
||||
|
||||
function checkDate() {
|
||||
if (req.data.dateYear && req.data.dateMonth && req.data.dateDate && req.data.dateHours && req.data.dateMinutes) {
|
||||
var ts = new Date();
|
||||
ts.setYear(parseInt(req.data.dateYear));
|
||||
ts.setMonth(parseInt(req.data.dateMonth));
|
||||
ts.setDate(parseInt(req.data.dateDate));
|
||||
ts.setHours(parseInt(req.data.dateHours));
|
||||
ts.setMinutes(parseInt(req.data.dateMinutes));
|
||||
ts.setSeconds(0);
|
||||
return (ts);
|
||||
} else
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* scheduler, basically doin' nothing
|
||||
*/
|
||||
|
||||
function scheduler() {
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* onStart-function, basically doin' nothing
|
||||
*/
|
||||
|
||||
function onStart() {
|
||||
return;
|
||||
}
|
36
code/Global/renderFunctions.js
Normal file
36
code/Global/renderFunctions.js
Normal file
|
@ -0,0 +1,36 @@
|
|||
/**
|
||||
* renders prefix if it's given
|
||||
*/
|
||||
|
||||
function renderPrefix(param) {
|
||||
if (param.prefix)
|
||||
res.write(param.prefix);
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* renders sufffix if it's given
|
||||
*/
|
||||
|
||||
function renderSuffix(param) {
|
||||
if (param.suffix)
|
||||
res.write(param.suffix);
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
* returns name of action file the user has called
|
||||
* Input params: none
|
||||
* returns: string (= name of .hac-file)
|
||||
*/
|
||||
|
||||
|
||||
function getActionName() {
|
||||
// return name of current action executed by user
|
||||
var rPath = req.path.split("/");
|
||||
if (path[path.length-1].__id__ == rPath[rPath.length-1] || path[path.length-1].__name__ == rPath[rPath.length-1])
|
||||
return "main";
|
||||
else
|
||||
return(rPath[rPath.length -1]);
|
||||
}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue