/***************************************************************************
* °øÅë ÆÄÀÏ include
**************************************************************************/
include "_head.php";
/***************************************************************************
* °Ô½ÃÆÇ ¼³Á¤ üũ
**************************************************************************/
$mode = $HTTP_GET_VARS[mode];
if(!eregi($HTTP_HOST,$HTTP_REFERER)) Error("Á¤»óÀûÀ¸·Î ±ÛÀ» ÀÛ¼ºÇÏ¿© Áֽñ⠹ٶø´Ï´Ù.");
if(eregi(":\/\/",$dir)) $dir=".";
// º¯¼ö üũ
if(!$mode||$mode=="write") {
$mode = "write";
unset($no);
}
// »ç¿ë±ÇÇÑ Ã¼Å©
if($mode=="reply"&&$setup[grant_reply]<$member[level]&&!$is_admin) Error("»ç¿ë±ÇÇÑÀÌ ¾ø½À´Ï´Ù","login.php?id=$id&page=$page&page_num=$page_num&category=$category&sn=$sn&ss=$ss&sc=$sc&keyword=$keyword&no=$no&file=zboard.php");
elseif($setup[grant_write]<$member[level]&&!$is_admin) Error("»ç¿ë±ÇÇÑÀÌ ¾ø½À´Ï´Ù","login.php?id=$id&page=$page&page_num=$page_num&category=$category&sn=$sn&ss=$ss&sc=$sc&keyword=$keyword&no=$no&file=zboard.php");
if($mode=="reply"&&$setup[grant_view]<$member[level]&&!$is_admin) Error("»ç¿ë±ÇÇÑÀÌ ¾ø½À´Ï´Ù","login.php?id=$id&page=$page&page_num=$page_num&category=$category&sn=$sn&ss=$ss&sc=$sc&keyword=$keyword&no=$no&file=zboard.php");
// ´ä±ÛÀ̳ª ¼öÁ¤À϶§ ¿øº»±ÛÀ» °¡Á®¿È;;
if(($mode=="reply"||$mode=="modify")&&$no) {
$result=@mysql_query("select * from $t_board"."_$id where no='$no'") or error(mysql_error());
unset($data);
$data=mysql_fetch_array($result);
if(!$data[no]) Error("¿øº»±ÛÀÌ Á¸ÀçÇÏÁö ¾Ê½À´Ï´Ù");
}
// ¼öÁ¤ ±ÛÀ϶§ ±ÇÇÑ Ã¼Å©
if($mode=="modify"&&$data[ismember]) {
if($data[ismember]!=$member[no]&&!$is_admin&&$member[level]>$setup[grant_delete]) Error("»ç¿ë±ÇÇÑÀÌ ¾ø½À´Ï´Ù","login.php?id=$id&page=$page&page_num=$page_num&category=$category&sn=$sn&ss=$ss&sc=$sc&keyword=$keyword&no=$no&file=zboard.php");
}
// °øÁö±Û¿¡´Â ´ä±ÛÀÌ ¾È ´Þ¸®°Ô ó¸®
if($mode=="reply"&&$data[headnum]<=-2000000000) Error("°øÁö±Û¿¡´Â ´ä±ÛÀ» ´Þ¼ö ¾ø½À´Ï´Ù");
// Ä«Å×°í¸® µ¥ÀÌŸ °¡Á®¿È;;
$category_result=mysql_query("select * from $t_category"."_$id order by no");
// Ä«Å×°í¸® µ¥ÀÌŸ °®°í ¿À±â;;
if($setup[use_category]) {
$category_kind="";
}
if($mode=="modify") $title = " ±Û ¼öÁ¤Çϱâ ";
elseif($mode=="reply") $title = " ´ä±Û ´Þ±â ";
else $title = " ½Å±Ô ±Û¾²±â ";
// ÄíÅ°°ªÀ» ÀÌ¿ë;;
$name=$HTTP_SESSION_VARS["zb_writer_name"];
$email=$HTTP_SESSION_VARS["zb_writer_email"];
$homepage=$HTTP_SESSION_VARS["zb_writer_homepage"];
/******************************************************************************************
* ±Û¾²±â ¸ðµå¿¡ µû¸¥ ³»¿ë üũ
*****************************************************************************************/
if($mode=="modify") {
// ºñ¹Ð±ÛÀÌ°í Æнº¿öµå°¡ Ʋ¸®°í °ü¸®ÀÚ°¡ ¾Æ´Ï¸é ¸®ÅÏ
if($data[is_secret]&&!$is_admin&&$data[ismember]!=$member[no]&&$HTTP_SESSION_VARS[zb_s_check]!=$setup[no]."_".$no) error("Á¤»óÀûÀÎ ¹æ¹ýÀ¸·Î ¼öÁ¤Çϼ¼¿ä");
$name=stripslashes($data[name]); // À̸§
$email=stripslashes($data[email]); // ¸ÞÀÏ
$homepage=stripslashes($data[homepage]); // ȨÆäÀÌÁö
$subject=$data[subject]=stripslashes($data[subject]); // Á¦¸ñ
$subject=str_replace("\"",""",$subject);
$homepage=str_replace("\"",""",$homepage);
$name=str_replace("\"",""",$name);
$sitelink1=str_replace("\"",""",$sitelink1);
$sitelink2=str_replace("\"",""",$sitelink2);
$memo=stripslashes($data[memo]); // ³»¿ë
$sitelink1=$data[sitelink1]=stripslashes($data[sitelink1]);
$sitelink2=$data[sitelink2]=stripslashes($data[sitelink2]);
if($data[file_name1])$file_name1="
".$data[s_file_name1]."ÀÌ µî·ÏµÇ¾î ÀÖ½À´Ï´Ù. »èÁ¦";
if($data[file_name2])$file_name2="
".$data[s_file_name2]."ÀÌ µî·ÏµÇ¾î ÀÖ½À´Ï´Ù. »èÁ¦";
if($data[use_html]) $use_html=" checked ";
if($data[reply_mail]) $reply_mail=" checked ";
if($data[is_secret]) $secret=" checked ";
if($data[headnum]<=-2000000000) $notice=" checked ";
// ´ä±ÛÀ϶§ Á¦¸ñ°ú ³»¿ë ¼öÁ¤;;
} elseif($mode=="reply") {
// ºñ¹Ð±ÛÀÌ°í Æнº¿öµå°¡ Ʋ¸®°í °ü¸®ÀÚ°¡ ¾Æ´Ï¸é ¸®ÅÏ
if($data[is_secret]&&!$is_admin&&$data[ismember]!=$member[no]&&$HTTP_SESSION_VARS[zb_s_check]!=$setup[no]."_".$no) error("Á¤»óÀûÀÎ ¹æ¹ýÀ¸·Î ´ä±ÛÀ» ´Ù¼¼¿ä");
if($data[is_secret]) $secret=" checked ";
$subject=$data[subject]=stripslashes($data[subject]); // Á¦¸ñ
$subject=str_replace("\"",""",$subject);
$sitelink1=str_replace("\"",""",$sitelink1);
$sitelink2=str_replace("\"",""",$sitelink2);
$memo=stripslashes($data[memo]); // ³»¿ë
if(!eregi("\[re\]",$subject)) $subject="[re] ".$subject; // ´ä±ÛÀ϶§´Â ¾Õ¿¡ [re] ºÙÀÓ;;
$memo=str_replace("\n","\n>",$memo);
$memo="\n\n>".$memo."\n";
$title="$name´ÔÀÇ ±Û¿¡ ´ëÇÑ ´ä±Û¾²±â";
}
// ȸ¿øÀ϶§´Â ±âº» ÀԷ»çÇ× ¾Èº¸ÀÌ°Ô;;
if($member[no]) { $hide_start=""; }
// ½ÎÀÌÆ® ¸µÅ© ±â´ÉÀÌ ¾øÀ»¶§ ¸µÅ© Áö¿ì±â Ç¥½Ã;;
if(!$setup[use_homelink]) { $hide_sitelink1_start="";}
if(!$setup[use_filelink]) { $hide_sitelink2_start="";}
// ÀÚ·á½Ç ±â´ÉÀ» »ç¿ëÇÏ´ÂÁö ¾ÊÇÏ´ÂÁö Ç¥½Ã;;
if(!$setup[use_pds]) { $hide_pds_start="";}
// HTML»ç¿ë üũ¹öÆ°
if($setup[use_html]==0) {
if(!$is_admin&&$member[level]>$setup[grant_html]) {
$hide_html_start="";
}
}
// HTML »ç¿ë üũ¸¦ È®Àå½ÃÅ´
if($mode!="reply") {
if(!$data[use_html]) $value_use_html = 1;
else $value_use_html=$data[use_html];
} else {
$value_use_html=1;
}
$use_html .= " value='$value_use_html' onclick='check_use_html(this)'>"; }
// °øÁö±â´É »ç¿ëÇÏ´ÂÁö ¾ÊÇÏ´ÂÁö Ç¥½Ã;;
if((!$is_admin&&$member[level]>$setup[grant_notice])||$mode=="reply") { $hide_notice_start=""; }
// ÃÖ°í ¾÷·Îµå °¡´É ¿ë·®
if($setup[use_pds]) $upload_limit=GetFileSize($setup[max_upload_size]);
// À̹ÌÁö â°í ¹öÆ°
if($member[no]&&$setup[grant_imagebox]>=$member[level]) $a_imagebox=""; else $a_imagebox="";
// HTML Ãâ·Â
head(" onload=unlock() onunload=hideImageBox() ","script_write.php");
include $dir."/write.php";
foot();
include "_foot.php";
?>