// // http://www.apache.org/licenses/LICENSE-2.0 // // Unless required by applicable law or agreed to in writing, software // distributed under the License is distributed on an "AS IS" BASIS, // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. // See the License for the specific language governing permissions and // limitations under the License. require_once 'includes/functions.php'; if ($_REQUEST['r'] == 'btl') { build_all_toplists(); return; } // Recompile templates on first access if (!isset($C['base_url'])) { recompile_templates(); } headers_no_cache(); prepare_request(); if (file_exists('reset-access.php') || file_exists('../auto-install.php')) { echo '<div style="font-weight: bold; color: red; font-size: 14pt; text-align: center;">' . 'The auto-install.php and cp/reset-access.php files must be removed from your server before you can access the control panel' . '</div>'; exit; } if (($auth_error = cp_authenticate()) === true) { cp_exec($_REQUEST['r'], '_xStatsOverallShow'); } else { include 'login.php'; } function _xIndexShow() { _xStatsOverallShow();
function _xTemplatesRecompileAll() { if (($result = recompile_templates()) !== true) { return JSON::Warning($result); } JSON::Success('All templates have been recompiled!'); }