迅睿系统基于MIT开源许可协议发布,不限制商业使用,以多端互联为设计理念, 支持的微信公众号、小程序、APP客户端、移动端网站、PC网站等多终端式管理系统。
业务经理
微信扫描以上二维码
028-61286886
技术咨询
模块表单发post页,布成功后如何返回信息内容页?
后台的跳转URL是固定值。
<?php namespace Phpcmf\Controllers; /** * 二次开发时可以修改本文件,不影响升级覆盖 */ class Find extends \Phpcmf\Home\Module { public function index() { $this->_module_init(); $sfzh = \Phpcmf\Service::L('Input')->post('sfzh'); $xingming = \Phpcmf\Service::L('Input')->post('xingming'); if (!$sfzh) { $this->_json(0, '身份证号不能为空'); } if (!$xingming) { $this->_json(0, '姓名不能为空'); } $data = \Phpcmf\Service::M()->table_site(MOD_DIR)->where('xingming', $xingming)->where('sfzh', $sfzh)->getRow(); if (!$data) { $this->_json(0, '姓名和身份证不匹配'); exit; } $this->_json(1, '正在为你查询', ['url' => '/index.php?s='.APP_DIR.'&c=find&m=show&id='.$data['id']]); } public function show() { $this->_module_init(); $id = (int)\Phpcmf\Service::L('Input')->get('id'); $this->_Show( $id, [], 1, 1 ); \Phpcmf\Service::V()->display('find.html'); } }
迅睿系统漏洞
<?php namespace Phpcmf\Controllers; /** * 二次开发时可以修改本文件,不影响升级覆盖 */ class Find extends \Phpcmf\Home\Module { public function index() { $this->_module_init(); $sfzh = \Phpcmf\Service::L('Input')->post('sfzh'); $xingming = \Phpcmf\Service::L('Input')->post('xingming'); if (!$sfzh) { $this->_json(0, '身份证号不能为空'); } if (!$xingming) { $this->_json(0, '姓名不能为空'); } $data = \Phpcmf\Service::M()->table_site(MOD_DIR)->where('xingming', $xingming)->where('sfzh', $sfzh)->getRow(); if (!$data) { $this->_json(0, '姓名和身份证不匹配'); exit; } $this->_json(1, '正在为你查询', ['url' => '/index.php?s='.APP_DIR.'&c=find&m=show&id='.$data['id']]); } public function show() { $this->_module_init(); $id = (int)\Phpcmf\Service::L('Input')->get('id'); $this->_Show( $id, [], 1, 1 ); \Phpcmf\Service::V()->display('find.html'); } }草木人