コード例 #1
0
ファイル: addon.php プロジェクト: BlocklandGlass/GlassWebsite
echo '<a href="/addons/download.php?id=' . $addonObject->getId() . '&beta=0" class="btn dlbtn ' . $class . '"><b>' . ucfirst($id) . '</b><span style="font-size:9pt"><br />v' . $version . '</span></a>';
if ($addonObject->hasBeta()) {
    $id = "beta";
    $class = "red";
    echo '<a href="/addons/download.php?id=' . $addonObject->getId() . '&beta=1" class="btn dlbtn ' . $class . '"><b>' . ucfirst($id) . '</b><span style="font-size:9pt"><br />v' . $addonObject->getBetaVersion() . '</span></a>';
}
?>
	</div>
	<div class="screenshots" style="text-align:center;margin: 0 auto">
		<?php 
$screenshots = ScreenshotManager::getScreenshotsFromAddon($_GET['id']);
if (sizeof($screenshots) > 0) {
    echo "<hr />";
}
foreach ($screenshots as $sid) {
    $ss = ScreenshotManager::getFromId($sid);
    echo "<div style=\"padding: 5px; margin: 10px 10px; background-color: #eee; display:inline-block; width: 128px; vertical-align: middle\">";
    echo "<a target=\"_blank\" href=\"/addons/screenshot.php?id=" . $sid . "\">";
    echo "<img src=\"" . $ss->getThumbUrl() . "\" /></a>";
    echo "</div>";
}
?>
	</div>
	<?php 
$deps = DependencyManager::getDependenciesFromAddonID($_GET['id']);
if (sizeof($deps) > 0) {
    echo "<hr /><div style=\"text-align:center\">";
    echo "<b>This add-on has some dependencies or add-ons that it requires to run:</b><br/><br/>";
    foreach ($deps as $did) {
        $dep = DependencyManager::getFromId($did);
        $rid = $dep->getRequired();
コード例 #2
0
<?php

require_once realpath(dirname(__DIR__) . "/private/class/ScreenshotManager.php");
$ss = ScreenshotManager::getFromId($_GET['id']);
echo "<img src=\"" . $ss->getUrl() . "\" />";