示例#1
0
文件: index.php 项目: knytrune/ABXD
        $theme = $defaultTheme;
    }
}
checkForImage($layout_logopic, true, "logos/logo_{$theme}.png");
checkForImage($layout_logopic, true, "logos/logo_{$theme}.jpg");
checkForImage($layout_logopic, true, "logos/logo_{$theme}.gif");
checkForImage($layout_logopic, true, "logos/logo.png");
checkForImage($layout_logopic, true, "logos/logo.jpg");
checkForImage($layout_logopic, true, "logos/logo.gif");
checkForImage($layout_logopic, false, "themes/{$theme}/logo.png");
checkForImage($layout_logopic, false, "themes/{$theme}/logo.jpg");
checkForImage($layout_logopic, false, "themes/{$theme}/logo.gif");
checkForImage($layout_logopic, false, "img/logo.png");
checkForImage($layout_favicon, true, "logos/favicon.gif");
checkForImage($layout_favicon, true, "logos/favicon.ico");
checkForImage($layout_favicon, false, "img/favicon.ico");
$layout_themefile = "themes/{$theme}/style.css";
if (!file_exists($layout_themefile)) {
    $layout_themefile = "themes/{$theme}/style.php";
}
$layout_contents = "<div id=\"page_contents\">{$layout_contents}</div>";
//=======================
// PoRA box
if (Settings::get("showPoRA")) {
    $layout_pora = '
		<div class="PoRT nom">
			<table class="message outline">
				<tr class="header0"><th>' . Settings::get("PoRATitle") . '</th></tr>
				<tr class="cell0"><td>' . Settings::get("PoRAText") . '</td></tr>
			</table>
		</div>';
示例#2
0
$theme = $_GET['id'];
$themeFile = "themes/{$theme}/style.css";
if (!file_exists($themeFile)) {
    $themeFile = "themes/{$theme}/style.php";
}
checkForImage($layout_logopic, true, "logos/logo_{$theme}.png");
checkForImage($layout_logopic, true, "logos/logo_{$theme}.jpg");
checkForImage($layout_logopic, true, "logos/logo_{$theme}.gif");
checkForImage($layout_logopic, true, "logos/logo.png");
checkForImage($layout_logopic, true, "logos/logo.jpg");
checkForImage($layout_logopic, true, "logos/logo.gif");
checkForImage($layout_logopic, false, "themes/{$theme}/logo.png");
checkForImage($layout_logopic, false, "themes/{$theme}/logo.jpg");
checkForImage($layout_logopic, false, "themes/{$theme}/logo.gif");
checkForImage($layout_logopic, false, "themes/{$theme}/logo.png");
checkForImage($layout_logopic, false, "img/logo.png");
$result = array("css" => $themeFile, "logo" => $layout_logopic);
echo json_encode($result);
/*
function checkForImage(&$image, $external, $file)
{
	global $dataDir, $dataUrl;

	if($image) return;

	if($external)
	{
		if(file_exists($dataDir.$file))
			$image = $dataUrl.$file;
	}
	else