Compare commits

...

23 Commits

Author SHA1 Message Date
kohgylw@163.com dbb335ca09 update to v1.0.35-release 2020-07-06 17:00:29 +08:00
kohgylw@163.com eaf74ae6c5 update to v1.0.34-release 2020-05-19 09:09:34 +08:00
kohgylw@163.com 2a81d74a51 update to v1.0.33-release 2020-05-18 11:39:00 +08:00
kohgylw@163.com 7e44880f93 update to v1.0.32-release 2020-05-18 08:31:02 +08:00
kohgylw@163.com 79e6f2a434 update to v1.0.32-release 2020-05-18 08:09:41 +08:00
kohgylw@163.com 9d104a2de9 update to v1.0.32-release 2020-05-17 19:45:47 +08:00
kohgylw@163.com 317b6bb50a update to v1.0.31-release 2020-05-15 21:40:45 +08:00
kohgylw@163.com ea59059f33 update to v1.0.31-release 2020-05-15 15:08:37 +08:00
kohgylw@163.com 5c19709a2d update to v1.0.31-release 2020-05-15 11:14:33 +08:00
kohgylw@163.com 00817287c8 update to v1.0.30-release 2020-05-14 11:40:11 +08:00
kohgylw@163.com 077c3150fa update to v1.0.29-release 2020-05-13 17:17:40 +08:00
kohgylw@163.com 4f5d0e377b update to v1.0.29-release 2020-05-12 18:45:30 +08:00
kohgylw@163.com 8b7a235b25 update to v1.0.29-release 2020-05-12 15:36:09 +08:00
kohgylw@163.com 18cfba5249 update to v1.0.29-release 2020-05-12 14:44:50 +08:00
kohgylw@163.com de84f1885c update to v1.0.29-release 2020-05-12 10:45:50 +08:00
kohgylw@163.com cbc838895d update to v1.0.29-release 2020-05-07 17:22:36 +08:00
kohgylw@163.com 2b5d2152e6 update to v1.0.29-release 2020-05-07 15:02:29 +08:00
kohgylw@163.com 54018d6e7b update to v1.0.28-release 2020-02-09 11:07:50 +08:00
kohgylw@163.com ab12390b51 update to v1.0.28-release 2020-02-09 09:23:04 +08:00
kohgylw@163.com 5ba01aaebc update to v1.0.28-release 2020-02-09 09:07:11 +08:00
kohgylw@163.com 23ef3fd95c update to v1.0.28-release 2020-02-08 17:32:41 +08:00
kohgylw@163.com 9c3ab72d57 update to v1.0.28-release 2020-02-08 17:24:26 +08:00
kohgylw@163.com 5a55a2937d update to v1.0.28-release 2020-02-07 17:30:45 +08:00
20 changed files with 1816 additions and 1406 deletions

BIN
.DS_Store vendored

Binary file not shown.

View File

