Skip to content

Commit

Permalink
Eyoom Builder 4 - [4.2.4]
Browse files Browse the repository at this point in the history
  • Loading branch information
eyoom committed Apr 14, 2020
1 parent 0643b72 commit a5d927f
Show file tree
Hide file tree
Showing 21 changed files with 220 additions and 85 deletions.
7 changes: 7 additions & 0 deletions adm/eyoom_admin/core/config/config_form.php
Expand Up @@ -299,6 +299,13 @@
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);
}

/**
* FAQ 스킨설정
*/
Expand Down
3 changes: 3 additions & 0 deletions adm/eyoom_admin/core/config/config_form_update.php
Expand Up @@ -40,6 +40,8 @@
}
}

$_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']}',
Expand Down Expand Up @@ -154,6 +156,7 @@
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']}',
Expand Down
2 changes: 2 additions & 0 deletions adm/eyoom_admin/core/shop/configformupdate.php
Expand Up @@ -278,6 +278,7 @@
if ($_FILES['mobile_logo_img2']['name']) upload_file($_FILES['mobile_logo_img2']['tmp_name'], "mobile_logo_img2", G5_DATA_PATH."/common");

$de_kcp_mid = substr($_POST['de_kcp_mid'],0,3);
$cf_icode_server_port = isset($cf_icode_server_port) ? preg_replace('/[^0-9]/', '', $cf_icode_server_port) : '7295';

// kcp 전자결제를 사용할 때 site key 입력체크
if($_POST['de_pg_service'] == 'kcp' && !$_POST['de_card_test'] && ($_POST['de_iche_use'] || $_POST['de_vbank_use'] || $_POST['de_hp_use'] || $_POST['de_card_use'])) {
Expand Down Expand Up @@ -447,6 +448,7 @@
cf_icode_pw = '{$cf_icode_pw}',
cf_icode_server_ip = '{$_POST['cf_icode_server_ip']}',
cf_icode_server_port = '{$_POST['cf_icode_server_port']}',
cf_icode_token_key = '{$cf_icode_token_key}',
cf_lg_mid = '{$cf_lg_mid}',
cf_lg_mert_key = '{$cf_lg_mert_key}' ";
sql_query($sql);
Expand Down
6 changes: 3 additions & 3 deletions adm/eyoom_admin/core/shop/orderlist.php
Expand Up @@ -55,10 +55,10 @@
} else {
$where[] = " $sel_field like '%$search%' ";
}
}

if ($save_search != $search) {
$page = 1;
if ($save_search != $search) {
$page = 1;
}
}

if ($od_status) {
Expand Down
8 changes: 8 additions & 0 deletions adm/eyoom_admin/core/sms/config.php
Expand Up @@ -16,6 +16,14 @@
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']);
Expand Down
5 changes: 4 additions & 1 deletion adm/eyoom_admin/core/sms/config_update.php
Expand Up @@ -20,6 +20,7 @@
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('아이코드 아이디와 패스워드가 맞지 않습니다.');
Expand All @@ -38,10 +39,12 @@
// 아이코드 설정
$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(G5_ADMIN_URL . "/?dir=sms&pid=config");
4 changes: 2 additions & 2 deletions adm/eyoom_admin/core/sms/history_send.php
Expand Up @@ -228,7 +228,7 @@

?>
<script>
act = window.open('<?php echo G5_ADMIN_URL; ?>/sms_admin/sms_ing.php', 'act', 'width=300, height=200');
act.close();
//act = window.open('<?php echo G5_ADMIN_URL; ?>/sms_admin/sms_ing.php', 'act', 'width=300, height=200');
//act.close();
location.href = '<?php echo G5_ADMIN_URL; ?>/?dir=sms&pid=history_view&wr_no=<?php echo $wr_no?>&wr_renum=<?php echo $new_wr_renum?>';
</script>
54 changes: 36 additions & 18 deletions adm/eyoom_admin/core/sms/sms_write_send.php
Expand Up @@ -11,8 +11,24 @@

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));

Expand Down Expand Up @@ -99,12 +115,12 @@
$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));
Expand All @@ -116,12 +132,12 @@
$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']);
Expand All @@ -146,14 +162,11 @@
$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;

Expand Down Expand Up @@ -247,7 +260,7 @@
}
}

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']);
Expand All @@ -265,7 +278,7 @@
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;
Expand Down Expand Up @@ -329,19 +342,24 @@

function win_close_alert($msg) {

$html = "<script>
act = window.open('".G5_ADMIN_URL."/?dir=sms&pid=sms_ing&wmode=1', '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;
}

?>
<script>
act = window.open('<?php echo G5_ADMIN_URL; ?>/?dir=sms&pid=sms_ing&wmode=1', 'act', 'width=300, height=200');
act.close();
//act = window.open('<?php echo G5_ADMIN_URL; ?>/?dir=sms&pid=sms_ing&wmode=1', 'act', 'width=300, height=200');
//act.close();
location.href = '<?php echo G5_ADMIN_URL; ?>/?dir=sms&pid=history_view&wr_no=<?php echo $wr_no?>';
</script>
2 changes: 2 additions & 0 deletions adm/eyoom_admin/inc/shop.index.php
Expand Up @@ -22,6 +22,7 @@
$item_qa[$i] = $row;
$item_qa[$i]['mb_photo'] = $eb->mb_photo($row1['mb_id']);
$item_qa[$i]['name'] = get_text($row1['mb_name']);
$item_qa[$i]['is_answer'] = $row['iq_answer'] ? true: false;
}

