home *** CD-ROM | disk | FTP | other *** search
Wrap
<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"; var cesta="<?echo $cesta?>"; var x="<?echo $x?>"; var y="<?echo $y?>"; /*jmeno="LuFi"; datum="1.1.2002"; text="Text pohlednice"; cesta="../fotky/obrazky/foto.jpg"; x=800; y=500;*/ 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;} 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+' '; function Nahled() { var url='pohlednice.php?jmeno='+document.pohled.od.value+'&datum='+datum+'&text='+document.pohled.text.value+'&cesta='+cesta+'&x='+x+'&y='+y+'&nahled=A'; O41o(url,screen.width-30,screen.height-50); } </script> </head> <body> <?if($odesl!="ANO"):?> <b>Pohlednice z LuFi fotogalerie</b><br> <form name=pohled method=post> <table border=0 width=100%> <tr> <script language="JavaScript"> with(document) { write('<td '+rozmery+' valign=top>') write('<table class=bila '+rozmery+' border=0 cellpadding=0 cellspanig=0><tr><td>'); //alert(cesta); write('<img src=\"'+cesta+'\" border=0 hspace="10" vspace="10"'+rozmery+'>'); write('</td></tr></table>'); write('<td width=10 rowspan=2> </td>'); } function UpravText(a) { var s=new String(a); var ret=''; var ind=0; for(i=0;i<s.length;i++) {t=s.substr(i,1); if(t<' ' || t=='#' || t=='^') {ret=ret+' ';ind=1;} else {ret=ret+t;} } if (ind) return ret; return ''; } function Kontrola() { var UT=UpravText(document.pohled.text.value); if(UT=='') { UT=UpravText(document.pohled.mail.value); if(UT=='') { UT=UpravText(document.pohled.od.value); if(UT=='') { if (confirm('Opravdu chcete odeslat pohlednici?')) {document.pohled.submit();} else {return true;} } else { document.pohled.od.value=UT; alert('JmΘno bylo upraveno.'); return true; } } else { document.pohled.mail.value=UT; alert('Adersa byla upravena.'); return true; } } else { document.pohled.text.value=UT; alert('Text zprßvy byl upraven.'); return true; } } </script> </td><td rowspan=2 align=left valign=top> <span class=text><b>Text zprßvy:</b></span><br> <Textarea cols=27 rows=15 wrap=soft name=text class=form></textarea><br> <table border=0> <tr><td><span class=text><b>Od</b><br>(jmΘno)</span></td><td><input size=18 class=form type=text name="od" value=""></input></td></tr> <tr><td><span class=text><b>Komu</b><br>(e-mail)</span></td><td><input size=18 class=form type=text name="mail" value=""></input></td></tr> </table> </td></tr> <tr><td align=center><input type=button onClick="Kontrola();" value="Odeslat" class="tlac"></input> <input type=button value="Exit" class="tlac" onClick="self.close();history.go(-1);"></input> <script> var datum='<?echo Date("YmdHi");?>'; document.write('<A style="cursor:hand;" target="obro" onclick="Nahled();">'); </script> Nßhled</a> <input type=hidden name="odesl" value="ANO"></input> <script language="JavaScript"> document.write('<input type=hidden name="x" value="'+x+'"></input>'); document.write('<input type=hidden name="y" value="'+y+'"></input>'); document.write('<input type=hidden name=cesta value=\"'+cesta+'\"></input>'); </script> </td></tr></table> </form> <?else: // **** PROGRAM ***** require "fce_pohlednice.php"; require "tppohl.php"; NactiZaznamy("pohlednice.dat"); if(SmazStareZaznamy(10)) { UlozZaznamy("pohlednice.dat"); /*NactiZaznamy("pohlednice.dat");*/ } // uloz parametry pohlednice //pridani dotazu $fp=FOpen("pohlednice.dat","a"); if($fp) { $kod=Rand()%(9000)+1000; $datum=Date("YmdHi"); FPutS($fp,$kod."_".$datum."#"); FPutS($fp,$datum."#"); FPutS($fp,$od."#",51); FPutS($fp,$text."#",1025); FPutS($fp,$cesta."#"); FPutS($fp,$x."#"); FPutS($fp,$y."^"); FClose($fp); } if ($fp) { // posli mail s pohlednici // info na strance echo Pristupy("pohlcount").". pohlednice.<br>"; echo "E-mail: ".$mail."<br>"; echo "Od: ".$od."<br>"; echo "<A href=\"../../pohlednice/ph.php?kod=".$kod."_".$datum."\">Zobrazit pohlednici</a>"; echo "<br><br><b>Pohlednice byla odeslßna.</b><br><br>"; ?> <form action="" method="post" name="Mail"> <input type="hidden" name="email" value="<?echo $mail;?>"> <input type="hidden" name="subject" value="<?echo $od."_posila_pohlednici.";?>"> <input type="hidden" name="bodytext" value="<?echo "Dobry den. ".$od." Vam posila pohlednici,".Chr(13)." kterou si muzete vyzvednout na adrese: ".Chr(13)."http://lufik.pescz.cz/pohlednice/ph.php?kod=".$kod."_".$datum.Chr(13)." Dobrou naladu a pekny den Vam preje LuFi."; ?>"> </form> <script language="JavaScript"> end_of_web_page('../index/'); formObj=document.Mail; formObj.action = "mailto:" + formObj.email.value + "?Subject=" + formObj.subject.value + "&Body="+formObj.bodytext.value; formObj.submit(); </script> <? } else { echo "<b>Pohlednice nebyla odeslßna.</b>"; } ?> <?endif?> </BODY> </html>