1 | 在中加入
<script src=
"{dede:global.cfg_cmsurl/}/include/dedeajax2.js"
type
=
"text/javascript"
>
<script language=
"javascript"
>
function
CheckLogin_c(){
var taget_obj = document.getElementById(
'_userlogin_c'
);
var req = document.getElementById(
'hid'
).value;
myajax = new DedeAjax(taget_obj,
false
,fal se,
''
,
''
,
''
);
myajax.SendGet2(
"{dede:global.cfg_cmspath/}/member/ajax_loginsta_c.php?val="
+req);
DedeXHTTP = null;
}
2 | 在模板中id
=
"_userlogin_c"
>
购买链接(未登录时候显示):{dede:field.url1/}
市场价格(未登录时候显示):{dede:field.jiage1/}
<input
type
=
"hidden"
value=
"{dede:field.aid/}"
id
=
"hid"
/>
<script language=
"javascript"
type
=
"text/javascript"
>CheckLogin_c();
3 | 在member新建一个文件ajax_loginsta_c.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.
* @licensehttp://help.DedeCMS.com/usersguide/license.html
* @linkhttp://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.
'.jpg'
;
?>
<?php
$rank=$cfg_ml->M_Rank;
$row = $dsql->GetOne(
" Select * From `dede_addon19` where `aid`=$val "
);
?>
购买链接(已登录):<?php
echo
$row[
'url2'
];?>
本店价格:<?php
echo
$row[
'jiage2'
];?>
织梦DedeCMS列表页及文章页调用TAG标签并加入自己的样式 | 织梦DedeCMS列表页及文章页调用TAG标签并加入自己的样式 ...
织梦DedeCMS5.7织梦DedeCMS网站系统首页sql调用disucuz2.5内容 | 织梦DedeCMS5.7织梦DedeCMS网站系统首页sql调用disucuz2.5内容 ...