From 260de461bca1e85166fe4369270ced50f7c58f18 Mon Sep 17 00:00:00 2001 From: thisgun Date: Thu, 9 Nov 2017 10:32:24 +0900 Subject: [PATCH] =?UTF-8?q?=EA=B7=B8=EB=88=84=EB=B3=B4=EB=93=9C5=20?= =?UTF-8?q?=EB=A6=AC=EB=89=B4=EC=96=BC=20=ED=85=8C=EB=A7=88=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- adm/config_form.php | 6 +----- bbs/group.php | 17 ++++++++--------- css/default.css | 8 ++++---- install/gnuboard5.sql | 6 +----- plugin/social/includes/functions.php | 22 +++++++--------------- theme/basic/css/default.css | 6 +++--- 6 files changed, 24 insertions(+), 41 deletions(-) diff --git a/adm/config_form.php b/adm/config_form.php index 192aee878..ed5bf581c 100644 --- a/adm/config_form.php +++ b/adm/config_form.php @@ -222,11 +222,7 @@ if(!sql_query(" DESC {$g5['social_profile_table']} ", false)) { `photourl` varchar(255) NOT NULL DEFAULT '', `displayname` varchar(150) NOT NULL DEFAULT '', `description` varchar(255) NOT NULL DEFAULT '', - `gender` varchar(10) NOT NULL DEFAULT '', - `age` varchar(10) NOT NULL DEFAULT '', - `birthday` int(11) NOT NULL DEFAULT '0', - `birthmonth` int(11) NOT NULL DEFAULT '0', - `birthyear` int(11) NOT NULL DEFAULT '0', + `mp_register_day` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `mp_latest_day` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', UNIQUE KEY `mp_no` (`mp_no`), KEY `mb_id` (`mb_id`), diff --git a/bbs/group.php b/bbs/group.php index d8ec6bfa7..e30c4dff3 100644 --- a/bbs/group.php +++ b/bbs/group.php @@ -23,8 +23,9 @@ include_once('./_head.php'); include_once(G5_LIB_PATH.'/latest.lib.php'); ?> +
+ -
-
+
-
- +
diff --git a/css/default.css b/css/default.css index ad64e146b..e61861b15 100644 --- a/css/default.css +++ b/css/default.css @@ -205,19 +205,19 @@ box-shadow: 0 2px 5px rgba(0,0,0,0.2);} #captcha {display:inline-block;position:relative} #captcha legend {position:absolute;margin:0;padding:0;font-size:0;line-height:0;text-indent:-9999em;overflow:hidden;} #captcha #captcha_img {;height:40px;border:1px solid #898989;;vertical-align:top;padding:0;margin:0} -#captcha #captcha_mp3 {;margin:0;padding:0;width:40px;height:40px;border:0;background:transparent;vertical-align:middle;overflow:hidden;cursor:pointer;width:40px;height:40px;background:url('../../../img/captcha2.png') no-repeat;text-indent:-999px;;border-radius:3px} -#captcha #captcha_reload {margin:0;padding:0;width:40px;height:40px;border:0;background:transparent;vertical-align:middle;overflow:hidden;cursor:pointer;background:url('../../../img/captcha2.png') no-repeat 0 -40px;text-indent:-999px;border-radius:3px} +#captcha #captcha_mp3 {;margin:0;padding:0;width:40px;height:40px;border:0;background:transparent;vertical-align:middle;overflow:hidden;cursor:pointer;background:url('../img/captcha2.png') no-repeat;text-indent:-999px;;border-radius:3px} +#captcha #captcha_reload {margin:0;padding:0;width:40px;height:40px;border:0;background:transparent;vertical-align:middle;overflow:hidden;cursor:pointer;background:url('../img/captcha2.png') no-repeat 0 -40px;text-indent:-999px;border-radius:3px} #captcha #captcha_key {margin:0 0 0 3px;padding:0 5px;width:90px;height:40px;border:1px solid #ccc;background:#fff;font-size:1.333em;font-weight:bold;text-align:center;border-radius:3px;vertical-align:top} #captcha #captcha_info {display:block;margin:5px 0 0;font-size:0.95em;letter-spacing:-0.1em} /* 캡챠 자동등록(입력)방지 기본 - mobile */ #captcha.m_captcha audio {display:block;margin:0 0 5px;width:187px} #captcha.m_captcha #captcha_img {width:160px;height:60px;border:1px solid #e9e9e9;margin-bottom:3px;margin-top:5px;display:block;} -#captcha.m_captcha #captcha_reload {position:static;margin:0;padding:0;width:40px;height:40px;border:0;background:transparent;vertical-align:middle;overflow:hidden;cursor:pointer;background:url('../../../img/captcha.png') no-repeat 0 -40px;text-indent:-999px} +#captcha.m_captcha #captcha_reload {position:static;margin:0;padding:0;width:40px;height:40px;border:0;background:transparent;vertical-align:middle;overflow:hidden;cursor:pointer;background:url('../img/captcha2.png') no-repeat 0 -40px;text-indent:-999px} #captcha.m_captcha #captcha_reload span{display:none;} #captcha.m_captcha #captcha_key {margin:0;padding:0 5px;width:115px;height:29px;border:1px solid #b8c9c2;background:#f7f7f7;font-size:1.333em;font-weight:bold;text-align:center;line-height:29px;margin-left:3px} #captcha.m_captcha #captcha_info {display:block;margin:5px 0 0;font-size:0.95em;letter-spacing:-0.1em} -#captcha.m_captcha #captcha_mp3 {width:31px;height:31px;background:url('../../../img/captcha.png') no-repeat 0 0 ; vertical-align:top;overflow:hidden;cursor:pointer;text-indent:-9999px;border:none} +#captcha.m_captcha #captcha_mp3 {width:31px;height:31px;background:url('../img/captcha2.png') no-repeat 0 0 ; vertical-align:top;overflow:hidden;cursor:pointer;text-indent:-9999px;border:none} /* ckeditor 단축키 */ .cke_sc {margin:0 0 5px;text-align:right} diff --git a/install/gnuboard5.sql b/install/gnuboard5.sql index 6a47c217e..06850e78f 100644 --- a/install/gnuboard5.sql +++ b/install/gnuboard5.sql @@ -856,11 +856,7 @@ CREATE TABLE IF NOT EXISTS `g5_member_social_profiles` ( `photourl` varchar(255) NOT NULL DEFAULT '', `displayname` varchar(150) NOT NULL DEFAULT '', `description` varchar(255) NOT NULL DEFAULT '', - `gender` varchar(10) NOT NULL DEFAULT '', - `age` varchar(10) NOT NULL DEFAULT '', - `birthday` int(11) NOT NULL DEFAULT '0', - `birthmonth` int(11) NOT NULL DEFAULT '0', - `birthyear` int(11) NOT NULL DEFAULT '0', + `mp_register_day` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `mp_latest_day` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', UNIQUE KEY `mp_no` (`mp_no`), KEY `mb_id` (`mb_id`), diff --git a/plugin/social/includes/functions.php b/plugin/social/includes/functions.php index 1a6f6a27c..b73a02dbe 100644 --- a/plugin/social/includes/functions.php +++ b/plugin/social/includes/functions.php @@ -196,6 +196,8 @@ function social_user_profile_replace( $mb_id, $provider, $profile ){ if( !$mb_id ) return; + // $profile 에 성별, 나이, 생일 등의 정보가 포함되어 있습니다. + //받아온 정보를 암호화 하여 $object_sha = sha1( serialize( $profile ) ); @@ -209,7 +211,7 @@ function social_user_profile_replace( $mb_id, $provider, $profile ){ } } - $sql = sprintf("SELECT mp_no, object_sha from {$g5['social_profile_table']} where mb_id= '%s' and provider= '%s' and identifier = '%s' ", $mb_id, $provider, $profile->identifier); + $sql = sprintf("SELECT mp_no, object_sha, mp_register_day from {$g5['social_profile_table']} where mb_id= '%s' and provider= '%s' and identifier = '%s' ", $mb_id, $provider, $profile->identifier); $row = sql_fetch($sql); @@ -218,6 +220,7 @@ function social_user_profile_replace( $mb_id, $provider, $profile ){ 'mb_id' => "'". $mb_id. "'", 'provider' => "'". $provider . "'", 'object_sha' => "'". $object_sha . "'", + 'mp_register_day' => ! empty($row) ? "'".$row['mp_register_day']."'" : "'". G5_TIME_YMDHIS . "'", 'mp_latest_day' => "'". G5_TIME_YMDHIS . "'", ); @@ -227,11 +230,6 @@ function social_user_profile_replace( $mb_id, $provider, $profile ){ 'photourl', 'displayname', 'description', - 'gender', - 'age', - 'birthday', - 'birthmonth', - 'birthyear', ); foreach( (array) $profile as $key => $value ){ @@ -239,14 +237,8 @@ function social_user_profile_replace( $mb_id, $provider, $profile ){ if( in_array( $key, $fields ) ) { - if( in_array($key, array('birthday', 'birthmonth', 'birthyear')) ){ - - $value = $value ? $value : 0; - $table_data[ $key ] = $value; - - } else { - $table_data[ $key ] = "'". (string) $value. "'"; - } + $value = (string) $value; + $table_data[ $key ] = "'". sql_real_escape_string($value). "'"; } } @@ -868,7 +860,7 @@ function social_member_link_delete($mb_id, $mp_no=''){ $sql = "delete from {$g5['social_profile_table']} where mb_id = '' and mp_latest_day < '$time' "; sql_query($sql); - $sql = "update {$g5['social_profile_table']} set mb_id='', object_sha='', profileurl='', photourl='', displayname='', gender='', age='', birthyear='', birthmonth='', birthday='', mp_latest_day = '".G5_TIME_YMDHIS."' where mb_id= '".$mb_id."'"; + $sql = "update {$g5['social_profile_table']} set mb_id='', object_sha='', profileurl='', photourl='', displayname='', mp_latest_day = '".G5_TIME_YMDHIS."' where mb_id= '".$mb_id."'"; } else { $sql = "delete from {$g5['social_profile_table']} where mb_id= '".$mb_id."'"; //바로 삭제합니다. } diff --git a/theme/basic/css/default.css b/theme/basic/css/default.css index ad64e146b..2906b3373 100644 --- a/theme/basic/css/default.css +++ b/theme/basic/css/default.css @@ -205,7 +205,7 @@ box-shadow: 0 2px 5px rgba(0,0,0,0.2);} #captcha {display:inline-block;position:relative} #captcha legend {position:absolute;margin:0;padding:0;font-size:0;line-height:0;text-indent:-9999em;overflow:hidden;} #captcha #captcha_img {;height:40px;border:1px solid #898989;;vertical-align:top;padding:0;margin:0} -#captcha #captcha_mp3 {;margin:0;padding:0;width:40px;height:40px;border:0;background:transparent;vertical-align:middle;overflow:hidden;cursor:pointer;width:40px;height:40px;background:url('../../../img/captcha2.png') no-repeat;text-indent:-999px;;border-radius:3px} +#captcha #captcha_mp3 {;margin:0;padding:0;width:40px;height:40px;border:0;background:transparent;vertical-align:middle;overflow:hidden;cursor:pointer;background:url('../../../img/captcha2.png') no-repeat;text-indent:-999px;;border-radius:3px} #captcha #captcha_reload {margin:0;padding:0;width:40px;height:40px;border:0;background:transparent;vertical-align:middle;overflow:hidden;cursor:pointer;background:url('../../../img/captcha2.png') no-repeat 0 -40px;text-indent:-999px;border-radius:3px} #captcha #captcha_key {margin:0 0 0 3px;padding:0 5px;width:90px;height:40px;border:1px solid #ccc;background:#fff;font-size:1.333em;font-weight:bold;text-align:center;border-radius:3px;vertical-align:top} #captcha #captcha_info {display:block;margin:5px 0 0;font-size:0.95em;letter-spacing:-0.1em} @@ -213,11 +213,11 @@ box-shadow: 0 2px 5px rgba(0,0,0,0.2);} /* 캡챠 자동등록(입력)방지 기본 - mobile */ #captcha.m_captcha audio {display:block;margin:0 0 5px;width:187px} #captcha.m_captcha #captcha_img {width:160px;height:60px;border:1px solid #e9e9e9;margin-bottom:3px;margin-top:5px;display:block;} -#captcha.m_captcha #captcha_reload {position:static;margin:0;padding:0;width:40px;height:40px;border:0;background:transparent;vertical-align:middle;overflow:hidden;cursor:pointer;background:url('../../../img/captcha.png') no-repeat 0 -40px;text-indent:-999px} +#captcha.m_captcha #captcha_reload {position:static;margin:0;padding:0;width:40px;height:40px;border:0;background:transparent;vertical-align:middle;overflow:hidden;cursor:pointer;background:url('../../../img/captcha2.png') no-repeat 0 -40px;text-indent:-999px} #captcha.m_captcha #captcha_reload span{display:none;} #captcha.m_captcha #captcha_key {margin:0;padding:0 5px;width:115px;height:29px;border:1px solid #b8c9c2;background:#f7f7f7;font-size:1.333em;font-weight:bold;text-align:center;line-height:29px;margin-left:3px} #captcha.m_captcha #captcha_info {display:block;margin:5px 0 0;font-size:0.95em;letter-spacing:-0.1em} -#captcha.m_captcha #captcha_mp3 {width:31px;height:31px;background:url('../../../img/captcha.png') no-repeat 0 0 ; vertical-align:top;overflow:hidden;cursor:pointer;text-indent:-9999px;border:none} +#captcha.m_captcha #captcha_mp3 {width:31px;height:31px;background:url('../../../img/captcha2.png') no-repeat 0 0 ; vertical-align:top;overflow:hidden;cursor:pointer;text-indent:-9999px;border:none} /* ckeditor 단축키 */ .cke_sc {margin:0 0 5px;text-align:right}