栏目导航
热点推荐
阅览排行
PHPWind v7.3.2 圈子好友搜索问题
www.jz123.cn 2009-05-29 来源: 中国建站 责任编辑(袁袁) 我要投递新闻
打开:
mode/o/m_friend.php
查找:
复制代码
InitGP(array('step','page','accord'));
empty($accord) && $accord = 'username';
if ($step == 2) {
$where = '';
if ($accord == 'uid') {
InitGP('keyword','P',2);
$uid = $keyword;
!$uid && Showmsg('mode_o_find_uid_err');
$uid == $winduid && Showmsg('mode_o_find_self');
$where .= 'uid='.pwEscape($uid);
} elseif ($accord == 'username') {
InitGP('keyword','',1);
$username = $keyword;
!$username && Showmsg('illegal_author');
$input_username = $username;
$sql_username = $username.'%';
$where .= 'username LIKE'.pwEscape($sql_username);
$username == $windid && Showmsg('mode_o_find_self');
} elseif ($accord == 'email') {
InitGP('keyword','P',1);
$email = $keyword;
if (!preg_match("/^[-a-zA-Z0-9_.]+@([0-9A-Za-z][0-9A-Za-z-]+.)+[A-Za-z]{2,5}$/",$email)) {
Showmsg('mode_o_email_format_err');
}
$email == $winddb['email'] && Showmsg('mode_o_find_self');
$where .= 'email='.pwEscape($email);
} else {
Showmsg('undefined_action');
}
修改为:
复制代码
InitGP(array('step','page','accord','according'));
!empty($according) && $accord = $according;
empty($accord) && $accord = 'username';
if ($step == 2) {
$where = '';
if ($accord == 'uid') {
InitGP('keyword','P',2);
$uid = $keyword;
!$uid && Showmsg('mode_o_find_uid_err');
$uid == $winduid && Showmsg('mode_o_find_self');
$where .= 'uid='.pwEscape($uid);
} elseif ($accord == 'username') {
InitGP(array('keyword','username'));
!empty($username) && $keyword = $username;
!$keyword && Showmsg('illegal_author');
$input_username = $keyword;
$sql_username = $keyword.'%';
$where .= 'username LIKE'.pwEscape($sql_username);
$keyword == $windid && Showmsg('mode_o_find_self');
} elseif ($accord == 'email') {
InitGP('keyword','P',1);
$email = $keyword;
if (!preg_match("/^[-a-zA-Z0-9_.]+@([0-9A-Za-z][0-9A-Za-z-]+.)+[A-Za-z]{2,5}$/",$email)) {
Showmsg('mode_o_email_format_err');
}
$email == $winddb['email'] && Showmsg('mode_o_find_self');
$where .= 'email='.pwEscape($email);
} else {
Showmsg('undefined_action');
}
打开:mode/o/template/m_friend.htm
查找:
复制代码
<input type="hidden" name="accord" id="accord" value="$accord">
修改为:
复制代码
<input type="hidden" name="according" id="according" value="$accord">
查找:
复制代码
getObj('accord').value = select;
修改为:
复制代码
getObj('according').value = select;
上一篇:PHPWind v7.3.2综合积分计算错误 下一篇:PHPWind v7.3.2后台风格设置中无法选取颜色