-
-
Notifications
You must be signed in to change notification settings - Fork 5
/
task.php
35 lines (30 loc) · 820 Bytes
/
task.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
<?php
// part of qEngine
require_once './includes/user_init.php';
if (!$config['enable_module_engine']) {
msg_die($lang['msg']['module_engine_disabled']);
}
$mod_id = get_param('mod');
$popup = get_param('popup');
if (empty($mod_id)) {
$mod_id = post_param('mod');
}
if (empty($popup)) {
$popup = post_param('popup');
}
// is it active/installed?
$row = sql_qquery("SELECT mod_enabled FROM ".$db_prefix."module WHERE mod_id='$mod_id' LIMIT 1");
if (empty($row['mod_enabled'])) {
msg_die(sprintf($lang['msg']['module_engine_error'], $mod_id));
}
// find module
if (!@file_exists('./module/'.$mod_id.'/window.php')) {
die("<!-- module $mod_id is not available as inline -->");
}
// open module
include "./module/$mod_id/main.php";
if ($popup) {
flush_tpl('popup');
} else {
flush_tpl();
}