-
Notifications
You must be signed in to change notification settings - Fork 7
/
zipit-logs.php
58 lines (41 loc) · 1.3 KB
/
zipit-logs.php
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
<?php
###############################################################
# Zipit Backup Utility
###############################################################
# Developed by Jereme Hancock for Cloud Sites
# Visit http://zipitbackup.com for updates
###############################################################
// include password protection
require_once("zipit-login.php");
// define zipit log file
$zipitlog = "../../../logs/zipit.log";
$logsize = filesize($zipitlog);
// create zipit log file if it doesn't exist
if (!file_exists("$zipitlog")) {
$fp = fopen("$zipitlog","w");
fwrite($fp,"----Zipit Logs----\n\n");
fclose($fp);
}
if ($logsize > 52428800) {
shell_exec("mv ../../../logs/zipit.log ../../../logs/zipit_old.log");
}
?>
<link href="css/style.css" rel="stylesheet" type="text/css">
<div class="logs">
<?php
// include logs class
require_once("lib/class.displaylogs.php");
$lfDispl = new displayLogfile;
// Path/Name of Logfile
$filename = $zipitlog;
?>
<pre style="font-size:12px;">
<?php
$lfDispl->setRowsToRead(10000); // Read 100 rows
$lfDispl->setAlign("bottom"); // Last row on top
$lfDispl->setFilepath($filename); // from this logfile
$lfDispl->setLineBreak(150); // Break the row after 150 chars
$lfDispl->returnFormated(); // Output
?>
</pre>
</div>