@ -64,8 +64,8 @@ _注kift为该功能的开发名称其实际成果命名为kiftd。_
### 现在您只需抽出3分钟时间就可以立即体验这款专业快捷的网盘服务器了。
* 马上下载本网盘服务器请点击右上方绿色按钮“Clone or Download”之后选择“Download ZIP”进行下载Github,也可以前往国内托管的下载地址: https://gitee.com/kohgylw/kiftd (码云)
* 想要开始使用您应该从阅读《kiftd说明文档》开始这是一份十分全面的官方介绍文档简单易懂且图文并茂相信您能很快学会它。想在线阅读请直接点击上方文件列表中的《kiftd说明文档》来在线预览该操作仅GitHub有效
* 马上下载本网盘服务器请点击右上方绿色按钮“Clone or Download”之后选择“Download ZIP”进行下载Github,也可以前往国内托管的下载地址: https://gitee.com/kohgylw/kiftd (码云)或 https://code.aliyun.com/kohgylw/kiftd/tree/master (阿里云)
* 想要开始使用您应该从阅读《kiftd说明文档》开始这是一份十分全面的官方介绍文档简单易懂且图文并茂相信您能很快学会它。想在线阅读请直接点击上方文件列表中的《kiftd说明文档》来在线预览该操作仅GitHub有效
* 立刻获取源代码请访问本应用代码托管地址https://github.com/KOHGYLW/kiftd-source Github
* 使用中遇到问题?请将您的发现提交到 https://github.com/KOHGYLW/kiftd/issues (Github)
* 需要联系作者?请立即发件至 kohgylw@163.com ,描述您所遇到的任何问题
@ -77,26 +77,11 @@ _注kift为该功能的开发名称其实际成果命名为kiftd。_
> 提示:当您更新版本后,请手动清除浏览器的缓存,之后刷新网盘主页以确保数据文件保持最新!否则可能导致新版页面功能无法使用。
### 新版本v1.0.27
_本次更新加入了很多备受用户期待的、实用性较强的新功能进一步增强kiftd的使用体验。推荐所有用户升级体验。_
+ 最大下载速度限制功能现已加入该功能可以保护您的网络带宽防止因某一访问者将网络带宽全部占满导致其他访问者无法正常访问的情况发生。设置方法可参阅《kiftd说明文档》中的相关介绍。
+ 新增了主页“公告栏”功能——这一功能在之前被很多用户提出过,现已正式加入。该功能可以帮助您将一些重要的信息或提示显示给所有访问者,从而令管理更加便捷。
+ “自由注册新账户”功能可以为新账户设置默认的小组了。
+ “扩展存储区”的最大数量现已提高到255个同时还改进了文件系统的扩展存储区存储机制以便更好地应对大数量、大体积文件存储的需求。
+ 优化文件夹视图加载机制——当需要加载的文件列表数目较多时,系统将会分段加载这些数据从而提高页面的响应速度。
+ 允许您强制关闭服务器的IP地址XFF解析功能从而避免访问者通过伪造XFF请求头的方式伪造自己的IP地址。
+ 允许您根据自身的实际需求和使用环境选择强制禁用服务器的“打包下载”功能。
+ 允许您根据自身的实际需求和使用环境选择强制禁用服务器的“在线解码”功能。
+ 允许您自行替换“在线解码”功能所使用的ffmpeg引擎文件——当kiftd未找到适合您操作系统的ffmpeg引擎时您可以自行提供ffmpeg可执行文件从而确保“在线解码”功能能够正常使用。
+ 为排序功能添加了等待动画效果。当排序量较大且耗时较长时,这能够为用户带来更好的使用体验。
+ 修复了图片预览功能无法正常播放大体积GIF图片的问题。
+ 修复了文件管理功能在导入本地文件夹时可能导致其无法被任何人访问的问题——现在,本地导入的文件夹将与父级文件夹的创建者相同,从而确保其父级文件夹的拥有者能够对新导入的文件夹进行访问及操作。
+ 优化了日志功能中的异常记录机制,增加了对异常堆栈信息的记录,以便开发者和维护人员能够通过日志信息获取到更加详细的异常信息。
+ 修复了“移动”操作在日志记录中“NEW PATH”目标路径项记录不正确的问题。
+ 修复了当文件或文件夹名称中含有特殊字符时可能会出现的一些显示问题。
+ 修复了程序主界面与一些Linux系统的图形界面不兼容的问题。
+ 进一步优化了文件系统,增强其稳定性和安全性。
+ 完善了《kiftd说明文档》新增了关于“设置页面背景图片”和“备份文件系统数据”的相关介绍。
### 常规更新v1.0.35
_本次更新为维护性的更新修复一些已经发现的问题并优化使用体验推荐所有用户升级。_
+ 修复了当用户执行批量上传操作时,中途切换所在的文件夹可能会导致上传路径发生改变的问题。
+ 升级了内置的MySQL数据库驱动的版本。
> 需要查看更多版本历史信息?请访问: https://kohgylw.gitee.io/News.html

BIN
filesystem/.DS_Store vendored

Binary file not shown.

Binary file not shown.

BIN
kiftd-1.0.35-RELEASE.jar Normal file

Binary file not shown.

Binary file not shown.

View File

@ -74,4 +74,15 @@
#{folderId,jdbcType=VARCHAR}
</update>
<update id="update" parameterType="kohgylw.kiftd.server.model.Folder">
UPDATE FOLDER SET folder_name
=
#{folderName,jdbcType=VARCHAR},folder_creation_date =
#{folderCreationDate,jdbcType=VARCHAR},folder_creator =
#{folderCreator,jdbcType=VARCHAR},folder_parent =
#{folderParent,jdbcType=VARCHAR},folder_constraint =
#{folderConstraint,jdbcType=INTEGER} WHERE folder_id =
#{folderId,jdbcType=VARCHAR}
</update>
</mapper>

View File

