home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Chip 2003 July
/
Chip_2003-07_cd1.bin
/
internet
/
lufiweb
/
myweb
/
index
/
pohlednice.php
< prev
next >
Wrap
Text File
|
2002-12-12
|
3KB
|
130 lines
<html><head><link rel="StyleSheet" href="../styly/styl_pohlednice.css">
<!--SCRIPT LANGUAGE="JavaScript" src="../funkce.js"></SCRIPT-->
<SCRIPT Language="JavaScript"> //if (top == self) self.location.href="../index.html";
<?
// nacti parametry pohlednice
require "fce_pohlednice.php";
if($nahled=="A")
{?>
var jmeno="<?echo$jmeno;?>";
var datum="<?echo$datum; $pdatum=$datum;?>";
var text="<?echo$text;?>";
var cesta="<?echo$cesta;?>";
var x="<?echo$x;?>";
var y="<?echo$y;?>";
<?}
else
{
NajdiZaznam("pohlednice.dat",$kod);
?>
var jmeno="<?echo$dotazD[0]->Jmeno;?>";
var datum="<?echo$dotazD[0]->Datum; $pdatum=$dotazD[0]->Datum;?>";
var text="<?echo$dotazD[0]->Text;?>";
var cesta="<?echo$dotazD[0]->Cesta;?>";
var x="<?echo$dotazD[0]->X;?>";
var y="<?echo$dotazD[0]->Y;?>";
<?}
if($dotazD[0]->ID || $nahled=="A")
{
?>
/*jmeno="LuFi";
datum="1.1.2002";
text="Text pohlednice";
cesta="../fotky/obrazky/foto.jpg";
x=900;
y=600;*/
x=x*1;
y=y*1;
var maxx;
var maxy;
var kx=1;
var ky=1;
var rozmery='';
var rx;
var ry;
var koefw=0.6;
var koefh=0.6;
if(x>koefw*(screen.width-50))
{maxx=Math.floor(koefw*(screen.width-50));kx=maxx/x;}
else
{maxx=x;}
if(y>koefh*(screen.height-50))
{maxy=Math.floor(koefh*(screen.height-50));ky=maxy/y;}
else
{maxy=y;}
//alert(maxx+' '+kx);
//alert(maxy+' '+ky);
rx=x;
ry=y;
if (kx>ky)
{
rx=Math.floor(x*ky);
ry=maxy;
}
else
if (ky>kx)
{
rx=maxx;
ry=Math.floor(y*kx);
}
else
if(kx!=1)
{
rx=Math.floor(x*kx);
ry=+Math.floor(y*kx);
}
rozmery=' height='+ry+' width='+rx+' ';
//alert(rozmery);
</script>
</head>
<body>
<b><span class=text>Pohlednice z LuFi fotogalerie</span></b><br><br>
<table border=0 width=100% height=90%>
<tr>
<script language="JavaScript">
with(document)
{
write('<td '+rozmery+' align=center valign=top>')
write('<table border=0 '+rozmery+' border=0 cellpadding=0 cellspacing=0><tr><td class=bila>');
write('<img src=\"'+cesta+'\" border=0 hspace="10" vspace="10"'+rozmery+' align=center>');
write('</td></tr></table>');
}
</script>
</td>
<td rowspan=2 width=10> </td>
<td rowspan=2 align=left valign=top>
<span class=text>
<script>document.write(text);</script>
<br><br>
<script>
var datum='<?echo SubStr($pdatum,6,2).".".SubStr($pdatum,4,2).".".SubStr($pdatum,0,4)." ".SubStr($pdatum,8,2).":".SubStr($pdatum,10,2);?>';
document.write('Pohlednici posφlß '+jmeno+'.<br>'+datum+'.');
</script></span>
</td></tr>
<tr><td valign=top align=center><br>
<?if($nahled!="A"){?>
<script language="JavaScript">
document.write('<A href="pohlednice_form.php?cesta='+cesta+'&x='+x+'&y='+y+'">P°eposlat pohlednici</a>');</script>
<?}?>
<?} // konec ifu je pohlednice
else
{echo "</script></head><BODY><span class=text>Pohlednice z LuFi fotogalerie nebyla nalezena.</span><BR><b>";}
?>
<?if($nahled!="A"){?>
<A href="../../pohlednice/index.html" target="_blank">Poslat novou pohlednici</a>
<?}?>
</td></tr></table>
</BODY>
</html>