Esempio n. 1
0
 public function update($id, $params)
 {
     $data = array();
     $status = Response::STATUS_BAD_REQUEST;
     $lang_code = $this->safeGet($params, 'lang_code', DEFAULT_LANGUAGE);
     $params['company_id'] = $this->getCompanyId();
     unset($params['page_type'], $params['page_id']);
     $page_id = fn_update_page($params, $id, $lang_code);
     if ($page_id) {
         $status = Response::STATUS_OK;
         $data = array('page_id' => $page_id);
     }
     return array('status' => $status, 'data' => $data);
 }
Esempio n. 2
0
         }
         $view->assign('added_pages', $added_pages);
         $_output = $view->display('pages_pages/pages_m_viewadded.tpl', false);
         // FIX-TEMPLATE
         fn_set_notification('N', fn_get_lang_var('notice'), $_output, true);
     }
     $suffix = ".manage?page_type=" . $_REQUEST['page_type'];
 }
 //
 // Processing multiple updating of page elements
 //
 if ($mode == 'm_update') {
     // Update multiple pages data
     foreach ($_REQUEST['pages_data'] as $page_id => $page_data) {
         if (!empty($page_data)) {
             fn_update_page($page_data, $page_id, DESCR_SL);
         }
     }
     $suffix = ".manage";
 }
 //
 // Processing deleting of multiple page elements
 //
 if ($mode == 'm_delete') {
     if (isset($_REQUEST['page_ids'])) {
         foreach ($_REQUEST['page_ids'] as $v) {
             fn_delete_page($v);
         }
     }
     unset($_SESSION['page_ids']);
     fn_set_notification('N', fn_get_lang_var('congratulations'), fn_get_lang_var('text_pages_have_been_deleted'));