RadarURL

조회 수 4357 추천 수 0 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄 첨부
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄 첨부




우선 제 팁은 기존에 aol필드를 실명으로 사용하고 DB에 성별을 gender 필드로 추가하고
로그인 시간을 login_last_time라는 필드를 만들어 저장하여 사용하고 계시는 분들에게
유용합니다.
물론 위의 팁을 사용하지 않는 분들도 관리자 페이지에서 전체회원을 관리하는 부분의
나이를 표시하는 팁과 회원사진 보이게 하는 방법 그리고 회원 상세 정보를 보는 부분에서
나이의 표기와 회원사진을 리사이즈 하는 부분은 유용하리라 생각됩니다.
리사이즈 된 사진은 사진을 클릭하면 원래의 크기로 보실수가 있습니다.
(이부분은 스크립트 사용하지 않고 새창열기로 하였습니다. 필요하시면 레이어나 크기지정하여
창 여시면 훨씬 깔끔할듯 합니다.)

위에 이미 말씀 드린대로 필요하신 분들은
aol필드를 이용하여 실명과 별명을 구분하는 팁과 성별을 표기할수 있는 팁 그리고
로그인 시간을 저장하는 팁들을 미리 검색하여 구현해놓으시면 좋겠습니다.

우선 관리자 화면에서 전체 회원을 보는 부분을 설명드리겠습니다.
제로보드의 admin 폴더에서 admin_view_member.php 파일을 메모장이나 편집기로
열어주세요.

저는 회원들을 원래는 10명 단위로 보여주게 되어 있는데 22명씩 하니 1280x1024에서
스크롤 없이 볼수 있더군요.. 그래서
if(!$page_num)$page_num=10; 부분의 10을 22로 변경하여주시면 22명씩 보실 수 있습니다.
(기존에 다른분이 팁에 올려주셨던거 같은데 저는 이번에 수정하면서 제가 찾았네요.. ^^;)

그리고 관리자 페이지가 깨지지 않게 하기 위해서 'colspan=' 요부분을 찾아서
필드가 추가가 되기 때문에 필드의 갯수만큼 = 뒤에 숫자를 변경하여 주시기 바랍니다.
저 같은 경우에는 13개의 필드가 있습니다. 필드란 관리자 페이지에서
번호, 선택, 아이디, 이름, 별명, 나이, 생년... 요것들의 갯수를 말합니다.
모두 5군대가 있을 것입니다.

이젠 <td style=font-family:Tahoma;font-size:8pt;font-weight:bold;>번호</td>
요 부분을 찾으셔서

  <td style=font-family:Tahoma;font-size:8pt;font-weight:bold;>번호</td>
  <td style=font-family:Tahoma;font-size:8pt;font-weight:bold;><a href=.javascript onclick="return select();">선택</a></td>
  <td style=font-family:Tahoma;font-size:8pt;font-weight:bold;>아이디</td>
  <td style=font-family:Tahoma;font-size:8pt;font-weight:bold;>이름</td>
  <td style=font-family:Tahoma;font-size:8pt;font-weight:bold;>별명</td>
  <td style=font-family:Tahoma;font-size:8pt;font-weight:bold;>레벨</td>
  <td style=font-family:Tahoma;font-size:8pt;font-weight:bold;>점수</td>
  <td style=font-family:Tahoma;font-size:8pt;font-weight:bold;>가입일자</td>
  <td style=font-family:Tahoma;font-size:8pt;font-weight:bold;>수정</td>
  <td style=font-family:Tahoma;font-size:8pt;font-weight:bold;>삭제</td>

