Merge branch 'g4s'
This commit is contained in:
@ -159,7 +159,7 @@ function icon($act, $link='', $target='_parent')
|
||||
function rm_rf($file)
|
||||
{
|
||||
if (file_exists($file)) {
|
||||
@chmod($file,0777);
|
||||
@chmod($file, G4_FILE_PERMISSION);
|
||||
if (is_dir($file)) {
|
||||
$handle = opendir($file);
|
||||
while($filename = readdir($handle)) {
|
||||
|
||||
@ -121,8 +121,8 @@ $sql = " insert into {$g4['board_table']}
|
||||
sql_query($sql);
|
||||
|
||||
// 게시판 폴더 생성
|
||||
@mkdir(G4_DATA_PATH.'/file/'.$target_table, 0707);
|
||||
@chmod(G4_DATA_PATH.'/file/'.$target_table, 0707);
|
||||
@mkdir(G4_DATA_PATH.'/file/'.$target_table, G4_DIR_PERMISSION);
|
||||
@chmod(G4_DATA_PATH.'/file/'.$target_table, G4_DIR_PERMISSION);
|
||||
|
||||
// 디렉토리에 있는 파일의 목록을 보이지 않게 한다.
|
||||
$board_path = G4_DATA_PATH.'/file/'.$target_table;
|
||||
@ -130,7 +130,7 @@ $file = $board_path . '/index.php';
|
||||
$f = @fopen($file, 'w');
|
||||
@fwrite($f, '');
|
||||
@fclose($f);
|
||||
@chmod($file, 0606);
|
||||
@chmod($file, G4_FILE_PERMISSION);
|
||||
|
||||
$copy_file = 0;
|
||||
if ($copy_case == 'schema_data_both') {
|
||||
@ -141,19 +141,19 @@ if ($copy_case == 'schema_data_both') {
|
||||
// 김선용 201007 :
|
||||
if(is_dir(G4_DATA_PATH.'/file/'.$bo_table.'/'.$entry)){
|
||||
$dd = dir(G4_DATA_PATH.'/file/'.$bo_table.'/'.$entry);
|
||||
@mkdir(G4_DATA_PATH.'/file/'.$target_table.'/'.$entry, 0707);
|
||||
@chmod(G4_DATA_PATH.'/file/'.$target_table.'/'.$entry, 0707);
|
||||
@mkdir(G4_DATA_PATH.'/file/'.$target_table.'/'.$entry G4_DIR_PERMISSION);
|
||||
@chmod(G4_DATA_PATH.'/file/'.$target_table.'/'.$entry G4_DIR_PERMISSION);
|
||||
while ($entry2 = $dd->read()) {
|
||||
if ($entry2 == '.' || $entry2 == '..') continue;
|
||||
@copy(G4_DATA_PATH.'/file/'.$bo_table.'/'.$entry.'/'.$entry2, G4_DATA_PATH.'/file/'.$target_table.'/'.$entry.'/'.$entry2);
|
||||
@chmod(G4_DATA_PATH.'/file/'.$target_table.'/'.$entry.'/'.$entry2, 0707);
|
||||
@chmod(G4_DATA_PATH.'/file/'.$target_table.'/'.$entry.'/'.$entry2, G4_DIR_PERMISSION);
|
||||
$copy_file++;
|
||||
}
|
||||
$dd->close();
|
||||
}
|
||||
else {
|
||||
@copy(G4_DATA_PATH.'/file/'.$bo_table.'/'.$entry, G4_DATA_PATH.'/file/'.$target_table.'/'.$entry);
|
||||
@chmod(G4_DATA_PATH.'/file/'.$target_table.'/'.$entry, 0707);
|
||||
@chmod(G4_DATA_PATH.'/file/'.$target_table.'/'.$entry G4_DIR_PERMISSION);
|
||||
$copy_file++;
|
||||
}
|
||||
}
|
||||
|
||||
@ -27,15 +27,15 @@ if ($file = $_POST['bo_include_tail']) {
|
||||
$board_path = G4_DATA_PATH.'/file/'.$bo_table;
|
||||
|
||||
// 게시판 디렉토리 생성
|
||||
@mkdir($board_path, 0707);
|
||||
@chmod($board_path, 0707);
|
||||
@mkdir($board_path, G4_DIR_PERMISSION);
|
||||
@chmod($board_path, G4_DIR_PERMISSION);
|
||||
|
||||
// 디렉토리에 있는 파일의 목록을 보이지 않게 한다.
|
||||
$file = $board_path . '/index.php';
|
||||
$f = @fopen($file, 'w');
|
||||
@fwrite($f, '');
|
||||
@fclose($f);
|
||||
@chmod($file, 0606);
|
||||
@chmod($file, G4_FILE_PERMISSION);
|
||||
|
||||
// 분류에 & 나 = 는 사용이 불가하므로 2바이트로 바꾼다.
|
||||
$src_char = array('&', '=');
|
||||
|
||||
@ -99,13 +99,13 @@ else if ($w == 'u')
|
||||
}
|
||||
|
||||
if (preg_match("/(\.gif)$/i", $_FILES['mb_icon']['name'])) {
|
||||
@mkdir(G4_DATA_PATH.'/member/'.$mb_dir, 0707);
|
||||
@chmod(G4_DATA_PATH.'/member/'.$mb_dir, 0707);
|
||||
@mkdir(G4_DATA_PATH.'/member/'.$mb_dir, G4_DIR_PERMISSION);
|
||||
@chmod(G4_DATA_PATH.'/member/'.$mb_dir, G4_DIR_PERMISSION);
|
||||
|
||||
$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);
|
||||
chmod($dest_path, G4_FILE_PERMISSION);
|
||||
|
||||
if (file_exists($dest_path)) {
|
||||
$size = getimagesize($dest_path);
|
||||
|
||||
@ -76,7 +76,7 @@ for ($i=count($tmp_array)-1; $i>=0; $i--)
|
||||
|
||||
// 나라오름님 수정 : 원글과 코멘트수가 정상적으로 업데이트 되지 않는 오류를 잡아 주셨습니다.
|
||||
//$sql = " select wr_id, mb_id, wr_comment from {$write_table} where wr_parent = '{$write[wr_id]}' order by wr_id ";
|
||||
$sql = " select wr_id, mb_id, wr_is_comment from $write_table where wr_parent = '{$write['wr_id']}' order by wr_id ";
|
||||
$sql = " select wr_id, mb_id, wr_is_comment, wr_content from $write_table where wr_parent = '{$write['wr_id']}' order by wr_id ";
|
||||
$result = sql_query($sql);
|
||||
while ($row = sql_fetch_array($result))
|
||||
{
|
||||
|
||||
@ -97,7 +97,7 @@ while ($row = sql_fetch_array($result))
|
||||
{
|
||||
// 원본파일을 복사하고 퍼미션을 변경
|
||||
@copy($src_dir.'/'.$row3['bf_file'], $dst_dir.'/'.$row3['bf_file']);
|
||||
@chmod($dst_dir/$row3['bf_file'], 0606);
|
||||
@chmod($dst_dir/$row3['bf_file'], G4_FILE_PERMISSION);
|
||||
}
|
||||
|
||||
$sql = " insert into {$g4['board_file_table']}
|
||||
|
||||
@ -114,11 +114,11 @@ if (isset($_FILES['mb_icon']) && is_uploaded_file($_FILES['mb_icon']['tmp_name']
|
||||
if (preg_match("/(\.gif)$/i", $_FILES['mb_icon']['name'])) {
|
||||
// 아이콘 용량이 설정값보다 이하만 업로드 가능
|
||||
if ($_FILES['mb_icon']['size'] <= $config['cf_member_icon_size']) {
|
||||
@mkdir($mb_dir, 0707);
|
||||
@chmod($mb_dir, 0707);
|
||||
@mkdir($mb_dir, G4_DIR_PERMISSION);
|
||||
@chmod($mb_dir, G4_DIR_PERMISSION);
|
||||
$dest_path = $mb_dir.'/'.$mb_id.'.gif';
|
||||
move_uploaded_file($_FILES['mb_icon']['tmp_name'], $dest_path);
|
||||
chmod($dest_path, 0606);
|
||||
chmod($dest_path, G4_FILE_PERMISSION);
|
||||
if (file_exists($dest_path)) {
|
||||
//=================================================================\
|
||||
// 090714
|
||||
|
||||
@ -175,8 +175,8 @@ if (!isset($_POST['wr_subject']) || !trim($_POST['wr_subject']))
|
||||
alert('제목을 입력하여 주십시오.');
|
||||
|
||||
// 디렉토리가 없다면 생성합니다. (퍼미션도 변경하구요.)
|
||||
@mkdir(G4_DATA_PATH.'/file/'.$bo_table, 0707);
|
||||
@chmod(G4_DATA_PATH.'/file/'.$bo_table, 0707);
|
||||
@mkdir(G4_DATA_PATH.'/file/'.$bo_table, G4_DIR_PERMISSION);
|
||||
@chmod(G4_DATA_PATH.'/file/'.$bo_table, G4_DIR_PERMISSION);
|
||||
|
||||
$chars_array = array_merge(range(0,9), range('a','z'), range('A','Z'));
|
||||
|
||||
@ -276,7 +276,7 @@ for ($i=0; $i<count($_FILES['bf_file']['name']); $i++) {
|
||||
$error_code = move_uploaded_file($tmp_file, $dest_file) or die($_FILES['bf_file']['error'][$i]);
|
||||
|
||||
// 올라간 파일의 퍼미션을 변경합니다.
|
||||
chmod($dest_file, 0606);
|
||||
chmod($dest_file, G4_FILE_PERMISSION);
|
||||
}
|
||||
}
|
||||
|
||||
@ -557,7 +557,7 @@ $row = sql_fetch(" select count(*) as cnt from {$g4['board_file_table']} where b
|
||||
sql_query(" update {$write_table} set wr_file = '{$row['cnt']}' where wr_id = '{$wr_id}' ");
|
||||
|
||||
// 자동저장된 레코드를 삭제한다.
|
||||
sql_query(" delete from g4s_autosave where as_uid = '{$uid}' ");
|
||||
sql_query(" delete from {$g4['autosave_table']} where as_uid = '{$uid}' ");
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
// 비밀글이라면 세션에 비밀글의 아이디를 저장한다. 자신의 글은 다시 패스워드를 묻지 않기 위함
|
||||
|
||||
@ -129,6 +129,10 @@ define('G4_HANGUL', 16); // 한글
|
||||
define('G4_SPACE', 32); // 공백
|
||||
define('G4_SPECIAL', 64); // 특수문자
|
||||
|
||||
// 퍼미션
|
||||
define('G4_DIR_PERMISSION', 0755); // 디렉토리 생성시 퍼미션
|
||||
define('G4_FILE_PERMISSION', 0644); // 파일 생성시 퍼미션
|
||||
|
||||
// 모바일 인지 결정 $_SERVER['HTTP_USER_AGENT']
|
||||
define('G4_MOBILE_AGENT', 'phone|samsung|lgtel|mobile|skt|nokia|blackberry|android|sony');
|
||||
|
||||
|
||||
@ -25,7 +25,7 @@ a:hover, a:focus, a:active {color:#000;text-decoration:underline}
|
||||
#logo {padding:17px 0}
|
||||
|
||||
/* 전체 검색 */
|
||||
#sch_all {position:absolute;top:22px;left:70px;margin:0;padding:0;border:1px solid #555}
|
||||
#sch_all {position:absolute;top:22px;left:170px;margin:0;padding:0;border:1px solid #555}
|
||||
#sch_all legend {position:absolute;margin:0;padding:0;font-size:0;line-height:0;text-indent:-9999em;overflow:hidden}
|
||||
#sch_all_stx {padding-left:5px;width:165px;height:24px;border:0;background:#fff;line-height:1.9em !important;line-height:1.6em}
|
||||
#sch_all_submit {padding:0 5px;height:26px;border:0;background:#555;color:#fff}
|
||||
|
||||
@ -46,9 +46,9 @@ a:active {color:#000;text-decoration:underline}
|
||||
#hd:after {display:block;visibility:hidden;clear:both;content:""}
|
||||
#hd h1 {width:0;height:0;font-size:0;line-height:0;overflow:hidden}
|
||||
|
||||
#logo {float:left;padding:0.3em 0;margin-left:1em}
|
||||
#logo {float:left;padding:0.3em 0;margin-left:0.5em}
|
||||
|
||||
#schall {position:absolute;top:0.7em;right:1em;letter-spacing:-0.3em}
|
||||
#schall {position:absolute;top:0.7em;right:0.5em;letter-spacing:-0.3em}
|
||||
#schall_stx {padding-left:0.3em;width:100px;height:1.5em;border:1px solid #aaa;border-right:0;background:#fff;line-height:1.5em;-webkit-appearance:none}
|
||||
#schall_submit {border:1px solid #aaa;border-left:0}
|
||||
|
||||
|
||||
BIN
img/ft_catch.jpg
BIN
img/ft_catch.jpg
Binary file not shown.
|
Before Width: | Height: | Size: 14 KiB After Width: | Height: | Size: 9.4 KiB |
BIN
img/logo.jpg
BIN
img/logo.jpg
Binary file not shown.
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 4.4 KiB |
@ -627,6 +627,7 @@ CREATE TABLE IF NOT EXISTS `g4s_visit_sum` (
|
||||
DROP TABLE IF EXISTS `g4s_unique`;
|
||||
CREATE TABLE IF NOT EXISTS `g4s_uniqid` (
|
||||
`uq_id` bigint(20) unsigned NOT NULL,
|
||||
`uq_ip` varchar(255) NOT NULL,
|
||||
PRIMARY KEY (`uq_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
|
||||
|
||||
@ -405,8 +405,8 @@ $dir_arr = array (
|
||||
);
|
||||
|
||||
for ($i=0; $i<count($dir_arr); $i++) {
|
||||
@mkdir($dir_arr[$i], 0707);
|
||||
@chmod($dir_arr[$i], 0707);
|
||||
@mkdir($dir_arr[$i], G4_DIR_PERMISSION);
|
||||
@chmod($dir_arr[$i], G4_DIR_PERMISSION);
|
||||
}
|
||||
|
||||
if($shop_install) {
|
||||
@ -435,7 +435,7 @@ if($shop_install) {
|
||||
|
||||
// DB 설정 파일 생성
|
||||
$file = '../'.G4_DATA_DIR.'/'.G4_DBCONFIG_FILE;
|
||||
$f = @fopen($file, 'w');
|
||||
$f = @fopen($file, 'a');
|
||||
|
||||
fwrite($f, "<?php\n");
|
||||
fwrite($f, "if (!defined('_GNUBOARD_')) exit;\n");
|
||||
@ -467,7 +467,7 @@ fwrite($f, "\$g4['visit_sum_table'] = G4_TABLE_PREFIX.'visit_sum'; // 방문자
|
||||
fwrite($f, "\$g4['uniqid_table'] = G4_TABLE_PREFIX.'uniqid'; // 유니크한 값을 만드는 테이블\n");
|
||||
fwrite($f, "\$g4['syndi_log_table'] = G4_TABLE_PREFIX.'syndi_log'; // 네이버 신디케이션 컨텐츠 삭제 로그 테이블\n");
|
||||
fwrite($f, "\$g4['autosave_table'] = G4_TABLE_PREFIX.'autosave'; // 게시글 작성시 일정시간마다 글을 임시 저장하는 테이블\n");
|
||||
fwrite($f, " ?>");
|
||||
fwrite($f, "?>");
|
||||
|
||||
if($shop_install) {
|
||||
fwrite($f, "\n\n<?php\n");
|
||||
@ -501,7 +501,7 @@ if($shop_install) {
|
||||
}
|
||||
|
||||
fclose($f);
|
||||
@chmod($file, 0606);
|
||||
@chmod($file, G4_FILE_PERMISSION);
|
||||
?>
|
||||
|
||||
<li>DB설정 파일 생성 완료 (<?php echo $file ?>)</li>
|
||||
|
||||
@ -33,7 +33,7 @@ function mobile_create_thumb($srcImg, $width, $thumb)
|
||||
imagecopy($target, $source, 0, 0, 0, 0, $size[0], $size[1]);
|
||||
|
||||
imagejpeg($target, $thumb, 100);
|
||||
chmod($thumb, 0606); // 추후 삭제를 위하여 파일모드 변경
|
||||
chmod($thumb, G4_FILE_PERMISSION); // 추후 삭제를 위하여 파일모드 변경
|
||||
|
||||
return $thumb;
|
||||
}
|
||||
@ -62,8 +62,8 @@ function mobile_thumb($matches)
|
||||
|
||||
$thumb_dir = G4_DATA_PATH.'/thumb/'.$bo_table;
|
||||
if (!is_dir($thumb_dir)) {
|
||||
@mkdir($thumb_dir, 0707);
|
||||
@chmod($thumb_dir, 0707);
|
||||
@mkdir($thumb_dir, G4_DIR_PERMISSION);
|
||||
@chmod($thumb_dir, G4_DIR_PERMISSION);
|
||||
}
|
||||
|
||||
$result = true;
|
||||
|
||||
@ -180,8 +180,8 @@ function thumbnail($filename, $source_path, $target_path, $thumb_width, $thumb_h
|
||||
return;
|
||||
|
||||
if (!is_dir($target_path)) {
|
||||
@mkdir($target_path, 0707);
|
||||
@chmod($target_path, 0707);
|
||||
@mkdir($target_path, G4_DIR_PERMISSION);
|
||||
@chmod($target_path, G4_DIR_PERMISSION);
|
||||
}
|
||||
|
||||
// Animated GIF는 썸네일 생성하지 않음
|
||||
@ -299,7 +299,7 @@ function thumbnail($filename, $source_path, $target_path, $thumb_width, $thumb_h
|
||||
}
|
||||
|
||||
imagejpeg($dst, $thumb_file, 90);
|
||||
chmod($thumb_file, 0606); // 추후 삭제를 위하여 파일모드 변경
|
||||
chmod($thumb_file, G4_FILE_PERMISSION); // 추후 삭제를 위하여 파일모드 변경
|
||||
|
||||
imagedestroy($src);
|
||||
imagedestroy($dst);
|
||||
|
||||
@ -19,7 +19,7 @@ include_once(G4_LIB_PATH.'/popular.lib.php');
|
||||
<div id="hd_wrapper">
|
||||
|
||||
<div id="logo">
|
||||
<a href="<?php echo G4_URL ?>"><img src="<?php echo G4_IMG_URL ?>/logo.jpg" alt="처음으로" width="53" height="37"></a>
|
||||
<a href="<?php echo G4_URL ?>"><img src="<?php echo G4_IMG_URL ?>/logo.jpg" alt="처음으로"></a>
|
||||
</div>
|
||||
|
||||
<fieldset id="schall">
|
||||
|
||||
@ -5,8 +5,8 @@ $ym = date('ym', G4_SERVER_TIME);
|
||||
|
||||
$data_dir = G4_DATA_PATH.'/editor/'.$ym;
|
||||
$data_url = G4_DATA_URL.'/editor/'.$ym;
|
||||
@mkdir($data_dir, 0707);
|
||||
@chmod($data_dir, 0707);
|
||||
@mkdir($data_dir, G4_DIR_PERMISSION);
|
||||
@chmod($data_dir, G4_DIR_PERMISSION);
|
||||
|
||||
// 업로드 DIALOG 에서 전송된 값
|
||||
$funcNum = $_GET['CKEditorFuncNum'] ;
|
||||
|
||||
Reference in New Issue
Block a user