include "./common/common.php";
include "./common/config.php";
?>
New Document
db_connect();
// Á¶È¸¼ö ¾÷µ¥ÀÌÆ®
$count_query = mysql_query("select count from $db_table where id='$id'");
$count_row = mysql_fetch_array($count_query);
$count_up = $count_row[count]+1;
$count_result = mysql_query("update $db_table set count=$count_up where id='$id'");
$query = "select * from $db_table where id='$id'";
$result = mysql_query($query);
$row = mysql_fetch_array($result);
$body = htmlspecialchars($row[body]);
$body = str_replace("\n","
",$body);
$body = str_replace(" "," ",$body);
if(strlen($row[subject]) > 82) { // Á¦¸ñ±æÀ̰¡ ±æ¸é ÀÚ¸¥´Ù.
$subject = substr($row[subject], 0, 82);
$subject .= "...";
}
$name = htmlspecialchars($row[name]);
$email = $row[email];
$subject = htmlspecialchars($row[subject]);
$insert_date = substr($row[insert_date], 0, 16);
$modify_date = substr($row[modify_date], 0, 16);
$modify_use = $row[modify_use];
$ip = $row[ip];
db_close();
?>
echo $name ?> |
|
|
 |
echo $name ?> |
 |
echo $email ?> |
 |
echo $subject ?> |
|
|
 |
echo $body ?> |
|
|
if($use_file == '1'){
if($row[file]){
$filesize = filesize($row[file]);
$fileprint = explode("_", $row[file]);
echo("
 |
$fileprint[2] ($filesize Byte)
|
");
}
else{
$file = "¾øÀ½";;
}
}
?>
|
echo" ÀÛ¼º : $insert_date"; ?> if($modify_use=='1') echo"/ ¼öÁ¤ : $modify_date ";?>(IP: echo $ip?>) |
|
|
|
|
| |
 |
|
db_connect();
## ÀÌÀü-´ÙÀ½ »ç¿ë ·ÎÁ÷ ##
/**
$next = $row[next]-1;
$query2 = "select id from $db_table where next=$next and del='n'";
$result2 = mysql_query($query2);
$row2 = mysql_fetch_array($result2);
if($row2[id]){
echo("ÀÌÀü±Û || ");
}
$next = $row[next]+1;
$query2 = "select id from $db_table where next=$next and del='n'";
$result2 = mysql_query($query2);
$row2 = mysql_fetch_array($result2);
if($row2[id]){
echo("´ÙÀ½±Û");
}
**/
## ÀÌÀü-´ÙÀ½ »ç¿ë ·ÎÁ÷ ##
echo ("
 |
 |
 |
 |
 |
");
reply(0,$row[egroup]);
function reply($parentid,$egroup){
global $db_table;
global $timelimit;
global $id;
static $i=0;
$query = "select * from $db_table where parent='$parentid' and egroup='$egroup' order by id desc";
$result = mysql_query($query);
$total = mysql_num_rows($result);
$timelimit = 60 * 60 * $timelimit; // ȯ°æ¼³Á¤¿¡¼ ±âÁؽð¢ È£Ãâ
$time[base] = time() - ($timelimit); // ºñ±³±âÁؽð¢
while($row = mysql_fetch_array($result)){
$num=$total - $total + 1;
if(strlen($row[subject]) > 82) { // Á¦¸ñ±æÀ̰¡ ±æ¸é ÀÚ¸¥´Ù.
$row[subject] = substr($row[subject], 0, 82);
$row[subject] .= "...";
}
$row[subject] = htmlspecialchars($row[subject]);
$time[insert] = strtotime($row[insert_date]); // Á¤¼ö·Î º¯È¯
$row[insert_date] = substr($row[insert_date], 0, 10);
if($row[del]=='n'){
echo("
| $num |
");
if($row[parent]!=0){echo (" ");}
else {echo (" ");}
echo(" $row[subject]");
if($time[base] < $time[insert]){
echo (" ");
}
echo("
|
$row[name] |
$row[insert_date] |
$row[count] |
|
");
} // $row[del]=='n' Á¾·á
reply($row[id],$egroup);
} // while Á¾·á
} // reply() Á¾·á
mysql_close();
echo("
|
");
?>