이 부분을

  <td style=font-family:Tahoma;font-size:8pt;font-weight:bold;>번호</td>
  <td style=font-family:Tahoma;font-size:8pt;font-weight:bold;><a href=.javascript onclick="return select();">선택</a></td>
  <td style=font-family:Tahoma;font-size:8pt;font-weight:bold;>아이디</td>
  <td style=font-family:Tahoma;font-size:8pt;font-weight:bold;>이름</td>
  <td style=font-family:Tahoma;font-size:8pt;font-weight:bold;>별명</td>
  <td style=font-family:Tahoma;font-size:8pt;font-weight:bold;>나이</td>
  <td style=font-family:Tahoma;font-size:8pt;font-weight:bold;>생년</td>  
  <td style=font-family:Tahoma;font-size:8pt;font-weight:bold;>성별</td>
  <td style=font-family:Tahoma;font-size:8pt;font-weight:bold;>레벨</td>
  <td style=font-family:Tahoma;font-size:8pt;font-weight:bold;>점수</td>
  <td style=font-family:Tahoma;font-size:8pt;font-weight:bold;>로그일자</td>
  <td style=font-family:Tahoma;font-size:8pt;font-weight:bold;>가입일자</td>
  <td style=font-family:Tahoma;font-size:8pt;font-weight:bold;>사진</td>
  <td style=font-family:Tahoma;font-size:8pt;font-weight:bold;>수정</td>
  <td style=font-family:Tahoma;font-size:8pt;font-weight:bold;>삭제</td>

이렇게 변경해주시기 바랍니다. 그러면 필드가 늘어나게 됩니다.

그 다음에는 else $grant_color=""; 부분을 찾으셔서 밑에

        if ($data[gender]==0) $gender_text='남';
        else $gender_text='여';
        
        $todate = date("Y");
        $bir = date("Y",$data[birth]);
        $age = $todate - $bir + 1;

이 부분을 추가해주시고

<td style=font-family:Tahoma;font-size:7pt;>$number</td> 이부분에서

$number--; 요 부분까지인

           <td style=font-family:Tahoma;font-size:7pt;>$number</td>
           <td><input type=checkbox name=cart[] value=$data[no]></td>
           <td style=font-family:Tahoma;font-size:8pt;>$data[user_id]</td>
           <td style=font-family:Tahoma;font-size:8pt;>$data[aol]</td>
           <td><img src=images/t.gif height=3><br>$data[name] </td>
           <td style=font-family:Tahoma;font-size:8pt;>$grant_color$data[level]</td>
           <td style=font-family:Tahoma;font-size:8pt;>".($data[point1]*10+$data[point2])." <font style=font-size:7pt;>(".$data[point1]."/".$data[point2].")</font></td>
           <td style=font-family:Tahoma;font-size:8pt;>".date("Y-m-d",$data[reg_date])."</td>
           <td style=font-family:Tahoma;font-size:8pt;><a href=$PHP_SELF?exec=$exec&group_no=$group_no&exec2=modify&page=$page&no=$data[no]&keyword=$keyword&keykind=$keykind&like=$like&page_num=$page_num>Modify</a></td>
           <td style=font-family:Tahoma;font-size:8pt;>";
   if($data[no]>1) echo"<a href=$PHP_SELF?exec=$exec&group_no=$group_no&exec2=del&keyword=$keyword&page=$page&no=$data[no]$href onclick="return confirm('삭제하시겠습니까?')">Delete</a>"; else echo" ";
   echo"   </td>
        </tr>
        ";
   $number--;

