// Check if theme is there
if (!THEME_CHECK_EXIST($_POST['theme'])) {
// Import theme
- $file = sprintf("%stheme/%s/theme.php", PATH, SQL_ESCAPE($_POST['theme']));
- if (FILE_READABLE($file)) {
+ $INC = sprintf("theme/%s/theme.php", SQL_ESCAPE($_POST['theme']));
+ if (FILE_READABLE($INC)) {
// Load the theme header file
- require($file);
+ LOAD_INC($INC);
// Register it ith the exchange
SQL_QUERY_ESC("INSERT INTO `{!_MYSQL_PREFIX!}_themes` (`theme_path`, `theme_active`, `theme_ver`, `theme_name`)
$handle = opendir(PATH."theme/") or mxchange_die("Cannot read themes dir!");
while ($dir = readdir($handle)) {
// Construct absolute theme.php file name
- $theme = sprintf("%stheme/%s/theme.php", PATH, $dir);
+ $INC = sprintf("theme/%s/theme.php", $dir);
// Test it...
- if (($dir != ".") && ($dir != "..") && (FILE_READABLE($theme))) {
+ if (($dir != ".") && ($dir != "..") && (FILE_READABLE($INC))) {
// Found a valid directory so let's load it's theme.php file
- require($theme);
+ LOAD_INC($INC);
// Add found theme to array
$THEMES['theme_unix'][] = $dir;