<!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>
	<title>插入/编辑图片</title>
	<meta http-equiv="Content-Type" content="text/html; charset={?$jieqi_charset?}" />
	<script type="text/javascript" src="{?$jieqi_url?}/lib/html/tinymce/tiny_mce_popup.js"></script>
	<script type="text/javascript" src="{?$jieqi_url?}/lib/html/tinymce/utils/mctabs.js"></script>
	<script type="text/javascript" src="{?$jieqi_url?}/lib/html/tinymce/utils/form_utils.js"></script>
	<script type="text/javascript" src="{?$jieqi_url?}/lib/html/tinymce/themes/advanced/js/image.js"></script>
	<base target="_self" />
</head>
<body id="image" style="display: none">

<form style="padding:0;margin:0;" onsubmit="ImageDialog.update();return false;" action="#">
	<div class="tabs">
		<ul>
			<li id="general_tab" class="current"><span><a href="javascript:mcTabs.displayTab('general_tab','general_panel');" onmousedown="return false;">插入/编辑图片</a></span></li>
		</ul>
	</div>

	<div style="border:1px solid #919B9C; border-top:0px; clear:both; background:white;">
		<div id="general_panel">
     <table border="0" cellpadding="4" cellspacing="0">
          <tr>
            <td nowrap="nowrap"><label for="src">图片网址</label></td>
            <td><table border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td><input id="src" name="src" type="text" class="mceFocus" value="" style="width: 200px" onchange="ImageDialog.getImageData();" /></td>
                  <td id="srcbrowsercontainer">&nbsp;</td>
                </tr>
              </table></td>
          </tr>
		  <tr>
			<td><label for="image_list">图片列表</label></td>
			<td><select id="image_list" name="image_list" onchange="document.getElementById('src').value=this.options[this.selectedIndex].value;document.getElementById('alt').value=this.options[this.selectedIndex].text;"></select></td>
		  </tr>
          <tr>
            <td nowrap="nowrap"><label for="alt">图片说明</label></td>
            <td><input id="alt" name="alt" type="text" value="" style="width: 200px" /></td>
          </tr>
          <tr>
            <td nowrap="nowrap"><label for="align">对齐方式</label></td>
            <td><select id="align" name="align" onchange="ImageDialog.updateStyle();">
                <option value="">--未设置--</option>
                <option value="baseline">基准线</option>
                <option value="top">上方对齐</option>
                <option value="middle">居中对齐</option>
                <option value="bottom">底部对齐</option>
                <option value="text-top">文字上方</option>
                <option value="text-bottom">文字下方</option>
                <option value="left">靠左对齐</option>
                <option value="right">靠右对齐</option>
              </select>

			  &nbsp;&nbsp;&nbsp;&nbsp;<label for="width">尺寸</label>&nbsp;<input id="width" name="width" type="text" value="" size="3" maxlength="5" />
              x
              <input id="height" name="height" type="text" value="" size="3" maxlength="5" />
			</td>
          </tr>
          <tr>
            <td nowrap="nowrap"><label for="border">边框</label></td>
            <td><input id="border" name="border" type="text" value="" size="3" maxlength="3" onchange="ImageDialog.updateStyle();" />
			&nbsp;&nbsp;<label for="vspace">纵向间距</label>&nbsp;<input id="vspace" name="vspace" type="text" value="" size="3" maxlength="3" onchange="ImageDialog.updateStyle();" />
			&nbsp;&nbsp;<label for="hspace">水平间距</label>&nbsp;<input id="hspace" name="hspace" type="text" value="" size="3" maxlength="3" onchange="ImageDialog.updateStyle();" />
			</td>
          </tr>
        </table>
		</div>
	</div>

	<div class="mceActionPanel">
		<div style="float: left">
			<button type="submit" id="insert" name="insert">插入</button>
		</div>

		<div style="float: right">
			<button type="button" id="cancel" name="cancel" onclick="tinyMCEPopup.close();">取消</button>
		</div>
	</div>
</form>
<form style="padding:0;margin:0;" enctype="multipart/form-data" name="frmupload" id="frmupload" method="post">
<div style="border:1px solid #919B9C; clear:both; background:white;padding:3px;">
  <div style="float: left;">
  上传新图片：<br />
  <input style="margin: 8px 0;" name="imgfile" type="file" id="imgfile" size="20"><br />
  <button type="submit" name="picSubmit" id="picSubmit"> 上 传  </button>
  <input type="hidden" name="act" value="upload">{?$jieqi_token_input?}
  </div>
  <div style="float: right">
  <img id="imgpreivew"  style="visibility:hidden" height="80px" width="80px">
  </div>
  <div style="clear:both"></div>
</div>
</form>

<script type="text/javascript">
var imgsrc = "{?$imageurl?}";
if(imgsrc != ""){
	document.getElementById('src').value="{?$imageurl?}";
	ImageDialog.getImageData();
}
</script>
</body>
</html>