loadCacheFile("refsystem")) && ($cacheInstance->extensionVersionMatches("sql_patches"))) { // Load referal system from cache global $cacheArray; $cacheArray['ref_system'] = $cacheInstance->getArrayFromCache(); } elseif ((getConfig('cache_refsys') == "Y") && ($CSS != "1") && ($CSS != "-1")) { // Create cache file here $cacheInstance->init("REFSYSTEM"); $cacheInstance->storeExtensionVersion("sql_patches"); // Load all modules and their data $result = SQL_QUERY("SELECT id, userid, level, counter FROM "._MYSQL_PREFIX."_refsystem ORDER BY userid, level", __FILE__, __LINE__); while ($data = SQL_FETCHARRAY($result)) { // Add row to cache file $cacheInstance->addRow($data); } // END - while // Free memory SQL_FREERESULT($result); // Close the cache $cacheInstance->finalize(); // Reload the cache require(__FILE__); } // ?>