if (is_udb() and file_exists(abspath . "/includes/resources/sqlcream/functions.php")) { require_once abspath . "/includes/resources/sqlcream/functions.php"; } else { require_once abspath . "/includes/noudb.php"; } if (file_exists(abspath . "/themes/" . $theme . "/functions.php")) { include_once abspath . "/themes/" . $theme . "/functions.php"; } if (empty($_GET["p"])) { if (file_exists(abspath . "/themes/" . $theme . "/home.php")) { include_once abspath . "/themes/" . $theme . "/home.php"; } elseif (file_exists(abspath . "/pages/start.php")) { include_once $path . "/pages/start.php"; } elseif (file_exists(abspath . "/themes/" . $theme . "/index.php")) { include_once abspath . "/themes/" . $theme . "/index.php"; } else { if (debug == true) { oc_die("No homepage file! Go create one!", 404); } } } elseif (file_exists(abspath . "/themes/" . $theme . "/page-" . $_GET["p"] . ".php")) { include_once abspath . "/themes/" . $theme . "/page-" . $_GET["p"] . ".php"; } elseif (page_exists(get_page_ID($_GET["p"]))) { define("current_page", get_page_ID($_GET["p"])); include_once abspath . "/themes/" . $theme . "/page.php"; } elseif (file_exists(abspath . "/themes/" . $theme . "/404.php")) { include abspath . "/themes/" . $theme . "/404.php"; } else { echo "<h1>Error</h1>"; echo "p not found"; }
$dir = scandir(abspath . "/plugins"); if (isset($_GET["order"]) and $_GET["order"] == "desc") { rsort($dir); } foreach ($dir as $plugin) { if ($plugin == "." or $plugin == "..") { } else { if (is_dir($plugins_path . "/" . $plugin)) { include $plugins_path . "/" . $plugin . "/info.data.php"; include $plugins_path . "/" . $plugin . "/active.data.php"; } else { if (strrpos($plugin, ".php")) { include_once $plugins_path . "/" . $plugin; } else { if ($debug and !strrpos($plugin, ".rb") and !strrpos($plugin, ".js")) { oc_die("Main plugin file of the plugin " . $plugin . " is not a js, PHP or a RB file!"); } } } ?> <div class='plugin item'><h4><?php echo get_plugin_stuff($plugin, "name"); ?> </h4><a href='editor.php?type=plugin&file=<?php echo $plugin; ?> '>Edit</a> <strong>Author: </strong> <a href='<?php echo get_plugin_stuff($plugin, "author_uri"); ?> '><?php echo get_plugin_stuff($plugin, "author");
/includes/css/all.css"> <link rel="stylesheet" type="text/css" href="css/style.css"> <?php if (file_exists(abspath . "/admin/css/" . $page . ".css")) { ?> <link rel="stylesheet" type="text/css" href="css/<?php echo $page; ?> .css"><?php } ?> <title><?php echo $page; echo " | " . $title; ?> Admin</title></head> <body oncontextmenu="runstopcopy(); return false;"> <?php include abspath . "/includes/resources/userbar/userbar.php"; include 'menu.php'; ?> <div id="page"> <?php if (get_user_stuff(user, "role") < 4 and $page != "pages") { oc_die("permission error", 403); } ?> <h1><?php echo $page; ?> </h1>