function delete_umenu($params) { global $TDB; if (is_array($params['id'])) { $id = implode($params['id'], "','"); $w = 'id in (\'' . $id . '\')'; } else { $w = 'id="' . $params['id'] . '"'; } if ($res = $TDB->query('delete from user_menu where ' . $w)) { $this->result['isDel'] = $res; } else { x3_error::push('error delete', $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 switch_news($params) { global $TDB; if ($TDB->UpdateIN('news', (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); } }
function save_order($params) { global $TDB; if ($s = $params['data']['form']['changeOrderStatus']) { $q = 'update `ishop_orders` set status=' . $s . ' where id=' . $params['data']['id']; if ($TDB->query($q)) { 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 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 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); } }