Merge pull request 'redesign some stuff and made html in php better' (#1) from olebeck/psmreborn:master into master

Reviewed-on: SilicaAndPina/psmreborn#1
This commit is contained in:
Li 2022-09-21 21:23:27 +00:00
commit 17a328dc94
6 changed files with 655 additions and 677 deletions

View File

@ -150,7 +150,6 @@ function getIcon(string $file)
return "/img/logo.png"; return "/img/logo.png";
} }
} }
?> ?>
<div class="devtoollist"> <div class="devtoollist">
@ -171,211 +170,171 @@ function getIcon(string $file)
echo "<h1>What are you looking for?</h1>"; echo "<h1>What are you looking for?</h1>";
} }
if($type == "") if($type == "") { ?>
{ <a href="?type=unity" class="devtool" id="unity">
echo'<div class="devtool" id="unity" onclick="open_url(\'?type=unity\')"> <img src="/img/unity_icon.png" width="128" height="128" class="bubble">
<a href="?type=unity" class="image"> <span id="textContent">
<img src="/img/unity_icon.png" width="128" height="128" class="bubble"> PSM Unity
<span id="textContent"> </span>
PSM Unity </a>
</span>
</a> <a href="?type=psm" class="devtool" id="psm">
</div> <img src="/img/psm_icon.png" width="128" height="128" class="bubble">
<span id="textContent">
<div class="devtool" id="psm" onclick="open_url(\'?type=psm\')"> PSM
<a href="?type=psm" class="image"> </span>
<img src="/img/psm_icon.png" width="128" height="128" class="bubble"> </a>
<span id="textContent">
PSM <a href="?type=psm-android" class="devtool" id="android" >
</span> <img src="/img/androiddev.png" width="128" height="128" class="bubble">
</a> <span id="textContent">
</div> PSM Android
</span>
<div class="devtool" id="android" onclick="open_url(\'?type=psm-android\')"> </a>
<a href="?type=psm-android" class="image">
<img src="/img/androiddev.png" width="128" height="128" class="bubble"> <a href="?type=psm-tools" class="devtool" id="tools">
<span id="textContent"> <img src="/img/tools.png" width="128" height="128" class="bubble">
PSM Android <span id="textContent">
</span> Unofficial Tools
</a> </span>
</div> </a>
<?php
<div class="devtool" id="tools" onclick="open_url(\'?type=psm-tools\')">
<a href="?type=psm-tools" class="image">
<img src="/img/tools.png" width="128" height="128" class="bubble">
<span id="textContent">
Unofficial Tools
</span>
</a>
</div>';
} }
elseif($type == "psm") elseif($type == "psm")
{ {
echo'<div class="devtool" id="psmsdk" onclick="open_url(\'?type=psm-sdk\')"> ?>
<a href="?type=psm-sdk" class="image"> <a href="?type=psm-sdk" class="devtool" id="psmsdk">
<img src="/img/sdk.png" width="128" height="128" class="bubble"> <img src="/img/sdk.png" width="128" height="128" class="bubble">
<span id="textContent"> <span id="textContent">
PSM SDK PSM SDK
</span> </span>
</a> </a>
</div>
<a href="?type=psm-runtime" class="devtool" id="psmruntime">
<div class="devtool" id="psmruntime" onclick="open_url(\'?type=psm-runtime\')"> <img src="/img/psmruntime.png" width="128" height="128" class="bubble">
<a href="?type=psm-runtime" class="image"> <span id="textContent">
<img src="/img/psmruntime.png" width="128" height="128" class="bubble"> PSM Runtime
<span id="textContent"> </span>
PSM Runtime </a>
</span>
</a> <a href="?type=psm-dev" class="devtool" id="psmdev">
</div> <img src="/img/psmdev.png" width="128" height="128" class="bubble">
<span id="textContent">
<div class="devtool" id="psmdev" onclick="open_url(\'?type=psm-dev\')"> Dev Assistant
<a href="?type=psm-dev" class="image"> </span>
<img src="/img/psmdev.png" width="128" height="128" class="bubble"> </a>
<span id="textContent">
Dev Assistant <a href="?type=psm-psdp" class="devtool" id="psdp">
</span> <img src="/img/psdp.png" width="128" height="128" class="bubble">
</a> <span id="textContent">
</div> PSDP Packages
</span>
<div class="devtool" id="psdp" onclick="open_url(\'?type=psm-psdp\')"> </a>
<a href="?type=psm-psdp" class="image">
<img src="/img/psdp.png" width="128" height="128" class="bubble"> <a href="?type=psm-docs" class="devtool" id="docs">
<span id="textContent"> <img src="/img/docs.png" width="128" height="128" class="bubble">
PSDP Packages <span id="textContent">
</span> Documentation
</a> </span>
</div> </a>
<div class="devtool" id="docs" onclick="open_url(\'?type=psm-docs\')"> <a href="?type=psm-sources" class="devtool" id="sources">
<a href="?type=psm-docs" class="image"> <img src="/img/sources.png" width="128" height="128" class="bubble">
<img src="/img/docs.png" width="128" height="128" class="bubble"> <span id="textContent">
<span id="textContent"> PSM Sources
Documentation </span>
</span> </a>
</a>
</div> <a href="?type=psm-offical-keys" class="devtool" id="keys">
<img src="/img/psmda_keys.png" width="128" height="128" class="bubble">
<div class="devtool" id="sources" onclick="open_url(\'?type=psm-sources\')"> <span id="textContent">
<a href="?type=psm-sources" class="image"> Publisher Keys
<img src="/img/sources.png" width="128" height="128" class="bubble"> </span>
<span id="textContent"> </a>
PSM Sources
</span> <a href="?type=psm-drivers" class="devtool" id="drivers">
</a> <img src="/img/psm-drivers.png" width="128" height="128" class="bubble">
</div> <span id="textContent">
PSM Drivers
<div class="devtool" id="keys" onclick="open_url(\'?type=psm-offical-keys\')"> </span>
<a href="?type=psm-offical-keys" class="image"> </a>
<img src="/img/psmda_keys.png" width="128" height="128" class="bubble"> <?php
<span id="textContent">
Publisher Keys
</span>
</a>
</div>
<div class="devtool" id="drivers" onclick="open_url(\'?type=psm-drivers\')">
<a href="?type=psm-drivers" class="image">
<img src="/img/psm-drivers.png" width="128" height="128" class="bubble">
<span id="textContent">
PSM Drivers
</span>
</a>
</div>
';
} }
elseif($type == "psm-sources") elseif($type == "psm-sources")
{ {
echo'<div class="devtool" id="monosrc" onclick="open_url(\'?type=psm-mono-src\')"> ?>
<a href="?type=psm-mono-src" class="image"> <a href="?type=psm-mono-src" class="devtool" id="monosrc">
<img src="/img/mono.png" width="128" height="128" class="bubble"> <img src="/img/mono.png" width="128" height="128" class="bubble">
<span id="textContent"> <span id="textContent">
PSM Mono Src PSM Mono Src
</span> </span>
</a> </a>
</div>
<a href="?type=psm-games-src" class="devtool" id="gamessrc">
<div class="devtool" id="gamessrc" onclick="open_url(\'?type=psm-games-src\')"> <img src="/img/games.png" width="128" height="128" class="bubble">
<a href="?type=psm-games-src" class="image"> <span id="textContent">
<img src="/img/games.png" width="128" height="128" class="bubble"> PSM Games Src
<span id="textContent"> </span>
PSM Games Src </a>
</span> <?php
</a>
</div>
';
} }
elseif($type == "unity") elseif($type == "unity")
{ {
echo'<div class="devtool" id="unityexport" onclick="open_url(\'?type=unity-support\')"> ?>
<a href="?type=unity-support" class="image"> <a href="?type=unity-support" class="devtool" id="unityexport">
<img src="/img/export.png" width="128" height="128" class="bubble"> <img src="/img/export.png" width="128" height="128" class="bubble">
<span id="textContent"> <span id="textContent">
Unity Exports Unity Exports
</span> </span>
</a> </a>
</div>
<a href="?type=unity-dev" class="devtool" id="unitydev">
<div class="devtool" id="unitydev" onclick="open_url(\'?type=unity-dev\')"> <img src="/img/unitydev.png" width="128" height="128" class="bubble">
<a href="?type=unity-dev" class="image"> <span id="textContent">
<img src="/img/unitydev.png" width="128" height="128" class="bubble"> Dev Assistant
<span id="textContent"> </span>
Dev Assistant </a>
</span>
</a> <a href="?type=unity-docs" class="devtool" id="unitydocs">
</div> <img src="/img/docs.png" width="128" height="128" class="bubble">
<span id="textContent">
<div class="devtool" id="unitydocs" onclick="open_url(\'?type=unity-docs\')"> Documentation
<a href="?type=unity-docs" class="image"> </span>
<img src="/img/docs.png" width="128" height="128" class="bubble"> </a>
<span id="textContent">
Documentation <a href="?type=unity-assets" class="devtool" id="unityassets">
</span> <img src="/img/psm-drivers.png" width="128" height="128" class="bubble">
</a> <span id="textContent">
</div> Assets
</span>
<div class="devtool" id="unityassets" onclick="open_url(\'?type=unity-assets\')"> </a>
<a href="?type=unity-assets" class="image">
<img src="/img/psm-drivers.png" width="128" height="128" class="bubble"> <a href="?type=unity-tools" class="devtool" id="unitytools">
<span id="textContent"> <img src="/img/tools.png" width="128" height="128" class="bubble">
Assets <span id="textContent">
</span> Tools for Unity
</a> </span>
</div> </a>
<div class="devtool" id="unitytools" onclick="open_url(\'?type=unity-tools\')"> <a href="?type=unity-psdp" class="devtool" id="unity-psdp">
<a href="?type=unity-tools" class="image"> <img src="/img/psdp.png" width="128" height="128" class="bubble">
<img src="/img/tools.png" width="128" height="128" class="bubble"> <span id="textContent">
<span id="textContent"> PSDP Packages
Tools for Unity </span>
</span> </a>
</a> <?php
</div>
<div class="devtool" id="unity-psdp" onclick="open_url(\'?type=unity-psdp\')">
<a href="?type=unity-psdp" class="image">
<img src="/img/psdp.png" width="128" height="128" class="bubble">
<span id="textContent">
PSDP Packages
</span>
</a>
</div>
';
} }
else else
{ {
$dirlist = glob($type.'/*'); $dirlist = glob($type.'/*');
foreach ($dirlist as &$path) { foreach ($dirlist as &$path) { ?>
echo '<div class="devtool" onclick="open_url(\''.$path.'\')"> <a href="'.$path.'" class="devtool" title="<?php echo basename($path) ?>">
<a href="'.$path.'" class="image" title="'.basename($path).'"> <img src="<?php echo getIcon($path) ?>" width="128" height="128" class="bubble">
<img src="'.getIcon($path).'" width="128" height="128" class="bubble"> <span id="textContent">
<span id="textContent"> <?php echo getName(pathinfo(basename($path), PATHINFO_FILENAME)) ?>
'.getName(pathinfo(basename($path), PATHINFO_FILENAME)).' </span>
</span> </a>
</a> <?php }
</div>';
}
} }
?> ?>
</div> </div>