이 부분을

           <td style=font-family:Tahoma;font-size:7pt;>$number</td>
           <td><input type=checkbox name=cart[] value=$data[no]></td>
           <td style=font-family:Tahoma;font-size:8pt;>$data[user_id]</td>
           <td style=font-family:Tahoma;font-size:8pt;>$data[aol]</td>
           <td><img src=images/t.gif height=3><br>$data[name] </td>
           <td style=font-family:Tahoma;font-size:8pt;>$age</td>
           <td style=font-family:Tahoma;font-size:8pt;>".date("Y-m-d",$data[birth])."</td>
           <td style=font-family:Tahoma;font-size:8pt;>$gender_text</td>
           <td style=font-family:Tahoma;font-size:8pt;>$grant_color$data[level]</td>
           <td style=font-family:Tahoma;font-size:8pt;>".($data[point1]*10+$data[point2]*5+$data[login_point]*30)." <font style=font-size:7pt;>(".$data[point1]."/".$data[point2].")</font></td>
           <td style=font-family:Tahoma;font-size:8pt;>".date("Y-m-d",$data[login_last_time])."</td>
           <td style=font-family:Tahoma;font-size:8pt;>".date("Y-m-d",$data[reg_date])."</td>
           <td style=font-family:Tahoma;font-size:8pt;>";
   if($data[picture]) {
                      $pic=$data[picture]; {
                              $temp = @GetImageSize($pic);
                               if($temp[0] < 20 ) {
                                 $pic=("<center><img src='$data[picture]' border='0'></center>"); }
                               elseif($temp[0] > 20 ) {
                                 $pic=("<center><img src='$data[picture]' border='0' height=20></center>"); }
                               else {
                                 $pic=("<center><img src='$data[picture]' border='0'></center>"); }
                      }
                      echo "<a href=$data[picture] target=_blank>$pic</a>";
              };
   echo" </td>
           <td style=font-family:Tahoma;font-size:8pt;><a href=$PHP_SELF?exec=$exec&group_no=$group_no&exec2=modify&page=$page&no=$data[no]&keyword=$keyword&keykind=$keykind&like=$like&page_num=$page_num>Modify</a></td>
           <td style=font-family:Tahoma;font-size:8pt;>";
   if($data[no]>1) echo"<a href=$PHP_SELF?exec=$exec&group_no=$group_no&exec2=del&keyword=$keyword&page=$page&no=$data[no]$href onclick="return confirm('삭제하시겠습니까?')">Delete</a>"; else echo" ";
   echo"   </td>
        </tr>
        ";
        
$queryString="select * from $group_member_table where user_no='".$data[no]."'";
   $group_member_string="";
   $gresult=mysql_query($queryString);
   while ($gdata=mysql_fetch_array($gresult)) {
           $group_member_string.="   <a href=$PHP_SELF?exec=$exec&group_no=$group_no&exec2=delgroup&delgroup_num=".$gdata[group_no]."&delgroup_no=".$data[no]."&keyword=$keyword&page=$page&no=$data[no]$href onclick="return confirm('".$data[name]."님을 ".$group_name[$gdata[group_no]]."그룹에서 삭제하시겠습니까?')">".$group_name[$gdata[group_no]]."</a>";
   }
   if ($group_member_string!="") echo "<tr align=center height=23 bgcolor=#e0e0e0>
                   <td colspan=3 style=font-family:Tahoma;font-size:9pt;>참여중인 그룹 (지우려면 클릭하세요)</td>
                   <td colspan=6 align=left style=font-family:Tahoma;font-size:9pt;>$group_member_string</td>
           </tr>";
        
        
   $number--;

이렇게 변경해주시기 바랍니다.

여기까지 해주시면 전체회원을 관리하는 부분의 수정은 끝입니다.

그리고 이제는 회원의 상세 정보를 표시하는 부분입니다.

admin 폴더에서 admin_modify_member.php 파일을 편집기로 열어주세요.

성별을 나타내게 하는 부분과 성별을 수정하는 부분은 기존의 팁을 참고해주세요.

나이를 나타내게 하려면

<? if($group_data[use_birth]) { ?>

부분위에

<?
        $todate = date("Y");
        $bir = date("Y",$member_data[birth]);
        $age = $todate - $bir + 1;
?>

<? if($group_data[use_birth]) { ?>
  <tr height=22 align=center>
     <td bgcolor=#a0a0a0 align=right style=font-family:Tahoma;font-size:8pt;font-weight:bold;>나이  </td>
     <td align=left bgcolor=#e0e0e0> <input type=text name=age size=20 maxlength=20 value="<?=$age?>" class=input style=border-color:#b0b0b0 readonly></td>
  </tr>
<? } ?>

이렇게 넣어주시면 나이를 계산하여 보여주게 됩니다.

그리고 사진을 리사이즈해서 보여주고 클릭하면 원래 크기로 보이게 하려면

<? if($group_data[use_picture]) { ?>
  <tr height=22 align=center>
     <td bgcolor=#a0a0a0 align=right style=font-family:Tahoma;font-size:8pt;font-weight:bold;>사진  </td>
     <td align=left bgcolor=#e0e0e0> <input type=file name=picture size=37 maxlength=255 class=input style=border-color:#b0b0b0>
                 <? if($member_data[picture]) echo"<br> <img src='$member_data[picture]' border=0>"; ?>
     </td>
  </tr>
<? } ?>

이 부분을

<? if($group_data[use_picture]) { ?>
  <tr height=22 align=center>
     <td bgcolor=#a0a0a0 align=right style=font-family:Tahoma;font-size:8pt;font-weight:bold;>사진  </td>
     <td align=left bgcolor=#e0e0e0> <input type=file name=picture size=37 maxlength=255 class=input style=border-color:#b0b0b0>
                 <? if($member_data[picture]) {echo" <input type=checkbox name=del_picture value=1> 삭제<br> ";
                      $pic=$member_data[picture]; {
                              $temp = @GetImageSize($pic);
                               if($temp[0] < 110 ) {
                                 $pic=("<img src='$member_data[picture]' border='0'>"); }
                               elseif($temp[0] > 110 ) {
                                 $pic=("<img src='$member_data[picture]' border='0' width=110>"); }
                               else {
                                 $pic=("<img src='$member_data[picture]' border='0'>"); }
                      }
                      echo "<a href=$member_data[picture] target=_blank>$pic</a>";
              }; ?>
     </td>
  </tr>
<? } ?>

이렇게 변경해주시면 됩니다.

마지막으로 로그인 시간을 표시해주려면

  <tr height=22 align=center>
     <td bgcolor=#a0a0a0 align=right style=font-family:Tahoma;font-size:8pt;font-weight:bold;>Point  </td>
     <td align=left bgcolor=#e0e0e0> <?=($member_data[point1]*10+$member_data[point2])?> 점 ( 작성글수 : <?=$member_data[point1]?>, 코멘트 : <?=$member_data[point2]?> )</td>
  </tr>

이 부분을

  <tr height=22 align=center>
     <td bgcolor=#a0a0a0 align=right style=font-family:Tahoma;font-size:8pt;font-weight:bold;>Point  </td>    
     <td align=left bgcolor=#e0e0e0> <?=($member_data[point1]*10+$member_data[point2]*5+$member_data[login_point]*30)?> 점 ( 작성글수 : <?=$member_data[point1]?>, 코멘트 : <?=$member_data[point2]?>, 로그인 점수 : <?=$member_data[login_point]?>, 로그인 횟수 : <?=$member_data[login_repeat]?>, 최종 로그인 날짜 : <?=date("y.m.d h:i",$member_data[login_last_time])?> )</td>
  </tr>

이렇게 변경해주시면 됩니다.

처음에 말씀드린것 처럼 로그인 시간의 경우에는 미리
로그인 시간을 login_last_time라는 필드를 만들어 저장하여 사용하고 계시는 분들만 가능합니다.

두서 없이 작성하고 기존의 팁을 자세히 설명드리지 않아 죄송스럽게 생각됩니다.
기존의 팁은 제가 찾는대로 링크를 다시 걸어드리도록 하겠습니다.

설명이 미흡하여 의문사항이 생기시는 분은 질문 주시면 언제든지 답변해드리도록 하겠습니다.
(제가 올린 이곳에는 자주 오지 못하니 메일이나 제 홈피쪽에 질문을 주시는것이 더 빠를듯
합니다.)

아무쪼록 제로보드 사용자분들에게 조금이나마 도움이 되었기를 바랍니다.

출처 : http://www.nzeo.com/bbs/zboard.php?id=cgi_tip&page=1&page_num=20&select_arrange=headnum&desc=&sn=off&ss=on&sc=off&keyword=&no=7744&category=

?

공부 게시판

공부에 도움되는 글을 올려주세요.

  1. [공지] 공부 게시판 입니다.

    Date2003.08.18 By처누 Views928153
    read more
  2. 메모리 부족 현상 (allowed memory size of 134217728 bytes..)

    Date2023.08.01 Category웹 프로그래밍 ByJaeSoo Views2207
    Read More
  3. Guzzle - cURL error 60: SSL certificate problem: unable to get local issuer certificate 문제 해결

    Date2023.07.30 Category웹 프로그래밍 ByJaeSoo Views2188
    Read More
  4. XE 캐시파일 재성생후 404 Oops, Sorry. Page is not found! 나올때

    Date2023.07.29 Category웹 프로그래밍 ByJaeSoo Views2117
    Read More
  5. XE - " Fatal error: Class 'Object' not found in " / class 낫파운드 오류

    Date2023.03.20 Category웹 프로그래밍 ByJaeSoo Views147
    Read More
  6. iOS 앱 개발을 위한 인증서 생성 및 관리

    Date2023.01.18 Category웹 프로그래밍 ByJaeSoo Views218
    Read More
  7. PHP 파서 이해하기 (<?php의 php를 생략하고 간단히 <? 태그 와 ?> 태그를 사용하는 방법)

    Date2016.08.10 Category웹 프로그래밍 ByJaeSoo Views322
    Read More
  8. XE 비회원 글쓰기 항목 지우기

    Date2016.04.28 Category웹 프로그래밍 ByJaeSoo Views499
    Read More
  9. 오른쪽 마우스 금지 소스 / 드래그 금지 소스

    Date2016.01.20 Category웹 프로그래밍 ByJaeSoo Views475
    Read More
  10. Strict standards and C5 support errors

    Date2015.12.02 Category웹 프로그래밍 ByJaeSoo Views524
    Read More
  11. ICT노트 :: 반응형웹을 만드는 기술은?

    Date2015.09.26 Category웹 프로그래밍 ByJaeSoo Views489
    Read More
  12. [번역] 2014년 가장 인기있는 5가지 프론트엔드 프레임워크 비교

    Date2015.09.25 Category웹 프로그래밍 ByJaeSoo Views862
    Read More
  13. 최고의 반응형 CSS 프레임워크 18선 (2013년 7월기준)

    Date2015.09.25 Category웹 프로그래밍 ByJaeSoo Views586
    Read More
  14. 가장 진보된 반응형 웹을 위한 프레임워크 UIkit

    Date2015.09.25 Category웹 프로그래밍 ByJaeSoo Views559
    Read More
  15. 반응형 웹을 위한 프론트-엔드 프레임 워크 (front-end framework for developing responsive web)

    Date2015.09.25 Category웹 프로그래밍 ByJaeSoo Views739
    Read More
  16. 한국형 반응형웹 프레임웍을 찾아서 - 왜 우리는 IE 7,8때문에 고통받아야 하는가?

    Date2015.09.25 Category웹 프로그래밍 ByJaeSoo Views611
    Read More
  17. 한국을 위한 CSS 그리드 디자인 프레임워크

    Date2015.09.25 Category웹 프로그래밍 ByJaeSoo Views531
    Read More
  18. 과연 반응형 웹 디자인만이 해답일까?

    Date2015.09.25 Category웹 프로그래밍 ByJaeSoo Views536
    Read More
  19. 반응형 웹 디자인의 단점

    Date2015.09.25 Category웹 프로그래밍 ByJaeSoo Views567
    Read More
  20. 웹디자인 신기술 트렌드 및 적용 사례

    Date2015.07.28 Category웹 프로그래밍 ByJaeSoo Views510
    Read More
  21. 제이쿼리(jQuery) 튜토리얼(Tutorial) 모음

    Date2015.07.28 Category웹 프로그래밍 ByJaeSoo Views1253
    Read More
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 ... 15 Next
/ 15


즐겨찾기 (가족)

JAESOO's HOMEPAGE


YOUNGAE's HOMEPAGE


장여은 홈페이지


장여희 홈페이지


장여원 홈페이지


즐겨찾기 (업무)

알리카페 홀릭

숭실대 컴퓨터 통신연구실 (서창진)

말레이시아 KL Sentral 한국인 GuestHouse


즐겨찾기 (취미)

어드민아이디

유에코 사랑회

아스가르드 좋은사람/나쁜사람

JServer.kr

제이서버 메타블로그

재수 티스토리


즐겨찾기 (강의, 커뮤니티)

재수 강의 홈페이지


한소리


VTMODE.COM


숭실대 인공지능학과


숭실대 통신연구실


베너