Merge branch 'g5'
This commit is contained in:
@ -4,7 +4,7 @@ include_once ('../../common.php');
|
||||
include_once(G5_ADMIN_PATH.'/admin.lib.php');
|
||||
|
||||
if (!strstr($_SERVER['PHP_SELF'], 'install.php')) {
|
||||
if(!mysql_num_rows(mysql_query("show tables like '{$g5['sms5_config_table']}'")))
|
||||
if(!mysql_num_rows(mysql_query(" show tables like '{$g5['sms5_config_table']}' ")))
|
||||
goto_url('install.php');
|
||||
|
||||
// SMS 설정값 배열변수
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
<?php
|
||||
$sub_menu = "900800";
|
||||
include_once("./_common.php");
|
||||
@include_once(G5_PLUGIN_PATH."/sms5/JSON.php");
|
||||
|
||||
@ -9,6 +10,8 @@ if( !function_exists('json_encode') ) {
|
||||
}
|
||||
}
|
||||
|
||||
ajax_auth_check($auth[$sub_menu], "r");
|
||||
|
||||
$err = '';
|
||||
$arr_ajax_msg = array();
|
||||
$exist_hplist = array();
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
<?php
|
||||
$sub_menu = "900300";
|
||||
include_once("./_common.php");
|
||||
@include_once(G5_PLUGIN_PATH."/sms5/JSON.php");
|
||||
|
||||
@ -9,9 +10,9 @@ if( !function_exists('json_encode') ) {
|
||||
}
|
||||
}
|
||||
|
||||
$page_size = 6;
|
||||
ajax_auth_check($auth[$sub_menu], "r");
|
||||
|
||||
auth_check($auth[$sub_menu], "r");
|
||||
$page_size = 6;
|
||||
|
||||
if (!$page) $page = 1;
|
||||
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
<?php
|
||||
$sub_menu = "900300";
|
||||
include_once("./_common.php");
|
||||
|
||||
$colspan = 3;
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
<?php
|
||||
$sub_menu = "900300";
|
||||
include_once("./_common.php");
|
||||
@include_once(G5_PLUGIN_PATH."/sms5/JSON.php");
|
||||
|
||||
@ -9,7 +10,7 @@ if( !function_exists('json_encode') ) {
|
||||
}
|
||||
}
|
||||
|
||||
auth_check($auth[$sub_menu], "r");
|
||||
ajax_auth_check($auth[$sub_menu], "r");
|
||||
|
||||
$lev = array();
|
||||
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
<?php
|
||||
$sub_menu = "900300";
|
||||
include_once("./_common.php");
|
||||
|
||||
$page_size = 10;
|
||||
@ -137,18 +138,18 @@ while ($res = sql_fetch_array($qry)) array_push($group, $res);
|
||||
|
||||
<label for="bg_no" class="sound_only">그룹</label>
|
||||
<select name="bg_no" id="bg_no">
|
||||
<option value="" <?php echo $bg_no?'':'selected'?>> 전체 </option>
|
||||
<option value="1" <?php echo $bg_no=='1'?'selected':''?>> <?php echo $no_group['bg_name']?> (<?php echo number_format($no_group['bg_receipt'])?> 명) </option>
|
||||
<option value=""<?php echo get_selected('', $bg_no); ?>> 전체 </option>
|
||||
<option value="1"<?php echo get_selected(1, $bg_no); ?>> <?php echo $no_group['bg_name']?> (<?php echo number_format($no_group['bg_receipt'])?> 명) </option>
|
||||
<?php for($i=0; $i<count($group); $i++) {?>
|
||||
<option value="<?php echo $group[$i]['bg_no']?>" <?php echo ($bg_no==$group[$i]['bg_no'])?'selected':''?>> <?php echo $group[$i]['bg_name']?> (<?php echo number_format($group[$i]['bg_receipt'])?> 명) </option>
|
||||
<option value="<?php echo $group[$i]['bg_no']?>" <?php echo get_selected($bg_no, $group[$i]['bg_no']); ?>> <?php echo $group[$i]['bg_name']?> (<?php echo number_format($group[$i]['bg_receipt'])?> 명) </option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
|
||||
<label for="stt" class="sound_only">검색대상</label>
|
||||
<select name="st" id="stt">
|
||||
<option value="all" <?php echo $st=='all'?'selected':''?>>이름 + 번호</option>
|
||||
<option value="name" <?php echo $st=='name'?'selected':''?>>이름</option>
|
||||
<option value="hp" <?php echo $st=='hp'?'selected':''?>>번호</option>
|
||||
<option value="all"<?php echo get_selected('all', $st); ?>>이름 + 번호</option>
|
||||
<option value="name"<?php echo get_selected('name', $st); ?>>이름</option>
|
||||
<option value="hp"<?php echo get_selected('hp', $st); ?>>번호</option>
|
||||
</select>
|
||||
|
||||
<label for="svv" class="sound_only">검색어<strong class="sound_only"> 필수</strong></label>
|
||||
|
||||
@ -109,7 +109,7 @@ if ($config['cf_sms_use'] == 'icode') { // 아이코드 사용
|
||||
<th scope="row"><label for="cf_member">회원간 문자전송</label></th>
|
||||
<td>
|
||||
<?php echo help("허용에 체크하면 회원끼리 문자전송이 가능합니다.");?>
|
||||
<input type="checkbox" name="cf_member" id="cf_member" <?php if ($sms5['cf_member']) echo 'checked'?>> 허용
|
||||
<input type="checkbox" name="cf_member" value="1" id="cf_member" <?php echo get_checked(1, $sms5['cf_member']); ?>> <label for="cf_member">허용</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
@ -118,7 +118,7 @@ if ($config['cf_sms_use'] == 'icode') { // 아이코드 사용
|
||||
<?php echo help("문자전송을 허용할 회원레벨을 선택해주세요.");?>
|
||||
<select name="cf_level" id="cf_level">
|
||||
<?php for ($i=1; $i<=10; $i++) { ?>
|
||||
<option value='<?php echo $i?>' <?php if ($sms5['cf_level'] == $i) echo 'selected';?> > <?php echo $i?> </option>
|
||||
<option value="<?php echo $i?>"<?php echo get_selected($i, $sms5['cf_level']);?>> <?php echo $i?> </option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
레벨 이상
|
||||
|
||||
@ -20,7 +20,7 @@ $userinfo = array(
|
||||
if ($userinfo['code'] == '202')
|
||||
alert('아이코드 아이디와 패스워드가 맞지 않습니다.');
|
||||
|
||||
if ($cf_member == 'on')
|
||||
if ($cf_member == '1')
|
||||
$cf_member = 1;
|
||||
else
|
||||
$cf_member = 0;
|
||||
|
||||
@ -29,7 +29,7 @@ if ($st == 'all') {
|
||||
}
|
||||
|
||||
$total_res = sql_fetch("select count(*) as cnt from {$g5['sms5_form_table']} where 1 $sql_group $sql_search");
|
||||
$total_count = $total_res[cnt];
|
||||
$total_count = $total_res['cnt'];
|
||||
|
||||
$total_page = (int)($total_count/$page_size) + ($total_count%$page_size==0 ? 0 : 1);
|
||||
$page_start = $page_size * ( $page - 1 );
|
||||
@ -41,7 +41,7 @@ $qry = sql_query("select * from {$g5['sms5_form_group_table']} order by fg_name"
|
||||
while ($res = sql_fetch_array($qry)) array_push($group, $res);
|
||||
|
||||
$res = sql_fetch("select count(*) as cnt from {$g5['sms5_form_table']} where fg_no=0");
|
||||
$no_count = $res[cnt];
|
||||
$no_count = $res['cnt'];
|
||||
|
||||
include_once(G5_ADMIN_PATH.'/admin.head.php');
|
||||
?>
|
||||
@ -122,9 +122,9 @@ function multi_update(sel)
|
||||
<input type="hidden" name="fg_no" value="<?php echo $fg_no;?>">
|
||||
<label for="st" class="sound_only">검색대상</label>
|
||||
<select name="st" id="st">
|
||||
<option value="all" <?php echo $st=='all'?'selected':''?>>제목 + 이모티콘</option>
|
||||
<option value="name" <?php echo $st=='name'?'selected':''?>>제목</option>
|
||||
<option value="content" <?php echo $st=='content'?'selected':''?>>이모티콘</option>
|
||||
<option value="all"<?php echo get_selected('all', $st); ?>>제목 + 이모티콘</option>
|
||||
<option value="name"<?php echo get_selected('name', $st); ?>>제목</option>
|
||||
<option value="content"<?php echo get_selected('content', $st); ?>>이모티콘</option>
|
||||
</select>
|
||||
<label for="sv" class="sound_only">검색어<strong class="sound_only"> 필수</strong></label>
|
||||
<input type="text" name="sv" value="<?php echo $sv;?>" id="sv" required class="frm_input required" >
|
||||
|
||||
@ -41,7 +41,7 @@ include_once(G5_ADMIN_PATH.'/admin.head.php');
|
||||
$qry = sql_query("select * from {$g5['sms5_form_group_table']} order by fg_name");
|
||||
while($res = sql_fetch_array($qry)) {
|
||||
?>
|
||||
<option value="<?php echo $res['fg_no']?>" <?php echo $res['fg_no']==$write['fg_no']?'selected':''?>><?php echo $res['fg_name']?></option>
|
||||
<option value="<?php echo $res['fg_no']?>"<?php echo get_selected($res['fg_no'], $write['fg_no']); ?>><?php echo $res['fg_name']?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</td>
|
||||
|
||||
@ -17,7 +17,7 @@ else
|
||||
$sql_search = "";
|
||||
|
||||
$total_res = sql_fetch("select count(*) as cnt from {$g5['sms5_write_table']} where wr_renum=0 $sql_search");
|
||||
$total_count = $total_res[cnt];
|
||||
$total_count = $total_res['cnt'];
|
||||
|
||||
$total_page = (int)($total_count/$page_size) + ($total_count%$page_size==0 ? 0 : 1);
|
||||
$page_start = $page_size * ( $page - 1 );
|
||||
@ -30,9 +30,7 @@ include_once(G5_ADMIN_PATH.'/admin.head.php');
|
||||
<form name="search_form" id="search_form" action=<?php echo $_SERVER['PHP_SELF'];?> class="local_sch01 local_sch" method="get">
|
||||
|
||||
<label for="st" class="sound_only">검색대상</label>
|
||||
<select name="st" id="st">
|
||||
<option value="wr_message" <?php echo $st=="wr_message"?"selected":""?>>메세지</option>
|
||||
</select>
|
||||
<input type="hidden" name="st" id="st" value="wr_message" >
|
||||
<label for="sv" class="sound_only">검색어<strong class="sound_only"> 필수</strong></label>
|
||||
<input type="text" name="sv" value="<?php echo $sv ?>" id="sv" required class="required frm_input">
|
||||
<input type="submit" value="검색" class="btn_submit">
|
||||
|
||||
@ -30,9 +30,9 @@ include_once(G5_ADMIN_PATH.'/admin.head.php');
|
||||
<form name="search_form" method="get" action="<?php echo $_SEVER['PHP_SELF']?>" class="local_sch01 local_sch">
|
||||
<label for="st" class="sound_only">검색대상</label>
|
||||
<select name="st" id="st">
|
||||
<option value="mb_id" <?php echo $st=='mh_name'?'selected':''?>>아이디</option>
|
||||
<option value="mh_hp" <?php echo $st=='mh_hp'?'selected':''?>>받는번호</option>
|
||||
<option value="mh_reply" <?php echo $st=='mh_reply'?'selected':''?>>보내는번호</option>
|
||||
<option value="mb_id"<?php echo get_selected('mh_name', $st); ?>>아이디</option>
|
||||
<option value="mh_hp"<?php echo get_selected('mh_hp', $st); ?>>받는번호</option>
|
||||
<option value="mh_reply"<?php echo get_selected('mh_reply', $st); ?>>보내는번호</option>
|
||||
</select>
|
||||
<label for="sv" class="sound_only">검색어<strong class="sound_only"> 필수</strong></label>
|
||||
<input type="text" name="sv" value="<?php echo $sv ?>" id="sv" required class="required frm_input">
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
$sub_menu = "900400";
|
||||
include_once("./_common.php");
|
||||
$sub_menu = '900400';
|
||||
include_once('./_common.php');
|
||||
|
||||
$page_size = 20;
|
||||
$colspan = 10;
|
||||
@ -30,12 +30,12 @@ include_once(G5_ADMIN_PATH.'/admin.head.php');
|
||||
<form name="search_form" method="get" action="<?echo $_SERVER['PHP_SELF']?>" class="local_sch01 local_sch" >
|
||||
<label for="st" class="sound_only">검색대상</label>
|
||||
<select name="st" id="st">
|
||||
<option value="hs_name" <?php echo $st=='hs_name'?'selected':''?>>이름</option>
|
||||
<option value="hs_hp" <?php echo $st=='hs_hp'?'selected':''?>>휴대폰번호</option>
|
||||
<option value="bk_no" <?php echo $st=='bk_no'?'selected':''?>>고유번호</option>
|
||||
<option value="hs_name"<?php echo get_selected('hs_name', $st); ?>>이름</option>
|
||||
<option value="hs_hp"<?php echo get_selected('hs_hp', $st); ?>>휴대폰번호</option>
|
||||
<option value="bk_no"<?php echo get_selected('bk_no', $st); ?>>고유번호</option>
|
||||
</select>
|
||||
<label for="sv" class="sound_only">검색어<strong class="sound_only"> 필수</strong></label>
|
||||
<input type="text" name="sv" value="<?php echo $sv ?>" id="sv" required class="required frm_input">
|
||||
<input type="text" name="sv" value="<?php echo $sv; ?>" id="sv" required class="required frm_input">
|
||||
<input type="submit" value="검색" class="btn_submit">
|
||||
</form>
|
||||
|
||||
@ -59,7 +59,7 @@ include_once(G5_ADMIN_PATH.'/admin.head.php');
|
||||
<tbody>
|
||||
<?php if (!$total_count) { ?>
|
||||
<tr>
|
||||
<td colspan="<?php echo $colspan?>" class="empty_table" >
|
||||
<td colspan="<?php echo $colspan; ?>" class="empty_table" >
|
||||
데이터가 없습니다.
|
||||
</td>
|
||||
</tr>
|
||||
@ -77,23 +77,22 @@ include_once(G5_ADMIN_PATH.'/admin.head.php');
|
||||
$bg_name = '없음';
|
||||
|
||||
if ($res['mb_id'])
|
||||
$mb_id = "<a href=\"".G5_ADMIN_PATH."/member_form.php?&w=u&mb_id={$res['mb_id']}\">{$res['mb_id']}</a>";
|
||||
$mb_id = '<a href="'.G5_ADMIN_URL.'/member_form.php?w=u&mb_id='.$res['mb_id'].'">'.$res['mb_id'].'</a>';
|
||||
else
|
||||
$mb_id = '비회원';
|
||||
?>
|
||||
<tr class="<?php echo $bg; ?>">
|
||||
<td class="td_num"><?php echo $vnum--?></td>
|
||||
<td class="td_mbname"><?php echo $bg_name?></td>
|
||||
<td class="td_mbname"><a href="./num_book_write.php?w=u&bk_no=<?php echo $res['bk_no']?>"><?php echo $res['hs_name']?></a></td>
|
||||
<td class="td_mbid"><?php echo $mb_id?></td>
|
||||
<td class="td_numbig"><?php echo $res['hs_hp']?></td>
|
||||
<td class="td_num"><?php echo $vnum--; ?></td>
|
||||
<td class="td_mbname"><?php echo $bg_name; ?></td>
|
||||
<td class="td_mbname"><a href="./num_book_write.php?w=u&bk_no=<?php echo $res['bk_no']; ?>"><?php echo $res['hs_name']; ?></a></td>
|
||||
<td class="td_mbid"><?php echo $mb_id; ?></td>
|
||||
<td class="td_numbig"><?php echo $res['hs_hp']; ?></td>
|
||||
<td class="td_datetime"><?php echo date('Y-m-d H:i', strtotime($write['wr_datetime']))?></td>
|
||||
<td class="td_boolean"><?php echo $write['wr_booking']!='0000-00-00 00:00:00'?"<span title='{$write['wr_booking']}'>예약</span>":'';?></td>
|
||||
<td class="td_boolean"><?php echo $res['hs_flag']?'성공':'실패'?></td>
|
||||
<td><span title="<?php echo $write['wr_message']?>"><?php echo $write['wr_message']?></span></td>
|
||||
<td class="td_mngsmall">
|
||||
<a href="./history_view.php?page=<?php echo $page?>&st=<?php echo $st?>&sv=<?php echo $sv?>&wr_no=<?php echo $res['wr_no']?>">수정</a>
|
||||
<!-- <a href="./history_del.php?page=<?php echo $page?>&st=<?php echo $st?>&sv=<?php echo $sv?>&wr_no=<?php echo $res['wr_no']?>"><img src="./img/icon_delete.gif" alt="삭제" ></a> -->
|
||||
<a href="./history_view.php?page=<?php echo $page; ?>&st=<?php echo $st; ?>&sv=<?php echo $sv; ?>&wr_no=<?php echo $res['wr_no']; ?>">수정</a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
@ -116,7 +116,7 @@ if ($result)
|
||||
$row['bk_hp'] = get_hp($row['bk_hp'], 1);
|
||||
|
||||
$log = array_shift($SMS->Log);
|
||||
sql_query("insert into {$g5['sms5_history_table']} set wr_no='$wr_no', wr_renum='$new_wr_renum', bg_no='{$row['bg_no']}', mb_id='{$row['mb_id']}', bk_no='{$row['bk_no']}', hs_name='{$row['hs_name']}', hs_hp='{$row['hs_hp']}', hs_datetime='".G5_TIME_YMDHIS."', hs_flag='$hs_flag', hs_code='$hs_code', hs_memo='$hs_memo', hs_log='$log'");
|
||||
sql_query("insert into {$g5['sms5_history_table']} set wr_no='$wr_no', wr_renum='$new_wr_renum', bg_no='{$row['bg_no']}', mb_id='{$row['mb_id']}', bk_no='{$row['bk_no']}', hs_name='{$row['hs_name']}', hs_hp='{$row['hs_hp']}', hs_datetime='".G5_TIME_YMDHIS."', hs_flag='$hs_flag', hs_code='$hs_code', hs_memo='".addslashes($hs_memo)."', hs_log='".addslashes($log)."'");
|
||||
}
|
||||
$SMS->Init(); // 보관하고 있던 결과값을 지웁니다.
|
||||
|
||||
|
||||
@ -52,7 +52,7 @@ function re_send()
|
||||
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?>';
|
||||
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 } ?>
|
||||
}
|
||||
function all_send()
|
||||
@ -71,8 +71,8 @@ function all_send()
|
||||
<input type="hidden" name="sv" value="<?php echo $sv?>">
|
||||
<label for="sst" class="sound_only">검색대상</label>
|
||||
<select name="sst" id="sst">
|
||||
<option value="hs_name" <?php echo $sst=='hs_name'?'selected':''?>>이름</option>
|
||||
<option value="hs_hp" <?php echo $sst=='hs_hp'?'selected':''?>>휴대폰번호</option>
|
||||
<option value="hs_name" <?php echo get_selected('hs_name', $sst); ?>>이름</option>
|
||||
<option value="hs_hp" <?php echo get_selected('hs_hp', $sst); ?>>휴대폰번호</option>
|
||||
</select>
|
||||
<label for="ssv" class="sound_only">검색어<strong class="sound_only"> 필수</strong></label>
|
||||
<input type="text" name="ssv" value="<?php echo $ssv?>" id="ssv" class="frm_input">
|
||||
@ -239,7 +239,7 @@ function all_send()
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php echo get_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $spage, $total_spage, $_SERVER['PHP_SELF']."?wr_no=$wr_no&wr_renum=$wr_renum&page=$page&st=$st&sv=$sv&sst=$sst&ssv=$ssv&spage="); ?>
|
||||
<?php echo sms5_sub_paging(G5_IS_MOBILE ? $config['cf_mobile_pages'] : $config['cf_write_pages'], $spage, $total_spage, $_SERVER['PHP_SELF']."?wr_no=$wr_no&wr_renum=$wr_renum&page=$page&st=$st&sv=$sv&sst=$sst&ssv=$ssv", "", "spage"); ?>
|
||||
|
||||
<?php
|
||||
include_once(G5_ADMIN_PATH.'/admin.tail.php');
|
||||
|
||||
@ -1,4 +1,5 @@
|
||||
<?php
|
||||
$sub_menu = "900000";
|
||||
include_once("./_common.php");
|
||||
|
||||
auth_check($auth[$sub_menu], 'r');
|
||||
|
||||
@ -10,7 +10,11 @@ if( !function_exists('json_encode') ) {
|
||||
}
|
||||
}
|
||||
|
||||
auth_check($auth[$sub_menu], "w");
|
||||
if( $mtype == "json" ){
|
||||
ajax_auth_check($auth[$sub_menu], "w");
|
||||
} else {
|
||||
auth_check($auth[$sub_menu], "w");
|
||||
}
|
||||
|
||||
$count = 0;
|
||||
$hp_yes = 0;
|
||||
|
||||
@ -52,7 +52,7 @@ if ($no_hp_checked == 'checked')
|
||||
$sql_no_hp = "and bk_hp <> ''";
|
||||
|
||||
$total_res = sql_fetch("select count(*) as cnt from {$g5['sms5_book_table']} where 1 $sql_group $sql_search $sql_korean $sql_no_hp");
|
||||
$total_count = $total_res[cnt];
|
||||
$total_count = $total_res['cnt'];
|
||||
|
||||
$total_page = (int)($total_count/$page_size) + ($total_count%$page_size==0 ? 0 : 1);
|
||||
$page_start = $page_size * ( $page - 1 );
|
||||
@ -111,9 +111,9 @@ function no_hp_click(val)
|
||||
<input type="hidden" name="bg_no" value="<?php echo $bg_no?>" >
|
||||
<label for="st" class="sound_only">검색대상</label>
|
||||
<select name="st" id="st">
|
||||
<option value="all" <?php echo $st=='all'?'selected':''?>>이름 + 휴대폰번호</option>
|
||||
<option value="name" <?php echo $st=='name'?'selected':''?>>이름</option>
|
||||
<option value="hp" <?php echo $st=='hp'?'selected':''?>>휴대폰번호</option>
|
||||
<option value="all"<?php echo get_selected('all', $st); ?>>이름 + 휴대폰번호</option>
|
||||
<option value="name"<?php echo get_selected('name', $st); ?>>이름</option>
|
||||
<option value="hp" <?php echo get_selected('hp', $st); ?>>휴대폰번호</option>
|
||||
</select>
|
||||
<label for="sv" class="sound_only">검색어<strong class="sound_only"> 필수</strong></label>
|
||||
<input type="text" name="sv" value="<?php echo $sv?>" id="sv" required class="frm_input required">
|
||||
@ -123,10 +123,10 @@ function no_hp_click(val)
|
||||
<form name="search_form" class="local_sch01 local_sch">
|
||||
<label for="bg_no" class="sound_only">그룹명</label>
|
||||
<select name="bg_no" id="bg_no" onchange="location.href='<?php echo $_SERVER['PHP_SELF']?>?bg_no='+this.value;">
|
||||
<option value="" <?php echo $bg_no?'':'selected'?>> 전체 </option>
|
||||
<option value="<?php echo $no_group['bg_no']?>" <?php echo $bg_no==$no_group['bg_no']?'selected':''?>> <?php echo $no_group['bg_name']?> (<?php echo number_format($no_group['bg_count'])?> 명) </option>
|
||||
<option value=""<?php echo get_selected('', $bg_no); ?>> 전체 </option>
|
||||
<option value="<?php echo $no_group['bg_no']?>"<?php echo get_selected($bg_no, $no_group['bg_no']); ?>> <?php echo $no_group['bg_name']?> (<?php echo number_format($no_group['bg_count'])?> 명) </option>
|
||||
<?php for($i=0; $i<count($group); $i++) {?>
|
||||
<option value="<?php echo $group[$i]['bg_no']?>" <?php echo ($bg_no==$group[$i]['bg_no'])?'selected':''?>> <?php echo $group[$i]['bg_name']?> (<?php echo number_format($group[$i]['bg_count'])?> 명) </option>
|
||||
<option value="<?php echo $group[$i]['bg_no']?>"<?php echo get_selected($bg_no, $group[$i]['bg_no']);?>> <?php echo $group[$i]['bg_name']?> (<?php echo number_format($group[$i]['bg_count'])?> 명) </option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
<input type="checkbox" name="no_hp" id="no_hp" <?php echo $no_hp_checked?> onclick="no_hp_click(this.checked)">
|
||||
|
||||
@ -97,7 +97,7 @@ include_once(G5_ADMIN_PATH.'/admin.head.php');
|
||||
function upload(w)
|
||||
{
|
||||
var f = document.upload_form;
|
||||
|
||||
|
||||
if (typeof w == 'undefined') {
|
||||
document.getElementById('upload_button').style.display = 'none';
|
||||
document.getElementById('uploading').style.display = 'inline';
|
||||
@ -138,8 +138,8 @@ function download()
|
||||
if (hyphen.checked) hyphen = 1; else hyphen = 0;
|
||||
|
||||
par += '?bg_no=' + bg_no.value;
|
||||
par += '&no_hp=' + no_hp;
|
||||
par += '&hyphen=' + hyphen;
|
||||
par += '&no_hp=' + no_hp;
|
||||
par += '&hyphen=' + hyphen;
|
||||
|
||||
(function($){
|
||||
if(!document.getElementById("fileupload_fr")){
|
||||
|
||||
@ -98,7 +98,7 @@ for ($i = 1; $i <= $num_rows; $i++) {
|
||||
}
|
||||
else if (!$confirm && $hp)
|
||||
{
|
||||
sql_query("insert into {$g5['sms5_book_table']} set bg_no='$bg_no', bk_name='$name', bk_hp='$hp', bk_receipt=1, bk_datetime='".G5_TIME_YMDHIS."'");
|
||||
sql_query("insert into {$g5['sms5_book_table']} set bg_no='$bg_no', bk_name='".addslashes($name)."', bk_hp='$hp', bk_receipt=1, bk_datetime='".G5_TIME_YMDHIS."'");
|
||||
sql_query("update {$g5['sms5_book_group_table']} set bg_count = bg_count + 1, bg_nomember = bg_nomember + 1, bg_receipt = bg_receipt + 1 where bg_no='$bg_no'");
|
||||
$success++;
|
||||
}
|
||||
|
||||
@ -46,7 +46,7 @@ if ($w=='u') // 업데이트
|
||||
sql_query("update {$g5['sms5_book_group_table']} set bg_receipt = bg_receipt - 1, bg_reject = bg_reject + 1 where bg_no='$bg_no'");
|
||||
}
|
||||
|
||||
sql_query("update {$g5['sms5_book_table']} set bg_no='$bg_no', bk_name='$bk_name', bk_hp='$bk_hp', bk_receipt='$bk_receipt', bk_datetime='".G5_TIME_YMDHIS."', bk_memo='$bk_memo' where bk_no='$bk_no'");
|
||||
sql_query("update {$g5['sms5_book_table']} set bg_no='$bg_no', bk_name='$bk_name', bk_hp='$bk_hp', bk_receipt='$bk_receipt', bk_datetime='".G5_TIME_YMDHIS."', bk_memo='".addslashes($bk_memo)."' where bk_no='$bk_no'");
|
||||
if ($res['mb_id']){ //만약에 mb_id가 있다면...
|
||||
// 휴대폰번호 중복체크
|
||||
$sql = " select mb_id from {$g5['member_table']} where mb_id <> '{$res['mb_id']}' and mb_hp = '{$bk_hp}' ";
|
||||
@ -54,7 +54,7 @@ if ($w=='u') // 업데이트
|
||||
if ($mb_hp_exist['mb_id']) { //중복된 회원 휴대폰번호가 있다면
|
||||
$is_hp_exist = true;
|
||||
} else {
|
||||
sql_query("update {$g5['member_table']} set mb_name='$bk_name', mb_hp='$bk_hp', mb_sms='$bk_receipt' where mb_id='{$res['mb_id']}'", false);
|
||||
sql_query("update {$g5['member_table']} set mb_name='".addslashes($bk_name)."', mb_hp='$bk_hp', mb_sms='$bk_receipt' where mb_id='{$res['mb_id']}'", false);
|
||||
}
|
||||
}
|
||||
$get_bg_no = $bg_no;
|
||||
@ -126,7 +126,7 @@ else // 등록
|
||||
else
|
||||
$sql_sms = "bg_reject = bg_reject + 1";
|
||||
|
||||
sql_query("insert into {$g5['sms5_book_table']} set bg_no='$bg_no', bk_name='$bk_name', bk_hp='$bk_hp', bk_receipt='$bk_receipt', bk_datetime='".G5_TIME_YMDHIS."', bk_memo='$bk_memo'");
|
||||
sql_query("insert into {$g5['sms5_book_table']} set bg_no='$bg_no', bk_name='".addslashes($bk_name)."', bk_hp='$bk_hp', bk_receipt='$bk_receipt', bk_datetime='".G5_TIME_YMDHIS."', bk_memo='".addslashes($bk_memo)."'");
|
||||
sql_query("update {$g5['sms5_book_group_table']} set bg_count = bg_count + 1, bg_nomember = bg_nomember + 1, $sql_sms where bg_no = '$bg_no'");
|
||||
|
||||
$get_bg_no = $bg_no;
|
||||
|
||||
@ -27,7 +27,7 @@ if ($w == 'u') // 업데이트
|
||||
if ($res)
|
||||
alert('같은 그룹명이 존재합니다.');
|
||||
|
||||
sql_query("update {$g5['sms5_book_group_table']} set bg_name='$bg_name' where bg_no='$bg_no'");
|
||||
sql_query("update {$g5['sms5_book_group_table']} set bg_name='".addslashes($bg_name)."' where bg_no='$bg_no'");
|
||||
}
|
||||
}
|
||||
else if ($w == 'de') // 그룹삭제
|
||||
@ -70,7 +70,7 @@ else // 등록
|
||||
if ($res)
|
||||
alert('같은 그룹명이 존재합니다.');
|
||||
|
||||
sql_query("insert into {$g5['sms5_book_group_table']} set bg_name='$bg_name'");
|
||||
sql_query("insert into {$g5['sms5_book_group_table']} set bg_name='".addslashes($bg_name)."'");
|
||||
}
|
||||
|
||||
goto_url('./num_group.php');
|
||||
|
||||
@ -148,19 +148,19 @@ if ($config['cf_sms_use'] == 'icode') { // 아이코드 사용
|
||||
<label for="wr_by">년</label><br>
|
||||
<select name="wr_bm" id="wr_bm" disabled>
|
||||
<?php for ($i=1; $i<=12; $i++) { ?>
|
||||
<option value="<?php echo sprintf("%02d",$i)?>" <?php echo date('m')==$i?'selected':''?>><?php echo sprintf("%02d",$i)?></option>
|
||||
<option value="<?php echo sprintf("%02d",$i)?>"<?php echo get_selected(date('m'), $i); ?>><?php echo sprintf("%02d",$i)?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
<label for="wr_bm">월</label>
|
||||
<select name="wr_bd" id="wr_bd" disabled>
|
||||
<?php for ($i=1; $i<=31; $i++) { ?>
|
||||
<option value="<?php echo sprintf("%02d",$i)?>" <?php echo date('d')==$i?'selected':''?>><?php echo sprintf("%02d",$i)?></option>
|
||||
<option value="<?php echo sprintf("%02d",$i)?>"<?php echo get_selected(date('d'), $i); ?>><?php echo sprintf("%02d",$i)?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
<label for="wr_bd">일</label><br>
|
||||
<select name="wr_bh" id="wr_bh" disabled>
|
||||
<?php for ($i=0; $i<24; $i++) { ?>
|
||||
<option value="<?php echo sprintf("%02d",$i)?>" <?php echo date('H')+1==$i?'selected':''?>><?php echo sprintf("%02d",$i)?></option>
|
||||
<option value="<?php echo sprintf("%02d",$i)?>"<?php echo get_selected(date('H')+1, $i); ?>><?php echo sprintf("%02d",$i)?></option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
<label for="wr_bh">시</label>
|
||||
@ -452,7 +452,7 @@ hp_list.options[hp_list.length] = new Option(item, value);
|
||||
<?php
|
||||
if ($fo_no) {
|
||||
$row = sql_fetch("select * from {$g5['sms5_form_table']} where fo_no='$fo_no'");
|
||||
$fo_content = str_replace("\r\n", "\\n", $row[fo_content]);
|
||||
$fo_content = str_replace(array("\r\n","\n"), "\\n", $row['fo_content']);
|
||||
echo "add(\"$fo_content\");";
|
||||
}
|
||||
?>
|
||||
@ -472,7 +472,7 @@ if ($wr_no)
|
||||
echo "var hp_list = document.getElementById('hp_list');\n";
|
||||
//echo "add(\"$row[wr_message]\");\n";
|
||||
$wr_message = str_replace('"', '\"', $row['wr_message']);
|
||||
$wr_message = str_replace("\r\n", "\\n", $wr_message);
|
||||
$wr_message = str_replace(array("\r\n","\n"), "\\n", $wr_message);
|
||||
echo "add(\"$wr_message\");\n";
|
||||
echo "document.getElementById('wr_reply').value = '{$row['wr_reply']}';\n";
|
||||
|
||||
|
||||
@ -12,10 +12,10 @@ $no_count = $res['cnt'];
|
||||
<form name="emo_frm">
|
||||
<label for="emo_sel" class="sound_only">이모티콘 그룹</label>
|
||||
<select name="fg_no" id="emo_sel">
|
||||
<option value="" <?php echo $fg_no?'':'selected'?>> 전체 </option>
|
||||
<option value="0" <?php echo $fg_no=='0'?'selected':''?>> 미분류 (<?php echo number_format($no_count)?>) </option>
|
||||
<option value=""<?php echo get_selected('', $fg_no); ?>> 전체 </option>
|
||||
<option value="0"<?php echo get_selected('0', $fg_no); ?>> 미분류 (<?php echo number_format($no_count)?>) </option>
|
||||
<?php for($i=0; $i<count($group); $i++) {?>
|
||||
<option value="<?php echo $group[$i]['fg_no']?>" <?php echo ($fg_no==$group[$i]['fg_no'])?'selected':''?>> <?php echo $group[$i]['fg_name']?> (<?php echo number_format($group[$i]['fg_count'])?>) </option>
|
||||
<option value="<?php echo $group[$i]['fg_no']?>"<?php echo get_selected($fg_no, $group[$i]['fg_no']);?>> <?php echo $group[$i]['fg_name']?> (<?php echo number_format($group[$i]['fg_count'])?>) </option>
|
||||
<?php } ?>
|
||||
</select>
|
||||
</form>
|
||||
@ -29,9 +29,9 @@ $no_count = $res['cnt'];
|
||||
<input type="hidden" name="fg_no" id="hidden_fg_no" >
|
||||
<label for="st" class="sound_only">검색대상</label>
|
||||
<select name="st" id="st">
|
||||
<option value="all" <?php echo $st=='all'?'selected':''?>>제목 + 이모티콘</option>
|
||||
<option value="name" <?php echo $st=='name'?'selected':''?>>제목</option>
|
||||
<option value="content" <?php echo $st=='content'?'selected':''?>>이모티콘</option>
|
||||
<option value="all"<?php echo get_selected('all', $st); ?>>제목 + 이모티콘</option>
|
||||
<option value="name"<?php echo get_selected('name', $st); ?>>제목</option>
|
||||
<option value="content"<?php echo get_selected('content', $st); ?>>이모티콘</option>
|
||||
</select>
|
||||
<label for="sv" class="sound_only">검색어<strong class="sound_only"> 필수</strong></label>
|
||||
<input type="text" name="sv" value="<?php echo $sv?>" id="sv" required class="frm_input required" size="15">
|
||||
|
||||
@ -134,6 +134,7 @@ $SMS = new SMS5;
|
||||
$SMS->SMS_con($config['cf_icode_server_ip'], $config['cf_icode_id'], $config['cf_icode_pw'], $config['cf_icode_server_port']);
|
||||
|
||||
$reply = str_replace('-', '', trim($wr_reply));
|
||||
$wr_message = conv_unescape_nl($wr_message);
|
||||
|
||||
$result = $SMS->Add($list, $reply, '', '', $wr_message, $booking, $wr_total);
|
||||
|
||||
@ -198,7 +199,8 @@ if ($result)
|
||||
$row['bk_hp'] = get_hp($row['bk_hp'], 1);
|
||||
|
||||
$log = array_shift($SMS->Log);
|
||||
sql_query("insert into {$g5['sms5_history_table']} set wr_no='$wr_no', wr_renum=0, bg_no='{$row['bg_no']}', mb_id='{$row['mb_id']}', bk_no='{$row['bk_no']}', hs_name='".addslashes($row['bk_name'])."', hs_hp='{$row['bk_hp']}', hs_datetime='".G5_TIME_YMDHIS."', hs_flag='$hs_flag', hs_code='$hs_code', hs_memo='".addslashes($hs_memo)."', hs_log='".addslashes(stripslashes($log))."'");
|
||||
|
||||
sql_query("insert into {$g5['sms5_history_table']} set wr_no='$wr_no', wr_renum=0, bg_no='{$row['bg_no']}', mb_id='{$row['mb_id']}', bk_no='{$row['bk_no']}', hs_name='".addslashes($row['bk_name'])."', hs_hp='{$row['bk_hp']}', hs_datetime='".G5_TIME_YMDHIS."', hs_flag='$hs_flag', hs_code='$hs_code', hs_memo='".addslashes($hs_memo)."', hs_log='".addslashes($log)."'");
|
||||
}
|
||||
$SMS->Init(); // 보관하고 있던 결과값을 지웁니다.
|
||||
|
||||
|
||||
@ -20,6 +20,70 @@ 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 "";
|
||||
}
|
||||
|
||||
// 권한 검사
|
||||
function ajax_auth_check($auth, $attr)
|
||||
{
|
||||
global $is_admin;
|
||||
|
||||
if ($is_admin == 'super') return;
|
||||
|
||||
if (!trim($auth))
|
||||
die("{\"error\":\"이 메뉴에는 접근 권한이 없습니다.\\n\\n접근 권한은 최고관리자만 부여할 수 있습니다.\"}");
|
||||
|
||||
$attr = strtolower($attr);
|
||||
|
||||
if (!strstr($auth, $attr)) {
|
||||
if ($attr == 'r')
|
||||
die("{\"error\":\"읽을 권한이 없습니다.\"}");
|
||||
else if ($attr == 'w')
|
||||
die("{\"error\":\"입력, 추가, 생성, 수정 권한이 없습니다.\"}");
|
||||
else if ($attr == 'd')
|
||||
die("{\"error\":\"삭제 권한이 없습니다.\"}");
|
||||
else
|
||||
die("{\"error\":\"속성이 잘못 되었습니다.\"}");
|
||||
}
|
||||
}
|
||||
|
||||
if ( ! function_exists('array_overlap')) {
|
||||
function array_overlap($arr, $val) {
|
||||
for ($i=0, $m=count($arr); $i<$m; $i++) {
|
||||
|
||||
@ -91,6 +91,8 @@ 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']);
|
||||
|
||||
$mh_message = conv_unescape_nl($mh_message);
|
||||
|
||||
$result = $SMS->Add($mh_hp, $mh_reply, '', '', $mh_message, $booking, $total);
|
||||
|
||||
$is_success = null;
|
||||
|
||||
Reference in New Issue
Block a user