Discuz!官方免费开源建站系统

 找回密码
 立即注册
搜索

[已答复] 装了7.5,平湖模板登陆以后就不能显示会员、登陆等信息

[复制链接]
谈笑问书 发表于 2009-10-12 00:19:54 | 显示全部楼层 |阅读模式
本帖最后由 谈笑问书 于 2009-10-12 00:48 编辑

原来代码如下,
  1. <?php

  2. /*
  3.         [SupeSite] (C) 2007-2009 Comsenz Inc.
  4.         $Id: batch.panel.php 11538 2009-03-09 08:15:35Z zhaofei $
  5. */

  6. include_once('./common.php');
  7. include_once(S_ROOT.'./language/batch.lang.php');

  8. $uid = $_SGLOBAL['supe_uid'];
  9. $ucurl = avatar($uid);
  10. $siteurl = S_URL_ALL;
  11. if(!empty($uid)) {
  12.         if($channels['menus']['bbs']) {
  13.                 $bbshtml = ' | <a href="'.$_SC['bbsurl'].'" target="_blank">'.$blang['forum_visit'].'</a>';
  14.         }
  15.         if($channels['menus']['uchblog'] || $channels['menus']['uchimage']) {
  16.                 $uchhtml = ' | <a href="'.$_SC['uchurl'].'" target="_blank">'.$blang['home_visit'].'</a>';
  17.         }
  18.         $showpost = 0;
  19.         $showposturl = '';
  20.         $divhtml = '<div id="contribute_op" style="display:none;"><ul>';
  21.         if(!in_array('news', $_SCONFIG['closechannels']) && !empty($_SGLOBAL['group']['managespacenews'])) {
  22.                 $divhtml .= '<li><a href="'.$siteurl.'/admincp.php?action=spacenews&op=add" target="_blank" onclick="hidendivop();">'.$lang['news'].'</a></li>';
  23.                 $showpost++;
  24.                 $showposturl = $siteurl.'/admincp.php?action=spacenews&op=add';
  25.         }
  26.        
  27.         include_once(S_ROOT.'./function/model.func.php');
  28.         $midarr = getuserspacemid();
  29.         if(!empty($midarr)) {
  30.                 foreach($midarr as $tmpkey => $tmpvalue) {               
  31.                         $divhtml .= '<li><a href="'.$siteurl.'/admincp.php?action=modelmanages&mid='.$tmpvalue['mid'].'&op=add" onclick="hidendivop();" target="_blank">'.$tmpvalue['modelalias'].'</a></li>';
  32.                         $showpost++;
  33.                         $showposturl = $siteurl.'/admincp.php?action=modelmanages&mid='.$tmpvalue['mid'].'&op=add';
  34.                 }
  35.         }
  36.        
  37.         if($showpost == 1) {
  38.                 $showposturl = "document.write('<div class="user_op"> <a href="$showposturl" class="contribute_txt" target="_blank">$lang[pannel_contribution]</a> ');";
  39.         } elseif($showpost > 1) {
  40.                 $showposturl = "document.write('<div class="user_op"> <a href="javascript:contributeop();" class="contribute_txt">$lang[pannel_contribution]</a> ');";
  41.         }
  42.        
  43.         $divhtml .= '</ul></div>';
  44.        
  45.         print <<<END
  46.         function contributeop() {
  47.                 if($('contribute_op').style.display != 'block') {
  48.                         $('contribute_op').style.display = 'block';
  49.                 } else {
  50.                         $('contribute_op').style.display = 'none';
  51.                 }       
  52.         }
  53.         function hidendivop(){
  54.                 $('contribute_op').style.display = 'none';
  55.         }
  56.         document.write('<div class="login_ext">');
  57.         document.write('<p>$blang[welcome], <a href="$siteurl/home/space.php?uid=$uid">$_SGLOBAL[supe_username]</a> [<a href="$siteurl/batch.login.php?action=logout">$blang[safe_logout]</a>]');
  58.         document.write('<a href="$siteurl/home/space.php?uid=$uid">$blang[my_space]</a>');
  59.         document.write('$bbshtml');
  60.         document.write('$uchhtml');
  61.         document.write(' | <a href="$siteurl/admincp.php" target="_blank">$blang[management]</a>');
  62.         document.write('$divhtml</div>');
  63. END;
  64. } else {

  65.         $formhash = formhash();
  66.         print <<<END
  67.         var noseccode = $_SCONFIG[noseccode];
  68.         document.write('<div id="login_authcode_img" style="display:none"><img src="$siteurl/do.php?action=seccode" alt="$lang[verification_code]" id="img_seccode" /></div>');
  69.         document.write('<form id="login_box" action="$siteurl/batch.login.php?action=login" method="post">');
  70.         document.write('<input type="hidden" name="formhash" value="$formhash" />');
  71.         document.write('<label>$blang[username]:</label> <input type="text"  name="username" class="input_tx" size="23" onfocus="addseccode();" />');
  72.         document.write('<label>$blang[password]:</label> <input type="password" name="password" class="input_tx" size="23" onfocus="addseccode();" />');
  73.         document.write('<p id="login_authcode_input" style="display:none"><label>$lang[verification_code]:</label> <input type="text" class="input_tx" name="seccode" size="10" onfocus="showseccode()"; /> <a href="javascript:updateseccode();">$lang[changge_verification_code]</a></p>');
  74.         document.write('<div id="login_showclose" style="display:none"><a href="javascript:hidesec();">&nbsp;</a></div>');
  75.         document.write('<input id="cookietime" type="checkbox" value="315360000" name="cookietime" class="input_remember"/>');
  76.         document.write('<label class="label_remember" for="cookietime">$blang[i_remember]</label>');
  77.         document.write('<input type="submit" name="loginsubmit" class="input_sub" value="$blang[login]" />');
  78.         document.write('<div class="login_ext">');
  79.         document.write('<a href="$siteurl/do.php?action=register">$blang[registration]</a> | <a href="$siteurl/do.php?action=lostpasswd">$blang[find_passwords]</a>');
  80.         document.write('</div>');
  81.         document.write('</form>');
  82. END;
  83. }

  84. /**
  85. * 取得用户后台模型mid
  86. * return array
  87. */
  88. function getuserspacemid() {
  89.        
  90.         $cachefile = S_ROOT.'./cache/model/model.cache.php';
  91.         $cacheinfo = '';
  92.         if(file_exists($cachefile)) {
  93.                 include_once($cachefile);
  94.         }
  95.         if(!empty($cacheinfo) && is_array($cacheinfo)) {
  96.                 return $cacheinfo;
  97.         } else {
  98.                 include_once(S_ROOT.'./function/cache.func.php');
  99.                 return updateuserspacemid();
  100.         }
  101. }

  102. ?>
