RadarURL

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

단축키

Prev이전 문서

Next다음 문서

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

단축키

Prev이전 문서

Next다음 문서

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


///////////////////////////////////////////////////////////////////


2005.09.25 3차 수정됨


//////////////////////////////////////////////////////////////////


회원가입시.. 비밀번호에 대한 힌트와 답을 받은후...
비밀번호를 분실할경우..
가입시 입력했던..
비밀번호에 대한 힌트와 답을 가지고.. 비밀번호를 웹에서 바로 찾는 기능입니다..


먼저 다운 받은 파일을 압축해제한후 lost_pass폴더안에 보시면 2개의 파일이 있습니다.
이파일을 제로보드 폴더(bbs)안에 넣어주세요.


이제 파일을 좀 수정해야됩니다..
수정부분은 그리 어렵지 않으니.. 잘 따라해주세요..^^


bbs/member_join.php를 php전용 에디터로 엽니다.
3번째 line ...
include "lib.php"; 다음 줄에 아래소스를 넣습니다.


require_once "function_lost.php";


124번째 line...
if(!write.name.value) { alert("이름을 입력하세요"); write.name.focus(); return false; }


위 소스 다음줄에 아래소스를 넣습니다.


if(!write.passwordmd1.value) { alert("비밀번호 분실 항목을 선택해주세요."); write.passwordmd1.focus(); return false; }
if(!write.passwordmd.value) { alert("비밀번호 분실 답을 입력하세요"); write.passwordmd.focus(); return false; }


241 ~ 248번째 line...
<tr align=right height=28>
<td style=font-family:Tahoma;font-size:8pt;><b>E-mail </td>
<td align=left> <input type=text name=email size=50 maxlength=255 value="<?=$member[email]?>" style=border-color:#d8b3b3 class=input>
<input type=checkbox value=1 name=open_email checked> 공개
</td>
</tr><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;"><b>비밀번호분실 <b></td>
<td align="left" style="padding-left: 4px"> <select style="font-family:Tahoma;font-size:8pt;" name="passwordmd1">
<option value="">선택하십시오.</option>
<?=lost_option($lost_list,$passwordmd1)?>
</select></td>
</tr>   
<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;"><b>분실시 답변 <b></td>
<td align="left" style="padding-left: 4px"> <input type="text" style="height:20px;" name="passwordmd" size="50" maxlength="255" value="<?=$passwordmd?>" style="border-color:#d8b3b3" class="input">        </td>
</tr>
<tr>
<td colspan="5" bgcolor="#EBD9D9" align="center"><img src="images/t.gif" width="10" height="1"></td>
</tr>


이제 저장한 후 bbs/member_join_ok.php를 php전용 에디터로 엽니다.


3번째 line...
include "lib.php"; 다음줄에 아래소스를 추가합니다.


require_once "function_lost.php";


71번째 line....
if($check[0]>0) Error("이미 등록되어 있는 주민등록번호입니다","");
$jumin=$jumin1.$jumin2;
}


위 소스 다음줄에 아래소스를 추가합니다.


if(isBlank($passwordmd1)) Error("비밀번호 분실 항목을 선택하셔야 합니다.");
if(isBlank($passwordmd)) Error("비밀번호 분실 답을 입력하셔야 합니다");


116번째 line...
mysql_query("insert into $member_table (level,group_no,user_id,password,name,email,homepage,icq,aol,msn,jumin,comment,job,hobby,home_address,home_tel,office_address,office_tel,handphone,mailing,birth,reg_date,openinfo,open_email,open_homepage,open_icq,open_msn,open_comment,open_job,open_hobby,open_home_address,open_home_tel,open_office_address,open_office_tel,open_handphone,open_birth,open_picture,picture,open_aol) values ('$group_data[join_level]','$group_data[no]','$user_id',password('$password'),'$name','$email','$homepage','$icq','$aol','$msn',password('$jumin'),'$comment','$job','$hobby','$home_address','$home_tel','$office_address','$office_tel','$handphone','$mailing','$birth','$reg_date','$openinfo','$open_email','$open_homepage','$open_icq','$open_msn','$open_comment','$open_job','$open_hobby','$open_home_address','$open_home_tel','$open_office_address','$open_office_tel','$open_handphone','$open_birth','$open_picture','$picture_name','$open_aol')") or error("회원 데이타 입력시 에러가 발생했습니다<br>".mysql_error());


위 소스를 삭제하고 아래소스를 넣습니다.


