private function save_edit() { $id = Lua::get('id'); $sqlarr = $this->_check(0); $where = array('id' => $id); Lua::update('lua_channel', $sqlarr, $where); Lua::write_log($this->user, '修改频道', "id={$id}<br />title=" . $sqlarr['name'], SYSNAME); Lua::ajaxmessage('success', '操作成功', './channel.htm'); }
private function save_edit() { $name = Lua::post('name'); if (empty($name)) { Lua::ajaxmessage('error', '栏目名称'); } $model_id = Lua::post('model_id'); if (empty($model_id)) { Lua::ajaxmessage('error', '请选择模型'); } $filename = Lua::post('filename'); if (empty($filename)) { Lua::ajaxmessage('error', '静态名称'); } $id = Lua::get('id'); $upid = Lua::post('upid'); if ($id == $upid) { Lua::ajaxmessage('error', '父级栏目不能是自己'); } $sqlarr = array('filename' => $filename, 'model_id' => $model_id, 'name' => $name, 'upid' => $upid, 'add_perm' => Lua::post('add_perm'), 'seoinfo' => Lua::post('seoinfo'), 'seokey' => Lua::post('seokey'), 'title' => Lua::post('title'), 'vieworder' => Lua::post('vieworder')); Lua::update('lua_category', $sqlarr, array('id' => $id)); $this->_cache(); Lua::write_log($this->user, '修改栏目', "catid={$id}<br />title=" . $name, SYSNAME); Lua::ajaxmessage('success', '操作成功', './category.htm'); }
private function save_edit() { $modelname = Lua::post('modelname'); if (empty($modelname)) { Lua::ajaxmessage('error', '模型名称'); } $developer = Lua::post('developer'); if (empty($developer)) { Lua::ajaxmessage('error', '开发者'); } $contact = Lua::post('contact'); if (empty($contact)) { Lua::ajaxmessage('error', '联系方式'); } $intro = Lua::post('intro'); if (empty($intro)) { Lua::ajaxmessage('error', '模型描述'); } $sqlarr = array('contact' => $contact, 'developer' => $developer, 'modelname' => $modelname, 'intro' => $intro); $id = Lua::get('id'); $where = array('id' => $id); Lua::update('lua_model', $sqlarr, $where); $db = $this->_get($id, 1); Lua::write_log($this->user, '修改模型', "model_id={$id}<br />modelname=" . $db['modelname'], SYSNAME); Lua::ajaxmessage('success', '操作成功', './model.htm'); }
private function save_single() { $catid = Lua::get('catid'); $this->_condition($catid, 1); // 数据模型处理 $tableid = Lua::get('tableid'); $tid = Lua::get('tid'); $table_db = $this->_table_db($tableid); $suffix = ""; if ($table_db) { $this->mode_db = $table_db; $suffix = "&tableid={$tableid}&tid={$tid}"; } // end $db = Lua::get_one("select * from " . $this->mode_db['tablename'] . " where catid='{$catid}'"); $query = $this->_query($this->mode_db, $db); if (!is_array($query)) { Lua::ajaxmessage('error', $query); } $hash = Lua::post('hash'); $query['color'] = Lua::post('color'); if ($db) { Lua::update($this->mode_db['tablename'], $query, array('id' => $db['id'])); $lastid = $db['id']; } else { $query['catid'] = $catid; $query['dateline'] = time(); $query['ip'] = $this->clientIP(); $query['isdel'] = 0; $query['uid'] = $this->user['uid']; $query['username'] = $this->user['username']; $query['hash'] = $hash; $lastid = Lua::insert($this->mode_db['tablename'], $query); } Doo::db()->query("update lua_files set used='1' where hash='{$hash}'"); Lua::write_log($this->user, '更新单页面信息', "catid={$catid}<br />id={$lastid}<br />title=" . $query['subject'], SYSNAME); Lua::ajaxmessage('success', '操作成功', "./content.htm?catid={$catid}" . $suffix . $this->lua_url); }
private function save_edit() { $name = Lua::post('name'); $kindof = Lua::post('kindof'); $tplfile = Lua::post('tplfile'); if (empty($name)) { Lua::ajaxmessage('error', '模板名称'); } if (empty($kindof)) { Lua::ajaxmessage('error', '模板类型'); } if (empty($tplfile)) { Lua::ajaxmessage('error', '模板文件名'); } $id = intval(Lua::get('id')); $db = Lua::get_one("select * from lua_tpls where id='{$id}'"); if ($db['tplfile'] != $tplfile) { if (file_exists($this->tpl_path . $tplfile)) { Lua::ajaxmessage('error', $tplfile . ' 已存在'); } } $query = array('name' => $name, 'kindof' => $kindof, 'lasttime' => TIMESTAMP, 'uid' => $this->user['uid'], 'username' => $this->user['username'], 'tplfile' => $tplfile); Lua::update('lua_tpls', $query, array('id' => $id)); $html = $_POST['tplhtml']; file_put_contents($this->tpl_path . $tplfile, $html); Lua::ajaxmessage('success', '操作成功', $this->_url($kindof)); }
private function save_edit() { $uid = Lua::get('uid'); $sqlarr['email'] = Lua::post('email'); $password = Lua::post('password'); if ($password) { if ($password != Lua::post('confirm_password')) { Lua::ajaxmessage('error', '二次密码不相同'); } $sqlarr['password'] = md5($password); } Lua::update('lua_member', $sqlarr, array('uid' => $uid)); $udb = Lua::get_one("select username from lua_member where uid='{$uid}'"); Lua::write_log($this->user, '修改注册会员', "uid={$uid}<br />username=" . $udb['username'], SYSNAME); Lua::ajaxmessage('success', '操作成功', './member.htm'); }
private function order() { $no_order_new = Lua::post('no_order_new'); if ($no_order_new) { foreach ($no_order_new as $id => $value) { Lua::update('lua_piece', array('vieworder' => $value), array('systemname' => SYSNAME, 'id' => $id)); } Lua::ajaxmessage('success', '排序成功', './piece.htm'); } else { Lua::ajaxmessage('error', '请先添加栏目'); } }
private function save_edit() { $username = Lua::post('username'); if (empty($username)) { Lua::ajaxmessage('error', '用户名'); } $perm = Lua::post('perm'); if (empty($perm)) { Lua::ajaxmessage('error', '用户组'); } $channel = Lua::post('channel'); if (empty($channel)) { Lua::ajaxmessage('error', '所属频道'); } $sqlarr = array('username' => $username, 'perm' => $perm, 'channel' => $channel); $where = array('uid' => Lua::get('uid')); $password = Lua::post('password'); if ($password) { $confirm_password = Lua::post('confirm_password'); if ($password != $confirm_password) { Lua::ajaxmessage('error', '二次密码不相同'); } $sqlarr['password'] = md5($password); } Lua::update('lua_admin', $sqlarr, $where); Lua::write_log($this->user, '修改管理员', "uid=" . Lua::get('uid') . "<br />title={$username}", SYSNAME); Lua::ajaxmessage('success', '操作成功', './admin.htm'); }