<!-- #include file="../conn.asp" -->
<!-- #include file="admin.asp" -->
<%Call Head()
call saycarda("添加平台")
%>

<%dim idd,TP
 idd=request.querystring("idd")
 TP=request("TP")
  if idd="" or Isnumeric(idd)=False then
  Call Error("ID无效！")
  end if
  if TP<>"" then
  dim class1,phone,pid
  class1=request("class1")
  phone=request("phone")
  pid=request("pid")
    if pid="" or Isnumeric(pid)=False then
  Call Error("排序无效！")
  end if
  if class1="" or phone="" then
  Call Error("各项不能为空！")
  end if
  if len(class1)>50 then
  Call Error("名称最多50字")
  end if
  set rs=server.createobject("adodb.recordset")
  rs.open" select * from symbian where classid="&idd&" and ptname='"&class1&"'",conn,1,2
  if not rs.eof then
  Call Error("该平台已经存在,请不要重复添加！")
  end if
  rs.addnew
  rs("ptname")=class1
  rs("ptphone")=phone
  rs("classid")=idd
  rs("pid")=pid
  rs.update
  rs.close
  set rs=nothing
  response.write"添加平台成功!"
  else
call xlanlj("symbianadd.asp?idd="&idd&"&amp;saytk="&saytk&"&amp;sid="&sid&"")%>
平台名称:<br/><input name="class1" title="名称" emptyok="false"/><br/>
适用机型:<br/><input name="phone" title="机型" emptyok="true"/><br/>
排序:<br/><input name="pid" title="排序" emptyok="false"/><br/>
<%if saytk>1 then
call xltjlj("TP","1")
call xlanlj1("确认提交")
else%>
<anchor>确认提交
    <go href="symbianadd.asp?idd=<%=idd%>&amp;saytk=<%=saytk%>&amp;sid=<%=sid%>" method="post" accept-charset="utf-8">
        <postfield name="class1" value="$(class1)"/>  
        <postfield name="phone" value="$(phone)"/>   
        <postfield name="pid" value="$(pid)"/>   
        <postfield name="TP" value="1"/>  
    </go>
</anchor>
<%end if
end if%>
<br/>----------<br/>
<a href='symbian.asp?idd=<%=idd%>&amp;saytk=<%=saytk%>&amp;sid=<%=sid%>'>[返回平台]</a><br/>
<a href='wjdl.asp?idd=<%=idd%>&amp;saytk=<%=saytk%>&amp;sid=<%=sid%>'>[返回上级]</a><br/>
<a href='wjclass.asp?saytk=<%=saytk%>&amp;sid=<%=sid%>'>[文件大类]</a><br/>
<a href='wjcl.asp?saytk=<%=saytk%>&amp;sid=<%=sid%>'>[文件管理]</a><br/>
<a href="../index.asp?saytk=<%=saytk%>&amp;sid=<%=sid%>">[后台管理]</a>
<%call headsay()%>