MINI MINI MANI MO
<script type="text/Javascript"> 
<!-- 
/* ?????琉뮻 ???????덉돰??????갗 ???⒱뵛*/ 
var imgObj = new Image(); 
function showImgWin(imgName) { 
  imgObj.src = imgName; 
  setTimeout("createImgWin(imgObj)", 100); 
} 
function createImgWin(imgObj) { 
  if (! imgObj.complete) { 
    setTimeout("createImgWin(imgObj)", 100); 
    return; 
  } 
  imgwin = window.open("", "imageWin","width=" + imgObj.width + ",height=" + imgObj.height + ",scrollbars=yes"); 
  imgwin.document.write("<!DOCTYPE HTML PUBLIC '-//W3C//DTD HTML 4.01 Transitional//EN'>"); 
  imgwin.document.write("<html><head><meta http-equiv='Content-Type' content='text/html; charset=euc-kr' />"); // ? utf-8? 
  imgwin.document.write("<title>??⑥щ턄亦껋꼶梨?</title>");  // ????갗 ??瑜곷턄?琉뮻 ??類쏄콬 
  imgwin.document.write("</head><body style='margin:0px;padding:0px'>"); 
  imgwin.document.write("<img src='" + imgObj.src + "' style='cursor:pointer; border: 1px solid #DDDDDD;' onclick='self.close();' alt='?????琉뮻????????琉용뻣怜??濡?윪?????????덈펲.' />"); 
  imgwin.document.write("</body><html>"); 
  imgwin.document.title = imgObj.src; 
} 
//--> 
</script>
<?
if(basename(__FILE__)==basename($_SERVER["PHP_SELF"])) die(__FILE__." ....");
mysql_query("update $id set ref=ref+1 where no='".$no."'");
$p_qry = "  select * from $id where no='$no' ";
$p_res = mysql_query($p_qry) or die(mysql_error());
$view = mysql_fetch_array($p_res);
if($cookie_user_no==$view["midx"]){
	$modify_a="<a href='".$_SERVER['PHP_SELF']."?mode=write&sub_mode=edit&id=".$id."&no=".$no."'>";
	$delete_a="<a href='delete_ok.php?mode=delete&id=".$id."&no=".$no."'>";
} else {
	if($view["userno"]=="GUEST"){
//		$modify_a="<a href='".$_SERVER['PHP_SELF']."?mode=pwchk&id=".$id."&no=".$no."'>";
		$modify_a="<a href='".$_SERVER['PHP_SELF']."?mode=write&sub_mode=edit&id=".$id."&no=".$no."'>";
		$delete_a="<a href='delete_ok.php?mode=delete&id=".$id."&no=".$no."'>";
	} else {
//		$modify_a="<a href='#' onclick=\"javascript:alert('???섎?????????? ??瑜곸젧??琉용펲????怨룸????덈펲');\">";
		$modify_a="";
		$delete_a="";
	}
}
if($_SESSION[user_level]>=18){
	$modify_a="<a href='".$_SERVER['PHP_SELF']."?mode=write&sub_mode=edit&id=".$id."&no=".$no."'>";
	$delete_a="<a href='delete_ok.php?mode=delete&id=".$id."&no=".$no."'>";
}
$tmp_file_num=explode(",",$view['files']);
$tmp_org_name=explode(",",$view[nfiles]);
for ($i=0;$i<sizeof($tmp_file_num);$i++){
	if ($tmp_file_num[$i]!="")
	{ 
		//gif,jpg ?잙갭梨????逾у뒟貫?얍칰?
		$tmp_img=explode(".",$tmp_file_num[$i]);
		if (($tmp_img[1]=="jpg")||($tmp_img[1]=="gif")||($tmp_img[1]=="bmp")) {
			$img_files[]=$tmp_file_num[$i];
		} else {
			$files.="<img src=\"/img/icon/disk.gif\" style=\"vertical-align:middle\"> <strong>?쎧뀀?????逾?: </strong><a href=\"download.php?no=$view[no]&num=$i&db=$id\">  <font color=darkred>".$tmp_org_name[$i]."</font></a> <br>"; $chk_blank++;
		}
	}
}
if ($img_files) {
	for ($i=0;$i<sizeof($img_files);$i++){
	  $size=GetImageSize($_SERVER[DOCUMENT_ROOT]."/board/data/$id/$img_files[$i]");
	  if ($size[0] > 690 ) {
	  $img_width = 690; // ?곌랜梨뜻룇????戮?뻣???????琉뮻 ?띠럾????????브퀗???(??關留????)
	  $img_height=$size[1]*$img_width/$size[0];
	  } else  {
		  $img_width=$size[0];
		  $img_height=$size[1];
	  }
	$view_e.="<center><a href=\"javascript:showImgWin('/board/data/$id/$img_files[$i]')\"><img src=\"/board/data/$id/$img_files[$i]\" width='$img_width' height='$img_height' galleryimg=no><a/></center><br>";
	}
}
$view_e.=$view[memo];
?>
<style type="text/css">
.viewtable { border-collapse:collapse; margin-bottom:0px; }
.viewtable th {background-color:#efefef; height:40px; vertical-align:central}
.viewtable th.topline, .viewtable td.topline {border-top:1px solid #cccccc;vertical-align:central}
.viewtable th,.viewtable td {border-bottom:1px solid #cccccc;}
.viewtable td {text-align:left; padding-left:7px; vertical-align:central}
.viewtable td p{line-height:18px; padding:5px 0;}
input.bbutton {border:1px solid #0e68a5; text-align:center; background-color:#0e68a5; width:80px; height:65px;
					color:#ffffff; padding:0px; cursor:hand;}
.bbsbg{background-color:#dff6ff;border:1px solid #877c6b; }
.wid { min-height:300px;}
.wid p{margin:0px;padding:0px;}
.th_txt{align:center; font-weight:bold; color:#758ea3; background:#ebf4fb; text-align:center; height:28px;}
.mg20{margin:20px 0;}
.bg_f{background-color:#ffffff;}
</style>	
          <table  width="100%"  border="0"  cellspacing="0" cellpadding="4" class="viewtable" style="font-size:14px; margin:0 0 20px 0">
			  <tr>
				<th width="13%" height="50" class="topline"><b>제목</b></th>
				<td class="topline" colspan="5" style="font-size:16px; font-weight:bold"><?=$view[subject]?></td>
		    </tr>			 
			  <tr>
				<th height="40" align="center"><b>이름</b></th>
				<td width="25%" ><?=$view[name]?></td>
				<th width="12%" align="center"><b>작성일</b></th>
				<td width="21%" ><?=date("Y-m-d",$view["date"])?></td>
				<th width="11%" align="center"><b>조회수</b></th>
				<td width="18%"  ><?=$view[ref]?></td>
		    </tr>			  
			  <tr>
				<td height="300" colspan="6" valign="top" class="wid"style="font-size:14px;">
               <br />
		<?=$files?>
		<?=$view_e?>
			   </td>
			  </tr>
		  </table>
<br />
<center>
		<?if($_SESSION[login_level]<4){?>
    <!--a href="<?=$_SERVER['PHP_SELF']?>?id=<?=$id?>&mode=write&sub_mode=answer&no=<?=$no?>"><img src="../board/img/btn/btn_answer.gif" class="imgbt1" style="display:inline;"/></a-->
		<? } ?>
        <button type="button" onClick="location.href='<?=$_SERVER['PHP_SELF']?>?id=<?=$id?>'" class="btn btn-secondary-outline btn-sm">목록보기</button>
		<?if($modify_a){?>
			<?=$modify_a?> <button type="button" class="btn btn-sm btn-red-outline">수정하기</button></a> 
		<?}?>
		<?if($delete_a){?>
            <button type="button" class="btn btn-sm btn-black-outline" onclick="return confirm('삭제하시겠습니까?'); location.href='delete_ok.php?mode=delete&id=<?=$id?>&no=<?=$no?>;'">삭제하기</button>
			<!-- <a href='delete_ok.php?mode=delete&id=<?=$id?>&no=<?=$no?>' onclick='return confirm("?窈욑퐣異??????琉용뻣?롪퍔伊????숇뤀?")'><img src="/images/del_bt.jpg" class="imgbt1"onClick="" style="display:inline;"/></a>  -->
		<?}?>
</center>
<br />
<?
	if($_SESSION[user_level]&&$_SESSION[user_level]>=$data[a_comment_level]){
		include_once "$_SERVER[DOCUMENT_ROOT]/board/skin/".$data[a_skinname]."/view_write_comment.php";
	}
?>
<!-- ??怨몃뮔 -->
<?
if($no){
	$prev=mysql_fetch_array(mysql_query("select * from $id where no<'".$no."' order by no desc limit 1"));
	$next=mysql_fetch_array(mysql_query("select * from $id where no>'".$no."' order by no asc limit 1"));
}
?>
<table  width="100%"  border="0"  cellspacing="0" cellpadding="4" class="viewtable" style="margin:40px 0 50px 0;">
	<tr>
	  <th width="14%" class="topline">이전</th>
	  <td class="topline"><?if($prev[0]){ ?><a href="<?=$_SERVER['PHP_SELF']?>?id=<?=$id?>&mode=view&no=<?=$prev[0]?>&passed="><?=$prev[subject]?></a><? } ?></td>
	</tr>
	<tr>
	  <th>다음</th>
	  <td><?if($next[0]){ ?><a href="<?=$_SERVER['PHP_SELF']?>?id=<?=$id?>&mode=view&no=<?=$next[0]?>&passed="><?=$next[subject]?></a><? } ?></td>
	</tr>
</table>
 OHA YOOOO