CheckInfo(); "That's it."/> CheckInfo(); "That's it.">
search
HomeCMS TutorialDEDECMSHow to call the current member information on any page in DreamWeaver

How to call the current member information on any page in DreamWeaver

How can Dreamweaver call the current member information on any page?

Dream Weaver DEDECMS calls the current member information on any page

Recommended study: Dream Weaver cms

I have been studying dede these days I also tried to get some of the various functions myself. Today I encountered the need to call the member number, which is the Mid value. I checked it on Baidu and found that there are many methods:

{dede:memberinfos} You can use mid= ""Points to calling a certain member information

This method can only call mid=1 by default, which is the information of the website administrator. Using invalid classmates is not invalid, it is just disabled by official default. You only need Comment out include/taglib/memberinfos.lib.php about line 62 (mine is line 62) if($row['matt'])==10) return " ;But this method still cannot call the mid value .

After checking it for a long time, I suddenly found that it can be called by imitating the ajax framework at the top of the template. My code:

<script language="javascript" src="/include/dedeajax2.js"></script> 
<script language="javascript" type="text/javascript"> 
 
/*这一段是默认的*/ 
function CheckLogin(){ 
var taget_obj = document.getElementById(&#39;_userlogin&#39;); 
myajax = new DedeAjax(taget_obj,false,false,&#39;&#39;,&#39;&#39;,&#39;&#39;); 
myajax.SendGet2("/member/ajax_loginsta.php"); 
DedeXHTTP = null; 
} 
/*这一段是自己填写的*/ 
function CheckInfo(){ 
var taget_obj = document.getElementById(&#39;_userinfo&#39;);
/*这里的名字一定要和调用的页面使用的ID值一致*/ 
myajax = new DedeAjax(taget_obj,false,false,&#39;&#39;,&#39;&#39;,&#39;&#39;); 
myajax.SendGet2("/member/ajax_loginuser.php");
/*可以复制上面的loginsta 在php页面填写需要的信息 最后记住一定要改名字哦。*/ 
DedeXHTTP = null; 
} 
</script>

Calling page:

<div id="_userinfo" style="color:#f00; height:50px; line-height:20px;"></div> 
<script language="javascript" type="text/javascript">CheckInfo();</script> 
<!--记住一定要和上面的function 值一致-->

Supplement: Calling mid value:< ;?php echo $cfg_ml->M_ID; ?> must be filled in on the ajax_loginuser.php page.

The above is the detailed content of How to call the current member information on any page in DreamWeaver. For more information, please follow other related articles on the PHP Chinese website!

Statement
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

AI Hentai Generator

AI Hentai Generator

Generate AI Hentai for free.

Hot Article

R.E.P.O. Energy Crystals Explained and What They Do (Yellow Crystal)
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Best Graphic Settings
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. How to Fix Audio if You Can't Hear Anyone
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌
R.E.P.O. Chat Commands and How to Use Them
4 weeks agoBy尊渡假赌尊渡假赌尊渡假赌

Hot Tools

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

SAP NetWeaver Server Adapter for Eclipse

SAP NetWeaver Server Adapter for Eclipse

Integrate Eclipse with SAP NetWeaver application server.

WebStorm Mac version

WebStorm Mac version

Useful JavaScript development tools

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

VSCode Windows 64-bit Download

VSCode Windows 64-bit Download

A free and powerful IDE editor launched by Microsoft