function editAction()
 {
     $this->_helper->actionStack('createmenu', 'Menu', 'admin', array('id' => $_GET['menu_id']));
     $page = new default_controllers_PageController();
     $this->pageType = $page->getPageType($_GET['menu_id']);
     $this->view->iPage = $page->getOnePage($_GET['pages_id'], $this->pageType);
     if ($_POST) {
         $cacheId = 'film_' . $_GET['pages_id'];
         $curl = curl_init();
         curl_setopt($curl, CURLOPT_URL, 'http://api.tree.tv/clearcache?id=' . $cacheId);
         curl_setopt($curl, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20100101 Firefox/7.0.12011-10-16 20:23:00");
         //			curl_setopt($curl, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.13) Gecko/20080311 Firefox/2.0.0.13");
         curl_setopt($curl, CURLOPT_REFERER, "http://www.tree.tv");
         curl_setopt($curl, CURLOPT_ENCODING, "gzip,deflate");
         curl_setopt($curl, CURLOPT_AUTOREFERER, true);
         curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);
         curl_setopt($curl, CURLOPT_TIMEOUT, 30);
         curl_setopt($curl, CURLOPT_FOLLOWLOCATION, true);
         curl_exec($curl);
         curl_close($curl);
         $update = new Core_Controller_Action_Helper_Update();
         $ret = $update->update($this->pageType, $this->view->iPage);
         $this->id_row = $ret['id_row'];
         $this->mess = $ret['message'];
         $this->view->message = 'Изменения внесены';
         if ($this->mess && $this->mess) {
             $this->view->message = $this->mess;
         }
         $this->view->iPage = $page->getOnePage($_GET['pages_id'], $this->pageType);
     }
     if (!$this->view->iPage['default_controller_add_edit']) {
         $name_controller = 'default_controllers_' . $this->pageType . 'Controller';
         $dopParam = new $name_controller();
         $this->view->dopParam = $dopParam->{$this->pageType . 'afterinsert'}(@$this->view->message);
         if ($this->pageType == 'films' && $_POST && (!$this->view->message || $this->view->message == 'Изменения внесены')) {
             header("Location: /standart/view/?menu_id=" . $_GET['menu_id']);
         }
     }
     require $_SERVER['DOCUMENT_ROOT'] . "/public/fck_new/fckeditor.php";
     $oFCKeditor = new FCKeditor("textred");
     $oFCKeditor->BasePath = "/public/fck_new/";
     $oFCKeditor->Value = $this->view->iPage['textred'];
     $this->view->html_editor = $oFCKeditor->CreateHtml();
     $oFCKeditor = new FCKeditor("grafiks");
     $oFCKeditor->BasePath = "/public/fck_new/";
     $oFCKeditor->Value = $this->view->iPage['grafiks'];
     $this->view->grafiks = $oFCKeditor->CreateHtml();
     $this->view->name_button = 'update';
     if ($this->view->iPage['default_add_edit']) {
         $this->_helper->viewRenderer->setScriptAction($this->pageType);
     } else {
         $phtml_name = $this->pageType;
         if ($this->view->iPage['nameforhref']) {
             $phtml_name = $this->view->iPage['nameforhref'];
         }
         $this->_helper->viewRenderer($this->pageType . '/' . $phtml_name, null, true);
     }
 }