4 .tab-bold { font-weight: bold; }
5 .post-type { font-family: monospace; }
6 .nowrap { white-space: nowrap; }
7 .centered { text-align: center; }
10 <script type="text/javascript" src="objednavka.js"></script>
14 include("common.php");
16 <h1 class="centered"><img src="img/eap-title.png" alt="Teplo & Peníze" /></h1>
20 function title_table_month($year,$month)
22 $size_width_s= 98; $size_height_s=138;
23 $size_width =486; $size_height =688;
25 $base=sprintf("img/eap-%04d-%02d",$year,$month+1);
26 $name=sprintf( "%04d/%02d",$year,$month+1);
27 print("<a href=\"${base}.jpg\">"
28 ."<img src=\"${base}s.jpg\" width=\"$size_width_s\" height=\"$size_height_s\""
29 ." style=\"border:0;width:${size_width_s}px;height:${size_height_s}px\" alt=\"titulní stránka $name\" /><br />\n"
34 function title_table_year($year,$month_max=11)
38 print("<table border=\"0\" width=\"100%\"><tr><td align=\"center\"><table border=\"1\" cellpadding=\"5\">\n");
39 for ($month=0;$month<=$month_max;$month++) {
40 if (($month%$split)==0)
42 print("<td align=\"center\">");
43 title_table_month($year,$month);
45 if (($month%$split)==$split-1 || $month==$month_max)
48 print("</table></td></tr></table>");
51 title_table_year(2001,5);
57 <form action="objednavka.php<?php print($have_js); ?>" method="post">
58 <table border="0" width="100%">
59 <tr><td align="center"><table border="1" width="90%">
60 <tr><td align="center"><table border="0">
62 function tab_left($name)
63 { print("<td>Objednávám(e)</td><td><input type=\"text\" name=\"$name\" size=\"2\" onkeyup=\"sum_price(this)\" onchange=\"sum_price(this)\" /> (krát)</td>\n"); }
65 <tr class="tab-bold"><?php tab_left("want_phys_2001"); ?><td>pøedplatné na rok 2001 za zvýhodnìnou cenu 360Kè</td></tr>
66 <tr><?php tab_left("want_phys_2000"); ?><td>roèník 2000 za cenu 150 Kè</td></tr>
69 if (!($f=fopen("objednavka.js","r")))
70 fatal("Nepodaøilo se naèíst seznam dostupného zbo¾í");
71 while (($s=fgets($f,0x1000))) {
74 if (!(ereg("^want_price\\[ *'cd_([^']*)'\\]=([0-9]*);\$",$s,$o_matched)))
76 $o_year =$o_matched[1];
77 $o_price=$o_matched[2];
79 tab_left("want_cd_$o_year");
80 print("<td>roèník $o_year na CD za cenu $o_price Kè</td></tr>\n");
85 <tr><td colspan="3"><hr /></td></tr>
86 <tr><td colspan="3">Celková cena: <input type="text" name="price" value="0" size="5" readonly="readonly" /> Kè</td></tr>
93 function print_addr($title,$pfx,$ico)
96 <tr><td align="center"><table border="0">
97 <colgroup width="0*" span="3" />
98 <tr><td colspan="3" align="center" class="tab-bold"><?php print($title); ?></td></tr>
99 <tr><td class="nowrap">Název firmy / Jméno:</td><td colspan="2"><input type="text" name="<?php print("${pfx}name"); ?>" size="60" /></td></tr>
100 <tr><td valign="top">Adresa:</td><td colspan="2"><table border="0">
101 <colgroup width="0*" span="3" />
102 <tr><td>Ulice:</td><td colspan="2"><input type="text" name="<?php print("${pfx}ulice"); ?>" size="60" /></td></tr>
103 <tr><td>Mìsto:</td><td ><input type="text" name="<?php print("${pfx}mesto"); ?>" size="30" /></td>
104 <td>PSÈ: <input type="text" name="<?php print("${pfx}psc"); ?>" size="5" maxlength="5" /></td></tr>
109 <tr><td>IÈO:</td><td ><input type="text" name="<?php print("${pfx}ico"); ?>" size="20" /></td>
110 <td>DIÈ: <input type="text" name="<?php print("${pfx}dic"); ?>" size="20" /></td></tr>
114 <tr><td class="nowrap">Kontaktní osoba:</td ><td colspan="2"><input type="text" name="<?php print("${pfx}contact"); ?>" size="60" /></td></tr>
115 <tr><td>Telefon:</td><td><input type="text" name="<?php print("${pfx}tel"); ?>" size="25" /></td>
116 <td>Fax: <input type="text" name="<?php print("${pfx}fax"); ?>" size="25" /></td></tr>
117 <tr><td>e-mail:</td ><td colspan="2"><input type="text" name="<?php print("${pfx}mail"); ?>" size="40" /></td></tr>
122 print_addr("Adresa pro vystavení a zaslání faktury" ,"addr1_",true);
123 print_addr("Adresa pro zasílaní èasopisu (jen pokud se li¹í)","addr2_",false);
126 <tr><td><table border="0">
127 <tr><td align="center" class="tab-bold">Jiné sdélení redakci</td></tr>
128 <tr><td><textarea name="comments" rows="5" cols="100"></textarea></td></tr>
130 <tr><td align="center"><input type="submit" value="Ode¹li závaznou objednávku" onclick="return(validate(this.form))" /></td></tr>