123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366 |
-
- Namespace.register("U.Dk.LE");
- U.Dk.LE.OpenFileDirectory = function (fileinfo, userid) {
- var i, _pictureinfo, _extension, _rightClick, _head, _navArea, _uploadel, _navarray;
- var _content;
- var _userid = userid || US.userInfo.userid;
- var _diskinfo = U.Dk.DiskOperatingSwitch(_userid);
-
- if (fileinfo.filetype) {
- U.M.StopBubble();
- _extension = fileinfo["UserDirectoryExtendType"].toLocaleLowerCase();
-
- var _types = US.Disk.ApplicationTypes;
- var _applicationame;
-
- for (i in _types) {
- if (_types[i].types.indexOf(_extension) > -1) {
- _applicationame = i;
- break;
- }
- }
-
- switch (_applicationame) {
- case "music":
-
- if (_diskinfo[4][fileinfo.UserDirectoryParentID].Child) {
-
- U.MPlayer.YYLoad(fileinfo["UserDirectoryParentID"], _diskinfo[1][0]);
- }
- else {
- U.MPlayer.TYY(fileinfo);
- }
- break;
- case "image":
- _pictureinfo = fileinfo["UseFilesServerThumbnailName"] ? [fileinfo] : U.Dk.LE.OIMG(fileinfo);
-
- U.D.Img.Img(fileinfo, _pictureinfo[0], _pictureinfo[1], { "TF": 2 });
- break;
- case "video":
- U.Dk.LE.OV(fileinfo);
- break;
- case "text":
- U.D.DT.YYDK("Txt", fileinfo, _diskinfo);
- break;
- case "usoffice":
- var _type = { "ue": "Excel", "uw": "Word", "txt": "Txt"}[_extension];
- U.D.DT.YYDK(_type, fileinfo, _diskinfo);
- break;
- default:
- U.Dk.LE.OFT(fileinfo.UserFilesServerName, fileinfo.UserallDirectoryName, _userid, fileinfo.UserDirectoryID);
- break;
- }
- }
- else {
- _content = $("#UD_SYWRZ", _diskinfo.pdiv)[0];
- _content.innerText = "";
-
- _diskinfo[1][1] = fileinfo["UserDirectoryID"];
-
- if (_diskinfo[1][1]) {
- U.D.G.UrlWrite(["disk", _diskinfo[1][0].UserName, _diskinfo[1][1]], _diskinfo[1][0].UserNickName + "的网盘");
- }
-
- if (fileinfo.Child) {
- _diskinfo[1][5] = fileinfo.Child;
-
- setTimeout(function () {
- U.Dk.VW.XWPDY(_diskinfo[1][5], _content);
- }, 0);
-
- _rightClick = [U.Dk.RM.WPYJCD, [_content, null, null, null, userid]];
- $(_content).addAttrArray({ "onmouseup": _rightClick, "onmousedown": _rightClick });
-
- _navarray = U.Dk.HP.GetAncestors(fileinfo, _diskinfo);
- U.Dk.LL.SCDXWPDH(_navarray, $("#UD_SYWRYB", _diskinfo.pdiv)[0], userid);
-
- _head = $("#UD_SYWRT", _diskinfo.pdiv)[0];
- _uploadel = $("div", _head);
- U.Dk.UP.SCXWPOP(_uploadel[0], { "DS": true, "ID": "UD_SYWRTS" + (_diskinfo[2] ? "O" : "") }, userid);
- }
-
- else {
- U.Dk.RE.GXWPCKXS(userid, fileinfo, _content);
- }
- }
-
- if (fileinfo.UserDirectoryDeep > 1) {
-
- if (fileinfo.filetype == 0) {
- U.A.Request(US.Auth, ["UpdateDirectoryInfo", UDE.UserDirectoryID, ""], U.M.apply());
- }
- else {
- U.A.Request(US.Auth, ["UpdateFileInfo", UDE.UserDirectoryID, ""], U.M.apply());
- }
- fileinfo["UserDirectoryModifyTime"] = U.MT.toTimeStamp();
- }
- }
- U.Dk.LE.ApplyDns = function (UDID) {
- $("#U_Help").addAttrArray({ style: { display: "block" }, onclick: [[U.Dk.LE.ApplyDns, [UDID]]] });
- }
- U.Dk.LE.ApplyDnsEnd = function (UDID) {
- if (!U.U.L.isLogin(3) && UDID) { U.UI.Confirm("是否申请域名生成站点", [U.Dk.LE.aDnsF, [UDID]]) }
- }
- U.Dk.LE.aDomain = function (userid, UGE) {
- if (!U.U.L.isLogin(3)) {
- var _UDID = UGE[1][1], _UUID = US.userInfo.userid;
- if (UGE[4][_UDID].UserId == _UUID || userid == _UUID) {
- var _UDE = U.Dk.DiskOperatingSwitch(userid);
- (_UDE[1][1]) && (U.UI.Confirm("是否申请域名生成站点", [U.Dk.LE.aDnsF, [_UDE[1][1]]]));
- }
- else { U.Alert("非本人目录无法建立站点"); }
- }
- }
- U.Dk.LE.GetDns = function (UDID, UCB) {
-
-
- }
- U.Dk.LE.aDnsF = function (UDID) {
- var _UDE, _UDTD, _UDMD, _UDSD;
- _UDTD = $$("div", { "className": "UD_Disk_A UC_TF", "onselectstart": "U.M.StopBubble();return true;" });
- $$("div", { "className": "UD_Disk_AT", "innerHTML": "生成网盘域名" }, _UDTD);
- _UDMD = $$("div", { "className": "UD_Disk_AC", "innerHTML": "等待域名生成..." }, _UDTD);
- _UDE = U.UI.Form({ draw: false, max: false, id: "UD_W_T", title: "申请域名", content: _UDTD, style: { width: "400px", height: "200px"} });
- U.Dk.LE.eaDomain(UDID, _UDMD);
- }
- U.Dk.LE.eaDomain = function (UDID, UDOD) {
-
-
- }
- U.Dk.LE.DXWPDYQT = function (UDE, UDOD) {
- var _UAE,
- _UGE = US.Disk.Disks;
- (!_UGE[US.NU]) && (_UGE[US.NU] = [[]]);
- _UGE = _UGE[US.NU][0];
- if (UDE.filetype) {
- U.Dk.LE.OpenFileDirectory(UDE, US.NU);
- }
- else {
- _UAE = _$(_UGE).Select({ "UserDirectoryID": UDE.UserDirectoryID })[0];
- if (_UAE) {
-
- U.Dk.LE.RecordNav([[U.Dk.LE.OpenFileDirectory, [_$(_UGE).Select({ "UserDirectoryParentID": UDE.UserDirectoryID }), _$(_UGE).RecurD(UDE, { "UserDirectoryID": "" }, "UserDirectoryParentID"), US.NU]]]);
- }
- else {
- _UGE.push(UDE);
- U.A.Request(US.CD, [US.DB, "UseStudio_Disk", "GetChildsByDirectoryId", UDE.UserId, UDE.UserDirectoryID, US.NU], U.Dk.LE.AsynDXWPDYQT, ["", UDE, UDOD]);
-
- }
- }
- }
- U.Dk.LE.AsynDXWPDYQT = function (r) {
- var context = r.context,
- _UDE = context[1],
- _UDOD = context[2];
- r = r.value;
- U.Ut.AddObj(r, { "UserId": _UDE.UserId, "UserThumbnailImageHead": _UDE.UserThumbnailImageHead, "UserNickName": _UDE.UserNickName });
- _UDOD.innerText = "";
- US.Disk.Disks[US.NU][0] = US.Disk.Disks[US.NU][0].concat(r);
- U.Dk.LE.DXWPDYQT(_UDE, _UDOD);
- }
- U.Dk.LE.OIMG = function (fileinfo) {
- var _diskinfo = US.Disk.UserDisk;
- var _files = _diskinfo[4][fileinfo.UserDirectoryParentID].Child;
- var _poto = _$(_files).Like({ "UserDirectoryExtendType": US.Disk.ApplicationTypes.image.types.join(",") });
- var _i = _poto.objIndexOf({ "UserDirectoryID": fileinfo.UserDirectoryID });
- return [_poto, _i];
- }
- U.Dk.LE.OV = function (UDE) {
- var _UTP = UDE.UserDirectoryExtendType || UDE.UserFilesExtendName,
- _USN = UDE.UserFilesServerName,
- _UTF = U.M.isPlay(_UTP);
- if (_UTP == "video") { window.open(UDE.UserFilesServerName); }
- else {
- if (_UTF) {
- window.open("/userpages/video.htm?url=" + UDE["UserFilesServerName"]);
- }
- else if (_UTF === 0) {
- U.Alert("该格式无法播放");
- }
- else {
- U.Alert("浏览器版本太低。");
- }
- }
- }
- U.Dk.LE.OFT = function (USN, UN, userid, UFID, UTF) {
- var _UTF = US.userInfo.userid == userid,
- _UMT = USN.split(".")[1],
- _UDOD = event ? event.srcElement : null;
- U.Alert("正在努力的打开中,请稍后"); window.open("/userpages/U_OF.aspx?FildID=" + UFID);
-
- }
- U.Dk.LE.AsynOFT = function (r) {
- var context = r.context,
- _USN = context[1],
- _UN = context[2],
- _userid = context[3],
- _UFID = context[4],
- _UDOD = context[5];
- r = r.value;
- if (r) {
- U.Dk.LE.OFT(_USN, _UN, _userid, _UFID, true);
- }
- else {
- U.Dk.RE.WPXZWJZJO(_UFID, "file");
- }
- }
- U.Dk.LE.USOS = function (UDID, UTH, UFT, UCB, UTF, UPID, UIN) {
- var _UDPD, _UTF,
- _UGE = US.Disk.UserDisk,
- _userid = _UGE[1][2],
- _UYID = US.userInfo.userid,
- _UDE = U.Ut.isString(UDID) ? (_UGE[4][UDID] ? _UGE[4][UDID] : UDID) : UDID;
- UDID = _UDE ? _UDE.UserDirectoryID : UDID;
- if (_UDE.UserFilesID != undefined) { UDID = _UDE.UserFilesID; _UDE.UserFilesServerName = "" }
- if (U.MS.Guid.test(UDID) && _UDE && (_UYID == _userid || _UDE.UserId == _UYID || _UDE.GroupID == _UDE.UserId)) {
- (UIN = UIN || "") && (UIN = UIN.replaceHtmlSign() + (_UDE.filetype ? "." + _UDE.UserDirectoryExtendType : ""));
- if (_userid == _UGE[1][0].UserId) {
- if (_UDE.UsOffice != UTH) {
- parent.U.A.Request(US.Auth, ["SaveFileContent", UDID, UTH, UIN], parent.U.Dk.LE.AsynUSOS, ["", UDID, UTH, _UDE, UIN]);
- U.Alert("数据同步中..");
- }
- }
- else { U.Alert("拒绝访问"); }
- (UCB) && (U.M.apply(this, UCB)());
- }
- else {
- if (!U.Dk.RE.QXWJPD(_UYID, "txt", UPID)) {
- _UGE[1][1] = UPID = (userid == _userid) ? US.DG : US.FG;
- };
- if (UIN) {
- return U.Dk.RE.AF(UFT, UIN, U.M.apply(this, UCB), US.userInfo.userid, true);
- }
- else {
- _UGE = US.Disk.UserDisk;
- _UTF = $(_UGE.pdiv).Parent({ usform: "true" }).style.display == "none";
- _UDPD = U.D.DT.YYDK("Disk", { "userid": _userid, "directoryid": UDID }); UCB = UCB || [];
- (_UTF) && (UCB.push[U.D.CloseWindow, [_UDPD]]);
- U.Dk.RE.CMB("txt", U.M.apply(this, UCB), _UDPD, _userid, true);
- }
- }
- }
- U.Dk.LE.NUSOS = function (UDST, UFT, UGE, UCT, UREQ) {
- var _UFID = UCT[1]["UserDirectoryID"];
- UGE = UGE || window.frames["US_ExcelFrame"].U.Excel.SY;
- U.Dk.LE.USOS(_UFID, UDST); UGE["ID"] = _UFID;
- }
- U.Dk.LE.AsynUSOS = function (r) {
- var _UDE,
- context = r.context,
- _UFID = context[1],
- _UST = context[2],
- _UDE = context[3],
- _USN = context[4];
- r = r.value;
- if (r) {
- _$(_UDE).Change({ "UsOffice": _UST, "": "", "UserDirectoryModifyTime": U.MT.toTimeStamp() });
- (_USN) && (U.Dk.RE.AsynMRN({ value: true, context: ["", _UDE, _USN] })); U.Alert("修改成功..");
- }
- else {
- U.Alert("磁盘空间已满,无法修改内容");
- }
- }
- U.Dk.LE.GM = function (UDE) {
- var i, _UCE,
- _UME = [],
- _UGE = US.Disk.UserDisk;
- (!UDE.UserDirectoryID) && (UDE = _UGE[4][UDE]);
- UDE = [UDE];
- for (i = 0; i < UDE.length; i++) {
- _UCE = _UGE[4][UDE[i].UserDirectoryID].Child;
- _UME.push([UDE[i], _$(_UCE).Select({ "filetype": 0 }), _$(_UCE).Select({ "UserDirectoryExtendType": "mp3" })]);
- }
- return _UME;
- }
|