Merge branch 'master' of github.com:gnuboard/g5

This commit is contained in:
whitedot
2014-03-28 11:15:43 +09:00
59 changed files with 171 additions and 191 deletions

View File

@ -35,7 +35,7 @@ $total_count = $row['cnt'];
$rows = $config['cf_page_rows']; $rows = $config['cf_page_rows'];
$total_page = ceil($total_count / $rows); // 전체 페이지 계산 $total_page = ceil($total_count / $rows); // 전체 페이지 계산
if ($page == "") $page = 1; // 페이지가 없으면 첫 페이지 (1 페이지) if ($page < 1) $page = 1; // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $rows; // 시작 열을 구함 $from_record = ($page - 1) * $rows; // 시작 열을 구함
$sql = " select * $sql = " select *

View File

@ -5,7 +5,6 @@ include_once("./_common.php");
auth_check($auth[$sub_menu], 'w'); auth_check($auth[$sub_menu], 'w');
$g5['title'] = '게시판 복사'; $g5['title'] = '게시판 복사';
$administrator = 1;
include_once(G5_PATH.'/head.sub.php'); include_once(G5_PATH.'/head.sub.php');
?> ?>

View File

@ -654,12 +654,6 @@ $frm_submit .= '</div>';
<label for="chk_all_upload_count">전체적용</label> <label for="chk_all_upload_count">전체적용</label>
</td> </td>
</tr> </tr>
<?php
$upload_max_filesize = ini_get('upload_max_filesize');
if (!preg_match("/([m|M])$/", $upload_max_filesize)) {
$upload_max_filesize = (int)($upload_max_filesize / 1048576);
}
?>
<tr> <tr>
<th scope="row"><label for="bo_upload_size">파일 업로드 용량<strong class="sound_only">필수</strong></label></th> <th scope="row"><label for="bo_upload_size">파일 업로드 용량<strong class="sound_only">필수</strong></label></th>
<td> <td>

View File

