묻고답하기
page_full_width" class="col-xs-12" |cond="$__Context->page_full_width">
<?
//게시판 DB연결
include('./inc_board.html');
//카운트 증가
$sql = "update board set view = view+1 where code='$code' and main_no=$main_no and dep_no='$dep_no'";
mysql_query($sql);
echo mysql_error();
//내용 불러오기
$sql = "select * from board where code='$code' and main_no=$main_no and dep_no='$dep_no' ";
$result = mysql_query($sql);
$row = mysql_fetch_array($result);
if ($row[html_ok] == "N") $row[content] = str_replace("n","<br>",$row[content]);
?>
<html>
<head>
<title>한국산업인력공단 충청지역본부 방문을 환영합니다</title>
<meta http-equiv="Content-Type" content="text/html; charset=euc-kr">
<link rel="stylesheet" href="../css/main.css" type="text/css">
<script language="JavaScript">
<!--
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
// -->
//-->
</script>
</head>
<body bgcolor="#ffFFFF" text="#444444" leftmargin="0" topmargin="0" link=000000 vlink=000000 alink=000000>
<table border="0" cellspacing="0" cellpadding="0" height="100%" width="799">
<tr>
<td width="163" background="../img/index/l_bg.gif">
<? include "../html/left.htm"; ?>
</td>
<td width="636" valign="top">
<table width="598" border="0" cellspacing="0" cellpadding="0" height="304" align="right">
<tr>
<td class=f3>
<!-- 시 작 -->
<? echo "$head"; ?>
<table width=<? echo "$main_table"; ?> border=0 cellspacing=0 cellpadding=0>
<tr><td align=center>
<table border=0 cellspacing=0 cellpadding=0 width=100%>
<tr><td align=center>
<?
if (strlen($title_img) > 0)
echo "<img src=$title_img border=0>";
else
echo "<font size=4><b>$board_title</b></font>";
?>
</td></tr>
</table><br>
<? echo $middle; ?>
<table width=90% border=0>
<tr><td colspan=4 height=1 bgcolor=<? echo "$line_color"; ?>></td></tr>
<tr>
<td align=center bgcolor=<? echo "$main_color"; ?> height=25>제 목</td>
<td align=left colspan=3><? echo "$row[title]"; ?> </td>
</tr>
<tr height=1 bgcolor=<? echo "$line_color"; ?>><td colspan=4></td></tr>
<tr>
<td align=center width=75 bgcolor=<? echo "$main_color"; ?> height=25>글쓴이</td>
<td align=left>
<?
if(strlen($row[email]) > 0)
echo "<a href='mailto:$row[email]'>$row[name]</a>n";
else
echo "$row[name]n";
?>
</td>
<td align=center bgcolor=<? echo "$main_color"; ?> height=25>접속처</td>
<td align=left><? echo $row[ip] ?></td>
</tr>
<tr><td colspan=4 height=1 bgcolor=<? echo "$line_color"; ?>></td></tr>
<tr>
<td align=center bgcolor=<? echo "$main_color"; ?> height=25>일 자</td>
<td align=left><? echo $row[date] ?></td>
<td align=center bgcolor=<? echo "$main_color"; ?> height=25>조 회</td>
<td align=left><? echo $row[view] ?></td>
</tr>
<tr><td colspan=4 height=1 bgcolor=<? echo "$line_color"; ?>></td></tr>
<? if ($code=="board") {?>
<tr>
<td align=center bgcolor=<? echo "$main_color"; ?> height=25>전화번호</td>
<td align=left colspan='3'><? echo $row[tel1]?> - <? echo $row[tel2]?> - <?echo $row[tel3]?></td>
</tr>
<tr><td colspan=4 height=1 bgcolor=<? echo "$line_color"; ?>></td></tr>
<tr>
<td align=center bgcolor=<? echo "$main_color"; ?> height=25>주 소</td>
<td align=left colspan='3'><? echo $row[zip1]?> - <?echo $row[zip2]?> <?echo $row[addr1]?> <?echo $row[addr2]?></td>
</tr>
<tr><td colspan=4 height=1 bgcolor=<? echo "$line_color"; ?>></td></tr>
<?}?>
<? if(strlen($row[file])>0) {?>
<!-- 첨부파일이 있는 경우에만 -->
<tr>
<td align=center bgcolor=<? echo "$main_color"; ?> height=25>첨부파일</td>
<td align=left colspan=3><? echo "<a href='./upfile/$code/$main_no/$dep_no/$row[file]' target="_blank">$row[file]</a>" ?></td>
</tr>
<tr><td colspan=4 height=1 bgcolor=<? echo "$line_color"; ?>></td></tr>
<? } ?>
</table>
</td></tr>
<tr><td height=8></td></tr>
<tr><td align=center>
<table width=89% border=0 cellpadding=3 cellspacing=0 height=210 style="BORDER-RIGHT: <? echo "$line_color2"; ?> 1px solid; BORDER-TOP: <? echo "$line_color2"; ?> 1px solid; BORDER-LEFT: <? echo "$line_color2"; ?> 1px solid; BORDER-BOTTOM: <? echo "$line_color2"; ?> 1px solid; ">
<tr><td align=left valign=top><? echo $row[content] ?></td></tr>
</table>
</td></tr>
<tr><td height=8></td></tr>
<tr><td align=center>
<table border=0 height=25>
<tr>
<?
if (strlen($delete_img) == 0)
echo "<td align=center width=60 align=center bgcolor=$icon_color>
<a href="./save.php?code=$code&page=$page&start=$start&main_no=$row[main_no]&dep_no=$row[dep_no]&mode=del&keyword=$keyword&keyword2=$keyword2&title_img=$title_img">삭제</a>
</td>n";
else
echo "<td align=center width=60 align=center>
<a href="./save.php?code=$code&page=$page&start=$start&main_no=$row[main_no]&dep_no=$row[dep_no]&mode=del&keyword=$keyword&keyword2=$keyword2&title_img=$title_img"><img src=$delete_img border=0></a>
</td>n";
?>
<?
if (strlen($modify_img) == 0)
echo "<td align=center width=60 align=center bgcolor=$icon_color>
<a href="write.php?code=$code&page=$page&start=$start&keyword=$keyword&keyword2=$keyword2&main_no=$row[main_no]&dep_no=$row[dep_no]&mode=modify&title_img=$title_img">수정</a>
</td>n";
else
echo "<td align=center width=60 align=center>
<a href="write.php?code=$code&page=$page&start=$start&keyword=$keyword&keyword2=$keyword2&main_no=$row[main_no]&dep_no=$row[dep_no]&mode=modify&title_img=$title_img"><img src=$modify_img border=0></a>
</td>n";
?>
<?
if (strlen($reply_img) == 0)
echo "<td align=center width=60 align=center bgcolor=$icon_color>
<a href="write.php?code=$code&page=$page&start=$start&keyword=$keyword&keyword2=$keyword2&main_no=$row[main_no]&dep_no=$row[dep_no]&mode=reply&re_email=$row[email]&re_name=$row[name]">답변</a>
</td>n";
else
echo "<td align=center width=60 align=center>
<a href="write.php?code=$code&page=$page&start=$start&keyword=$keyword&keyword2=$keyword2&main_no=$row[main_no]&dep_no=$row[dep_no]&mode=reply&re_email=$row[email]&re_name=$row[name]"><img src=$reply_img border=0></a>
</td>n";
?>
<?
if (strlen($list_img) == 0)
echo "<td align=center width=60 align=center bgcolor=$icon_color>
<a href="./list.php?code=$code&page=$page&start=$start&keyword=$keyword&keyword2=$keyword2">목록</a>
</td>n";
else
echo "<td align=center width=60 align=center>
<a href="./list.php?code=$code&page=$page&start=$start&keyword=$keyword&keyword2=$keyword2"><img src=$list_img border=0></a>
</td>n";
?>
</tr>
</table><p>
</td></tr></table>
<? echo "$tail"; ?>
<!-- 끝 -->
</td>
</tr>
<tr>
<td height="35" valign="bottom">
<div align="center"><font color="595959">Copyright @2002 All right
reserved Human Resources Development Service of Korea</font></div>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
윗글 질문 게시판의 프로그램의 view.php 파일 소스입니다.
2003.05.26 18:10
<?
//게시판 DB연결
include('./inc_board.html');
//카운트 증가
$sql = "update board set view = view+1 where code='$code' and main_no=$main_no and dep_no='$dep_no'";
mysql_query($sql);
echo mysql_error();
//내용 불러오기
$sql = "select * from board where code='$code' and main_no=$main_no and dep_no='$dep_no' ";
$result = mysql_query($sql);
$row = mysql_fetch_array($result);
if ($row[html_ok] == "N") $row[content] = str_replace("n","<br>",$row[content]);
?>
<html>
<head>
<title>한국산업인력공단 충청지역본부 방문을 환영합니다</title>
<meta http-equiv="Content-Type" content="text/html; charset=euc-kr">
<link rel="stylesheet" href="../css/main.css" type="text/css">
<script language="JavaScript">
<!--
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
// -->
//-->
</script>
</head>
<body bgcolor="#ffFFFF" text="#444444" leftmargin="0" topmargin="0" link=000000 vlink=000000 alink=000000>
<table border="0" cellspacing="0" cellpadding="0" height="100%" width="799">
<tr>
<td width="163" background="../img/index/l_bg.gif">
<? include "../html/left.htm"; ?>
</td>
<td width="636" valign="top">
<table width="598" border="0" cellspacing="0" cellpadding="0" height="304" align="right">
<tr>
<td class=f3>
<!-- 시 작 -->
<? echo "$head"; ?>
<table width=<? echo "$main_table"; ?> border=0 cellspacing=0 cellpadding=0>
<tr><td align=center>
<table border=0 cellspacing=0 cellpadding=0 width=100%>
<tr><td align=center>
<?
if (strlen($title_img) > 0)
echo "<img src=$title_img border=0>";
else
echo "<font size=4><b>$board_title</b></font>";
?>
</td></tr>
</table><br>
<? echo $middle; ?>
<table width=90% border=0>
<tr><td colspan=4 height=1 bgcolor=<? echo "$line_color"; ?>></td></tr>
<tr>
<td align=center bgcolor=<? echo "$main_color"; ?> height=25>제 목</td>
<td align=left colspan=3><? echo "$row[title]"; ?> </td>
</tr>
<tr height=1 bgcolor=<? echo "$line_color"; ?>><td colspan=4></td></tr>
<tr>
<td align=center width=75 bgcolor=<? echo "$main_color"; ?> height=25>글쓴이</td>
<td align=left>
<?
if(strlen($row[email]) > 0)
echo "<a href='mailto:$row[email]'>$row[name]</a>n";
else
echo "$row[name]n";
?>
</td>
<td align=center bgcolor=<? echo "$main_color"; ?> height=25>접속처</td>
<td align=left><? echo $row[ip] ?></td>
</tr>
<tr><td colspan=4 height=1 bgcolor=<? echo "$line_color"; ?>></td></tr>
<tr>
<td align=center bgcolor=<? echo "$main_color"; ?> height=25>일 자</td>
<td align=left><? echo $row[date] ?></td>
<td align=center bgcolor=<? echo "$main_color"; ?> height=25>조 회</td>
<td align=left><? echo $row[view] ?></td>
</tr>
<tr><td colspan=4 height=1 bgcolor=<? echo "$line_color"; ?>></td></tr>
<? if ($code=="board") {?>
<tr>
<td align=center bgcolor=<? echo "$main_color"; ?> height=25>전화번호</td>
<td align=left colspan='3'><? echo $row[tel1]?> - <? echo $row[tel2]?> - <?echo $row[tel3]?></td>
</tr>
<tr><td colspan=4 height=1 bgcolor=<? echo "$line_color"; ?>></td></tr>
<tr>
<td align=center bgcolor=<? echo "$main_color"; ?> height=25>주 소</td>
<td align=left colspan='3'><? echo $row[zip1]?> - <?echo $row[zip2]?> <?echo $row[addr1]?> <?echo $row[addr2]?></td>
</tr>
<tr><td colspan=4 height=1 bgcolor=<? echo "$line_color"; ?>></td></tr>
<?}?>
<? if(strlen($row[file])>0) {?>
<!-- 첨부파일이 있는 경우에만 -->
<tr>
<td align=center bgcolor=<? echo "$main_color"; ?> height=25>첨부파일</td>
<td align=left colspan=3><? echo "<a href='./upfile/$code/$main_no/$dep_no/$row[file]' target="_blank">$row[file]</a>" ?></td>
</tr>
<tr><td colspan=4 height=1 bgcolor=<? echo "$line_color"; ?>></td></tr>
<? } ?>
</table>
</td></tr>
<tr><td height=8></td></tr>
<tr><td align=center>
<table width=89% border=0 cellpadding=3 cellspacing=0 height=210 style="BORDER-RIGHT: <? echo "$line_color2"; ?> 1px solid; BORDER-TOP: <? echo "$line_color2"; ?> 1px solid; BORDER-LEFT: <? echo "$line_color2"; ?> 1px solid; BORDER-BOTTOM: <? echo "$line_color2"; ?> 1px solid; ">
<tr><td align=left valign=top><? echo $row[content] ?></td></tr>
</table>
</td></tr>
<tr><td height=8></td></tr>
<tr><td align=center>
<table border=0 height=25>
<tr>
<?
if (strlen($delete_img) == 0)
echo "<td align=center width=60 align=center bgcolor=$icon_color>
<a href="./save.php?code=$code&page=$page&start=$start&main_no=$row[main_no]&dep_no=$row[dep_no]&mode=del&keyword=$keyword&keyword2=$keyword2&title_img=$title_img">삭제</a>
</td>n";
else
echo "<td align=center width=60 align=center>
<a href="./save.php?code=$code&page=$page&start=$start&main_no=$row[main_no]&dep_no=$row[dep_no]&mode=del&keyword=$keyword&keyword2=$keyword2&title_img=$title_img"><img src=$delete_img border=0></a>
</td>n";
?>
<?
if (strlen($modify_img) == 0)
echo "<td align=center width=60 align=center bgcolor=$icon_color>
<a href="write.php?code=$code&page=$page&start=$start&keyword=$keyword&keyword2=$keyword2&main_no=$row[main_no]&dep_no=$row[dep_no]&mode=modify&title_img=$title_img">수정</a>
</td>n";
else
echo "<td align=center width=60 align=center>
<a href="write.php?code=$code&page=$page&start=$start&keyword=$keyword&keyword2=$keyword2&main_no=$row[main_no]&dep_no=$row[dep_no]&mode=modify&title_img=$title_img"><img src=$modify_img border=0></a>
</td>n";
?>
<?
if (strlen($reply_img) == 0)
echo "<td align=center width=60 align=center bgcolor=$icon_color>
<a href="write.php?code=$code&page=$page&start=$start&keyword=$keyword&keyword2=$keyword2&main_no=$row[main_no]&dep_no=$row[dep_no]&mode=reply&re_email=$row[email]&re_name=$row[name]">답변</a>
</td>n";
else
echo "<td align=center width=60 align=center>
<a href="write.php?code=$code&page=$page&start=$start&keyword=$keyword&keyword2=$keyword2&main_no=$row[main_no]&dep_no=$row[dep_no]&mode=reply&re_email=$row[email]&re_name=$row[name]"><img src=$reply_img border=0></a>
</td>n";
?>
<?
if (strlen($list_img) == 0)
echo "<td align=center width=60 align=center bgcolor=$icon_color>
<a href="./list.php?code=$code&page=$page&start=$start&keyword=$keyword&keyword2=$keyword2">목록</a>
</td>n";
else
echo "<td align=center width=60 align=center>
<a href="./list.php?code=$code&page=$page&start=$start&keyword=$keyword&keyword2=$keyword2"><img src=$list_img border=0></a>
</td>n";
?>
</tr>
</table><p>
</td></tr></table>
<? echo "$tail"; ?>
<!-- 끝 -->
</td>
</tr>
<tr>
<td height="35" valign="bottom">
<div align="center"><font color="595959">Copyright @2002 All right
reserved Human Resources Development Service of Korea</font></div>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>