@ -73,7 +73,14 @@
<select id="queryByPath" parameterType="java.lang.String"
resultMap="BaseResultMap">
SELECT * FROM FILE WHERE file_path =
#{path,jdbcType=VARCHAR}
#{path,jdbcType=VARCHAR} LIMIT 0,2147483647
</select>
<select id="queryByPathExcludeById" parameterType="java.util.Map"
resultMap="BaseResultMap">
SELECT * FROM FILE WHERE file_path =
#{path,jdbcType=VARCHAR} AND file_id &lt;&gt;
#{fileId,jdbcType=VARCHAR} LIMIT 0,2147483647
</select>
<select id="queryBySomeFolder" parameterType="java.lang.String"
@ -84,10 +91,4 @@
#{fileId,jdbcType=VARCHAR}) LIMIT 0,2147483647
</select>
<update id="moveById" parameterType="java.util.Map">
UPDATE FILE SET
file_parent_folder = #{locationpath,jdbcType=VARCHAR} WHERE file_id =
#{fileId,jdbcType=VARCHAR}
</update>
</mapper>

File diff suppressed because one or more lines are too long

View File

@ -1,5 +1,5 @@
<!doctype html>
<!-- 青阳网络文件传输系统 kiftd v1.0.27-RELEASE -->
<!-- 青阳网络文件传输系统 kiftd v1.0.35-RELEASE -->
<!-- 欢迎访问主界面 -->
<!-- by 青阳龙野kohgylw@163.com -->
<html>
@ -101,23 +101,34 @@
class="glyphicon glyphicon-cog"></span> 操作 <span
class="caret"></span></a>
<ul class="dropdown-menu" id="fileListDropDown">
<li id="uploadFileButtonLi"><a>上传文件 <span
class="pull-right"><span
<li id="uploadFileButtonLi"><a
href="javascript:void(0);">上传文件 <span class="pull-right"><span
class="glyphicon glyphicon-arrow-up" aria-hidden="true"></span>+U</span></a></li>
<li id="uploadFolderButtonLi"><a>上传文件夹 <span
<li id="uploadFolderButtonLi"><a
href="javascript:void(0);">上传文件夹 <span
class="pull-right"><span
class="glyphicon glyphicon-arrow-up" aria-hidden="true"></span>+F</span></a></li>
<li role="separator" class="divider"></li>
<li id="createFolderButtonLi"><a>新建文件夹 <span
<li id="createFolderButtonLi"><a
href="javascript:void(0);">新建文件夹 <span
class="pull-right"><span
class="glyphicon glyphicon-arrow-up" aria-hidden="true"></span>+N</span></a></li>
<li role="separator" class="divider"></li>
<li id="cutFileButtonLi"><a><span id='cutSignTx'>剪切
<span class="pull-right"><span
<li id="copyFileButtonLi"><a href="javascript:void(0);"><span
id='copySignTx'>复制 <span class="pull-right"><span
class="glyphicon glyphicon-arrow-up" aria-hidden="true"></span>+C</span>
</span></a></li>
<li id="deleteSeelectFileButtonLi"><a>删除 <span
class="pull-right"><span
<li id="cutFileButtonLi"><a href="javascript:void(0);"><span
id='cutSignTx'>剪切 <span class="pull-right"><span
class="glyphicon glyphicon-arrow-up" aria-hidden="true"></span>+X</span>
</span></a></li>
<li id="stickFileButtonLi" class="hidden"><a
href="javascript:void(0);"><span id='stickSignTx'>粘贴<span
id="stickFilesCount"></span> <span class="pull-right"><span
class="glyphicon glyphicon-arrow-up" aria-hidden="true"></span>+V</span>
</span></a></li>
<li id="deleteSeelectFileButtonLi"><a
href="javascript:void(0);">删除 <span class="pull-right"><span
class="glyphicon glyphicon-arrow-up" aria-hidden="true"></span>+D</span></a></li>
</ul></li>
</ul>
@ -284,7 +295,8 @@
<h5 id="deleteFolderMessage"></h5>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
<button id="cancelDeleteFolderBtn" type="button"
class="btn btn-default" data-dismiss="modal">取消</button>
<span id="deleteFolderBox"></span>
</div>
</div>
@ -443,7 +455,8 @@
</div>
</div>
<input type="file" id="importfolder" style="display: none;"
onchange="getInputImport()" multiple="multiple" webkitdirectory>
onchange="getInputImport()" multiple="multiple"
webkitdirectory="true">
<h5>
上传进度:<span id="importcount"></span>
</h5>
@ -535,7 +548,8 @@
<h5 id="deleteFileMessage" class="wordbreak"></h5>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
<button id="cancelDeleteFileBox" type="button"
class="btn btn-default" data-dismiss="modal">取消</button>
<span id="deleteFileBox"></span>
</div>
</div>
@ -599,7 +613,8 @@
</h5>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
<button id="cancelDownloadAllCheckedBtn" type="button"
class="btn btn-default" data-dismiss="modal">取消</button>
<span id="downloadAllCheckedBox"></span>
</div>
</div>
@ -688,7 +703,8 @@
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
<button id="cancelMoveFilesBtn" type="button"
class="btn btn-default" data-dismiss="modal">取消</button>
<span id="moveFilesBox"></span>
</div>
</div>

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

