diff --git a/adm/auth_list.php b/adm/auth_list.php
index 682a20966..c0b3269ef 100644
--- a/adm/auth_list.php
+++ b/adm/auth_list.php
@@ -35,7 +35,7 @@ $total_count = $row['cnt'];
$rows = $config['cf_page_rows'];
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
-if ($page == "") $page = 1; // 페이지가 없으면 첫 페이지 (1 페이지)
+if ($page < 1) $page = 1; // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $rows; // 시작 열을 구함
$sql = " select *
diff --git a/adm/board_copy.php b/adm/board_copy.php
index 85b01fde8..1d78d2c30 100644
--- a/adm/board_copy.php
+++ b/adm/board_copy.php
@@ -5,7 +5,6 @@ include_once("./_common.php");
auth_check($auth[$sub_menu], 'w');
$g5['title'] = '게시판 복사';
-$administrator = 1;
include_once(G5_PATH.'/head.sub.php');
?>
diff --git a/adm/board_form.php b/adm/board_form.php
index ecbea30f1..ae69b945c 100644
--- a/adm/board_form.php
+++ b/adm/board_form.php
@@ -654,12 +654,6 @@ $frm_submit .= '';
-
|
diff --git a/adm/board_form_update.php b/adm/board_form_update.php
index 46b49f708..b56234342 100644
--- a/adm/board_form_update.php
+++ b/adm/board_form_update.php
@@ -195,14 +195,14 @@ if ($w == '') {
$bo_notice = "";
$lf = "";
if ($board['bo_notice']) {
- $tmp_array = explode("\n", $board['bo_notice']);
+ $tmp_array = explode(",", $board['bo_notice']);
for ($i=0; $i= $member[mb_level])
+else if ($mb['mb_level'] >= $member['mb_level'])
alert("자신보다 권한이 높거나 같은 회원은 삭제할 수 없습니다.");
check_token();
// 회원자료 삭제
-member_delete($mb[mb_id]);
+member_delete($mb['mb_id']);
if ($url)
goto_url("{$url}?$qstr&w=u&mb_id=$mb_id");
diff --git a/adm/member_list.php b/adm/member_list.php
index 34b2cf704..1c9ce7981 100644
--- a/adm/member_list.php
+++ b/adm/member_list.php
@@ -43,7 +43,7 @@ $total_count = $row['cnt'];
$rows = $config['cf_page_rows'];
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
-if (!$page) $page = 1; // 페이지가 없으면 첫 페이지 (1 페이지)
+if ($page < 1) $page = 1; // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $rows; // 시작 열을 구함
// 탈퇴회원수
diff --git a/adm/member_list_delete.php b/adm/member_list_delete.php
index d5eb706df..0deced561 100644
--- a/adm/member_list_delete.php
+++ b/adm/member_list_delete.php
@@ -9,7 +9,7 @@ auth_check($auth[$sub_menu], "d");
check_token();
$msg = "";
-for ($i=0; $i= $member[mb_level]) {
- $msg .= "$mb[mb_id] : 자신보다 권한이 높거나 같은 회원은 삭제할 수 없습니다.\\n";
+ $msg .= "{$mb['mb_id']} : 회원자료가 존재하지 않습니다.\\n";
+ } else if ($member['mb_id'] == $mb['mb_id']) {
+ $msg .= "{$mb['mb_id']} : 로그인 중인 관리자는 삭제 할 수 없습니다.\\n";
+ } else if (is_admin($mb['mb_id']) == "super") {
+ $msg .= "{$mb['mb_id']} : 최고 관리자는 삭제할 수 없습니다.\\n";
+ } else if ($is_admin != "super" && $mb['mb_level'] >= $member['mb_level']) {
+ $msg .= "{$mb['mb_id']} : 자신보다 권한이 높거나 같은 회원은 삭제할 수 없습니다.\\n";
} else {
- // 회원자료 삭제
- member_delete($mb[mb_id]);
+ // 회원자료 삭제
+ member_delete($mb['mb_id']);
}
}
diff --git a/adm/point_list.php b/adm/point_list.php
index d0fab01b4..8d23ccd5c 100644
--- a/adm/point_list.php
+++ b/adm/point_list.php
@@ -38,7 +38,7 @@ $total_count = $row['cnt'];
$rows = $config['cf_page_rows'];
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
-if ($page == '') $page = 1; // 페이지가 없으면 첫 페이지 (1 페이지)
+if ($page < 1) $page = 1; // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $rows; // 시작 열을 구함
$sql = " select *
diff --git a/adm/poll_list.php b/adm/poll_list.php
index 990fccc57..fc76ba0c8 100644
--- a/adm/poll_list.php
+++ b/adm/poll_list.php
@@ -34,7 +34,7 @@ $total_count = $row['cnt'];
$rows = $config['cf_page_rows'];
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
-if ($page == '') $page = 1; // 페이지가 없으면 첫 페이지 (1 페이지)
+if ($page < 1) $page = 1; // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $rows; // 시작 열을 구함
$sql = " select *
diff --git a/adm/popular_list.php b/adm/popular_list.php
index f0d358d32..50bd5a870 100644
--- a/adm/popular_list.php
+++ b/adm/popular_list.php
@@ -47,7 +47,7 @@ $total_count = $row['cnt'];
$rows = $config['cf_page_rows'];
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
-if ($page == '') { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지)
+if ($page < 1) { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $rows; // 시작 열을 구함
$sql = " select *
diff --git a/adm/popular_rank.php b/adm/popular_rank.php
index a6b396c47..4c47720c2 100644
--- a/adm/popular_rank.php
+++ b/adm/popular_rank.php
@@ -20,7 +20,7 @@ $total_count = mysql_num_rows($result);
$rows = $config['cf_page_rows'];
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
-if ($page == '') { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지)
+if ($page < 1) { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $rows; // 시작 열을 구함
$sql = " select pp_word, count(*) as cnt {$sql_common} {$sql_search} {$sql_group} {$sql_order} limit {$from_record}, {$rows} ";
diff --git a/adm/session_delete.php b/adm/session_delete.php
deleted file mode 100644
index 35c8b8419..000000000
--- a/adm/session_delete.php
+++ /dev/null
@@ -1,46 +0,0 @@
-
-$sub_menu = "100700";
-include_once("./_common.php");
-
-if ($is_admin != "super")
- alert("최고관리자만 접근 가능합니다.", $g5[path]);
-
-$g5[title] = "세션 삭제";
-include_once("./admin.head.php");
-echo "'완료' 메세지가 나오기 전에 프로그램의 실행을 중지하지 마십시오.
";
-echo "";
-include_once("./admin.tail.php");
-flush();
-
-$session_path = "$g5[path]/data/session"; // 세션이저장된 디렉토리
-if (!$dir=@opendir($session_path)) {
- echo "세션 디렉토리를 열지못했습니다.";
-}
-
-$cnt=0;
-while($file=readdir($dir)) {
-
- if (!strstr($file,'sess_')) {
- continue;
- }
-
- if (strpos($file,'sess_')!=0) {
- continue;
- }
-
- if (!$atime=@fileatime("$session_path/$file")) {
- continue;
- }
- if (time() > $atime + (3600 * 6)) { // 지난시간을 초로 계산해서 적어주시면 됩니다. default : 6시간전
- $cnt++;
- $return = unlink("$session_path/$file");
- echo "\n";
-
- flush();
-
- if ($cnt%10==0)
- echo "\n";
- }
-}
-echo "\n";
-?>
\ No newline at end of file
diff --git a/adm/sms_admin/ajax.sms_write_person.php b/adm/sms_admin/ajax.sms_write_person.php
index 38c8c0b55..5838e9df3 100644
--- a/adm/sms_admin/ajax.sms_write_person.php
+++ b/adm/sms_admin/ajax.sms_write_person.php
@@ -8,9 +8,9 @@ auth_check($auth[$sub_menu], "r");
$g5['title'] = "휴대폰번호 관리";
-if (!$page) $page = 1;
+if ($page < 1) $page = 1;
-if (is_numeric($bg_no))
+if (is_numeric($bg_no))
$sql_group = " and bg_no='$bg_no' ";
else
$sql_group = "";
diff --git a/adm/sms_admin/form_list.php b/adm/sms_admin/form_list.php
index 4e6cae1f5..c62704d98 100644
--- a/adm/sms_admin/form_list.php
+++ b/adm/sms_admin/form_list.php
@@ -11,7 +11,7 @@ $token = get_token();
$g5['title'] = "이모티콘 관리";
-if (!$page) $page = 1;
+if ($page < 1) $page = 1;
if (is_numeric($fg_no))
$sql_group = " and fg_no='$fg_no' ";
diff --git a/adm/sms_admin/form_update.php b/adm/sms_admin/form_update.php
index 5c4046602..9059b91bf 100644
--- a/adm/sms_admin/form_update.php
+++ b/adm/sms_admin/form_update.php
@@ -28,7 +28,7 @@ if ($w == 'u') // 업데이트
if ($fg_no != $res['fg_no']) {
if ($res['fg_no'])
- sql_query("update {$g5['sms5_form_group_table']} set fg_count = fg_count - 1 where fg_no='{$res[fg_no]}'");
+ sql_query("update {$g5['sms5_form_group_table']} set fg_count = fg_count - 1 where fg_no='{$res['fg_no']}'");
sql_query("update {$g5['sms5_form_group_table']} set fg_count = fg_count + 1 where fg_no='$fg_no'");
}
diff --git a/adm/sms_admin/history_list.php b/adm/sms_admin/history_list.php
index 82b6d8326..bb2b10292 100644
--- a/adm/sms_admin/history_list.php
+++ b/adm/sms_admin/history_list.php
@@ -9,7 +9,7 @@ auth_check($auth[$sub_menu], "r");
$g5['title'] = "문자전송 내역";
-if (!$page) $page = 1;
+if ($page < 1) $page = 1;
if ($st && trim($sv))
$sql_search = " and wr_message like '%$sv%' ";
diff --git a/adm/sms_admin/history_member.php b/adm/sms_admin/history_member.php
index a3dcec0d2..71cbe5425 100644
--- a/adm/sms_admin/history_member.php
+++ b/adm/sms_admin/history_member.php
@@ -9,7 +9,7 @@ auth_check($auth[$sub_menu], "r");
$g5['title'] = "문자전송 내역 (회원)";
-if (!$page) $page = 1;
+if ($page < 1) $page = 1;
if ($st && trim($sv))
$sql_search = " and $st like '%$sv%' ";
diff --git a/adm/sms_admin/history_num.php b/adm/sms_admin/history_num.php
index 519f88b99..ce1ca1260 100644
--- a/adm/sms_admin/history_num.php
+++ b/adm/sms_admin/history_num.php
@@ -9,7 +9,7 @@ auth_check($auth[$sub_menu], "r");
$g5['title'] = "문자전송 내역 (번호별)";
-if (!$page) $page = 1;
+if ($page < 1) $page = 1;
if ($st && trim($sv))
$sql_search = " and $st like '%$sv%' ";
diff --git a/adm/sms_admin/history_send.php b/adm/sms_admin/history_send.php
index fe961494d..5494c2e00 100644
--- a/adm/sms_admin/history_send.php
+++ b/adm/sms_admin/history_send.php
@@ -15,7 +15,7 @@ $new_wr_renum = $res['wr_renum'] + 1;
if ($w == 'f')
$sql_flag = " and hs_flag=0 ";
-else
+else
$sql_flag = "";
if ($wr_renum)
@@ -37,9 +37,9 @@ if (!$res['cnt']) {
}
$sql = sql_query("select * from {$g5['sms5_history_table']} where wr_no='$wr_no' $sql_renum $sql_flag");
-while ($res = sql_fetch_array($sql))
+while ($res = sql_fetch_array($sql))
{
- $res'[bk_hp'] = get_hp($res['bk_hp'], 0);
+ $res['bk_hp'] = get_hp($res['bk_hp'], 0);
if ($g5['sms5_demo'])
$res['bk_hp'] = '0100000000';
@@ -61,7 +61,7 @@ $reply = str_replace('-', '', trim($write['wr_reply']));
$result = $SMS->Add($list, $reply, '', '', $write['wr_message'], '', $wr_total);
-if ($result)
+if ($result)
{
$result = $SMS->Send();
@@ -73,7 +73,7 @@ if ($result)
$wr_failure = 0;
$count = 0;
- foreach ($SMS->Result as $result)
+ foreach ($SMS->Result as $result)
{
list($phone, $code) = explode(":", $result);
@@ -103,7 +103,7 @@ if ($result)
}
$wr_failure++;
$hs_flag = 0;
- }
+ }
else
{
$hs_code = $code;
diff --git a/adm/sms_admin/history_view.php b/adm/sms_admin/history_view.php
index 6e29571da..199478d16 100644
--- a/adm/sms_admin/history_view.php
+++ b/adm/sms_admin/history_view.php
@@ -12,7 +12,7 @@ $g5['title'] = "문자전송 상세내역";
if (!is_numeric($wr_no))
alert('전송 고유 번호가 없습니다.');
-if (!$spage) $spage = 1;
+if ($spage < 1) $spage = 1;
if ($sst && trim($ssv))
$sql_search = " and $sst like '%$ssv%' ";
diff --git a/adm/sms_admin/install.php b/adm/sms_admin/install.php
index 0d31874e4..9ea6f2255 100644
--- a/adm/sms_admin/install.php
+++ b/adm/sms_admin/install.php
@@ -16,8 +16,8 @@ include_once(G5_ADMIN_PATH.'/admin.head.php');
//SMS 설정 정보 테이블이 있는지 검사한다.
if( isset($g5['sms5_config_table']) && sql_query(" DESCRIBE {$g5['sms5_config_table']} ", false)) {
if(!$setup){
- echo '";
-flush(); usleep(50000);
+flush(); usleep(50000);
$read_point = -1;
$write_point = 5;
@@ -70,11 +70,11 @@ $sql = " insert into {$g5['sms5_book_group_table']} set bg_name='미분류'";
mysql_query($sql) or die(mysql_error() . "" . $sql);
echo "";
-flush(); usleep(50000);
+flush(); usleep(50000);
//-------------------------------------------------------------------------------------------------
echo "";
-flush(); usleep(50000);
+flush(); usleep(50000);
?>
diff --git a/adm/sms_admin/member_update_run.php b/adm/sms_admin/member_update_run.php
index 1dba4cbf7..8d24ff329 100644
--- a/adm/sms_admin/member_update_run.php
+++ b/adm/sms_admin/member_update_run.php
@@ -21,15 +21,15 @@ $receipt = 0;
// 회원 데이터 마이그레이션
$qry = sql_query("select mb_id, mb_name, mb_hp, mb_sms, mb_leave_date from ".$g5['member_table']." order by mb_datetime");
-while ($res = sql_fetch_array($qry))
+while ($res = sql_fetch_array($qry))
{
- if ($res['mb_leave_date'] != '')
+ if ($res['mb_leave_date'] != '')
$leave++;
else if ($res['mb_hp'] == '')
$hp_empty++;
- else if (is_hp($res['mb_hp']))
+ else if (is_hp($res['mb_hp']))
$hp_yes++ ;
- else
+ else
$hp_no++;
$hp = get_hp($res['mb_hp']);
@@ -45,7 +45,7 @@ while ($res = sql_fetch_array($qry))
$mb_count = $res3['cnt'];
// 회원이 삭제되었다면 휴대폰번호 DB 에서도 삭제한다.
- if ($res['mb_leave_date'])
+ if ($res['mb_leave_date'])
{
sql_query("delete from {$g5['sms5_book_table']} where mb_id='{$res2['mb_id']}'");
@@ -63,15 +63,15 @@ while ($res = sql_fetch_array($qry))
if ($bk_receipt != $res2['bk_receipt']) {
if ($bk_receipt == 1)
$sql_sms = "bg_receipt = bg_receipt + $mb_count, bg_reject = bg_reject - $mb_count";
- else
+ else
$sql_sms = "bg_receipt = bg_receipt - $mb_count, bg_reject = bg_reject + $mb_count";
sql_query("update {$g5['sms5_book_group_table']} set $sql_sms where bg_no='{$res2['bg_no']}'");
}
-
+
if ($bk_receipt) $receipt++;
- sql_query("update {$g5['sms5_book_table']} set $field where mb_id='$res[mb_id]'");
+ sql_query("update {$g5['sms5_book_table']} set $field where mb_id='{$res['mb_id']}'");
}
}
else if ($res['mb_leave_date'] == '') // 기존에 등록되어 있지 않을 경우 추가 (삭제된 회원이 아닐 경우)
diff --git a/adm/sms_admin/num_book.php b/adm/sms_admin/num_book.php
index 8c6e2ee4e..d6aa80d79 100644
--- a/adm/sms_admin/num_book.php
+++ b/adm/sms_admin/num_book.php
@@ -11,7 +11,7 @@ $token = get_token();
$g5['title'] = "휴대폰번호 관리";
-if (!$page) $page = 1;
+if ($page < 1) $page = 1;
if (is_numeric($bg_no))
$sql_group = " and bg_no='$bg_no' ";
diff --git a/adm/sms_admin/num_book_update.php b/adm/sms_admin/num_book_update.php
index edb9dd373..40eec9f4f 100644
--- a/adm/sms_admin/num_book_update.php
+++ b/adm/sms_admin/num_book_update.php
@@ -59,7 +59,7 @@ if ($w=='u') // 업데이트
}
$get_bg_no = $bg_no;
- $go_url = './num_book_write.php?bk_no='.$bk_no.'&w='.$w.'&page='.$page;
+ $go_url = './num_book_write.php?bk_no='.$bk_no.'&w='.$w.'&page='.$page;
if( $is_hp_exist ){ //중복된 회원 휴대폰번호가 있다면
//alert( "중복된 회원 휴대폰번호가 있어서 회원정보에는 반영되지 않았습니다.", $go_url );
goto_url($go_url);
diff --git a/adm/visit_list.php b/adm/visit_list.php
index 60d73f6c9..3b9b9c070 100644
--- a/adm/visit_list.php
+++ b/adm/visit_list.php
@@ -22,7 +22,7 @@ $total_count = $row['cnt'];
$rows = $config['cf_page_rows'];
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
-if ($page == '') $page = 1; // 페이지가 없으면 첫 페이지 (1 페이지)
+if ($page < 1) $page = 1; // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $rows; // 시작 열을 구함
$sql = " select *
diff --git a/adm/visit_search.php b/adm/visit_search.php
index 0419c72a6..636304de2 100644
--- a/adm/visit_search.php
+++ b/adm/visit_search.php
@@ -57,7 +57,7 @@ $listall = '처음'; //페이지 처음
$rows = $config['cf_page_rows'];
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
- if ($page == "") $page = 1; // 페이지가 없으면 첫 페이지 (1 페이지)
+ if ($page < 1) $page = 1; // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $rows; // 시작 열을 구함
$sql = " select *
diff --git a/bbs/current_connect.php b/bbs/current_connect.php
index f9331a070..686522564 100644
--- a/bbs/current_connect.php
+++ b/bbs/current_connect.php
@@ -18,7 +18,7 @@ for ($i=0; $row=sql_fetch_array($result); $i++) {
$list[$i]['name'] = get_sideview($row['mb_id'], cut_str($row['mb_nick'], $config['cf_cut_name']), $row['mb_email'], $row['mb_homepage']);
} else {
if ($is_admin)
- $list[$i]['name'] = $row[lo_ip];
+ $list[$i]['name'] = $row['lo_ip'];
else
$list[$i]['name'] = preg_replace("/([0-9]+).([0-9]+).([0-9]+).([0-9]+)/", G5_IP_DISPLAY, $row['lo_ip']);
}
diff --git a/bbs/email_stop.php b/bbs/email_stop.php
index 8e0a9bfff..3635bb361 100644
--- a/bbs/email_stop.php
+++ b/bbs/email_stop.php
@@ -1,15 +1,15 @@
", $content);
+ $content = str_replace("\n", " ", $content);
}
// html 이면
diff --git a/bbs/link.php b/bbs/link.php
index 1ba9f8fee..e74536ca9 100644
--- a/bbs/link.php
+++ b/bbs/link.php
@@ -1,23 +1,23 @@
'
."\n".' >'
- ."\n".' >'.preg_replace("/\n/", "\n> ", get_text($row['me_memo'], 0))
+ ."\n".' >'.str_replace("\n", "\n> ", get_text($row['me_memo'], 0))
."\n".' >'
.' >';
diff --git a/bbs/new.php b/bbs/new.php
index d91c0a8e2..66a10188b 100644
--- a/bbs/new.php
+++ b/bbs/new.php
@@ -52,7 +52,7 @@ for ($i=0; $row=sql_fetch_array($result); $i++) {
// 원글
$comment = "";
$comment_link = "";
- $row2 = sql_fetch(" select * from {$tmp_write_table} where wr_id = '$row[wr_id]' ");
+ $row2 = sql_fetch(" select * from {$tmp_write_table} where wr_id = '{$row['wr_id']}' ");
$list[$i] = $row2;
$name = get_sideview($row2['mb_id'], cut_str($row2['wr_name'], $config['cf_cut_name']), $row2['wr_email'], $row2['wr_homepage']);
diff --git a/bbs/new_delete.php b/bbs/new_delete.php
index 6358d4885..e3df24ce8 100644
--- a/bbs/new_delete.php
+++ b/bbs/new_delete.php
@@ -44,7 +44,7 @@ for($i=0;$i메일인증을 받지 못한 경우 회원정보의 메일주소를 변경 할 수 있습니다.
- |