Merge branch 'master' of github.com:gnuboard/g5

This commit is contained in:
whitedot
2020-12-03 18:19:42 +09:00
33 changed files with 242 additions and 218 deletions

View File

@ -1129,7 +1129,7 @@ include_once('_rewrite_config_form.php');
<label for="check_social_payco">페이코 로그인을 사용합니다</label>
<div>
<h3>페이코 CallbackURL</h3>
<p><?php echo get_social_callbackurl('payco'); ?></p>
<p><?php echo get_social_callbackurl('payco', false, true); ?></p>
</div>
</div>
</td>
@ -1157,7 +1157,7 @@ include_once('_rewrite_config_form.php');
<tr>
<th scope="row"><label for="cf_twitter_key">트위터 컨슈머 Key</label></th>
<td>
<input type="text" name="cf_twitter_key" value="<?php echo $config['cf_twitter_key'] ?>" id="cf_twitter_key" class="frm_input" size="40"> <a href="https://dev.twitter.com/apps" target="_blank" class="btn_frmline">앱 등록하기</a>
<input type="text" name="cf_twitter_key" value="<?php echo $config['cf_twitter_key'] ?>" id="cf_twitter_key" class="frm_input" size="40"> <a href="https://developer.twitter.com/en/apps" target="_blank" class="btn_frmline">앱 등록하기</a>
</td>
<th scope="row"><label for="cf_twitter_secret">트위터 컨슈머 Secret</label></th>
<td>
@ -1434,6 +1434,26 @@ $(function(){
function fconfigform_submit(f)
{
var current_user_ip = "<?php echo $_SERVER['REMOTE_ADDR']; ?>";
var cf_intercept_ip_val = f.cf_intercept_ip.value;
if( cf_intercept_ip_val && current_user_ip ){
var cf_intercept_ips = cf_intercept_ip_val.split("\n");
for(var i=0; i < cf_intercept_ips.length; i++){
if ( cf_intercept_ips[i].trim() ) {
cf_intercept_ips[i] = cf_intercept_ips[i].replace(".", "\.");
cf_intercept_ips[i] = cf_intercept_ips[i].replace("+", "[0-9\.]+");
var re = new RegExp(cf_intercept_ips[i]);
if ( re.test(current_user_ip) ){
alert("현재 접속 IP : "+ current_user_ip +" 가 차단될수 있기 때문에, 다른 IP를 입력해 주세요.");
return false;
}
}
}
}
f.action = "./config_form_update.php";
return true;
}

View File

@ -38,6 +38,24 @@ foreach( $check_keys as $key ){
$_POST['cf_icode_server_port'] = isset($_POST['cf_icode_server_port']) ? preg_replace('/[^0-9]/', '', $_POST['cf_icode_server_port']) : '7295';
if(isset($_POST['cf_intercept_ip']) && $_POST['cf_intercept_ip']){
$pattern = explode("\n", trim($_POST['cf_intercept_ip']));
for ($i=0; $i<count($pattern); $i++) {
$pattern[$i] = trim($pattern[$i]);
if (empty($pattern[$i]))
continue;
$pattern[$i] = str_replace(".", "\.", $pattern[$i]);
$pattern[$i] = str_replace("+", "[0-9\.]+", $pattern[$i]);
$pat = "/^{$pattern[$i]}$/";
if( preg_match($pat, $_SERVER['REMOTE_ADDR']) ){
alert("현재 접속 IP : ".$_SERVER['REMOTE_ADDR']." 가 차단될수 있기 때문에, 다른 IP를 입력해 주세요.");
}
}
}
$sql = " update {$g5['config_table']}
set cf_title = '{$_POST['cf_title']}',
cf_admin = '{$_POST['cf_admin']}',

View File

@ -243,7 +243,8 @@ add_javascript(G5_POSTCODE_JS, 0); //다음 주소 js
$icon_file = G5_DATA_PATH.'/member/'.$mb_dir.'/'.get_mb_icon_name($mb['mb_id']).'.gif';
if (file_exists($icon_file)) {
$icon_url = str_replace(G5_DATA_PATH, G5_DATA_URL, $icon_file);
echo '<img src="'.$icon_url.'" alt="">';
$icon_filemtile = (defined('G5_USE_MEMBER_IMAGE_FILETIME') && G5_USE_MEMBER_IMAGE_FILETIME) ? '?'.filemtime($icon_file) : '';
echo '<img src="'.$icon_url.$icon_filemtile.'" alt="">';
echo '<input type="checkbox" id="del_mb_icon" name="del_mb_icon" value="1">삭제';
}
?>
@ -258,8 +259,7 @@ add_javascript(G5_POSTCODE_JS, 0); //다음 주소 js
$mb_dir = substr($mb['mb_id'],0,2);
$icon_file = G5_DATA_PATH.'/member_image/'.$mb_dir.'/'.get_mb_icon_name($mb['mb_id']).'.gif';
if (file_exists($icon_file)) {
$icon_url = str_replace(G5_DATA_PATH, G5_DATA_URL, $icon_file);
echo '<img src="'.$icon_url.'" alt="">';
echo get_member_profile_img($mb['mb_id']);
echo '<input type="checkbox" id="del_mb_img" name="del_mb_img" value="1">삭제';
}
?>

View File

@ -6,6 +6,8 @@ $g5['title'] = "로그인 검사";
$mb_id = trim($_POST['mb_id']);
$mb_password = trim($_POST['mb_password']);
run_event('member_login_check_before', $mb_id);
if (!$mb_id || !$mb_password)
alert('회원아이디나 비밀번호가 공백이면 안됩니다.');
@ -127,5 +129,22 @@ if(function_exists('social_login_success_after')){
run_event('member_login_check', $mb, $link, $is_social_login);
// 관리자로 로그인시 DATA 폴더의 쓰기 권한이 있는지 체크합니다. 쓰기 권한이 없으면 로그인을 못합니다.
if( is_admin($mb['mb_id']) && is_dir(G5_DATA_PATH.'/tmp/') ){
$tmp_data_file = G5_DATA_PATH.'/tmp/tmp-write-test-'.time();
$tmp_data_check = @fopen($tmp_data_file, 'w');
if($tmp_data_check){
if(! @fwrite($tmp_data_check, G5_URL)){
$tmp_data_check = false;
}
}
@fclose($tmp_data_check);
@unlink($tmp_data_file);
if(! $tmp_data_check){
alert("data 폴더에 쓰기권한이 없거나 또는 웹하드 용량이 없는 경우\\n로그인을 못할수도 있으니, 용량 체크 및 쓰기 권한을 확인해 주세요.", $link);
}
}
goto_url($link);
?>

View File

@ -131,11 +131,13 @@ include_once('./_head.php');
// 회원아이콘 경로
$mb_icon_path = G5_DATA_PATH.'/member/'.substr($member['mb_id'],0,2).'/'.get_mb_icon_name($member['mb_id']).'.gif';
$mb_icon_url = G5_DATA_URL.'/member/'.substr($member['mb_id'],0,2).'/'.get_mb_icon_name($member['mb_id']).'.gif';
$mb_icon_filemtile = (defined('G5_USE_MEMBER_IMAGE_FILETIME') && G5_USE_MEMBER_IMAGE_FILETIME && file_exists($mb_icon_path)) ? '?'.filemtime($mb_icon_path) : '';
$mb_icon_url = G5_DATA_URL.'/member/'.substr($member['mb_id'],0,2).'/'.get_mb_icon_name($member['mb_id']).'.gif'.$mb_icon_filemtile;
// 회원이미지 경로
$mb_img_path = G5_DATA_PATH.'/member_image/'.substr($member['mb_id'],0,2).'/'.get_mb_icon_name($member['mb_id']).'.gif';
$mb_img_url = G5_DATA_URL.'/member_image/'.substr($member['mb_id'],0,2).'/'.get_mb_icon_name($member['mb_id']).'.gif';
$mb_img_filemtile = (defined('G5_USE_MEMBER_IMAGE_FILETIME') && G5_USE_MEMBER_IMAGE_FILETIME && file_exists($mb_img_path)) ? '?'.filemtime($mb_img_path) : '';
$mb_img_url = G5_DATA_URL.'/member_image/'.substr($member['mb_id'],0,2).'/'.get_mb_icon_name($member['mb_id']).'.gif'.$mb_img_filemtile;
$register_action_url = G5_HTTPS_BBS_URL.'/register_form_update.php';
$req_nick = !isset($member['mb_nick_date']) || (isset($member['mb_nick_date']) && $member['mb_nick_date'] <= date("Y-m-d", G5_SERVER_TIME - ($config['cf_nick_modify'] * 86400)));

View File

@ -98,7 +98,7 @@ function sql_escape_string($str)
// SQL Injection 등으로 부터 보호를 위해 sql_escape_string() 적용
//------------------------------------------------------------------------------
// magic_quotes_gpc 에 의한 backslashes 제거
if (get_magic_quotes_gpc()) {
if (function_exists('get_magic_quotes_gpc') && get_magic_quotes_gpc()) {
$_POST = array_map_deep('stripslashes', $_POST);
$_GET = array_map_deep('stripslashes', $_GET);
$_COOKIE = array_map_deep('stripslashes', $_COOKIE);

View File

@ -5,15 +5,13 @@
********************/
define('G5_VERSION', '그누보드5');
define('G5_GNUBOARD_VER', '5.4.3');
define('G5_GNUBOARD_VER', '5.4.3.1');
// 이 상수가 정의되지 않으면 각각의 개별 페이지는 별도로 실행될 수 없음
define('_GNUBOARD_', true);
if (PHP_VERSION >= '5.1.0') {
//if (function_exists("date_default_timezone_set")) date_default_timezone_set("Asia/Seoul");
date_default_timezone_set("Asia/Seoul");
}
// 기본 시간대 설정
date_default_timezone_set("Asia/Seoul");
/********************
경로 상수

View File

@ -4,6 +4,8 @@ if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
// 유저 사이드뷰에서 아이콘 지정 안했을시 기본 no 프로필 이미지
define('G5_NO_PROFILE_IMG', '<span class="profile_img"><img src="'.G5_IMG_URL.'/no_profile.gif" alt="no_profile" width="'.$config['cf_member_icon_width'].'" height="'.$config['cf_member_icon_height'].'"></span>');
define('G5_USE_MEMBER_IMAGE_FILETIME', TRUE);
// 썸네일 처리 방식, 비율유지 하지 않고 썸네일을 생성하려면 주석을 풀고 값은 false 입력합니다. ( true 또는 주석으로 된 경우에는 비율 유지합니다. )
//define('G5_USE_THUMB_RATIO', false);
?>

View File

@ -330,7 +330,7 @@ function get_file($bo_table, $wr_id)
$file['count']++;
}
return $file;
return run_replace('get_files', $file, $bo_table, $wr_id);
}
@ -1313,9 +1313,10 @@ function get_sideview($mb_id, $name='', $email='', $homepage='')
$icon_file = G5_DATA_PATH.'/member/'.$mb_dir.'/'.get_mb_icon_name($mb_id).'.gif';
if (file_exists($icon_file)) {
$icon_filemtile = (defined('G5_USE_MEMBER_IMAGE_FILETIME') && G5_USE_MEMBER_IMAGE_FILETIME) ? '?'.filemtime($icon_file) : '';
$width = $config['cf_member_icon_width'];
$height = $config['cf_member_icon_height'];
$icon_file_url = G5_DATA_URL.'/member/'.$mb_dir.'/'.get_mb_icon_name($mb_id).'.gif';
$icon_file_url = G5_DATA_URL.'/member/'.$mb_dir.'/'.get_mb_icon_name($mb_id).'.gif'.$icon_filemtile;
$tmp_name .= '<span class="profile_img"><img src="'.$icon_file_url.'" width="'.$width.'" height="'.$height.'" alt=""></span>';
if ($config['cf_use_member_icon'] == 2) // 회원아이콘+이름
@ -1655,6 +1656,8 @@ function sql_fetch_array($result)
// 단, 결과 값은 스크립트(script) 실행부가 종료되면서 메모리에서 자동적으로 지워진다.
function sql_free_result($result)
{
if(!is_resource($result)) return;
if(function_exists('mysqli_free_result') && G5_MYSQLI_USE)
return mysqli_free_result($result);
else
@ -2328,7 +2331,7 @@ function delete_editor_thumbnail($contents)
run_event('delete_editor_thumbnail_before', $contents);
// $contents 중 img 태그 추출
$matchs = get_editor_image($contents);
$matchs = get_editor_image($contents, false);
if(!$matchs)
return;
@ -2336,8 +2339,8 @@ function delete_editor_thumbnail($contents)
for($i=0; $i<count($matchs[1]); $i++) {
// 이미지 path 구함
$imgurl = @parse_url($matchs[1][$i]);
$srcfile = $_SERVER['DOCUMENT_ROOT'].$imgurl['path'];
$srcfile = dirname(G5_PATH).$imgurl['path'];
if(! preg_match('/(\.jpe?g|\.gif|\.png)$/i', $srcfile)) continue;
$filename = preg_replace("/\.[^\.]+$/i", "", basename($srcfile));
$filepath = dirname($srcfile);
$files = glob($filepath.'/thumb-'.$filename.'*');
@ -3609,6 +3612,9 @@ function get_member_profile_img($mb_id='', $width='', $height='', $alt='profile_
} else {
$member_img = G5_DATA_PATH.'/member_image/'.substr($mb_id,0,2).'/'.get_mb_icon_name($mb_id).'.gif';
if (is_file($member_img)) {
if(defined('G5_USE_MEMBER_IMAGE_FILETIME') && G5_USE_MEMBER_IMAGE_FILETIME) {
$member_img .= '?'.filemtime($member_img);
}
$member_cache[$mb_id] = $src = str_replace(G5_DATA_PATH, G5_DATA_URL, $member_img);
}
}
@ -3813,7 +3819,7 @@ function is_include_path_check($path='', $is_input='')
if( preg_match('/\/data\/(file|editor|qa|cache|member|member_image|session|tmp)\/[A-Za-z0-9_]{1,20}\//i', $replace_path) ){
return false;
}
if( preg_match('/'.G5_PLUGIN_DIR.'\//i', $replace_path) && (preg_match('/'.G5_OKNAME_DIR.'\//i', $replace_path) || preg_match('/'.G5_KCPCERT_DIR.'\//i', $replace_path) || preg_match('/'.G5_LGXPAY_DIR.'\//i', $replace_path)) ){
if( preg_match('/'.G5_PLUGIN_DIR.'\//i', $replace_path) && (preg_match('/'.G5_OKNAME_DIR.'\//i', $replace_path) || preg_match('/'.G5_KCPCERT_DIR.'\//i', $replace_path) || preg_match('/'.G5_LGXPAY_DIR.'\//i', $replace_path)) || (preg_match('/search\.skin\.php/i', $replace_path) ) ){
return false;
}
if( substr_count($replace_path, './') > 5 ){

View File

@ -56,8 +56,8 @@ class LMS {
}
function Init() {
$this->Data = ""; // 발송하기 위한 패킷내용이 배열로 들어간다.
$this->Result = ""; // 발송결과값이 배열로 들어간다.
$this->Data = array(); // 발송하기 위한 패킷내용이 배열로 들어간다.
$this->Result = array(); // 발송결과값이 배열로 들어간다.
}
function Add($strDest, $strCallBack, $strCaller, $strSubject, $strURL, $strData, $strDate="", $nCount) {

View File

@ -67,8 +67,8 @@ class SMS {
}
function Init() {
$this->Data = "";
$this->Result = "";
$this->Data = array();
$this->Result = array();
}
function Add($dest, $callBack, $Caller, $msg, $rsvTime="") {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 820 B

View File

@ -41,7 +41,7 @@ add_stylesheet('<link rel="stylesheet" href="'.get_social_skin_url().'/style.css
<?php if( social_service_check('google') ) { //구글 로그인을 사용한다면 ?>
<a href="<?php echo $self_url;?>?provider=google&amp;url=<?php echo $urlencode;?>" class="sns-icon social_link sns-google" title="구글">
<span class="ico"></span>
<span class="txt">구글+<i> 로그인</i></span>
<span class="txt"><i> Sign in with Google</i></span>
</a>
<?php } //end if ?>
<?php if( social_service_check('twitter') ) { //트위터 로그인을 사용한다면 ?>

View File

@ -41,7 +41,7 @@ add_stylesheet('<link rel="stylesheet" href="'.get_social_skin_url().'/style.css
<?php if( social_service_check('google') ) { //구글 로그인을 사용한다면 ?>
<a href="<?php echo $self_url;?>?provider=google&amp;url=<?php echo $urlencode;?>" class="sns-icon social_link sns-google" title="구글">
<span class="ico"></span>
<span class="txt">구글+<i> 로그인</i></span>
<span class="txt"><i> Sign in with Google</i></span>
</a>
<?php } //end if ?>
<?php if( social_service_check('twitter') ) { //트위터 로그인을 사용한다면 ?>

View File

@ -42,7 +42,7 @@ add_stylesheet('<link rel="stylesheet" href="'.get_social_skin_url().'/style.css
<?php if( social_service_check('google') ) { //구글 로그인을 사용한다면 ?>
<a href="<?php echo $self_url;?>?provider=google&amp;url=<?php echo $urlencode;?>" class="sns-icon social_link sns-google" title="구글">
<span class="ico"></span>
<span class="txt">구글+<i> 로그인</i></span>
<span class="txt"><i> Sign in with Google</i></span>
</a>
<?php } //end if ?>
<?php if( social_service_check('twitter') ) { //트위터 로그인을 사용한다면 ?>

View File

@ -65,12 +65,13 @@
/*로그인 */
#sns_login {border:0;margin-top:15px;padding:0; border-top:1px solid #edeaea}
#sns_login h3 {padding:0;font-weight:bold;color:#888;text-align:center}
#sns_login .sns-icon {display:block;height:40px;line-height:40px;width:100%;margin:0 0 5px;padding-left:40px;text-align:left;color:#fff;border-radius:2px}
#sns_login .sns-icon {position:relative;display:block;height:40px;line-height:40px;width:100%;margin:0 0 5px;padding-left:40px;text-align:left;color:#fff;border-radius:2px}
#sns_login .sns-naver {background-color:#1fc800;background-position:5px 5px;border-bottom:1px solid #1ea505}
#sns_login .sns-kakao {background-color:#ffeb00;background-position:5px 5px;border-bottom:1px solid #e2c10a}
#sns_login .sns-kakao {color:#3c1e1e}
#sns_login .sns-facebook {background-color:#3b579d;background-position:5px 5px;border-bottom:1px solid #28458f}
#sns_login .sns-google {background-color:#db4a3a;background-position:5px 5px;border-bottom:1px solid #c03121}
#sns_login .sns-google {background-color:#4285F4;background-position:5px 5px;border-bottom:1px solid #3567c6}
#sns_login .sns-google .ico {position:absolute;top:3px;left:3px;width:33px;height:33px;background:url('./img/sns_gp_s.png') no-repeat center center;background-color:#fff;background-size:28px 28px!important;border-radius:2px}
#sns_login .sns-twitter {background-color:#1ea1f2;background-position:5px 5px;border-bottom:1px solid #1e82c0}
#sns_login .sns-payco {background-color:#df0b00;background-position:5px 5px;border-bottom:1px solid #9d0800}
#sns_login .txt {text-align:left;padding-left:10px;border-left:1px solid rgba(0,0,0,0.1);display:block;font-weight:bold}
@ -80,13 +81,14 @@
#sns_register h2 {font-size:1.167em;text-align:left;padding:15px 20px;border-bottom:1px solid #dbdbdb}
#sns_register .sns-wrap:after {display:block;visibility:hidden;clear:both;content:""}
#sns_register .sns-wrap {display:inline-block;padding:20px;vertical-align:top;margin:0}
#sns_register .sns-icon {display:inline-block;height:40px;line-height:40px;width:100%;margin:0 0 5px;padding-left:40px;text-align:left;color:#fff;border-radius:2px;float:left}
#sns_register .sns-icon {position:relative;display:inline-block;height:40px;line-height:40px;width:100%;margin:0 0 5px;padding-left:40px;text-align:left;color:#fff;border-radius:2px;float:left}
#sns_register .sns-icon:nth-child(3n+1) {clear:both}
#sns_register .sns-naver {background-color:#1fc800;background-position:5px 5px;border-bottom:1px solid #1ea505}
#sns_register .sns-kakao {background-color:#ffeb00;background-position:5px 5px;border-bottom:1px solid #e2c10a}
#sns_register .sns-kakao {color:#3c1e1e}
#sns_register .sns-facebook {background-color:#3b579d;background-position:5px 5px;border-bottom:1px solid #28458f}
#sns_register .sns-google {background-color:#db4a3a;background-position:5px 5px;border-bottom:1px solid #c03121}
#sns_register .sns-google {background-color:#4285F4;background-position:5px 5px;border-bottom:1px solid #3567c6}
#sns_register .sns-google .ico {position:absolute;top:3px;left:3px;width:33px;height:33px;background:url('./img/sns_gp_s.png') no-repeat center center;background-color:#fff;background-size:28px 28px!important;border-radius:2px}
#sns_register .sns-twitter {background-color:#1ea1f2;background-position:5px 5px;border-bottom:1px solid #1e82c0}
#sns_register .sns-payco {background-color:#df0b00;background-position:5px 5px;border-bottom:1px solid #9d0800}
#sns_register .txt {display:block;padding-left:10px;border-left:1px solid rgba(0,0,0,0.1);font-weight:bold}

View File

@ -30,8 +30,14 @@ define("SAVE_DIR", $data_dir);
define("SAVE_URL", $data_url);
function che_get_user_id() {
@session_start();
return session_id();
global $member;
if(session_id() == '') {
@session_start();
}
$add_str = (isset($member['mb_id']) && $member['mb_id']) ? $member['mb_id'] : '';
return session_id().$add_str;
}
function che_get_file_passname(){

View File

@ -215,14 +215,20 @@ class UploadHandler
substr($_SERVER['SCRIPT_NAME'],0, strrpos($_SERVER['SCRIPT_NAME'], '/'));
}
protected function get_user_id() {
@session_start();
return session_id();
protected function get_user_id($is_add=true) {
global $member;
if(session_id() == '') {
@session_start();
}
$add_str = ($is_add && isset($member['mb_id']) && $member['mb_id']) ? $member['mb_id'] : '';
return session_id().$add_str;
}
protected function get_user_path() {
if ($this->options['user_dirs']) {
return $this->get_user_id().'/';
return $this->get_user_id(false).'/';
}
return '';
}

View File

@ -19,7 +19,7 @@ class Hybrid_Providers_Google extends Hybrid_Provider_Model_OAuth2 {
* default permissions
* {@inheritdoc}
*/
public $scope = "https://www.googleapis.com/auth/plus.login https://www.googleapis.com/auth/plus.me https://www.googleapis.com/auth/plus.profile.emails.read https://www.google.com/m8/feeds/";
public $scope = "https://www.googleapis.com/auth/userinfo.profile https://www.googleapis.com/auth/userinfo.email https://www.google.com/m8/feeds/";
/**
* {@inheritdoc}
@ -72,35 +72,22 @@ class Hybrid_Providers_Google extends Hybrid_Provider_Model_OAuth2 {
// refresh tokens if needed
$this->refreshToken();
// ask google api for user infos
if (strpos($this->scope, '/auth/plus.profile.emails.read') !== false) {
$verified = $this->api->api("https://www.googleapis.com/plus/v1/people/me");
if (!isset($verified->id) || isset($verified->error))
$verified = new stdClass();
} else {
$verified = $this->api->api("https://www.googleapis.com/plus/v1/people/me/openIdConnect");
if (!isset($verified->sub) || isset($verified->error))
$verified = new stdClass();
}
$response = $this->api->api("https://www.googleapis.com/plus/v1/people/me");
if (!isset($response->id) || isset($response->error)) {
$response = $this->api->api("https://www.googleapis.com/oauth2/v3/userinfo");
if (!isset($response->sub) || isset($response->error)) {
throw new Exception("User profile request failed! {$this->providerId} returned an invalid response:" . Hybrid_Logger::dumpData( $response ), 6);
}
$this->user->profile->identifier = (property_exists($verified, 'id')) ? $verified->id : ((property_exists($response, 'id')) ? $response->id : "");
$this->user->profile->firstName = (property_exists($response, 'name')) ? $response->name->givenName : "";
$this->user->profile->lastName = (property_exists($response, 'name')) ? $response->name->familyName : "";
$this->user->profile->displayName = (property_exists($response, 'displayName')) ? $response->displayName : "";
$this->user->profile->photoURL = (property_exists($response, 'image')) ? ((property_exists($response->image, 'url')) ? substr($response->image->url, 0, -2) . "200" : '') : '';
$this->user->profile->profileURL = (property_exists($response, 'url')) ? $response->url : "";
$this->user->profile->description = (property_exists($response, 'aboutMe')) ? $response->aboutMe : "";
$this->user->profile->identifier = (property_exists($response, 'sub')) ? $response->sub : "";
$this->user->profile->firstName = (property_exists($response, 'given_name')) ? $response->given_name : "";
$this->user->profile->lastName = (property_exists($response, 'family_name')) ? $response->family_name : "";
$this->user->profile->displayName = (property_exists($response, 'name')) ? $response->name : "";
$this->user->profile->photoURL = (property_exists($response, 'picture')) ? $response->picture : "";
$this->user->profile->profileURL = (property_exists($response, 'profile')) ? $response->profile : "";
$this->user->profile->gender = (property_exists($response, 'gender')) ? $response->gender : "";
$this->user->profile->language = (property_exists($response, 'locale')) ? $response->locale : ((property_exists($verified, 'locale')) ? $verified->locale : "");
$this->user->profile->email = (property_exists($response, 'email')) ? $response->email : ((property_exists($verified, 'email')) ? $verified->email : "");
$this->user->profile->emailVerified = (property_exists($verified, 'email')) ? $verified->email : "";
$this->user->profile->language = (property_exists($response, 'locale')) ? $response->locale : "";
$this->user->profile->email = (property_exists($response, 'email')) ? $response->email : "";
$this->user->profile->emailVerified = (property_exists($response, 'email_verified')) ? ($response->email_verified === true || $response->email_verified === 1 ? $response->email : "") : "";
if (property_exists($response, 'emails')) {
if (count($response->emails) == 1) {
$this->user->profile->email = $response->emails[0]->value;
@ -125,69 +112,6 @@ class Hybrid_Providers_Google extends Hybrid_Provider_Model_OAuth2 {
}
}
}
$this->user->profile->phone = (property_exists($response, 'phone')) ? $response->phone : "";
$this->user->profile->country = (property_exists($response, 'country')) ? $response->country : "";
$this->user->profile->region = (property_exists($response, 'region')) ? $response->region : "";
$this->user->profile->zip = (property_exists($response, 'zip')) ? $response->zip : "";
if (property_exists($response, 'placesLived')) {
$this->user->profile->city = "";
$this->user->profile->address = "";
foreach ($response->placesLived as $c) {
if (property_exists($c, 'primary')) {
if ($c->primary == true) {
$this->user->profile->address = $c->value;
$this->user->profile->city = $c->value;
break;
}
} else {
if (property_exists($c, 'value')) {
$this->user->profile->address = $c->value;
$this->user->profile->city = $c->value;
}
}
}
}
// google API returns multiple urls, but a "website" only if it is verified
// see http://support.google.com/plus/answer/1713826?hl=en
if (property_exists($response, 'urls')) {
foreach ($response->urls as $u) {
if (property_exists($u, 'primary') && $u->primary == true)
$this->user->profile->webSiteURL = $u->value;
}
} else {
$this->user->profile->webSiteURL = '';
}
// google API returns age ranges min and/or max as of https://developers.google.com/+/web/api/rest/latest/people#resource
if (property_exists($response, 'ageRange')) {
if (property_exists($response->ageRange, 'min') && property_exists($response->ageRange, 'max')) {
$this->user->profile->age = $response->ageRange->min . ' - ' . $response->ageRange->max;
} else {
if (property_exists($response->ageRange, 'min')) {
$this->user->profile->age = '>= ' . $response->ageRange->min;
} else {
if (property_exists($response->ageRange, 'max')) {
$this->user->profile->age = '<= ' . $response->ageRange->max;
} else {
$this->user->profile->age = '';
}
}
}
} else {
$this->user->profile->age = '';
}
// google API returns birthdays only if a user set 'show in my account'
if (property_exists($response, 'birthday')) {
list($birthday_year, $birthday_month, $birthday_day) = explode('-', $response->birthday);
$this->user->profile->birthDay = (int) $birthday_day;
$this->user->profile->birthMonth = (int) $birthday_month;
$this->user->profile->birthYear = (int) $birthday_year;
} else {
$this->user->profile->birthDay = 0;
$this->user->profile->birthMonth = 0;
$this->user->profile->birthYear = 0;
}
$this->user->profile->sid = get_social_convert_id( $this->user->profile->identifier, $this->providerId );

View File

@ -13,35 +13,35 @@
*/
class Hybrid_Providers_Payco extends Hybrid_Provider_Model_OAuth2 {
private $idNo;
private $idNo;
/**
* {@inheritdoc}
*/
function initialize() {
/**
* {@inheritdoc}
*/
function initialize() {
parent::initialize();
// Provider API end-points
// Provider API end-points
$this->api->api_base_url = 'https://id.payco.com/oauth2.0/';
$this->api->authorize_url = 'https://id.payco.com/oauth2.0/authorize';
$this->api->token_url = 'https://id.payco.com/oauth2.0/token';
$this->api->token_info = 'https://apis3.krp.toastoven.net/payco/friends/getIdNoByFriendsToken.json';
$this->api->profile_url = 'https://apis3.krp.toastoven.net/payco/friends/getMemberProfileByFriendsToken.json';
$this->api->profile_url = 'https://apis-payco.krp.toastoven.net/payco/friends/find_member_v2.json';
if (!$this->config["keys"]["id"] || !$this->config["keys"]["secret"]) {
throw new Exception("Your application id and secret are required in order to connect to {$this->providerId}.", 4);
}
if (!$this->config["keys"]["id"] || !$this->config["keys"]["secret"]) {
throw new Exception("Your application id and secret are required in order to connect to {$this->providerId}.", 4);
}
// redirect uri mismatches when authenticating with Payco.
if (isset($this->config['redirect_uri']) && !empty($this->config['redirect_uri'])) {
$this->api->redirect_uri = $this->config['redirect_uri'];
}
}
/**
* {@inheritdoc}
*/
function loginBegin() {
// redirect uri mismatches when authenticating with Payco.
if (isset($this->config['redirect_uri']) && !empty($this->config['redirect_uri'])) {
$this->api->redirect_uri = $this->config['redirect_uri'];
}
}
/**
* {@inheritdoc}
*/
function loginBegin() {
$token = md5(uniqid(mt_rand(), true));
Hybrid_Auth::storage()->set('payco_auth_token', $token);
@ -59,16 +59,16 @@ class Hybrid_Providers_Payco extends Hybrid_Provider_Model_OAuth2 {
exit;
}
/**
* {@inheritdoc}
*/
function loginFinish() {
}
/**
* {@inheritdoc}
*/
function loginFinish() {
// in case we get error_reason=user_denied&error=access_denied
if (isset($_REQUEST['error']) && $_REQUEST['error'] == "access_denied") {
throw new Exception("Authentication failed! The user denied your request.", 5);
}
// in case we get error_reason=user_denied&error=access_denied
if (isset($_REQUEST['error']) && $_REQUEST['error'] == "access_denied") {
throw new Exception("Authentication failed! The user denied your request.", 5);
}
// try to authenicate user
$code = (array_key_exists('code', $_REQUEST)) ? $_REQUEST['code'] : "";
@ -91,7 +91,7 @@ class Hybrid_Providers_Payco extends Hybrid_Provider_Model_OAuth2 {
$this->setUserConnected();
}
}
function check_valid_access_token(){
@ -121,33 +121,33 @@ class Hybrid_Providers_Payco extends Hybrid_Provider_Model_OAuth2 {
return false;
}
/**
* {@inheritdoc}
*/
function logout() {
parent::logout();
}
/**
* {@inheritdoc}
*/
/**
* {@inheritdoc}
*/
function logout() {
parent::logout();
}
/**
* {@inheritdoc}
*/
/**
* set propper headers
*/
function getUserProfile() {
function getUserProfile() {
$data = null;
// request user profile
try {
// request user profile
try {
if( $this->check_valid_access_token() ){
$params = array(
'body' => array(
'client_id'=>$this->api->client_id,
'access_token'=>$this->api->access_token,
'MemberProfile'=>'idNo,id,name',
'idNo'=>$this->idNo,
'client_id'=>$this->api->client_id,
'access_token'=>$this->api->access_token,
'MemberProfile'=>'idNo,id,name',
'idNo'=>$this->idNo,
),
);
@ -161,52 +161,62 @@ class Hybrid_Providers_Payco extends Hybrid_Provider_Model_OAuth2 {
$response = $this->api->api( $this->api->profile_url, 'POST', $params );
}
} catch (Exception $e) {
throw new Exception("User profile request failed! {$this->providerId} returned an error: {$e->getMessage()}", 6, $e);
}
} catch (Exception $e) {
throw new Exception("User profile request failed! {$this->providerId} returned an error: {$e->getMessage()}", 6, $e);
}
if( ! is_object($response) || property_exists($response, 'error_code') ){
$this->logout();
throw new Exception( "Authentication failed! {$this->providerId} returned an invalid access token.", 5 );
}
$data = array();
if( is_object($response) ){
$result = json_decode(json_encode($response), true);
$data = $result['memberProfile'];
// 성공이면
if(isset($result['header']) && isset($result['header']['isSuccessful']) && $result['header']['isSuccessful']){
$data = $result['data']['member'];
}
}
// if the provider identifier is not received, we assume the auth has failed
if (!isset($data["id"])) {
// if the provider identifier is not received, we assume the auth has failed
if (!isset($data["idNo"])) {
$this->logout();
throw new Exception("User profile request failed! {$this->providerId} api returned an invalid response: " . Hybrid_Logger::dumpData( $data ), 6);
}
throw new Exception("User profile request failed! {$this->providerId} api returned an invalid response: " . Hybrid_Logger::dumpData( $data ), 6);
}
# store the user profile.
$this->user->profile->identifier = (array_key_exists('idNo', $data)) ? $data['idNo'] : "";
$this->user->profile->username = (array_key_exists('name', $data)) ? $data['name'] : "";
$this->user->profile->displayName = (array_key_exists('name', $data)) ? $data['name'] : "";
# store the user profile.
$this->user->profile->identifier = (array_key_exists('idNo', $data)) ? $data['idNo'] : "";
$this->user->profile->username = (array_key_exists('name', $data)) ? $data['name'] : "";
$this->user->profile->displayName = (array_key_exists('name', $data)) ? $data['name'] : "";
$this->user->profile->age = (array_key_exists('ageGroup', $data)) ? $data['ageGroup'] : "";
$this->user->profile->hp = (array_key_exists('mobile', $data)) ? $data['mobile'] : "";
include_once(G5_LIB_PATH.'/register.lib.php');
$payco_no = substr(base_convert($this->user->profile->identifier, 16, 36), 0, 16);
$email = (array_key_exists('id', $data)) ? $data['id'] : "";
//$email = (array_key_exists('id', $data)) ? $data['id'] : "";
$this->user->profile->gender = (array_key_exists('sexCode', $data)) ? $data['sexCode'] : "";
$email = (array_key_exists('email', $data)) ? $data['email'] : "";
$this->user->profile->email = ! valid_mb_email($email) ? $email : "";
$this->user->profile->emailVerified = ! valid_mb_email($email) ? $email : "";
//$this->user->profile->gender = (array_key_exists('sexCode', $data)) ? $data['sexCode'] : "";
$this->user->profile->gender = (array_key_exists('genderCode', $data)) ? strtolower($data['genderCode']) : "";
$this->user->profile->email = ! valid_mb_email($email) ? $email : "";
$this->user->profile->emailVerified = ! valid_mb_email($email) ? $email : "";
if (array_key_exists('birthdayMMdd', $data)) {
$this->user->profile->birthMonth = substr($data['birthdayMMdd'], 0, 2);
$this->user->profile->birthDay = substr($data['birthdayMMdd'], 2, 4);
}
if (array_key_exists('birthdayMMdd', $data)) {
$this->user->profile->birthMonth = substr($data['birthdayMMdd'], 0, 2);
$this->user->profile->birthDay = substr($data['birthdayMMdd'], 2, 4);
}
$this->user->profile->sid = get_social_convert_id( $this->user->profile->identifier, $this->providerId );
return $this->user->profile;
} //end function getUserProfile
return $this->user->profile;
} //end function getUserProfile
}

View File

@ -2,8 +2,8 @@
/* !
* HybridAuth
* http://hybridauth.sourceforge.net | http://github.com/hybridauth/hybridauth
* (c) 2009-2012, HybridAuth authors | http://hybridauth.sourceforge.net/licenses.html
* https://hybridauth.sourceforge.net | https://github.com/hybridauth/hybridauth
* (c) 2009-2012, HybridAuth authors | https://hybridauth.sourceforge.net/licenses.html
*/
/**
@ -127,7 +127,7 @@ class Hybrid_Providers_Twitter extends Hybrid_Provider_Model_OAuth1 {
$this->user->profile->description = (property_exists($response, 'description')) ? $response->description : "";
$this->user->profile->firstName = (property_exists($response, 'name')) ? $response->name : "";
$this->user->profile->photoURL = (property_exists($response, 'profile_image_url')) ? (str_replace('_normal', '', $response->profile_image_url)) : "";
$this->user->profile->profileURL = (property_exists($response, 'screen_name')) ? ("http://twitter.com/" . $response->screen_name) : "";
$this->user->profile->profileURL = (property_exists($response, 'screen_name')) ? ("https://twitter.com/" . $response->screen_name) : "";
$this->user->profile->webSiteURL = (property_exists($response, 'url')) ? $response->url : "";
$this->user->profile->region = (property_exists($response, 'location')) ? $response->location : "";
if($includeEmail) $this->user->profile->email = (property_exists($response, 'email')) ? $response->email : "";
@ -174,7 +174,7 @@ class Hybrid_Providers_Twitter extends Hybrid_Provider_Model_OAuth1 {
$uc->identifier = (property_exists($item, 'id')) ? $item->id : "";
$uc->displayName = (property_exists($item, 'name')) ? $item->name : "";
$uc->profileURL = (property_exists($item, 'screen_name')) ? ("http://twitter.com/" . $item->screen_name) : "";
$uc->profileURL = (property_exists($item, 'screen_name')) ? ("https://twitter.com/" . $item->screen_name) : "";
$uc->photoURL = (property_exists($item, 'profile_image_url')) ? $item->profile_image_url : "";
$uc->description = (property_exists($item, 'description')) ? $item->description : "";
@ -254,7 +254,7 @@ class Hybrid_Providers_Twitter extends Hybrid_Provider_Model_OAuth1 {
$ua->user->identifier = (property_exists($item->user, 'id')) ? $item->user->id : "";
$ua->user->displayName = (property_exists($item->user, 'name')) ? $item->user->name : "";
$ua->user->profileURL = (property_exists($item->user, 'screen_name')) ? ("http://twitter.com/" . $item->user->screen_name) : "";
$ua->user->profileURL = (property_exists($item->user, 'screen_name')) ? ("https://twitter.com/" . $item->user->screen_name) : "";
$ua->user->photoURL = (property_exists($item->user, 'profile_image_url')) ? $item->user->profile_image_url : "";
$activities[] = $ua;

View File

@ -44,11 +44,11 @@ function get_social_convert_id($identifier, $service)
return strtolower($service).'_'.hash('adler32', md5($identifier));
}
function get_social_callbackurl($provider, $no_domain=false){
function get_social_callbackurl($provider, $no_domain=false, $no_params=false){
$base_url = G5_SOCIAL_LOGIN_BASE_URL;
if ( $provider === 'twitter' ){
if ( $provider === 'twitter' || ($provider === 'payco' && $no_params) ){
return $base_url;
}
@ -322,7 +322,7 @@ function social_extends_get_keys($provider){
"keys" => array("id" => $config['cf_facebook_appid'], "secret" => $config['cf_facebook_secret']),
"display" => "popup",
"redirect_uri" => get_social_callbackurl('facebook'),
"scope" => array('email'), // optional
"scope" => 'email', // optional
"trustForwarded" => false
);
@ -332,9 +332,12 @@ function social_extends_get_keys($provider){
"keys" => array("id" => $config['cf_google_clientid'],
"secret" => $config['cf_google_secret']),
"redirect_uri" => get_social_callbackurl('google'),
"scope" => "https://www.googleapis.com/auth/userinfo.profile "."https://www.googleapis.com/auth/userinfo.email",
/*
"scope" => "https://www.googleapis.com/auth/plus.login ". // optional
"https://www.googleapis.com/auth/plus.me ". // optional
"https://www.googleapis.com/auth/plus.profile.emails.read", // optional
*/
//"access_type" => "offline", // optional
//"approval_prompt" => "force", // optional
);

View File

@ -84,6 +84,8 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
if( $wr_id && $wr_id == $list[$i]['wr_id'] ){
$classes[] = 'gall_now';
}
$line_height_style = ($board['bo_gallery_height'] > 0) ? 'line-height:'.$board['bo_gallery_height'].'px' : '';
?>
<li class="<?php echo implode(' ', $classes); ?>">
<div class="gall_box">
@ -110,14 +112,14 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
<a href="<?php echo $list[$i]['href'] ?>">
<?php
if ($list[$i]['is_notice']) { // 공지사항 ?>
<span class="is_notice" style="<?php if ($board['bo_gallery_height'] > 0) echo 'line-height:'.$board['bo_gallery_height'].'px'; ?>">공지</span>
<span class="is_notice" style="<?php echo $line_height_style; ?>">공지</span>
<?php } else {
$thumb = get_list_thumbnail($board['bo_table'], $list[$i]['wr_id'], $board['bo_gallery_width'], $board['bo_gallery_height'], false, true);
if($thumb['src']) {
$img_content = '<img src="'.$thumb['src'].'" alt="'.$thumb['alt'].'" >';
} else {
$img_content = '<span class="no_image">no image</span>';
$img_content = '<span class="no_image" style="'.$line_height_style.'">no image</span>';
}
echo run_replace('thumb_image_tag', $img_content, $thumb);

View File

@ -189,7 +189,7 @@ gif, jpg, png파일만 가능하며 용량 <?php echo number_format($config['cf_
<?php if ($w == 'u' && file_exists($mb_icon_path)) { ?>
<img src="<?php echo $mb_icon_url ?>" alt="회원아이콘">
<input type="checkbox" name="del_mb_icon" value="1" id="del_mb_icon">
<label for="del_mb_icon">삭제</label>
<label for="del_mb_icon" class="inline">삭제</label>
<?php } ?>
</li>
@ -208,7 +208,7 @@ gif, jpg, png파일만 가능하며 용량 <?php echo number_format($config['cf_
<?php if ($w == 'u' && file_exists($mb_img_path)) { ?>
<img src="<?php echo $mb_img_url ?>" alt="회원이미지">
<input type="checkbox" name="del_mb_img" value="1" id="del_mb_img">
<label for="del_mb_img">삭제</label>
<label for="del_mb_img" class="inline">삭제</label>
<?php } ?>
</li>

View File

@ -131,6 +131,7 @@
.register_form_inner {background:#f7f7f7;border:1px solid #dde7e9;border-radius:3px}
.register_form_inner ul {padding:20px}
.register_form_inner label {display:block;margin-bottom:10px;line-height:24px}
.register_form_inner label.inline {display:inline}
#fregisterform #msg_certify {margin:5px 0 0;padding:5px;border:1px solid #dbecff;background:#eaf4ff;text-align:center}
#fregisterform .frm_address {margin:5px 0 0}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 820 B

View File

@ -41,7 +41,7 @@ add_stylesheet('<link rel="stylesheet" href="'.get_social_skin_url().'/style.css
<?php if( social_service_check('google') ) { //구글 로그인을 사용한다면 ?>
<a href="<?php echo $self_url;?>?provider=google&amp;url=<?php echo $urlencode;?>" class="sns-icon social_link sns-google" title="구글">
<span class="ico"></span>
<span class="txt">구글+<i> 로그인</i></span>
<span class="txt"><i> Sign in with Google</i></span>
</a>
<?php } //end if ?>
<?php if( social_service_check('twitter') ) { //트위터 로그인을 사용한다면 ?>

View File

@ -41,7 +41,7 @@ add_stylesheet('<link rel="stylesheet" href="'.get_social_skin_url().'/style.css
<?php if( social_service_check('google') ) { //구글 로그인을 사용한다면 ?>
<a href="<?php echo $self_url;?>?provider=google&amp;url=<?php echo $urlencode;?>" class="sns-icon social_link sns-google" title="구글">
<span class="ico"></span>
<span class="txt">구글+<i> 로그인</i></span>
<span class="txt"><i> Sign in with Google</i></span>
</a>
<?php } //end if ?>
<?php if( social_service_check('twitter') ) { //트위터 로그인을 사용한다면 ?>

View File

@ -43,7 +43,7 @@ add_stylesheet('<link rel="stylesheet" href="'.get_social_skin_url().'/style.css
<?php if( social_service_check('google') ) { //구글 로그인을 사용한다면 ?>
<a href="<?php echo $self_url;?>?provider=google&amp;url=<?php echo $urlencode;?>" class="sns-icon social_link sns-google" title="구글">
<span class="ico"></span>
<span class="txt">구글+로 회원가입하기</span>
<span class="txt">Sign in with Google</span>
</a>
<?php } //end if ?>
<?php if( social_service_check('twitter') ) { //트위터 로그인을 사용한다면 ?>

View File

@ -27,7 +27,7 @@
.sns-wrap-reg .sns-naver {border-color:#18a400;background:#2db400}
.sns-wrap-reg .sns-naver .ico {background-position:-29px 0; }
.sns-wrap-reg .sns-google {border-color:#ca2c19;background:#dd5443}
.sns-wrap-reg .sns-google {border-color:#ca2c19;background:#4285F4}
.sns-wrap-reg .sns-google .ico {background-position:-58px 0}
.sns-wrap-reg .sns-facebook {border-color:#2e5393;background:#3a5897}
.sns-wrap-reg .sns-facebook .ico {background-position:0 0 }
@ -49,7 +49,7 @@
/* SNS by COLOR */
.sns-wrap-over .sns-naver {background:url('./img/sns_naver_s.png') no-repeat}
.sns-wrap-over .sns-google {background:url('./img/sns_gp_s.png') no-repeat}
.sns-wrap-over .sns-google {}
.sns-wrap-over .sns-facebook {background:url('./img/sns_fb_s.png') no-repeat}
.sns-wrap-over .sns-twitter {background:url('./img/sns_twitter_s.png') no-repeat}
.sns-wrap-over .sns-payco {background:url('./img/sns_payco_s.png') no-repeat}
@ -67,12 +67,13 @@
/*로그인 */
#sns_login {border:0;margin-top:15px;border-top:1px solid #edeaea}
#sns_login h3 {padding:10px 0 0;text-align:left;font-weight:bold}
#sns_login .sns-icon {display:block;height:40px;line-height:40px;width:100%;margin:0 0 5px;padding-left:40px;text-align:left;color:#fff;border-radius:2px}
#sns_login .sns-icon {position:relative;display:block;height:40px;line-height:40px;width:100%;margin:0 0 5px;padding-left:40px;text-align:left;color:#fff;border-radius:2px}
#sns_login .sns-naver {background-color:#1fc800;background-position:5px 5px;border-bottom:1px solid #1ea505}
#sns_login .sns-kakao {background-color:#ffeb00;background-position:5px 5px;border-bottom:1px solid #e2c10a}
#sns_login .sns-kakao {color:#3c1e1e}
#sns_login .sns-facebook {background-color:#3b579d;background-position:5px 5px;border-bottom:1px solid #28458f}
#sns_login .sns-google {background-color:#db4a3a;background-position:5px 5px;border-bottom:1px solid #c03121}
#sns_login .sns-google {background-color:#4285F4;background-position:5px 5px;border-bottom:1px solid #3567c6;letter-spacing:-0.5px}
#sns_login .sns-google .ico {position:absolute;top:3px;left:3px;width:33px;height:33px;background:url('./img/sns_gp_s.png') no-repeat center center;background-color:#fff;background-size:28px 28px!important;border-radius:2px}
#sns_login .sns-twitter {background-color:#1ea1f2;background-position:5px 5px;border-bottom:1px solid #1e82c0}
#sns_login .sns-payco {background-color:#df0b00;background-position:5px 5px;border-bottom:1px solid #9d0800}
#sns_login .txt {text-align:left;padding-left:10px;border-left:1px solid rgba(0,0,0,0.1);display:block;font-weight:bold}
@ -88,7 +89,8 @@
#sns_register .sns-naver {background-color:#1fc800;background-position:0 0}
#sns_register .sns-kakao {background-color:#ffeb00;background-position:0 0}
#sns_register .sns-facebook {background-color:#3b579d;background-position:0 0}
#sns_register .sns-google {background-color:#db4a3a;background-position:0 0}
#sns_register .sns-google {background-color:#fff;background-position:0 0;border-radius:2px;border:1px solid #999}
#sns_register .sns-google .ico {background:url('./img/sns_gp_s.png') no-repeat;height:30px}
#sns_register .sns-twitter {background-color:#1ea1f2;background-position:0 0}
#sns_register .sns-payco {background-color:#df0b00;background-position:0 0}
#sns_register .txt {position:absolute;line-height:0;font-size:0;vertical-align:middle;overflow:hidden}

View File

@ -83,6 +83,8 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
if( $wr_id && $wr_id == $list[$i]['wr_id'] ){
$classes[] = 'gall_now';
}
$line_height_style = ($board['bo_gallery_height'] > 0) ? 'line-height:'.$board['bo_gallery_height'].'px' : '';
?>
<li class="<?php echo implode(' ', $classes); ?>">
<div class="gall_box">
@ -109,14 +111,14 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
<a href="<?php echo $list[$i]['href'] ?>">
<?php
if ($list[$i]['is_notice']) { // 공지사항 ?>
<span class="is_notice" style="<?php if ($board['bo_gallery_height'] > 0) echo 'line-height:'.$board['bo_gallery_height'].'px'; ?>">공지</span>
<span class="is_notice" style="<?php echo $line_height_style; ?>">공지</span>
<?php } else {
$thumb = get_list_thumbnail($board['bo_table'], $list[$i]['wr_id'], $board['bo_gallery_width'], $board['bo_gallery_height'], false, true);
if($thumb['src']) {
$img_content = '<img src="'.$thumb['src'].'" alt="'.$thumb['alt'].'" >';
} else {
$img_content = '<span class="no_image">no image</span>';
$img_content = '<span class="no_image" style="'.$line_height_style.'">no image</span>';
}
echo run_replace('thumb_image_tag', $img_content, $thumb);

View File

@ -188,7 +188,7 @@ gif, jpg, png파일만 가능하며 용량 <?php echo number_format($config['cf_
<?php if ($w == 'u' && file_exists($mb_icon_path)) { ?>
<img src="<?php echo $mb_icon_url ?>" alt="회원아이콘">
<input type="checkbox" name="del_mb_icon" value="1" id="del_mb_icon">
<label for="del_mb_icon">삭제</label>
<label for="del_mb_icon" class="inline">삭제</label>
<?php } ?>
</li>
@ -207,7 +207,7 @@ gif, jpg, png파일만 가능하며 용량 <?php echo number_format($config['cf_
<?php if ($w == 'u' && file_exists($mb_img_path)) { ?>
<img src="<?php echo $mb_img_url ?>" alt="회원이미지">
<input type="checkbox" name="del_mb_img" value="1" id="del_mb_img">
<label for="del_mb_img">삭제</label>
<label for="del_mb_img" class="inline">삭제</label>
<?php } ?>
</li>

View File

@ -131,6 +131,7 @@
.register_form_inner {background:#f7f7f7;border:1px solid #dde7e9;border-radius:3px}
.register_form_inner ul {padding:20px}
.register_form_inner label {display:block;margin-bottom:10px;line-height:24px}
.register_form_inner label.inline {display:inline}
#fregisterform #msg_certify {margin:5px 0 0;padding:5px;border:1px solid #dbecff;background:#eaf4ff;text-align:center}
#fregisterform .frm_address {margin:5px 0 0}