use new icons

This commit is contained in:
CsvUpdater 2024-04-26 04:20:40 +00:00
parent 8b91bde888
commit 40de133770
1 changed files with 387 additions and 372 deletions

View File

@ -1,373 +1,388 @@
<?php <?php
include("header.php"); include("header.php");
function format_version(string $version) function format_version(string $version)
{ {
return substr($version,0,2) .".". substr($version,2,2); return substr($version,0,2) .".". substr($version,2,2);
} }
function getName(string $file) function getName(string $file)
{ {
if($file == "psm_tool_set_for_unity_installer_ver09806_20131125_1848_for_Unity_r22419") if($file == "psm_tool_set_for_unity_installer_ver09806_20131125_1848_for_Unity_r22419")
{ {
return "ToolSet v9806"; return "ToolSet v9806";
} }
elseif(strpos($file, "MakePsmGreatAgain") !== false) elseif(strpos($file, "MakePsmGreatAgain") !== false)
{ {
return "MPGA ".substr($file,19,4); return "MPGA ".substr($file,19,4);
} }
elseif(strpos($file, 'PSMToolSetForUnity_') !== false) elseif(strpos($file, 'PSMToolSetForUnity_') !== false)
{ {
return "Toolset v".substr($file,19,7); return "Toolset v".substr($file,19,7);
} }
elseif($file == "UnitySetup_update-4.3.4f1") elseif($file == "UnitySetup_update-4.3.4f1")
{ {
return "Unity v4.3.4f1"; return "Unity v4.3.4f1";
} }
elseif($file == "UnitySetup_update-4.3.7p3") elseif($file == "UnitySetup_update-4.3.7p3")
{ {
return "Unity v4.3.7p3"; return "Unity v4.3.7p3";
} }
elseif($file == "psmdevassistant") elseif($file == "psmdevassistant")
{ {
return "Dev Assistant"; return "Dev Assistant";
} }
elseif($file == "PlaystationCertificates") elseif($file == "PlaystationCertificates")
{ {
return "PS Certificates"; return "PS Certificates";
} }
elseif($file == "UnityJapan2014-Introduction_to_Unity-for-PSM") elseif($file == "UnityJapan2014-Introduction_to_Unity-for-PSM")
{ {
return "Intro 2 Unity r1"; return "Intro 2 Unity r1";
} }
elseif($file == "UnityJapan2014-Introduction_to_Unity-for-PSM2") elseif($file == "UnityJapan2014-Introduction_to_Unity-for-PSM2")
{ {
return "Intro 2 Unity r2"; return "Intro 2 Unity r2";
} }
elseif($file == "PSM Dev 01.03") elseif($file == "PSM Dev 01.03")
{ {
return "PSM Dev 01.03"; return "PSM Dev 01.03";
} }
elseif(strpos($file, 'PSMPublishingUtility_') !== false) elseif(strpos($file, 'PSMPublishingUtility_') !== false)
{ {
return "PSMPU ".substr($file,21,6); return "PSMPU ".substr($file,21,6);
} }
elseif($file == "MichaelFleischauer-PlaystationmobileDevelopmentCookbook-packtPublishing2013") elseif(strpos($file, '9781849694186') !== false)
{ {
return "PSMCookbook"; return "PSMCookbook";
} }
elseif($file == "IP9100-PCSI00011_00-PSMRUNTIME000000") elseif($file == "IP9100-PCSI00011_00-PSMRUNTIME000000")
{ {
return "Runtime 01.00"; return "Runtime 01.00";
} }
elseif(strpos($file, "IP9100-PCSI00011_00-PSMRUNTIME000000-A") !== false) elseif(strpos($file, "IP9100-PCSI00011_00-PSMRUNTIME000000-A") !== false)
{ {
return "Runtime ".format_version(substr($file,38,4)); return "Runtime ".format_version(substr($file,38,4));
} }
elseif(strpos($file, "IP9100-PCSI00007_00-PSSUITEDEV000000-A") !== false) elseif(strpos($file, "IP9100-PCSI00007_00-PSSUITEDEV000000-A") !== false)
{ {
return "PSM Dev ".format_version(substr($file,38,4)); return "PSM Dev ".format_version(substr($file,38,4));
} }
elseif(strpos($file, 'UnitySetup') !== false) elseif(strpos($file, 'UnitySetup') !== false)
{ {
return substr($file,strpos($file,"-for-Editor-")+12,12); return substr($file,strpos($file,"-for-Editor-")+12,12);
} }
elseif(strpos($file, "IP9100-PCSI00009_00-UNITYDEV00000000-A") !== false) elseif(strpos($file, "IP9100-PCSI00009_00-UNITYDEV00000000-A") !== false)
{ {
return "Unity Dev ".format_version(substr($file,38,4)); return "Unity Dev ".format_version(substr($file,38,4));
} }
elseif(strpos($file, "PCSI00007-99_999-99_00-") !== false) elseif(strpos($file, "PCSI00007-99_999-99_00-") !== false)
{ {
return "PSMCP ".str_replace("_",".",substr($file,23,5)); return "PSMCP ".str_replace("_",".",substr($file,23,5));
} }
elseif(strpos($file, "PCSI00009-99_999-99_00-") !== false) elseif(strpos($file, "PCSI00009-99_999-99_00-") !== false)
{ {
return "UNITYCP ".str_replace("_",".",substr($file,23,5)); return "UNITYCP ".str_replace("_",".",substr($file,23,5));
} }
elseif(strpos($file, "PSM_SDK_") !== false) elseif(strpos($file, "PSM_SDK_") !== false)
{ {
return "SDK ".substr($file,8,7); return "SDK ".substr($file,8,7);
} }
elseif(strpos($file, "PSSuiteSDK_") !== false) elseif(strpos($file, "PSSuiteSDK_") !== false)
{ {
return "SDK ".substr($file,11,7); return "SDK ".substr($file,11,7);
} }
else else
{ {
return $file; return $file;
} }
} }
function getIcon(string $file) function getIcon(string $file)
{ {
$ext = pathinfo($file, PATHINFO_EXTENSION); $ext = pathinfo($file, PATHINFO_EXTENSION);
if($ext == "psdp") if($ext == "psdp")
{ {
return "/img/psdp.png"; return "/img/psdp.png";
} }
elseif($ext == "pdf") elseif($ext == "pdf")
{ {
return "/img/docs.png"; return "/img/pdf.png";
} }
elseif($ext == "exe" && strpos($file, 'UnitySetup') == false) elseif($ext == "mobi")
{ {
return "/img/sdk.png"; return "/img/mobi.png";
} }
elseif($ext == "exe" && strpos($file, 'UnitySetup') !== false) elseif($ext == "epub")
{ {
return "/img/unity_icon.png"; return "/img/epub.png";
} }
elseif($ext == "pkg") elseif($ext == "exe" && strpos($file, 'UnitySetup') == false)
{ {
return "/img/pkg.png"; return "/img/sdk.png";
} }
elseif($ext == "zip" || $ext == "tgz" || $ext == "gz" || $ext == "7z") elseif($ext == "exe" && strpos($file, 'UnitySetup') !== false)
{ {
return "/img/zip_icon.png"; return "/img/unity_icon.png";
} }
elseif($ext == "cmbackup") elseif($ext == "pkg")
{ {
return "/img/cmbackup.png"; return "/img/pkg.png";
} }
elseif($ext == "ppk") elseif($ext == "zip" || $ext == "tgz" || $ext == "gz" || $ext == "7z")
{ {
return "/img/ppk_icon.png"; return "/img/zip_icon.png";
} }
elseif($ext == "apk") elseif($ext == "cmbackup")
{ {
return "/img/apk-icon.png"; return "/img/cmbackup.png";
} }
elseif($ext == "skprx") elseif($ext == "ppk")
{ {
return "/img/kernel-plugin.png"; return "/img/ppk_icon.png";
} }
elseif($ext == "suprx") elseif($ext == "apk")
{ {
return "/img/user-plugin.png"; return "/img/apk-icon.png";
} }
else elseif($ext == "skprx")
{ {
return "/img/logo.png"; return "/img/kernel-plugin.png";
} }
} elseif($ext == "suprx")
?> {
return "/img/user-plugin.png";
<div class="devtoollist"> }
<?php else
$type = ""; {
if(isset($_GET["type"])) return "/img/logo.png";
{ }
$type = htmlspecialchars($_GET["type"], ENT_QUOTES); }
?>
$type = str_replace("/", "",$type);
$type = str_replace(".", "",$type); <div class="devtoollist">
$type = str_replace("*", "",$type); <?php
$type = "";
echo "<h1>".$type."/</h1>"; if(isset($_GET["type"]))
} {
else $type = htmlspecialchars($_GET["type"], ENT_QUOTES);
{
echo "<h1>What are you looking for?</h1>"; $type = str_replace("/", "",$type);
} $type = str_replace(".", "",$type);
$type = str_replace("*", "",$type);
if($type == "") { ?>
<a href="?type=unity" class="devtool" id="unity"> echo "<h1>".$type."/</h1>";
<img src="/img/unity_icon.png" width="128" height="128" class="bubble"> }
<span id="textContent"> else
PSM Unity {
</span> echo "<h1>What are you looking for?</h1>";
</a> }
<a href="?type=psm" class="devtool" id="psm"> if($type == "") { ?>
<img src="/img/psm_icon.png" width="128" height="128" class="bubble"> <a href="?type=unity" class="devtool" id="unity">
<span id="textContent"> <img src="/img/unity_icon.png" width="128" height="128" class="bubble">
PSM <span id="textContent">
</span> PSM Unity
</a> </span>
</a>
<a href="?type=psm-android" class="devtool" id="android" >
<img src="/img/androiddev.png" width="128" height="128" class="bubble"> <a href="?type=psm" class="devtool" id="psm">
<span id="textContent"> <img src="/img/psm_icon.png" width="128" height="128" class="bubble">
PSM Android <span id="textContent">
</span> PSM
</a> </span>
</a>
<a href="?type=psm-tools" class="devtool" id="tools">
<img src="/img/tools.png" width="128" height="128" class="bubble"> <a href="?type=psm-android" class="devtool" id="android" >
<span id="textContent"> <img src="/img/androiddev.png" width="128" height="128" class="bubble">
Unofficial Tools <span id="textContent">
</span> PSM Android
</a> </span>
<?php </a>
}
elseif($type == "psm") <a href="?type=psm-tools" class="devtool" id="tools">
{ <img src="/img/tools.png" width="128" height="128" class="bubble">
?> <span id="textContent">
<a href="?type=psm-sdk" class="devtool" id="psmsdk"> Unofficial Tools
<img src="/img/sdk.png" width="128" height="128" class="bubble"> </span>
<span id="textContent"> </a>
PSM SDK <?php
</span> }
</a> elseif($type == "psm")
{
<a href="?type=psm-runtime" class="devtool" id="psmruntime"> ?>
<img src="/img/psmruntime.png" width="128" height="128" class="bubble"> <a href="?type=psm-sdk" class="devtool" id="psmsdk">
<span id="textContent"> <img src="/img/sdk.png" width="128" height="128" class="bubble">
PSM Runtime <span id="textContent">
</span> PSM SDK
</a> </span>
</a>
<a href="?type=psm-dev" class="devtool" id="psmdev">
<img src="/img/psmdev.png" width="128" height="128" class="bubble"> <a href="?type=psm-runtime" class="devtool" id="psmruntime">
<span id="textContent"> <img src="/img/psmruntime.png" width="128" height="128" class="bubble">
Dev Assistant <span id="textContent">
</span> PSM Runtime
</a> </span>
</a>
<a href="?type=psm-psdp" class="devtool" id="psdp">
<img src="/img/psdp.png" width="128" height="128" class="bubble"> <a href="?type=psm-dev" class="devtool" id="psmdev">
<span id="textContent"> <img src="/img/psmdev.png" width="128" height="128" class="bubble">
PSDP Packages <span id="textContent">
</span> Dev Assistant
</a> </span>
</a>
<a href="?type=psm-docs" class="devtool" id="docs">
<img src="/img/docs.png" width="128" height="128" class="bubble"> <a href="?type=psm-psdp" class="devtool" id="psdp">
<span id="textContent"> <img src="/img/psdp.png" width="128" height="128" class="bubble">
Documentation <span id="textContent">
</span> PSDP Packages
</a> </span>
</a>
<a href="?type=psm-sources" class="devtool" id="sources">
<img src="/img/sources.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">
PSM Sources <span id="textContent">
</span> Documentation
</a> </span>
</a>
<a href="?type=psm-offical-keys" class="devtool" id="keys">
<img src="/img/psmda_keys.png" width="128" height="128" class="bubble"> <a href="?type=psm-sources" class="devtool" id="sources">
<span id="textContent"> <img src="/img/sources.png" width="128" height="128" class="bubble">
Publisher Keys <span id="textContent">
</span> PSM Sources
</a> </span>
</a>
<a href="?type=psm-drivers" class="devtool" id="drivers">
<img src="/img/psm-drivers.png" width="128" height="128" class="bubble"> <a href="?type=psm-offical-keys" class="devtool" id="keys">
<span id="textContent"> <img src="/img/psmda_keys.png" width="128" height="128" class="bubble">
PSM Drivers <span id="textContent">
</span> Publisher Keys
</a> </span>
<?php </a>
}
elseif($type == "psm-sources") <a href="?type=psm-drivers" class="devtool" id="drivers">
{ <img src="/img/psm-drivers.png" width="128" height="128" class="bubble">
?> <span id="textContent">
<a href="?type=psm-mono-src" class="devtool" id="monosrc"> PSM Drivers
<img src="/img/mono.png" width="128" height="128" class="bubble"> </span>
<span id="textContent"> </a>
PSM Mono Src <?php
</span> }
</a> elseif($type == "psm-sources")
{
<a href="?type=psm-games-src" class="devtool" id="gamessrc"> ?>
<img src="/img/games.png" width="128" height="128" class="bubble"> <a href="?type=psm-mono-src" class="devtool" id="monosrc">
<span id="textContent"> <img src="/img/mono.png" width="128" height="128" class="bubble">
PSM Games Src <span id="textContent">
</span> PSM Mono Src
</a> </span>
<?php </a>
}
elseif($type == "unity") <a href="?type=psm-games-src" class="devtool" id="gamessrc">
{ <img src="/img/games.png" width="128" height="128" class="bubble">
?> <span id="textContent">
<a href="?type=unity-support" class="devtool" id="unityexport"> PSM Games Src
<img src="/img/export.png" width="128" height="128" class="bubble"> </span>
<span id="textContent"> </a>
Unity Exports <?php
</span> }
</a> elseif($type == "unity")
{
<a href="?type=unity-dev" class="devtool" id="unitydev"> ?>
<img src="/img/unitydev.png" width="128" height="128" class="bubble"> <a href="?type=unity-support" class="devtool" id="unityexport">
<span id="textContent"> <img src="/img/export.png" width="128" height="128" class="bubble">
Dev Assistant <span id="textContent">
</span> Unity Exports
</a> </span>
</a>
<a href="?type=unity-docs" class="devtool" id="unitydocs">
<img src="/img/docs.png" width="128" height="128" class="bubble"> <a href="?type=unity-dev" class="devtool" id="unitydev">
<span id="textContent"> <img src="/img/unitydev.png" width="128" height="128" class="bubble">
Documentation <span id="textContent">
</span> Dev Assistant
</a> </span>
</a>
<a href="?type=unity-assets" class="devtool" id="unityassets">
<img src="/img/psm-drivers.png" width="128" height="128" class="bubble"> <a href="?type=unity-docs" class="devtool" id="unitydocs">
<span id="textContent"> <img src="/img/docs.png" width="128" height="128" class="bubble">
Assets <span id="textContent">
</span> Documentation
</a> </span>
</a>
<a href="?type=unity-tools" class="devtool" id="unitytools">
<img src="/img/tools.png" width="128" height="128" class="bubble"> <a href="?type=unity-assets" class="devtool" id="unityassets">
<span id="textContent"> <img src="/img/psm-drivers.png" width="128" height="128" class="bubble">
Tools for Unity <span id="textContent">
</span> Assets
</a> </span>
</a>
<a href="?type=unity-psdp" class="devtool" id="unity-psdp">
<img src="/img/psdp.png" width="128" height="128" class="bubble"> <a href="?type=unity-src" class="devtool" id="unityassets">
<span id="textContent"> <img src="/img/sources.png" width="128" height="128" class="bubble">
PSDP Packages <span id="textContent">
</span> Source Code
</a> </span>
<?php </a>
}
elseif($type == "psm-sdk-doc") <a href="?type=unity-tools" class="devtool" id="unitytools">
{ <img src="/img/tools.png" width="128" height="128" class="bubble">
?> <span id="textContent">
<a href="/psm-sdk-doc/en" class="devtool" id="sdkdocen"> Tools for Unity
<img src="/img/docs.png" width="128" height="128" class="bubble"> </span>
<span id="textContent"> </a>
English Docs
</span> <a href="?type=unity-psdp" class="devtool" id="unity-psdp">
</a> <img src="/img/psdp.png" width="128" height="128" class="bubble">
<span id="textContent">
<a href="/psm-sdk-doc/ja" class="devtool" id="sdkdocjp"> PSDP Packages
<img src="/img/docs.png" width="128" height="128" class="bubble"> </span>
<span id="textContent"> </a>
Japanese Docs <?php
</span> }
</a> elseif($type == "psm-sdk-doc")
<?php {
} ?>
else <a href="/psm-sdk-doc/en" class="devtool" id="sdkdocen">
{ <img src="/img/docs.png" width="128" height="128" class="bubble">
$dirlist = glob($type.'/*'); <span id="textContent">
foreach ($dirlist as &$path) { ?> English Docs
<a href="<?php echo $path ?>" class="devtool" title="<?php echo basename($path) ?>"> </span>
<img src="<?php echo getIcon($path) ?>" width="128" height="128" class="bubble"> </a>
<span id="textContent">
<?php echo getName(pathinfo(basename($path), PATHINFO_FILENAME)) ?> <a href="/psm-sdk-doc/ja" class="devtool" id="sdkdocjp">
</span> <img src="/img/docs.png" width="128" height="128" class="bubble">
</a> <span id="textContent">
<?php } Japanese Docs
</span>
if($type == "psm-docs"){ // append psm-sdk-doc to result </a>
?> <?php
<a href="?type=psm-sdk-doc" class="devtool" id="sdkdoc"> }
<img src="/img/docs.png" width="128" height="128" class="bubble"> else
<span id="textContent"> {
SDK Docs $dirlist = glob($type.'/*');
</span> foreach ($dirlist as &$path) { ?>
</a> <a href="<?php echo $path ?>" class="devtool" title="<?php echo basename($path) ?>">
<?php <img src="<?php echo getIcon($path) ?>" width="128" height="128" class="bubble">
} <span id="textContent">
} <?php echo getName(pathinfo(basename($path), PATHINFO_FILENAME)) ?>
?> </span>
</div> </a>
<?php }
<?php
include("footer.php"); if($type == "psm-docs"){ // append psm-sdk-doc to result
?>
<a href="?type=psm-sdk-doc" class="devtool" id="sdkdoc">
<img src="/img/docs.png" width="128" height="128" class="bubble">
<span id="textContent">
SDK Docs
</span>
</a>
<?php
}
}
?>
</div>
<?php
include("footer.php");
?> ?>