if (on_admin()) { // set template path to admin TPL::dir(FOLDER_ADMIN . "template" . DS); // run admin include FOLDER_ADMIN . "index.php"; } else { // set template path to admin TPL::dir(FOLDER_EXTENDER . "templates" . DS . OPTIONS::website('frontend_template') . DS); // run frontend include FOLDER_FRONTEND . "index.php"; } // general assign TPL::assign("admin_url", ADMIN_URL); TPL::assign("base_url", BASE_URL); // run plugins foreach (DRAWLINE::plugins_list(true) as $plugin) { if (file_exists(FOLDER_PLUGINS . $plugin . DS . "index.php")) { include_once FOLDER_PLUGINS . $plugin . DS . "index.php"; EVENTS::do_action("run_plugin_" . $plugin); } else { LOGS::write("Not found plugin " . $plugin . " on the server."); } } EVENTS::do_action("before_render"); // start render if (OPTIONS::website("maintenance_mode") == '1' && !on_admin() && !PERMISSIONS::check("access_admin")) { if (TPL::check_template("page_maintenance")) { TPL::render("page_maintenance"); TPL::draw(true); } else { echo '<h1>This website is in maintenance!</h1>';
* uninstall plugins */ /* * uninstall plugins */ case "plugin_uninstall": $package = $_GET['package']; if (DRAWLINE::plugin_installed($package)) { if (DRAWLINE::uninstall_plugin($package)) { TPL::message("The plugin " . $package . " was succesfully uninstalled!", "success"); } else { if (empty(TPL::get_messages('error'))) { TPL::message("We encounted some errors during the uninstallition of " . $package . ". Please try again!"); } } } else { TPL::message("This plugin is not installed. You can't uninstall an uninstalled plugin :)"); } TPL::assign("plugins", DRAWLINE::plugins_list()); TPL::render('v_extender/extender_plugins'); break; /* * drawline marketplace */ /* * drawline marketplace */ case "marketplace": break; } }