<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<!--업로드1 -->
<tr>
<td>
<? if(!empty($row->filename)) {
$pos1 = strpos($row->filename, ".");
$fileExt1 = substr($row->filename, $pos1+1);
?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="20" class="8pt gray02">- 업로드파일1 : <a href="filedown.php?filename=<?=base64_encode($row->filename)?>"><?=substr($row->filename, 14)?></a></td>
</tr>
<tr>
<td class="title03_10">
<?
if($fileExt1 == "jpg" || $fileExt1 == "jpeg" || $fileExt1 == "gif" || $fileExt1 == "bmp"){
// image info
$imgInfo = @getimagesize($rootPath ."/upload/$row->filename");
$imgInfoWH = explode(" ", $imgInfo[3]);
parse_str($imgInfoWH[0]);
$imgW = (int)str_replace(""", "", stripslashes($width));
if($imgW < 615){
$width = $imgInfo[3];
}else{
$width = "width=615";
}
?>
<img src="/upload/<?=$row->filename?>" <?=$width?> onmouseover="style.cursor='hand'" onclick="javascript:view('/upload/<?=$row->filename?>')">
<? } ?>
</td>
</tr>
</table>
<? } ?>
</td>
</tr>
<!--업로드1끝 -->
<!--업로드2 -->
<tr>
<td>
<? if(!empty($row->filename2)) {
$pos2 = strpos($row->filename2, ".");
$fileExt2 = substr($row->filename2, $pos2+1);
?>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="20" class="8pt gray02">- 업로드파일2 : <a href="filedown.php?filename=<?=base64_encode($row->filename2)?>"><?=substr($row->filename2, 14)?></a></td>
</tr>
<tr>
<td class="title03_10">
<?
if($fileExt2 == "jpg" || $fileExt2 == "jpeg" || $fileExt2 == "gif" || $fileExt2 == "bmp"){
// image info
$imgInfo = @getimagesize($rootPath ."/upload/$row->filename2");
$imgInfoWH = explode(" ", $imgInfo[3]);
parse_str($imgInfoWH[0]);
$imgW = (int)str_replace(""", "", stripslashes($width));
if($imgW < 615){
$width = $imgInfo[3];
}else{
$width = "width=615";
}
?>
<img src="/upload/<?=$row->filename2?>" <?=$width?> onmouseover="style.cursor='hand'" onclick="javascript:view('/upload/<?=$row->filename2?>')">
<? } ?>
</td>
</tr>
</table>
<? } ?>
</td>
</tr>
<!--업로드2 끝 -->
</table>
<!-- 이미지 새창 띄우기 -->
<script language="javascript">
<!--
function view(what) {
var imgwin = window.open("",'WIN','scrollbars=no,status=no,toolbar=no,resizable=1,location=no,menu=no,width=10,height=10');
imgwin.focus();
imgwin.document.open();
imgwin.document.write("<html>n");
imgwin.document.write("<head>n");
imgwin.document.write("<title>**</title>n");
imgwin.document.write("<sc"+"ript>n");
imgwin.document.write("function resize() {n");
imgwin.document.write("pic = document.il;n");
//imgwin.document.write("alert(eval(pic).height);n");
imgwin.document.write("if (eval(pic).height) { var name = navigator.appNamen");
imgwin.document.write(" if (name == 'Microsoft Internet Explorer') { myHeight = eval(pic).height + 40; myWidth = eval(pic).width + 12;n");
imgwin.document.write(" } else { myHeight = eval(pic).height + 9; myWidth = eval(pic).width; }n");
imgwin.document.write(" clearTimeout();n");
imgwin.document.write(" var height = screen.height;n");
imgwin.document.write(" var width = screen.width;n");
imgwin.document.write(" var leftpos = width / 2 - myWidth / 2;n");
imgwin.document.write(" var toppos = height / 2 - myHeight / 2; n");
imgwin.document.write(" self.moveTo(leftpos, toppos);n");
imgwin.document.write(" self.resizeTo(myWidth, myHeight);n");
imgwin.document.write("}else setTimeOut(resize(), 100);}n");
imgwin.document.write("</sc"+"ript>n");
imgwin.document.write("</head>n");
imgwin.document.write('<body topmargin="0" leftmargin="0" marginheight="0" marginwidth="0" onclick="javascript:self.close()" bgcolor="#FFFFFF">n');
imgwin.document.write("<img border=0 src="+what+" xwidth=100 xheight=9 name=il onmouseover="style.cursor='hand'" onload='resize();'>n");
imgwin.document.write("</body>n");
imgwin.document.close();
}
//-->
</script>
<!-- 이미지 새창 띄우기 -->