找了好久終於找到 ˊ _ > ˋ
網址:http://www.cyrec.org/posts/discuz-login
以下為實作成功的代碼'
<?php@require 'bbs/source/class/class_core.php';$discuz = & discuz_core::instance();$discuz->init(); //以上是调用discuz公共执行类等核心代码?><?php if (empty($_G['uid'])) {?><form action="bbs/member.php?mod=logging&action=login&loginsubmit=yes&infloat=yes" method="post" name="form2" onSubmit="return check()" >用户名:<input name="username" type="text" id="textfield2" size="13" tabindex="1" value="请输入用户名" onFocus="this.value='';" onBlur="if(this.value==''){this.value='請輸入用戶名';}">密碼:<input name="password" type="password" id="password" size="12"> <input class="input_on1111" type="submit" name="button2" id="button2" value="登录"><a href="/bbs/member.php?mod=register">註冊</a><a href="bbs/member.php?mod=logging&action=login&viewlostpw">找回密碼</a></form><?php }else { ?><div align="right"><img src="images/usericon.gif" /><a href="home.php?mod=space&uid=<?php echo $_G['uid']; ?>&do=profile" class="yellow"><?php echo $_G['username']; ?></a><a href="bbs/home.php?mod=space&do=thread&view=me">我的帖子</a><a href="bbs/home.php">個人中心</a><a href="bbs/member.php?mod=logging&action=logout&formhash=<?php echo FORMHASH;?>">登出</a></div><?php }?>
沒有留言:
張貼留言