<!--#include file="head.asp"-->
<!--#include file="subleft.asp"-->

<script>document.getElementById('o_8').setAttribute("class", "ed"); document.getElementById("t_8").style.display="";document.getElementById('s_8_2').setAttribute("class", "ed4");</script>

<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />

<title><%=webname%>-提交工单</title>
<%
act=SafeRequestform("act")

if act="add" then

selectp=trim(SafeRequestform("selectp"))
selectc=trim(SafeRequestform("selectc"))

aygdbiao=trim(SafeRequestform("aygdbiao"))
aygdcon=trim(SafeRequestform("aygdcon"))

aygdpic1=trim(SafeRequestform("pic1"))
aygdpic2=trim(SafeRequestform("pic2"))
aygdpic3=trim(SafeRequestform("pic3"))
aygdpic4=trim(SafeRequestform("pic4"))
aygdpic5=trim(SafeRequestform("pic5"))


if selectp="0" or selectc="0" then call PopErr("请填写工单类别")
if aygdbiao="" or aygdcon="" then call PopErr("请填写完整")

rs.open "select * from aygongdan",conn,1,3
rs.addnew
rs("aygduid")=clng(request.Cookies("aynameid"))
rs("aygdbiao")=aygdbiao
rs("aygdcon")=aygdcon
rs("aygddate")=now()
rs("aygdleibie")=selectp&"-"&selectc
if aygdpic1<>"" then rs("aygdpic1")=aygdpic1
if aygdpic2<>"" then rs("aygdpic2")=aygdpic2
if aygdpic3<>"" then rs("aygdpic3")=aygdpic3
if aygdpic4<>"" then rs("aygdpic4")=aygdpic4
if aygdpic5<>"" then rs("aygdpic5")=aygdpic5
rs.update
rs.close
call PopErr2("工单提交成功","gongdan")
end if



%>
<script language=javascript>
function check_add()
{
   if(form1.selectp.value==="0")
   {alert("请选择工单类别");return false}
   if(form1.selectc.value==="0")
   {alert("请选择工单子类别");return false}
   if(form1.aygdbiao.value=="")
   {alert("请选择工单标题");return false}
   if(form1.aygdcon.value=="")
   {alert("请选择工单内容");return false}
}
</script>
<br>
<DIV id=main2> 
<%call webleft()%>

<DIV id=main_right>
<DIV id=main_right_content>

<H2><SPAN>提交工单</SPAN></H2>
<DIV class=main3>
  <table width="99%" border="0" align="center" cellpadding="0" cellspacing="0" class="table_style_a1">
     <form action="" method="post" name="form1" id="form1"  onSubmit="return check_add()"> 
       <tr>
         <th width="15%" align="center" class="border_right border_bottom" >
		  工单类别：
		 <td width="85%" class="border_right border_bottom">&nbsp;&nbsp;
<select name="selectp" onChange="selectcityarea('selectp','selectc','form1');"> 
<option value="0" selected>选择工单类别
</select>&nbsp;&nbsp;
<select name="selectc">
<option value="0" selected>选择工单子分类
</select>
         </tr>


	  <tr>
        <th align="center" class="border_right border_bottom">工单标题：</td>
        <td class="border_right border_bottom">&nbsp;&nbsp;<input name="aygdbiao" type="text" id="aygdbiao" size="60" maxlength="60" /></td>
      </tr>

	  <tr>
        <th height="135" align="center" class="border_right border_bottom">工单内容：</td>
        <td class="border_right border_bottom"><br>&nbsp;&nbsp;<textarea name="aygdcon" id="aygdcon" cols="100" rows="8"></textarea><br><br></td>
      </tr>