View File

@ -1,3 +1,2 @@
</body> </body>
</html> </html>

View File

@ -1,146 +1,132 @@
<?php include("common.php"); ?> <?php include("common.php"); ?>
<?php
$title = "";
$description = "";
$image = "";
$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";
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);
$description = $title . " - ";
$description .= getDesc($game);
$description .= " - 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
{
$description = "PSMReborn is the largest archive of PlayStation Mobile content on the internet containing Games, SDK's, Source Code, and Unity for PSM exporters.";
}
$descsocial = str_replace("<BR>", PHP_EOL, $description);
$descsocial = str_replace("<bR>", PHP_EOL, $descsocial);
$descsocial = str_replace("<Br>", PHP_EOL, $descsocial);
$descsocial = str_replace("<br>", PHP_EOL, $descsocial);
$descsocial = str_replace('"', '', $descsocial);
$descsocial = str_replace("'", "", $descsocial);
/*
* Default Image
*/
if($image == "")
{
$image .= 'http://'.$_SERVER['HTTP_HOST'].'/img/logo.png';
}
?>
<!DOCTYPE html> <!DOCTYPE html>
<html> <html>
<head> <head>
<link rel="stylesheet" type="text/css" href="style.css"> <link rel="stylesheet" type="text/css" href="style.css">
<script src="common.js"></script> <script src="common.js"></script>
<?php
$title = ""; <title><?php echo $title ?></title>
$description = "";
$image = ""; <meta charset="utf-8">
<meta name="robots" content="all">
<meta name="viewport" content="width=1000, user-scalable=0"/>
<meta name="Description" content="<?php echo $descsocial?>"/>
<meta property="og:image" content="<?php echo $image ?>"/>
<meta property="og:title" content="<?php echo $title ?>"/>
<meta property="og:description" content="<?php echo $descsocial ?>"/>
/* <meta property="twitter:image" content="<?php echo $image ?>"/>
* Write title <meta property="twitter:title" content="<?php echo $title ?>"/>
*/ <meta property="twitter:description" content="<?php echo $descsocial ?>"/>
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");
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);
$description = $title . " - ";
$description .= getDesc($game);
$description .= " - 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
{
$description = "PSMReborn is the largest archive of PlayStation Mobile content on the internet containing Games, SDK's, Source Code, and Unity for PSM exporters.";
}
$descsocial = str_replace("<BR>", PHP_EOL, $description);
$descsocial = str_replace("<bR>", PHP_EOL, $descsocial);
$descsocial = str_replace("<Br>", PHP_EOL, $descsocial);
$descsocial = str_replace("<br>", PHP_EOL, $descsocial);
$descsocial = str_replace('"', '', $descsocial);
$descsocial = str_replace("'", "", $descsocial);
/*
* Write metadata
*/
echo('<meta charset="utf-8">');
echo('<meta name="robots" content="all">');
echo('<meta name="viewport" content="width=1000; user-scalable=0;"/>');
echo('<meta name="Description" content="'.$descsocial.'"/>');
/*
* 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="'.$descsocial.'"/>');
echo('<meta property="twitter:image" content="'.$image.'"/>');
echo('<meta property="twitter:title" content="'.$title.'"/>');
echo('<meta property="twitter:description" content="'.$descsocial.'"/>');
?>
</head> </head>
<body> <body>
<div class="header"> <div class="header">
<div class="sitename"> <a href="/" class="sitename">
<a href="/" class="image"> <img src="img/logo.png" alt="PSMReborn" width="40" height="40">
<img src="img/logo.png" alt="PSMReborn" width="40" height="40"> <span>PSMReborn</span>
<span>PSMReborn</span> </a>
</a> <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>
</div> </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>
</div>

View File

@ -15,21 +15,22 @@
Have a look around though, i got stuff for end-users and developers alike!<br> Have a look around though, i got stuff for end-users and developers alike!<br>
Under "<a href="/libary.php" class="white">Library</a>" section you can find info on every PSM Game ever made. and<br> Under "<a href="/libary.php" class="white">Library</a>" section you can find info on every PSM Game ever made. and<br>
Under "<a href="/devtools.php" class="white">Development Tools</a>" section you can find SDK's and Unity Builds, as well as Homebrew PSDP Packages</p> Under "<a href="/devtools.php" class="white">Development Tools</a>" section you can find SDK's and Unity Builds, as well as Homebrew PSDP Packages</p>
<br><br>Dont have a PSVita? or want to play PSM games on your computer? <a href="/psm-tools/PSMUI-v1.0.zip" class="white">Download PSMUI 1.0</a> <br><br>Dont have a PSVita? or want to play PSM games on your computer?<br>
<a href="/psm-tools/PSMUI-v1.0.zip" class="white">Download PSMUI 1.0</a>
<br> <br>
<center>
<b>So.. I recently discovered that psmreborn.com is NOT blocked in china</b><br> <b>So.. I recently discovered that psmreborn.com is NOT blocked in china</b><br>
<video width="480" height="272" controls> <video width="100%" controls>
<source src="videos/china.mp4" type="video/mp4"> <source src="videos/china.mp4" type="video/mp4">
Your browser does not support the video tag. Your browser does not support the video tag.
</video><br> </video><br>
<!--<form action="/1337/index.php" method="POST"> <!--<form action="/1337/index.php" method="POST">
<input type="hidden" name="url" value="https://www.torproject.org/download/"></input> <input type="hidden" name="url" value="https://www.torproject.org/download/"></input>
<input type="submit" value="If your internet is censored - Click to Download the Tor Browser (Proxied)"></input> <input type="submit" value="If your internet is censored - Click to Download the Tor Browser (Proxied)"></input>
</form>--!> </form>
</center> </center>
<br><br><br>&nbsp; <br><br><br>&nbsp;
</div>--> </div>-->
</div>
<div id="contact"> <div id="contact">
<a href="psmreborn.torrent" class="white">- psmreborn.torrent - For ALL Files.</a> <a href="psmreborn.torrent" class="white">- psmreborn.torrent - For ALL Files.</a>

View File

@ -3,184 +3,158 @@ include("header.php");
?> ?>
<?php <?php
function getSdkType(SimpleXMLElement $xml)
function getSdkType(SimpleXMLElement $xml)
{
if(isset($xml->app_xml_format))
{ {
if($xml->app_xml_format->attributes()->sdk_type == "PSM SDK") if(isset($xml->app_xml_format))
{ {
return "PSM"; if($xml->app_xml_format->attributes()->sdk_type == "PSM SDK")
{
return "PSM";
}
else
{
return "PSM Unity";
}
} }
else else
{ {
return "PSM Unity"; return "PSM";
} }
} }
else
{
return "PSM";
}
}
if(isset($_GET["game"])) if(isset($_GET["game"]))
{
$game = htmlspecialchars($_GET["game"], ENT_QUOTES);
$game = str_replace("/", "",$game);
$game = str_replace(".", "",$game);
$game = str_replace("*", "",$game);
if(strlen($game) != 9)
{ {
echo("This is not the bug your looking for :P"); $game = htmlspecialchars($_GET["game"], ENT_QUOTES);
die();
} $game = str_replace("/", "",$game);
echo("<script src=\"/zrif.js\"></script>"); $game = str_replace(".", "",$game);
echo("<a id=\"zrif-bin-worker\" href=\"\"></a>"); $game = str_replace("*", "",$game);
$title = getTitle($game); if(strlen($game) != 9)
{
$xml = simplexml_load_file('gameinfo/' . $game . "/app.xml", 'SimpleXMLElement', LIBXML_NOENT); echo("This is not the bug your looking for :P");
$genreList = $xml->genre_list->children(); die();
$languageList = $xml->name->children(); }
$featureList = $xml->feature_list->children(); ?>
$SDKType = getSdkType($xml); <script src="zrif.js"></script>
$zrifinfo = getZRIF($game); <a id="zrif-bin-worker" href=""></a>
$zrifPendingInfo = getPendingZRIF($game); <?php
$pkgSony = getPKG($game);
$simulatorZip = "decrypted-files/".$game.".zip"; $title = getTitle($game);
$verXML = simplexml_load_file('gameinfo/' . $game . "/version.xml", 'SimpleXMLElement', LIBXML_NOENT); $xml = simplexml_load_file('gameinfo/' . $game . "/app.xml", 'SimpleXMLElement', LIBXML_NOENT);
$latestVersion = (string)($verXML->appVersion); $genreList = $xml->genre_list->children();
$pkgReborn = "/pkg/".$game."_00/".$latestVersion."/".$game."_00.pkg"; $languageList = $xml->name->children();
$featureList = $xml->feature_list->children();
$metadataXML = simplexml_load_file('gameinfo/' . $game . "/". $latestVersion ."/metadata.xml", 'SimpleXMLElement', LIBXML_NOENT); $SDKType = getSdkType($xml);
$description = $metadataXML->localizedMetadataList->children(); $zrifinfo = getZRIF($game);
$screenshot = $metadataXML->screenShotList->screenShot; $zrifPendingInfo = getPendingZRIF($game);
$pkgSony = getPKG($game);
$defaultLocale = (string)$metadataXML->localizedMetadataList->attributes()->default_locale; $simulatorZip = "decrypted-files/".$game.".zip";
$isplayable = ""; $verXML = simplexml_load_file('gameinfo/' . $game . "/version.xml", 'SimpleXMLElement', LIBXML_NOENT);
$latestVersion = (string)($verXML->appVersion);
if($zrifinfo == "MISSING" && $zrifPendingInfo == "MISSING") $pkgReborn = "/pkg/".$game."_00/".$latestVersion."/".$game."_00.pkg";
{
$isplayable = "<a href=\"/faq.php#add-zrif\" class=\"white\">No, Missing zRIF - Do you have a working copy of this game?</a>"; $metadataXML = simplexml_load_file('gameinfo/' . $game . "/". $latestVersion ."/metadata.xml", 'SimpleXMLElement', LIBXML_NOENT);
} $description = $metadataXML->localizedMetadataList->children();
if(file_exists("psdp-packages/".$game.".psdp")) $screenshot = $metadataXML->screenShotList->screenShot;
{ $isplayable = "";
$isplayable = "<a href=\"/psdp-packages/".$game.".psdp\" class=\"white\">Yes, with PSDP Package in Developer Assistant</a>";
} if($zrifinfo == "MISSING" && $zrifPendingInfo == "MISSING")
if($zrifinfo != "MISSING") {
{ $isplayable = "<a href=\"/faq.php#add-zrif\" class=\"white\">No, Missing zRIF - Do you have a working copy of this game?</a>";
$isplayable = "<a class=\"white\" onclick=\"copy_text('".$zrifinfo."')\">Yes! Copy zRIF String</a> or <a class=\"white\" onclick=\"convert2('".$zrifinfo."')\">Download FAKE.RIF</a>"; }
} if(file_exists("psdp-packages/".$game.".psdp"))
if($zrifPendingInfo != "MISSING") {
{ $isplayable = "<a href=\"/psdp-packages/".$game.".psdp\" class=\"white\">Yes, with PSDP Package in Developer Assistant</a>";
$isplayable = "<a class=\"white\" onclick=\"copy_text('".$zrifPendingInfo."')\">Maybe, Ulthough it hasnt been tested yet- Copy zRIF String</a> or <a class=\"white\" onclick=\"convert2('".$zrifPendingInfo."')\">Download FAKE.RIF</a>"; }
} if($zrifinfo != "MISSING")
{
echo('<div class="bg-content" style="background-image: url(\'/gameinfo/'.$game.'/splash_854x480.png\');"> $isplayable = "<a class=\"white\" onclick=\"copy_text('".$zrifinfo."')\">Yes! Copy zRIF String</a> or <a class=\"white\" onclick=\"convert2('".$zrifinfo."')\">Download FAKE.RIF</a>";
}
if($zrifPendingInfo != "MISSING")
{
$isplayable = "<a class=\"white\" onclick=\"copy_text('".$zrifPendingInfo."')\">Maybe, Ulthough it hasnt been tested yet- Copy zRIF String</a> or <a class=\"white\" onclick=\"convert2('".$zrifPendingInfo."')\">Download FAKE.RIF</a>";
}
?>
<div class="bg-content" style="background-image: url('/gameinfo/<?php echo $game ?>/splash_854x480.png');"></div>
<div class="psm-meta">
<div id="psm-title"><?php echo($title.' ('.$game.')') ?></div>
<div id="psm-top-part">
<div id="psm-icon">
<img src="/gameinfo/<?php echo $game ?>/icon_256x256.png" />
</div> </div>
<div class="psm-meta"> <div id="psm-infos">
<div id="psm-title"> <ul>
'. $title .' ('.$game.') <li><p>Playable: <?php echo $isplayable ?></p></li>
</div> <li><p>Metadata: <a href="/gameinfo/<?php echo $game ?>/app.xml" class="white">app.xml</a>, <a href="/gameinfo/<?php echo $game ?>/text.txt" class="white">copyright.txt</a>, <a href="/gameinfo/<?php echo $game ?>/version.xml" class="white">version.xml</a>, <a href="/gameinfo/<?php echo $game ?>/<?php echo $latestVersion ?>/metadata.xml" class="white">metadata.xml</a></p></li>
<li><p>Images: <a href="/gameinfo/<?php echo $game ?>/icon_128x128.png" class="white">icon_128x128.png</a>, <a href="/gameinfo/<?php echo $game ?>/icon_256x256.png" class="white">icon_256x256.png</a>, <a href="/gameinfo/<?php echo $game ?>/icon_512x512.png" class="white">icon_512x512.png</a>, <a href="/gameinfo/<?php echo $game ?>/splash_854x480.png" class="white">splash_854x480.png</a><?php echo printScreenshotsLinks($screenshot, $latestVersion, $game) ?></p></li>
<div id="psm-top-part"> <li><p>Supported locale: <b><?php echo printLanguageList($languageList) ?></b></p></li>
<li><p>Genres: <b><?php echo printGenreList($genreList) ?></b></p></li>
<li><p>Type: <b><?php echo $SDKType ?></b></p></li>
</ul>
</div>
</div>
<div id="psm-description">
<hr><?php echo printDescription($description, "en") ?><hr>
</div>
<div id="psm-screenshots" class="blue-scrollbar">
<?php echo printScreenshotsImgTags($screenshot, $latestVersion, $game) ?>
</div>
<div id="psm-icon"> <div id="psm-downloads">
<img src="/gameinfo/'. $game .'/icon_256x256.png" /> <div class="button-enabled" id="pkg-sony" onclick="open_url('<?php echo $pkgSony ?>')">
</div> <a href="<?php echo($pkgSony) ?>" class="nostyle">PKG (Sony Server)</a>
<div id="psm-infos">
<ul>
<li><p>Playable: '.$isplayable.'</p></li>
<li><p>Metadata: <a href="/gameinfo/'.$game.'/app.xml" class="white">app.xml</a>, <a href="/gameinfo/'.$game.'/text.txt" class="white">copyright.txt</a>, <a href="/gameinfo/'.$game.'/version.xml" class="white">version.xml</a>, <a href="/gameinfo/'.$game.'/'.$latestVersion.'/metadata.xml" class="white">metadata.xml</a></p></li>
<li><p>Images: <a href="/gameinfo/'.$game.'/icon_128x128.png" class="white">icon_128x128.png</a>, <a href="/gameinfo/'.$game.'/icon_256x256.png" class="white">icon_256x256.png</a>, <a href="/gameinfo/'.$game.'/icon_512x512.png" class="white">icon_512x512.png</a>, <a href="/gameinfo/'.$game.'/splash_854x480.png" class="white">splash_854x480.png</a>' . printScreenshotsLinks($screenshot, $latestVersion, $game) . '</p></li>
<li><p>Supported locale: <b>'.printLanguageList($languageList).'</b></p></li>
<li><p>Genres: <b>'.printGenreList($genreList).'</b></p></li>
<li><p>Type: <b>'.$SDKType.'</b></p></li>
</ul>
</div>
</div> </div>
<div id="psm-description"> <div class="button-enabled" id="pkg-psmrb" onclick="open_url('<?php echo $pkgReborn ?>')">
<hr> <a href="<?php echo $pkgReborn ?>" class="nostyle">PKG (PSMReborn Server)</a>
'. printDescription($description, $defaultLocale) .'
<hr>
</div> </div>
<?php
<div id="psm-screenshots"> if($zrifinfo == "MISSING"){
'.printScreenshotsImgTags($screenshot, $latestVersion, $game).' ?><div class="button-disabled" id="fake-rif">NoPsmDrm License</div>
<?php
} else {
?><div class="button-enabled" id="fake-rif" onclick="convert2('<?php echo $zrifinfo ?>')">
<a class="nostyle" onclick="convert2('<?php echo $zrifinfo ?>')">NoPsmDrm License</a>
</div> </div>
<?php } ?>
<div id="psm-downloads"> <?php
if(file_exists($simulatorZip)) {
?><div class="button-enabled" onclick="open_url('<?php echo $simulatorZip ?>')">
<a href="<?php echo $simulatorZip ?>" class="nostyle">Decrypted Files (For Simulator)</a>
</div>
<?php
} else {
?><div class="button-disabled">Decrypted Files (For Simulator)</div>
<?php } ?>
<div class="button-enabled" id="pkg-sony" onclick="open_url(\''.$pkgSony.'\')"> <select onchange="pkg_change_version()" class="version-select"><?php
<a href="'.$pkgSony.'" class="nostyle">PKG (Sony Server)</a> $dirlist = glob("pkg/".$game."_00/*");
</div> $vercount = count($dirlist);
for($i = 0; $i < $vercount; $i++)
{
$ver = basename($dirlist[$i]);
<div class="button-enabled" id="pkg-psmrb" onclick="open_url(\''.$pkgReborn.'\')"> if($i == $vercount - 1)
<a href="'.$pkgReborn.'" class="nostyle">PKG (PSMReborn Server)</a>
</div>
');
if($zrifinfo == "MISSING"){
echo('<div class="button-disabled" id="fake-rif">
NoPsmDrm License
</div>');
}
else{
echo('
<div class="button-enabled" id="fake-rif" onclick="convert2(\''.$zrifinfo.'\')">
<a class="nostyle" onclick="convert2(\''.$zrifinfo.'\')">NoPsmDrm License</a>
</div>');
}
echo('<div class="');
if(file_exists($simulatorZip))
{ {
echo 'button-enabled" onclick="open_url(\''.$simulatorZip.'\')"> echo'<option selected="'.$ver.'" value="'.$ver.'">'.$ver.'</option>';
<a href="'.$simulatorZip.'" class="nostyle">Decrypted Files (For Simulator)</a>';
} }
else else
{ {
echo 'button-disabled"> echo'<option value="'.$ver.'">'.$ver.'</option>';
Decrypted Files (For Simulator)';
} }
echo '</div> }
?></select>
<select onchange="pkg_change_version()" class="version-select"> </div>
'; </div>
$dirlist = glob("pkg/".$game."_00/*"); <?php
$vercount = count($dirlist); } else {
for($i = 0; $i < $vercount; $i++)
{
$ver = basename($dirlist[$i]);
if($i == $vercount - 1)
{
echo'<option selected="'.$ver.'" value="'.$ver.'">'.$ver.'</option>';
}
else
{
echo'<option value="'.$ver.'">'.$ver.'</option>';
}
}
echo'
</select>
</div>
</div>
';
}
else
{
$searchUsed = isset($_GET["search"]); $searchUsed = isset($_GET["search"]);
$simulatorSearch = false; $simulatorSearch = false;
@ -204,186 +178,179 @@ else
if($_GET["playable"] == "on") if($_GET["playable"] == "on")
$playableSearch = true; $playableSearch = true;
} }
?>
echo'<div id="search-form"> <div id="search-form">
<form action="" method="get"> <form action="" method="get">
<input type="text" name="search" value="'; <input type="text" name="search" value="<?php
if(isset($_GET["search"])) if(isset($_GET["search"])) {
{ echo htmlspecialchars($_GET["search"], ENT_QUOTES);
echo htmlspecialchars($_GET["search"], ENT_QUOTES); }
} ?>"/>
echo '"></input> <input type="submit"/><br>
<input type="submit"></input><br> <input type="radio" name="searchby" value="title" <?php
<input type="radio" name="searchby" value="title" '; if(!$searchUsed || isset($_GET["searchby"])) {
if(!$searchUsed || isset($_GET["searchby"])) if(!$searchUsed || $_GET["searchby"] == "title" ) {
{ echo 'checked="checked"';
if(!$searchUsed || $_GET["searchby"] == "title" ) }
{ }
?>>Title</input>
<input type="radio" name="searchby" value="titleid" <?php
if(isset($_GET["searchby"])) {
if($_GET["searchby"] == "titleid") {
echo 'checked="checked"';
}
}
?>>Title ID</input>
<input type="radio" name="searchby" value="dev" <?php
if(isset($_GET["searchby"])) {
if($_GET["searchby"] == "dev") {
echo 'checked="checked"';
}
}
?>>Developer</input><br>
<input type="checkbox" name="playable" <?php
if(!$searchUsed || $playableSearch) {
echo 'checked="checked"'; echo 'checked="checked"';
} }
} ?>>Show Playable (Has zRIF)</input>
echo '>Title</input> <input type="checkbox" name="simulator" <?php
<input type="radio" name="searchby" value="titleid" '; if(!$searchUsed || $simulatorSearch) {
if(isset($_GET["searchby"]))
{
if($_GET["searchby"] == "titleid")
{
echo 'checked="checked"'; echo 'checked="checked"';
} }
} ?>>Show Simulator-Ready</input>
echo '>Title ID</input> <input type="checkbox" name="unplayable" <?php
<input type="radio" name="searchby" value="dev" '; if(!$searchUsed || $unplayableSearch) {
if(isset($_GET["searchby"]))
{
if($_GET["searchby"] == "dev")
{
echo 'checked="checked"'; echo 'checked="checked"';
} }
} ?>>Show Unplayable (Only PKG)</input>
echo '>Developer</input><br>
<input type="checkbox" name="playable" ';
if(!$searchUsed || $playableSearch)
{
echo 'checked="checked"';
}
echo'>Show Playable (Has zRIF)</input>
<input type="checkbox" name="simulator" ';
if(!$searchUsed || $simulatorSearch)
{
echo 'checked="checked"';
}
echo '>Show Simulator-Ready</input>
<input type="checkbox" name="unplayable" ';
if(!$searchUsed || $unplayableSearch)
{
echo 'checked="checked"';
}
echo '>Show Unplayable (Only PKG)</input>
</form> </form>
</div> </div>
';
echo('<div id="psm-gamelist">');
$dirlist = glob("gameinfo/*");
$playableList = getPlayableList();
$playablePendingList = getPendingPlayableList();
foreach ($dirlist as &$path) {
$titleid = basename($path);
$xml = simplexml_load_file($path . "/app.xml", 'SimpleXMLElement', LIBXML_NOENT);
$title = $xml->name->localized_item[0]->attributes()->value;
$version = $xml->attributes()->version;
$genre = $xml->genre_list->genre->attributes()->value;
$author = $xml->developer->name->attributes()->value;
$website = $xml->website->attributes()->href;
$isPlayable = $playableList[$titleid] == 1 || file_exists("psdp-packages/".$titleid.".psdp");
$hasSimulator = file_exists("decrypted-files/".$titleid.".zip");
$isPlayablePending = false;
if($searchUsed)
{
$search = $_GET["search"];
if(isset($_GET["searchby"]) && $search !== "")
{
$searchby = $_GET["searchby"];
if($searchby === "title")
{
if(strpos(strtolower($title), strtolower($search)) === false)
{
continue;
}
}
elseif($searchby === "titleid")
{
if(strpos(strtolower($titleid), strtolower($search)) === false)
{
continue;
}
}
elseif($searchby === "dev")
{
if(strpos(strtolower($author), strtolower($search)) === false)
{
continue;
}
}
}
if(!$simulatorSearch)
{
if($hasSimulator)
{
continue;
}
}
if(!$unplayableSearch)
{
if(!$isPlayable && !$isPlayablePending)
{
continue;
}
}
if(!$playableSearch)
{
if(($isPlayable || $isPlayablePending) && !$hasSimulator)
{
continue;
}
}
}
<div id="psm-gamelist">
echo '<div class="psm-game" onclick="open_url(\'?game='.$titleid.'\')""> <?php
<a href="?game='.$titleid.'" class="nostyle"> $dirlist = glob("gameinfo/*");
<img src="/gameinfo/'. $titleid .'/icon_128x128.png" loading="lazy" width="124" height="124"> $playableList = getPlayableList();
'; $playablePendingList = getPendingPlayableList();
foreach ($dirlist as &$path) {
if(getSdkType($xml) == "PSM Unity") $titleid = basename($path);
$xml = simplexml_load_file($path . "/app.xml", 'SimpleXMLElement', LIBXML_NOENT);
$title = $xml->name->localized_item[0]->attributes()->value;
$version = $xml->attributes()->version;
$genre = $xml->genre_list->genre->attributes()->value;
$author = $xml->developer->name->attributes()->value;
$website = $xml->website->attributes()->href;
$isPlayable = $playableList[$titleid] == 1 || file_exists("psdp-packages/".$titleid.".psdp");
$hasSimulator = file_exists("decrypted-files/".$titleid.".zip");
$isPlayablePending = false;
preg_match('/https?:\/\/(?:www\.)?(.+[^\/])/', $website, $website_array);
$websitePretty = $website_array[1];
if($searchUsed)
{
$search = $_GET["search"];
if(isset($_GET["searchby"]) && $search !== "")
{
$searchby = $_GET["searchby"];
if($searchby === "title")
{ {
echo '<img src="/img/unity.png" title="Made With Unity" width="10" height="10" >'; if(strpos(strtolower($title), strtolower($search)) === false)
{
continue;
}
} }
if($isPlayable) elseif($searchby === "titleid")
{ {
echo '<img src="/img/playable.png" title="zRIF Known" width="10" height="10" >'; if(strpos(strtolower($titleid), strtolower($search)) === false)
{
continue;
}
} }
if($isPlayablePending) elseif($searchby === "dev")
{ {
echo '<img src="/img/pending_playable.png" title="zRIF Maybe Known" width="10" height="10" >'; if(strpos(strtolower($author), strtolower($search)) === false)
{
continue;
}
} }
}
if(!$simulatorSearch)
{
if($hasSimulator) if($hasSimulator)
{ {
echo '<img src="/img/simulator.png" title="Simulator Files Avalible" width="10" height="10" >'; continue;
} }
}
$authorUrl = "libary.php?search=".urlencode($author)."&searchby=dev";
if($playableSearch === true || $searchUsed === false) if(!$unplayableSearch)
$authorUrl .= "&playable=on"; {
if($simulatorSearch === true || $searchUsed === false) if(!$isPlayable && !$isPlayablePending)
$authorUrl .= "&simulator=on"; {
if($unplayableSearch === true || $searchUsed === false) continue;
$authorUrl .= "&unplayable=on"; }
}
echo '<span id="psm-info">
<p> if(!$playableSearch)
<b>'.$title.'</b><br> {
Genre: <b>'.$genre.'</b><br> if(($isPlayable || $isPlayablePending) && !$hasSimulator)
Version: <b>'.$version.'</b><br> {
<b>Author: <a class="white" href="'.$authorUrl.'">'.$author.'</a><br> continue;
Website: <a class="white" href="'.$website.'">'.$website.'</a><br></b> }
</p> }
</span> }
</a>
</div>'; $authorUrl = "libary.php?search=".urlencode($author)."&searchby=dev";
if($playableSearch === true || $searchUsed === false)
$authorUrl .= "&playable=on";
if($simulatorSearch === true || $searchUsed === false)
$authorUrl .= "&simulator=on";
if($unplayableSearch === true || $searchUsed === false)
$authorUrl .= "&unplayable=on";
?>
<a class="psm-game" href="?game=<?php echo $titleid ?>">
<img src="/gameinfo/<?php echo $titleid ?>/icon_128x128.png" loading="lazy" width="124" height="124">
<div class="psm-game-info">
<div class="psm-game-title">
<span><?php echo $title ?></span>
<?php if(getSdkType($xml) == "PSM Unity") { ?>
<img src="/img/unity.png" title="Made With Unity" width="10" height="10">
<?php } if($isPlayable) { ?>
<img src="/img/playable.png" title="zRIF Known" width="10" height="10">
<?php } if($isPlayablePending) { ?>
<img src="/img/pending_playable.png" title="zRIF Maybe Known" width="10" height="10" >
<?php } if($hasSimulator) { ?>
<img src="/img/simulator.png" title="Simulator Files Avalible" width="10" height="10" >
<?php } ?>
</div>
<table>
<tbody>
<tr>
<td>Genre:</td>
<td><?php echo $genre ?></td>
</tr>
<tr>
<td>Version:</td>
<td><?php echo $version ?></td>
</tr>
<tr>
<td>Author:</td>
<td><a class="white" href="<?php echo $authorUrl ?>"><?php echo $author ?></a></td>
</tr>
</tbody>
</table>
<object>
<a class="white" href="<?php echo $website ?>"><?php echo $websitePretty ?></a>
</object>
</div>
</a>
<?php
}
} }
echo('</div>');
}
include("footer.php"); include("footer.php");
?> ?>

122
style.css
View File

@ -2,18 +2,20 @@
* header.php * header.php
*/ */
.sitename img { .sitename img {
vertical-align: top; vertical-align: top;
} }
.sitename{ .sitename {
text-decoration: none;
font-weight: bold; font-weight: bold;
float: left; float: left;
height: 40px; height: 40px;
display: flex;
} }
.sitemap{ .sitemap {
float:right; float: right;
height: 40px; height: 40px;
margin: 0; margin: 0;
line-height: 100%; line-height: 100%;
@ -62,6 +64,8 @@
background-color: #00CCCC; background-color: #00CCCC;
z-index: 10; z-index: 10;
position: relative; position: relative;
display: flex;
justify-content: space-between;
} }
@ -89,7 +93,7 @@
width: 600px; width: 600px;
left: 50%; left: 50%;
margin-left: -280px; margin-left: -280px;
margin-bottom: 20px;
} }
@ -101,6 +105,9 @@
#psm-gamelist { #psm-gamelist {
position: inherit; position: inherit;
text-align:center; text-align:center;
display: flex;
flex-wrap: wrap;
justify-content: center;
} }
#search-form{ #search-form{
@ -151,9 +158,10 @@
} }
.psm-game img{ .psm-game > img{
float: left; float: left;
margin-right:1rem; margin: auto 0.5rem auto 0.5rem;
border-radius: 10px;
} }
.psm-game a:link, a:visited{ .psm-game a:link, a:visited{
@ -168,29 +176,58 @@
text-decoration: underline; text-decoration: underline;
} }
.psm-game{ .psm-game{
padding: 5px; display: flex;
width: 400px;
height: 124px; padding: 5px;
margin: 10px; width: 20%;
background-color: #0094ff; min-width: 400px;
color: white; height: 150px;
border-radius: 5px; margin: 10px;
text-align: left; background-color: #0094ff;
color: white;
white-space: nowrap; border-radius: 10px;
overflow: hidden; text-align: left;
display: inline-block; overflow: hidden;
vertical-align: middle; white-space: nowrap;
vertical-align: middle;
text-decoration: none;
} }
.psm-game:hover{ .psm-game:hover{
background-color: #005796; background-color: #005796;
cursor:pointer; cursor:pointer;
} }
.psm-game-info {
display: flex;
flex-direction: column;
margin-top: 0.5rem;
}
.psm-game-info > object > a {
padding-left: 4px;
}
.psm-game-info > table {
display: block;
}
.psm-game-title {
display: flex;
flex-direction: row;
align-items: center;
}
.psm-game-title > span {
margin-right: 3px;
}
.psm-meta {
backdrop-filter: blur(10px);
}
.psm-meta > #psm-title{ .psm-meta > #psm-title{
font-size: 200%; font-size: 200%;
text-align: center; text-align: center;
@ -214,15 +251,15 @@
.psm-meta > #psm-downloads{ .psm-meta > #psm-downloads{
color: white; color: white;
display: flex; display: flex;
flex-direction: row;
width: 100%;
justify-content: center; justify-content: center;
flex-direction: row;
flex-wrap: wrap;
width: 100%;
} }
.psm-meta > #psm-description{ .psm-meta > #psm-description{
margin: 2%; margin: 2% 2% 0%;
font-weight: bold; width: 96%;
width: 96%;
} }
.psm-meta > #psm-screenshots{ .psm-meta > #psm-screenshots{
@ -270,6 +307,7 @@
height:100%; height:100%;
background-size: cover; background-size: cover;
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: center;
left:0px; left:0px;
top:0px; top:0px;
position: fixed; position: fixed;
@ -405,7 +443,6 @@
} }
.button-disabled{ .button-disabled{
width: 300px; width: 300px;
height: 50px; height: 50px;
@ -419,4 +456,33 @@
color: #cfd2d3; color: #cfd2d3;
cursor: arrow; cursor: arrow;
border-radius: 20px; border-radius: 20px;
}
a {
user-select: none;
}
.blue-scrollbar::-webkit-scrollbar-track
{
box-shadow: inset 0 0 6px rgba(0,0,0,0.3);
background-color: #11101000;
border-radius: 10px;
}
.blue-scrollbar::-webkit-scrollbar
{
width: 10px;
background-color: rgba(0,0,0,0);
}
.blue-scrollbar::-webkit-scrollbar-thumb
{
border-radius: 10px;
background-image: linear-gradient(90deg, rgba(245,148,215,1) 0%, rgba(167,234,255,1) 94%);
background-attachment: fixed;
}
.blue-scrollbar {
padding-bottom: 10px;
margin-bottom: 2.5%;
} }