header.php 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487
  1. <?php
  2. if(!defined('InEmpireCMS'))
  3. {
  4. exit();
  5. }
  6. //--------------- 界面参数 ---------------
  7. //会员界面附件地址前缀
  8. $memberskinurl=$public_r['newsurl'].'skin/member/images/';
  9. //LOGO图片地址
  10. $logoimgurl=$memberskinurl.'logo.jpg';
  11. //加减号图片地址
  12. $addimgurl=$memberskinurl.'add.gif';
  13. $noaddimgurl=$memberskinurl.'noadd.gif';
  14. //上下横线背景色
  15. $bgcolor_line='#4FB4DE';
  16. //其它色调可修改CSS部分
  17. //--------------- 界面参数 ---------------
  18. //识别并显示当前菜单
  19. function EcmsShowThisMemberMenu(){
  20. global $memberskinurl,$noaddimgurl;
  21. $selffile=eReturnSelfPage(0);
  22. if(stristr($selffile,'/member/msg'))
  23. {
  24. $menuname='menumsg';
  25. }
  26. elseif(stristr($selffile,'e/DoInfo'))
  27. {
  28. $menuname='menuinfo';
  29. }
  30. elseif(stristr($selffile,'/member/mspace'))
  31. {
  32. $menuname='menuspace';
  33. }
  34. elseif(stristr($selffile,'e/ShopSys'))
  35. {
  36. $menuname='menushop';
  37. }
  38. elseif(stristr($selffile,'e/payapi')||stristr($selffile,'/member/buygroup')||stristr($selffile,'/member/card')||stristr($selffile,'/member/buybak')||stristr($selffile,'/member/downbak'))
  39. {
  40. $menuname='menupay';
  41. }
  42. else
  43. {
  44. $menuname='menumember';
  45. }
  46. echo'<script>turnit(do'.$menuname.',"'.$menuname.'img");</script>';
  47. ?>
  48. <script>
  49. do<?=$menuname?>.style.display="";
  50. document.images.<?=$menuname?>img.src="<?=$noaddimgurl?>";
  51. </script>
  52. <?php
  53. }
  54. //网页标题
  55. $thispagetitle=$public_diyr['pagetitle']?$public_diyr['pagetitle']:'会员中心';
  56. //会员信息
  57. $tmgetuserid=(int)getcvar('mluserid'); //用户ID
  58. $tmgetusername=RepPostVar(getcvar('mlusername')); //用户名
  59. $tmgetgroupid=(int)getcvar('mlgroupid'); //用户组ID
  60. $tmgetgroupname='游客';
  61. //会员组名称
  62. if($tmgetgroupid)
  63. {
  64. $tmgetgroupname=$level_r[$tmgetgroupid]['groupname'];
  65. if(!$tmgetgroupname)
  66. {
  67. include_once(ECMS_PATH.'e/data/dbcache/MemberLevel.php');
  68. $tmgetgroupname=$level_r[$tmgetgroupid]['groupname'];
  69. }
  70. }
  71. //模型
  72. $tgetmid=(int)$_GET['mid'];
  73. ?>
  74. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  75. <html>
  76. <head>
  77. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  78. <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
  79. <title><?=$thispagetitle?></title>
  80. <style>
  81. a { text-decoration: none; color: #002280 }
  82. a:hover { text-decoration: underline }
  83. body { font-size: 9pt; }
  84. table { font: 9pt Tahoma, Verdana; color: #000000 }
  85. input,select,textarea { font: 9pt Tahoma, Verdana; font-weight: normal; }
  86. select { font: 9pt Tahoma, Verdana; font-weight: normal; }
  87. .category { font: 9pt Tahoma, Verdana; color: #000000; background-color: #fcfcfc }
  88. .singleborder { font-size: 0px; line-height: 1px; padding: 0px; background-color: #F8F8F8 }
  89. .bold { font-weight: bold }
  90. /*修改主要色调*/
  91. .header { font: 9pt Tahoma, Verdana; color: #FFFFFF; font-weight: bold; background-color: #4FB4DE }
  92. .header a { color: #FFFFFF }
  93. .tableborder { background: #C9F1FF; border: 1px solid #4FB4DE }
  94. /*分页样式*/
  95. .epages{margin:3px 0;font:11px/12px Tahoma}
  96. .epages *{vertical-align:middle;}
  97. .epages a{padding:1px 4px 1px;border:1px solid #A6CBE7;margin:0 1px 0 0;text-align:center;text-decoration:none;font:normal 12px/14px verdana;}
  98. .epages a:hover{border:#659B28 1px solid;background:#f3f8ef;text-decoration:none;color:#004c7d}
  99. .epages input{margin-bottom:0px;border:1px solid #659B28;height:15px;font:bold 12px/15px Verdana;padding-bottom:1px;padding-left:1px;margin-right:1px;color:#659B28;}
  100. </style>
  101. <script src="<?=$public_r['newsurl']?>e/data/js/ajax.js"></script>
  102. <SCRIPT lanuage="JScript">
  103. function DisplayImg(ss,imgname,phome)
  104. {
  105. if(imgname=="menumemberimg")
  106. {
  107. img=todisplay(domenumember,phome);
  108. document.images.menumemberimg.src=img;
  109. }
  110. else if(imgname=="menumsgimg")
  111. {
  112. img=todisplay(domenumsg,phome);
  113. document.images.menumsgimg.src=img;
  114. }
  115. else if(imgname=="menuinfoimg")
  116. {
  117. img=todisplay(domenuinfo,phome);
  118. document.images.menuinfoimg.src=img;
  119. }
  120. else if(imgname=="menuspaceimg")
  121. {
  122. img=todisplay(domenuspace,phome);
  123. document.images.menuspaceimg.src=img;
  124. }
  125. else if(imgname=="menupayimg")
  126. {
  127. img=todisplay(domenupay,phome);
  128. document.images.menupayimg.src=img;
  129. }
  130. else if(imgname=="menushopimg")
  131. {
  132. img=todisplay(domenushop,phome);
  133. document.images.menushopimg.src=img;
  134. }
  135. else
  136. {
  137. }
  138. DisplayAllMenu(imgname);
  139. }
  140. function todisplay(ss,phome)
  141. {
  142. if(ss.style.display=="")
  143. {
  144. ss.style.display="none";
  145. theimg="<?=$addimgurl?>";
  146. }
  147. else
  148. {
  149. ss.style.display="";
  150. theimg="<?=$noaddimgurl?>";
  151. }
  152. return theimg;
  153. }
  154. function turnit(ss,img)
  155. {
  156. DisplayImg(ss,img,0);
  157. }
  158. function DisplayAllMenu(imgname)
  159. {
  160. if(imgname!='menumemberimg'&&domenumember.style.display=="")
  161. {
  162. domenumember.style.display="none";
  163. document.images.menumemberimg.src="<?=$addimgurl?>";
  164. }
  165. if(imgname!='menumsgimg'&&domenumsg.style.display=="")
  166. {
  167. domenumsg.style.display="none";
  168. document.images.menumsgimg.src="<?=$addimgurl?>";
  169. }
  170. if(imgname!='menuinfoimg'&&domenuinfo.style.display=="")
  171. {
  172. domenuinfo.style.display="none";
  173. document.images.menuinfoimg.src="<?=$addimgurl?>";
  174. }
  175. if(imgname!='menuspaceimg'&&domenuspace.style.display=="")
  176. {
  177. domenuspace.style.display="none";
  178. document.images.menuspaceimg.src="<?=$addimgurl?>";
  179. }
  180. if(imgname!='menupayimg'&&domenupay.style.display=="")
  181. {
  182. domenupay.style.display="none";
  183. document.images.menupayimg.src="<?=$addimgurl?>";
  184. }
  185. if(imgname!='menushopimg'&&domenushop.style.display=="")
  186. {
  187. domenushop.style.display="none";
  188. document.images.menushopimg.src="<?=$addimgurl?>";
  189. }
  190. }
  191. </SCRIPT>
  192. </head>
  193. <body leftmargin="0" topmargin="0">
  194. <table width="960" border="0" align="center" cellpadding="3" cellspacing="1">
  195. <tr>
  196. <td width="42%"><img src="<?=$logoimgurl?>" width="397" height="65" border="0"></td>
  197. <td width="58%">
  198. <?php
  199. if($tmgetuserid) //已登录
  200. {
  201. ?>
  202. <table width="100%" border="0" align="right" cellpadding="3" cellspacing="1">
  203. <tr>
  204. <td colspan="2">您好,<strong><?=$tmgetusername?></strong> &lt;<?=$tmgetgroupname?>&gt; </td>
  205. </tr>
  206. <tr>
  207. <td width="65%">[ <a href="<?=$public_r['newsurl']?>e/space/?userid=<?=$tmgetuserid?>">我的空间</a> | <a href="<?=$public_r['newsurl']?>e/member/msg/">站内消息</a> | <a href="<?=$public_r['newsurl']?>e/member/fava/">收藏夹</a> | <a href="<?=$public_r['newsurl']?>e/member/doaction.php?enews=exit" onclick="return confirm('确认要退出?');">退出</a> ]</td>
  208. <td width="35%"><div align="right"><a href="<?=$public_r['newsurl']?>"><u>网站首页</u></a> | <a href="<?=$public_r['newsurl']?>e/member/cp/"><u>会员中心</u></a> | <a href="<?=$public_r['newsurl']?>e/member/list/"><u>会员列表</u></a></div></td>
  209. </tr>
  210. </table>
  211. <?php
  212. }
  213. else //游客
  214. {
  215. ?>
  216. <table width="100%" border="0" align="right" cellpadding="3" cellspacing="1">
  217. <tr>
  218. <td colspan="2">您好,<strong>游客</strong> &lt;游客&gt;</td>
  219. </tr>
  220. <tr>
  221. <td width="65%">[ <a href="<?=$public_r['newsurl']?>e/member/login/">马上登录</a> | <a href="<?=$public_r['newsurl']?>e/member/register/">注册帐号</a> ]</td>
  222. <td width="35%"><div align="right"><a href="<?=$public_r['newsurl']?>"><u>网站首页</u></a> | <a href="<?=$public_r['newsurl']?>e/member/cp/"><u>会员中心</u></a> | <a href="<?=$public_r['newsurl']?>e/member/list/"><u>会员列表</u></a></div></td>
  223. </tr>
  224. </table>
  225. <?php
  226. }
  227. ?>
  228. </td>
  229. </tr>
  230. </table>
  231. <table width="100%" height="6" border="0" cellpadding="3" cellspacing="1" bgcolor="<?=$bgcolor_line?>">
  232. <tr>
  233. <td></td>
  234. </tr>
  235. </table>
  236. <table width="960" border="0" align="center" cellpadding="3" cellspacing="3">
  237. <tr>
  238. <td>当前位置:<?=$url?></td>
  239. </tr>
  240. </table>
  241. <table width="960" border="0" align="center" cellpadding="12" cellspacing="1" bgcolor="#C9F1FF">
  242. <tr>
  243. <td width="20%" valign="top" bgcolor="#FFFFFF">
  244. <?php
  245. if($tmgetuserid) //已登录
  246. {
  247. ?>
  248. <table width="180" border="0" align="center" cellpadding="3" cellspacing="1" class="tableborder">
  249. <tr class="header" id="domenumemberid" onMouseUp="turnit(domenumember,'menumemberimg');" style="CURSOR: hand" title="展开/收缩">
  250. <td height="25">&nbsp;&nbsp;<img src="<?=$addimgurl?>" name="menumemberimg" width="20" height="9" border="0">帐号</td>
  251. </tr>
  252. <tbody id="domenumember" style="display:none">
  253. <tr>
  254. <td bgcolor="#FFFFFF"><table width="90%" border="0" align="right" cellpadding="3" cellspacing="1">
  255. <tr>
  256. <td height="23"><a href="<?=$public_r['newsurl']?>e/member/EditInfo/">修改资料</a></td>
  257. </tr>
  258. <tr>
  259. <td height="23"><a href="<?=$public_r['newsurl']?>e/member/EditInfo/EditSafeInfo.php">修改安全信息</a></td>
  260. </tr>
  261. <tr>
  262. <td height="23"><a href="<?=$public_r['newsurl']?>e/member/my/">帐号状态</a></td>
  263. </tr>
  264. <tr>
  265. <td height="23"><a href="<?=$public_r['newsurl']?>e/member/fava/">收藏夹</a></td>
  266. </tr>
  267. <tr>
  268. <td height="23"><a href="<?=$public_r['newsurl']?>e/member/friend/">好友列表</a></td>
  269. </tr>
  270. <tr>
  271. <td height="23"><a href="<?=$public_r['newsurl']?>e/memberconnect/ListBind.php">绑定外部登录</a></td>
  272. </tr>
  273. </table></td>
  274. </tr>
  275. </tbody>
  276. <tr class="header" id="domenumsgid" onMouseUp="turnit(domenumsg,'menumsgimg');" style="CURSOR: hand" title="展开/收缩">
  277. <td height="25">&nbsp;&nbsp;<img src="<?=$addimgurl?>" name="menumsgimg" width="20" height="9" border="0">站内消息</td>
  278. </tr>
  279. <tbody id="domenumsg" style="display:none">
  280. <tr>
  281. <td bgcolor="#FFFFFF"><table width="90%" border="0" align="right" cellpadding="3" cellspacing="1">
  282. <tr>
  283. <td height="23"><a href="<?=$public_r['newsurl']?>e/member/msg/AddMsg/?enews=AddMsg">发送消息</a></td>
  284. </tr>
  285. <tr>
  286. <td height="23"><a href="<?=$public_r['newsurl']?>e/member/msg/">消息列表</a></td>
  287. </tr>
  288. </table></td>
  289. </tr>
  290. </tbody>
  291. <tr class="header" id="domenuinfoid" onMouseUp="turnit(domenuinfo,'menuinfoimg');" style="CURSOR: hand" title="展开/收缩">
  292. <td height="25">&nbsp;&nbsp;<img src="<?=$addimgurl?>" name="menuinfoimg" width="20" height="9" border="0">投稿</td>
  293. </tr>
  294. <tbody id="domenuinfo" style="display:none">
  295. <tr>
  296. <td bgcolor="#FFFFFF">
  297. <table width="90%" border="0" align="right" cellpadding="3" cellspacing="1">
  298. <?php
  299. //输出可管理的模型
  300. $tmodsql=$empire->query("select mid,qmname from {$dbtbpre}enewsmod where usemod=0 and showmod=0 and qenter<>'' order by myorder,mid");
  301. while($tmodr=$empire->fetch($tmodsql))
  302. {
  303. $fontb="";
  304. $fontb1="";
  305. if($tmodr['mid']==$tgetmid)
  306. {
  307. $fontb="<b>";
  308. $fontb1="</b>";
  309. }
  310. ?>
  311. <tr>
  312. <td width="74%" height="23"><a href="<?=$public_r['newsurl']?>e/DoInfo/ListInfo.php?mid=<?=$tmodr['mid']?>"><?=$fontb?>管理<?=$tmodr[qmname]?><?=$fontb1?></a></td>
  313. <td width="26%"><div align="right"><a href="<?=$public_r['newsurl']?>e/DoInfo/ChangeClass.php?mid=<?=$tmodr['mid']?>"><?=$fontb?>发布<?=$fontb1?></a></div></td>
  314. </tr>
  315. <?php
  316. }
  317. ?>
  318. </table>
  319. </td>
  320. </tr>
  321. </tbody>
  322. <tr class="header" id="domenuspaceid" onMouseUp="turnit(domenuspace,'menuspaceimg');" style="CURSOR: hand" title="展开/收缩">
  323. <td height="25">&nbsp;&nbsp;<img src="<?=$addimgurl?>" name="menuspaceimg" width="20" height="9" border="0">会员空间</td>
  324. </tr>
  325. <tbody id="domenuspace" style="display:none">
  326. <tr>
  327. <td bgcolor="#FFFFFF"><table width="90%" border="0" align="right" cellpadding="3" cellspacing="1">
  328. <tr>
  329. <td height="23"><a href="<?=$public_r['newsurl']?>e/space/?userid=<?=$tmgetuserid?>">预览空间</a></td>
  330. </tr>
  331. <tr>
  332. <td height="23"><a href="<?=$public_r['newsurl']?>e/member/mspace/SetSpace.php">设置空间</a></td>
  333. </tr>
  334. <tr>
  335. <td height="23"><a href="<?=$public_r['newsurl']?>e/member/mspace/ChangeStyle.php">选择模板</a></td>
  336. </tr>
  337. <tr>
  338. <td height="23"><a href="<?=$public_r['newsurl']?>e/member/mspace/gbook.php">管理留言</a></td>
  339. </tr>
  340. <tr>
  341. <td height="23"><a href="<?=$public_r['newsurl']?>e/member/mspace/feedback.php">管理反馈</a></td>
  342. </tr>
  343. </table></td>
  344. </tr>
  345. </tbody>
  346. <tr class="header" id="domenupayid" onMouseUp="turnit(domenupay,'menupayimg');" style="CURSOR: hand" title="展开/收缩">
  347. <td height="25">&nbsp;&nbsp;<img src="<?=$addimgurl?>" name="menupayimg" width="20" height="9" border="0">财务</td>
  348. </tr>
  349. <tbody id="domenupay" style="display:none">
  350. <tr>
  351. <td bgcolor="#FFFFFF"><table width="90%" border="0" align="right" cellpadding="3" cellspacing="1">
  352. <tr>
  353. <td height="23"><a href="<?=$public_r['newsurl']?>e/payapi/">在线支付</a></td>
  354. </tr>
  355. <tr>
  356. <td height="23"><a href="<?=$public_r['newsurl']?>e/member/buygroup/">在线充值</a></td>
  357. </tr>
  358. <tr>
  359. <td height="23"><a href="<?=$public_r['newsurl']?>e/member/card/">点卡充值</a></td>
  360. </tr>
  361. <tr>
  362. <td height="23"><a href="<?=$public_r['newsurl']?>e/member/buybak/">点卡充值记录</a></td>
  363. </tr>
  364. <tr>
  365. <td height="23"><a href="<?=$public_r['newsurl']?>e/member/downbak/">下载消费记录</a></td>
  366. </tr>
  367. </table></td>
  368. </tr>
  369. </tbody>
  370. <tr class="header" id="domenushopid" onMouseUp="turnit(domenushop,'menushopimg');" style="CURSOR: hand" title="展开/收缩">
  371. <td height="25">&nbsp;&nbsp;<img src="<?=$addimgurl?>" name="menushopimg" width="20" height="9" border="0">商城</td>
  372. </tr>
  373. <tbody id="domenushop" style="display:none">
  374. <tr>
  375. <td bgcolor="#FFFFFF"><table width="90%" border="0" align="right" cellpadding="3" cellspacing="1">
  376. <tr>
  377. <td height="23"><a href="<?=$public_r['newsurl']?>e/ShopSys/ListDd/">我的订单</a></td>
  378. </tr>
  379. <tr>
  380. <td height="23"><a href="#ecms" onclick="window.open('<?=$public_r['newsurl']?>e/ShopSys/buycar/','','width=680,height=500,scrollbars=yes,resizable=yes');">我的购物车</a></td>
  381. </tr>
  382. <tr>
  383. <td height="23"><a href="<?=$public_r['newsurl']?>e/ShopSys/address/ListAddress.php">管理配送地址</a></td>
  384. </tr>
  385. </table></td>
  386. </tr>
  387. </tbody>
  388. <tr class="header">
  389. <td height="25">&nbsp;&nbsp;<img src="<?=$noaddimgurl?>" width="20" height="9" border="0"><a href="<?=$public_r['newsurl']?>e/member/doaction.php?enews=exit" onclick="return confirm('确认要退出?');">退出</a></td>
  390. </tr>
  391. </table>
  392. <?php
  393. }
  394. else //游客
  395. {
  396. ?>
  397. <table width="180" border="0" align="center" cellspacing="1" cellpadding="3" class="tableborder">
  398. <tr class="header" id="domenumemberid" onMouseUp="turnit(domenumember,'menumemberimg');" style="CURSOR: hand" title="展开/收缩">
  399. <td height="25">&nbsp;&nbsp;<img src="<?=$addimgurl?>" name="menumemberimg" width="20" height="9" border="0">帐号</td>
  400. </tr>
  401. <tbody id="domenumember" style="display:none">
  402. <tr>
  403. <td bgcolor="#FFFFFF">
  404. <table width="90%" border="0" align="right" cellpadding="3" cellspacing="1">
  405. <tr>
  406. <td height="23"><a href="<?=$public_r['newsurl']?>e/member/login/">会员登录</a></td>
  407. </tr>
  408. <tr>
  409. <td height="23"><a href="<?=$public_r['newsurl']?>e/member/register/">注册帐号</a></td>
  410. </tr>
  411. </table>
  412. </td>
  413. </tr>
  414. </tbody>
  415. <tbody id="domenumsg" style="display:none">
  416. </tbody>
  417. <tr class="header" id="domenuinfoid" onMouseUp="turnit(domenuinfo,'menuinfoimg');" style="CURSOR: hand" title="展开/收缩">
  418. <td height="25">&nbsp;&nbsp;<img src="<?=$addimgurl?>" name="menuinfoimg" width="20" height="9" border="0">投稿</td>
  419. </tr>
  420. <tbody id="domenuinfo" style="display:none">
  421. <tr>
  422. <td bgcolor="#FFFFFF">
  423. <table width="90%" border="0" align="right" cellpadding="3" cellspacing="1">
  424. <?php
  425. //输出可管理的模型
  426. $tmodsql=$empire->query("select mid,qmname from {$dbtbpre}enewsmod where usemod=0 and showmod=0 and qenter<>'' order by myorder,mid");
  427. while($tmodr=$empire->fetch($tmodsql))
  428. {
  429. $fontb="";
  430. $fontb1="";
  431. if($tmodr['mid']==$tgetmid)
  432. {
  433. $fontb="<b>";
  434. $fontb1="</b>";
  435. }
  436. ?>
  437. <tr>
  438. <td width="74%" height="23"><a href="<?=$public_r['newsurl']?>e/DoInfo/ChangeClass.php?mid=<?=$tmodr['mid']?>"><?=$fontb?>发布<?=$tmodr[qmname]?><?=$fontb1?></a></td>
  439. <td width="26%"><div align="right"></div></td>
  440. </tr>
  441. <?php
  442. }
  443. ?>
  444. </table>
  445. </td>
  446. </tr>
  447. </tbody>
  448. <tbody id="domenuspace" style="display:none">
  449. </tbody>
  450. <tbody id="domenupay" style="display:none">
  451. </tbody>
  452. <tr class="header" id="domenushopid" onMouseUp="turnit(domenushop,'menushopimg');" style="CURSOR: hand" title="展开/收缩">
  453. <td height="25">&nbsp;&nbsp;<img src="<?=$addimgurl?>" name="menushopimg" width="20" height="9" border="0">商城</td>
  454. </tr>
  455. <tbody id="domenushop" style="display:none">
  456. <tr>
  457. <td bgcolor="#FFFFFF">
  458. <table width="90%" border="0" align="right" cellpadding="3" cellspacing="1">
  459. <tr>
  460. <td height="23"><a href="#ecms" onclick="window.open('<?=$public_r['newsurl']?>e/ShopSys/buycar/','','width=680,height=500,scrollbars=yes,resizable=yes');">我的购物车</a></td>
  461. </tr>
  462. </table>
  463. </td>
  464. </tr>
  465. </tbody>
  466. </table>
  467. <?php
  468. }
  469. ?>
  470. </td>
  471. <td width="80%" height="420" valign="top" bgcolor="#FFFFFF">