first
This commit is contained in:
4
modules/member/README.md
Normal file
4
modules/member/README.md
Normal file
@@ -0,0 +1,4 @@
|
||||
## Copyright and license
|
||||
Copyright 2020 Redblock, Inc.
|
||||
|
||||
Licensed under the [RBL](https://kimsq.com/p/rbl) License
|
||||
0
modules/member/_main.css
Normal file
0
modules/member/_main.css
Normal file
0
modules/member/_main.js
Normal file
0
modules/member/_main.js
Normal file
25
modules/member/action/a.account_config.php
Normal file
25
modules/member/action/a.account_config.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
if (!$my['uid'])
|
||||
{
|
||||
getLink('','','정상적인 접근이 아닙니다.','');
|
||||
}
|
||||
|
||||
$g['memberVarForSite'] = $g['path_var'].'site/'.$r.'/member.var.php';
|
||||
$_tmpvfile = file_exists($g['memberVarForSite']) ? $g['memberVarForSite'] : $g['path_module'].$module.'/var/var.php';
|
||||
include_once $_tmpvfile;
|
||||
|
||||
|
||||
if ($act == 'id')
|
||||
{
|
||||
if(!$id || $id==$my['id']) exit;
|
||||
$isId = getDbRows($table['s_mbrid'],"id='".$id."' and id<>'".$my['id']."'");
|
||||
if($isId) getLink('','','존재하는 아이디입니다.','');
|
||||
|
||||
getDbUpdate($table['s_mbrid'],"id='".$id."'",'uid='.$my['uid']);
|
||||
|
||||
getLink('reload','parent.parent.','','');
|
||||
}
|
||||
|
||||
?>
|
||||
271
modules/member/action/a.admin_action.php
Normal file
271
modules/member/action/a.admin_action.php
Normal file
@@ -0,0 +1,271 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
checkAdmin(0);
|
||||
|
||||
$i = 0;
|
||||
$j = 0;
|
||||
$MEMBERS = array();
|
||||
if($price) $price = $how == '+' ? $price : -$price;
|
||||
$html = $act == 'send_paper' ? 'TEXT' : $html;
|
||||
$subject = trim($subject);
|
||||
$content = trim($content);
|
||||
$comment = trim($comment);
|
||||
$memo = trim($memo);
|
||||
$send_time = $year1.$month1.$day1.$hour1.$min1.'00';
|
||||
|
||||
if ($act == 'send_email')
|
||||
{
|
||||
include_once $g['path_core'].'function/email.func.php';
|
||||
}
|
||||
|
||||
if ($all)
|
||||
{
|
||||
$RCD = getDbArray($table['s_mbrdata'],stripslashes($_WHERE),'*','memberuid','desc',0,1);
|
||||
while($M2 = db_fetch_array($RCD))
|
||||
{
|
||||
$M1 = getUidData($table['s_mbrid'],$M2['memberuid']);
|
||||
$MEMBERS[] = array_merge($M1,$M2);
|
||||
}
|
||||
}
|
||||
else {
|
||||
foreach ($mbrmembers as $val)
|
||||
{
|
||||
$M1 = getUidData($table['s_mbrid'],$val);
|
||||
$M2 = getDbData($table['s_mbrdata'],'memberuid='.$M1['uid'],'*');
|
||||
if (!$M2['memberuid']) continue;
|
||||
$MEMBERS[] = array_merge($M1,$M2);
|
||||
}
|
||||
}
|
||||
|
||||
if (substr($act,0,4) == 'dump')
|
||||
{
|
||||
header( "Content-type: application/vnd.ms-excel;" );
|
||||
header( "Content-Disposition: attachment; filename=members_".str_replace('dump_','',$act)."_".$date['today'].".xls" );
|
||||
header( "Content-Description: PHP4 Generated Data" );
|
||||
|
||||
echo '<meta http-equiv="content-type" content="text/html; charset=utf-8" />';
|
||||
echo '<table border="1">';
|
||||
if ($act == 'dump_alldata')
|
||||
{
|
||||
echo '<tr>';
|
||||
echo '<td>Id</td>';
|
||||
echo '<td>Name</td>';
|
||||
echo '<td>Nicname</td>';
|
||||
echo '<td>Email</td>';
|
||||
echo '<td>Homepage</td>';
|
||||
echo '<td>Sex</td>';
|
||||
echo '<td>Birthday</td>';
|
||||
echo '<td>Birthtype</td>';
|
||||
echo '<td>Phone</td>';
|
||||
echo '<td>Tel</td>';
|
||||
echo '<td>Zipcode</td>';
|
||||
echo '<td>Address</td>';
|
||||
echo '<td>Job</td>';
|
||||
echo '<td>Marrday</td>';
|
||||
echo '<td>Point</td>';
|
||||
echo '<td>UsePoint</td>';
|
||||
echo '<td>Date</td>';
|
||||
echo '</tr>';
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($MEMBERS as $M)
|
||||
{
|
||||
//회원인증
|
||||
if ($act == 'tool_auth')
|
||||
{
|
||||
getDbUpdate($table['s_mbrdata'],'auth='.$auth,'memberuid='.$M['memberuid']);
|
||||
setrawcookie('result_member_main', rawurlencode('처리 되었습니다.|success')); // 처리여부 cookie 저장
|
||||
}
|
||||
//회원그룹
|
||||
if ($act == 'tool_mygroup')
|
||||
{
|
||||
if ($mygroup != $M['mygroup'])
|
||||
{
|
||||
getDbUpdate($table['s_mbrdata'],'mygroup='.$mygroup,'memberuid='.$M['memberuid']);
|
||||
getDbUpdate($table['s_mbrgroup'],'num=num-1','uid='.$M['mygroup']);
|
||||
getDbUpdate($table['s_mbrgroup'],'num=num+1','uid='.$mygroup);
|
||||
setrawcookie('result_member_main', rawurlencode('그룹변경 처리 되었습니다.|success')); // 처리여부 cookie 저장
|
||||
}
|
||||
}
|
||||
//회원등급
|
||||
if ($act == 'tool_level')
|
||||
{
|
||||
if ($level != $M['level'])
|
||||
{
|
||||
getDbUpdate($table['s_mbrdata'],'level='.$level,'memberuid='.$M['memberuid']);
|
||||
getDbUpdate($table['s_mbrlevel'],'num=num-1','uid='.$M['level']);
|
||||
getDbUpdate($table['s_mbrlevel'],'num=num+1','uid='.$level);
|
||||
setrawcookie('result_member_main', rawurlencode('등급변경 처리 되었습니다.|success')); // 처리여부 cookie 저장
|
||||
}
|
||||
}
|
||||
//회원삭제
|
||||
if ($act == 'tool_delete')
|
||||
{
|
||||
getDbDelete($table['s_mbrid'],'uid='.$M['memberuid']);
|
||||
getDbDelete($table['s_mbrdata'],'memberuid='.$M['memberuid']);
|
||||
getDbDelete($table['s_mbremail'],'mbruid='.$M['memberuid']);
|
||||
getDbDelete($table['s_mbrphone'],'mbruid='.$M['memberuid']);
|
||||
getDbDelete($table['s_mbrsns'],'mbruid='.$M['memberuid']);
|
||||
getDbDelete($table['s_mbrshipping'],'mbruid='.$M['memberuid']);
|
||||
getDbDelete($table['s_paper'],'my_mbruid='.$M['memberuid']);
|
||||
getDbDelete($table['s_point'],'my_mbruid='.$M['memberuid']);
|
||||
getDbDelete($table['s_saved'],'mbruid='.$M['memberuid']);
|
||||
getDbDelete($table['s_avatar'],'mbruid='.$M['memberuid']);
|
||||
getDbDelete($table['s_friend'],'my_mbruid='.$M['memberuid'].' or by_mbruid='.$M['memberuid']);
|
||||
getDbUpdate($table['s_mbrlevel'],'num=num-1','uid='.$M['level']);
|
||||
getDbUpdate($table['s_mbrgroup'],'num=num-1','uid='.$M['mygroup']);
|
||||
|
||||
getDbDelete($table['s_code'],'mbruid='.$M['memberuid']);
|
||||
getDbDelete($table['s_guestauth'],'email="'.$M['email'].'" or phone="'.$M['phone'].'"');
|
||||
getDbDelete($table['s_iidtoken'],'mbruid='.$M['memberuid']);
|
||||
|
||||
if (is_file($g['path_var'].'avatar/'.$M['photo']))
|
||||
{
|
||||
unlink($g['path_var'].'avatar/'.$M['photo']);
|
||||
}
|
||||
$fp = fopen($g['path_tmp'].'out/'.$M['id'].'.txt','w');
|
||||
fwrite($fp,$date['totime']);
|
||||
fclose($fp);
|
||||
@chmod($g['path_tmp'].'out/'.$M['id'].'.txt',0707);
|
||||
setrawcookie('result_member_main', rawurlencode('회원이 삭제 되었습니다.|success')); // 처리여부 cookie 저장
|
||||
}
|
||||
//회원탈퇴
|
||||
if ($act == 'tool_out')
|
||||
{
|
||||
getDbUpdate($table['s_mbrdata'],'auth=4','memberuid='.$M['memberuid']);
|
||||
setrawcookie('result_member_main', rawurlencode('탈퇴처리 되었습니다.|success')); // 처리여부 cookie 저장
|
||||
}
|
||||
//포인트지급
|
||||
if ($act == 'give_point')
|
||||
{
|
||||
getDbUpdate($table['s_mbrdata'],$pointType.'='.$pointType.'+'.$price,'memberuid='.$M['memberuid']);
|
||||
getDbInsert($table['s_'.$pointType],'my_mbruid,by_mbruid,price,content,d_regis',"'".$M['memberuid']."','0','".$price."','".$comment."','".$date['totime']."'");
|
||||
setrawcookie('result_member_main', rawurlencode('포인트가 처리 되었습니다.|success')); // 처리여부 cookie 저장
|
||||
}
|
||||
//쪽지전송
|
||||
if ($act == 'send_paper')
|
||||
{
|
||||
$QKEY = 'parent,my_mbruid,by_mbruid,inbox,content,html,upload,d_regis,d_read';
|
||||
$QVAL = "'0','".$M['memberuid']."','".$my['uid']."','1','".$memo."','$html','$upload','".$send_time."',''";
|
||||
getDbInsert($table['s_paper'],$QKEY,$QVAL);
|
||||
getDbUpdate($table['s_mbrdata'],'is_paper=1','memberuid='.$M['memberuid']);
|
||||
}
|
||||
//알림전송
|
||||
if ($act == 'send_notice')
|
||||
{
|
||||
/* 알림을 보내는 방법 ************************************************************
|
||||
|
||||
- 다음의 함수를 실행합니다.
|
||||
putNotice($rcvmember,$sendmodule,$sendmember,$message,$referer,$target);
|
||||
|
||||
$rcvmember : 받는회원 UID
|
||||
$sendmodule : 보내는모듈 ID
|
||||
$sendmember : 보내는회원 UID (시스템으로 보낼경우 0)
|
||||
$message : 보내는 메세지 (관리자 및 허가된 사용자는 HTML태그 사용가능 / 일반 회원은 불가)
|
||||
$referer : 연결해줄 URL이 있을 경우 http:// 포함하여 지정
|
||||
$target : 연결할 URL의 링크 TARGET (새창으로 연결하려면 _blank)
|
||||
|
||||
********************************************************************************/
|
||||
$notice_title = $notice_title?$notice_title:'관리자 알림';
|
||||
$notice_button = $notice_button?$notice_button:'내용확인';
|
||||
putNotice($M['memberuid'],$m,$my['uid'],$notice_title,$notice,$notice_referer,$notice_button,'','','');
|
||||
}
|
||||
|
||||
//메일전송
|
||||
if ($act == 'send_email')
|
||||
{
|
||||
if ($mailing && !$M['mailing']) continue;
|
||||
|
||||
$subjectX = str_replace('{NAME}',$M['name'],$subject);
|
||||
$subjectX = str_replace('{NICK}',$M['nic'],$subjectX);
|
||||
$subjectX = str_replace('{ID}',$M['id'],$subjectX);
|
||||
$subjectX = str_replace('{EMAIL}',$M['email'],$subjectX);
|
||||
|
||||
$contentX = str_replace('{NAME}',$M['name'],$content);
|
||||
$contentX = str_replace('{NICK}',$M['nic'],$contentX);
|
||||
$contentX = str_replace('{ID}',$M['id'],$contentX);
|
||||
$contentX = str_replace('{EMAIL}',$M['email'],$contentX);
|
||||
|
||||
|
||||
if (!getSendMail($M['email'].'|'.$M['name'], $my['email'].'|'.$my['name'], $subjectX, $contentX, $html))
|
||||
{
|
||||
getDbUpdate($table['s_mbrdata'],'smail=1','memberuid='.$M['memberuid']);
|
||||
$j++;
|
||||
}
|
||||
$i++;
|
||||
}
|
||||
//이메일추출
|
||||
if ($act == 'dump_email')
|
||||
{
|
||||
echo '<tr>';
|
||||
echo '<td>'.$M['name'].'</td>';
|
||||
echo '<td>'.$M['email'].'</td>';
|
||||
echo '<td>"'.$M['name'].'" <'.$R['id'].'></td>';
|
||||
echo '</tr>';
|
||||
}
|
||||
//연락처추출
|
||||
if ($act == 'dump_tel')
|
||||
{
|
||||
echo '<tr>';
|
||||
echo '<td>'.$M['name'].'</td>';
|
||||
echo '<td>'.$M['phone'].'</td>';
|
||||
echo '<td>'.$M['tel'].'</td>';
|
||||
echo '</tr>';
|
||||
}
|
||||
//DM추출
|
||||
if ($act == 'dump_address')
|
||||
{
|
||||
echo '<tr>';
|
||||
echo '<td>'.$M['name'].'</td>';
|
||||
echo '<td>'.substr($M['zip'],0,3).'-'.substr($M['zip'],3,3).'</td>';
|
||||
echo '<td>'.$M['addr1'].' '.$M['addr2'].'</td>';
|
||||
echo '</tr>';
|
||||
}
|
||||
//전체데이터추출
|
||||
if ($act == 'dump_alldata')
|
||||
{
|
||||
echo '<tr>';
|
||||
echo '<td>'.$M['id'].'</td>';
|
||||
echo '<td>'.$M['name'].'</td>';
|
||||
echo '<td>'.$M['nic'].'</td>';
|
||||
echo '<td>'.$M['email'].'</td>';
|
||||
echo '<td>'.$M['home'].'</td>';
|
||||
echo '<td>'.($M['sex']==1?'남':'여').'</td>';
|
||||
echo '<td>'.$M['birth1'].$M['birth2'].'</td>';
|
||||
echo '<td>'.($M['birthtype']?'음':'양').'</td>';
|
||||
echo '<td>'.$M['phone'].'</td>';
|
||||
echo '<td>'.$M['tel'].'</td>';
|
||||
echo '<td>'.substr($M['zip'],0,3).'-'.substr($M['zip'],3,3).'</td>';
|
||||
echo '<td>'.$M['addr1'].' '.$M['addr2'].'</td>';
|
||||
echo '<td>'.$M['job'].'</td>';
|
||||
echo '<td>'.$M['marr1'].$M['marr2'].'</td>';
|
||||
echo '<td>'.$M['point'].'</td>';
|
||||
echo '<td>'.$M['usepoint'].'</td>';
|
||||
echo '<td>'.substr($M['d_regis'],0,8).'</td>';
|
||||
echo '</tr>';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
if (substr($act,0,4) == 'dump')
|
||||
{
|
||||
echo '</table>';
|
||||
exit;
|
||||
}
|
||||
|
||||
if ($act == 'send_email')
|
||||
{
|
||||
setrawcookie('result_member_main', rawurlencode('총 '.$i.'명중 '.($i-$j).'명에게 메일이 전송되었습니다.|success')); // 처리여부 cookie 저장
|
||||
getLink('reload','parent.','','');
|
||||
}
|
||||
else if($act == 'send_paper' || $act=='send_notice')
|
||||
{
|
||||
setrawcookie('result_member_main', rawurlencode('전송이 완료되었습니다.|success')); // 처리여부 cookie 저장
|
||||
getLink('reload','parent.','','');
|
||||
}
|
||||
else {
|
||||
getLink('reload','parent.','','');
|
||||
}
|
||||
?>
|
||||
177
modules/member/action/a.admin_member_add.php
Normal file
177
modules/member/action/a.admin_member_add.php
Normal file
@@ -0,0 +1,177 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
checkAdmin(0);
|
||||
|
||||
$id = trim($_POST['id']);
|
||||
$pw = trim($_POST['pw1']);
|
||||
$name = trim($_POST['name']);
|
||||
$nic = trim($_POST['nic']);
|
||||
$nic = $nic ? $nic : $name;
|
||||
$email = trim($_POST['email']);
|
||||
$phone = trim($_POST['phone']);
|
||||
|
||||
if (!$id || !$name) getLink('','','정상적인 접속이 아닙니다.','');
|
||||
|
||||
if (!$check_id || !$check_nic || !$check_email || !$check_phone)
|
||||
{
|
||||
getLink('','','입력내용에 문제가 있습니다. 재입력해 주세요.','');
|
||||
}
|
||||
|
||||
$tmpname = $_FILES['upfile']['tmp_name'];
|
||||
$realname = $_FILES['upfile']['name'];
|
||||
|
||||
//getLink('','',$realname.' 여기까지','');
|
||||
|
||||
if ($avatar_delete)
|
||||
{
|
||||
$photo = '';
|
||||
$saveFile = $g['path_var'].'avatar/'.$avatar;
|
||||
}
|
||||
else {
|
||||
$photo = $avatar;
|
||||
if (is_uploaded_file($tmpname))
|
||||
{
|
||||
$fileExt = strtolower(getExt($realname));
|
||||
$fileExt = $fileExt == 'jpeg' ? 'jpg' : $fileExt;
|
||||
|
||||
if (strstr('[jpg,png,gif]',$fileExt))
|
||||
{
|
||||
$wh = getimagesize($tmpname);
|
||||
if ($wh[0] >= 250 && $wh[1] >= 250)
|
||||
{
|
||||
$photo = $id.'.'.$fileExt;
|
||||
$saveFile = $g['path_var'].'avatar/'.$photo;
|
||||
|
||||
if (is_file($saveFile)) unlink($saveFile);
|
||||
|
||||
include $g['path_core'].'function/thumb.func.php';
|
||||
|
||||
move_uploaded_file($tmpname,$saveFile);
|
||||
ResizeWidth($saveFile,$saveFile,500);
|
||||
@chmod($saveFile,0707);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($uid)
|
||||
{
|
||||
$_M=getDbData($table['s_mbrdata'],'memberuid='.$uid,'*');
|
||||
if($pw!='')
|
||||
{
|
||||
$newPw = password_hash($pw, PASSWORD_DEFAULT);
|
||||
getDbUpdate($table['s_mbrid'],"pw='".$newPw."'",'uid='.$uid);
|
||||
getDbUpdate($table['s_mbrdata'],"last_pw='".$date['today']."'",'memberuid='.$uid);
|
||||
|
||||
if ($my['uid'] == $uid)
|
||||
{
|
||||
$_SESSION['mbr_pw'] = $newPw;
|
||||
}
|
||||
}
|
||||
|
||||
$home = $home ? (strstr($home,'http://')?str_replace('http://','',$home):$home) : '';
|
||||
$birth1 = $birth_1;
|
||||
$birth2 = $birth_2.$birth_3;
|
||||
$birthtype = $birthtype ? $birthtype : 0;
|
||||
$tel = $tel_1 && $tel_2 && $tel_3 ? $tel_1 .'-'. $tel_2 .'-'. $tel_3 : '';
|
||||
$location = trim($location);
|
||||
$job = trim($job);
|
||||
$marr1 = $marr_1 && $marr_2 && $marr_3 ? $marr_1 : 0;
|
||||
$marr2 = $marr_1 && $marr_2 && $marr_3 ? $marr_2.$marr_3 : 0;
|
||||
$sms = $phone && $sms ? 1 : 0;
|
||||
$mailing = $email && $remail ? 1 : 0;
|
||||
$bio = trim($bio);
|
||||
$addfield = '';
|
||||
|
||||
$_addarray = file($g['path_var'].'site/'.$r.'/member.add_field.txt');
|
||||
foreach($_addarray as $_key)
|
||||
{
|
||||
$_val = explode('|',trim($_key));
|
||||
if ($_val[2] == 'checkbox')
|
||||
{
|
||||
$addfield .= $_val[0].'^^^';
|
||||
if (is_array(${'add_'.$_val[0]}))
|
||||
{
|
||||
foreach(${'add_'.$_val[0]} as $_skey)
|
||||
{
|
||||
$addfield .= '['.$_skey.']';
|
||||
}
|
||||
}
|
||||
$addfield .= '|||';
|
||||
}
|
||||
else {
|
||||
$addfield .= $_val[0].'^^^'.trim(${'add_'.$_val[0]}).'|||';
|
||||
}
|
||||
}
|
||||
|
||||
$_QVAL = "email='$email',name='$name',nic='$nic',home='$home',sex='$sex',photo='$photo',birth1='$birth1',birth2='$birth2',birthtype='$birthtype',phone='$phone',tel='$tel',";
|
||||
$_QVAL.= "location='$location',job='$job',marr1='$marr1',marr2='$marr2',sms='$sms',mailing='$mailing',bio='$bio',addfield='$addfield'";
|
||||
getDbUpdate($table['s_mbrdata'],$_QVAL,'memberuid='.$uid);
|
||||
setrawcookie('result_member_main', rawurlencode('회원정보가 수정 되었습니다.|success')); // 처리여부 cookie 저장
|
||||
}
|
||||
else {
|
||||
getDbInsert($table['s_mbrid'],'site,id,pw',"'$s','$id','".password_hash($pw, PASSWORD_DEFAULT)."'");
|
||||
$memberuid = getDbCnt($table['s_mbrid'],'max(uid)','');
|
||||
|
||||
$auth = 1;
|
||||
$mygroup = 1;
|
||||
$level = 1;
|
||||
$comp = 0;
|
||||
$adm_view = $admin ? '[admin]' : '';
|
||||
$home = '';
|
||||
$birth1 = 0;
|
||||
$birth2 = 0;
|
||||
$birthtype = 0;
|
||||
$tel = $tel && substr($tel,0,2) == '01' ? $tel : '';
|
||||
$zip = '';
|
||||
$addr0 = '';
|
||||
$addr1 = '';
|
||||
$addr2 = '';
|
||||
$job = '';
|
||||
$marr1 = 0;
|
||||
$marr2 = 0;
|
||||
$sms = 1;
|
||||
$mailing = 1;
|
||||
$smail = 0;
|
||||
$point = 0;
|
||||
$usepoint = 0;
|
||||
$money = 0;
|
||||
$cash = 0;
|
||||
$num_login = 1;
|
||||
$pw_q = '';
|
||||
$pw_a = '';
|
||||
$now_log = 0;
|
||||
$last_log = '';
|
||||
$last_pw = $date['totime'];
|
||||
$is_paper = 0;
|
||||
$cert_phone = '';
|
||||
$cert_email = '';
|
||||
$d_regis = $date['totime'];
|
||||
$sns = '';
|
||||
$noticeconf = '';
|
||||
$num_notice = 0;
|
||||
$addfield = '';
|
||||
|
||||
$_QKEY = "memberuid,site,auth,mygroup,level,comp,admin,adm_view,";
|
||||
$_QKEY.= "email,name,nic,grade,photo,cover,home,sex,birth1,birth2,birthtype,phone,tel,";
|
||||
$_QKEY.= "location,job,marr1,marr2,sms,mailing,smail,point,usepoint,money,cash,num_login,now_log,last_log,last_pw,is_paper,d_regis,tmpcode,sns,noticeconf,num_notice,addfield";
|
||||
$_QVAL = "'$memberuid','$s','$auth','$mygroup','$level','$comp','$admin','$adm_view',";
|
||||
$_QVAL.= "'$email','$name','$nic','','$photo','$cover','$home','$sex','$birth1','$birth2','$birthtype','$phone','$tel',";
|
||||
$_QVAL.= "'$location','$job','$marr1','$marr2','$sms','$mailing','$smail','$point','$usepoint','$money','$cash','$num_login','$now_log','$last_log','$last_pw','$is_paper','$d_regis','','$sns','$noticeconf','$num_notice','$addfield'";
|
||||
getDbInsert($table['s_mbrdata'],$_QKEY,$_QVAL);
|
||||
getDbUpdate($table['s_mbrlevel'],'num=num+1','uid='.$level);
|
||||
getDbUpdate($table['s_mbrgroup'],'num=num+1','uid='.$mygroup);
|
||||
|
||||
if ($email){
|
||||
getDbInsert($table['s_mbremail'],'mbruid,email,base,backup,d_regis,d_code,d_verified',"'".$memberuid."','".$email."',1,0,'".$d_regis."','',''");
|
||||
}
|
||||
if ($phone) {
|
||||
getDbInsert($table['s_mbrphone'],'mbruid,phone,base,backup,d_regis,d_code,d_verified',"'".$memberuid."','".$phone."',1,0,'".$d_regis."','',''");
|
||||
}
|
||||
|
||||
setrawcookie('result_member_main', rawurlencode('회원이 추가 되었습니다.|success')); // 처리여부 cookie 저장
|
||||
}
|
||||
|
||||
getLink('reload','parent.','','');
|
||||
?>
|
||||
96
modules/member/action/a.admin_member_add_check.php
Normal file
96
modules/member/action/a.admin_member_add_check.php
Normal file
@@ -0,0 +1,96 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
checkAdmin(0);
|
||||
|
||||
$result = false;
|
||||
if ($type == 'id')
|
||||
{
|
||||
$isId = getDbRows($table['s_mbrid'],"id='".$fvalue."'");
|
||||
if (!$isId && !is_file($g['path_tmp'].'out/'.$fvalue.'.txt')) $result = true;
|
||||
if ($result):
|
||||
?>
|
||||
<script>
|
||||
parent.getId('rb-idcheck').innerHTML = '<i class="fa fa-info-circle fa-lg fa-fw"></i>정상';
|
||||
parent.document.addForm.check_id.value = '1';
|
||||
parent.submitFlag = false;
|
||||
</script>
|
||||
<?php else:?>
|
||||
<script>
|
||||
parent.getId('rb-idcheck').innerHTML = '<i class="fa fa-question fa-lg fa-fw"></i>확인요망';
|
||||
parent.document.addForm.check_id.value = '0';
|
||||
parent.submitFlag = false;
|
||||
</script>
|
||||
<?php
|
||||
endif;
|
||||
}
|
||||
else if ($type == 'nic')
|
||||
{
|
||||
if($my['uid']) $isId = getDbRows($table['s_mbrdata'],"nic='".$fvalue."' and nic<>'".$my['nic']."'");
|
||||
else $isId = getDbRows($table['s_mbrdata'],"nic='".$fvalue."'");
|
||||
$isId = getDbRows($table['s_mbrdata'],"nic='".$fvalue."'");
|
||||
if (!$isId) $result = true;
|
||||
if ($result):
|
||||
?>
|
||||
<script>
|
||||
parent.getId('rb-nickcheck').innerHTML = '<i class="fa fa-info-circle fa-lg fa-fw"></i>정상';
|
||||
parent.document.addForm.check_nic.value = '1';
|
||||
parent.submitFlag = false;
|
||||
</script>
|
||||
<?php else:?>
|
||||
<script>
|
||||
parent.getId('rb-nickcheck').innerHTML = '<i class="fa fa-question fa-lg fa-fw"></i>확인요망';
|
||||
parent.document.addForm.check_nic.value = '0';
|
||||
parent.submitFlag = false;
|
||||
</script>
|
||||
<?php
|
||||
endif;
|
||||
}
|
||||
else if ($type == 'email')
|
||||
{
|
||||
if (strpos($fvalue,'@') && strpos($fvalue,'.'))
|
||||
{
|
||||
if ($my['uid']) $isId = getDbRows($table['s_mbremail'],"email='".$fvalue."' and email <> '".$my['email']."'");
|
||||
else $isId = getDbRows($table['s_mbremail'],"email='".$fvalue."'");
|
||||
if (!$isId) $result = true;
|
||||
}
|
||||
if ($result):
|
||||
?>
|
||||
<script>
|
||||
parent.getId('rb-emailcheck').innerHTML = '<i class="fa fa-info-circle fa-lg fa-fw"></i>정상';
|
||||
parent.document.addForm.check_email.value = '1';
|
||||
parent.submitFlag = false;
|
||||
</script>
|
||||
<?php else:?>
|
||||
<script>
|
||||
parent.getId('rb-emailcheck').innerHTML = '<i class="fa fa-question fa-lg fa-fw"></i>확인요망';
|
||||
parent.document.addForm.check_email.value = '0';
|
||||
parent.submitFlag = false;
|
||||
</script>
|
||||
<?php
|
||||
endif;
|
||||
}
|
||||
|
||||
else if ($type == 'phone')
|
||||
{
|
||||
if ($my['uid']) $isId = getDbRows($table['s_mbrphone'],"phone='".$fvalue."' and phone <> '".$my['phone']."'");
|
||||
else $isId = getDbRows($table['s_mbrphone'],"phone='".$fvalue."'");
|
||||
if (!$isId) $result = true;
|
||||
if ($result):
|
||||
?>
|
||||
<script>
|
||||
parent.getId('rb-phonecheck').innerHTML = '<i class="fa fa-info-circle fa-lg fa-fw"></i>정상';
|
||||
parent.document.addForm.check_phone.value = '1';
|
||||
parent.submitFlag = false;
|
||||
</script>
|
||||
<?php else:?>
|
||||
<script>
|
||||
parent.getId('rb-phonecheck').innerHTML = '<i class="fa fa-question fa-lg fa-fw"></i>확인요망';
|
||||
parent.document.addForm.check_phone.value = '0';
|
||||
parent.submitFlag = false;
|
||||
</script>
|
||||
<?php
|
||||
endif;
|
||||
}
|
||||
exit;
|
||||
?>
|
||||
52
modules/member/action/a.avatar.php
Normal file
52
modules/member/action/a.avatar.php
Normal file
@@ -0,0 +1,52 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
if (!$my['uid'])
|
||||
{
|
||||
getLink('','','정상적인 접근이 아닙니다.','');
|
||||
}
|
||||
|
||||
$tmpname = $_FILES['upfile']['tmp_name'];
|
||||
$realname = strtolower($_FILES['upfile']['name']);
|
||||
$fileExt = strtolower(getExt($realname));
|
||||
$fileExt = $fileExt == 'jpeg' ? 'jpg' : $fileExt;
|
||||
$photo = md5($realname).substr($date['totime'],8,14).'.'.$fileExt;
|
||||
$saveFile = $g['path_file'].'avatar/'.$photo;
|
||||
|
||||
if (is_uploaded_file($tmpname))
|
||||
{
|
||||
if (!strstr('[gif][jpg][png]',$fileExt))
|
||||
{
|
||||
getLink('','','gif/jpg/png 파일만 등록할 수 있습니다.','');
|
||||
}
|
||||
if (is_file($saveFile))
|
||||
{
|
||||
unlink($saveFile);
|
||||
}
|
||||
|
||||
$wh = getimagesize($tmpname);
|
||||
if ($wh[0] < 250 || $wh[1] < 250)
|
||||
{
|
||||
getLink('','','가로/세로 250픽셀 이상이어야 합니다.','');
|
||||
}
|
||||
|
||||
include_once $g['path_core'].'function/thumb.func.php';
|
||||
|
||||
if ($fileExt == 'gif')
|
||||
{
|
||||
move_uploaded_file($tmpname,$saveFile);
|
||||
}
|
||||
else {
|
||||
move_uploaded_file($tmpname,$saveFile);
|
||||
|
||||
if ($fileExt == 'jpg') {
|
||||
exifRotate($saveFile); //가로세로 교정
|
||||
}
|
||||
ResizeWidth($saveFile,$saveFile,500);
|
||||
}
|
||||
|
||||
getDbUpdate($table['s_mbrdata'],"photo='".$photo."'",'memberuid='.$my['uid']);
|
||||
}
|
||||
setrawcookie('member_settings_result', rawurlencode('이미지가 수정되었습니다.|success')); // 처리여부 cookie 저장
|
||||
getLink('reload','parent.','','');
|
||||
?>
|
||||
16
modules/member/action/a.avatar_delete.php
Normal file
16
modules/member/action/a.avatar_delete.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
if (!$my['uid']) getLink('','','정상적인 접근이 아닙니다.','');
|
||||
|
||||
//원본삭제
|
||||
if (is_file($g['path_file'].'avatar/'.$my['photo']))
|
||||
{
|
||||
unlink($g['path_file'].'avatar/'.$my['photo']);
|
||||
}
|
||||
|
||||
getDbUpdate($table['s_mbrdata'],"photo=''",'memberuid='.$my['uid']);
|
||||
|
||||
setrawcookie('member_settings_result', rawurlencode('이미지가 삭제되었습니다..|success')); // 처리여부 cookie 저장
|
||||
getLink('reload','parent.','','');
|
||||
?>
|
||||
81
modules/member/action/a.change_mbr_img.php
Normal file
81
modules/member/action/a.change_mbr_img.php
Normal file
@@ -0,0 +1,81 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
if (!$my['uid'])
|
||||
{
|
||||
getLink('','','정상적인 접근이 아닙니다.','');
|
||||
}
|
||||
|
||||
// 아바타 이미지 변경
|
||||
if($_FILES['avatar']['tmp_name'])
|
||||
{
|
||||
$tmpname = $_FILES['avatar']['tmp_name'];
|
||||
$realname = $_FILES['avatar']['name'];
|
||||
$fileExt = strtolower(getExt($realname));
|
||||
$fileExt = $fileExt == 'jpeg' ? 'jpg' : $fileExt;
|
||||
$photo = $my['id'].'.'.$fileExt;
|
||||
$saveFile1 = $g['path_var'].'avatar/'.$photo;
|
||||
$saveFile2 = $g['path_var'].'avatar/180.'.$photo;
|
||||
// getLink('','',$saveFile1,'');
|
||||
if (is_uploaded_file($tmpname))
|
||||
{
|
||||
if (!strstr('[gif][jpg][png]',$fileExt))
|
||||
{
|
||||
getLink('','','gif/jpg/png 파일만 등록할 수 있습니다.','');
|
||||
}
|
||||
if (is_file($saveFile1))
|
||||
{
|
||||
unlink($saveFile1);
|
||||
}
|
||||
if (is_file($saveFile2))
|
||||
{
|
||||
unlink($saveFile2);
|
||||
}
|
||||
|
||||
$wh = getimagesize($tmpname);
|
||||
if ($wh[0] < 180 || $wh[1] < 180)
|
||||
{
|
||||
getLink('','','가로/세로 180픽셀 이상이어야 합니다.','');
|
||||
}
|
||||
|
||||
include_once $g['path_core'].'function/thumb.func.php';
|
||||
|
||||
move_uploaded_file($tmpname,$saveFile2);
|
||||
ResizeWidth($saveFile2,$saveFile2,180);
|
||||
ResizeWidthHeight($saveFile2,$saveFile1,50,50);
|
||||
@chmod($saveFile1,0707);
|
||||
@chmod($saveFile2,0707);
|
||||
|
||||
getDbUpdate($table['s_mbrdata'],"photo='".$photo."'",'memberuid='.$my['uid']);
|
||||
}
|
||||
}
|
||||
|
||||
// 커버 이미지 변경
|
||||
if($_FILES['cover']['tmp_name'])
|
||||
{
|
||||
$tmpname = $_FILES['cover']['tmp_name'];
|
||||
$realname = $_FILES['cover']['name'];
|
||||
|
||||
$fileExt = strtolower(getExt($realname));
|
||||
$fileExt = $fileExt == 'jpeg' ? 'jpg' : $fileExt;
|
||||
$photo = $my['id'].'.'.$fileExt;
|
||||
$saveFile = '.'.$img_module_skin.'/cover/'.$photo;
|
||||
//getLink('','',$saveFile,'');
|
||||
if (is_uploaded_file($tmpname))
|
||||
{
|
||||
if (!strstr('[jpg]',$fileExt))
|
||||
{
|
||||
getLink('','','jpg 파일만 등록할 수 있습니다.','');
|
||||
}
|
||||
|
||||
if (is_file($saveFile))
|
||||
{
|
||||
unlink($saveFile);
|
||||
}
|
||||
move_uploaded_file($tmpname,$saveFile);
|
||||
@chmod($saveFile,0707);
|
||||
}
|
||||
}
|
||||
|
||||
getLink('reload','parent.','','');
|
||||
?>
|
||||
31
modules/member/action/a.confirm_password.php
Normal file
31
modules/member/action/a.confirm_password.php
Normal file
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit; // 비정상적인 접근을 차단
|
||||
|
||||
if (!$my['uid']) getLink('','','회원만 접근할 수 있습니다.',''); // 회원만 접근 허용할 경우
|
||||
|
||||
$M = getDbData($table['s_mbrid'],"id='".$id."'",'*');
|
||||
$M1 = getDbData($table['s_mbrdata'],'memberuid='.$M['uid'],'*');
|
||||
|
||||
if (!password_verify($pw,$M['pw']) )
|
||||
{
|
||||
echo '<script type="text/javascript">';
|
||||
echo 'parent.$("#password").addClass("is-invalid").val("").focus();';
|
||||
echo 'parent.$(".alert").removeClass("d-none");';
|
||||
echo 'parent.$("#passwordErrorBlock").html("잘못된 비밀번호입니다. 다시 시도하세요.");';
|
||||
echo '</script>';
|
||||
exit();
|
||||
}
|
||||
|
||||
if ($type == 'changeID') {
|
||||
echo '<script type="text/javascript">';
|
||||
echo 'parent.$("#FormConfirmPassword").addClass("d-none");';
|
||||
echo 'parent.$("#FormChangeID").removeClass("d-none");';
|
||||
echo 'parent.$("#FormChangeID").find("[name=a]").val("account_config");';
|
||||
echo 'setTimeout(function(){parent.$("#FormChangeID").find(".js-focus").focus();}, 100);';
|
||||
echo 'parent.$("#FormChangeID").find("fieldset").attr("disabled",false);';
|
||||
echo '</script>';
|
||||
}
|
||||
|
||||
|
||||
exit();
|
||||
?>
|
||||
52
modules/member/action/a.cover.php
Normal file
52
modules/member/action/a.cover.php
Normal file
@@ -0,0 +1,52 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
if (!$my['uid'])
|
||||
{
|
||||
getLink('','','정상적인 접근이 아닙니다.','');
|
||||
}
|
||||
|
||||
$tmpname = $_FILES['upfile']['tmp_name'];
|
||||
$realname = strtolower($_FILES['upfile']['name']);
|
||||
$fileExt = strtolower(getExt($realname));
|
||||
$fileExt = $fileExt == 'jpeg' ? 'jpg' : $fileExt;
|
||||
$photo = md5($realname).substr($date['totime'],8,14).'.'.$fileExt;
|
||||
$saveFile = $g['path_file'].'cover/'.$photo;
|
||||
|
||||
if (is_uploaded_file($tmpname))
|
||||
{
|
||||
if (!strstr('[gif][jpg][png]',$fileExt))
|
||||
{
|
||||
getLink('','','gif/jpg/png 파일만 등록할 수 있습니다.','');
|
||||
}
|
||||
if (is_file($saveFile))
|
||||
{
|
||||
unlink($saveFile);
|
||||
}
|
||||
|
||||
$wh = getimagesize($tmpname);
|
||||
if ($wh[0] < 860 )
|
||||
{
|
||||
getLink('','','가로 860픽셀 이상이어야 합니다.','');
|
||||
}
|
||||
|
||||
include_once $g['path_core'].'function/thumb.func.php';
|
||||
|
||||
if ($fileExt == 'gif')
|
||||
{
|
||||
move_uploaded_file($tmpname,$saveFile);
|
||||
}
|
||||
else {
|
||||
move_uploaded_file($tmpname,$saveFile);
|
||||
|
||||
if ($fileExt == 'jpg') {
|
||||
exifRotate($saveFile); //가로세로 교정
|
||||
}
|
||||
ResizeWidth($saveFile,$saveFile,1200);
|
||||
}
|
||||
|
||||
getDbUpdate($table['s_mbrdata'],"cover='".$photo."'",'memberuid='.$my['uid']);
|
||||
}
|
||||
setrawcookie('member_settings_result', rawurlencode('커버 이미지가 수정되었습니다.|success')); // 처리여부 cookie 저장
|
||||
getLink('reload','parent.','','');
|
||||
?>
|
||||
16
modules/member/action/a.cover_delete.php
Normal file
16
modules/member/action/a.cover_delete.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
if (!$my['uid']) getLink('','','정상적인 접근이 아닙니다.','');
|
||||
|
||||
//원본삭제
|
||||
if (is_file($g['path_file'].'cover/'.$my['cover']))
|
||||
{
|
||||
unlink($g['path_file'].'cover/'.$my['cover']);
|
||||
}
|
||||
|
||||
getDbUpdate($table['s_mbrdata'],"cover=''",'memberuid='.$my['uid']);
|
||||
|
||||
setrawcookie('member_settings_result', rawurlencode('커버 이미지가 삭제되었습니다..|success')); // 처리여부 cookie 저장
|
||||
getLink('reload','parent.','','');
|
||||
?>
|
||||
16
modules/member/action/a.customize.php
Normal file
16
modules/member/action/a.customize.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
if (!$my['uid'])
|
||||
{
|
||||
getLink('','','정상적인 접근이 아닙니다.','');
|
||||
}
|
||||
|
||||
// $memberuid = $my['admin'] && $memberuid ? $memberuid : $my['uid'];
|
||||
// $mailing = $remail;
|
||||
|
||||
// $_QVAL.= "mailing='$mailing'";
|
||||
// getDbUpdate($table['s_mbrdata'],$_QVAL,'memberuid='.$memberuid);
|
||||
|
||||
getLink('/','parent.','','');
|
||||
?>
|
||||
54
modules/member/action/a.email_auth.php
Normal file
54
modules/member/action/a.email_auth.php
Normal file
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
if (!$tmpuid || !$tmpcode)
|
||||
{
|
||||
getLink($g['r'].'/','','정상적인 접근이 아닙니다.','');
|
||||
}
|
||||
|
||||
$R = getDbData($table['s_mbrdata'],'memberuid='.$tmpuid." and tmpcode='".$tmpcode."'",'*');
|
||||
|
||||
if (!$R['memberuid'] || $R['auth'] == 2)
|
||||
{
|
||||
getLink(RW(0),'','잘못된 요청입니다.','');
|
||||
}
|
||||
|
||||
if ($R['auth'] == 1)
|
||||
{
|
||||
getLink(RW(0),'','이미 승인된 요청입니다. 로그인해 주세요.','');
|
||||
}
|
||||
|
||||
if ($R['auth'] == 3)
|
||||
{
|
||||
getDbUpdate($table['s_mbrdata'],'auth=1,tmpcode=""','memberuid='.$R['memberuid']);
|
||||
|
||||
$d_regis = $date['totime'];
|
||||
$_QVAL = "d_verified='$d_regis',d_code=''";
|
||||
getDbUpdate($table['s_mbremail'],$_QVAL,'mbruid='.$R['memberuid']); // 이메일 본인확인 처리
|
||||
}
|
||||
|
||||
$g['memberVarForSite'] = $g['path_var'].'site/'.$r.'/member.var.php';
|
||||
$_tmpvfile = file_exists($g['memberVarForSite']) ? $g['memberVarForSite'] : $g['path_module'].$module.'/var/var.php';
|
||||
include_once $_tmpvfile;
|
||||
include_once $g['path_core'].'function/email.func.php';
|
||||
|
||||
if ($d['member']['join_email_send']&&$d['member']['join_email'])
|
||||
{
|
||||
$M = getUidData($table['s_mbrid'],$R['memberuid']);
|
||||
$content = implode('',file($g['path_module'].'/admin/var/email.header.txt')); //이메일 헤더 양식
|
||||
$content .= implode('',file($g['dir_module'].'doc/email/_join.complete.txt'));
|
||||
$content.= '<p><a href="'.$g['url_root'].'" style="display:block;font-size:15px;color:#fff;text-decoration:none;padding: 15px;background:#007bff;width: 200px;text-align: center;margin: 38px auto;" target="_blank">접속하기</a></p>';
|
||||
$content.= implode('',file($g['path_module'].'/admin/var/email.footer.txt'));
|
||||
$content = str_replace('{SITE}',$_HS['name'],$content); //사이트명
|
||||
$content = str_replace('{NAME}',$R['name'],$content);
|
||||
$content = str_replace('{NICK}',$R['nic'],$content);
|
||||
$content = str_replace('{ID}',$M['id'],$content);
|
||||
$content = str_replace('{EMAIL}',$R['email'],$content);
|
||||
$content = str_replace('{PHONE}',$R['phone']?$R['phone']:'미등록',$content);
|
||||
$content = str_replace('{DATE}',getDateFormat($d_regis,'Y.m.d H:i'),$content);
|
||||
|
||||
getSendMail($R['email'].'|'.$R['name'], $d['member']['join_email'].'|'.$_HS['name'], '['.$_HS['name'].']회원가입을 축하드립니다.', $content, 'HTML');
|
||||
}
|
||||
|
||||
getLink(RW(0),'','인증이 완료되었습니다. 로그인해 주세요.','');
|
||||
?>
|
||||
32
modules/member/action/a.email_search.php
Normal file
32
modules/member/action/a.email_search.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
$name = trim($name);
|
||||
$id = trim($id);
|
||||
|
||||
if (!$name || !$id) getLink('','','정상적인 접근이 아닙니다.','');
|
||||
|
||||
$g['memberVarForSite'] = $g['path_var'].'site/'.$r.'/member.var.php';
|
||||
$_tmpvfile = file_exists($g['memberVarForSite']) ? $g['memberVarForSite'] : $g['path_module'].$module.'/var/var.php';
|
||||
include_once $_tmpvfile;
|
||||
|
||||
$M = getDbData($table['s_mbrdata'],"name='".$name."'",'*');
|
||||
if (!$M['name'])
|
||||
{
|
||||
getLink('','','입력하신 정보로 일치하는 회원데이터가 없습니다.','');
|
||||
}
|
||||
$R = getUidData($table['s_mbrid'],$M['memberuid']);
|
||||
|
||||
if ($R['id'] != $id)
|
||||
{
|
||||
getLink('','','입력하신 정보로 일치하는 회원데이터가 없습니다.','');
|
||||
}
|
||||
|
||||
echo '<script type="text/javascript">';
|
||||
echo 'parent.$("#findEmail").modal("hide");';
|
||||
echo 'parent.$("#email_field").val("'.$M['email'].'");';
|
||||
echo 'parent.alertLayer("#notice","success","회원님의 이메일은 ['.$M['email'].']입니다.","","","");';
|
||||
echo '</script>';
|
||||
|
||||
exit();
|
||||
?>
|
||||
56
modules/member/action/a.friend_add.php
Normal file
56
modules/member/action/a.friend_add.php
Normal file
@@ -0,0 +1,56 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
if (!$my['uid'])
|
||||
{
|
||||
getLink('','','정상적인 접근이 아닙니다.','');
|
||||
}
|
||||
|
||||
$g['memberVarForSite'] = $g['path_var'].'site/'.$r.'/member.var.php';
|
||||
$_tmpvfile = file_exists($g['memberVarForSite']) ? $g['memberVarForSite'] : $g['path_module'].$module.'/var/var.php';
|
||||
include_once $_tmpvfile;
|
||||
|
||||
$id = trim($friend);
|
||||
$idexp = explode(',',$id);
|
||||
$idlen = count($idexp);
|
||||
|
||||
for ($i = 0; $i < $idlen; $i++)
|
||||
{
|
||||
$xid = trim($idexp[$i]);
|
||||
if (!$xid) continue;
|
||||
|
||||
if($xid == $my['id']) continue;
|
||||
|
||||
if ($d['member']['login_emailid'])
|
||||
{
|
||||
$M = getDbData($table['s_mbrdata'],"email='".$xid."'",'*');
|
||||
if (!$M['memberuid']) continue;
|
||||
$M1 = getUidData($table['s_mbrid'],$M['memberuid']);
|
||||
if (!$M1['uid']) continue;
|
||||
|
||||
}
|
||||
else {
|
||||
$M1 = getDbData($table['s_mbrid'],"id='".$xid."'",'*');
|
||||
if (!$M1['uid']) continue;
|
||||
$M = getDbData($table['s_mbrdata'],'memberuid='.$M1['uid'],'*');
|
||||
if (!$M['memberuid']) continue;
|
||||
}
|
||||
|
||||
$R = getDbData($table['s_friend'],'my_mbruid='.$my['uid'].' and by_mbruid='.$M['memberuid'],'*');
|
||||
|
||||
if (!$R['uid'])
|
||||
{
|
||||
$R2 = getDbData($table['s_friend'],'my_mbruid='.$M['memberuid'].' and by_mbruid='.$my['uid'],'*');
|
||||
if ($R2['uid'])
|
||||
{
|
||||
getDbInsert($table['s_friend'],'rel,my_mbruid,by_mbruid,category,d_regis',"'1','".$my['uid']."','".$M['memberuid']."','','".$date['totime']."'");
|
||||
getDbUpdate($table['s_friend'],'rel=1','uid='.$R2['uid']);
|
||||
}
|
||||
else {
|
||||
getDbInsert($table['s_friend'],'rel,my_mbruid,by_mbruid,category,d_regis',"'0','".$my['uid']."','".$M['memberuid']."','','".$date['totime']."'");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
getLink('reload','parent.','','');
|
||||
?>
|
||||
50
modules/member/action/a.friend_add1.php
Normal file
50
modules/member/action/a.friend_add1.php
Normal file
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
if (!$my['uid'])
|
||||
{
|
||||
getLink('','','정상적인 접근이 아닙니다.','');
|
||||
}
|
||||
|
||||
$g['memberVarForSite'] = $g['path_var'].'site/'.$r.'/member.var.php';
|
||||
$_tmpvfile = file_exists($g['memberVarForSite']) ? $g['memberVarForSite'] : $g['path_module'].$module.'/var/var.php';
|
||||
include_once $_tmpvfile;
|
||||
|
||||
$xid = trim($id);
|
||||
if (!$xid) exit;
|
||||
|
||||
if($xid == $my['id']) getLink('','','자신은 친구맺기를 할 수 없습니다.','');
|
||||
|
||||
if ($d['member']['login_emailid'])
|
||||
{
|
||||
$M = getDbData($table['s_mbrdata'],"email='".$xid."'",'*');
|
||||
if (!$M['memberuid']) getLink('','','없는 회원입니다.','');
|
||||
$M1 = getUidData($table['s_mbrid'],$M['memberuid']);
|
||||
if (!$M1['uid']) getLink('','','없는 회원입니다.','');
|
||||
}
|
||||
else {
|
||||
$M1 = getDbData($table['s_mbrid'],"id='".$xid."'",'*');
|
||||
if (!$M1['uid']) getLink('','','없는 회원입니다.','');
|
||||
$M = getDbData($table['s_mbrdata'],'memberuid='.$M1['uid'],'*');
|
||||
if (!$M['memberuid']) getLink('','','없는 회원입니다.','');
|
||||
}
|
||||
|
||||
$R = getDbData($table['s_friend'],'by_mbruid='.$M['memberuid'],'*');
|
||||
|
||||
if (!$R['uid'])
|
||||
{
|
||||
$R2 = getDbData($table['s_friend'],'my_mbruid='.$M['memberuid'].' and by_mbruid='.$my['uid'],'*');
|
||||
if ($R2['uid'])
|
||||
{
|
||||
getDbInsert($table['s_friend'],'rel,my_mbruid,by_mbruid,category,d_regis',"'1','".$my['uid']."','".$M['memberuid']."','','".$date['totime']."'");
|
||||
getDbUpdate($table['s_friend'],'rel=1','uid='.$R2['uid']);
|
||||
getLink('','','맞팔 친구가 되셨습니다.','');
|
||||
}
|
||||
else {
|
||||
getDbInsert($table['s_friend'],'rel,my_mbruid,by_mbruid,category,d_regis',"'0','".$my['uid']."','".$M['memberuid']."','','".$date['totime']."'");
|
||||
getLink('','','친구맺기 요청을 전달했습니다.','');
|
||||
}
|
||||
}
|
||||
|
||||
getLink('','','이미 친구맺기 요청을 한 상태입니다.','');
|
||||
?>
|
||||
16
modules/member/action/a.friend_category.php
Normal file
16
modules/member/action/a.friend_category.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
if (!$my['uid'])
|
||||
{
|
||||
getLink('','','정상적인 접근이 아닙니다.','');
|
||||
}
|
||||
|
||||
$category = trim($category);
|
||||
foreach($members as $val)
|
||||
{
|
||||
getDbUpdate($table['s_friend'],"category='".$category."'",'uid='.$val.' and my_mbruid='.$my['uid']);
|
||||
}
|
||||
|
||||
getLink('reload','parent.','','');
|
||||
?>
|
||||
37
modules/member/action/a.friend_follow.php
Normal file
37
modules/member/action/a.friend_follow.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
if (!$my['uid'])
|
||||
{
|
||||
getLink('','','정상적인 접근이 아닙니다.','');
|
||||
}
|
||||
|
||||
if (!is_array($members)) $members = $fuid ? array($fuid) : array();
|
||||
|
||||
foreach($members as $val)
|
||||
{
|
||||
$R = getUidData($table['s_friend'],$val);
|
||||
if ($R['uid'] && !$R['rel'])
|
||||
{
|
||||
getDbInsert($table['s_friend'],'rel,my_mbruid,by_mbruid,category,d_regis',"'1','".$my['uid']."','".$R['my_mbruid']."','','".$date['totime']."'");
|
||||
getDbUpdate($table['s_friend'],'rel=1','uid='.$R['uid']);
|
||||
}
|
||||
}
|
||||
|
||||
if ($mbruid)
|
||||
{
|
||||
if (!$fuid)
|
||||
{
|
||||
$M = getUidData($table['s_mbrid'],$mbruid);
|
||||
if (!$M['uid']) getLink('','','존재하지 않는 회원입니다.','');
|
||||
getDbInsert($table['s_friend'],'rel,my_mbruid,by_mbruid,category,d_regis',"'0','".$my['uid']."','".$M['uid']."','','".$date['totime']."'");
|
||||
}
|
||||
echo '<script type="text/javascript">';
|
||||
// echo 'parent.getMemberLayerLoad('.$mbruid.');';
|
||||
echo '</script>';
|
||||
getLink('','','','');
|
||||
}
|
||||
else {
|
||||
getLink('reload','parent.','','');
|
||||
}
|
||||
?>
|
||||
33
modules/member/action/a.friend_unfollow.php
Normal file
33
modules/member/action/a.friend_unfollow.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
if (!$my['uid'])
|
||||
{
|
||||
getLink('','','정상적인 접근이 아닙니다.','');
|
||||
}
|
||||
if (!is_array($members)) $members = $fuid ? array($fuid) : array();
|
||||
|
||||
foreach($members as $val)
|
||||
{
|
||||
$R = getUidData($table['s_friend'],$val);
|
||||
if ($R['uid'])
|
||||
{
|
||||
getDbDelete($table['s_friend'],'uid='.$R['uid'].' and my_mbruid='.$my['uid']);
|
||||
if ($R['rel'])
|
||||
{
|
||||
getDbUpdate($table['s_friend'],'rel=0','my_mbruid='.$R['by_mbruid'].' and by_mbruid='.$R['my_mbruid']);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($fuid&&$mbruid)
|
||||
{
|
||||
echo '<script type="text/javascript">';
|
||||
echo 'parent.getMemberLayerLoad('.$mbruid.');';
|
||||
echo '</script>';
|
||||
getLink('','','','');
|
||||
}
|
||||
else {
|
||||
getLink('reload','parent.','','');
|
||||
}
|
||||
?>
|
||||
77
modules/member/action/a.front_imgupload.php
Normal file
77
modules/member/action/a.front_imgupload.php
Normal file
@@ -0,0 +1,77 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
include_once $g['path_core'].'function/string.func.php';
|
||||
include_once $g['dir_module'].'var/var.php'; // 관리자 설정 파일 인크루드
|
||||
|
||||
// 관리자 설정 값
|
||||
$perm_w=177; //미리보기 이미지 가로사이즈(등록폼 레이아웃 설정시 참고)
|
||||
$perm_h=140; //미리보기 이미지 세로사이즈(등록폼 레이아웃 설정시 참고)
|
||||
|
||||
|
||||
//폼에서 넘겨받은 atrname 값 활용 서버에 저장되는 썸네일 파일명 얻기
|
||||
$fname=$_POST['atrname']; // 히든값으로 name 속성벨류 얻어옴
|
||||
$fn_arr=explode('_',$fname); //_ 로 구분하고
|
||||
$fn_ord=$fn_arr[1];// 이미지 순번 얻음. 아래 파일명 정할 때 함께 포장
|
||||
|
||||
// 폼에서 넘겨받은 이전 저장파일 - 이미지 수정시 기존 업로드 이미지 삭제하기 위함
|
||||
$old_orifile=$_POST['orifile_'.$fn_ord]; // 기존 오리지널파일
|
||||
//if($fn_ord==1) $limit_w=$d['shop']['simg_size'];// 이미지 순서를 대입하여 허용된 메인 이미지 가로사이즈 얻음.
|
||||
//else $limit_w=$d['shop']['simg_size'.($fn_ord-1)]; //이미지 순서를 대입하여 허용된 서브 이미지 가로사이즈 얻음.
|
||||
$limit_w=177;
|
||||
|
||||
//업로드한 이미지 정보 값
|
||||
$tmpname= $_FILES[$fname]['tmp_name']; // 임시파일
|
||||
$realname= $_FILES[$fname]['name']; // 실제 파일
|
||||
$fileExt = strtolower(getExt($realname)); // 확장자 얻기
|
||||
$fileExt = $fileExt == 'jpeg' ? 'jpg' : $fileExt; // 확장자 중 jpeg 가 있으면...jpg 로 설정
|
||||
$valid_formats = array("jpg", "jpg", "jpg");// 가능한 파일확장자
|
||||
if($_FILES[$fname]['tmp_name'])
|
||||
{
|
||||
$tmp_info = getimagesize($tmpname); // 이미지 정보 얻기
|
||||
$tmp_w = $tmp_info[0]; // 이미지 넓이
|
||||
$tmp_h= $tmp_info[1];// 이미지 높이
|
||||
$show_w=$perm_w;
|
||||
$show_h=$perm_h;
|
||||
|
||||
if(($perm_w==$tmp_w)&&($perm_h==$tmp_h)) // 허용한 가로사이즈 혹은 세로 사이즈가 아닌경우
|
||||
{
|
||||
if(in_array($fileExt,$valid_formats))
|
||||
{
|
||||
if (is_uploaded_file($tmpname)) // 파일이 업로드되었다 가 참이면....
|
||||
{
|
||||
$saveDir = $g['path_root'].'_var/simbol'; // 파일구조상 이미 설정되어 있는 폴더 지정- 개별 이미지는 front 폴더에 별도 저장. 멀티업로드 파일과 구분
|
||||
|
||||
$oriname ='mp_'.$fn_ord.'.'.$fileExt; // ori 로 오리지널 표시하고 $fn_ord 로 순서표시
|
||||
$oriFile =$saveDir.'/'.$oriname; // 오리지널 파일 DB 에 저장할 패스/파일명 지정
|
||||
|
||||
if(is_file($old_orifile)) unlink($old_orifile); // 기존 오리지널 이미지 삭제 - 이미지 바꾸고 저장안하면 기존 테이블의 이미지와 만지 않는 문제때문에 사용안함.
|
||||
move_uploaded_file($tmpname,$oriFile); // 업로드된 임시파일명(tmpname)을 DB 에 저장할 오리지널 파일(oriFile) 로 복사한다.
|
||||
@chmod($oriFile,0707); // 새로 들어왔으니 권한 신규 부여
|
||||
|
||||
echo "<img src='".$oriFile."' id='newimg_".$fn_ord."' name='".$oriFile."' width='".$perm_w."' height='".$perm_h."' class='preview'>";
|
||||
exit;
|
||||
|
||||
} // 파일업로드 체크
|
||||
}else
|
||||
{
|
||||
echo "<img src='".$old_orifile."' id='newimg_".$fn_ord."' name='".$old_orifile."' width='".$perm_w."' height='".$perm_h."' class='preview'>";
|
||||
echo "<div class='ajax_msg'>파일 확장자는 jpg 만 허용됩니다.</div> ";
|
||||
exit;
|
||||
}
|
||||
|
||||
}else
|
||||
{
|
||||
echo "<img src='".$old_orifile."' id='newimg_".$fn_ord."' name='".$old_orifile."' width='".$perm_w."' height='".$perm_h."' class='preview'>";
|
||||
echo "<div class='ajax_msg'>가로사이즈".$perm_w."px 혹은 세로 사이즈".$perm_h."px 가 아닙니다.</div>"; // 가로 사이즈 초과
|
||||
exit;
|
||||
}
|
||||
}else
|
||||
{
|
||||
echo "<img src='".$old_orifile."' id='newimg_".$fn_ord."' name='".$old_orifile."' width='".$perm_w."' height='".$perm_h."' class='preview'>";
|
||||
echo "<div class='ajax_msg'>업로드 파일이 없습니다. </div>";
|
||||
exit;
|
||||
}
|
||||
?>
|
||||
|
||||
|
||||
18
modules/member/action/a.get_emailList.php
Normal file
18
modules/member/action/a.get_emailList.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
require_once $g['path_core'].'function/sys.class.php';
|
||||
include_once $g['dir_module'].'lib/action.func.php';
|
||||
|
||||
$g['memberVarForSite'] = $g['path_var'].'site/'.$_HS['id'].'/member.var.php'; // 사이트 회원모듈 변수파일
|
||||
$_varfile = file_exists($g['memberVarForSite']) ? $g['memberVarForSite'] : $g['dir_module'].'var/var.php';
|
||||
include_once $_varfile; // 변수파일 인클루드
|
||||
|
||||
$result=array();
|
||||
$result['error']=false;
|
||||
$result['list']='<div class="py-4 text-muted text-xs-center">준비중 입니다. <br>데스크탑을 이용해 주세요</div>';
|
||||
|
||||
echo json_encode($result);
|
||||
exit;
|
||||
|
||||
?>
|
||||
103
modules/member/action/a.get_mbrTrend.php
Normal file
103
modules/member/action/a.get_mbrTrend.php
Normal file
@@ -0,0 +1,103 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
if (!$my['uid']) {
|
||||
getLink('','','정상적인 접근이 아닙니다.','');
|
||||
}
|
||||
|
||||
$result=array();
|
||||
$result['error'] = false;
|
||||
|
||||
$labelArray = [];
|
||||
$dataArray = [];
|
||||
|
||||
$data = array();
|
||||
|
||||
$new_date = date("Ymd", strtotime($d_start.' -1 day'));
|
||||
|
||||
$labelsArray = array ();
|
||||
$dataArray = array ();
|
||||
$followerArray = array ();
|
||||
|
||||
$follower=0;
|
||||
|
||||
while(true) {
|
||||
$_new_date = date("m/d", strtotime($new_date. '+1 day'));
|
||||
$new_date = date("Ymd", strtotime($new_date. '+1 day'));
|
||||
|
||||
$_R = getDbData($table['s_mbrday'],'date ='.$new_date.' and mbruid='.$my['uid'],'*');
|
||||
array_push($labelsArray, $_new_date);
|
||||
array_push($dataArray, $_R['post_'.$mod]?$_R['post_'.$mod]:0);
|
||||
array_push($followerArray, $_R['follower']?$_R['follower']:0);$follower+=$_R['follower'];
|
||||
|
||||
if($new_date == date('Ymd', strtotime("now"))) break;
|
||||
}
|
||||
|
||||
$type='line';
|
||||
$data['labels'] = $labelsArray;
|
||||
|
||||
if ($mod=='hit') {
|
||||
|
||||
$data['datasets']= array (
|
||||
array (
|
||||
'label' => '조회수',
|
||||
'borderColor' => array('#004085'),
|
||||
'backgroundColor' => array('#cce5ff'),
|
||||
'data' => $dataArray,
|
||||
'fill' => true,
|
||||
)
|
||||
);
|
||||
|
||||
}
|
||||
|
||||
if ($mod=='likes') {
|
||||
$data['datasets']= array (
|
||||
array (
|
||||
'label' => '좋아요 추이',
|
||||
'backgroundColor' => array('#d4edda'),
|
||||
'borderColor' => array('#155724'),
|
||||
'data' => $dataArray
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
if ($mod=='dislikes') {
|
||||
$data['datasets']= array (
|
||||
array (
|
||||
'label' => '싫어요 추이',
|
||||
'backgroundColor' => array('#f8d7da'),
|
||||
'borderColor' => array('#721c24'),
|
||||
'data' => $dataArray
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
if ($mod=='comment') {
|
||||
$data['datasets']= array (
|
||||
array (
|
||||
'label' => '댓글 추이',
|
||||
'backgroundColor' => array('#fff3cd'),
|
||||
'borderColor' => array('#856404'),
|
||||
'data' => $dataArray
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
if ($mod=='follower') {
|
||||
$data['datasets']= array (
|
||||
array (
|
||||
'label' => '구독자 추이',
|
||||
'backgroundColor' => array('#d1ecf1'),
|
||||
'borderColor' => array('#0c5460'),
|
||||
'data' => $followerArray
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
$result['type'] = $type;
|
||||
$result['data'] = $data;
|
||||
$result['options'] = $options;
|
||||
|
||||
echo json_encode($result);
|
||||
exit;
|
||||
?>
|
||||
19
modules/member/action/a.get_phoneList.php
Normal file
19
modules/member/action/a.get_phoneList.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
require_once $g['path_core'].'function/sys.class.php';
|
||||
include_once $g['dir_module'].'lib/action.func.php';
|
||||
|
||||
$g['memberVarForSite'] = $g['path_var'].'site/'.$_HS['id'].'/member.var.php'; // 사이트 회원모듈 변수파일
|
||||
$_varfile = file_exists($g['memberVarForSite']) ? $g['memberVarForSite'] : $g['dir_module'].'var/var.php';
|
||||
include_once $_varfile; // 변수파일 인클루드
|
||||
|
||||
$result=array();
|
||||
$result['error']=false;
|
||||
|
||||
$result['list']='<div class="py-4 text-muted text-xs-center">준비중 입니다. <br>데스크탑을 이용해 주세요</div>';
|
||||
echo json_encode($result);
|
||||
exit;
|
||||
|
||||
|
||||
?>
|
||||
115
modules/member/action/a.get_profileComm.php
Normal file
115
modules/member/action/a.get_profileComm.php
Normal file
@@ -0,0 +1,115 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
require_once $g['path_core'].'function/sys.class.php';
|
||||
include_once $g['dir_module'].'lib/action.func.php';
|
||||
|
||||
$g['memberVarForSite'] = $g['path_var'].'site/'.$_HS['id'].'/member.var.php'; // 사이트 회원모듈 변수파일
|
||||
$_varfile = file_exists($g['memberVarForSite']) ? $g['memberVarForSite'] : $g['dir_module'].'var/var.php';
|
||||
include_once $_varfile; // 변수파일 인클루드
|
||||
|
||||
$result=array();
|
||||
$result['error']=false;
|
||||
|
||||
$mbruid = $_POST['mbruid'];
|
||||
$_mbruid = $my['uid'];
|
||||
$type = $_POST['type'];
|
||||
|
||||
if ($g['mobile']&&$_SESSION['pcmode']!='Y') {
|
||||
$theme = $d['member']['theme_mobile'];
|
||||
} else {
|
||||
$theme = $d['member']['theme_main'];
|
||||
}
|
||||
|
||||
//포스트 목록
|
||||
$sort = $sort ? $sort : 'gid';
|
||||
$orderby= $orderby ? $orderby : 'asc';
|
||||
$recnum = $recnum && $recnum < 200 ? $recnum : 15;
|
||||
|
||||
$postque = 'mbruid='.$mbruid.' and format<>2 and site='.$s;
|
||||
|
||||
if ($my['uid']) $postque .= ' and display > 3'; // 회원공개와 전체공개 포스트 출력
|
||||
else $postque .= ' and display = 5'; // 전체공개 포스트만 출력
|
||||
|
||||
if ($sort == 'gid' && !$keyword) {
|
||||
|
||||
$TCD = getDbArray($table['postmember'],$postque,'*',$sort,$orderby,$recnum,$p);
|
||||
while($_R = db_fetch_array($TCD)) $RCD[] = getDbData($table['postdata'],'gid='.$_R['gid'],'*');
|
||||
$NUM = getDbRows($table['postmember'],$postque);
|
||||
|
||||
} else {
|
||||
|
||||
if ($where && $keyword) {
|
||||
if (strstr('[name][nic][id][ip]',$where)) $postque .= " and ".$where."='".$keyword."'";
|
||||
else if ($where == 'term') $postque .= " and d_regis like '".$keyword."%'";
|
||||
else $postque .= getSearchSql($where,$keyword,$ikeyword,'or');
|
||||
}
|
||||
|
||||
$orderby = 'desc';
|
||||
$NUM = getDbRows($table['postdata'],$postque);
|
||||
$TCD = getDbArray($table['postdata'],$postque,'*',$sort,$orderby,$recnum,$p);
|
||||
while($_R = db_fetch_array($TCD)) $RCD[] = $_R;
|
||||
}
|
||||
|
||||
$TPG = getTotalPage($NUM,$recnum);
|
||||
|
||||
switch ($sort) {
|
||||
case 'gid' : $sort_txt='생성순';break;
|
||||
case 'hit' : $sort_txt='조회순';break;
|
||||
case 'likes' : $sort_txt='추천순';break;
|
||||
case 'comment' : $sort_txt='댓글순';break;
|
||||
default : $sort_txt='최신순';break;
|
||||
}
|
||||
|
||||
$postList = '';
|
||||
|
||||
if ($NUM) {
|
||||
foreach ($RCD as $POST) {
|
||||
$comment = $POST['comment'].($POST['oneline']?'+'.$POST['oneline']:'');
|
||||
$_comment = $comment==0?'':$comment;
|
||||
$TMPL['post_uid']=$POST['uid'];
|
||||
$TMPL['post_cid']=$POST['cid'];
|
||||
$TMPL['post_format']=$POST['format'];
|
||||
$TMPL['post_subject']=getContents($POST['subject'],$R['html']);
|
||||
$TMPL['post_has_content']=$POST['content']?'d-block':'d-none';
|
||||
$TMPL['post_featured_1by1'] = getPreviewResize(getUpImageSrc($POST),'640x640');
|
||||
$TMPL['post_featured_1by1_sm'] = getPreviewResize(getUpImageSrc($POST),'320x320');
|
||||
$TMPL['post_has_featured'] = $POST['featured_img']?'':'d-none';
|
||||
$TMPL['post_provider']=getFeaturedimgMeta($POST,'provider');
|
||||
$TMPL['post_videoId']=getFeaturedimgMeta($POST,'provider')=='YouTube'?getFeaturedimgMeta($POST,'name'):'';
|
||||
$TMPL['post_hit']=$POST['hit'];
|
||||
$TMPL['post_likes']=$POST['likes'];
|
||||
$TMPL['post_dislikes']=$POST['dislikes'];
|
||||
$TMPL['post_comment']=$_comment;
|
||||
$TMPL['post_d_modify'] = getDateFormat($POST['d_modify']?$POST['d_modify']:$POST['d_regis'],'c');
|
||||
$TMPL['post_nic'] = getProfileInfo($POST['mbruid'],'nic');
|
||||
$TMPL['post_time'] = getUpImageTime($POST);
|
||||
$TMPL['post_avatar'] = getAvatarSrc($POST['mbruid'],'68');
|
||||
$TMPL['post_profile_url']=getProfileLink($POST['mbruid']);
|
||||
$TMPL['post_mbruid']=$POST['mbruid'];
|
||||
|
||||
$check_like_qry = "mbruid='".$_mbruid."' and module='post' and entry='".$POST['uid']."' and opinion='like'";
|
||||
$check_dislike_qry = "mbruid='".$_mbruid."' and module='post' and entry='".$POST['uid']."' and opinion='dislike'";
|
||||
$check_saved_qry = "mbruid='".$_mbruid."' and module='post' and entry='".$POST['uid']."'";
|
||||
$is_post_liked = getDbRows($table['s_opinion'],$check_like_qry);
|
||||
$is_post_disliked = getDbRows($table['s_opinion'],$check_dislike_qry);
|
||||
$is_post_saved = getDbRows($table['s_saved'],$check_saved_qry);
|
||||
$TMPL['is_post_liked'] = $is_post_liked?'active':'';
|
||||
$TMPL['is_post_disliked'] = $is_post_disliked?'active':'';
|
||||
$TMPL['is_post_saved'] = $is_post_saved?'true':'false';
|
||||
|
||||
$skin_postList=new skin('_commList');
|
||||
$postList.=$skin_postList->make();
|
||||
}
|
||||
} else {
|
||||
$TMPL['none_txt'] = '게시된 포스트가 없습니다.';
|
||||
$skin_postList=new skin('_none');
|
||||
$postList.=$skin_postList->make();
|
||||
}
|
||||
|
||||
$result['list']=$postList;
|
||||
$result['num']=$NUM;
|
||||
|
||||
echo json_encode($result);
|
||||
exit;
|
||||
?>
|
||||
123
modules/member/action/a.get_profileData.php
Normal file
123
modules/member/action/a.get_profileData.php
Normal file
@@ -0,0 +1,123 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
require_once $g['path_core'].'function/sys.class.php';
|
||||
require_once $g['dir_module'].'lib/base.class.php';
|
||||
require_once $g['dir_module'].'lib/module.class.php';
|
||||
|
||||
$g['memberVarForSite'] = $g['path_var'].'site/'.$_HS['id'].'/member.var.php'; // 사이트 회원모듈 변수파일
|
||||
$_varfile = file_exists($g['memberVarForSite']) ? $g['memberVarForSite'] : $g['dir_module'].'var/var.php';
|
||||
include_once $_varfile; // 변수파일 인클루드
|
||||
|
||||
$result=array();
|
||||
$result['error']=false;
|
||||
|
||||
$mbruid = $_POST['mbruid'];
|
||||
$type = $_POST['type'];
|
||||
|
||||
if ($g['mobile']&&$_SESSION['pcmode']!='Y') {
|
||||
$theme = $d['member']['theme_mobile'];
|
||||
} else {
|
||||
$theme = $d['member']['theme_main'];
|
||||
}
|
||||
|
||||
$member = new Member();
|
||||
$member->theme_name = $theme;
|
||||
|
||||
$_MH = getUidData($table['s_mbrid'],$mbruid);
|
||||
$_MD = getDbData($table['s_mbrdata'],"memberuid='".$mbruid."'",'*');
|
||||
$_isFollowing = getDbRows($table['s_friend'],'my_mbruid='.$my['uid'].' and by_mbruid='.$mbruid);
|
||||
|
||||
$TMPL['id'] = $_MH['id'];
|
||||
$TMPL['nic'] = $_MD['nic'];
|
||||
$TMPL['name'] = $_MD['name'];
|
||||
$TMPL['mbruid'] = $mbruid;
|
||||
$TMPL['cover'] = getCoverSrc($mbruid,'800','500');
|
||||
$TMPL['avatar'] = getAvatarSrc($mbruid,'136');
|
||||
$TMPL['grade'] = $g['grade']['m'.$_MD['level']];
|
||||
$TMPL['point'] = number_format($_MD['point']);
|
||||
$TMPL['level'] = $_MD['level'];
|
||||
$TMPL['bio'] = $_MD['bio'];
|
||||
$TMPL['d_regis'] = getDateFormat($_MD['d_regis'],'Y.m.d');
|
||||
$TMPL['num_follower'] = number_format($_MD['num_follower']);
|
||||
$TMPL['bio'] = $_MD['bio'];
|
||||
$TMPL['hit_post'] = number_format($_MD['hit_post']);
|
||||
$TMPL['isFollowing'] = $_isFollowing ?'active':'';
|
||||
$TMPL['profile_setting'] = $mbruid==$my['uid']?$member->getHtml('profile_setting'):'';
|
||||
$TMPL['profile_follow'] = $my['uid']!=$mbruid?$member->getHtml('profile_follow'):'';
|
||||
|
||||
// 작업필요
|
||||
$_isFollowing = getDbRows($table['s_friend'],'my_mbruid='.$my['uid'].' and by_mbruid='.$mbruid);
|
||||
|
||||
if ($type=='popover') {
|
||||
$markup_file = 'profile-popover'; // 기본 마크업 페이지 전달 (테마 내부 _html/profile-popover.html)
|
||||
}
|
||||
|
||||
|
||||
//최근 동영상
|
||||
$postque = 'mbruid='.$mbruid.' and site='.$s.' and format=2';
|
||||
if ($my['uid']) $postque .= ' and display > 3'; // 회원공개와 전체공개 포스트 출력
|
||||
else $postque .= ' and display = 5'; // 전체공개 포스트만 출력
|
||||
$_RCD=getDbArray($table['postmember'],$postque,'*','gid','asc',3,1);
|
||||
while($_R = db_fetch_array($_RCD)) $RCD[] = getDbData($table['postdata'],'gid='.$_R['gid'],'*');
|
||||
$NUM = getDbRows($table['postmember'],$postque);
|
||||
$newPost = '';
|
||||
|
||||
if ($NUM) {
|
||||
foreach ($RCD as $POST) {
|
||||
$TMPL['post_uid']=$POST['uid'];
|
||||
$TMPL['post_cid']=$POST['cid'];
|
||||
$TMPL['post_format']=$POST['format'];
|
||||
$TMPL['post_subject']=getContents($POST['subject'],$R['html']);
|
||||
$TMPL['post_featured_16by9'] = getPreviewResize(getUpImageSrc($POST),'640x360');
|
||||
$TMPL['post_featured_16by9_sm'] = getPreviewResize(getUpImageSrc($POST),'320x180');
|
||||
$TMPL['post_has_featured'] = $POST['featured_img']?'':'d-none';
|
||||
$TMPL['post_provider']=getFeaturedimgMeta($POST,'provider');
|
||||
$TMPL['post_videoId']=getFeaturedimgMeta($POST,'provider')=='YouTube'?getFeaturedimgMeta($POST,'name'):'';
|
||||
$TMPL['post_hit']=$POST['hit'];
|
||||
$TMPL['post_d_modify'] = getDateFormat($POST['d_modify']?$POST['d_modify']:$POST['d_regis'],'c');
|
||||
$TMPL['post_nic'] = getProfileInfo($POST['mbruid'],'nic');
|
||||
$TMPL['post_time'] = getUpImageTime($POST);
|
||||
$skin_newPost=new skin('_postList');
|
||||
$newPost.=$skin_newPost->make();
|
||||
}
|
||||
}
|
||||
if (!$_NUM) $newList = '<div>자료가 없습니다.</div>';
|
||||
$TMPL['newPost'] = $newPost;
|
||||
|
||||
//최근 리스트
|
||||
$listque = 'mbruid='.$mbruid.' and site='.$s;
|
||||
if ($my['uid']) $listque .= ' and display > 3'; // 회원공개와 전체공개 포스트 출력
|
||||
else $listque .= ' and display = 5'; // 전체공개 포스트만 출력
|
||||
$LCD=getDbArray($table['postlist'],$listque,'*','gid','asc',3,1);
|
||||
$_NUM = getDbRows($table['postlist'],$listque);
|
||||
|
||||
$newList = '';
|
||||
if ($_NUM) {
|
||||
foreach ($LCD as $LIST) {
|
||||
$TMPL['list_name']=stripslashes($LIST['name']);
|
||||
$TMPL['list_uid']=$LIST['uid'];
|
||||
$TMPL['list_id']=$LIST['id'];
|
||||
$TMPL['list_num']=$LIST['num'];
|
||||
$TMPL['list_featured_16by9_sm'] = getPreviewResize(getListImageSrc($LIST['uid']),'480x270');
|
||||
$TMPL['list_d_modify'] = getDateFormat($LIST['d_modify']?$LIST['d_modify']:$LIST['d_regis'],'c');
|
||||
$TMPL['list_nic'] = getProfileInfo($LIST['mbruid'],'nic');
|
||||
$skin_newList=new skin('_listList');
|
||||
$newList.=$skin_newList->make();
|
||||
}
|
||||
}
|
||||
if (!$_NUM) $newList = '<div>자료가 없습니다.</div>';
|
||||
$TMPL['newList'] = $newList;
|
||||
|
||||
if (!$type || $type=='modal' || $type=='page') {
|
||||
$markup_file = 'profile'; // 기본 마크업 페이지 전달 (테마 내부 _html/profile.html)
|
||||
}
|
||||
|
||||
// 최종 결과값 추출 (sys.class.php)
|
||||
$skin=new skin($markup_file);
|
||||
$result['profile']=$skin->make();
|
||||
$result['nic'] = $_MD['nic'];
|
||||
|
||||
echo json_encode($result);
|
||||
exit;
|
||||
?>
|
||||
28
modules/member/action/a.get_profileDataSimple.php
Normal file
28
modules/member/action/a.get_profileDataSimple.php
Normal file
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
$result=array();
|
||||
$result['error']=false;
|
||||
|
||||
$mbruid = $_POST['mbruid'];
|
||||
|
||||
$_MH = getUidData($table['s_mbrid'],$mbruid);
|
||||
$_MD = getDbData($table['s_mbrdata'],"memberuid='".$mbruid."'",'*');
|
||||
$_isFollowing = getDbRows($table['s_friend'],'my_mbruid='.$my['uid'].' and by_mbruid='.$mbruid);
|
||||
|
||||
$result['id'] = $_MH['id'];
|
||||
$result['nic'] = $_MD['nic'];
|
||||
$result['cover'] = getCoverSrc($mbruid,'800','500');
|
||||
$result['avatar'] = getAvatarSrc($mbruid,'250');
|
||||
$result['bio'] = $_MD['bio'];
|
||||
$result['grade'] = $g['grade']['m'.$_MD['level']];
|
||||
$result['point'] = number_format($_MD['point']);
|
||||
$result['num_follower'] = number_format($_MD['num_follower']);
|
||||
$result['num_post'] = number_format($_MD['num_post']);
|
||||
$result['num_list'] = number_format($_MD['num_list']);
|
||||
$result['num_goods'] = number_format($_MD['num_goods']);
|
||||
$result['isFollowing'] = $_isFollowing;
|
||||
|
||||
echo json_encode($result);
|
||||
exit;
|
||||
?>
|
||||
61
modules/member/action/a.get_profileFollow.php
Normal file
61
modules/member/action/a.get_profileFollow.php
Normal file
@@ -0,0 +1,61 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
require_once $g['path_core'].'function/sys.class.php';
|
||||
include_once $g['dir_module'].'lib/action.func.php';
|
||||
|
||||
$g['memberVarForSite'] = $g['path_var'].'site/'.$_HS['id'].'/member.var.php'; // 사이트 회원모듈 변수파일
|
||||
$_varfile = file_exists($g['memberVarForSite']) ? $g['memberVarForSite'] : $g['dir_module'].'var/var.php';
|
||||
include_once $_varfile; // 변수파일 인클루드
|
||||
|
||||
$result=array();
|
||||
$result['error']=false;
|
||||
|
||||
$mbruid = $_POST['mbruid'];
|
||||
$type = $_POST['type'];
|
||||
|
||||
if ($g['mobile']&&$_SESSION['pcmode']!='Y') {
|
||||
$theme = $d['member']['theme_mobile'];
|
||||
} else {
|
||||
$theme = $d['member']['theme_main'];
|
||||
}
|
||||
|
||||
//팔로우(구독) 목록
|
||||
$sort = 'uid';
|
||||
$orderby= 'desc';
|
||||
$recnum = 15;
|
||||
$mbrque = 'my_mbruid='.$mbruid;
|
||||
|
||||
if ($where && $keyword) $mbrque .= getSearchSql($where,$keyword,$ikeyword,'or');
|
||||
$RCD = getDbArray($table['s_friend'],$mbrque,'*',$sort,$orderby,$recnum,$p);
|
||||
$NUM = getDbRows($table['s_friend'],$mbrque);
|
||||
$TPG = getTotalPage($NUM,$recnum);
|
||||
|
||||
$followList = '';
|
||||
|
||||
if ($NUM) {
|
||||
foreach ($RCD as $R) {
|
||||
$num_follower = getProfileInfo($R['by_mbruid'],'num_follower');
|
||||
$num_post = getProfileInfo($R['by_mbruid'],'num_post');
|
||||
$_isFollowing = getDbRows($table['s_friend'],'my_mbruid='.$my['uid'].' and by_mbruid='.$R['by_mbruid']);
|
||||
$TMPL['avatar']=getAvatarSrc($R['by_mbruid'],'130');
|
||||
$TMPL['nic']=getProfileInfo($R['by_mbruid'],'nic');
|
||||
$TMPL['mbruid']=$R['by_mbruid'];
|
||||
$TMPL['profile_url']=getProfileLink($R['by_mbruid']);
|
||||
$TMPL['num_follower']=number_format($num_follower);
|
||||
$TMPL['num_post']=number_format($num_post);
|
||||
$skin_followList=new skin('_followList');
|
||||
$followList.=$skin_followList->make();
|
||||
}
|
||||
} else {
|
||||
$TMPL['none_txt'] = '구독중인 채널이 없습니다.';
|
||||
$skin_followList=new skin('_none');
|
||||
$followList.=$skin_followList->make();
|
||||
}
|
||||
|
||||
$result['list']=$followList;
|
||||
$result['num']=$NUM;
|
||||
|
||||
echo json_encode($result);
|
||||
exit;
|
||||
?>
|
||||
71
modules/member/action/a.get_profileList.php
Normal file
71
modules/member/action/a.get_profileList.php
Normal file
@@ -0,0 +1,71 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
require_once $g['path_core'].'function/sys.class.php';
|
||||
include_once $g['dir_module'].'lib/action.func.php';
|
||||
|
||||
$g['memberVarForSite'] = $g['path_var'].'site/'.$_HS['id'].'/member.var.php'; // 사이트 회원모듈 변수파일
|
||||
$_varfile = file_exists($g['memberVarForSite']) ? $g['memberVarForSite'] : $g['dir_module'].'var/var.php';
|
||||
include_once $_varfile; // 변수파일 인클루드
|
||||
|
||||
$result=array();
|
||||
$result['error']=false;
|
||||
|
||||
$mbruid = $_POST['mbruid'];
|
||||
$type = $_POST['type'];
|
||||
|
||||
if ($g['mobile']&&$_SESSION['pcmode']!='Y') {
|
||||
$theme = $d['member']['theme_mobile'];
|
||||
} else {
|
||||
$theme = $d['member']['theme_main'];
|
||||
}
|
||||
|
||||
//리스트 목록
|
||||
$sort = $sort ? $sort : 'gid';
|
||||
$orderby= $orderby ? $orderby : 'asc';
|
||||
$recnum = $recnum && $recnum < 200 ? $recnum : 12;
|
||||
$listque = 'mbruid='.$mbruid.' and site='.$s;
|
||||
$where = 'name|tag';
|
||||
|
||||
if ($sort != 'gid') $orderby= 'desc';
|
||||
|
||||
if ($my['uid']) $listque .= ' and display > 3'; // 회원공개와 전체공개 포스트 출력
|
||||
else $listque .= ' and display = 5'; // 전체공개 포스트만 출력
|
||||
|
||||
if ($where && $keyword)
|
||||
{
|
||||
if (strstr('[name][nic][id][ip]',$where)) $listque .= " and ".$where."='".$keyword."'";
|
||||
else if ($where == 'term') $listque .= " and d_regis like '".$keyword."%'";
|
||||
else $listque .= getSearchSql($where,$keyword,$ikeyword,'or');
|
||||
}
|
||||
$RCD = getDbArray($table['postlist'],$listque,'*',$sort,$orderby,$recnum,$p);
|
||||
$NUM = getDbRows($table['postlist'],$listque);
|
||||
$TPG = getTotalPage($NUM,$recnum);
|
||||
|
||||
|
||||
$listList = '';
|
||||
|
||||
if ($NUM) {
|
||||
foreach ($RCD as $LIST) {
|
||||
$TMPL['list_name']=stripslashes($LIST['name']);
|
||||
$TMPL['list_uid']=$LIST['uid'];
|
||||
$TMPL['list_id']=$LIST['id'];
|
||||
$TMPL['list_num']=$LIST['num'];
|
||||
$TMPL['list_featured_16by9_sm'] = getPreviewResize(getListImageSrc($LIST['uid']),'480x270');
|
||||
$TMPL['list_d_modify'] = getDateFormat($LIST['d_modify']?$LIST['d_modify']:$LIST['d_regis'],'c');
|
||||
$TMPL['list_nic'] = getProfileInfo($LIST['mbruid'],'nic');
|
||||
$skin_listList=new skin('_listList');
|
||||
$listList.=$skin_listList->make();
|
||||
}
|
||||
} else {
|
||||
$TMPL['none_txt'] = '게시된 리스트가 없습니다.';
|
||||
$skin_listList=new skin('_none');
|
||||
$listList.=$skin_listList->make();
|
||||
}
|
||||
|
||||
$result['list']=$listList;
|
||||
$result['num']=$NUM;
|
||||
|
||||
echo json_encode($result);
|
||||
exit;
|
||||
?>
|
||||
105
modules/member/action/a.get_profilePost.php
Normal file
105
modules/member/action/a.get_profilePost.php
Normal file
@@ -0,0 +1,105 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
require_once $g['path_core'].'function/sys.class.php';
|
||||
include_once $g['dir_module'].'lib/action.func.php';
|
||||
|
||||
$g['memberVarForSite'] = $g['path_var'].'site/'.$_HS['id'].'/member.var.php'; // 사이트 회원모듈 변수파일
|
||||
$_varfile = file_exists($g['memberVarForSite']) ? $g['memberVarForSite'] : $g['dir_module'].'var/var.php';
|
||||
include_once $_varfile; // 변수파일 인클루드
|
||||
|
||||
$result=array();
|
||||
$result['error']=false;
|
||||
|
||||
$mbruid = $_POST['mbruid'];
|
||||
$_mbruid = $my['uid'];
|
||||
$type = $_POST['type'];
|
||||
|
||||
if ($g['mobile']&&$_SESSION['pcmode']!='Y') {
|
||||
$theme = $d['member']['theme_mobile'];
|
||||
} else {
|
||||
$theme = $d['member']['theme_main'];
|
||||
}
|
||||
|
||||
//포스트 목록
|
||||
$sort = $sort ? $sort : 'gid';
|
||||
$orderby= $orderby ? $orderby : 'asc';
|
||||
$recnum = $recnum && $recnum < 200 ? $recnum : 15;
|
||||
$postque = 'mbruid='.$mbruid.' and format='.$format.' and site='.$s;
|
||||
|
||||
if ($my['uid']) $postque .= ' and display > 3'; // 회원공개와 전체공개 포스트 출력
|
||||
else $postque .= ' and display = 5'; // 전체공개 포스트만 출력
|
||||
|
||||
if ($sort == 'gid' && !$keyword) {
|
||||
|
||||
$TCD = getDbArray($table['postmember'],$postque,'*',$sort,$orderby,$recnum,$p);
|
||||
while($_R = db_fetch_array($TCD)) $RCD[] = getDbData($table['postdata'],'gid='.$_R['gid'],'*');
|
||||
$NUM = getDbRows($table['postmember'],$postque);
|
||||
|
||||
} else {
|
||||
|
||||
if ($where && $keyword) {
|
||||
if (strstr('[name][nic][id][ip]',$where)) $postque .= " and ".$where."='".$keyword."'";
|
||||
else if ($where == 'term') $postque .= " and d_regis like '".$keyword."%'";
|
||||
else $postque .= getSearchSql($where,$keyword,$ikeyword,'or');
|
||||
}
|
||||
|
||||
$orderby = 'desc';
|
||||
$NUM = getDbRows($table['postdata'],$postque);
|
||||
$TCD = getDbArray($table['postdata'],$postque,'*',$sort,$orderby,$recnum,$p);
|
||||
while($_R = db_fetch_array($TCD)) $RCD[] = $_R;
|
||||
}
|
||||
|
||||
$TPG = getTotalPage($NUM,$recnum);
|
||||
|
||||
switch ($sort) {
|
||||
case 'gid' : $sort_txt='생성순';break;
|
||||
case 'hit' : $sort_txt='조회순';break;
|
||||
case 'likes' : $sort_txt='추천순';break;
|
||||
case 'comment' : $sort_txt='댓글순';break;
|
||||
default : $sort_txt='최신순';break;
|
||||
}
|
||||
|
||||
$postList = '';
|
||||
|
||||
if ($NUM) {
|
||||
foreach ($RCD as $POST) {
|
||||
$TMPL['post_uid']=$POST['uid'];
|
||||
$TMPL['post_cid']=$POST['cid'];
|
||||
$TMPL['post_format']=$POST['format'];
|
||||
$TMPL['post_subject']=stripslashes($POST['subject']);
|
||||
$TMPL['post_featured_16by9'] = getPreviewResize(getUpImageSrc($POST),'640x360');
|
||||
$TMPL['post_featured_16by9_sm'] = getPreviewResize(getUpImageSrc($POST),'320x180');
|
||||
$TMPL['post_provider']=getFeaturedimgMeta($POST,'provider');
|
||||
$TMPL['post_videoId']=getFeaturedimgMeta($POST,'provider')=='YouTube'?getFeaturedimgMeta($POST,'name'):'';
|
||||
$TMPL['post_hit']=$POST['hit'];
|
||||
$TMPL['post_d_modify'] = getDateFormat($POST['d_modify']?$POST['d_modify']:$POST['d_regis'],'c');
|
||||
$TMPL['post_nic'] = getProfileInfo($POST['mbruid'],'nic');
|
||||
$TMPL['post_time'] = getUpImageTime($POST);
|
||||
|
||||
$check_like_qry = "mbruid='".$_mbruid."' and module='".$m."' and entry='".$POST['uid']."' and opinion='like'";
|
||||
$check_dislike_qry = "mbruid='".$_mbruid."' and module='".$m."' and entry='".$POST['uid']."' and opinion='dislike'";
|
||||
$check_saved_qry = "mbruid='".$_mbruid."' and module='".$m."' and entry='".$POST['uid']."'";
|
||||
$is_post_liked = getDbRows($table['s_opinion'],$check_like_qry);
|
||||
$is_post_disliked = getDbRows($table['s_opinion'],$check_dislike_qry);
|
||||
$is_post_saved = getDbRows($table['s_saved'],$check_saved_qry);
|
||||
$TMPL['is_post_liked'] = $is_post_liked?'active':'';
|
||||
$TMPL['is_post_disliked'] = $is_post_disliked?'active':'';
|
||||
$TMPL['is_post_saved'] = $is_post_saved?'true':'false';
|
||||
|
||||
$skin_postList=new skin('_postList');
|
||||
$postList.=$skin_postList->make();
|
||||
}
|
||||
} else {
|
||||
$TMPL['none_txt'] = '게시된 포스트가 없습니다.';
|
||||
$skin_postList=new skin('_none');
|
||||
$postList.=$skin_postList->make();
|
||||
}
|
||||
|
||||
$result['list']=$postList;
|
||||
$result['num']=$NUM;
|
||||
$result['tpg']=$TPG;
|
||||
|
||||
echo json_encode($result);
|
||||
exit;
|
||||
?>
|
||||
18
modules/member/action/a.get_shippingList.php
Normal file
18
modules/member/action/a.get_shippingList.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
require_once $g['path_core'].'function/sys.class.php';
|
||||
include_once $g['dir_module'].'lib/action.func.php';
|
||||
|
||||
$g['memberVarForSite'] = $g['path_var'].'site/'.$_HS['id'].'/member.var.php'; // 사이트 회원모듈 변수파일
|
||||
$_varfile = file_exists($g['memberVarForSite']) ? $g['memberVarForSite'] : $g['dir_module'].'var/var.php';
|
||||
include_once $_varfile; // 변수파일 인클루드
|
||||
|
||||
$result=array();
|
||||
$result['error']=false;
|
||||
|
||||
$result['list']='<div class="py-4 text-muted text-xs-center">준비중 입니다. <br>데스크탑을 이용해 주세요</div>';
|
||||
echo json_encode($result);
|
||||
exit;
|
||||
|
||||
?>
|
||||
67
modules/member/action/a.id_auth.php
Normal file
67
modules/member/action/a.id_auth.php
Normal file
@@ -0,0 +1,67 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
$name = trim($name);
|
||||
$email = trim($email);
|
||||
|
||||
if (!$name || !$email) getLink('','','정상적인 접근이 아닙니다.','');
|
||||
|
||||
$g['memberVarForSite'] = $g['path_var'].'site/'.$r.'/member.var.php';
|
||||
$_tmpvfile = file_exists($g['memberVarForSite']) ? $g['memberVarForSite'] : $g['path_module'].$module.'/var/var.php';
|
||||
include_once $_tmpvfile;
|
||||
|
||||
if (!$d['member']['join_email'])
|
||||
{
|
||||
getLink('','','죄송합니다. 대표이메일이 등록되지 않았습니다. 관리자에게 문의해 주세요.','');
|
||||
}
|
||||
|
||||
if ($d['member']['login_emailid'])
|
||||
{
|
||||
$R = getDbData($table['s_mbrid'],"id='".$email."'",'*');
|
||||
if (!$R['uid'])
|
||||
{
|
||||
getLink('','','입력하신 정보로 일치하는 회원데이터가 없습니다.','');
|
||||
}
|
||||
$M = getDbData($table['s_mbrdata'],'memberuid='.$R['uid'],'*');
|
||||
}
|
||||
else {
|
||||
$M = getDbData($table['s_mbrdata'],"email='".$email."'",'*');
|
||||
if (!$M['email'])
|
||||
{
|
||||
getLink('','','입력하신 이메일 데이터가 없습니다.','');
|
||||
}
|
||||
$R = getUidData($table['s_mbrid'],$M['memberuid']);
|
||||
}
|
||||
//getLink('','',$name.'-'.$M['name'],'');
|
||||
if ($M['name'] != $name)
|
||||
{
|
||||
getLink('','','이름이 일치하지 않습니다.','');
|
||||
}
|
||||
if ($M['tmpcode'])
|
||||
{
|
||||
getLink('','','이미 회원님의 이메일['.$M['email'].']로 \n임시 비밀번호를 발송해 드렸습니다.','');
|
||||
}
|
||||
|
||||
|
||||
$auth_pw = 'rb'.date('His');
|
||||
|
||||
include_once $g['path_core'].'function/email.func.php';
|
||||
$content = implode('',file($g['dir_module'].'doc/_pw.txt'));
|
||||
$content = str_replace('{NAME}',$M['name'],$content);
|
||||
$content = str_replace('{NICK}',$M['nic'],$content);
|
||||
$content = str_replace('{ID}',$R['id'],$content);
|
||||
$content = str_replace('{EMAIL}',$M['email'],$content);
|
||||
$content.= '<p>임시 비밀번호 : '.$auth_pw.'</p>';
|
||||
$content.= implode('',file($g['dir_module'].'doc/_sign.txt'));
|
||||
|
||||
$result = getSendMail($M['email'].'|'.$M['name'], $d['member']['join_email'].'|'.$_HS['name'], '['.$_HS['name'].'] 임시 비밀번호가 발급되었습니다.', $content, 'HTML');
|
||||
|
||||
if (!$result)
|
||||
{
|
||||
getLink('','','죄송합니다. 이메일서버가 응답하지 않아 이메일을 보내드리지 못했습니다.','');
|
||||
}
|
||||
|
||||
getDbUpdate($table['s_mbrdata'],"last_pw='".$date['today']."',tmpcode='".password_hash($auth_pw,PASSWORD_DEFAULT)."'",'memberuid='.$M['memberuid']);
|
||||
|
||||
getLink('','','회원님의 이메일['.$M['email'].']로 \n임시 비밀번호를 발송해 드렸습니다.','');
|
||||
?>
|
||||
43
modules/member/action/a.id_search.php
Normal file
43
modules/member/action/a.id_search.php
Normal file
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
$name = trim($name);
|
||||
$email = trim($email);
|
||||
|
||||
if (!$name || !$email) getLink('','','정상적인 접근이 아닙니다.','');
|
||||
|
||||
$g['memberVarForSite'] = $g['path_var'].'site/'.$r.'/member.var.php';
|
||||
$_tmpvfile = file_exists($g['memberVarForSite']) ? $g['memberVarForSite'] : $g['path_module'].$module.'/var/var.php';
|
||||
include_once $_tmpvfile;
|
||||
|
||||
if ($d['member']['login_emailid'])
|
||||
{
|
||||
$R = getDbData($table['s_mbrid'],"id='".$email."'",'*');
|
||||
if (!$R['uid'])
|
||||
{
|
||||
getLink('','','입력하신 정보로 일치하는 회원데이터가 없습니다.','');
|
||||
}
|
||||
$M = getDbData($table['s_mbrdata'],'memberuid='.$R['uid'],'*');
|
||||
}
|
||||
else {
|
||||
$M = getDbData($table['s_mbrdata'],"email='".$email."'",'*');
|
||||
if (!$M['email'])
|
||||
{
|
||||
getLink('','','입력하신 정보로 일치하는 회원데이터가 없습니다.','');
|
||||
}
|
||||
$R = getUidData($table['s_mbrid'],$M['memberuid']);
|
||||
}
|
||||
|
||||
if ($M['name'] != $name)
|
||||
{
|
||||
getLink('','','입력하신 정보로 일치하는 회원데이터가 없습니다.','');
|
||||
}
|
||||
|
||||
if ($d['member']['login_emailid'])
|
||||
{
|
||||
getLink('','','회원님의 이메일은 ['.$M['email'].']입니다.','');
|
||||
}
|
||||
else {
|
||||
getLink('','','회원님의 아이디는 ['.$R['id'].']입니다.','');
|
||||
}
|
||||
?>
|
||||
141
modules/member/action/a.info_update.php
Normal file
141
modules/member/action/a.info_update.php
Normal file
@@ -0,0 +1,141 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
if (!$my['uid'])
|
||||
{
|
||||
getLink('','','정상적인 접근이 아닙니다.','');
|
||||
}
|
||||
|
||||
if ($act == 'info') // 프로필 정보 변경
|
||||
{
|
||||
|
||||
$g['memberVarForSite'] = $g['path_var'].'site/'.$r.'/member.var.php';
|
||||
$_tmpvfile = file_exists($g['memberVarForSite']) ? $g['memberVarForSite'] : $g['path_module'].$module.'/var/var.php';
|
||||
include_once $_tmpvfile;
|
||||
|
||||
$memberuid = $my['admin'] && $memberuid ? $memberuid : $my['uid'];
|
||||
$name = trim($name);
|
||||
$nic = trim($nic);
|
||||
$nic = $nic ? $nic : $name;
|
||||
|
||||
if (($d['member']['form_nic'] && !$check_nic) || !$check_email)
|
||||
{
|
||||
getLink('','','정상적인 접근이 아닙니다.','');
|
||||
}
|
||||
if(getDbRows($table['s_mbrdata'],"memberuid<>".$memberuid." and email='".$email."'"))
|
||||
{
|
||||
getLink('','','이미 존재하는 이메일입니다.','');
|
||||
}
|
||||
if($d['member']['form_nic'])
|
||||
{
|
||||
if(!$my['admin'])
|
||||
{
|
||||
if(strstr(','.$d['member']['join_cutnic'].',',','.$nic.',') || getDbRows($table['s_mbrdata'],"memberuid<>".$memberuid." and nic='".$nic."'"))
|
||||
{
|
||||
getLink('','','이미 존재하는 닉네임입니다.','');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$home = $home ? (strstr($home,'http://')?str_replace('http://','',$home):$home) : '';
|
||||
$birth1 = $birth_1;
|
||||
$birth2 = $birth_2.$birth_3;
|
||||
$birthtype = $birthtype ? $birthtype : 0;
|
||||
$tel1 = $tel1_1 && $tel1_2 && $tel1_3 ? $tel1_1 .'-'. $tel1_2 .'-'. $tel1_3 : '';
|
||||
$tel2 = $tel2_1 && $tel2_2 && $tel2_3 ? $tel2_1 .'-'. $tel2_2 .'-'. $tel2_3 : '';
|
||||
|
||||
if(!$overseas)
|
||||
{
|
||||
$addrx = explode(' ',$addr1);
|
||||
$addr0 = $addr1 && $addr2 ? $addrx[0] : '';
|
||||
$addr1 = $addr1 && $addr2 ? $addr1 : '';
|
||||
$addr2 = trim($addr2);
|
||||
}
|
||||
else {
|
||||
$zip = '';
|
||||
$addr0 = '해외';
|
||||
$addr1 = '';
|
||||
$addr2 = '';
|
||||
}
|
||||
|
||||
$job = trim($job);
|
||||
$marr1 = $marr_1 && $marr_2 && $marr_3 ? $marr_1 : 0;
|
||||
$marr2 = $marr_1 && $marr_2 && $marr_3 ? $marr_2.$marr_3 : 0;
|
||||
$sms = $tel2 && $sms ? 1 : 0;
|
||||
$mailing = $remail;
|
||||
$bio = trim($bio);
|
||||
$addfield = '';
|
||||
|
||||
$_addarray = file($g['path_var'].'site/'.$r.'/member.add_field.txt');
|
||||
foreach($_addarray as $_key)
|
||||
{
|
||||
$_val = explode('|',trim($_key));
|
||||
if ($_val[2] == 'checkbox')
|
||||
{
|
||||
$addfield .= $_val[0].'^^^';
|
||||
if (is_array(${'add_'.$_val[0]}))
|
||||
{
|
||||
foreach(${'add_'.$_val[0]} as $_skey)
|
||||
{
|
||||
$addfield .= '['.$_skey.']';
|
||||
}
|
||||
}
|
||||
$addfield .= '|||';
|
||||
}
|
||||
else {
|
||||
$addfield .= $_val[0].'^^^'.trim(${'add_'.$_val[0]}).'|||';
|
||||
}
|
||||
}
|
||||
|
||||
$_QVAL = "email='$email',name='$name',nic='$nic',home='$home',sex='$sex',birth1='$birth1',birth2='$birth2',birthtype='$birthtype',phone='$phone',tel='$tel',";
|
||||
$_QVAL.= "location='$location',job='$job',marr1='$marr1',marr2='$marr2',sms='$sms',mailing='$mailing',bio='$bio',addfield='$addfield'";
|
||||
getDbUpdate($table['s_mbrdata'],$_QVAL,'memberuid='.$memberuid);
|
||||
|
||||
if ($send_mod == 'ajax') {
|
||||
|
||||
echo '<script type="text/javascript">';
|
||||
echo 'parent.$.notify({message: "변경 되었습니다."},{type: "default"});';
|
||||
echo '</script>';
|
||||
|
||||
exit;
|
||||
|
||||
} else {
|
||||
setrawcookie('member_settings_result', rawurlencode('개인정보가 변경 되었습니다.|success')); // 처리여부 cookie 저장
|
||||
getLink('reload','parent.','','');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ($act == 'pw') // 비밀번호 변경
|
||||
{
|
||||
|
||||
if (!$pw || !$pw1 || !$pw2)
|
||||
{
|
||||
getLink('','','정상적인 접근이 아닙니다.','');
|
||||
}
|
||||
|
||||
if (strlen($my['pw']) == 60) {
|
||||
if (!password_verify($pw,$my['pw']) && !password_verify($pw,$my['tmpcode'])) {
|
||||
getLink('reload','parent.','현재 비밀번호가 일치하지 않습니다.','');
|
||||
}
|
||||
} else {
|
||||
if (getCrypt($pw,$my['d_regis']) != $my['pw'] && $my['tmpcode'] != getCrypt($pw,$my['d_regis'])){
|
||||
getLink('reload','parent.','현재 비밀번호가 일치하지 않습니다.','');
|
||||
}
|
||||
}
|
||||
|
||||
if ($pw == $pw1)
|
||||
{
|
||||
getLink('reload','parent.','현재 비밀번호와 변경할 비밀번호가 같습니다.','');
|
||||
}
|
||||
|
||||
getDbUpdate($table['s_mbrid'],"pw='".password_hash($pw1, PASSWORD_DEFAULT)."'",'uid='.$my['uid']);
|
||||
getDbUpdate($table['s_mbrdata'],"last_pw='".$date['today']."',tmpcode=''",'memberuid='.$my['uid']);
|
||||
|
||||
$_SESSION['mbr_pw'] = password_hash($pw1, PASSWORD_DEFAULT);
|
||||
|
||||
getLink('reload','parent.','비밀번호가 변경되었습니다.','');
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
243
modules/member/action/a.join.php
Normal file
243
modules/member/action/a.join.php
Normal file
@@ -0,0 +1,243 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
$g['memberVarForSite'] = $g['path_var'].'site/'.$r.'/member.var.php';
|
||||
$_tmpvfile = file_exists($g['memberVarForSite']) ? $g['memberVarForSite'] : $g['path_module'].$m.'/var/var.php';
|
||||
include_once $_tmpvfile;
|
||||
|
||||
include $g['dir_module'].'var/noti/_'.$a.'.php'; // 알림메시지 양식
|
||||
|
||||
$id = $id?$id:substr($g['time_split'][1],1,9);
|
||||
$name = trim($name);
|
||||
$nic = trim($nic);
|
||||
$nic = $nic ? $nic : $name;
|
||||
$email = trim($email);
|
||||
$phone = str_replace('-','',$phone);
|
||||
|
||||
if (!$id || !$name) getLink('', '', '정상적인 접속이 아닙니다.', '');
|
||||
|
||||
if(strstr(','.$d['member']['join_cutnic'].',',','.$nic.',')) {
|
||||
getLink('','','사용할 수 없는 이름 입니다.','');
|
||||
}
|
||||
if(getDbRows($table['s_mbrdata'],"nic='".$nic."'")) {
|
||||
$nic = $nic.'_'.date('His'); //닉네임이 중복될 경우 중복되지 않는 임의값 적용
|
||||
}
|
||||
|
||||
if ($snsuid) $pw1 = $id;
|
||||
getDbInsert($table['s_mbrid'],'site,id,pw',"'$s','$id','".password_hash($pw1, PASSWORD_DEFAULT)."'");
|
||||
$memberuid = getDbCnt($table['s_mbrid'],'max(uid)','');
|
||||
$auth = $snsuid ? 1 : $d['member']['join_auth'];
|
||||
$mygroup = $d['member']['join_group'];
|
||||
$level = $d['member']['join_level'];
|
||||
$comp = $d['member']['form_comp'] && $comp ? 1 : 0;
|
||||
$admin = 0;
|
||||
$name = trim($name);
|
||||
$photo = '';
|
||||
$cover = '';
|
||||
$home = $home ? (strstr($home,'http://')?str_replace('http://','',$home):$home) : '';
|
||||
$birth1 = $birth_1;
|
||||
$birth2 = $birth_2.$birth_3;
|
||||
$birthtype = $birthtype ? $birthtype : 0;
|
||||
$tel = $tel_1 && $tel_2 && $tel_3 ? $tel_1 .'-'. $tel_2 .'-'. $tel_3 : '';
|
||||
$location = trim($location);
|
||||
$job = trim($job);
|
||||
$marr1 = $marr_1 && $marr_2 && $marr_3 ? $marr_1 : 0;
|
||||
$marr2 = $marr_1 && $marr_2 && $marr_3 ? $marr_2.$marr_3 : 0;
|
||||
$sms = $event && $phone ? 1 : 0;
|
||||
$mailing = $event && $email ? 1 : 0;
|
||||
$smail = 0;
|
||||
$point = $d['member']['join_point'];
|
||||
$usepoint = 0;
|
||||
$money = 0;
|
||||
$cash = 0;
|
||||
$num_login = 1;
|
||||
$bio = trim($bio);
|
||||
$now_log = $auth == 1?1:0;
|
||||
$last_log = $date['totime'];
|
||||
$last_pw = $snsuid?'':$date['totime'];
|
||||
$is_paper = 0;
|
||||
$d_regis = $date['totime'];
|
||||
$sns = $snsuid?$snsname:'';
|
||||
$addfield = '';
|
||||
|
||||
if ($_photo) {
|
||||
if (strpos($_photo,'facebook'))
|
||||
{
|
||||
$_facebookHeaders = get_headers($_photo, 1);
|
||||
if (array_key_exists('Location', $_facebookHeaders))
|
||||
{
|
||||
$_photo = $_facebookHeaders['Location'];
|
||||
$_photodata = getCURLData($_photo,'');
|
||||
}
|
||||
}
|
||||
else {
|
||||
$_photodata = getCURLData($_photo,'');
|
||||
}
|
||||
|
||||
if ($_photodata)
|
||||
{
|
||||
$fileExt = 'jpg';
|
||||
$fp = fopen($g['path_var'].'avatar/snstmp.jpg','w');
|
||||
fwrite($fp,$_photodata);
|
||||
fclose($fp);
|
||||
|
||||
$photo = $id.'.'.$fileExt;
|
||||
$saveFile1 = $g['path_var'].'avatar/'.$photo;
|
||||
|
||||
include $g['path_core'].'function/thumb.func.php';
|
||||
ResizeWidth($g['path_var'].'avatar/snstmp.jpg',$saveFile1,360);
|
||||
|
||||
@chmod($saveFile1,0707);
|
||||
unlink($g['path_var'].'avatar/snstmp.jpg');
|
||||
}
|
||||
}
|
||||
|
||||
$_addarray = file($g['path_var'].'site/'.$r.'/member.add_field.txt');
|
||||
|
||||
foreach($_addarray as $_key)
|
||||
{
|
||||
$_val = explode('|',trim($_key));
|
||||
if ($_val[2] == 'checkbox')
|
||||
{
|
||||
$addfield .= $_val[0].'^^^';
|
||||
if (is_array(${'add_'.$_val[0]}))
|
||||
{
|
||||
foreach(${'add_'.$_val[0]} as $_skey)
|
||||
{
|
||||
$addfield .= '['.$_skey.']';
|
||||
}
|
||||
}
|
||||
$addfield .= '|||';
|
||||
}
|
||||
else {
|
||||
$addfield .= $_val[0].'^^^'.trim(${'add_'.$_val[0]}).'|||';
|
||||
}
|
||||
}
|
||||
|
||||
$_QKEY = "memberuid,site,auth,mygroup,level,comp,admin,adm_view,";
|
||||
$_QKEY.= "email,email_noti,name,nic,grade,photo,cover,home,sex,birth1,birth2,birthtype,phone,tel,";
|
||||
$_QKEY.= "location,job,marr1,marr2,sms,mailing,smail,point,usepoint,money,cash,num_login,bio,now_log,last_log,last_pw,is_paper,d_regis,tmpcode,sns,addfield";
|
||||
$_QVAL = "'$memberuid','$s','$auth','$mygroup','$level','$comp','$admin','',";
|
||||
$_QVAL.= "'$email','$email','$name','$nic','','$photo','$cover','$home','$sex','$birth1','$birth2','$birthtype','$phone','$tel',";
|
||||
$_QVAL.= "'$location','$job','$marr1','$marr2','$sms','$mailing','$smail','$point','$usepoint','$money','$cash','$num_login','$bio','$now_log','$last_log','$last_pw','$is_paper','$d_regis','','$sns','$addfield'";
|
||||
getDbInsert($table['s_mbrdata'],$_QKEY,$_QVAL);
|
||||
getDbUpdate($table['s_mbrlevel'],'num=num+1','uid='.$level);
|
||||
getDbUpdate($table['s_mbrgroup'],'num=num+1','uid='.$mygroup);
|
||||
getDbUpdate($table['s_numinfo'],'login=login+1,mbrjoin=mbrjoin+1',"date='".$date['today']."' and site=".$s);
|
||||
|
||||
if ($email){
|
||||
|
||||
if ($sns_email) {
|
||||
$d_verified = $d_regis; // 소셜로그인 후 가입시 소셜이디어에서 전달받은 이메일이 있을 경우, 본인인증된 메일로 간주하여 저장
|
||||
} else {
|
||||
$R = getDbData($table['s_guestauth'],"email='".$email."'",'auth,d_regis');
|
||||
$d_verified = $R['auth']?$R['d_regis']:'';
|
||||
}
|
||||
|
||||
getDbInsert($table['s_mbremail'],'mbruid,email,base,backup,d_regis,d_code,d_verified',"'".$memberuid."','".$email."',1,0,'".$d_regis."','','".$d_verified."'");
|
||||
}
|
||||
if ($phone) {
|
||||
$R = getDbData($table['s_guestauth'],"phone='".$phone."'",'auth,d_regis');
|
||||
$d_verified = $R['auth']?$R['d_regis']:'';
|
||||
getDbInsert($table['s_mbrphone'],'mbruid,phone,base,backup,d_regis,d_code,d_verified',"'".$memberuid."','".$phone."',1,0,'".$d_regis."','','".$d_verified."'");
|
||||
}
|
||||
|
||||
if ($snsuid) {
|
||||
getDbInsert($table['s_mbrsns'],'mbruid,sns,id,access_token,refresh_token,expires_in,d_regis',"'".$memberuid."','".$snsname."','$snsuid','$sns_access_token','$sns_refresh_token','$sns_expires_in','$d_regis'");
|
||||
}
|
||||
|
||||
if ($point)
|
||||
{
|
||||
getDbInsert($table['s_point'],'my_mbruid,by_mbruid,price,content,d_regis',"'$memberuid','0','$point','".$d['member']['join_pointmsg']."','$d_regis'");
|
||||
}
|
||||
|
||||
if ($auth == 1)
|
||||
{
|
||||
$email_from = $d['member']['join_email']?$d['member']['join_email']:$d['admin']['sysmail'];
|
||||
$sms_tel = $d['member']['join_tel']?$d['member']['join_tel']:$d['admin']['sms_tel'];
|
||||
|
||||
if ($d['member']['join_email_send'] && $email_from) {
|
||||
include_once $g['path_core'].'function/email.func.php';
|
||||
$content = implode('',file($g['path_module'].'/admin/var/email.header.txt')); //이메일 헤더 양식
|
||||
$content .= implode('',file($g['dir_module'].'doc/email/_join.complete.txt'));
|
||||
$content.= '<p><a href="'.$g['url_root'].'" style="display:block;font-size:15px;color:#fff;text-decoration:none;padding: 15px;background:#007bff;width: 200px;text-align: center;margin: 38px auto;" target="_blank">접속하기</a></p>';
|
||||
$content.= implode('',file($g['path_module'].'/admin/var/email.footer.txt')); // //이메일 풋터 양식
|
||||
$content = str_replace('{EMAIL_MAIN}',$email_from,$content); //대표 이메일
|
||||
$content = str_replace('{TEL_MAIN}',$sms_tel,$content); // 대표 전화
|
||||
$content = str_replace('{SITE}',$_HS['name'],$content); //사이트명
|
||||
$content = str_replace('{NAME}',$name,$content);
|
||||
$content = str_replace('{NICK}',$nic,$content);
|
||||
$content = str_replace('{ID}',$id,$content);
|
||||
$content = str_replace('{PHONE}',$phone,$content);
|
||||
$content = str_replace('{EMAIL}',$email,$content);
|
||||
$content = str_replace('{DATE}',getDateFormat($d_regis,'Y.m.d H:i'),$content);
|
||||
getSendMail($email.'|'.$name,$email_from.'|'.$_HS['name'], '['.$_HS['name'].']회원가입을 축하드립니다.', $content, 'HTML');
|
||||
}
|
||||
|
||||
if ($d['member']['join_sms_send'] && $sms_tel) {
|
||||
include_once $g['path_core'].'function/sms.func.php';
|
||||
$content = implode('',file($g['dir_module'].'doc/sms/_join.complete.txt')); // SMS메시지 양식
|
||||
$content = str_replace('{SITE}',$_HS['name'],$content); //사이트명
|
||||
$content = str_replace('{NAME}',$name,$content);
|
||||
$content = str_replace('{PHONE}',$phone,$content);
|
||||
getSendSMS($phone,$sms_tel,'',$content,'sms');
|
||||
}
|
||||
|
||||
// 가입자에게 알림전송
|
||||
$noti_title = $d['member']['noti_title'];
|
||||
$noti_body = $d['member']['noti_body'];
|
||||
$noti_referer = $g['url_http'].'/?r='.$r.'&mod=settings&page=noti';
|
||||
$noti_button = $d['member']['noti_button'];
|
||||
$noti_tag = '';
|
||||
$noti_skipEmail = 1;
|
||||
$noti_skipPush = 1;
|
||||
putNotice($memberuid,$m,0,$noti_title,$noti_body,$noti_referer,$noti_button,$noti_tag,$noti_skipEmail,$noti_skipPush);
|
||||
|
||||
$_SESSION['mbr_uid'] = $memberuid;
|
||||
$_SESSION['mbr_pw'] = password_hash($pw1, PASSWORD_DEFAULT);
|
||||
setrawcookie('site_common_result', rawurlencode($name.'님 로그인 되셨습니다.|default'));
|
||||
getLink($modal?'reload':RW(0),'parent.','축하합니다. 회원가입 승인되었습니다.','');
|
||||
}
|
||||
if ($auth == 2)
|
||||
{
|
||||
getLink(RW(0),'parent.','회원가입 신청서가 접수되었습니다. 관리자 승인후 이용하실 수 있습니다.','');
|
||||
}
|
||||
if ($auth == 3)
|
||||
{
|
||||
$email_from = $d['member']['join_email']?$d['member']['join_email']:$d['admin']['sysmail'];
|
||||
$sms_tel = $d['member']['join_tel']?$d['member']['join_tel']:$d['admin']['sms_tel'];
|
||||
$verify_code = date('His');
|
||||
|
||||
getDbUpdate($table['s_mbrdata'],'tmpcode='.$verify_code,'memberuid='.$memberuid);
|
||||
|
||||
if ($d['member']['join_email_send'] && $email_from) {
|
||||
include_once $g['path_core'].'function/email.func.php';
|
||||
$content = implode('',file($g['path_module'].'/admin/var/email.header.txt')); //이메일 헤더 양식
|
||||
$content .= implode('',file($g['dir_module'].'doc/email/_join.auth.txt'));
|
||||
$content.= '<p><a href="'.$g['url_root'].'/?r='.$r.'&m=member&a=email_auth&tmpuid='.$memberuid.'&tmpcode='.$verify_code.'" style="display:block;font-size:15px;color:#fff;text-decoration:none;padding: 15px;background:#007bff;width: 200px;text-align: center;margin: 38px auto;" target="_blank">회원가입 계속하기</a></p>';
|
||||
$content.= implode('',file($g['path_module'].'/admin/var/email.footer.txt')); // //이메일 풋터 양식
|
||||
$content = str_replace('{EMAIL_MAIN}',$email_from,$content); //대표 이메일
|
||||
$content = str_replace('{TEL_MAIN}',$sms_tel,$content); // 대표 전화
|
||||
$content = str_replace('{SITE}',$_HS['name'],$content); //사이트명
|
||||
$content = str_replace('{NAME}',$name,$content);
|
||||
$content = str_replace('{NICK}',$nic,$content);
|
||||
$content = str_replace('{CODE}',$verify_code,$content);
|
||||
$content = str_replace('{ID}',$id,$content);
|
||||
$content = str_replace('{PHONE}',$phone,$content);
|
||||
$content = str_replace('{EMAIL}',$email,$content);
|
||||
$content = str_replace('{DATE}',getDateFormat($d_regis,'Y.m.d H:i'),$content);
|
||||
getSendMail($email.'|'.$name,$email_from.'|'.$_HS['name'], '['.$_HS['name'].'] 회원가입을 위한 본인인증 요청', $content, 'HTML');
|
||||
}
|
||||
|
||||
if ($d['member']['join_sms_send'] && $sms_tel) {
|
||||
include_once $g['path_core'].'function/sms.func.php';
|
||||
$content = implode('',file($g['dir_module'].'doc/sms/_join.auth.txt')); // SMS메시지 양식
|
||||
$content = str_replace('{SITE}',$_HS['name'],$content); //사이트명
|
||||
$content = str_replace('{NAME}',$name,$content);
|
||||
$content = str_replace('{PHONE}',$phone,$content);
|
||||
getSendSMS($phone,$sms_tel,'',$content,'sms');
|
||||
}
|
||||
|
||||
getLink($modal?'reload':RW(0),'parent.','회원가입 인증메일이 발송되었습니다. 이메일('.$email.')확인 후 인증해 주세요.','');
|
||||
}
|
||||
?>
|
||||
301
modules/member/action/a.join_guestAuth.php
Normal file
301
modules/member/action/a.join_guestAuth.php
Normal file
@@ -0,0 +1,301 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
$g['memberVarForSite'] = $g['path_var'].'site/'.$r.'/member.var.php';
|
||||
$_tmpvfile = file_exists($g['memberVarForSite']) ? $g['memberVarForSite'] : $g['path_module'].$module.'/var/var.php';
|
||||
include_once $_tmpvfile;
|
||||
|
||||
$_SESSION['JOIN'] = array();
|
||||
|
||||
// 인증코드 발송
|
||||
if ($act=='send_code') {
|
||||
|
||||
if (!$type || !$target) {
|
||||
getLink('','','정상적인 접근이 아닙니다.','');
|
||||
}
|
||||
|
||||
$verify_code = date('His');
|
||||
$verify_token=genAccessToken(80);
|
||||
$d_regis = $date['totime'];
|
||||
$ip = $_SERVER['REMOTE_ADDR'];
|
||||
$today = substr($date['today'],0,8);
|
||||
$num_code=getDbRows($table['s_guestauth'],"ip='".$ip."' and left(d_regis,8)=".$today); // 코드 발급수
|
||||
|
||||
//인증번호 이메일 발송
|
||||
if ($type=='email') {
|
||||
|
||||
$email_from = $d['member']['join_email']?$d['member']['join_email']:$d['admin']['sysmail'];
|
||||
|
||||
// 가입제한 이메일
|
||||
if (strstr(','.$d['member']['join_cutemail'].',',','.$target.',')) {
|
||||
echo '<script type="text/javascript">';
|
||||
echo 'parent.$("[name=email]").addClass("is-invalid").focus();';
|
||||
echo 'parent.$("[data-role=emailErrorBlock]").text("가입이 제한된 이메일 입니다.");';
|
||||
if ($device=='mobile') echo 'parent.$("#page-join-form").loader("hide");'; //모바일 전용 로더 숨기기
|
||||
echo 'parent.$("#pane-email").find("[data-act=send_code]").prop("disabled",false);'; //데스크탑 전용
|
||||
echo '</script>';
|
||||
exit();
|
||||
}
|
||||
|
||||
// 이메일 중복여부 검사
|
||||
$isEmail = getDbRows($table['s_mbremail'],"email='".$target."'");
|
||||
|
||||
if ($isEmail) {
|
||||
echo '<script type="text/javascript">';
|
||||
echo 'parent.$("[name=email]").addClass("is-invalid").focus();';
|
||||
echo 'parent.$("[data-role=emailErrorBlock]").text("이미 등록된 이메일 입니다.");';
|
||||
echo 'parent.$("#pane-email").find("[data-act=send_code]").prop("disabled",false);'; //데스크탑 전용
|
||||
if ($device=='mobile') echo 'parent.$("#page-join-form").loader("hide");'; //모바일 전용 로더 숨기기
|
||||
echo '</script>';
|
||||
exit();
|
||||
}
|
||||
|
||||
//본인확인 미설정시 가입화면으로 이동
|
||||
if (!$d['member']['join_verify']) {
|
||||
$_SESSION['JOIN']['email'] = $target; // 이메일 세션저장
|
||||
setrawcookie('site_common_result', rawurlencode('가입정보를 입력해 주세요|success')); // 알림처리를 위한 로그인 상태 cookie 저장
|
||||
getLink('reload','parent.','','');
|
||||
}
|
||||
|
||||
if (!$email_from) {
|
||||
getLink('','','죄송합니다. 발신 이메일 주소가 등록되지 않았습니다. 관리자에게 문의해 주세요.','');
|
||||
}
|
||||
|
||||
//이메일 인증코드 발송횟수 제한 5회
|
||||
if ($num_code>4) {
|
||||
if ($device=='mobile') {
|
||||
echo '<script type="text/javascript">';
|
||||
echo 'parent.$("#page-join-code").page({ start: "#page-join-form" });'; // 코드입력 액션페이지 호출
|
||||
echo 'parent.$("#page-join-code").find("[data-role=emailCodeBlock]").text("이미 이메일로 발송된 인증번호를 참고해 주세요.");';
|
||||
echo 'parent.$("#page-join-code").find("[data-role=confirm_email_code]").addClass("is-invalid");';
|
||||
echo 'parent.$("#page-join-form").loader("hide");'; //로더 숨기기
|
||||
echo 'parent.$("#page-join-code").find("[type=number]").focus();'; //코드입력폼 포커스
|
||||
echo '</script>';
|
||||
exit();
|
||||
} else {
|
||||
echo '<script type="text/javascript">';
|
||||
echo 'parent.$("#pane-email").find("[data-act=send_code]").prop("disabled",false);';
|
||||
echo 'parent.$("#pane-email").find("[data-role=emailCodeBlock]").text("이미 이메일로 발송된 인증번호를 참고해 주세요.");';
|
||||
echo 'parent.$("#pane-email").find("[data-role=confirm_email_code]").addClass("is-invalid");';
|
||||
echo 'parent.$("[data-role=verify_'.$type.'_area]").removeClass("d-none");';
|
||||
echo 'parent.$("[data-role=confirm_'.$type.'_code]").focus();';
|
||||
echo 'parent.$("[data-role=verify_'.$type.'_area]").find("[data-role=countdown]").text("");';
|
||||
echo 'parent.$("[data-role=verify_'.$type.'_area]").find("[data-role=countdown]").attr("data-'.$type.'-countdown","'.$countdown.'");';
|
||||
echo 'parent.doCountdown("'.$type.'");'; //인증시간 카운트 다운
|
||||
echo 'parent.$("[data-act=send_code]").prop("disabled",false);';
|
||||
echo 'parent.$("[data-act=send_code] .not-loading").text("재발송");';
|
||||
echo '</script>';
|
||||
exit();
|
||||
}
|
||||
}
|
||||
|
||||
include_once $g['path_core'].'function/email.func.php';
|
||||
|
||||
$content = implode('',file($g['path_module'].'/admin/var/email.header.txt')); //이메일 헤더 양식
|
||||
$content.= implode('',file($g['dir_module'].'doc/email/_join.auth.txt')); //이메일 본문 양식
|
||||
$content.= '<p><a href="'.$g['url_root'].'/'.$r.'/auth/join?token='.$verify_token.'" style="display:block;font-size:15px;color:#fff;text-decoration:none;padding: 15px;background:#007bff;width: 200px;text-align: center;margin: 38px auto;" target="_blank">회원가입 계속하기</a></p>';
|
||||
$content.= implode('',file($g['path_module'].'/admin/var/email.footer.txt')); // //이메일 풋터 양식
|
||||
$content = str_replace('{EMAIL_MAIN}',$email_from,$content); //대표 이메일
|
||||
$content = str_replace('{TEL_MAIN}',$sms_tel,$content); // 대표 전화
|
||||
$content = str_replace('{SITE}',$_HS['name'],$content); //사이트명
|
||||
$content = str_replace('{EMAIL}',$target,$content); //계정 이메일
|
||||
$content = str_replace('{CODE}',$verify_code,$content); //인증번호
|
||||
$content = str_replace('{TIME}',$d['member']['settings_keyexpire'],$content); //인증제한시간
|
||||
|
||||
$result = getSendMail($target,$email_from.'|'.$_HS['name'], '['.$_HS['name'].'] 가입 인증번호', $content, 'HTML');
|
||||
|
||||
if (!$result) {
|
||||
getLink('reload','parent.','죄송합니다. 이메일서버가 응답하지 않아 이메일을 보내드리지 못했습니다.','');
|
||||
}
|
||||
|
||||
$_QKEY = "auth,email,phone,token,code,d_regis,ip";
|
||||
$_QVAL = "0,'$target','','$verify_token','$verify_code','$d_regis','$ip'";
|
||||
}
|
||||
|
||||
|
||||
if ($type=='phone') {
|
||||
|
||||
$sms_tel = $d['member']['join_tel']?$d['member']['join_tel']:$d['admin']['sms_tel'];
|
||||
|
||||
// 가입제한 휴대폰
|
||||
$_target = str_replace('-','', $target);
|
||||
if (strstr(','.$d['member']['join_cutphone'].',',','.$_target.',')) {
|
||||
echo '<script type="text/javascript">';
|
||||
echo 'parent.$("[name=phone]").addClass("is-invalid").focus();';
|
||||
echo 'parent.$("[data-role=phoneErrorBlock]").text("가입이 제한된 휴대폰 입니다.");';
|
||||
if ($device=='mobile') echo 'parent.$("#page-join-form").loader("hide");'; //모바일 전용 로더 숨기기
|
||||
echo 'parent.$("#pane-phone").find("[data-act=send_code]").prop("disabled",false);';
|
||||
echo '</script>';
|
||||
exit();
|
||||
}
|
||||
|
||||
// 휴대폰 중복여부 검사
|
||||
$isPhone = getDbRows($table['s_mbrphone'],"phone='".$target."'");
|
||||
|
||||
if ($isPhone) {
|
||||
echo '<script type="text/javascript">';
|
||||
echo 'parent.$("[name=phone]").addClass("is-invalid").focus();';
|
||||
echo 'parent.$("[data-role=phoneErrorBlock]").text("이미 등록된 휴대폰 입니다.");';
|
||||
if ($device=='mobile') echo 'parent.$("#page-join-form").loader("hide");'; //모바일 전용 로더 숨기기
|
||||
echo 'parent.$("#pane-phone").find("[data-act=send_code]").prop("disabled",false);'; //데스크탑 전용
|
||||
echo '</script>';
|
||||
exit();
|
||||
}
|
||||
|
||||
//본인확인 미설정시 가입화면으로 이동
|
||||
if (!$d['member']['join_verify']) {
|
||||
$_SESSION['JOIN']['phone'] = $target; // 휴대폰 세션저장
|
||||
setrawcookie('site_common_result', rawurlencode('가입정보를 입력해 주세요|success')); // 알림처리를 위한 로그인 상태 cookie 저장
|
||||
getLink('reload','parent.','','');
|
||||
}
|
||||
|
||||
if (!$sms_tel) {
|
||||
getLink('','','죄송합니다. SMS발신 전화번호가 등록되지 않았습니다. 관리자에게 문의해 주세요.','');
|
||||
}
|
||||
|
||||
//본인확인 SMS 일발송 제한- 회원모듈 > 환경설정 > 회원가입설정 참조
|
||||
if ($num_code>$d['member']['join_daysms']-1) {
|
||||
if ($device=='mobile') {
|
||||
echo '<script type="text/javascript">';
|
||||
echo 'parent.$("#page-join-code").page({ start: "#page-join-form" });'; // 코드입력 액션페이지 호출
|
||||
echo 'parent.$("#page-join-code").find("[data-role=phoneCodeBlock]").text("이미 휴대폰으로 발송된 인증번호를 참고해 주세요.");';
|
||||
echo 'parent.$("#page-join-code").find("[data-role=confirm_phone_code]").addClass("is-invalid");';
|
||||
echo 'parent.$("#page-join-form").loader("hide");'; //로더 숨기기
|
||||
echo 'parent.$("#page-join-code").find("[type=number]").focus();'; //코드입력폼 포커스
|
||||
echo '</script>';
|
||||
exit();
|
||||
} else {
|
||||
echo '<script type="text/javascript">';
|
||||
echo 'parent.$("#pane-phone").find("[data-act=send_code]").prop("disabled",true);';
|
||||
echo 'parent.$("#pane-phone").find("[data-role=phoneCodeBlock]").text("이미 휴대폰으로 발송된 인증번호를 참고해 주세요.");';
|
||||
echo 'parent.$("#pane-phone").find("[data-role=confirm_phone_code]").addClass("is-invalid");';
|
||||
echo 'parent.$("[data-role=verify_'.$type.'_area]").removeClass("d-none");';
|
||||
echo 'parent.$("[data-role=confirm_'.$type.'_code]").focus();';
|
||||
echo 'parent.$("[data-role=verify_'.$type.'_area]").find("[data-role=countdown]").text("");';
|
||||
echo 'parent.$("[data-role=verify_'.$type.'_area]").find("[data-role=countdown]").attr("data-'.$type.'-countdown","'.$countdown.'");';
|
||||
echo 'parent.doCountdown("'.$type.'");'; //인증시간 카운트 다운
|
||||
echo 'parent.$("[data-act=send_code]").prop("disabled",false);';
|
||||
echo 'parent.$("[data-act=send_code] .not-loading").text("재발송");';
|
||||
echo '</script>';
|
||||
exit();
|
||||
}
|
||||
}
|
||||
|
||||
include_once $g['path_core'].'function/sms.func.php';
|
||||
$content = implode('',file($g['dir_module'].'doc/sms/_join.auth.txt')); // SMS메시지 양식
|
||||
$content = str_replace('{SITE}',$_HS['name'],$content); //사이트명
|
||||
$content = str_replace('{PHONE}',$target,$content); //계정 휴대폰
|
||||
$content = str_replace('{CODE}',$verify_code,$content); //인증번호
|
||||
$content = str_replace('{TIME}',$d['member']['settings_keyexpire'],$content); //인증제한시간
|
||||
|
||||
$result = getSendSMS($target,$sms_tel,'',$content,'sms');
|
||||
|
||||
if ($result != 'OK') {
|
||||
getLink('reload','parent.',$result,'');
|
||||
}
|
||||
|
||||
$_QKEY = "auth,email,phone,token,code,d_regis,ip";
|
||||
$_QVAL = "0,'','$target','$verify_token','$verify_code','$d_regis','$ip'";
|
||||
}
|
||||
|
||||
// 신규 인증코드 저장
|
||||
getDbInsert($table['s_guestauth'],$_QKEY,$_QVAL);
|
||||
$lastuid = getDbCnt($table['s_guestauth'],'max(uid)','');
|
||||
$R = getUidData($table['s_guestauth'],$lastuid);
|
||||
|
||||
//인증 제한시간
|
||||
$countdown = date("Y/m/d H:i:s",strtotime ("+".$d['member']['join_keyexpire']." minutes",strtotime($R['d_regis']))) ;
|
||||
|
||||
if ($device=='mobile') {
|
||||
echo '<script type="text/javascript">';
|
||||
echo 'parent.$("#page-join-code").page({ start: "#page-join-form" });'; // 코드입력 액션페이지 호출
|
||||
// echo 'setTimeout(function() {parent.$.notify({message: "인증번호가 발송되었습니다."},{type: "default"});}, 700);'; // 알림메시지 출력
|
||||
echo 'parent.$("#page-join-form").loader("hide");'; //로더 숨기기
|
||||
echo 'parent.$("#page-join-code").find("[type=number]").focus();'; //코드입력폼 포커스
|
||||
echo 'parent.$("#page-join-code").find("[data-act=confirm_code]").attr("data-type","'.$type.'");';
|
||||
echo 'parent.$("#page-join-code").find("[type=number]").attr("data-role","confirm_'.$type.'_code").attr("name","confirm_'.$type.'_code");';
|
||||
echo 'parent.$("#page-join-code").find(".invalid-tooltip").attr("data-role","'.$type.'CodeBlock");';
|
||||
echo 'parent.$("#page-join-code").find("[data-role=countdown]").text("");';
|
||||
echo 'parent.$("#page-join-code").find("[data-role=countdown]").attr("data-'.$type.'-countdown","'.$countdown.'");';
|
||||
echo 'parent.doCountdown("'.$type.'");'; //인증시간 카운트 다운
|
||||
echo '</script>';
|
||||
} else {
|
||||
echo '<script type="text/javascript">';
|
||||
echo 'parent.$.notify({message: "인증번호가 발송되었습니다."},{type: "success"});';
|
||||
echo 'parent.$("[data-role=verify_'.$type.'_area]").removeClass("d-none");';
|
||||
echo 'parent.$("[data-role=confirm_'.$type.'_code]").focus();';
|
||||
echo 'parent.$("[data-role=verify_'.$type.'_area]").find("[data-role=countdown]").text("");';
|
||||
echo 'parent.$("[data-role=verify_'.$type.'_area]").find("[data-role=countdown]").attr("data-'.$type.'-countdown","'.$countdown.'");';
|
||||
echo 'parent.doCountdown("'.$type.'");'; //인증시간 카운트 다운
|
||||
echo 'parent.$("[data-act=send_code]").prop("disabled",false);';
|
||||
echo 'parent.$("[data-act=send_code] .not-loading").text("재발송");';
|
||||
echo '</script>';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// 인증코드 확인
|
||||
if ($act=='confirm_code') {
|
||||
|
||||
if (!$type || !$code) {
|
||||
getLink('','','정상적인 접근이 아닙니다.','');
|
||||
}
|
||||
|
||||
$R = getDbData($table['s_guestauth'],"code='".$code."'",'*');
|
||||
|
||||
if ($type=='email') {
|
||||
|
||||
// 코드 검사
|
||||
if ($code != $R['code']) {
|
||||
if ($device=='mobile') {
|
||||
echo '<script type="text/javascript">';
|
||||
echo 'parent.$("#page-join-code").loader("hide");'; //로더 숨기기
|
||||
echo 'parent.$("[name=confirm_email_code]").addClass("is-invalid").focus();';
|
||||
echo 'parent.$("[data-role=emailCodeBlock]").text("인증번호를 확인해 주세요");';
|
||||
echo '</script>';
|
||||
exit();
|
||||
} else {
|
||||
echo '<script type="text/javascript">';
|
||||
echo 'parent.$("[name=confirm_email_code]").addClass("is-invalid").focus();';
|
||||
echo 'parent.$("[data-role=emailCodeBlock]").text("인증번호를 확인해 주세요");';
|
||||
echo 'parent.$("#pane-email").find("[data-act=confirm_code]").prop("disabled",false);';
|
||||
echo '</script>';
|
||||
exit();
|
||||
}
|
||||
}
|
||||
|
||||
$_SESSION['JOIN']['email'] = $R['email']; // 이메일 세션저장
|
||||
|
||||
}
|
||||
|
||||
if ($type=='phone') {
|
||||
|
||||
// 코드 검사
|
||||
if ($code != $R['code']) {
|
||||
if ($device=='mobile') {
|
||||
echo '<script type="text/javascript">';
|
||||
echo 'parent.$("#page-join-code").loader("hide");'; //로더 숨기기
|
||||
echo 'parent.$("[name=confirm_phone_code]").addClass("is-invalid").focus();';
|
||||
echo 'parent.$("[data-role=phoneCodeBlock]").text("인증번호를 확인해 주세요");';
|
||||
echo '</script>';
|
||||
exit();
|
||||
} else {
|
||||
echo '<script type="text/javascript">';
|
||||
echo 'parent.$("[name=confirm_phone_code]").addClass("is-invalid").focus();';
|
||||
echo 'parent.$("[data-role=phoneCodeBlock]").text("인증번호를 확인해 주세요");';
|
||||
echo 'parent.$("#pane-phone").find("[data-act=confirm_code]").prop("disabled",false);';
|
||||
echo '</script>';
|
||||
exit();
|
||||
}
|
||||
}
|
||||
$_SESSION['JOIN']['phone'] = $R['phone']; // 휴대폰 세션저장
|
||||
}
|
||||
|
||||
getDbUpdate($table['s_guestauth'],'auth=1','code='.$R['code']); // 인증완료상태 처리
|
||||
setrawcookie('site_common_result', rawurlencode('인증번호가 확인 되었습니다.|success')); // 알림처리를 위한 로그인 상태 cookie 저장
|
||||
getLink('reload','parent.','','');
|
||||
}
|
||||
|
||||
exit();
|
||||
|
||||
?>
|
||||
18
modules/member/action/a.level_regis.php
Normal file
18
modules/member/action/a.level_regis.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
checkAdmin(0);
|
||||
|
||||
for ($i = 1; $i < 101; $i++)
|
||||
{
|
||||
$name = ${'name_'.$i};
|
||||
$login = ${'login_'.$i};
|
||||
$post = ${'post_'.$i};
|
||||
$comment = ${'comment_'.$i};
|
||||
getDbUpdate($table['s_mbrlevel'],"gid=0,name='$name',login='$login',post='$post',comment='$comment'",'uid='.$i);
|
||||
}
|
||||
getDbUpdate($table['s_mbrlevel'],'gid=1','uid='.$num);
|
||||
|
||||
setrawcookie('member_group_result', rawurlencode('레벨 설정이 변경 되었습니다.|success')); // 처리여부 cookie 저장
|
||||
getLink('reload','parent.','','');
|
||||
?>
|
||||
19
modules/member/action/a.maildoc_load.php
Normal file
19
modules/member/action/a.maildoc_load.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
checkAdmin(0);
|
||||
|
||||
?>
|
||||
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
|
||||
<textarea id="maildocDiv"><?php echo htmlspecialchars(implode('',file($g['dir_module'].'doc/'.$type.'.txt')))?></textarea>
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
function insertMaildoc()
|
||||
{
|
||||
parent.document.getElementById('editFrameContent').value = document.getElementById('maildocDiv').value;
|
||||
parent.frames.editFrame.location.reload();
|
||||
}
|
||||
window.onload = insertMaildoc;
|
||||
//]]>
|
||||
</script>
|
||||
<?php exit?>
|
||||
172
modules/member/action/a.member_config.php
Normal file
172
modules/member/action/a.member_config.php
Normal file
@@ -0,0 +1,172 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
checkAdmin(0);
|
||||
|
||||
$_tmpvfile = $g['path_var'].'site/'.$r.'/'.$m.'.var.php';
|
||||
|
||||
$fp = fopen($_tmpvfile,'w');
|
||||
fwrite($fp, "<?php\n");
|
||||
|
||||
//기초환경 설정
|
||||
fwrite($fp, "\$d['member']['theme_main'] = \"".$theme_main."\";\n");
|
||||
fwrite($fp, "\$d['member']['theme_mobile'] = \"".$theme_mobile."\";\n");
|
||||
fwrite($fp, "\$d['member']['sosokmenu_join'] = \"".$sosokmenu_join."\";\n");
|
||||
fwrite($fp, "\$d['member']['sosokmenu_login'] = \"".$sosokmenu_login."\";\n");
|
||||
fwrite($fp, "\$d['member']['sosokmenu_profile'] = \"".$sosokmenu_profile."\";\n");
|
||||
fwrite($fp, "\$d['member']['sosokmenu_settings'] = \"".$sosokmenu_settings."\";\n");
|
||||
fwrite($fp, "\$d['member']['sosokmenu_saved'] = \"".$sosokmenu_saved."\";\n");
|
||||
fwrite($fp, "\$d['member']['sosokmenu_noti'] = \"".$sosokmenu_noti."\";\n");
|
||||
|
||||
//로그인
|
||||
fwrite($fp, "\$d['member']['login_emailid'] = \"".$login_emailid."\";\n");
|
||||
fwrite($fp, "\$d['member']['login_social'] = \"".$login_social."\";\n");
|
||||
fwrite($fp, "\$d['member']['login_expire'] = \"".$login_expire."\";\n");
|
||||
fwrite($fp, "\$d['member']['login_cookie'] = \"".$login_cookie."\";\n");
|
||||
fwrite($fp, "\$d['member']['login_ssl'] = \"".$login_ssl."\";\n");
|
||||
|
||||
//회원가입
|
||||
fwrite($fp, "\$d['member']['join_enable'] = \"".$join_enable."\";\n");
|
||||
fwrite($fp, "\$d['member']['join_byEmail'] = \"".$join_byEmail."\";\n");
|
||||
fwrite($fp, "\$d['member']['join_byPhone'] = \"".$join_byPhone."\";\n");
|
||||
fwrite($fp, "\$d['member']['join_bySocial'] = \"".$join_bySocial."\";\n");
|
||||
fwrite($fp, "\$d['member']['join_auth'] = \"".$join_auth."\";\n");
|
||||
fwrite($fp, "\$d['member']['join_out'] = \"".$join_out."\";\n");
|
||||
fwrite($fp, "\$d['member']['join_rejoin'] = \"".$join_rejoin."\";\n");
|
||||
fwrite($fp, "\$d['member']['join_auth'] = \"".$join_auth."\";\n");
|
||||
fwrite($fp, "\$d['member']['join_level'] = \"".$join_level."\";\n");
|
||||
fwrite($fp, "\$d['member']['join_group'] = \"".$join_group."\";\n");
|
||||
fwrite($fp, "\$d['member']['join_point'] = \"".$join_point."\";\n");
|
||||
fwrite($fp, "\$d['member']['join_pointmsg'] = \"".$join_pointmsg."\";\n");
|
||||
fwrite($fp, "\$d['member']['join_cutid'] = \"".$join_cutid."\";\n");
|
||||
fwrite($fp, "\$d['member']['join_cutnic'] = \"".$join_cutnic."\";\n");
|
||||
fwrite($fp, "\$d['member']['join_cutemail'] = \"".$join_cutemail."\";\n");
|
||||
fwrite($fp, "\$d['member']['join_cutphone'] = \"".$join_cutphone."\";\n");
|
||||
fwrite($fp, "\$d['member']['join_email'] = \"".$join_email."\";\n");
|
||||
fwrite($fp, "\$d['member']['join_tel'] = \"".$join_tel."\";\n");
|
||||
fwrite($fp, "\$d['member']['join_email_send'] = \"".$join_email_send."\";\n");
|
||||
fwrite($fp, "\$d['member']['join_noti_send'] = \"".$join_noti_send."\";\n");
|
||||
fwrite($fp, "\$d['member']['join_keyexpire'] = \"".$join_keyexpire."\";\n");
|
||||
fwrite($fp, "\$d['member']['join_daysms'] = \"".$join_daysms."\";\n");
|
||||
fwrite($fp, "\$d['member']['join_joint_privacy'] = \"".$join_joint_privacy."\";\n");
|
||||
fwrite($fp, "\$d['member']['join_joint_policy'] = \"".$join_joint_policy."\";\n");
|
||||
|
||||
//회원가입 입력양식
|
||||
fwrite($fp, "\$d['member']['form_join_avatar'] = \"".$form_join_avatar."\";\n");
|
||||
fwrite($fp, "\$d['member']['form_join_bio'] = \"".$form_join_bio."\";\n");
|
||||
fwrite($fp, "\$d['member']['form_join_home'] = \"".$form_join_home."\";\n");
|
||||
fwrite($fp, "\$d['member']['form_join_phone'] = \"".$form_join_phone."\";\n");
|
||||
fwrite($fp, "\$d['member']['form_join_tel'] = \"".$form_join_tel."\";\n");
|
||||
fwrite($fp, "\$d['member']['form_join_location'] = \"".$form_join_location."\";\n");
|
||||
fwrite($fp, "\$d['member']['form_join_job'] = \"".$form_join_job."\";\n");
|
||||
fwrite($fp, "\$d['member']['form_join_marr'] = \"".$form_join_marr."\";\n");
|
||||
fwrite($fp, "\$d['member']['form_join_add'] = \"".$form_join_add."\";\n");
|
||||
fwrite($fp, "\$d['member']['form_join_avatar_required'] = \"".$form_join_avatar_required."\";\n");
|
||||
fwrite($fp, "\$d['member']['form_join_bio_required'] = \"".$form_join_bio_required."\";\n");
|
||||
fwrite($fp, "\$d['member']['form_join_home_required'] = \"".$form_join_home_required."\";\n");
|
||||
fwrite($fp, "\$d['member']['form_join_phone_required'] = \"".$form_join_phone_required."\";\n");
|
||||
fwrite($fp, "\$d['member']['form_join_tel_required'] = \"".$form_join_tel_required."\";\n");
|
||||
fwrite($fp, "\$d['member']['form_join_location_required'] = \"".$form_join_location_required."\";\n");
|
||||
fwrite($fp, "\$d['member']['form_join_job_required'] = \"".$form_join_job_required."\";\n");
|
||||
fwrite($fp, "\$d['member']['form_join_marr_required'] = \"".$form_join_marr_required."\";\n");
|
||||
fwrite($fp, "\$d['member']['form_join_nic'] = \"".$form_join_nic."\";\n");
|
||||
fwrite($fp, "\$d['member']['form_join_nic_required'] = \"".$form_join_nic_required."\";\n");
|
||||
fwrite($fp, "\$d['member']['form_join_birth'] = \"".$form_join_birth."\";\n");
|
||||
fwrite($fp, "\$d['member']['form_join_birth_required'] = \"".$form_join_birth_required."\";\n");
|
||||
fwrite($fp, "\$d['member']['form_join_sex'] = \"".$form_join_sex."\";\n");
|
||||
fwrite($fp, "\$d['member']['form_join_sex_required'] = \"".$form_join_sex_required."\";\n");
|
||||
fwrite($fp, "\$d['member']['form_join_add_required'] = \"".$form_join_add_required."\";\n");
|
||||
|
||||
//개인정보설정 입력양식
|
||||
fwrite($fp, "\$d['member']['form_settings_nic'] = \"".$form_settings_nic."\";\n");
|
||||
fwrite($fp, "\$d['member']['form_settings_email_profile'] = \"".$form_settings_email_profile."\";\n");
|
||||
fwrite($fp, "\$d['member']['form_settings_birth'] = \"".$form_settings_birth."\";\n");
|
||||
fwrite($fp, "\$d['member']['form_settings_sex'] = \"".$form_settings_sex."\";\n");
|
||||
fwrite($fp, "\$d['member']['form_settings_avatar'] = \"".$form_settings_avatar."\";\n");
|
||||
fwrite($fp, "\$d['member']['form_settings_bio'] = \"".$form_settings_bio."\";\n");
|
||||
fwrite($fp, "\$d['member']['form_settings_home'] = \"".$form_settings_home."\";\n");
|
||||
fwrite($fp, "\$d['member']['form_settings_phone'] = \"".$form_settings_phone."\";\n");
|
||||
fwrite($fp, "\$d['member']['form_settings_tel'] = \"".$form_settings_tel."\";\n");
|
||||
fwrite($fp, "\$d['member']['form_settings_location'] = \"".$form_settings_location."\";\n");
|
||||
fwrite($fp, "\$d['member']['form_settings_job'] = \"".$form_settings_job."\";\n");
|
||||
fwrite($fp, "\$d['member']['form_settings_marr'] = \"".$form_settings_marr."\";\n");
|
||||
fwrite($fp, "\$d['member']['form_settings_add'] = \"".$form_settings_add."\";\n");
|
||||
fwrite($fp, "\$d['member']['form_settings_nic_required'] = \"".$form_settings_nic_required."\";\n");
|
||||
fwrite($fp, "\$d['member']['form_settings_email_profile_required'] = \"".$form_settings_email_profile_required."\";\n");
|
||||
fwrite($fp, "\$d['member']['form_settings_birth_required'] = \"".$form_settings_birth_required."\";\n");
|
||||
fwrite($fp, "\$d['member']['form_settings_sex_required'] = \"".$form_settings_sex_required."\";\n");
|
||||
fwrite($fp, "\$d['member']['form_settings_avatar_required'] = \"".$form_settings_avatar_required."\";\n");
|
||||
fwrite($fp, "\$d['member']['form_settings_bio_required'] = \"".$form_settings_bio_required."\";\n");
|
||||
fwrite($fp, "\$d['member']['form_settings_home_required'] = \"".$form_settings_home_required."\";\n");
|
||||
fwrite($fp, "\$d['member']['form_settings_phone_required'] = \"".$form_settings_phone_required."\";\n");
|
||||
fwrite($fp, "\$d['member']['form_settings_tel_required'] = \"".$form_settings_tel_required."\";\n");
|
||||
fwrite($fp, "\$d['member']['form_settings_location_required'] = \"".$form_settings_location_required."\";\n");
|
||||
fwrite($fp, "\$d['member']['form_settings_job_required'] = \"".$form_settings_job_required."\";\n");
|
||||
fwrite($fp, "\$d['member']['form_settings_marr_required'] = \"".$form_settings_marr_required."\";\n");
|
||||
fwrite($fp, "\$d['member']['form_settings_add_required'] = \"".$form_settings_add_required."\";\n");
|
||||
fwrite($fp, "\$d['member']['settings_expire'] = \"".$settings_expire."\";\n");
|
||||
fwrite($fp, "\$d['member']['settings_keyexpire'] = \"".$settings_keyexpire."\";\n");
|
||||
|
||||
|
||||
//마이페이지
|
||||
fwrite($fp, "\$d['member']['mytab_post'] = \"".$mytab_post."\";\n");
|
||||
fwrite($fp, "\$d['member']['mytab_comment'] = \"".$mytab_comment."\";\n");
|
||||
fwrite($fp, "\$d['member']['mytab_oneline'] = \"".$mytab_oneline."\";\n");
|
||||
fwrite($fp, "\$d['member']['mytab_avatar'] = \"".$mytab_avatar."\";\n");
|
||||
fwrite($fp, "\$d['member']['mytab_covimg'] = \"".$mytab_covimg."\";\n");
|
||||
fwrite($fp, "\$d['member']['mytab_scrap'] = \"".$mytab_scrap."\";\n");
|
||||
fwrite($fp, "\$d['member']['mytab_friend'] = \"".$mytab_friend."\";\n");
|
||||
fwrite($fp, "\$d['member']['mytab_paper'] = \"".$mytab_paper."\";\n");
|
||||
fwrite($fp, "\$d['member']['mytab_point'] = \"".$mytab_point."\";\n");
|
||||
fwrite($fp, "\$d['member']['mytab_log'] = \"".$mytab_log."\";\n");
|
||||
fwrite($fp, "\$d['member']['mytab_info'] = \"".$mytab_info."\";\n");
|
||||
fwrite($fp, "\$d['member']['mytab_pw'] = \"".$mytab_pw."\";\n");
|
||||
fwrite($fp, "\$d['member']['mytab_out'] = \"".$mytab_out."\";\n");
|
||||
fwrite($fp, "\$d['member']['mytab_recnum'] = \"".$mytab_recnum."\";\n");
|
||||
|
||||
fwrite($fp, "?>");
|
||||
fclose($fp);
|
||||
@chmod($_tmpvfile,0707);
|
||||
|
||||
|
||||
if ($_join_menu == 'settings-config')
|
||||
{
|
||||
$mfile = $g['path_module'].$m.'/var/job.txt';
|
||||
$fp = fopen($mfile,'w');
|
||||
fwrite($fp,trim(stripslashes($job)));
|
||||
fclose($fp);
|
||||
@chmod($mfile,0707);
|
||||
|
||||
$lfile = $g['path_module'].$m.'/var/location.txt';
|
||||
$fp = fopen($lfile,'w');
|
||||
fwrite($fp,trim(stripslashes($location)));
|
||||
fclose($fp);
|
||||
@chmod($lfile,0707);
|
||||
|
||||
}
|
||||
if ($_join_menu == 'signup-form-add')
|
||||
{
|
||||
$mfile = $g['path_var'].'site/'.$r.'/'.$m.'.add_field.txt';
|
||||
if(!is_array($addFieldMembers))
|
||||
{
|
||||
$addFieldMembers = array();
|
||||
}
|
||||
|
||||
$fp = fopen($mfile,'w');
|
||||
foreach($addFieldMembers as $val)
|
||||
{
|
||||
fwrite($fp,$val.'|'.${'add_name_'.$val}.'|'.${'add_type_'.$val}.'|'.${'add_value_'.$val}.'|'.${'add_size_'.$val}.'|'.${'add_pilsu_'.$val}.'|'.${'add_hidden_'.$val}."\n");
|
||||
}
|
||||
if ($add_name)
|
||||
{
|
||||
fwrite($fp,$date['totime'].'|'.$add_name.'|'.$add_type.'|'.$add_value.'|'.$add_size.'|'.$add_pilsu.'|'.$add_hidden."\n");
|
||||
}
|
||||
fclose($fp);
|
||||
@chmod($mfile,0707);
|
||||
}
|
||||
|
||||
$_SESSION['_join_menu'] = $_join_menu;
|
||||
setrawcookie('member_config_result', rawurlencode('설정이 변경 되었습니다.|success')); // 처리여부 cookie 저장
|
||||
|
||||
getLink('reload','parent.','','');
|
||||
?>
|
||||
49
modules/member/action/a.member_cover.php
Normal file
49
modules/member/action/a.member_cover.php
Normal file
@@ -0,0 +1,49 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
if (!$my['uid']) exit;
|
||||
|
||||
include $g['path_core'].'function/thumb.func.php';
|
||||
|
||||
if ($_FILES['upfile']['tmp_name'])
|
||||
{
|
||||
$fileName = strtolower($_FILES['upfile']['name']);
|
||||
$fileSize = $_FILES['upfile']['size'];
|
||||
$fileExt = getExt($fileName);
|
||||
$fileExt = $fileExt == 'jpeg' ? 'jpg' : $fileExt;
|
||||
$fileType = getFileType($fileExt);
|
||||
$filePhoto = md5($fileName).substr($date['totime'],8,14).'.'.$fileExt;
|
||||
$saveFile1 = $g['path_file'].'cover/'.$filePhoto;
|
||||
|
||||
if (strstr('[jpg][png][gif]',$fileExt))
|
||||
{
|
||||
if ($fileExt == 'jpg') {
|
||||
exifRotate($_FILES['upfile']['tmp_name']); //가로세로 교정
|
||||
}
|
||||
ResizeWidth($_FILES['upfile']['tmp_name'],$saveFile1,680);
|
||||
@chmod($saveFile1,0707);
|
||||
|
||||
getDbUpdate($table['s_mbrdata'],"cover='".$filePhoto."'",'memberuid='.$my['uid']);
|
||||
}
|
||||
else {
|
||||
getLink('reload','parent.','이미지파일이 아닙니다. JPG/PNG 파일만 허용됩니다.','');
|
||||
}
|
||||
?>
|
||||
<script>
|
||||
var cover = '<?php echo $filePhoto?>';
|
||||
|
||||
function logoChange(cover) {
|
||||
parent.$('[data-role="cover"]').attr('src',parent.rooturl + '/_core/opensrc/timthumb/thumb.php?src=/files/cover/' + cover+'&w=680&h=350&s=1');
|
||||
parent.$('#page-settings-cover').find('.content').loader("hide");
|
||||
}
|
||||
logoChange(cover);
|
||||
parent.$('[data-role="cover-wrapper"]').addClass('active');
|
||||
setTimeout(function(){
|
||||
parent.$.notify({message: '커버이미지가 등록되었습니다.'},{type: 'default'});
|
||||
}, 500);
|
||||
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
exit;
|
||||
?>
|
||||
29
modules/member/action/a.member_cover_delete.php
Normal file
29
modules/member/action/a.member_cover_delete.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
if (!$my['uid'])
|
||||
{
|
||||
getLink('','','정상적인 접근이 아닙니다.','');
|
||||
}
|
||||
|
||||
if (is_file($g['path_file'].'cover/'.$my['cover']))
|
||||
{
|
||||
unlink($g['path_file'].'cover/'.$my['cover']);
|
||||
}
|
||||
getDbUpdate($table['s_mbrdata'],"cover=''",'memberuid='.$my['uid']);
|
||||
|
||||
// getLink('','parent.','삭제되었습니다.','');
|
||||
?>
|
||||
|
||||
<script>
|
||||
parent.$('[data-role="cover"]').attr('src',parent.rooturl + '/files/cover/0.jpg');
|
||||
parent.$('[data-role="cover-wrapper"]').removeClass('active')
|
||||
setTimeout(function(){
|
||||
parent.$.notify({message: '커버이미지가 삭제되었습니다.'},{type: 'default'});
|
||||
}, 500);
|
||||
|
||||
</script>
|
||||
|
||||
<?php
|
||||
exit;
|
||||
?>
|
||||
50
modules/member/action/a.member_photo.php
Normal file
50
modules/member/action/a.member_photo.php
Normal file
@@ -0,0 +1,50 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
if (!$my['uid']) exit;
|
||||
|
||||
include $g['path_core'].'function/thumb.func.php';
|
||||
|
||||
if ($_FILES['upfile']['tmp_name'])
|
||||
{
|
||||
$fileName = strtolower($_FILES['upfile']['name']);
|
||||
$fileSize = $_FILES['upfile']['size'];
|
||||
$fileExt = getExt($fileName);
|
||||
$fileExt = $fileExt == 'jpeg' ? 'jpg' : $fileExt;
|
||||
$fileType = getFileType($fileExt);
|
||||
$filePhoto = md5($fileName).substr($date['totime'],8,14).'.'.$fileExt;
|
||||
$saveFile1 = $g['path_file'].'avatar/'.$filePhoto;
|
||||
|
||||
if (strstr('[jpg][png][gif]',$fileExt))
|
||||
{
|
||||
if ($fileExt == 'jpg') {
|
||||
exifRotate($_FILES['upfile']['tmp_name']); //가로세로 교정
|
||||
}
|
||||
ResizeWidth($_FILES['upfile']['tmp_name'],$saveFile1,680);
|
||||
@chmod($saveFile1,0707);
|
||||
|
||||
getDbUpdate($table['s_mbrdata'],"photo='".$filePhoto."'",'memberuid='.$my['uid']);
|
||||
}
|
||||
else {
|
||||
getLink('reload','parent.','이미지파일이 아닙니다. JPG/PNG 파일만 허용됩니다.','');
|
||||
}
|
||||
?>
|
||||
<script>
|
||||
var avatar = '<?php echo $filePhoto?>';
|
||||
|
||||
function logoChange(logo) {
|
||||
//parent.location.reload();
|
||||
parent.$('[data-role="avatar"]').attr('src',parent.rooturl + '/_core/opensrc/timthumb/thumb.php?src=/files/avatar/' + logo+'&w=320&h=320&s=1');
|
||||
parent.$('#page-settings-avatar').find('.content').loader("hide");
|
||||
}
|
||||
logoChange(avatar);
|
||||
parent.$('[data-role="avatar-wrapper"]').addClass('active');
|
||||
setTimeout(function(){
|
||||
parent.$.notify({message: '아바타가 등록되었습니다.'},{type: 'default'});
|
||||
}, 500);
|
||||
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
exit;
|
||||
?>
|
||||
29
modules/member/action/a.member_photo_delete.php
Normal file
29
modules/member/action/a.member_photo_delete.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
if (!$my['uid'])
|
||||
{
|
||||
getLink('','','정상적인 접근이 아닙니다.','');
|
||||
}
|
||||
|
||||
if (is_file($g['path_file'].'avatar/'.$my['photo']))
|
||||
{
|
||||
unlink($g['path_file'].'avatar/'.$my['photo']);
|
||||
}
|
||||
getDbUpdate($table['s_mbrdata'],"photo=''",'memberuid='.$my['uid']);
|
||||
|
||||
// getLink('','parent.','삭제되었습니다.','');
|
||||
?>
|
||||
|
||||
<script>
|
||||
parent.$('[data-role="avatar"]').attr('src',parent.rooturl + '/files/avatar/0.svg');
|
||||
parent.$('[data-role="avatar-wrapper"]').removeClass('active')
|
||||
setTimeout(function(){
|
||||
parent.$.notify({message: '아바타가 삭제되었습니다.'},{type: 'default'});
|
||||
}, 500);
|
||||
|
||||
</script>
|
||||
|
||||
<?php
|
||||
exit;
|
||||
?>
|
||||
10
modules/member/action/a.msgdoc_delete.php
Normal file
10
modules/member/action/a.msgdoc_delete.php
Normal file
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
checkAdmin(0);
|
||||
|
||||
unlink($g['dir_module'].'doc/'.$doc.'/'.$type.'.txt');
|
||||
|
||||
setrawcookie('msgdoc_result', rawurlencode('삭제 되었습니다.|success'));
|
||||
getLink($g['s'].'/?r='.$r.'&m=admin&module='.$m.'&front=msgdoc&doc='.$doc,'parent.','','');
|
||||
?>
|
||||
32
modules/member/action/a.msgdoc_regis.php
Normal file
32
modules/member/action/a.msgdoc_regis.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
checkAdmin(0);
|
||||
|
||||
if ($newdoc)
|
||||
{
|
||||
if (is_file($g['dir_module'].'doc/'.$doc.'/'.$newdoc.'.txt'))
|
||||
{
|
||||
getLink('','','이미 존재하는 양식명칭입니다. ','');
|
||||
}
|
||||
else {
|
||||
$type = $newdoc;
|
||||
}
|
||||
}
|
||||
$vfile = $g['dir_module'].'doc/'.$doc.'/'.$type.'.txt';
|
||||
|
||||
$fp = fopen($vfile,'w');
|
||||
fwrite($fp, trim(stripslashes($content)));
|
||||
fclose($fp);
|
||||
@chmod($vfile,0707);
|
||||
|
||||
if ($newdoc)
|
||||
{
|
||||
setrawcookie('msgdoc_result', rawurlencode('등록 되었습니다.|success'));
|
||||
getLink($g['s'].'/?r='.$r.'&m=admin&module='.$m.'&front=msgdoc&doc='.$doc.'&type='.$newdoc,'parent.','','');
|
||||
}
|
||||
else {
|
||||
setrawcookie('msgdoc_result', rawurlencode('수정 되었습니다.|success'));
|
||||
getLink('reload','parent.','','');
|
||||
}
|
||||
?>
|
||||
67
modules/member/action/a.out.php
Normal file
67
modules/member/action/a.out.php
Normal file
@@ -0,0 +1,67 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
$g['memberVarForSite'] = $g['path_var'].'site/'.$r.'/member.var.php';
|
||||
$_tmpvfile = file_exists($g['memberVarForSite']) ? $g['memberVarForSite'] : $g['path_module'].$module.'/var/var.php';
|
||||
include_once $_tmpvfile;
|
||||
|
||||
if (!$my['uid'] || !$pw1 || !$pw2 || $pw1 != $pw2)
|
||||
{
|
||||
getLink('','','정상적인 접근이 아닙니다.','');
|
||||
}
|
||||
|
||||
if (strlen($my['pw']) == 60) {
|
||||
if (!password_verify($pw1,$my['pw']) && !password_verify($pw1,$my['tmpcode'])) {
|
||||
getLink('','','패스워드가 일치하지 않습니다.','');
|
||||
}
|
||||
} else {
|
||||
if (getCrypt($pw1,$my['d_regis']) != $my['pw'] && $my['tmpcode'] != getCrypt($pw1,$my['d_regis'])){
|
||||
getLink('','','패스워드가 일치하지 않습니다.','');
|
||||
}
|
||||
}
|
||||
|
||||
if($d['member']['join_out']==1)
|
||||
{
|
||||
getDbDelete($table['s_mbrsns'],'memberuid='.$my['uid']);
|
||||
getDbDelete($table['s_mbrid'],'uid='.$my['uid']);
|
||||
getDbDelete($table['s_mbrdata'],'memberuid='.$my['uid']);
|
||||
getDbDelete($table['s_mbrcomp'],'memberuid='.$my['uid']);
|
||||
getDbDelete($table['s_paper'],'my_mbruid='.$my['uid']);
|
||||
getDbDelete($table['s_point'],'my_mbruid='.$my['uid']);
|
||||
getDbDelete($table['s_scrap'],'mbruid='.$my['uid']);
|
||||
getDbDelete($table['s_simbol'],'mbruid='.$my['uid']);
|
||||
getDbDelete($table['s_friend'],'my_mbruid='.$my['uid'].' or by_mbruid='.$my['uid']);
|
||||
getDbUpdate($table['s_mbrlevel'],'num=num-1','uid='.$my['level']);
|
||||
getDbUpdate($table['s_mbrgroup'],'num=num-1','uid='.$my['mygroup']);
|
||||
getDbDelete($table['s_code'],'mbruid='.$my['uid']);
|
||||
getDbDelete($table['s_guestauth'],'email="'.$my['email'].'" or phone="'.$my['phone'].'"');
|
||||
getDbDelete($table['s_iidtoken'],'mbruid='.$my['uid']);
|
||||
|
||||
if (is_file($g['path_var'].'avatar/'.$my['photo']))
|
||||
{
|
||||
unlink($g['path_var'].'avatar/'.$my['photo']);
|
||||
}
|
||||
if (is_file($g['path_var'].'avatar/180.'.$my['photo']))
|
||||
{
|
||||
unlink($g['path_var'].'avatar/180.'.$my['photo']);
|
||||
}
|
||||
$fp = fopen($g['path_tmp'].'out/'.$my['id'].'.txt','w');
|
||||
fwrite($fp,$date['totime']);
|
||||
fclose($fp);
|
||||
@chmod($g['path_tmp'].'out/'.$my['id'].'.txt',0707);
|
||||
}
|
||||
else {
|
||||
getDbUpdate($table['s_mbrdata'],'auth=4','memberuid='.$my['uid']);
|
||||
getDbUpdate($table['s_mbrdata'],'now_login=0','memberuid='.$my['uid']);
|
||||
|
||||
}
|
||||
|
||||
getDbUpdate($table['s_numinfo'],'mbrout=mbrout-1',"date='".$date['today']."' and site=".$s);
|
||||
|
||||
setcookie('svshop', '', 0, '/');
|
||||
$_SESSION['mbr_uid'] = '';
|
||||
$_SESSION['mbr_pw'] = '';
|
||||
|
||||
|
||||
getLink(RW(0),'parent.','정상적으로 탈퇴처리 되었습니다.','');
|
||||
?>
|
||||
24
modules/member/action/a.paper_delete.php
Normal file
24
modules/member/action/a.paper_delete.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
if (!$my['uid'])
|
||||
{
|
||||
getLink('','','정상적인 접근이 아닙니다.','');
|
||||
}
|
||||
|
||||
if ($my['admin'])
|
||||
{
|
||||
foreach($members as $val)
|
||||
{
|
||||
getDbDelete($table['s_paper'],'uid='.$val);
|
||||
}
|
||||
}
|
||||
else {
|
||||
foreach($members as $val)
|
||||
{
|
||||
getDbDelete($table['s_paper'],'uid='.$val.' and my_mbruid='.$my['uid']);
|
||||
}
|
||||
}
|
||||
|
||||
getLink('reload','parent.','','');
|
||||
?>
|
||||
24
modules/member/action/a.paper_multi_delete.php
Normal file
24
modules/member/action/a.paper_multi_delete.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
if (!$my['uid'])
|
||||
{
|
||||
getLink('','','정상적인 접근이 아닙니다.','');
|
||||
}
|
||||
|
||||
if ($my['admin'])
|
||||
{
|
||||
foreach($members as $val)
|
||||
{
|
||||
getDbDelete($table['s_paper'],'uid='.$val);
|
||||
}
|
||||
}
|
||||
else {
|
||||
foreach($members as $val)
|
||||
{
|
||||
getDbDelete($table['s_paper'],'uid='.$val.' and my_mbruid='.$my['uid']);
|
||||
}
|
||||
}
|
||||
|
||||
getLink('reload','parent.','','');
|
||||
?>
|
||||
24
modules/member/action/a.paper_save.php
Normal file
24
modules/member/action/a.paper_save.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
if (!$my['uid'])
|
||||
{
|
||||
getLink('','','정상적인 접근이 아닙니다.','');
|
||||
}
|
||||
|
||||
if ($my['admin'])
|
||||
{
|
||||
foreach($members as $val)
|
||||
{
|
||||
getDbUpdate($table['s_paper'],'inbox=2','uid='.$val);
|
||||
}
|
||||
}
|
||||
else {
|
||||
foreach($members as $val)
|
||||
{
|
||||
getDbUpdate($table['s_paper'],'inbox=2','uid='.$val.' and my_mbruid='.$my['uid']);
|
||||
}
|
||||
}
|
||||
|
||||
getLink('reload','parent.','','');
|
||||
?>
|
||||
83
modules/member/action/a.paper_send.php
Normal file
83
modules/member/action/a.paper_send.php
Normal file
@@ -0,0 +1,83 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
$subject = trim($subject);
|
||||
$msg = trim($msg);
|
||||
$html = $html ? $html : 'text';
|
||||
|
||||
if (!$msg) getLink('','','정상적인 접근이 아닙니다.','');
|
||||
if (!$my['uid']) getLink('','','권한이 없습니다.','');
|
||||
|
||||
if ($subject)
|
||||
{
|
||||
include_once $g['path_core'].'function/email.func.php';
|
||||
}
|
||||
|
||||
if ($type == 'multi')
|
||||
{
|
||||
$idexp = explode(',',$id);
|
||||
$idlen = count($idexp);
|
||||
$j = 0;
|
||||
for ($i = 0; $i < $idlen; $i++)
|
||||
{
|
||||
$xid = trim($idexp[$i]);
|
||||
if (!$xid) continue;
|
||||
|
||||
if (strpos($xid,'@'))
|
||||
{
|
||||
$M = getDbData($table['s_mbrdata'],"email='".$xid."'",'*');
|
||||
if (!$M['memberuid']) continue;
|
||||
$M1 = getUidData($table['s_mbrid'],$M['memberuid']);
|
||||
}
|
||||
else {
|
||||
$M1 = getDbData($table['s_mbrid'],"id='".$xid."'",'*');
|
||||
if (!$M1['uid']) continue;
|
||||
$M = getDbData($table['s_mbrdata'],'memberuid='.$M1['uid'],'*');
|
||||
}
|
||||
|
||||
if ($subject)
|
||||
{
|
||||
if (!$M['email']) continue;
|
||||
$result = getSendMail($M['email'].'|'.$M['name'], $my['email'].'|'.$my['name'],$subject,$msg,'TEXT');
|
||||
if ($result) $j++;
|
||||
}
|
||||
else {
|
||||
$QKEY = 'parent,my_mbruid,by_mbruid,inbox,content,html,upload,d_regis,d_read';
|
||||
$QVAL = "'$parent','".$M1['uid']."','".$my['uid']."','1','".$msg."','$html','$upload','".$date['totime']."','0'";
|
||||
getDbInsert($table['s_paper'],$QKEY,$QVAL);
|
||||
getDbUpdate($table['s_mbrdata'],'is_paper=1','memberuid='.$M1['uid']);
|
||||
$j++;
|
||||
}
|
||||
}
|
||||
?>
|
||||
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
parent.getId('paperbox').innerHTML = '<div style="text-align:center;padding-top:100px;font-weight:bold;color:#888;"><img src="<?php echo $g['img_core']?>/_public/ico_notice.gif" alt="" style="margin-bottom:-2px;margin-right:3px;" /><?php if($j):?>총 <?php echo $j?>명에게 <?php echo $subject?'이메일이':'메세지가'?> 전송되었습니다.<?php else:?><?php echo $subject?'이메일이':'메세지가'?> 전송되지 않았습니다.<?php endif?></div>';
|
||||
setTimeout("parent.parent.getLayerBoxHide();",1000);
|
||||
//]]>
|
||||
</script>
|
||||
<?php
|
||||
exit;
|
||||
}
|
||||
else {
|
||||
if (!$rcvmbr) getLink('','','받는사람이 지정되지 않았습니다.','');
|
||||
$M = getDbData($table['s_mbrdata'],'memberuid='.$rcvmbr,'*');
|
||||
if (!$M['memberuid']) getLink('','','받는사람이 지정되지 않았습니다.','');
|
||||
|
||||
$QKEY = 'parent,my_mbruid,by_mbruid,inbox,content,html,upload,d_regis,d_read';
|
||||
$QVAL = "'$parent','".$M['memberuid']."','".$my['uid']."','1','".$msg."','$html','$upload','".$date['totime']."','0'";
|
||||
getDbInsert($table['s_paper'],$QKEY,$QVAL);
|
||||
getDbUpdate($table['s_mbrdata'],'is_paper=1','memberuid='.$M['memberuid']);
|
||||
?>
|
||||
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
parent.getId('paperbox').innerHTML = '<div style="text-align:center;padding-top:100px;font-weight:bold;color:#888;"><img src="<?php echo $g['img_core']?>/_public/ico_notice.gif" alt="" style="margin-bottom:-2px;margin-right:3px;" />메세지를 보냈습니다.</div>';
|
||||
setTimeout("parent.parent.getLayerBoxHide();",1000);
|
||||
//]]>
|
||||
</script>
|
||||
<?php
|
||||
exit;
|
||||
}
|
||||
?>
|
||||
64
modules/member/action/a.paper_send2.php
Normal file
64
modules/member/action/a.paper_send2.php
Normal file
@@ -0,0 +1,64 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
$subject = trim($subject);
|
||||
$msg = trim($msg);
|
||||
$html = $html ? $html : 'TEXT';
|
||||
|
||||
if (!$msg) getLink('','','정상적인 접근이 아닙니다.','');
|
||||
if (!$my['uid']) getLink('','','권한이 없습니다.','');
|
||||
|
||||
if ($subject)
|
||||
{
|
||||
include_once $g['path_core'].'function/email.func.php';
|
||||
}
|
||||
|
||||
if ($type == 'multi')
|
||||
{
|
||||
$idexp = explode(',',$id);
|
||||
$idlen = count($idexp);
|
||||
$j = 0;
|
||||
for ($i = 0; $i < $idlen; $i++)
|
||||
{
|
||||
$xid = trim($idexp[$i]);
|
||||
if (!$xid) continue;
|
||||
|
||||
if (strpos($xid,'@'))
|
||||
{
|
||||
$M = getDbData($table['s_mbrdata'],"email='".$xid."'",'*');
|
||||
if (!$M['memberuid']) continue;
|
||||
$M1 = getUidData($table['s_mbrid'],$M['memberuid']);
|
||||
}
|
||||
else {
|
||||
$M1 = getDbData($table['s_mbrid'],"id='".$xid."'",'*');
|
||||
if (!$M1['uid']) continue;
|
||||
$M = getDbData($table['s_mbrdata'],'memberuid='.$M1['uid'],'*');
|
||||
}
|
||||
|
||||
if ($subject)
|
||||
{
|
||||
if (!$M['email']) continue;
|
||||
$result = getSendMail($M['email'].'|'.$M['name'], $my['email'].'|'.$my['name'],$subject,$msg,'TEXT');
|
||||
if ($result) $j++;
|
||||
}
|
||||
else {
|
||||
$QKEY = 'parent,my_mbruid,by_mbruid,inbox,content,html,upload,d_regis,d_read';
|
||||
$QVAL = "'$parent','".$M1['uid']."','".$my['uid']."','1','".$msg."','$html','$upload','".$date['totime']."','0'";
|
||||
getDbInsert($table['s_paper'],$QKEY,$QVAL);
|
||||
getDbUpdate($table['s_mbrdata'],'is_paper=1','memberuid='.$M1['uid']);
|
||||
$j++;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (!$rcvmbr) getLink('','','받는사람이 지정되지 않았습니다.','');
|
||||
$M = getDbData($table['s_mbrdata'],'memberuid='.$rcvmbr,'*');
|
||||
if (!$M['memberuid']) getLink('','','받는사람이 지정되지 않았습니다.','');
|
||||
|
||||
$QKEY = 'parent,my_mbruid,by_mbruid,inbox,content,html,upload,d_regis,d_read';
|
||||
$QVAL = "'$parent','".$M['memberuid']."','".$my['uid']."','1','".$msg."','$html','$upload','".$date['totime']."','0'";
|
||||
getDbInsert($table['s_paper'],$QKEY,$QVAL);
|
||||
getDbUpdate($table['s_mbrdata'],'is_paper=1','memberuid='.$M['memberuid']);
|
||||
}
|
||||
getLink('','parent.','쪽지가 전송되었습니다.','');
|
||||
?>
|
||||
44
modules/member/action/a.phone_auth.php
Normal file
44
modules/member/action/a.phone_auth.php
Normal file
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
if (!$tmpuid || !$tmpcode)
|
||||
{
|
||||
getLink($g['r'].'/','','정상적인 접근이 아닙니다.','');
|
||||
}
|
||||
|
||||
$R = getDbData($table['s_mbrdata'],'memberuid='.$tmpuid." and d_regis='".$tmpcode."'",'*');
|
||||
|
||||
if (!$R['memberuid'] || $R['auth'] == 2)
|
||||
{
|
||||
getLink(RW(0),'','잘못된 요청입니다.','');
|
||||
}
|
||||
|
||||
if ($R['auth'] == 1)
|
||||
{
|
||||
getLink(RW(0),'','이미 승인된 요청입니다. 로그인해 주세요.','');
|
||||
}
|
||||
|
||||
if ($R['auth'] == 3)
|
||||
{
|
||||
getDbUpdate($table['s_mbrdata'],'auth=1,verify_phone=1','memberuid='.$R['memberuid']);
|
||||
}
|
||||
|
||||
$g['memberVarForSite'] = $g['path_var'].'site/'.$r.'/member.var.php';
|
||||
$_tmpvfile = file_exists($g['memberVarForSite']) ? $g['memberVarForSite'] : $g['path_module'].$module.'/var/var.php';
|
||||
include_once $_tmpvfile;
|
||||
include_once $g['path_core'].'function/sms.func.php';
|
||||
|
||||
if ($d['member']['join_email_send']&&$d['member']['join_email'])
|
||||
{
|
||||
$M = getUidData($table['s_mbrid'],$R['memberuid']);
|
||||
$content = implode('',file($g['dir_module'].'doc/_join.txt'));
|
||||
$content = str_replace('{NAME}',$R['name'],$content);
|
||||
$content = str_replace('{NICK}',$R['nic'],$content);
|
||||
$content = str_replace('{ID}',$M['id'],$content);
|
||||
$content = str_replace('{EMAIL}',$R['email'],$content);
|
||||
|
||||
getSendSMS($R['email'].'|'.$R['name'], $d['member']['join_email'].'|'.$_HS['name'], '['.$_HS['name'].']회원가입을 축하드립니다.', $content, 'HTML');
|
||||
}
|
||||
|
||||
getLink(RW(0),'','인증이 완료되었습니다. 로그인해 주세요.','');
|
||||
?>
|
||||
16
modules/member/action/a.plan.php
Normal file
16
modules/member/action/a.plan.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
if (!$my['uid'])
|
||||
{
|
||||
getLink('','','정상적인 접근이 아닙니다.','');
|
||||
}
|
||||
|
||||
$memberuid = $my['admin'] && $memberuid ? $memberuid : $my['uid'];
|
||||
$mailing = $remail;
|
||||
|
||||
$_QVAL.= "mailing='$mailing'";
|
||||
getDbUpdate($table['s_mbrdata'],$_QVAL,'memberuid='.$memberuid);
|
||||
|
||||
getLink('/join/customize','parent.','','');
|
||||
?>
|
||||
33
modules/member/action/a.point_delete.php
Normal file
33
modules/member/action/a.point_delete.php
Normal file
@@ -0,0 +1,33 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
if (!$my['uid'])
|
||||
{
|
||||
getLink('','','정상적인 접근이 아닙니다.','');
|
||||
}
|
||||
|
||||
$pointType = $pointType ? $pointType : 'point';
|
||||
if ($my['admin'])
|
||||
{
|
||||
foreach($members as $val)
|
||||
{
|
||||
$P = getUidData($table['s_'.$pointType],$val);
|
||||
if (!$P['uid']) continue;
|
||||
|
||||
getDbDelete($table['s_'.$pointType],'uid='.$P['uid']);
|
||||
getDbUpdate($table['s_mbrdata'],$pointType.'='.$pointType.'-'.$P['price'],'memberuid='.$P['my_mbruid']);
|
||||
}
|
||||
}
|
||||
else {
|
||||
foreach($members as $val)
|
||||
{
|
||||
$P = getUidData($table['s_'.$pointType],$val);
|
||||
if (!$P['uid'] || $my['uid'] != $P['my_mbruid']) continue;
|
||||
|
||||
getDbDelete($table['s_'.$pointType],'uid='.$P['uid'].' and my_mbruid='.$my['uid']);
|
||||
getDbUpdate($table['s_mbrdata'],$pointType.'='.$pointType.'-'.$P['price'],'memberuid='.$my['uid']);
|
||||
}
|
||||
}
|
||||
setrawcookie('member_point_result', rawurlencode($pointType.'가 삭제 되었습니다.|success')); // 처리여부 cookie 저장
|
||||
getLink('reload','parent.','','');
|
||||
?>
|
||||
17
modules/member/action/a.point_multi_delete.php
Normal file
17
modules/member/action/a.point_multi_delete.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
checkAdmin(0);
|
||||
|
||||
$pointType = $pointType ? $pointType : 'point';
|
||||
foreach($point_members as $val)
|
||||
{
|
||||
$P = getUidData($table['s_'.$pointType],$val);
|
||||
if (!$P['uid']) continue;
|
||||
|
||||
getDbDelete($table['s_'.$pointType],'uid='.$P['uid']);
|
||||
getDbUpdate($table['s_mbrdata'],$pointType.'='.$pointType.'-'.$P['price'],'memberuid='.$P['my_mbruid']);
|
||||
}
|
||||
setrawcookie('result_member_point', rawurlencode('항목이 삭제되었습니다.|success')); // 처리여부 cookie 저장
|
||||
getLink('reload','parent.','','');
|
||||
?>
|
||||
41
modules/member/action/a.point_sum.php
Normal file
41
modules/member/action/a.point_sum.php
Normal file
@@ -0,0 +1,41 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
if (!$my['uid'])
|
||||
{
|
||||
getLink('','','정상적인 접근이 아닙니다.','');
|
||||
}
|
||||
|
||||
$memberuid = 0;
|
||||
$price = 0;
|
||||
|
||||
if ($my['admin'])
|
||||
{
|
||||
foreach($members as $val)
|
||||
{
|
||||
$P = getUidData($table['s_'.$pointType],$val);
|
||||
$price = $price + $P['price'];
|
||||
$memberuid = $P['my_mbruid'];
|
||||
|
||||
getDbDelete($table['s_'.$pointType],'uid='.$P['uid']);
|
||||
}
|
||||
|
||||
getDbInsert($table['s_'.$pointType],'my_mbruid,by_mbruid,price,content,d_regis',"'".$memberuid."','0','$price','내역을 정리하였습니다.','".$date['totime']."'");
|
||||
|
||||
}
|
||||
else {
|
||||
foreach($members as $val)
|
||||
{
|
||||
$P = getUidData($table['s_'.$pointType],$val);
|
||||
$price = $price + $P['price'];
|
||||
|
||||
getDbDelete($table['s_'.$pointType],'uid='.$P['uid'].' and my_mbruid='.$my['uid']);
|
||||
}
|
||||
|
||||
getDbInsert($table['s_'.$pointType],'my_mbruid,by_mbruid,price,content,d_regis',"'".$my['uid']."','0','$price','내역을 정리하였습니다.','".$date['totime']."'");
|
||||
|
||||
}
|
||||
|
||||
setrawcookie('member_point_result', rawurlencode($pointType.'내역을 정리하였습니다.|success')); // 처리여부 cookie 저장
|
||||
getLink('reload','parent.','','');
|
||||
?>
|
||||
109
modules/member/action/a.profile_follow.php
Normal file
109
modules/member/action/a.profile_follow.php
Normal file
@@ -0,0 +1,109 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
if (!$my['uid'])
|
||||
{
|
||||
getLink('','','정상적인 접근이 아닙니다.','');
|
||||
}
|
||||
|
||||
if (!$mbruid) exit;
|
||||
|
||||
$M = getUidData($table['s_mbrid'],$mbruid);
|
||||
if (!$M['uid']) getLink('','','존재하지 않는 회원입니다.','');
|
||||
|
||||
if(!getDbRows($table['s_mbrmonth'],"date='".$date['month']."' and site=".$s.' and mbruid='.$mbruid)) {
|
||||
getDbInsert($table['s_mbrmonth'],'date,site,mbruid',"'".$date['month']."','".$s."','".$mbruid."'");
|
||||
}
|
||||
|
||||
if(!getDbRows($table['s_mbrday'],"date='".$date['today']."' and site=".$s.' and mbruid='.$mbruid)) {
|
||||
getDbInsert($table['s_mbrday'],'date,site,mbruid',"'".$date['today']."','".$s."','".$mbruid."'");
|
||||
}
|
||||
|
||||
$_isFollowing = getDbRows($table['s_friend'],'my_mbruid='.$my['uid'].' and by_mbruid='.$mbruid);
|
||||
|
||||
if ($_isFollowing)
|
||||
{
|
||||
|
||||
$R = getDbData($table['s_friend'],'my_mbruid='.$my['uid'].' and by_mbruid='.$mbruid,'*');
|
||||
getDbDelete($table['s_friend'],'my_mbruid='.$my['uid'].' and by_mbruid='.$mbruid);
|
||||
getDbUpdate($table['s_friend'],'rel=0','uid='.$R['uid']);
|
||||
getDbUpdate($table['s_mbrdata'],'num_follower=num_follower-1','memberuid='.$mbruid);
|
||||
|
||||
getDbUpdate($table['s_mbrmonth'],'follower=follower-1',"date='".substr($R['d_regis'],0,6)."' and site=".$s.' and mbruid='.$mbruid); //회원별 월별 조회수 갱신
|
||||
getDbUpdate($table['s_mbrday'],'follower=follower-1',"date='".substr($R['d_regis'],0,8)."' and site=".$s.' and mbruid='.$mbruid); //회원별 일별조회수 갱신
|
||||
|
||||
// 알림 메시지 전송
|
||||
$rcvmember = $mbruid ;
|
||||
$sendmodule = $M['id'];
|
||||
$sendmember = $my['uid'] ;
|
||||
$message = "구독을 취소했습니다";
|
||||
$referer = '';
|
||||
$target = '_self';
|
||||
putNotice($rcvmember,$sendmodule,$sendmember,$title,$message,$referer,$button,$tag,$skip_email,$skip_push);
|
||||
|
||||
}
|
||||
else {
|
||||
|
||||
$R = getDbData($table['s_friend'],'my_mbruid='.$my['uid'].' and by_mbruid='.$mbruid,'*');
|
||||
|
||||
if ($R['uid']) {
|
||||
getDbInsert($table['s_friend'],'rel,my_mbruid,by_mbruid,category,d_regis',"'1','".$my['uid']."','".$mbruid."','','".$date['totime']."'");
|
||||
getDbUpdate($table['s_friend'],'rel=1','uid='.$R['uid']);
|
||||
getDbUpdate($table['s_mbrmonth'],'follower=follower+1',"date='".substr($R['d_regis'],0,6)."' and site=".$s.' and mbruid='.$mbruid); //회원별 월별 조회수 갱신
|
||||
getDbUpdate($table['s_mbrday'],'follower=follower+1',"date='".substr($R['d_regis'],0,8)."' and site=".$s.' and mbruid='.$mbruid); //회원별 일별조회수 갱신
|
||||
} else {
|
||||
getDbInsert($table['s_friend'],'rel,my_mbruid,by_mbruid,category,d_regis',"'0','".$my['uid']."','".$mbruid."','','".$date['totime']."'");
|
||||
getDbUpdate($table['s_mbrmonth'],'follower=follower+1',"date='".$date['month']."' and site=".$s.' and mbruid='.$mbruid); //회원별 월별 조회수 갱신
|
||||
getDbUpdate($table['s_mbrday'],'follower=follower+1',"date='".$date['today']."' and site=".$s.' and mbruid='.$mbruid); //회원별 일별조회수 갱신
|
||||
}
|
||||
|
||||
getDbUpdate($table['s_mbrdata'],'num_follower=num_follower+1','memberuid='.$mbruid);
|
||||
|
||||
// 알림 메시지 전송
|
||||
$rcvmember = $mbruid ;
|
||||
$sendmodule = $M['id'];
|
||||
$sendmember = $my['uid'] ;
|
||||
$message = "구독을 시작했습니다.";
|
||||
$referer = '';
|
||||
$target = '_self';
|
||||
putNotice($rcvmember,$sendmodule,$sendmember,$title,$message,$referer,$button,$tag,$skip_email,$skip_push);
|
||||
|
||||
}
|
||||
|
||||
$M1 = getDbData($table['s_mbrdata'],'memberuid='.$mbruid,'*');
|
||||
$num_follower = $M1['num_follower'];
|
||||
?>
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
window.parent.$.notify({
|
||||
|
||||
<?php if ($_isFollowing): ?>
|
||||
message: "구독이 취소 되었습니다."
|
||||
<?php else:?>
|
||||
message: "구독이 시작 되었습니다."
|
||||
<?php endif; ?>
|
||||
|
||||
},{
|
||||
placement: {
|
||||
from: "bottom",
|
||||
align: "center"
|
||||
},
|
||||
allow_dismiss: false,
|
||||
offset: 20,
|
||||
type: "default",
|
||||
timer: 100,
|
||||
delay: 1500,
|
||||
animate: {
|
||||
enter: "animated fadeInUp",
|
||||
exit: "animated fadeOutDown"
|
||||
}
|
||||
});
|
||||
|
||||
window.parent.$('[data-mbruid="<?php echo $mbruid ?>"]').find('[data-role="num_follower"]').text(<?php echo $num_follower ?>);
|
||||
|
||||
</script>
|
||||
<?php
|
||||
exit;
|
||||
?>
|
||||
27
modules/member/action/a.profile_star.php
Normal file
27
modules/member/action/a.profile_star.php
Normal file
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
if (!$my['uid']) getLink('','','로그인해 주세요.','');
|
||||
|
||||
$m = 'project';
|
||||
$_PROJECT = getDbData($table[$m.'list'],"id='".$project."'",'*');
|
||||
|
||||
if (!$_PROJECT['uid']) exit;
|
||||
|
||||
$_isStar = getDbRows($table[$m.'star'],'mbruid='.$my['uid'].' and project='.$_PROJECT['uid']);
|
||||
|
||||
|
||||
if ($_isStar)
|
||||
{
|
||||
getDbDelete($table[$m.'star'],'mbruid='.$my['uid'].' and project='.$_PROJECT['uid']);
|
||||
getDbUpdate($table[$m.'list'],'num_star=num_star-1','uid='.$_PROJECT['uid']);
|
||||
}
|
||||
else {
|
||||
$QKEY = 'mbruid,project,gid,d_regis';
|
||||
$QVAL = "".$my['uid'].",".$_PROJECT['uid'].",'',".$date['totime']."";
|
||||
getDbInsert($table[$m.'star'],$QKEY,$QVAL);
|
||||
getDbUpdate($table[$m.'list'],'num_star=num_star+1','uid='.$_PROJECT['uid']);
|
||||
}
|
||||
|
||||
exit;
|
||||
?>
|
||||
54
modules/member/action/a.pwConfirm.php
Normal file
54
modules/member/action/a.pwConfirm.php
Normal file
@@ -0,0 +1,54 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
$id = trim($_POST['id']);
|
||||
$pw = trim($_POST['pw']);
|
||||
|
||||
if (!$id || !$pw) getLink('reload','parent.','패스워드를 입력해 주세요.','-1');
|
||||
|
||||
if (strpos($id,'@') && strpos($id,'.'))
|
||||
{
|
||||
$M1 = getDbData($table['s_mbrdata'],"email='".$id."'",'*');
|
||||
$M = getUidData($table['s_mbrid'],$M1['memberuid']);
|
||||
}
|
||||
else {
|
||||
$M = getDbData($table['s_mbrid'],"id='".$id."'",'*');
|
||||
$M1 = getDbData($table['s_mbrdata'],'memberuid='.$M['uid'],'*');
|
||||
}
|
||||
|
||||
if (!$M['uid'] || $M1['auth'] == 4) {
|
||||
echo "<script>";
|
||||
echo "parent.$('".$form."').removeClass('was-validated');";
|
||||
echo "parent.$('".$form."').find('[type=submit]').prop('disabled', false);";
|
||||
echo "parent.$('".$form."').find('[data-role=idErrorBlock]').text('존재하지 않는 계정입니다.');";
|
||||
echo "parent.$('".$form."').find('[name=id]').focus().addClass('is-invalid');";
|
||||
echo "</script>";
|
||||
exit();
|
||||
}
|
||||
if ($M1['auth'] == 2) getLink('reload','parent.','회원님은 인증보류 상태입니다.','-1');
|
||||
if ($M1['auth'] == 3) getLink('reload','parent.','회원님은 인증대기 상태입니다.','-1');
|
||||
|
||||
$password_alert = "<script>";
|
||||
$password_alert .= "parent.$('".$form."').removeClass('was-validated');";
|
||||
$password_alert .= "parent.$('".$form."').find('[type=submit]').prop('disabled', false);";
|
||||
$password_alert .= "parent.$('".$form."').find('[data-role=passwordErrorBlock]').text('패스워드가 일치하지 않습니다.');";
|
||||
$password_alert .= "parent.$('".$form."').find('[name=pw]').val('').focus().addClass('is-invalid');";
|
||||
$password_alert .= "</script>";
|
||||
|
||||
if (strlen($M['pw']) == 60) {
|
||||
if (!password_verify($pw,$M['pw']) && !password_verify($pw,$M1['tmpcode'])) {
|
||||
echo $password_alert;
|
||||
exit();
|
||||
}
|
||||
} else {
|
||||
if ($M['pw'] != getCrypt($pw,$M1['d_regis']) && $M1['tmpcode'] != $pw) {
|
||||
echo $password_alert;
|
||||
exit();
|
||||
}
|
||||
}
|
||||
|
||||
getDbUpdate($table['s_mbrdata'],"tmpcode='',now_log=1,last_log='".$date['totime']."'",'memberuid='.$M['uid']);
|
||||
|
||||
setrawcookie('member_settings_result', rawurlencode('본인확인 되었습니다.')); // 알림처리를 위한 로그인 상태 cookie 저장
|
||||
getLink('reload','parent.','','');
|
||||
?>
|
||||
346
modules/member/action/a.pw_reset.php
Normal file
346
modules/member/action/a.pw_reset.php
Normal file
@@ -0,0 +1,346 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
$target = str_replace('-','', $target);
|
||||
|
||||
// 인증코드 발송
|
||||
if ($act=='send_code') {
|
||||
|
||||
if (!$type || !$target) {
|
||||
getLink('','','정상적인 접근이 아닙니다.','');
|
||||
}
|
||||
|
||||
if ($type=='email') $M = getDbData($table['s_mbrdata'],"email='".$target."'",'admin');
|
||||
else $M = getDbData($table['s_mbrdata'],"phone='".$target."'",'admin');
|
||||
|
||||
if ($usertype=='admin' && !$M['admin']) {
|
||||
echo '<script type="text/javascript">';
|
||||
if ($type=='email') {
|
||||
echo 'parent.$("#modal-pwReset").find("[name=email]").addClass("is-invalid").focus();';
|
||||
echo 'parent.$("#modal-pwReset").find("[data-role=emailErrorBlock]").text("관리자 권한이 없는 계정입니다.");';
|
||||
} else {
|
||||
echo 'parent.$("#modal-pwReset").find("[name=phone]").addClass("is-invalid").focus();';
|
||||
echo 'parent.$("#modal-pwReset").find("[data-role=phoneErrorBlock]").text("관리자 권한이 없는 계정입니다.");';
|
||||
}
|
||||
echo 'parent.$("#modal-pwReset").find("[data-act=send_code]").attr("disabled",false);'; //데스크탑 버튼 로더 숨기기
|
||||
echo '</script>';
|
||||
exit();
|
||||
}
|
||||
|
||||
$verify_code = date('His');
|
||||
$verify_token=genAccessToken(80);
|
||||
$d_regis = $date['totime'];
|
||||
$ip = $_SERVER['REMOTE_ADDR'];
|
||||
$today = substr($date['today'],0,8);
|
||||
$num_code=getDbRows($table['s_guestauth'],"ip='".$ip."' and left(d_regis,8)=".$today); // 코드 발급수
|
||||
|
||||
//인증번호 이메일 발송
|
||||
if ($type=='email') {
|
||||
|
||||
$email_from = $d['member']['join_email']?$d['member']['join_email']:$d['admin']['sysmail'];
|
||||
|
||||
|
||||
// 이메일 중복여부 검사
|
||||
$isEmail = getDbRows($table['s_mbremail'],"email='".$target."'");
|
||||
|
||||
if (!$isEmail) {
|
||||
echo '<script type="text/javascript">';
|
||||
echo 'parent.$("[name=email]").addClass("is-invalid").focus();';
|
||||
echo 'parent.$("[data-role=emailErrorBlock]").text("등록된 이메일이 없습니다.");';
|
||||
echo 'parent.$("#pane-email").find("[data-act=send_code]").prop("disabled",false);'; //데스크탑 전용
|
||||
if ($device=='mobile') echo 'parent.$("#page-pw-main").loader("hide");'; //모바일 전용 로더 숨기기
|
||||
if ($device=='desktop') echo 'parent.$("#modal-pwReset").find("[data-act=send_code]").attr("disabled",false);'; //데스크탑 버튼 로더 숨기기
|
||||
echo '</script>';
|
||||
exit();
|
||||
}
|
||||
|
||||
if (!$email_from) {
|
||||
getLink('','','죄송합니다. 발신 이메일 주소가 등록되지 않았습니다. 관리자에게 문의해 주세요.','');
|
||||
}
|
||||
|
||||
//이메일 인증코드 발송횟수 제한 5회
|
||||
if ($num_code>4) {
|
||||
if ($device=='mobile') {
|
||||
echo '<script type="text/javascript">';
|
||||
echo 'parent.$("#page-pw-code").page({ start: "#page-pw-main" });'; // 코드입력 액션페이지 호출
|
||||
echo 'parent.$("#page-pw-code").find("[data-role=emailCodeBlock]").text("이미 이메일로 발송된 인증번호를 참고해 주세요.");';
|
||||
echo 'parent.$("#page-pw-code").find("[data-role=confirm_email_code]").addClass("is-invalid");';
|
||||
echo 'parent.$("#page-pw-main").loader("hide");'; //로더 숨기기
|
||||
echo 'parent.$("#page-pw-code").find("[type=number]").focus();'; //코드입력폼 포커스
|
||||
echo 'parent.$("#page-pw-code").find("[name=target]").val("'.$target.'");';
|
||||
echo 'parent.$("#page-pw-code").find("[name=type]").val("'.$type.'");';
|
||||
echo '</script>';
|
||||
exit();
|
||||
} else {
|
||||
echo '<script type="text/javascript">';
|
||||
echo 'parent.$("#modal-pwReset").find("[data-act=send_code]").prop("disabled",false);';
|
||||
echo 'parent.$("#modal-pwReset").find("[data-role=emailCodeBlock]").text("이미 이메일로 발송된 인증번호를 참고해 주세요.");';
|
||||
echo 'parent.$("#modal-pwReset").find("[data-role=confirm_email_code]").addClass("is-invalid");';
|
||||
echo 'parent.$("#modal-pwReset").find("[data-role=verify_'.$type.'_area]").removeClass("d-none");';
|
||||
echo 'parent.$("#modal-pwReset").find("[data-role=confirm_'.$type.'_code]").focus();';
|
||||
echo 'parent.$("#modal-pwReset").find("[data-role=verify_'.$type.'_area]").find("[data-role=countdown]").text("");';
|
||||
echo 'parent.$("#modal-pwReset").find("[data-role=verify_'.$type.'_area]").find("[data-role=countdown]").attr("data-'.$type.'-countdown","'.$countdown.'");';
|
||||
echo 'parent.doPwCountdown("'.$type.'");'; //인증시간 카운트 다운
|
||||
echo 'parent.$("#modal-pwReset").find("[data-act=send_code]").prop("disabled",false);';
|
||||
echo 'parent.$("#modal-pwReset").find("[data-act=send_code] .not-loading").text("재발송");';
|
||||
echo 'parent.$("#modal-pwReset").find("[name=target]").val("'.$target.'");';
|
||||
echo 'parent.$("#modal-pwReset").find("[name=type]").val("'.$type.'");';
|
||||
echo '</script>';
|
||||
exit();
|
||||
}
|
||||
}
|
||||
|
||||
include_once $g['path_core'].'function/email.func.php';
|
||||
|
||||
$content = implode('',file($g['path_module'].'/admin/var/email.header.txt')); //이메일 헤더 양식
|
||||
$content.= implode('',file($g['dir_module'].'doc/email/_pw.auth.txt')); //이메일 본문 양식
|
||||
$content.= implode('',file($g['path_module'].'/admin/var/email.footer.txt')); // //이메일 풋터 양식
|
||||
$content = str_replace('{EMAIL_MAIN}',$email_from,$content); //대표 이메일
|
||||
$content = str_replace('{TEL_MAIN}',$sms_tel,$content); // 대표 전화
|
||||
$content = str_replace('{SITE}',$_HS['name'],$content); //사이트명
|
||||
$content = str_replace('{EMAIL}',$target,$content); //계정 이메일
|
||||
$content = str_replace('{CODE}',$verify_code,$content); //인증번호
|
||||
$content = str_replace('{TIME}',$d['member']['settings_keyexpire'],$content); //인증제한시간
|
||||
|
||||
$result = getSendMail($target,$email_from.'|'.$_HS['name'],'비밀번호 재설정 인증번호 - '.$verify_code, $content, 'HTML');
|
||||
|
||||
if (!$result) {
|
||||
getLink('reload','parent.','죄송합니다. 이메일서버가 응답하지 않아 이메일을 보내드리지 못했습니다.','');
|
||||
}
|
||||
|
||||
$_QKEY = "auth,email,phone,token,code,d_regis,ip";
|
||||
$_QVAL = "0,'$target','','$verify_token','$verify_code','$d_regis','$ip'";
|
||||
}
|
||||
|
||||
|
||||
if ($type=='phone') {
|
||||
|
||||
$sms_tel = $d['member']['join_tel']?$d['member']['join_tel']:$d['admin']['sms_tel'];
|
||||
|
||||
// 휴대폰 중복여부 검사
|
||||
$isPhone = getDbRows($table['s_mbrphone'],"phone='".$target."'");
|
||||
|
||||
if (!$isPhone) {
|
||||
echo '<script type="text/javascript">';
|
||||
echo 'parent.$("[name=phone]").addClass("is-invalid").focus();';
|
||||
echo 'parent.$("[data-role=phoneErrorBlock]").text("등록된 휴대폰이 없습니다.");';
|
||||
if ($device=='mobile') echo 'parent.$("#page-pw-main").loader("hide");'; //모바일 전용 로더 숨기기
|
||||
if ($device=='desktop') echo 'parent.$("#modal-pwReset").find("[data-act=send_code]").attr("disabled",false);'; //데스크탑 전용 로더 숨기기
|
||||
echo 'parent.$("#pane-phone").find("[data-act=send_code]").prop("disabled",false);'; //데스크탑 전용
|
||||
echo '</script>';
|
||||
exit();
|
||||
}
|
||||
|
||||
if (!$sms_tel) {
|
||||
getLink('','','죄송합니다. SMS발신 전화번호가 등록되지 않았습니다. 관리자에게 문의해 주세요.','');
|
||||
}
|
||||
|
||||
//본인확인 SMS 일발송 제한- 회원모듈 > 환경설정 > 회원가입설정 참조
|
||||
if ($num_code>$d['member']['join_daysms']-1) {
|
||||
if ($device=='mobile') {
|
||||
echo '<script type="text/javascript">';
|
||||
echo 'parent.$("#page-pw-code").page({ start: "#page-pw-main" });'; // 코드입력 액션페이지 호출
|
||||
echo 'parent.$("#page-pw-code").find("[data-role=phoneCodeBlock]").text("이미 휴대폰으로 발송된 인증번호를 참고해 주세요.");';
|
||||
echo 'parent.$("#page-pw-code").find("[data-role=confirm_phone_code]").addClass("is-invalid");';
|
||||
echo 'parent.$("#page-pw-main").loader("hide");'; //로더 숨기기
|
||||
echo 'parent.$("#page-pw-code").find("[type=number]").focus();'; //코드입력폼 포커스
|
||||
echo 'parent.$("#page-pw-code").find("[name=target]").val("'.$target.'");';
|
||||
echo 'parent.$("#page-pw-code").find("[name=type]").val("'.$type.'");';
|
||||
echo '</script>';
|
||||
exit();
|
||||
} else {
|
||||
echo '<script type="text/javascript">';
|
||||
echo 'parent.$("#modal-pwReset").find("[data-act=send_code]").prop("disabled",true);';
|
||||
echo 'parent.$("#modal-pwReset").find("[data-role=phoneCodeBlock]").text("이미 휴대폰으로 발송된 인증번호를 참고해 주세요.");';
|
||||
echo 'parent.$("#modal-pwReset").find("[data-role=confirm_phone_code]").addClass("is-invalid");';
|
||||
echo 'parent.$("#modal-pwReset").find("[data-role=verify_'.$type.'_area]").removeClass("d-none");';
|
||||
echo 'parent.$("#modal-pwReset").find("[data-role=confirm_'.$type.'_code]").focus();';
|
||||
echo 'parent.$("#modal-pwReset").find("[data-role=verify_'.$type.'_area]").find("[data-role=countdown]").text("");';
|
||||
echo 'parent.$("#modal-pwReset").find("[data-role=verify_'.$type.'_area]").find("[data-role=countdown]").attr("data-'.$type.'-countdown","'.$countdown.'");';
|
||||
echo 'parent.doPwCountdown("'.$type.'");'; //인증시간 카운트 다운
|
||||
echo 'parent.$("#modal-pwReset").find("[data-act=send_code]").prop("disabled",false);';
|
||||
echo 'parent.$("#modal-pwReset").find("[data-act=send_code] .not-loading").text("재발송");';
|
||||
echo 'parent.$("#modal-pwReset").find("[name=target]").val("'.$target.'");';
|
||||
echo 'parent.$("#modal-pwReset").find("[name=type]").val("'.$type.'");';
|
||||
echo '</script>';
|
||||
exit();
|
||||
}
|
||||
}
|
||||
|
||||
include_once $g['path_core'].'function/sms.func.php';
|
||||
$content = implode('',file($g['dir_module'].'doc/sms/_pw.auth.txt')); // SMS메시지 양식
|
||||
$content = str_replace('{SITE}',$_HS['name'],$content); //사이트명
|
||||
$content = str_replace('{PHONE}',$target,$content); //계정 휴대폰
|
||||
$content = str_replace('{CODE}',$verify_code,$content); //인증번호
|
||||
$content = str_replace('{TIME}',$d['member']['settings_keyexpire'],$content); //인증제한시간
|
||||
|
||||
$result = getSendSMS($target,$sms_tel,'',$content,'sms');
|
||||
|
||||
if ($result != 'OK') {
|
||||
getLink('reload','parent.',$result,'');
|
||||
}
|
||||
|
||||
$_QKEY = "auth,email,phone,token,code,d_regis,ip";
|
||||
$_QVAL = "0,'','$target','$verify_token','$verify_code','$d_regis','$ip'";
|
||||
}
|
||||
|
||||
// 신규 인증코드 저장
|
||||
getDbInsert($table['s_guestauth'],$_QKEY,$_QVAL);
|
||||
$lastuid = getDbCnt($table['s_guestauth'],'max(uid)','');
|
||||
$R = getUidData($table['s_guestauth'],$lastuid);
|
||||
|
||||
//인증 제한시간
|
||||
$countdown = date("Y/m/d H:i:s",strtotime ("+".$d['member']['join_keyexpire']." minutes",strtotime($R['d_regis']))) ;
|
||||
|
||||
if ($device=='mobile') {
|
||||
echo '<script type="text/javascript">';
|
||||
echo 'parent.$("#page-pw-code").page({ start: "#page-pw-main" });'; // 코드입력 액션페이지 호출
|
||||
echo 'setTimeout(function() {parent.$.notify({message: "인증번호가 발송되었습니다."},{type: "default"});}, 700);'; // 알림메시지 출력
|
||||
echo 'parent.$("#page-pw-main").loader("hide");'; //로더 숨기기
|
||||
echo 'parent.$("#page-pw-code").find("[type=number]").focus();'; //코드입력폼 포커스
|
||||
echo 'parent.$("#page-pw-code").find("[name=target]").val("'.$target.'");';
|
||||
echo 'parent.$("#page-pw-code").find("[name=type]").val("'.$type.'");';
|
||||
echo 'parent.$("#page-pw-code").find("[data-role=countdown]").attr("data-'.$type.'-countdown","'.$countdown.'");';
|
||||
echo 'parent.doPwCountdown("'.$type.'");'; //인증시간 카운트 다운
|
||||
echo '</script>';
|
||||
} else {
|
||||
echo '<script type="text/javascript">';
|
||||
echo 'parent.$.notify({message: "인증번호가 발송되었습니다."},{type: "success"});';
|
||||
echo 'parent.$("#modal-pwReset").find("[data-role=verify_'.$type.'_area]").removeClass("d-none");';
|
||||
echo 'parent.$("#modal-pwReset").find("[data-role=confirm_'.$type.'_code]").focus();';
|
||||
echo 'parent.$("#modal-pwReset").find("[data-role=verify_'.$type.'_area]").find("[data-role=countdown]").text("");';
|
||||
echo 'parent.$("#modal-pwReset").find("[data-role=verify_'.$type.'_area]").find("[data-role=countdown]").attr("data-'.$type.'-countdown","'.$countdown.'");';
|
||||
echo 'parent.doPwCountdown("'.$type.'");'; //인증시간 카운트 다운
|
||||
echo 'parent.$("#modal-pwReset").find("[data-act=send_code]").prop("disabled",false);';
|
||||
echo 'parent.$("#modal-pwReset").find("[data-act=send_code] .not-loading").text("재발송");';
|
||||
echo 'parent.$("#modal-pwReset").find("[name=target]").val("'.$target.'");';
|
||||
echo 'parent.$("#modal-pwReset").find("[name=type]").val("'.$type.'");';
|
||||
echo '</script>';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// 인증코드 확인
|
||||
if ($act=='confirm_code') {
|
||||
|
||||
if (!$type || !$code) {
|
||||
getLink('','','정상적인 접근이 아닙니다.','');
|
||||
}
|
||||
|
||||
$R = getDbData($table['s_guestauth'],"code='".$code."'",'*');
|
||||
|
||||
if ($type=='email') {
|
||||
|
||||
// 코드 검사
|
||||
if ($code != $R['code']) {
|
||||
if ($device=='mobile') {
|
||||
echo '<script type="text/javascript">';
|
||||
echo 'parent.$("#page-pw-code").loader("hide");'; //로더 숨기기
|
||||
echo 'parent.$("[name=confirm_email_code]").addClass("is-invalid").focus();';
|
||||
echo 'parent.$("[data-role=emailCodeBlock]").text("인증번호를 확인해 주세요");';
|
||||
echo '</script>';
|
||||
exit();
|
||||
} else {
|
||||
echo '<script type="text/javascript">';
|
||||
echo 'parent.$("[name=confirm_email_code]").addClass("is-invalid").focus();';
|
||||
echo 'parent.$("[data-role=emailCodeBlock]").text("인증번호를 확인해 주세요");';
|
||||
echo 'parent.$("#modal-pwReset").find("[data-act=confirm_code]").prop("disabled",false);'; //데스크탑 버튼 로더 숨기기
|
||||
echo '</script>';
|
||||
exit();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ($type=='phone') {
|
||||
|
||||
// 코드 검사
|
||||
if ($code != $R['code']) {
|
||||
if ($device=='mobile') {
|
||||
echo '<script type="text/javascript">';
|
||||
echo 'parent.$("#page-pw-code").loader("hide");'; //로더 숨기기
|
||||
echo 'parent.$("[name=confirm_phone_code]").addClass("is-invalid").focus();';
|
||||
echo 'parent.$("[data-role=phoneCodeBlock]").text("인증번호를 확인해 주세요");';
|
||||
echo '</script>';
|
||||
exit();
|
||||
} else {
|
||||
echo '<script type="text/javascript">';
|
||||
echo 'parent.$("[name=confirm_phone_code]").addClass("is-invalid").focus();';
|
||||
echo 'parent.$("[data-role=phoneCodeBlock]").text("인증번호를 확인해 주세요");';
|
||||
echo 'parent.$("#modal-pwReset").find("[data-act=confirm_code]").prop("disabled",false);';
|
||||
echo '</script>';
|
||||
exit();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
getDbUpdate($table['s_guestauth'],'auth=1','code='.$R['code']); // 인증완료상태 처리
|
||||
|
||||
if ($device=='mobile') {
|
||||
echo '<script type="text/javascript">';
|
||||
echo 'parent.$("#page-pw-code").loader("hide");'; //로더 숨기기
|
||||
echo 'parent.$("#page-pw-code").find("[data-role=confirm_code]").addClass("d-none");';
|
||||
echo 'parent.$("#page-pw-code").find("[data-role=change_pw]").removeClass("d-none");';
|
||||
echo 'parent.$("#page-pw-code").find("[name=code]").val("'.$code.'");';
|
||||
echo 'setTimeout(function() {parent.$("#page-pw-code").find("[name=pw1]").focus();}, 700);'; // 알림메시지 출력
|
||||
echo 'setTimeout(function() {parent.$.notify({message: "인증번호가 확인 되었습니다."},{type: "default"});}, 1100);'; // 알림메시지 출력
|
||||
echo '</script>';
|
||||
} else {
|
||||
echo '<script type="text/javascript">';
|
||||
echo 'parent.$.notify({message: "인증번호가 확인 되었습니다."},{type: "success"});';
|
||||
echo 'parent.$("#modal-pwReset").find("[data-role=confirm_code]").addClass("d-none");';
|
||||
echo 'parent.$("#modal-pwReset").find("[data-role=change_pw]").removeClass("d-none");';
|
||||
echo 'parent.$("#modal-pwReset").find("[name=code]").val("'.$code.'");';
|
||||
echo 'setTimeout(function() {parent.$("#modal-pwReset").find("[data-role=pw1]").focus();}, 700);'; // 알림메시지 출력
|
||||
echo '</script>';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//비밀번호 변경저장
|
||||
if ($act=='change_pw') {
|
||||
|
||||
if (!$pw1 || !$pw2 || !$code || !$type || !$target) getLink('reload','parent.','정상적인 접근이 아닙니다.','');
|
||||
|
||||
$R = getDbData($table['s_guestauth'],"code='".$code."'",'*');
|
||||
if ($code != $R['code']) getLink('reload','parent.','정상적인 접근이 아닙니다.','');
|
||||
|
||||
if ($type=='email') $E = getDbData($table['s_mbremail'],"email='".$target."'",'mbruid');
|
||||
else $E = getDbData($table['s_mbrphone'],"phone='".$target."'",'mbruid');
|
||||
|
||||
$M = getDbData($table['s_mbrdata'],"memberuid='".$E['mbruid']."'",'d_regis');
|
||||
$new_pw = password_hash($pw1, PASSWORD_DEFAULT);
|
||||
|
||||
getDbUpdate($table['s_mbrid'],"pw='".$new_pw."'",'uid='.$E['mbruid']);
|
||||
getDbUpdate($table['s_mbrdata'],"last_pw='".$date['today']."',tmpcode=''",'memberuid='.$E['mbruid']);
|
||||
|
||||
if ($my['uid']) $_SESSION['mbr_pw'] = $new_pw;
|
||||
|
||||
if ($device=='mobile') {
|
||||
echo '<script type="text/javascript">';
|
||||
echo 'parent.$("#page-pw-code").loader("hide");'; //로더 숨기기
|
||||
echo 'parent.$("#modal-pwReset").removeClass("active");'; //모달 닫기
|
||||
echo 'parent.$("#modal-loginform").find("[data-role=input-'.$type.'] [name=id]").val("'.$target.'");'; //로그인 모달 >폼 아이디 입력
|
||||
echo 'parent.$("#modal-loginform").find("[name=id]").removeClass("is-invalid");'; //로그인 모달 >폼 아이디 입력폼 에러흔적제거
|
||||
echo 'parent.$("#modal-loginform").find("[name=pw]").removeClass("is-invalid").focus();'; //로그인 모달 >폼 비밀번호 입력폼 에러흔적제거, 포커스 처리
|
||||
echo 'setTimeout(function() {parent.$.notify({message: "비밀번호가 변경되었습니다."},{type: "default"});}, 900);'; // 알림메시지 출력
|
||||
echo '</script>';
|
||||
} else {
|
||||
echo '<script type="text/javascript">';
|
||||
echo 'parent.$("#modal-pwReset").modal("hide");'; //비밀번호 재설정 모달 닫기
|
||||
if (!$my['uid'] && $usertype!='admin') {
|
||||
echo 'setTimeout(function() {parent.$("#modal-login").modal("show");}, 400);'; //로그인 모달 열기
|
||||
echo 'setTimeout(function() {parent.$("#modal-login").find("[name=id]").val("'.$target.'");}, 1000);'; //로그인 모달 >폼 아이디 입력
|
||||
echo 'setTimeout(function() {parent.$("#modal-login").find("[name=pw]").focus();}, 1000);'; //로그인 모달 >폼 비밀번호 입력폼 포커스 처리
|
||||
echo 'setTimeout(function() {parent.$.notify({message: "비밀번호가 변경되었습니다."},{type: "success"});}, 1500);';
|
||||
} else {
|
||||
echo 'setTimeout(function() {parent.$.notify({message: "비밀번호가 변경되었습니다."},{type: "success"});}, 500);';
|
||||
}
|
||||
echo '</script>';
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
exit();
|
||||
|
||||
|
||||
?>
|
||||
89
modules/member/action/a.pw_search.php
Normal file
89
modules/member/action/a.pw_search.php
Normal file
@@ -0,0 +1,89 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
$result_num = 1;
|
||||
$id = trim($new_id);
|
||||
$pw_a = stripslashes(trim($new_pw_a));
|
||||
$pw1 = trim($new_pw1);
|
||||
$pw2 = trim($new_pw2);
|
||||
|
||||
if (!$id)
|
||||
{
|
||||
getLink('','','아이디를 입력해 주세요.','');
|
||||
}
|
||||
|
||||
$g['memberVarForSite'] = $g['path_var'].'site/'.$r.'/member.var.php';
|
||||
$_tmpvfile = file_exists($g['memberVarForSite']) ? $g['memberVarForSite'] : $g['path_module'].$module.'/var/var.php';
|
||||
include_once $_tmpvfile;
|
||||
|
||||
if ($d['member']['login_emailid'])
|
||||
{
|
||||
$R = getDbData($table['s_mbrdata'],"email='".$id."'",'*');
|
||||
if (!$R['memberuid']) getLink('','','존재하지 않는 이메일입니다.','');
|
||||
$M = getUidData($table['s_mbrid'],$R['memberuid']);
|
||||
}
|
||||
else
|
||||
{
|
||||
$M = getDbData($table['s_mbrid'],"id='".$id."'",'*');
|
||||
if (!$M['uid']) getLink('','','존재하지 않는 아이디입니다.','');
|
||||
$R = getDbData($table['s_mbrdata'],'memberuid='.$M['uid'],'*');
|
||||
}
|
||||
|
||||
if ($pw_a)
|
||||
{
|
||||
if ($pw_a == $R['pw_a'])
|
||||
{
|
||||
$result_num = 3;
|
||||
$alert = "인증되셨습니다.재 등록할 패스워드를 입력해 주세요.";
|
||||
|
||||
if ($pw1 && $pw2)
|
||||
{
|
||||
getDbUpdate($table['s_mbrid'],"pw='".md5($pw1)."'",'uid='.$M['uid']);
|
||||
getDbUpdate($table['s_mbrdata'],"last_pw='".$date['today']."'",'memberuid='.$M['uid']);
|
||||
|
||||
getLink(RW('mod=login'),'parent.','','');
|
||||
}
|
||||
}
|
||||
else {
|
||||
$result_num = 2;
|
||||
$alert = "질문에 대한 답변이 일치하지 않습니다.";
|
||||
}
|
||||
}
|
||||
else {
|
||||
$result_num = 2;
|
||||
$alert = "질문에 대한 답변을 입력해 주세요.";
|
||||
$pushmsg = $R['pw_q'];
|
||||
}
|
||||
?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html lang="<?php echo $_HS['lang']?>" xml:lang="<?php echo $_HS['lang']?>" xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<title></title>
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
function pwStepCheck(n)
|
||||
{
|
||||
parent.getId('pwauth_step_1').style.display = 'none';
|
||||
parent.getId('pwauth_step_2').style.display = 'none';
|
||||
parent.getId('pwauth_step_3').style.display = 'none';
|
||||
|
||||
parent.getId('pwauth_step_'+n).style.display = 'block';
|
||||
parent.getId('id_auth').value = n;
|
||||
parent.getId('pwsearchStep_'+n).focus();
|
||||
}
|
||||
pwStepCheck(<?php echo $result_num?>);
|
||||
|
||||
<?php if($pushmsg):?>
|
||||
parent.getId('pw_question').innerHTML = "<?php echo $pushmsg?>";
|
||||
<?php endif?>
|
||||
<?php if($alert):?>
|
||||
alert('<?php echo $alert?>');
|
||||
<?php endif?>
|
||||
|
||||
//]]>
|
||||
</script>
|
||||
</head>
|
||||
<body></body>
|
||||
</html>
|
||||
<?php exit?>
|
||||
58
modules/member/action/a.pw_tmp.php
Normal file
58
modules/member/action/a.pw_tmp.php
Normal file
@@ -0,0 +1,58 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
$email = trim($email);
|
||||
|
||||
if (!$email) getLink('','','정상적인 접근이 아닙니다.','');
|
||||
|
||||
$g['memberVarForSite'] = $g['path_var'].'site/'.$r.'/member.var.php';
|
||||
$_tmpvfile = file_exists($g['memberVarForSite']) ? $g['memberVarForSite'] : $g['path_module'].$module.'/var/var.php';
|
||||
include_once $_tmpvfile;
|
||||
|
||||
if (!$d['member']['join_email'])
|
||||
{
|
||||
getLink('','','죄송합니다. 대표 이메일이 등록되지 않았습니다. 관리자에게 문의해 주세요.','');
|
||||
}
|
||||
|
||||
$M = getDbData($table['s_mbrdata'],"email='".$email."'",'*');
|
||||
if (!$M['email'])
|
||||
{
|
||||
getLink('','','등록된 이메일이 아닙니다.','');
|
||||
}
|
||||
$R = getUidData($table['s_mbrid'],$M['memberuid']);
|
||||
|
||||
if ($M['tmpcode'])
|
||||
{
|
||||
getLink('','','이미 회원님의 이메일['.$M['email'].']로 \n임시 비밀번호를 발송해 드렸습니다.','');
|
||||
}
|
||||
|
||||
|
||||
$auth_pw = 'rb'.date('His');
|
||||
|
||||
include_once $g['path_core'].'function/email.func.php';
|
||||
$content = implode('',file($g['dir_module'].'doc/_pw.txt'));
|
||||
$content = str_replace('{NAME}',$M['name'],$content);
|
||||
$content = str_replace('{NICK}',$M['nic'],$content);
|
||||
$content = str_replace('{ID}',$R['id'],$content);
|
||||
$content = str_replace('{EMAIL}',$M['email'],$content);
|
||||
$content.= '<p>임시 비밀번호 : '.$auth_pw.'</p>';
|
||||
$content.= implode('',file($g['dir_module'].'doc/_sign.txt'));
|
||||
|
||||
$result = getSendMail($M['email'].'|'.$M['name'], $d['member']['join_email'].'|'.$_HS['name'], '['.$_HS['name'].'] 임시 비밀번호가 발급되었습니다.', $content, 'HTML');
|
||||
|
||||
if (!$result)
|
||||
{
|
||||
getLink('','','죄송합니다. 이메일서버가 응답하지 않아 이메일을 보내드리지 못했습니다.','');
|
||||
}
|
||||
|
||||
getDbUpdate($table['s_mbrdata'],"last_pw='".$date['today']."',tmpcode='".getCrypt($auth_pw,$M['d_regis'])."'",'memberuid='.$M['memberuid']);
|
||||
|
||||
echo '<script type="text/javascript">';
|
||||
echo 'parent.$("#request_tmpPW").addClass("has-sent");';
|
||||
echo 'parent.alertLayer("#notice","primary","['.$M['email'].'] 로 임시 비밀번호를 발송해 드렸습니다.","","","");';
|
||||
echo '</script>';
|
||||
|
||||
exit();
|
||||
|
||||
|
||||
?>
|
||||
37
modules/member/action/a.pw_update.php
Normal file
37
modules/member/action/a.pw_update.php
Normal file
@@ -0,0 +1,37 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
if (!$my['uid']) {
|
||||
getLink('reload','parent.','정상적인 접근이 아닙니다.','');
|
||||
}
|
||||
|
||||
if (!$pw1 || !$pw2) {
|
||||
echo '<script type="text/javascript">';
|
||||
echo 'parent.$("#page-settings-pw").find("[data-act=changePW]").attr("disabled",false);';
|
||||
echo 'setTimeout(function() {parent.$.notify({message: "정상적인 접근이 아닙니다."},{type: "default"});}, 300);'; // 알림메시지 출력
|
||||
echo '</script>';
|
||||
exit();
|
||||
}
|
||||
|
||||
// if (getCrypt($pw,$my['d_regis']) != $my['pw'] && $my['tmpcode'] != getCrypt($pw,$my['d_regis'])) {
|
||||
// getLink('','','현재 패스워드가 일치하지 않습니다.','');
|
||||
// }
|
||||
//
|
||||
// if ($pw == $pw1) {
|
||||
// getLink('','','현재 패스워드와 변경할 패스워드가 같습니다.','');
|
||||
// }
|
||||
|
||||
getDbUpdate($table['s_mbrid'],"pw='".password_hash($pw1, PASSWORD_DEFAULT)."'",'uid='.$my['uid']);
|
||||
getDbUpdate($table['s_mbrdata'],"last_pw='".$date['today']."',tmpcode=''",'memberuid='.$my['uid']);
|
||||
|
||||
$_SESSION['mbr_pw'] = password_hash($pw1, PASSWORD_DEFAULT);
|
||||
|
||||
echo '<script type="text/javascript">';
|
||||
echo 'parent.$("#page-settings-pw").find("[data-act=changePW]").attr("disabled",false);';
|
||||
echo 'parent.history.back();';
|
||||
echo 'setTimeout(function() {parent.$.notify({message: "비밀번호가 변경되었습니다."},{type: "default"});}, 500);'; // 알림메시지 출력
|
||||
echo '</script>';
|
||||
|
||||
exit();
|
||||
|
||||
?>
|
||||
113
modules/member/action/a.regis_member.php
Normal file
113
modules/member/action/a.regis_member.php
Normal file
@@ -0,0 +1,113 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
$d['member']['join_enable'] = "1";
|
||||
$d['member']['join_mobile'] = "1";
|
||||
$d['member']['join_out'] = "2";
|
||||
$d['member']['join_rejoin'] = "0";
|
||||
$d['member']['join_auth'] = "1";
|
||||
$d['member']['join_level'] = "1";
|
||||
$d['member']['join_group'] = "1";
|
||||
$d['member']['join_point'] = "0";
|
||||
|
||||
$name =$_POST['name'];
|
||||
$id =$_POST['id'];
|
||||
$pw =$_POST['pw'];
|
||||
$nic =$_POST['nic'];
|
||||
$email =$_POST['email'];
|
||||
$sosok =$_POST['sosok'];
|
||||
$admin =$_POST['admin'];
|
||||
|
||||
for($i=0;$i<count($id);$i++)
|
||||
{
|
||||
getDbInsert($table['s_mbrid'],'site,id,pw',"'$s','$id[$i]','".password_hash($pw[$i], PASSWORD_DEFAULT)."'");
|
||||
$memberuid = getDbCnt($table['s_mbrid'],'max(uid)','');
|
||||
$auth = $d['member']['join_auth'];
|
||||
$sosok = $sosok?$sosok:$d['member']['join_group'];
|
||||
$level = $d['member']['join_level'];
|
||||
$comp = '1';
|
||||
$admin = $admin;
|
||||
$name = $name;
|
||||
$photo = '';
|
||||
$home = $home ? (strstr($home,'http://')?str_replace('http://','',$home):$home) : '';
|
||||
$birth1 = $birth_1;
|
||||
$birth2 = $birth_2.$birth_3;
|
||||
$birthtype = $birthtype ? $birthtype : 0;
|
||||
|
||||
if(!$foreign)
|
||||
{
|
||||
$zip = $comp_zip_1.$comp_zip_2;
|
||||
$addrx = explode(' ',$comp_addr1);
|
||||
$addr0 = $comp_addr1 && $comp_addr2 ? substr($comp_addr1,0,6) : '';
|
||||
$addr1 = $comp_addr1 && $comp_addr2 ? $comp_addr1 : '';
|
||||
$addr2 = trim($comp_addr2);
|
||||
}
|
||||
else {
|
||||
$zip = '';
|
||||
$addr0 = '해외';
|
||||
$addr1 = '';
|
||||
$addr2 = '';
|
||||
}
|
||||
$job = trim($job);
|
||||
$smail = 0;
|
||||
$point = $d['member']['join_point'];
|
||||
$usepoint = 0;
|
||||
$money = 0;
|
||||
$cash = 0;
|
||||
$num_login = 1;
|
||||
$now_log = 1;
|
||||
$last_log = $date['totime'];
|
||||
$last_pw = $date['totime'];
|
||||
$is_paper = 0;
|
||||
$d_regis = $date['totime'];
|
||||
$sns = $sns_0.'|'.$sns_1.'|'.$sns_2.'|'.$sns_3.'|'.$sns_4.'|'.$sns_5.'|'.$sns_6.'|'.$sns_7.'|'.$sns_8.'|'.$sns_9.'|';
|
||||
$addfield = '';
|
||||
|
||||
|
||||
|
||||
$_QKEY = "memberuid,site,auth,sosok,level,comp,admin,adm_view,";
|
||||
$_QKEY.= "email,name,nic,grade,photo,home,sex,birth1,birth2,birthtype,phone,tel,zip,";
|
||||
$_QKEY.= "addr0,addr1,addr2,job,marr1,marr2,sms,mailing,smail,point,usepoint,money,cash,num_login,pw_q,pw_a,now_log,last_log,last_pw,is_paper,d_regis,tmpcode,sns,addfield";
|
||||
$_QVAL = "'$memberuid','$s','$auth','$sosok[$i]','$level','$comp','$admin[$i]','',";
|
||||
$_QVAL.= "'$email[$i]','$name[$i]','$nic[$i]','','$photo','$home','$sex','$birth1','$birth2','$birthtype','$phone','$tel','$zip',";
|
||||
$_QVAL.= "'$addr0','$addr1','$addr2','$job','$marr1','$marr2','$sms','$mailing','$smail','$point','$usepoint','$money','$cash','$num_login','$pw_q','$pw_a','$now_log','$last_log','$last_pw','$is_paper','$d_regis','','$sns','$addfield'";
|
||||
getDbInsert($table['s_mbrdata'],$_QKEY,$_QVAL);
|
||||
getDbUpdate($table['s_mbrlevel'],'num=num+1','uid='.$level);
|
||||
getDbUpdate($table['s_mbrgroup'],'num=num+1','uid='.$sosok);
|
||||
getDbUpdate($table['s_numinfo'],'login=login+1,mbrjoin=mbrjoin+1',"date='".$date['today']."' and site=".$s);
|
||||
|
||||
|
||||
if ($comp)
|
||||
{
|
||||
$comp_num = $comp_num_1 && $comp_num_2 && $comp_num_3 ? $comp_num_1.$comp_num_2.$comp_num_3 : 0;
|
||||
//$comp_type = $comp_type;
|
||||
$comp_name = trim($comp_name);
|
||||
$comp_ceo = trim($comp_ceo);
|
||||
$comp_upte = trim($comp_upte);
|
||||
$comp_jongmok = trim($comp_jongmok);
|
||||
$comp_tel = $comp_tel_1 && $comp_tel_2 ? $comp_tel_1 .'-'. $comp_tel_2 .($comp_tel_3 ? '-'.$comp_tel_3 : '') : '';
|
||||
$comp_fax = $comp_fax_1 && $comp_fax_2 && $comp_fax_3 ? $comp_fax_1 .'-'. $comp_fax_2 .'-'. $comp_fax_3 : '';
|
||||
$comp_zip = $comp_zip_1.$comp_zip_2;
|
||||
$comp_addr0 = $comp_addr1 && $comp_addr2 ? substr($comp_addr1,0,6) : '';
|
||||
$comp_addr1 = $comp_addr1 && $comp_addr2 ? $comp_addr1 : '';
|
||||
$comp_addr2 = trim($comp_addr2);
|
||||
$comp_part = trim($comp_part);
|
||||
$comp_level = trim($comp_level);
|
||||
|
||||
$_QKEY = "memberuid,comp_num,comp_type,comp_name,comp_ceo,comp_upte,comp_jongmok,";
|
||||
$_QKEY.= "comp_tel,comp_fax,comp_zip,comp_addr0,comp_addr1,comp_addr2,comp_part,comp_level";
|
||||
$_QVAL = "'$memberuid','$comp_num','$comp_type','$comp_name','$comp_ceo','$comp_upte','$comp_jongmok',";
|
||||
$_QVAL.= "'$comp_tel','$comp_fax','$comp_zip','$comp_addr0','$comp_addr1','$comp_addr2','$comp_part','$comp_level'";
|
||||
getDbInsert($table['s_mbrcomp'],$_QKEY,$_QVAL);
|
||||
}
|
||||
if ($point)
|
||||
{
|
||||
getDbInsert($table['s_point'],'my_mbruid,by_mbruid,price,content,d_regis',"'$memberuid','0','$point','".$d['member']['join_pointmsg']."','$d_regis'");
|
||||
}
|
||||
|
||||
}// for 문
|
||||
|
||||
getLink('reload','parent.','회원등록이 정상 처리되었습니다.','');
|
||||
|
||||
|
||||
?>
|
||||
133
modules/member/action/a.same_check.php
Normal file
133
modules/member/action/a.same_check.php
Normal file
@@ -0,0 +1,133 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
if (!$fname || !$fvalue) exit;
|
||||
|
||||
$g['memberVarForSite'] = $g['path_var'].'site/'.$r.'/member.var.php';
|
||||
$_tmpvfile = file_exists($g['memberVarForSite']) ? $g['memberVarForSite'] : $g['path_module'].$module.'/var/var.php';
|
||||
include_once $_tmpvfile;
|
||||
|
||||
if ($my['admin'])
|
||||
{
|
||||
$resultnum = 1;
|
||||
$resultmsg = 'OK!';
|
||||
$resultclass = 'is-valid';
|
||||
}
|
||||
else {
|
||||
if ($fname == 'id')
|
||||
{
|
||||
if (strstr(','.$d['member']['join_cutid'].',',','.$fvalue.','))
|
||||
{
|
||||
$resultnum = 0;
|
||||
$resultmsg = '사용할 수 없는 아이디입니다';
|
||||
$resultclass = 'is-invalid';
|
||||
}
|
||||
else
|
||||
{
|
||||
$isId = getDbRows($table['s_mbrid'],"id='".$fvalue."'");
|
||||
if (!$isId)
|
||||
{
|
||||
if(!$d['member']['join_rejoin'])
|
||||
{
|
||||
if(is_file($g['path_tmp'].'out/'.$fvalue.'.txt'))
|
||||
{
|
||||
$resultnum = 0;
|
||||
$resultmsg = '사용할 수 없는 아이디입니다';
|
||||
$resultclass = 'is-invalid';
|
||||
}
|
||||
else {
|
||||
$resultnum = 1;
|
||||
$resultmsg = '';
|
||||
$resultclass = 'is-valid';
|
||||
}
|
||||
}
|
||||
else {
|
||||
$resultnum = 1;
|
||||
$resultmsg = '';
|
||||
$resultclass = 'is-valid';
|
||||
}
|
||||
}
|
||||
else {
|
||||
$resultnum = 0;
|
||||
$resultmsg = '사용할 수 없는 아이디입니다';
|
||||
$resultclass = 'is-invalid';
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($fname == 'email')
|
||||
{
|
||||
$isId = getDbRows($table['s_mbremail'],"email='".$fvalue."'");
|
||||
if (!$isId)
|
||||
{
|
||||
$resultnum = 1;
|
||||
$resultmsg = '';
|
||||
$resultclass = 'is-valid';
|
||||
}
|
||||
else {
|
||||
$resultnum = 0;
|
||||
$resultmsg = '이미 존재하는 이메일입니다';
|
||||
$resultclass = 'is-invalid';
|
||||
}
|
||||
}
|
||||
if ($fname == 'nic')
|
||||
{
|
||||
|
||||
if (strstr(','.$d['member']['join_cutnic'].',',','.$fvalue.',') && !$my['admin'])
|
||||
{
|
||||
$resultnum = 0;
|
||||
$resultmsg = '이미 존재하는 닉네임입니다';
|
||||
$resultclass = 'is-invalid';
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($my['admin'])
|
||||
{
|
||||
$resultnum = 1;
|
||||
$resultmsg = '';
|
||||
$resultclass = 'is-valid';
|
||||
}
|
||||
else {
|
||||
if($my['uid'])
|
||||
{
|
||||
$isId = getDbRows($table['s_mbrdata'],"nic='".$fvalue."' and nic<>'".$my['nic']."'");
|
||||
}
|
||||
else {
|
||||
$isId = getDbRows($table['s_mbrdata'],"nic='".$fvalue."'");
|
||||
}
|
||||
if (!$isId)
|
||||
{
|
||||
$resultnum = 1;
|
||||
$resultmsg = '';
|
||||
$resultclass = 'is-valid';
|
||||
}
|
||||
else {
|
||||
$resultnum = 0;
|
||||
$resultmsg = '이미 존재하는 닉네임입니다.';
|
||||
$resultclass = 'is-invalid';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html lang="<?php echo $_HS['lang']?>">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title></title>
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
<?php if(!$resultnum):?>
|
||||
// parent.document.getElementById("memberForm").<?php echo $fname?>.value = '';
|
||||
parent.document.getElementById("memberForm").<?php echo $fname?>.focus();
|
||||
parent.document.getElementById("<?php echo $flayer?>").className = "invalid-feedback";
|
||||
<?php endif?>
|
||||
parent.document.getElementById("memberForm").<?php echo $fname?>.classList.add("<?php echo $resultclass?>");
|
||||
parent.document.getElementById("memberForm").check_<?php echo $fname?>.value = "<?php echo $resultnum?>";
|
||||
parent.document.getElementById("<?php echo $flayer?>").innerHTML = '<?php echo addslashes($resultmsg)?>';
|
||||
//]]>
|
||||
</script>
|
||||
</head>
|
||||
<body></body>
|
||||
</html>
|
||||
<?php exit?>
|
||||
142
modules/member/action/a.same_multicheck.php
Normal file
142
modules/member/action/a.same_multicheck.php
Normal file
@@ -0,0 +1,142 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
if (!$fname || !$fvalue) exit;
|
||||
|
||||
$g['memberVarForSite'] = $g['path_var'].'site/'.$r.'/member.var.php';
|
||||
$_tmpvfile = file_exists($g['memberVarForSite']) ? $g['memberVarForSite'] : $g['path_module'].$module.'/var/var.php';
|
||||
include_once $_tmpvfile;
|
||||
|
||||
if ($fname == 'id[]')
|
||||
{
|
||||
if (strstr(','.$d['member']['join_cutid'].',',','.$fvalue.','))
|
||||
{
|
||||
$resultnum = 0;
|
||||
$resultmsg = '사용 제한된 아이디입니다. ';
|
||||
}
|
||||
else
|
||||
{
|
||||
$isId = getDbRows($table['s_mbrid'],"id='".$fvalue."'");
|
||||
if (!$isId)
|
||||
{
|
||||
if(!$d['member']['join_rejoin'])
|
||||
{
|
||||
if(is_file($g['path_tmp'].'out/'.$fvalue.'.txt'))
|
||||
{
|
||||
$resultnum = 0;
|
||||
$resultmsg = '탈퇴한 아이디 입니다';
|
||||
}
|
||||
else {
|
||||
$resultnum = 1;
|
||||
$resultmsg = '<span class="ok">OK!</span>';
|
||||
}
|
||||
}
|
||||
else {
|
||||
$resultnum = 1;
|
||||
$resultmsg = '<span class="ok">OK!</span>';
|
||||
}
|
||||
}
|
||||
else {
|
||||
$resultnum = 0;
|
||||
$resultmsg = '이미 사용중인 아이디입니다';
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($fname == 'email[]')
|
||||
{
|
||||
if ($my['uid'])
|
||||
{
|
||||
$isId = getDbRows($table['s_mbrdata'],"email='".$fvalue."' and email <> '".$my['email']."'");
|
||||
}
|
||||
else {
|
||||
$isId = getDbRows($table['s_mbrdata'],"email='".$fvalue."'");
|
||||
}
|
||||
if (!$isId)
|
||||
{
|
||||
$resultnum = 1;
|
||||
$resultmsg = '<span class="ok">OK!</span>';
|
||||
}
|
||||
else {
|
||||
$resultnum = 0;
|
||||
$resultmsg = '이미 존재하는 이메일입니다';
|
||||
}
|
||||
}
|
||||
if ($fname == 'nic[]')
|
||||
{
|
||||
|
||||
if (strstr(','.$d['member']['join_cutnic'].',',','.$fvalue.',') && !$my['admin'])
|
||||
{
|
||||
$resultnum = 0;
|
||||
$resultmsg = '이미 존재하는 닉네임입니다';
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($my['admin'])
|
||||
{
|
||||
$resultnum = 1;
|
||||
$resultmsg = '<span class="ok">OK!</span>';
|
||||
}
|
||||
else {
|
||||
if($my['uid'])
|
||||
{
|
||||
$isId = getDbRows($table['s_mbrdata'],"nic='".$fvalue."' and nic<>'".$my['nic']."'");
|
||||
}
|
||||
else {
|
||||
$isId = getDbRows($table['s_mbrdata'],"nic='".$fvalue."'");
|
||||
}
|
||||
if (!$isId)
|
||||
{
|
||||
$resultnum = 1;
|
||||
$resultmsg = '<span class="ok">OK!</span>';
|
||||
}
|
||||
else {
|
||||
$resultnum = 0;
|
||||
$resultmsg = '이미 존재하는 닉네임입니다';
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
?>
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html lang="<?php echo $_HS['lang']?>" xml:lang="<?php echo $_HS['lang']?>" xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
||||
<title></title>
|
||||
<script type="text/javascript">
|
||||
//<![CDATA[
|
||||
function re_fales()
|
||||
{
|
||||
|
||||
var d = parent.document.getElementsByName('<?php echo $fname?>');
|
||||
var n = d.length;
|
||||
var j = 0;
|
||||
var i;
|
||||
var s = '';
|
||||
|
||||
for( i=0;i<n;i++)
|
||||
{
|
||||
if(d[i].value=='<?php echo $fvalue?>')
|
||||
{
|
||||
d[i].value='';
|
||||
setTimeout(function()
|
||||
{
|
||||
d[i].focus()
|
||||
}, 10);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
parent.document.procForm.check_id.value = "<?php echo $resultnum?>";
|
||||
<?php if($resultnum==0):?>
|
||||
alert('\n <?php echo addslashes($resultmsg)?>\n');
|
||||
re_fales();
|
||||
<?php endif?>
|
||||
//]]>
|
||||
</script>
|
||||
</head>
|
||||
<body></body>
|
||||
</html>
|
||||
<?php exit?>
|
||||
26
modules/member/action/a.saved_category.php
Normal file
26
modules/member/action/a.saved_category.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
if (!$my['uid'])
|
||||
{
|
||||
getLink('','','정상적인 접근이 아닙니다.','');
|
||||
}
|
||||
|
||||
$category = trim($category);
|
||||
|
||||
if ($my['admin'])
|
||||
{
|
||||
foreach($members as $val)
|
||||
{
|
||||
getDbUpdate($table['s_saved'],"category='".$category."'",'uid='.$val);
|
||||
}
|
||||
}
|
||||
else {
|
||||
foreach($members as $val)
|
||||
{
|
||||
getDbUpdate($table['s_saved'],"category='".$category."'",'uid='.$val.' and mbruid='.$my['uid']);
|
||||
}
|
||||
}
|
||||
|
||||
getLink('reload','parent.','','');
|
||||
?>
|
||||
24
modules/member/action/a.saved_delete.php
Normal file
24
modules/member/action/a.saved_delete.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
if (!$my['uid'])
|
||||
{
|
||||
getLink('','','정상적인 접근이 아닙니다.','');
|
||||
}
|
||||
|
||||
if ($my['admin'])
|
||||
{
|
||||
foreach($members as $val)
|
||||
{
|
||||
getDbDelete($table['s_saved'],'uid='.$val);
|
||||
}
|
||||
}
|
||||
else {
|
||||
foreach($members as $val)
|
||||
{
|
||||
getDbDelete($table['s_saved'],'uid='.$val.' and mbruid='.$my['uid']);
|
||||
}
|
||||
}
|
||||
|
||||
getLink('reload','parent.','','');
|
||||
?>
|
||||
24
modules/member/action/a.saved_multi_delete.php
Normal file
24
modules/member/action/a.saved_multi_delete.php
Normal file
@@ -0,0 +1,24 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
if (!$my['uid'])
|
||||
{
|
||||
getLink('','','정상적인 접근이 아닙니다.','');
|
||||
}
|
||||
|
||||
if ($my['admin'])
|
||||
{
|
||||
foreach($members as $val)
|
||||
{
|
||||
getDbDelete($table['s_saved'],'uid='.$val);
|
||||
}
|
||||
}
|
||||
else {
|
||||
foreach($members as $val)
|
||||
{
|
||||
getDbDelete($table['s_saved'],'uid='.$val.' and mbruid='.$my['uid']);
|
||||
}
|
||||
}
|
||||
|
||||
getLink('reload','parent.','','');
|
||||
?>
|
||||
16
modules/member/action/a.search_member.php
Normal file
16
modules/member/action/a.search_member.php
Normal file
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
$data = array();
|
||||
|
||||
$Mbrs=getDbArray($table['s_mbrdata'],"nic like '%".$nic."%'",'memberuid,nic,name,email,photo','point','desc','',1);
|
||||
$mbrData = '';
|
||||
while($R=db_fetch_array($Mbrs)){
|
||||
if (!$R['photo']) $R['photo'] = '0.gif';
|
||||
$mbrData .= $R['nic'].'|'.$R['photo'].',';
|
||||
}
|
||||
$data['mbrlist'] = $mbrData;
|
||||
|
||||
echo json_encode($data);
|
||||
exit;
|
||||
?>
|
||||
60
modules/member/action/a.send_verifyCode.php
Normal file
60
modules/member/action/a.send_verifyCode.php
Normal file
@@ -0,0 +1,60 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
$value = trim($value);
|
||||
|
||||
if (!$value) getLink('','','정상적인 접근이 아닙니다.','');
|
||||
|
||||
$g['memberVarForSite'] = $g['path_var'].'site/'.$r.'/member.var.php';
|
||||
$_tmpvfile = file_exists($g['memberVarForSite']) ? $g['memberVarForSite'] : $g['path_module'].$module.'/var/var.php';
|
||||
include_once $_tmpvfile;
|
||||
|
||||
$verify_code = date('His');
|
||||
|
||||
if ($type=='email') {
|
||||
if (!$d['member']['join_email'])
|
||||
{
|
||||
getLink('','','죄송합니다. 대표 이메일이 등록되지 않았습니다. 관리자에게 문의해 주세요.','');
|
||||
}
|
||||
|
||||
$M = getDbData($table['s_mbrdata'],"email='".$value."'",'*');
|
||||
if (!$M['email'])
|
||||
{
|
||||
getLink('','','등록된 이메일이 아닙니다.','');
|
||||
}
|
||||
$R = getUidData($table['s_mbrid'],$M['memberuid']);
|
||||
|
||||
|
||||
|
||||
include_once $g['path_core'].'function/email.func.php';
|
||||
$content = implode('',file($g['dir_module'].'doc/_verify.txt'));
|
||||
$content = str_replace('{NAME}',$M['name'],$content);
|
||||
$content = str_replace('{NICK}',$M['nic'],$content);
|
||||
$content = str_replace('{ID}',$R['id'],$content);
|
||||
$content = str_replace('{EMAIL}',$M['email'],$content);
|
||||
$content.= '<p>인증번호 : '.$verify_code.'</p>';
|
||||
$content.= implode('',file($g['dir_module'].'doc/_sign.txt'));
|
||||
|
||||
$result = getSendMail($M['email'].'|'.$M['name'], $d['member']['join_email'].'|'.$_HS['name'], '['.$_HS['name'].'] 본인확인용 인증코드가 발급되었습니다.', $content, 'HTML');
|
||||
|
||||
if (!$result)
|
||||
{
|
||||
getLink('','','죄송합니다. 이메일서버가 응답하지 않아 이메일을 보내드리지 못했습니다.','');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
// 인증코드 저장
|
||||
// getDbUpdate($table['s_mbrdata'],"last_pw='".$date['today']."',tmpcode='".getCrypt($auth_pw,$M['d_regis'])."'",'memberuid='.$my['uid']);
|
||||
|
||||
echo '<script type="text/javascript">';
|
||||
echo 'parent.$("#verify_email_area").removeClass("d-none");';
|
||||
echo 'parent.$("#send_verifyCode").attr("disabled",false);';
|
||||
echo 'parent.$("[name=email_code]").focus();';
|
||||
echo '</script>';
|
||||
|
||||
exit();
|
||||
|
||||
?>
|
||||
12
modules/member/action/a.session.setting.php
Normal file
12
modules/member/action/a.session.setting.php
Normal file
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
if ($check) $_SESSION[$name] = $_SESSION[$name] ? '' : $value;
|
||||
else $_SESSION[$name] = $value;
|
||||
|
||||
if ($target)
|
||||
{
|
||||
getLink('reload',$target,'','');
|
||||
}
|
||||
exit;
|
||||
?>
|
||||
88
modules/member/action/a.settings_account.php
Normal file
88
modules/member/action/a.settings_account.php
Normal file
@@ -0,0 +1,88 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
if (!$my['uid']) getLink('','','정상적인 접근이 아닙니다.','');
|
||||
|
||||
|
||||
if ($act == 'pw') // 비밀번호 변경
|
||||
{
|
||||
|
||||
if ($my['last_pw']) {
|
||||
if (!$pw1 || !$pw2) {
|
||||
getLink('','','정상적인 접근이 아닙니다.','');
|
||||
}
|
||||
|
||||
//if (getCrypt($pw,$my['d_regis']) != $my['pw'] && $my['tmpcode'] != getCrypt($pw,$my['d_regis'])) {
|
||||
//getLink('reload','parent.','현재 비밀번호가 일치하지 않습니다.','');
|
||||
//}
|
||||
|
||||
if ($pw == $pw1) {
|
||||
getLink('reload','parent.','현재 비밀번호와 변경할 비밀번호가 같습니다.','');
|
||||
}
|
||||
}
|
||||
|
||||
getDbUpdate($table['s_mbrid'],"pw='".password_hash($pw1, PASSWORD_DEFAULT)."'",'uid='.$my['uid']);
|
||||
getDbUpdate($table['s_mbrdata'],"last_pw='".$date['today']."',tmpcode=''",'memberuid='.$my['uid']);
|
||||
|
||||
$_SESSION['mbr_pw'] = password_hash($pw1, PASSWORD_DEFAULT);
|
||||
|
||||
|
||||
// 알림전송
|
||||
include $g['dir_module'].'var/noti/_settings_account_pw.php'; // 알림메시지 양식
|
||||
$noti_title = $d['member']['noti_title'];
|
||||
$noti_body = $d['member']['noti_body'];
|
||||
$noti_referer = '';
|
||||
$noti_button = $d['member']['noti_button'];
|
||||
$noti_tag = '';
|
||||
$noti_skipEmail = 0;
|
||||
$noti_skipPush = 0;
|
||||
putNotice($my['uid'],$m,0,$noti_title,$noti_body,$noti_referer,$noti_button,$noti_tag,$noti_skipEmail,$noti_skipPush);
|
||||
|
||||
setrawcookie('member_settings_result', rawurlencode('비밀번호가 변경되었습니다.|success')); // 처리여부 cookie 저장
|
||||
getLink('reload','parent.','','');
|
||||
|
||||
}
|
||||
|
||||
if ($act == 'id')
|
||||
{
|
||||
|
||||
$g['memberVarForSite'] = $g['path_var'].'site/'.$r.'/member.var.php';
|
||||
$_tmpvfile = file_exists($g['memberVarForSite']) ? $g['memberVarForSite'] : $g['path_module'].$module.'/var/var.php';
|
||||
include_once $_tmpvfile;
|
||||
|
||||
if(!$id || $id==$my['id']) {
|
||||
echo '<script type="text/javascript">';
|
||||
echo 'parent.$("#idChangeForm").find("[type=submit]").attr("disabled",false);';
|
||||
echo '</script>';
|
||||
exit();
|
||||
}
|
||||
|
||||
$isId = getDbRows($table['s_mbrid'],"id='".$id."' and id<>'".$my['id']."'");
|
||||
|
||||
if (strstr(','.$d['member']['join_cutid'].',',','.$id.',') || $isId || !$d['member']['join_rejoin'] || is_file($g['path_tmp'].'out/'.$fvalue.'.txt')) {
|
||||
echo '<script type="text/javascript">';
|
||||
echo 'parent.$("#idChangeForm").find("[name=id]").addClass("is-invalid").focus();';
|
||||
echo 'parent.$("#idChangeForm").find("[name=check_id]").val(0);';
|
||||
echo 'parent.$("#id-feedback").text("사용할 수 없는 아이디입니다");';
|
||||
echo 'parent.$("#idChangeForm").find("[type=submit]").attr("disabled",false);';
|
||||
echo '</script>';
|
||||
exit();
|
||||
}
|
||||
|
||||
getDbUpdate($table['s_mbrid'],"id='".$id."'",'uid='.$my['uid']);
|
||||
|
||||
// 알림전송
|
||||
include $g['dir_module'].'var/noti/_settings_account_id.php'; // 알림메시지 양식
|
||||
$noti_title = $d['member']['noti_title'];
|
||||
$noti_body = $d['member']['noti_body'];
|
||||
$noti_referer = '';
|
||||
$noti_button = $d['member']['noti_button'];
|
||||
$noti_tag = '';
|
||||
$noti_skipEmail = 0;
|
||||
$noti_skipPush = 0;
|
||||
putNotice($my['uid'],$m,0,$noti_title,$noti_body,$noti_referer,$noti_button,$noti_tag,$noti_skipEmail,$noti_skipPush);
|
||||
|
||||
setrawcookie('member_settings_result', rawurlencode('아이디가 변경되었습니다.|success')); // 처리여부 cookie 저장
|
||||
getLink('reload','parent.','','');
|
||||
}
|
||||
?>
|
||||
35
modules/member/action/a.settings_connect.php
Normal file
35
modules/member/action/a.settings_connect.php
Normal file
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
if (!$my['uid']) {
|
||||
getLink('','','정상적인 접근이 아닙니다.','');
|
||||
}
|
||||
|
||||
$R = getUidData($table['s_mbrsns'],$uid);
|
||||
|
||||
|
||||
//sns 삭제
|
||||
if ($act=='del') {
|
||||
|
||||
if (!$uid || !$R['uid']) getLink('','','정상적인 접근이 아닙니다.','');
|
||||
|
||||
$num_connected=getDbRows($table['s_mbrsns'],'uid<>'.$uid.' and mbruid='.$my['uid']); // 연결된 SNS 수량
|
||||
|
||||
if (!$num_connected && !$my['last_pw']) { //소셜미디어 단독계정인 경우 연결헤제시 접속 방법이 없기 때문에 비밀번호 등록을 유도함
|
||||
getLink($g['s'].'?r='.$r.'&mod=settings&page=account','parent.','연결을 끊을수 없습니다. 비밀번호 등록후 진행해 주세요.','');
|
||||
}
|
||||
|
||||
getDbDelete($table['s_mbrsns'],'uid='.$uid.' and mbruid='.$my['uid']);
|
||||
|
||||
if ($R['backup']==1) { //삭제한 이메일이 백업 이메일 경우
|
||||
getDbUpdate($table['s_mbrdata'],'email_backup=1','memberuid='.$my['uid']); //백업이메일 설정을 본인확인된 전체메일로 설정
|
||||
}
|
||||
|
||||
setrawcookie('member_settings_result', rawurlencode('연결이 해제 되었습니다.|success')); // 처리여부 cookie 저장
|
||||
getLink('reload','parent.','','');
|
||||
|
||||
}
|
||||
|
||||
|
||||
exit();
|
||||
?>
|
||||
197
modules/member/action/a.settings_email.php
Normal file
197
modules/member/action/a.settings_email.php
Normal file
@@ -0,0 +1,197 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
if (!$my['uid']) {
|
||||
getLink('','','정상적인 접근이 아닙니다.','');
|
||||
}
|
||||
|
||||
$R = getUidData($table['s_mbremail'],$uid);
|
||||
|
||||
// 이메일 추가
|
||||
if ($act=='add') {
|
||||
|
||||
if (!$email) getLink('','','정상적인 접근이 아닙니다.','');
|
||||
|
||||
$isId = getDbRows($table['s_mbremail'],"email='".$email."'");
|
||||
|
||||
$numEmails = getDbRows($table['s_mbremail'],"mbruid='".$my['uid']."'");
|
||||
|
||||
if ($numEmails>4) {
|
||||
getLink('reload','parent.','더 이상 이메일을 추가할 수 없습니다.','');
|
||||
}
|
||||
|
||||
if ($isId) {
|
||||
echo '<script type="text/javascript">';
|
||||
echo 'parent.$("#emailsForm").find("[name=email]").addClass("is-invalid");';
|
||||
echo 'parent.$("#emailsForm").find(".invalid-feedback").text("이미 추가되거나 가입된 이메일입니다");';
|
||||
echo 'parent.$("#emailsForm").find("[type=submit]").attr("disabled",false);';
|
||||
echo '</script>';
|
||||
} else {
|
||||
$d_regis = $date['totime'];
|
||||
getDbInsert($table['s_mbremail'],'mbruid,email,d_regis,d_verified',"'".$my['uid']."','".trim($email)."',$d_regis,''");
|
||||
setrawcookie('member_settings_result', rawurlencode('이메일이 추가 되었습니다.|success')); // 처리여부 cookie 저장
|
||||
getLink('reload','parent.','','');
|
||||
}
|
||||
}
|
||||
|
||||
//이메일 삭제
|
||||
if ($act=='del') {
|
||||
if (!$uid || !$R['uid']) getLink('','','정상적인 접근이 아닙니다.','');
|
||||
getDbDelete($table['s_mbremail'],'uid='.$uid.' and mbruid='.$my['uid']);
|
||||
getDbDelete($table['s_code'],'entry='.$uid.' and mbruid='.$my['uid'].' and name="settings_email" and email=1');
|
||||
|
||||
if ($R['backup']==1) { //삭제한 이메일이 기본 이메일 일 경우
|
||||
getDbUpdate($table['s_mbrdata'],'email_backup=1','memberuid='.$my['uid']); //백업이메일 설정을 본인확인된 전체메일로 설정
|
||||
}
|
||||
|
||||
if ($R['backup']==1) { //삭제한 이메일이 백업 이메일 경우
|
||||
getDbUpdate($table['s_mbrdata'],'email_backup=1','memberuid='.$my['uid']); //백업이메일 설정을 본인확인된 전체메일로 설정
|
||||
}
|
||||
|
||||
setrawcookie('member_settings_result', rawurlencode('이메일이 삭제 되었습니다.|success')); // 처리여부 cookie 저장
|
||||
getLink('reload','parent.','','');
|
||||
|
||||
}
|
||||
|
||||
//인증번호 발송
|
||||
if ($act=='send_code') {
|
||||
|
||||
$g['memberVarForSite'] = $g['path_var'].'site/'.$r.'/member.var.php';
|
||||
$_tmpvfile = file_exists($g['memberVarForSite']) ? $g['memberVarForSite'] : $g['path_module'].$m.'/var/var.php';
|
||||
include_once $_tmpvfile;
|
||||
|
||||
$verify_code = date('His');
|
||||
$code_name = 'settings_email';
|
||||
$d_regis = $date['totime'];
|
||||
$mbruid = $my['uid'];
|
||||
|
||||
$email_from = $d['member']['join_email']?$d['member']['join_email']:$d['admin']['sysmail'];
|
||||
|
||||
if (!$email_from) {
|
||||
getLink('','','죄송합니다. 발신 이메일 주소가 등록되지 않았습니다. 관리자에게 문의해 주세요.','');
|
||||
}
|
||||
|
||||
if (!$R['email']) {
|
||||
getLink('','','등록된 이메일이 아닙니다.','');
|
||||
}
|
||||
|
||||
include_once $g['path_core'].'function/email.func.php';
|
||||
$content = implode('',file($g['path_module'].'/admin/var/email.header.txt')); //이메일 헤더 양식
|
||||
$content .= implode('',file($g['dir_module'].'doc/email/_settings.auth.email.txt')); //이메일 본문 양식
|
||||
$content .= implode('',file($g['path_module'].'/admin/var/email.footer.txt')); // //이메일 풋터 양식
|
||||
$content = str_replace('{NAME}',$my['name'],$content);
|
||||
$content = str_replace('{NICK}',$my['nic'],$content);
|
||||
$content = str_replace('{EMAIL_MAIN}',$email_from,$content); //대표 이메일
|
||||
$content = str_replace('{TEL_MAIN}',$d['member']['join_tel']?$d['member']['join_tel']:$d['admin']['sms_tel'],$content); // 대표 전화
|
||||
$content = str_replace('{SITE}',$_HS['name'],$content); //사이트명
|
||||
$content = str_replace('{CODE}',$verify_code,$content); //인증번호
|
||||
$content = str_replace('{TIME}',$d['member']['settings_keyexpire'],$content); //인증제한시간
|
||||
|
||||
//$content.= '<p>'.$R['email'].' 본인확인 인증번호 : '.$verify_code.'</p>';
|
||||
|
||||
$result = getSendMail($R['email'].'|'.$my['name'], $email_from.'|'.$_HS['name'], '['.$R['email'].'] 본인확인용 인증번호가 발급되었습니다.', $content, 'HTML');
|
||||
|
||||
if (!$result) {
|
||||
getLink('reload','parent.','죄송합니다. 이메일서버가 응답하지 않아 이메일을 보내드리지 못했습니다.','');
|
||||
}
|
||||
|
||||
$has_code_query = 'mbruid='.$my['uid'].' and name="settings_email" and entry='.$uid.' and email=1';
|
||||
$has_code=getDbRows($table['s_code'],$has_code_query); // 코드 발급여부
|
||||
|
||||
getDbDelete($table['s_code'],$has_code_query); //재발급시 기존 인증코드 삭제
|
||||
|
||||
// 신규 인증코드 저장
|
||||
$_QKEY = "mbruid,name,entry,code,sms,email,d_regis";
|
||||
$_QVAL = "'$mbruid','$code_name','$uid','$verify_code','0','1','$d_regis'";
|
||||
getDbInsert($table['s_code'],$_QKEY,$_QVAL);
|
||||
|
||||
//코드발급시점 저장(갱신)
|
||||
getDbUpdate($table['s_mbremail'],'d_code='.$d_regis,'uid='.$R['uid']);
|
||||
|
||||
setrawcookie('member_settings_result', rawurlencode('요청하신 이메일로 인증번호가 전송 되었습니다.|success')); // 처리여부 cookie 저장
|
||||
//setrawcookie('settings_email_code_'.$uid, rawurlencode('')); // 처리여부 cookie 저장
|
||||
getLink('reload','parent.','','');
|
||||
|
||||
}
|
||||
|
||||
//기본 이메일 저장
|
||||
if ($act=='save_primary') {
|
||||
|
||||
$email = $R['email'];
|
||||
|
||||
getDbUpdate($table['s_mbremail'],'base=0','mbruid='.$my['uid']); // 기본 이메일 초기화
|
||||
getDbUpdate($table['s_mbremail'],'base=1','uid='.$R['uid'].' and mbruid='.$my['uid']); // 기본 이메일 지정
|
||||
getDbUpdate($table['s_mbrdata'],'email="'.$email.'"','memberuid='.$my['uid']); //회원정보 저장
|
||||
|
||||
setrawcookie('member_settings_result', rawurlencode('기본 이메일이 설정 되었습니다.|success')); // 처리여부 cookie 저장
|
||||
getLink('reload','parent.','','');
|
||||
|
||||
}
|
||||
|
||||
//백업 이메일 저장
|
||||
if ($act=='save_backup') {
|
||||
|
||||
getDbUpdate($table['s_mbremail'],'backup=0','mbruid='.$my['uid']); // 백업 이메일 초기화
|
||||
|
||||
if ($uid=='none') { // 기본 이메일만(사용안함)
|
||||
$backup_type = 0;
|
||||
} else if ($uid=='all') { //본인확인된 전체메일
|
||||
$backup_type = 1;
|
||||
} else {
|
||||
$backup_type = 2;
|
||||
getDbUpdate($table['s_mbremail'],'backup=1','uid='.$R['uid'].' and mbruid='.$my['uid']); // 백업 이메일 지정
|
||||
}
|
||||
|
||||
getDbUpdate($table['s_mbrdata'],'email_backup='.$backup_type,'memberuid='.$my['uid']); //회원정보 백업 이메일 설정 저장
|
||||
|
||||
setrawcookie('member_settings_result', rawurlencode('백업 이메일이 설정 되었습니다.|success')); // 처리여부 cookie 저장
|
||||
getLink('reload','parent.','','');
|
||||
|
||||
}
|
||||
|
||||
//인증코드 확인
|
||||
if ($act=='confirm_code') {
|
||||
|
||||
$g['memberVarForSite'] = $g['path_var'].'site/'.$r.'/member.var.php';
|
||||
$_tmpvfile = file_exists($g['memberVarForSite']) ? $g['memberVarForSite'] : $g['path_module'].$module.'/var/var.php';
|
||||
include_once $_tmpvfile;
|
||||
|
||||
$L=getValid($R['d_code'],$d['member']['settings_keyexpire']);
|
||||
$CD = getDbData($table['s_code'],'entry='.$uid,'code');
|
||||
|
||||
if (!$code) getLink('reload','parent.','인증번호를 입력해 주세요.','');
|
||||
if (!$L) getLink('reload','parent.','인증번호가 만료 되었습니다.','');
|
||||
if ($CD['code']!=$code) {
|
||||
|
||||
echo '<script type="text/javascript">';
|
||||
echo 'parent.$("#item-'.$uid.'").find("[data-act=confirm_code]").attr("disabled",false);';
|
||||
echo 'parent.$("#item-'.$uid.'").find(".invalid-tooltip").text("인증번호를 확인해 주세요.");';
|
||||
echo 'parent.$("#item-'.$uid.'").find("[type=number]").focus().addClass("is-invalid");';
|
||||
echo '</script>';
|
||||
exit();
|
||||
}
|
||||
|
||||
$d_regis = $date['totime'];
|
||||
$_QVAL = "d_verified='$d_regis',d_code=''";
|
||||
getDbUpdate($table['s_mbremail'],$_QVAL,'uid='.$uid); // 본인확인 처리
|
||||
getDbDelete($table['s_code'],'mbruid='.$my['uid'].' and name="settings_email" and entry='.$uid.' and email=1'); //인증코드 삭제
|
||||
|
||||
// 기본 이메일이 없을 경우, 기본 이메일로 지정
|
||||
if (!$my['email']) {
|
||||
getDbUpdate($table['s_mbremail'],'base=1','uid='.$uid.' and mbruid='.$my['uid']); // 기본 휴대폰 지정
|
||||
getDbUpdate($table['s_mbrdata'],'email="'.$R['email'].'"','memberuid='.$my['uid']); //회원정보 저장
|
||||
}
|
||||
|
||||
setrawcookie('member_settings_result', rawurlencode('본인인증이 성공 하였습니다.|success')); // 처리여부 cookie 저장
|
||||
getLink('reload','parent.','','');
|
||||
}
|
||||
|
||||
//환경설정 저장
|
||||
if ($act=='save_config') {
|
||||
getDbUpdate($table['s_mbrdata'],'mailing='.$mailing,'memberuid='.$my['uid']); //회원정보 저장
|
||||
setrawcookie('member_settings_result', rawurlencode('설정이 변경 되었습니다.|success')); // 처리여부 cookie 저장
|
||||
getLink('reload','parent.','','');
|
||||
}
|
||||
|
||||
exit();
|
||||
?>
|
||||
82
modules/member/action/a.settings_main.php
Normal file
82
modules/member/action/a.settings_main.php
Normal file
@@ -0,0 +1,82 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
if (!$my['uid']) getLink('','','정상적인 접근이 아닙니다.','');
|
||||
|
||||
$g['memberVarForSite'] = $g['path_var'].'site/'.$r.'/member.var.php';
|
||||
$_tmpvfile = file_exists($g['memberVarForSite']) ? $g['memberVarForSite'] : $g['path_module'].$module.'/var/var.php';
|
||||
include_once $_tmpvfile;
|
||||
|
||||
$memberuid = $my['admin'] && $memberuid ? $memberuid : $my['uid'];
|
||||
$name = trim($name);
|
||||
$nic = trim($nic);
|
||||
$nic = $nic ? $nic : $name;
|
||||
|
||||
if (($d['member']['form_nic'] && !$check_nic))
|
||||
{
|
||||
getLink('','','정상적인 접근이 아닙니다.','');
|
||||
}
|
||||
if($d['member']['form_nic'])
|
||||
{
|
||||
if(!$my['admin'])
|
||||
{
|
||||
if(strstr(','.$d['member']['join_cutnic'].',',','.$nic.',') || getDbRows($table['s_mbrdata'],"memberuid<>".$memberuid." and nic='".$nic."'"))
|
||||
{
|
||||
getLink('','','이미 존재하는 닉네임입니다.','');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$home = $home ? (strstr($home,'http://')?str_replace('http://','',$home):$home) : '';
|
||||
$birth1 = $birth_1;
|
||||
$birth2 = $birth_2.$birth_3;
|
||||
$birthtype = $birthtype ? $birthtype : 0;
|
||||
$phone = $phone_1 && $phone_2 && $phone_3 ? $phone_1 .'-'. $phone_2 .'-'. $phone_3 : '';
|
||||
$tel = $tel_1 && $tel_2 && $tel_3 ? $tel_1 .'-'. $tel_2 .'-'. $tel_3 : '';
|
||||
$location = trim($location);
|
||||
$job = trim($job);
|
||||
$marr1 = $marr_1 && $marr_2 && $marr_3 ? $marr_1 : 0;
|
||||
$marr2 = $marr_1 && $marr_2 && $marr_3 ? $marr_2.$marr_3 : 0;
|
||||
$sms = $phone && $sms ? 1 : 0;
|
||||
$bio = trim($bio);
|
||||
$addfield = '';
|
||||
|
||||
$_addarray = file($g['path_var'].'site/'.$r.'/member.add_field.txt');
|
||||
foreach($_addarray as $_key)
|
||||
{
|
||||
$_val = explode('|',trim($_key));
|
||||
if ($_val[2] == 'checkbox')
|
||||
{
|
||||
$addfield .= $_val[0].'^^^';
|
||||
if (is_array(${'add_'.$_val[0]}))
|
||||
{
|
||||
foreach(${'add_'.$_val[0]} as $_skey)
|
||||
{
|
||||
$addfield .= '['.$_skey.']';
|
||||
}
|
||||
}
|
||||
$addfield .= '|||';
|
||||
}
|
||||
else {
|
||||
$addfield .= $_val[0].'^^^'.trim(${'add_'.$_val[0]}).'|||';
|
||||
}
|
||||
}
|
||||
|
||||
$_QVAL = "email_profile='$email_profile',name='$name',nic='$nic',home='$home',sex='$sex',birth1='$birth1',birth2='$birth2',birthtype='$birthtype',phone='$phone',tel='$tel',";
|
||||
$_QVAL.= "location='$location',job='$job',marr1='$marr1',marr2='$marr2',sms='$sms',mailing='$mailing',bio='$bio',addfield='$addfield'";
|
||||
getDbUpdate($table['s_mbrdata'],$_QVAL,'memberuid='.$memberuid);
|
||||
|
||||
if ($send_mod == 'ajax') {
|
||||
|
||||
echo '<script type="text/javascript">';
|
||||
echo 'parent.$.notify({message: "변경 되었습니다."},{type: "default"});';
|
||||
echo '</script>';
|
||||
|
||||
exit;
|
||||
|
||||
} else {
|
||||
setrawcookie('member_settings_result', rawurlencode('개인정보가 변경 되었습니다.|success')); // 처리여부 cookie 저장
|
||||
getLink('reload','parent.','','');
|
||||
}
|
||||
|
||||
?>
|
||||
32
modules/member/action/a.settings_noti.php
Normal file
32
modules/member/action/a.settings_noti.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
if (!$my['uid']) {
|
||||
getLink('','','정상적인 접근이 아닙니다.','');
|
||||
}
|
||||
|
||||
//환경설정 저장
|
||||
if ($act=='save_config') {
|
||||
|
||||
if (!$email_noti) { // 이메일이 없을 때, 알림이메일 수신을 비활성 처리함
|
||||
$NT_DATA = explode('|',$my['noticeconf']);
|
||||
$NT_STRING = $NT_DATA[0].'||'.$NT_DATA[2].'|'.$NT_DATA[3].'|'.$NT_DATA[4].'|';
|
||||
getDbUpdate($table['s_mbrdata'],"noticeconf='".$NT_STRING."'",'memberuid='.$my['uid']);
|
||||
}
|
||||
|
||||
getDbUpdate($table['s_mbrdata'],'email_noti="'.$email_noti.'"','memberuid='.$my['uid']); //회원정보 저장
|
||||
|
||||
if ($mobile) {
|
||||
echo '<script type="text/javascript">';
|
||||
echo 'parent.$.notify({message: "설정이 저장되었습니다."},{type: "default"});';
|
||||
echo 'parent.$(".js-submit").prop("disabled",false).focusout();';
|
||||
echo '</script>';
|
||||
exit;
|
||||
} else {
|
||||
setrawcookie('member_settings_result', rawurlencode('설정이 저장 되었습니다.|success')); // 처리여부 cookie 저장
|
||||
getLink('reload','parent.','','');
|
||||
}
|
||||
}
|
||||
|
||||
exit();
|
||||
?>
|
||||
194
modules/member/action/a.settings_phone.php
Normal file
194
modules/member/action/a.settings_phone.php
Normal file
@@ -0,0 +1,194 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
if (!$my['uid']) {
|
||||
getLink('','','정상적인 접근이 아닙니다.','');
|
||||
}
|
||||
|
||||
$g['memberVarForSite'] = $g['path_var'].'site/'.$r.'/member.var.php';
|
||||
$_tmpvfile = file_exists($g['memberVarForSite']) ? $g['memberVarForSite'] : $g['path_module'].$module.'/var/var.php';
|
||||
include_once $_tmpvfile;
|
||||
|
||||
$R = getUidData($table['s_mbrphone'],$uid);
|
||||
$phone = str_replace('-','',$phone);
|
||||
|
||||
// 휴대폰 추가
|
||||
if ($act=='add') {
|
||||
|
||||
if (!$phone) getLink('','','정상적인 접근이 아닙니다.','');
|
||||
|
||||
$isId = getDbRows($table['s_mbrphone'],"phone='".$phone."'");
|
||||
|
||||
$numphones = getDbRows($table['s_mbrphone'],"mbruid='".$my['uid']."'");
|
||||
|
||||
if ($numphones>2) {
|
||||
getLink('reload','parent.','더 이상 휴대폰을 추가할 수 없습니다.','');
|
||||
}
|
||||
|
||||
if ($isId) {
|
||||
echo '<script type="text/javascript">';
|
||||
echo 'parent.$("#phonesForm").find("[name=phone]").addClass("is-invalid");';
|
||||
echo 'parent.$("#phonesForm").find(".invalid-feedback").text("이미 추가된 휴대폰입니다");';
|
||||
echo 'parent.$("#phonesForm").find("[type=submit]").attr("disabled",false);';
|
||||
echo '</script>';
|
||||
} else {
|
||||
$d_regis = $date['totime'];
|
||||
getDbInsert($table['s_mbrphone'],'mbruid,phone,d_regis,d_verified',"'".$my['uid']."','".trim($phone)."',$d_regis,''");
|
||||
setrawcookie('member_settings_result', rawurlencode('휴대폰이 추가 되었습니다.|success')); // 처리여부 cookie 저장
|
||||
getLink('reload','parent.','','');
|
||||
}
|
||||
}
|
||||
|
||||
//휴대폰 삭제
|
||||
if ($act=='del') {
|
||||
if (!$uid || !$R['uid']) getLink('','','정상적인 접근이 아닙니다.','');
|
||||
getDbDelete($table['s_mbrphone'],'uid='.$uid.' and mbruid='.$my['uid']);
|
||||
getDbDelete($table['s_code'],'entry='.$uid.' and mbruid='.$my['uid'].' and name="settings_phone" and sms=1');
|
||||
|
||||
if ($R['base']==1) { //삭제한 휴대폰이 기본 휴대폰 경우
|
||||
getDbUpdate($table['s_mbrdata'],'phone=""','memberuid='.$my['uid']); //회원정보에서 휴대폰 정보 제거
|
||||
}
|
||||
|
||||
if ($R['backup']==1) { //삭제한 휴대폰이 백업 휴대폰 경우
|
||||
getDbUpdate($table['s_mbrdata'],'phone_backup=1','memberuid='.$my['uid']); //백업휴대폰 설정을 본인확인된 전체메일로 설정
|
||||
}
|
||||
|
||||
setrawcookie('member_settings_result', rawurlencode('휴대폰이 삭제 되었습니다.|success')); // 처리여부 cookie 저장
|
||||
getLink('reload','parent.','','');
|
||||
|
||||
}
|
||||
|
||||
//인증번호 발송
|
||||
if ($act=='send_code') {
|
||||
|
||||
$verify_code = date('His');
|
||||
$code_name = 'settings_phone';
|
||||
$d_regis = $date['totime'];
|
||||
$mbruid = $my['uid'];
|
||||
|
||||
$sms_tel = $d['member']['join_tel']?$d['member']['join_tel']:$d['admin']['sms_tel'];
|
||||
|
||||
if (!$sms_tel) {
|
||||
getLink('','','죄송합니다. SMS발신 전화번호가 등록되지 않았습니다. 관리자에게 문의해 주세요.','');
|
||||
}
|
||||
|
||||
if (!$R['phone']) getLink('','','등록된 휴대폰이 아닙니다.','');
|
||||
|
||||
include_once $g['path_core'].'function/sms.func.php';
|
||||
$content = implode('',file($g['dir_module'].'doc/sms/_settings.auth.phone.txt'));
|
||||
$content = str_replace('{NAME}',$my['name'],$content);
|
||||
$content = str_replace('{NICK}',$my['nic'],$content);
|
||||
$content = str_replace('{SITE}',$_HS['name'],$content); //사이트명
|
||||
$content = str_replace('{CODE}',$verify_code,$content); //인증번호
|
||||
$content = str_replace('{TIME}',$d['member']['settings_keyexpire'],$content); //인증제한시간
|
||||
$result = getSendSMS($R['phone'],$sms_tel,'',$content,'sms');
|
||||
|
||||
if ($result != 'OK') {
|
||||
getLink('reload','parent.',$result,'');
|
||||
}
|
||||
|
||||
//발송이력 저장
|
||||
$to_mbruid = $my['uid'];
|
||||
$from_mbruid = $my['uid'];
|
||||
$to = $R['phone'];
|
||||
$from = $d['admin']['sms_tel'];
|
||||
$subject = '';
|
||||
$_QKEY = "site,module,to_mbruid,to_phone,from_mbruid,from_tel,type,subject,content,upload,d_regis";
|
||||
$_QVAL = "'$r','$m','$to_mbruid','$to','$from_mbruid','$from',1,'$subject','$content','','$d_regis'";
|
||||
getDbInsert($table['s_sms'],$_QKEY,$_QVAL);
|
||||
|
||||
$has_code_query = 'mbruid='.$my['uid'].' and name="settings_phone" and entry='.$uid.' and sms=1';
|
||||
$has_code=getDbRows($table['s_code'],$has_code_query); // 코드 발급여부
|
||||
|
||||
getDbDelete($table['s_code'],$has_code_query); //재발급시 기존 인증코드 삭제
|
||||
|
||||
// 신규 인증코드 저장
|
||||
$_QKEY = "mbruid,name,entry,code,sms,email,d_regis";
|
||||
$_QVAL = "'$mbruid','$code_name','$uid','$verify_code','1','0','$d_regis'";
|
||||
getDbInsert($table['s_code'],$_QKEY,$_QVAL);
|
||||
|
||||
//코드발급시점 저장(갱신)
|
||||
getDbUpdate($table['s_mbrphone'],'d_code='.$d_regis,'uid='.$R['uid']);
|
||||
|
||||
setrawcookie('member_settings_result', rawurlencode('요청하신 휴대폰으로 인증번호가 전송 되었습니다.|success')); // 처리여부 cookie 저장
|
||||
getLink('reload','parent.','','');
|
||||
|
||||
}
|
||||
|
||||
//기본 휴대폰 저장
|
||||
if ($act=='save_primary') {
|
||||
|
||||
$phone = $R['phone'];
|
||||
|
||||
getDbUpdate($table['s_mbrphone'],'base=0','mbruid='.$my['uid']); // 기본 휴대폰 초기화
|
||||
getDbUpdate($table['s_mbrphone'],'base=1','uid='.$R['uid'].' and mbruid='.$my['uid']); // 기본 휴대폰 지정
|
||||
getDbUpdate($table['s_mbrdata'],'phone="'.$phone.'"','memberuid='.$my['uid']); //회원정보 저장
|
||||
|
||||
setrawcookie('member_settings_result', rawurlencode('기본 휴대폰이 설정 되었습니다.|success')); // 처리여부 cookie 저장
|
||||
getLink('reload','parent.','','');
|
||||
|
||||
}
|
||||
|
||||
//백업 휴대폰 저장
|
||||
if ($act=='save_backup') {
|
||||
|
||||
getDbUpdate($table['s_mbrphone'],'backup=0','mbruid='.$my['uid']); // 백업 휴대폰 초기화
|
||||
|
||||
if ($uid=='none') { // 기본 휴대폰만(사용안함)
|
||||
$backup_type = 0;
|
||||
} else if ($uid=='all') { //본인확인된 전체메일
|
||||
$backup_type = 1;
|
||||
} else {
|
||||
$backup_type = 2;
|
||||
getDbUpdate($table['s_mbrphone'],'backup=1','uid='.$R['uid'].' and mbruid='.$my['uid']); // 백업 휴대폰 지정
|
||||
}
|
||||
|
||||
getDbUpdate($table['s_mbrdata'],'phone_backup='.$backup_type,'memberuid='.$my['uid']); //회원정보 백업 휴대폰 설정 저장
|
||||
|
||||
setrawcookie('member_settings_result', rawurlencode('백업 휴대폰이 설정 되었습니다.|success')); // 처리여부 cookie 저장
|
||||
getLink('reload','parent.','','');
|
||||
|
||||
}
|
||||
|
||||
//인증코드 확인
|
||||
if ($act=='confirm_code') {
|
||||
|
||||
$L=getValid($R['d_code'],$d['member']['settings_keyexpire']);
|
||||
$CD = getDbData($table['s_code'],'entry='.$uid,'code');
|
||||
|
||||
if (!$code) getLink('reload','parent.','인증번호를 입력해 주세요.','');
|
||||
if (!$L) getLink('reload','parent.','인증번호가 만료 되었습니다.','');
|
||||
if ($CD['code']!=$code) {
|
||||
|
||||
echo '<script type="text/javascript">';
|
||||
echo 'parent.$("#item-'.$uid.'").find("[data-act=confirm_code]").attr("disabled",false);';
|
||||
echo 'parent.$("#item-'.$uid.'").find(".invalid-tooltip").text("인증번호를 확인해 주세요.");';
|
||||
echo 'parent.$("#item-'.$uid.'").find("[type=number]").focus().addClass("is-invalid");';
|
||||
echo '</script>';
|
||||
exit();
|
||||
}
|
||||
|
||||
$d_regis = $date['totime'];
|
||||
$_QVAL = "d_verified='$d_regis',d_code=''";
|
||||
getDbUpdate($table['s_mbrphone'],$_QVAL,'uid='.$uid); // 본인확인 처리
|
||||
getDbDelete($table['s_code'],'mbruid='.$my['uid'].' and name="settings_phone" and entry='.$uid.' and phone=1'); //인증코드 삭제
|
||||
|
||||
// 기본 휴대폰이 없을 경우, 기본 휴대폰으로 지정
|
||||
if (!$my['phone']) {
|
||||
getDbUpdate($table['s_mbrphone'],'base=1','uid='.$uid.' and mbruid='.$my['uid']); // 기본 휴대폰 지정
|
||||
getDbUpdate($table['s_mbrdata'],'phone="'.$R['phone'].'"','memberuid='.$my['uid']); //회원정보 저장
|
||||
}
|
||||
|
||||
setrawcookie('member_settings_result', rawurlencode('본인인증이 성공 하였습니다.|success')); // 처리여부 cookie 저장
|
||||
getLink('reload','parent.','','');
|
||||
}
|
||||
|
||||
//환경설정 저장
|
||||
if ($act=='save_config') {
|
||||
getDbUpdate($table['s_mbrdata'],'mailing='.$mailing,'memberuid='.$my['uid']); //회원정보 저장
|
||||
setrawcookie('member_settings_result', rawurlencode('설정이 변경 되었습니다.|success')); // 처리여부 cookie 저장
|
||||
getLink('reload','parent.','','');
|
||||
}
|
||||
|
||||
exit();
|
||||
?>
|
||||
69
modules/member/action/a.settings_shipping.php
Normal file
69
modules/member/action/a.settings_shipping.php
Normal file
@@ -0,0 +1,69 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
if (!$my['uid']) getLink('','','정상적인 접근이 아닙니다.','');
|
||||
|
||||
$mbruid = $my['uid'];
|
||||
$last_log = $date['totime'];
|
||||
|
||||
if ($act=='get_data') {
|
||||
|
||||
$R = getUidData($table['s_mbrshipping'],$uid);
|
||||
|
||||
$result=array();
|
||||
$result['error']=false;
|
||||
|
||||
$result['label'] = $R['label'];
|
||||
$result['name'] = $R['name'];
|
||||
$result['zip'] = $R['zip'];
|
||||
$result['addr1'] = $R['addr1'];
|
||||
$result['addr2'] = $R['addr2'];
|
||||
$result['tel1'] = $R['tel1'];
|
||||
$result['tel2'] = $R['tel2'];
|
||||
$result['base'] = $R['base'];
|
||||
|
||||
echo json_encode($result);
|
||||
exit;
|
||||
|
||||
}
|
||||
|
||||
|
||||
$addrx = explode(' ',$addr1);
|
||||
$addr0 = $addr1 && $addr2 ? $addrx[0] : '';
|
||||
$addr1 = $addr1 && $addr2 ? $addr1 : '';
|
||||
$addr2 = trim($addr2);
|
||||
|
||||
$tel1 = $tel1_1 && $tel1_2 && $tel1_3 ? $tel1_1 .'-'. $tel1_2 .'-'. $tel1_3 : '';
|
||||
$tel2 = $tel2_1 && $tel2_2 && $tel2_3 ? $tel2_1 .'-'. $tel2_2 .'-'. $tel2_3 : '';
|
||||
|
||||
if ($base) { // 기본배송지가 지정된 경우
|
||||
getDbUpdate($table['s_mbrshipping'],'base=0','mbruid='.$my['uid']); // 내배송지의 기본배송지 정보를 초기화
|
||||
}
|
||||
|
||||
//배송지 수정
|
||||
if ($act=='edit') {
|
||||
|
||||
$_QVAL = "label='$label',name='$name',tel1='$tel1',tel2='$tel2',zip='$zip',addr0='$addr0',addr1='$addr1',addr2='$addr2',base='$base',last_log='$last_log'";
|
||||
getDbUpdate($table['s_mbrshipping'],$_QVAL,'mbruid='.$mbruid.' and uid='.$uid);
|
||||
setrawcookie('member_settings_result', rawurlencode('배송지가 저장 되었습니다.|success')); // 처리여부 cookie 저장
|
||||
getLink('reload','parent.','','');
|
||||
}
|
||||
|
||||
//배송지 추가
|
||||
if ($act=='add') {
|
||||
$_QKEY = "mbruid,label,name,tel1,tel2,zip,addr0,addr1,addr2,base,last_log";
|
||||
$_QVAL = "'$mbruid','$label','$name','$tel1','$tel2','$zip','$addr0','$addr1','$addr2','$base','$last_log'";
|
||||
getDbInsert($table['s_mbrshipping'],$_QKEY,$_QVAL);
|
||||
setrawcookie('member_settings_result', rawurlencode('배송지가 추가 되었습니다.|success')); // 처리여부 cookie 저장
|
||||
getLink('reload','parent.','','');
|
||||
}
|
||||
|
||||
//배송지 삭제
|
||||
if ($act=='del') {
|
||||
if (!$uid) getLink('','','정상적인 접근이 아닙니다.','');
|
||||
getDbDelete($table['s_mbrshipping'],'uid='.$uid.' and mbruid='.$my['uid']);
|
||||
setrawcookie('member_settings_result', rawurlencode('배송지가 삭제 되었습니다.|success')); // 처리여부 cookie 저장
|
||||
getLink('reload','parent.','','');
|
||||
}
|
||||
|
||||
?>
|
||||
38
modules/member/action/a.sms_send.php
Normal file
38
modules/member/action/a.sms_send.php
Normal file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
checkAdmin(0);
|
||||
|
||||
if (!$to || !$from || !$content) {
|
||||
getLink('','','정상적인 접근이 아닙니다.','');
|
||||
}
|
||||
|
||||
$M = getDbData($table['s_mbrdata'],"memberuid='".$to_mbruid."'",'*');
|
||||
|
||||
$subject = trim($subject);
|
||||
$content = trim($content);
|
||||
$content = str_replace('{SITE}',$_HS['name'],$content); //사이트명 치환
|
||||
$content = str_replace('{NAME}',$M['name'],$content); //회원명 치환
|
||||
$content = str_replace('{PHONE}',$to,$content); //휴대폰 번호 치환
|
||||
$content = str_replace('{EMAIL}',$M['email'],$content); //이메일 주소 치환
|
||||
|
||||
include $g['path_core'].'function/sms.func.php';
|
||||
|
||||
$result = getSendSMS($to,$from,'',$content,'sms'); // $result 가 OK 면 성공 그렇지 않으면 실패 메시지 출력
|
||||
|
||||
if ($result == 'OK') {
|
||||
|
||||
//발송이력 저장
|
||||
$d_regis = $date['totime'];
|
||||
$from_mbruid = $my['uid'];
|
||||
$_QKEY = "site,module,to_mbruid,to_phone,from_mbruid,from_tel,type,subject,content,upload,d_regis";
|
||||
$_QVAL = "'$r','$m','$to_mbruid','$to','$from_mbruid','$from',1,'$subject','$content','','$d_regis'";
|
||||
getDbInsert($table['s_sms'],$_QKEY,$_QVAL);
|
||||
|
||||
setrawcookie('result_member_main', rawurlencode('SMS가 전송 되었습니다.|success')); // 처리여부 cookie 저장
|
||||
getLink('reload','parent.','','');
|
||||
} else {
|
||||
getLink('reload','parent.',$result,''); //실패 메시지 출력
|
||||
}
|
||||
|
||||
?>
|
||||
9
modules/member/action/a.sosok_delete.php
Normal file
9
modules/member/action/a.sosok_delete.php
Normal file
@@ -0,0 +1,9 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
checkAdmin(0);
|
||||
|
||||
getDbDelete($table['s_mbrgroup'],'uid='.$uid);
|
||||
|
||||
getLink('reload','parent.','','');
|
||||
?>
|
||||
18
modules/member/action/a.sosok_regis.php
Normal file
18
modules/member/action/a.sosok_regis.php
Normal file
@@ -0,0 +1,18 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
checkAdmin(0);
|
||||
|
||||
$i = 0;
|
||||
foreach($sosokmembers as $val)
|
||||
{
|
||||
getDbUpdate($table['s_mbrgroup'],'gid='.($i++).",name='".trim(${'name_'.$val})."'",'uid='.$val);
|
||||
}
|
||||
|
||||
if ($name)
|
||||
{
|
||||
getDbInsert($table['s_mbrgroup'],'gid,name,num',"'".$i."','".trim($name)."','0'");
|
||||
}
|
||||
setrawcookie('member_group_result', rawurlencode('그룹 설정이 변경 되었습니다.|success')); // 처리여부 cookie 저장
|
||||
getLink('reload','parent.','','');
|
||||
?>
|
||||
13
modules/member/action/a.theme_config.php
Normal file
13
modules/member/action/a.theme_config.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
|
||||
checkAdmin(0);
|
||||
|
||||
$fp = fopen($g['dir_module'].'themes/'.$theme.'/_var/var.php','w');
|
||||
fwrite($fp,trim(stripslashes($theme_var)));
|
||||
fclose($fp);
|
||||
@chmod($g['dir_module'].'themes/'.$theme.'/_var/var.php',0707);
|
||||
|
||||
setrawcookie('result_member_theme', rawurlencode('저장 되었습니다.|success')); // 처리여부 cookie 저장
|
||||
getLink('reload','parent.','','');
|
||||
?>
|
||||
59
modules/member/action/a.upload.php
Normal file
59
modules/member/action/a.upload.php
Normal file
@@ -0,0 +1,59 @@
|
||||
<?php
|
||||
$g=array();
|
||||
$g['url_host'] = 'http'.($_SERVER['HTTPS']=='on'?'s':'').'://'.$_SERVER['HTTP_HOST'];
|
||||
$g['path_root']='../../../';
|
||||
$g['path_var']=$g['path_root'].'_var/';
|
||||
$g['path_core']=$g['path_root'].'_core/';
|
||||
$g['path_module']=$g['path_root'].'modules/';
|
||||
require $g['path_var'].'db.info.php';
|
||||
require $g['path_var'].'table.info.php';
|
||||
require $g['path_core'].'function/db.mysql.func.php';
|
||||
require $g['path_core'].'function/sys.func.php';
|
||||
require $g['path_core'].'function/thumb.func.php';
|
||||
include $g['path_module'].'mediaset/var/var.php'; // 미디어셋 설정내용
|
||||
$DB_CONNECT = isConnectedToDB($DB);
|
||||
$date['today']=date('Ymd');
|
||||
$date['totime']=date('YmdHis');
|
||||
|
||||
if ($_FILES['file']['name']) {
|
||||
if (!$_FILES['file']['error']) {
|
||||
if (!$d['mediaset']['ext_cut'] && !strstr($d['mediaset']['ext_cut'],$fileExt)){
|
||||
$name = strtolower($_FILES['file']['name']);
|
||||
$fileExt = getExt($name);
|
||||
$fileExt = $fileExt == 'jpeg' ? 'jpg' : $fileExt;
|
||||
$type = getFileType($fileExt);
|
||||
$tmpname = md5($name).substr($date['totime'],8,14);
|
||||
$tmpname = $type == 2 ? $tmpname.'.'.$fileExt : $tmpname;
|
||||
|
||||
$savePath = '../upload'; // member 게시판 안에 별도의 files 폴더를 둔다. 나중에 포럼모듈이 나오면 충돌을 피하기 위해
|
||||
|
||||
$saveFile = $savePath.'/'.$tmpname; // 생성된 폴더/파일 --> 파일의 실제 위치
|
||||
|
||||
if($Overwrite=='true' || !is_file($saveFile))
|
||||
{
|
||||
move_uploaded_file($_FILES["file"]["tmp_name"], $saveFile);
|
||||
@chmod($saveFile,0707);
|
||||
}
|
||||
$sourcePath=$g['url_host'].'/modules/member'.str_replace('..','',$savePath); // 소스에 보여주는 패스트 -- 상대경로를 제거한다.
|
||||
$code='100';
|
||||
$src=$sourcePath.'/'.$tmpname;
|
||||
$result=array($code,$src); // 이미지 path 및 이미지 uid 값
|
||||
echo json_encode($result);// 최종적으로 에디터에 넘어가는 값
|
||||
}else{
|
||||
$code='200';
|
||||
$msg = '업로드금지 확장자입니다.';
|
||||
$result=array($code,$msg);
|
||||
echo json_encode($result);// 최종적으로 에디터에 넘어가는 값
|
||||
}
|
||||
|
||||
}else{
|
||||
$code='300';
|
||||
$msg = '파일 에러입니다.: '.$_FILES['file']['error'];
|
||||
$result=array($code,$msg);
|
||||
echo json_encode($result);// 최종적으로 에디터에 넘어가는 값
|
||||
}
|
||||
|
||||
}// 파일이 넘어왔는지 체크
|
||||
?>
|
||||
|
||||
|
||||
4
modules/member/admin.php
Normal file
4
modules/member/admin.php
Normal file
@@ -0,0 +1,4 @@
|
||||
<?php
|
||||
if(!defined('__KIMS__')) exit;
|
||||
include $g['path_module'].$module.'/admin/'.$front.'.php';
|
||||
?>
|
||||
29
modules/member/admin/_info.php
Normal file
29
modules/member/admin/_info.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
$license_local = $g['path_module'].$module.'/LICENSE';
|
||||
$license_global = $g['path_root'].'LICENSE';
|
||||
|
||||
if (file_exists($license_local)) $license = $license_local;
|
||||
else $license = $license_global;
|
||||
?>
|
||||
|
||||
<link href="<?php echo $g['s']?>/_core/css/github-markdown.css" rel="stylesheet">
|
||||
<?php getImport('jquery-markdown','jquery.markdown','0.0.10','js')?>
|
||||
|
||||
<?php @include $g['path_module'].$module.'/var/var.moduleinfo.php' ?>
|
||||
|
||||
<article class="rb-docs markdown-body px-5 pt-3">
|
||||
<h1><?php echo sprintf('%s 모듈정보',ucfirst($MD['name']))?></h1>
|
||||
|
||||
<div class="pb-5 readme">
|
||||
<?php readfile($g['path_module'].$module.'/README.md')?>
|
||||
</div>
|
||||
|
||||
<div class="pb-5">
|
||||
<h2>라이센스</h2>
|
||||
<textarea class="form-control" rows="10"><?php readfile($license)?></textarea>
|
||||
</div>
|
||||
</article>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(".markdown-body .readme").markdown();
|
||||
</script>
|
||||
135
modules/member/admin/_modal.php
Normal file
135
modules/member/admin/_modal.php
Normal file
@@ -0,0 +1,135 @@
|
||||
<!-- 회원추가 모달 -->
|
||||
<div class="modal fade" id="modal-member-add" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<form name="addForm" id="add-form" class="form-horizontal" action="<?php echo $g['s']?>/" method="post" enctype="multipart/form-data" onsubmit="return saveCheck(this);">
|
||||
<input type="hidden" name="r" value="<?php echo $r?>">
|
||||
<input type="hidden" name="m" value="<?php echo $module?>">
|
||||
<input type="hidden" name="a" value="admin_member_add">
|
||||
<input type="hidden" name="check_id" value="0">
|
||||
<input type="hidden" name="check_nic" value="0">
|
||||
<input type="hidden" name="check_email" value="0">
|
||||
<input type="hidden" name="check_phone" value="0">
|
||||
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">회원 추가</h5>
|
||||
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label">아이디</label>
|
||||
<div class="col-sm-9">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" name="id" placeholder="4~12자의 영문(소문자)과 숫자만 사용" value="" maxlength="12" onchange="sendCheck('rb-idcheck','id');">
|
||||
<span class="input-group-append">
|
||||
<button type="button" class="btn btn-light" id="rb-idcheck" onclick="sendCheck('rb-idcheck','id');">중복확인</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label">비번</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="password" class="form-control" name="pw1" placeholder="비밀번호">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label"></label>
|
||||
<div class="col-sm-9">
|
||||
<input type="password" class="form-control" name="pw2" placeholder="비밀번호 확인">
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label">이름</label>
|
||||
<div class="col-sm-9">
|
||||
<input type="text" class="form-control" name="name" placeholder="이름을 입력해주세요" value="<?php echo $regis_name?>" maxlength="10">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label">닉네임</label>
|
||||
<div class="col-sm-9">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control" name="nic" placeholder="닉네임을 입력해주세요" value="" maxlength="20" onchange="sendCheck('rb-nickcheck','nic');">
|
||||
<span class="input-group-append">
|
||||
<button type="button" class="btn btn-light" id="rb-nickcheck" onclick="sendCheck('rb-nickcheck','nic');">중복확인</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label">이메일</label>
|
||||
<div class="col-sm-9">
|
||||
<div class="input-group">
|
||||
<input type="email" class="form-control" name="email" placeholder="이메일을 입력해주세요" value="" onchange="sendCheck('rb-emailcheck','email');">
|
||||
<span class="input-group-append">
|
||||
<button type="button" class="btn btn-light" id="rb-emailcheck" onclick="sendCheck('rb-emailcheck','email');">중복확인</button>
|
||||
</span>
|
||||
</div>
|
||||
<p class="form-control-static"><small class="text-muted">비밀번호 분실시에 사용됩니다. 정확하게 입력하세요.</small></p>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label">휴대폰</label>
|
||||
<div class="col-sm-9">
|
||||
|
||||
<div class="input-group">
|
||||
<input type="number" class="form-control" name="phone" placeholder="숫자만 등록" value="" onchange="sendCheck('rb-phonecheck','phone');">
|
||||
<span class="input-group-append">
|
||||
<button type="button" class="btn btn-light" id="rb-phonecheck" onclick="sendCheck('rb-phonecheck','phone');">중복확인</button>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer justify-content-between">
|
||||
<button type="button" class="btn btn-light pull-left" data-dismiss="modal">취소</button>
|
||||
<button type="submit" class="btn btn-primary">등록하기</button>
|
||||
</div>
|
||||
</form>
|
||||
<form name="actionform" action="<?php echo $g['s']?>/" method="post">
|
||||
<input type="hidden" name="r" value="<?php echo $r?>">
|
||||
<input type="hidden" name="m" value="<?php echo $module?>">
|
||||
<input type="hidden" name="a" value="admin_member_add_check">
|
||||
<input type="hidden" name="type" value="">
|
||||
<input type="hidden" name="fvalue" value="">
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<!-- 이메일 발송 -->
|
||||
<div class="modal fade" id="modal-email" tabindex="-1" role="dialog">
|
||||
<div class="modal-dialog modal-dialog-centered" role="document">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">
|
||||
<i class="fa fa-envelope-o fa-fw" aria-hidden="true"></i> 이메일 발송
|
||||
<span class="badge badge-pill badge-dark align-text-top" data-role="name"></span>
|
||||
</h5>
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<form>
|
||||
<div class="form-group">
|
||||
<label class="col-form-label">받는 이메일주소:</label>
|
||||
<input type="text" class="form-control" data-role="to">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label for="message-text" class="col-form-label">내용:</label>
|
||||
<textarea class="form-control" data-role="content"></textarea>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
|
||||
<button type="button" class="btn btn-primary">Save changes</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
251
modules/member/admin/_tool_modal.php
Normal file
251
modules/member/admin/_tool_modal.php
Normal file
@@ -0,0 +1,251 @@
|
||||
<!-- 포인트 지급 모달 -->
|
||||
<div class="modal fade" id="modal-give_point" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title"><span id="point_type" class="label label-danger"></span> 지급/차감</h4>
|
||||
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-3 control-label">지급/차감</label>
|
||||
<div class="col-sm-8">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="how" value="+" /> <span class="text-primary">지급</span>
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="how" value="-" /> <span class="text-danger">차감</span>
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-3 control-label">금액</label>
|
||||
<div class="col-sm-8">
|
||||
<input type="text" class="form-control numOnly" name="price" placeholder="금액을 입력해주세요" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-3 control-label">사유</label>
|
||||
<div class="col-sm-8">
|
||||
<input type="text" class="form-control" name="comment" placeholder="사유를 입력해주세요" />
|
||||
</div>
|
||||
</div>
|
||||
</div> <!--.modal-body-->
|
||||
<div class="modal-footer justify-content-between">
|
||||
<button type="button" class="btn btn-light" data-dismiss="modal">취소</button>
|
||||
<button type="button" class="btn btn-primary" onclick="modal_act(this);" id="give_point">확인</button>
|
||||
</div>
|
||||
</div> <!--.modal-content-->
|
||||
</div> <!--.modal-dialog-->
|
||||
</div> <!--.modal-->
|
||||
|
||||
<!-- 그룹변경 모달 -->
|
||||
<div class="modal fade" id="modal-tool_mygroup" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title"><span class="label label-danger">그룹</span> 변경</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="form-group">
|
||||
<label class="sr-only">그룹 선택</label>
|
||||
<select name="mygroup" class="form-control custom-select">
|
||||
<option value="">회원그룹</option>
|
||||
<option value="" disabled>--------</option>
|
||||
<?php $_GRPARR = array()?>
|
||||
<?php $GRP = getDbArray($table['s_mbrgroup'],'','*','uid','asc',0,1)?>
|
||||
<?php while($_G=db_fetch_array($GRP)):$_GRPARR[$_G['uid']] = $_G['name']?>
|
||||
<option value="<?php echo $_G['uid']?>">ㆍ<?php echo $_G['name']?> (<?php echo number_format($_G['num'])?>)</option>
|
||||
<?php endwhile?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer justify-content-between">
|
||||
<button type="button" class="btn btn-light" data-dismiss="modal">취소</button>
|
||||
<button type="button" class="btn btn-primary" onclick="modal_act(this);" id="tool_mygroup">확인</button>
|
||||
</div>
|
||||
</div> <!--.modal-content-->
|
||||
</div> <!--.modal-dialog-->
|
||||
</div> <!--.modal-->
|
||||
|
||||
<!-- 등급변경 모달 -->
|
||||
<div class="modal fade" id="modal-tool_level" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title"><span class="label label-danger">등급</span> 변경</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="form-group">
|
||||
<label class="sr-only">등급 선택</label>
|
||||
<select name="level" class="form-control">
|
||||
<option value="">회원등급</option>
|
||||
<option value="" disabled>--------</option>
|
||||
<?php $_LVLARR = array()?>
|
||||
<?php $levelnum = getDbData($table['s_mbrlevel'],'gid=1','*')?>
|
||||
<?php $LVL=getDbArray($table['s_mbrlevel'],'','*','uid','asc',$levelnum['uid'],1)?>
|
||||
<?php while($_L=db_fetch_array($LVL)):$_LVLARR[$_L['uid']] = $_L['name']?>
|
||||
<option value="<?php echo $_L['uid']?>">ㆍ<?php echo $_L['name']?> (<?php echo number_format($_L['num'])?>)</option>
|
||||
<?php endwhile?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer justify-content-between">
|
||||
<button type="button" class="btn btn-light" data-dismiss="modal">취소</button>
|
||||
<button type="button" class="btn btn-primary" onclick="modal_act(this);" id="tool_level">확인</button>
|
||||
</div>
|
||||
</div> <!--.modal-content-->
|
||||
</div> <!--.modal-dialog-->
|
||||
</div> <!--.modal-->
|
||||
|
||||
<!-- 쪽지 전송 모달 -->
|
||||
<div class="modal fade" id="modal-send_paper" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title"><span class="label label-danger">쪽지</span> 전송</h4>
|
||||
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="form-group">
|
||||
<label class="sr-only">메세지 입력</label>
|
||||
<textarea name="memo" class="form-control" placeholder="메시지를 입력해 주세요." rows="5"></textarea>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-3 control-label">전송 년도</label>
|
||||
<div class="col-sm-8">
|
||||
<select name="year1" class="form-control">
|
||||
<?php for($i=$date['year'];$i<$date['year']+2;$i++):?><option value="<?php echo $i?>"<?php if($xyear1==$i):?> selected="selected"<?php endif?>><?php echo $i?></option><?php endfor?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-3 control-label">전송 월</label>
|
||||
<div class="col-sm-8">
|
||||
<select name="month1" class="form-control">
|
||||
<?php for($i=1;$i<13;$i++):?><option value="<?php echo sprintf('%02d',$i)?>"<?php if($xmonth1==$i):?> selected="selected"<?php endif?>><?php echo sprintf('%02d',$i)?></option><?php endfor?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-3 control-label">전송 일</label>
|
||||
<div class="col-sm-8">
|
||||
<select name="day1" class="form-control">
|
||||
<?php for($i=1;$i<32;$i++):?><option value="<?php echo sprintf('%02d',$i)?>"<?php if($xday1==$i):?> selected="selected"<?php endif?>><?php echo sprintf('%02d',$i)?></option><?php endfor?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-3 control-label">전송 시간</label>
|
||||
<div class="col-sm-8">
|
||||
<select name="hour1" class="form-control">
|
||||
<?php for($i=0;$i<24;$i++):?><option value="<?php echo sprintf('%02d',$i)?>"<?php if($xhour1==$i):?> selected="selected"<?php endif?>><?php echo sprintf('%02d',$i)?></option><?php endfor?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-3 control-label">전송 분</label>
|
||||
<div class="col-sm-8">
|
||||
<select name="min1" class="form-control">
|
||||
<?php for($i=0;$i<60;$i++):?><option value="<?php echo sprintf('%02d',$i)?>"<?php if($xmin1==$i):?> selected="selected"<?php endif?>><?php echo sprintf('%02d',$i)?></option><?php endfor?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer justify-content-between justify-content-between">
|
||||
<button type="button" class="btn btn-light" data-dismiss="modal">취소</button>
|
||||
<button type="button" class="btn btn-primary" onclick="modal_act(this);" id="send_paper">확인</button>
|
||||
</div>
|
||||
</div> <!--.modal-content-->
|
||||
</div> <!--.modal-dialog-->
|
||||
</div> <!--.modal-->
|
||||
|
||||
<!-- 알림 전송 모달 -->
|
||||
<div class="modal fade" id="modal-send_notice" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title"><span class="label label-danger">알림</span> 전송</h4>
|
||||
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="form-group">
|
||||
<label class="sr-only">타이틀</label>
|
||||
<input type="url" class="form-control" name="notice_title" value="" placeholder="알림 제목을 입력해 주세요.">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="sr-only">메세지 입력</label>
|
||||
<textarea name="notice" class="form-control" placeholder="알림내용을 입력해 주세요." rows="5"></textarea>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>연결링크</label>
|
||||
<input type="url" class="form-control f12" name="notice_referer" value="" placeholder="URL을 입력해 주세요.">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>연결링크 버튼명</label>
|
||||
<input type="text" class="form-control f12" name="notice_button" value="" placeholder="버튼명을 입력해 주세요.">
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer justify-content-between">
|
||||
<button type="button" class="btn btn-light" data-dismiss="modal">취소</button>
|
||||
<button type="button" class="btn btn-primary" onclick="modal_act(this);" id="send_notice">전송</button>
|
||||
</div>
|
||||
</div> <!--.modal-content-->
|
||||
</div> <!--.modal-dialog-->
|
||||
</div> <!--.modal-->
|
||||
|
||||
<!-- 메일 전송 모달 -->
|
||||
<div class="modal fade" id="modal-send_email" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
||||
<div class="modal-dialog modal-lg">
|
||||
<div class="modal-content">
|
||||
<div class="modal-header">
|
||||
<h4 class="modal-title"><span class="label label-danger">메일</span> 전송</h4>
|
||||
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="form-group dropdown">
|
||||
<label class="sr-only">메일 양식</label>
|
||||
<button type="button" class="btn btn-light dropdown-toggle" data-toggle="dropdown">
|
||||
<i class="fa fa-download"></i> 메일양식 불러오기 <span class="caret"></span>
|
||||
</button>
|
||||
<div class="dropdown-menu" role="menu" style="left:15px;padding-right:10px;">
|
||||
<?php $tdir = $g['path_module'].$module.'/doc/'?>
|
||||
<?php $dirs = opendir($tdir)?>
|
||||
<?php while(false !== ($skin = readdir($dirs))):?>
|
||||
<?php if($skin=='.' || $skin == '..')continue?>
|
||||
<?php $_type = str_replace('.txt','',$skin)?>
|
||||
<a href="#" class="dropdown-item doc-type">
|
||||
<?php echo getMDname($_type)?>
|
||||
<input type="hidden" name="doc_type" value="<?php echo htmlspecialchars(implode('',file($g['path_module'].$module.'/doc/'.$_type.'.txt')))?>" />
|
||||
</a>
|
||||
<?php endwhile?>
|
||||
<?php closedir($dirs)?>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="sr-only">제목</label>
|
||||
<input type="text" class="form-control" name="subject" placeholder="제목을 입력해주세요" />
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="sr-only">메세지 입력</label>
|
||||
<textarea name="content" id="summernote" class="form-control" placeholder="메시지를 입력해 주세요." rows="8"></textarea>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="modal-footer justify-content-between">
|
||||
<button type="button" class="btn btn-light" data-dismiss="modal">취소</button>
|
||||
<button type="button" class="btn btn-primary" onclick="modal_act(this);" id="send_email">전송</button>
|
||||
</div>
|
||||
</div> <!--.modal-content-->
|
||||
</div> <!--.modal-dialog-->
|
||||
</div> <!--.modal-->
|
||||
<script>
|
||||
$('.doc-type').on('click',function(e) {
|
||||
e.preventDefault();
|
||||
var cnt=$(this).find('input[name="doc_type"]').val();
|
||||
alert(cnt);
|
||||
$('#summernote').code(cnt);
|
||||
})
|
||||
</script>
|
||||
1189
modules/member/admin/config.php
Normal file
1189
modules/member/admin/config.php
Normal file
File diff suppressed because it is too large
Load Diff
BIN
modules/member/admin/image/bg_group.gif
Normal file
BIN
modules/member/admin/image/bg_group.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.4 KiB |
29
modules/member/admin/main.css
Normal file
29
modules/member/admin/main.css
Normal file
@@ -0,0 +1,29 @@
|
||||
/* 첨부파일 : input-file*/
|
||||
.btn-file {
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
}
|
||||
.btn-file input[type=file] {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
min-width: 100%;
|
||||
min-height: 100%;
|
||||
font-size: 100px;
|
||||
text-align: right;
|
||||
filter: alpha(opacity=0);
|
||||
opacity: 0;
|
||||
background: red;
|
||||
cursor: inherit;
|
||||
display: block;
|
||||
}
|
||||
input.form-control[readonly] {
|
||||
color: #777
|
||||
}
|
||||
.datepicker {z-index: 1151 !important;}
|
||||
|
||||
.sidebar .card.phone {
|
||||
border-width: 5px;
|
||||
border-color: rgb(52, 59, 67);
|
||||
border-radius: 15px;
|
||||
}
|
||||
1169
modules/member/admin/main.php
Normal file
1169
modules/member/admin/main.php
Normal file
File diff suppressed because it is too large
Load Diff
143
modules/member/admin/manager/comment.php
Normal file
143
modules/member/admin/manager/comment.php
Normal file
@@ -0,0 +1,143 @@
|
||||
<?php
|
||||
//댓글링크
|
||||
function _getPostLink($arr)
|
||||
{
|
||||
$sync_arr=explode('|',$arr['sync']);
|
||||
$B = getUidData($sync_arr[0],$sync_arr[2]);
|
||||
return RW('m='.$sync_arr[1].'&bid='.$B['bbsid'].'&uid='.$sync_arr[2].($GLOBALS['s']!=$arr['site']?'&s='.$arr['site']:''.'#CMT-'.$arr['uid']));
|
||||
}
|
||||
$sort = $sort ? $sort : 'uid';
|
||||
$orderby= $orderby ? $orderby : 'asc';
|
||||
$recnum = $recnum && $recnum < 200 ? $recnum : 5;
|
||||
|
||||
$bbsque = 'mbruid='.$_M['uid'];
|
||||
if ($account) $bbsque .= ' and site='.$account;
|
||||
if ($d_start) $bbsque .= ' and d_regis > '.str_replace('/','',$d_start).'000000';
|
||||
if ($d_finish) $bbsque .= ' and d_regis < '.str_replace('/','',$d_finish).'240000';
|
||||
if ($where && $keyw)
|
||||
{
|
||||
if (strstr('[name][nic][id][ip]',$where)) $bbsque .= " and ".$where."='".$keyw."'";
|
||||
else if ($where == 'term') $bbsque .= " and d_regis like '".$keyw."%'";
|
||||
else $bbsque .= getSearchSql($where,$keyw,$ikeyword,'or');
|
||||
}
|
||||
$RCD = getDbArray($table['s_comment'],$bbsque,'*',$sort,$orderby,$recnum,$p);
|
||||
$NUM = getDbRows($table['s_comment'],$bbsque);
|
||||
$TPG = getTotalPage($NUM,$recnum);
|
||||
?>
|
||||
|
||||
<div class="manager-list pt-3 px-3">
|
||||
|
||||
<form name="searchForm" action="<?php echo $g['s']?>/" method="get">
|
||||
<input type="hidden" name="r" value="<?php echo $r?>">
|
||||
<input type="hidden" name="m" value="<?php echo $m?>">
|
||||
<input type="hidden" name="module" value="<?php echo $module?>">
|
||||
<input type="hidden" name="front" value="<?php echo $front?>">
|
||||
<input type="hidden" name="tab" value="<?php echo $tab?>">
|
||||
<input type="hidden" name="uid" value="<?php echo $_M['uid']?>">
|
||||
<input type="hidden" name="p" value="<?php echo $p?>">
|
||||
<input type="hidden" name="iframe" value="<?php echo $iframe?>">
|
||||
|
||||
<div class="d-flex justify-content-between align-items-center">
|
||||
<div>
|
||||
<small><?php echo sprintf('총 %d건',$NUM)?></small>
|
||||
<span class="badge badge-pill badge-dark"><?php echo $p?>/<?php echo $TPG?> 페이지</span>
|
||||
<button type="button" class="btn btn-link btn-sm muted-link" data-toggle="collapse" data-target="#search-more-bbs" onclick="sessionSetting('sh_bbslist','1','','1');">
|
||||
고급 검색
|
||||
</button>
|
||||
</div>
|
||||
<div class="form-inline">
|
||||
<select name="siteuid" class="form-control form-control-sm custom-select mr-2" onchange="this.form.submit();">
|
||||
<option value="">전체 사이트</option>
|
||||
<?php $SITES = getDbArray($table['s_site'],'','*','gid','asc',0,$p)?>
|
||||
<?php while($S = db_fetch_array($SITES)):?>
|
||||
<option value="<?php echo $S['uid']?>"<?php if($S['uid']==$siteuid):?> selected<?php endif?>><?php echo $S['name']?> (<?php echo $S['id']?>)</option>
|
||||
<?php endwhile?>
|
||||
</select>
|
||||
</div>
|
||||
</div><!-- /.d-flex -->
|
||||
|
||||
<div id="search-more-bbs" class="mt-3 collapse<?php if($_SESSION['sh_bbslist']):?> show<?php endif?>">
|
||||
<div class="d-flex justify-content-between align-items-center">
|
||||
<div class="form-inline">
|
||||
<span class="input-daterange">
|
||||
<input type="text" class="form-control form-control-sm" name="d_start" placeholder="시작일" value="<?php echo $d_start?>">
|
||||
<span class="px-1">~</span>
|
||||
<input type="text" class="form-control form-control-sm mr-1" name="d_finish" placeholder="종료일" value="<?php echo $d_finish?>">
|
||||
</span>
|
||||
<button class="btn btn-light" type="submit"><i class="fa fa-search"></i></button>
|
||||
</div><!-- /.form-inline -->
|
||||
<div class="form-inline">
|
||||
<select name="where" class="form-control form-control-sm custom-select mr-2">
|
||||
<option value="subject"<?php if($where=='subject'):?> selected="selected"<?php endif?>>제목</option>
|
||||
<option value="content"<?php if($where=='content'):?> selected="selected"<?php endif?>>본문</option>
|
||||
</select>
|
||||
<input type="text" name="keyw" class="form-control form-control-sm mr-1" placeholder="검색어를 입력해주세요." value="<?php echo $keyw?>">
|
||||
<button class="btn btn-light" type="submit"><i class="fa fa-search"></i>검색</button>
|
||||
<button class="btn btn-light ml-1" type="button" onclick="this.form.keyw.value='';this.form.submit();">리셋</button>
|
||||
</div><!-- /.form-inline -->
|
||||
</div><!-- /.d-flex -->
|
||||
</div><!-- /.collapse -->
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
<form name="adm_list_form" class="mt-3" action="<?php echo $g['s']?>/" method="get">
|
||||
<input type="hidden" name="r" value="<?php echo $r?>">
|
||||
<input type="hidden" name="m" value="<?php echo $m?>">
|
||||
<input type="hidden" name="module" value="comment">
|
||||
<input type="hidden" name="front" value="<?php echo $front?>">
|
||||
<input type="hidden" name="tab" value="<?php echo $tab?>">
|
||||
<input type="hidden" name="p" value="<?php echo $p?>">
|
||||
<input type="hidden" name="iframe" value="<?php echo $iframe?>">
|
||||
<input type="hidden" name="a" value="">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover f13 text-center">
|
||||
<thead class="small text-muted">
|
||||
<tr>
|
||||
<th><input type="checkbox" class="checkAll-act-list" data-toggle="tooltip" title="전체선택"></th>
|
||||
<th>번호</th>
|
||||
<th>제목</th>
|
||||
<th>좋아요</th>
|
||||
<th>싫어요</th>
|
||||
<th>의견</th>
|
||||
<th>날짜</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php while($R=db_fetch_array($RCD)):?>
|
||||
<?php $R['mobile']=isMobileConnect($R['agent'])?>
|
||||
<tr>
|
||||
<td><input type="checkbox" name="comment_members[]" onclick="checkboxCheck();" class="mbr-act-list" value="<?php echo $R['uid']?>"></td>
|
||||
<td><?php echo $NUM-((($p-1)*$recnum)+$_rec++)?></td>
|
||||
<td class="text-left">
|
||||
<?php if($R['mobile']):?><i class="fa fa-mobile fa-lg"></i><?php endif?>
|
||||
<a href="<?php echo getPostLink($R)?>" target="_blank" class="muted-link"><?php echo getStrCut($R['subject'],40,'')?></a>
|
||||
<?php if(strstr($R['content'],'.jpg')):?><i class="fa fa-image fa-lg"></i><?php endif?>
|
||||
<?php if($R['upload']):?><i class="glyphicon glyphicon-floppy-disk glyphicon-lg"></i><?php endif?>
|
||||
<?php if($R['hidden']):?><i class="fa fa-lock fa-lg"></i><?php endif?>
|
||||
<?php if(getNew($R['d_regis'],24)):?><small class="text-danger">New</small><?php endif?>
|
||||
</td>
|
||||
<td><?php echo $R['likes']?></td>
|
||||
<td><?php echo $R['dislikes']?></td>
|
||||
<td><?php echo $R['oneline']?></td>
|
||||
<td class="rb-update">
|
||||
<time class="timeago small text-muted" data-toggle="tooltip" datetime="<?php echo getDateFormat($R['d_regis'],'c')?>" data-tooltip="tooltip" title="<?php echo getDateFormat($R['d_regis'],'Y.m.d H:i')?>"></time>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endwhile?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php if(!$NUM):?>
|
||||
<div class="text-muted text-center py-4">
|
||||
<i class="fa fa-exclamation-circle fa-2x mb-1 d-block" aria-hidden="true"></i>
|
||||
<small>데이타가 없습니다.</small>
|
||||
</div>
|
||||
<?php endif?>
|
||||
</div>
|
||||
|
||||
<ul class="pagination pagination-sm justify-content-center py-3">
|
||||
<script type="text/javascript">getPageLink(5,<?php echo $p?>,<?php echo $TPG?>,'');</script>
|
||||
</ul>
|
||||
|
||||
</form>
|
||||
375
modules/member/admin/manager/info.php
Normal file
375
modules/member/admin/manager/info.php
Normal file
@@ -0,0 +1,375 @@
|
||||
<form name="addForm" class="f13 p-4" action="<?php echo $g['s']?>/" method="post" enctype="multipart/form-data" onsubmit="return saveCheck(this);">
|
||||
<input type="hidden" name="r" value="<?php echo $r?>">
|
||||
<input type="hidden" name="m" value="<?php echo $module?>">
|
||||
<input type="hidden" name="a" value="admin_member_add">
|
||||
<input type="hidden" name="id" value="<?php echo $_M['id']?>">
|
||||
<input type="hidden" name="uid" value="<?php echo $_M['uid']?>">
|
||||
<input type="hidden" name="avatar" value="<?php echo $_M['photo']?>">
|
||||
<input type="hidden" name="check_id" value="1">
|
||||
<input type="hidden" name="check_nic" value="1">
|
||||
<input type="hidden" name="check_email" value="1">
|
||||
<input type="hidden" name="check_phone" value="1">
|
||||
<input type="submit" style="position:absolute;left:-1000px;">
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
|
||||
<div class="media">
|
||||
<img alt="avatar" src="<?php echo getAvatarSrc($_M['uid'],'64') ?>" width="64" height="64" class="rounded-circle mr-3">
|
||||
<div class="media-body">
|
||||
<p class="mb-1">
|
||||
<input type="file" name="upfile" class="hidden" id="rb-upfile-avatar" accept="image/jpg" onchange="getId('rb-photo-btn').innerHTML='이미지 파일 선택됨';">
|
||||
<button type="button" class="btn btn-light btn-sm" onclick="$('#rb-upfile-avatar').click();" id="rb-photo-btn">
|
||||
<i class="fa fa-upload" aria-hidden="true"></i>
|
||||
업로드
|
||||
</button>
|
||||
</p>
|
||||
<span class="text-muted">
|
||||
<strong>사이즈</strong>는 250*250 <strong>이상</strong>
|
||||
<?php if($_M['photo']):?> <label>( <input type="checkbox" name="avatar_delete" value="1"> 현재 아바타 삭제 )</label><?php endif?>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="form-group">
|
||||
<label class="sr-only">비밀번호</label>
|
||||
<input type="password" class="form-control form-control-sm mb-2" name="pw1" placeholder="새 비밀번호">
|
||||
<input type="password" class="form-control form-control-sm" name="pw2" placeholder="비밀번호 재입력">
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label">아이디</label>
|
||||
<div class="col-sm-10 pt-2">
|
||||
<span><?php echo $_M['id']?></span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row no-gutters">
|
||||
<label class="col-sm-2 col-form-label">이름</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control form-control-sm" name="name" placeholder="" value="<?php echo $_M['name']?>" maxlength="10">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row no-gutters">
|
||||
<label class="col-sm-2 col-form-label">이메일</label>
|
||||
<div class="col-sm-10">
|
||||
|
||||
<select class="form-control custom-select form-control-sm" name="email">
|
||||
<option value=""> + 선택하세요</option>
|
||||
<option value="" disabled>------------------</option>
|
||||
<?php
|
||||
$sqlque = 'mbruid='.$_M['uid'];
|
||||
$ECD = getDbArray($table['s_mbremail'],$sqlque,'*','uid','asc',0,1);
|
||||
$NUM_MAIL = getDbRows($table['s_mbremail'],$sqlque);
|
||||
?>
|
||||
<?php while($E=db_fetch_array($ECD)):?>
|
||||
<option value="<?php echo $E['email']?>"<?php if($E['email']==$_M['email']):?> selected="selected"<?php endif?>>
|
||||
<?php echo $E['email']?> <?php if (!$E['d_verified']): ?>(미인증)<?php endif; ?>
|
||||
</option>
|
||||
<?php endwhile?>
|
||||
<?php if (!$NUM_MAIL): ?>
|
||||
<option value="" disabled selected="selected">등록된 이메일이 없습니다.</option>
|
||||
<?php endif; ?>
|
||||
</select>
|
||||
|
||||
<div class=" mt-2">
|
||||
<div class="custom-control custom-checkbox custom-control-inline">
|
||||
<input type="checkbox" class="custom-control-input" id="remail" name="remail" value="1"<?php if($_M['mailing']):?> checked="checked"<?php endif?> <?php echo !$_M['email']?' disabled':'' ?>>
|
||||
<label class="custom-control-label" for="remail">뉴스레터나 공지이메일을 수신받겠습니다.</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row no-gutters">
|
||||
<label class="col-sm-2 col-form-label">휴대전화</label>
|
||||
<div class="col-sm-10">
|
||||
<select class="form-control custom-select form-control-sm" name="phone">
|
||||
<option value=""> + 선택하세요</option>
|
||||
<option value="" disabled>------------------</option>
|
||||
<?php
|
||||
$sqlque = 'mbruid='.$_M['uid'];
|
||||
$PCD = getDbArray($table['s_mbrphone'],$sqlque,'*','uid','asc',0,1);
|
||||
$NUM_PHONE = getDbRows($table['s_mbrphone'],$sqlque);
|
||||
?>
|
||||
<?php while($P=db_fetch_array($PCD)):?>
|
||||
<option value="<?php echo $P['phone']?>"<?php if($P['phone']==$_M['phone']):?> selected="selected"<?php endif?>>
|
||||
<?php echo substr($P['phone'], 0,3).'-'.substr($P['phone'], 3,4).'-'.substr($P['phone'], 7,4) ?> <?php if (!$P['d_verified']): ?>(미인증)<?php endif; ?>
|
||||
</option>
|
||||
<?php endwhile?>
|
||||
<?php if (!$NUM_PHONE): ?>
|
||||
<option value="" disabled selected="selected">등록된 휴대폰이 없습니다.</option>
|
||||
<?php endif; ?>
|
||||
</select>
|
||||
|
||||
<div class="pt-2">
|
||||
<div class="custom-control custom-checkbox custom-control-inline">
|
||||
<input type="checkbox" class="custom-control-input" id="sms" name="sms" value="1"<?php if($_M['sms']):?> checked="checked"<?php endif?><?php echo !$_M['phone']?' disabled':'' ?>>
|
||||
<label class="custom-control-label" for="sms">이벤트와 공지 SMS를 수신 받겠습니다.</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
</div><!-- /.col -->
|
||||
<div class="col border-left">
|
||||
|
||||
<div class="form-group row no-gutters">
|
||||
<label class="col-sm-2 col-form-label">닉네임</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control form-control-sm" name="nic" placeholder="" value="<?php echo $_M['nic']?>" maxlength="20" onchange="sendCheck('rb-nickcheck','nic');">
|
||||
<span class="input-group-append">
|
||||
<button type="button" class="btn btn-light" id="rb-nickcheck" onclick="sendCheck('rb-nickcheck','nic');">중복확인</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row no-gutters">
|
||||
<label class="col-sm-2 col-form-label">전화번호</label>
|
||||
<div class="col-sm-10">
|
||||
<?php $tel=explode('-',$_M['tel'])?>
|
||||
<div class="form-inline">
|
||||
<input type="text" name="tel_1" value="<?php echo $tel[0]?>" maxlength="4" size="4" class="form-control form-control-sm">
|
||||
<input type="text" name="tel_2" value="<?php echo $tel[1]?>" maxlength="4" size="4" class="form-control form-control-sm ml-2">
|
||||
<input type="text" name="tel_3" value="<?php echo $tel[2]?>" maxlength="4" size="4" class="form-control form-control-sm ml-2">
|
||||
<div class="invalid-feedback">
|
||||
전화번호를 입력해주세요.
|
||||
</div>
|
||||
</div><!-- /.form-inline -->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="form-group row no-gutters">
|
||||
<label class="col-sm-2 col-form-label">생년월일</label>
|
||||
<div class="col-sm-10">
|
||||
|
||||
<div class="form-inline">
|
||||
<select class="form-control custom-select form-control-sm" name="birth_1">
|
||||
<option value="">년도</option>
|
||||
<?php for($i = substr($date['today'],0,4); $i > 1930; $i--):?>
|
||||
<option value="<?php echo $i?>"<?php if($_M['birth1']==$i):?> selected="selected"<?php endif?>><?php echo $i?></option>
|
||||
<?php endfor?>
|
||||
</select>
|
||||
<select class="form-control custom-select ml-2 form-control-sm" name="birth_2">
|
||||
<option value="">월</option>
|
||||
<?php $birth_2=substr($_M['birth2'],0,2)?>
|
||||
<?php for($i = 1; $i < 13; $i++):?>
|
||||
<option value="<?php echo sprintf('%02d',$i)?>"<?php if($birth_2==$i):?> selected="selected"<?php endif?>><?php echo $i?></option>
|
||||
<?php endfor?>
|
||||
</select>
|
||||
<select class="form-control custom-select ml-2 form-control-sm" name="birth_3">
|
||||
<option value="">일</option>
|
||||
<?php $birth_3=substr($_M['birth2'],2,2)?>
|
||||
<?php for($i = 1; $i < 32; $i++):?>
|
||||
<option value="<?php echo sprintf('%02d',$i)?>"<?php if($birth_3==$i):?> selected="selected"<?php endif?>><?php echo $i?></option>
|
||||
<?php endfor?>
|
||||
</select>
|
||||
<div class="custom-control custom-checkbox ml-3">
|
||||
<input type="checkbox" class="custom-control-input" name="birthtype" id="birthtype" value="1"<?php if($_M['birthtype']):?> checked="checked"<?php endif?>>
|
||||
<label class="custom-control-label" for="birthtype">음력</label>
|
||||
</div>
|
||||
<div class="invalid-feedback">
|
||||
생년월일을 지정해 주세요.
|
||||
</div>
|
||||
</div><!-- /.form-inline -->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row no-gutters">
|
||||
<label class="col-sm-2 col-form-label">성별</label>
|
||||
<div class="col-sm-10 pt-1">
|
||||
<div class="custom-control custom-radio custom-control-inline">
|
||||
<input type="radio" id="sex_1" name="sex" class="custom-control-input" value="1"<?php if($_M['sex']==1):?> checked="checked"<?php endif?>>
|
||||
<label class="custom-control-label" for="sex_1">남성</label>
|
||||
</div>
|
||||
<div class="custom-control custom-radio custom-control-inline">
|
||||
<input type="radio" id="sex_2" name="sex" class="custom-control-input" value="2"<?php if($_M['sex']==2):?> checked="checked"<?php endif?>>
|
||||
<label class="custom-control-label" for="sex_2">여성</label>
|
||||
</div>
|
||||
<div class="invalid-feedback">
|
||||
성별을 선택해 주세요.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr>
|
||||
<div class="form-group">
|
||||
<label>간단소개</label>
|
||||
<textarea class="form-control" name="bio" rows="2" placeholder="간단소개를 입력해 주세요."><?php echo $_M['bio']?></textarea>
|
||||
</div>
|
||||
<div class="form-group row no-gutters">
|
||||
<label class="col-sm-2 col-form-label">홈페이지</label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control form-control-sm" name="home" value="<?php echo $_M['home']?>" placeholder="URL을 입력하세요.">
|
||||
<div class="invalid-feedback">
|
||||
홈페이지 주소를 입력해주세요.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="form-group row no-gutters">
|
||||
<label class="col-sm-2 col-form-label">거주지역</label>
|
||||
<div class="col-sm-10">
|
||||
<select class="form-control custom-select form-control-sm" name="location">
|
||||
<option value=""> + 선택하세요</option>
|
||||
<option value="" disabled>------------------</option>
|
||||
<?php
|
||||
$_tmpvfile = $g['path_module'].$module.'/var/location.txt';
|
||||
$_location=file($_tmpvfile);
|
||||
?>
|
||||
<?php foreach($_location as $_val):?>
|
||||
<option value="<?php echo trim($_val)?>"<?php if(trim($_val)==$_M['location']):?> selected="selected"<?php endif?>>ㆍ<?php echo trim($_val)?></option>
|
||||
<?php endforeach?>
|
||||
</select>
|
||||
<div class="invalid-feedback">
|
||||
거주지역을 선택해 주세요.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row no-gutters">
|
||||
<label class="col-sm-2 col-form-label">직업</label>
|
||||
<div class="col-sm-10">
|
||||
<select class="form-control custom-select form-control-sm" name="job">
|
||||
<option value=""> + 선택하세요</option>
|
||||
<option value="" disabled>------------------</option>
|
||||
<?php
|
||||
$_tmpvfile = $g['path_module'].$module.'/var/job.txt';
|
||||
$_job=file($_tmpvfile);
|
||||
?>
|
||||
<?php foreach($_job as $_val):?>
|
||||
<option value="<?php echo trim($_val)?>"<?php if(trim($_val)==$_M['job']):?> selected="selected"<?php endif?>>ㆍ<?php echo trim($_val)?></option>
|
||||
<?php endforeach?>
|
||||
</select>
|
||||
<div class="invalid-feedback">
|
||||
직업을 선택해 주세요.
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row no-gutters">
|
||||
<label class="col-sm-2 col-form-label">결혼기념일</label>
|
||||
<div class="col-sm-10">
|
||||
|
||||
<div class="form-inline">
|
||||
|
||||
<select class="form-control custom-select form-control-sm" name="marr_1">
|
||||
<option value="">년도</option>
|
||||
<?php for($i = substr($date['today'],0,4); $i > 1930; $i--):?>
|
||||
<option value="<?php echo $i?>"<?php if($i==$_M['marr1']):?> selected="selected"<?php endif?>><?php echo $i?></option>
|
||||
<?php endfor?>
|
||||
</select>
|
||||
<select class="form-control custom-select ml-2 form-control-sm" name="marr_2">
|
||||
<option value="">월</option>
|
||||
<?php for($i = 1; $i < 13; $i++):?>
|
||||
<option value="<?php echo sprintf('%02d',$i)?>"<?php if($i==substr($_M['marr2'],0,2)):?> selected="selected"<?php endif?>><?php echo $i?></option>
|
||||
<?php endfor?>
|
||||
</select>
|
||||
<select class="form-control custom-select ml-2 form-control-sm" name="marr_3">
|
||||
<option value="">일</option>
|
||||
<?php for($i = 1; $i < 32; $i++):?>
|
||||
<option value="<?php echo sprintf('%02d',$i)?>"<?php if($i==substr($_M['marr2'],2,2)):?> selected="selected"<?php endif?>><?php echo $i?></option>
|
||||
<?php endfor?>
|
||||
</select>
|
||||
<div class="invalid-feedback">
|
||||
결혼기념일을 입력해주세요.
|
||||
</div>
|
||||
</div><!-- /.form-inline -->
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div><!-- /.col -->
|
||||
</div><!-- /.row -->
|
||||
<hr>
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
|
||||
<?php $g['memberAddFieldSite'] = $g['path_var'].'site/'.$r.'/member.add_field.txt'; ?>
|
||||
<?php $_add = file_exists($g['memberAddFieldSite']) ? file($g['memberAddFieldSite']) : file($g['path_module'].'member/var/add_field.txt');?>
|
||||
<?php foreach($_add as $_key):?>
|
||||
<?php $_val = explode('|',trim($_key))?>
|
||||
<?php if($_val[6]) continue?>
|
||||
<?php $_myadd1 = explode($_val[0].'^^^',$_M['addfield'])?>
|
||||
<?php $_myadd2 = explode('|||',$_myadd1[1])?>
|
||||
|
||||
<div class="form-group row">
|
||||
<label class="col-sm-2 col-form-label"><?php echo $_val[1]?></label>
|
||||
<div class="col-sm-10 pt-2">
|
||||
<?php if($_val[2]=='text'):?>
|
||||
<input type="text" name="add_<?php echo $_val[0]?>" class="form-control" value="<?php echo $_myadd2[0]?>" />
|
||||
<?php endif?>
|
||||
<?php if($_val[2]=='password'):?>
|
||||
<input type="password" name="add_<?php echo $_val[0]?>" class="form-control" value="<?php echo $_myadd2[0]?>" />
|
||||
<?php endif?>
|
||||
<?php if($_val[2]=='select'): $_skey=explode(',',$_val[3])?>
|
||||
<select name="add_<?php echo $_val[0]?>" class="form-control custom-select">
|
||||
<option value=""> + 선택하세요</option>
|
||||
<?php foreach($_skey as $_sval):?>
|
||||
<option value="<?php echo trim($_sval)?>"<?php if(trim($_sval)==$_myadd2[0]):?> selected="selected"<?php endif?>>ㆍ<?php echo trim($_sval)?></option>
|
||||
<?php endforeach?>
|
||||
</select>
|
||||
<?php endif?>
|
||||
<?php if($_val[2]=='radio'): $_skey=explode(',',$_val[3])?>
|
||||
<div class="shift">
|
||||
<?php foreach($_skey as $_sval):?>
|
||||
<div class="custom-control custom-radio custom-control-inline">
|
||||
<input type="radio" id="add_<?php echo $_val[0]?>_<?php echo trim($_sval)?>" name="add_<?php echo $_val[0]?>" value="<?php echo trim($_sval)?>"<?php if(trim($_sval)==$_myadd2[0]):?> checked="checked"<?php endif?> class="custom-control-input">
|
||||
<label class="custom-control-label" for="add_<?php echo $_val[0]?>_<?php echo trim($_sval)?>"><?php echo trim($_sval)?></label>
|
||||
</div>
|
||||
<?php endforeach?>
|
||||
</div>
|
||||
<?php endif?>
|
||||
<?php if($_val[2]=='checkbox'): $_skey=explode(',',$_val[3])?>
|
||||
<div class="shift">
|
||||
<?php foreach($_skey as $_sval):?>
|
||||
<div class="custom-control custom-checkbox custom-control-inline">
|
||||
<input type="checkbox" class="custom-control-input" id="add_<?php echo $_val[0]?>_<?php echo trim($_sval)?>" name="add_<?php echo $_val[0]?>[]" value="<?php echo trim($_sval)?>"<?php if(strstr($_myadd2[0],'['.trim($_sval).']')):?> checked="checked"<?php endif?>>
|
||||
<label class="custom-control-label" for="add_<?php echo $_val[0]?>_<?php echo trim($_sval)?>"><?php echo trim($_sval)?></label>
|
||||
</div>
|
||||
<?php endforeach?>
|
||||
</div>
|
||||
<?php endif?>
|
||||
<?php if($_val[2]=='textarea'):?>
|
||||
<textarea name="add_<?php echo $_val[0]?>" rows="5" class="form-control"><?php echo $_myadd2[0]?></textarea>
|
||||
<?php endif?>
|
||||
</div>
|
||||
</div><!-- /.form-group -->
|
||||
<?php endforeach?>
|
||||
|
||||
</div><!-- /.col -->
|
||||
</div><!-- /.row -->
|
||||
|
||||
|
||||
</form>
|
||||
|
||||
<form name="actionform" action="<?php echo $g['s']?>/" method="post">
|
||||
<input type="hidden" name="r" value="<?php echo $r?>">
|
||||
<input type="hidden" name="m" value="<?php echo $module?>">
|
||||
<input type="hidden" name="a" value="admin_member_add_check">
|
||||
<input type="hidden" name="type" value="">
|
||||
<input type="hidden" name="fvalue" value="">
|
||||
</form>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<script>
|
||||
|
||||
|
||||
$(function() {
|
||||
|
||||
});
|
||||
|
||||
</script>
|
||||
128
modules/member/admin/manager/log.php
Normal file
128
modules/member/admin/manager/log.php
Normal file
@@ -0,0 +1,128 @@
|
||||
<?php
|
||||
$sort = $sort ? $sort : 'uid';
|
||||
$orderby= $orderby ? $orderby : 'desc';
|
||||
$recnum = $recnum && $recnum < 200 ? $recnum : 10;
|
||||
|
||||
$sqlque = 'mbruid='.$_M['uid'];
|
||||
if ($siteuid) $sqlque .= ' and site='.$siteuid;
|
||||
if ($d_start) $sqlque .= ' and d_regis > '.str_replace('/','',$d_start).'000000';
|
||||
if ($d_finish) $sqlque .= ' and d_regis < '.str_replace('/','',$d_finish).'240000';
|
||||
if ($where && $keyw)
|
||||
{
|
||||
$sqlque .= getSearchSql($where,$keyw,$ikeyword,'or');
|
||||
}
|
||||
$RCD = getDbArray($table['s_referer'],$sqlque,'*',$sort,$orderby,$recnum,$p);
|
||||
$NUM = getDbRows($table['s_referer'],$sqlque);
|
||||
$TPG = getTotalPage($NUM,$recnum);
|
||||
?>
|
||||
|
||||
<div class="manager-list pt-3 px-3">
|
||||
|
||||
<form name="searchForm" action="<?php echo $g['s']?>/" method="get">
|
||||
<input type="hidden" name="r" value="<?php echo $r?>">
|
||||
<input type="hidden" name="m" value="<?php echo $m?>">
|
||||
<input type="hidden" name="module" value="<?php echo $module?>">
|
||||
<input type="hidden" name="front" value="<?php echo $front?>">
|
||||
<input type="hidden" name="tab" value="<?php echo $tab?>">
|
||||
<input type="hidden" name="uid" value="<?php echo $_M['uid']?>">
|
||||
<input type="hidden" name="p" value="<?php echo $p?>">
|
||||
<input type="hidden" name="iframe" value="<?php echo $iframe?>">
|
||||
|
||||
<div class="d-flex justify-content-between align-items-center">
|
||||
<div>
|
||||
<small><?php echo sprintf('총 %d건',$NUM)?></small>
|
||||
<span class="badge badge-pill badge-dark"><?php echo $p?>/<?php echo $TPG?> 페이지</span>
|
||||
<button type="button" class="btn btn-link btn-sm muted-link" data-toggle="collapse" data-target="#search-more-bbs" onclick="sessionSetting('sh_bbslist','1','','1');">
|
||||
고급검색
|
||||
</button>
|
||||
</div>
|
||||
<div class="form-inline">
|
||||
<select name="siteuid" class="form-control form-control-sm custom-select" onchange="this.form.submit();">
|
||||
<option value="">전체 사이트</option>
|
||||
<?php $SITES = getDbArray($table['s_site'],'','*','gid','asc',0,$p)?>
|
||||
<?php while($S = db_fetch_array($SITES)):?>
|
||||
<option value="<?php echo $S['uid']?>"<?php if($S['uid']==$siteuid):?> selected<?php endif?>><?php echo $S['name']?> (<?php echo $S['id']?>)</option>
|
||||
<?php endwhile?>
|
||||
</select>
|
||||
|
||||
<select name="bid" class="form-control form-control-sm custom-select ml-2" onchange="this.form.submit();">
|
||||
<option value="">전체 게시판</option>
|
||||
<?php $_BBSLIST = getDbArray($table['bbslist'],'','*','gid','asc',0,1)?>
|
||||
<?php while($_B=db_fetch_array($_BBSLIST)):?>
|
||||
<option value="<?php echo $_B['uid']?>"<?php if($_B['uid']==$bid):?> selected="selected"<?php endif?>>ㆍ<?php echo $_B['name']?>(<?php echo $_B['id']?>)</option>
|
||||
<?php endwhile?>
|
||||
<?php if(!db_num_rows($_BBSLIST)):?>
|
||||
<option value="">등록된 게시판이 없습니다.</option>
|
||||
<?php endif?>
|
||||
</select>
|
||||
|
||||
</div><!-- /.form-inline -->
|
||||
</div><!-- /.d-flex -->
|
||||
|
||||
<div id="search-more-bbs" class="mt-3 collapse<?php if($_SESSION['sh_bbslist']):?> show<?php endif?>">
|
||||
<div class="d-flex justify-content-between align-items-center">
|
||||
<div class="form-inline input-daterange" id="datepicker">
|
||||
<input type="text" class="form-control form-control-sm" name="d_start" placeholder="시작일" value="<?php echo $d_start?>">
|
||||
<span class="px-1">~</span>
|
||||
<input type="text" class="form-control form-control-sm" name="d_finish" placeholder="종료일" value="<?php echo $d_finish?>">
|
||||
<button class="btn btn-light btn-sm ml-1" type="submit"><i class="fa fa-search"></i></button>
|
||||
</div><!-- /.form-inline -->
|
||||
<div class="form-inline">
|
||||
<select name="where" class="form-control form-control-sm custom-select">
|
||||
<option<?php if($where=='ip'):?> selected<?php endif?> value="ip">아이피</option>
|
||||
<option<?php if($where=='referer'):?> selected<?php endif?> value="referer">접속경로</option>
|
||||
</select>
|
||||
<input type="text" name="keyw" class="form-control form-control-sm ml-1" placeholder="검색어를 입력해주세요." value="<?php echo $keyw?>">
|
||||
<button class="btn btn-light ml-1" type="submit"><i class="fa fa-search"></i>검색</button>
|
||||
<button class="btn btn-light ml-1" type="button" onclick="this.form.keyw.value='';this.form.submit();">리셋</button>
|
||||
</div><!-- /.form-inline -->
|
||||
</div><!-- /.d-flex -->
|
||||
</div><!-- /.collapse -->
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<table class="table table-sm table-hover border-bottom mt-3 text-center f12">
|
||||
<thead class="small text-muted">
|
||||
<tr>
|
||||
<th>번호</th>
|
||||
<th>아이피</th>
|
||||
<th class="rb-url">접속경로</th>
|
||||
<th>브라우저</th>
|
||||
<th>기기</th>
|
||||
<th>날짜</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php while($R=db_fetch_array($RCD)):?>
|
||||
<?php $_browzer=getBrowzer($R['agent'])?>
|
||||
<?php $_deviceKind=isMobileConnect($R['agent'])?>
|
||||
<?php $_deviceType=getDeviceKind($R['agent'],$_deviceKind)?>
|
||||
<tr>
|
||||
<td><?php echo $NUM-((($p-1)*$recnum)+$_rec++)?></td>
|
||||
<td><?php echo $R['ip']?></td>
|
||||
<td class="rb-url"><a href="<?php echo $R['referer']?>" target="_blank"><?php echo getDomain($R['referer'])?></a></td>
|
||||
<td><?php echo strtoupper($_browzer)?></td>
|
||||
<td>
|
||||
<?php if($_browzer=='Mobile'):?>
|
||||
<small class="badge badge-<?php echo $_deviceType=='tablet'?'danger':'warning'?>" data-tooltip="tooltip" title="<?php echo $_deviceKind?>"><?php echo $_deviceType?></small>
|
||||
<?php else:?>
|
||||
<small class="badge badge-dark">DESKTOP</small>
|
||||
<?php endif?>
|
||||
</td>
|
||||
<td class="rb-update">
|
||||
<time class="timeago" data-toggle="tooltip" datetime="<?php echo getDateFormat($R['d_regis'],'c')?>" data-tooltip="tooltip" title="<?php echo getDateFormat($R['d_regis'],'Y.m.d H:i')?>"></time>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endwhile?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php if(!$NUM):?>
|
||||
<div class="text-muted text-center py-4">
|
||||
<i class="fa fa-exclamation-circle fa-2x mb-1 d-block" aria-hidden="true"></i>
|
||||
<small>데이타가 없습니다.</small>
|
||||
</div>
|
||||
<?php endif?>
|
||||
|
||||
<ul class="pagination pagination-sm justify-content-center py-3">
|
||||
<script type="text/javascript">getPageLink(5,<?php echo $p?>,<?php echo $TPG?>,'');</script>
|
||||
</ul>
|
||||
174
modules/member/admin/manager/notice.php
Normal file
174
modules/member/admin/manager/notice.php
Normal file
@@ -0,0 +1,174 @@
|
||||
<?php
|
||||
$sort = $sort ? $sort : 'uid';
|
||||
$orderby= $orderby ? $orderby : 'desc';
|
||||
$recnum = $recnum && $recnum < 200 ? $recnum : 5;
|
||||
|
||||
$sqlque = 'mbruid='.$_M['uid'];
|
||||
if ($account) $sqlque .= ' and site='.$account;
|
||||
if ($moduleid) $sqlque .= " and frommodule='".$moduleid."'";
|
||||
if ($isread)
|
||||
{
|
||||
if ($isread == 1) $sqlque .= " and d_read<>''";
|
||||
else $sqlque .= " and d_read=''";
|
||||
}
|
||||
if ($d_start) $sqlque .= ' and d_regis > '.str_replace('/','',$d_start).'000000';
|
||||
if ($d_finish) $sqlque .= ' and d_regis < '.str_replace('/','',$d_finish).'240000';
|
||||
if ($where && $keyw)
|
||||
{
|
||||
$sqlque .= getSearchSql($where,$keyw,$ikeyword,'or');
|
||||
}
|
||||
$RCD = getDbArray($table['s_notice'],$sqlque,'*',$sort,$orderby,$recnum,$p);
|
||||
$NUM = getDbRows($table['s_notice'],$sqlque);
|
||||
$TPG = getTotalPage($NUM,$recnum);
|
||||
?>
|
||||
|
||||
<div class="manager-list pt-3 px-3">
|
||||
|
||||
<form name="searchForm" action="<?php echo $g['s']?>/" method="get">
|
||||
<input type="hidden" name="r" value="<?php echo $r?>">
|
||||
<input type="hidden" name="m" value="<?php echo $m?>">
|
||||
<input type="hidden" name="module" value="<?php echo $module?>">
|
||||
<input type="hidden" name="front" value="<?php echo $front?>">
|
||||
<input type="hidden" name="tab" value="<?php echo $tab?>">
|
||||
<input type="hidden" name="uid" value="<?php echo $_M['uid']?>">
|
||||
<input type="hidden" name="p" value="<?php echo $p?>">
|
||||
<input type="hidden" name="iframe" value="<?php echo $iframe?>">
|
||||
|
||||
<div class="d-flex justify-content-between align-items-center">
|
||||
<div>
|
||||
<small><?php echo sprintf('총 %d건',$NUM)?></small>
|
||||
<span class="badge badge-pill badge-dark"><?php echo $p?>/<?php echo $TPG?> 페이지</span>
|
||||
<button type="button" class="btn btn-link btn-sm muted-link" data-toggle="collapse" data-target="#search-more-bbs" onclick="sessionSetting('sh_bbslist','1','','1');">
|
||||
고급검색
|
||||
</button>
|
||||
</div>
|
||||
<div class="form-inline">
|
||||
<select name="bid" class="form-control form-control-sm custom-select" onchange="this.form.submit();">
|
||||
<option value="">모듈</option>
|
||||
<?php $MODULES = getDbArray($table['s_module'],'','*','gid','asc',0,$p)?>
|
||||
<?php while($MD = db_fetch_array($MODULES)):?>
|
||||
<option value="<?php echo $MD['id']?>"<?php if($MD['id']==$moduleid):?> selected<?php endif?>><?php echo $MD['name']?> (<?php echo $MD['id']?>)</option>
|
||||
<?php endwhile?>
|
||||
</select>
|
||||
<select name="isread" class="form-control form-control-sm custom-select ml-2" onchange="this.form.submit();">
|
||||
<option value="">상태</option>
|
||||
<option value="1"<?php if($isread==1):?> selected<?php endif?>>확인</option>
|
||||
<option value="2"<?php if($isread==2):?> selected<?php endif?>>미확인</option>
|
||||
</select>
|
||||
</div><!-- /.form-inline -->
|
||||
</div><!-- /.d-flex -->
|
||||
|
||||
<div id="search-more-bbs" class="mt-3 collapse<?php if($_SESSION['sh_bbslist']):?> show<?php endif?>">
|
||||
<div class="d-flex justify-content-between align-items-center">
|
||||
<div class="form-inline input-daterange" id="datepicker">
|
||||
<input type="text" class="form-control form-control-sm" name="d_start" placeholder="시작일" value="<?php echo $d_start?>">
|
||||
<span class="px-1">~</span>
|
||||
<input type="text" class="form-control form-control-sm" name="d_finish" placeholder="종료일" value="<?php echo $d_finish?>">
|
||||
<button class="btn btn-light btn-sm ml-1" type="submit"><i class="fa fa-search"></i></button>
|
||||
</div><!-- /.form-inline -->
|
||||
<div class="form-inline">
|
||||
<select name="where" class="form-control form-control-sm custom-select">
|
||||
<option value="message"<?php if($where=='message'):?> selected="selected"<?php endif?>>메세지</option>
|
||||
<option value="referer"<?php if($where=='referer'):?> selected="selected"<?php endif?>>URL</option>
|
||||
</select>
|
||||
<input type="text" name="keyw" class="form-control form-control-sm ml-1" placeholder="검색어를 입력해주세요." value="<?php echo $keyw?>">
|
||||
<button class="btn btn-light ml-1" type="submit"><i class="fa fa-search"></i>검색</button>
|
||||
<button class="btn btn-light ml-1" type="button" onclick="this.form.keyw.value='';this.form.submit();">리셋</button>
|
||||
</div><!-- /.form-inline -->
|
||||
</div><!-- /.d-flex -->
|
||||
</div><!-- /.collapse -->
|
||||
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<form name="adm_list_form" class="mt-3" action="<?php echo $g['s']?>/" method="post">
|
||||
<input type="hidden" name="r" value="<?php echo $r?>">
|
||||
<input type="hidden" name="module" value="<?php echo $module?>">
|
||||
<input type="hidden" name="front" value="<?php echo $front?>">
|
||||
<input type="hidden" name="tab" value="<?php echo $tab?>">
|
||||
<input type="hidden" name="p" value="<?php echo $p?>">
|
||||
<input type="hidden" name="iframe" value="<?php echo $iframe?>">
|
||||
<input type="hidden" name="m" value=""> <!-- 액션파일이 있는 모듈명 -->
|
||||
<input type="hidden" name="a" value=""> <!-- 액션명 -->
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover f13 text-center">
|
||||
<colgroup>
|
||||
<col width="50">
|
||||
<col width="50">
|
||||
<col width="50">
|
||||
<col>
|
||||
<col width="100">
|
||||
<col width="100">
|
||||
</colgroup>
|
||||
<thead class="small text-muted">
|
||||
<tr>
|
||||
<th><input type="checkbox" class="checkAll-act-list" data-toggle="tooltip" title="전체선택"></th>
|
||||
<th>번호</th>
|
||||
<th>보낸사람</th>
|
||||
<th>내용</th>
|
||||
<th>전송일시</th>
|
||||
<th>확인일시</th>
|
||||
<th>이메일</th>
|
||||
<th>푸시</th>
|
||||
<th>참조링크</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php while($R=db_fetch_array($RCD)):?>
|
||||
<?php $SM1=$R['mbruid']?getDbData($table['s_mbrdata'],'memberuid='.$R['mbruid'],'name,nic'):array()?>
|
||||
<?php $SM2=$R['frommbr']?getDbData($table['s_mbrdata'],'memberuid='.$R['frommbr'],'name,nic'):array()?>
|
||||
<tr>
|
||||
<td><input type="checkbox" name="noti_members[]" onclick="checkboxCheck();" class="mbr-act-list" value="<?php echo $R['uid']?>"></td>
|
||||
<td><?php echo $NUM-((($p-1)*$recnum)+$_rec++)?></td>
|
||||
<td>
|
||||
<span class="badge badge-pill badge-dark"><?php echo $SM2['name']?$SM2['name']:'시스템'?></span><br>
|
||||
<span class="badge badge-pill badge-dark mt-1"><?php echo $R['frommodule'] ?></span>
|
||||
</td>
|
||||
<td class="text-left">
|
||||
<a tabindex="0"
|
||||
<?php if ($R['referer']): ?>
|
||||
href="<?php echo $R['referer'] ?>" target="_blank"
|
||||
<?php endif; ?>
|
||||
class="muted-link" role="button" data-toggle="popover" data-trigger="hover" data-html="true" data-content="<?php echo $R['message'] ?>" data-placement="top">
|
||||
<?php echo getStrCut($R['title'],'80','..')?><br>
|
||||
<small class="text-muted"><?php echo getStrCut($R['message'],'50','..')?><small>
|
||||
</a>
|
||||
</td>
|
||||
<td class="rb-update">
|
||||
<time class="timeago small text-muted" data-toggle="tooltip" datetime="<?php echo getDateFormat($R['d_regis'],'c')?>" data-tooltip="tooltip" title="<?php echo getDateFormat($R['d_regis'],'Y.m.d H:i')?>"></time>
|
||||
</td>
|
||||
<td class="rb-update">
|
||||
<time class="timeago small text-muted" data-toggle="tooltip" datetime="<?php echo getDateFormat($R['d_read'],'c')?>" data-tooltip="tooltip" title="<?php echo getDateFormat($R['d_read'],'Y.m.d H:i')?>"></time>
|
||||
</td>
|
||||
<td><span class="badge badge-pill badge-dark"><?php echo $R['email']?'발송':'' ?></span></td>
|
||||
<td><span class="badge badge-pill badge-dark"><?php echo $R['push']?'발송':'' ?></span></td>
|
||||
<td>
|
||||
<?php if ($R['referer']): ?>
|
||||
<a href="<?php echo $R['referer'] ?>" class="badge badge-pill badge-dark" target="_blank">
|
||||
<?php echo $R['button'] ?>
|
||||
</span>
|
||||
<?php endif; ?>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
<?php endwhile?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php if(!$NUM):?>
|
||||
<div class="text-muted text-center py-4">
|
||||
<i class="fa fa-exclamation-circle fa-2x mb-1 d-block" aria-hidden="true"></i>
|
||||
<small>데이타가 없습니다.</small>
|
||||
</div>
|
||||
<?php endif?>
|
||||
</div>
|
||||
|
||||
<ul class="pagination pagination-sm justify-content-center py-3">
|
||||
<script type="text/javascript">getPageLink(5,<?php echo $p?>,<?php echo $TPG?>,'');</script>
|
||||
</ul>
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
<script>
|
||||
$('[data-toggle="popover"]').popover()
|
||||
</script>
|
||||
143
modules/member/admin/manager/oneline.php
Normal file
143
modules/member/admin/manager/oneline.php
Normal file
@@ -0,0 +1,143 @@
|
||||
<?php
|
||||
//한줄의견링크
|
||||
function _getPostLink($arr)
|
||||
{
|
||||
global $table;
|
||||
$C = getUidData($table['s_comment'],$arr['parent']);
|
||||
$sync_arr=explode('|',$C['sync']);
|
||||
$B = getUidData($sync_arr[0],$sync_arr[2]);
|
||||
return RW('m='.$sync_arr[1].'&bid='.$B['bbsid'].'&uid='.$sync_arr[2].($GLOBALS['s']!=$arr['site']?'&s='.$arr['site']:''.'#OLN-'.$arr['uid']));
|
||||
}
|
||||
$sort = $sort ? $sort : 'uid';
|
||||
$orderby= $orderby ? $orderby : 'desc';
|
||||
$recnum = $recnum && $recnum < 200 ? $recnum : 5;
|
||||
|
||||
$bbsque = 'mbruid='.$_M['uid'];
|
||||
if ($account) $bbsque .= ' and site='.$account;
|
||||
if ($d_start) $bbsque .= ' and d_regis > '.str_replace('/','',$d_start).'000000';
|
||||
if ($d_finish) $bbsque .= ' and d_regis < '.str_replace('/','',$d_finish).'240000';
|
||||
if ($where && $keyw)
|
||||
{
|
||||
if (strstr('[name][nic][id][ip]',$where)) $bbsque .= " and ".$where."='".$keyw."'";
|
||||
else if ($where == 'term') $bbsque .= " and d_regis like '".$keyw."%'";
|
||||
else $bbsque .= getSearchSql($where,$keyw,$ikeyword,'or');
|
||||
}
|
||||
$RCD = getDbArray($table['s_oneline'],$bbsque,'*',$sort,$orderby,$recnum,$p);
|
||||
$NUM = getDbRows($table['s_oneline'],$bbsque);
|
||||
$TPG = getTotalPage($NUM,$recnum);
|
||||
?>
|
||||
|
||||
<div class="manager-list pt-3 px-3">
|
||||
|
||||
<form name="searchForm" action="<?php echo $g['s']?>/" method="get">
|
||||
<input type="hidden" name="r" value="<?php echo $r?>">
|
||||
<input type="hidden" name="m" value="<?php echo $m?>">
|
||||
<input type="hidden" name="module" value="<?php echo $module?>">
|
||||
<input type="hidden" name="front" value="<?php echo $front?>">
|
||||
<input type="hidden" name="tab" value="<?php echo $tab?>">
|
||||
<input type="hidden" name="uid" value="<?php echo $_M['uid']?>">
|
||||
<input type="hidden" name="p" value="<?php echo $p?>">
|
||||
<input type="hidden" name="iframe" value="<?php echo $iframe?>">
|
||||
|
||||
<div class="d-flex justify-content-between align-items-center">
|
||||
<div>
|
||||
<small><?php echo sprintf('총 %d건',$NUM)?></small>
|
||||
<span class="badge badge-pill badge-dark"><?php echo $p?>/<?php echo $TPG?> 페이지</span>
|
||||
<button type="button" class="btn btn-link btn-sm muted-link" data-toggle="collapse" data-target="#search-more-bbs" onclick="sessionSetting('sh_bbslist','1','','1');">
|
||||
고급 검색
|
||||
</button>
|
||||
</div>
|
||||
<div class="form-inline">
|
||||
<select name="siteuid" class="form-control form-control-sm custom-select mr-2" onchange="this.form.submit();">
|
||||
<option value="">전체 사이트</option>
|
||||
<?php $SITES = getDbArray($table['s_site'],'','*','gid','asc',0,$p)?>
|
||||
<?php while($S = db_fetch_array($SITES)):?>
|
||||
<option value="<?php echo $S['uid']?>"<?php if($S['uid']==$siteuid):?> selected<?php endif?>><?php echo $S['name']?> (<?php echo $S['id']?>)</option>
|
||||
<?php endwhile?>
|
||||
</select>
|
||||
</div><!-- /.form-inline -->
|
||||
</div><!-- /.d-flex -->
|
||||
|
||||
<div id="search-more-bbs" class="mt-2 collapse<?php if($_SESSION['sh_bbslist']):?> show<?php endif?>">
|
||||
<div class="d-flex justify-content-between align-items-center">
|
||||
<div class="form-inline">
|
||||
<div class="input-daterange input-group input-group-sm" id="datepicker">
|
||||
<input type="text" class="form-control form-control-sm" name="d_start" placeholder="시작일" value="<?php echo $d_start?>">
|
||||
<span class="p-1">~</span>
|
||||
<input type="text" class="form-control form-control-sm" name="d_finish" placeholder="종료일" value="<?php echo $d_finish?>">
|
||||
</div>
|
||||
<button class="btn btn-light ml-1" type="submit"><i class="fa fa-search"></i></button>
|
||||
</div><!-- /.form-inline -->
|
||||
<div class="form-inline">
|
||||
<select name="where" class="form-control form-control-sm custom-select mr-1">
|
||||
<option value="content"<?php if($where=='content'):?> selected="selected"<?php endif?>>본문</option>
|
||||
</select>
|
||||
<input type="text" name="keyw" class="form-control form-control-sm" placeholder="검색어를 입력해주세요." value="<?php echo $keyw?>">
|
||||
<button class="btn btn-light ml-1" type="submit"><i class="fa fa-search"></i>검색</button>
|
||||
<button class="btn btn-light ml-1" type="button" onclick="this.form.keyw.value='';this.form.submit();">리셋</button>
|
||||
</div><!-- /.form-inline -->
|
||||
</div><!-- /.d-flex -->
|
||||
</div><!-- /.collapse -->
|
||||
|
||||
</form>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
<form name="adm_list_form" class="mt-3" action="<?php echo $g['s']?>/" method="get">
|
||||
<input type="hidden" name="r" value="<?php echo $r?>">
|
||||
<input type="hidden" name="m" value="<?php echo $m?>">
|
||||
<input type="hidden" name="module" value="comment">
|
||||
<input type="hidden" name="front" value="<?php echo $front?>">
|
||||
<input type="hidden" name="tab" value="<?php echo $tab?>">
|
||||
<input type="hidden" name="p" value="<?php echo $p?>">
|
||||
<input type="hidden" name="iframe" value="<?php echo $iframe?>">
|
||||
<input type="hidden" name="a" value="">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover f13 text-center">
|
||||
<colgroup>
|
||||
<col width="50">
|
||||
<col width="80">
|
||||
<col>
|
||||
<col width="130">
|
||||
</colgroup>
|
||||
<thead class="small text-muted">
|
||||
<tr>
|
||||
<th><input type="checkbox" class="checkAll-act-list" data-toggle="tooltip" title="전체선택"></th>
|
||||
<th>번호</th>
|
||||
<th>한줄의견</th>
|
||||
<th>날짜</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php while($R=db_fetch_array($RCD)):?>
|
||||
<?php $R['mobile']=isMobileConnect($R['agent'])?>
|
||||
<tr>
|
||||
<td><input type="checkbox" name="oneline_members[]" onclick="checkboxCheck();" class="mbr-act-list" value="<?php echo $R['uid']?>"></td>
|
||||
<td><?php echo $NUM-((($p-1)*$recnum)+$_rec++)?></td>
|
||||
<td class="text-left">
|
||||
<?php if($R['mobile']):?><i class="fa fa-mobile fa-lg"></i><?php endif?>
|
||||
<a href="<?php echo getPostLink($R)?>" target="_blank" class="muted-link"><?php echo getStrCut($R['content'],40,'')?></a>
|
||||
<?php if(getNew($R['d_regis'],24)):?><small class="text-danger">New</small><?php endif?>
|
||||
</td>
|
||||
<td class="rb-update">
|
||||
<time class="timeago small text-muted" data-toggle="tooltip" datetime="<?php echo getDateFormat($R['d_regis'],'c')?>" data-tooltip="tooltip" title="<?php echo getDateFormat($R['d_regis'],'Y.m.d H:i')?>"></time>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endwhile?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php if(!$NUM):?>
|
||||
<div class="text-muted text-center py-4">
|
||||
<i class="fa fa-exclamation-circle fa-2x mb-1 d-block" aria-hidden="true"></i>
|
||||
<small>데이타가 없습니다.</small>
|
||||
</div>
|
||||
<?php endif?>
|
||||
</div>
|
||||
|
||||
<ul class="pagination pagination-sm justify-content-center py-3">
|
||||
<script type="text/javascript">getPageLink(5,<?php echo $p?>,<?php echo $TPG?>,'');</script>
|
||||
</ul>
|
||||
|
||||
</form>
|
||||
136
modules/member/admin/manager/paper.php
Normal file
136
modules/member/admin/manager/paper.php
Normal file
@@ -0,0 +1,136 @@
|
||||
<?php
|
||||
|
||||
$sort = $sort ? $sort : 'uid';
|
||||
$orderby= $orderby ? $orderby : 'desc';
|
||||
$recnum = $recnum && $recnum < 200 ? $recnum : 15;
|
||||
|
||||
if ($inbox == 3)
|
||||
{
|
||||
$sqlque = 'by_mbruid='.$_M['uid'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$sqlque = 'my_mbruid='.$_M['memberuid'];
|
||||
if ($inbox) $sqlque .= " and inbox='".$inbox."'";
|
||||
if ($where && $keyw)
|
||||
{
|
||||
$sqlque .= getSearchSql($where,$keyw,$ikeyword,'or');
|
||||
}
|
||||
}
|
||||
if ($d_start) $sqlque .= ' and d_regis > '.str_replace('/','',$d_start).'000000';
|
||||
if ($d_finish) $sqlque .= ' and d_regis < '.str_replace('/','',$d_finish).'240000';
|
||||
|
||||
$RCD = getDbArray($table['s_paper'],$sqlque,'*',$sort,$orderby,$recnum,$p);
|
||||
$NUM = getDbRows($table['s_paper'],$sqlque);
|
||||
$TPG = getTotalPage($NUM,$recnum);
|
||||
?>
|
||||
|
||||
<div class="manager-list pt-3 px-3">
|
||||
|
||||
<form name="searchForm" action="<?php echo $g['s']?>/" method="get">
|
||||
<input type="hidden" name="r" value="<?php echo $r?>">
|
||||
<input type="hidden" name="m" value="<?php echo $m?>">
|
||||
<input type="hidden" name="module" value="<?php echo $module?>">
|
||||
<input type="hidden" name="front" value="<?php echo $front?>">
|
||||
<input type="hidden" name="tab" value="<?php echo $tab?>">
|
||||
<input type="hidden" name="uid" value="<?php echo $_M['uid']?>">
|
||||
<input type="hidden" name="p" value="<?php echo $p?>">
|
||||
<input type="hidden" name="iframe" value="<?php echo $iframe?>">
|
||||
|
||||
<div class="d-flex justify-content-between align-items-center">
|
||||
<div>
|
||||
<small><?php echo sprintf('총 %d건',$NUM)?></small>
|
||||
<span class="badge badge-pill badge-dark"><?php echo $p?>/<?php echo $TPG?> 페이지</span>
|
||||
<button type="button" class="btn btn-link btn-sm muted-link" data-toggle="collapse" data-target="#search-more-bbs" onclick="sessionSetting('sh_bbslist','1','','1');">
|
||||
고급 검색
|
||||
</button>
|
||||
</div>
|
||||
<div>
|
||||
<select name="inbox" class="form-control form-control-sm custom-select" onchange="this.form.submit();">
|
||||
<option value="">구분</option>
|
||||
<option value="1"<?php if($inbox==1):?> selected="selected"<?php endif?>>받은쪽지함</option>
|
||||
<option value="2"<?php if($inbox==2):?> selected="selected"<?php endif?>>쪽지보관함</option>
|
||||
<option value="3"<?php if($inbox==3):?> selected="selected"<?php endif?>>보낸쪽지함</option>
|
||||
</select>
|
||||
</div>
|
||||
</div><!-- /.d-flex -->
|
||||
|
||||
<div id="search-more-bbs" class="mt-2 collapse<?php if($_SESSION['sh_bbslist']):?> show<?php endif?>">
|
||||
<div class="form-inline">
|
||||
<div class="input-daterange input-group input-group-sm" id="datepicker">
|
||||
<input type="text" class="form-control form-control-sm" name="d_start" placeholder="시작일" value="<?php echo $d_start?>">
|
||||
<span class="p-2">~</span>
|
||||
<input type="text" class="form-control form-control-sm" name="d_finish" placeholder="종료일" value="<?php echo $d_finish?>">
|
||||
</div>
|
||||
<button class="btn btn-light ml-1" type="submit"><i class="fa fa-search"></i></button>
|
||||
</div><!-- /.form-inline -->
|
||||
</div>
|
||||
</div><!-- /.collapse -->
|
||||
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<form name="adm_list_form" class="mt-3" action="<?php echo $g['s']?>/" method="get">
|
||||
<input type="hidden" name="r" value="<?php echo $r?>">
|
||||
<input type="hidden" name="m" value="<?php echo $m?>">
|
||||
<input type="hidden" name="module" value="comment">
|
||||
<input type="hidden" name="front" value="<?php echo $front?>">
|
||||
<input type="hidden" name="tab" value="<?php echo $tab?>">
|
||||
<input type="hidden" name="p" value="<?php echo $p?>">
|
||||
<input type="hidden" name="iframe" value="<?php echo $iframe?>">
|
||||
<input type="hidden" name="a" value="">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover f13 text-center">
|
||||
<colgroup>
|
||||
<col width="50">
|
||||
<col width="50">
|
||||
<col width="80">
|
||||
<col width="50">
|
||||
<col>
|
||||
<col width="130">
|
||||
</colgroup>
|
||||
<thead class="small text-muted">
|
||||
<tr>
|
||||
<th><input type="checkbox" class="checkAll-act-list" data-toggle="tooltip" title="전체선택"></th>
|
||||
<th>번호</th>
|
||||
<th><?php echo $inbox==3?'받는이':'보낸이'?></th>
|
||||
<th></th>
|
||||
<th>내용</th>
|
||||
<th>날짜</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php while($R=db_fetch_array($RCD)):?>
|
||||
<?php $R['content']=str_replace(' ',' ',$R['content'])?>
|
||||
<?php $M=getDbData($table['s_mbrdata'],'memberuid='.$R[($index==3?'m':'b').'y_mbruid'],'*')?>
|
||||
<tr>
|
||||
<td><input type="checkbox" name="members[]" onclick="checkboxCheck();" class="mbr-act-list" value="<?php echo $R['uid']?>"></td>
|
||||
<td><?php echo $NUM-((($p-1)*$recnum)+$_rec++)?></td>
|
||||
<td><span class="badge badge-pill badge-dark"><?php echo $M[$_HS['nametype']]?$M[$_HS['nametype']]:'시스템'?></span></td>
|
||||
<td><span class="badge badge-pill badge-dark"><?php echo $R['d_read']?getDateFormat($R['d_read'],'Y.m.d H:i 열람'):'읽지않음'?></span></td>
|
||||
<td class="text-left">
|
||||
<?php echo getStrCut(strip_tags($R['content']),50,'..')?>
|
||||
<?php if(getNew($R['d_regis'],24)):?><small class="text-danger">New</small><?php endif?>
|
||||
</td>
|
||||
<td class="rb-update">
|
||||
<time class="timeago small text-muted" data-toggle="tooltip" datetime="<?php echo getDateFormat($R['d_regis'],'c')?>" data-tooltip="tooltip" title="<?php echo getDateFormat($R['d_regis'],'Y.m.d H:i')?>"></time>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endwhile?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php if(!$NUM):?>
|
||||
<div class="text-muted text-center py-4">
|
||||
<i class="fa fa-exclamation-circle fa-2x mb-1 d-block" aria-hidden="true"></i>
|
||||
<small>데이타가 없습니다.</small>
|
||||
</div>
|
||||
<?php endif?>
|
||||
</div>
|
||||
|
||||
<ul class="pagination pagination-sm justify-content-center py-3">
|
||||
<script type="text/javascript">getPageLink(5,<?php echo $p?>,<?php echo $TPG?>,'');</script>
|
||||
</ul>
|
||||
|
||||
</form>
|
||||
126
modules/member/admin/manager/point.php
Normal file
126
modules/member/admin/manager/point.php
Normal file
@@ -0,0 +1,126 @@
|
||||
<?php
|
||||
|
||||
$type = $type ? $type : 'point';
|
||||
$sort = $sort ? $sort : 'uid';
|
||||
$orderby= $orderby ? $orderby : 'desc';
|
||||
$recnum = $recnum && $recnum < 200 ? $recnum : 15;
|
||||
|
||||
$sqlque = 'my_mbruid='.$_M['uid'];
|
||||
if ($price == '1') $sqlque .= ' and price > 0';
|
||||
if ($price == '2') $sqlque .= ' and price < 0';
|
||||
if ($d_start) $sqlque .= ' and d_regis > '.str_replace('/','',$d_start).'000000';
|
||||
if ($d_finish) $sqlque .= ' and d_regis < '.str_replace('/','',$d_finish).'240000';
|
||||
if ($where && $keyw)
|
||||
{
|
||||
$sqlque .= getSearchSql($where,$keyw,$ikeyword,'or');
|
||||
}
|
||||
$RCD = getDbArray($table['s_'.$type],$sqlque,'*',$sort,$orderby,$recnum,$p);
|
||||
$NUM = getDbRows($table['s_'.$type],$sqlque);
|
||||
$TPG = getTotalPage($NUM,$recnum);
|
||||
?>
|
||||
|
||||
<div class="manager-list pt-3 px-3">
|
||||
|
||||
<form name="searchForm" action="<?php echo $g['s']?>/" method="get">
|
||||
<input type="hidden" name="r" value="<?php echo $r?>">
|
||||
<input type="hidden" name="m" value="<?php echo $m?>">
|
||||
<input type="hidden" name="module" value="<?php echo $module?>">
|
||||
<input type="hidden" name="front" value="<?php echo $front?>">
|
||||
<input type="hidden" name="tab" value="<?php echo $tab?>">
|
||||
<input type="hidden" name="uid" value="<?php echo $_M['uid']?>">
|
||||
<input type="hidden" name="p" value="<?php echo $p?>">
|
||||
<input type="hidden" name="iframe" value="<?php echo $iframe?>">
|
||||
|
||||
<div class="d-flex justify-content-between align-items-center">
|
||||
<div>
|
||||
<small><?php echo sprintf('총 %d건',$NUM)?></small>
|
||||
<span class="badge badge-pill badge-dark"><?php echo $p?>/<?php echo $TPG?> 페이지</span>
|
||||
<button type="button" class="btn btn-link btn-sm muted-link" data-toggle="collapse" data-target="#search-more-bbs" onclick="sessionSetting('sh_bbslist','1','','1');">
|
||||
고급검색
|
||||
</button>
|
||||
</div>
|
||||
<div class="form-inline">
|
||||
<select name="type" class="form-control form-control-sm custom-select" onchange="this.form.submit();">
|
||||
<option value="">구분</option>
|
||||
<option value="point"<?php if($type=='point'):?> selected="selected"<?php endif?>>포인트</option>
|
||||
<option value="cash"<?php if($type=='cash'):?> selected="selected"<?php endif?>>적립금</option>
|
||||
<option value="money"<?php if($type=='money'):?> selected="selected"<?php endif?>>예치금</option>
|
||||
</select>
|
||||
<select name="price" class="form-control form-control-sm custom-select ml-2" onchange="this.form.submit();">
|
||||
<option value="">구분</option>
|
||||
<option value="1"<?php if($price=='1'):?> selected="selected"<?php endif?>>획득</option>
|
||||
<option value="2"<?php if($price=='2'):?> selected="selected"<?php endif?>>사용</option>
|
||||
</select>
|
||||
</div><!-- /.form-inline -->
|
||||
</div><!-- /.d-flex -->
|
||||
|
||||
<div id="search-more-bbs" class="mt-3 collapse<?php if($_SESSION['sh_bbslist']):?> show<?php endif?>">
|
||||
<div class="form-inline input-daterange" id="datepicker">
|
||||
<input type="text" class="form-control form-control-sm" name="d_start" placeholder="시작일" value="<?php echo $d_start?>">
|
||||
<span class="px-1">~</span>
|
||||
<input type="text" class="form-control form-control-sm" name="d_finish" placeholder="종료일" value="<?php echo $d_finish?>">
|
||||
<button class="btn btn-light btn-sm ml-1" type="submit"><i class="fa fa-search"></i></button>
|
||||
</div><!-- /.form-inline -->
|
||||
</div><!-- /.collapse -->
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<form name="adm_list_form" class="mt-3" action="<?php echo $g['s']?>/" method="get">
|
||||
<input type="hidden" name="r" value="<?php echo $r?>">
|
||||
<input type="hidden" name="m" value="<?php echo $m?>">
|
||||
<input type="hidden" name="module" value="comment">
|
||||
<input type="hidden" name="front" value="<?php echo $front?>">
|
||||
<input type="hidden" name="tab" value="<?php echo $tab?>">
|
||||
<input type="hidden" name="p" value="<?php echo $p?>">
|
||||
<input type="hidden" name="iframe" value="<?php echo $iframe?>">
|
||||
<input type="hidden" name="a" value="">
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover f13 text-center">
|
||||
<colgroup>
|
||||
<col width="50">
|
||||
<col width="50">
|
||||
<col width="80">
|
||||
<col>
|
||||
<col width="100">
|
||||
</colgroup>
|
||||
<thead class="small text-muted">
|
||||
<tr>
|
||||
<th><input type="checkbox" class="checkAll-act-list" data-toggle="tooltip" title="전체선택"></th>
|
||||
<th>번호</th>
|
||||
<th>금액</th>
|
||||
<th>내역</th>
|
||||
<th>날짜</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php while($R=db_fetch_array($RCD)):?>
|
||||
<?php $R['content']=str_replace(' ',' ',$R['content'])?>
|
||||
<?php $M=getDbData($table['s_mbrdata'],'memberuid='.$R[($index==3?'m':'b').'y_mbruid'],'*')?>
|
||||
<tr>
|
||||
<td><input type="checkbox" name="members[]" onclick="checkboxCheck();" class="mbr-act-list" value="<?php echo $R['uid']?>"></td>
|
||||
<td><?php echo $NUM-((($p-1)*$recnum)+$_rec++)?></td>
|
||||
<td><span class="badge badge-pill badge-dark"><?php echo ($R['price']>0?'+':'').number_format($R['price'])?></span></td>
|
||||
<td class="text-left">
|
||||
<?php echo getStrCut(strip_tags($R['content']),50,'..')?>
|
||||
<?php if(getNew($R['d_regis'],24)):?><small class="text-danger">New</small><?php endif?>
|
||||
</td>
|
||||
<td class="rb-update">
|
||||
<time class="timeago small text-muted" data-toggle="tooltip" datetime="<?php echo getDateFormat($R['d_regis'],'c')?>" data-tooltip="tooltip" title="<?php echo getDateFormat($R['d_regis'],'Y.m.d H:i')?>"></time>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endwhile?>
|
||||
</tbody>
|
||||
</table>
|
||||
<?php if(!$NUM):?>
|
||||
<div class="text-muted text-center py-4">
|
||||
<i class="fa fa-exclamation-circle fa-2x mb-1 d-block" aria-hidden="true"></i>
|
||||
<small>데이타가 없습니다.</small>
|
||||
</div>
|
||||
<?php endif?>
|
||||
</div>
|
||||
|
||||
<ul class="pagination pagination-sm justify-content-center py-3">
|
||||
<script type="text/javascript">getPageLink(5,<?php echo $p?>,<?php echo $TPG?>,'');</script>
|
||||
</ul>
|
||||
|
||||
</form>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user