-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathExecutions.php
More file actions
58 lines (54 loc) · 1.89 KB
/
Executions.php
File metadata and controls
58 lines (54 loc) · 1.89 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
<?php
/**
* Created by creatorfromhell.
* Date: 7/6/15
* Time: 2:13 PM
* Version: Beta 2
* An executions file for PHPWAW modified for Trackr.
*/
class Executions extends ExecutionsCore {
public static function unpack($from, $to) {
$archive = new ZipArchive();
$archive->open($from);
$archive->extractTo($to);
$archive->close();
unlink($from);
}
public static function create_configurations() {
$contents = array(
";Trackr Configuration File",
";Do not edit the following values",
"[trackr]",
"version = Beta 2",
";Edit the following values accordingly",
"[main]",
"registration = true",
"email_activation = false",
"theme = Default",
"language = ".$_SESSION['values']['language'],
"dateformat = Y-M-D",
"blacklist =",
"[file]",
";File size in megabytes",
"max_upload = 3",
"upload_directory = resources/uploads",
"backup_directory = resources/backup",
"allowed_types = zip,rar,gzip",
"[email]",
"replyemail = ".$_SESSION['values']['email_reply'],
"[database]",
"db_username = ".$_SESSION['values']['db_username'],
"db_password = ".$_SESSION['values']['db_password'],
"db_host = ".$_SESSION['values']['db_host'],
"db_name = ".$_SESSION['values']['db_name'],
"db_prefix = ".$_SESSION['values']['sql_prefix'],
"[urls]",
"base_url = ".$_SESSION['values']['url_base'],
"installation_path = ".$_SESSION['values']['url_path'],
);
file_put_contents("../resources/config.ini", implode(PHP_EOL, $contents), LOCK_EX);
}
public static function complete() {
header("LOCATION: ../installed.php");
}
}