forked from AnimeThemes/animebracket
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmake-static.php
More file actions
27 lines (21 loc) · 765 Bytes
/
Copy pathmake-static.php
File metadata and controls
27 lines (21 loc) · 765 Bytes
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
<?php
require_once('app-config.php');
chdir(CORE_LOCATION);
require_once('config.php');
// Include base libraries
require_once('./lib/aal.php');
$brackets = Api\Bracket::Query(['state' => BS_FINAL]);
while ($bracket = Lib\Db::Fetch($brackets)) {
$perma = $bracket->bracket_perma;
$path = CORE_LOCATION . '/baked/' . $bracket->bracket_perma;
if (!file_exists($path)) {
mkdir($path);
}
Controller\Results::render([$perma]);
file_put_contents($path . '/results.html', Lib\Display::renderToString());
Controller\Characters::render([$perma]);
file_put_contents($path . '/characters.html', Lib\Display::renderToString());
Controller\Stats::render([$perma]);
file_put_contents($path . '/stats.html', Lib\Display::renderToString());
exit;
}