<%@ page language="C#" validaterequest="false" autoeventwireup="true" inherits="admin_wenzhangE, App_Web_5fvwns4r" enableviewstatemac="false" enableEventValidation="false" viewStateEncryptionMode="Never" %>

<!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>
<link rel="stylesheet" href="style/css.css" type="text/css" /> 
<link rel="stylesheet" href="style/page.css" type="text/css" /> 

<script src="uploadify/jquery-1.4.2.min.js" type="text/javascript"></script>
<script src="uploadify/swfobject.js" type="text/javascript"></script>
<script src="uploadify/jquery.uploadify.min.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="uploadify/uploadify.css" />

<script language="JavaScript" type="text/javascript" src="My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript" src="jscolor/jscolor.js"></script>

    <link rel="stylesheet" href="editor9/themes/default/default.css" />
	<link rel="stylesheet" href="editor9/plugins/code/prettify.css" />
	<script charset="utf-8" src="editor9/kindeditor.js"></script>
	<script charset="utf-8" src="editor9/lang/zh_CN.js"></script>
	<script charset="utf-8" src="editor9/plugins/code/prettify.js"></script>
		
		
		<script>
			var editor;
			KindEditor.ready(function(K) {
				editor = K.create('textarea[name="content"]', {
				    cssPath : 'editor9/plugins/code/prettify.css',
				    uploadJson : 'editor9/asp.net/upload_json.ashx',
				    fileManagerJson : 'editor9/asp.net/file_manager_json.ashx',
				    filterMode: false,
				    allowFileManager : true
				});
				editor = K.create('textarea[name="content1"]', {
					resizeType : 1,
					allowPreviewEmoticons : false,
					allowImageUpload : false,
					items : [
						'source','fontname', 'fontsize', '|', 'forecolor', 'hilitecolor', 'bold', 'italic', 'underline',
						'removeformat', '|', 'justifyleft', 'justifycenter', 'justifyright', 'insertorderedlist',
						'insertunorderedlist', '|', 'emoticons', 'image', 'link']
				});					
								
			});
		</script>

<script language="JavaScript">

function CheckForm()
{
 
 if($.trim($("#title").val())=="") 
 {
	$("#title").focus();
    alert("请填写名称！");
	return false;
  }
 
 
 if($("#Id1").get(0).selectedIndex<1) 
 {
	//$("#Id1").focus();
    //alert("请选择分类！");
	//return false;
  }

 
}

</script>

</head>
<body>
    <form id="form1" name="form1" runat="server">


<table width="100%" border="0" cellpadding="0" cellspacing="0" class="map">
  <tr>
    <td><%=classname%>管理</td>
    <td align="right"><a href="wenzhang.aspx?classid=<%=classid%>&classid2=<%=classid2 %>" class="sixlink"><%=classname%></a> <a href="wenzhangE.aspx?classid=<%=classid%>&classid2=<%=classid2 %>" class="sixlink">添加<%=classname%></a></td>
  </tr>
</table>

<table width="98%" border="0" cellpadding="0" cellspacing="0" class="title" align="center">
  <tr>
    <td>添加内容</td>
    <td align="right"><span class="red">*</span>号为必填项</td>
  </tr>
</table>


<table border="0" align="center" cellpadding="0" cellspacing="0" class="add">
    <tr>
      <td width="100" align="right">名称：</td>
      <td align="left">
      <input runat="server" name="title" type="text" class="input" id="title" style="width:400px;" />	 
	  <input runat="server" name="title1" type="text" class="input" id="title1" style="width:200px;" visible="false" /> <label>*</label>
      </td>
      <td width="100" align="right"></td>
      <td align="left">
      </td>
    </tr>
    <tr>
      <td width="100" align="right">分类：</td>
      <td align="left" colspan="3">
	 <asp:DropDownList ID="Id1" runat="server"></asp:DropDownList>
      </td>
    </tr>
    
    <tr>
      <td align="right">排序：</td>
      <td align="left" colspan="3">
        <input runat="server" name="ordernumber" type="text" class="input" value="0" id="ordernumber" maxlength="5" style="width:50px;" onKeyUp="this.value=this.value.replace(/\D/g,'')"  onafterpaste="this.value=this.value.replace(/\D/g,'')"/>  
        <label>*</label>
