sms5 문자열 처리 및 기타문제 보완
This commit is contained in:
@ -20,6 +20,46 @@ function get_sms5_skin_select($skin_gubun, $id, $name, $selected='', $event='')
|
||||
return $str;
|
||||
}
|
||||
|
||||
// 한페이지에 보여줄 행, 현재페이지, 총페이지수, URL
|
||||
function sms5_sub_paging($write_pages, $cur_page, $total_page, $url, $add="", $starget="")
|
||||
{
|
||||
if( $starget ){
|
||||
$url = preg_replace('#&'.$starget.'=[0-9]*#', '', $url) . '&'.$starget.'=';
|
||||
}
|
||||
|
||||
$str = '';
|
||||
if ($cur_page > 1) {
|
||||
$str .= '<a href="'.$url.'1'.$add.'" class="pg_page pg_start">처음</a>'.PHP_EOL;
|
||||
}
|
||||
|
||||
$start_page = ( ( (int)( ($cur_page - 1 ) / $write_pages ) ) * $write_pages ) + 1;
|
||||
$end_page = $start_page + $write_pages - 1;
|
||||
|
||||
if ($end_page >= $total_page) $end_page = $total_page;
|
||||
|
||||
if ($start_page > 1) $str .= '<a href="'.$url.($start_page-1).$add.'" class="pg_page pg_prev">이전</a>'.PHP_EOL;
|
||||
|
||||
if ($total_page > 1) {
|
||||
for ($k=$start_page;$k<=$end_page;$k++) {
|
||||
if ($cur_page != $k)
|
||||
$str .= '<a href="'.$url.$k.$add.'" class="pg_page">'.$k.'<span class="sound_only">페이지</span></a>'.PHP_EOL;
|
||||
else
|
||||
$str .= '<span class="sound_only">열린</span><strong class="pg_current">'.$k.'</strong><span class="sound_only">페이지</span>'.PHP_EOL;
|
||||
}
|
||||
}
|
||||
|
||||
if ($total_page > $end_page) $str .= '<a href="'.$url.($end_page+1).$add.'" class="pg_page pg_next">다음</a>'.PHP_EOL;
|
||||
|
||||
if ($cur_page < $total_page) {
|
||||
$str .= '<a href="'.$url.$total_page.$add.'" class="pg_page pg_end">맨끝</a>'.PHP_EOL;
|
||||
}
|
||||
|
||||
if ($str)
|
||||
return "<nav class=\"pg_wrap\"><span class=\"pg\">{$str}</span></nav>";
|
||||
else
|
||||
return "";
|
||||
}
|
||||
|
||||
if ( ! function_exists('array_overlap')) {
|
||||
function array_overlap($arr, $val) {
|
||||
for ($i=0, $m=count($arr); $i<$m; $i++) {
|
||||
|
||||
@ -91,6 +91,7 @@ if ($mh_by && $mh_bm && $mh_bd && $mh_bh && $mh_bi) {
|
||||
$SMS = new SMS5;
|
||||
$SMS->SMS_con($config['cf_icode_server_ip'], $config['cf_icode_id'], $config['cf_icode_pw'], $config['cf_icode_server_port']);
|
||||
|
||||
$wr_message = str_replace('\r\n', PHP_EOL, $wr_message); // common.php 에서 mysql_real_escape_string 함수로 인해 수정
|
||||
$result = $SMS->Add($mh_hp, $mh_reply, '', '', $mh_message, $booking, $total);
|
||||
|
||||
$is_success = null;
|
||||
|
||||
Reference in New Issue
Block a user