-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathboard_modify_form.php
197 lines (195 loc) Β· 6.42 KB
/
board_modify_form.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>λ©λλ‘±λν</title>
<link rel="stylesheet" type="text/css" href="./css/common.css">
<link rel="stylesheet" type="text/css" href="./css/board.css">
<link rel="stylesheet" href="css/main1.css">
<script>
function check_input() {
if (!document.board_form.subject.value)
{
alert("μ λͺ©μ μ
λ ₯νμΈμ!");
document.board_form.subject.focus();
return;
}
if (!document.board_form.content.value)
{
alert("λ΄μ©μ μ
λ ₯νμΈμ!");
document.board_form.content.focus();
return;
}
document.board_form.submit();
}
</script>
</head>
<body>
<header>
<?php include "header.php";?>
</header>
<section>
<div id="main_img_bar">
<img src="./img/main_img.png">
</div>
<div id="board_box">
<?php
$university = $_GET["university"];
if($university=="건μλνκ΅")
echo '<h3>', "$university", '</h3>';
elseif
($university=="λμ λνκ΅")
echo '<h3>', "$university", '</h3>';
elseif
($university=="λμ μ νλνκ΅")
echo '<h3>', "$university", '</h3>';
elseif
($university=="λͺ©μλνκ΅")
echo '<h3>', "$university", '</h3>';
elseif
($university=="λ°°μ¬λνκ΅")
echo '<h3>', "$university", '</h3>';
elseif
($university=="μ°μ‘λνκ΅")
echo '<h3>', "$university", '</h3>';
elseif
($university=="μμ§λνκ΅")
echo '<h3>', "$university", '</h3>';
elseif
($university=="μΆ©λ¨λνκ΅")
echo '<h3>', "$university", '</h3>';
elseif
($university=="μΉ¨λ‘μ νλνκ΅")
echo '<h3>', "$university", '</h3>';
elseif
($university=="νκ΅κ³ΌνκΈ°μ μ")
echo '<h3>', "$university", '</h3>';
elseif
($university=="νλ¨λνκ΅")
echo '<h3>', "$university", '</h3>';
elseif
($university=="νλ°λνκ΅")
echo '<h3>', "$university", '</h3>';
elseif
($university=="νλ°λνκ΅")
echo '<h3>', "$university", '</h3>';
elseif
($university=="λλλνκ΅")
echo '<h3>', "$university", '</h3>';
elseif
($university=="λμ 보건λνκ΅")
echo '<h3>', "$university", '</h3>';
elseif
($university=="μ°μ‘μ 보λνκ΅")
echo '<h3>', "$university", '</h3>';
elseif
($university=="λμ κ³ΌνκΈ°μ νκ΅")
echo '<h3>', "$university", '</h3>';
elseif
($university=="νκ΅ν΄λ¦¬ν
IVλνκ΅")
echo '<h3>', "$university", '</h3>';
elseif
($university=="κ³ΌνκΈ°μ μ°ν©λνμλνκ΅")
echo '<h3>', "$university", '</h3>';
elseif
($university=="건μ λνμλνκ΅")
echo '<h3>', "$university", '</h3>';
elseif
($university=="건μμ¬μ΄λ²λνκ΅")
echo '<h3>', "$university", '</h3>';
elseif
($university=="νκ΅λ°©μ‘ν΅μ λνκ΅")
echo '<h3>', "$university", '</h3>';
elseif
($university=="none")
echo '<h3>', "λνκ΅λ₯Ό μ ννμΈμ!", '</h3>';
?>
<?php
$university = $_GET["university"];
$num = $_GET["num"];
$page = $_GET["page"];
$con = mysqli_connect("localhost", "user1", "12345", "sample");
if($university=="건μλνκ΅")
$sql = "select * from mentofind where num=$num";
elseif($university=="λμ λνκ΅")
$sql = "select * from mentofind1 where num=$num";
elseif($university=="λμ μ νλνκ΅")
$sql = "select * from mentofind2 where num=$num";
elseif($university=="λͺ©μλνκ΅")
$sql = "select * from mentofind3 where num=$num";
elseif($university=="λ°°μ¬λνκ΅")
$sql = "select * from mentofind4 where num=$num";
elseif($university=="μ°μ‘λνκ΅")
$sql = "select * from mentofind5 where num=$num";
elseif($university=="μμ§λνκ΅")
$sql = "select * from mentofind6 where num=$num";
elseif($university=="μΆ©λ¨λνκ΅")
$sql = "select * from mentofind7 where num=$num";
elseif($university=="μΉ¨λ‘μ νλνκ΅")
$sql = "select * from mentofind8 where num=$num";
elseif($university=="νκ΅κ³ΌνκΈ°μ μ")
$sql = "select * from mentofind9 where num=$num";
elseif($university=="νλ¨λνκ΅")
$sql = "select * from mentofind10 where num=$num";
elseif($university=="νλ°λνκ΅")
$sql = "select * from mentofind11 where num=$num";
elseif($university=="λλλνκ΅")
$sql = "select * from mentofind12 where num=$num";
elseif($university=="λμ 보건λνκ΅")
$sql = "select * from mentofind13 where num=$num";
elseif($university=="μ°μ‘μ 보λνκ΅")
$sql = "select * from mentofind14 where num=$num";
elseif($university=="λμ κ³ΌνκΈ°μ νκ΅")
$sql = "select * from mentofind15 where num=$num";
elseif($university=="νκ΅ν΄λ¦¬ν
IVλνκ΅")
$sql = "select * from mentofind16 where num=$num";
elseif($university=="κ³ΌνκΈ°μ μ°ν©λνμλνκ΅")
$sql = "select * from mentofind17 where num=$num";
elseif($university=="건μ λνμλνκ΅")
$sql = "select * from mentofind18 where num=$num";
elseif($university=="건μμ¬μ΄λ²λνκ΅")
$sql = "select * from mentofind19 where num=$num";
elseif($university=="νκ΅λ°©μ‘ν΅μ λνκ΅")
$sql = "select * from mentofind20 where num=$num";
elseif($university=="none")
$sql = "select * from mentofind21 where num=$num";
$result = mysqli_query($con, $sql);
$row = mysqli_fetch_array($result);
$name = $row["name"];
$subject = $row["subject"];
$content = $row["content"];
$file_name = $row["file_name"];
?>
<form name="board_form" method="post" action="board_modify.php?university=<?=$university?>&num=<?=$num?>&page=<?=$page?>" enctype="multipart/form-data">
<ul id="board_form">
<li>
<span class="col1">μ΄λ¦ : </span>
<span class="col2"><?=$name?></span>
</li>
<li>
<span class="col1">μ λͺ© : </span>
<span class="col2"><input name="subject" type="text" value="<?=$subject?>"></span>
</li>
<li id="text_area">
<span class="col1">λ΄μ© : </span>
<span class="col2">
<textarea name="content"><?=$content?></textarea>
</span>
</li>
<li>
<span class="col1"> μ²¨λΆ νμΌ : </span>
<span class="col2"><?=$file_name?></span>
</li>
</ul>
<ul class="buttons">
<li><button type="button" onclick="check_input()">μμ νκΈ°</button></li>
<li><button type="button" onclick="location.href='board_list.php?university=<?=$university?>&page=<?=$page?>'">λͺ©λ‘</button></li>
</ul>
</form>
</div> <!-- board_box -->
</section>
<footer>
<?php include "footer.php";?>
</footer>
</body>
</html>