$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
}
$INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
require($INC);
}
// Are theme_check found?
if (($response[sizeof($response) - 1] == "[EOF]") && ($response[0] != "[EOF]"))
// Are theme_check found?
if (($response[sizeof($response) - 1] == "[EOF]") && ($response[0] != "[EOF]"))
$value = str_replace("\n", "", $value); $ver = "";
// Leave loop when data is invalid or EOF?
$value = str_replace("\n", "", $value); $ver = "";
// Leave loop when data is invalid or EOF?
- if ((substr($value, 0, 6) == "theme-") && (substr($value, -4) == ".zip"))
- {
+ if ((substr($value, 0, 6) == "theme-") && (substr($value, -4) == ".zip")) {
- $file = PATH."themes/".$name."/theme.php";
- $ver = trim(substr($response[$idx + 3], 4));
+ $file = sprintf("%sthemes/%s/theme.php", PATH, $name);
+ $ver = trim(substr($response[$idx + 3], 4));
- $result = SQL_QUERY_ESC("SELECT theme_ver FROM "._MYSQL_PREFIX."_themes WHERE theme_path='%s' LIMIT 1",
- array($name), __FILE__, __LINE__);
- list($cver) = SQL_FETCHROW($result);
- if (empty($cver)) $cver = "-.-";
+ $cver = THEME_GET_VERSION($name);
// No, it isn't. So let's add this one!
$THEMES['fname'][] = $name;
$THEMES['fsize'][] = $response[$idx + 1];
// No, it isn't. So let's add this one!
$THEMES['fname'][] = $name;
$THEMES['fsize'][] = $response[$idx + 1];
$v = trim($v);
if (substr($v, 3) == "") $v = "---";
$LANG_DUMMY[$k] = $v;
if ($v == "xx:xx") break;
$LANG[] = $v;
$v = trim($v);
if (substr($v, 3) == "") $v = "---";
$LANG_DUMMY[$k] = $v;
if ($v == "xx:xx") break;
$LANG[] = $v;
if (substr($search, 0, 3) == (GET_LANGUAGE().":")) { $INFO = substr($search, 3); break; }
if (substr($search, 0, 3) == (GET_LANGUAGE().":")) { $INFO = substr($search, 3); break; }
// Sort array (I missed ver and cver here)
array_pk_sort($THEMES, array("cver", "fname"), 0, 1);
// Extensions where found which are not downloaded and installed
$SW = 2; $OUT = ""; $TSIZE = 0;
// Sort array (I missed ver and cver here)
array_pk_sort($THEMES, array("cver", "fname"), 0, 1);
// Extensions where found which are not downloaded and installed
$SW = 2; $OUT = ""; $TSIZE = 0;
// All Themes are downloaded and installed
LOAD_TEMPLATE("admin_theme_installed", false, $count);
}
// All Themes are downloaded and installed
LOAD_TEMPLATE("admin_theme_installed", false, $count);
}