public function clearAction()
 {
     $this->_helper->viewRenderer->setNeverRender(true);
     $histories = new Model_Histories();
     $histories->clear($this->user);
     $json = new StdClass();
     $json->code = 200;
     echo Zend_Json::encode($json);
 }
 private function _saveHistory($site, $result)
 {
     $histories = new Model_Histories();
     $history = $histories->createRow();
     $history->user_id = $this->user->id;
     $history->date = date('Y-m-d H:i:s');
     $history->site = $site;
     $history->ip = $_SERVER['REMOTE_ADDR'];
     $history->result = $result;
     $history->save();
 }