-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathwrapper.php
53 lines (40 loc) · 1.08 KB
/
wrapper.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
<?php
/*
* Wrapper - an e107 plugin by Tijn Kuyper
*
* Copyright (C) 2016-2022 Tijn Kuyper (http://www.tijnkuyper.nl)
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
*/
if (!defined('e107_INIT'))
{
require_once("../../class2.php");
}
// Make this page inaccessible when plugin is not installed.
if(!e107::isInstalled('wrapper'))
{
e107::redirect();
exit;
}
// Load required files and set initial variables
e107::lan('wrapper', false, true);
require_once(e_PLUGIN."wrapper/wrapper_class.php");
$caption = '';
$id = '';
$wrap_pass = '';
// Retrieve query and check for wrap_pass
list($id, $wrap_pass) = explode('&wrap_pass=', e_QUERY, 2);
// Secure user input
$id = (int) $id;
// Initiate the wrapper class;
$wrapper = new Wrapper($id);
// Set caption
$caption = $wrapper->getCaption($id);
define('e_PAGETITLE', $caption);
// Render the page
require_once(HEADERF);
$text = $wrapper->showWrapper($id, $wrap_pass);
$ns->tablerender($caption, e107::getMessage()->render().$text);
require_once(FOOTERF);
exit;