关健在红色部份
加在模板文件里的 head.htm里面
<head> <link href="{dede:global.cfg_templets_skin/}/style/dedecms.css" rel="stylesheet" media="screen" type="text/css" /> <script language="javascript" type="text/javascript" src="{dede:global.cfg_cmsurl/}/include/dedeajax2.js"></script> <script language="javascript" type="text/javascript" src="{dede:global.cfg_cmspath/}/images/js/j.js" ></script> <script language="javascript" type="text/javascript" src="{dede:global.cfg_templets_skin/}/js/pic_scroll.js"></script> <script language="javascript" type="text/javascript"> <!-- $(function(){ $("a[_for]").mouseover(function(){ $(this).parents().children("a[_for]").removeClass("thisclass").parents().children("dd").hide(); $(this).addClass("thisclass").blur(); $("#"+$(this).attr("_for")).show(); }); $("a[_for=uc_member]").mouseover(); $("a[_for=flink_1]").mouseover(); }); function CheckLogin(){ var taget_obj = document.getElementById('_userlogin'); myajax = new DedeAjax(taget_obj,false,false,'','',''); myajax.SendGet2("{dede:global.cfg_cmspath/}/member/ajax_loginsta.php"); DedeXHTTP = null; } --> </script> </head> <div class="header_top"> <div class="w960 center"> <span id="time" class="time"> <div id="_userlogin"> <form name="userlogin" action="{dede:global.cfg_memberurl/}/index_do.php" method="POST"> <input type="hidden" name="fmdo" value="login" /> <input type="hidden" name="dopost" value="login" /> <input type="hidden" name="keeptime" value="604800" /> <input type="hidden" name="gourl" value="" /> 用户名: <input name="userid" type="text" id="userid" style="width:60px;height:12px;border:1px solid #000" /> 密码: <input type="password" name="pwd" style="width:60px;height:12px;border:1px solid #000" /> {dede:php} if(preg_match("/2/",$safe_gdopen)){ echo '验证码: <input type="text" name="vdcode" style="width:40px;height:12px;border:1px solid #000" /> <img id="vdimgck" align="absmiddle" onClick="this.src=this.src+\'?\'" style="cursor:pointer;margin-left:0px;text-transform:uppercase;" src="'.$cfg_cmspath.'/include/vdimgck.php"width="42" height="18" align="absmiddle" />'; } {/dede:php} <input name="imageField" type="image" src="/templets/default/images/loginbt.gif" width="45" height="19" border="0" align="absmiddle" /> <a href="/member/resetpassword.php">忘记密码?</a><a href="/member/index_do.php?fmdo=user&dopost=regnew"></a> <a href="/member/index_do.php?fmdo=user&dopost=regnew">注册帐号</a> </form> </div> <script language="javascript" type="text/javascript">CheckLogin();</script>
下面是head.htm原有的可做部位参考
</span>
<div class="toplinks"><a href="{dede:global.cfg_cmsurl/}/plus/heightsearch.php" target="_blank">高级搜索</a>|<a href="{dede:global.cfg_cmsurl/}/data/sitemap.html" target="_blank">网站地图</a>|<a href="{dede:global.cfg_cmsurl/}/tags.php">TAG标签</a><a href="{dede:global.cfg_dataurl/}/rssmap.html" class="rss">RSS订阅</a><span>[<a href=""onclick="this.style.behavior='url(#default#homepage)';this.setHomePage('{dede:global.cfg_basehost/}');">设为首页</a>] [<a href="javascript:window.external.AddFavorite('{dede:global.cfg_basehost/}','{dede:global.cfg_webname/}')">加入收藏</a>]</span></div>
ajax_loginsta.php文件的代码 全部覆盖好了
<?php /** * @version $Id: ajax_loginsta.php 1 8:38 2010年7月9日Z tianya $ * @package DedeCMS.Member * @copyright Copyright (c) 2007 - 2010, DesDev, Inc. * @license http://help.dedecms.com/usersguide/license.html * @link http://www.dedecms.com */ require_once(dirname(__FILE__)."/config.php"); AjaxHead(); if($myurl == '') exit('');$uid = $cfg_ml->M_LoginID; !$cfg_ml->fields['face'] && $face = ($cfg_ml->fields['sex'] == '女')? 'dfgirl' : 'dfboy'; $facepic = empty($face)? $cfg_ml->fields['face'] : $GLOBALS['cfg_memberurl'].'/templets/images/'.$face.'.png'; ?> <div class="welcome">您好:<strong><?php echo $cfg_ml->M_UserName; ?></strong>,欢迎回来! <a href="<?php echo $cfg_memberurl; ?>/guestbook_admin.php">我的留言</a> <a href="<?php echo $cfg_memberurl; ?>/mystow.php">我的收藏</a> <a href="<?php echo $cfg_memberurl; ?>/article_add.php">发表文章</a> <a href="<?php echo $cfg_memberurl; ?>/myfriend.php">好友管理</a> <span class="uclink"><a href="<?php echo $cfg_memberurl; ?>/index.php">会员中心</a> | <a href="<?php echo $cfg_memberurl; ?>/edit_fullinfo.php">资料</a> | <a href="<?php echo $myurl;?>">空间</a> | <a href="<?php echo $cfg_memberurl; ?>/index_do.php?fmdo=login&dopost=exit">退出登录</a></span></div> <!-- /userinfo -->
绝对OK了
登录前
登录后
转载自:http://www.2d30.cn/04/136.html
本站部分内容来源互联网,如果有图片或者内容侵犯您的权益请联系我们删除!