auth->check_module_permissions('domain');
// Loading classes
$app->uses('tpl,tform,tform_actions');
$app->load('tform_actions');
class page_action extends tform_actions {
function onShowNew() {
global $app, $conf;
if($_SESSION["s"]["user"]["typ"] != 'admin') {
$app->error($app->tform->wordbook["onlyforadmin_txt"]);
}
parent::onShowNew();
}
function onShowEnd() {
global $app, $conf;
if($_SESSION["s"]["user"]["typ"] != 'admin') {
$app->error($app->tform->wordbook["onlyforadmin_txt"]);
}
// Fill the client select field
$sql = "SELECT groupid, name FROM sys_group WHERE client_id > 0";
$clients = $app->db->queryAllRecords($sql);
$client_select = "";
if(is_array($clients)) {
foreach( $clients as $client) {
$selected = @($client["groupid"] == $this->dataRecord["sys_groupid"])?'SELECTED':'';
$client_select .= "\r\n";
}
}
$app->tpl->setVar("client_group_id",$client_select);
parent::onShowEnd();
}
function onSubmit() {
global $app, $conf;
parent::onSubmit();
}
function onAfterInsert() {
global $app, $conf;
}
function onBeforeUpdate () {
global $app, $conf;
}
function onAfterUpdate() {
global $app, $conf;
}
function onAfterDelete() {
global $app, $conf;
}
}
$page = new page_action;
$page->onLoad();
?>