<?php
require("../../class/connect.php");
include("../../class/db_sql.php");
include("../../class/config.php");
include("../../class/functions.php");
$link=db_connect();
$empire=new mysqlquery();
$logininid=(int)$_GET['userid'];
$loginin=$_GET['username'];
$loginrnd=$_GET['rnd'];
$classid=(int)$_GET['classid'];
$filepass=(int)$_GET['filepass'];
$type=$_GET['type'];
$doing=$_GET['doing'];
$editor=1;
is_login($logininid,$loginin,$loginrnd);
db_close();
$empire=null;
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>上传多图片</title>
<script>
function addpic()
{var i;
var str="";
for(i=1;i<=document.form1.trannum.value;i++)
{
str=str+"<tr><td width=8%><div align=center>"+i+"</div></td><td width=92%> <div align=center><input name=file[] type=file size=30></div></td></tr>";
}
window.morepic.innerHTML="<table width=98% align=center border=0 cellspacing=1 cellpadding=3>"+str+"</table>";
}
</script>
<link href="../../data/images/css.css" rel="stylesheet" type="text/css">
<link id="luna-tab-style-sheet" type="text/css" rel="stylesheet" href="../../data/images/tab.winclassic.css" disabled="disabled" />
<!-- the id is not needed. It is used here to be able to change css file at runtime -->
<style type="text/css"> 
   .dynamic-tab-pane-control .tab-page { 
         height:                100px; 
 } 
  .dynamic-tab-pane-control .tab-page .dynamic-tab-pane-control .tab-page { 
         height:                150px; 
 } 
  form { 
         margin:        0; 
         padding:        0; 
 } 
  /* over ride styles from webfxlayout */ 
  .dynamic-tab-pane-control h2 { 
         text-align:        center; 
         width:                auto;
		 height:            20; 
 } 
   .dynamic-tab-pane-control h2 a { 
         display:        inline; 
         width:                auto; 
 } 
  .dynamic-tab-pane-control a:hover { 
         background: transparent; 
 } 
  </style>
 <script type="text/javascript" src="../../data/images/tabpane.js"></script> <script type="text/javascript"> 
  function setLinkSrc( sStyle ) { 
         document.getElementById( "luna-tab-style-sheet" ).disabled = sStyle != "luna"; 
  
         //document.documentElement.style.background = "";
         //document.body.style.background = sStyle == "webfx" ? "white" : "ThreeDFace"; 
 } 
function chgBg(obj,color){
 if (document.all || document.getElementById)
   obj.style.backgroundColor=color;
 else if (document.layers)
   obj.bgColor=color;
}
  setLinkSrc( "luna" ); 
  
  function foreColor(thedo)
{
  if (!Error())	return;
  var arr = showModalDialog("selcolor.html", "", "dialogWidth:18.5em; dialogHeight:17.5em; status:0");
  if (arr != null) 
  {
  	if(thedo==0)
  	{
  	document.form1.tbcolor.value=arr;
  	}
  	else
  	{
	document.form1.tbbordercolor.value=arr;
  	}
  }
  else 
  {
  	if(thedo==0)
	{
	document.form1.tbcolor.focus();
	}
	else
	{
	document.form1.tbbordercolor.focus();
	}
  }
}
  </script> 
</head>

<body>
<form action="<? echo"../enews.php?userid=$logininid&username=$loginin&rnd=$loginrnd";?>" method="post" enctype="multipart/form-data" name="form1">
<div class="tab-pane" id="TabPane1"> <script type="text/javascript">
tb1 = new WebFXTabPane( document.getElementById( "TabPane1" ) );
</script>

<div class="tab-page" id="bdtran"> 
                    
      <h2 class="tab">&nbsp;<font color="#FFFFFF">本地上传</font>&nbsp;</h2>
                    <script type="text/javascript">tb1.addTabPage( document.getElementById( "bdtran" ) );</script>
      <table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" class="tableborder">
        <tr>
      <td height="25">
<div align="center">上传图片数目： 
          <input name="trannum" type="text" id="trannum" value="3" size="6">
          <input type="button" name="Submit" value="设定" onclick="addpic()">
        </div></td>
    </tr>
    <tr>
      <td bgcolor="#FFFFFF" id=morepic> 
        <table width="98%" border="0" align="center" cellpadding="3" cellspacing="1">
          <tr> 
              <td width="8%"><div align="center">1</div></td>
              <td width="92%"> <div align="center"> 
                  
                <input name="file[]" type="file" id="file[]" size="30">
                </div></td>
            </tr>
            <tr> 
              <td><div align="center">2</div></td>
              <td> <div align="center"> 
                  
                <input name="file[]" type="file" id="file[]" size="30">
                </div></td>
            </tr>
            <tr> 
              <td><div align="center">3</div></td>
              <td> <div align="center"> 
                  
                <input name="file[]" type="file" id="file[]" size="30">
                </div></td>
            </tr>
          </table>
        
      </td>
    </tr>
  </table>
  </div>
  <div class="tab-page" id="yctran"> 
      <h2 class="tab">&nbsp;<font color="#FFFFFF">远程保存</font>&nbsp;</h2>
                    <script type="text/javascript">tb1.addTabPage( document.getElementById( "yctran" ) );</script>
      <table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" class="tableborder">
        <tr> 
      <td height="25">
