MINI MINI MANI MO

Path : /home/lhcar/www/mobile/
File Upload :
Current File : /home/lhcar/www/mobile/sub05_view.php

<?
require_once "./_common/common.php";
include $_SERVER['DOCUMENT_ROOT'].'/_config/global.php';
include $_SERVER['DOCUMENT_ROOT'].'/_config/_class/phpfun.class.php';
$phpfun = new phpfun();
$SID = session_id();

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('´Ù¸¥ ȸ¿øÀDZÛÀº ¼öÁ¤ÇϽǼö ¾ø½À´Ï´Ù');\">";
		$modify_a="";
		$delete_a="";
	}
}
if($_SESSION[login_level]<=3){
	$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>&nbsp;<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];
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="Content-Type" content="text/html; charset=euc-kr">
<meta name="format-detection" content="telephone=no">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0, user-scalable=no, target-densitydpi=medium-dpi">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<head>


<link rel="stylesheet" type="text/css" href="css/style.css">
<link href="css/scale.css" rel="stylesheet" type="text/css">
</head>
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
-->
</style>
<div id="top">
<? include "inc/sub_top.html"; ?>
</div>

<tr>	
			<td>
					</td>
</tr>
<tr>
	<td>	
			<!-- navi start-->
							<table id="navi"  width="100%"  height="60"  border="0" cellpadding="0" cellspacing="0">
  <tr>	
									<td>
										<table width="100%" border="0" cellpadding="0" cellspacing="0" align="center">
<?if($id=="notice"){$ts1="color: #FF0000;font-weight:bolder;";$ts2="color: #000000";$ts3="color: #000000";}else if($id=="faq"){$ts2="color: #FF0000;font-weight:bolder;";$ts1="color: #000000";}else if($id=="data"){$ts3="color: #FF0000;font-weight:bolder;";$ts1="color: #000000";}?>
											<tr>
												<td width="20"><table align="left"><tr><td style="padding-left:10px;"><strong>°í°´¼¾ÅÍ : </strong><a href="/sub05.php"><font style="<?=$ts1?>">°øÁö»çÇ×</font></a> ¤Ó <a href="/sub05.php"><font style="<?=$ts2?>">ÀÚÁÖÇÏ´ÂÁú¹®</font></a> ¤Ó <a href="/sub05.php?tt=5"><font style="<?=$ts3?>">ÀÚ·á½Ç</font></a></td>
												</tr></table></td>
												
											</tr>
                                            <tr><td height="1" bgcolor="#0066CC"></td></tr>
                                            <tr><td height="10" ></td></tr>
										</table>								  </td>
							    </tr>
							 </table>
	  <!-- navi end-->
	</td>
</tr>

<tr>
	<td>	
			<div align="center">
			  <!-- contents start-->
			<table width="98%" border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td>&nbsp;</td>
              </tr>
              <tr>
                <td><table width="100%" border="0" cellspacing="0" cellpadding="0">

                  <tr>
                    <td height="5"><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>
                        <style type="text/css">
.viewtable { border-collapse:collapse; margin-bottom:0px; }
.viewtable th {background-color:#efefef; height:25px; vertical-align:central}
.viewtable th.topline, .viewtable td.topline {border-top:2px solid #0070b1;vertical-align:central}
.viewtable th,.viewtable td {border-bottom:1px solid #0070b1;}
.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 #877c6b; text-align:center; background-color:#6394bb; width:60px; 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;}
                  </style>
                        <style type="text/css">
.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">
                          <tr>
                            <th width="13%" class="topline"><b>Á¦¸ñ</b></th>
                            <td width="22%" class="topline" colspan="5" ><?=$view[subject]?></td>
                          </tr>
                          <tr>
                            <th align="center"><b>À̸§</b></th>
                            <td ><?=$view[name]?></td>
                            <th width="13%" align="center"><b>µî·ÏÀÏ</b></th>
                            <td width="22%" ><?=date("Y-m-d",$view["date"])?></td>
                            <th width="13%" align="center"><b>Á¶È¸</b></th>
                            <td width="7%"  ><?=$view[ref]?></td>
                          </tr>
                          <tr>
                            <td height="300" colspan="6" valign="top" class="wid"><br />
		<?=$files?>
		<?=$view_e?>
								</td>
                          </tr>
                        </table>
                      <br />
                        <center>
                          <!--a href="/board/board.php?id=notice&mode=write&sub_mode=answer&no=6"><img src="../board/img/btn/btn_answer.gif" class="imgbt1" style="display:inline;"/></a-->
                          <a href='delete_ok.php?mode=delete&amp;id=notice&amp;no=6' onclick='return confirm(&quot;Á¤¸» »èÁ¦ÇϽðڽÀ´Ï±î?&quot;)'><img src="/images/del_bt.jpg" class="imgbt1"onclick="" style="display:inline;"/></a>
                          <input name="image" type="image" class="imgbt1"onclick="location.href='sub05.php'" src="/images/list_bt.jpg" />
                          <a href='sub05_write.php'><img src="/images/edit_bt.jpg" class="imgbt1"onclick="javascript:location.href='sub05_write.php';" style="display:inline;"/></a>
                        </center>
                      <br />
                        <!-- ³»¿ë -->
                        <table  width="100%"  border="0"  cellspacing="0" cellpadding="4" class="viewtable" style="margin-bottom:50px;">
                          <tr>
                            <th width="14%" class="topline">ÀÌÀü±Û</th>
                            <td class="topline"><a href="/board/board.php?id=notice&amp;mode=view&amp;no=5&amp;passed=">test</a></td>
                          </tr>
                          <tr>
                            <th>´ÙÀ½±Û</th>
                            <td><a href="/board/board.php?id=notice&amp;mode=view&amp;no=7&amp;passed=">°øÁö»çÇ× Å×½ºÆ®</a></td>
                          </tr>
                      </table></td>
                  </tr>
                </table></td>
              </tr>
              <tr>
                <td height="30">&nbsp;</td>
              </tr>
            </table>
	  </div>
			<!-- contents end--></td>
</tr>

<div id="btm">
<? include "inc/btm.html"; ?>
</div>
  


OHA YOOOO