This repository was archived by the owner on Apr 13, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathflip.php
More file actions
57 lines (47 loc) · 1.4 KB
/
Copy pathflip.php
File metadata and controls
57 lines (47 loc) · 1.4 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
<?php
/**
*
* @package stckr framework (based on phpBB)
* @version $Id: flip.php
* @copyright (c) 2018 Kenny Cameron
* Developed using the phpBB template engine
*
*/
// Include all the relevant files we need
$root_path = (defined('ROOT_PATH')) ? ROOT_PATH : './';
require_once($root_path . 'inc/start.php');
$Convrtr = new Convrtr();
$template = new Template(); // Needs to be done on every page we are setting up
$template->set_custom_template($root_path . 'theme/html', 'default'); // This is important as it states where the template files are located
include_once($root_path . 'inc/language.php');
$page = "{$root_path}flip.php";
$section = 'Flip Text';
foreach ($_SESSION as $key => $value) {
$_SESSION[$key] = stripslashes($value);
}
$alphabet = range('A','Z');
foreach($alphabet as $key => $letter) {
$template->assign_block_vars('alpha', array(
'ROT' => $key,
'U_LINK' => $letter,
'LINK_LETTER' => $letter,
));
}
// Serve up downloads
if (isset($_GET['download'])) {
header("Content-type: text/plain");
header("Content-Disposition: attachment; filename=Flipped");
header("Content-Description: Convrts Data");
echo $_REQUEST['flip'];
exit;
}
page_header($section);
$template->assign_vars(array(
'ROOT_PATH' => $root_path,
));
// Set up the html file for the page
$template->set_filenames(array(
'body' => 'flip_body.html',
));
// Assign the html file to the display
$template->display('body');