function route_301_switch($params) { global $TDB; if ($TDB->UpdateIN('routes', (int) $params['id'], array('is301' => (int) $params['state']))) { x3_message::push($this->_common_obj->translate('saved'), $this->_module_name); } else { x3_error::push($this->_common_obj->translate('save_error'), $this->_module_name); } }
function switch_question($params) { global $TDB; if ($TDB->UpdateIN('faq', (int) $params['id'], array('Active' => (int) $params['state']))) { x3_message::push($this->_common_obj->translate('saved'), $this->_module_name); } else { x3_error::push($this->_common_obj->translate('save_error'), $this->_module_name); } $query = "SELECT `cat_id` FROM `faq` WHERE `id`= " . $params["id"] . " ;"; $cat = $TDB->get_results($query); $this->reinit_formsgroup($cat[1]["cat_id"]); }
function save_comment_part($params) { global $TDB; $update_params[$params['part']] = $params['text']; if ($TDB->UpdateIN('comments', (int) $params['id'], $update_params) !== false) { x3_message::push($this->_common_obj->translate('saved'), $this->_module_name); } else { x3_error::push($this->_common_obj->translate('save_error'), $this->_module_name); } }
function change_main_currency($params) { global $TDB; $this->recount_currency($params['id']); $TDB->query('UPDATE `ishop_currency` SET `ismain`=0'); $TDB->UpdateIN('ishop_currency', (int) $params['id'], array('ismain' => 1, 'rate' => 1)); x3_message::push($this->_common_obj->translate('saved'), $this->_module_name); }
function save_partial($params) { if ($this->_tree->WriteNodeParam($params['id'], $params['param'], $params['value'])) { x3_message::push($this->_common_obj->translate('saved'), $this->_module_name); } else { x3_error::push($this->_common_obj->translate('save_error'), $this->_module_name); } }