Replace _index.php with index.php

main
Astoria 2 years ago
parent 3d0cc2861d
commit 68425f6647

@ -29,7 +29,7 @@ function archive ($includearr) {
$mod = $post[1];
$title = file_get_contents($link);
$linkarr = explode("/", $link);
$linkarr[sizeof($linkarr) - 1] = "_index.php?post=" . $linkarr[sizeof($linkarr) - 1];
$linkarr[sizeof($linkarr) - 1] = "index.php?post=" . $linkarr[sizeof($linkarr) - 1];
$link = implode("/", $linkarr);
$title = explode('<h1>', $title)[1];
$title = explode('</h1', $title)[0];

@ -5,7 +5,7 @@ if (!$root) {
$returnlink = $root;
}
$host = explode('.', $_SERVER['HTTP_HOST']); $host = end($host);
$indexfile = "_index.php";
$indexfile = "index.php";
$heads = array("head.gif", "head2.gif", "head3.gif", "head4.gif", "head5.gif", "head6.gif", "head7.gif", "head8.gif", "head9.gif");
$usehead = array_rand($heads);

@ -1,6 +1,6 @@
<?php
$indexfile="_index.php";
$indexfile="index.php";
$homefile="home.php";
function getFileList($dir) {
@ -78,7 +78,7 @@ echo '<body>';
echo '<div class="content">';
if (basename($_SERVER['PHP_SELF']) == "home.php") {
require "homepanel.php";
} elseif (basename($_SERVER['PHP_SELF']) == "_index.php") {
} elseif (basename($_SERVER['PHP_SELF']) == "index.php") {
require "blogpanel.php";
}
?>

@ -5,8 +5,8 @@ $check = preg_replace('/^\.$/', '', $files);
//remove .
$check = preg_replace('/^\.\.$/', '', $check);
//remove ..
$check = preg_replace('/^\_index\.php$/', '', $check);
//remove _index.php
$check = preg_replace('/^index\.php$/', '', $check);
//remove index.php
$check = implode(" ", $check);
if (preg_match("/\.+/", $check) == 0) {
require "article-start.php";

Loading…
Cancel
Save