@ -195,14 +195,14 @@ if ($w == '') {
$bo_notice = ""; $bo_notice = "";
$lf = ""; $lf = "";
if ($board['bo_notice']) { if ($board['bo_notice']) {
$tmp_array = explode("\n", $board['bo_notice']); $tmp_array = explode(",", $board['bo_notice']);
for ($i=0; $i<count($tmp_array); $i++) { for ($i=0; $i<count($tmp_array); $i++) {
$tmp_wr_id = trim($tmp_array[$i]); $tmp_wr_id = trim($tmp_array[$i]);
$row = sql_fetch(" select count(*) as cnt from {$g5['write_prefix']}{$bo_table} where wr_id = '{$tmp_wr_id}' "); $row = sql_fetch(" select count(*) as cnt from {$g5['write_prefix']}{$bo_table} where wr_id = '{$tmp_wr_id}' ");
if ($row['cnt']) if ($row['cnt'])
{ {
$bo_notice .= $lf . $tmp_wr_id; $bo_notice .= $lf . $tmp_wr_id;
$lf = "\n"; $lf = ",";
} }
} }
} }

View File

@ -40,7 +40,7 @@ $total_count = $row['cnt'];
$rows = $config['cf_page_rows']; $rows = $config['cf_page_rows'];
$total_page = ceil($total_count / $rows); // 전체 페이지 계산 $total_page = ceil($total_count / $rows); // 전체 페이지 계산
if ($page == "") { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지) if ($page < 1) { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $rows; // 시작 열을 구함 $from_record = ($page - 1) * $rows; // 시작 열을 구함
$sql = " select * {$sql_common} {$sql_search} {$sql_order} limit {$from_record}, {$rows} "; $sql = " select * {$sql_common} {$sql_search} {$sql_order} limit {$from_record}, {$rows} ";

View File

@ -44,7 +44,7 @@ $total_count = $row['cnt'];
$rows = $config['cf_page_rows']; $rows = $config['cf_page_rows'];
$total_page = ceil($total_count / $rows); // 전체 페이지 계산 $total_page = ceil($total_count / $rows); // 전체 페이지 계산
if (!$page) $page = 1; // 페이지가 없으면 첫 페이지 (1 페이지) if ($page < 1) $page = 1; // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $rows; // 시작 열을 구함 $from_record = ($page - 1) * $rows; // 시작 열을 구함
$sql = " select * {$sql_common} {$sql_search} {$sql_order} limit {$from_record}, {$rows} "; $sql = " select * {$sql_common} {$sql_search} {$sql_order} limit {$from_record}, {$rows} ";

View File

@ -39,7 +39,7 @@ $total_count = $row['cnt'];
$rows = $config['cf_page_rows']; $rows = $config['cf_page_rows'];
$total_page = ceil($total_count / $rows); // 전체 페이지 계산 $total_page = ceil($total_count / $rows); // 전체 페이지 계산
if ($page == "") $page = 1; // 페이지가 없으면 첫 페이지 (1 페이지) if ($page < 1) $page = 1; // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $rows; // 시작 열을 구함 $from_record = ($page - 1) * $rows; // 시작 열을 구함
$sql = " select * $sql = " select *

View File

@ -42,7 +42,7 @@ $total_count = $row['cnt'];
$rows = $config['cf_page_rows']; $rows = $config['cf_page_rows'];
$total_page = ceil($total_count / $rows); // 전체 페이지 계산 $total_page = ceil($total_count / $rows); // 전체 페이지 계산
if ($page == "") { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지) if ($page < 1) { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $rows; // 시작 열을 구함 $from_record = ($page - 1) * $rows; // 시작 열을 구함
$sql = "select * $sql_common order by co_id limit $from_record, {$config['cf_page_rows']} "; $sql = "select * $sql_common order by co_id limit $from_record, {$config['cf_page_rows']} ";

View File

@ -56,7 +56,7 @@ $total_count = $row['cnt'];
$rows = $config['cf_page_rows']; $rows = $config['cf_page_rows'];
$total_page = ceil($total_count / $rows); // 전체 페이지 계산 $total_page = ceil($total_count / $rows); // 전체 페이지 계산
if ($page == "") { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지) if ($page < 1) { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $rows; // 시작 열을 구함 $from_record = ($page - 1) * $rows; // 시작 열을 구함
$sql = "select * $sql_common order by fm_order, fm_id limit $from_record, {$config['cf_page_rows']} "; $sql = "select * $sql_common order by fm_order, fm_id limit $from_record, {$config['cf_page_rows']} ";

View File

@ -8,19 +8,19 @@ auth_check($auth[$sub_menu], "d");
$mb = get_member($_POST['mb_id']); $mb = get_member($_POST['mb_id']);
if (!$mb[mb_id]) if (!$mb['mb_id'])
alert("회원자료가 존재하지 않습니다."); alert("회원자료가 존재하지 않습니다.");
else if ($member[mb_id] == $mb[mb_id]) else if ($member['mb_id'] == $mb['mb_id'])
alert("로그인 중인 관리자는 삭제 할 수 없습니다."); alert("로그인 중인 관리자는 삭제 할 수 없습니다.");
else if (is_admin($mb[mb_id]) == "super") else if (is_admin($mb['mb_id']) == "super")
alert("최고 관리자는 삭제할 수 없습니다."); alert("최고 관리자는 삭제할 수 없습니다.");
else if ($mb[mb_level] >= $member[mb_level]) else if ($mb['mb_level'] >= $member['mb_level'])
alert("자신보다 권한이 높거나 같은 회원은 삭제할 수 없습니다."); alert("자신보다 권한이 높거나 같은 회원은 삭제할 수 없습니다.");
check_token(); check_token();
// 회원자료 삭제 // 회원자료 삭제
member_delete($mb[mb_id]); member_delete($mb['mb_id']);
if ($url) if ($url)
goto_url("{$url}?$qstr&amp;w=u&amp;mb_id=$mb_id"); goto_url("{$url}?$qstr&amp;w=u&amp;mb_id=$mb_id");

View File

@ -43,7 +43,7 @@ $total_count = $row['cnt'];
$rows = $config['cf_page_rows']; $rows = $config['cf_page_rows'];
$total_page = ceil($total_count / $rows); // 전체 페이지 계산 $total_page = ceil($total_count / $rows); // 전체 페이지 계산
if (!$page) $page = 1; // 페이지가 없으면 첫 페이지 (1 페이지) if ($page < 1) $page = 1; // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $rows; // 시작 열을 구함 $from_record = ($page - 1) * $rows; // 시작 열을 구함
// 탈퇴회원수 // 탈퇴회원수

View File

@ -17,16 +17,16 @@ for ($i=0; $i<count($chk); $i++)
$mb = get_member($_POST['mb_id'][$k]); $mb = get_member($_POST['mb_id'][$k]);
if (!$mb[mb_id]) { if (!$mb[mb_id]) {
$msg .= "$mb[mb_id] : 회원자료가 존재하지 않습니다.\\n"; $msg .= "{$mb['mb_id']} : 회원자료가 존재하지 않습니다.\\n";
} else if ($member[mb_id] == $mb[mb_id]) { } else if ($member['mb_id'] == $mb['mb_id']) {
$msg .= "$mb[mb_id] : 로그인 중인 관리자는 삭제 할 수 없습니다.\\n"; $msg .= "{$mb['mb_id']} : 로그인 중인 관리자는 삭제 할 수 없습니다.\\n";
} else if (is_admin($mb[mb_id]) == "super") { } else if (is_admin($mb['mb_id']) == "super") {
$msg .= "$mb[mb_id] : 최고 관리자는 삭제할 수 없습니다.\\n"; $msg .= "{$mb['mb_id']} : 최고 관리자는 삭제할 수 없습니다.\\n";
} else if ($is_admin != "super" && $mb[mb_level] >= $member[mb_level]) { } else if ($is_admin != "super" && $mb['mb_level'] >= $member['mb_level']) {
$msg .= "$mb[mb_id] : 자신보다 권한이 높거나 같은 회원은 삭제할 수 없습니다.\\n"; $msg .= "{$mb['mb_id']} : 자신보다 권한이 높거나 같은 회원은 삭제할 수 없습니다.\\n";
} else { } else {
// 회원자료 삭제 // 회원자료 삭제
member_delete($mb[mb_id]); member_delete($mb['mb_id']);
} }
} }

View File

@ -38,7 +38,7 @@ $total_count = $row['cnt'];
$rows = $config['cf_page_rows']; $rows = $config['cf_page_rows'];
$total_page = ceil($total_count / $rows); // 전체 페이지 계산 $total_page = ceil($total_count / $rows); // 전체 페이지 계산
if ($page == '') $page = 1; // 페이지가 없으면 첫 페이지 (1 페이지) if ($page < 1) $page = 1; // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $rows; // 시작 열을 구함 $from_record = ($page - 1) * $rows; // 시작 열을 구함
$sql = " select * $sql = " select *

View File

@ -34,7 +34,7 @@ $total_count = $row['cnt'];
$rows = $config['cf_page_rows']; $rows = $config['cf_page_rows'];
$total_page = ceil($total_count / $rows); // 전체 페이지 계산 $total_page = ceil($total_count / $rows); // 전체 페이지 계산
if ($page == '') $page = 1; // 페이지가 없으면 첫 페이지 (1 페이지) if ($page < 1) $page = 1; // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $rows; // 시작 열을 구함 $from_record = ($page - 1) * $rows; // 시작 열을 구함
$sql = " select * $sql = " select *

View File

@ -47,7 +47,7 @@ $total_count = $row['cnt'];
$rows = $config['cf_page_rows']; $rows = $config['cf_page_rows'];
$total_page = ceil($total_count / $rows); // 전체 페이지 계산 $total_page = ceil($total_count / $rows); // 전체 페이지 계산
if ($page == '') { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지) if ($page < 1) { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $rows; // 시작 열을 구함 $from_record = ($page - 1) * $rows; // 시작 열을 구함
$sql = " select * $sql = " select *

View File

@ -20,7 +20,7 @@ $total_count = mysql_num_rows($result);
$rows = $config['cf_page_rows']; $rows = $config['cf_page_rows'];
$total_page = ceil($total_count / $rows); // 전체 페이지 계산 $total_page = ceil($total_count / $rows); // 전체 페이지 계산
if ($page == '') { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지) if ($page < 1) { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $rows; // 시작 열을 구함 $from_record = ($page - 1) * $rows; // 시작 열을 구함
$sql = " select pp_word, count(*) as cnt {$sql_common} {$sql_search} {$sql_group} {$sql_order} limit {$from_record}, {$rows} "; $sql = " select pp_word, count(*) as cnt {$sql_common} {$sql_search} {$sql_group} {$sql_order} limit {$from_record}, {$rows} ";

View File

@ -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 "'완료' 메세지가 나오기 전에 프로그램의 실행을 중지하지 마십시오.<br><br>";
echo "<span id='ct'></span>";
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 "<script>document.getElementById('ct').innerHTML += '$session_path/$file<br/>';</script>\n";
flush();
if ($cnt%10==0)
echo "<script>document.getElementById('ct').innerHTML = '';</script>\n";
}
}
echo "<script>document.getElementById('ct').innerHTML += '<br><br>세션데이터 {$cnt}건 삭제 완료.<br><br>프로그램의 실행을 끝마치셔도 좋습니다.';</script>\n";
?>

View File

@ -8,7 +8,7 @@ auth_check($auth[$sub_menu], "r");
$g5['title'] = "휴대폰번호 관리"; $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' "; $sql_group = " and bg_no='$bg_no' ";

View File

@ -11,7 +11,7 @@ $token = get_token();
$g5['title'] = "이모티콘 관리"; $g5['title'] = "이모티콘 관리";
if (!$page) $page = 1; if ($page < 1) $page = 1;
if (is_numeric($fg_no)) if (is_numeric($fg_no))
$sql_group = " and fg_no='$fg_no' "; $sql_group = " and fg_no='$fg_no' ";

View File

@ -28,7 +28,7 @@ if ($w == 'u') // 업데이트
if ($fg_no != $res['fg_no']) { if ($fg_no != $res['fg_no']) {
if ($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'"); sql_query("update {$g5['sms5_form_group_table']} set fg_count = fg_count + 1 where fg_no='$fg_no'");
} }

View File

@ -9,7 +9,7 @@ auth_check($auth[$sub_menu], "r");
$g5['title'] = "문자전송 내역"; $g5['title'] = "문자전송 내역";
if (!$page) $page = 1; if ($page < 1) $page = 1;
if ($st && trim($sv)) if ($st && trim($sv))
$sql_search = " and wr_message like '%$sv%' "; $sql_search = " and wr_message like '%$sv%' ";

View File

@ -9,7 +9,7 @@ auth_check($auth[$sub_menu], "r");
$g5['title'] = "문자전송 내역 (회원)"; $g5['title'] = "문자전송 내역 (회원)";
if (!$page) $page = 1; if ($page < 1) $page = 1;
if ($st && trim($sv)) if ($st && trim($sv))
$sql_search = " and $st like '%$sv%' "; $sql_search = " and $st like '%$sv%' ";

View File

@ -9,7 +9,7 @@ auth_check($auth[$sub_menu], "r");
$g5['title'] = "문자전송 내역 (번호별)"; $g5['title'] = "문자전송 내역 (번호별)";
if (!$page) $page = 1; if ($page < 1) $page = 1;
if ($st && trim($sv)) if ($st && trim($sv))
$sql_search = " and $st like '%$sv%' "; $sql_search = " and $st like '%$sv%' ";

View File

@ -39,7 +39,7 @@ if (!$res['cnt']) {
$sql = sql_query("select * from {$g5['sms5_history_table']} where wr_no='$wr_no' $sql_renum $sql_flag"); $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']) if ($g5['sms5_demo'])
$res['bk_hp'] = '0100000000'; $res['bk_hp'] = '0100000000';

View File

@ -12,7 +12,7 @@ $g5['title'] = "문자전송 상세내역";
if (!is_numeric($wr_no)) if (!is_numeric($wr_no))
alert('전송 고유 번호가 없습니다.'); alert('전송 고유 번호가 없습니다.');
if (!$spage) $spage = 1; if ($spage < 1) $spage = 1;
if ($sst && trim($ssv)) if ($sst && trim($ssv))
$sql_search = " and $sst like '%$ssv%' "; $sql_search = " and $sst like '%$ssv%' ";

View File

@ -17,7 +17,7 @@ include_once(G5_ADMIN_PATH.'/admin.head.php');
if( isset($g5['sms5_config_table']) && sql_query(" DESCRIBE {$g5['sms5_config_table']} ", false)) { if( isset($g5['sms5_config_table']) && sql_query(" DESCRIBE {$g5['sms5_config_table']} ", false)) {
if(!$setup){ if(!$setup){
echo '<script> echo '<script>
var answer = confirm("이미 sms5가 설치되어 있습니다.새로 설치 할 경우 db 자료가 망실됩니다. 새로 설치하시겠습니까?"); var answer = confirm("이미 SMS5가 설치되어 있습니다.새로 설치 할 경우 DB 자료가 망실됩니다. 새로 설치하시겠습니까?");
if (answer){ if (answer){
document.hidden_form.setup.value = "1"; document.hidden_form.setup.value = "1";
document.hidden_form.submit(); document.hidden_form.submit();

View File

@ -71,7 +71,7 @@ while ($res = sql_fetch_array($qry))
if ($bk_receipt) $receipt++; 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'] == '') // 기존에 등록되어 있지 않을 경우 추가 (삭제된 회원이 아닐 경우) else if ($res['mb_leave_date'] == '') // 기존에 등록되어 있지 않을 경우 추가 (삭제된 회원이 아닐 경우)

View File

@ -11,7 +11,7 @@ $token = get_token();
$g5['title'] = "휴대폰번호 관리"; $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' "; $sql_group = " and bg_no='$bg_no' ";

View File

@ -59,7 +59,7 @@ if ($w=='u') // 업데이트
} }
$get_bg_no = $bg_no; $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.'&amp;w='.$w.'&amp;page='.$page;
if( $is_hp_exist ){ //중복된 회원 휴대폰번호가 있다면 if( $is_hp_exist ){ //중복된 회원 휴대폰번호가 있다면
//alert( "중복된 회원 휴대폰번호가 있어서 회원정보에는 반영되지 않았습니다.", $go_url ); //alert( "중복된 회원 휴대폰번호가 있어서 회원정보에는 반영되지 않았습니다.", $go_url );
goto_url($go_url); goto_url($go_url);

View File

@ -22,7 +22,7 @@ $total_count = $row['cnt'];
$rows = $config['cf_page_rows']; $rows = $config['cf_page_rows'];
$total_page = ceil($total_count / $rows); // 전체 페이지 계산 $total_page = ceil($total_count / $rows); // 전체 페이지 계산
if ($page == '') $page = 1; // 페이지가 없으면 첫 페이지 (1 페이지) if ($page < 1) $page = 1; // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $rows; // 시작 열을 구함 $from_record = ($page - 1) * $rows; // 시작 열을 구함
$sql = " select * $sql = " select *

View File

@ -57,7 +57,7 @@ $listall = '<a href="'.$_SERVER['PHP_SELF'].'">처음</a>'; //페이지 처음
$rows = $config['cf_page_rows']; $rows = $config['cf_page_rows'];
$total_page = ceil($total_count / $rows); // 전체 페이지 계산 $total_page = ceil($total_count / $rows); // 전체 페이지 계산
if ($page == "") $page = 1; // 페이지가 없으면 첫 페이지 (1 페이지) if ($page < 1) $page = 1; // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $rows; // 시작 열을 구함 $from_record = ($page - 1) * $rows; // 시작 열을 구함
$sql = " select * $sql = " select *

View File

@ -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']); $list[$i]['name'] = get_sideview($row['mb_id'], cut_str($row['mb_nick'], $config['cf_cut_name']), $row['mb_email'], $row['mb_homepage']);
} else { } else {
if ($is_admin) if ($is_admin)
$list[$i]['name'] = $row[lo_ip]; $list[$i]['name'] = $row['lo_ip'];
else else
$list[$i]['name'] = preg_replace("/([0-9]+).([0-9]+).([0-9]+).([0-9]+)/", G5_IP_DISPLAY, $row['lo_ip']); $list[$i]['name'] = preg_replace("/([0-9]+).([0-9]+).([0-9]+).([0-9]+)/", G5_IP_DISPLAY, $row['lo_ip']);
} }

View File

@ -1,15 +1,15 @@
<?php <?php
include_once('./_common.php'); include_once('./_common.php');
$sql = " select mb_id, mb_email, mb_datetime from {$g5[member_table]} where mb_id = '{$mb_id}' "; $sql = " select mb_id, mb_email, mb_datetime from {$g5['member_table']} where mb_id = '{$mb_id}' ";
$row = sql_fetch($sql); $row = sql_fetch($sql);
if (!$row[mb_id]) if (!$row['mb_id'])
alert('존재하는 회원이 아닙니다.', G5_PATH); alert('존재하는 회원이 아닙니다.', G5_URL);
if ($mb_md5) { if ($mb_md5) {
$tmp_md5 = md5($row[mb_id].$row[mb_email].$row[mb_datetime]); $tmp_md5 = md5($row['mb_id'].$row['mb_email'].$row['mb_datetime']);
if ($mb_md5 == $tmp_md5) { if ($mb_md5 == $tmp_md5) {
sql_query(" update {$g5[member_table]} set mb_mailling = 0 where mb_id = '{$mb_id}' "); sql_query(" update {$g5['member_table']} set mb_mailling = 0 where mb_id = '{$mb_id}' ");
alert('정보메일을 보내지 않도록 수신거부 하였습니다.', G5_URL); alert('정보메일을 보내지 않도록 수신거부 하였습니다.', G5_URL);
} }

View File

@ -28,7 +28,7 @@ for ($i=1; $i<=$attach; $i++) {
$content = stripslashes($content); $content = stripslashes($content);
if ($type == 2) { if ($type == 2) {
$type = 1; $type = 1;
$content = preg_replace("/\n/", "<br>", $content); $content = str_replace("\n", "<br>", $content);
} }
// html 이면 // html 이면

View File

@ -1,14 +1,14 @@
<?php <?php
include_once('./_common.php'); include_once('./_common.php');
$html_title = '링크 &gt; '.conv_subject($write[wr_subject], 255); $html_title = '링크 &gt; '.conv_subject($write['wr_subject'], 255);
if (!($bo_table && $wr_id && $no)) if (!($bo_table && $wr_id && $no))
alert_close('값이 제대로 넘어오지 않았습니다.'); alert_close('값이 제대로 넘어오지 않았습니다.');
// SQL Injection 예방 // SQL Injection 예방
$row = sql_fetch(" select count(*) as cnt from {$g5[write_prefix]}{$bo_table} ", FALSE); $row = sql_fetch(" select count(*) as cnt from {$g5['write_prefix']}{$bo_table} ", FALSE);
if (!$row[cnt]) if (!$row['cnt'])
alert_close('존재하는 게시판이 아닙니다.'); alert_close('존재하는 게시판이 아닙니다.');
if (!$write['wr_link'.$no]) if (!$write['wr_link'.$no])
@ -17,7 +17,7 @@ if (!$write['wr_link'.$no])
$ss_name = 'ss_link_'.$bo_table.'_'.$wr_id.'_'.$no; $ss_name = 'ss_link_'.$bo_table.'_'.$wr_id.'_'.$no;
if (empty($_SESSION[$ss_name])) if (empty($_SESSION[$ss_name]))
{ {
$sql = " update {$g5[write_prefix]}{$bo_table} set wr_link{$no}_hit = wr_link{$no}_hit + 1 where wr_id = '{$wr_id}' "; $sql = " update {$g5['write_prefix']}{$bo_table} set wr_link{$no}_hit = wr_link{$no}_hit + 1 where wr_id = '{$wr_id}' ";
sql_query($sql); sql_query($sql);
set_session($ss_name, true); set_session($ss_name, true);

View File

@ -56,7 +56,7 @@ if ($auto_login) {
// 자동로그인 --------------------------- // 자동로그인 ---------------------------
// 쿠키 한달간 저장 // 쿠키 한달간 저장
$key = md5($_SERVER['SERVER_ADDR'] . $_SERVER['REMOTE_ADDR'] . $_SERVER['HTTP_USER_AGENT'] . $mb['mb_password']); $key = md5($_SERVER['SERVER_ADDR'] . $_SERVER['REMOTE_ADDR'] . $_SERVER['HTTP_USER_AGENT'] . $mb['mb_password']);
set_cookie('ck_mb_id', $mb[mb_id], 86400 * 31); set_cookie('ck_mb_id', $mb['mb_id'], 86400 * 31);
set_cookie('ck_auto', $key, 86400 * 31); set_cookie('ck_auto', $key, 86400 * 31);
// 자동로그인 end --------------------------- // 자동로그인 end ---------------------------
} else { } else {

View File

@ -1,25 +1,25 @@
<?php <?php
include_once('./_common.php'); include_once('./_common.php');
if (!$member[mb_id]) if (!$is_member)
alert('회원만 이용하실 수 있습니다.'); alert('회원만 이용하실 수 있습니다.');
$me_id = (int)$_REQUEST['me_id']; $me_id = (int)$_REQUEST['me_id'];
$sql = " select * from {$g5[memo_table]} where me_id = '{$me_id}' "; $sql = " select * from {$g5['memo_table']} where me_id = '{$me_id}' ";
$row = sql_fetch($sql); $row = sql_fetch($sql);
if (!$row[mb_read_datetime][0]) // 메모 받기전이면 if (!$row['mb_read_datetime'][0]) // 메모 받기전이면
{ {
$sql = " update {$g5[member_table]} $sql = " update {$g5['member_table']}
set mb_memo_call = '' set mb_memo_call = ''
where mb_id = '{$row[me_recv_mb_id]}' where mb_id = '{$row['me_recv_mb_id']}'
and mb_memo_call = '{$row[me_send_mb_id]}' "; and mb_memo_call = '{$row['me_send_mb_id']}' ";
sql_query($sql); sql_query($sql);
} }
$sql = " delete from {$g5[memo_table]} $sql = " delete from {$g5['memo_table']}
where me_id = '{$me_id}' where me_id = '{$me_id}'
and (me_recv_mb_id = '{$member[mb_id]}' or me_send_mb_id = '{$member[mb_id]}') "; and (me_recv_mb_id = '{$member['mb_id']}' or me_send_mb_id = '{$member['mb_id']}') ";
sql_query($sql); sql_query($sql);
goto_url('./memo.php?kind='.$kind); goto_url('./memo.php?kind='.$kind);

View File

@ -25,7 +25,7 @@ if ($me_recv_mb_id)
{ {
$content = "\n\n\n".' >' $content = "\n\n\n".' >'
."\n".' >' ."\n".' >'
."\n".' >'.preg_replace("/\n/", "\n> ", get_text($row['me_memo'], 0)) ."\n".' >'.str_replace("\n", "\n> ", get_text($row['me_memo'], 0))
."\n".' >' ."\n".' >'
.' >'; .' >';

View File

@ -52,7 +52,7 @@ for ($i=0; $row=sql_fetch_array($result); $i++) {
// 원글 // 원글
$comment = ""; $comment = "";
$comment_link = ""; $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; $list[$i] = $row2;
$name = get_sideview($row2['mb_id'], cut_str($row2['wr_name'], $config['cf_cut_name']), $row2['wr_email'], $row2['wr_homepage']); $name = get_sideview($row2['mb_id'], cut_str($row2['wr_name'], $config['cf_cut_name']), $row2['wr_email'], $row2['wr_homepage']);

View File

@ -44,7 +44,7 @@ for($i=0;$i<count($_POST['chk_bn_id']);$i++)
if (!$row['wr_is_comment']) if (!$row['wr_is_comment'])
{ {
if (!delete_point($row['mb_id'], $bo_table, $row['wr_id'], '쓰기')) if (!delete_point($row['mb_id'], $bo_table, $row['wr_id'], '쓰기'))
insert_point($row['mb_id'], $board['bo_write_point'] * (-1), "{$board['bo_subject']} $row[wr_id] 글삭제"); insert_point($row['mb_id'], $board['bo_write_point'] * (-1), "{$board['bo_subject']} {$row['wr_id']} 글삭제");
// 업로드된 파일이 있다면 파일삭제 // 업로드된 파일이 있다면 파일삭제
$sql2 = " select * from {$g5['board_file_table']} where bo_table = '$bo_table' and wr_id = '{$row['wr_id']}' "; $sql2 = " select * from {$g5['board_file_table']} where bo_table = '$bo_table' and wr_id = '{$row['wr_id']}' ";
@ -82,11 +82,16 @@ for($i=0;$i<count($_POST['chk_bn_id']);$i++)
sql_query(" delete from {$g5['scrap_table']} where bo_table = '$bo_table' and wr_id = '{$write['wr_id']}' "); sql_query(" delete from {$g5['scrap_table']} where bo_table = '$bo_table' and wr_id = '{$write['wr_id']}' ");
// 공지사항 삭제 // 공지사항 삭제
$notice_array = explode("\n", trim($board['bo_notice'])); $notice_array = explode(",", trim($board['bo_notice']));
$bo_notice = ""; $bo_notice = "";
for ($k=0; $k<count($notice_array); $k++) $lf = '';
for ($k=0; $k<count($notice_array); $k++) {
if ((int)$write['wr_id'] != (int)$notice_array[$k]) if ((int)$write['wr_id'] != (int)$notice_array[$k])
$bo_notice .= $notice_array[$k] . "\n"; $bo_notice .= $nl.$notice_array[$k];
if($bo_notice)
$lf = ',';
}
$bo_notice = trim($bo_notice); $bo_notice = trim($bo_notice);
sql_query(" update {$g5['board_table']} set bo_notice = '$bo_notice' where bo_table = '$bo_table' "); sql_query(" update {$g5['board_table']} set bo_notice = '$bo_notice' where bo_table = '$bo_table' ");

View File

@ -6,12 +6,12 @@ if ($w == 's') {
$wr = get_write($write_table, $wr_id); $wr = get_write($write_table, $wr_id);
if (sql_password($wr_password) != $wr[wr_password]) if (sql_password($wr_password) != $wr['wr_password'])
alert('비밀번호가 틀립니다.'); alert('비밀번호가 틀립니다.');
// 세션에 아래 정보를 저장. 하위번호는 비밀번호없이 보아야 하기 때문임. // 세션에 아래 정보를 저장. 하위번호는 비밀번호없이 보아야 하기 때문임.
//$ss_name = 'ss_secret.'_'.$bo_table.'_'.$wr_id'; //$ss_name = 'ss_secret.'_'.$bo_table.'_'.$wr_id';
$ss_name = 'ss_secret_'.$bo_table.'_'.$wr[wr_num]; $ss_name = 'ss_secret_'.$bo_table.'_'.$wr['wr_num'];
//set_session("ss_secret", "$bo_table|$wr[wr_num]"); //set_session("ss_secret", "$bo_table|$wr[wr_num]");
set_session($ss_name, TRUE); set_session($ss_name, TRUE);

View File

@ -8,12 +8,12 @@ if ($w == '')
if (!$po[po_id]) if (!$po[po_id])
alert('po_id 값이 제대로 넘어오지 않았습니다.'); alert('po_id 값이 제대로 넘어오지 않았습니다.');
$tmp_row = sql_fetch(" select max(pc_id) as max_pc_id from {$g5[poll_etc_table]} "); $tmp_row = sql_fetch(" select max(pc_id) as max_pc_id from {$g5['poll_etc_table']} ");
$pc_id = $tmp_row[max_pc_id] + 1; $pc_id = $tmp_row['max_pc_id'] + 1;
$sql = " insert into {$g5[poll_etc_table]} $sql = " insert into {$g5['poll_etc_table']}
( pc_id, po_id, mb_id, pc_name, pc_idea, pc_datetime ) ( pc_id, po_id, mb_id, pc_name, pc_idea, pc_datetime )
values ( '{$pc_id}', '{$po_id}', '{$member[mb_id]}', '{$pc_name}', '{$pc_idea}', '".G5_TIME_YMDHIS."' ) "; values ( '{$pc_id}', '{$po_id}', '{$member['mb_id']}', '{$pc_name}', '{$pc_idea}', '".G5_TIME_YMDHIS."' ) ";
sql_query($sql); sql_query($sql);
$pc_idea = stripslashes($pc_idea); $pc_idea = stripslashes($pc_idea);
@ -42,9 +42,9 @@ if ($w == '')
} }
else if ($w == 'd') else if ($w == 'd')
{ {
if ($member[mb_id] || $is_admin == 'super') if ($member['mb_id'] || $is_admin == 'super')
{ {
$sql = " delete from {$g5[poll_etc_table]} where pc_id = '{$pc_id}' "; $sql = " delete from {$g5['poll_etc_table']} where pc_id = '{$pc_id}' ";
if (!$is_admin) if (!$is_admin)
$sql .= " and mb_id = '{$member['mb_id']}' "; $sql .= " and mb_id = '{$member['mb_id']}' ";
sql_query($sql); sql_query($sql);

View File

@ -66,7 +66,7 @@ if(is_file($skin_file)) {
$page_rows = G5_IS_MOBILE ? $qaconfig['qa_mobile_page_rows'] : $qaconfig['qa_page_rows']; $page_rows = G5_IS_MOBILE ? $qaconfig['qa_mobile_page_rows'] : $qaconfig['qa_page_rows'];
$total_page = ceil($total_count / $page_rows); // 전체 페이지 계산 $total_page = ceil($total_count / $page_rows); // 전체 페이지 계산
if (!$page) { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지) if ($page < 1) { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $page_rows; // 시작 열을 구함 $from_record = ($page - 1) * $page_rows; // 시작 열을 구함
$sql = " select * $sql = " select *

View File

@ -14,7 +14,7 @@ include_once('./_head.php');
<p>메일인증을 받지 못한 경우 회원정보의 메일주소를 변경 할 수 있습니다.</p> <p>메일인증을 받지 못한 경우 회원정보의 메일주소를 변경 할 수 있습니다.</p>
<form method="post" name="fregister_email" onsubmit="return fregister_email_submit(this);"> <form method="post" name="fregister_email" action="<?php echo G5_HTTPS_BBS_URL.'/register_email_update.php'; ?>" onsubmit="return fregister_email_submit(this);">
<input type="hidden" name="mb_id" value="<?php echo $mb_id; ?>"> <input type="hidden" name="mb_id" value="<?php echo $mb_id; ?>">
<div class="tbl_frm01 tbl_frm"> <div class="tbl_frm01 tbl_frm">
@ -43,7 +43,6 @@ function fregister_email_submit(f)
{ {
<?php echo chk_captcha_js(); ?> <?php echo chk_captcha_js(); ?>
f.action = "<?php echo G5_HTTPS_BBS_URL.'/register_email_update.php'; ?>";
return true; return true;
} }
</script> </script>

View File

@ -51,10 +51,10 @@ if ($w == "") {
if ($is_admin) if ($is_admin)
alert('관리자의 회원정보는 관리자 화면에서 수정해 주십시오.', G5_URL); alert('관리자의 회원정보는 관리자 화면에서 수정해 주십시오.', G5_URL);
if (!$member[mb_id]) if (!$is_member)
alert('로그인 후 이용하여 주십시오.', G5_URL); alert('로그인 후 이용하여 주십시오.', G5_URL);
if ($member[mb_id] != $mb_id) if ($member['mb_id'] != $mb_id)
alert('로그인된 회원과 넘어온 정보가 서로 다릅니다.'); alert('로그인된 회원과 넘어온 정보가 서로 다릅니다.');
/* /*

View File

@ -7,9 +7,14 @@ function specialchars_replace($str, $len=0) {
$str = substr($str, 0, $len); $str = substr($str, 0, $len);
} }
$str = str_replace(array("&", "<", ">"), array("&amp;", "&lt;", "&gt;"), $str);
/*
$str = preg_replace("/&/", "&amp;", $str); $str = preg_replace("/&/", "&amp;", $str);
$str = preg_replace("/</", "&lt;", $str); $str = preg_replace("/</", "&lt;", $str);
$str = preg_replace("/>/", "&gt;", $str); $str = preg_replace("/>/", "&gt;", $str);
*/
return $str; return $str;
} }

View File

@ -7,8 +7,6 @@ if (!$is_member)
$g5['title'] = $member['mb_nick'].'님의 스크랩'; $g5['title'] = $member['mb_nick'].'님의 스크랩';
include_once(G5_PATH.'/head.sub.php'); include_once(G5_PATH.'/head.sub.php');
$list = array();
$sql_common = " from {$g5['scrap_table']} where mb_id = '{$member['mb_id']}' "; $sql_common = " from {$g5['scrap_table']} where mb_id = '{$member['mb_id']}' ";
$sql_order = " order by ms_id desc "; $sql_order = " order by ms_id desc ";
@ -18,7 +16,7 @@ $total_count = $row['cnt'];
$rows = $config['cf_page_rows']; $rows = $config['cf_page_rows'];
$total_page = ceil($total_count / $rows); // 전체 페이지 계산 $total_page = ceil($total_count / $rows); // 전체 페이지 계산
if (!$page) $page = 1; // 페이지가 없으면 첫 페이지 (1 페이지) if ($page < 1) $page = 1; // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $rows; // 시작 열을 구함 $from_record = ($page - 1) * $rows; // 시작 열을 구함
$list = array(); $list = array();

View File

@ -140,7 +140,7 @@ if ($stx) {
$rows = $srows; $rows = $srows;
$total_page = ceil($total_count / $rows); // 전체 페이지 계산 $total_page = ceil($total_count / $rows); // 전체 페이지 계산
if ($page == "") { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지) if ($page < 1) { $page = 1; } // 페이지가 없으면 첫 페이지 (1 페이지)
$from_record = ($page - 1) * $rows; // 시작 열을 구함 $from_record = ($page - 1) * $rows; // 시작 열을 구함
for ($i=0; $i<count($search_table); $i++) { for ($i=0; $i<count($search_table); $i++) {
@ -156,7 +156,7 @@ if ($stx) {
$k=0; $k=0;
for ($idx=$table_index; $idx<count($search_table); $idx++) { for ($idx=$table_index; $idx<count($search_table); $idx++) {
$sql = " select bo_subject from {$g5[board_table]} where bo_table = '{$search_table[$idx]}' "; $sql = " select bo_subject from {$g5['board_table']} where bo_table = '{$search_table[$idx]}' ";
$row = sql_fetch($sql); $row = sql_fetch($sql);
$bo_subject[$idx] = $row['bo_subject']; $bo_subject[$idx] = $row['bo_subject'];

View File

@ -122,7 +122,13 @@ $view['content'] = conv_content($view['wr_content'], $html);
if (strstr($sfl, 'content')) if (strstr($sfl, 'content'))
$view['content'] = search_font($stx, $view['content']); $view['content'] = search_font($stx, $view['content']);
$view['rich_content'] = preg_replace("/{이미지\:([0-9]+)[:]?([^}]*)}/ie", "view_image(\$view, '\\1', '\\2')", $view['content']); //$view['rich_content'] = preg_replace("/{이미지\:([0-9]+)[:]?([^}]*)}/ie", "view_image(\$view, '\\1', '\\2')", $view['content']);
function conv_rich_content($matches)
{
global $view;
return view_image($view, $matches[1], $matches[2]);
}
$view['rich_content'] = preg_replace_callback("/{이미지\:([0-9]+)[:]?([^}]*)}/i", "conv_rich_content", $view['content']);
$is_signature = false; $is_signature = false;
$signature = ''; $signature = '';

View File

@ -355,7 +355,7 @@ if ($w == '') {
$subject = ""; $subject = "";
if (isset($write['wr_subject'])) { if (isset($write['wr_subject'])) {
$subject = preg_replace("/\"/", "&#034;", get_text(cut_str($write['wr_subject'], 255), 0)); $subject = str_replace("\"", "&#034;", get_text(cut_str($write['wr_subject'], 255), 0));
} }
$content = ''; $content = '';
@ -365,7 +365,7 @@ if ($w == '') {
if (!strstr($write['wr_option'], 'html')) { if (!strstr($write['wr_option'], 'html')) {
$content = "\n\n\n &gt; " $content = "\n\n\n &gt; "
."\n &gt; " ."\n &gt; "
."\n &gt; ".preg_replace("/\n/", "\n> ", get_text($write['wr_content'], 0)) ."\n &gt; ".str_replace("\n", "\n> ", get_text($write['wr_content'], 0))
."\n &gt; " ."\n &gt; "
."\n &gt; "; ."\n &gt; ";

View File

@ -2,7 +2,7 @@
/******************************************************************************* /*******************************************************************************
** 공통 변수, 상수, 코드 ** 공통 변수, 상수, 코드
*******************************************************************************/ *******************************************************************************/
error_reporting( E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_ERROR | E_WARNING | E_PARSE | E_USER_ERROR | E_USER_WARNING | E_RECOVERABLE_ERROR ); error_reporting( E_CORE_ERROR | E_CORE_WARNING | E_COMPILE_ERROR | E_ERROR | E_WARNING | E_PARSE | E_USER_ERROR | E_USER_WARNING );
// 보안설정이나 프레임이 달라도 쿠키가 통하도록 설정 // 보안설정이나 프레임이 달라도 쿠키가 통하도록 설정
header('P3P: CP="ALL CURa ADMa DEVa TAIa OUR BUS IND PHY ONL UNI PUR FIN COM NAV INT DEM CNT STA POL HEA PRE LOC OTC"'); header('P3P: CP="ALL CURa ADMa DEVa TAIa OUR BUS IND PHY ONL UNI PUR FIN COM NAV INT DEM CNT STA POL HEA PRE LOC OTC"');

View File

@ -48,7 +48,8 @@ function get_microtime()
// 한페이지에 보여줄 행, 현재페이지, 총페이지수, URL // 한페이지에 보여줄 행, 현재페이지, 총페이지수, URL
function get_paging($write_pages, $cur_page, $total_page, $url, $add="") function get_paging($write_pages, $cur_page, $total_page, $url, $add="")
{ {
$url = preg_replace('#&amp;page=[0-9]*(&amp;page=)$#', '$1', $url); //$url = preg_replace('#&amp;page=[0-9]*(&amp;page=)$#', '$1', $url);
$url = preg_replace('#&amp;page=[0-9]*#', '', $url) . '&amp;page=';
$str = ''; $str = '';
if ($cur_page > 1) { if ($cur_page > 1) {
@ -95,7 +96,8 @@ function page_insertbefore($paging_html, $insert_html)
function page_insertafter($paging_html, $insert_html) function page_insertafter($paging_html, $insert_html)
{ {
if ($paging_html) { if ($paging_html) {
return preg_replace("/(<\/span><\/div>)$/", $insert_html.'$1', $paging_html); //return preg_replace("/(<\/span><\/div>)$/", $insert_html.'$1', $paging_html);
return preg_replace("#(</span></div>)$#", $insert_html.'$1', $paging_html);
} }
} }
@ -106,7 +108,7 @@ function print_r2($var)
print_r($var); print_r($var);
$str = ob_get_contents(); $str = ob_get_contents();
ob_end_clean(); ob_end_clean();
$str = preg_replace("/ /", "&nbsp;", $str); $str = str_replace(" ", "&nbsp;", $str);
echo nl2br("<span style='font-family:Tahoma, 굴림; font-size:9pt;'>$str</span>"); echo nl2br("<span style='font-family:Tahoma, 굴림; font-size:9pt;'>$str</span>");
} }
@ -233,6 +235,16 @@ function url_auto_link($str)
global $g5; global $g5;
global $config; global $config;
// 140326 유창화님 제안코드로 수정
// http://sir.co.kr/bbs/board.php?bo_table=pg_lecture&wr_id=461
// http://sir.co.kr/bbs/board.php?bo_table=pg_lecture&wr_id=463
$str = str_replace(array("&lt;", "&gt;", "&amp;", "&quot;", "&nbsp;"), array("\t_lt_\t", "\t_gt_\t", "&", "\"", "\t_nbsp_\t"), $str);
$str = preg_replace("/(^|[\"'\s(])(www\.[^\"'\s()]+)/i", "\\1<A HREF=\"http://\\2\" TARGET='{$config['cf_link_target']}'>\\2</A>", $str);
$str = preg_replace("`(?:(?:(?:href|src)\s*=\s*(?:\"|'|)){0})((http|https|ftp|telnet|news|mms)://[^\"'\s()]+)`", "<A HREF=\"\\1\" TARGET='{$config['cf_link_target']}'>\\1</A>", $str);
$str = preg_replace("/[0-9a-z_-]+@[a-z0-9._-]{4,}/i", "<a href='mailto:\\0'>\\0</a>", $str);
$str = str_replace(array("\t_nbsp_\t", "\t_lt_\t", "\t_gt_\t"), array("&nbsp;", "&lt;", "&gt;"), $str);
/*
// 속도 향상 031011 // 속도 향상 031011
$str = preg_replace("/&lt;/", "\t_lt_\t", $str); $str = preg_replace("/&lt;/", "\t_lt_\t", $str);
$str = preg_replace("/&gt;/", "\t_gt_\t", $str); $str = preg_replace("/&gt;/", "\t_gt_\t", $str);
@ -251,6 +263,7 @@ function url_auto_link($str)
$str = preg_replace("/\t_nbsp_\t/", "&nbsp;" , $str); $str = preg_replace("/\t_nbsp_\t/", "&nbsp;" , $str);
$str = preg_replace("/\t_lt_\t/", "&lt;", $str); $str = preg_replace("/\t_lt_\t/", "&lt;", $str);
$str = preg_replace("/\t_gt_\t/", "&gt;", $str); $str = preg_replace("/\t_gt_\t/", "&gt;", $str);
*/
return $str; return $str;
} }

View File

@ -69,14 +69,7 @@ class SMS {
//if ( eregi("[^0-9]",$callBack) ) return "회신 전화번호가 잘못되었습니다"; //if ( eregi("[^0-9]",$callBack) ) return "회신 전화번호가 잘못되었습니다";
if ( preg_match("/[^0-9]/i",$callBack) ) return "회신 전화번호가 잘못되었습니다"; if ( preg_match("/[^0-9]/i",$callBack) ) return "회신 전화번호가 잘못되었습니다";
// 아이코드에서는 문자에 utf-8 인코딩 형식을 아직 지원하지 않는다. $msg=cut_char($msg,80); // 80자 제한
if (strtolower($g5['charset'])=='utf-8') {
if (function_exists("iconv")) {
$msg = iconv("utf-8", "euc-kr", $msg);
}
}
$msg=cut_char($msg,80); // 80자 제한
// 보낼 내용을 배열에 집어넣기 // 보낼 내용을 배열에 집어넣기
$dest = spacing($dest,11); $dest = spacing($dest,11);
$callBack = spacing($callBack,11); $callBack = spacing($callBack,11);

View File

@ -11,9 +11,9 @@ include_once(G5_MOBILE_PATH.'/_head.php');
<?php <?php
// 최신글 // 최신글
$sql = " select bo_table, bo_subject $sql = " select bo_table, bo_subject
from {$g5[board_table]} from {$g5['board_table']}
where gr_id = '{$gr_id}' where gr_id = '{$gr_id}'
and bo_list_level <= '{$member[mb_level]}' and bo_list_level <= '{$member['mb_level']}'
and bo_device <> 'pc' "; and bo_device <> 'pc' ";
if(!$is_admin) if(!$is_admin)
$sql .= " and bo_use_cert = '' "; $sql .= " and bo_use_cert = '' ";

View File

@ -115,14 +115,28 @@ include_once(G5_LIB_PATH.'/popular.lib.php');
</div> </div>
<script> <script>
$(function (){ $(function () {
var $hd_div = $(".hd_div"); $(".hd_opener").on("click", function() {
$(".hd_opener").click(function(){ var $this = $(this);
$hd_div.hide(); var $hd_layer = $this.next(".hd_div");
$(this).next(".hd_div").show();
if($hd_layer.is(":visible")) {
$hd_layer.hide();
$this.find("span").text("열기");
} else {
var $hd_layer2 = $(".hd_div:visible");
$hd_layer2.prev(".hd_opener").find("span").text("열기");
$hd_layer2.hide();
$hd_layer.show();
$this.find("span").text("닫기");
}
}); });
$(".hd_closer").click(function(){
$hd_div.hide(); $(".hd_closer").on("click", function() {
var idx = $(".hd_closer").index($(this));
$(".hd_div:visible").hide();
$(".hd_opener:eq("+idx+")").find("span").text("열기");
}); });
}); });
</script> </script>

View File

@ -141,7 +141,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
?> ?>
<div id="bo_v_con"><?php echo get_view_thumbnail($view['content']); ?></div> <div id="bo_v_con"><?php echo get_view_thumbnail($view['content']); ?></div>
<?php//echo $view[rich_content]; // {이미지:0} 과 같은 코드를 사용할 경우 ?> <?php//echo $view['rich_content']; // {이미지:0} 과 같은 코드를 사용할 경우 ?>
<?php if ($is_signature) { ?><p><?php echo $signature ?></p><?php } ?> <?php if ($is_signature) { ?><p><?php echo $signature ?></p><?php } ?>

View File

@ -141,7 +141,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
?> ?>
<div id="bo_v_con"><?php echo get_view_thumbnail($view['content']); ?></div> <div id="bo_v_con"><?php echo get_view_thumbnail($view['content']); ?></div>
<?php//echo $view[rich_content]; // {이미지:0} 과 같은 코드를 사용할 경우 ?> <?php//echo $view['rich_content']; // {이미지:0} 과 같은 코드를 사용할 경우 ?>
<?php if ($is_signature) { ?><p><?php echo $signature ?></p><?php } ?> <?php if ($is_signature) { ?><p><?php echo $signature ?></p><?php } ?>

View File

@ -149,7 +149,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
<!-- 본문 내용 시작 { --> <!-- 본문 내용 시작 { -->
<div id="bo_v_con"><?php echo get_view_thumbnail($view['content']); ?></div> <div id="bo_v_con"><?php echo get_view_thumbnail($view['content']); ?></div>
<?php//echo $view[rich_content]; // {이미지:0} 과 같은 코드를 사용할 경우 ?> <?php//echo $view['rich_content']; // {이미지:0} 과 같은 코드를 사용할 경우 ?>
<!-- } 본문 내용 끝 --> <!-- } 본문 내용 끝 -->
<?php if ($is_signature) { ?><p><?php echo $signature ?></p><?php } ?> <?php if ($is_signature) { ?><p><?php echo $signature ?></p><?php } ?>

View File

@ -149,7 +149,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$board_skin_url.'/style.css">', 0
<!-- 본문 내용 시작 { --> <!-- 본문 내용 시작 { -->
<div id="bo_v_con"><?php echo get_view_thumbnail($view['content']); ?></div> <div id="bo_v_con"><?php echo get_view_thumbnail($view['content']); ?></div>
<?php//echo $view[rich_content]; // {이미지:0} 과 같은 코드를 사용할 경우 ?> <?php//echo $view['rich_content']; // {이미지:0} 과 같은 코드를 사용할 경우 ?>
<!-- } 본문 내용 끝 --> <!-- } 본문 내용 끝 -->
<?php if ($is_signature) { ?><p><?php echo $signature ?></p><?php } ?> <?php if ($is_signature) { ?><p><?php echo $signature ?></p><?php } ?>