Shell->findById($id); $this->set('shell', $sh['Shell']); $this->render('prompt'); } /** * action requrested by ajax while looking at the * prompt view. The the shell_hist div will end up. * with the output of the command added to it. */ function shell_history($id=1){ $sh = $this->Shell->findById($id); $this->set('cmd', $this->data['Shell']['cmd']); $this->set('exec', $sh['Shell']['exec']); $this->set('env', unserialize($sh['Shell']['env'])); $this->set('title', $sh['Shell']['title']); $this->layout = 'results'; } // List all shells function index(){ $this->set('shells', $this->Shell->findAll()); } /* display the environment. It could be big, * so it has it's own view. */ function env($id=null){ $sh = $this->Shell->findById($id); $this->set('env', unserialize($sh['Shell']['env'])); $this->set('shellname', $sh['Shell']['title']); } } ?>