Dede full station unified with no refresh to unify member login top display content 2

Source: Internet
Author: User

Then you need to show the place to insert the following code

<div id= "_userlogin" >

<div class= "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"/>

<div class= "FB" ><span> user name:</span>

<input type= "text" name= "userid" size= "" class= "Ipt-txt"/>

</div>

<div class= "FB" ><span> password:</span>

<input type= "password" name= "pwd" size= "class=" "Ipt-txt"/>

</div>

{dede:php}

if (Preg_match ("#2 #", $safe _gdopen))

{

Echo '

<div class= "FB" ><span> Verification Code:</span>

<input type= "text" name= "Vdcode" size= "8" class= "Ipt-txt"/>

onclick= "" http://blog.51cto.com/viewpic.php?refimg= "+ this.src=" http://blog.51cto.com/viewpic.php?refimg= "+ This.src+\ '? \ ' "

Style= "Cursor:pointer;margin-left:0px;text-transform:uppercase;"

Alt= "Can't see clearly? Click Replace "

Src= "'. $cfg _cmspath. ' /include/vdimgck.php "/></div>

‘;

}

{/dede:php}

<div class= "Submit" >

<button type= "Submit" class= "btn-1" > Login </button>

<a

href= "{dede:global.cfg_memberurl/}/index_do.php?fmdo=user&dopost=regnew"

> Registered Account </a> <a

href= "{dede:global.cfg_memberurl/}/resetpassword.php" > Forgot password?</a>

</div>

</form>

</div>

</div>

<!--/userlogin--

<script language= "javascript" type= "Text/javascript" >checklogin ();</script>




After login the display is modified in ajax_loginsta.php.


Note that if it is dede5.7, the JS call should be modified to:

<script language= "javascript" type= "Text/javascript" src= "{dede:global.cfg_cmsurl/}/include/js/dedeajax2.js" ></script>

<script language= "javascript" type= "Text/javascript" >

<!--

function Checklogin () {

var taget_obj = document.getElementById (' _userlogin ');

Myajax = new Dedeajax (Taget_obj,false,false, ', ', ');

Myajax. SendGet2 ("{dede:global.cfg_cmspath/}/member/ajax_loginsta6.php");

Dedexhttp = null;

}

-

</script>

If you don't want to show that much content at the top, you can refine it to the following:

Require_once (DirName (__file__). " /config.php ");

Ajaxhead ();

if ($myurl = = ") exit (');

$uid = $cfg _ml->m_loginid;

$cfg _ml->fields[' face ' && $face = ($cfg _ml->fields[' sex '] = = ' female ')? ' Dfgirl ': ' Dfboy ';

$facepic = Empty ($face)? $cfg _ml->fields[' face ']: $GLOBALS [' Cfg_memberurl ']. ' /templets/images/'. $face. PNG ';

?>

Hello: <strong><?php echo $cfg _ml->m_username;?></strong> <a href= "<?php echo $cfg _memberurl;? >/index.php "> Member Center </a> <a href=" <?php echo $cfg _memberurl;?>/index_do.php?fmdo=login& Dopost=exit "> Exit </a>

<!--/userinfo--

This article is from the "Jinhui blog" blog, make sure to keep this source http://wh668.blog.51cto.com/1405631/1750908

Dede full station unified with no refresh to unify member login top display content 2

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.