Example #1
0
<?php

use pg\lib\Generator;
define("ACCEPT_SUBPATH", true);
include_once dirname(__FILE__) . "/utils.php";
$proj = forceProject();
$gen = new Generator($proj);
$gen->generate();
$files = $gen->files;
if (!isset($_SERVER["PATH_INFO"])) {
    redirect($_SERVER["SCRIPT_NAME"] . "/");
}
$path = preg_replace("#[/\\\\]{2,}#", "/", $_SERVER["PATH_INFO"]);
?>
<html>
<head>
	<title>Source Viewer | PocketMine Plugin Generator</title>
	<?php 
echo INCLUDE_JQUERY;
?>
	<!--suppress HtmlUnknownTarget -->
	<link rel="stylesheet" type="text/css" href="<?php 
echo $_SERVER["SCRIPT_NAME"];
?>
/../style/normal.css">
<?php 
if ($path === "/") {
    goto listPath;
} else {
    $path = rtrim($path, "/");
    if (isset($files[$path])) {
Example #2
0
<?php

/*
 * pmt.mcpe.me
 *
 * Copyright (C) 2015 PEMapModder
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * @author PEMapModder
 */
require_once __DIR__ . "/utils.php";
forceProject();
$_SESSION = ["accept_pg_license" => true];
redirect(".");