迅睿CMS框架是一款PHP8高性能·簡(jiǎn)單易用的CMS開(kāi)源開(kāi)發(fā)框架,基于MIT開(kāi)源許可協(xié)議發(fā)布,免費(fèi)且不限制商業(yè)使用,是免費(fèi)開(kāi)源的產(chǎn)品,以萬(wàn)端互聯(lián)為設(shè)計(jì)理念,支持的微信公眾號(hào)、小程序、APP客戶端、移動(dòng)端網(wǎng)站、PC網(wǎng)站等多終端式管理系統(tǒng)。
聯(lián)系官方銷售客服
1835022288
028-61286886
模塊表單添加內(nèi)容時(shí)候修改錄入作者賬號(hào),按照模塊主信息,可以修改掉uid。但是模塊表單僅僅是修改掉author字段,uid字段沒(méi)有被更新。
建議可以同步修改。 這樣表單應(yīng)用可以更靈活。
D_Admin_Form.php
if (IS_POST) { // 設(shè)置uid便于校驗(yàn)處理 $uid = $this->input->post('data[author]') ? get_member_id($this->input->post('data[author]')) : 0; $post = $this->validate_filter($this->field, $data); if (isset($post['error'])) { $error = $post; $data = $this->input->post('data', TRUE); } else { $post[1]['cid'] = $post[0]['cid'] = $this->cid; $post[1]['uid'] = $post[0]['uid'] = $uid; $post[1]['url'] = $this->cdata['url']; $post[1]['title'] = $this->cdata['title']; $post[1]['subject'] = $this->cdata['title']; $post[1]['inputip'] = $this->input->ip_address(); $post[1]['inputtime'] = SYS_TIME; $table = SITE_ID.'_'.APP_DIR.'_form_'.$this->fid; if ($id = $this->_add($table, $post)) { // 操作成功處理附件 $this->attachment_handle($this->uid, $this->db->dbprefix($this->table).'-'.$id, $this->form['field']); $this->admin_msg(fc_lang('操作成功,正在刷新...'), dr_url(APP_DIR.'/'.$this->router->class.'/index', array('cid' => $this->cid)), 1); } else { $this->admin_msg(fc_lang('操作失敗')); } }
$uid = $this->input->post('data[author]') ? get_member_id($this->input->post('data[author]')) : 0; 增加關(guān)聯(lián)查詢。
$post[1]['uid'] = $post[0]['uid'] = $uid; 修改為查詢得到的UID。
冒失修改表單相應(yīng)錄入者和UID也存在問(wèn)題。
畢竟后臺(tái)還需要靈活,前臺(tái)則無(wú)需。
D_Admin_Form.php
$uid = $this->input->post('data[author]') ? get_member_id($this->input->post('data[author]')) : 0; 增加關(guān)聯(lián)查詢。
$post[1]['uid'] = $post[0]['uid'] = $uid; 修改為查詢得到的UID。
冒失修改表單相應(yīng)錄入者和UID也存在問(wèn)題。
畢竟后臺(tái)還需要靈活,前臺(tái)則無(wú)需。