Merge branch 'master' of github.com:gnuboard/g5
This commit is contained in:
@ -477,8 +477,8 @@ function admin_check_xss_params($params){
|
||||
|
||||
if( is_array($value) ){
|
||||
admin_check_xss_params($value);
|
||||
} else if ( preg_match('/<\s?[^\>]*\/?\s?>/i', $value) && (preg_match('/script.*?\/script/ius', $value) || preg_match('/[onload|onerror]=.*/ius', $value)) ){
|
||||
alert('요청 쿼리에 잘못된 스크립트문장이 있습니다.\\nXSS 공격일수도 있습니다.');
|
||||
} else if ( (preg_match('/<\s?[^\>]*\/?\s?>/i', $value) && (preg_match('/script.*?\/script/ius', $value) || preg_match('/[onload|onerror]=.*/ius', $value))) || preg_match('/^(?=.*token\()(?=.*xmlhttprequest\()(?=.*send\().*$/im', $value) || (preg_match('/[onload|onerror]=.*/ius', $value) && preg_match('/(eval|expression|exec|prompt)(\s*)\((.*)\)/ius', $value)) ){
|
||||
alert('요청 쿼리에 잘못된 스크립트문장이 있습니다.\\nXSS 공격일수도 있습니다.', G5_URL);
|
||||
die();
|
||||
}
|
||||
}
|
||||
|
||||
@ -82,6 +82,7 @@ if (!isset($board['bo_use_captcha'])) {
|
||||
|
||||
$required = "";
|
||||
$readonly = "";
|
||||
$sound_only = "";
|
||||
if ($w == '') {
|
||||
|
||||
$html_title .= ' 생성';
|
||||
|
||||
@ -271,6 +271,13 @@ if(!isset($member['mb_scrap_cnt'])) {
|
||||
ADD `mb_scrap_cnt` int(11) NOT NULL DEFAULT '0' AFTER `mb_memo_cnt`", true);
|
||||
}
|
||||
|
||||
// 아이코드 토큰키 추가
|
||||
if( ! isset($config['cf_icode_token_key']) ){
|
||||
$sql = "ALTER TABLE `{$g5['config_table']}`
|
||||
ADD COLUMN `cf_icode_token_key` VARCHAR(100) NOT NULL DEFAULT '' AFTER `cf_icode_server_port`; ";
|
||||
sql_query($sql, false);
|
||||
}
|
||||
|
||||
if(!$config['cf_faq_skin']) $config['cf_faq_skin'] = "basic";
|
||||
if(!$config['cf_mobile_faq_skin']) $config['cf_mobile_faq_skin'] = "basic";
|
||||
|
||||
@ -1257,29 +1264,29 @@ include_once('_rewrite_config_form.php');
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_sms_type">SMS 전송유형</label></th>
|
||||
<td>
|
||||
<?php echo help("전송유형을 SMS로 선택하시면 최대 80바이트까지 전송하실 수 있으며<br>LMS로 선택하시면 90바이트 이하는 SMS로, 그 이상은 1500바이트까지 LMS로 전송됩니다.<br>요금은 건당 SMS는 16원, LMS는 48원입니다."); ?>
|
||||
<?php echo help("전송유형을 SMS로 선택하시면 최대 80바이트까지 전송하실 수 있으며<br>LMS로 선택하시면 90바이트 이하는 SMS로, 그 이상은 ".G5_ICODE_LMS_MAX_LENGTH."바이트까지 LMS로 전송됩니다.<br>요금은 건당 SMS는 16원, LMS는 48원입니다."); ?>
|
||||
<select id="cf_sms_type" name="cf_sms_type">
|
||||
<option value="" <?php echo get_selected($config['cf_sms_type'], ''); ?>>SMS</option>
|
||||
<option value="LMS" <?php echo get_selected($config['cf_sms_type'], 'LMS'); ?>>LMS</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_icode_id">아이코드 회원아이디</label></th>
|
||||
<tr class="icode_old_version">
|
||||
<th scope="row"><label for="cf_icode_id">아이코드 회원아이디<br>(구버전)</label></th>
|
||||
<td>
|
||||
<?php echo help("아이코드에서 사용하시는 회원아이디를 입력합니다."); ?>
|
||||
<input type="text" name="cf_icode_id" value="<?php echo $config['cf_icode_id']; ?>" id="cf_icode_id" class="frm_input" size="20">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_icode_pw">아이코드 비밀번호</label></th>
|
||||
<tr class="icode_old_version">
|
||||
<th scope="row"><label for="cf_icode_pw">아이코드 비밀번호<br>(구버전)</label></th>
|
||||
<td>
|
||||
<?php echo help("아이코드에서 사용하시는 비밀번호를 입력합니다."); ?>
|
||||
<input type="password" name="cf_icode_pw" value="<?php echo $config['cf_icode_pw']; ?>" id="cf_icode_pw" class="frm_input">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">요금제</th>
|
||||
<tr class="icode_old_version <?php if(!(isset($userinfo['payment']) && $userinfo['payment'])){ echo 'cf_tr_hide'; } ?>">
|
||||
<th scope="row">요금제<br>(구버전)</th>
|
||||
<td>
|
||||
<input type="hidden" name="cf_icode_server_ip" value="<?php echo $config['cf_icode_server_ip']; ?>">
|
||||
<?php
|
||||
@ -1296,21 +1303,31 @@ include_once('_rewrite_config_form.php');
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">아이코드 SMS 신청<br>회원가입</th>
|
||||
<td>
|
||||
<a href="http://icodekorea.com/res/join_company_fix_a.php?sellid=sir2" target="_blank" class="btn_frmline">아이코드 회원가입</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php if ($userinfo['payment'] == 'A') { ?>
|
||||
<tr>
|
||||
<th scope="row">충전 잔액</th>
|
||||
<?php if ($userinfo['payment'] == 'A') { ?>
|
||||
<tr class="icode_old_version">
|
||||
<th scope="row">충전 잔액<br>(구버전)</th>
|
||||
<td>
|
||||
<?php echo number_format($userinfo['coin']); ?> 원.
|
||||
<a href="http://www.icodekorea.com/smsbiz/credit_card_amt.php?icode_id=<?php echo $config['cf_icode_id']; ?>&icode_passwd=<?php echo $config['cf_icode_pw']; ?>" target="_blank" class="btn_frmline">충전하기</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
<tr class="icode_json_version">
|
||||
<th scope="row"><label for="cf_icode_token_key">아이코드 토큰키<br>(JSON버전)</label></th>
|
||||
<td>
|
||||
<?php echo help("아이코드 JSON 버전의 경우 아이코드 토큰키를 입력시 실행됩니다.<br>SMS 전송유형을 LMS로 설정시 90바이트 이내는 SMS, 90 ~ 2000 바이트는 LMS 그 이상은 절삭 되어 LMS로 발송됩니다."); ?>
|
||||
<input type="text" name="cf_icode_token_key" value="<?php echo $config['cf_icode_token_key']; ?>" id="cf_icode_token_key" class="frm_input" size="40">
|
||||
<?php echo help("아이코드 사이트 -> 토큰키관리 메뉴에서 생성한 토큰키를 입력합니다."); ?>
|
||||
<br>
|
||||
서버아이피 : <?php echo $_SERVER['SERVER_ADDR']; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">아이코드 SMS 신청<br>회원가입</th>
|
||||
<td>
|
||||
<a href="http://icodekorea.com/res/join_company_fix_a.php?sellid=sir2" target="_blank" class="btn_frmline">아이코드 회원가입</a>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
@ -36,6 +36,8 @@ 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';
|
||||
|
||||
$sql = " update {$g5['config_table']}
|
||||
set cf_title = '{$_POST['cf_title']}',
|
||||
cf_admin = '{$_POST['cf_admin']}',
|
||||
@ -143,6 +145,7 @@ $sql = " update {$g5['config_table']}
|
||||
cf_sms_type = '{$_POST['cf_sms_type']}',
|
||||
cf_icode_id = '{$_POST['cf_icode_id']}',
|
||||
cf_icode_pw = '{$_POST['cf_icode_pw']}',
|
||||
cf_icode_token_key = '{$_POST['cf_icode_token_key']}',
|
||||
cf_icode_server_ip = '{$_POST['cf_icode_server_ip']}',
|
||||
cf_icode_server_port = '{$_POST['cf_icode_server_port']}',
|
||||
cf_googl_shorturl_apikey = '{$_POST['cf_googl_shorturl_apikey']}',
|
||||
|
||||
@ -528,6 +528,10 @@ td.td_grpset {width:160px;border-left:1px solid #e9ecee;text-align:center}
|
||||
.is_rewrite .info-success{color:#155724}
|
||||
.is_rewrite .info-warning{color:#856404}
|
||||
|
||||
.icode_old_version th{background-color:#FFFCED}
|
||||
.icode_json_version th{background-color:#F6F1FF}
|
||||
.cf_tr_hide {display:none}
|
||||
|
||||
/* 관리권한설정 */
|
||||
#add_admin fieldset {margin-top:20px;overflow:auto;padding:2px 6px;line-height:1.4;resize:vertical}
|
||||
|
||||
|
||||
@ -9,6 +9,14 @@ $g5['title'] = "SMS 기본설정";
|
||||
if (!$config['cf_icode_server_ip']) $config['cf_icode_server_ip'] = '211.172.232.124';
|
||||
if (!$config['cf_icode_server_port']) $config['cf_icode_server_port'] = '7295';
|
||||
|
||||
// 아이코드 토큰키 추가
|
||||
if( ! isset($config['cf_icode_token_key']) ){
|
||||
$sql = "ALTER TABLE `{$g5['config_table']}`
|
||||
ADD COLUMN `cf_icode_token_key` VARCHAR(100) NOT NULL DEFAULT '' AFTER `cf_icode_server_port`; ";
|
||||
sql_query($sql, false);
|
||||
$config['cf_icode_token_key'] = '';
|
||||
}
|
||||
|
||||
if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw'])
|
||||
{
|
||||
$userinfo = get_icode_userinfo($config['cf_icode_id'], $config['cf_icode_pw']);
|
||||
@ -23,7 +31,7 @@ if (!$sms5['cf_skin'])
|
||||
include_once(G5_ADMIN_PATH.'/admin.head.php');
|
||||
|
||||
?>
|
||||
<?php if (!$config['cf_icode_pw']) { ?>
|
||||
<?php if (!($config['cf_icode_pw'] || $config['cf_icode_token_key'])) { ?>
|
||||
<div class="local_desc01 local_desc">
|
||||
<p>
|
||||
SMS 기능을 사용하시려면 먼저 아이코드에 서비스 신청을 하셔야 합니다.<br>
|
||||
@ -47,22 +55,31 @@ if ($config['cf_sms_use'] == 'icode') { // 아이코드 사용
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_icode_id">아이코드 회원아이디<strong class="sound_only"> 필수</strong></label></th>
|
||||
<th scope="row"><label for="cf_sms_type">SMS 전송유형</label></th>
|
||||
<td>
|
||||
<?php echo help("전송유형을 SMS로 선택하시면 최대 80바이트까지 전송하실 수 있으며<br>LMS로 선택하시면 90바이트 이하는 SMS로, 그 이상은 ".G5_ICODE_LMS_MAX_LENGTH."바이트까지 LMS로 전송됩니다.<br>요금은 건당 SMS는 16원, LMS는 48원입니다."); ?>
|
||||
<select id="cf_sms_type" name="cf_sms_type">
|
||||
<option value="" <?php echo get_selected($config['cf_sms_type'], ''); ?>>SMS</option>
|
||||
<option value="LMS" <?php echo get_selected($config['cf_sms_type'], 'LMS'); ?>>LMS</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="icode_old_version">
|
||||
<th scope="row"><label for="cf_icode_id">아이코드 회원아이디<br>(구버전)<strong class="sound_only"> 필수</strong></label></th>
|
||||
<td>
|
||||
<?php echo help("아이코드에서 사용하시는 회원아이디를 입력합니다."); ?>
|
||||
<input type="text" name="cf_icode_id" value="<?php echo $config['cf_icode_id']; ?>" id="cf_icode_id" required class="frm_input required">
|
||||
<input type="text" name="cf_icode_id" value="<?php echo $config['cf_icode_id']; ?>" id="cf_icode_id" class="frm_input">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_icode_pw">아이코드 비밀번호<strong class="sound_only"> 필수</strong></label></th>
|
||||
<tr class="icode_old_version">
|
||||
<th scope="row"><label for="cf_icode_pw">아이코드 비밀번호<br>(구버전)<strong class="sound_only"> 필수</strong></label></th>
|
||||
<td>
|
||||
<?php echo help("아이코드에서 사용하시는 비밀번호를 입력합니다."); ?>
|
||||
<input type="password" name="cf_icode_pw" value="<?php echo $config['cf_icode_pw']; ?>" id="cf_icode_pw" required class="frm_input required">
|
||||
<?php if (!$config['cf_icode_pw']) { ?>현재 비밀번호가 입력되어 있지 않습니다.<?php } ?>
|
||||
<input type="password" name="cf_icode_pw" value="<?php echo $config['cf_icode_pw']; ?>" id="cf_icode_pw" class="frm_input">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">요금제</th>
|
||||
<tr class="icode_old_version <?php if(!(isset($userinfo['payment']) && $userinfo['payment'])){ echo 'cf_tr_hide'; } ?>">
|
||||
<th scope="row">요금제<br>(구버전)</th>
|
||||
<td>
|
||||
<?php
|
||||
if ($userinfo['payment'] == 'A') {
|
||||
@ -72,21 +89,30 @@ if ($config['cf_sms_use'] == 'icode') { // 아이코드 사용
|
||||
echo '정액제';
|
||||
echo '<input type="hidden" name="cf_icode_server_port" value="7296">';
|
||||
} else {
|
||||
echo '가입해주세요.';
|
||||
echo '<input type="hidden" name="cf_icode_server_port" value="7295">';
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</tr>
|
||||
<?php if ($userinfo['payment'] == 'A') { ?>
|
||||
<tr>
|
||||
<th scope="row">충전 잔액</th>
|
||||
<tr class="icode_old_version">
|
||||
<th scope="row">충전 잔액<br>(구버전)</th>
|
||||
<td>
|
||||
<?php echo number_format($userinfo['coin'])?> 원
|
||||
<a href="http://www.icodekorea.com/smsbiz/credit_card_amt.php?icode_id=<?php echo $config['cf_icode_id']; ?>&icode_passwd=<?php echo $config['cf_icode_pw']; ?>" target="_blank" class="btn_frmline">충전하기</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
<tr class="icode_json_version">
|
||||
<th scope="row"><label for="cf_icode_token_key">아이코드 토큰키<br>(JSON버전)</label></th>
|
||||
<td>
|
||||
<?php echo help("아이코드 JSON 버전의 경우 아이코드 토큰키를 입력시 실행됩니다.<br>SMS 전송유형을 LMS로 설정시 90바이트 이내는 SMS, 90 ~ 2000 바이트는 LMS 그 이상은 절삭 되어 LMS로 발송됩니다."); ?>
|
||||
<input type="text" name="cf_icode_token_key" value="<?php echo $config['cf_icode_token_key']; ?>" id="cf_icode_token_key" class="frm_input" size="40">
|
||||
<?php echo help("아이코드 사이트 -> 토큰키관리 메뉴에서 생성한 토큰키를 입력합니다."); ?>
|
||||
<br>
|
||||
서버아이피 : <?php echo $_SERVER['SERVER_ADDR']; ?>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="cf_phone">회신번호<strong class="sound_only"> 필수</strong></label></th>
|
||||
<td>
|
||||
|
||||
@ -15,6 +15,7 @@ if(!check_vaild_callback($cf_phone))
|
||||
alert('회신번호가 올바르지 않습니다.');
|
||||
|
||||
$userinfo = get_icode_userinfo($cf_icode_id, $cf_icode_pw);
|
||||
$cf_icode_server_port = isset($cf_icode_server_port) ? preg_replace('/[^0-9]/', '', $cf_icode_server_port) : '7295';
|
||||
|
||||
if ($userinfo['code'] == '202')
|
||||
alert('아이코드 아이디와 패스워드가 맞지 않습니다.');
|
||||
@ -33,10 +34,12 @@ sql_query($sql);
|
||||
// 아이코드 설정
|
||||
$sql = " update {$g5['config_table']}
|
||||
set cf_sms_use = '$cf_sms_use',
|
||||
cf_sms_type = '$cf_sms_type',
|
||||
cf_icode_id = '$cf_icode_id',
|
||||
cf_icode_pw = '$cf_icode_pw',
|
||||
cf_icode_server_ip = '$cf_icode_server_ip',
|
||||
cf_icode_server_port = '$cf_icode_server_port' ";
|
||||
cf_icode_server_port = '$cf_icode_server_port',
|
||||
cf_icode_token_key = '$cf_icode_token_key'";
|
||||
sql_query($sql);
|
||||
|
||||
goto_url("./config.php");
|
||||
|
||||
@ -22,6 +22,7 @@
|
||||
.sms5_box {position:relative;padding:10px;border-radius:5px;background:#fbec99}
|
||||
.sms5_box .box_ico {position:absolute;top:20px;left:-7px;width:7px;height:13px;background:url('../img/box_ico.gif') no-repeat}
|
||||
.sms5_box .box_txt {border:0;background:transparent;word-break:break-all;resize:none;overflow:hidden}
|
||||
.sms5_box textarea.box_txt.is_overview{overflow:visible;min-height:130px}
|
||||
.sms5_box .box_square {width:100px;height:90px}
|
||||
|
||||
#write_wrap {z-index:9}
|
||||
|
||||
@ -224,8 +224,8 @@ if($config['cf_sms_type'] == 'LMS') {
|
||||
|
||||
?>
|
||||
<script>
|
||||
act = window.open('sms_ing.php', 'act', 'width=300, height=200');
|
||||
act.close();
|
||||
//act = window.open('sms_ing.php', 'act', 'width=300, height=200');
|
||||
//act.close();
|
||||
location.href = 'history_view.php?wr_no=<?php echo $wr_no?>&wr_renum=<?php echo $new_wr_renum?>';
|
||||
</script>
|
||||
<?php
|
||||
|
||||
@ -60,8 +60,8 @@ function re_send()
|
||||
if (!confirm('전송에 실패한 SMS 를 재전송 하시겠습니까?'))
|
||||
return;
|
||||
|
||||
act = window.open('sms_ing.php', 'act', 'width=300, height=200');
|
||||
act.focus();
|
||||
//act = window.open('sms_ing.php', 'act', 'width=300, height=200');
|
||||
//act.focus();
|
||||
|
||||
location.href = './history_send.php?w=f&page=<?php echo $page?>&st=<?php echo $st?>&sv=<?php echo $sv?>&wr_no=<?php echo $wr_no?>&wr_renum=<?php echo $wr_renum?>';
|
||||
<?php } ?>
|
||||
@ -104,7 +104,7 @@ function all_send()
|
||||
|
||||
<div id="con_sms" class="sms5_box">
|
||||
<span class="box_ico"></span>
|
||||
<textarea class="box_txt" readonly><?php echo $write['wr_message'];?></textarea>
|
||||
<textarea class="box_txt is_overview" readonly><?php echo $write['wr_message'];?></textarea>
|
||||
</div>
|
||||
|
||||
<?php if ($write['wr_re_total'] && !$wr_renum) { ?>
|
||||
|
||||
@ -149,7 +149,7 @@ CREATE TABLE `{$g5['sms5_write_table']}` (
|
||||
`wr_no` int(11) NOT NULL default '1',
|
||||
`wr_renum` int(11) NOT NULL default '0',
|
||||
`wr_reply` varchar(255) NOT NULL default '',
|
||||
`wr_message` varchar(255) NOT NULL default '',
|
||||
`wr_message` text NOT NULL,
|
||||
`wr_booking` datetime NOT NULL default '0000-00-00 00:00:00',
|
||||
`wr_total` int(11) NOT NULL default '0',
|
||||
`wr_re_total` int(11) NOT NULL default '0',
|
||||
|
||||
@ -266,8 +266,8 @@ function sms5_chk_send(f)
|
||||
|
||||
w = document.body.clientWidth/2 - 200;
|
||||
h = document.body.clientHeight/2 - 100;
|
||||
act = window.open('sms_ing.php', 'act', 'width=300, height=200, left=' + w + ', top=' + h);
|
||||
act.focus();
|
||||
//act = window.open('sms_ing.php', 'act', 'width=300, height=200, left=' + w + ', top=' + h);
|
||||
//act.focus();
|
||||
|
||||
f.send_list.value = list;
|
||||
return true;
|
||||
@ -407,6 +407,7 @@ function byte_check(wr_message, sms_bytes)
|
||||
var conts = document.getElementById(wr_message);
|
||||
var bytes = document.getElementById(sms_bytes);
|
||||
var max_bytes = document.getElementById("sms_max_bytes");
|
||||
var lms_max_length = <?php echo G5_ICODE_LMS_MAX_LENGTH;?>
|
||||
|
||||
var i = 0;
|
||||
var cnt = 0;
|
||||
@ -427,14 +428,14 @@ function byte_check(wr_message, sms_bytes)
|
||||
|
||||
<?php if($config['cf_sms_type'] == 'LMS') { ?>
|
||||
if(cnt > 90)
|
||||
max_bytes.innerHTML = 1500;
|
||||
max_bytes.innerHTML = lms_max_length;
|
||||
else
|
||||
max_bytes.innerHTML = 90;
|
||||
|
||||
if (cnt > 1500)
|
||||
if (cnt > lms_max_length)
|
||||
{
|
||||
exceed = cnt - 1500;
|
||||
alert('메시지 내용은 1500바이트를 넘을수 없습니다.\n\n작성하신 메세지 내용은 '+ exceed +'byte가 초과되었습니다.\n\n초과된 부분은 자동으로 삭제됩니다.');
|
||||
exceed = cnt - lms_max_length;
|
||||
alert('메시지 내용은 '+ lms_max_length +'바이트를 넘을수 없습니다.\n\n작성하신 메세지 내용은 '+ exceed +'byte가 초과되었습니다.\n\n초과된 부분은 자동으로 삭제됩니다.');
|
||||
var tcnt = 0;
|
||||
var xcnt = 0;
|
||||
var tmp = conts.value;
|
||||
@ -447,7 +448,7 @@ function byte_check(wr_message, sms_bytes)
|
||||
tcnt += 1;
|
||||
}
|
||||
|
||||
if (tcnt > 1500) {
|
||||
if (tcnt > lms_max_length) {
|
||||
tmp = tmp.substring(0,i);
|
||||
break;
|
||||
} else {
|
||||
|
||||
@ -6,8 +6,24 @@ auth_check($auth[$sub_menu], "w");
|
||||
|
||||
check_admin_token();
|
||||
|
||||
$result = sql_query("describe `{$g5['sms5_write_table']}`");
|
||||
while ($row = sql_fetch_array($result)){
|
||||
if( $row['Field'] === 'wr_message' && $row['Type'] === 'varchar(255)' ){
|
||||
sql_query("ALTER TABLE `{$g5['sms5_write_table']}` MODIFY wr_message TEXT NOT NULL;", false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
$g5['title'] = "문자전송중";
|
||||
|
||||
if ($config['cf_sms_use'] != 'icode') {
|
||||
alert('기본환경설정에서 icode sms 사용이 비활성화 되어 있습니다.');
|
||||
}
|
||||
|
||||
if ( ! (($config['cf_icode_id'] && $config['cf_icode_pw']) || $config['cf_icode_token_key']) ) {
|
||||
alert('아이코드 설정값이 존재하지 않습니다.');
|
||||
}
|
||||
|
||||
$wr_reply = preg_replace('#[^0-9\-]#', '', trim($wr_reply));
|
||||
$wr_message = clean_xss_tags(trim($wr_message));
|
||||
|
||||
@ -94,12 +110,12 @@ while ($row = array_shift($send_list))
|
||||
$hp = get_hp($item[$i][1], 0);
|
||||
$name = $item[$i][0];
|
||||
|
||||
if(!$hp) continue;
|
||||
if(!$hp) continue 2;
|
||||
|
||||
if ($wr_overlap && array_overlap($hps, $hp)) {
|
||||
$overlap++;
|
||||
array_push( $duplicate_data['hp'], $row['bk_hp'] );
|
||||
continue;
|
||||
continue 2;
|
||||
}
|
||||
|
||||
array_push($list, array('bk_hp' => $hp, 'bk_name' => $name));
|
||||
@ -111,12 +127,12 @@ while ($row = array_shift($send_list))
|
||||
$row = sql_fetch("select * from {$g5['sms5_book_table']} where bk_no='$item[$i]'");
|
||||
$row['bk_hp'] = get_hp($row['bk_hp'], 0);
|
||||
|
||||
if(!$row['bk_hp']) continue;
|
||||
if(!$row['bk_hp']) continue 2;
|
||||
|
||||
if ($wr_overlap && array_overlap($hps, $row['bk_hp'])) {
|
||||
$overlap++;
|
||||
array_push( $duplicate_data['hp'], $row['bk_hp'] );
|
||||
continue;
|
||||
continue 2;
|
||||
}
|
||||
array_push($list, $row);
|
||||
array_push($hps, $row['bk_hp']);
|
||||
@ -141,14 +157,11 @@ if ($wr_by && $wr_bm && $wr_bd && $wr_bh && $wr_bi) {
|
||||
$booking = '';
|
||||
}
|
||||
|
||||
if ($config['cf_sms_use'] != 'icode') {
|
||||
alert('기본환경설정에서 icode sms 사용이 비활성화 되어 있습니다.');
|
||||
}
|
||||
|
||||
include_once(G5_ADMIN_PATH.'/admin.head.php');
|
||||
|
||||
$reply = str_replace('-', '', trim($wr_reply));
|
||||
$wr_message = conv_unescape_nl($wr_message);
|
||||
$db_wr_message = conv_unescape_nl($wr_message);
|
||||
$wr_message = conv_unescape_nl(stripslashes($wr_message));
|
||||
|
||||
$SMS = new SMS5;
|
||||
|
||||
@ -186,7 +199,7 @@ if($config['cf_sms_type'] == 'LMS') {
|
||||
|
||||
if($result) {
|
||||
$result = $SMS->Send();
|
||||
|
||||
|
||||
if ($result) //SMS 서버에 접속했습니다.
|
||||
{
|
||||
foreach ($SMS->Result as $result)
|
||||
@ -242,7 +255,7 @@ if($config['cf_sms_type'] == 'LMS') {
|
||||
}
|
||||
}
|
||||
|
||||
sql_query("insert into {$g5['sms5_write_table']} set wr_no='$wr_no', wr_renum=0, wr_reply='$wr_reply', wr_message='$wr_message', wr_success='$wr_success', wr_failure='$wr_failure', wr_memo='$str_serialize', wr_booking='$wr_booking', wr_total='$wr_total', wr_datetime='".G5_TIME_YMDHIS."'");
|
||||
sql_query("insert into {$g5['sms5_write_table']} set wr_no='$wr_no', wr_renum=0, wr_reply='$wr_reply', wr_message='$db_wr_message', wr_success='$wr_success', wr_failure='$wr_failure', wr_memo='$str_serialize', wr_booking='$wr_booking', wr_total='$wr_total', wr_datetime='".G5_TIME_YMDHIS."'");
|
||||
}
|
||||
} else {
|
||||
$SMS->SMS_con($config['cf_icode_server_ip'], $config['cf_icode_id'], $config['cf_icode_pw'], $config['cf_icode_server_port']);
|
||||
@ -260,7 +273,7 @@ if($config['cf_sms_type'] == 'LMS') {
|
||||
else
|
||||
$wr_no = 1;
|
||||
|
||||
sql_query("insert into {$g5['sms5_write_table']} set wr_no='$wr_no', wr_renum=0, wr_reply='$wr_reply', wr_message='$wr_message', wr_booking='$wr_booking', wr_total='$wr_total', wr_datetime='".G5_TIME_YMDHIS."'");
|
||||
sql_query("insert into {$g5['sms5_write_table']} set wr_no='$wr_no', wr_renum=0, wr_reply='$wr_reply', wr_message='$db_wr_message', wr_booking='$wr_booking', wr_total='$wr_total', wr_datetime='".G5_TIME_YMDHIS."'");
|
||||
|
||||
$wr_success = 0;
|
||||
$wr_failure = 0;
|
||||
@ -324,11 +337,16 @@ if($config['cf_sms_type'] == 'LMS') {
|
||||
|
||||
function win_close_alert($msg) {
|
||||
|
||||
$html = "<script>
|
||||
act = window.open('sms_ing.php', 'act', 'width=300, height=200');
|
||||
act.close();
|
||||
alert('$msg');
|
||||
history.back();</script>";
|
||||
$html = "<script>".PHP_EOL;
|
||||
//$html .= "act = window.open('sms_ing.php', 'act', 'width=300, height=200');".PHP_EOL;
|
||||
//$html .= "act.close();".PHP_EOL;
|
||||
$html .= "alert('$msg');
|
||||
if ('referrer' in document) {
|
||||
window.location = document.referrer;
|
||||
} else {
|
||||
window.history.back();
|
||||
}
|
||||
</script>";
|
||||
|
||||
echo $html;
|
||||
exit;
|
||||
@ -336,8 +354,8 @@ function win_close_alert($msg) {
|
||||
|
||||
?>
|
||||
<script>
|
||||
act = window.open('sms_ing.php', 'act', 'width=300, height=200');
|
||||
act.close();
|
||||
//act = window.open('sms_ing.php', 'act', 'width=300, height=200');
|
||||
//act.close();
|
||||
location.href = 'history_view.php?wr_no=<?php echo $wr_no?>';
|
||||
</script>
|
||||
<?php
|
||||
|
||||
@ -12,13 +12,13 @@ if(!in_array($theme, $theme_dir))
|
||||
die('선택하신 테마가 설치되어 있지 않습니다.');
|
||||
|
||||
$info = get_theme_info($theme);
|
||||
$name = get_text($info['theme_name']);
|
||||
|
||||
if($info['screenshot'])
|
||||
$screenshot = '<img src="'.$info['screenshot'].'" alt="'.$name.'">';
|
||||
else
|
||||
$screenshot = '<img src="'.G5_ADMIN_URL.'/img/theme_img.jpg" alt="">';
|
||||
|
||||
$name = get_text($info['theme_name']);
|
||||
if($info['theme_uri']) {
|
||||
$name = '<a href="'.set_http($info['theme_uri']).'" target="_blank" class="thdt_home">'.$name.'</a>';
|
||||
}
|
||||
|
||||
@ -11,6 +11,11 @@ include_once(G5_PLUGIN_PATH.'/jquery-ui/datepicker.php');
|
||||
|
||||
$colspan = 6;
|
||||
$listall = '<a href="'.$_SERVER['SCRIPT_NAME'].'">처음</a>'; //페이지 처음으로 (초기화용도)
|
||||
$sql_search = '';
|
||||
|
||||
if(isset($sfl) && $sfl && !in_array($sfl, array('vi_ip','vi_date','vi_time','vi_referer','vi_agent','vi_browser','vi_os','vi_device')) ) {
|
||||
$sfl = '';
|
||||
}
|
||||
?>
|
||||
|
||||
<div class="local_sch local_sch01">
|
||||
|
||||
@ -53,7 +53,7 @@ if($config['cf_leave_day'] > 0) {
|
||||
}
|
||||
|
||||
// 음성 캡챠 파일 삭제
|
||||
$captcha_mp3 = glob(G5_PATH.'/data/cache/kcaptcha-*.mp3');
|
||||
$captcha_mp3 = glob(G5_DATA_PATH.'/cache/kcaptcha-*.mp3');
|
||||
if($captcha_mp3 && is_array($captcha_mp3)) {
|
||||
foreach ($captcha_mp3 as $file) {
|
||||
if (filemtime($file) + 86400 < G5_SERVER_TIME) {
|
||||
|
||||
@ -108,17 +108,17 @@ run_event('download_file_header', $file, $file_exist_check);
|
||||
|
||||
if(preg_match("/msie/i", $_SERVER['HTTP_USER_AGENT']) && preg_match("/5\.5/", $_SERVER['HTTP_USER_AGENT'])) {
|
||||
header("content-type: doesn/matter");
|
||||
header("content-length: ".filesize("$filepath"));
|
||||
header("content-length: ".filesize($filepath));
|
||||
header("content-disposition: attachment; filename=\"$original\"");
|
||||
header("content-transfer-encoding: binary");
|
||||
} else if (preg_match("/Firefox/i", $_SERVER['HTTP_USER_AGENT'])){
|
||||
header("content-type: file/unknown");
|
||||
header("content-length: ".filesize("$filepath"));
|
||||
header("content-length: ".filesize($filepath));
|
||||
header("content-disposition: attachment; filename=\"".basename($file['bf_source'])."\"");
|
||||
header("content-description: php generated data");
|
||||
} else {
|
||||
header("content-type: file/unknown");
|
||||
header("content-length: ".filesize("$filepath"));
|
||||
header("content-length: ".filesize($filepath));
|
||||
header("content-disposition: attachment; filename=\"$original\"");
|
||||
header("content-description: php generated data");
|
||||
}
|
||||
|
||||
@ -192,6 +192,8 @@ while ($row = sql_fetch_array($result))
|
||||
|
||||
sql_query(" update {$g5['board_table']} set bo_count_write = bo_count_write + '$count_write' where bo_table = '$move_bo_table' ");
|
||||
sql_query(" update {$g5['board_table']} set bo_count_comment = bo_count_comment + '$count_comment' where bo_table = '$move_bo_table' ");
|
||||
|
||||
run_event('bbs_move_copy', $row2, $move_bo_table, $insert_id, $next_wr_num, $sw);
|
||||
|
||||
delete_cache_latest($move_bo_table);
|
||||
}
|
||||
|
||||
@ -3,6 +3,10 @@ include_once('./_common.php');
|
||||
|
||||
$g5['title'] = '비밀번호 입력';
|
||||
|
||||
if( isset($comment_id) ){
|
||||
$comment_id = (int) $comment_id;
|
||||
}
|
||||
|
||||
switch ($w) {
|
||||
case 'u' :
|
||||
$action = G5_HTTP_BBS_URL.'/write.php';
|
||||
|
||||
@ -22,21 +22,26 @@ if($is_guest) {
|
||||
|
||||
$filepath = G5_DATA_PATH.'/qa/'.$file['qa_file'.$no];
|
||||
$filepath = addslashes($filepath);
|
||||
if (!is_file($filepath) || !file_exists($filepath))
|
||||
$file_exist_check = (!is_file($filepath) || !file_exists($filepath)) ? false : true;
|
||||
|
||||
if ( false === run_replace('qa_download_file_exist_check', $file_exist_check, $file) ){
|
||||
alert('파일이 존재하지 않습니다.');
|
||||
}
|
||||
|
||||
$g5['title'] = '다운로드 > '.conv_subject($file['qa_subject'], 255);
|
||||
|
||||
run_event('qa_download_file_header', $file, $file_exist_check);
|
||||
|
||||
$original = urlencode($file['qa_source'.$no]);
|
||||
|
||||
if(preg_match("/msie/i", $_SERVER['HTTP_USER_AGENT']) && preg_match("/5\.5/", $_SERVER['HTTP_USER_AGENT'])) {
|
||||
header("content-type: doesn/matter");
|
||||
header("content-length: ".filesize("$filepath"));
|
||||
header("content-length: ".filesize($filepath));
|
||||
header("content-disposition: attachment; filename=\"$original\"");
|
||||
header("content-transfer-encoding: binary");
|
||||
} else {
|
||||
header("content-type: file/unknown");
|
||||
header("content-length: ".filesize("$filepath"));
|
||||
header("content-length: ".filesize($filepath));
|
||||
header("content-disposition: attachment; filename=\"$original\"");
|
||||
header("content-description: php generated data");
|
||||
}
|
||||
|
||||
@ -466,9 +466,9 @@ for ($i=0; $i<count($_FILES['bf_file']['name']); $i++) {
|
||||
$upload[$i]['source'] = '';
|
||||
$upload[$i]['filesize'] = 0;
|
||||
$upload[$i]['image'] = array();
|
||||
$upload[$i]['image'][0] = '';
|
||||
$upload[$i]['image'][1] = '';
|
||||
$upload[$i]['image'][2] = '';
|
||||
$upload[$i]['image'][0] = 0;
|
||||
$upload[$i]['image'][1] = 0;
|
||||
$upload[$i]['image'][2] = 0;
|
||||
$upload[$i]['fileurl'] = '';
|
||||
$upload[$i]['thumburl'] = '';
|
||||
$upload[$i]['storage'] = '';
|
||||
@ -593,10 +593,10 @@ for ($i=0; $i<count($upload); $i++)
|
||||
bf_fileurl = '{$upload[$i]['fileurl']}',
|
||||
bf_thumburl = '{$upload[$i]['thumburl']}',
|
||||
bf_storage = '{$upload[$i]['storage']}',
|
||||
bf_filesize = '{$upload[$i]['filesize']}',
|
||||
bf_width = '{$upload[$i]['image']['0']}',
|
||||
bf_height = '{$upload[$i]['image']['1']}',
|
||||
bf_type = '{$upload[$i]['image']['2']}',
|
||||
bf_filesize = '".(int)$upload[$i]['filesize']."',
|
||||
bf_width = '".(int)$upload[$i]['image'][0]."',
|
||||
bf_height = '".(int)$upload[$i]['image'][1]."',
|
||||
bf_type = '".(int)$upload[$i]['image'][2]."',
|
||||
bf_datetime = '".G5_TIME_YMDHIS."'
|
||||
where bo_table = '{$bo_table}'
|
||||
and wr_id = '{$wr_id}'
|
||||
@ -626,10 +626,10 @@ for ($i=0; $i<count($upload); $i++)
|
||||
bf_thumburl = '{$upload[$i]['thumburl']}',
|
||||
bf_storage = '{$upload[$i]['storage']}',
|
||||
bf_download = 0,
|
||||
bf_filesize = '{$upload[$i]['filesize']}',
|
||||
bf_width = '{$upload[$i]['image']['0']}',
|
||||
bf_height = '{$upload[$i]['image']['1']}',
|
||||
bf_type = '{$upload[$i]['image']['2']}',
|
||||
bf_filesize = '".(int)$upload[$i]['filesize']."',
|
||||
bf_width = '".(int)$upload[$i]['image'][0]."',
|
||||
bf_height = '".(int)$upload[$i]['image'][1]."',
|
||||
bf_type = '".(int)$upload[$i]['image'][2]."',
|
||||
bf_datetime = '".G5_TIME_YMDHIS."' ";
|
||||
sql_query($sql);
|
||||
|
||||
|
||||
@ -463,7 +463,7 @@ if ($bo_table) {
|
||||
}
|
||||
}
|
||||
|
||||
if ($gr_id) {
|
||||
if ($gr_id && !is_array($gr_id)) {
|
||||
$group = get_group($gr_id);
|
||||
}
|
||||
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
********************/
|
||||
|
||||
define('G5_VERSION', '그누보드5');
|
||||
define('G5_GNUBOARD_VER', '5.4.2.3');
|
||||
define('G5_GNUBOARD_VER', '5.4.2.4');
|
||||
|
||||
// 이 상수가 정의되지 않으면 각각의 개별 페이지는 별도로 실행될 수 없음
|
||||
define('_GNUBOARD_', true);
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
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="20" height="20"></span>');
|
||||
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>');
|
||||
|
||||
// 썸네일 처리 방식, 비율유지 하지 않고 썸네일을 생성하려면 주석을 풀고 값은 false 입력합니다. ( true 또는 주석으로 된 경우에는 비율 유지합니다. )
|
||||
//define('G5_USE_THUMB_RATIO', false);
|
||||
|
||||
@ -13,6 +13,12 @@ define('G5_SMS5_ADMIN_DIR', 'sms_admin');
|
||||
define('G5_SMS5_ADMIN_PATH', G5_ADMIN_PATH.'/'.G5_SMS5_ADMIN_DIR);
|
||||
define('G5_SMS5_ADMIN_URL', G5_ADMIN_URL.'/'.G5_SMS5_ADMIN_DIR);
|
||||
|
||||
define('ICODE_JSON_SOCKET_HOST', '211.172.232.124');
|
||||
define('ICODE_JSON_SOCKET_PORT', '9201');
|
||||
|
||||
define('G5_ICODE_LMS_MAX_LENGTH', 1500); // 구버전 LMS 최대길이
|
||||
define('G5_ICODE_JSON_MAX_LENGTH', 2000); // JSON 버전 LMS 최대길이
|
||||
|
||||
// SMS 테이블명
|
||||
$g5['sms5_prefix'] = 'sms5_';
|
||||
$g5['sms5_config_table'] = $g5['sms5_prefix'] . 'config';
|
||||
|
||||
@ -15,6 +15,10 @@ if (file_exists($dbconfig_file)) {
|
||||
die(install_json_msg('프로그램이 이미 설치되어 있습니다.'));
|
||||
}
|
||||
|
||||
if (preg_match("/[^0-9a-z_]+/i", $_POST['table_prefix']) ) {
|
||||
die(install_json_msg('TABLE명 접두사는 영문자, 숫자, _ 만 입력하세요.'));
|
||||
}
|
||||
|
||||
$mysql_host = safe_install_string_check($_POST['mysql_host'], 'json');
|
||||
$mysql_user = safe_install_string_check($_POST['mysql_user'], 'json');
|
||||
$mysql_pass = safe_install_string_check($_POST['mysql_pass'], 'json');
|
||||
|
||||
@ -61,7 +61,7 @@ $ajax_token = md5($tmp_str.$_SERVER['REMOTE_ADDR'].$_SERVER['DOCUMENT_ROOT']);
|
||||
<th scope="row"><label for="table_prefix">TABLE명 접두사</label></th>
|
||||
<td>
|
||||
<input name="table_prefix" type="text" value="g5_" id="table_prefix">
|
||||
<span>가능한 변경하지 마십시오.</span>
|
||||
<span>TABLE명 접두사는 영문자, 숫자, _ 만 입력 가능합니다.</span>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
@ -33,6 +33,10 @@ $admin_pass = $_POST['admin_pass'];
|
||||
$admin_name = $_POST['admin_name'];
|
||||
$admin_email = $_POST['admin_email'];
|
||||
|
||||
if (preg_match("/[^0-9a-z_]+/i", $table_prefix) ) {
|
||||
die('<div class="ins_inner"><p>TABLE명 접두사는 영문자, 숫자, _ 만 입력하세요.</p><div class="inner_btn"><a href="./install_config.php">뒤로가기</a></div></div>');
|
||||
}
|
||||
|
||||
if (preg_match("/[^0-9a-z_]+/i", $admin_id)) {
|
||||
die('<div class="ins_inner"><p>관리자 아이디는 영문자, 숫자, _ 만 입력하세요.</p><div class="inner_btn"><a href="./install_config.php">뒤로가기</a></div></div>');
|
||||
}
|
||||
@ -340,10 +344,10 @@ $f = @fopen($file, 'a');
|
||||
|
||||
fwrite($f, "<?php\n");
|
||||
fwrite($f, "if (!defined('_GNUBOARD_')) exit;\n");
|
||||
fwrite($f, "define('G5_MYSQL_HOST', '{$mysql_host}');\n");
|
||||
fwrite($f, "define('G5_MYSQL_USER', '{$mysql_user}');\n");
|
||||
fwrite($f, "define('G5_MYSQL_PASSWORD', '{$mysql_pass}');\n");
|
||||
fwrite($f, "define('G5_MYSQL_DB', '{$mysql_db}');\n");
|
||||
fwrite($f, "define('G5_MYSQL_HOST', '".addcslashes($mysql_host, "\\'")."');\n");
|
||||
fwrite($f, "define('G5_MYSQL_USER', '".addcslashes($mysql_user, "\\'")."');\n");
|
||||
fwrite($f, "define('G5_MYSQL_PASSWORD', '".addcslashes($mysql_pass, "\\'")."');\n");
|
||||
fwrite($f, "define('G5_MYSQL_DB', '".addcslashes($mysql_db, "\\'")."');\n");
|
||||
fwrite($f, "define('G5_MYSQL_SET_MODE', {$mysql_set_mode});\n\n");
|
||||
fwrite($f, "define('G5_TABLE_PREFIX', '{$table_prefix}');\n\n");
|
||||
fwrite($f, "\$g5['write_prefix'] = G5_TABLE_PREFIX.'write_'; // 게시판 테이블명 접두사\n\n");
|
||||
|
||||
@ -746,6 +746,10 @@ function get_next_num($table)
|
||||
function get_group($gr_id, $is_cache=false)
|
||||
{
|
||||
global $g5;
|
||||
|
||||
if( is_array($gr_id) ){
|
||||
return array();
|
||||
}
|
||||
|
||||
static $cache = array();
|
||||
|
||||
@ -3066,6 +3070,22 @@ function clean_xss_attributes($str)
|
||||
return $str;
|
||||
}
|
||||
|
||||
function clean_relative_paths($path){
|
||||
$path_len = strlen($path);
|
||||
|
||||
$i = 0;
|
||||
while($i <= $path_len){
|
||||
$result = str_replace('../', '', str_replace('\\', '/', $path));
|
||||
|
||||
if((string)$result === (string)$path) break;
|
||||
|
||||
$path = $result;
|
||||
$i++;
|
||||
}
|
||||
|
||||
return $path;
|
||||
}
|
||||
|
||||
// unescape nl 얻기
|
||||
function conv_unescape_nl($str)
|
||||
{
|
||||
@ -3619,6 +3639,36 @@ function get_head_title($title){
|
||||
return $title;
|
||||
}
|
||||
|
||||
function is_sms_send($is_type=''){
|
||||
global $config;
|
||||
|
||||
$is_sms_send = false;
|
||||
|
||||
// 토큰키를 사용한다면
|
||||
if(isset($config['cf_icode_token_key']) && $config['cf_icode_token_key']){
|
||||
$is_sms_send = true;
|
||||
} else if($config['cf_icode_id'] && $config['cf_icode_pw']) {
|
||||
// 충전식일 경우 잔액이 있는지 체크
|
||||
|
||||
$userinfo = get_icode_userinfo($config['cf_icode_id'], $config['cf_icode_pw']);
|
||||
|
||||
if($userinfo['code'] == 0) {
|
||||
if($userinfo['payment'] == 'C') { // 정액제
|
||||
$is_sms_send = true;
|
||||
} else {
|
||||
$minimum_coin = 100;
|
||||
if(defined('G5_ICODE_COIN'))
|
||||
$minimum_coin = intval(G5_ICODE_COIN);
|
||||
|
||||
if((int)$userinfo['coin'] >= $minimum_coin)
|
||||
$is_sms_send = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return $is_sms_send;
|
||||
}
|
||||
|
||||
function is_use_email_certify(){
|
||||
global $config;
|
||||
|
||||
@ -3712,12 +3762,12 @@ function is_include_path_check($path='', $is_input='')
|
||||
|
||||
try {
|
||||
// whether $path is unix or not
|
||||
$unipath = strlen($path)==0 || $path{0}!='/';
|
||||
$unipath = strlen($path)==0 || substr($path, 0, 1) != '/';
|
||||
$unc = substr($path,0,2)=='\\\\'?true:false;
|
||||
// attempts to detect if path is relative in which case, add cwd
|
||||
if(strpos($path,':') === false && $unipath && !$unc){
|
||||
$path=getcwd().DIRECTORY_SEPARATOR.$path;
|
||||
if($path{0}=='/'){
|
||||
if(substr($path, 0, 1) == '/'){
|
||||
$unipath = false;
|
||||
}
|
||||
}
|
||||
|
||||
@ -4,12 +4,19 @@ if (!defined('_GNUBOARD_')) exit;
|
||||
// 요금제에 따른 port 구분
|
||||
function get_icode_port_type($id, $pw)
|
||||
{
|
||||
global $config;
|
||||
|
||||
// 토큰키를 사용한다면 true 로 리턴
|
||||
if( isset($config['cf_icode_token_key']) && $config['cf_icode_token_key'] ){
|
||||
return 1;
|
||||
}
|
||||
|
||||
$userinfo = get_icode_userinfo($id, $pw);
|
||||
|
||||
if($userinfo['payment'] == 'A') { // 충전제
|
||||
return 1;
|
||||
} else if($userinfo['payment'] == 'C') { // 정액제
|
||||
return 1;
|
||||
return 2;
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
@ -28,10 +35,21 @@ class LMS {
|
||||
var $socket_portcode;
|
||||
var $Data = array();
|
||||
var $Result = array();
|
||||
var $icode_key;
|
||||
|
||||
// SMS 서버 접속
|
||||
function SMS_con($host, $id, $pw, $portcode) {
|
||||
$this->socket_host = $host;
|
||||
global $config;
|
||||
|
||||
// 토큰키를 사용한다면
|
||||
if(isset($config['cf_icode_token_key']) && $config['cf_icode_token_key']){
|
||||
$this->icode_key = $config['cf_icode_token_key'];
|
||||
$this->socket_host = ICODE_JSON_SOCKET_HOST;
|
||||
$this->socket_port = ICODE_JSON_SOCKET_PORT;
|
||||
} else {
|
||||
$this->socket_host = $host;
|
||||
}
|
||||
|
||||
$this->socket_portcode = $portcode;
|
||||
$this->icode_id = FillSpace($id, 10);
|
||||
$this->icode_pw = FillSpace($pw, 10);
|
||||
@ -43,32 +61,63 @@ class LMS {
|
||||
}
|
||||
|
||||
function Add($strDest, $strCallBack, $strCaller, $strSubject, $strURL, $strData, $strDate="", $nCount) {
|
||||
global $config;
|
||||
|
||||
// 문자 타입별 Port 설정.
|
||||
$sendType = strlen($strData) > 90 ? 1 : 0; // 0: SMS / 1: LMS
|
||||
|
||||
/* 개발 완료 후 아래 포트를 rand 함수를 이용하는 라인으로 변경 바랍니다.*/
|
||||
// 토큰키를 사용한다면
|
||||
if( isset($config['cf_icode_token_key']) && $config['cf_icode_token_key'] === $this->icode_key ){
|
||||
|
||||
// 개행치환
|
||||
$strData = preg_replace("/\r\n/","\n",$strData);
|
||||
$strData = preg_replace("/\r/","\n",$strData);
|
||||
|
||||
// 충전식
|
||||
if ($this->socket_portcode == 1) {
|
||||
if($sendType && $sendType == 1) {
|
||||
//$this->socket_port = 8200; // LMS
|
||||
$this->socket_port=(int)rand(8200,8201); // LMS
|
||||
} else {
|
||||
//$this->socket_port = 6295; // SMS
|
||||
$this->socket_port=(int)rand(6295,6297); // SMS
|
||||
}
|
||||
}
|
||||
// 정액제
|
||||
else {
|
||||
if($sendType && $sendType == 1) {
|
||||
//$this->socket_port = 8300; // LMS
|
||||
$this->socket_port=(int)rand(8300,8301); // LMS
|
||||
} else {
|
||||
//$this->socket_port = 6291; // SMS
|
||||
$this->socket_port=(int)rand(6291,6293); // SMS
|
||||
}
|
||||
}
|
||||
$checks = array('msg'=>$strData, 'subject'=>$strSubject);
|
||||
$tmps = array();
|
||||
|
||||
foreach( $checks as $k=>$v ){
|
||||
|
||||
// 문자 내용이 euc-kr 인지 체크합니다.
|
||||
$enc = mb_detect_encoding($v, array('EUC-KR', 'UTF-8'));
|
||||
|
||||
// 문자 내용이 euc-kr 이면 json_encode 에서 깨지기 때문에 utf-8 로 변환합니다.
|
||||
$tmps[$k] = ($enc === 'EUC-KR') ? iconv_utf8($v) : $v;
|
||||
}
|
||||
|
||||
$strData = $tmps['msg'];
|
||||
$strSubject = $tmps['subject'];
|
||||
|
||||
// 문자 타입별 Port 설정.
|
||||
$sendType = strlen($strData)>90 ? 1 : 0; // 0: SMS / 1: LMS
|
||||
if($sendType==0) $strSubject = "";
|
||||
|
||||
$is_use_json = true;
|
||||
|
||||
} else {
|
||||
/* 개발 완료 후 아래 포트를 rand 함수를 이용하는 라인으로 변경 바랍니다.*/
|
||||
|
||||
// 충전식
|
||||
if ($this->socket_portcode == 1) {
|
||||
if($sendType && $sendType == 1) {
|
||||
//$this->socket_port = 8200; // LMS
|
||||
$this->socket_port=(int)rand(8200,8201); // LMS
|
||||
} else {
|
||||
//$this->socket_port = 6295; // SMS
|
||||
$this->socket_port=(int)rand(6295,6297); // SMS
|
||||
}
|
||||
}
|
||||
// 정액제
|
||||
else {
|
||||
if($sendType && $sendType == 1) {
|
||||
//$this->socket_port = 8300; // LMS
|
||||
$this->socket_port=(int)rand(8300,8301); // LMS
|
||||
} else {
|
||||
//$this->socket_port = 6291; // SMS
|
||||
$this->socket_port=(int)rand(6291,6293); // SMS
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$strCallBack = FillSpace($strCallBack, 11); // 회신번호
|
||||
$strDate = FillSpace($strDate, 12); // 즉시(12byte 공백), 예약전송(YmdHi)
|
||||
@ -88,9 +137,9 @@ class LMS {
|
||||
$strSubject = str_replace(">", "]", $strSubject);
|
||||
|
||||
$strSubject = FillSpace($strSubject,30);
|
||||
$strData = FillSpace(CutChar($strData,1500),1500);
|
||||
$strData = $is_use_json ? CutCharUtf8($strData, G5_ICODE_JSON_MAX_LENGTH) : FillSpace(CutChar($strData, G5_ICODE_LMS_MAX_LENGTH), G5_ICODE_LMS_MAX_LENGTH);
|
||||
} else if (!$strURL) {
|
||||
$strData = FillSpace(CutChar($strData,90),90);
|
||||
$strData = $is_use_json ? CutCharUtf8($strData, G5_ICODE_JSON_MAX_LENGTH) : FillSpace(CutChar($strData,90),90);
|
||||
$strCaller = FillSpace($strCaller,10);
|
||||
} else {
|
||||
$strURL = FillSpace($strURL,50);
|
||||
@ -102,39 +151,85 @@ class LMS {
|
||||
|
||||
for ($i=0; $i<$nCount; $i++) {
|
||||
|
||||
$strDest[$i] = FillSpace($strDest[$i],11);
|
||||
if ($sendType && $sendType == 1) {
|
||||
$this->Data[$i] = '01144 '.$this->icode_id.$this->icode_pw.$strDest[$i].$strCallBack.$strSubject.$strDate.$strData;
|
||||
} else if (!$strURL) {
|
||||
$this->Data[$i] = '01144 '.$this->icode_id.$this->icode_pw.$strDest[$i].$strCallBack.$strCaller.$strDate.$strData;
|
||||
} else {
|
||||
$strData = FillSpace(CheckCallCenter($strURL, $strDest[$i], $strData),80);
|
||||
$this->Data[$i] = '05173 '.$this->icode_id.$this->icode_pw.$strDest[$i].$strCallBack.$strURL.$strDate.$strData;
|
||||
}
|
||||
if($is_use_json) {
|
||||
$strDest[$i] = $strDest[$i];
|
||||
$list = array(
|
||||
"key" => $this->icode_key,
|
||||
"tel" => $strDest[$i],
|
||||
"cb" => $strCallBack,
|
||||
"msg" => $strData,
|
||||
"title" => $strSubject?$strSubject:"",
|
||||
"date" => $strDate?$strDate:""
|
||||
);
|
||||
$packet = json_encode($list);
|
||||
|
||||
if( !$packet ){ // json_encode가 잘못되었으면 보내지 않습니다.
|
||||
continue;
|
||||
}
|
||||
$this->Data[$i] = '06'.str_pad(strlen($packet), 4, "0", STR_PAD_LEFT).$packet;
|
||||
} else {
|
||||
$strDest[$i] = FillSpace($strDest[$i],11);
|
||||
if ($sendType && $sendType == 1) {
|
||||
$this->Data[$i] = '01144 '.$this->icode_id.$this->icode_pw.$strDest[$i].$strCallBack.$strSubject.$strDate.$strData;
|
||||
} else if (!$strURL) {
|
||||
$this->Data[$i] = '01144 '.$this->icode_id.$this->icode_pw.$strDest[$i].$strCallBack.$strCaller.$strDate.$strData;
|
||||
} else {
|
||||
$strData = FillSpace(CheckCallCenter($strURL, $strDest[$i], $strData),80);
|
||||
$this->Data[$i] = '05173 '.$this->icode_id.$this->icode_pw.$strDest[$i].$strCallBack.$strURL.$strDate.$strData;
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
function Send() {
|
||||
$fsocket = fsockopen($this->socket_host,$this->socket_port, $errno, $errstr, 2);
|
||||
if (!$fsocket) return false;
|
||||
set_time_limit(60);
|
||||
global $config;
|
||||
|
||||
foreach($this->Data as $puts) {
|
||||
fputs($fsocket, $puts);
|
||||
while(!$gets) { $gets = fgets($fsocket,30); }
|
||||
$dest = substr($puts,26,11);
|
||||
if (substr($gets,0,19) == "0223 00".$dest) {
|
||||
$this->Result[] = $dest.":".substr($gets,19,10);
|
||||
} else {
|
||||
$this->Result[$dest] = $dest.":Error(".substr($gets,6,2).")";
|
||||
}
|
||||
$gets = "";
|
||||
}
|
||||
// 토큰키를 사용한다면
|
||||
if( isset($config['cf_icode_token_key']) && $config['cf_icode_token_key'] === $this->icode_key ){
|
||||
$fsocket = @fsockopen($this->socket_host,$this->socket_port, $errno, $errstr, 2);
|
||||
if (!$fsocket) return false;
|
||||
set_time_limit(300);
|
||||
|
||||
fclose($fsocket);
|
||||
$this->Data = "";
|
||||
foreach($this->Data as $puts) {
|
||||
fputs($fsocket, $puts);
|
||||
while(!$gets) { $gets = fgets($fsocket,32); }
|
||||
$json = json_decode(substr($puts,6), true);
|
||||
|
||||
$dest = $json["tel"];
|
||||
if (substr($gets,0,20) == "0225 00".FillSpace($dest,12)) {
|
||||
$this->Result[] = $dest.":".substr($gets,20,11);
|
||||
|
||||
} else {
|
||||
$this->Result[$dest] = $dest.":Error(".substr($gets,6,2).")";
|
||||
if(substr($gets,6,2) >= "80") break;
|
||||
}
|
||||
$gets = "";
|
||||
}
|
||||
|
||||
fclose($fsocket);
|
||||
} else {
|
||||
$fsocket = @fsockopen($this->socket_host,$this->socket_port, $errno, $errstr, 2);
|
||||
if (!$fsocket) return false;
|
||||
set_time_limit(300);
|
||||
|
||||
foreach($this->Data as $puts) {
|
||||
fputs($fsocket, $puts);
|
||||
while(!$gets) { $gets = fgets($fsocket,30); }
|
||||
$dest = substr($puts,26,11);
|
||||
if (substr($gets,0,19) == "0223 00".$dest) {
|
||||
$this->Result[] = $dest.":".substr($gets,19,10);
|
||||
} else {
|
||||
$this->Result[$dest] = $dest.":Error(".substr($gets,6,2).")";
|
||||
}
|
||||
$gets = "";
|
||||
}
|
||||
|
||||
fclose($fsocket);
|
||||
}
|
||||
|
||||
$this->Data = array();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
@ -168,6 +263,24 @@ function CutChar($word, $cut) {
|
||||
return $word;
|
||||
}
|
||||
|
||||
function CutCharUtf8($word, $cut) {
|
||||
preg_match_all('/[\xE0-\xFF][\x80-\xFF]{2}|./', $word, $match); // target for BMP
|
||||
|
||||
$m = $match[0];
|
||||
$slen = strlen($word); // length of source string
|
||||
if ($slen <= $cut) return $word;
|
||||
|
||||
$ret = array();
|
||||
$count = 0;
|
||||
for ($i=0; $i < $cut; $i++) {
|
||||
$count += (strlen($m[$i]) > 1)?2:1;
|
||||
if ($count > $cut) break;
|
||||
$ret[] = $m[$i];
|
||||
}
|
||||
|
||||
return join('', $ret);
|
||||
}
|
||||
|
||||
/**
|
||||
* 수신번호의 값이 정확한 값인지 확인합니다.
|
||||
*
|
||||
@ -183,7 +296,6 @@ function CheckCommonTypeDest($strDest, $nCount) {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 회신번호 유효성 여부조회 *
|
||||
* @param string callback 회신번호
|
||||
|
||||
@ -44,8 +44,20 @@ class SMS {
|
||||
var $SMS_Port;
|
||||
var $Data = array();
|
||||
var $Result = array();
|
||||
var $icode_key;
|
||||
var $socket_port;
|
||||
var $socket_host;
|
||||
|
||||
function SMS_con($sms_server,$sms_id,$sms_pw,$port) {
|
||||
global $config;
|
||||
|
||||
// 토큰키를 사용한다면
|
||||
if(isset($config['cf_icode_token_key']) && $config['cf_icode_token_key']){
|
||||
$this->icode_key = $config['cf_icode_token_key'];
|
||||
$this->socket_host = ICODE_JSON_SOCKET_HOST;
|
||||
$this->socket_port = ICODE_JSON_SOCKET_PORT;
|
||||
}
|
||||
|
||||
$this->ID=$sms_id; // 계약 후 지정
|
||||
$this->PWD=$sms_pw; // 계약 후 지정
|
||||
$this->SMS_Server=$sms_server;
|
||||
@ -60,25 +72,82 @@ class SMS {
|
||||
}
|
||||
|
||||
function Add($dest, $callBack, $Caller, $msg, $rsvTime="") {
|
||||
global $g5;
|
||||
global $g5, $config;
|
||||
|
||||
// 내용 검사 1
|
||||
$Error = CheckCommonType($dest, $rsvTime);
|
||||
if ($Error) return $Error;
|
||||
// 내용 검사 2
|
||||
//if ( eregi("[^0-9]",$callBack) ) return "회신 전화번호가 잘못되었습니다";
|
||||
if ( preg_match("/[^0-9]/i",$callBack) ) return "회신 전화번호가 잘못되었습니다";
|
||||
// 토큰키를 사용한다면
|
||||
if( isset($config['cf_icode_token_key']) && $config['cf_icode_token_key'] === $this->icode_key ){
|
||||
|
||||
$msg=cut_char($msg,80); // 80자 제한
|
||||
// 보낼 내용을 배열에 집어넣기
|
||||
$dest = spacing($dest,11);
|
||||
$callBack = spacing($callBack,11);
|
||||
$Caller = spacing($Caller,10);
|
||||
$rsvTime = spacing($rsvTime,12);
|
||||
$msg = spacing($msg,80);
|
||||
// 내용 검사 1
|
||||
$Error = CheckCommonType($dest, $rsvTime);
|
||||
if ($Error) return $Error;
|
||||
if ( preg_match("/[^0-9]/i",$callBack) ) return "회신 전화번호가 잘못되었습니다";
|
||||
|
||||
$this->Data[] = '01144 '.$this->ID.$this->PWD.$dest.$callBack.$Caller.$rsvTime.$msg;
|
||||
return "";
|
||||
// 개행치환
|
||||
$msg = preg_replace("/\r\n/", "\n", $msg);
|
||||
$msg = preg_replace("/\r/", "\n", $msg);
|
||||
// 90byte 이내는 SMS, 90 ~ 2000 byte 는 LMS 그 이상은 절삭 되어 LMS로 발송
|
||||
// SMS 이기 때문에 90byte 이내로 합니다.
|
||||
$msg=cut_char($msg, 90);
|
||||
$msg = spacing($msg, 90);
|
||||
|
||||
// 한글 깨진것이 있는지 체크합니다.
|
||||
if( preg_match('/^([\x00-\x7e]|.{2})*/', $msg, $z) ){
|
||||
$msg = $z[0];
|
||||
}
|
||||
|
||||
// 문자 내용이 euc-kr 인지 체크합니다.
|
||||
$enc = mb_detect_encoding($msg, array('EUC-KR', 'UTF-8'));
|
||||
|
||||
// 문자 내용이 euc-kr 이면 json_encode 에서 깨지기 때문에 utf-8 로 변환합니다.
|
||||
if($enc === 'EUC-KR'){
|
||||
$msg = iconv_utf8($msg);
|
||||
}
|
||||
|
||||
// 보낼 내용을 배열에 집어넣기
|
||||
$dest = spacing($dest,11);
|
||||
$callBack = spacing($callBack,11);
|
||||
$Caller = spacing($Caller,10);
|
||||
$rsvTime = $rsvTime ? spacing($rsvTime,12) : '';
|
||||
|
||||
$list = array(
|
||||
"key" => $this->icode_key,
|
||||
"tel" => $dest,
|
||||
"cb" => $callBack,
|
||||
"msg" => $msg,
|
||||
"title" => "", //SMS 의 경우 타이틀을 지정할수 없습니다.
|
||||
"date" => $rsvTime
|
||||
);
|
||||
|
||||
$packet = json_encode($list);
|
||||
|
||||
if( !$packet ){ // json_encode가 잘못되었으면 보내지 않습니다.
|
||||
return "json_encode error";
|
||||
}
|
||||
$this->Data[] = '06'.str_pad(strlen($packet), 4, "0", STR_PAD_LEFT).$packet;
|
||||
|
||||
return '';
|
||||
|
||||
} else {
|
||||
// 기존 OLD SMS
|
||||
|
||||
// 내용 검사 1
|
||||
$Error = CheckCommonType($dest, $rsvTime);
|
||||
if ($Error) return $Error;
|
||||
// 내용 검사 2
|
||||
//if ( eregi("[^0-9]",$callBack) ) return "회신 전화번호가 잘못되었습니다";
|
||||
if ( preg_match("/[^0-9]/i",$callBack) ) return "회신 전화번호가 잘못되었습니다";
|
||||
|
||||
$msg=cut_char($msg,80); // 80자 제한
|
||||
// 보낼 내용을 배열에 집어넣기
|
||||
$dest = spacing($dest,11);
|
||||
$callBack = spacing($callBack,11);
|
||||
$Caller = spacing($Caller,10);
|
||||
$rsvTime = spacing($rsvTime,12);
|
||||
$msg = spacing($msg,80);
|
||||
|
||||
$this->Data[] = '01144 '.$this->ID.$this->PWD.$dest.$callBack.$Caller.$rsvTime.$msg;
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
function AddURL($dest, $callBack, $URL, $msg, $rsvTime="") {
|
||||
@ -121,26 +190,53 @@ class SMS {
|
||||
return "";
|
||||
}
|
||||
|
||||
function Send () {
|
||||
$fp=@fsockopen(trim($this->SMS_Server),trim($this->SMS_Port), $errno, $errstr, 2);
|
||||
if (!$fp) return false;
|
||||
set_time_limit(60);
|
||||
function Send() {
|
||||
global $config;
|
||||
|
||||
## php4.3.10일경우
|
||||
## zend 최신버전으로 업해주세요..
|
||||
## 또는 122번째 줄을 $this->Data as $tmp => $puts 로 변경해 주세요.
|
||||
// 토큰키를 사용한다면
|
||||
if( isset($config['cf_icode_token_key']) && $config['cf_icode_token_key'] === $this->icode_key ){
|
||||
$fsocket = @fsockopen(trim($this->socket_host),trim($this->socket_port), $errno, $errstr, 2);
|
||||
if (!$fsocket) return false;
|
||||
set_time_limit(300);
|
||||
|
||||
foreach($this->Data as $puts) {
|
||||
$dest = substr($puts,26,11);
|
||||
fputs($fp,$puts);
|
||||
while(!$gets) { $gets=fgets($fp,30); }
|
||||
if (substr($gets,0,19)=="0223 00".$dest) $this->Result[]=$dest.":".substr($gets,19,10);
|
||||
else $this->Result[$dest]=$dest.":Error";
|
||||
$gets="";
|
||||
}
|
||||
fclose($fp);
|
||||
$this->Data="";
|
||||
return true;
|
||||
foreach($this->Data as $puts) {
|
||||
fputs($fsocket, $puts);
|
||||
while(!$gets) { $gets = fgets($fsocket,32); }
|
||||
$json = json_decode(substr($puts,6), true);
|
||||
|
||||
$dest = $json["tel"];
|
||||
if (substr($gets,0,20) == "0225 00".spacing($dest,12)) {
|
||||
$this->Result[] = $dest.":".substr($gets,20,11);
|
||||
|
||||
} else {
|
||||
$this->Result[$dest] = $dest.":Error(".substr($gets,6,2).")";
|
||||
if(substr($gets,6,2) >= "80") break;
|
||||
}
|
||||
$gets = "";
|
||||
}
|
||||
fclose($fsocket);
|
||||
|
||||
} else {
|
||||
|
||||
$fp=@fsockopen(trim($this->SMS_Server),trim($this->SMS_Port));
|
||||
if (!$fp) return false;
|
||||
set_time_limit(300);
|
||||
|
||||
## php4.3.10일경우
|
||||
## zend 최신버전으로 업해주세요..
|
||||
## 또는 122번째 줄을 $this->Data as $tmp => $puts 로 변경해 주세요.
|
||||
|
||||
foreach($this->Data as $puts) {
|
||||
$dest = substr($puts,26,11);
|
||||
fputs($fp,$puts);
|
||||
while(!$gets) { $gets=fgets($fp,30); }
|
||||
if (substr($gets,0,19)=="0223 00".$dest) $this->Result[]=$dest.":".substr($gets,19,10);
|
||||
else $this->Result[$dest]=$dest.":Error";
|
||||
$gets="";
|
||||
}
|
||||
fclose($fp);
|
||||
}
|
||||
$this->Data=array();
|
||||
}
|
||||
}
|
||||
?>
|
||||
@ -85,6 +85,7 @@
|
||||
.more_opt {display:none;position:absolute;top:50px;right:7px;background:#fff;border:1px solid #b8bfc4;z-index:999}
|
||||
.more_opt:before {content:"";position:absolute;top:-8px;right:6px;width:0;height:0;border-style:solid;border-width:0 6px 8px 6px;border-color:transparent transparent #b8bfc4 transparent}
|
||||
.more_opt:after {content:"";position:absolute;top:-6px;right:6px;width:0;height:0;border-style:solid;border-width:0 6px 8px 6px;border-color:transparent transparent #fff transparent}
|
||||
.more_opt.is_list_btn{width:90px}
|
||||
.more_opt li {display:block;border-bottom:1px solid #f1f1f1;padding:10px;margin:0;color:#6b757c;text-align:left}
|
||||
.more_opt li:last-child {border-bottom:0}
|
||||
.more_opt li button, .more_opt li a {width:100%;border:0;background:#fff;color:#6b757c}
|
||||
|
||||
@ -143,7 +143,7 @@ jQuery(function($){
|
||||
if (isset($view['file'][$i]['source']) && $view['file'][$i]['source'] && !$view['file'][$i]['view']) {
|
||||
?>
|
||||
<li>
|
||||
<a href="<?php echo $view['file'][$i]['href']; ?>" class="view_file_download">
|
||||
<a href="<?php echo $view['file'][$i]['href']; ?>" class="view_file_download" download>
|
||||
<i class="fa fa-download" aria-hidden="true"></i>
|
||||
<strong><?php echo $view['file'][$i]['source'] ?></strong>
|
||||
<?php echo $view['file'][$i]['content'] ?> (<?php echo $view['file'][$i]['size'] ?>)
|
||||
|
||||
@ -22,6 +22,7 @@ var char_max = parseInt(<?php echo $comment_max ?>); // 최대
|
||||
$str = preg_replace("/\[\<a\s.*href\=\"(http|https|ftp|mms)\:\/\/([^[:space:]]+)\.(mp3|wma|wmv|asf|asx|mpg|mpeg)\".*\<\/a\>\]/i", "<script>doc_write(obj_movie('$1://$2.$3'));</script>", $str);
|
||||
$c_reply_href = $comment_common_url.'&c_id='.$comment_id.'&w=c#bo_vc_w';
|
||||
$c_edit_href = $comment_common_url.'&c_id='.$comment_id.'&w=cu#bo_vc_w';
|
||||
$is_comment_reply_edit = ($list[$i]['is_reply'] || $list[$i]['is_edit'] || $list[$i]['is_del']) ? 1 : 0;
|
||||
?>
|
||||
<article id="c_<?php echo $comment_id ?>" <?php if ($cmt_depth) { ?>style="margin-left:<?php echo $cmt_depth ?>px;border-bottom-color:#f8f8f8"<?php } ?>>
|
||||
<div class="comment_inner">
|
||||
@ -37,6 +38,7 @@ var char_max = parseInt(<?php echo $comment_max ?>); // 최대
|
||||
<?php
|
||||
include(G5_SNS_PATH."/view_comment_list.sns.skin.php");
|
||||
?>
|
||||
<?php if( $is_comment_reply_edit ){ ?>
|
||||
<div class="bo_vl_opt">
|
||||
<button type="button" class="btn_cm_opt btn_b03 btn"><i class="fa fa-ellipsis-v" aria-hidden="true"></i><span class="sound_only">댓글 옵션</span></button>
|
||||
<ul class="bo_vc_act">
|
||||
@ -45,6 +47,7 @@ var char_max = parseInt(<?php echo $comment_max ?>); // 최대
|
||||
<?php if ($list[$i]['is_del']) { ?><li><a href="<?php echo $list[$i]['del_link']; ?>" onclick="return comment_delete();">삭제</a></li><?php } ?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<script>
|
||||
$(function() {
|
||||
// 댓글 옵션창 열기
|
||||
|
||||
@ -74,6 +74,7 @@
|
||||
.more_opt {display:none;position:absolute;top:50px;right:7px;background:#fff;border:1px solid #b8bfc4;z-index:999}
|
||||
.more_opt:before {content:"";position:absolute;top:-8px;right:6px;width:0;height:0;border-style:solid;border-width:0 6px 8px 6px;border-color:transparent transparent #b8bfc4 transparent}
|
||||
.more_opt:after {content:"";position:absolute;top:-6px;right:6px;width:0;height:0;border-style:solid;border-width:0 6px 8px 6px;border-color:transparent transparent #fff transparent}
|
||||
.more_opt.is_list_btn{width:90px}
|
||||
.more_opt li {display:block;border-bottom:1px solid #f1f1f1;padding:10px;margin:0;color:#6b757c;text-align:left}
|
||||
.more_opt li:last-child {border-bottom:0}
|
||||
.more_opt li button, .more_opt li a {width:100%;border:0;background:#fff;color:#6b757c}
|
||||
|
||||
@ -145,7 +145,7 @@ jQuery(function($){
|
||||
if (isset($view['file'][$i]['source']) && $view['file'][$i]['source'] && !$view['file'][$i]['view']) {
|
||||
?>
|
||||
<li>
|
||||
<a href="<?php echo $view['file'][$i]['href']; ?>" class="view_file_download">
|
||||
<a href="<?php echo $view['file'][$i]['href']; ?>" class="view_file_download" download>
|
||||
<i class="fa fa-download" aria-hidden="true"></i>
|
||||
<strong><?php echo $view['file'][$i]['source'] ?></strong>
|
||||
<?php echo $view['file'][$i]['content'] ?> (<?php echo $view['file'][$i]['size'] ?>)
|
||||
|
||||
@ -22,6 +22,7 @@ var char_max = parseInt(<?php echo $comment_max ?>); // 최대
|
||||
$str = preg_replace("/\[\<a\s.*href\=\"(http|https|ftp|mms)\:\/\/([^[:space:]]+)\.(mp3|wma|wmv|asf|asx|mpg|mpeg)\".*\<\/a\>\]/i", "<script>doc_write(obj_movie('$1://$2.$3'));</script>", $str);
|
||||
$c_reply_href = $comment_common_url.'&c_id='.$comment_id.'&w=c#bo_vc_w';
|
||||
$c_edit_href = $comment_common_url.'&c_id='.$comment_id.'&w=cu#bo_vc_w';
|
||||
$is_comment_reply_edit = ($list[$i]['is_reply'] || $list[$i]['is_edit'] || $list[$i]['is_del']) ? 1 : 0;
|
||||
?>
|
||||
<article id="c_<?php echo $comment_id ?>" <?php if ($cmt_depth) { ?>style="margin-left:<?php echo $cmt_depth ?>px;border-bottom-color:#f8f8f8"<?php } ?>>
|
||||
<div class="comment_inner">
|
||||
@ -37,6 +38,7 @@ var char_max = parseInt(<?php echo $comment_max ?>); // 최대
|
||||
<?php
|
||||
include(G5_SNS_PATH."/view_comment_list.sns.skin.php");
|
||||
?>
|
||||
<?php if( $is_comment_reply_edit ){ ?>
|
||||
<div class="bo_vl_opt">
|
||||
<button type="button" class="btn_cm_opt btn_b03 btn"><i class="fa fa-ellipsis-v" aria-hidden="true"></i><span class="sound_only">댓글 옵션</span></button>
|
||||
<ul class="bo_vc_act">
|
||||
@ -45,6 +47,7 @@ var char_max = parseInt(<?php echo $comment_max ?>); // 최대
|
||||
<?php if ($list[$i]['is_del']) { ?><li><a href="<?php echo $list[$i]['del_link']; ?>" onclick="return comment_delete();">삭제</a></li><?php } ?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<script>
|
||||
$(function() {
|
||||
// 댓글 옵션창 열기
|
||||
|
||||
@ -99,7 +99,7 @@ $(".btn_more_opt").on("click", function() {
|
||||
for ($i=0; $i<$view['download_count']; $i++) {
|
||||
?>
|
||||
<li>
|
||||
<a href="<?php echo $view['download_href'][$i]; ?>" class="view_file_download">
|
||||
<a href="<?php echo $view['download_href'][$i]; ?>" class="view_file_download" download>
|
||||
<img src="<?php echo $qa_skin_url ?>/img/icon_file.gif" alt="첨부">
|
||||
<strong><?php echo $view['download_source'][$i] ?></strong>
|
||||
</a>
|
||||
|
||||
@ -155,96 +155,15 @@ if($config['cf_sms_type'] == 'LMS') {
|
||||
var $Result = array();
|
||||
var $Log = array();
|
||||
|
||||
// SMS 서버 접속
|
||||
function SMS_con($host, $id, $pw, $portcode) {
|
||||
$this->socket_host = $host;
|
||||
$this->socket_portcode = $portcode;
|
||||
$this->icode_id = FillSpace($id, 10);
|
||||
$this->icode_pw = FillSpace($pw, 10);
|
||||
}
|
||||
|
||||
function Init() {
|
||||
$this->Data = array(); // 발송하기 위한 패킷내용이 배열로 들어간다.
|
||||
$this->Result = array(); // 발송결과값이 배열로 들어간다.
|
||||
}
|
||||
|
||||
function Add($strDest, $strCallBack, $strCaller, $strSubject, $strURL, $strData, $strDate="", $nCount) {
|
||||
// EUC-KR로 변환
|
||||
$strCaller = iconv_euckr($strCaller);
|
||||
$strSubject = iconv_euckr($strSubject);
|
||||
$strData = iconv_euckr($strData);
|
||||
|
||||
// 문자 타입별 Port 설정.
|
||||
$sendType = strlen($strData) > 90 ? 1 : 0; // 0: SMS / 1: LMS
|
||||
|
||||
/* 개발 완료 후 아래 포트를 rand 함수를 이용하는 라인으로 변경 바랍니다.*/
|
||||
|
||||
// 충전식
|
||||
if ($this->socket_portcode == 1) {
|
||||
if($sendType && $sendType == 1) {
|
||||
//$this->socket_port = 8200; // LMS
|
||||
$this->socket_port=(int)rand(8200,8201); // LMS
|
||||
} else {
|
||||
//$this->socket_port = 6295; // SMS
|
||||
$this->socket_port=(int)rand(6295,6297); // SMS
|
||||
}
|
||||
}
|
||||
// 정액제
|
||||
else {
|
||||
if($sendType && $sendType == 1) {
|
||||
//$this->socket_port = 8300; // LMS
|
||||
$this->socket_port=(int)rand(8300,8301); // LMS
|
||||
} else {
|
||||
//$this->socket_port = 6291; // SMS
|
||||
$this->socket_port=(int)rand(6291,6293); // SMS
|
||||
}
|
||||
}
|
||||
|
||||
$strCallBack = FillSpace($strCallBack, 11); // 회신번호
|
||||
$strDate = FillSpace($strDate, 12); // 즉시(12byte 공백), 예약전송(YmdHi)
|
||||
|
||||
if ($sendType && $sendType == 1) {
|
||||
|
||||
/** LMS 제목 **/
|
||||
/*
|
||||
제목필드의 값이 없을 경우 단말기 기종및 설정에 따라 표기 방법이 다름
|
||||
1.설정에서 제목필드보기 설정 Disable -> 제목필드값을 넣어도 미표기
|
||||
2.설정에서 제목필드보기 설정 Enable -> 제목을 넣지 않을 경우 제목없음으로 자동표시
|
||||
|
||||
제목의 첫글자에 "<",">", 개행문자가 있을경우 단말기종류 및 통신사에 따라 메세지 전송실패 -> 글자를 체크하거나 취환처리요망
|
||||
*/
|
||||
$strSubject = str_replace("\r\n", " ", $strSubject);
|
||||
$strSubject = str_replace("<", "[", $strSubject);
|
||||
$strSubject = str_replace(">", "]", $strSubject);
|
||||
|
||||
$strSubject = FillSpace($strSubject,30);
|
||||
$strData = FillSpace(CutChar($strData,1500),1500);
|
||||
} else if (!$strURL) {
|
||||
$strData = FillSpace(CutChar($strData,90),90);
|
||||
$strCaller = FillSpace($strCaller,10);
|
||||
} else {
|
||||
$strURL = FillSpace($strURL,50);
|
||||
}
|
||||
|
||||
$Error = CheckCommonTypeDest($strDest, $nCount);
|
||||
$Error = is_vaild_callback($strCallBack);
|
||||
$Error = CheckCommonTypeDate($strDate);
|
||||
|
||||
for ($i=0; $i<$nCount; $i++) {
|
||||
$strDest[$i] = FillSpace($strDest[$i],11);
|
||||
if ($sendType && $sendType == 1) {
|
||||
$this->Data[$i] = '01144 '.$this->icode_id.$this->icode_pw.$strDest[$i].$strCallBack.$strSubject.$strDate.$strData;
|
||||
} else if (!$strURL) {
|
||||
$this->Data[$i] = '01144 '.$this->icode_id.$this->icode_pw.$strDest[$i].$strCallBack.$strCaller.$strDate.$strData;
|
||||
} else {
|
||||
$strData = FillSpace(CheckCallCenter($strURL, $strDest[$i], $strData),80);
|
||||
$this->Data[$i] = '05173 '.$this->icode_id.$this->icode_pw.$strDest[$i].$strCallBack.$strURL.$strDate.$strData;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
return parent::Add($strDest, $strCallBack, $strCaller, $strSubject, $strURL, $strData, $strDate, $nCount);
|
||||
}
|
||||
|
||||
|
||||
function Send() {
|
||||
global $g5;
|
||||
|
||||
@ -265,27 +184,7 @@ if($config['cf_sms_type'] == 'LMS') {
|
||||
exit;
|
||||
}
|
||||
|
||||
$fsocket = fsockopen($this->socket_host,$this->socket_port, $errno, $errstr, 2);
|
||||
if (!$fsocket) return false;
|
||||
set_time_limit(60);
|
||||
|
||||
foreach($this->Data as $puts) {
|
||||
fputs($fsocket, $puts);
|
||||
while(!$gets) { $gets = fgets($fsocket,30); }
|
||||
$dest = substr($puts,26,11);
|
||||
if (substr($gets,0,19) == "0223 00".$dest) {
|
||||
$this->Result[] = $dest.":".substr($gets,19,10);
|
||||
$this->Log[] = $puts;
|
||||
} else {
|
||||
$this->Result[$dest] = $dest.":Error(".substr($gets,6,2).")";
|
||||
$this->Log[] = $puts;
|
||||
}
|
||||
$gets = "";
|
||||
}
|
||||
|
||||
fclose($fsocket);
|
||||
$this->Data = array();
|
||||
return true;
|
||||
return parent::Send();
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@ -294,15 +193,6 @@ if($config['cf_sms_type'] == 'LMS') {
|
||||
class SMS5 extends SMS {
|
||||
var $Log = array();
|
||||
|
||||
function SMS_con($sms_server,$sms_id,$sms_pw,$port) {
|
||||
$this->ID=$sms_id; // 계약 후 지정
|
||||
$this->PWD=$sms_pw; // 계약 후 지정
|
||||
$this->SMS_Server=$sms_server;
|
||||
$this->SMS_Port=$port;
|
||||
$this->ID = spacing($this->ID,10);
|
||||
$this->PWD = spacing($this->PWD,10);
|
||||
}
|
||||
|
||||
/**
|
||||
* 발송번호의 값이 정확한 값인지 확인합니다.
|
||||
*
|
||||
@ -380,7 +270,7 @@ if($config['cf_sms_type'] == 'LMS') {
|
||||
}
|
||||
}
|
||||
function Add2($strDest, $strCallBack, $strCaller, $strURL, $strMessage, $strDate="", $nCount) {
|
||||
global $g5;
|
||||
global $g5, $config;
|
||||
|
||||
$Error = $this->CheckCommonTypeDest($strDest, $nCount);
|
||||
$Error = $this->CheckCommonTypeCallBack($strCallBack);
|
||||
@ -390,32 +280,91 @@ if($config['cf_sms_type'] == 'LMS') {
|
||||
$strCaller = spacing($strCaller,10);
|
||||
$strDate = spacing($strDate,12);
|
||||
|
||||
// 토큰키를 사용한다면
|
||||
if( isset($config['cf_icode_token_key']) && $config['cf_icode_token_key'] === $this->icode_key ){
|
||||
|
||||
for ($i=0; $i<$nCount; $i++) {
|
||||
$hp_number = spacing($strDest[$i]['bk_hp'],11);
|
||||
$strData = $strMessage;
|
||||
if( !empty($strDest[$i]['bk_name']) ){
|
||||
$strData = str_replace("{이름}", $strDest[$i]['bk_name'], $strData);
|
||||
for ($i=0; $i<$nCount; $i++) {
|
||||
$hp_number = spacing($strDest[$i]['bk_hp'],11);
|
||||
$strData = $strMessage;
|
||||
if( !empty($strDest[$i]['bk_name']) ){
|
||||
$strData = str_replace("{이름}", $strDest[$i]['bk_name'], $strData);
|
||||
}
|
||||
|
||||
$msg = $strData;
|
||||
|
||||
// 개행치환
|
||||
$msg = preg_replace("/\r\n/", "\n", $msg);
|
||||
$msg = preg_replace("/\r/", "\n", $msg);
|
||||
// 90byte 이내는 SMS, 90 ~ 2000 byte 는 LMS 그 이상은 절삭 되어 LMS로 발송
|
||||
// SMS 이기 때문에 90byte 이내로 합니다.
|
||||
$msg=cut_char($msg, 90);
|
||||
$msg = spacing($msg, 90);
|
||||
|
||||
// 한글 깨진것이 있는지 체크합니다.
|
||||
if( preg_match('/^([\x00-\x7e]|.{2})*/', $msg, $z) ){
|
||||
$msg = $z[0];
|
||||
}
|
||||
|
||||
// 문자 내용이 euc-kr 인지 체크합니다.
|
||||
$enc = mb_detect_encoding($msg, array('EUC-KR', 'UTF-8'));
|
||||
|
||||
// 문자 내용이 euc-kr 이면 json_encode 에서 깨지기 때문에 utf-8 로 변환합니다.
|
||||
if($enc === 'EUC-KR'){
|
||||
$msg = iconv_utf8($msg);
|
||||
}
|
||||
|
||||
// 보낼 내용을 배열에 집어넣기
|
||||
$dest = $hp_number;
|
||||
$callBack = $strCallBack;
|
||||
$Caller = $strCaller;
|
||||
$rsvTime = $strDate ? $strDate : '';
|
||||
|
||||
$list = array(
|
||||
"key" => $this->icode_key,
|
||||
"tel" => $dest,
|
||||
"cb" => $callBack,
|
||||
"msg" => $msg,
|
||||
"title" => "", //SMS 의 경우 타이틀을 지정할수 없습니다.
|
||||
"date" => $rsvTime
|
||||
);
|
||||
|
||||
$packet = json_encode($list);
|
||||
|
||||
if( !$packet ){ // json_encode가 잘못되었으면 보내지 않습니다.
|
||||
return "json_encode error";
|
||||
}
|
||||
$this->Data[$i] = '06'.str_pad(strlen($packet), 4, "0", STR_PAD_LEFT).$packet;
|
||||
}
|
||||
// 아이코드에서는 문자에 utf-8 인코딩 형식을 아직 지원하지 않는다.
|
||||
$strData = iconv('utf-8', "euc-kr", stripslashes($strData));
|
||||
|
||||
if (!$strURL) {
|
||||
$strData = spacing(cut_char($strData,80),80);
|
||||
} else {
|
||||
|
||||
$this->Data[$i] = '01144 '.$this->ID.$this->PWD.$hp_number.$strCallBack.$strCaller.$strDate.$strData;
|
||||
} else {
|
||||
$strURL = spacing($strURL,50);
|
||||
$strData = spacing($this->CheckCallCenter($strURL, $hp_number, $strData),80);
|
||||
for ($i=0; $i<$nCount; $i++) {
|
||||
$hp_number = spacing($strDest[$i]['bk_hp'],11);
|
||||
$strData = $strMessage;
|
||||
if( !empty($strDest[$i]['bk_name']) ){
|
||||
$strData = str_replace("{이름}", $strDest[$i]['bk_name'], $strData);
|
||||
}
|
||||
// 아이코드에서는 문자에 utf-8 인코딩 형식을 아직 지원하지 않는다.
|
||||
$strData = iconv('utf-8', "euc-kr", stripslashes($strData));
|
||||
|
||||
$this->Data[$i] = '05173 '.$this->ID.$this->PWD.$hp_number.$strCallBack.$strURL.$strDate.$strData;
|
||||
if (!$strURL) {
|
||||
$strData = spacing(cut_char($strData,80),80);
|
||||
|
||||
$this->Data[$i] = '01144 '.$this->ID.$this->PWD.$hp_number.$strCallBack.$strCaller.$strDate.$strData;
|
||||
} else {
|
||||
$strURL = spacing($strURL,50);
|
||||
$strData = spacing($this->CheckCallCenter($strURL, $hp_number, $strData),80);
|
||||
|
||||
$this->Data[$i] = '05173 '.$this->ID.$this->PWD.$hp_number.$strCallBack.$strURL.$strDate.$strData;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return true; // 수정대기
|
||||
}
|
||||
|
||||
function Send() {
|
||||
global $g5;
|
||||
global $g5, $config;
|
||||
|
||||
$count = 1;
|
||||
|
||||
@ -436,33 +385,61 @@ if($config['cf_sms_type'] == 'LMS') {
|
||||
exit;
|
||||
}
|
||||
|
||||
$fsocket=fsockopen($this->SMS_Server,$this->SMS_Port, $errno, $errstr, 2);
|
||||
if (!$fsocket) return false;
|
||||
set_time_limit(60);
|
||||
// 토큰키를 사용한다면
|
||||
if( isset($config['cf_icode_token_key']) && $config['cf_icode_token_key'] === $this->icode_key ){
|
||||
$fsocket = fsockopen(trim($this->socket_host),trim($this->socket_port), $errno, $errstr, 2);
|
||||
if (!$fsocket) return false;
|
||||
set_time_limit(300);
|
||||
|
||||
## php4.3.10일경우
|
||||
## zend 최신버전으로 업해주세요..
|
||||
## 또는 69번째 줄을 $this->Data as $tmp => $puts 로 변경해 주세요.
|
||||
foreach($this->Data as $puts) {
|
||||
fputs($fsocket, $puts);
|
||||
while(!$gets) { $gets = fgets($fsocket,32); }
|
||||
$json = json_decode(substr($puts,6), true);
|
||||
|
||||
foreach($this->Data as $puts) {
|
||||
$dest = substr($puts,26,11);
|
||||
fputs($fsocket, $puts);
|
||||
while(!$gets) {
|
||||
$gets = fgets($fsocket,30);
|
||||
$dest = $json["tel"];
|
||||
if (substr($gets,0,20) == "0225 00".spacing($dest,12)) {
|
||||
$this->Result[] = $dest.":".substr($gets,20,11);
|
||||
|
||||
} else {
|
||||
$this->Result[$dest] = $dest.":Error(".substr($gets,6,2).")";
|
||||
if(substr($gets,6,2) >= "80") break;
|
||||
}
|
||||
$gets = "";
|
||||
|
||||
// 1천건씩 전송 후 5초 쉼
|
||||
if ($count++%1000 == 0) sleep(5);
|
||||
}
|
||||
if (substr($gets,0,19) == "0223 00".$dest) {
|
||||
$this->Result[] = $dest.":".substr($gets,19,10);
|
||||
$this->Log[] = $puts;
|
||||
} else {
|
||||
$this->Result[$dest] = $dest.":Error(".substr($gets,6,2).")";
|
||||
$this->Log[] = $puts;
|
||||
}
|
||||
$gets = "";
|
||||
fclose($fsocket);
|
||||
|
||||
// 1천건씩 전송 후 5초 쉼
|
||||
if ($count++%1000 == 0) sleep(5);
|
||||
} else {
|
||||
$fsocket = fsockopen($this->SMS_Server,$this->SMS_Port);
|
||||
if (!$fsocket) return false;
|
||||
set_time_limit(300);
|
||||
|
||||
## php4.3.10일경우
|
||||
## zend 최신버전으로 업해주세요..
|
||||
## 또는 69번째 줄을 $this->Data as $tmp => $puts 로 변경해 주세요.
|
||||
|
||||
foreach($this->Data as $puts) {
|
||||
$dest = substr($puts,26,11);
|
||||
fputs($fsocket, $puts);
|
||||
while(!$gets) {
|
||||
$gets = fgets($fsocket,30);
|
||||
}
|
||||
if (substr($gets,0,19) == "0223 00".$dest) {
|
||||
$this->Result[] = $dest.":".substr($gets,19,10);
|
||||
$this->Log[] = $puts;
|
||||
} else {
|
||||
$this->Result[$dest] = $dest.":Error(".substr($gets,6,2).")";
|
||||
$this->Log[] = $puts;
|
||||
}
|
||||
$gets = "";
|
||||
|
||||
// 1천건씩 전송 후 5초 쉼
|
||||
if ($count++%1000 == 0) sleep(5);
|
||||
}
|
||||
fclose($fsocket);
|
||||
}
|
||||
fclose($fsocket);
|
||||
$this->Data = array();
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -45,7 +45,6 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
|
||||
<?php echo $page ?> 페이지
|
||||
</div>
|
||||
|
||||
<?php if ($rss_href || $write_href) { ?>
|
||||
<ul class="btn_bo_user">
|
||||
<?php if ($admin_href) { ?><li><a href="<?php echo $admin_href ?>" class="btn_admin btn" title="관리자"><i class="fa fa-cog fa-spin fa-fw"></i><span class="sound_only">관리자</span></a></li><?php } ?>
|
||||
<?php if ($rss_href) { ?><li><a href="<?php echo $rss_href ?>" class="btn_b01 btn" title="RSS"><i class="fa fa-rss" aria-hidden="true"></i><span class="sound_only">RSS</span></a></li><?php } ?>
|
||||
@ -66,7 +65,6 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
|
||||
</li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<!-- } 게시판 페이지 정보 및 버튼 끝 -->
|
||||
|
||||
@ -137,9 +135,9 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
|
||||
<?php
|
||||
if ($list[$i]['icon_new']) echo "<span class=\"new_icon\">N<span class=\"sound_only\">새글</span></span>";
|
||||
// if ($list[$i]['file']['count']) { echo '<'.$list[$i]['file']['count'].'>'; }
|
||||
if (isset($list[$i]['icon_hot'])) echo rtrim($list[$i]['icon_hot']);
|
||||
if (isset($list[$i]['icon_file'])) echo rtrim($list[$i]['icon_file']);
|
||||
if (isset($list[$i]['icon_link'])) echo rtrim($list[$i]['icon_link']);
|
||||
if (isset($list[$i]['icon_hot'])) echo rtrim($list[$i]['icon_hot']);
|
||||
?>
|
||||
<?php if ($list[$i]['comment_cnt']) { ?><span class="sound_only">댓글</span><span class="cnt_cmt"><?php echo $list[$i]['wr_comment']; ?></span><span class="sound_only">개</span><?php } ?>
|
||||
</div>
|
||||
|
||||
@ -101,6 +101,7 @@
|
||||
#bo_list .td_numbig {width:80px;text-align:center}
|
||||
#bo_list .txt_active {color:#5d910b}
|
||||
#bo_list .txt_expired {color:#ccc}
|
||||
#bo_list tbody tr {border-left:2px solid transparent}
|
||||
#bo_list tbody tr:hover {border-left:2px solid #253dbe}
|
||||
|
||||
#bo_cate {margin:25px 0}
|
||||
|
||||
@ -161,7 +161,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
|
||||
?>
|
||||
<li>
|
||||
<i class="fa fa-folder-open" aria-hidden="true"></i>
|
||||
<a href="<?php echo $view['file'][$i]['href']; ?>" class="view_file_download">
|
||||
<a href="<?php echo $view['file'][$i]['href']; ?>" class="view_file_download" download>
|
||||
<strong><?php echo $view['file'][$i]['source'] ?></strong> <?php echo $view['file'][$i]['content'] ?> (<?php echo $view['file'][$i]['size'] ?>)
|
||||
</a>
|
||||
<br>
|
||||
|
||||
@ -26,6 +26,7 @@ var char_max = parseInt(<?php echo $comment_max ?>); // 최대
|
||||
$cmt_sv = $cmt_amt - $i + 1; // 댓글 헤더 z-index 재설정 ie8 이하 사이드뷰 겹침 문제 해결
|
||||
$c_reply_href = $comment_common_url.'&c_id='.$comment_id.'&w=c#bo_vc_w';
|
||||
$c_edit_href = $comment_common_url.'&c_id='.$comment_id.'&w=cu#bo_vc_w';
|
||||
$is_comment_reply_edit = ($list[$i]['is_reply'] || $list[$i]['is_edit'] || $list[$i]['is_del']) ? 1 : 0;
|
||||
?>
|
||||
|
||||
<article id="c_<?php echo $comment_id ?>" <?php if ($cmt_depth) { ?>style="margin-left:<?php echo $cmt_depth ?>px;border-top-color:#e0e0e0"<?php } ?>>
|
||||
@ -53,7 +54,7 @@ var char_max = parseInt(<?php echo $comment_max ?>); // 최대
|
||||
<?php if (strstr($list[$i]['wr_option'], "secret")) { ?><img src="<?php echo $board_skin_url; ?>/img/icon_secret.gif" alt="비밀글"><?php } ?>
|
||||
<?php echo $comment ?>
|
||||
</p>
|
||||
<?php if($list[$i]['is_reply'] || $list[$i]['is_edit'] || $list[$i]['is_del']) {
|
||||
<?php if($is_comment_reply_edit) {
|
||||
if($w == 'cu') {
|
||||
$sql = " select wr_id, wr_content, mb_id from $write_table where wr_id = '$c_id' and wr_is_comment = '1' ";
|
||||
$cmt = sql_fetch($sql);
|
||||
@ -70,6 +71,7 @@ var char_max = parseInt(<?php echo $comment_max ?>); // 최대
|
||||
<input type="hidden" value="<?php echo strstr($list[$i]['wr_option'],"secret") ?>" id="secret_comment_<?php echo $comment_id ?>">
|
||||
<textarea id="save_comment_<?php echo $comment_id ?>" style="display:none"><?php echo get_text($list[$i]['content1'], 0) ?></textarea>
|
||||
</div>
|
||||
<?php if($is_comment_reply_edit) { ?>
|
||||
<div class="bo_vl_opt">
|
||||
<button type="button" class="btn_cm_opt btn_b01 btn"><i class="fa fa-ellipsis-v" aria-hidden="true"></i><span class="sound_only">댓글 옵션</span></button>
|
||||
<ul class="bo_vc_act">
|
||||
@ -78,6 +80,7 @@ var char_max = parseInt(<?php echo $comment_max ?>); // 최대
|
||||
<?php if ($list[$i]['is_del']) { ?><li><a href="<?php echo $list[$i]['del_link']; ?>" onclick="return comment_delete();">삭제</a></li><?php } ?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<script>
|
||||
$(function() {
|
||||
// 댓글 옵션창 열기
|
||||
@ -334,13 +337,16 @@ $(function() {
|
||||
);
|
||||
});
|
||||
<?php } ?>
|
||||
$(function() {
|
||||
</script>
|
||||
<?php } ?>
|
||||
<!-- } 댓글 쓰기 끝 -->
|
||||
<script>
|
||||
jQuery(function($) {
|
||||
//댓글열기
|
||||
$(".cmt_btn").click(function(){
|
||||
$(".cmt_btn").click(function(e){
|
||||
e.preventDefault();
|
||||
$(this).toggleClass("cmt_btn_op");
|
||||
$("#bo_vc").toggle();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<?php } ?>
|
||||
<!-- } 댓글 쓰기 끝 -->
|
||||
</script>
|
||||
@ -130,7 +130,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
|
||||
<?php for ($i=1; $is_link && $i<=G5_LINK_COUNT; $i++) { ?>
|
||||
<div class="bo_w_link write_div">
|
||||
<label for="wr_link<?php echo $i ?>"><i class="fa fa-link" aria-hidden="true"></i><span class="sound_only"> 링크 #<?php echo $i ?></span></label>
|
||||
<input type="text" name="wr_link<?php echo $i ?>" value="<?php if($w=="u"){echo$write['wr_link'.$i];} ?>" id="wr_link<?php echo $i ?>" class="frm_input full_input" size="50">
|
||||
<input type="text" name="wr_link<?php echo $i ?>" value="<?php if($w=="u"){ echo $write['wr_link'.$i]; } ?>" id="wr_link<?php echo $i ?>" class="frm_input full_input" size="50">
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
|
||||
@ -36,7 +36,6 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
|
||||
<?php echo $page ?> 페이지
|
||||
</div>
|
||||
|
||||
<?php if ($rss_href || $write_href) { ?>
|
||||
<ul class="btn_bo_user">
|
||||
<?php if ($admin_href) { ?><li><a href="<?php echo $admin_href ?>" class="btn_admin btn" title="관리자"><i class="fa fa-cog fa-spin fa-fw"></i><span class="sound_only">관리자</span></a></li><?php } ?>
|
||||
<?php if ($rss_href) { ?><li><a href="<?php echo $rss_href ?>" class="btn_b01 btn" title="RSS"><i class="fa fa-rss" aria-hidden="true"></i><span class="sound_only">RSS</span></a></li><?php } ?>
|
||||
@ -57,7 +56,6 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
|
||||
</li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<!-- } 게시판 페이지 정보 및 버튼 끝 -->
|
||||
|
||||
|
||||
@ -161,7 +161,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
|
||||
?>
|
||||
<li>
|
||||
<i class="fa fa-folder-open" aria-hidden="true"></i>
|
||||
<a href="<?php echo $view['file'][$i]['href']; ?>" class="view_file_download">
|
||||
<a href="<?php echo $view['file'][$i]['href']; ?>" class="view_file_download" download>
|
||||
<strong><?php echo $view['file'][$i]['source'] ?></strong> <?php echo $view['file'][$i]['content'] ?> (<?php echo $view['file'][$i]['size'] ?>)
|
||||
</a>
|
||||
<br>
|
||||
|
||||
@ -26,6 +26,7 @@ var char_max = parseInt(<?php echo $comment_max ?>); // 최대
|
||||
$cmt_sv = $cmt_amt - $i + 1; // 댓글 헤더 z-index 재설정 ie8 이하 사이드뷰 겹침 문제 해결
|
||||
$c_reply_href = $comment_common_url.'&c_id='.$comment_id.'&w=c#bo_vc_w';
|
||||
$c_edit_href = $comment_common_url.'&c_id='.$comment_id.'&w=cu#bo_vc_w';
|
||||
$is_comment_reply_edit = ($list[$i]['is_reply'] || $list[$i]['is_edit'] || $list[$i]['is_del']) ? 1 : 0;
|
||||
?>
|
||||
|
||||
<article id="c_<?php echo $comment_id ?>" <?php if ($cmt_depth) { ?>style="margin-left:<?php echo $cmt_depth ?>px;border-top-color:#e0e0e0"<?php } ?>>
|
||||
@ -53,7 +54,7 @@ var char_max = parseInt(<?php echo $comment_max ?>); // 최대
|
||||
<?php if (strstr($list[$i]['wr_option'], "secret")) { ?><img src="<?php echo $board_skin_url; ?>/img/icon_secret.gif" alt="비밀글"><?php } ?>
|
||||
<?php echo $comment ?>
|
||||
</p>
|
||||
<?php if($list[$i]['is_reply'] || $list[$i]['is_edit'] || $list[$i]['is_del']) {
|
||||
<?php if($is_comment_reply_edit) {
|
||||
if($w == 'cu') {
|
||||
$sql = " select wr_id, wr_content, mb_id from $write_table where wr_id = '$c_id' and wr_is_comment = '1' ";
|
||||
$cmt = sql_fetch($sql);
|
||||
@ -70,6 +71,7 @@ var char_max = parseInt(<?php echo $comment_max ?>); // 최대
|
||||
<input type="hidden" value="<?php echo strstr($list[$i]['wr_option'],"secret") ?>" id="secret_comment_<?php echo $comment_id ?>">
|
||||
<textarea id="save_comment_<?php echo $comment_id ?>" style="display:none"><?php echo get_text($list[$i]['content1'], 0) ?></textarea>
|
||||
</div>
|
||||
<?php if($is_comment_reply_edit) { ?>
|
||||
<div class="bo_vl_opt">
|
||||
<button type="button" class="btn_cm_opt btn_b01 btn"><i class="fa fa-ellipsis-v" aria-hidden="true"></i><span class="sound_only">댓글 옵션</span></button>
|
||||
<ul class="bo_vc_act">
|
||||
@ -78,6 +80,7 @@ var char_max = parseInt(<?php echo $comment_max ?>); // 최대
|
||||
<?php if ($list[$i]['is_del']) { ?><li><a href="<?php echo $list[$i]['del_link']; ?>" onclick="return comment_delete();">삭제</a></li><?php } ?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<script>
|
||||
$(function() {
|
||||
// 댓글 옵션창 열기
|
||||
@ -335,13 +338,16 @@ $(function() {
|
||||
);
|
||||
});
|
||||
<?php } ?>
|
||||
$(function() {
|
||||
</script>
|
||||
<?php } ?>
|
||||
<!-- } 댓글 쓰기 끝 -->
|
||||
<script>
|
||||
jQuery(function($) {
|
||||
//댓글열기
|
||||
$(".cmt_btn").click(function(){
|
||||
$(".cmt_btn").click(function(e){
|
||||
e.preventDefault();
|
||||
$(this).toggleClass("cmt_btn_op");
|
||||
$("#bo_vc").toggle();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<?php } ?>
|
||||
<!-- } 댓글 쓰기 끝 -->
|
||||
</script>
|
||||
@ -128,7 +128,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
|
||||
<?php for ($i=1; $is_link && $i<=G5_LINK_COUNT; $i++) { ?>
|
||||
<div class="bo_w_link write_div">
|
||||
<label for="wr_link<?php echo $i ?>"><i class="fa fa-link" aria-hidden="true"></i><span class="sound_only"> 링크 #<?php echo $i ?></span></label>
|
||||
<input type="text" name="wr_link<?php echo $i ?>" value="<?php if($w=="u"){echo$write['wr_link'.$i];} ?>" id="wr_link<?php echo $i ?>" class="frm_input full_input" size="50">
|
||||
<input type="text" name="wr_link<?php echo $i ?>" value="<?php if($w=="u"){ echo $write['wr_link'.$i]; } ?>" id="wr_link<?php echo $i ?>" class="frm_input full_input" size="50">
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
|
||||
@ -107,7 +107,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$qa_skin_url.'/style.css">', 0);
|
||||
?>
|
||||
<li>
|
||||
<i class="fa fa-download" aria-hidden="true"></i>
|
||||
<a href="<?php echo $view['download_href'][$i]; ?>" class="view_file_download">
|
||||
<a href="<?php echo $view['download_href'][$i]; ?>" class="view_file_download" download>
|
||||
<strong><?php echo $view['download_source'][$i] ?></strong>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
@ -85,6 +85,7 @@
|
||||
.more_opt {display:none;position:absolute;top:50px;right:7px;background:#fff;border:1px solid #b8bfc4;z-index:999}
|
||||
.more_opt:before {content:"";position:absolute;top:-8px;right:6px;width:0;height:0;border-style:solid;border-width:0 6px 8px 6px;border-color:transparent transparent #b8bfc4 transparent}
|
||||
.more_opt:after {content:"";position:absolute;top:-6px;right:6px;width:0;height:0;border-style:solid;border-width:0 6px 8px 6px;border-color:transparent transparent #fff transparent}
|
||||
.more_opt.is_list_btn{width:90px}
|
||||
.more_opt li {display:block;border-bottom:1px solid #f1f1f1;padding:10px;margin:0;color:#6b757c;text-align:left}
|
||||
.more_opt li:last-child {border-bottom:0}
|
||||
.more_opt li button, .more_opt li a {width:100%;border:0;background:#fff;color:#6b757c}
|
||||
|
||||
@ -143,7 +143,7 @@ jQuery(function($){
|
||||
if (isset($view['file'][$i]['source']) && $view['file'][$i]['source'] && !$view['file'][$i]['view']) {
|
||||
?>
|
||||
<li>
|
||||
<a href="<?php echo $view['file'][$i]['href']; ?>" class="view_file_download">
|
||||
<a href="<?php echo $view['file'][$i]['href']; ?>" class="view_file_download" download>
|
||||
<i class="fa fa-download" aria-hidden="true"></i>
|
||||
<strong><?php echo $view['file'][$i]['source'] ?></strong>
|
||||
<?php echo $view['file'][$i]['content'] ?> (<?php echo $view['file'][$i]['size'] ?>)
|
||||
|
||||
@ -22,6 +22,7 @@ var char_max = parseInt(<?php echo $comment_max ?>); // 최대
|
||||
$str = preg_replace("/\[\<a\s.*href\=\"(http|https|ftp|mms)\:\/\/([^[:space:]]+)\.(mp3|wma|wmv|asf|asx|mpg|mpeg)\".*\<\/a\>\]/i", "<script>doc_write(obj_movie('$1://$2.$3'));</script>", $str);
|
||||
$c_reply_href = $comment_common_url.'&c_id='.$comment_id.'&w=c#bo_vc_w';
|
||||
$c_edit_href = $comment_common_url.'&c_id='.$comment_id.'&w=cu#bo_vc_w';
|
||||
$is_comment_reply_edit = ($list[$i]['is_reply'] || $list[$i]['is_edit'] || $list[$i]['is_del']) ? 1 : 0;
|
||||
?>
|
||||
<article id="c_<?php echo $comment_id ?>" <?php if ($cmt_depth) { ?>style="margin-left:<?php echo $cmt_depth ?>px;border-bottom-color:#f8f8f8"<?php } ?>>
|
||||
<div class="comment_inner">
|
||||
@ -37,6 +38,7 @@ var char_max = parseInt(<?php echo $comment_max ?>); // 최대
|
||||
<?php
|
||||
include(G5_SNS_PATH."/view_comment_list.sns.skin.php");
|
||||
?>
|
||||
<?php if( $is_comment_reply_edit ){ ?>
|
||||
<div class="bo_vl_opt">
|
||||
<button type="button" class="btn_cm_opt btn_b03 btn"><i class="fa fa-ellipsis-v" aria-hidden="true"></i><span class="sound_only">댓글 옵션</span></button>
|
||||
<ul class="bo_vc_act">
|
||||
@ -45,6 +47,7 @@ var char_max = parseInt(<?php echo $comment_max ?>); // 최대
|
||||
<?php if ($list[$i]['is_del']) { ?><li><a href="<?php echo $list[$i]['del_link']; ?>" onclick="return comment_delete();">삭제</a></li><?php } ?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<script>
|
||||
$(function() {
|
||||
// 댓글 옵션창 열기
|
||||
|
||||
@ -74,6 +74,7 @@
|
||||
.more_opt {display:none;position:absolute;top:50px;right:7px;background:#fff;border:1px solid #b8bfc4;z-index:999}
|
||||
.more_opt:before {content:"";position:absolute;top:-8px;right:6px;width:0;height:0;border-style:solid;border-width:0 6px 8px 6px;border-color:transparent transparent #b8bfc4 transparent}
|
||||
.more_opt:after {content:"";position:absolute;top:-6px;right:6px;width:0;height:0;border-style:solid;border-width:0 6px 8px 6px;border-color:transparent transparent #fff transparent}
|
||||
.more_opt.is_list_btn{width:90px}
|
||||
.more_opt li {display:block;border-bottom:1px solid #f1f1f1;padding:10px;margin:0;color:#6b757c;text-align:left}
|
||||
.more_opt li:last-child {border-bottom:0}
|
||||
.more_opt li button, .more_opt li a {width:100%;border:0;background:#fff;color:#6b757c}
|
||||
|
||||
@ -145,7 +145,7 @@ jQuery(function($){
|
||||
if (isset($view['file'][$i]['source']) && $view['file'][$i]['source'] && !$view['file'][$i]['view']) {
|
||||
?>
|
||||
<li>
|
||||
<a href="<?php echo $view['file'][$i]['href']; ?>" class="view_file_download">
|
||||
<a href="<?php echo $view['file'][$i]['href']; ?>" class="view_file_download" download>
|
||||
<i class="fa fa-download" aria-hidden="true"></i>
|
||||
<strong><?php echo $view['file'][$i]['source'] ?></strong>
|
||||
<?php echo $view['file'][$i]['content'] ?> (<?php echo $view['file'][$i]['size'] ?>)
|
||||
|
||||
@ -22,6 +22,7 @@ var char_max = parseInt(<?php echo $comment_max ?>); // 최대
|
||||
$str = preg_replace("/\[\<a\s.*href\=\"(http|https|ftp|mms)\:\/\/([^[:space:]]+)\.(mp3|wma|wmv|asf|asx|mpg|mpeg)\".*\<\/a\>\]/i", "<script>doc_write(obj_movie('$1://$2.$3'));</script>", $str);
|
||||
$c_reply_href = $comment_common_url.'&c_id='.$comment_id.'&w=c#bo_vc_w';
|
||||
$c_edit_href = $comment_common_url.'&c_id='.$comment_id.'&w=cu#bo_vc_w';
|
||||
$is_comment_reply_edit = ($list[$i]['is_reply'] || $list[$i]['is_edit'] || $list[$i]['is_del']) ? 1 : 0;
|
||||
?>
|
||||
<article id="c_<?php echo $comment_id ?>" <?php if ($cmt_depth) { ?>style="margin-left:<?php echo $cmt_depth ?>px;border-bottom-color:#f8f8f8"<?php } ?>>
|
||||
<div class="comment_inner">
|
||||
@ -37,6 +38,7 @@ var char_max = parseInt(<?php echo $comment_max ?>); // 최대
|
||||
<?php
|
||||
include(G5_SNS_PATH."/view_comment_list.sns.skin.php");
|
||||
?>
|
||||
<?php if( $is_comment_reply_edit ){ ?>
|
||||
<div class="bo_vl_opt">
|
||||
<button type="button" class="btn_cm_opt btn_b03 btn"><i class="fa fa-ellipsis-v" aria-hidden="true"></i><span class="sound_only">댓글 옵션</span></button>
|
||||
<ul class="bo_vc_act">
|
||||
@ -45,6 +47,7 @@ var char_max = parseInt(<?php echo $comment_max ?>); // 최대
|
||||
<?php if ($list[$i]['is_del']) { ?><li><a href="<?php echo $list[$i]['del_link']; ?>" onclick="return comment_delete();">삭제</a></li><?php } ?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<script>
|
||||
$(function() {
|
||||
// 댓글 옵션창 열기
|
||||
|
||||
@ -99,7 +99,7 @@ $(".btn_more_opt").on("click", function() {
|
||||
for ($i=0; $i<$view['download_count']; $i++) {
|
||||
?>
|
||||
<li>
|
||||
<a href="<?php echo $view['download_href'][$i]; ?>" class="view_file_download">
|
||||
<a href="<?php echo $view['download_href'][$i]; ?>" class="view_file_download" download>
|
||||
<img src="<?php echo $qa_skin_url ?>/img/icon_file.gif" alt="첨부">
|
||||
<strong><?php echo $view['download_source'][$i] ?></strong>
|
||||
</a>
|
||||
|
||||
@ -45,7 +45,6 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
|
||||
<?php echo $page ?> 페이지
|
||||
</div>
|
||||
|
||||
<?php if ($rss_href || $write_href) { ?>
|
||||
<ul class="btn_bo_user">
|
||||
<?php if ($admin_href) { ?><li><a href="<?php echo $admin_href ?>" class="btn_admin btn" title="관리자"><i class="fa fa-cog fa-spin fa-fw"></i><span class="sound_only">관리자</span></a></li><?php } ?>
|
||||
<?php if ($rss_href) { ?><li><a href="<?php echo $rss_href ?>" class="btn_b01 btn" title="RSS"><i class="fa fa-rss" aria-hidden="true"></i><span class="sound_only">RSS</span></a></li><?php } ?>
|
||||
@ -66,7 +65,6 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
|
||||
</li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<!-- } 게시판 페이지 정보 및 버튼 끝 -->
|
||||
|
||||
@ -137,9 +135,9 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
|
||||
<?php
|
||||
if ($list[$i]['icon_new']) echo "<span class=\"new_icon\">N<span class=\"sound_only\">새글</span></span>";
|
||||
// if ($list[$i]['file']['count']) { echo '<'.$list[$i]['file']['count'].'>'; }
|
||||
if (isset($list[$i]['icon_hot'])) echo rtrim($list[$i]['icon_hot']);
|
||||
if (isset($list[$i]['icon_file'])) echo rtrim($list[$i]['icon_file']);
|
||||
if (isset($list[$i]['icon_link'])) echo rtrim($list[$i]['icon_link']);
|
||||
if (isset($list[$i]['icon_hot'])) echo rtrim($list[$i]['icon_hot']);
|
||||
?>
|
||||
<?php if ($list[$i]['comment_cnt']) { ?><span class="sound_only">댓글</span><span class="cnt_cmt"><?php echo $list[$i]['wr_comment']; ?></span><span class="sound_only">개</span><?php } ?>
|
||||
</div>
|
||||
|
||||
@ -101,6 +101,7 @@
|
||||
#bo_list .td_numbig {width:80px;text-align:center}
|
||||
#bo_list .txt_active {color:#5d910b}
|
||||
#bo_list .txt_expired {color:#ccc}
|
||||
#bo_list tbody tr {border-left:2px solid transparent}
|
||||
#bo_list tbody tr:hover {border-left:2px solid #253dbe}
|
||||
|
||||
#bo_cate {margin:25px 0}
|
||||
|
||||
@ -161,7 +161,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
|
||||
?>
|
||||
<li>
|
||||
<i class="fa fa-folder-open" aria-hidden="true"></i>
|
||||
<a href="<?php echo $view['file'][$i]['href']; ?>" class="view_file_download">
|
||||
<a href="<?php echo $view['file'][$i]['href']; ?>" class="view_file_download" download>
|
||||
<strong><?php echo $view['file'][$i]['source'] ?></strong> <?php echo $view['file'][$i]['content'] ?> (<?php echo $view['file'][$i]['size'] ?>)
|
||||
</a>
|
||||
<br>
|
||||
|
||||
@ -26,6 +26,7 @@ var char_max = parseInt(<?php echo $comment_max ?>); // 최대
|
||||
$cmt_sv = $cmt_amt - $i + 1; // 댓글 헤더 z-index 재설정 ie8 이하 사이드뷰 겹침 문제 해결
|
||||
$c_reply_href = $comment_common_url.'&c_id='.$comment_id.'&w=c#bo_vc_w';
|
||||
$c_edit_href = $comment_common_url.'&c_id='.$comment_id.'&w=cu#bo_vc_w';
|
||||
$is_comment_reply_edit = ($list[$i]['is_reply'] || $list[$i]['is_edit'] || $list[$i]['is_del']) ? 1 : 0;
|
||||
?>
|
||||
|
||||
<article id="c_<?php echo $comment_id ?>" <?php if ($cmt_depth) { ?>style="margin-left:<?php echo $cmt_depth ?>px;border-top-color:#e0e0e0"<?php } ?>>
|
||||
@ -53,7 +54,7 @@ var char_max = parseInt(<?php echo $comment_max ?>); // 최대
|
||||
<?php if (strstr($list[$i]['wr_option'], "secret")) { ?><img src="<?php echo $board_skin_url; ?>/img/icon_secret.gif" alt="비밀글"><?php } ?>
|
||||
<?php echo $comment ?>
|
||||
</p>
|
||||
<?php if($list[$i]['is_reply'] || $list[$i]['is_edit'] || $list[$i]['is_del']) {
|
||||
<?php if($is_comment_reply_edit) {
|
||||
if($w == 'cu') {
|
||||
$sql = " select wr_id, wr_content, mb_id from $write_table where wr_id = '$c_id' and wr_is_comment = '1' ";
|
||||
$cmt = sql_fetch($sql);
|
||||
@ -70,6 +71,7 @@ var char_max = parseInt(<?php echo $comment_max ?>); // 최대
|
||||
<input type="hidden" value="<?php echo strstr($list[$i]['wr_option'],"secret") ?>" id="secret_comment_<?php echo $comment_id ?>">
|
||||
<textarea id="save_comment_<?php echo $comment_id ?>" style="display:none"><?php echo get_text($list[$i]['content1'], 0) ?></textarea>
|
||||
</div>
|
||||
<?php if($is_comment_reply_edit) { ?>
|
||||
<div class="bo_vl_opt">
|
||||
<button type="button" class="btn_cm_opt btn_b01 btn"><i class="fa fa-ellipsis-v" aria-hidden="true"></i><span class="sound_only">댓글 옵션</span></button>
|
||||
<ul class="bo_vc_act">
|
||||
@ -78,6 +80,7 @@ var char_max = parseInt(<?php echo $comment_max ?>); // 최대
|
||||
<?php if ($list[$i]['is_del']) { ?><li><a href="<?php echo $list[$i]['del_link']; ?>" onclick="return comment_delete();">삭제</a></li><?php } ?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<script>
|
||||
$(function() {
|
||||
// 댓글 옵션창 열기
|
||||
@ -334,13 +337,16 @@ $(function() {
|
||||
);
|
||||
});
|
||||
<?php } ?>
|
||||
$(function() {
|
||||
</script>
|
||||
<?php } ?>
|
||||
<!-- } 댓글 쓰기 끝 -->
|
||||
<script>
|
||||
jQuery(function($) {
|
||||
//댓글열기
|
||||
$(".cmt_btn").click(function(){
|
||||
$(".cmt_btn").click(function(e){
|
||||
e.preventDefault();
|
||||
$(this).toggleClass("cmt_btn_op");
|
||||
$("#bo_vc").toggle();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<?php } ?>
|
||||
<!-- } 댓글 쓰기 끝 -->
|
||||
</script>
|
||||
@ -130,7 +130,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
|
||||
<?php for ($i=1; $is_link && $i<=G5_LINK_COUNT; $i++) { ?>
|
||||
<div class="bo_w_link write_div">
|
||||
<label for="wr_link<?php echo $i ?>"><i class="fa fa-link" aria-hidden="true"></i><span class="sound_only"> 링크 #<?php echo $i ?></span></label>
|
||||
<input type="text" name="wr_link<?php echo $i ?>" value="<?php if($w=="u"){echo$write['wr_link'.$i];} ?>" id="wr_link<?php echo $i ?>" class="frm_input full_input" size="50">
|
||||
<input type="text" name="wr_link<?php echo $i ?>" value="<?php if($w=="u"){ echo $write['wr_link'.$i]; } ?>" id="wr_link<?php echo $i ?>" class="frm_input full_input" size="50">
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
|
||||
@ -36,7 +36,6 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
|
||||
<?php echo $page ?> 페이지
|
||||
</div>
|
||||
|
||||
<?php if ($rss_href || $write_href) { ?>
|
||||
<ul class="btn_bo_user">
|
||||
<?php if ($admin_href) { ?><li><a href="<?php echo $admin_href ?>" class="btn_admin btn" title="관리자"><i class="fa fa-cog fa-spin fa-fw"></i><span class="sound_only">관리자</span></a></li><?php } ?>
|
||||
<?php if ($rss_href) { ?><li><a href="<?php echo $rss_href ?>" class="btn_b01 btn" title="RSS"><i class="fa fa-rss" aria-hidden="true"></i><span class="sound_only">RSS</span></a></li><?php } ?>
|
||||
@ -57,7 +56,6 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
|
||||
</li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
<?php } ?>
|
||||
</div>
|
||||
<!-- } 게시판 페이지 정보 및 버튼 끝 -->
|
||||
|
||||
|
||||
@ -161,7 +161,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
|
||||
?>
|
||||
<li>
|
||||
<i class="fa fa-folder-open" aria-hidden="true"></i>
|
||||
<a href="<?php echo $view['file'][$i]['href']; ?>" class="view_file_download">
|
||||
<a href="<?php echo $view['file'][$i]['href']; ?>" class="view_file_download" download>
|
||||
<strong><?php echo $view['file'][$i]['source'] ?></strong> <?php echo $view['file'][$i]['content'] ?> (<?php echo $view['file'][$i]['size'] ?>)
|
||||
</a>
|
||||
<br>
|
||||
|
||||
@ -26,6 +26,7 @@ var char_max = parseInt(<?php echo $comment_max ?>); // 최대
|
||||
$cmt_sv = $cmt_amt - $i + 1; // 댓글 헤더 z-index 재설정 ie8 이하 사이드뷰 겹침 문제 해결
|
||||
$c_reply_href = $comment_common_url.'&c_id='.$comment_id.'&w=c#bo_vc_w';
|
||||
$c_edit_href = $comment_common_url.'&c_id='.$comment_id.'&w=cu#bo_vc_w';
|
||||
$is_comment_reply_edit = ($list[$i]['is_reply'] || $list[$i]['is_edit'] || $list[$i]['is_del']) ? 1 : 0;
|
||||
?>
|
||||
|
||||
<article id="c_<?php echo $comment_id ?>" <?php if ($cmt_depth) { ?>style="margin-left:<?php echo $cmt_depth ?>px;border-top-color:#e0e0e0"<?php } ?>>
|
||||
@ -53,7 +54,7 @@ var char_max = parseInt(<?php echo $comment_max ?>); // 최대
|
||||
<?php if (strstr($list[$i]['wr_option'], "secret")) { ?><img src="<?php echo $board_skin_url; ?>/img/icon_secret.gif" alt="비밀글"><?php } ?>
|
||||
<?php echo $comment ?>
|
||||
</p>
|
||||
<?php if($list[$i]['is_reply'] || $list[$i]['is_edit'] || $list[$i]['is_del']) {
|
||||
<?php if($is_comment_reply_edit) {
|
||||
if($w == 'cu') {
|
||||
$sql = " select wr_id, wr_content, mb_id from $write_table where wr_id = '$c_id' and wr_is_comment = '1' ";
|
||||
$cmt = sql_fetch($sql);
|
||||
@ -70,6 +71,7 @@ var char_max = parseInt(<?php echo $comment_max ?>); // 최대
|
||||
<input type="hidden" value="<?php echo strstr($list[$i]['wr_option'],"secret") ?>" id="secret_comment_<?php echo $comment_id ?>">
|
||||
<textarea id="save_comment_<?php echo $comment_id ?>" style="display:none"><?php echo get_text($list[$i]['content1'], 0) ?></textarea>
|
||||
</div>
|
||||
<?php if($is_comment_reply_edit){ ?>
|
||||
<div class="bo_vl_opt">
|
||||
<button type="button" class="btn_cm_opt btn_b01 btn"><i class="fa fa-ellipsis-v" aria-hidden="true"></i><span class="sound_only">댓글 옵션</span></button>
|
||||
<ul class="bo_vc_act">
|
||||
@ -78,6 +80,7 @@ var char_max = parseInt(<?php echo $comment_max ?>); // 최대
|
||||
<?php if ($list[$i]['is_del']) { ?><li><a href="<?php echo $list[$i]['del_link']; ?>" onclick="return comment_delete();">삭제</a></li><?php } ?>
|
||||
</ul>
|
||||
</div>
|
||||
<?php } ?>
|
||||
<script>
|
||||
$(function() {
|
||||
// 댓글 옵션창 열기
|
||||
@ -335,13 +338,16 @@ $(function() {
|
||||
);
|
||||
});
|
||||
<?php } ?>
|
||||
$(function() {
|
||||
</script>
|
||||
<?php } ?>
|
||||
<!-- } 댓글 쓰기 끝 -->
|
||||
<script>
|
||||
jQuery(function($) {
|
||||
//댓글열기
|
||||
$(".cmt_btn").click(function(){
|
||||
$(".cmt_btn").click(function(e){
|
||||
e.preventDefault();
|
||||
$(this).toggleClass("cmt_btn_op");
|
||||
$("#bo_vc").toggle();
|
||||
});
|
||||
});
|
||||
</script>
|
||||
<?php } ?>
|
||||
<!-- } 댓글 쓰기 끝 -->
|
||||
</script>
|
||||
@ -128,7 +128,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
|
||||
<?php for ($i=1; $is_link && $i<=G5_LINK_COUNT; $i++) { ?>
|
||||
<div class="bo_w_link write_div">
|
||||
<label for="wr_link<?php echo $i ?>"><i class="fa fa-link" aria-hidden="true"></i><span class="sound_only"> 링크 #<?php echo $i ?></span></label>
|
||||
<input type="text" name="wr_link<?php echo $i ?>" value="<?php if($w=="u"){echo$write['wr_link'.$i];} ?>" id="wr_link<?php echo $i ?>" class="frm_input full_input" size="50">
|
||||
<input type="text" name="wr_link<?php echo $i ?>" value="<?php if($w=="u"){ echo $write['wr_link'.$i]; } ?>" id="wr_link<?php echo $i ?>" class="frm_input full_input" size="50">
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
|
||||
@ -107,7 +107,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$qa_skin_url.'/style.css">', 0);
|
||||
?>
|
||||
<li>
|
||||
<i class="fa fa-download" aria-hidden="true"></i>
|
||||
<a href="<?php echo $view['download_href'][$i]; ?>" class="view_file_download">
|
||||
<a href="<?php echo $view['download_href'][$i]; ?>" class="view_file_download" download>
|
||||
<strong><?php echo $view['download_source'][$i] ?></strong>
|
||||
</a>
|
||||
</li>
|
||||
|
||||
Reference in New Issue
Block a user