리뉴얼 소스 수정
This commit is contained in:
@@ -76,6 +76,10 @@ if (!isset($board['bo_mobile_subject'])) {
|
||||
sql_query(" ALTER TABLE `{$g5['board_table']}` ADD `bo_mobile_subject` VARCHAR(255) NOT NULL DEFAULT '' AFTER `bo_subject` ", false);
|
||||
}
|
||||
|
||||
if (!isset($board['bo_use_captcha'])) {
|
||||
sql_query(" ALTER TABLE `{$g5['board_table']}` ADD `bo_use_captcha` TINYINT NOT NULL DEFAULT '0' AFTER `bo_use_sns` ");
|
||||
}
|
||||
|
||||
$required = "";
|
||||
$readonly = "";
|
||||
if ($w == '') {
|
||||
@@ -771,6 +775,20 @@ $frm_submit .= '</div>';
|
||||
<label for="chk_all_order">전체적용</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="bo_use_captcha">캡챠 사용</label></th>
|
||||
<td>
|
||||
<?php echo help("체크하면 글 작성시 캡챠를 무조건 사용합니다.( 회원 + 비회원 모두 )<br>미 체크하면 비회원에게만 캡챠를 사용합니다.") ?>
|
||||
<input type="checkbox" name="bo_use_captcha" value="1" <?php echo $board['bo_use_captcha']?'checked':''; ?> id="bo_use_captcha">
|
||||
사용
|
||||
</td>
|
||||
<td class="td_grpset">
|
||||
<input type="checkbox" name="chk_grp_use_captcha" value="1" id="chk_grp_use_captcha">
|
||||
<label for="chk_grp_use_captcha">그룹적용</label>
|
||||
<input type="checkbox" name="chk_all_use_captcha" value="1" id="chk_all_use_captcha">
|
||||
<label for="chk_all_use_captcha">전체적용</label>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@@ -99,6 +99,7 @@ $sql_common = " gr_id = '{$_POST['gr_id']}',
|
||||
bo_use_email = '{$_POST['bo_use_email']}',
|
||||
bo_use_cert = '{$_POST['bo_use_cert']}',
|
||||
bo_use_sns = '{$_POST['bo_use_sns']}',
|
||||
bo_use_captcha = '{$_POST['bo_use_captcha']}',
|
||||
bo_table_width = '{$_POST['bo_table_width']}',
|
||||
bo_subject_len = '{$_POST['bo_subject_len']}',
|
||||
bo_mobile_subject_len = '{$_POST['bo_mobile_subject_len']}',
|
||||
@@ -276,6 +277,7 @@ if (is_checked('chk_grp_use_list_content')) $grp_fields .= " , bo_use_list_c
|
||||
if (is_checked('chk_grp_use_email')) $grp_fields .= " , bo_use_email = '{$bo_use_email}' ";
|
||||
if (is_checked('chk_grp_use_cert')) $grp_fields .= " , bo_use_cert = '{$bo_use_cert}' ";
|
||||
if (is_checked('chk_grp_use_sns')) $grp_fields .= " , bo_use_sns = '{$bo_use_sns}' ";
|
||||
if (is_checked('chk_grp_use_captcha')) $grp_fields .= " , bo_use_captcha = '{$bo_use_captcha}' ";
|
||||
if (is_checked('chk_grp_skin')) $grp_fields .= " , bo_skin = '{$bo_skin}' ";
|
||||
if (is_checked('chk_grp_mobile_skin')) $grp_fields .= " , bo_mobile_skin = '{$bo_mobile_skin}' ";
|
||||
if (is_checked('chk_grp_gallery_cols')) $grp_fields .= " , bo_gallery_cols = '{$bo_gallery_cols}' ";
|
||||
@@ -359,6 +361,7 @@ if (is_checked('chk_all_use_list_content')) $all_fields .= " , bo_use_list_c
|
||||
if (is_checked('chk_all_use_email')) $all_fields .= " , bo_use_email = '{$bo_use_email}' ";
|
||||
if (is_checked('chk_all_use_cert')) $all_fields .= " , bo_use_cert = '{$bo_use_cert}' ";
|
||||
if (is_checked('chk_all_use_sns')) $all_fields .= " , bo_use_sns = '{$bo_use_sns}' ";
|
||||
if (is_checked('chk_all_use_captcha')) $all_fields .= " , bo_use_captcha = '{$bo_use_captcha}' ";
|
||||
if (is_checked('chk_all_skin')) $all_fields .= " , bo_skin = '{$bo_skin}' ";
|
||||
if (is_checked('chk_all_mobile_skin')) $all_fields .= " , bo_mobile_skin = '{$bo_mobile_skin}' ";
|
||||
if (is_checked('chk_all_gallery_cols')) $all_fields .= " , bo_gallery_cols = '{$bo_gallery_cols}' ";
|
||||
|
||||
+16
-10
@@ -451,17 +451,18 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
|
||||
<?php echo help('사용할 캡챠를 선택합니다.') ?>
|
||||
<select name="cf_captcha" id="cf_captcha" required class="required">
|
||||
<option value="kcaptcha" <?php echo get_selected($config['cf_captcha'], 'kcaptcha') ; ?>>Kcaptcha</option>
|
||||
<option value="recaptcha" <?php echo get_selected($config['cf_captcha'], 'recaptcha') ; ?>>Google Recaptcha</option>
|
||||
<option value="recaptcha" <?php echo get_selected($config['cf_captcha'], 'recaptcha') ; ?>>reCAPTCHA V2</option>
|
||||
<option value="recaptcha_inv" <?php echo get_selected($config['cf_captcha'], 'recaptcha_inv') ; ?>>Invisible reCAPTCHA</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="kcaptcha_mp3">
|
||||
<th scope="row"><label for="cf_captcha_mp3">음성캡챠 선택<strong class="sound_only">필수</strong></label></th>
|
||||
<td colspan="3">
|
||||
<?php echo help(str_replace('recaptcha', 'kcaptcha', G5_CAPTCHA_URL).'/mp3 밑의 음성 폴더를 선택합니다.') ?>
|
||||
<?php echo help(str_replace(array('recaptcha_inv', 'recaptcha'), 'kcaptcha', G5_CAPTCHA_URL).'/mp3 밑의 음성 폴더를 선택합니다.') ?>
|
||||
<select name="cf_captcha_mp3" id="cf_captcha_mp3" required class="required">
|
||||
<?php
|
||||
$arr = get_skin_dir('mp3', str_replace('recaptcha', 'kcaptcha', G5_CAPTCHA_PATH));
|
||||
$arr = get_skin_dir('mp3', str_replace(array('recaptcha_inv', 'recaptcha'), 'kcaptcha', G5_CAPTCHA_PATH));
|
||||
for ($i=0; $i<count($arr); $i++) {
|
||||
if ($i == 0) echo "<option value=\"\">선택</option>";
|
||||
echo "<option value=\"".$arr[$i]."\"".get_selected($config['cf_captcha_mp3'], $arr[$i]).">".$arr[$i]."</option>\n";
|
||||
@@ -470,16 +471,21 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_recaptcha_site_key">구글 reCAPTCHA Site key</label></th>
|
||||
<td>
|
||||
<input type="text" name="cf_recaptcha_site_key" value="<?php echo $config['cf_recaptcha_site_key']; ?>" id="cf_naver_clientid" class="frm_input"> <a href="https://www.google.com/recaptcha/admin" target="_blank" class="btn_frmline">reCAPTCHA 등록하기</a>
|
||||
<tr>
|
||||
<th scope="row" rowspan="2"><label for="cf_recaptcha_site_key">구글 reCAPTCHA Site key</label></th>
|
||||
<td colspan="3" style="border-bottom:none 0">
|
||||
<?php echo help('reCAPTCHA V2와 Invisible reCAPTCHA 캡챠의 sitekey 와 secret 키는 동일하지 않고, 서로 발급받는 키가 다릅니다.') ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<input type="text" name="cf_recaptcha_site_key" value="<?php echo $config['cf_recaptcha_site_key']; ?>" id="cf_naver_clientid" class="frm_input" size="52"> <a href="https://www.google.com/recaptcha/admin" target="_blank" class="btn_frmline">reCAPTCHA 등록하기</a>
|
||||
</td>
|
||||
<th scope="row"><label for="cf_recaptcha_secret_key">구글 reCAPTCHA Secret key</label></th>
|
||||
<td>
|
||||
<input type="text" name="cf_recaptcha_secret_key" value="<?php echo $config['cf_recaptcha_secret_key']; ?>" id="cf_recaptcha_secret_key" class="frm_input" size="35">
|
||||
<input type="text" name="cf_recaptcha_secret_key" value="<?php echo $config['cf_recaptcha_secret_key']; ?>" id="cf_recaptcha_secret_key" class="frm_input" size="52">
|
||||
</td>
|
||||
</tr>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_use_copy_log">복사, 이동시 로그</label></th>
|
||||
<td colspan="3">
|
||||
@@ -1316,7 +1322,7 @@ $(function(){
|
||||
}
|
||||
});
|
||||
$("#cf_captcha").on("change", function(){
|
||||
if ($(this).val() == 'recaptcha') {
|
||||
if ($(this).val() == 'recaptcha' || $(this).val() == 'recaptcha_inv') {
|
||||
$("[class^='kcaptcha_']").hide();
|
||||
} else {
|
||||
$("[class^='kcaptcha_']").show();
|
||||
|
||||
+3
-1
@@ -386,7 +386,9 @@ else
|
||||
|
||||
$captcha_html = '';
|
||||
$captcha_js = '';
|
||||
if ($is_guest) {
|
||||
$is_use_captcha = (!empty($board['bo_use_captcha']) || $is_guest) ? 1 : 0;
|
||||
|
||||
if ($is_use_captcha) {
|
||||
$captcha_html = captcha_html();
|
||||
$captcha_js = chk_captcha_js();
|
||||
}
|
||||
|
||||
@@ -188,7 +188,9 @@ if ($w == '' || $w == 'u') {
|
||||
alert('w 값이 제대로 넘어오지 않았습니다.');
|
||||
}
|
||||
|
||||
if ($is_guest && !chk_captcha()) {
|
||||
$is_use_captcha = (!empty($board['bo_use_captcha']) || $is_guest) ? 1 : 0;
|
||||
|
||||
if ($is_use_captcha && !chk_captcha()) {
|
||||
alert('자동등록방지 숫자가 틀렸습니다.');
|
||||
}
|
||||
|
||||
|
||||
@@ -130,6 +130,7 @@ a.gnb_2da:hover{background:#f9f9f9;color:#000}
|
||||
#aside {float:right;width:271px;padding:20px;border-left:1px solid #e8e8e8;margin-left:-1px;height:100%;}
|
||||
|
||||
#container {z-index:4;position:relative;float:left;padding:20px 20px 20px 0;width:670px;border-right:1px solid #e8e8e8;min-height:500px;height:auto !important;height:500px;font-size:1em;zoom:1}
|
||||
#container.aside_disable {float:none;width:100%;padding-right:0px;border-right:none 0}
|
||||
#container:after {display:block;visibility:hidden;clear:both;content:""}
|
||||
#container_title {font-size:1.25em;;font-weight:bold;border-bottom:1px solid #e8e8e8}
|
||||
#container_title span{margin:0 auto;display:block;width:940px;height:60px;line-height:30px;padding:15px 0;}
|
||||
|
||||
@@ -149,7 +149,7 @@ include_once(G5_LIB_PATH.'/popular.lib.php');
|
||||
</div>
|
||||
<!-- } 상단 끝 -->
|
||||
<script>
|
||||
$(function (){
|
||||
jQuery(function($){
|
||||
$("#sch_op_btn").on("click", function() {
|
||||
$("#hd_sch").css("display","block");
|
||||
});
|
||||
@@ -165,6 +165,7 @@ $(function (){
|
||||
<div id="wrapper">
|
||||
<?php if (!defined("_INDEX_")) { ?><h2 id="container_title"><span><?php echo $g5['title'] ?></span></h2><?php } ?>
|
||||
<div id="container_wr">
|
||||
<?php if(!defined('ASIDE_DISABLE')) { ?>
|
||||
<div id="aside">
|
||||
<?php echo outlogin(); // 외부 로그인, 테마의 스킨을 사용하려면 스킨을 theme/basic 과 같이 지정 ?>
|
||||
<?php echo poll(); // 설문조사, 테마의 스킨을 사용하려면 스킨을 theme/basic 과 같이 지정 ?>
|
||||
@@ -180,4 +181,5 @@ $(function (){
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="container">
|
||||
<?php } //end if ?>
|
||||
<div id="container" class="<?php echo defined('ASIDE_DISABLE') ? 'aside_disable' : ''; ?>">
|
||||
@@ -93,6 +93,7 @@ CREATE TABLE IF NOT EXISTS `g5_board` (
|
||||
`bo_use_email` tinyint(4) NOT NULL DEFAULT '0',
|
||||
`bo_use_cert` enum('','cert','adult','hp-cert','hp-adult') NOT NULL DEFAULT '',
|
||||
`bo_use_sns` tinyint(4) NOT NULL DEFAULT '0',
|
||||
`bo_use_captcha` tinyint(4) NOT NULL DEFAULT '0',
|
||||
`bo_sort_field` varchar(255) NOT NULL DEFAULT '',
|
||||
`bo_1_subj` varchar(255) NOT NULL DEFAULT '',
|
||||
`bo_2_subj` varchar(255) NOT NULL DEFAULT '',
|
||||
@@ -840,6 +841,34 @@ CREATE TABLE IF NOT EXISTS `g5_faq_master` (
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `g5_member_social_profiles`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `g5_member_social_profiles`;
|
||||
CREATE TABLE IF NOT EXISTS `g5_member_social_profiles` (
|
||||
`mp_no` int(11) NOT NULL AUTO_INCREMENT,
|
||||
`mb_id` varchar(255) NOT NULL DEFAULT '',
|
||||
`provider` varchar(50) NOT NULL DEFAULT '',
|
||||
`object_sha` varchar(45) NOT NULL DEFAULT '',
|
||||
`identifier` varchar(255) NOT NULL DEFAULT '',
|
||||
`profileurl` varchar(255) NOT NULL DEFAULT '',
|
||||
`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_latest_day` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||
UNIQUE KEY `mp_no` (`mp_no`),
|
||||
KEY `mb_id` (`mb_id`),
|
||||
KEY `provider` (`provider`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `g5_new_win`
|
||||
--
|
||||
|
||||
+15
-12
@@ -723,21 +723,24 @@ function get_write_token(bo_table)
|
||||
$(function() {
|
||||
$(document).on("click", "form[name=fwrite] input:submit, form[name=fwrite] button:submit, form[name=fwrite] input:image", function() {
|
||||
var f = this.form;
|
||||
var bo_table = f.bo_table.value;
|
||||
var token = get_write_token(bo_table);
|
||||
var bo_table = (typeof f.bo_table != "undefined") ? f.bo_table.value : "";
|
||||
|
||||
if(!token) {
|
||||
alert("토큰 정보가 올바르지 않습니다.");
|
||||
return false;
|
||||
if( bo_table ){
|
||||
var token = get_write_token(bo_table);
|
||||
|
||||
if(!token) {
|
||||
alert("토큰 정보가 올바르지 않습니다.");
|
||||
return false;
|
||||
}
|
||||
|
||||
var $f = $(f);
|
||||
|
||||
if(typeof f.token === "undefined")
|
||||
$f.prepend('<input type="hidden" name="token" value="">');
|
||||
|
||||
$f.find("input[name=token]").val(token);
|
||||
}
|
||||
|
||||
var $f = $(f);
|
||||
|
||||
if(typeof f.token === "undefined")
|
||||
$f.prepend('<input type="hidden" name="token" value="">');
|
||||
|
||||
$f.find("input[name=token]").val(token);
|
||||
|
||||
return true;
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,3 @@
|
||||
<?php
|
||||
include_once('../../common.php');
|
||||
?>
|
||||
@@ -0,0 +1,4 @@
|
||||
<?php
|
||||
require_once(dirname(__FILE__).'/recaptcha.class.php');
|
||||
require_once(dirname(__FILE__).'/recaptcha.user.lib.php');
|
||||
?>
|
||||
@@ -0,0 +1,147 @@
|
||||
<?php
|
||||
/**
|
||||
* This is a PHP library that handles calling reCAPTCHA.
|
||||
*
|
||||
* @copyright Copyright (c) 2015, Google Inc.
|
||||
* @link http://www.google.com/recaptcha
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
if ( ! class_exists( 'ReCaptchaResponse_v' ) ){
|
||||
class ReCaptchaResponse_v
|
||||
{
|
||||
public $success;
|
||||
public $errorCodes;
|
||||
}
|
||||
}
|
||||
|
||||
class ReCaptcha_GNU
|
||||
{
|
||||
/**
|
||||
* Version of this client library.
|
||||
* @const string
|
||||
*/
|
||||
const VERSION = 'php_1.1.2';
|
||||
|
||||
private static $_signupUrl = 'https://www.google.com/recaptcha/admin';
|
||||
private static $_siteVerifyUrl = 'https://www.google.com/recaptcha/api/siteverify';
|
||||
|
||||
/**
|
||||
* Shared secret for the site.
|
||||
* @var string
|
||||
*/
|
||||
private $secret;
|
||||
|
||||
/**
|
||||
* Create a configured instance to use the reCAPTCHA service.
|
||||
*
|
||||
* @param string $secret shared secret between site and reCAPTCHA server.
|
||||
* @param RequestMethod $requestMethod method used to send the request. Defaults to POST.
|
||||
* @throws \RuntimeException if $secret is invalid
|
||||
*/
|
||||
public function __construct($secret)
|
||||
{
|
||||
if (empty($secret)) {
|
||||
throw new Exception('No secret provided');
|
||||
}
|
||||
|
||||
if (!is_string($secret)) {
|
||||
throw new Exception('The provided secret must be a string');
|
||||
}
|
||||
|
||||
$this->secret = $secret;
|
||||
}
|
||||
|
||||
public function get_content($url, $data=array()) {
|
||||
|
||||
$curlsession = curl_init();
|
||||
curl_setopt ($curlsession, CURLOPT_URL, $url);
|
||||
curl_setopt ($curlsession, CURLOPT_POST, 1);
|
||||
curl_setopt ($curlsession, CURLOPT_POSTFIELDS, http_build_query($data, '', '&'));
|
||||
curl_setopt ($curlsession, CURLOPT_HTTPHEADER, array('Content-Type: application/x-www-form-urlencoded'));
|
||||
curl_setopt ($curlsession, CURLINFO_HEADER_OUT, false);
|
||||
curl_setopt ($curlsession, CURLOPT_HEADER, false);
|
||||
curl_setopt ($curlsession, CURLOPT_RETURNTRANSFER, 1);
|
||||
curl_setopt ($curlsession, CURLOPT_SSL_VERIFYPEER, 1);
|
||||
curl_setopt ($curlsession, CURLOPT_TIMEOUT, 3);
|
||||
|
||||
$response = curl_exec($curlsession);
|
||||
$cinfo = curl_getinfo($curlsession);
|
||||
curl_close($curlsession);
|
||||
|
||||
if ($cinfo['http_code'] != 200){
|
||||
return '';
|
||||
}
|
||||
return $response;
|
||||
}
|
||||
|
||||
/**
|
||||
* Submits an HTTP GET to a reCAPTCHA server.
|
||||
*
|
||||
* @param string $path url path to recaptcha server.
|
||||
* @param array $data array of parameters to be sent.
|
||||
*
|
||||
* @return array response
|
||||
*/
|
||||
private function submit($url, $data)
|
||||
{
|
||||
$response = $this->get_content($url, $data);
|
||||
return $response;
|
||||
}
|
||||
|
||||
/**
|
||||
* Calls the reCAPTCHA siteverify API to verify whether the user passes
|
||||
* CAPTCHA test.
|
||||
*
|
||||
* @param string $remoteIp IP address of end user.
|
||||
* @param string $response response string from recaptcha verification.
|
||||
*
|
||||
* @return ReCaptchaResponse_v
|
||||
*/
|
||||
public function verify($response, $remoteIp = null)
|
||||
{
|
||||
// Discard empty solution submissions
|
||||
if ($response == null || strlen($response) == 0) {
|
||||
$recaptchaResponse = new ReCaptchaResponse_v();
|
||||
$recaptchaResponse->success = false;
|
||||
$recaptchaResponse->errorCodes = 'missing-input';
|
||||
return $recaptchaResponse;
|
||||
}
|
||||
$getResponse = $this->submit(
|
||||
self::$_siteVerifyUrl,
|
||||
array (
|
||||
'secret' => $this->secret,
|
||||
'remoteip' => $remoteIp,
|
||||
'version' => self::VERSION,
|
||||
'response' => $response
|
||||
)
|
||||
);
|
||||
$answers = $getResponse ? json_decode($getResponse, true) : array();
|
||||
$recaptchaResponse = new ReCaptchaResponse_v();
|
||||
if (isset($answers['success']) && $answers['success'] == true) {
|
||||
$recaptchaResponse->success = true;
|
||||
} else {
|
||||
$recaptchaResponse->success = false;
|
||||
$recaptchaResponse->errorCodes = isset($answers['error-codes']) ? $answers['error-codes'] : 'http_error';
|
||||
}
|
||||
return $recaptchaResponse;
|
||||
}
|
||||
}
|
||||
?>
|
||||
@@ -0,0 +1,20 @@
|
||||
function chk_captcha()
|
||||
{
|
||||
if ( ! jQuery('#g-recaptcha-response').val()) {
|
||||
grecaptcha.execute();
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
function recaptcha_validate(token) {
|
||||
var $form = jQuery("#g-recaptcha-response").closest("form"),
|
||||
form_id = $form.attr("id");
|
||||
|
||||
|
||||
if( $form.length ){
|
||||
$form.submit();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,52 @@
|
||||
<?php
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
|
||||
// 캡챠 HTML 코드 출력
|
||||
function captcha_html($class="captcha")
|
||||
{
|
||||
|
||||
global $config;
|
||||
|
||||
/*
|
||||
#hl=ko 표시는 언어지정가능
|
||||
*/
|
||||
$html = '<fieldset id="captcha" class="captcha invisible_recaptcha">';
|
||||
$html .= '<script src="https://www.google.com/recaptcha/api.js?hl=ko"></script>';
|
||||
$html .= '<script src="'.G5_CAPTCHA_URL.'/recaptcha.js"></script>';
|
||||
$html .= '<div id="recaptcha" class="g-recaptcha" data-sitekey="' . $config['cf_recaptcha_site_key'] . '" data-callback="recaptcha_validate" data-badge="inline" data-size="invisible"></div>';
|
||||
$html .= '<script>jQuery("#recaptcha").hide().parent(".invisible_recaptcha").hide().closest(".is_captcha_use").hide();</script>';
|
||||
$html .= '</fieldset>';
|
||||
|
||||
return $html;
|
||||
}
|
||||
|
||||
// 캡챠 사용시 자바스크립트에서 입력된 캡챠를 검사함
|
||||
function chk_captcha_js()
|
||||
{
|
||||
return "if (!chk_captcha()) return false;\n";
|
||||
}
|
||||
|
||||
function chk_captcha(){
|
||||
|
||||
global $config;
|
||||
|
||||
$resp = null;
|
||||
|
||||
if ( isset($_POST["g-recaptcha-response"]) && !empty($_POST["g-recaptcha-response"]) ) {
|
||||
|
||||
$reCaptcha = new ReCaptcha_GNU( $config['cf_recaptcha_secret_key'] );
|
||||
|
||||
$resp = $reCaptcha->verify($_POST["g-recaptcha-response"], $_SERVER["REMOTE_ADDR"]);
|
||||
}
|
||||
|
||||
if( ! $resp ){
|
||||
return false;
|
||||
}
|
||||
|
||||
if ($resp != null && $resp->success) {
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
?>
|
||||
@@ -3,6 +3,8 @@ include_once('./_common.php');
|
||||
//include_once(G5_CAPTCHA_PATH.'/captcha.lib.php');
|
||||
include_once(G5_LIB_PATH.'/register.lib.php');
|
||||
|
||||
define('ASIDE_DISABLE', 1);
|
||||
|
||||
if( ! $config['cf_social_login_use'] ){
|
||||
alert('소셜 로그인을 사용하지 않습니다.');
|
||||
}
|
||||
|
||||
@@ -157,7 +157,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
|
||||
<?php } ?>
|
||||
|
||||
|
||||
<?php if ($is_guest) { //자동등록방지 ?>
|
||||
<?php if ($is_use_captcha) { //자동등록방지 ?>
|
||||
<div>
|
||||
<?php echo $captcha_html ?>
|
||||
</div>
|
||||
|
||||
@@ -157,7 +157,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
|
||||
<?php } ?>
|
||||
|
||||
|
||||
<?php if ($is_guest) { //자동등록방지 ?>
|
||||
<?php if ($is_use_captcha) { //자동등록방지 ?>
|
||||
<div>
|
||||
<?php echo $captcha_html ?>
|
||||
</div>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
@charset "utf-8";
|
||||
#current_connect ul:after{content:"";display:block;clear:both}
|
||||
#current_connect li{width:208px;float:left;border:1px solid #d8d8d8;margin-left:10px;margin-bottom:10px;text-align:center;position:relative}
|
||||
#current_connect li:nth-child(3n+1){clear:both;margin-left:0}
|
||||
#current_connect .crt_name {margin:20px;display:block}
|
||||
|
||||
@@ -80,6 +80,17 @@ add_stylesheet('<link rel="stylesheet" href="'.$member_skin_url.'/style.css">',
|
||||
|
||||
return true;
|
||||
}
|
||||
jQuery(function($){
|
||||
$(document).on("click", "#chk_all", function(e){
|
||||
|
||||
if ($(this).prop('checked')) {
|
||||
$( "input[name^='agree']" ).prop('checked', true);
|
||||
} else {
|
||||
$( "input[name^='agree']" ).prop('checked', false);
|
||||
}
|
||||
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
<!-- } 회원가입 약관 동의 끝 -->
|
||||
@@ -192,7 +192,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$member_skin_url.'/style.css">',
|
||||
<li>
|
||||
<label for="reg_mb_mailling" class="frm_label">메일링서비스</label>
|
||||
<input type="checkbox" name="mb_mailling" value="1" id="reg_mb_mailling" <?php echo ($w=='' || $member['mb_mailling'])?'checked':''; ?>>
|
||||
정보 메일을 받겠습니다.
|
||||
<label for="reg_mb_mailling">정보 메일을 받겠습니다.</label>
|
||||
|
||||
</li>
|
||||
|
||||
@@ -201,7 +201,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$member_skin_url.'/style.css">',
|
||||
<label for="reg_mb_sms" class="frm_label">SMS 수신여부</label>
|
||||
|
||||
<input type="checkbox" name="mb_sms" value="1" id="reg_mb_sms" <?php echo ($w=='' || $member['mb_sms'])?'checked':''; ?>>
|
||||
휴대폰 문자메세지를 받겠습니다.
|
||||
<label for="reg_mb_sms">휴대폰 문자메세지를 받겠습니다.</label>
|
||||
|
||||
</li>
|
||||
<?php } ?>
|
||||
@@ -211,7 +211,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$member_skin_url.'/style.css">',
|
||||
<label for="reg_mb_open" class="frm_label">정보공개</label>
|
||||
<input type="hidden" name="mb_open_default" value="<?php echo $member['mb_open'] ?>">
|
||||
<input type="checkbox" name="mb_open" value="1" <?php echo ($w=='' || $member['mb_open'])?'checked':''; ?> id="reg_mb_open">
|
||||
다른분들이 나의 정보를 볼 수 있도록 합니다.
|
||||
<label for="reg_mb_open">다른분들이 나의 정보를 볼 수 있도록 합니다.</label>
|
||||
<span class="frm_info">
|
||||
정보공개를 바꾸시면 앞으로 <?php echo (int)$config['cf_open_modify'] ?>일 이내에는 변경이 안됩니다.
|
||||
</span>
|
||||
@@ -241,7 +241,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$member_skin_url.'/style.css">',
|
||||
}
|
||||
?>
|
||||
|
||||
<li>
|
||||
<li class="is_captcha_use">
|
||||
자동등록방지
|
||||
<?php echo captcha_html(); ?>
|
||||
</li>
|
||||
|
||||
@@ -117,15 +117,9 @@ add_stylesheet('<link rel="stylesheet" href="'.get_social_skin_url().'/style.css
|
||||
<div class="mw-title">기존 계정에 연결하기</div>
|
||||
|
||||
<div class="mw-desc">
|
||||
SIR 기존 아이디에 SNS 아이디를 연결합니다.<br>
|
||||
SNS 아이디로 로그인 하시면 SIR 아이디로 로그인 됩니다.
|
||||
기존 아이디에 SNS 아이디를 연결합니다.
|
||||
</div>
|
||||
|
||||
<button type="button" class="mw-close">
|
||||
<i class="fa fa-close"></i>
|
||||
<span class="txt">닫기</span>
|
||||
</button>
|
||||
|
||||
<div id="login_fs">
|
||||
<label for="login_id" class="login_id">아이디<strong class="sound_only"> 필수</strong></label>
|
||||
<span class="lg_id"><input type="text" name="mb_id" id="login_id" class="frm_input required" size="20" maxLength="20" ></span>
|
||||
|
||||
@@ -130,6 +130,7 @@ a.gnb_2da:hover{background:#f9f9f9;color:#000}
|
||||
#aside {float:right;width:271px;padding:20px;border-left:1px solid #e8e8e8;margin-left:-1px;height:100%;}
|
||||
|
||||
#container {z-index:4;position:relative;float:left;padding:20px 20px 20px 0;width:670px;border-right:1px solid #e8e8e8;min-height:500px;height:auto !important;height:500px;font-size:1em;zoom:1}
|
||||
#container.aside_disable {float:none;width:100%;padding-right:0px;border-right:none 0}
|
||||
#container:after {display:block;visibility:hidden;clear:both;content:""}
|
||||
#container_title {font-size:1.25em;;font-weight:bold;border-bottom:1px solid #e8e8e8}
|
||||
#container_title span{margin:0 auto;display:block;width:940px;height:60px;line-height:30px;padding:15px 0;}
|
||||
|
||||
@@ -29,8 +29,8 @@ $sql .= " order by bo_order ";
|
||||
$result = sql_query($sql);
|
||||
for ($i=0; $row=sql_fetch_array($result); $i++) {
|
||||
$lt_style = "";
|
||||
if ($i%2==1) $lt_style = "margin-left:20px";
|
||||
else $lt_style = "";
|
||||
if ($i%2==1) $lt_style = "margin-left:15px";
|
||||
if ($i%2==0) $lt_style = "clear:both";
|
||||
?>
|
||||
<div style="float:left;<?php echo $lt_style ?>">
|
||||
<?php
|
||||
|
||||
@@ -144,7 +144,7 @@ include_once(G5_LIB_PATH.'/popular.lib.php');
|
||||
</div>
|
||||
<!-- } 상단 끝 -->
|
||||
<script>
|
||||
$(function (){
|
||||
jQuery(function($){
|
||||
$("#sch_op_btn").on("click", function() {
|
||||
$("#hd_sch").css("display","block");
|
||||
});
|
||||
@@ -160,6 +160,7 @@ $(function (){
|
||||
<div id="wrapper">
|
||||
<?php if (!defined("_INDEX_")) { ?><h2 id="container_title"><span><?php echo $g5['title'] ?></span></h2><?php } ?>
|
||||
<div id="container_wr">
|
||||
<?php if(!defined('ASIDE_DISABLE')) { ?>
|
||||
<div id="aside">
|
||||
<?php echo outlogin('theme/basic'); // 외부 로그인, 테마의 스킨을 사용하려면 스킨을 theme/basic 과 같이 지정 ?>
|
||||
<?php echo poll('theme/basic'); // 설문조사, 테마의 스킨을 사용하려면 스킨을 theme/basic 과 같이 지정 ?>
|
||||
@@ -175,4 +176,5 @@ $(function (){
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div id="container">
|
||||
<?php } //end if ?>
|
||||
<div id="container" class="<?php echo defined('ASIDE_DISABLE') ? 'aside_disable' : ''; ?>">
|
||||
@@ -143,7 +143,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($is_guest) { //자동등록방지 ?>
|
||||
<?php if ($is_use_captcha) { //자동등록방지 ?>
|
||||
<div>
|
||||
<span class="sound_only">자동등록방지</span>
|
||||
<?php echo $captcha_html ?>
|
||||
|
||||
@@ -143,7 +143,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($is_guest) { //자동등록방지 ?>
|
||||
<?php if ($is_use_captcha) { //자동등록방지 ?>
|
||||
<div>
|
||||
<span class="sound_only">자동등록방지</span>
|
||||
<?php echo $captcha_html ?>
|
||||
|
||||
@@ -157,7 +157,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
|
||||
<?php } ?>
|
||||
|
||||
|
||||
<?php if ($is_guest) { //자동등록방지 ?>
|
||||
<?php if ($is_use_captcha) { //자동등록방지 ?>
|
||||
<div>
|
||||
<?php echo $captcha_html ?>
|
||||
</div>
|
||||
|
||||
@@ -157,7 +157,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
|
||||
<?php } ?>
|
||||
|
||||
|
||||
<?php if ($is_guest) { //자동등록방지 ?>
|
||||
<?php if ($is_use_captcha) { //자동등록방지 ?>
|
||||
<div>
|
||||
<?php echo $captcha_html ?>
|
||||
</div>
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
@charset "utf-8";
|
||||
#current_connect ul:after{content:"";display:block;clear:both}
|
||||
#current_connect li{width:208px;float:left;border:1px solid #d8d8d8;margin-left:10px;margin-bottom:10px;text-align:center;position:relative}
|
||||
#current_connect li:nth-child(3n+1){clear:both;margin-left:0}
|
||||
#current_connect .crt_name {margin:20px;display:block}
|
||||
|
||||
@@ -80,6 +80,17 @@ add_stylesheet('<link rel="stylesheet" href="'.$member_skin_url.'/style.css">',
|
||||
|
||||
return true;
|
||||
}
|
||||
jQuery(function($){
|
||||
$(document).on("click", "#chk_all", function(e){
|
||||
|
||||
if ($(this).prop('checked')) {
|
||||
$( "input[name^='agree']" ).prop('checked', true);
|
||||
} else {
|
||||
$( "input[name^='agree']" ).prop('checked', false);
|
||||
}
|
||||
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
<!-- } 회원가입 약관 동의 끝 -->
|
||||
@@ -192,7 +192,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$member_skin_url.'/style.css">',
|
||||
<li>
|
||||
<label for="reg_mb_mailling" class="frm_label">메일링서비스</label>
|
||||
<input type="checkbox" name="mb_mailling" value="1" id="reg_mb_mailling" <?php echo ($w=='' || $member['mb_mailling'])?'checked':''; ?>>
|
||||
정보 메일을 받겠습니다.
|
||||
<label for="reg_mb_mailling">정보 메일을 받겠습니다.</label>
|
||||
|
||||
</li>
|
||||
|
||||
@@ -201,7 +201,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$member_skin_url.'/style.css">',
|
||||
<label for="reg_mb_sms" class="frm_label">SMS 수신여부</label>
|
||||
|
||||
<input type="checkbox" name="mb_sms" value="1" id="reg_mb_sms" <?php echo ($w=='' || $member['mb_sms'])?'checked':''; ?>>
|
||||
휴대폰 문자메세지를 받겠습니다.
|
||||
<label for="reg_mb_sms">휴대폰 문자메세지를 받겠습니다.</label>
|
||||
|
||||
</li>
|
||||
<?php } ?>
|
||||
@@ -211,7 +211,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$member_skin_url.'/style.css">',
|
||||
<label for="reg_mb_open" class="frm_label">정보공개</label>
|
||||
<input type="hidden" name="mb_open_default" value="<?php echo $member['mb_open'] ?>">
|
||||
<input type="checkbox" name="mb_open" value="1" <?php echo ($w=='' || $member['mb_open'])?'checked':''; ?> id="reg_mb_open">
|
||||
다른분들이 나의 정보를 볼 수 있도록 합니다.
|
||||
<label for="reg_mb_open">다른분들이 나의 정보를 볼 수 있도록 합니다.</label>
|
||||
<span class="frm_info">
|
||||
정보공개를 바꾸시면 앞으로 <?php echo (int)$config['cf_open_modify'] ?>일 이내에는 변경이 안됩니다.
|
||||
</span>
|
||||
@@ -241,7 +241,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$member_skin_url.'/style.css">',
|
||||
}
|
||||
?>
|
||||
|
||||
<li>
|
||||
<li class="is_captcha_use">
|
||||
자동등록방지
|
||||
<?php echo captcha_html(); ?>
|
||||
</li>
|
||||
|
||||
Reference in New Issue
Block a user