Repository navigation
Expand file tree
/
Copy pathindex.html
More file actions
61 lines (53 loc) · 2.27 KB
/
Copy pathindex.html
File metadata and controls
61 lines (53 loc) · 2.27 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
<html>
<script type="text/javascript" src="https://code.jquery.com/jquery-2.2.4.min.js"></script>
<script type="text/javascript" src="app.js"></script>
<table>
<form id="form">
<tr><td>Your cPanel URL (<a onclick="alert('The full URL of the page after you log into cPanel. \nShould look like: https://x.com:2083/frontend/x3/index.html')" href="javascript:return;">?</a>): </td><td><input type="text" name="url" placeholder="https://x.com:2083/frontend/x3/index.html"></td></tr>
<tr><td>cPanel username: </td><td><input type="text" name="username"></td></tr>
<tr><td>cPanel password: </td><td><input type="password" name="password"></td></tr>
<tr><td colspan="2"> </td></tr>
<tr><td>FTP Server: </td><td><input type="text" name="ftpserver" placeholder="Leave blank to disable"></td></tr>
<tr><td>FTP Username: </td><td><input type="text" name="ftpusername"></td></tr>
<tr><td>FTP Password: </td><td><input type="text" name="ftppassword"></td></tr>
<tr><td>FTP Port: </td><td><input type="text" name="ftpport" value="21"></td></tr>
<tr><td>FTP Directory: </td><td><input type="text" name="ftpdirectory" value="/"></td></tr>
<textarea style="display:none;" name="code">
<?php
{{header}}
// Do not change below
$url = $domain . "/frontend/" . $theme . "/backup/dofullbackup.html";
$data = array();
if ($ftp) {
$data["dest"] = "ftp";
$data["server"] = $ftp_server;
$data["user"] = $ftp_username;
$data["pass"] = $ftp_password;
$data["port"] = $ftp_port;
$data["rdir"] = $ftp_directory;
}
$options = array(
'http' => array(
'header' => "Content-type: application/x-www-form-urlencoded\r\nAuthorization: Basic $auth\r\n",
'method' => 'POST',
'content' => http_build_query($data)
),
'ssl' => array(
'verify_peer' => false,
'verify_peer_name' => false,
'allow_self_signed' => true
)
);
$context = stream_context_create($options);
$result = file_get_contents($url, false, $context);
if ($result === FALSE) {
exit("Error backing up server.");
}
echo $result;
?>
</textarea></tr>
<tr><td colspan="2" align="center"><a name="submitButton"><input type="button" value="Submit" onclick="process()"></a></td></tr>
</form>
</table>
<p>Result:</p><textarea id="result" cols="100" rows="10" onclick="this.select();">Click submit to generate this code.</textarea>
</html>