HOME > Q&A > 질문과답
 
<meta http-equiv="Content-Type" content="text/html; charset=euc-kr"> <? include "../config/bbs_config.php"; include $BOARD_FUNCTION_PAGE; include $DB_CONNECT_PAGE; $file_path = $FILE_UPLOAD_HTTP."".$board_id."/"; if($spacing == "") $spacing = 80; $where_str = " where 1 "; $page_tail = ""; //---------------------------------------------------------------------------------------------------------------------- while(list($key, $val) = each($_GET)){ if($key != "board_srlno" && $key != "mode"){ $page_tail .= "&".$key."=".$val; } } $page_tail = substr($page_tail, 1); // - - ȮD \ ̘\. if ($_GET[board_srlno]) { $where_str = " where board_srlno = " . $_GET[board_srlno] ; $selectsql = "select * from $table_name ${where_str}" ; $result = mysql_query($selectsql) ; $rs = mysql_fetch_array($result) ; if (!$rs[0]) { echo("<script> alert(' (t µȲ.');self.history.back() ;</script>"); exit ; } $board_subject = stripSlashes($rs[board_subject]) ; $board_email = stripSlashes($rs[board_email]) ; if ($board_mode == "rewrite") { $board_contents = stripSlashes($rs[board_contents]) ; $board_contents = str_replace(chr(13).chr(10), chr(13).">", $board_contents) ; $board_contents = stripSlashes($rs[board_name]) . " t Ǒ1X " .chr(13).chr(10)."---------------------------".chr(13).chr(10). ">".$board_contents; $board_mode = "rewrite"; } else { $board_srlno = $rs[board_srlno] ; $board_name = stripSlashes($rs[board_name]) ; $board_contents = stripslashes($rs[board_contents]) ; // $board_password = stripslashes($rs[board_password]) ; $board_file = stripslashes($rs[board_file]); if($board_file != "") { $board_file_path = $file_path.$board_file; $file_str = "&nbsp; <a href='".$board_file."' target=_new> ".$board_file_path."</a><input type=hidden name=old_file value='".$board_file."'>"; } else { $file_str = ""; } $board_mode = "modify"; } } else { $board_mode = "new" ; } ?> <script src="../js/input.js"></script> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <form name=frm_board method=post action="write_ok.php?board_id=<?=$board_id?>&<?=$page_tail?>" onsubmit="return ValidChk(document.frm_board);" enctype="multipart/form-data"> <input name=board_mode type=hidden value='<?=$board_mode?>'> <input name=board_srlno type=hidden value='<?=$board_srlno?>'> <tr> <td align="center"><table width="550" border="0" cellspacing="0" cellpadding="0"> <tr> <td height="2" colspan=4 bgcolor="#6b6b6b"></td> </tr> <tr> <td height="1" colspan=4 bgcolor="#ededed"></td> </tr> <tr> <td width="100" height="30" align="center"></td> <td width="1" align="center" bgcolor=#e6e6e6></td> <td height="30" style="padding-left:10px;padding-right:10px;"><input type="text" name="board_subject" class=textbox style="width:95%;" value="<?=$board_subject?>" maxlength="100" must="Y" mustval=""></td></tr> <tr> <td height="1" colspan=4 bgcolor="#ededed"></td> </tr> <tr height="25"> <td height="30" align="center">Ǒ1ǐ</td> <td align="center" bgcolor=#e6e6e6></td> <td style="padding-left:10px;"><input type="text" name="board_name" class=textbox style="width:160px;" value="<?=$board_name?>" maxlength="30" must="Y" mustval="Ǒ1ǐ"></td> </tr> <tr> <td height="1" colspan=4 bgcolor="#ededed"></td> </tr> <tr height="25"> <td height="30" align="center">D8</td> <td width="1" align="center" bgcolor=#e6e6e6></td> <td style="padding-left:10px;"><input type="password" name="board_password" class=textbox style="width:160px;" must="Y" mustval="D8"></td> </tr> <tr> <td height="1" colspan=4 bgcolor="#ededed"></td> </tr> <tr height="25"> <td height="200" colspan="4" style="padding:10px;"><textarea name="board_contents" class=textarea style="width:100%;height:180px;" must="Y" mustval="Ʃ"><?=$board_contents?></textarea></td> </tr> <tr> <td height="1" colspan=4 bgcolor="#ededed"></td> </tr> <? if($FILE_USE == "Y") { ?> <tr height="25"> <td height="30" align="center">̨ |</td> <td width="1" align="center" bgcolor=#e6e6e6></td> <td style="padding-left:10px;"><input type="file" name="board_file" class=textbox style="width:360px;"><?=$file_str?></td> </tr> <tr> <td height="1" colspan=4 bgcolor="#ededed"></td> </tr> <? } ?> <tr> <td height="2" colspan=4 bgcolor="#6b6b6b"></td> </tr> </table></td> </tr> <tr> <td height="30" align="center"><table width="550" border="0" cellspacing="0" cellpadding="0"> <tr> <td height="16" align="right"><table border="0" cellspacing="5" cellpadding="0"> <tr> <? if($board_mode == "modify") { ?> <td align="center"><input type=image src="../image/board/bt_modify.gif"></td> <? } else { ?> <td align="center"><input type=image src="../image/board/bt_write.gif" align="middle" border="0"></td> <? } ?> <td align="center"><img src="../image/board/bt_list.gif" border="0" style=cursor:hand; onclick="location.href='<?=$PHP_SELF?>?board_id=<?=$board_id?>&mode=list&<?=$page_tail?>';"></td> </tr> </table></td> </tr> </table></td> </tr> </table> <BR> <? mysql_close(); ?>