public function create() { $script = new Script(); if ($this->post) { $script->name = $this->PostData('name'); $script->description = $this->PostData('description'); $script->action = $this->PostData('action'); $script->code = $this->PostData('code'); $script->alert = $this->PostData('alert'); $script->enabled = $this->PostData('enabled'); $script->interval = $this->PostData('interval'); $script->debug = $this->PostData('debug'); if ($script->Save()) { Site::Flash("notice", "The script has been added"); Redirect("admin/scripts"); } } $this->assign("script", $script); $this->title = "New Scheduled Script"; $this->render("script/create.tpl"); }