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

<%dim ID,idd,TP
 id=request.querystring("id")
 idd=request.querystring("idd")
 TP=request("TP")
   if id="" or Isnumeric(id)=False then
  Call Error("ID无效！")
  end if
  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 id="&id&" and Classid="&idd,conn,1,2
  if rs.eof then
  Call Error("不存在的记录！")
  end if
  rs("ptname")=class1
  rs("ptphone")=phone
  rs("classid")=idd
  rs("pid")=pid
  rs.update
  rs.close
  set rs=nothing
  response.write"编辑平台成功!"
  else
  set rs=server.createobject("adodb.recordset")
  rs.open" select * from symbian where id="&id&" and Classid="&idd,conn,1,2
  if rs.eof then
    Call Error("不存在的记录！")
  end if
if saytk>1 then%>
平台名称:<br/><input name="class1" title="名称" emptyok="false" value="<%=ubb(rs("ptname"))%>"/><br/>
适用机型:<br/><input name="phone" title="机型" emptyok="true" value="<%=ubb(rs("ptphone"))%>"/><br/>
排序:<br/><input name="pid" title="排序" emptyok="false"  value="<%=ubb(rs("pid"))%>"/><br/>
<%call xltjlj("tp","1")
callxlanlj1("确认提交")
else%>
平台名称:<br/><input name="class1<%=tt%>" title="名称" emptyok="false" value="<%=ubb(rs("ptname"))%>"/><br/>
适用机型:<br/><input name="phone<%=tt%>" title="机型" emptyok="true" value="<%=ubb(rs("ptphone"))%>"/><br/>
排序:<br/><input name="pid<%=tt%>" title="排序" emptyok="false"  value="<%=ubb(rs("pid"))%>"/><br/>
<anchor>确认提交
    <go href="symbianedit.asp?id=<%=id%>&amp;idd=<%=idd%>&amp;saytk=<%=saytk%>&amp;sid=<%=sid%>" method="post" accept-charset="utf-8">
        <postfield name="class1" value="$(class1<%=tt%>)"/>  
        <postfield name="phone" value="$(phone<%=tt%>)"/>   
        <postfield name="pid" value="$(pid<%=tt%>)"/>   
        <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()%>