include_once ("../inc/db.inc") ;
include_once ("../inc/func.inc") ;
if($code == "mem") {
if($login[stat] == "") {
echo("");
exit;
}
}
if($code == "") {
$code = "bbs";
}
$sitedownload_dir = "../down";
$write_page = "write.html"; // µî·Ï ÆäÀÌÁö
$list_page = "bbs_01.html"; // ¸®½ºÆ® ÆäÀÌÁö
$view_page = "view.html"; // º¸±â ÆäÀÌÁö
if($mode == "del") {
$query = "delete from ".$code." where seq='$seq'";
$result = mysql_query($query);
echo("");
exit;
}
$query = "update ".$code." set hit=hit+1 where seq=$seq" ;
mysql_query($query);
// °Ô½Ã¹° ³»¿ë
if ($seq) // $seq ÁöÁ¤ÀÌ µÇ¾î ÀÖÁö ¾ÊÀ¸¸é °¡Àå ÃÖ±ÙÀÇ °Ô½Ã¹°À» º¸¿©ÁØ´Ù
{
$query1 = "select seq, pos, title, name, DATE_FORMAT(register_dt,'%Y-%m-%d %H:%i:%s'), hit, body, email, thread, user_ip,user_img from ".$code." where seq=$seq" ;
}
else
$query1 = "select seq, pos, title, name, DATE_FORMAT(register_dt,'%Y-%m-%d %H:%i:%s'), hit, body, email, thread, user_ip,user_img from ".$code." order by pos limit 1" ;
$result1 = mysql_query($query1);
$row = mysql_fetch_array($result1);
$title = stripslashes($row[title]);
$body = stripslashes($row[body]);
$body = nl2br($body);
$this_date = $row[4];
$this_seq = $seq = $row[seq]; // $seq°¡ Àμö·Î ¾È ³Ñ¾î¿À´Â °æ¿ì¸¦ ´ëºñÇØ¼...
$this_pos = $row[pos];
$user_ip = $row[user_ip];
$pre_query = "select seq, pos, title from ".$code." where pos < $this_pos order by pos DESC limit 1" ;
$pre_result = mysql_query($pre_query);
if ($pre_result)
{
$pre_row = mysql_fetch_array($pre_result);
$pre_seq = $pre_row[seq];
$pre_title = $pre_row[title];
$pre_title = stripslashes($pre_row[title]);
}
// ´ÙÀ½ ±Û
$next_query = "select seq, pos, title from ".$code." where pos > $this_pos order by pos limit 1";
$next_result = mysql_query($next_query);
if ($next_result)
{
$next_row = mysql_fetch_array($next_result);
$next_seq = $next_row[seq];
$next_title = $next_row[title];
$next_title = stripslashes($next_row[title]);
}
?>
| |
 |
if($code == "bbs") {
?>
|
|
|
|
|
|
} else if($code == "notice") {
?>
|
|
|
|
|
|
} else if($code == "news") {
?>
|
|
|
|
|
|
} else if($code == "mem") {
?>
| |
| |
|
}
?>
|
if($code == "bbs") {
$title_no = "1";
} else if($code == "notice") {
$title_no = "4";
} else if($code == "news") {
$title_no = "3";
} else if($code == "mem") {
$title_no = "2";
}
?>
 |
| |
| |
|
|
| µî·ÏÀÏ |
=$row[4]?> |
Á¶È¸¼ö |
=$row[hit]?> |
|
|
| À̸§ |
=$row[name]?>
|
|
|
|
Á¦¸ñ |
=$title?> |
|
|
=$body?> |
|
| ÆÄÀÏ |
|
if($code == "news" || $code == "notice") {
if($login[stat] == "1") {
echo("
 ");
}
} else {
echo("

");
if($login[stat]=="1") {
echo("  ");
} else {
echo("  ");
}
}
if($code == "mem" || $code == "bbs") {
echo("

");
}
echo("

");
?>
|
|
|
|