<div align="center">远程保存图片列表(一张图片为一行，比本地上传优先)</div></td>
    </tr>
    <tr> 
      <td><div align="center">
              <textarea name="saveurl" cols="120" rows="12" id="saveurl"></textarea>
        </div></td>
    </tr>
  </table>
  </div>
      <div class="tab-page" id="imginfo"> 
      <h2 class="tab">&nbsp;<font color="#FFFFFF">参数设置</font>&nbsp;</h2>
                    <script type="text/javascript">tb1.addTabPage( document.getElementById( "imginfo" ) );</script>
      <table width="100%" border="0" align="center" cellpadding="3" cellspacing="1" class="tableborder">
        <tr bgcolor="#FFFFFF"> 
      <td width="112" height="25">每行/页显示</td>
      <td width="351"> <input name="line" type="text" id="line" value="1" size="6">
        个图片</td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td height="25">对齐方式</td>
      <td> <input name="align" type="radio" value="left">
        居左 
        <input name="align" type="radio" value="center" checked>
        居中 <input name="align" type="radio" value="right">
        居右</td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td height="25">图片大小</td>
      <td> <input name="width" type="text" id="width" value="300" size="6">
        × 
        <input name="height" type="text" id="height" value="300" size="6">
        (宽×高)</td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td height="25">图片边框</td>
      <td> <input name="imgborder" type="text" id="imgborder" value="0" size="6"></td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td height="25">分割形式</td>
      <td> <select name="exptype" id="exptype">
          <option value="0">表格</option>
          <option value="1">分页码</option>
        </select></td>
    </tr>
    <tr bgcolor="#FFFFFF"> 
      <td height="25">生成缩略图</td>
      <td><input name="getsmall" type="checkbox" id="getsmall" value="1">
        同时生成缩略图. 缩图宽度: 
        <input name="swidth" type="text" id="width3" value="105" size="6">
        * 高度: 
        <input name="sheight" type="text" id="sheight" value="118" size="6"></td>
    </tr>
    <tr bgcolor="#FFFFFF">
      <td height="25">水印</td>
      <td><input name="getmark" type="checkbox" id="getmark" value="1"> <a href="../SetEnews.php" target="_blank">加水印</a></td>
    </tr>
  </table>
  </div>
      <div class="tab-page" id="tbinfo"> 
      <h2 class="tab">&nbsp;<font color="#FFFFFF">表格设置</font>&nbsp;</h2>
                    <script type="text/javascript">tb1.addTabPage( document.getElementById( "tbinfo" ) );</script>
    <table width="100%" border="0" cellspacing="1" cellpadding="3" class=tableborder>
      <tr bgcolor="#FFFFFF"> 
        <td width="25%" height="25">对齐方式</td>
        <td width="75%"> <input name="tbalign" type="radio" value="left">
          居左 
          <input name="tbalign" type="radio" value="center" checked>
          居中 
          <input name="tbalign" type="radio" value="right">
          居右</td>
      </tr>
      <tr bgcolor="#FFFFFF"> 
        <td height="25">背景颜色</td>
        <td><input name="tbcolor" type="text" id="tbcolor" size="15">
          <a onclick="foreColor(0);"><img src="../../data/images/color.gif" width="21" height="21" align="absbottom"></a> 
        </td>
      </tr>
      <tr bgcolor="#FFFFFF"> 
        <td height="25">表格宽度</td>
        <td><input name="tbwidth" type="text" id="tbwidth" value="100" size="6">
          <select name="tbwidthdw" id="tbwidthdw">
            <option value="%" selected>百分比</option>
            <option value="">像素</option>
          </select></td>
      </tr>
      <tr bgcolor="#FFFFFF"> 
        <td height="25">单元格</td>
        <td>单元间距:
          <input name="tbsp" type="text" id="tbsp" value="1" size="6">
          ，单元边距:
          <input name="tbpa" type="text" id="tbpa" value="3" size="6"></td>
      </tr>
      <tr bgcolor="#FFFFFF"> 
        <td height="25">边框</td>
        <td>边框粗细: 
          <input name="tbborder" type="text" id="tbsp3" value="0" size="6">
          ，边框颜色:
          <input name="tbbordercolor" type="text" id="tbbordercolor" size="15"> <a onclick="foreColor(1);"><img src="../../data/images/color.gif" width="21" height="21" align="absbottom"></a> 
        </td>
      </tr>
    </table>
	</div>
  </div>
  <table width="98%" border="0" align="center" cellpadding="3" cellspacing="1">
    <tr>
      <td><div align="center">
          <input type="submit" name="Submit2" value=" 上 传 ">&nbsp;&nbsp;
          <input type="reset" name="Submit3" value="重置">
          <input type=hidden name=classid value="<?=$classid?>">
          <input type=hidden name=filepass value="<?=$filepass?>">
          <input type=hidden name=enews value="SaveMoreImg">
    <input type=hidden name=type value="<?=$type?>">
    <input type=hidden name=doing value="<?=$doing?>">
        </div></td>
    </tr>
  </table>
  <p>&nbsp;</p>
</form>
</body>
</html>
