Mam problem z zainstalowaniem stylu na swojej stronie domowej. Cala strona jest oparta o automatyczne przeskalowywanie siebie samej (system podobny do np. www.komputronik.pl), problem w tym, ze jest ona zbudowana w standardzie XHTML 1.1 :-) .
Rozkład katalogów:
index.php
[data]
sitemap.xml
[engine]
image.php
style.php
[engine\styles]
main.css.php
[engine\templates]
body.tpl.php
header.tpl.php
[flash]
display.swf
logo.swf
menu.swf
[icon]
icon.ico
[images]
bottom.jpg
cloud1.jpg
cloud2.jpg
sign.jpg
top.jpg
index.php
<?php
if (!isset($_GET['x']) || !isset($_GET['y']))
{
echo
("
<script language=\"JavaScript\">
var x=screen.width;
var y=screen.height;
window.location.href=\"{$_SERVER['PHP_SELF']}?x=\"+x+\"&y=\"+y;
</script>
");
}
else
{
function Resize($Size)
{
$NewX = (int)$_GET['x'];
$NewY = (int)$_GET['y'];
$OldX = 1024;
$OldY = 768;
$ScaleX = $NewX/$OldX;
$ScaleY = $NewY/$OldY;
if ($ScaleX > $ScaleY)
{
$Factor = $ScaleY;
}
else
{
$Factor = $ScaleX;
}
$Answer = $Factor * $Size;
echo((int)$Answer);
}
include('engine/templates/header.tpl.php');
include('engine/templates/body.tpl.php');
}
?>
style.php
<?php
if (isset($_GET['kind']))
{
$Kind=$_GET['kind'];
}
else
{
break;
}
Header('Content_type: text/css');
switch($Kind)
{
case 'script':
echo(include('styles/script.css.php'));
break;
case 'error':
echo(include('styles/error.css.php'));
break;
case 'main':
echo(include('styles/main.css.php'));
break;
}
?>
main.css.php
a:link, a:visited, a:hover {
text-decoration:none;
color:#B2B2B2;
background-color: white;
}
body, td {
margin-bottom: 0px;
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
background-color: white;
font-family: Arial, Helvetica, sans-serif;
color: #b2b2b2;
}
h1 {
font-weight: bold;
font-size: <? Resize(14); ?>px;
}
table {
width: 100%;
border: 0px;
padding: 0px;
border-spacing: 0px;
}
.master-table {
vertical-align: middle;
text-align: center;
}
.logo-table {
height: <? Resize(110); ?>px;
}
.menu-table {
height: <? Resize(49); ?>px;
}
.border-table {
height: <? Resize(56); ?>px;
}
.content-table {
height: <? Resize(260); ?>px;
}
.copyright-table {
height: <? Resize(30); ?>px;
}
.cloud1-td {
background-image: url(../image.php?name=cloud1.jpg&x=<? Resize(233); ?>&y=<? Resize(110); ?>);
background-repeat: no-repeat;
width: <? Resize(233); ?>px;
white-space: nowrap;
}
.cloud2-td {
background-image: url(../image.php?name=cloud2.jpg&x=<? Resize(233); ?>&y=<? Resize(49); ?>);
background-repeat: no-repeat;
width: <? Resize(233); ?>px;
white-space: nowrap;
}
.top-td {
background-image: url(../image.php?name=top.jpg&x=<? Resize(610); ?>&y=<? Resize(56); ?>);
background-repeat: no-repeat;
width: <? Resize(610); ?>px;
white-space: nowrap;
}
.bottom-td {
background-image: url(../image.php?name=bottom.jpg&x=<? Resize(610); ?>&y=<? Resize(56); ?>);
background-repeat: no-repeat;
width: <? Resize(610); ?>px;
white-space: nowrap;
}
.logo-td, .menu-td {
width: <? Resize(610); ?>px;
white-space: nowrap;
vertical-align: middle;
text-align: right;
}
.content-td {
width: <? Resize(610); ?>px;
white-space: nowrap;
vertical-align: top;
text-align: justify;
font-size: <? Resize(14); ?>px;
}
.w233-td {
width: <? Resize(233); ?>px;
white-space: nowrap;
vertical-align: middle;
text-align: center;
}
#w610-td {
width: <? Resize(610); ?>px;
white-space: nowrap;
vertical-align: middle;
text-align: center;
font-size: <? Resize(10); ?>px;
}
.sign-img {
width: <? Resize(20); ?>px;
height: <? Resize(20); ?>px;
}
header.tpl.php
<?php
echo
'
<?xml version="1.0" encoding="iso-8859-2" ?>
<?xml-stylesheet type="text/css" href="engine/style.php?kind=main&x='.$_GET['x'].'&y='.$_GET['y'].'"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="pl">
<head>
<meta http-equiv="Content-type" content="text/html; charset=iso-8859-2" />
<meta http-equiv="Reply-to" content="[email protected]" />
<meta http-equiv="Content-Language" content="pl" />
<meta http-equiv="Page-Enter" content="RevealTrans(Duration=3,Transition=12)" />
<meta name="Keywords" content="archiwizacja, archiwizacje, bezpieczenstwo, czyszczenie, dane, danych, demontaz, domowa, domowych, doradztwo, dostosowywanie, firma, firmowych, instalacja, instalacje, klient, klienta, klientów, komfort, komfortowe, komputer, komputerowe, komputerów, komputery, konfiguracja, konfiguracji, konfigurowanie, konserwacja, konserwacje, mala, malych, malym, modernizacja, modernizowanie, montaz, naprawa, naprawach, naprawy, obsluga, obslugiwanie, operacyjnego, operacyjny, oprogramowania, oprogramowanie, osobiste, osobisty, osobistych, PC, podzespolów, podzespolu, Poznan, Poznanskie, profesjonalna, profesjonalne, profesjonalnie, rozbudowa, rozbudowywanie, serwis, serwisant, serwisanta, serwisie, serwisu, sieci, sieciowe, siec, sprawdzanie, sprawdzenie, sprzedawanie, sprzedaz, Swarzedz, Swarzedzu, system, systemu, testowanie, usluga, uslugi, usterek, usterka, usterki, utrzymanie, wielkopolska, wielkopolskie" />
<meta name="Description" content="Strona firmowa "Reliable". Specjalizujemy sie w naprawach i konserwacji wszelkiego rodzaju sprzetu komputerowego, a takze w tworzeniu, obsludze, utrzymaniu i zabezpieczaniu sieci komputerowych." />
<meta name="Author" content="Reliable" />
<meta name="Robots" content="ALL" />
<link rel="Shortcut Icon" href="icon/icon.ico" />
<title>
Reliable - Profesjonalne Uslugi Komputerowe
</title>
<link rel="stylesheet" type="text/css" href="engine/style.php?kind=main&x='.$_GET['x'].'&y='.$_GET['y'].'" />
'
?>
body.tpl.php
<body>
<table class="master-table">
<tr>
<td>
<table class="logo-table">
<tr>
<td> </td>
<td class="cloud1-td"> </td>
<td class="logo-td">
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="<? Resize(460); ?>" height="<? Resize(90); ?>" id="logo" align="center">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="flash/logo.swf" />
<param name="menu" value="false" />
<param name="loop" value="false" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<embed src="flash/logo.swf" menu="false" loop="false" quality="high" bgcolor="#ffffff" width="<? Resize(460); ?>" height="<? Resize(90); ?>" name="logo" align="center" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
</td>
<td> </td>
</tr>
</table>
<table class="menu-table">
<tr>
<td> </td>
<td class="cloud2-td"> </td>
<!-- Menu Begin //-->
<td class="menu-td">
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="<? Resize(460); ?>" height="<? Resize(49); ?>" id="menu" align="right">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="flash/menu.swf" />
<param name="menu" value="false" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<embed src="flash/menu.swf" menu="false" quality="high" bgcolor="#ffffff" width="<? Resize(460); ?>" height="<? Resize(49); ?>" name="menu" align="right" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
</td>
<!-- Menu End //-->
<td> </td>
</tr>
</table>
<table class=".border-table">
<tr>
<td> </td>
<td class="w233-td">
<td class="top-td"> </td>
<td> </td>
</tr>
</table>
<table class="content-table">
<tr>
<td> </td>
<td class="w233-td">
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0" width="<? Resize(233); ?>" height="<? Resize(260); ?>" id="display" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="flash/display.swf" />
<param name="menu" value="false" />
<param name="loop" value="false" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<embed src="flash/display.swf" menu="false" loop="false" quality="high" bgcolor="#ffffff" width="<? Resize(233); ?>" height="<? Resize(260); ?>" name="display" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
</td>
<td class="content-td">
<!-- Content Begin //-->
<blockquote>
<b>
Wstep
</b>
<p>
xxxxxxx
</p>
<p>
xxxxxxx
</p>
<p>
xxxxxxx
</p>
</blockquote>
<!-- Content End //-->
</td>
<td> </td>
</tr>
</table>
<table class=".border-table">
<tr>
<td> </td>
<td class="w233-td"> </td>
<td class="bottom-td"> </td>
<td> </td>
</tr>
</table>
<table class="copyright-table">
<tr>
<td> </td>
<td class="w233-td"> </td>
<td class="w610-td">
Copyrigt by Reliable©.
<img class="sign-img" src="images/sign.jpg">
<a href="data/sitemap.xml">
Site Map
</a>
</td>
<td> </td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>