public function scedit() { if ($this->req['get']['type'] == 'sj') { $this->req['get']['name'] ? $set['s_sender'] = $this->req['get']['name'] : ''; $this->req['get']['status'] ? $set['s_status'] = $this->req['get']['status'] : ''; $this->db->set(array('table' => 'xgm_sender', 'key' => array_keys($set), 'value' => array_values($set), 'where' => array('and' => array('s_id' => $this->req['get']['id'])))); } if ($this->req['get']['type'] == 'cp') { $this->req['get']['name'] ? $set['car_no'] = $this->req['get']['name'] : ''; $this->req['get']['status'] ? $set['car_status'] = $this->req['get']['status'] : ''; $this->db->set(array('table' => 'xgm_car', 'key' => array_keys($set), 'value' => array_values($set), 'where' => array('and' => array('car_id' => $this->req['get']['id'])))); } N8_Helper_Helper::showMessage('修改成功', $_SERVER['HTTP_REFERER']); }
public function orderuseredit() { if (!$this->req['get']['ouid'] && !$this->req['post']['ouid']) { N8_Helper_Helper::showMessage('数据错误'); } if ($this->req['post']['submit'] && ($ouid = $this->req['post']['ouid'])) { $set = array(); $this->req['post']['username'] ? $set['ou_username'] = $this->req['post']['username'] : ''; $this->req['post']['truename'] ? $set['ou_truename'] = $this->req['post']['truename'] : ''; $this->req['post']['py'] ? $set['ou_pinyin'] = $this->req['post']['py'] : ''; $this->req['post']['phone'] ? $set['ou_phone'] = $this->req['post']['phone'] : ''; $this->req['post']['tel'] ? $set['ou_tel'] = $this->req['post']['tel'] : ''; $this->req['post']['total'] ? $set['ou_total'] = $this->req['post']['total'] : ''; $this->req['post']['email'] ? $set['ou_email'] = $this->req['post']['email'] : ''; if ($set) { $rs = $this->db->set(array('table' => 'xgm_orderuser', 'key' => array_keys($set), 'value' => array_values($set), 'where' => array('and' => array('ou_id' => $ouid)))); if ($rs == false) { N8_Helper_Helper::showMessage('操作失败'); } else { N8_Helper_Helper::showMessage('操作成功', 'index.php?control=user&action=orderuseredit&ouid=' . $ouid); } } else { N8_Helper_Helper::showMessage('数据未改动'); } } $info = $this->db->get(array('table' => 'xgm_orderuser', 'key' => array('*'), 'where' => array('and' => array('ou_id' => $this->req['get']['ouid'])), 'limit' => array(0, 1))); if (!$info) { N8_Helper_Helper::showMessage('数据错误'); } $this->render(array('tplDir' => $this->conf->get('view->rDir'), 'info' => $info[0])); }
public function chstatus() { if ($this->req['get']['gosubmit']) { $this->req['get']['cl_flag'] = intval(trim($this->req['get']['cl_flag'])); $this->db->set(array('table' => 'xgm_cardlib', 'key' => array('cl_flag', 'cl_state'), 'value' => array($this->req['get']['cl_flag'], $this->req['get']['cl_state']), 'where' => array('and' => array('cl_id' => $this->req['get']['cl_id'])))); N8_Helper_Helper::showMessage('修改成功'); } else { N8_Helper_Helper::showMessage('非法提交'); } }