</tr> </table> <tr align="right"> <td><a href="<?php echo dest_url("./board_edit.php", $page, $uid); ?> ">수정</a> <a href="<?php echo dest_url("./board_reply.php", $page, $uid); ?> ">답변</a> <a href="<?php echo dest_url("./board_delete.php", $page, $uid); ?> ">삭제</a> <a href="<?php echo dest_url("./board_list.php", $page, $uid); ?> ">목록</a></td> </tr> </table> <form name="form2"> <p><a href="FirstPage.php"><img src="hone.png" width="48" height="46" border="0" alt="hone.png"></a> <a href="message/haniumMessageForm_1.php"><img src="messasge.png" width="51" height="46" border="0" alt="messasge.png"></a> <a href="mypage_base.php"><img src="mypage.png" width="49" height="50" border="0" alt="mypage.png"></a> <a href="haniummileage.php"><img src="mileage.png" width="50" height="50" border="0" alt="mileage.png"></a><a href="gift_base.php"> <img src="gift.png" width="49" height="50" border="0" alt="gift.png"></a> </p> </form> </center> </body> </html>
<?php ob_start(); ?> <!-- 이게 있어야, 출력문을 바로 출력시키지 않고 그 내용을 임시 버퍼에 저장시켰다가, 다음 header, setcookie, session 등을 진행시킨다. --> <meta charset="utf-8"> <!-- 책에는 없으나, 한글 깨짐 현상을 해결하기 위해 세 줄의 코드를 추가한다. --> <?php include "board_config.cfg"; include "board_functions.inc"; //원래 이 주석을 포함한 4 개 줄은 없던 코드 세 줄인데, get 형식으로 board_write.php 에서 작성자, 제목, 내용을 받아오면 그나마 가능할까 싶어서 써본다. $gid = $_GET['gid']; $depth = $_GET['depth']; $uid = $_GET['uid']; //$gid, $depth, $uid 값 다 넘어옴을 확인했다. #----------데이터베이스 연결----------# $con = mysql_connect("localhost", "root", "apmsetup"); mysql_select_db("hanium", $con); #----------board 테이블에 글 삭제----------# $query = "delete from board where uid={$uid}"; //답변이 달린 게시글에서, 게시글을 지워도 답변은 지워지지 않는다. // $query = "delete from board where gid=$gid"; mysql_query($query) or die(mysql_error()); mysql_close($con); forward(dest_url("./board_list.php", $page));
<td class="input_td"> <textarea name="article" cols="60" rows="20"> <?php echo $article; ?> </textarea> </td> </tr> </table> <table> <tr> <td width="100"><a href="javascript:history.back()">�ㅻ줈</a></td> <td align="center"><input type="submit" value="�섏젙"></td> <td width="100" align="right"> <a href="<?php echo dest_url("./board_list.php", $page); ?> ">紐⑸줉</a> </td> </tr> </form> </table> </center> <form name="form2"> <p><img src="images/hone.png" width="48" height="46" border="0" alt="hone.png"> <img src="images/messasge.png" width="51" height="46" border="0" alt="messasge.png"> <img src="images/mypage.png" width="49" height="50" border="0" alt="mypage.png"> <img src="images/mileage.png" width="50" height="50" border="0" alt="mileage.png"> <img src="images/gift.png" width="49" height="50" border="0" alt="gift.png"> </p> </form> </body>
if (!$current_plenty2) { $current_plenty2 = 0; } $current3 = $_POST['nation3']; $current_plenty3 = $_POST['in3']; if (!$current_plenty3) { $current_plenty3 = 0; } $locate = $_POST['place']; if ($locate == "no") { $locate = "all"; } $ps = "post"; if ($_POST['buy_go'] == "search") { include "function.inc"; forward(dest_url("index.php", $current1, $current_plenty1, $current2, $current_plenty2, $current3, $current_plenty3, $locate, 1)); } else { if ($_POST['buy_go'] == "write") { include "DBConnect.php"; $email = $_SESSION['id']; $sql = "SELECT * FROM Sell WHERE User_email='{$email}'"; $res = mysql_query($sql); $count = mysql_num_rows($res); if ($current1 == "none" && $current2 == "none" && $current3 == "none") { echo "<script>\n alert('최소 1개 이상의 국가를 선택해야 합니다.');\n\t\t\tlocation.href='./index.php';\n\t\t\t</script>"; } else { if ($count != 0) { echo "<script>\n alert('계정당 1개의 글만 올릴 수 있습니다.');\n\t\t\tlocation.href='./index.php';\n\t\t\t</script>"; } else { $sql1 = "INSERT INTO Sell(User_email"; $sql2 = "values('{$email}'";
<?php ob_start(); ?> <!-- 이게 있어야, 출력문을 바로 출력시키지 않고 그 내용을 임시 버퍼에 저장시켰다가, 다음 header, setcookie, session 등을 진행시킨다. --> <meta charset="utf-8"> <!-- 책에는 없으나, 한글 깨짐 현상을 해결하기 위해 세 줄의 코드를 추가한다. --> <?php include "./board_functions.inc"; $con = mysql_connect("localhost", "root", "apmsetup"); mysql_select_db("hanium", $con); //원래 이 주석을 포함한 4 개 줄은 없던 코드 세 줄인데, get 형식으로 board_write.php 에서 작성자, 제목, 내용을 받아오면 그나마 가능할까 싶어서 써본다. $page = $_GET['page']; $uid = $_GET['uid']; //$pae 값, $uid 값 다 넘어옴을 확인했다. $query = "update board set refnum=refnum+1 where uid=" . mysql_real_escape_string($uid) . ""; //쿼리문 실행됨을 확인했다. mysql_query($query) or die(mysql_error()); mysql_close($con); forward(dest_url("./board_read.php", $page, $uid));
<?php #----------�댁쟾 �섏씠吏�뱾��留곹겕----------# if ($start_page > 1) { echo "<a href=\"" . dest_url("./paper_list.php", $start_page - 1) . "\">[pre]</a>"; } #----------諛붾줈 �대룞�섎뒗 �섏씠吏�� �섏뿴----------# for ($dest_page = $start_page; $dest_page <= $end_page; $dest_page++) { if ($dest_page != $page) { echo "<a href=\"" . dest_url("./paper_list.php", $dest_page) . "\">[{$dest_page}]</a>"; } else { echo " {$dest_page} "; } } #----------�ㅼ쓬 �섏씠吏�뱾��留곹겕----------# if ($end_page < $total_pages) { echo "<a href=\"" . dest_url("./paper_list.php", $end_page + 1) . "\">[next]</a>"; } ?> </td> <td width="100" align="right"> <!-- <a href="./paper_list.php">紐⑸줉</a> --> </td> </tr> </table> <table> <form name="search_from" method="post" action="./paper_list.php?"> <tr align="center"> <td> <select name="kind"> <option value="subject"><?php if ($kind == "subject") {
for ($dest_page = $start_page; $dest_page <= $end_page; $dest_page++) { if ($dest_page != $page) { echo "<a href=\"" . dest_url("./board_list.php", $dest_page) . "\">[{$dest_page}]</a>"; } else { echo " {$dest_page} "; } } #----------다음 페이지들을 링크----------# if ($end_page < $total_pages) { echo "<a href=\"" . dest_url("./board_list.php", $end_page + 1) . "\">[next]</a>"; } ?> </td> <td width="100" align="right"> <a href="<?php echo dest_url("./board_write.php", $page); ?> ">글쓰기</a> </td> </tr> </table> <table> <form name="search_from" method="post" action="./board_list.php?"> <tr align="center"> <td> <select name="kind"> <option value="subject"><?php if ($kind == "subject") { echo "selected"; } ?>
<tr> <?php for ($i = 1; $i <= $questionnumber; $i++) { $link_address = "./paper_make3.php?papercode={$papercode}&questionnumber={$questionnumber}&questionxth={$i}"; echo "<td><a href=" . $link_address . ">" . $i . "</a></td>"; // <a href="./paper_make3.php?questionxth=$i"> } ?> </tr> </table> <table> <tr> <td width="100"> </td> <td width="100" align="right"><a href="<?php echo dest_url("./paper_list.php", $page); ?> "><input type="submit" value="다음"></a></td> </tr> </table> <!-- </form> --> <form name="form2"> <p><img src="images/hone.png" width="48" height="46" border="0" alt="hone.png"> <img src="images/messasge.png" width="51" height="46" border="0" alt="messasge.png"> <img src="images/mypage.png" width="49" height="50" border="0" alt="mypage.png"> <img src="images/mileage.png" width="50" height="50" border="0" alt="mileage.png"> <img src="images/gift.png" width="49" height="50" border="0" alt="gift.png"> </p> </form> </center> </body> </html>