<link rel="stylesheet" href="/kindeditor/themes/default/default.css" />
<script charset="utf-8" src="/kindeditor/kindeditor.js"></script>
<script charset="utf-8" src="/kindeditor/lang/zh-CN.js"></script>
<script>
			KindEditor.ready(function(K) {
				var uploadbutton1 = K.uploadbutton({
					button : K('#uploadButton1')[0],
					fieldName : 'imgFile',
					url : '/kindeditor/asp/upload_gongdan.asp?dir=image',
					afterUpload : function(data) { 
						if (data.error === 0) {
							var url = K.formatUrl(data.url, '');
							urlcon=url.replace("/kindeditor/asp/../../","/"); 
							K('#picurl1').val(urlcon);
							con1.innerHTML='<a href='+urlcon+' target=_blank><img src='+urlcon+' width=100 height=100/></a>';
						} else {
							alert(data.message); 
						}
					},
					afterError : function(str) {
						alert('自定义错误信息: ' + str);
					}
				});
				uploadbutton1.fileBox.change(function(e) {
					uploadbutton1.submit();
				});
			});
			
			KindEditor.ready(function(K) {
				var uploadbutton2 = K.uploadbutton({
					button : K('#uploadButton2')[0],
					fieldName : 'imgFile',
					url : '/kindeditor/asp/upload_gongdan.asp?dir=image',
					afterUpload : function(data) { 
						if (data.error === 0) {
							var url = K.formatUrl(data.url, 'absolute');
							urlcon=url.replace("/kindeditor/asp/../../","/"); 
							K('#picurl2').val(urlcon);
							con2.innerHTML='<a href='+urlcon+' target=_blank><img src='+urlcon+' width=100 height=100/></a>';
						} else {
							alert(data.message);
						}
					},
					afterError : function(str) {
						alert('自定义错误信息: ' + str);
					}
				});
				uploadbutton2.fileBox.change(function(e) {
					uploadbutton2.submit();
				});
			});
			
			KindEditor.ready(function(K) {
				var uploadbutton3 = K.uploadbutton({
					button : K('#uploadButton3')[0],
					fieldName : 'imgFile',
					url : '/kindeditor/asp/upload_gongdan.asp?dir=image',
					afterUpload : function(data) { 
						if (data.error === 0) {
							var url = K.formatUrl(data.url, 'absolute');
							urlcon=url.replace("/kindeditor/asp/../../","/"); 
							K('#picurl3').val(urlcon);
							con3.innerHTML='<a href='+urlcon+' target=_blank><img src='+urlcon+' width=100 height=100/></a>';
						} else {
							alert(data.message);
						}
					},
					afterError : function(str) {
						alert('自定义错误信息: ' + str);
					}
				});
				uploadbutton3.fileBox.change(function(e) {
					uploadbutton3.submit();
				});
			});
			
			KindEditor.ready(function(K) {
				var uploadbutton4 = K.uploadbutton({
					button : K('#uploadButton4')[0],
					fieldName : 'imgFile',
					url : '/kindeditor/asp/upload_gongdan.asp?dir=image',
					afterUpload : function(data) { 
						if (data.error === 0) {
							var url = K.formatUrl(data.url, 'absolute');
							urlcon=url.replace("/kindeditor/asp/../../","/"); 
							K('#picurl4').val(urlcon);
							con4.innerHTML='<a href='+urlcon+' target=_blank><img src='+urlcon+' width=100 height=100/></a>';
						} else {
							alert(data.message);
						}
					},
					afterError : function(str) {
						alert('自定义错误信息: ' + str);
					}
				});
				uploadbutton4.fileBox.change(function(e) {
					uploadbutton4.submit();
				});
			});
			
			KindEditor.ready(function(K) {
				var uploadbutton5 = K.uploadbutton({
					button : K('#uploadButton5')[0],
					fieldName : 'imgFile',
					url : '/kindeditor/asp/upload_gongdan.asp?dir=image',
					afterUpload : function(data) { 
						if (data.error === 0) {
							var url = K.formatUrl(data.url, 'absolute');
							urlcon=url.replace("/kindeditor/asp/../../","/"); 
							K('#picurl5').val(urlcon);
							con5.innerHTML='<a href='+urlcon+' target=_blank><img src='+urlcon+' width=100 height=100/></a>';
						} else {
							alert(data.message);
						}
					},
					afterError : function(str) {
						alert('自定义错误信息: ' + str);
					}
				});
				uploadbutton5.fileBox.change(function(e) {
					uploadbutton5.submit();
				});
			});
		</script>
	  <tr>
        <th align="center" class="border_right border_bottom">&nbsp;</td>
        上传图片：
        <td class="border_right border_bottom"><br>
        &nbsp;&nbsp;<input name="pic1" type="hidden" class="ke-input-text" id="picurl1" value="" readonly="readonly" /> <input type="button" id="uploadButton1" value="添加图片1" />
		&nbsp;&nbsp;<input name="pic2" type="hidden" class="ke-input-text" id="picurl2" value="" readonly="readonly" /> <input type="button" id="uploadButton2" value="添加图片2" />
		&nbsp;&nbsp;<input name="pic3" type="hidden" class="ke-input-text" id="picurl3" value="" readonly="readonly" /> <input type="button" id="uploadButton3" value="添加图片3" />
		&nbsp;&nbsp;<input name="pic4" type="hidden" class="ke-input-text" id="picurl4" value="" readonly="readonly" /> <input type="button" id="uploadButton4" value="添加图片4" />
		&nbsp;&nbsp;<input name="pic5" type="hidden" class="ke-input-text" id="picurl5" value="" readonly="readonly" /> <input type="button" id="uploadButton5" value="添加图片5" />
        <br><span id="con1"></span>&nbsp;&nbsp;<span id="con2"></span>&nbsp;&nbsp;<span id="con3"></span>&nbsp;&nbsp;<span id="con4"></span>&nbsp;&nbsp;<span id="con5"></span>
        </td>
      </tr>

      <tr>
        <td colspan="2" align="center"><input class="butbaocun" type="submit" name="Submit" id="tijiao" value=" 提 交 工 单 ">
          <input name="act" type="hidden" id="act" value="add" /></td>
      </tr></form>
    </table>
