-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathboard_view.php
237 lines (230 loc) Β· 8.87 KB
/
board_view.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
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
<!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">
<link rel="shortcut icon" href="img/favicon.png">
</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);
$id = $row["id"];
$name = $row["name"];
$regist_day = $row["regist_day"];
$subject = $row["subject"];
$content = $row["content"];
$file_name = $row["file_name"];
$file_type = $row["file_type"];
$file_copied = $row["file_copied"];
$hit = $row["hit"];
$content = str_replace(" ", " ", $content);
$content = str_replace("\n", "<br>", $content);
$new_hit = $hit + 1;
if($university=="건μλνκ΅")
$sql = "update mentofind set hit=$new_hit where num=$num";
elseif($university=="λμ λνκ΅")
$sql = "update mentofind1 set hit=$new_hit where num=$num";
elseif($university=="λμ μ νλνκ΅")
$sql = "update mentofind2 set hit=$new_hit where num=$num";
elseif($university=="λͺ©μλνκ΅")
$sql = "update mentofind3 set hit=$new_hit where num=$num";
elseif($university=="λ°°μ¬λνκ΅")
$sql = "update mentofind4 set hit=$new_hit where num=$num";
elseif($university=="μ°μ‘λνκ΅")
$sql = "update mentofind5 set hit=$new_hit where num=$num";
elseif($university=="μμ§λνκ΅")
$sql = "update mentofind6 set hit=$new_hit where num=$num";
elseif($university=="μΆ©λ¨λνκ΅")
$sql = "update mentofind7 set hit=$new_hit where num=$num";
elseif($university=="μΉ¨λ‘μ νλνκ΅")
$sql = "update mentofind8 set hit=$new_hit where num=$num";
elseif($university=="νκ΅κ³ΌνκΈ°μ μ")
$sql = "update mentofind9 set hit=$new_hit where num=$num";
elseif($university=="νλ¨λνκ΅")
$sql = "update mentofind10 set hit=$new_hit where num=$num";
elseif($university=="νλ°λνκ΅")
$sql = "update mentofind11 set hit=$new_hit where num=$num";
elseif($university=="λλλνκ΅")
$sql = "update mentofind12 set hit=$new_hit where num=$num";
elseif($university=="λμ 보건λνκ΅")
$sql = "update mentofind13 set hit=$new_hit where num=$num";
elseif($university=="μ°μ‘μ 보λνκ΅")
$sql = "update mentofind14 set hit=$new_hit where num=$num";
elseif($university=="λμ κ³ΌνκΈ°μ νκ΅")
$sql = "update mentofind15 set hit=$new_hit where num=$num";
elseif($university=="νκ΅ν΄λ¦¬ν
IVλνκ΅")
$sql = "update mentofind16 set hit=$new_hit where num=$num";
elseif($university=="κ³ΌνκΈ°μ μ°ν©λνμλνκ΅")
$sql = "update mentofind17 set hit=$new_hit where num=$num";
elseif($university=="건μ λνμλνκ΅")
$sql = "update mentofind18 set hit=$new_hit where num=$num";
elseif($university=="건μμ¬μ΄λ²λνκ΅")
$sql = "update mentofind19 set hit=$new_hit where num=$num";
elseif($university=="νκ΅λ°©μ‘ν΅μ λνκ΅")
$sql = "update mentofind20 set hit=$new_hit where num=$num";
elseif($university=="none")
$sql = "update mentofind21 set hit=$new_hit where num=$num";
mysqli_query($con, $sql);
?>
<ul id="view_content">
<li>
<span class="col1"><b>μ λͺ© :</b> <?=$subject?></span>
<span class="col2"><?=$name?> | <?=$regist_day?></span>
</li>
<li>
<?php
if($file_name) {
$real_name = $file_copied;
$file_path = "./data/".$real_name;
$file_size = filesize($file_path);
echo "ⷠ첨λΆνμΌ : $file_name ($file_size Byte)
<a href='board_download.php?num=$num&real_name=$real_name&file_name=$file_name&file_type=$file_type'>[μ μ₯]</a><br><br>";
}
?>
<?=$content?>
</li>
</ul>
<ul class="buttons">
<li><button onclick="location.href='mento_find_list.php?university=<?=$university?>&page=<?=$page?>'">λͺ©λ‘</button></li>
<li><button onclick="location.href='board_modify_form.php?university=<?=$university?>&num=<?=$num?>&page=<?=$page?>'">μμ </button></li>
<li><button onclick="location.href='board_delete.php?university=<?=$university?>&num=<?=$num?>&page=<?=$page?>'">μμ </button></li>
<li><button onclick="location.href='mento_board_form.php?university=<?=$university?>'">κΈμ°κΈ°</button></li>
</ul>
</div> <!-- board_box -->
</section>
<footer>
<?php include "footer.php";?>
</footer>
</body>
</html>