<?php /** * Created by PhpStorm. * User: JongYoon * Date: 2015-07-24 * Time: 오후 4:59 */ !isset($_SESSION) ? session_start() : null; include "/DB/DB_CON.php"; $conn = conn_DB("localhost", $_SESSION['id'], $_SESSION['passwd']); $DB_VALUE = user_info($conn, "user_info"); $user_info = get_DBvalue($DB_VALUE); $nick = isset($user_info['nick_name']) ? $user_info['nick_name'] : null; ?> <html> <head> <title>Write</title> </head> <body> <form action="list.php" method="post"> 닉네임<input type = "text" maxlength="20" name = "nick" value="<?php echo $nick; ?> " contenteditable="false"><br> 제목<input type = "text" maxlength="20" name = "subject" required><br> 내용<br><textarea cols="15" rows="20" name = "contents"></textarea><br> <input type = "hidden" name="mode" value = "write"> <input type = "submit" name = "write" value="POST">
<?php /** * Created by PhpStorm. * User: JongYoon * Date: 2015-07-26 * Time: 오후 10:48 */ !isset($_SESSION) ? session_start() : null; include "/DB/DB_CON.php"; $conn = conn_DB(null, $_SESSION['id'], $_SESSION['passwd']); $page = isset($_GET['page']) ? $_GET['page'] : null; $pid = isset($_GET['pid']) ? $_GET['pid'] : null; $response = select($conn, $_SESSION['board'], $pid); $DBvalue = mysqli_fetch_array($response); ?> <!DOCTYPE HTML> <html> <head> <title>View!</title> <meta charset = "utf-8"> <style> table{ width: 1200px; border-collapse: collapse; } tr.bg{ background-color: lightgray; } th{
* page nation * modify * delete * view -> list, write, modify, delete */ //session_set_cookie_params(300); session_start(); include "/DB/DB_CON.php"; $id = isset($_POST['id']) ? $_POST['id'] : null; $passwd = isset($_POST['passwd']) ? $_POST['passwd'] : null; if (isset($_SESSION['login'])) { echo "<script>alert('Already Signed in')</script>"; echo "<script>location.replace('list.php?page=1')</script>"; } else { if ($id) { $conn = conn_DB(null, $id, $passwd); if ($conn) { $_SESSION['board'] = isset($_POST['board']) ? $_POST['board'] : "board"; echo "<script>location.replace('list.php?page=1')</script>"; } } } ?> <html> <head> <meta charset="utf-8"> <title>LOGIN</title> </head>