auth->check_module_permissions('mail'); // Loading classes $app->uses('tpl,tform,tform_actions'); $app->load('tform_actions'); class page_action extends tform_actions { function onSubmit() { global $app, $conf; // Set the server ID according to the selected destination $tmp = $app->db->queryOneRecord("SELECT server_id FROM mail_user WHERE email = '".addslashes($this->dataRecord["destination"])."'"); $this->dataRecord["server_id"] = $tmp["server_id"]; unset($tmp); parent::onSubmit(); } } $page = new page_action; $page->onLoad(); ?>