</DIV>
<script language="javascript">
cityareaname=new Array(4);
cityareacode=new Array(4);
 function first(preP,preC,formname,selectP,selectC,chengshi1,chengshi2)
   {
     a=0;	
	 
	  
if (selectP=='01')
  { a=1;tempoption=new Option('账户问题','01',false,true); }
else
  { tempoption=new Option('账户问题','账户问题'); }
eval('document.'+formname+'.'+preP+'.options[1]=tempoption;');
cityareacode[0]=new Array('账户信息修改','安全设置','代理系统','账务统计相关问题');
cityareaname[0]=new Array('账户信息修改','安全设置','代理系统','账务统计相关问题');



if (selectP=='02')
  { a=2;tempoption=new Option('商品问题','02',false,true); }
else
  { tempoption=new Option('商品问题','商品问题'); }
eval('document.'+formname+'.'+preP+'.options[2]=tempoption;');
cityareacode[1]=new Array('商品分类相关问题','商品相关问题','商品购买链接相关问题','卡密相关问题','卡密回收站');
cityareaname[1]=new Array('商品分类相关问题','商品相关问题','商品购买链接相关问题','卡密相关问题','卡密回收站');



if (selectP=='03')
  { a=3;tempoption=new Option('交易问题','03',false,true); }
else
  { tempoption=new Option('交易问题','交易问题'); }
eval('document.'+formname+'.'+preP+'.options[3]=tempoption;');
cityareacode[2]=new Array('订单相关问题','财务相关问题','结算相关问题');
cityareaname[2]=new Array('订单相关问题','财务相关问题','结算相关问题');



if (selectP=='04')
  { a=4;tempoption=new Option('套餐问题','04',false,true); }
else
  { tempoption=new Option('套餐问题','套餐问题'); }
eval('document.'+formname+'.'+preP+'.options[4]=tempoption;');
cityareacode[3]=new Array('套餐购买相关问题','套餐使用相关问题');
cityareaname[3]=new Array('套餐购买相关问题','套餐使用相关问题');



eval('document.'+formname+'.'+preP+'.options[a].selected=true;');

cityid=selectP;
    if (cityid!='0')
      {
        b=0;for (i=0;i<cityareaname[cityid-1].length;i++)
           {
             if (selectC==cityareacode[cityid-1][i])
               {b=i+1;tempoption=new Option(cityareaname[cityid-1][i],cityareacode[cityid-1][i],false,true);}
             else
               tempoption=new Option(cityareaname[cityid-1][i],cityareacode[cityid-1][i]);
            eval('document.'+formname+'.'+preC+'.options[i+1]=tempoption;');
           }
        eval('document.'+formname+'.'+preC+'.options[b].selected=true;');
      }
    }
 function selectcityarea(preP,preC,formname)
   {
     cityid=eval('document.'+formname+'.'+preP+'.selectedIndex;');
     j=eval('document.'+formname+'.'+preC+'.length;');
     for (i=1;i<j;i++)
        {eval('document.'+formname+'.'+preC+'.options[j-i]=null;')}
     if (cityid!="0")
       {
         for (i=0;i<cityareaname[cityid-1].length;i++)
            {
             tempoption=new Option(cityareaname[cityid-1][i],cityareacode[cityid-1][i]);
             eval('document.'+formname+'.'+preC+'.options[i+1]=tempoption;');
            }
       }
    }
</script>

<script language="javascript">
first("selectp","selectc","form1",0,0);
</script>


</DIV></DIV>
<DIV class=clear></DIV></DIV>
</DIV>

<br>

	<!--#include virtual="/show/foot.asp"-->