mysql_query("insert into $member_table (level,group_no,user_id,password,name,email,homepage,icq,aol,msn,jumin,comment,job,hobby,home_address,home_tel,office_address,office_tel,handphone,mailing,birth,reg_date,openinfo,open_email,open_homepage,open_icq,open_msn,open_comment,open_job,open_hobby,open_home_address,open_home_tel,open_office_address,open_office_tel,open_handphone,open_birth,open_picture,picture,open_aol,passwordmd,passwordmd1) values ('$group_data[join_level]','$group_data[no]','$user_id',password('$password'),'$name','$email','$homepage','$icq','$aol','$msn',password('$jumin'),'$comment','$job','$hobby','$home_address','$home_tel','$office_address','$office_tel','$handphone','$mailing','$birth','$reg_date','$openinfo','$open_email','$open_homepage','$open_icq','$open_msn','$open_comment','$open_job','$open_hobby','$open_home_address','$open_home_tel','$open_office_address','$open_office_tel','$open_handphone','$open_birth','$open_picture','$picture_name','$open_aol','$passwordmd','$passwordmd1')") or error("회원 데이타 입력시 에러가 발생했습니다<br>".mysql_error());


이제 저장한 후 member_modify.php를 php전용 에디터로 엽니다.


3번째 line...
include "lib.php"; 다음줄에 아래 소스를 넣습니다.


require_once "function_lost.php";


69번째 line...
if(!write.name.value) { alert("이름을 입력하세요"); write.name.focus(); return false; }


위 소스 다음줄에 아래 소스를 넣습니다.


if(!write.passwordmd1.value) { alert("비밀번호 분실 항목을 선택해주세요."); write.passwordmd1.focus(); return false; }
if(!write.passwordmd.value) { alert("비밀번호 분실 답을 입력하세요"); write.passwordmd.focus(); return false; }


161 ~ 169번째 line...
<tr height=28 align=right>
<td style=font-family:Tahoma;font-size:8pt;><b>E-mail </td>
<td align=left> <input type=text name=email size=40 maxlength=255 value="<?=$member[email]?>" style=border-color:#d8b3b3 class=input>
<input type=checkbox value=1 name=open_email <?=$check[$member[open_email]]?>> 공개
</td>
</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;"><b>비밀번호분실 <b></td>
<td align="left" style="padding-left: 4px"> <select style="font-family:Tahoma;font-size:8pt;" name="passwordmd1">
<option value="">선택하십시오.</option>
<?=lost_option($lost_list,$member[passwordmd1])?>
</select></td>
</tr>   
<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;"><b>분실시 답변 <b></td>
<td align="left" style="padding-left: 4px"> <input type="text" style="height:20px;" name="passwordmd" size="40" maxlength="255" value="<?=htmlspecialchars($member[passwordmd])?>" style="border-color:#d8b3b3" class="input">        </td>
</tr>
<tr>
<td colspan="5" bgcolor="#EBD9D9" align="center"><img src="images/t.gif" width="10" height="1"></td>
</tr>


이제 저장한 후 member_modify_ok.php를 php전용 에디터로 엽니다.


3번째 line...
include "lib.php"; 다음줄에 아래 소스를 넣습니다.


require_once "function_lost.php";


23번째 line...
if($check[0]>0) Error("이미 등록되어 있는 E-Mail입니다"); 다음줄에 아래 소스를 넣습니다.


if(isblank($passwordmd1)) Error("비밀번호 분실 항목을 선택하셔야 합니다.");
if(isblank($passwordmd)) Error("비밀번호 분실 답을 입력하셔야 합니다");


63번째 line ...
$que.=",openinfo='$openinfo',open_email='$open_email',open_homepage='$open_homepage',open_icq='$open_icq',open_msn='$open_msn',open_comment='$open_comment',open_job='$open_job',open_hobby='$open_hobby',open_home_address='$open_home_address',open_home_tel='$open_home_tel',open_office_address='$open_office_address',open_office_tel='$open_office_tel',open_handphone='$open_handphone',open_birth='$open_birth',open_picture='$open_picture',open_aol='$open_aol' ";


위 소스를 삭제하고 아래 소스를 넣습니다.


$que.=",openinfo='$openinfo',open_email='$open_email',open_homepage='$open_homepage',open_icq='$open_icq',open_msn='$open_msn',open_comment='$open_comment',open_job='$open_job',open_hobby='$open_hobby',open_home_address='$open_home_address',open_home_tel='$open_home_tel',open_office_address='$open_office_address',open_office_tel='$open_office_tel',open_handphone='$open_handphone',open_birth='$open_birth',open_picture='$open_picture',open_aol='$open_aol',passwordmd='$passwordmd',passwordmd1='$passwordmd1' ";


이제 저장한 후..


lostid.php를 php전용에디터로 열어 안에 들어있는 소스를 전부 지우고,,,
그자리에 아래소스를 넣습니다..


