include_once("./_common_f1add.php");
include_once("./_common.php");
include_once("$g4[path]/lib/latest_popular.lib.php");
if (!$board[bo_table])
{
if ($cwin) // ÄÚ¸àÆ® º¸±â
alert_close("Á¸ÀçÇÏÁö ¾Ê´Â °Ô½ÃÆÇÀÔ´Ï´Ù.", $g4[path]);
else
alert("Á¸ÀçÇÏÁö ¾Ê´Â °Ô½ÃÆÇÀÔ´Ï´Ù.", $g4[path]);
}
if ($write[wr_is_comment])
{
/*
if ($cwin) // ÄÚ¸àÆ® º¸±â
alert_close("ÄÚ¸àÆ®´Â »ó¼¼º¸±â ÇÏ½Ç ¼ö ¾ø½À´Ï´Ù.");
else
alert("ÄÚ¸àÆ®´Â »ó¼¼º¸±â ÇÏ½Ç ¼ö ¾ø½À´Ï´Ù.");
*/
goto_url("./board.php?bo_table=$bo_table&wr_id=$write[wr_parent]#c_{$wr_id}");
}
if (!$bo_table)
{
$msg = "bo_table °ªÀÌ ³Ñ¾î¿ÀÁö ¾Ê¾Ò½À´Ï´Ù.\\n\\nboard.php?bo_table=code ¿Í °°Àº ¹æ½ÄÀ¸·Î ³Ñ°Ü ÁÖ¼¼¿ä.";
if ($cwin) // ÄÚ¸àÆ® º¸±â
alert_close($msg);
else
alert($msg);
}
// wr_id °ªÀÌ ÀÖÀ¸¸é ±ÛÀбâ
if ($wr_id)
{
// ±ÛÀÌ ¾øÀ» °æ¿ì ÇØ´ç °Ô½ÃÆÇ ¸ñ·ÏÀ¸·Î À̵¿
if (!$write[wr_id])
{
$msg = "±ÛÀÌ Á¸ÀçÇÏÁö ¾Ê½À´Ï´Ù.\\n\\n±ÛÀÌ »èÁ¦µÇ¾ú°Å³ª À̵¿µÈ °æ¿ìÀÔ´Ï´Ù.";
if ($cwin)
alert_close($msg);
else
alert($msg, "./board.php?bo_table=$bo_table");
}
// ±×·ìÁ¢±Ù »ç¿ë
if ($group[gr_use_access])
{
if (!$member[mb_id]) {
$msg = "ºñȸ¿øÀº ÀÌ °Ô½ÃÆÇ¿¡ Á¢±ÙÇÒ ±ÇÇÑÀÌ ¾ø½À´Ï´Ù.\\n\\nȸ¿øÀ̽öó¸é ·Î±×ÀÎ ÈÄ ÀÌ¿ëÇØ º¸½Ê½Ã¿À.";
if ($cwin)
alert_close($msg);
else
alert($msg, "./login.php?wr_id=$wr_id{$qstr}&url=".urlencode("./board.php?bo_table=$bo_table&wr_id=$wr_id"));
}
// ±×·ì°ü¸®ÀÚ ÀÌ»óÀ̶ó¸é Åë°ú
if ($is_admin == "super" || $is_admin == "group")
;
else
{
// ±×·ìÁ¢±Ù
$sql = " select count(*) as cnt
from $g4[group_member_table]
where gr_id = '$board[gr_id]' and mb_id = '$member[mb_id]' ";
$row = sql_fetch($sql);
if (!$row[cnt])
alert("Á¢±Ù ±ÇÇÑÀÌ ¾øÀ¸¹Ç·Î ±ÛÀбⰡ ºÒ°¡ÇÕ´Ï´Ù.\\n\\n±Ã±ÝÇϽŠ»çÇ×Àº °ü¸®ÀÚ¿¡°Ô ¹®ÀÇ ¹Ù¶ø´Ï´Ù.", $g4[path]);
}
}
// ·Î±×ÀÎµÈ È¸¿øÀÇ ±ÇÇÑÀÌ ¼³Á¤µÈ Àб⠱ÇÇѺ¸´Ù ÀÛ´Ù¸é
if ($member[mb_level] < $board[bo_read_level])
{
if ($member[mb_id])
//alert("±ÛÀ» ÀÐÀ» ±ÇÇÑÀÌ ¾ø½À´Ï´Ù.");
alert("±ÛÀ» ÀÐÀ» ±ÇÇÑÀÌ ¾ø½À´Ï´Ù.", $g4[path]);
else
alert("±ÛÀ» ÀÐÀ» ±ÇÇÑÀÌ ¾ø½À´Ï´Ù.\\n\\nȸ¿øÀ̽öó¸é ·Î±×ÀÎ ÈÄ ÀÌ¿ëÇØ º¸½Ê½Ã¿À.", "./login.php?wr_id=$wr_id{$qstr}&url=".urlencode("./board.php?bo_table=$bo_table&wr_id=$wr_id"));
}
// ÀÚ½ÅÀÇ ±ÛÀ̰ųª °ü¸®ÀÚ¶ó¸é Åë°ú
if (($write[mb_id] && $write[mb_id] == $member[mb_id]) || $is_admin)
;
else
{
// ºñ¹Ð±ÛÀ̶ó¸é
if (strstr($write[wr_option], "secret"))
{
// ȸ¿øÀÌ ºñ¹Ð±ÛÀ» ¿Ã¸®°í °ü¸®ÀÚ°¡ ´äº¯±ÛÀ» ¿Ã·ÈÀ» °æ¿ì
// ȸ¿øÀÌ °ü¸®ÀÚ°¡ ¿Ã¸° ´äº¯±ÛÀ» ¹Ù·Î º¼ ¼ö ¾ø´ø ¿À·ù¸¦ ¼öÁ¤
$is_owner = false;
if ($write[wr_reply] && $member[mb_id])
{
$sql = " select mb_id from $write_table
where wr_num = '$write[wr_num]'
and wr_reply = ''
and wr_is_comment = '0' ";
$row = sql_fetch($sql);
if ($row[mb_id] == $member[mb_id])
$is_owner = true;
}
$ss_name = "ss_secret_{$bo_table}_$write[wr_num]";
if (!$is_owner)
{
//$ss_name = "ss_secret_{$bo_table}_{$wr_id}";
// Çѹø ÀÐÀº °Ô½Ã¹°ÀÇ ¹øÈ£´Â ¼¼¼Ç¿¡ ÀúÀåµÇ¾î ÀÖ°í °°Àº °Ô½Ã¹°À» ÀÐÀ» °æ¿ì´Â ´Ù½Ã Æнº¿öµå¸¦ ¹¯Áö ¾Ê½À´Ï´Ù.
// ÀÌ °Ô½Ã¹°ÀÌ ÀúÀåµÈ °Ô½Ã¹°ÀÌ ¾Æ´Ï¸é¼ °ü¸®ÀÚ°¡ ¾Æ´Ï¶ó¸é
//if ("$bo_table|$write[wr_num]" != get_session("ss_secret"))
if (!get_session($ss_name))
goto_url("./password.php?w=s&bo_table=$bo_table&wr_id=$wr_id{$qstr}");
}
set_session($ss_name, TRUE);
}
}
// Çѹø ÀÐÀº±ÛÀº ºê¶ó¿ìÀú¸¦ ´Ý±âÀü±îÁö´Â Ä«¿îÆ®¸¦ Áõ°¡½ÃÅ°Áö ¾ÊÀ½ ±ÛÀÐÀ½¼ýÀÚÁ¶Àý.....ù¹ø° ·£´ýÈ÷Æ® µÎ¹ø°ÀçŬ¸¯½Ã +1 3´Ü°è Ŭ¸¯´ç¼ýÀÚ.......................................................................
$hit_rand = rand(0,1); // È÷Æ® Áõ°¡ºÎºÐ ·£´ý + 1~9 (¼öÁ¤º»)½ÃÀÛ
if (!$_SESSION[$ss_name]) {
////////////// 0309
//sql_query(" update $write_table set wr_hit = wr_hit + $hit_rand where wr_id = '$wr_id' ");
} // È÷Æ®·£´ýÁõ°¡(³¡)
////////////// 0309
// sql_query(" update $write_table set wr_hit = wr_hit + 1 where wr_id = '$wr_id' "); //Ŭ¸¯ÇÒ¶§¸¶´ÙÁõ°¡
$ss_name = "ss_view_{$bo_table}_{$wr_id}";
if (!get_session($ss_name))
{
// sql_query(" update $write_table set wr_hit = wr_hit + 1 where wr_id = '$wr_id' ");
// ÀÚ½ÅÀÇ ±ÛÀ̸é Åë°ú
if ($write[mb_id] && $write[mb_id] == $member[mb_id]) {
;
} else if ($is_guest && $board[bo_read_level] == 1 && $write[wr_ip] == $_SERVER['REMOTE_ADDR']) {
// ºñȸ¿øÀÌ¸é¼ Àбⷹº§ÀÌ 1ÀÌ°í µî·ÏµÈ ¾ÆÀÌÇÇ°¡ °°´Ù¸é ÀÚ½ÅÀÇ ±ÛÀ̹ǷΠÅë°ú
;
} else {
/*
// ȸ¿øÀÌ»ó ±ÛÀбⰡ °¡´ÉÇÏ´Ù¸é
if ($board[bo_read_level] > 1) {
if ($member[mb_point] + $board[bo_read_point] < 0)
alert("º¸À¯ÇϽŠÆ÷ÀÎÆ®(".number_format($member[mb_point]).")°¡ ¾ø°Å³ª ¸ðÀÚ¶ó¼ ±ÛÀбâ(".number_format($board[bo_read_point]).")°¡ ºÒ°¡ÇÕ´Ï´Ù.\\n\\nÆ÷ÀÎÆ®¸¦ ¸ðÀ¸½Å ÈÄ ´Ù½Ã ±ÛÀбâ ÇØ ÁֽʽÿÀ.");
insert_point($member[mb_id], $board[bo_read_point], "$board[bo_subject] $wr_id ±ÛÀбâ", $bo_table, $wr_id, 'Àбâ');
}
*/
// ±ÛÀбâ Æ÷ÀÎÆ®°¡ ¼³Á¤µÇ¾î ÀÖ´Ù¸é
if ($board[bo_read_point] && $member[mb_point] + $board[bo_read_point] < 0)
alert("º¸À¯ÇϽŠÆ÷ÀÎÆ®(".number_format($member[mb_point]).")°¡ ¾ø°Å³ª ¸ðÀÚ¶ó¼ ±ÛÀбâ(".number_format($board[bo_read_point]).")°¡ ºÒ°¡ÇÕ´Ï´Ù.\\n\\nÆ÷ÀÎÆ®¸¦ ¸ðÀ¸½Å ÈÄ ´Ù½Ã ±ÛÀбâ ÇØ ÁֽʽÿÀ.");
insert_point($member[mb_id], $board[bo_read_point], "$board[bo_subject] $wr_id ±ÛÀбâ", $bo_table, $wr_id, 'Àбâ');
}
set_session($ss_name, TRUE);
}
$g4[title] = "Ç÷¡½Ã24- > $board[bo_subject] > " . strip_tags(conv_subject($write[wr_subject], 255));
$g4[content] = strip_tags($write[wr_content]);
preg_match_all('!]*)src=([^\>]*?)\>!is', $write[wr_content], $matches);
foreach($matches[0] as $key => $val) {
//$write[wr_content] = str_replace($val,"",$write[wr_content]);
preg_match_all('/([^=^"^ ]*)src=([^ ^>]*)/i', $val, $src_match);
$src[] = str_replace("\"","",$src_match[2][0]);
}
//var_dump($src);
//echo $src[0];
//array(2) { [0]=> string(82) "http://file.flash24.dreamx.com/g4/data/mw.cheditor/1803/e2XBb3xHKSdQxk4UnF5fAc.jpg" [1]=> string(90) "http://file.flash24.dreamx.com/g4/data/mw.cheditor/1803/LMxG9peKOpFGG7Hn4y4gvrPNVXGYfg.jpg" }
}
else
{
if ($member[mb_level] < $board[bo_list_level])
{
if ($member[mb_id])
alert("¸ñ·ÏÀ» º¼ ±ÇÇÑÀÌ ¾ø½À´Ï´Ù.", $g4[path]);
else
alert("¸ñ·ÏÀ» º¼ ±ÇÇÑÀÌ ¾ø½À´Ï´Ù.\\n\\nȸ¿øÀ̽öó¸é ·Î±×ÀÎ ÈÄ ÀÌ¿ëÇØ º¸½Ê½Ã¿À.", "./login.php?wr_id=$wr_id{$qstr}&url=".urlencode("board.php?bo_table=$bo_table&wr_id=$wr_id"));
}
if (!$page) $page = 1;
$g4[title] = "Ç÷¡½Ã24- > $board[bo_subject] $page ÆäÀÌÁö";
}
//../head.sub.php
include_once("$g4[path]/head.main.php");
$width = $board[bo_table_width];
if ($width <= 100) $width .= '%';
// IPº¸À̱⠻ç¿ë ¿©ºÎ
$ip = "";
$is_ip_view = $board[bo_use_ip_view];
if ($is_admin) {
$is_ip_view = true;
$ip = $write[wr_ip];
} else // °ü¸®ÀÚ°¡ ¾Æ´Ï¶ó¸é IP ÁÖ¼Ò¸¦ °¨ÃáÈÄ º¸¿©ÁÝ´Ï´Ù.
$ip = preg_replace("/([0-9]+).([0-9]+).([0-9]+).([0-9]+)/", "\\1.¢½.\\3.\\4", $write[wr_ip]);
// ºÐ·ù »ç¿ë
$is_category = false;
$category_name = "";
if ($board[bo_use_category]) {
$is_category = true;
$category_name = $write[ca_name]; // ºÐ·ù¸í
}
// Ãßõ »ç¿ë
$is_good = false;
if ($board[bo_use_good])
$is_good = true;
// ºñÃßõ »ç¿ë
$is_nogood = false;
if ($board[bo_use_nogood])
$is_nogood = true;
$admin_href = "";
// ÃÖ°í°ü¸®ÀÚ ¶Ç´Â ±×·ì°ü¸®ÀÚ¶ó¸é
if ($member[mb_id] && ($is_admin == 'super' || $group[gr_admin] == $member[mb_id]))
$admin_href = "$g4[admin_path]/board_form.php?w=u&bo_table=$bo_table";
if (!($board[bo_use_comment] && $cwin))
include_once("./board_new_head.php");
echo "\n";
//echo $board[bo_count_write];
if (!($board[bo_use_comment] && $cwin)) {
// °Ô½Ã¹° ¾ÆÀ̵𰡠ÀÖ´Ù¸é °Ô½Ã¹° º¸±â¸¦ INCLUDE
if ($wr_id)
{
if( function_exists(isF1) && isF1($bo_table) )
{
include_once("./view_f1.php");
}
else
{
include_once("./view.php");
}
}
// Àüü¸ñ·Ïº¸À̱⠻ç¿ëÀÌ "¿¹" ¶Ç´Â wr_id °ªÀÌ ¾ø´Ù¸é ¸ñ·ÏÀ» º¸ÀÓ
//if ($board[bo_use_list_view] || empty($wr_id))
if ($member[mb_level] >= $board[bo_list_level] && $board[bo_use_list_view] || empty($wr_id))
{
?>