버전 5.4.2.2 수정

This commit is contained in:
thisgun
2020-03-03 19:07:16 +09:00
6 changed files with 24 additions and 13 deletions

View File

@ -204,7 +204,7 @@ if ($w == '') {
$file = file('./sql_write.sql');
$file = get_db_create_replace($file);
$sql = implode($file, "\n");
$sql = implode("\n", $file);
$create_table = $g5['write_prefix'] . $bo_table;

View File

@ -68,15 +68,17 @@ $result = sql_query($sql);
$num = $i + 1;
$bg = 'bg'.($i%2);
$fa_subject = conv_content($row['fa_subject'], 1);
?>
<tr class="<?php echo $bg; ?>">
<td class="td_num"><?php echo $num; ?></td>
<td class="td_left"><?php echo stripslashes($row['fa_subject']); ?></td>
<td class="td_left"><?php echo $fa_subject; ?></td>
<td class="td_num"><?php echo $row['fa_order']; ?></td>
<td class="td_mng td_mng_m">
<a href="./faqform.php?w=u&amp;fm_id=<?php echo $row['fm_id']; ?>&amp;fa_id=<?php echo $row['fa_id']; ?>" class="btn btn_03"><span class="sound_only"><?php echo stripslashes($row['fa_subject']); ?> </span>수정</a>
<a href="./faqformupdate.php?w=d&amp;fm_id=<?php echo $row['fm_id']; ?>&amp;fa_id=<?php echo $row['fa_id']; ?>" onclick="return delete_confirm(this);" class="btn btn_02"><span class="sound_only"><?php echo stripslashes($row['fa_subject']); ?> </span>삭제</a>
<a href="./faqform.php?w=u&amp;fm_id=<?php echo $row['fm_id']; ?>&amp;fa_id=<?php echo $row['fa_id']; ?>" class="btn btn_03"><span class="sound_only"><?php echo $fa_subject; ?> </span>수정</a>
<a href="./faqformupdate.php?w=d&amp;fm_id=<?php echo $row['fm_id']; ?>&amp;fa_id=<?php echo $row['fa_id']; ?>" onclick="return delete_confirm(this);" class="btn btn_02"><span class="sound_only"><?php echo $fa_subject; ?> </span>삭제</a>
</td>
</tr>

View File

@ -5,8 +5,8 @@
********************/
define('G5_VERSION', '그누보드5');
define('G5_GNUBOARD_VER', '5.4.2.1');
define('G5_YOUNGCART_VER', '5.4.2.1');
define('G5_GNUBOARD_VER', '5.4.2.2');
define('G5_YOUNGCART_VER', '5.4.2.2');
// 이 상수가 정의되지 않으면 각각의 개별 페이지는 별도로 실행될 수 없음
define('_GNUBOARD_', true);

View File

@ -337,7 +337,7 @@ for($i=0; $row=sql_fetch_array($result); $i++) {
// 게시판 테이블 생성
$bo_table = $row['bo_table'];
$file = file(G5_ADMIN_PATH.'/sql_write.sql');
$sql = implode($file, "\n");
$sql = implode("\n", $file);
$create_table = $g5['write_prefix'] . $bo_table;

View File

@ -319,7 +319,7 @@ if($g5_install || !$result) {
// 게시판 테이블 생성
$file = file("../".G5_ADMIN_DIR."/sql_write.sql");
$file = get_db_create_replace($file);
$sql = implode('\n', $file);
$sql = implode("\n", $file);
$create_table = $table_prefix.'write_' . $tmp_bo_table[$i];

View File

@ -67,8 +67,14 @@ class FileCache
{
return FALSE;
}
$data = unserialize(file_get_contents( $cache_file_path ));
try{
$file_contents = file_get_contents($cache_file_path);
$file_ex = explode("\n\n", $file_contents);
$data = unserialize(base64_decode($file_ex[1]));
} catch(Exception $e){
$data = array('ttl'=>1, 'time'=>time() - 1000);
}
if ($data['ttl'] > 0 && time() > $data['time'] + $data['ttl'])
{
@ -135,7 +141,10 @@ class FileCache
'data' => $data
);
if ($this->write_file($cache_file_path, serialize($contents)))
$cache_content = "<?php if (!defined('_GNUBOARD_')) exit; ?>\n\n";
$cache_content .= base64_encode(serialize($contents));
if ($this->write_file($cache_file_path, $cache_content))
{
chmod($cache_file_path, G5_FILE_PERMISSION);
return TRUE;
@ -167,7 +176,7 @@ class FileCache
if ($ttl !== null) {
$expire = time() + $ttl;
}
return serialize(array($data, $expire));
return base64_encode(serialize(array($data, $expire)));
}
/**
@ -181,7 +190,7 @@ class FileCache
*/
public function decode($data)
{
return unserialize($data);
return unserialize(base64_decode($data));
}
}
?>