# -*- coding: utf-8 -*-
import re
import sys
import System
import clr

sys.path.append(UI.StartupPath+'\Script\Module\dll')
clr.AddReferenceToFile("EasyScript.dll")

from EasyScript import *
zkm = EasyScript()

UI.UpdateLog("※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※")
UI.UpdateLog("※　　　【免空科學研究所　ｔｉｇｅｒｍａｘ．ｄｙｎｄｎｓ．ｏｒｇ】　  ※")
UI.UpdateLog("※　　　～㊣　　　　　　　　　ＺＫＭ　　製作分享　　　　　　　㊣～      ※")
UI.UpdateLog("※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※※")
UI.UpdateLog("【腳本更新】：2013.03.26 panda0305 撰寫",2)
UI.UpdateLog("【上傳空間】：http://wikisend.com",2)
UI.UpdateLog("【上傳大小】：100 MB",2)
UI.UpdateLog("【砍檔時間】：90天",2)
UI.UpdateLog("【腳本功能】：無帳號上傳",2)
UI.UpdateLog("【腳本備註】：分流空上傳",1)
UI.UpdateLog("=========================================",2)
UI.UpdateLog("建立參數並上傳檔案",4)
time=zkm.GetTime()
HTTP.AddUpParam("fileName",UI.FileName)
HTTP.AddUpParam("ffName","")
HTTP.AddUpParam("storageDays","90")
HTTP.AddUpParam("fileDesc","")
HTTP.AddUpParam("t",time)
HTTP.AddFileReference("fileName",UI.FileName)
html=UI.UpFile("http://wikisend.com/upload/_dispatch.php")
if html!=False:
	Link=zkm.GetstrToVariable(html,'fileId: ',',',1)
	#UI.UpdateLog(Link)
	sharelk="http://wikisend.com/download/"+Link
	UI.UpdateLog("檔案連結為"+sharelk)
	UI.AddShareLink(sharelk)
	UI.ProceSuccess()
else:
    UI.UpdateLog("上傳失敗",3)
