【帝国cms教程】帝国cms注册完之后根据所在会员组实现转向的教程方法
修改/e/member/class/member_registerfun.php文件
代码如下:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 | //审核 if ($checked== 0 ) { $location=DoingReturnUrl( "../../" ,$_POST[ 'ecmsfrom' ]); printerror( "RegisterSuccessCheck" ,$location, 1 ); } $logincookie= 0 ; if ($ecms_config[ 'member' ][ 'regcookietime' ]) { $logincookie=time()+$ecms_config[ 'member' ][ 'regcookietime' ]; } $r=$empire->fetch1( "select " .eReturnSelectMemberF( '*' ). " from " .eReturnMemberTable(). " where " .egetmf( 'userid' ). "='$userid' limit 1" ); $set1=esetcookie( "mlusername" ,$username,$logincookie); $set2=esetcookie( "mluserid" ,$userid,$logincookie); $set3=esetcookie( "mlgroupid" ,$groupid,$logincookie); $set4=esetcookie( "mlrnd" ,$rnd,$logincookie); //验证符 qGetLoginAuthstr($userid,$username,$rnd,$groupid,$logincookie); //登录附加cookie AddLoginCookie($r); if ($groupid== 1 ) { $location= "地址1" ; } elseif($groupid== 2 ) { $location= "地址2" ; } $returnurl=getc var ( 'returnurl' ); if ($returnurl&&!strstr($returnurl, "e/member/iframe" )&&!strstr($returnurl, "e/member/register" )&&!strstr($returnurl, "enews=exit" )) { $location=$returnurl; } $set5=esetcookie( "returnurl" , "" ); //易通行系统 DoEpassport( 'reg' ,$userid,$username,$truepassword,$salt,$email,$groupid,$registertime); $location=DoingReturnUrl($location,$_POST[ 'ecmsfrom' ]); printerror( "RegisterSuccess" ,$location, 1 ); } else {printerror( "DbError" , "history.go(-1)" , 1 );} } ?> |
版权声明:本文来源于互联网,如有侵权,请联系下方邮箱,一个工作日删除!