当前位置: 我爱LAMP > LAMP > 文章正文

UC HOME整合Discuz用户登陆代码

发表于 2009-10-31 20:45    文章来源:互联网

本例以整合home为例

home的登录系统中加入的防伪码主要是三个
define(‘IN_UCHOME’,'asdfasdf’);
// 加载dzhome的基本配置文件
include .’/home/data/data_config.php’;
// 生成防伪
$action_login    = md5(‘login’.md5($_SCONFIG['sitekey']));
$action_register = md5(‘register’.md5($_SCONFIG['sitekey']));
$action_formhash = substr(md5(substr(time(), 0, -7).’|0|’.md5($_SCONFIG['sitekey']).’|’.$hashadd), 8, 8);
echo ‘
<script>
var  loginNum    = “‘,($action_login    = md5(‘login’.md5($_SCONFIG['sitekey']))),’”;
var  registerNum = “‘,($action_register = md5(‘register’.md5($_SCONFIG['sitekey']))),’”;
var  formhashNum = “‘,($action_formhash = substr(md5(substr(time(), 0, -7).’|0|’.md5($_SCONFIG['sitekey']).’|’.$hashadd), 8, 8)),’”
</script>
<ul>
<form  name=”loginform” action=”/home/do.php?ac=’,$action_login,’&&ref” method=”post”>
<input type=”text” name=”username” size=”10″ value=”用户名”>
<input type=”text” name=”password” size=”9″ value=”密码”>
<input type=”hidden” name=”refer” value=”space.php?do=home” />
<input type=”hidden” name=”formhash” value=”‘,$action_formhash,’”>
<input type=”submit” value=”登陆” name=”loginsubmit”>
<input type=”button” name=”regbutton” value=”注册”>
<input type=”button”  value=”忘记密码”  >
</ul>
</form>

本文链接: http://www.52lamp.com.cn/detail/5700.html

喜欢我爱LAMP – lamp开发程序交流学习平台的文章,那就通过 RSS Feed 功能订阅阅读吧!