<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312"/>
<link rel="stylesheet" type="text/css" href="<?php echo $vd['sc']; ?>css/main.css"/>
<style type="text/css">
td{height:30px}
.preview_fake{ /* 该对象用户在IE下显示预览图片 */
    filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(sizingMethod=scale);
}

</style>
</head>
<body>
<div id="titleDiv">
<div style="float:left"><a href="index.php?a=Home"><img src="<?php echo $vd['sc']; ?>images/home.png" style="vertical-align:middle" border="0"/></a></div><div style="float:left;padding-top:8px;padding-left:3px;"><a href="index.php?a=Home" title="回到后台首页"><font color="#000">桌面</font></a> <span style="font-size:7px;">>></span> <span style="font-size:12px;">LOGO管理</span></div>
<div style="float:right;"><a href="index.php?m=mod_home&a=Help&t=admin_b2b_logo_index" onFocus="this.blur()" title="查看LOGO相关帮助"><img src="<?php echo $vd['sc']; ?>images/help.gif" style="vertical-align:middle" border="0"/></a></div>
</div>
<div id="contentTip" style="display:none;"></div>
<div id="content" class="cwarpper">
<div class="cbodyHead"></div>
<div class="cwarpper1">
<div class="ctitle">
  Logo管理
  <strong onmouseover="showhide(this);" onmouseout="showhide(this);" style="cursor:pointer">[?]</strong><p style="display:none">
    操作步骤:<br/>
    1.点击浏览找到mylogo.gif图片<br/>
    2.上传  
  </p>
</div>
<div>
<?php foreach($vd['logo'] as $item){ ?>
<table border="1" id="ctable1" class="ctable" bordercolor="#86B9D6">
  <tr>
    <td align="center" height="35" colspan="2" class="listhead" style="text-align:left;font-weight:bold;padding-left:10px;color:#ff0000">
      <?php echo $item['name']; ?>系统LOGO
    </td>
  </tr>
  <tr> 
    <td width="15%" align="right" height="46">Logo图片：</td>
    <td width="85%" style="padding-left: 10px" height="47">
    <img src="<?php echo $vd['root']; ?>content/<?php echo $item['m']; ?>/images/mylogo.gif" border="0"/>
    </td>
  </tr>
  
  <tr> 
    <td width="15%" align="right" height="46">上传图片：</td>
    <td width="85%" style="padding-left: 10px" height="47">
    <input type="hidden" id="ubzimage<?php echo $item['m']; ?>" name="ubzimage<?php echo $item['m']; ?>" size="34"/> 
    <iframe name="uploader" id="bodyiframe<?php echo $item['m']; ?>" src="index.php?m=com_fs&c=fs&imgid=logo<?php echo $item['m']; ?>&fun=imginfo<?php echo $item['m']; ?>&inputid=ubzimage<?php echo $item['m']; ?>&d=1&mod=<?php echo $item['m']; ?>" frameBorder="0" marginHeight="1" marginWidth="1" scrolling="no" style="height:30px;width:100%; background-color:#ffffff"></iframe>
    </td>
  </tr>
  <tr> 
    <td width="15%" align="right" height="46"></td>
    <td width="85%" style="padding-left: 10px" height="47">
    <span class="spantip">注意：logo图片，请先命名为mylogo.gif再上传</span>
    </td>
  </tr>
  <tr> 
    <td width="15%" align="right" height="46">图片预览：</td>
    <td width="85%" style="padding-left: 10px" height="47">
    <div id="logo<?php echo $item['m']; ?>" class="preview_fake"></div><div id="logoinfo<?php echo $item['m']; ?>"></div>
    </td>
  </tr>
</table>
<script type="text/javascript">
function imginfo<?php echo $item['m']; ?>(imgsrc)
{
	obj  = document.all ? window.frames["bodyiframe<?php echo $item['m']; ?>"] : window.document.getElementById("bodyiframe<?php echo $item['m']; ?>").contentWindow;
  filen = obj.document.getElementById("txtFileUpload").value;

	if( !filen.match( /mylogo.gif/i ) ){
    alert('图片格式无效，图片应该命名为mylogo.gif再上传！');
    return false;
  }
  document.getElementById("logoinfo<?php echo $item['m']; ?>").innerHTML = "高 x 宽：" + imgsrc.height + " x " + imgsrc.width + "<br/>图片大小：" + imgsrc.fileSize + " 字节"; 
}
</script>
<?php } ?>
</div>
</div>

<div class="cbodyFoot"></div>
</div>
<div id="opcontent" style="display:none">
  <div class="optxt">
  </div>
</div>
<script type="text/javascript">
  var ctablenum = 2;
</script>
<script src="<?php echo $vd['sc']; ?>js/content.js" type="text/javascript"></script>
</body>
</html>

