add new search

This commit is contained in:
CsvUpdater 2024-04-26 04:19:55 +00:00
parent bbbb06b2d3
commit 8b91bde888
5 changed files with 42 additions and 14 deletions

BIN
img/android.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 435 B

BIN
img/epub.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 13 KiB

BIN
img/mobi.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

BIN
img/pdf.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 262 KiB

View File

@ -33,6 +33,7 @@ include("header.php");
} }
} }
// If a game is selected ...
if(isset($_GET["game"])) if(isset($_GET["game"]))
{ {
$game = htmlspecialchars($_GET["game"], ENT_QUOTES); $game = htmlspecialchars($_GET["game"], ENT_QUOTES);
@ -57,14 +58,16 @@ include("header.php");
$genreList = $xml->genre_list->children(); $genreList = $xml->genre_list->children();
$languageList = $xml->name->children(); $languageList = $xml->name->children();
$featureList = $xml->feature_list->children(); $featureList = $xml->feature_list->children();
$SDKType = getSdkType($xml); $SDKType = getSdkType($xml);
$SDKVer = getSdkVersion($xml); $SDKVer = getSdkVersion($xml);
$androidCompatibile = (($SDKVer != "2.00.00") && ($SDKType == "PSM"));
$zrifinfo = getZRIF($game); $zrifinfo = getZRIF($game);
$zrifPendingInfo = getPendingZRIF($game); $zrifPendingInfo = getPendingZRIF($game);
$pkgSony = getPKG($game); $pkgSony = getPKG($game);
$simulatorZip = "decrypted-files/".$game.".zip"; $simulatorZip = "decrypted-files/".$game.".zip";
$androidCompatibile = (($SDKVer !== "2.00.00") && ($SDKType == "PSM"));
$verXML = simplexml_load_file('gameinfo/' . $game . "/version.xml", 'SimpleXMLElement', LIBXML_NOENT); $verXML = simplexml_load_file('gameinfo/' . $game . "/version.xml", 'SimpleXMLElement', LIBXML_NOENT);
$latestVersion = (string)($verXML->appVersion); $latestVersion = (string)($verXML->appVersion);
@ -169,17 +172,18 @@ include("header.php");
</div> </div>
</div> </div>
<?php <?php
} else { } else { // browse games page ...
$searchUsed = isset($_GET["search"]); $searchUsed = isset($_GET["search"]);
$simulatorSearch = false;
$unplayableSearch = false; $unplayableSearch = false;
$playableSearch = false; $playableSearch = false;
$androidSearch = false;
$vitaSearch = false;
if(isset($_GET["simulator"])) if(isset($_GET["vita"]))
{ {
if($_GET["simulator"] == "on") if($_GET["vita"] == "on")
$simulatorSearch = true; $vitaSearch = true;
} }
if(isset($_GET["unplayable"])) if(isset($_GET["unplayable"]))
@ -193,6 +197,12 @@ include("header.php");
if($_GET["playable"] == "on") if($_GET["playable"] == "on")
$playableSearch = true; $playableSearch = true;
} }
if(isset($_GET["android"]))
{
if($_GET["android"] == "on")
$androidSearch = true;
}
?> ?>
<div id="search-form"> <div id="search-form">
<form action="" method="get"> <form action="" method="get">
@ -228,16 +238,21 @@ include("header.php");
echo 'checked="checked"'; echo 'checked="checked"';
} }
?>>Show Playable (Has zRIF)</input> ?>>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 <input type="checkbox" name="unplayable" <?php
if(!$searchUsed || $unplayableSearch) { if(!$searchUsed || $unplayableSearch) {
echo 'checked="checked"'; echo 'checked="checked"';
} }
?>>Show Unplayable (Only PKG)</input> ?>>Show Unplayable (Only PKG)</input>
<input type="checkbox" name="android" <?php
if(!$searchUsed || $androidSearch) {
echo 'checked="checked"';
}
?>>Show Android & Vita Compatible (&lt;SDK2.00)</input>
<input type="checkbox" name="vita" <?php
if(!$searchUsed || $vitaSearch) {
echo 'checked="checked"';
}
?>>Show Vita Only (&gt;SDK2.00 &amp; Unity)</input>
</form> </form>
</div> </div>
@ -250,6 +265,10 @@ include("header.php");
$titleid = basename($path); $titleid = basename($path);
$xml = simplexml_load_file($path . "/app.xml", 'SimpleXMLElement', LIBXML_NOENT); $xml = simplexml_load_file($path . "/app.xml", 'SimpleXMLElement', LIBXML_NOENT);
$SDKType = getSdkType($xml);
$SDKVer = getSdkVersion($xml);
$isAndroidCompatibile = (($SDKVer != "2.00.00") && ($SDKType == "PSM"));
$title = $xml->name->localized_item[0]->attributes()->value; $title = $xml->name->localized_item[0]->attributes()->value;
$version = $xml->attributes()->version; $version = $xml->attributes()->version;
$genre = $xml->genre_list->genre->attributes()->value; $genre = $xml->genre_list->genre->attributes()->value;
@ -292,10 +311,16 @@ include("header.php");
} }
} }
if(!$androidSearch) {
if($isAndroidCompatibile)
{
continue;
}
}
if(!$simulatorSearch) if(!$vitaSearch && $androidSearch)
{ {
if($hasSimulator) if(!$isAndroidCompatibile)
{ {
continue; continue;
} }
@ -316,6 +341,7 @@ include("header.php");
continue; continue;
} }
} }
} }
$authorUrl = "libary.php?search=".urlencode($author)."&searchby=dev"; $authorUrl = "libary.php?search=".urlencode($author)."&searchby=dev";
@ -331,8 +357,10 @@ include("header.php");
<div class="psm-game-info"> <div class="psm-game-info">
<div class="psm-game-title"> <div class="psm-game-title">
<span><?php echo $title ?></span> <span><?php echo $title ?></span>
<?php if(getSdkType($xml) == "PSM Unity") { ?> <?php if($SDKType == "PSM Unity") { ?>
<img src="/img/unity.png" title="Made With Unity" width="10" height="10"> <img src="/img/unity.png" title="Made With Unity" width="10" height="10">
<?php } if($isAndroidCompatibile) { ?>
<img src="/img/android.png" title="Android Compatible" width="10" height="10">
<?php } if($isPlayable) { ?> <?php } if($isPlayable) { ?>
<img src="/img/playable.png" title="zRIF Known" width="10" height="10"> <img src="/img/playable.png" title="zRIF Known" width="10" height="10">
<?php } if($isPlayablePending) { ?> <?php } if($isPlayablePending) { ?>