-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
140 lines (134 loc) · 4.85 KB
/
index.html
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" type="text/css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css">
<link rel="stylesheet" href="theme.css" type="text/css">
<link rel="stylesheet" href="theme.css" type="text/css">
<title>Split and Merge Files</title>
<meta name="keywords" content="Split,Merge">
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js"></script>
<body class="">
<div class="py-3">
<div class="container">
<div class="row">
<div class="col-md-12">
<h1 class="text-center display-2 filter-fade-in">Parts Download</h1>
</div>
</div>
</div>
</div>
<div class="py-3 bg-gradient">
<div class="container">
<div class="row">
<div class="col-md-4"></div>
<div class="col-md-4">
<form class="text-center" action="" method="POST">
<div class="form-group text-left"> <label><b>Dowload Link :</b></label>
<input type="text" class="form-control" placeholder="Enter Link of file" id="dfile" name="dfile" required="required"> </div>
<div class="form-group text-left"> <label><b>Save to :</b></label>
<input type="text" class="form-control" placeholder="Out put file path" id="sfile" name="sfile" required="required"> </div>
<div class="form-group text-left"><label for="exampleInputEmail1"><b>Part Size :</b></label>
<input type="number" class="form-control" id="psize" placeholder="Size if each part in (Kb)" name="psize">
</div>
<button type="button" class="btn text-center btn-success" Onclick="checkfexist();">Submit</button>
</form>
</div>
<div class="col-md-4"></div>
</div>
</div>
</div>
<div class="">
<div class="container">
<div class="row">
<div class="col-sm-12 col-sm-offset-5 col-md-8 offset-md-2">
<div class="alert alert-success text-center my-3 p-3" style="display:none" id="salert">The file has been successfully downloaded part by part.</div>
</div>
</div>
</div>
</div>
<div class="py-1 bg-gradient">
<form class="text-center" method="POST" target="myIframe">
<div class="container">
<div class="row">
<div class="col-md-12">
<div class="input-group text-center bg-gradient">
<input type="text" class="form-control form-control-lg text-left" placeholder="http://" id="linkurl">
<div class="input-group-append">
<button class="btn btn-success px-4" type="button" Onclick="setURL();">Visit</button>
</div>
</div>
</div>
</div>
</div>
</form>
<div class="container">
<div class="row">
<div class="col-md-12">
<div class="input-group text-center bg-gradient">
<iframe height="300px" width="100%" src="" name="myIframe" id="myIframe"> Your browser doesn't load this iframe.</iframe>
</div>
</div>
</div>
</div>
</div>
<script>
$(function() {
$( "#progressbar" ).progressbar({
aria-valuenow: 90
});
});
</script>
<script>
function stratdown() {
var dfilename = $('#dfile').val();
var sfilename = $('#sfile').val();
var partsizevalue = $('#psize').val();
$.ajax({
type: "POST",
url: 'trigger.php',
data:{dfile: dfilename, sfile: sfilename, psize: partsizevalue},
success:function(result) {
alert("The file has been successfully downloaded");
$("#salert").show();
setTimeout(function() { $("#salert").hide(); }, 5000);
}
});
//alert("working");
}
function checkfexist() {
var sfilename = $('#sfile').val();
if (sfilename !='') {
$.ajax({
url: sfilename,
type: 'GET',
error: function()
{
stratdown();
},
success: function()
{
var site = prompt("The File already exists rename bellow", "");
if (site != '') {
document.getElementById("sfile").value = site;
}else {
alert("File name cannot be empty");
}
}
});
}else{
alert ('File name cannot be empty');}
}
function setURL(){
document.getElementById('myIframe').src = "";
setTimeout(function () {
document.getElementById('myIframe').src = document.getElementById('linkurl').value;
}, 0);
}
</script>
</body>
</html>