Update Site

This commit is contained in:
SilicaAndPina 2019-07-30 00:10:20 +12:00
parent ec9dfd1521
commit dafb472500
6 changed files with 2575 additions and 26 deletions

View File

@ -10,6 +10,14 @@ function update_rifs()
update_rifs();
function getTitle(string $game)
{
$xml = simplexml_load_file('gameinfo/' . $game . "/app.xml", 'SimpleXMLElement', LIBXML_NOENT);
$title = $xml->name->localized_item[0]->attributes()->value;
unset($xml);
return $title;
}
function getPlayableList()
{
$playable_list = (array)null;

View File

@ -8,11 +8,14 @@ function format_version(string $version)
function getName(string $file)
{
if($file == "psm_tool_set_for_unity_installer_ver09806_20131125_1848_for_Unity_r22419")
{
return "ToolSet v9806";
}
elseif(strpos($file, "MakePsmGreatAgain") !== false)
{
return "MPGA ".substr($file,19,4);
}
elseif(strpos($file, 'PSMToolSetForUnity_') !== false)
{
return "Toolset v".substr($file,19,7);
@ -118,7 +121,7 @@ function getIcon(string $file)
{
return "/img/pkg.png";
}
elseif($ext == "zip" || $ext == "tgz")
elseif($ext == "zip" || $ext == "tgz" || $ext == "gz")
{
return "/img/zip_icon.png";
}

View File

@ -1,24 +1,158 @@
<?php include("common.php"); ?>
<head>
<title>PSM Reborn</title>
<link rel="stylesheet" type="text/css" href="style.css">
<div class="header">
<p>
<div class="sitename">
<a href="/" class="image">
<img src="img/logo.png" alt="PSMReborn" width="40" height="40">
</a>
PSMReborn
</div>
<div class="sitemap">
<ul>
<li><a href="/">Home</a></li>
<li><a href="/libary.php">PSM Library</a></li>
<li><a href="/devtools.php">Development Tools</a></li>
</ul>
</div>
</p>
</div>
<script src="common.js"></script>
<?php
$title = "";
$description = "";
$image = "";
/*
* Write title
*/
echo("<title>");
$url = $_SERVER['REQUEST_URI'];
if(strpos($url, 'libary.php') !== false)
{
if(isset($_GET["game"]))
{
$game = htmlspecialchars($_GET["game"], ENT_QUOTES);
$game = str_replace("/", "",$game);
$game = str_replace(".", "",$game);
$game = str_replace("*", "",$game);
$title = getTitle($game);
$title.= " - ";
}
else
{
$title .= "PSM Game Library - ";
}
}
else if(strpos($url, 'devtools.php') !== false)
{
$title .= "PlayStation Mobile Development Tools - ";
if(isset($_GET["type"]))
{
$type = htmlspecialchars($_GET["type"], ENT_QUOTES);
$type = str_replace("/", "",$type);
$type = str_replace(".", "",$type);
$type = str_replace("*", "",$type);
$title .= $type."/ - ";
}
}
$title .= "PSM Reborn";
echo($title);
echo("</title>\n");
/*
* Write metadata
*/
echo('<meta charset="utf-8">');
echo('<meta name="robots" content="all">');
echo('<meta name="Description" CONTENT="');
if(strpos($url, 'libary.php') !== false)
{
if(isset($_GET["game"]))
{
$game = htmlspecialchars($_GET["game"], ENT_QUOTES);
$game = str_replace("/", "",$game);
$game = str_replace(".", "",$game);
$game = str_replace("*", "",$game);
$title = getTitle($game);
$simulatorZip = "decrypted-files/".$game.".zip";
$zrif = getZRIF($game);
$playable = ($zrif != "MISSING" && file_exists("psdp-packages/".$game.".psdp") == false);
$description .= "PlayStation Mobile PKG/ROM Download links for ".$title." (".$game." - ";
if($playable)
{
$description .= "playable)";
}
else
{
$description .= "unplayable)";
}
$description .= " Download ".$game.".pkg, ";
if(file_exists($simulatorZip))
{
$description .= $game.".zip (Simulator), ";
}
if(file_exists("psdp-packages/".$game.".psdp"))
{
$description .= $game.".psdp, ";
}
$description .= "now! - PSMReborn #1 place for all PSM Content";
$image .= 'http://'.$_SERVER['HTTP_HOST'].'/gameinfo/'.$game.'/icon_512x512.png';
}
else
{
$description .= "PlayStation Mobile Game/App Library - PSMReborn #1 place for all PSM Content";
}
}
else if(strpos($url, 'devtools.php') !== false)
{
$description .= "PlayStation Mobile Development Tools";
if(isset($_GET["type"]))
{
$type = htmlspecialchars($_GET["type"], ENT_QUOTES);
$type = str_replace("/", "",$type);
$type = str_replace(".", "",$type);
$type = str_replace("*", "",$type);
$description .= " - ".$type."/";
}
$description .= " - PSMReborn #1 place for all PSM Content";
}
else
{
echo("PSMReborn is the largest archive of PlayStation Mobile content on the internet containing Games, SDK's, Source Code, and Unity for PSM exporters.");
}
echo($description);
echo('">');
/*
* Default Image
*/
if($image == "")
{
$image .= 'http://'.$_SERVER['HTTP_HOST'].'/img/logo.png';
}
/*
* Social Media
*/
echo('<meta property="og:image" content="'.$image.'">');
echo('<meta property="og:title" content="'.$title.'">');
echo('<meta property="og:description" content="'.$description.'"');
echo('<meta property="twitter:image" content="'.$image.'">');
echo('<meta property="twitter:title" content="'.$title.'">');
echo('<meta property="twitter:description" content="'.$description.'"');
?>
</head>
<div class="header">
<p>
<div class="sitename">
<a href="/" class="image">
<img src="img/logo.png" alt="PSMReborn" width="40" height="40">
</a>
PSMReborn
</div>
<div class="sitemap">
<ul>
<li><a href="/">Home</a></li>
<li><a href="/libary.php">PSM Library</a></li>
<li><a href="/devtools.php">Development Tools</a></li>
</ul>
</div>
</p>
</div>

View File

@ -66,11 +66,9 @@ if(isset($_GET["game"]))
die();
}
$title = getTitle($game);
$xml = simplexml_load_file('gameinfo/' . $game . "/app.xml", 'SimpleXMLElement', LIBXML_NOENT);
$title = $xml->name->localized_item[0]->attributes()->value;
$genreList = $xml->genre_list->children();
$languageList = $xml->name->children();
$featureList = $xml->feature_list->children();

View File

@ -1,2 +1,3 @@
User-agent: yellowafterlife
Disallow: /
User-agent: *
Allow: /
Sitemap: http://psmreborn.com/sitemap.xml

2405
sitemap.xml Normal file

File diff suppressed because it is too large Load Diff