View File

@ -52,6 +52,7 @@ function dologin() {
$("#accountpwdbox").removeClass("has-error");
}
if (check == "y") {
startLogin();
$.ajax({
type : "POST",
dataType : "text",
@ -67,9 +68,7 @@ function dologin() {
sendLoginInfo(encrypted);
},
error : function() {
$("#alertbox").addClass("alert");
$("#alertbox").addClass("alert-danger");
$("#alertbox").text("提示:登录请求失败,请检查网络或服务器运行状态");
showAlert("提示:登录请求失败,请检查网络或服务器运行状态");
}
});
}
@ -93,6 +92,7 @@ function sendLoginInfo(encrypted) {
$("#vercodebox").addClass("hidden");
switch (result) {
case "permitlogin":
finishLogin();
$("#accountidbox").removeClass("has-error");
$("#accountpwdbox").removeClass("has-error");
window.location.href = "/home.html";
@ -100,38 +100,29 @@ function sendLoginInfo(encrypted) {
case "accountnotfound":
$("#accountidbox").addClass("has-error");
$("#accountpwdbox").removeClass("has-error");
$("#alertbox").addClass("alert");
$("#alertbox").addClass("alert-danger");
$("#alertbox").text("提示:登录失败,账户不存在或未设置");
showAlert("提示:登录失败,账户不存在或未设置");
break;
case "accountpwderror":
$("#accountpwdbox").addClass("has-error");
$("#accountidbox").removeClass("has-error");
$("#alertbox").addClass("alert");
$("#alertbox").addClass("alert-danger");
$("#alertbox").text("提示:登录失败,密码错误或未设置");
showAlert("提示:登录失败,密码错误或未设置");
break;
case "needsubmitvercode":
finishLogin();
$("#vercodebox").html("<label id='vercodetitle' class='col-sm-6'><img id='showvercode' class='vercodeimg' alt='点击获取验证码' src='homeController/getNewVerCode.do?s="+(new Date()).getTime()+"' onclick='getNewVerCode()'></label><div class='col-sm-6'><input type='text' class='form-control' id='vercode' placeholder='验证码……'></div>");
$("#vercodebox").removeClass("hidden");
$("#vercodebox").addClass("show");
break;
case "error":
$("#alertbox").addClass("alert");
$("#alertbox").addClass("alert-danger");
$("#alertbox").text("提示:登录失败,登录请求无法通过效验(可能是请求耗时过长导致的)");
showAlert("提示:登录失败,登录请求无法通过效验(可能是请求耗时过长导致的)");
break;
default:
$("#alertbox").addClass("alert");
$("#alertbox").addClass("alert-danger");
$("#alertbox").text("提示:无法登录,未知错误");
showAlert("提示:无法登录,未知错误");
break;
}
},
error : function() {
$("#alertbox").addClass("alert");
$("#alertbox").addClass("alert-danger");
$("#alertbox").text("提示:登录请求失败,请检查网络或服务器运行状态");
showAlert("提示:登录请求失败,请检查网络或服务器运行状态");
}
});
}
@ -139,4 +130,27 @@ function sendLoginInfo(encrypted) {
//获取一个新的验证码
function getNewVerCode(){
$("#showvercode").attr("src","homeController/getNewVerCode.do?s="+(new Date()).getTime());
}
function showAlert(text){
finishLogin();
$("#alertbox").addClass("alert");
$("#alertbox").addClass("alert-danger");
$("#alertbox").text(text);
}
function startLogin(){
$("#loginBtn").attr('disabled','disabled');
$("#accountid").attr('disabled','disabled');
$("#accountpwd").attr('disabled','disabled');
$("#vercode").attr('disabled','disabled');
$("#loginBtn").val('正在登录...');
}
function finishLogin(){
$("#loginBtn").removeAttr('disabled');
$("#accountid").removeAttr('disabled');
$("#accountpwd").removeAttr('disabled');
$("#vercode").removeAttr('disabled');
$("#loginBtn").val('登录');
}

View File

@ -108,7 +108,7 @@ function sendSignUpInfo(encrypted){
$("#accountidbox").addClass("has-error");
break;
case "illegalaccount":
showAlert("提示:注册失败,账户名中不得包含“=”或“:”。");
showAlert("提示:注册失败,账户名中不得包含“=”或“:”,且首个字符不能为“#”。");
$("#accountidbox").addClass("has-error");
break;
case "mustlogout":

File diff suppressed because one or more lines are too long

View File

@ -67,24 +67,26 @@ See https://github.com/adobe-type-tools/cmap-resources
filter: progid:DXImageTransform.Microsoft.Alpha(opacity=70);
}
@-webkit-keyframes zoom {
from {
-webkit-transform:scale(0)
}
to {
-webkit-transform: scale(1)
}
@
-webkit-keyframes zoom {from { -webkit-transform:scale(0)
}
@keyframes zoom {
from {
transform:scale(0)
}
to {
transform: scale(1)
}
to {
-webkit-transform: scale(1)
}
}
@
keyframes zoom {from { transform:scale(0)
}
to {
transform: scale(1)
}
}
.pdf-modal-body {
font-size: 18px;
box-sizing: border-box;
@ -540,24 +542,29 @@ See https://github.com/adobe-type-tools/cmap-resources
//增加了加载需要耗时转换的文档时的加载提示
window.onload = function() {
var url = location.search;
if (url.indexOf(".block") < 0) {
if (url.indexOf("getResource") < 0) {
var modal = document.getElementById('pdf-modal');
if (url.indexOf("getWordView") >= 0) {
document.getElementById('doc-type-box').innerHTML="Word";
}else if(url.indexOf("getTxtView") >= 0){
document.getElementById('doc-type-box').innerHTML="TXT";
}else if(url.indexOf("getPPTView") >= 0){
document.getElementById('doc-type-box').innerHTML="PPT";
}else{
document.getElementById('doc-type-box').innerHTML="未知类型";
document.getElementById('doc-type-box').innerHTML = "Word";
} else if (url.indexOf("getTxtView") >= 0) {
document.getElementById('doc-type-box').innerHTML = "TXT";
} else if (url.indexOf("getPPTView") >= 0) {
document.getElementById('doc-type-box').innerHTML = "PPT";
} else {
document.getElementById('doc-type-box').innerHTML = "未知类型";
}
modal.style.display = "block";
var interval = setInterval(function() {
if (PDFViewerApplication.pdfDocument != null) {
clearInterval(interval);
modal.style.display = "none";
}
}, 1);
var interval = setInterval(
function() {
if (PDFViewerApplication.pdfDocument != null
|| PDFViewerApplication.appConfig.errorWrapper.container.hidden == false) {
clearInterval(interval);
modal.style.display = "none";
if (PDFViewerApplication.appConfig.errorWrapper.container.hidden == false) {
alert("提示:打开目标文档时发生意外错误(刷新页面将再次尝试打开该文档)。");
}
}
}, 1);
}
}
</script>

View File

@ -5,10 +5,10 @@ var tReq;
var tTimer;
var pingInt;
$(function() {
window.onresize = function(){
window.onresize = function() {
showCloseBtn();
}
pingInt = setInterval("ping()",60000);
}
pingInt = setInterval("ping()", 60000);
var fileId = getFileId();
$
.ajax({
@ -21,7 +21,7 @@ $(function() {
success : function(result) {
if (result != "ERROR") {
f = eval("(" + result + ")");
$("#vname").text(f.fileName.replace('\'','&#39;').replace('<','&lt;').replace('>','&gt;'));
$("#vname").text(f.fileName);
$("#vcreator").text(f.fileCreator);
$("#vcdate").text(f.fileCreationDate);
$("#vsize").text(f.fileSize);
@ -59,9 +59,9 @@ function playVideo() {
$("#playerbox")
.html(
"<video id='kiftplayer' class='video-js col-md-12' controls preload='auto' height='500'>"
+ "<source src='resourceController/getResource.do?fid="
+ "<source src='resourceController/getResource/"
+ f.fileId + "' type='video/mp4'></video>");
var player = videojs('kiftplayer',{
var player = videojs('kiftplayer', {
preload : 'auto'
});
player.ready(function() {
@ -71,10 +71,10 @@ function playVideo() {
// 关闭当前窗口并释放播放器
function reMainPage() {
if(tReq != null){
if (tReq != null) {
tReq.abort()
}
if(tTimer != null){
if (tTimer != null) {
window.clearTimeout(tTimer);
}
window.opener = null;
@ -84,7 +84,7 @@ function reMainPage() {
// 进行转码请求并监听进度状态(轮询)
function doTranscode() {
tReq=$.ajax({
tReq = $.ajax({
url : 'resourceController/getVideoTranscodeStatus.ajax',
type : 'POST',
dataType : 'text',
@ -99,7 +99,7 @@ function doTranscode() {
reMainPage();
} else {
$("#transcodeProgress").text(result);
tTimer=setTimeout('doTranscode()', 500);// 每隔1秒询问一次进度
tTimer = setTimeout('doTranscode()', 500);// 每隔1秒询问一次进度
}
},
error : function() {
@ -109,28 +109,28 @@ function doTranscode() {
});
}
function showCloseBtn(){
function showCloseBtn() {
var win = $(window).width();
if(win < 450){
$("#closeBtn").addClass("hidden");
}else{
$("#closeBtn").removeClass("hidden");
}
if (win < 450) {
$("#closeBtn").addClass("hidden");
} else {
$("#closeBtn").removeClass("hidden");
}
}
//防止播放视频时会话超时的应答器,每分钟应答一次
function ping(){
// 防止播放视频时会话超时的应答器,每分钟应答一次
function ping() {
$.ajax({
url:"homeController/ping.ajax",
type:"POST",
dataType:"text",
data:{},
success:function(result){
if(result != 'pong'){
url : "homeController/ping.ajax",
type : "POST",
dataType : "text",
data : {},
success : function(result) {
if (result != 'pong') {
window.clearInterval(pingInt);
}
},
error:function(){
error : function() {
window.clearInterval(pingInt);
}
});

View File

@ -1 +1 @@
function getFileId(){var b,a=location.search;return-1!=a.indexOf("?")?(b=a.substr(1),strs=b.split("="),strs[1]):""}function playVideo(){$("#playerbox").html("<video id='kiftplayer' class='video-js col-md-12' controls preload='auto' height='500'><source src='resourceController/getResource.do?fid="+f.fileId+"' type='video/mp4'></video>");var a=videojs("kiftplayer",{preload:"auto"});a.ready(function(){this.play()})}function reMainPage(){null!=tReq&&tReq.abort(),null!=tTimer&&window.clearTimeout(tTimer),window.opener=null,window.open("","_self"),window.close()}function doTranscode(){tReq=$.ajax({url:"resourceController/getVideoTranscodeStatus.ajax",type:"POST",dataType:"text",data:{fileId:f.fileId},success:function(a){"FIN"==a?playVideo():"ERROR"==a?(alert("错误:请求失败,请刷新重试。"),reMainPage()):($("#transcodeProgress").text(a),tTimer=setTimeout("doTranscode()",500))},error:function(){alert("错误:请求失败,请刷新重试。"),reMainPage()}})}function showCloseBtn(){var a=$(window).width();450>a?$("#closeBtn").addClass("hidden"):$("#closeBtn").removeClass("hidden")}function ping(){$.ajax({url:"homeController/ping.ajax",type:"POST",dataType:"text",data:{},success:function(a){"pong"!=a&&window.clearInterval(pingInt)},error:function(){window.clearInterval(pingInt)}})}var tReq,tTimer,pingInt;$(function(){window.onresize=function(){showCloseBtn()},pingInt=setInterval("ping()",6e4);var fileId=getFileId();$.ajax({url:"homeController/playVideo.ajax",type:"POST",dataType:"text",data:{fileId:fileId},success:function(result){"ERROR"!=result?(f=eval("("+result+")"),$("#vname").text(f.fileName.replace("'","&#39;").replace("<","&lt;").replace(">","&gt;")),$("#vcreator").text(f.fileCreator),$("#vcdate").text(f.fileCreationDate),$("#vsize").text(f.fileSize),"N"==f.needEncode?playVideo():($("#playerMassage").html("<h2>播放器正在努力解码中...</h2><h3>已完成:<span id='transcodeProgress'>0</span>%</h3><p class='text-muted'>提示:该视频需解码后播放,请耐心等待!</p>"),doTranscode())):(alert("错误:无法定位要预览的文件或该操作未被授权。"),reMainPage())},error:function(){alert("错误:请求失败,请刷新重试。"),reMainPage()}})});
function getFileId(){var b,a=location.search;return-1!=a.indexOf("?")?(b=a.substr(1),strs=b.split("="),strs[1]):""}function playVideo(){$("#playerbox").html("<video id='kiftplayer' class='video-js col-md-12' controls preload='auto' height='500'><source src='resourceController/getResource/"+f.fileId+"' type='video/mp4'></video>");var a=videojs("kiftplayer",{preload:"auto"});a.ready(function(){this.play()})}function reMainPage(){null!=tReq&&tReq.abort(),null!=tTimer&&window.clearTimeout(tTimer),window.opener=null,window.open("","_self"),window.close()}function doTranscode(){tReq=$.ajax({url:"resourceController/getVideoTranscodeStatus.ajax",type:"POST",dataType:"text",data:{fileId:f.fileId},success:function(a){"FIN"==a?playVideo():"ERROR"==a?(alert("错误:请求失败,请刷新重试。"),reMainPage()):($("#transcodeProgress").text(a),tTimer=setTimeout("doTranscode()",500))},error:function(){alert("错误:请求失败,请刷新重试。"),reMainPage()}})}function showCloseBtn(){var a=$(window).width();450>a?$("#closeBtn").addClass("hidden"):$("#closeBtn").removeClass("hidden")}function ping(){$.ajax({url:"homeController/ping.ajax",type:"POST",dataType:"text",data:{},success:function(a){"pong"!=a&&window.clearInterval(pingInt)},error:function(){window.clearInterval(pingInt)}})}var tReq,tTimer,pingInt;$(function(){window.onresize=function(){showCloseBtn()},pingInt=setInterval("ping()",6e4);var fileId=getFileId();$.ajax({url:"homeController/playVideo.ajax",type:"POST",dataType:"text",data:{fileId:fileId},success:function(result){"ERROR"!=result?(f=eval("("+result+")"),$("#vname").text(f.fileName),$("#vcreator").text(f.fileCreator),$("#vcdate").text(f.fileCreationDate),$("#vsize").text(f.fileSize),"N"==f.needEncode?playVideo():($("#playerMassage").html("<h2>播放器正在努力解码中...</h2><h3>已完成:<span id='transcodeProgress'>0</span>%</h3><p class='text-muted'>提示:该视频需解码后播放,请耐心等待!</p>"),doTranscode())):(alert("错误:无法定位要预览的文件或该操作未被授权。"),reMainPage())},error:function(){alert("错误:请求失败,请刷新重试。"),reMainPage()}})});

View File

@ -7,7 +7,7 @@ Copyright © 2018-2020 青阳龙野 <kohgylw@163.com>
2任何组织或个人均能够自由复制、分发或修改kiftd发行版及其源代码并将其用于任何用途。修改后的作品版权由修改者自身享有。
3kiftd的作者无需为使用该软件及其源代码所造成的任何直接或间接后果承担责任。
4kiftd的作者对kiftd中的全部java源代码、页面文件、js及css文件、jar程序、mybatisResource文件夹内的资源、README.md文件以及随发行版程序附带的原版《kiftd说明文档》享有版权并作为kiftd软件的版权人。
5kiftd软件中涉及的所有第三方软件、工具、图片、插件及其代码其权利由该资源之作者享有并授予kiftd使用许可。任何单位和个人认为kiftd包含的上述内容可能涉嫌侵犯其合法权益时应及时向kiftd作者进行书面反馈并提供其身份证明、权属证明及详细侵权情况的说明kiftd将会立即移除被控侵权的内容。
5kiftd软件中涉及的所有第三方软件、工具、图片、插件及其代码其权利由该作品的权利人享有并授予kiftd使用许可。任何单位和个人认为kiftd包含的上述内容可能涉嫌侵犯其合法权益时应及时向kiftd作者进行书面反馈并提供其身份证明、权属证明及详细侵权情况的说明kiftd将会立即移除被控侵权的内容。
版权人信息:
地址河北省唐山市路北区兴源里玫瑰庄园6单元602号