make library less of a hacky mess
This commit is contained in:
parent
2214aa8154
commit
7d9a8c7491
|
@ -1,3 +1,2 @@
|
|||
</body>
|
||||
|
||||
</html>
|
36
header.php
36
header.php
|
@ -9,11 +9,6 @@
|
|||
$description = "";
|
||||
$image = "";
|
||||
|
||||
/*
|
||||
* Write title
|
||||
*/
|
||||
|
||||
echo("<title>");
|
||||
$url = $_SERVER['REQUEST_URI'];
|
||||
if(strpos($url, 'libary.php') !== false)
|
||||
{
|
||||
|
@ -49,8 +44,10 @@
|
|||
|
||||
$title .= "PSM Reborn";
|
||||
|
||||
echo($title);
|
||||
echo("</title>\n");
|
||||
/*
|
||||
* Write title
|
||||
*/
|
||||
echo("<title>".$title."</title>\n");
|
||||
|
||||
if(strpos($url, 'libary.php') !== false)
|
||||
{
|
||||
|
@ -124,20 +121,17 @@
|
|||
</head>
|
||||
<body>
|
||||
<div class="header">
|
||||
<div class="sitename">
|
||||
<a href="/" class="image">
|
||||
<img src="img/logo.png" alt="PSMReborn" width="40" height="40">
|
||||
<span>PSMReborn</span>
|
||||
<a href="/" class="sitename">
|
||||
<img src="img/logo.png" alt="PSMReborn" width="40" height="40">
|
||||
<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 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>
|
||||
|
608
libary.php
608
libary.php
|
@ -3,184 +3,155 @@ include("header.php");
|
|||
?>
|
||||
|
||||
<?php
|
||||
function getSdkType(SimpleXMLElement $xml)
|
||||
{
|
||||
if(isset($xml->app_xml_format))
|
||||
{
|
||||
if($xml->app_xml_format->attributes()->sdk_type == "PSM SDK")
|
||||
{
|
||||
return "PSM";
|
||||
}
|
||||
else
|
||||
{
|
||||
return "PSM Unity";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return "PSM";
|
||||
}
|
||||
}
|
||||
|
||||
if(isset($_GET["game"]))
|
||||
{
|
||||
$game = htmlspecialchars($_GET["game"], ENT_QUOTES);
|
||||
|
||||
function getSdkType(SimpleXMLElement $xml)
|
||||
{
|
||||
if(isset($xml->app_xml_format))
|
||||
{
|
||||
if($xml->app_xml_format->attributes()->sdk_type == "PSM SDK")
|
||||
{
|
||||
return "PSM";
|
||||
}
|
||||
else
|
||||
{
|
||||
return "PSM Unity";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return "PSM";
|
||||
}
|
||||
}
|
||||
$game = str_replace("/", "",$game);
|
||||
$game = str_replace(".", "",$game);
|
||||
$game = str_replace("*", "",$game);
|
||||
|
||||
if(isset($_GET["game"]))
|
||||
{
|
||||
$game = htmlspecialchars($_GET["game"], ENT_QUOTES);
|
||||
if(strlen($game) != 9)
|
||||
{
|
||||
echo("This is not the bug your looking for :P");
|
||||
die();
|
||||
}
|
||||
?>
|
||||
<script src="zrif.js"></script>
|
||||
<a id="zrif-bin-worker" href=""></a>
|
||||
<?php
|
||||
|
||||
$game = str_replace("/", "",$game);
|
||||
$game = str_replace(".", "",$game);
|
||||
$game = str_replace("*", "",$game);
|
||||
$title = getTitle($game);
|
||||
|
||||
if(strlen($game) != 9)
|
||||
{
|
||||
echo("This is not the bug your looking for :P");
|
||||
die();
|
||||
}
|
||||
echo("<script src=\"/zrif.js\"></script>");
|
||||
echo("<a id=\"zrif-bin-worker\" href=\"\"></a>");
|
||||
$xml = simplexml_load_file('gameinfo/' . $game . "/app.xml", 'SimpleXMLElement', LIBXML_NOENT);
|
||||
$genreList = $xml->genre_list->children();
|
||||
$languageList = $xml->name->children();
|
||||
$featureList = $xml->feature_list->children();
|
||||
$SDKType = getSdkType($xml);
|
||||
$zrifinfo = getZRIF($game);
|
||||
$zrifPendingInfo = getPendingZRIF($game);
|
||||
$pkgSony = getPKG($game);
|
||||
$simulatorZip = "decrypted-files/".$game.".zip";
|
||||
|
||||
$title = getTitle($game);
|
||||
$verXML = simplexml_load_file('gameinfo/' . $game . "/version.xml", 'SimpleXMLElement', LIBXML_NOENT);
|
||||
$latestVersion = (string)($verXML->appVersion);
|
||||
$pkgReborn = "/pkg/".$game."_00/".$latestVersion."/".$game."_00.pkg";
|
||||
|
||||
$xml = simplexml_load_file('gameinfo/' . $game . "/app.xml", 'SimpleXMLElement', LIBXML_NOENT);
|
||||
$genreList = $xml->genre_list->children();
|
||||
$languageList = $xml->name->children();
|
||||
$featureList = $xml->feature_list->children();
|
||||
$SDKType = getSdkType($xml);
|
||||
$zrifinfo = getZRIF($game);
|
||||
$zrifPendingInfo = getPendingZRIF($game);
|
||||
$pkgSony = getPKG($game);
|
||||
$simulatorZip = "decrypted-files/".$game.".zip";
|
||||
$metadataXML = simplexml_load_file('gameinfo/' . $game . "/". $latestVersion ."/metadata.xml", 'SimpleXMLElement', LIBXML_NOENT);
|
||||
$description = $metadataXML->localizedMetadataList->children();
|
||||
$screenshot = $metadataXML->screenShotList->screenShot;
|
||||
$isplayable = "";
|
||||
|
||||
$verXML = simplexml_load_file('gameinfo/' . $game . "/version.xml", 'SimpleXMLElement', LIBXML_NOENT);
|
||||
$latestVersion = (string)($verXML->appVersion);
|
||||
$pkgReborn = "/pkg/".$game."_00/".$latestVersion."/".$game."_00.pkg";
|
||||
if($zrifinfo == "MISSING" && $zrifPendingInfo == "MISSING")
|
||||
{
|
||||
$isplayable = "<a href=\"/faq.php#add-zrif\" class=\"white\">No, Missing zRIF - Do you have a working copy of this game?</a>";
|
||||
}
|
||||
if(file_exists("psdp-packages/".$game.".psdp"))
|
||||
{
|
||||
$isplayable = "<a href=\"/psdp-packages/".$game.".psdp\" class=\"white\">Yes, with PSDP Package in Developer Assistant</a>";
|
||||
}
|
||||
if($zrifinfo != "MISSING")
|
||||
{
|
||||
$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 id="psm-infos">
|
||||
<ul>
|
||||
<li><p>Playable: <?php echo $isplayable ?></p></li>
|
||||
<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 printScreenshotsLinks($screenshot, $latestVersion, $game) ?></p></li>
|
||||
<li><p>Supported locale: <b><?php printLanguageList($languageList) ?></b></p></li>
|
||||
<li><p>Genres: <b><?php printGenreList($genreList) ?></b></p></li>
|
||||
<li><p>Type: <b><?php echo $SDKType ?></b></p></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
$metadataXML = simplexml_load_file('gameinfo/' . $game . "/". $latestVersion ."/metadata.xml", 'SimpleXMLElement', LIBXML_NOENT);
|
||||
$description = $metadataXML->localizedMetadataList->children();
|
||||
$screenshot = $metadataXML->screenShotList->screenShot;
|
||||
<div id="psm-description">
|
||||
<hr><?php echo printDescription($description, "en") ?><hr>
|
||||
</div>
|
||||
|
||||
$defaultLocale = (string)$metadataXML->localizedMetadataList->attributes()->default_locale;
|
||||
<div id="psm-screenshots">
|
||||
<?php echo printScreenshotsImgTags($screenshot, $latestVersion, $game) ?>
|
||||
</div>
|
||||
|
||||
$isplayable = "";
|
||||
<div id="psm-downloads">
|
||||
<div class="button-enabled" id="pkg-sony" onclick="open_url('<?php echo $pkgSony ?>')">
|
||||
<a href="<?php echo($pkgSony) ?>" class="nostyle">PKG (Sony Server)</a>
|
||||
</div>
|
||||
|
||||
if($zrifinfo == "MISSING" && $zrifPendingInfo == "MISSING")
|
||||
{
|
||||
$isplayable = "<a href=\"/faq.php#add-zrif\" class=\"white\">No, Missing zRIF - Do you have a working copy of this game?</a>";
|
||||
}
|
||||
if(file_exists("psdp-packages/".$game.".psdp"))
|
||||
{
|
||||
$isplayable = "<a href=\"/psdp-packages/".$game.".psdp\" class=\"white\">Yes, with PSDP Package in Developer Assistant</a>";
|
||||
}
|
||||
if($zrifinfo != "MISSING")
|
||||
{
|
||||
$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="button-enabled" id="pkg-psmrb" onclick="open_url('<?php echo $pkgReborn ?>')">
|
||||
<a href="<?php echo $pkgReborn ?>" class="nostyle">PKG (PSMReborn Server)</a>
|
||||
</div>
|
||||
|
||||
echo('<div class="bg-content" style="background-image: url(\'/gameinfo/'.$game.'/splash_854x480.png\');">
|
||||
</div>
|
||||
<div class="psm-meta">
|
||||
<div id="psm-title">
|
||||
'. $title .' ('.$game.')
|
||||
</div>
|
||||
<?php if($zrifinfo == "MISSING"){ ?>
|
||||
<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>
|
||||
<?php } ?>
|
||||
|
||||
<div id="psm-top-part">
|
||||
<?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 id="psm-icon">
|
||||
<img src="/gameinfo/'. $game .'/icon_256x256.png" />
|
||||
</div>
|
||||
<select onchange="pkg_change_version()" class="version-select">
|
||||
<?php
|
||||
$dirlist = glob("pkg/".$game."_00/*");
|
||||
$vercount = count($dirlist);
|
||||
for($i = 0; $i < $vercount; $i++)
|
||||
{
|
||||
$ver = basename($dirlist[$i]);
|
||||
|
||||
|
||||
<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 id="psm-description">
|
||||
<hr>
|
||||
'. printDescription($description, $defaultLocale) .'
|
||||
<hr>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="psm-screenshots">
|
||||
'.printScreenshotsImgTags($screenshot, $latestVersion, $game).'
|
||||
</div>
|
||||
|
||||
|
||||
<div id="psm-downloads">
|
||||
|
||||
<div class="button-enabled" id="pkg-sony" onclick="open_url(\''.$pkgSony.'\')">
|
||||
<a href="'.$pkgSony.'" class="nostyle">PKG (Sony Server)</a>
|
||||
</div>
|
||||
|
||||
<div class="button-enabled" id="pkg-psmrb" onclick="open_url(\''.$pkgReborn.'\')">
|
||||
<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.'\')">
|
||||
<a href="'.$simulatorZip.'" class="nostyle">Decrypted Files (For Simulator)</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo 'button-disabled">
|
||||
Decrypted Files (For Simulator)';
|
||||
}
|
||||
echo '</div>
|
||||
|
||||
<select onchange="pkg_change_version()" class="version-select">
|
||||
';
|
||||
$dirlist = glob("pkg/".$game."_00/*");
|
||||
$vercount = count($dirlist);
|
||||
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
|
||||
{
|
||||
if($i == $vercount - 1)
|
||||
{
|
||||
echo'<option selected="'.$ver.'" value="'.$ver.'">'.$ver.'</option>';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo'<option value="'.$ver.'">'.$ver.'</option>';
|
||||
}
|
||||
}
|
||||
?>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<?php } else {
|
||||
$searchUsed = isset($_GET["search"]);
|
||||
|
||||
$simulatorSearch = false;
|
||||
|
@ -204,163 +175,150 @@ else
|
|||
if($_GET["playable"] == "on")
|
||||
$playableSearch = true;
|
||||
}
|
||||
?>
|
||||
|
||||
echo'<div id="search-form">
|
||||
<div id="search-form">
|
||||
<form action="" method="get">
|
||||
<input type="text" name="search" value="';
|
||||
if(isset($_GET["search"]))
|
||||
{
|
||||
echo htmlspecialchars($_GET["search"], ENT_QUOTES);
|
||||
}
|
||||
echo '"></input>
|
||||
<input type="submit"></input><br>
|
||||
<input type="radio" name="searchby" value="title" ';
|
||||
if(!$searchUsed || isset($_GET["searchby"]))
|
||||
{
|
||||
if(!$searchUsed || $_GET["searchby"] == "title" )
|
||||
{
|
||||
echo 'checked="checked"';
|
||||
}
|
||||
}
|
||||
echo '>Title</input>
|
||||
<input type="radio" name="searchby" value="titleid" ';
|
||||
if(isset($_GET["searchby"]))
|
||||
{
|
||||
if($_GET["searchby"] == "titleid")
|
||||
{
|
||||
echo 'checked="checked"';
|
||||
}
|
||||
}
|
||||
echo '>Title ID</input>
|
||||
<input type="radio" name="searchby" value="dev" ';
|
||||
if(isset($_GET["searchby"]))
|
||||
{
|
||||
if($_GET["searchby"] == "dev")
|
||||
{
|
||||
echo 'checked="checked"';
|
||||
}
|
||||
}
|
||||
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>
|
||||
<input type="text" name="search" value="<?php
|
||||
if(isset($_GET["search"])) {
|
||||
echo htmlspecialchars($_GET["search"], ENT_QUOTES);
|
||||
}
|
||||
?>"/>
|
||||
|
||||
<input type="submit">Submit</input><br>
|
||||
|
||||
<input type="radio" name="searchby" value="title" <?php
|
||||
if(!$searchUsed || isset($_GET["searchby"])) {
|
||||
if(!$searchUsed || $_GET["searchby"] == "title" ) {
|
||||
echo 'checked="checked"';
|
||||
}
|
||||
}
|
||||
?>>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"';
|
||||
}
|
||||
?>>Show Playable (Has zRIF)</input>
|
||||
|
||||
<input type="checkbox" name="simulator" <?php
|
||||
if(!$searchUsed || $simulatorSearch) {
|
||||
echo 'checked="checked"';
|
||||
}
|
||||
?>>Show Simulator-Ready</input>
|
||||
|
||||
<input type="checkbox" name="unplayable" <?php
|
||||
if(!$searchUsed || $unplayableSearch) {
|
||||
echo 'checked="checked"';
|
||||
}
|
||||
?>>Show Unplayable (Only PKG)</input>
|
||||
</form>
|
||||
</div>
|
||||
';
|
||||
|
||||
<div id="psm-gamelist">
|
||||
<?php
|
||||
$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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
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);
|
||||
if(!$simulatorSearch)
|
||||
{
|
||||
if($hasSimulator)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
$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(!$unplayableSearch)
|
||||
{
|
||||
if(!$isPlayable && !$isPlayablePending)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
||||
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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
echo '<div class="psm-game" onclick="open_url(\'?game='.$titleid.'\')"">
|
||||
<a href="?game='.$titleid.'" class="nostyle">
|
||||
<img src="/gameinfo/'. $titleid .'/icon_128x128.png" width="124" height="124">
|
||||
';
|
||||
|
||||
if(getSdkType($xml) == "PSM Unity")
|
||||
{
|
||||
echo '<img src="/img/unity.png" title="Made With Unity" width="10" height="10" >';
|
||||
}
|
||||
if($isPlayable)
|
||||
{
|
||||
echo '<img src="/img/playable.png" title="zRIF Known" width="10" height="10" >';
|
||||
}
|
||||
if($isPlayablePending)
|
||||
{
|
||||
echo '<img src="/img/pending_playable.png" title="zRIF Maybe Known" width="10" height="10" >';
|
||||
}
|
||||
if($hasSimulator)
|
||||
{
|
||||
echo '<img src="/img/simulator.png" title="Simulator Files Avalible" width="10" height="10" >';
|
||||
}
|
||||
if(!$playableSearch)
|
||||
{
|
||||
if(($isPlayable || $isPlayablePending) && !$hasSimulator)
|
||||
{
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
<a class="psm-game" href="?game=<?php echo $titleid ?>">
|
||||
<img src="/gameinfo/<?php echo $titleid ?>/icon_128x128.png" width="124" height="124">
|
||||
<div class="psm-game-info">
|
||||
<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 }
|
||||
$authorUrl = "libary.php?search=".urlencode($author)."&searchby=dev";
|
||||
if($playableSearch === true || $searchUsed === false)
|
||||
$authorUrl .= "&playable=on";
|
||||
|
@ -368,22 +326,22 @@ else
|
|||
$authorUrl .= "&simulator=on";
|
||||
if($unplayableSearch === true || $searchUsed === false)
|
||||
$authorUrl .= "&unplayable=on";
|
||||
?>
|
||||
|
||||
echo '<span id="psm-info">
|
||||
<p>
|
||||
<b>'.$title.'</b><br>
|
||||
Genre: <b>'.$genre.'</b><br>
|
||||
Version: <b>'.$version.'</b><br>
|
||||
<b>Author: <a class="white" href="'.$authorUrl.'">'.$author.'</a><br>
|
||||
Website: <a class="white" href="'.$website.'">'.$website.'</a><br></b>
|
||||
</p>
|
||||
</span>
|
||||
</a>
|
||||
</div>';
|
||||
}
|
||||
echo('</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>
|
||||
<tr><td>Website:</td><td><a class="white" href="<?php echo $website ?>"><?php echo $website ?></a></td></tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
<?php
|
||||
}
|
||||
}
|
||||
|
||||
include("footer.php");
|
||||
?>
|
||||
|
||||
|
|
39
style.css
39
style.css
|
@ -2,18 +2,24 @@
|
|||
* header.php
|
||||
*/
|
||||
|
||||
.sitename img {
|
||||
.sitename img {
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.sitename{
|
||||
.sitename {
|
||||
text-decoration: none;
|
||||
font-weight: bold;
|
||||
float: left;
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
.sitemap{
|
||||
float:right;
|
||||
.sitename > span {
|
||||
height: 100%;
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.sitemap {
|
||||
float: right;
|
||||
height: 40px;
|
||||
margin: 0;
|
||||
line-height: 100%;
|
||||
|
@ -101,6 +107,8 @@
|
|||
#psm-gamelist {
|
||||
position: inherit;
|
||||
text-align:center;
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
#search-form{
|
||||
|
@ -151,9 +159,9 @@
|
|||
|
||||
}
|
||||
|
||||
.psm-game img{
|
||||
.psm-game > img{
|
||||
float: left;
|
||||
margin-right:1rem;
|
||||
margin-right:0.5rem;
|
||||
}
|
||||
|
||||
.psm-game a:link, a:visited{
|
||||
|
@ -170,20 +178,22 @@
|
|||
|
||||
|
||||
.psm-game{
|
||||
display: flex;
|
||||
|
||||
padding: 5px;
|
||||
width: 400px;
|
||||
height: 124px;
|
||||
width: 20%;
|
||||
min-width: 400px;
|
||||
height: 150px;
|
||||
margin: 10px;
|
||||
background-color: #0094ff;
|
||||
color: white;
|
||||
border-radius: 5px;
|
||||
text-align: left;
|
||||
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
|
||||
display: inline-block;
|
||||
white-space: nowrap;
|
||||
vertical-align: middle;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.psm-game:hover{
|
||||
|
@ -214,9 +224,10 @@
|
|||
.psm-meta > #psm-downloads{
|
||||
color: white;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
width: 100%;
|
||||
justify-content: center;
|
||||
flex-direction: row;
|
||||
flex-wrap: wrap;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.psm-meta > #psm-description{
|
||||
|
@ -270,9 +281,11 @@
|
|||
height:100%;
|
||||
background-size: cover;
|
||||
background-repeat: no-repeat;
|
||||
background-position: center;
|
||||
left:0px;
|
||||
top:0px;
|
||||
position: fixed;
|
||||
filter: blur(10px);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue