RadarURL

웹 프로그래밍
2005.11.25 06:19

제로보드에 로그인 횟수, 점수, 날짜 저장

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

단축키

Prev이전 문서

Next다음 문서

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

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
login_check.php 파일의

// 회원로그인이 성공하였을 경우 세션을 생성하고 페이지를 이동함
        if($member_data[no]) {

부분 밑에 아래를 추가

// 로그인 횟수 등의 정보 시작

$login_time = mktime(); // 현재시각 구함
$lastlogin = $member_data[login_last_time]; // 최근 로그인 시각 구해 옴

if($login_time-$lastlogin > 0) // 최근 로그인 시각과 현재 시각의 차이가 있을 시 로그인 회수 1회 증가, 최근 로그인 시간 현재시각으로 저장
@mysql_query("update $member_table set login_repeat=$member_data[login_repeat]+1, login_last_time=$login_time where no=$member_data[no]",$connect) or error(mysql_error());
if($login_time-$lastlogin >= 12*3600) //최근 로그인 시각에서 12시간이 경과했으면 로그인 점수 1점 증가
@mysql_query("update $member_table set login_point=$member_data[login_point]+1 where no=$member_data[no]",$connect) or error(mysql_error());

// 로그인 횟수 등의 정보 끝


member_modify.php 파일에서

적당한 부분에

  <tr>
  <td colspan="5" bgcolor="#EBD9D9" align="center"><img src="images/t.gif" width="10" height="1"></td>
  </tr>

  <tr height=28 align=right>
     <td style=font-family:Tahoma;font-size:8pt;><font color="#FFFFF">Last Login time</td>
     <td align=left> <font color="#FFFFF"><?=date("y년 m월 d일 h시 i분",$member[login_last_time])?><td>
  </tr

를 추가

admin_modify_member.php 에서

  <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])?> 점 ( 작성글수 : <?=$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>

와 같이 바꾸면 된다.

그러면 로그인 힛수와, 점수, 날짜 등을 회원 정보와
관리자 회원 관리의 회원정보 수정 화면에서 볼 수가 있으며

로그인 점수는 현재 로그인 횟수 X 30점 이다..
점수 고치는건 잘 찾아보시면 될듯~ ㅋㅋ


도움 받은 출처:
http://www.nzeo.com/bbs/zboard.php?id=cgi_tip&select_arrange=headnum&desc=asc&page_num=20&selected=&exec=&sn=off&ss=on&sc=off&category=&keyword=%C8%BD%BC%F6

http://www.nzeo.com/bbs/zboard.php?id=cgi_tip&page=2&sn1=&divpage=1&sn=off&ss=on&sc=on&keyword=로그인&select_arrange=headnum&desc=asc&no=7359

http://www.nzeo.com/bbs/zboard.php?id=cgi_tip&page=1&sn1=&divpage=1&sn=off&ss=on&sc=off&keyword=최근로그인&select_arrange=headnum&desc=asc&no=3331

http://www.nzeo.com/bbs/zboard.php?id=cgi_tip&page=5&sn1=&divpage=1&sn=off&ss=on&sc=on&keyword=로그인&select_arrange=headnum&desc=asc&no=6913

http://www.nzeo.com/bbs/zboard.php?id=cgi_tip&page=1&sn1=&divpage=1&sn=off&ss=on&sc=off&keyword=횟수&select_arrange=headnum&desc=asc&no=2496

http://www.nzeo.com/bbs/zboard.php?id=cgi_tip&select_arrange=headnum&desc=asc&page_num=20&selected=&exec=&sn=off&ss=on&sc=off&category=&keyword=%C3%D6%B1%D9%B7%CE%B1%D7%C0%CE
?

공부 게시판

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

List of Articles
번호 분류 제목 글쓴이 날짜 조회 수
공지 [공지] 공부 게시판 입니다. 처누 2003.08.18 952955
298 웹 프로그래밍 메모리 부족 현상 (allowed memory size of 134217728 bytes..) YooN 2023.08.01 2964
297 웹 프로그래밍 Guzzle - cURL error 60: SSL certificate problem: unable to get local issuer certificate 문제 해결 file YooN 2023.07.30 3130
296 웹 프로그래밍 XE 캐시파일 재성생후 404 Oops, Sorry. Page is not found! 나올때 YooN 2023.07.29 2864
295 웹 프로그래밍 XE - " Fatal error: Class 'Object' not found in " / class 낫파운드 오류 file YooN 2023.03.20 975
294 웹 프로그래밍 iOS 앱 개발을 위한 인증서 생성 및 관리 file YooN 2023.01.18 1044
293 웹 프로그래밍 PHP 파서 이해하기 (<?php의 php를 생략하고 간단히 <? 태그 와 ?> 태그를 사용하는 방법) YooN 2016.08.10 1177
292 웹 프로그래밍 XE 비회원 글쓰기 항목 지우기 file YooN 2016.04.28 1338
291 웹 프로그래밍 오른쪽 마우스 금지 소스 / 드래그 금지 소스 YooN 2016.01.20 1171
290 웹 프로그래밍 Strict standards and C5 support errors YooN 2015.12.02 1396
289 웹 프로그래밍 ICT노트 :: 반응형웹을 만드는 기술은? file YooN 2015.09.26 1296
288 웹 프로그래밍 [번역] 2014년 가장 인기있는 5가지 프론트엔드 프레임워크 비교 file YooN 2015.09.25 1633
287 웹 프로그래밍 최고의 반응형 CSS 프레임워크 18선 (2013년 7월기준) file YooN 2015.09.25 1360
286 웹 프로그래밍 가장 진보된 반응형 웹을 위한 프레임워크 UIkit file YooN 2015.09.25 1624
285 웹 프로그래밍 반응형 웹을 위한 프론트-엔드 프레임 워크 (front-end framework for developing responsive web) file YooN 2015.09.25 1594
284 웹 프로그래밍 한국형 반응형웹 프레임웍을 찾아서 - 왜 우리는 IE 7,8때문에 고통받아야 하는가? file YooN 2015.09.25 1427
283 웹 프로그래밍 한국을 위한 CSS 그리드 디자인 프레임워크 YooN 2015.09.25 1385
282 웹 프로그래밍 과연 반응형 웹 디자인만이 해답일까? file YooN 2015.09.25 1398
281 웹 프로그래밍 반응형 웹 디자인의 단점 file YooN 2015.09.25 1392
280 웹 프로그래밍 웹디자인 신기술 트렌드 및 적용 사례 file YooN 2015.07.28 1330
279 웹 프로그래밍 제이쿼리(jQuery) 튜토리얼(Tutorial) 모음 file YooN 2015.07.28 2117
Board Pagination Prev 1 2 3 4 5 6 7 8 9 10 ... 15 Next
/ 15


즐겨찾기 (가족)

JAESOO's HOMEPAGE


장여은 홈페이지


장여희 홈페이지


장여원 홈페이지


즐겨찾기 (업무)

알리카페 홀릭

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

말레이시아 KL Sentral 한국인 GuestHouse


즐겨찾기 (취미)

어드민아이디

유에코 사랑회

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

JServer.kr

제이서버 메타블로그

재수 티스토리


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

재수 강의 홈페이지


한소리


VTMODE.COM


숭실대 인공지능학과


숭실대 통신연구실


베너