复制代码
7.5的新代码如下:
  1. <?php

  2. /*
  3.         [SupeSite] (C) 2007-2009 Comsenz Inc.
  4.         $Id: batch.panel.php 13359 2009-09-22 09:06:19Z zhaofei $
  5. */

  6. include_once('./common.php');
  7. include_once(S_ROOT.'./language/batch.lang.php');

  8. $uid = $_SGLOBAL['supe_uid'];
  9. $ucurl = avatar($uid);
  10. $siteurl = S_URL_ALL;
  11. if(!empty($uid)) {
  12.         if($channels['menus']['bbs']) {
  13.                 $bbshtml = ' | <a href="'.$_SC['bbsurl'].'" target="_blank">'.$blang['forum_visit'].'</a>';
  14.         }
  15.         if($channels['menus']['uchblog'] || $channels['menus']['uchimage']) {
  16.                 $uchhtml = ' | <a href="'.$_SC['uchurl'].'" target="_blank">'.$blang['home_visit'].'</a>';
  17.         }
  18.         $showpost = 0;
  19.         $showposturl = '';
  20.         $divhtml = '<div id="contribute_op" style="display:none;"><ul>';

  21.         if(!empty($channels['menus'])) {
  22.                 foreach($channels['menus'] as $value) {
  23.                         $channel = $value['nameid'];
  24.                         if(!checkperm('allowpost')) continue;
  25.                         if($value['type']=='type' || $value['type']=='user' && $value['upnameid']=='news') {
  26.                                 $divhtml .= '<li><a href="'.$siteurl.'/cp.php?ac=news&op=add&type='.$value['nameid'].'" onclick="hidendivop();" target="_blank">'.$value['name'].'</a></li>';
  27.                                 $showpost++;
  28.                                 $showposturl = $siteurl.'/cp.php?ac=news&op=add&type='.$value['nameid'];
  29.                         } elseif($value['type']=='model') {
  30.                                 $divhtml .= '<li><a href="'.$siteurl.'/cp.php?ac=models&op=add&nameid='.$value['nameid'].'" onclick="hidendivop();" target="_blank">'.$value['name'].'</a></li>';
  31.                                 $showpost++;
  32.                                 $showposturl = $siteurl.'/cp.php?ac=models&op=add&nameid='.$value['nameid'];
  33.                         }
  34.                 }
  35.         }
  36.        
  37.         if($showpost == 1) {
  38.                 $showposturl = "document.write('<a href="$showposturl" class="contribute_txt" target="_blank">$lang[pannel_contribution]</a> ');";
  39.         } elseif($showpost > 1) {
  40.                 $showposturl = "document.write('<a href="javascript:contributeop();" class="contribute_txt">$lang[pannel_contribution]</a> ');";
  41.         }
  42.        
  43.         $divhtml .= '</ul></div>';
  44.        
  45.         $openstate = empty($_GET['open']) ? array('', 'none') : array('none', '');
  46.         print <<<END
  47.         function contributeop() {
  48.                 if($('contribute_op').style.display != 'block') {
  49.                         $('contribute_op').style.display = 'block';
  50.                 } else {
  51.                         $('contribute_op').style.display = 'none';
  52.                 }       
  53.         }
  54.         function hidendivop(){
  55.                 $('contribute_op').style.display = 'none';
  56.         }
  57.         function hidenposition(){
  58.                 $('loginin_info').style.display = $('loginin_info').style.display=='none' ? '' : 'none';
  59.                 $('loginin_info_all').style.display = $('loginin_info_all').style.display=='none' ? '' : 'none';
  60.         }
  61.         document.write('<div id="loginin_info" style="display:$openstate[0];">');
  62.         document.write('<a href="$siteurl/space.php?uid=$uid"><img src="$ucurl" alt=""></a>');
  63.         document.write('<div class="user"><a href="$siteurl/space.php?uid=$uid">$_SGLOBAL[supe_username]</a> <a class="credit" href="$siteurl/cp.php?ac=credit" title="$lang[credit]">{$_SGLOBAL['member']['credit']}</a>&nbsp;<span class="out">[<a href="$siteurl/batch.login.php?action=logout">$blang[safe_logout]</a>]</span></div>');
  64.         document.write('<span class="admin">');
  65.         document.write(' <a href="$siteurl/cp.php">$blang[my_center]</a>');
  66.         document.write('</span>');
  67.         document.write('<a class="open" href="javascript:;" onclick="hidenposition();" title="$blang[open]">$blang[open]</a>');
  68.         document.write('</div>');
  69.        
  70.         document.write('<div id="loginin_info_all" class="fixedheight" style="display:$openstate[1];">');
  71.         document.write('<div id="user_login_position">');
  72.         document.write('<h3>$blang[user_panel]</h3>');
  73.         document.write('<div class="user_info">');
  74.         document.write('<dl>');
  75.         document.write('<dt><a href="$siteurl/space.php?uid=$uid"><img src="$ucurl" alt=""></a></dt>');
  76.         document.write('<dd>');
  77.         document.write('$blang[welcome], <a href="$siteurl/space.php?uid=$uid">$_SGLOBAL[supe_username]</a>[<a href="$siteurl/batch.login.php?action=logout">$blang[safe_logout]</a>]<br />');
  78.         document.write('<a class="credit" href="$siteurl/cp.php?ac=credit" title="$lang[credit]">{$_SGLOBAL['member']['credit']}</a>&nbsp');
  79.         document.write('<a class="tx_blue" href="$siteurl/space.php?uid=$uid">$blang[my_space]</a>');
  80.         document.write(' <a class="tx_blue" href="$siteurl/cp.php">$blang[my_center]</a>');
  81.         document.write('</dd>');
  82.         document.write('</dl>');
  83.     document.write('<div class="user_op">');
  84.         $showposturl
  85.         document.write(' <span><a href="$siteurl/batch.search.php">$blang[search]</a>');
  86.         document.write('$bbshtml');
  87.         document.write('$uchhtml');
  88. END;
  89.         if(checkperm('manageadmincp')) print("document.write(' | <a href="$siteurl/admincp.php" target="_blank">$blang[management]</a>');");
  90.         print <<<END
  91.         document.write(' </span></div></div>$divhtml');
  92.         document.write('<a class="close" href="javascript:;" onclick="hidenposition();" title="$blang[close]">$blang[close]</a>');
  93.         document.write('</div>');
  94.         document.write('</div>');
  95. END;
  96. } else {

  97.         $formhash = formhash();
  98.         print <<<END
  99.         var noseccode = $_SCONFIG[noseccode];
  100.         document.write('<div class="fixedheight">');
  101.         document.write('<div id="user_login_position">');
  102.         document.write('<div id="login_authcode_img" style="display:none"><img src="$siteurl/do.php?action=seccode" alt="$lang[verification_code]" id="img_seccode" /></div>');
  103.         document.write('<h3>$blang[user_login]</h3>');
  104.         document.write('<form id="login_box" action="$siteurl/batch.login.php?action=login" method="post">');
  105.         document.write('<input type="hidden" name="formhash" value="$formhash" />');
  106.         document.write('<fieldset><legend>$blang[user_login]</legend>');
  107.         document.write('<p><label>$blang[username]:</label> <input type="text"  name="username" class="input_tx" size="23" onfocus="addseccode();" tabindex="1" /></p>');
  108.         document.write('<p><label>$blang[password]:</label> <input type="password" name="password" class="input_tx" size="23" onfocus="addseccode();" tabindex="2" /></p>');
  109.         document.write('<p id="login_authcode_input" style="display:none"><label>$lang[verification_code]:</label> <input type="text" class="input_tx" name="seccode" size="10" onfocus="showseccode()"; tabindex="3" /> <a href="javascript:updateseccode();">$lang[changge_verification_code]</a></p>');
  110.         document.write('<div id="login_showclose" style="display:none"><a class="close" href="javascript:hidesec();" title="$blang[close]">$blang[close]</a></div>');
  111.         document.write('<div class="clearfix">');
  112.         document.write('<input id="cookietime" type="checkbox" value="315360000" name="cookietime" class="input_remember" tabindex="4" />');
  113.         document.write('<label class="label_remember" for="cookietime">$blang[i_remember]</label>');
  114.         document.write('<input type="submit" name="loginsubmit" class="input_sub" value="$blang[login]" tabindex="5" />');
  115.         document.write('</div>');
  116.         document.write('<p class="login_ext"><a href="$siteurl/do.php?action=register">$blang[registration]</a> | <a href="$siteurl/do.php?action=lostpasswd">$blang[find_passwords]</a></p>');
  117.         document.write('</fieldset></form></div>');
  118.         document.write('</div>');
  119. END;
  120. }

  121. ?>
