//DB¿¡¼ ±Û ³»¿ëÀ» ºÒ·¯¿À´Â °Í°ú ±âŸ ±â´ÉÀÌ µé¾î ÀÖ´Ù.
//³»¿ë ºÒ·¯¿À±â
if($main_no<0) {
$sql = "select * from $board
where code='$code' and main_no=$main_no and dep_no='$dep_no' and add_no=0";
$result = mysql_query($sql);
$row2 = mysql_fetch_array($result);
}
else {
if(strlen($keyword) > 0)
{
switch ($ftype) {
case "subj":
$colm = title;
break;
case "cont":
$colm = content;
break;
case "name":
$colm = name;
break;
}
if($no>=0) {
$sql="select * from $board
where code = '$code' and main_no>0 and
add_no =0 and
$colm like '%$keyword%' limit $no,3";
$result = mysql_query($sql);
$row1 = mysql_fetch_array($result);
$row2 = mysql_fetch_array($result);
$row3 = mysql_fetch_array($result);
}
else {
$sql="select * from $board
where code = '$code' and main_no>0 and
add_no =0 and
$colm like '%$keyword%' limit 0,2";
$result = mysql_query($sql);
$row2 = mysql_fetch_array($result);
$row3 = mysql_fetch_array($result);
}
}
else {
if($no>=0) {
$sql = "select * from $board where code='$code' and add_no=0 and main_no>0 limit $no,3";
$result = mysql_query($sql);
$row1 = mysql_fetch_array($result);
$row2 = mysql_fetch_array($result);
$row3 = mysql_fetch_array($result);
}
else {
$sql = "select * from $board where code='$code' and add_no=0 and main_no>0 limit 0,2";
$result = mysql_query($sql);
$row2 = mysql_fetch_array($result);
$row3 = mysql_fetch_array($result);
}
}
}
//$read_key°¡ aÀÌ¸é ³»¿ëÀ» º¸Áö ¸øÇϰí bÀÌ¸é ³»¿ëÀ» º¼¼ö ÀÖ´Ù.
$read_only = b;
//read_pass´Â Àǰߴޱ⸦ ÇÒ ¶§ save¿¡¼ º¸³»¿Â º¯¼ö´Ù.
if($read_pass==a or $mode==modify or $mode==add_del or $mode==reply) $read_only=b;
if($read_key==a or $read_only==a) include('../../system/login/login-inc.php');
//Ä«¿îÆ® Áõ°¡
$sql = "update $board set view = view+1
where code='$code' and main_no=$main_no and dep_no='$dep_no' and add_no=0";
mysql_query($sql);
echo mysql_error();
//1.2¹øÆÄÀÏÀÇ È®ÀåÀÚ¿Í ÆÄÀÏÅ©±â¸¦ ±¸ÇÏ´Â ¼Ò½º
include("../../inc_file/view/file_2.php");
//¾÷ÆÄÀÏÀÇ fd_1¿¡ ÆÄÀÏÀÌ ÀÖÀ¸¸é À̹ÌÁöÀÇ °¡·Î.¼¼·Î Å©±â¸¦ ±¸ÇØ ÆË¾÷âÀÇ Å©±â¸¦ °áÁ¤
if($file1_size) {
$img=GetImageSize("../../system/upfile/$code/fd_1/$fn");
$width=$img[0]; //°¡·Î »çÀÌÁî
$height=$img[1]; //¼¼·Î »çÀÌÁî
if($height>=650) {$w_rate=650/$height; $height=650; $width=floor($width*$w_rate);}
}
//ÇöÀçÀÇ ³ªÀÌ¿Í ´Þ¸®±â ½ÃÀ۳⵵¸¦ ±¸ÇÑ´Ù.
$current_old=date(Y)-$row2[sub1]+1;
$carrier_year=date(Y)-$row2[sub2]+1;
?>
include("../../inc_file/view/layer_2.php");?>
include("../../inc_file/view/title.php"); ?>
height=20>
>Á¦ ¸ñ |
>=$row2[title]?>
|
Á¶È¸(=$row2[view]?>)
|
>
>»ó ¼¼ ¼³ ¸í
|
include("../../inc_file/view/content_2.php");?>
|
>
>
if($row3) {
$no = $no+1;
$title = " $row3[name] ¢Ö $row3[title]\n";
echo "[ÀÌÀü]¡ã".$title." \n";
$no=$no-1;
}
if($row1) {
$no = $no-1;
$title = " $row1[name] ¢Ù $row1[title]\n";
echo "[´ÙÀ½]¡å".$title;
$no = $no+1;
}
?>
|
|
if($add_rep==a) include('../../inc_file/view/reply_'.$opinion_key.'.php'); ?>
|
include("../../inc_file/view/tail_4.php");?>