/**
Expand All @@ -36,6 +37,7 @@
$item_use[$i] = $row;
$item_use[$i]['mb_photo'] = $eb->mb_photo($row1['mb_id']);
$item_use[$i]['name'] = get_text($row1['mb_name']);
$item_use[$i]['is_answer'] = $row['is_confirm'] == '1' ? true: false;
}

/**
Expand Down
8 changes: 5 additions & 3 deletions adm/eyoom_admin/theme/basic/admin.index.html.php
Expand Up @@ -315,7 +315,7 @@
<div class="main-latest-wrap">
<div class="main-latest">
<?php for ($i=0; $i<count($item_qa); $i++) { ?>
<a href="<?php echo G5_ADMIN_URL; ?>/?dir=shop&amp;pid=itemqaform&amp;iq_id=<?php echo $item_qa[$i]['iq_id']; ?>&amp;w=u" class="main-latest-link <?php if (!$item_qa[$i]['is_answer'] == '') { ?>main-latest-no-answer<?php } ?>">
<a href="<?php echo G5_ADMIN_URL; ?>/?dir=shop&amp;pid=itemqaform&amp;iq_id=<?php echo $item_qa[$i]['iq_id']; ?>&amp;w=u" class="main-latest-link <?php if (!$item_qa[$i]['is_answer']) { ?>main-latest-no-answer<?php } ?>">
<div class="main-latest-member-img">
<?php if (!$item_qa[$i]['mb_photo']) { ?>
<i class="fas fa-user-circle"></i>
Expand All @@ -327,7 +327,7 @@
<p class="ellipsis"><?php echo conv_subject($item_qa[$i]['iq_subject'], 40); ?></p>
<p class="ellipsis"><span><?php echo $item_qa[$i]['name']; ?></span><span><i class="far fa-clock"></i> <?php echo $eb->date_format('Y-m-d', $item_qa[$i]['iq_time']); ?></span></p>
</div>
<?php if (!$item_qa[$i]['is_answer'] == '') { ?>
<?php if (!$item_qa[$i]['is_answer']) { ?>
<span class="latest-status-indicator"></span>
<?php } ?>
</a>
Expand All @@ -351,7 +351,7 @@
<div class="main-latest-wrap">
<div class="main-latest">
<?php for ($i=0; $i<count($item_use); $i++) { ?>
<a href="<?php echo G5_ADMIN_URL; ?>/?dir=shop&amp;pid=itemuseform&amp;is_id=<?php echo $item_use[$i]['is_id']; ?>&amp;w=u" class="main-latest-link main-latest-no-answer">
<a href="<?php echo G5_ADMIN_URL; ?>/?dir=shop&amp;pid=itemuseform&amp;is_id=<?php echo $item_use[$i]['is_id']; ?>&amp;w=u" class="main-latest-link <?php if (!$item_use[$i]['is_answer']) { ?>main-latest-no-answer<?php } ?>">
<div class="main-latest-member-img">
<?php if (!$item_use[$i]['mb_photo']) { ?>
<i class="fas fa-user-circle"></i>
Expand All @@ -363,7 +363,9 @@
<p class="ellipsis"><?php echo conv_subject($item_use[$i]['is_subject'], 40); ?></p>
<p class="ellipsis"><span><?php echo $item_use[$i]['name']; ?></span><span><i class="far fa-clock"></i> <?php echo $eb->date_format('Y-m-d', $item_use[$i]['is_time']); ?></span></p>
</div>
<?php if (!$item_use[$i]['is_answer']) { ?>
<span class="latest-status-indicator"></span>
<?php } ?>
</a>
<?php } ?>
<?php if (count($item_use) == 0) { ?>
Expand Down
47 changes: 33 additions & 14 deletions adm/eyoom_admin/theme/basic/skin/config/config_form.html.php
Expand Up @@ -31,6 +31,10 @@
.pg-anchor-in.tab-e2 .tab-bottom-line {display:none}
}
.cf_cert_hide {display:none;position:absolute;top:-20000px;left:-10000px}

.icode_old_version th{background-color:#FFFCED !important;}
.icode_json_version th{background-color:#F6F1FF !important;}
.cf_tr_hide {display:none;}
</style>

<div class="admin-config-form">
Expand Down Expand Up @@ -1977,12 +1981,12 @@
<option value="LMS" <?php echo get_selected($config['cf_sms_type'], 'LMS'); ?>>LMS</option>
</select><i></i>
</label>
<div class="note margin-bottom-10"><strong>Note:</strong> 전송유형을 SMS로 선택하시면 최대 80바이트까지 전송하실 수 있으며 LMS로 선택하시면 90바이트 이하는 SMS로, <br>그 이상은 1500바이트까지 LMS로 전송됩니다.<br>요금은 건당 SMS는 16원, LMS는 48원입니다.</div>
<div class="note margin-bottom-10"><strong>Note:</strong> 전송유형을 SMS로 선택하시면 최대 80바이트까지 전송하실 수 있으며<br>LMS로 선택하시면 90바이트 이하는 SMS로, 그 이상은 ".G5_ICODE_LMS_MAX_LENGTH."바이트까지 LMS로 전송됩니다.<br>요금은 건당 SMS는 16원, LMS는 48원입니다.</div>
</td>
</tr>
<tr>
<tr class="icode_old_version">
<th class="table-form-th">
<label for="cf_icode_id" class="label">아이코드 회원아이디</label>
<label for="cf_icode_id" class="label">아이코드 회원아이디<br>(구버전)</label>
</th>
<td>
<label class="input form-width-250px">
Expand All @@ -1991,9 +1995,9 @@
<div class="note margin-bottom-10"><strong>Note:</strong> 아이코드에서 사용하시는 회원아이디를 입력합니다.</div>
</td>
</tr>
<tr>
<tr class="icode_old_version">
<th class="table-form-th">
<label for="cf_icode_pw" class="label">아이코드 비밀번호</label>
<label for="cf_icode_pw" class="label">아이코드 비밀번호<br>(구버전)</label>
</th>
<td>
<label class="input form-width-250px">
Expand All @@ -2002,9 +2006,9 @@
<div class="note margin-bottom-10"><strong>Note:</strong> 아이코드에서 사용하시는 비밀번호를 입력합니다.</div>
</td>
</tr>
<tr>
<tr class="icode_old_version <?php if(!(isset($userinfo['payment']) && $userinfo['payment'])){ echo 'cf_tr_hide'; } ?>">
<th class="table-form-th">
<label class="label">요금제</label>
<label class="label">요금제<br>(구버전)</label>
</th>
<td>
<input type="hidden" name="cf_icode_server_ip" value="<?php echo $config['cf_icode_server_ip']; ?>">
Expand All @@ -2019,18 +2023,34 @@
</label>
</td>
</tr>
<tr>
<?php if ($userinfo['payment'] == 'A') { ?>
<tr class="icode_old_version">
<th class="table-form-th">
<label class="label">아이코드 SMS 신청 [회원가입]</label>
<label class="label">충전 잔액<br>(구버전)</label>
</th>
<td>
<a href="http://icodekorea.com/res/join_company_fix_a.php?sellid=sir2" target="_blank" class="btn-e btn-e-sm btn-e-dark text-center">아이코드 회원가입</a>
<?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']; ?>&amp;icode_passwd=<?php echo $config['cf_icode_pw']; ?>" target="_blank" class="btn-e btn-e-sm btn-e-dark text-center">충전하기</a>
</td>
</tr>
<?php } ?>
<tr class="icode_json_version">
<th class="table-form-th">
<label class="label" for="cf_icode_token_key">아이코드 토큰키<br>(JSON버전)</label>
</th>
<td>
<label class="input form-width-250px">
<input type="text" name="cf_icode_token_key" value="<?php echo $config['cf_icode_token_key']; ?>" id="cf_icode_token_key">
</label>
<div class="note margin-bottom-10"><strong>Note:</strong> 아이코드 JSON 버전의 경우 아이코드 토큰키를 입력시 실행됩니다.<br>SMS 전송유형을 LMS로 설정시 90바이트 이내는 SMS, 90 ~ 2000 바이트는 LMS 그 이상은 절삭 되어 LMS로 발송됩니다.</div>
<div class="note margin-bottom-10"><strong>Note:</strong> 아이코드 사이트 -> 토큰키관리 메뉴에서 생성한 토큰키를 입력합니다.</div>
<br>
서버아이피 : <?php echo $_SERVER['SERVER_ADDR']; ?>
</td>
</tr>
<?php if ($userinfo['payment'] == 'A') { ?>
<tr>
<th class="table-form-th">
<label class="label">충전 잔액</label>
<label class="label">아이코드 SMS 신청<br>회원가입</label>
</th>
<td>
<?php echo number_format($userinfo['coin']); ?>
Expand All @@ -2041,10 +2061,9 @@
<label class="label">아이코드 충전하기</label>
</th>
<td>
<a href="http://www.icodekorea.com/smsbiz/credit_card_amt.php?icode_id=<?php echo $config['cf_icode_id']; ?>&amp;icode_passwd=<?php echo $config['cf_icode_pw']; ?>" target="_blank" class="btn-e btn-e-sm btn-e-dark text-center">충전하기</a>
<a href="http://icodekorea.com/res/join_company_fix_a.php?sellid=sir2" target="_blank" class="btn-e btn-e-sm btn-e-dark text-center">아이코드 회원가입</a>
</td>
</tr>
<?php } ?>
</tbody>
</table>
<?php if (!G5_IS_MOBILE) { ?>
Expand Down

0 comments on commit a5d927f

Please sign in to comment.