-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathu.php
More file actions
executable file
·87 lines (77 loc) · 2.77 KB
/
Copy pathu.php
File metadata and controls
executable file
·87 lines (77 loc) · 2.77 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<?php
include_once 'header.php';
?>
<html>
<head>
<?php
include_once 'default_head.php';
?>
</head>
<body>
<?php
include 'menu.php';
?>
<div class="index-content">
<?php
if(!is_logged()){
?>
<h1 class="error-text">Error: You need to be logged in to view this page.</h1>
<?php
}else{
?>
<div class="uploadTitle">
<canvas class="left">
</canvas>
<div class="right">
<h3>Title: </h3>
<input type="text" id="txtTitle" /><br />
<input type="file" accept=".wmv, .mp4, .avi, .h264, .h265, .ogg, video/h264, video/h265, video/ogg, video/mp4" id="fl0" />
<button onclick="doUpload()" id="btnUp">Upload</button><br />
</div>
</div>
<progress min="0" max="100" value="0" style="width: 100%; border-radius: 2px" id="prgUpload"></progress>
<div class="uploadForm">
<h3>Description:</h3><br/>
<textarea type="text" id="txtDesc" rows="50" style="width: 100%; height: 60%; resize: none;"></textarea>
</div>
<?php
}
?>
<script type="text/javascript">
var running = false;
function doUpload(){
if(running){
alert("An upload is already running.");
return;
}
var file = $("#fl0")[0].files[0];
if(file == undefined || file == null){
alert("Please choose a video file");
}
running = true;
startUploadP(file, function(uuid){
//alert("Uploaded: " + uuid);
alert("Upload Complete");
$("#prgUpload").removeAttr("value");
$("#prgUpload").removeAttr("max");
var title = $("#txtTitle").val();
var desc = $("#txtDesc").val();
$.post("ajax/makeVideo.php", {tmp_uuid: uuid, title: title, desc: desc}, function(data){
console.log("Make Video: " + data);
$("#prgUpload").attr("max", "100");
$("#prgUpload").attr("value", "0");
running = false;
alert("Encoding complete.");
})
}, function(perc){
$("#prgUpload").val(perc);
});
}
function search(){
var vl = $("#menu_src").val();
window.location.href = "<?php echo(VDX_HOME); ?>/?qry=" + vl;
}
</script>
</div>
</body>
</html>