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

This commit is contained in:
whitedot
2013-02-19 15:18:32 +09:00
61 changed files with 105 additions and 403 deletions

View File

@ -24,7 +24,6 @@ function print_menu2($key, $no)
if ($is_admin != 'super' && (!array_key_exists($menu[$key][$i][0],$auth) || !strstr($auth[$menu[$key][$i][0]], 'r')))
continue;
// if ($no == 2) $str .= "&nbsp;&nbsp;<img src='{$g4['admin_path']}/img/icon.gif' align=absmiddle> ";
$str .= '<li class="gnb_2depth"><a href="'.$menu[$key][$i][2].'">'.$menu[$key][$i][1].'</a></li>';
$auth_menu[$menu[$key][$i][0]] = $menu[$key][$i][1];
@ -56,17 +55,6 @@ function imageview(id, w, h)
if (el_id.style.display != 'none')
selectBoxHidden(id);
}
// TEXTAREA 사이즈 변경
function textarea_size(fld, size)
{
var rows = parseInt(fld.rows);
rows += parseInt(size);
if (rows > 0) {
fld.rows = rows;
}
}
</script>
<div id="to_content"><a href="#wrapper">본문 바로가기</a></div>

View File

@ -125,23 +125,6 @@ function auth_check($auth, $attr)
}
// 텍스트에리어 늘리기, 줄이기
// 보류 : 지운아빠 2012-11-07
function textarea_size($fld)
{
/*
global $g4;
$size = 10;
$s = "<table cellpadding=2 cellspacing=0 border=0 width=100%><tr><td align=right>";
$s .= "<span onclick='javascript:textarea_size(document.getElementById(\"$fld\"), {$size})'><img src='".$g4['admin_path']."/img/btn_up.gif'></span> ";
$s .= "<span onclick='javascript:textarea_size(document.getElementById(\"$fld\"), '.$size*(-1).')'><img src='".$g4['admin_path']."/img/btn_down.gif'></span>";
$s .= "</td></tr></table>";
return $s;
*/
}
// 작업아이콘 출력
function icon($act, $link='', $target='_parent')
{
@ -150,7 +133,6 @@ function icon($act, $link='', $target='_parent')
$img = array('입력'=>'insert', '추가'=>'insert', '생성'=>'insert', '수정'=>'modify', '삭제'=>'delete', '이동'=>'move', '그룹'=>'move', '보기'=>'view', '미리보기'=>'view', '복사'=>'copy');
$icon = '<img src="'.G4_ADMIN_PATH.'/img/icon_'.$img[$act].'.gif" title="'.$act.'">';
if ($link)
//$s = '<a href="'.$link.'" target="'.$target.'">'.$icon.'</a>';
$s = '<a href="'.$link.'">'.$icon.'</a>';
else
$s = $icon;
@ -237,7 +219,7 @@ if (get_session('ss_mb_key') !== $admin_key) {
session_destroy();
include_once($g4['path'].'/lib/mailer.lib.php');
include_once(G4_LIB_PATH.'/mailer.lib.php');
// 메일 알림
mailer($member['mb_nick'], $member['mb_email'], $member['mb_email'], 'XSS 공격 알림', $_SERVER['REMOTE_ADDR'].' 아이피로 XSS 공격이 있었습니다.\n\n관리자 권한을 탈취하려는 접근이므로 주의하시기 바랍니다.\n\n해당 아이피는 차단하시고 의심되는 게시물이 있는지 확인하시기 바랍니다.\n\n'.G4_URL, 0);

View File

@ -2,7 +2,7 @@
// board_delete.php , boardgroup_delete.php 에서 include 하는 파일
if (!defined('_GNUBOARD_')) exit;
if (!defined("_BOARD_DELETE_")) exit; // 개별 페이지 접근 불가
if (!defined('_BOARD_DELETE_')) exit; // 개별 페이지 접근 불가
// $tmp_bo_table 에는 $bo_table 값을 넘겨주어야 함
if (!$tmp_bo_table) { return; }
@ -27,5 +27,5 @@ sql_query(" delete from {$g4['board_file_table']} where bo_table = '{$tmp_bo_tab
sql_query(" drop table {$g4['write_prefix']}{$tmp_bo_table} ", FALSE);
// 게시판 폴더 전체 삭제
rm_rf($g4['path'].'/data/file/'.$tmp_bo_table);
rm_rf(G4_DATA_PATH.'/file/'.$tmp_bo_table);
?>

View File

@ -33,7 +33,7 @@ if ($file = $_POST['bo_include_tail']) {
}
}
$board_path = $g4['path'].'/data/file/'.$bo_table;
$board_path = G4_DATA_PATH.'/file/'.$bo_table;
// 게시판 디렉토리 생성
@mkdir($board_path, 0707);

View File

@ -216,7 +216,7 @@ $colspan = 5;
</table>
<div class="btn_ft">
<a href="../bbs/new.php">최근게시물 더보기</a>
<a href="<?=G4_BBS_URL?>/new.php">최근게시물 더보기</a>
</div>
</section>

View File

@ -154,7 +154,7 @@ include_once('./admin.head.php');
<input type="file" id="mb_icon" name="mb_icon">
<?
$mb_dir = substr($mb['mb_id'],0,2);
$icon_file = $g4['path'].'/data/member/'.$mb_dir.'/'.$mb['mb_id'].'.gif';
$icon_file = G4_DATA_PATH.'/member/'.$mb_dir.'/'.$mb['mb_id'].'.gif';
if (file_exists($icon_file)) {
echo '<img src="'.$icon_file.'">';
echo '<input type="checkbox" id="del_mb_icon" name="del_mb_icon" value="1">삭제';

View File

@ -77,7 +77,7 @@ else if ($w == 'u')
// 회원 아이콘 삭제
if ($del_mb_icon)
@unlink($g4['path'].'/data/member/'.$mb_dir.'/'.$mb_id.'.gif');
@unlink(G4_DATA_PATH.'/member/'.$mb_dir.'/'.$mb_id.'.gif');
// 아이콘 업로드
if (is_uploaded_file($_FILES['mb_icon']['tmp_name'])) {
@ -86,10 +86,10 @@ else if ($w == 'u')
}
if (preg_match("/(\.gif)$/i", $_FILES['mb_icon']['name'])) {
@mkdir($g4['path'].'/data/member/'.$mb_dir, 0707);
@chmod($g4['path'].'/data/member/'.$mb_dir, 0707);
@mkdir(G4_DATA_PATH.'/member/'.$mb_dir, 0707);
@chmod(G4_DATA_PATH.'/member/'.$mb_dir, 0707);
$dest_path = $g4['path'].'/data/member/'.$mb_dir.'/'.$mb_id.'.gif';
$dest_path = G4_DATA_PATH.'/member/'.$mb_dir.'/'.$mb_id.'.gif';
move_uploaded_file($_FILES['mb_icon']['tmp_name'], $dest_path);
chmod($dest_path, 0606);

View File

@ -1,5 +1,5 @@
<?
include_once("_common.php");
include_once('./_common.php');
include_once(G4_LIB_PATH.'/register.lib.php');
$mb_email = escape_trim($_POST['reg_mb_email']);

View File

@ -1,5 +1,5 @@
<?
include_once("_common.php");
include_once('./_common.php');
include_once(G4_LIB_PATH.'/register.lib.php');
$mb_id = escape_trim($_POST['reg_mb_id']);

View File

@ -1,5 +1,5 @@
<?
include_once("_common.php");
include_once('./_common.php');
include_once(G4_LIB_PATH.'/register.lib.php');
$mb_nick = escape_trim($_POST['reg_mb_nick']);

View File

@ -8,7 +8,7 @@ if ($board['bo_include_head']) {
// 게시판 관리의 상단 이미지 경로
if ($board['bo_image_head']) {
echo '<img src="'.G4_PATH.'/data/file/'.$bo_table.'/'.$board['bo_image_head'].'">';
echo '<img src="'.G4_DATA_PATH.'/file/'.$bo_table.'/'.$board['bo_image_head'].'">';
}
// 게시판 관리의 상단 내용

View File

@ -4,18 +4,18 @@ include_once('./_common.php');
$count = count($_POST['chk_wr_id']);
if(!$count) {
alert($_POST['btn_submit']." 하실 항목을 하나 이상 선택하세요.");
alert($_POST['btn_submit'].' 하실 항목을 하나 이상 선택하세요.');
}
if($_POST['btn_submit'] == "선택삭제") {
include "./delete_all.php";
} else if($_POST['btn_submit'] == "선택복사") {
$sw = "copy";
include "./move.php";
} else if($_POST['btn_submit'] == "선택이동") {
$sw = "move";
include "./move.php";
if($_POST['btn_submit'] == '선택삭제') {
include './delete_all.php';
} else if($_POST['btn_submit'] == '선택복사') {
$sw = 'copy';
include './move.php';
} else if($_POST['btn_submit'] == '선택이동') {
$sw = 'move';
include './move.php';
} else {
alert("올바른 방법으로 이용해 주세요.");
alert('올바른 방법으로 이용해 주세요.');
}
?>

View File

@ -8,7 +8,7 @@ if ($board['bo_content_tail']) {
// 게시판 관리의 하단 이미지 경로
if ($board['bo_image_tail']) {
echo '<img src="'.G4_PATH.'/data/file/'.$bo_table.'/'.$board['bo_image_tail'].'">';
echo '<img src="'.G4_DATA_PATH.'/file/'.$bo_table.'/'.$board['bo_image_tail'].'">';
}
// 게시판 관리의 하단 파일 경로

View File

@ -80,7 +80,7 @@ while ($row = sql_fetch_array($result))
$sql2 = " select * from {$g4['board_file_table']} where bo_table = '$bo_table' and wr_id = '{$row['wr_id']}' ";
$result2 = sql_query($sql2);
while ($row2 = sql_fetch_array($result2))
@unlink(G4_PATH.'/data/file/'.$bo_table.'/'.$row2['bf_file']);
@unlink(G4_DATA_PATH.'/file/'.$bo_table.'/'.$row2['bf_file']);
// 파일테이블 행 삭제
sql_query(" delete from {$g4['board_file_table']} where bo_table = '$bo_table' and wr_id = '{$row['wr_id']}' ");

View File

@ -92,7 +92,7 @@ for ($i=count($tmp_array)-1; $i>=0; $i--)
$result2 = sql_query($sql2);
while ($row2 = sql_fetch_array($result2))
// 파일삭제
@unlink(G4_PATH.'/data/file/'.$bo_table.'/'.$row2['bf_file']);
@unlink(G4_DATA_PATH.'/file/'.$bo_table.'/'.$row2['bf_file']);
// 파일테이블 행 삭제
sql_query(" delete from {$g4['board_file_table']} where bo_table = '$bo_table' and wr_id = '{$row['wr_id']}' ");
@ -136,5 +136,7 @@ if ($count_write > 0 || $count_comment > 0)
// 4.11
@include_once($board_skin_path.'/delete_all.tail.skin.php');
delete_cache_latest($bo_table);
goto_url('./board.php?bo_table='.$bo_table.'&amp;page='.$page.$qstr);
?>

View File

@ -34,7 +34,7 @@ if ($member['mb_level'] < $board['bo_download_level']) {
alert($alert_msg.'\\n회원이시라면 로그인 후 이용해 보십시오.', './login.php?wr_id='.$wr_id.'&amp;'.$qstr.'&amp;url='.urlencode($g4['bbs_path'].'/board.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id));
}
$filepath = G4_PATH.'/data/file/'.$bo_table.'/'.$file['bf_file'];
$filepath = G4_DATA_PATH.'/file/'.$bo_table.'/'.$file['bf_file'];
$filepath = addslashes($filepath);
if (!is_file($filepath) || !file_exists($filepath))
alert('파일이 존재하지 않습니다.');

View File

@ -1,4 +1,3 @@
<?
$g4_path = "../.."; // common.php 의 상대 경로
include_once("$g4_path/common.php");
include_once('../../common.php');
?>

View File

@ -1,8 +1,6 @@
<?
// 상대 경로
$g4_path = '..';
include_once($g4_path.'/common.php');
include_once(G4_PATH.'/lib/latest.lib.php');
include_once('./_common.php');
include_once(G4_LIB_PATH.'/latest.lib.php');
$g4['title'] = $group[gr_subject];
include_once('./_head.php');
@ -14,10 +12,7 @@ include_once('./_head.php');
<td>
<?
// 최신글
$sql = " select bo_table, bo_subject from {$g4[board_table]}
where gr_id = '{$gr_id}'
and bo_list_level <= '{$member[mb_level]}'
order by bo_table ";
$sql = " select bo_table, bo_subject from {$g4[board_table]} where gr_id = '{$gr_id}' and bo_list_level <= '{$member[mb_level]}' order by bo_table ";
$result = sql_query($sql);
for ($i=0; $row=sql_fetch_array($result); $i++) {
// 이 함수가 바로 최신글을 추출하는 역할을 합니다.

View File

@ -12,7 +12,7 @@ if(!count($_POST['chk_bo_table']))
alert("게시물을 ".$act."할 게시판을 한개 이상 선택해 주십시오.", $url);
// 원본 파일 디렉토리
$src_dir = G4_PATH.'/data/file/'.$bo_table;
$src_dir = G4_DATA_PATH.'/file/'.$bo_table;
$save = array();
$save_count_write = 0;
@ -31,8 +31,8 @@ while ($row = sql_fetch_array($result))
$move_bo_table = $_POST['chk_bo_table'][$i];
$move_write_table = $g4['write_prefix'] . $move_bo_table;
$src_dir = G4_PATH.'/data/file/'.$bo_table; // 원본 디렉토리
$dst_dir = G4_PATH.'/data/file/'.$move_bo_table; // 복사본 디렉토리
$src_dir = G4_DATA_PATH.'/file/'.$bo_table; // 원본 디렉토리
$dst_dir = G4_DATA_PATH.'/file/'.$move_bo_table; // 복사본 디렉토리
$count_write = 0;
$count_comment = 0;

View File

@ -1,7 +1,7 @@
<?
include_once('./_common.php');
include_once(G4_GCAPTCHA_PATH.'/gcaptcha.lib.php');
include_once(G4_PATH.'/lib/mailer.lib.php');
include_once(G4_LIB_PATH.'/mailer.lib.php');
if ($is_member) {
alert("이미 로그인중입니다.");

View File

@ -1,6 +1,6 @@
<?
include_once('./_common.php');
include_once(G4_PATH.'/lib/mailer.lib.php');
include_once(G4_LIB_PATH.'/mailer.lib.php');
if ($w == "")
{

View File

@ -1,7 +1,7 @@
<?
include_once('./_common.php');
include_once(G4_GCAPTCHA_PATH.'/gcaptcha.lib.php');
include_once(G4_PATH.'/lib/register.lib.php');
include_once(G4_LIB_PATH.'/register.lib.php');
// 불법접근을 막도록 토큰생성
$token = md5(uniqid(rand(), true));
@ -103,7 +103,7 @@ if ($w == "") {
include_once('./_head.php');
// 회원아이콘 경로
$mb_icon = G4_PATH.'/data/member/'.substr($member['mb_id'],0,2).'/'.$member['mb_id'].'.gif';
$mb_icon = G4_DATA_PATH.'/member/'.substr($member['mb_id'],0,2).'/'.$member['mb_id'].'.gif';
$register_action_url = G4_HTTPS_BBS_URL.'/register_form_update.php';
$req_nick = !isset($member['mb_nick_date']) || (isset($member['mb_nick_date']) && $member['mb_nick_date'] <= date("Y-m-d", $g4['server_time'] - ($config['cf_nick_modify'] * 86400)));

View File

@ -1,8 +1,8 @@
<?
include_once('./_common.php');
include_once(G4_GCAPTCHA_PATH.'/gcaptcha.lib.php');
include_once(G4_PATH.'/lib/register.lib.php');
include_once(G4_PATH.'/lib/mailer.lib.php');
include_once(G4_LIB_PATH.'/register.lib.php');
include_once(G4_LIB_PATH.'/mailer.lib.php');
// 리퍼러 체크
referer_check();
@ -89,7 +89,7 @@ if ($w == '' || $w == 'u') {
if ($msg = exist_mb_email($mb_email, $mb_id)) alert($msg);
}
$mb_dir = G4_PATH.'/data/member/'.substr($mb_id,0,2);
$mb_dir = G4_DATA_PATH.'/member/'.substr($mb_id,0,2);
// 아이콘 삭제
if (isset($_POST['del_mb_icon'])) {

View File

@ -113,10 +113,6 @@ else
include_once($board_skin_path.'/view_comment.skin.php');
// 필터
//echo "<script> var g4_cf_filter = '$config['cf_filter']'; </script>\n";
//echo "<script src='G4_PATH/js/filter.js'></script>\n";
if (!$member['mb_id']) // 비회원일 경우에만
echo '<script src="'.G4_JS_URL.'/md5.js"></script>'.PHP_EOL;

View File

@ -16,7 +16,7 @@ if (!$bo_table) {
check_device($board['bo_device']);
@include_once (G4_PATH.'/skin/board/write.head.skin.php');
@include_once (G4_SKIN_PATH.'/board/write.head.skin.php');
@include_once ($board_skin_path.'/write.head.skin.php');
$notice_array = explode(',', trim($board['bo_notice']));

View File

@ -194,7 +194,7 @@ if ($w == 'c') // 코멘트 입력
// 4.00.15 - 메일로 보내는 코멘트의 바로가기 링크 수정
$link_url = G4_BBS_URL."/board.php?bo_table=".$bo_table."&amp;wr_id=".$wr_id."&amp;".$qstr."#c_".$comment_id;
include_once(G4_PATH.'/lib/mailer.lib.php');
include_once(G4_LIB_PATH.'/mailer.lib.php');
ob_start();
include_once ('./write_update_mail.php');
@ -312,5 +312,7 @@ else if ($w == 'cu') // 코멘트 수정
@include_once($board_skin_path.'/write_comment_update.skin.php');
@include_once($board_skin_path.'/write_comment_update.tail.skin.php');
delete_cache_latest($bo_table);
goto_url('./board.php?bo_table='.$bo_table.'&amp;wr_id='.$wr['wr_parent'].'&amp;page='.$page.$qstr.'&amp;#c_'.$comment_id);
?>

View File

@ -562,7 +562,7 @@ if (!($w == 'u' || $w == 'cu') && $config['cf_email_use'] && $board['bo_use_emai
$subject = '"'.$board['bo_subject'].'" 게시판에 '.$str.'글이 올라왔습니다.';
$link_url = G4_BBS_URL.'/board.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id.'&amp;'.$qstr;
include_once(G4_PATH.'/lib/mailer.lib.php');
include_once(G4_LIB_PATH.'/mailer.lib.php');
ob_start();
include_once ('./write_update_mail.php');
@ -602,10 +602,11 @@ if (!($w == 'u' || $w == 'cu') && $config['cf_email_use'] && $board['bo_use_emai
}
// 사용자 코드 실행
@include_once ($board_skin_path.'/write_update.skin.php');
@include_once($board_skin_path.'/write_update.skin.php');
@include_once($board_skin_path.'/write_update.tail.skin.php');
delete_cache_latest($bo_table);
if ($file_upload_msg)
alert($file_upload_msg, G4_HTTPS_BBS_URL.'/board.php?bo_table='.$bo_table.'&amp;wr_id='.$wr_id.'&amp;page='.$page.$qstr);
else

View File

@ -172,7 +172,7 @@ else if (is_mobile())
$_SESSION['ss_is_mobile'] = $is_mobile;
define('G4_IS_MOBILE', $is_mobile);
if (G4_IS_MOBILE) {
include_once(G4_PATH.'/lib/mobile.lib.php'); // 모바일 전용 라이브러리
include_once(G4_LIB_PATH.'/mobile.lib.php'); // 모바일 전용 라이브러리
$g4['mobile_path'] = G4_PATH.'/'.$g4['mobile_dir'];
}
//==============================================================================

View File

@ -63,13 +63,13 @@ include_once(G4_LIB_PATH.'/popular.lib.php');
<ul id="snb">
<li>
<a href="<?=G4_BBS_URL?>/current_connect.php" id="snb_cnt">
<img src="<?=G4_URL?>/img/snb_cnt.jpg" alt="">
<img src="<?=G4_IMG_URL?>/snb_cnt.jpg" alt="">
현재접속자 <?=connect(); // 현재 접속자수 ?>
</a>
</li>
<li>
<a href="<?=G4_BBS_URL?>/new.php" id="snb_new">
<img src="<?=G4_URL?>/img/snb_new.jpg" alt="">
<img src="<?=G4_IMG_URL?>/snb_new.jpg" alt="">
새글
</a>
</li>
@ -77,33 +77,33 @@ include_once(G4_LIB_PATH.'/popular.lib.php');
<? if ($is_admin) { ?>
<li>
<a href="<?=G4_ADMIN_URL?>" id="snb_adm">
<img src="<?=G4_URL?>/img/snb_admin.jpg" alt="">
<img src="<?=G4_IMG_URL?>/snb_admin.jpg" alt="">
관리자
</a>
</li>
<? } ?>
<li>
<a href="<?=G4_BBS_URL?>/member_confirm.php?url=<?=G4_BBS_URL?>/register_form.php" id="snb_modify">
<img src="<?=G4_URL?>/img/snb_modify.jpg" alt="">
<img src="<?=G4_IMG_URL?>/snb_modify.jpg" alt="">
내 정보
</a>
</li>
<li>
<a href="<?=G4_BBS_URL?>/logout.php" id="snb_logout">
<img src="<?=G4_URL?>/img/snb_logout.jpg" alt="">
<img src="<?=G4_IMG_URL?>/snb_logout.jpg" alt="">
로그아웃
</a>
</li>
<? } else { ?>
<li>
<a href="<?=G4_BBS_URL?>/register.php" id="snb_join">
<img src="<?=G4_URL?>/img/snb_join.jpg" alt="">
<img src="<?=G4_IMG_URL?>/snb_join.jpg" alt="">
회원가입
</a>
</li>
<li>
<a href="<?=G4_BBS_URL?>/login.php" id="snb_login">
<img src="<?=G4_URL?>/img/snb_login.jpg" alt="">
<img src="<?=G4_IMG_URL?>/snb_login.jpg" alt="">
로그인
</a>
</li>

View File

@ -51,6 +51,7 @@ else $g4_css = "default";
// 자바스크립트에서 사용하는 전역변수 선언
var g4_url = "<?=G4_URL?>";
var g4_bbs_url = "<?=G4_BBS_URL?>";
var g4_img_url = "<?=G4_IMG_URL?>";
var g4_is_member = "<?=isset($is_member)?$is_member:'';?>";
var g4_is_admin = "<?=isset($is_admin)?$is_admin:'';?>";
var g4_bo_table = "<?=isset($bo_table)?$bo_table:'';?>";

View File

Before

Width:  |  Height:  |  Size: 51 B

After

Width:  |  Height:  |  Size: 51 B

View File

@ -1,56 +0,0 @@
function getFontSize() {
var fontSize = parseInt(get_cookie("ck_fontsize")); // 폰트크기 조절
if (isNaN(fontSize)) { fontSize = 12; }
return fontSize;
}
function scaleFont(val) {
var fontSize = getFontSize();
var fontSizeSave = fontSize;
if (val > 0) {
if (fontSize <= 18) {
fontSize = fontSize + val;
}
} else {
if (fontSize > 12) {
fontSize = fontSize + val;
}
}
if (fontSize != fontSizeSave) {
drawFont(fontSize);
}
set_cookie("ck_fontsize", fontSize, 30, g4_cookie_domain);
}
function drawFont(fontSize) {
if (!fontSize) {
fontSize = getFontSize();
}
var subject=document.getElementById("writeSubject");
var content=document.getElementById("writeContents");
var comment=document.getElementById("bo_vc");
var wr_subject=document.getElementById("wr_subject");
var wr_content=document.getElementById("wr_content");
if (comment) {
var commentDiv = comment.getElementsByTagName("div");
var lineHeight = fontSize+Math.round(1.1*fontSize);
}
fontSize = fontSize + "px";
if (subject)
subject.style.fontSize=fontSize;
if (content)
content.style.fontSize=fontSize;
if (wr_subject)
wr_subject.style.fontSize=fontSize;
if (wr_content)
wr_content.style.fontSize=fontSize;
if (commentDiv) {
for (i=0;i<commentDiv.length;i++) {
commentDiv[i].style.fontSize=fontSize;
}
}
}

View File

@ -1,67 +0,0 @@
if (typeof(CAPSLOCK_JS) == 'undefined') // 한번만 실행
{
var CAPSLOCK_JS = true;
var capslock_delay = 3000; // "CapsLock 이 켜져 있습니다." 이미지를 몇초간 출력할 것인지?
var capslock_left = -4; // CaplsLock 이미지의 X 좌표
var capslock_top = 0; // CaplsLock 이미지의 Y 좌표
function check_capslock(e, elem_id) {
var myKeyCode=0;
var myShiftKey=false;
if ( document.all ) { // Internet Explorer 4+
myKeyCode=e.keyCode;
myShiftKey=e.shiftKey;
} else if ( document.layers ) { // Netscape 4
myKeyCode=e.which;
myShiftKey=( myKeyCode == 16 ) ? true : false;
} else if ( document.getElementById ) { // Netscape 6
myKeyCode=e.which;
myShiftKey=( myKeyCode == 16 ) ? true : false;
}
// Upper case letters are seen without depressing the Shift key, therefore Caps Lock is on
if ( ( myKeyCode >= 65 && myKeyCode <= 90 ) && !myShiftKey ) {
set_capslock_on(elem_id);
// Lower case letters are seen while depressing the Shift key, therefore Caps Lock is on
} else if ( ( myKeyCode >= 97 && myKeyCode <= 122 ) && myShiftKey ) {
set_capslock_on(elem_id);
}
}
function set_capslock_on(elem_id) {
set_capslock_info_position(elem_id);
document.getElementById("capslock_info").style.display = "inline";
setTimeout("set_capslock_off()", capslock_delay);
}
function set_capslock_off(elem_id) {
document.getElementById("capslock_info").style.display = "none";
}
function set_capslock_info_position(elem_id) {
var o = document.getElementById("capslock_info");
var ref = document.getElementById(elem_id);
//var s = ""; for (i in ref) {s = s + i + " "; } alert(s);
if ( typeof(o)=="object" && typeof(ref)=="object" ) {
var x = get_real_left(ref);
var y = get_real_top(ref);
//o.style.pixelLeft = x + capslock_left;
//o.style.pixelTop = y + ref.offsetHeight + capslock_top;
o.style.left = x + capslock_left;
o.style.top = y + ref.offsetHeight + capslock_top;
}
}
function get_real_left(obj) {
if ( obj.offsetParent == null ) return 0;
return obj.offsetLeft + obj.clientLeft + get_real_left(obj.offsetParent);
}
function get_real_top(obj) {
if ( obj.offsetParent == null ) return 0;
return obj.offsetTop + obj.clientTop + get_real_top(obj.offsetParent);
}
document.write("<div id='capslock_info' style='display:none; position:absolute;'><img src='"+g4_url+"/img/capslock.gif'></div>");
}

File diff suppressed because one or more lines are too long

View File

@ -2,7 +2,7 @@ var reg_mb_id_check = function() {
var result = "";
$.ajax({
type: "POST",
url: member_skin_url+"/ajax_mb_id_check.php",
url: g4_bbs_url+"/ajax.mb_id.php",
data: {
"reg_mb_id": encodeURIComponent($("#reg_mb_id").val())
},
@ -20,10 +20,10 @@ var reg_mb_nick_check = function() {
var result = "";
$.ajax({
type: "POST",
url: member_skin_url+"/ajax_mb_nick_check.php",
url: g4_bbs_url+"/ajax.mb_nick.php",
data: {
"reg_mb_nick": ($("#reg_mb_nick").val()),
'reg_mb_id': encodeURIComponent($('#reg_mb_id').val())
"reg_mb_id": encodeURIComponent($("#reg_mb_id").val())
},
cache: false,
async: false,
@ -38,11 +38,11 @@ var reg_mb_nick_check = function() {
var reg_mb_email_check = function() {
var result = "";
$.ajax({
type: 'POST',
url: member_skin_url+'/ajax_mb_email_check.php',
type: "POST",
url: g4_bbs_url+"/ajax.mb_email.php",
data: {
'reg_mb_email': $('#reg_mb_email').val(),
'reg_mb_id': encodeURIComponent($('#reg_mb_id').val())
"reg_mb_email": $("#reg_mb_email").val(),
"reg_mb_id": encodeURIComponent($("#reg_mb_id").val())
},
cache: false,
async: false,

View File

@ -359,7 +359,7 @@ function wrestInitialized()
//if (regexp.test(document.forms[i].elements[j].className)) {
//document.forms[i].elements[j].style.backgroundColor = wrestFldDefaultColor;
//document.forms[i].elements[j].className = "wrest_required";
document.forms[i].elements[j].style.backgroundImage = "url('"+g4_url+"/js/wrest.gif')";
document.forms[i].elements[j].style.backgroundImage = "url('"+g4_img_url+"/wrest.gif')";
document.forms[i].elements[j].style.backgroundPosition = "top right";
document.forms[i].elements[j].style.backgroundRepeat = "no-repeat";
}

View File

@ -280,9 +280,7 @@ function get_file($bo_table, $wr_id)
$file[$no]['download'] = $row['bf_download'];
// 4.00.11 - 파일 path 추가
$file[$no]['path'] = G4_DATA_URL.'/file/'.$bo_table;
//$file[$no]['size'] = get_filesize("{$file[$no]['path']}/$row['bf_file']");
$file[$no]['size'] = get_filesize($row['bf_filesize']);
//$file[$no]['datetime'] = date("Y-m-d H:i:s", @filemtime("$g4['path']/data/file/$bo_table/$row['bf_file']"));
$file[$no]['datetime'] = $row['bf_datetime'];
$file[$no]['source'] = addslashes($row['bf_source']);
$file[$no]['bf_content'] = $row['bf_content'];
@ -290,8 +288,6 @@ function get_file($bo_table, $wr_id)
//$file[$no]['view'] = view_file_link($row['bf_file'], $file[$no]['content']);
$file[$no]['view'] = view_file_link($row['bf_file'], $row['bf_width'], $row['bf_height'], $file[$no]['content']);
$file[$no]['file'] = $row['bf_file'];
// prosper 님 제안
//$file[$no]['imgsize'] = @getimagesize("{$file[$no]['path']}/$row['bf_file']");
$file[$no]['image_width'] = $row['bf_width'] ? $row['bf_width'] : 640;
$file[$no]['image_height'] = $row['bf_height'] ? $row['bf_height'] : 480;
$file[$no]['image_type'] = $row['bf_type'];
@ -1055,21 +1051,6 @@ function view_file_link($file, $width, $height, $content='')
// 이미지에 속성을 주지 않는 이유는 이미지 클릭시 원본 이미지를 보여주기 위한것임
// 게시판설정 이미지보다 크다면 스킨의 자바스크립트에서 이미지를 줄여준다
return "<img src='".G4_DATA_URL."/file/{$board['bo_table']}/".urlencode($file)."' onclick='image_window(this);' alt='{$content}'>";
/*
// 110106 : FLASH XSS 공격으로 인하여 코드 자체를 막음
else if (preg_match("/\.($config['cf_flash_extension'])$/i", $file))
//return "<embed src='$g4['path']/data/file/$board['bo_table']/$file' $attr></embed>";
return "<script>doc_write(flash_movie('$g4['path']/data/file/$board['bo_table']/$file', '_g4_{$ids}', '$width', '$height', 'transparent'));</script>";
*/
//=============================================================================================
// 동영상 파일에 악성코드를 심는 경우를 방지하기 위해 경로를 노출하지 않음
//---------------------------------------------------------------------------------------------
/*
else if (preg_match("/\.($config['cf_movie_extension'])$/i", $file))
//return "<embed src='$g4['path']/data/file/$board['bo_table']/$file' $attr></embed>";
return "<script>doc_write(obj_movie('$g4['path']/data/file/$board['bo_table']/$file', '_g4_{$ids}', '$width', '$height'));</script>";
*/
//=============================================================================================
}
@ -1732,4 +1713,13 @@ function check_device($device)
alert('모바일 전용 게시판입니다.', G4_URL);
}
}
// 게시판 최신글 캐시 파일 삭제
function delete_cache_latest($bo_table)
{
foreach (glob(G4_DATA_PATH.'/cache/latest-'.$bo_table.'-*') as $filename) {
unlink($filename);
}
}
?>

View File

@ -60,7 +60,7 @@ function mobile_thumb($matches)
$src = preg_replace("/^\.\.\//", "http://m.sir.co.kr/", $src);
$absolute = preg_replace("/^http\:\/\/(www\.)?sir\.co\.kr\/(.*)$/", "/home/sir/$2", $src);
$thumb_dir = "$g4[path]/data/thumb/$bo_table";
$thumb_dir = G4_DATA_PATH.'/thumb/'.$bo_table;
if (!is_dir($thumb_dir)) {
@mkdir($thumb_dir, 0707);
@chmod($thumb_dir, 0707);
@ -100,12 +100,12 @@ function mobile_thumb($matches)
$src = trim($m[1]);
//if ($is_admin) echo $src."<br>";
if (preg_match("/\.(jpe?g|png)$/i", $src)) {
// 상대경로(..)로 시작되면 sir.co.kr 도메인으로 여긴다.
$src = preg_replace("/^\.\.\//", "http://sir.co.kr/", $src);
// 상대경로(..)로 시작되면 도메인으로 여긴다.
$src = preg_replace("/^\.\.\//", 'http://'.$_SERVER['SERVER_NAME'].'/', $src);
// 유일한 파일명을 만든다.
$src_md5 = md5($src.$width);
$thumb = "$g4[path]/data/thumb/{$bo_table}-{$wr_id}-{$src_md5}";
$thumb = G4_DATA_PATH.'/thumb/'.$bo_table.'-'.$wr_id.'-'.$src_md5;
if (!file_exists($thumb)) {
$result = mobile_create_thumb($src, $width, $thumb);

View File

@ -1,4 +0,0 @@
<?
$g4_path = '../../..'; // common.php 의 상대 경로
include_once($g4_path.'/common.php');
?>

View File

@ -1,5 +1,5 @@
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
// 선택옵션으로 인해 셀합치기가 가변적으로 변함
$colspan = 5;

View File

@ -1,5 +1,5 @@
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
?>
<p id="bo_v_title"><?=$board['bo_subject']?></p>
@ -176,9 +176,6 @@ function board_move(href)
}
</script>
<script src="<?=G4_JS_URL?>/board.js"></script>
<!-- 게시글 보기 끝 -->
<script>
// 이미지 등비율 리사이징
$(window).load(function() {
@ -200,4 +197,5 @@ function view_image_resize()
}
});
}
</script>
</script>
<!-- 게시글 보기 끝 -->

View File

@ -1,5 +0,0 @@
<?
$g4_path = "../../.."; // common.php 의 상대 경로
include_once("$g4_path/common.php");
header("Content-Type: text/html; charset=$g4[charset]");
?>

View File

@ -1,113 +0,0 @@
/*
** 2010.03.12 : jQuery 로 대체하여 앞으로 사용하지 않습니다.
*/
// 회원아이디 검사
function reg_mb_id_check() {
var url = member_skin_path + "/ajax_mb_id_check.php";
var para = "reg_mb_id="+encodeURIComponent($F('reg_mb_id'));
var myAjax = new Ajax.Request(
url,
{
method: 'post',
// 주소창 보안 방지 javascript:void(document.fregisterform.mb_id_enabled.value='000');
// 동기식 (폼전송시 입력값이 바른지 검사한 후 mb_id_enabled 를 체크하기 때문)
asynchronous: false,
parameters: para,
onComplete: return_reg_mb_id_check
});
}
function return_reg_mb_id_check(req) {
var msg = $('msg_mb_id');
var result = req.responseText;
switch(result) {
case '110' : msg.update('영문자, 숫자, _ 만 입력하세요.').setStyle({ color: 'red' }); break;
case '120' : msg.update('최소 3자이상 입력하세요.').setStyle({ color: 'red' }); break;
case '130' : msg.update('이미 사용중인 아이디 입니다.').setStyle({ color: 'red' }); break;
case '140' : msg.update('예약어로 사용할 수 없는 아이디 입니다.').setStyle({ color: 'red' }); break;
case '000' : msg.update('사용하셔도 좋은 아이디 입니다.').setStyle({ color: 'blue' }); break;
default : alert( '잘못된 접근입니다.\n\n' + result ); break;
}
$('mb_id_enabled').value = result;
}
// 별명 검사
function reg_mb_nick_check() {
var url = member_skin_path + "/ajax_mb_nick_check.php";
var para = "reg_mb_nick="+encodeURIComponent($F('reg_mb_nick'));
var myAjax = new Ajax.Request(
url,
{
method: 'post',
// 주소창 보안 방지 javascript:void(document.fregisterform.mb_id_enabled.value='000');
// 동기식 (폼전송시 입력값이 바른지 검사한 후 mb_id_enabled 를 체크하기 때문)
asynchronous: false,
parameters: para,
onComplete: return_reg_mb_nick_check
});
}
function return_reg_mb_nick_check(req) {
var msg = $('msg_mb_nick');
var result = req.responseText;
switch(result) {
case '110' : msg.update('별명은 공백없이 한글, 영문, 숫자만 입력 가능합니다.').setStyle({ color: 'red' }); break;
case '120' : msg.update('한글 2글자, 영문 4글자 이상 입력 가능합니다.').setStyle({ color: 'red' }); break;
case '130' : msg.update('이미 존재하는 별명입니다.').setStyle({ color: 'red' }); break;
case '000' : msg.update('사용하셔도 좋은 별명 입니다.').setStyle({ color: 'blue' }); break;
default : alert( '잘못된 접근입니다.\n\n' + result ); break;
}
$('mb_nick_enabled').value = result;
}
// E-mail 주소 검사
function reg_mb_email_check() {
var url = member_skin_path + "/ajax_mb_email_check.php";
var para = "reg_mb_id="+encodeURIComponent($F('reg_mb_id'));
para += "&reg_mb_email="+encodeURIComponent($F('reg_mb_email'));
var myAjax = new Ajax.Request(
url,
{
method: 'post',
// 주소창 보안 방지 javascript:void(document.fregisterform.mb_email_enabled.value='000');
// 동기식 (폼전송시 입력값이 바른지 검사한 후 mb_email_enabled 를 체크하기 때문)
asynchronous: false,
parameters: para,
onComplete: return_reg_mb_email_check
});
}
function return_reg_mb_email_check(req) {
var msg = $('msg_mb_email');
var result = req.responseText;
switch(result) {
case '110' : msg.update('E-mail 주소를 입력하십시오.').setStyle({ color: 'red' }); break;
case '120' : msg.update('E-mail 주소가 형식에 맞지 않습니다.').setStyle({ color: 'red' }); break;
case '130' : msg.update('이미 존재하는 E-mail 주소입니다.').setStyle({ color: 'red' }); break;
case '000' : msg.update('사용하셔도 좋은 E-mail 주소입니다.').setStyle({ color: 'blue' }); break;
default : alert( '잘못된 접근입니다.\n\n' + result ); break;
}
$('mb_email_enabled').value = result;
}
// 세션에 저장된 토큰을 얻는다.
function get_token() {
var url = member_skin_path + "/ajax_get_token.php";
var para = "reg_mb_id="+encodeURIComponent($F('reg_mb_id'));
para += "&reg_mb_email="+encodeURIComponent($F('reg_mb_email'));
var myAjax = new Ajax.Request(
url,
{
method: 'post',
asynchronous: false,
parameters: para,
onComplete: return_get_token
});
}
function return_get_token(req) {
var result = req.responseText;
$('mb_token').value = result;
}

View File

@ -1,5 +1,5 @@
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
?>
<div id="formmail" class="new_win">
@ -65,8 +65,6 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
</form>
</div>
<script src="<?="$g4[path]/js/md5.js"?>"></script>
<script src="<?="$g4[path]/js/jquery.kcaptcha.js"?>"></script>
<script>
with (document.fformmail) {
if (typeof fname != "undefined")

View File

@ -1,5 +1,5 @@
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
?>
<div id="mb_login">

View File

@ -1,5 +1,5 @@
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
// 자신만의 코드를 넣어주세요.
?>

View File

@ -1,5 +1,5 @@
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
?>
<div id="mb_confirm">

View File

@ -1,5 +1,5 @@
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
?>
<div id="memo_list" class="new_win">

View File

@ -1,5 +1,5 @@
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
?>
<div id="memo_write" class="new_win">

View File

@ -1,5 +1,5 @@
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
$nick = get_sideview($mb['mb_id'], $mb['mb_nick'], $mb['mb_email'], $mb['mb_homepage']);
if($kind == "recv") {
$kind_str = "보낸";

View File

@ -1,5 +1,5 @@
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
?>
<div id="pw_confirm">

View File

@ -1,5 +1,5 @@
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
?>
<div id="find_info" class="new_win">

View File

@ -1,5 +1,5 @@
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
?>
<div id="profile" class="new_win">

View File

@ -1,5 +1,5 @@
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
?>
<form id="fregister" name="fregister" method="POST" action="<?=$register_action_url?>" onsubmit="return fregister_submit(this);" autocomplete="off">

View File

@ -1,11 +1,8 @@
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
?>
<script>
var member_skin_url = "<?=$member_skin_url?>";
</script>
<script src="<?=$member_skin_url?>/ajax_register_form.jquery.js"></script>
<script src="<?=G4_JS_URL?>/jquery.register_form.js"></script>
<form id="fregisterform" name="fregisterform" method="post" action="<?=$register_action_url?>" onsubmit="return fregisterform_submit(this);" enctype="multipart/form-data" autocomplete="off">
<input type="hidden" name="w" value="<?=$w?>">

View File

@ -1,5 +1,5 @@
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
?>
<div id="reg_result">

View File

@ -1,5 +1,5 @@
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
// 자신만의 코드를 넣어주세요.
?>

View File

@ -1,5 +1,5 @@
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
?>
<div id="scrap" class="new_win">

View File

@ -1,5 +1,5 @@
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
?>
<div id="scrap_do" class="new_win">

View File

@ -1,5 +1,5 @@
<?
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
?>
<div id="post_code" class="new_win">

View File

@ -10,7 +10,7 @@ if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
<h1><?=$config['cf_title']?> 정보</h1>
<?=popular('basic'); // 인기검색어 ?>
<?=visit("basic"); // 방문자수 ?>
<div id="ft_catch"><a href="<?=$g4['url']?>/"><img src="<?=G4_URL?>/img/ft_catch.jpg" alt="Sharing All Possibilities"></a></div>
<div id="ft_catch"><a href="<?=$g4['url']?>/"><img src="<?=G4_IMG_URL?>/ft_catch.jpg" alt="Sharing All Possibilities"></a></div>
<div id="ft_copy">
<p>Copyright &copy; <b>소유하신 도메인.</b> All rights reserved.</p>
</div>