외부로그인 소스 도움부탁드립니다. > 그누4 질문답변

그누4 질문답변

그누보드4 관련 질문은 QA 로 이전됩니다. QA 그누보드4 바로가기
기존 게시물은 열람만 가능합니다.

외부로그인 소스 도움부탁드립니다. 정보

외부로그인 소스 도움부탁드립니다.

첨부파일

123.bmp (809.9K) 1회 다운로드 2007-10-22 03:50:21

본문

123.jpg안녕하세요....외부로그인 소스를 수정할려는데 지금 새벽3시까지 아무리해도안되네요.
 
고수님들 부탁드립니다. 저좀 도와주세요
 
제가 사용하는 아웃로그인 소스는 아래와같습니다.
 
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<?
$l_title= array(방문자,비회원,준회원,정회원,우수회원,실버회원,골드회원,특별회원,VIP회원,MVP회원,운영자);//여기에 각레벨별 이름을 정의
$l_no = $member[mb_level];
?>
<?=levelup_auto($member[mb_id], $member[mb_level], $member[mb_point])?>
<style type="text/css">
body,td,select,input,div,form,textarea,center,option,pre,blockquote {font-size:9pt;font-family:굴림;color:#666666}
A:link {color:#666666;text-decoration:none;}
A:visited {color:#666666;text-decoration:none;}
A:active {color:#666666;text-decoration:none;}
A:hover {color:#4E87BD;text-decoration:none;}
.line {
 line-height: 150%;
}
</style>
<!-- 로그인 후 외부로그인 시작 -->
<table width="160"  border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="190"><img src="<?=$outlogin_skin_path?>/img/top_bg_title_ing.gif" width="160" height="50"></td>
  </tr>
  <tr>
    <td background="<?=$outlogin_skin_path?>/img/middle_bg.gif"><table width="160" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="98"><img src="<?=$outlogin_skin_path?>/img/login_ing_icon.gif" width="12" height="12"> <span class='member'><strong><?=$nick?></strong></span>님</td>
        <td colspan="2"><? if ($is_admin == "super" || $is_auth) { ?>
          <a href="<?=$g4[admin_path]?>/"><img src="<?=$outlogin_skin_path?>/img/admin.gif" width="41" height="14" border="0" align="absmiddle"></a>
          <? } ?></td>
        </tr>
      <tr>
        <td colspan="3" height="5"></td>
        </tr>
      <tr>
        <td><font color="#009933">레  벨 :
              <?=$l_title[$l_no]?>
        </font></td>
        <td colspan="2"><a href="javascript:win_memo();"><B>쪽지 (
            <?=$memo_not_read?>
          )</B></a></td>
        </tr>
      <tr>
        <td><?
// 스크랩 전체 갯수알아옴
$scrap = mysql_fetch_array(mysql_query("select count(ms_id) from $g4[scrap_table] where mb_id='$member[mb_id]'"));
$scrap = $scrap[0];
?>
<font color="#FF6600"><a href="javascript:win_scrap();">스크랩:
  <?=$scrap?>
</a></font></td>
        <td width="13" valign="top"><a href="javascript:win_point();"><img src="<?=$outlogin_skin_path?>/img/point.gif" width="13" height="14" align="baseline"> </td>
        <td width="49" valign="top"><a href="javascript:win_point();"><font color="#FF6600"><?=$point?>
        </font></td>
      </tr>
      <tr>
        <td colspan="3"><div align="center"><img src="<?=$outlogin_skin_path?>/img/line.gif" width="160" height="5"></div></td>
        </tr>
      <tr>
        <td colspan="3"><div align="center"><a href="<?=$g4[bbs_path]?>/member_confirm.php?url=register_form.php"><img src="<?=$outlogin_skin_path?>/img/modify.gif" width="64" height="24" border="0"></a> <a href="<?=$g4[bbs_path]?>/logout.php?url=<?=$urlencode?>"><img src="<?=$outlogin_skin_path?>/img/logout.gif" width="64" height="24" border="0"></a></div></td>
        </tr>  
    </table></td>
  </tr>
</table>
<script language="JavaScript">
// 탈퇴의 경우 아래 코드를 연동하시면 됩니다.
function member_leave()
{
    if (confirm("정말 회원에서 탈퇴 하시겠습니까?"))
            location.href = "<?=$g4[bbs_path]?>/member_confirm.php?url=member_leave.php";
}
</script>
<!-- 로그인 후 외부로그인 끝 -->
 
여기서 스크랩을 없애고 랭킹을 표시하고싶은데 아무리해도안되네요
 
랭킹을 사용하는소스는 아래와같습니다.
 
<?
if (!defined("_GNUBOARD_")) exit;
include_once("./_common.php");
include_once("$g4[path]/head.sub.php");
define("_CO_POINT_RANK_", TRUE);
$html_title = "포인트 랭킹";
$g4[title] = "" . $html_title;
?>
<style type="text/css">
<!--
.bk123 {
 border: 1px solid #CCCCCC;
}
.bkbk {
 border: 1px solid #999999;
}
-->
</style>
<table width="650" border="0" align="center" cellpadding="0" cellspacing="0" >
  <tr>
    <td height="100" colspan="6" align="left" valign="middle"><table width="656" border="0" cellpadding="0" cellspacing="0" class="bk123">
        <tr>
          <td height="102" style="padding-left:20px;"><div align="center"><img src="/level_img/level2.gif"> 준회원 <img src="/level_img/level3.gif"> 정회원 <img src="/level_img/level4.gif"> 우수회원 <img src="/level_img/level5.gif"> 실버회원 <img src="/level_img/level6.gif"> 골드회원 <img src="/level_img/level7.gif"> 특별회원 <img src="/level_img/level8.gif"> VIP회원 <img src="/level_img/level9.gif"> MVP회원  </div></td>
        </tr>
  <?
  if ($member[mb_id])
{
?>
        <tr>
          <td height="35" style="padding-left:20px;"><div align="center"><?
$sql = " select sum(mb_point) as sum_point from $g4[member_table]";
$row = sql_fetch($sql);
$sum_point = $row[sum_point];
echo "현재 <b>".$member[mb_id]."</b>님의 포인트는 <B>".$member[mb_point]."점</B>";
   $sql = " select count(mb_id) as cnt from $g4[member_table]
              where mb_point >= '$member[mb_point]' order by mb_point desc ";
    $row = sql_fetch($sql);
  
  $sql2 = " select count(mb_id) as cnt from $g4[member_table]";
    $row2 = sql_fetch($sql2);
  $total_count = $row2[cnt];
    echo " 이고, 랭킹은 전체회원수 <b>".$total_count."</b>명중 <B>".number_format($row[cnt])."등</B> 입니다.<br>";
?></div></td>
        </tr>
  <? } ?>
    </table></td>
  </tr>
<tr >
<td width="11%"><b><font color="blue">  랭킹</font></b></td>
<td height="25" colspan="2" background="img/title_bg.gif"><b><font color="blue">  닉네임</font></b></td>
<td width="17%" background="img/title_bg.gif" height="25"><b><font color="blue">아이디</font></b></td>
<td width="13%" background="img/title_bg.gif" align="right" height="25"><b><font color="blue">회원권한</font></b></td>
<td width="20%" align="right" background="img/title_bg.gif" ><b><font color="blue">포인트 </font></b></td>
</tr>
 <tr>
 <td colspan="6" height="5"></td>
</tr>
 <tr>
 <td colspan="6" height="1" bgcolor="#CCCCCC"></td>
</tr>
 <tr>
 <td colspan="6" height="5"></td>
</tr>
 <?
$sql = " select count(*) as cnt from $g4[member_table]";
$row = sql_fetch($sql);
$total_count = $row[cnt];
 
$rows = 20;
$total_page  = ceil($total_count / $rows);
if ($page == "") { $page = 1; }
$from_record = ($page - 1) * $rows;
$mod = 48;
$tbl_col =2 ;
$tbl_col_sep = (int)($mod / $tbl_col) + ($mod % $tbl_col)  ;
if($_GET[keyword]!="")
{
if($_GET[type]==0)
{
$keyword_yi="where mb_nick='$_GET[keyword]'";
}
if($_GET[type]==1)
{
$keyword_yi="where mb_name='$_GET[keyword]'";
}
if($_GET[type]==2)
{
$keyword_yi="where mb_id='$_GET[keyword]'";
}
}
$sql = " select * from $g4[member_table] $keyword_yi
          order by mb_point desc, mb_today_login desc
          limit $from_record, $rows ";
    $sql11 = " select count(*) from $g4[member_table] $keyword_yi
          order by mb_point desc, mb_today_login desc
          ";
$result = sql_query($sql);
$result11 = sql_query($sql11);
//echo $rsn11;
$rsn11=mysql_fetch_array($result11);
if($rsn11[0]==0)
{
if($_GET[type]==0)
{
$ty="닉네임";
}
if($_GET[type]==1)
{
$ty="이름";
}
if($_GET[type]==2)
{
$ty="아이디";
}

echo "<tr><td colspan=6 align=center height=150> 검색하신 $ty(<font color=red>$_GET[keyword]</font>) 에 대한 검색결과가 없습니다</td></tr>";
}
for ($i=0; $row=sql_fetch_array($result); $i++)
{
    $rank = (($page - 1) * $rows) + $i + 1;
    $point = number_format($row[mb_point]);
 $id = $row[mb_id];
  
?>

<tr height="30" >
<td width="11%" height="35" >   <?=$rank?>  </td>
<td width="4%" height="35" valign="middle"><?= level_icon($row[mb_id])?> </td>
<td width="18%" valign="middle"><a title="쪽지보내기" onfocus='this.blur()' style="FILTER: blendTrans(duration=0.7); CURSOR: pointer" onclick="window.open('/board/bbs/memo_form.php?me_recv_mb_id=<?=$row[mb_id]?>','www_yiwuauction_com1','width=602,height=521,toolbars=no,resizable=no,scrollbars=no')">
  <?=$row[mb_nick]?>
</a></td>
<td width="17%" height="35"><a title="정보보기" onfocus='this.blur()' style="FILTER: blendTrans(duration=0.7); CURSOR: pointer" onclick="window.open('/board/bbs/profile.php?mb_id=<?=$row[mb_id]?>','www_yiwuauction_com2','width=602,height=521,toolbars=no,resizable=no,scrollbars=no')"><b><?=$row[mb_id]?></b></a></td>
<td width="13%" height="35" align="right">
   <?
if ($level = $row[mb_level] == 10)
$level="운영자";
else if ($level = $row[mb_level] == 9)
$level="MVP회원";
else if ($level = $row[mb_level] == 8)
$level="VIP회원";
else if ($level = $row[mb_level] == 7)
$level="특별회원";
else if ($level = $row[mb_level] == 6)
$level="골드회원";
else if ($level = $row[mb_level] == 5)
$level="실버회원";
else if ($level = $row[mb_level] == 4)
$level="우수회원";
else if ($level = $row[mb_level] == 3)
$level="정회원";
else if ($level = $row[mb_level] == 2)
$level="준회원";
?>
<font color=green><?=$level?></font> </td>
<td width="20%" height="35" align="right"><font color="#FF0000"><?=$point?> 점</font></td>
</tr>

<tr>
<td colspan="6" height="1" background="img/dot_line.gif"></td>
</tr>
 <? } ?>
  <tr>
 <td colspan="6" height="30"></td>
</tr>
 <tr>
 <td height="20" colspan="6">
   <table width="651" height="20" border="0" cellpadding="0" cellspacing="0">
     <form id="form1" name="form1" method="get" action=""><tr>
       <td width="423" valign="middle">
   
    <?
    if($_GET[keyword]=="")
    {
$page = get_paging($config[cf_write_pages], $page, $total_page, "?$qstr&page=");
echo "<p><table width=100% cellpadding=0 cellspacing=0><tr><td align=center>$page</td></tr></table>";
}
?></td>
       <td width="187" align="right" valign="middle"> 
   
       <div align="center">
         <select name="type" id="type">
           <option value="0" <?php if($_GET[type]==0){ echo "selected";}?>>닉네임</option>
           <option value="1" <?php if($_GET[type]==1){ echo "selected";}?>>이름</option>
           <option value="2" <?php if($_GET[type]==2){ echo "selected";}?>>아이디</option>
         </select>
          <input name="keyword" type="text" class="bkbk" id="keyword" size="15" value="<?=$_GET[keyword]?>"/>
       </div>          </td>
       <td width="41" align="right"><input type="image" name="imageField" src="img/btn_post_search.gif" /></td>
     </tr></form>
   </table></td>
</tr>
 <tr>
   <td height="15" colspan="6"> </td>
 </tr>
</table>             
여기까지입니다.
 
제가원하는 그림으로 만들어 보았습니다.
  • 복사

댓글 전체

포인트 출력하는 곳에 아래와 같이하면 되지않을까요. 
<?=$point?><?
if ($member[mb_id])
{$sql = " select count(mb_id) as cnt from $g4[member_table]
          where  mb_point >= '$member[mb_point]' and mb_id <> '$config[cf_admin]' order by mb_point desc ";
 $row = sql_fetch($sql);

if ($row[cnt]<=99 && $member[mb_id] != 'pulsori'){
    echo " (".number_format($row[cnt])."등)";}
}
?>
위와같지하니깐

7080(20)등 이렇게나오네요

그러니깐 포인트 등수 이런식으로 나옵니다.

제가원하는것은

랭킹 : 20등 이렇게 나올수잇게 도움부탁드립니다.
© SIRSOFT
현재 페이지 제일 처음으로