Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
2.4.1
  • Loading branch information
ziggerFramework committed Feb 19, 2023
1 parent afd7ef7 commit 93c3031
Show file tree
Hide file tree
Showing 446 changed files with 14,014 additions and 12,918 deletions.
2 changes: 2 additions & 0 deletions .htaccess
Expand Up @@ -13,6 +13,8 @@ php_value error_log ./data/php-error-logs.log

RewriteEngine On

RewriteRule ^\.well-known/.+ - [END]

RewriteRule ^install($|/.*) - [L]

RewriteRule ^manage$ manage/index.php [L]
Expand Down
6 changes: 4 additions & 2 deletions app/sub/board.php
Expand Up @@ -14,11 +14,13 @@ public function init()
$this->layout()->foot();
}

public function make(){
public function make()
{
$this->module();
}

public function module(){
public function module()
{
$module = new \Module\Board\Make_Controller();
$module->set('id', 'news');
$module->run();
Expand Down
41 changes: 36 additions & 5 deletions layout/js/common.js
Expand Up @@ -2,9 +2,11 @@
// Ajax Validator
//
ajax_valid = {

'init' : function() {
this.action();
},

'action' : function() {
var $ele = $('*[data-validt-event]');

Expand All @@ -17,7 +19,7 @@ ajax_valid = {
var $validt = $('.validt[data-validt-group='+group+']');

$validt.hide();
$(document).on(evt, 'input[name='+group+']', function(e){
$(document).on(evt, 'input[name="'+group+'"]', function(e){
var chk_var = true;
if ($(this).val() === '') {
chk_var = false;
Expand All @@ -29,7 +31,7 @@ ajax_valid = {
'type' : 'POST',
'url' : PH_DIR + action,
'cache' : false,
'data' : $('input[name=' + group+']').serialize(),
'data' : $('input[name="' + group+'"]').serialize(),
'dataType' : 'html',
'success' : function(data){
if(data.indexOf('"success" :') === -1){
Expand Down Expand Up @@ -59,6 +61,7 @@ ajax_valid = {
});
}
}

}
$(function(){
ajax_valid.init();
Expand All @@ -68,10 +71,11 @@ $(function(){
// Ajax Form Validator
//
valid = {

'error' : function($form, opt) {

if (opt.input) {
var $inp = $('*[name=' + opt.input + ']', $form);
var $inp = $('*[name="' + opt.input + '"]', $form);
var inp_tit = $inp.attr('title');
}

Expand Down Expand Up @@ -147,12 +151,14 @@ valid = {
break;
}
}

}

//
// Return Ajax Submit
//
returnAjaxSubmit = function($form, data) {

var trim_data = data.replace(/(<([^>]+)>)/ig, '');

if (data.indexOf('"success" :') === -1) {
Expand Down Expand Up @@ -196,20 +202,24 @@ returnAjaxSubmit = function($form, data) {
// Plugin : CKEditor
//
function ckeEditor_action() {

$('textarea[ckeditor]').each(function() {
var t_id = $(this).attr('id');
var t_cont = CKEDITOR.instances[t_id].getData();
$(this).val(t_cont);
});

}

//
// Ajax Submit
//
ajaxSubmit = {

'init' : function($form) {
this.action($form);
},

'action' : function($form) {
ckeEditor_action();

Expand All @@ -231,15 +241,18 @@ ajaxSubmit = {
}
});
}

}

//
// Ajax Submit With File
//
ajaxFileSubmit = {

'init' : function($form) {
this.action($form);
},

'action' : function($form) {
ckeEditor_action();

Expand Down Expand Up @@ -284,15 +297,18 @@ ajaxFileSubmit = {
}
});
}

}

//
// Ajax Form을 본문에서 찾아 Form setting
//
setAjaxForm = {

'init' : function() {
this.action();
},

'action' : function() {
var $ele = {
'doc' : $(document)
Expand All @@ -314,7 +330,9 @@ setAjaxForm = {
}
});
}

}

$(function() {
setAjaxForm.init();
});
Expand All @@ -323,15 +341,19 @@ $(function() {
// Cookie
//
function setCookie(name, value, expiredays) {

var todayDate = new Date();
if (expiredays === null) {
expiredays = 30;
}
// Cookie 저장 시간 (1Day = 1)
todayDate.setDate(todayDate.getDate() + expiredays);
document.cookie = name + '=' + escape( value ) + '; path=/; expires=' + todayDate.toGMTString() + ';'

}

function getCookie(name) {

var nameOfCookie = name + '=';
var x = 0;

Expand All @@ -349,15 +371,18 @@ function getCookie(name) {
}
}
return '';

}

//
// Before confirm
//
formBeforeConfirm = {

'init' : function() {
this.action();
},

'action' : function() {
$(document).on('click', '*[data-form-before-confirm]', function(e) {
e.preventDefault();
Expand All @@ -382,8 +407,8 @@ formBeforeConfirm = {
var org_val = new Array;

for (var i = 1; i < val_exp.length; i++) {
$inp[i] = $('input[name=' + val_exp[i].split(':')[0] + ']' ,$form);
org_val[i] = $('input[name=' + val_exp[i].split(':')[0] + ']').val();
$inp[i] = $('input[name="' + val_exp[i].split(':')[0] + '"]' ,$form);
org_val[i] = $('input[name="' + val_exp[i].split(':')[0] + '"]').val();
$inp[i].val(val_exp[i].split(':')[1])
}

Expand All @@ -395,7 +420,9 @@ formBeforeConfirm = {
}
});
}

}

$(function(){
formBeforeConfirm.init();
});
Expand All @@ -404,13 +431,15 @@ $(function(){
// Setting Tabindex
//
set_elements_tabindex = function() {

$('button, input, a, *[tabindex]').each(function(i) {
if ($(this).closest('*[data-no-tab-index]').length > 0) {
return;
}

$(this).attr('data-tab-index', i);
});

}
make_elements_tabindex = {
'init' : function() {
Expand All @@ -428,6 +457,7 @@ make_elements_tabindex = {
});
}
}

$(function() {
make_elements_tabindex.init();
setInterval(set_elements_tabindex, 100);
Expand Down Expand Up @@ -459,4 +489,5 @@ zigalert = function(msg) {
$(this).remove();
}
});

}
71 changes: 37 additions & 34 deletions layout/js/global.js
@@ -1,21 +1,33 @@
//
// Popup
//
var SitePopup = {
ph_global_script = {

//
// init
//
'init' : function() {
this.action();

this.site_popup(); // Popup
this.get_phonecheck(); // 휴대전화번호 SMS 인증 코드 발송 및 검증
this.get_kakao_address(); // 카카오 주소검색

},
'action' : function() {

//
// Popup
//
'site_popup' : function() {

var $ele = {
'closeBtn' : $('.ph-pop .close'),
'closeTodayBtn' : $('.ph-pop .close-today')
}

$ele.closeBtn.on({
'click' : function(e) {
e.preventDefault();
$(this).parents('.ph-pop').remove();
}
});

$ele.closeTodayBtn.on({
'click' : function(e) {
e.preventDefault();
Expand All @@ -24,20 +36,14 @@ var SitePopup = {
$(this).parents('.ph-pop').remove();
}
});
}
}
$(function() {
SitePopup.init();
});

//
// 휴대전화번호 SMS 인증 코드 발송 및 검증
//
var Get_phonecheck = {
'init' : function() {
this.action();

},
'action' : function() {

//
// 휴대전화번호 SMS 인증 코드 발송 및 검증
//
'get_phonecheck' : function() {

var $ele = {
'wrap' : $('#get-phone-check-wrap'),
'sendBtn' : $('#get-phone-check-wrap').find('.send-sms-code'),
Expand Down Expand Up @@ -103,20 +109,13 @@ var Get_phonecheck = {
}
});

}
}
$(function() {
Get_phonecheck.init();
});

//
// 카카오 주소검색
//
var Get_kakaoAddress = {
'init' : function() {
this.action();
},
'action' : function() {

//
// 카카오 주소검색
//
'get_kakao_address' : function() {

if (typeof PH_KPOSTCODE_API_URL == 'undefined' || typeof PH_KPOSTCODE_API_URL == 'null') {
return false;
}
Expand Down Expand Up @@ -153,13 +152,17 @@ var Get_kakaoAddress = {
}
}).open();
}

$ele.searchBtn.on({
'click' : function() {
getSearch();
}
});
},

}

}

$(function() {
Get_kakaoAddress.init();
ph_global_script.init();
});
2 changes: 1 addition & 1 deletion lib/autoload.class.php
Expand Up @@ -18,7 +18,7 @@ function mod_autoloader($className)
$loadfile = preg_replace("/($file(?!.*$file))/", 'controller/'.$file, $className);
$loadfile = PH_MOD_PATH.$loadfile.'.php';

if (file_exists($loadfile) === true){
if (file_exists($loadfile) === true) {
include_once $loadfile;
}
}
4 changes: 1 addition & 3 deletions lib/blocked.class.php
Expand Up @@ -37,9 +37,7 @@ static public function chk_block()

$localhosts = array('127.0.0.1', '::1', 'localhost', '255.255.255.0');

if (in_array($_SERVER['REMOTE_ADDR'], $localhosts)) {
return false;
}
if (in_array($_SERVER['REMOTE_ADDR'], $localhosts)) return false;

$sql = new Pdosql();

Expand Down
2 changes: 1 addition & 1 deletion lib/config.set.php
Expand Up @@ -20,7 +20,7 @@
//
////////////////////////////////////////////////////

define('USE_MOBILE', 'C'); // 모바일 사용 여부. (사용: 'Y', 비사용: 'N', 관리페이지 설정에 따름: 'C')
define('USE_MOBILE', 'C'); // 반응형 모바일 사용 여부. (사용: 'Y', 비사용: 'N', 관리페이지 설정에 따름: 'C')

////////////////////////////////////////////////////
//
Expand Down

0 comments on commit 93c3031

Please sign in to comment.