- $theme = PATH."theme/".$dir."/"."theme.php";
-
- // Test it...
- $result = SQL_QUERY_ESC("SELECT id FROM "._MYSQL_PREFIX."_themes WHERE theme_path='%s' AND theme_active='Y' LIMIT 1",
- array($dir), __FILE__, __LINE__);
-
- if (($dir != ".") && ($dir != "..") && (file_exists($theme)) && (is_readable($theme)) && (SQL_NUMROWS($result) == 1))
- {
- // Free memory
- SQL_FREERESULT($result);