%@ LANGUAGE="VBSCRIPT" CODEPAGE="65001"%> <% Option Explicit %> <% On Error Resume Next %> <% Response.Charset="UTF-8" %> <% Call System_Initialize() '检查非法链接 Call CheckReference("") '检查权限 If BlogUser.Level>1 Then Call ShowError(6) If CheckPluginState("AppCentre")=False Then Call ShowError(48) Call AppCentre_InitConfig BlogTitle="应用中心-上传应用到官方网站" Dim ZipPathDir,ZipPathFile,PackFile,ShortDir,ID,s,t ID=Request.QueryString("id") ID=Request.QueryString("id") If Request.Form.Count=0 Then Dim objPing Set objPing = Server.CreateObject("MSXML2.ServerXMLHTTP") objPing.open "GET", APPCENTRE_SUBMITBEFORE_URL & Server.URLEncode(id),False objPing.send "" If objPing.ReadyState=4 Then If objPing.Status=200 Then s=objPing.responseText End If End If Set objPing = Nothing If Request.QueryString("type")="plugin" Then Call LoadPluginXmlInfo(ID) Else Call LoadThemeXmlInfo(ID) Else If Request.QueryString("type")="plugin" Then PackFile=MD5(ZC_BLOG_CLSID & ID) & ".zba" ZipPathDir = BlogPath & "zb_users\plugin\" & ID & "\" ZipPathFile = BlogPath & "zb_users\cache\" & PackFile ShortDir = ID & "\" Call CreatePluginXml(ZipPathFile) Call LoadAppFiles(ZipPathDir,ZipPathFile,ShortDir) End If If Request.QueryString("type")="theme" Then PackFile=MD5(ZC_BLOG_CLSID & ID) & ".zba" ZipPathDir = BlogPath & "zb_users\theme\" & ID & "\" ZipPathFile = BlogPath & "zb_users\cache\" & PackFile ShortDir = ID & "\" Call CreateThemeXml(ZipPathFile) Call LoadAppFiles(ZipPathDir,ZipPathFile,ShortDir) End If Dim objXmlHttp Set objXmlHttp=New Upload2Server objXmlHttp.AddFile "upload",PackFile,"application/zblogapp",ZipPathFile objXmlHttp.strCookies="username="&vbsescape(login_un)&"; password="&vbsescape(login_pw) Response.Write objXmlHttp.Post(APPCENTRE_SUBMIT_URL&Request.Form("zblog_app_id")) Response.End Set objXmlHttp = Nothing Call DelToFile(ZipPathFile) End If %>