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

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索

[分享] ss7.0 GBK正式版横排登陆文件的解决方法

[复制链接]
cr180 发表于 2009-3-28 22:40:50 | 显示全部楼层 |阅读模式
本帖最后由 cr180 于 2009-3-29 15:00 编辑

看到这里有很多人需要这个,就利用空余时间写出来发给大家参考一下。


在使用的时候请千万要备份好你原来的文件---bacth.panel.php

控制横排的css代码大家可以根据自己的情况进行修改

演示效果如下:







对了,这个横排登陆不能用在官方的默认模板里面,如果要用在官方的模板里,请修改对应的css的样式名。




根目录的bacth.panel.php文件
  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 id="user_login_position1">');
  57.         document.write('<div class="user_info">');
  58.         document.write('<ul>');
  59.         document.write('<li><a href="$siteurl/space.php?uid=$uid"><img src="$ucurl" alt=""></a></li>');
  60.         document.write('<li>$blang[welcome], <a href="$siteurl/space.php?uid=$uid">$_SGLOBAL[supe_username]</a></li>  <li>[<a href="$siteurl/batch.login.php?action=logout">$blang[safe_logout]</a>] </li> ');
  61.         document.write('<li><a class="tx_blue" href="$siteurl/space.php?uid=$uid">个人主页</a></li> |<li><a href="$siteurl/batch.search.php"> $blang[search] </a></li>');
  62.         document.write('$bbshtml');
  63.         document.write('$uchhtml');
  64.         document.write(' | <a href="$siteurl/admincp.php" target="_blank">$blang[management]</a> |  ');
  65.                 document.write('</ul>');

  66.         document.write('</div>$divhtml</div>');
  67. END;
  68. } else {

  69.         $formhash = formhash();
  70.         print <<<END
  71.         var noseccode = $_SCONFIG[noseccode];
  72.         document.write('<div id="user_login_position">');
  73.         document.write('<div id="login_top">');

  74.         document.write('<div id="login_authcode_img" style="display:none"><a href="javascript:updateseccode();"><img src="$siteurl/do.php?action=seccode" alt="$lang[verification_code]" id="img_seccode" /></a></div>');
  75.         document.write('<form id="login_box" action="$siteurl/batch.login.php?action=login" method="post">');
  76.         document.write('<input type="hidden" name="formhash" value="$formhash" />');
  77.         document.write('<p><img src="$siteurl/templates/pkers/images/txz.gif" /></p>');
  78.         document.write('<p><label>用户名:</label> <input type="text"  name="username" class="input_tx" size="23" onfocus="addseccode();" /></p>');
  79.         document.write('<p><label>密 码:</label> <input type="password" name="password" class="input_tx" size="23" onfocus="addseccode();" /></p>');
  80.         
  81.         document.write('<p id="login_authcode_input" style="display:none"><label>验证码:</label> <input type="text" class="input_tx" name="seccode" size="10" onfocus="showseccode()"; /></p>');
  82.         
  83.         
  84.         document.write('<div class="clearfix" id="login_showclose">');
  85.         document.write('<input id="cookietime" type="checkbox" value="315360000" name="cookietime" class="input_remember"/>');
  86.         document.write('<label class="label_remember" for="cookietime">记住密码</label>');
  87.         document.write('<input type="submit" name="loginsubmit" class="input_sub" value="$blang[login]" />');
  88.         document.write('</div>');

  89.         document.write('<div id="login_showclose" style="display:none"><a href="javascript:hidesec();">&nbsp;</a></div>');
  90.         document.write('</form></div></div>');
  91.         
  92. END;
  93. }

  94. /**
  95. * 取得用户后台模型mid
  96. * return array
  97. */
  98. function getuserspacemid() {
  99.         
  100.         $cachefile = S_ROOT.'./cache/model/model.cache.php';
  101.         $cacheinfo = '';
  102.         if(file_exists($cachefile)) {
  103.                 include_once($cachefile);
  104.         }
  105.         if(!empty($cacheinfo) && is_array($cacheinfo)) {
  106.                 return $cacheinfo;
  107.         } else {
  108.                 include_once(S_ROOT.'./function/cache.func.php');
  109.                 return updateuserspacemid();
  110.         }
  111. }

  112. ?>
复制代码
css文件内添加上

  1. /*登陆框架SS7正式版*/
  2. #user_login_position { width:520px; height:28px; overflow:hidden; line-height:28px;  float:left; text-align:left;  
  3. }
  4. #user_login_position1 { width: auto; height:28px; line-height:28px;  float:left; text-align:left  ;
  5. }
  6. #login_top { width:auto; height:26px; line-height:26px; overflow:hidden; margin-top:5px;_margin-top:7px;
  7. }
  8. #login_top img { margin:0px; padding:0px; margin-top:-1px;_margin-top:-3px;}
  9. #user_login_position a { height:28px; line-height:42px; color:#000000}
  10. #user_login_position p { margin:0px; padding:0px; float:left; margin-left:10px;}
  11. #login_authcode_img { width:150px; height:21px; float:left;position:absolute; left:360px; top:45px}
  12. #login_authcode_img img { width:150px; height:28px;}
  13. .user_info {float:left; margin-left:-80px;}
  14. .user_info ul li { width:auto;height:28px; line-height:40px; float:left; margin-left:10px; }
  15. .user_info ul li img { width:28px; height:28px; padding:1px; border:1px solid #D8D8D8; margin-left:40px; }
复制代码

评分

2

查看全部评分

尘缘太极 发表于 2009-3-28 22:44:24 | 显示全部楼层
要是有个演示就好了
回复

使用道具 举报

 楼主| cr180 发表于 2009-3-28 22:50:03 | 显示全部楼层
要是有个演示就好了
尘缘太极 发表于 2009-3-28 22:44



呵呵 忘了把这个加上去


可以了
回复

使用道具 举报

桃花仙人 发表于 2009-3-28 23:08:58 | 显示全部楼层
不错收藏一下!
回复

使用道具 举报

yuesebar 发表于 2009-3-28 23:11:31 | 显示全部楼层
http://www.bohelady.com

薄荷女人健康网  谢谢楼主,一会马上调试。
回复

使用道具 举报

q75788286 发表于 2009-3-28 23:40:11 | 显示全部楼层
忙了两天,发了N个帖子寻找解决问题方法结果还是没人操理!郁闷啊!只好自己动手学习修改了!修改的头都大了两圈,眼睛那个疼啊!本来就是半路出家的和尚,小学都没毕业还得学改代码!
用了两天恶补了下CSS和PHP 的知识! 终于让我给修改好了!现在分享给大家!
我在本地测试好都没来得及上传到我空间就给大家发拉!
主要是用于非7.0正式版以外的无法登陆!


我这网速实在是烂上传老是失败!请大家到
http://www.fei518.cn/bbs/thread-125-1-1.html  下载附件
回复

使用道具 举报

非氵去改装 发表于 2009-3-29 10:18:27 | 显示全部楼层
天啊! lz一定是看到我的求救贴了
   太感谢了   这是我最想要的  
   跪谢!
回复

使用道具 举报

㊣北方传媒 发表于 2009-3-29 10:23:07 | 显示全部楼层
很好很强大!
回复

使用道具 举报

非氵去改装 发表于 2009-3-29 11:57:23 | 显示全部楼层
怎么乱码了 ?
回复

使用道具 举报

非氵去改装 发表于 2009-3-29 11:57:38 | 显示全部楼层
怎么乱码了 ?
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-9-29 23:33 , Processed in 0.263757 second(s), 18 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

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