-
Notifications
You must be signed in to change notification settings - Fork 2
/
content.php
41 lines (35 loc) · 1.11 KB
/
content.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
<?php
$errorNotifyPath = __DIR__ . '/error_notify.php';
if (file_exists($errorNotifyPath)) {
include($errorNotifyPath);
}
$cupSettingsFile = __DIR__ . '/cup/settings.php';
if (!file_exists($cupSettingsFile)) {
echo showError('Please create the settings files within folder "cup/". Just copy the sample file and remove the suffix ".sample".');
} else {
include($cupSettingsFile);
}
$invalide = array('\\', '/', '/\/', ':', '.');
$getSite = str_replace($invalide, ' ', $getSite);
$_language->readModule('plugin');
$plugin = new plugin_manager();
$plugin->set_debug(DEBUG);
if (!empty($getSite) AND $plugin->is_plugin($getSite)>0) {
$data = $plugin->plugin_data($getSite);
$plugin_path = $data['path'];
$check = $plugin->plugin_check($data, $getSite);
if ($check['status']==1) {
include($check['data']);
} else {
echo $check['data'];
}
} else {
$site_php = $getSite . ".php";
if (file_exists($dir_cup . $site_php)) {
include($dir_cup . $site_php);
} else if (file_exists($site_php)) {
include($site_php);
} else {
include("error.php");
}
}