<html>
<head>
<title>웹페이지 대화상자--</title>
<meta http-equiv="Content-Type" content="text/html; charset=euc-kr">
</head>
<body style="border: 0;">
<?
include "lib.php";
require_once "function_lost.php";
function errormessage ($str){
  echo '
    <script>
      window.alert ("'.$str.'");
      history.go(-1);
    </script>
  ';
  exit;
}


$connect = dbconn();
if($_POST['mode'] == 'modifyi')
{
if(!eregi($HTTP_HOST,$HTTP_REFERER)) Error("정상적으로 접근해 주시길 바랍니다.","");
if($_SERVER['REQUEST_METHOD'] != 'POST') Error("정상적으로 접근해 주시길 바랍니다.","");
if(!$_POST['user_id'] && !$_POST['email']) Error("값을 입력해 주십시오.","");
if(isblank($user_id)) errormessage("아이디를 입력하여 주십시오");
if(isblank($email)) errormessage("이메일을 입력하여 주십시오");
$result=mysql_query("select * from zetyx_member_table where user_id='$user_id' and email='$email'",$connect) or Error(mysql_error());
if(!mysql_num_rows($result)) errormessage("입력하신 정보에 해당하는 회원이 없습니다.");
else {
$data=mysql_fetch_array($result);
echo '
<script>
function check_submit(){
if(!user_password.email.value) {alert("이메일을 입력하여 주십시오"); user_password.email.focus(); return false; }
if(!user_password.passwordmd1.value) { alert("비밀번호 분실 힌트를 선택해주세요"); user_password.passwordmd1.focus(); return false; }
if(!user_password.passwordmd.value) {alert("분실시 입력한 답을 입력해주세요."); user_password.passwordmd.focus(); return false; } 
return confirm("정확하게 입력하셨습니까?");
}
</script>
<table align="center" height="100%" cellspacing="5" cellpadding="7" style="width:250px;background-color:#f9f9f9;">
<col width="100%" />
<tr>
<td align="center" style="border-width:1px;border-color:#f0f0f0;border-style:solid;background-color:#ffffff;white-space:nowrap;">
<table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<td align="center">
<table width="350" cellspacing="0" cellpadding="0" border="0">
<form name="user_password" action="/'.$PHP_SELF.'" method="post" onsubmit="return check_submit()">
<input type="hidden" name="mode" value="modify">
<tr>
<td align="center" colspan="2" style="font-family: 굴림;font-size: 12px;padding-bottom: 6px;padding-top: 6px;">2차 인증 페이지입니다. 안녕하세요 <b>'.$data[name].'</b>님^^<br />가입당시 비밀번호 힌트에 대한 답을 입력해주세요.
</td>
</tr>
<tr>
<td align="right" height="24" style="font-family: 굴림;font-size: 12px">이메일 
</td>
<td style="padding-left: 4px"><input type="text" name="email" value="'.$email.'" style="font-family:굴림;font-size: 12px;color:#000000;background-color:#FFFFFF;border:1px solid #CCCCCC;width:288px;height:18px;">
</td>
</tr>
<tr>
<td align="right" height="24" style="font-family:굴림;font-size:12px">힌트 
</td>
<td style="padding-left: 4px"><select style="font-family:Tahoma;font-size:8pt;" name="passwordmd1">
<option value="">선택하십시오.</option>
'.lost_option($lost_list,$data[passwordmd1]).'
</select>
</td>
</tr>
<tr>
<td align="right" height="24" style="font-family:굴림;font-size:12px">답 
</td>
<td style="padding-left: 4px"><input type="text" name="passwordmd" maxlength="255" style="font-family:굴림;font-size: 12px;color:#000000;background-color:#FFFFFF;border:1px solid #CCCCCC;width:288px;height:18px;">
</td>
</tr>
<tr>
<td align="right" colspan="2" style="padding-top: 6px;padding-right: 18px"><input type="image" onfocus="this.blur()" src="images/lo_ok.gif"> <a onclick="self.close();" style="cursor:pointer;" onfocus="this.blur()"><img src="images/lo_close.gif" border="0"></a>   
</td>
</tr>
</form>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
';
}
}
elseif($_POST['mode'] == 'modify')
{
if(!eregi($HTTP_HOST,$HTTP_REFERER)) Error("정상적으로 접근해 주시길 바랍니다.","");
if($_SERVER['REQUEST_METHOD'] != 'POST') Error("정상적으로 접근해 주시길 바랍니다.","");
if(!$_POST['email'] && !$_POST['passwordmd1'] && !$_POST['passwordmd']) Error("값을 입력해 주십시오.","");
if(isblank($email)) errormessage("이메일을 입력하여 주십시오");
if(isblank($passwordmd1)) errormessage("비밀번호 분실 힌트를 선택해주세요.");
if(isblank($passwordmd)) errormessage("분실시 입력한 답을 입력해주세요.");
 
$result=mysql_query("select * from zetyx_member_table where email='$email' and passwordmd='$passwordmd' and passwordmd1='$passwordmd1'",$connect) or Error(mysql_error());
 
if(!mysql_num_rows($result)) errormessage("입력하신 정보에 해당하는 회원이 없습니다.");
else {
$data=mysql_fetch_array($result);
$pass_temp=substr(md5(date('YmdHis')),1,12);
mysql_query("update $member_table set password=password('$pass_temp') where no='$data[no]'",$connect) or Error(mysql_error());
echo '
<table align="center" height="100%" height="100%" cellspacing="5" cellpadding="7" style="width:250px;background-color:#f9f9f9;">
<col width="100%" />
<tr>
<td align="center" style="border-width:1px;border-color:#f0f0f0;border-style:solid;background-color:#ffffff;white-space:nowrap;">
<table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<td align="center">
<table width="350" cellspacing="0" cellpadding="0" border="0">
<tr>
<td align="center" style="font-family: 굴림;font-size: 12px;padding-bottom: 6px;padding-top: 6px;line-height: 140%">
'.stripslashes($data[name]).'님의 새로운 비밀번호가 발급되었습니다.<br />임시 비밀번호는 <b>'.$pass_temp.'</b> 입니다.<br />로그인후 필히 회원정보에서 비밀번호를 변경하시길 바랍니다.
</td>
</tr>
</form>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
';
}
}
else{
echo '
<script>
function check_submit(){
if(!user_password.user_id.value) {alert("아이디를 입력하여 주십시오"); user_password.user_id.focus(); return false; }
if(!user_password.email.value) {alert("이메일을 입력하여 주십시오"); user_password.email.focus(); return false; }
return confirm("정확하게 입력하셨습니까?");
}
</script>
<table align="center" height="100%" cellspacing="5" cellpadding="7" style="width:250px;background-color:#f9f9f9;">
<col width="100%" />
<tr>
<td align="center" style="border-width:1px;border-color:#f0f0f0;border-style:solid;background-color:#ffffff;white-space:nowrap;">
<table width="100%" height="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<td align="center">
<table width="350" cellspacing="0" cellpadding="0" border="0">
<form name="user_password" action="/'.$PHP_SELF.'" method="post" onsubmit="return check_submit()">
<input type="hidden" name="mode" value="modifyi">
<tr>
<td align="center" colspan="2" style="font-family: 굴림;font-size: 12px;padding-bottom: 6px;padding-top: 6px;"><b>1차 인증 페이지입니다.</b><br />가입당시 아이디,이메일을 입력하여 주십시오.
</td>
</tr>
<tr>
<td align="right" height="24" style="font-family: 굴림;font-size: 12px">아이디 
</td>
<td style="padding-left: 4px"><input type="text" name="user_id" style="font-family:굴림;font-size: 12px;color:#000000;background-color:#FFFFFF;border:1px solid #CCCCCC;width:288px;height:18px;">
</td>
</tr>
<tr>
<td align="right" height="24" style="font-family: 굴림;font-size: 12px">이메일 
</td>
<td style="padding-left: 4px"><input type="text" name="email" style="font-family:굴림;font-size: 12px;color:#000000;background-color:#FFFFFF;border:1px solid #CCCCCC;width:288px;height:18px;">
</td>
</tr>
<tr>
<td align="right" colspan="2" style="padding-top: 6px;padding-right: 18px"><input type="image" onfocus="this.blur()" src="images/lo_ok.gif"> <a onclick="self.close();" style="cursor:pointer;" onfocus="this.blur()"><img src="images/lo_close.gif" border="0"></a>   
</td>
</tr>
</form>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
';
}
?>
</body>
</html>


이제 수정한 member_join.php member_join_ok.php member_modify.php member_modify_ok.php lostid.php
5개의 수정한 파일을 ftp로 접속해 제로보드 폴더(bbs)안에 넣어 기존 파일에 덮어주세요.


마지막으로...
http://홈주소/bbs/dbmysql.php 를 한번 실행해줍니다.
실행한 후에는 dbmysql.php파일은 삭제합니다..


이것으로 모든 과정이 끝났으니..
가입,정보수정,비밀번호찾기등등... 테스트를 해보십시오..^^


윈도우 서버 RWAPM 프로젝트
http://rwapm.com 

?

공부 게시판

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

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

    Date2003.08.18 By처누 Views928131
    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


숭실대 인공지능학과


숭실대 통신연구실


베너