zoukankan      html  css  js  c++  java
  • 织梦精准搜索自定义字段搜索证书查询

    非常适合想要做证书查询和精准搜索的小伙伴,支持按自定义字段搜索,支持搜索结果页直接用标签调用自定义字段的值,新增文件的方式,不与程序任何文件冲突。

    文件打包下载(gbk / utf8)

    链接: https://pan.baidu.com/s/1vdNGOwGCDqOYhcDnFqUNCA 密码: ffen

    使用说明

    1、选择跟你程序对应编码的文件夹,把里面的2个文件夹里的

    • /include/arc.zhengshuview.class.php
    • /plus/zhengshu.php

    这2个文件上传到你网站对应的目录下

    2、在前端模板的搜索框代码写法例子如下

    <form action="/plus/zhengshu.php" method="get">
        <input type="hidden" name="pagesize" value="1">
        <input type="hidden" name="channeltype" value="这里填你的模型ID号"/>
        <p>
            <label>姓  名:</label>
            <input type="text" name="title"/>
        </p>
        <p>
            <label>身份证号:</label>
            <input type="text" name="shenfenzheng"/>
        </p>
        <p>
            <label>证书编号:</label>
            <input type="text" name="bianhao"/>
        </p>
        <p>
            <input type="submit" value="搜索"/>
        </p>
    </form>

    【上面特别说明】

    红色的代码必须要的,

    pagesize是搜索结果页每页显示几个数据,一般精准搜索都是1个,

    channeltype里填你要搜索的模型ID号

    绿色的代码是要搜索的字段,系统字段标题(title)和自定义字段(shenfenzheng,bianhao...)都可以

    3、搜索结果模板名为:zhengshu.htm

    自己建一个放到自己的网站模板目录里

    例如我的

    <table width="100%" class="table">  
    	<caption>  
    		<h2>查询结果</h2>  
    	</caption>  
    	<thead>  
    		<tr>  
    			<th>  
    				证书编号  
    			</th>  
    			<th>  
    				身份证号  
    			</th>  
    			<th>  
    				姓名  
    			</th>  
    			<th>
    				证书类型
    			</th>
    			<th>
    				公司名称
    			</th>
    			<th>
    				所属企业
    			</th>
    			<th>
    				所属领域
    			</th>
    			<th>
    				有效期
    			</th>
    			<th>
    				状态
    			</th>
    		</tr>  
    	</thead>
    	{dede:list titlelen='250'}
    	<tr>
    		<td>
    			[field:bianhao/]
    		</td>
    		<td>
    			[field:shenfenzheng/]
    		</td>
    		<td>
    			[field:title/]
    		</td>
    		<td>
    			[field:leixing/]
    		</td>
    		<td>
    			[field:gongsimingcheng/]
    		</td>
    		<td>
    			[field:qiye/]
    		</td>
    		<td>
    			[field:lingyu/]
    		</td>
    		<td>
    			[field:youxiaoqi/]
    		</td>
    		<td>
    			[field:zhuangtai/]
    		</td>
    	</tr>
    	{/dede:list}
    	<tr>
    		<td colspan="9">
    			{dede:pagelist listsize=1 runphp=yes}
    			@me = (empty(@me) ? "<p style='color:#f00;'>没有相关记录</p>" : ""); 
    			{/dede:pagelist}
    		</td>
    	</tr>
    </table>
  • 相关阅读:
    多轨车皮编序问题
    [Luogu1032] 字串变换
    [POJ1101] The Game
    Linux 下源码编译FFMEG
    交叉编译 tcpdump
    现代电视原理-电视传像原理
    Dos:‘锘緻echo’ 不是内部或外部命令,也不是可运行的程序或批处理文件
    Win7 登入壁纸修改
    Office 2016安装后的优化设置
    Linux 系统目录结构
  • 原文地址:https://www.cnblogs.com/dedehtml/p/9913728.html
Copyright © 2011-2022 走看看