宝塔服务器面板,一键全能部署及管理,送你10850元礼包,点我领取

织梦如何实现会员搜索(织梦会员功能)-冯金伟博客园

dede如何调用成员搜索?

前台DEDECMS的会员目录,即member/search.php,是会员的搜索。调用比较简单,就是POST提交查询的一个关键字。

Search.htm模板文件:

<form action="search.php">

& lt输入class = & quotintxt & quottype = & # 39正文& # 39;name = & # 39关键词& # 39;value = & # 39'style = & quot宽度:170px & quot/& gt;

& ltselect name = & quot省& quotid = & quot省& quotonchange = & quotJavaScript:sel next(document . getelementbyid(& # 39;城市& # 39;),this . value)& quot;& gt

& lt选项值= & # 39;0'& gt一级地区

& lt马鞭php

global $ em _ nativeplaces

foreach($ em _ native places as $ k = & gt;$v)

{

如果($k%500 == 0)

{

if($ k = = $ province)echo & quot;& lt选项值= & # 39;$ k & # 39selected = & # 39精选& # 39;& gt$ v & lt/option & gt; r n & quot;

否则回声& quot& lt选项值= & # 39;$ k & # 39& gt$ v & lt/option & gt; r n & quot;

}

}

马鞭& gt

& lt/select & gt;

& lt选择id = & quot城市& quotname = & quot城市& quot& gt

& lt选项值= & # 39;0'& gt特定区域

& lt马鞭php

如果(!空($省))

{

foreach($ em _ native places as $ k = & gt;$v)

{

if($ k & gt;$省和。& amp$ k & lt$省

500)

{

if($ k = = $ city)echo & quot;& lt选项值= & # 39;$ k & # 39selected = & # 39精选& # 39;& gt$ v & lt/option & gt; r n & quot;

否则回声& quot& lt选项值= & # 39;$ k & # 39& gt$ v & lt/option & gt; r n & quot;

}

}

}

马鞭& gt

& lt/select & gt;

& lt输入class = & quotintxt & quotname = & quotminage & quottype = & quot文本& quotid = & quotminage & quotvalue = & quot18 & quotstyle = & quot宽度:20px & quot/& gt;

& lt输入class = & quotintxt & quotname = & quotmaxage & quottype = & quot文本& quotid = & quotmaxage & quotvalue = & quot35 & quotstyle = & quot宽度:20px & quot/& gt;

& lt输入类型= & quot收音机& quotname = & quot性& quotid = & quot收音机& quotvalue = & quot男性”/>;

男人

& lt输入名称= & quot性& quottype = & quot收音机& quotid = & quot收音机& quotvalue = & quot女”/>;

妇女

& lt输入名称= & quot性& quottype = & quot收音机& quotid = & quot收音机& quotvalue = & quot& quot选中= & quot选中& quot/& gt;

无限的

& ltbutton class = & quotbutton2 mL10 & quottype = & quot提交& quot& gt搜查

& lt/form & gt;

search.php

<?php

require_once(目录名(__文件_ _)。'/config . PHP & # 39;);

CheckRank(0,0);

require_once(DEDEINC .'/enums . func . PHP & # 39;);

require_once(DEDEINC .'/datalistcp . class . PHP & # 39;);

$ menutype = & # 39米迪德& # 39;;

//检查用户是否被禁止。

CheckNotAllow();

$ add SQL s = array();

$省=空($省)?0:intval($省);

$city =空($city)?0:intval($ city);

$minage = empty($minage)?0:intval($ minage);

$maxage = empty($maxage)?0:intval($ maxage);

if(empty($ sex))$ sex = & # 39;';

if(empty($ keyword))$ keyword = & # 39;';

$ keyword = filter search(strip slashes($ keyword));

$ keyword = add slashes(cn _ substr($ keyword,20));

如果(!empty($keyword)) {

$ addsql[]= & quot;(mb.userid like & # 39% $ keyword % & # 39或者mb.uname like & # 39% $ keyword % & # 39)& quot;

}

if(empty($city)){

$ place = $ province

}

否则{

$ place = $ city

}

if($place % 500!= 0 )

{

$ addsql[]= & quot;mp.place = & # 39$ place & # 39& quot;

}

其他

{

如果(place!=0)

{

$ minp = $ place-1;

$ maxp = $ place

500;

$ addsql[]= & quot;mp.place & gt'$ minp & # 39和mp.place & lt'$ maxp & # 39& quot;

}

}

如果($性!='')$ addsql[]= & quot;mp.sex = & # 39$性& # 39;& quot;

如果($minage!= 0)$ addsql[]= & quot;YEAR(CURDATE())-YEAR(MP . birthday)>='$ minage & # 39& quot;

如果($maxage!= 0)$ addsql[]= & quot;YEAR(CURDATE())-YEAR(MP . birthday)& lt;='$ maxage & # 39& quot;

$ addsql s _ str = join(& # 39;还有& # 39;,$ addsqls

if($ addsql _ str!='') {

$ addsqls _ str = & # 39还有& # 39;.$ addsqls _ str

}

$ addsql = & quot其中mb.spacesta & gt-1 & quot;.$ addsqls _ str

$ query = & quot选择mb。*,mp.place,YEAR(CURDATE())-YEAR(MP . birthday)AS age,mp.lovemsg,mp.birthday FROM `dede_member` mb

左联接`# @ _ _ member _ person ` MP ON MP . mid = MB . mid

{$addsql}订单按MB . log in time desc & quot;;

$ d list = new datalist CP();

$ d list-& gt;pageSize = 8;

$ d list-& gt;set parameter(& # 39;关键词& # 39;,$ keyword);

$ d list-& gt;set parameter(& # 39;省& # 39;,$省);

$ d list-& gt;set parameter(& # 39;城市& # 39;,$ city);

$ d list-& gt;set parameter(& # 39;米纳格& # 39;,$ minage);

$ d list-& gt;set parameter(& # 39;maxage & # 39,$ maxage);

$ d list-& gt;set parameter(& # 39;性& # 39;,$ sex);

$ d list-& gt;SetTemplate(DEDEMEMBER。'/templets/search . htm & # 39;);

$ d list-& gt;set source($ query);

$ d list-& gt;显示();

默认情况下,成员目录中两个文件的search.htm位于成员/模板目录中。

织梦后台更新文档时提示模板文件不存在?

安全设置

1、

以下目录:data、templets、uploads、a设置可读写不可执行权限。其中a目录为文档HTML默认保存路径,可以在后台进行更改;

2、

以下目录:include、member、plus、dede设置为可读可执行不可写入权限。其中后台管理目录(默认dede),可自行修改;

3、

如果不需要使用会员、专题,可以直接删除member、special目录;

4、

删除install安装目录;

5、

管理员帐号密码尽量设置复杂,发布文章可以新建频道管理员,并且只给予相关权限;

6、

Mysql数据库链接,不使用root用户,单独建立新用户,并给予:SELECT、INSERT、UPDATE、DELETE、CREATE、DROP、INDEX、ALTER、CREATE TEMPORARY TABLES权限;

7、

定期进行备份网站目录和数据库,并在后台进行文件校验、病毒扫描、系统错误修复;

8、

改变织梦data目录位置。

怎么建会员制网站?

如果是想建网站,那么几乎每个建站系统都提供会员注册登录功能,你可以选择开源的网站系统来做,比如ecms,dedecms等等。

如果是自己写程序,那么需要建一张数据库表,用来保存用户信息,比如登录名、密码等。新用户注册就在数据库中增加一条记录。登录时就比较数据库中的登录名和密码,核对正确就登录成功。

织梦后台dede提示怎么修改?

前台提示修改include/common.func.php这个文件后台提示修改dede/sys_data_done.php这个文件都是在对应文件中找到“DedeCMS提示信息” 直接修改就好,应该是两处系统菜单的修改: dedeincinc_menu.php 修改前注意备份文件在线反馈和会员中心模板如何修改: /member/templets/怎么修改dedecms自身的信息提示框:

include/common.func.php中的showmsg函数dede 在哪修改商城中的支付方式?

去phpmyadmin管理数据库,修改此表de_shops_paytype配送方式修改:后台>会员>配货方式设置支付接口设置: 后台>会员>支付接口配置参数