复制代码

平湖batch.panel.rar

1.68 KB, 下载次数: 30

ss7.5batch.panel.rar

1.93 KB, 下载次数: 40

回复

使用道具 举报

chentaokkk 发表于 2009-10-12 09:29:20 | 显示全部楼层
知道也不告诉你,内侧包也不给我份
回复

使用道具 举报

sunj85 发表于 2009-10-12 10:15:23 | 显示全部楼层
因为模板引发的问题,是没人回答你的!((em:02))
回复

使用道具 举报

msnal 发表于 2009-10-12 10:31:09 | 显示全部楼层
知道也不告诉你,内侧包也不给我份
chentaokkk 发表于 2009-10-12 09:29



    ((em:13))
回复

使用道具 举报

kakashow 发表于 2009-10-12 10:32:33 | 显示全部楼层
不要乱发贴啊,这个帖子你得发到插件模板区
回复

使用道具 举报

lidq.jingwu 发表于 2009-10-12 11:22:35 | 显示全部楼层
平湖模板没有人来维护,升级后要根据自已的需要做调整,非官方模板,不好帮你。
回复

使用道具 举报

zhijie_he 发表于 2009-10-12 15:55:32 | 显示全部楼层
7.5要好好做啊,做强大
回复

使用道具 举报

 楼主| 谈笑问书 发表于 2009-10-12 16:58:03 | 显示全部楼层
平湖模板没有人来维护,升级后要根据自已的需要做调整,非官方模板,不好帮你。
lidq.jingwu 发表于 2009-10-12 11:22



作为一个胸怀天下的公司,是不是应该学习淘宝网马云的哲学:


在淘宝还只有十来个员工的时候,马云就说:“我们要做世界第一流的公司!”  他说我们不是去拿走客户口袋里的最后5元钱,而是先把5元变成50员,再拿走5元钱!
回复

使用道具 举报

lidq.jingwu 发表于 2009-10-12 17:03:15 | 显示全部楼层
作为一个胸怀天下的公司,是不是应该学习淘宝网马云的哲学:


在淘宝还只有十来个员工的时候,马 ...
谈笑问书 发表于 2009-10-12 16:58



    哈哈,学习了~
回复

使用道具 举报

qhdyezhu 发表于 2009-10-12 23:30:28 | 显示全部楼层
留个记号((em:01))
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|Discuz! 官方站 ( 皖ICP备16010102号 )star

GMT+8, 2025-9-14 12:59 , Processed in 0.098066 second(s), 17 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表