<%@ Page Language="C#" MasterPageFile="~/webUser/MasterPage.master" AutoEventWireup="true"
    Inherits="ZYDN.Web.webUser.contribute_Add" Title="Untitled Page" EnableViewState="false"
    Codebehind="contribute_Add.aspx.cs" %>

<asp:Content ID="Content1" ContentPlaceHolderID="Content1" runat="Server">
    <link rel="stylesheet" type="text/css" href="../system/skins/css/Sys.css" />

    <script type="text/javascript" language="javascript" src="../system/myweb/js/createData.js"></script>

    <script type="text/javascript" language="javascript" src="../system/myweb/js/myWeb.js"></script>
    <script type="text/javascript" language="javascript" src="js/signFor.js"></script>
    <script type="text/javascript" language="javascript">
		var objAjax=new JAjax();
		var menuid=readPar(location.href,"menuid");
		var menuName=null;
		var asTab=null;
		var d=new createDataClass();
		d.serverPath="../system/myWeb/";
		var m=new myWebClass();
		var EditContent="";
		m.serverPath="../system/myWeb/";
		var oObj;
var field=new Array();
		var fileid=readPar(location.href,"id");
		var pType=readPar(location.href,"pType");
		
		
		<% wPageJs(); %>
var sign=new signForManger();

	  function loadNewPage(){
	    	//loadBodyclick();
			var option=new optionClass();
			tObj=document.getElementsByName("optionTitle");
			oObj=document.getElementsByName("optionBody")
			option.titleObj=tObj;
			option.bodyObj=oObj;
			option.create();
			
	   	   if (isUserInt==0){
	   	        tObj[tObj.length-1].style.display="none";
	   	        oObj[tObj.length-1].style.display="none";
	   	   }
	   	    
	   	    //return;
	        var h=Element.getHeight("hiwebTab");
	        //alert(h);
	        var h1=h-171;
	        for (var i=0;i<oObj.length;i++){
                  oObj[i].style.height=h1;
	        }
	        $("divButton").style.top=h1+120;
	        setTimeout("loadPar()",10)
       }
	   
	   function loadPar(){
	      
	       
	   	    d.menuPar=d.loadPar(menuid);
			if (d.menuPar=="noPop"){
			    alert("您在本栏目没有发布信息的权限")
				document.body.innerHTML="";
				return;
			}
			
			d.tabPar=d.loadExDataPar(d.menuPar[15]);
			d.serverPath="../system/";
			d.displayExData(oObj[1]);
			
			var menu=new Array();
		
			menu[1]=menuid;
			// alert(d.menuPar[3]);
			menu[0]=m.readPath(d.menuPar[3]);
			d.addSelectMenu(menu);
			
			asTab=d.menuPar[15];
			d.serverPath="../system/myWeb/";
			d.modiType="user";
			
			if (pType=="modi"){
				d.readFileData();  //填充原始数据
				fData=d.fData;
				field=d.field;
			}
            d.createSignForTitle();
            //判断是否具有签收权限
            
            sign.menuid=menuid;
            sign.isHavePower=false;
            sign.isPower();
            sign.setEnable($("T_signFor"));
            var isBool=false;
			if(sign.isHavePower==true){
			    if(field){
		            for(var i=0;i<field.length;i++){
		               if(field[i]=="signFor"){
		                    if(fData[i]=="1"){
		                        signFor[1].style.display="block";
		                        signFor[0].style.display="block";
		                        $("T_"+field[i]).setAttribute("checked","checked");
            			        d.loadSignForTitle();
            			        isBool=true;
                                break;
		                    }
		               }
		            }
		         }
		         if(isBool==false){
		                signFor[1].style.display="none";
                        signFor[0].style.display="none";
                        $("T_signFor").setAttribute("checked","");
                        $("T_signForUser").value="";
		         }
		    }
			$("intType").onclick=function(){
				var obj=$("intDiv");
				if (this.checked){
					obj.style.display="none";
				}else{
					obj.style.display="";
				}
				
			}
			 $("editTxt").src="../system/editor/Editor.htm";
		//	loadImgDiv.style.display="none";
	   
	    }
	   
    </script>

    <div class="maxTitle">
        发布信息
    </div>
    <br />
    <!---div id="loadImgDiv" style="padding-top: 100px; text-align: center; width: 100%;
        height: 100%; position: absolute; top: 0px; left: 0px; z-index: 99; background-color: #ffffff;">
        <img src="../system/skins/IMG/wait.gif"><br>
        数据加载中, 请稍候.........
    </div--->
    <form action="../system/myweb/createDataServer.aspx?type=saveContribute" method="post"
        name="form1" id="form1">
        <div style="position: absolute; top:95px; left: 180px; width: 95%; height: 95%"
            id="editJob">
            <div style="width: 100%; position: absolute; left: 10px; top: 0px; z-index: 2" id="div2">
                <div name="optionTitle" id="optionTitle">基本信息</div>
                <div name="optionTitle" id="optionTitle">扩展信息</div>
                <div name="optionTitle" id="optionTitle">积分规则</div>
                <div name="optionTitle" id="optionTitle">签收</div>
            </div>
            <div style="width: 100%; height: 300px; position: absolute; top: 21px; z-index: 1"
                id="optionDiv">
                <div name="optionBody" id="optionBody">
                    <div style="padding: 4px;">
                        <!---基本参数--->
                        <table border="0" width="750">
                            <tr>
                                <td style="width: 60px;">
                                    标题<font color="#FF0000">*</font></td>
                                <td style="width: 690px;" colspan="3">
                                   <input isV="1" title="标题" notNull="1" max="100" id="T_title" name="T_title" type="text" style="width:500px;">
                                   &nbsp;&nbsp;&nbsp;&nbsp; 前缀<input id="T_Kind" name="T_Kind"
                                            type="text" style="width: 55px;"></td>
                            </tr>
                            <tr>
                                <td>
                                    所属栏目</td>
                                <td style="width: 690px;" colspan="3">
                                   <div id="selectPathDiv" style="overflow:auto;height:50px;width:380px;float:left;">
						            </div>
						            <div style="float:left;">
							            <input type="button" onClick="d.selectPowerMenu(asTab)" value="选择所属栏目">
						              </div>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    缩略图</td>
                                <td colspan="3">
                                    <div style="width: 600px">
                                        <input  onclick='this.nextSibling.click();' id="T_TabImage" name="T_TabImage" type="text" style="width: 450px;" readonly="readonly" /><input
                                            type='button' value='上传' onclick='d.upfile(this,"../system/")' /><input type="button" value="清除" onclick="$('T_TabImage').value=''"></div>
                                </td>
                            </tr>
                            <tr style="display:none;">
                                <td>
                                    来源</td>
                                <td>
                                    <input id="T_Source" name="T_Source" type="text" style="width: 100px;" /></td>
                                <td>
                                    来源路径</td>
                                <td>
                                    <input id="T_SourceUrl" name="T_SourceUrl" type="text" style="width: 340px;" /></td>
                            </tr>
                            <tr style="display:none;">
                                <td>
                                    关键字</td>
                                <td colspan="3" style="width: 600px">
                                    <input id="T_TabKeys" name="T_TabKeys" type="text" style="width: 200px;" />
                                    &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; 加入调查<input id="T_inquiry" name="T_inquiry"
                                        type="text" style="width: 200px;" />
                                    <input onclick="var v=openVot('../system/');if (v!=null){$('T_inquiry').value=v;}"
                                        type="button" value="选择" />
                                </td>
                            </tr>
                            <tr style="display:none;">
                                <td>
                                    转向连接</td>
                                <td colspan="3">
                                    <input id="T_WebUrl" name="T_WebUrl" type="text" style="width: 600px;"></td>
                            </tr>
                            <tr>
                                <td>
                                    内容</td>
                                <td colspan="3">
                                    <div id="editTextDiv" style="height: 450px; width: 650px">
                                        <iframe src="" id="editTxt" name="editTxt" style="width: 100%; height: 100%" marginwidth="0"
                                            marginheight="0" align="top" scrolling="no" frameborder="0"></iframe>
                                    </div>
                                    <input type="hidden" id="T_content" name="T_content" />
                                    <!---textarea id="T_content" name="T_content" style="display:none;width:600px;height:280px"></textarea--->
                                </td>
                            </tr>
                            <tr>
                                <td colspan="4">
                                    自动生成简介
                                    <input checked type="checkbox" id="isAutoCBS" name="isAutoCBS" vale="1" />
                                </td>
                            </tr>
                            <tr>
                                <td>
                                    内容简介</td>
                                <td colspan="3">
                                    <textarea id="T_CBS" name="T_CBS" style="width: 650px; height: 80px" onclick="$('isAutoCBS').checked=false"></textarea>
                                </td>
                            </tr>
                        </table>
                        <!---基本参数 OK--->
                    </div>
                </div>
                <div name="optionBody" id="optionBody">
                    <div style="padding: 4px;">
                        <!--扩展参数-->
                    </div>
                </div>
                <div name="optionBody" id="optionBody">
                    <div style="padding: 4px;">
                        <!--积分规则-->
						<input type="checkbox" checked="checked" id="intType"  name="intType"  value="-1"/><label for="intType">使用栏目设置的积分规则</label><br />
						<br />
						<div id="intDiv" style="display:none;">
							查看本文所指定的内容/软件/视频等, 需要积分:<br />
							<input name="dispInt" type="text" id="dispInt" title="看内容需积分" value="0" isV="1" isnum="1" />
						  分.<br />
							查看本文所指定的内容/软件/视频等, 需要虚拟货币:<br />
							<input name="dispMoney" type="text" id="dispMoney"  title="看内容需货币" value="0" isV="1" isNum="1" />
							元.<br />
							<br />
							这是一个悬赏招标, 给中标者如下奖励:<br />
							积分<br />
							<input  name="AwardsInt" type="text"  id="AwardsInt" title="奖励积分" value="0" isV="1" isNum="1" />
							分<br />
							虚拟货币<br />
							<input name="AwardsMoney" type="text" id="AwardsMoney"  title="奖励货币" value="0" isV="1" isNum="1"/>
							元
							<br /><br /><br /><br />
							注: 如果这里设置了看本文内容需要积分或虚拟货币, 那么, 看内容的人所扣除的积分会增加给信息发布人. <br />如: A用户发布本信息, 设置看本内容需要5点积分, B 用户来看此信息, 即B用户会被扣除5分, A用户会增加5点积分.

						</div>
                    </div>
                </div>
                  <div name="optionBody"  id="optionBody">
		           <div style="padding:4px;">
		                  <table border="0" width="750">
		                    <tr>
					              <td style="width:60px">需要签收</td>
					              <td colspan="3" style="width:690px">
					                  <input name="T_signFor" id="T_signFor" type="checkbox" onClick="if (this.checked!=true){signFor[0].style.display='none';signFor[1].style.display='none';}else{signFor[1].style.display='';signFor[0].style.display=''}" value="1"/>
				                  </td>
		                    </tr>
				                <tr id="signFor" style="display:none">
					                <td style="width:60px">增加需签收用户</td>
					                <td colspan="3" style="width:690px">
					                <input type="text" style="width:600px"  id="T_signForUser"  name="T_signForUser" />
					                  <div style="width:600px"> 
						                  <input onClick="d.selectUser(form1.T_signForUser)" type="button" value="选择用户" >
						                  <input onClick="d.clearUser(form1.T_signForUser)" type="button" value="清除用户" >
					                  </div>
					                </td>
				                </tr>
				                <tr id="signFor" style="display:none">
					                <td valign="top" style="width:60px">日期</td>
					                <td colspan="3" style="width:690px">
					                <input onClick="d.openSelectDate()" type="text" style="width:200px"  id="endsignDate"  name="endsignDate"/>
					                限制签收日期 (在**日期之前)
					                <div style="border: 1px solid #808080;">
						                 <div id="signForTitle" class="titleRow"></div>
            							 
						                 <div id="signForList"></div>
					                 </div>
					                </td>
				                </tr>
			              </table>
		           </div>
		        </div>
            </div></div>
    </form>

            <div style="position: absolute;left:200px; top: 615px;" id="divButton" >
                <input name="isClear" type="checkbox" id="isClear" value="" checked="checked" />
                <label for="isClear">
                    数据提交后清空原数据</label>&nbsp;&nbsp;&nbsp;&nbsp;
                <input type="button" value="提交" onclick="d.saveContribute();" />
            </div>
        
    <script language="javascript" type="text/javascript"> 
    setTimeout("loadNewPage()",1000);
    </script>

</asp:Content>
