17: Cleanup partial

This commit is contained in:
Ulrich Block 2013-10-03 16:53:06 +02:00
parent 2355ef0da8
commit 6efb8c3378
4 changed files with 20 additions and 12 deletions

View File

@ -38,13 +38,16 @@
$main = 1;
define('EASYWIDIR', dirname(__FILE__));
if (is_dir(EASYWIDIR . '/install')) die('Please remove the "install" folder');
if (is_dir(EASYWIDIR . '/install')) {
die('Please remove the "install" folder');
}
include(EASYWIDIR . '/stuff/vorlage.php');
include(EASYWIDIR . '/stuff/class_validator.php');
include(EASYWIDIR . '/stuff/functions.php');
include(EASYWIDIR . '/stuff/settings.php');
include(EASYWIDIR . '/stuff/init_admin.php');
include(EASYWIDIR . '/stuff/adminhome.php');
if ($ui->smallletters('w', 255, 'get') and isset($what_to_be_included_array[$ui->smallletters('w', 255, 'get')]) and is_file((EASYWIDIR . '/stuff/' . $what_to_be_included_array[$ui->smallletters('w', 255, 'get')]))) {
include(EASYWIDIR . '/stuff/' . $what_to_be_included_array[$ui->smallletters('w', 255, 'get')]);
unset($dbConnect);
@ -52,7 +55,7 @@ if ($ui->smallletters('w', 255, 'get') and isset($what_to_be_included_array[$ui-
unset($dbConnect);
$template_file = 'admin_home.tpl';
}
include(IncludeTemplate($template_to_use,'admin_header.tpl'));
include(IncludeTemplate($template_to_use,(isset($template_file) and preg_match('/^(.*)\.[\w]{1,}$/',$template_file)) ? $template_file : 'general.tpl'));
include(IncludeTemplate($template_to_use,'admin_footer.tpl'));
include(IncludeTemplate($template_to_use, 'admin_header.tpl'));
include(IncludeTemplate($template_to_use, (isset($template_file) and preg_match('/^(.*)\.[\w]{1,}$/',$template_file)) ? $template_file : 'general.tpl'));
include(IncludeTemplate($template_to_use, 'admin_footer.tpl'));
$sql=null;

View File

@ -1,4 +1,5 @@
<?php
/**
* File: mysql_functions.php.
* Author: Ulrich Block

View File

@ -1,4 +1,5 @@
<?php
/**
* File: switch.php.
* Author: Ulrich Block
@ -63,7 +64,7 @@ if ($ui->id('id', 19, 'get')) {
$accounttype = $row['accounttype'];
}
$sql=null;
if ($reseller_id != 0 and $resellerid != $reseller_id) {
if (!isset($resellerid) or ($reseller_id != 0 and $resellerid != $reseller_id)) {
header('Location: login.php');
die('Please allow redirection');
}

View File

@ -1,4 +1,5 @@
<?php
/**
* File: userpanel.php.
* Author: Ulrich Block
@ -37,7 +38,9 @@
$main = 1;
define('EASYWIDIR', dirname(__FILE__));
if (is_dir(EASYWIDIR . '/install')) die('Please remove the "install" folder');
if (is_dir(EASYWIDIR . '/install')) {
die('Please remove the "install" folder');
}
include(EASYWIDIR . '/stuff/functions.php');
include(EASYWIDIR . '/stuff/class_validator.php');
include(EASYWIDIR . '/stuff/vorlage.php');
@ -49,13 +52,13 @@ if (isset($what_to_be_included_array[$w])) {
unset($dbConnect);
} else {
unset($dbConnect);
$template_file = "userpanel_home.tpl";
$template_file = 'userpanel_home.tpl';
}
include(IncludeTemplate($template_to_use,'userpanel_header.tpl'));
if (isset($template_file) and preg_match('/^(.*)\.tpl$/',$template_file)) {
include(IncludeTemplate($template_to_use,$template_file));
include(IncludeTemplate($template_to_use, 'userpanel_header.tpl'));
if (isset($template_file) and preg_match('/^(.*)\.tpl$/', $template_file)) {
include(IncludeTemplate($template_to_use, $template_file));
} else {
include(IncludeTemplate($template_to_use,'general.tpl'));
include(IncludeTemplate($template_to_use, 'general.tpl'));
}
include(IncludeTemplate($template_to_use,'userpanel_footer.tpl'));
include(IncludeTemplate($template_to_use, 'userpanel_footer.tpl'));
$sql=null;