최초 커밋
This commit is contained in:
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
|
||||
$result= '';
|
||||
$mb_id= '';
|
||||
|
||||
include_once('./_common.php');
|
||||
|
||||
$g5['title'] = "아이디찾기";
|
||||
|
||||
// JSON 데이터를 받기 위한 처리
|
||||
$input = file_get_contents('php://input');
|
||||
$data = json_decode($input, true);
|
||||
|
||||
// 입력된 값이 없을 경우 기본 값 설정
|
||||
$l_mb_id = isset($data['mb_id']) ? trim($data['mb_id']) : '';
|
||||
$mb_name = isset($data['mb_name']) ? trim($data['mb_name']) : '';
|
||||
$mb_hp = isset($data['mb_hp']) ? trim($data['mb_hp']) : '';
|
||||
$mb_email = isset($data['mb_email']) ? trim($data['mb_email']) : '';
|
||||
|
||||
$sql = " SELECT mb_id, mb_name, mb_hp, mb_email, mb_comp, mb_comp_team FROM g5_member ";
|
||||
|
||||
if(!($l_mb_id == '')){
|
||||
$mb_id = $l_mb_id;
|
||||
$sql .= " where mb_id = '".$mb_id."' ";
|
||||
}else{
|
||||
$sql .= " where mb_name = '".$mb_name."' ";
|
||||
}
|
||||
|
||||
if(!($mb_hp == '')){
|
||||
$sql .= " and mb_hp = '".$mb_hp."' ";
|
||||
}else{
|
||||
$sql .= " and mb_email = '".$mb_email."' ";
|
||||
}
|
||||
|
||||
$result = sql_query($sql);
|
||||
|
||||
while ($row = sql_fetch_array($result))
|
||||
{
|
||||
$mb_id = $row['mb_id'];
|
||||
$mb_password = $row['mb_hp'];
|
||||
|
||||
if(!($l_mb_id == '')){
|
||||
$sql2 = "update g5_member set mb_password = '".get_encrypt_string($mb_password)."' where mb_id = '".$mb_id."'";
|
||||
sql_query($sql2);
|
||||
//$re_value=$sql2."<br>";
|
||||
$re_value="complete";
|
||||
}else{
|
||||
$re_value=$mb_id;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
echo json_encode($re_value, JSON_UNESCAPED_UNICODE);
|
||||
|
||||
/*
|
||||
$re_value = $sql;
|
||||
echo $re_value;
|
||||
*/
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user