聯(lián)系官方銷售客服
1835022288
028-61286886
插件名稱 | 模塊內(nèi)容表單 V1.28 |
插件作者 | 迅睿官方團(tuán)隊(duì) |
最近更新 | 2024-12-03 23:39:33 |
用戶中心允許修改自己提交的表單數(shù)據(jù) |
<?php namespace Phpcmf\Controllers; /** * 二次開發(fā)時(shí)可以修改本文件,不影響升級覆蓋 */ class Roster extends \Phpcmf\Home\Mform { public function index() { $this->_Home_List(); } public function show() { $this->_Home_Show(); } public function post() { // 提交前的操作 if(IS_POST){ $this->index = $this->_Module_Row($_GET['cid']); if (\Phpcmf\Service::M()->table($this->init['table'])->where('cid', intval($this->index['id']))->where('title', $_POST['data']['title'])->counts()){ $this->_json(0, '提交失敗,標(biāo)題重復(fù)了'); } } // 提交處理 $this->_Home_Post(); } }
請求官方、大神,這段代碼在模塊表單中,只能在前臺提交時(shí)可以識別重復(fù),如果在管理員后臺也識別重復(fù)呢?
代碼一樣嗎