当前日期时间
当前时间:
网站标志
Logo
全站搜索
广告位
phpweb图片广告
广告位
phpweb图片广告
自定内容

phpweb已经是国内最强的的开源电子商务系统了,但并非完美,因为任何...

互联网3年一轮回,京东凡客等电商品牌在三年之前也不过是小打小闹,而如...

电商已经成为趋势,传统行业的竞争已经逐渐演变到网络上,也有不少用Weboss...

phpweb系统是固定的模式,适用于大部分行业与需求。但有一些行业还是有自己...

当前位置
文章正文

phpweb添加医院预约次数限制

发表:管理员  发表时间:2013-07-30 14:19:16   阅读:(2945)次  

   phpweb为会员添加其他权限。

第一步:在pwn_member_secure 里 INSERT INTO `pwn_member_secure` VALUES (’170′, ‘hospital’, ‘预定次数’, ‘cishu’, ’1′);    

第二步:修改界面 member admin下的member_type_rights.php 与member_rights.php 在         

else  if ( $securetype == “cishu” )                   

{                                     

echo “rn”;                                     

echo “<s”;                                     

echo “elect name=”s[";                                     

echo $secureid;                                     

echo "]” >rn          “;                                     

$u = 0;                                     

for ( ;        

$u <= 9;    $u++         )                                     

{                                                        

if ( $u == $nowset )                                                        

{                                                                           

echo “<option value=’”.$u.”‘ selected>”.$u.”</option>”;                                                        

}                                                        

else                                                        

 {                                                                           

echo “<option value=’”.$u.”‘>”.$u.”</option>”;                                                        

}                                     

}                                     

echo “        </select> &nbsp;rn”;                   

 }  

第三步:用户登录后,把对应的权限放到cookie里面  根目录下的post.php  在case “memberlogin” : 与case “memberreg” : 的 setcookie( “SE”, $consecure ); 下面加入如下东西                      $fsql->query( “select * from pwn_member_rights where memberid=’{$memberid}’ and securetype=’cishu’” );                    if ( $fsql->next_record( ) )                    {                                      $cishu = $fsql->f( “secureset” );                    }                                      setcookie( “CISHU”, $cishu ); 对 member admin下的 vmember.php 也进行同样处理

第四步:用户预约提交与打开预约页面的时候,进行提醒,预约次数已经查过限制   Hospital的post.php文件进行添加如下的东西

//判断该会员一周超过预约次数了吗

$cishu=$_COOKIE["CISHU"]; 

$week = date(‘w’);

if($week!=’0′){ $zhouyi = date(‘Ymd’,strtotime( ‘+’. 1-$week .’ days’ ));  

 } else{ $zhouyi = date(‘Ymd’,time()-6*24*3600); }           

$msql->query(“select id from pwn_hospital_yyinfo where memberid=’$memberid’ and yydate>=’$zhouyi”);           

$memberyuyuecishu=0;                   

while($msql->next_record()){                            

$idd=$msql->f(‘id’);                     

$memberyuyuecishu++;                   

}         

if($memberyuyuecishu>$cishu){                            

echo “对不起,您7天内的预约次数已经超过了”.$memberyuyuecishu.”,无法预约”;                             exit;                   

}  

修改HospitalRbtime3.php与HospitalRbcat3.php  加入                                               

//判断该会员一周超过预约次数了吗                   

$cishu=$_COOKIE["CISHU"];                            

$week = date(‘w’);   if($week!=’0′){ $zhouyi = date(‘Ymd’,strtotime( ‘+’. 1-$week .’ days’ ));  

} else{ $zhouyi = date(‘Ymd’,time()-6*24*3600); }           

$msql->query(“select id from pwn_hospital_yyinfo where memberid=’$memberid’ and yydate>=’$zhouyi”);           

$memberyuyuecishu=0;                   

while($msql->next_record()){                            

$idd=$msql->f(‘id’);                     

$memberyuyuecishu++;                   

}         

if($memberyuyuecishu<$cishu){                    $yysrc=ROOTPATH.”hospital/templates/images/yy.gif”;                             $yyclass=”line6_1″;                            

$showtable=”block”;                   

}else{                            

$yysrc=ROOTPATH.”hospital/templates/images/yyno2.gif”;                             $yyclass=”line6_2″;                            

$showtable=”none”;                   

 }

 

假如我们资讯/文章对您有所帮助,您可以通过扫描捐赠二维码支持一下我们~

感谢您对我们的支持,您的小小支持让我们有信心走得更远!

脚注信息
© 2005-2015 草莓互联(100cm.cn) 广州同福信息科技有限公司 版权所有,并保留所有权利。

广州市东莞庄一横路116号 粤ICP备11046216号

经营性网站备案信息 广州网络警察报警平台 不良信息举报中心  百度信誉档案 广州工商红盾网 可信网站认证