&nbsp;&nbsp; 时间 <input runat="server" type="text" size="12" id="addtime" name="addtime" value="" class="input" onClick="WdatePicker()">
&nbsp; 点击 <input runat="server" type="text" size="5" id="dj" name="dj" value="1" class="input">
<div style="display:none;">&nbsp;&nbsp;<input runat="server" type="checkbox" name="flag" id="flag" value="1" >首页图片新闻</div>
		</td>
    </tr>
    
    <tr> 
        <th>小图片：</th>
        <td colspan="3"><div style="float:left; width:450px;"><input name="img1" runat="server" type="text" class="input" id="img1" style="width:400px; margin-bottom:5px;" />      
        <br /> 
        <input id="file_upload" type="file" name="file_upload" />
        <div id="uploadfileQueue" style="padding:0px;"></div>
        </div>
        <div style="float:left; margin-left:20px;"><span class="imgbox"><img height="50" runat="server" src="uploadify/empty.gif" id="pic" style="margin-top:0px;" /></span></div>
        
    </td>
    </tr>

    <tr style="display:none;">
      <th>大图片：</th>
      <td align="left" colspan="3"><div style="float:left; width:450px;"><input name="img2" runat="server" type="text" class="input" id="img2" style="width:400px; margin-bottom:5px;" />      
        <br /> 
        <input id="file_upload2" type="file" name="file_upload2" />
        <div id="uploadfileQueue2" style="padding: 3px;"></div>
        </div>
        <div style="float:left; margin-left:20px;"><span class="imgbox2"><img height="50" runat="server" src="uploadify/empty.gif" id="pic2" style="margin-top:0px;" /></span></div>
        </td>
    </tr>
 
    <tr>
      <td width="100" align="right">简单描述</td>
      <td align="left" colspan="3"><textarea runat="server" name="content1" class="input" id="content1" style="width:800px; height:40px;"></textarea></td>
    </tr>    
  
    <tr>
      <td align="right">内容：</td>
      <td align="left" colspan="3"><textarea runat="server" id="content" name="content" rows="8" style="width:800px;height:350px;visibility:hidden;"></textarea></td>
    </tr>

    <tr style="display:none;">
      <td width="100" align="right">SEO标题：</td>
      <td align="left" colspan="3"><input runat="server" name="title9" type="text" class="input" id="title9" style="width:400px;" /></td>
    </tr>
    <tr style="display:none;">
      <td width="150" align="right">站点关键字</td>
      <td align="left"><textarea runat="server" name="keywords" class="input" id="keywords" style="width:400px; height:40px;"></textarea></td>
    </tr>
    
    <tr style="display:none;">
      <td width="150" align="right">站点描述</td>
      <td align="left"><textarea runat="server" name="description" class="input" id="description" style="width:400px; height:50px;"></textarea></td>
    </tr> 
            
    <tr>
      <td align="right">&nbsp;</td>
      <td align="left" valign="middle" colspan="3">
        <asp:Button ID="Btn" runat="server" Text="确定" CssClass="btn" OnClick="Btn_Click" />
       </td>
    </tr>
  </table>
   

<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0" class="page">
<tr>
        <td  align="right">
        
			
        </td>
    </tr>
   
</table>

 
 
<!--#include file="footer.htm"-->


<script type="text/javascript">
$(function(){
        $("#file_upload").uploadify({
        //开启调试
        'debug' : false,
        //是否自动上传
        'auto':true,
        'buttonText':'选择照片',
        //flash
        'swf': "uploadify/uploadify.swf",
        //文件选择后的容器ID
        'queueID':'uploadfileQueue',
        'uploader':'uploadify/upload.aspx',
        'width':'75',
        'height':'24',
        'multi':false,
        'fileTypeDesc':'支持的格式：',
        'fileTypeExts':'*.jpg;*.jpge;*.gif;*.png',
        'fileSizeLimit':'1MB',
        'removeTimeout':0.5,

        //返回一个错误，选择文件的时候触发
        'onSelectError':function(file, errorCode, errorMsg){
        switch(errorCode) {
        case -100:
        alert("上传的文件数量已经超出系统限制的"+$('#file_upload').uploadify('settings','queueSizeLimit')+"个文件！");
        break;
        case -110:
        alert("文件 ["+file.name+"] 大小超出系统限制的"+$('#file_upload').uploadify('settings','fileSizeLimit')+"大小！");
        break;
        case -120:
        alert("文件 ["+file.name+"] 大小异常！");
        break;
        case -130:
        alert("文件 ["+file.name+"] 类型不正确！");
        break;
        }
        },
        //检测FLASH失败调用
        'onFallback':function(){
        alert("您未安装FLASH控件，无法上传图片！请安装FLASH控件后再试。");
        },
        //上传到服务器，服务器返回相应信息到data里
        'onUploadSuccess':function(file, data, response){
			   var img1=$("#img1").val();
			   $("#img1").val("upload/"+data);
			   $(".imgbox").css("display","");
			   $("#pic").attr("src",'../upload/'+data);
			   //$("#Btn").attr("disabled",false);
			   if(img1!="")
			       $.ajax({url:"uploadify/upload.aspx?action=delimg&img="+encodeURI(img1),async:false}).responseText;        
        }
        });
        
        $("#file_upload2").uploadify({
        //开启调试
        'debug' : false,
        //是否自动上传
        'auto':true,
        'buttonText':'选择照片',
        //flash
        'swf': "uploadify/uploadify.swf",
        //文件选择后的容器ID
        'queueID':'uploadfileQueue2',
        'uploader':'uploadify/upload.aspx',
        'width':'75',
        'height':'24',
        'multi':false,
        'fileTypeDesc':'支持的格式：',
        'fileTypeExts':'*.jpg;*.jpge;*.gif;*.png',
        'fileSizeLimit':'1MB',
        'removeTimeout':0.5,

        //返回一个错误，选择文件的时候触发
        'onSelectError':function(file, errorCode, errorMsg){
        switch(errorCode) {
        case -100:
        alert("上传的文件数量已经超出系统限制的"+$('#file_upload').uploadify('settings','queueSizeLimit')+"个文件！");
        break;
        case -110:
        alert("文件 ["+file.name+"] 大小超出系统限制的"+$('#file_upload').uploadify('settings','fileSizeLimit')+"大小！");
        break;
        case -120:
        alert("文件 ["+file.name+"] 大小异常！");
        break;
        case -130:
        alert("文件 ["+file.name+"] 类型不正确！");
        break;
        }
        },
        //检测FLASH失败调用
        'onFallback':function(){
        alert("您未安装FLASH控件，无法上传图片！请安装FLASH控件后再试。");
        },
        //上传到服务器，服务器返回相应信息到data里
        'onUploadSuccess':function(file, data, response){
			   var img1=$("#img2").val();
			   $("#img2").val("upload/"+data);
			   $(".imgbox").css("display","");
			   $("#pic2").attr("src",'../upload/'+data);
			   //$("#Btn").attr("disabled",false);
			   if(img1!="")
			       $.ajax({url:"uploadify/upload.aspx?action=delimg&img="+encodeURI(img1),async:false}).responseText;        
        }
        });        
        
        
});

</script>

    </form>
</body>
</html>
