Home > Backend Development > PHP Tutorial > dede限制字段高级会员才干查看出错。

dede限制字段高级会员才干查看出错。

WBOY
Release: 2016-06-13 12:04:33
Original
836 people have browsed it

dede限制字段高级会员才能查看出错。。。

<?php<br />require_once(dirname(__FILE__)."/config.php");<br />AjaxHead();<br />if($myurl == '')<br />{<br />exit('');<br />}<br />$uid  = $cfg_ml->M_LoginID;<br /><br />!$cfg_ml->fields['face'] && $face = ($cfg_ml->fields['sex'] == '女')? 'dfgirl' : 'dfboy';<br />$facepic = empty($face)? $cfg_ml->fields['face'] : $GLOBALS['cfg_memberurl'].'/templets/images/'.$face.'.png';<br />?><br /><?php require_once(dirname(__FILE__)."/config.php");AjaxHead();if($myurl == ''){ exit('');}$uid  = $cfg_ml->M_LoginID;<br />!$cfg_ml->fields['face'] && $face = ($cfg_ml->fields['sex'] == '女')? 'dfgirl' : 'dfboy';$facepic = empty($face)? $cfg_ml->fields['face']<br /> : $GLOBALS['cfg_memberurl'].'/templets/images/'.$face.'.png';<br />?><br /><?php $rank=$cfg_ml->M_Rank;     $row = $dsql->GetOne(" Select * From  dede_addon17  where aid =$id"); ?><br /><?php if($rank>=200){echo iconv("UTF-8","GB2312","<a onclick='disp_alert()' href=/member/buy.php>您无权查看,请购买</a>");} else{echo $row['dianhua'] ;} ?>
Copy after login

现在没登陆之前是显示“请注册查看”是对的,登陆后直接执行else,rank积分大于200也是执行else if不执行,而且dianhua字段也输出空白,数据表没错...求牛人指点!
检查研究了一上午,头开始懵了
------解决方案--------------------
dianhua   讀不到數據是因為$row沒有數據。
$row = $dsql->GetOne(" Select * From  dede_addon17  where aid =$id");

$id 的值是什麼,沒有看到你有獲取 $id
如果是會員的資料,應該是前面獲取的$uid 吧。

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template