month_full()->month_a() to unify month elements naming
[www.energie.vellum.cz.git] / index.php
index 663b19a..87a9545 100644 (file)
--- a/index.php
+++ b/index.php
 
 function title_table_month($year,$month,$month_last)
 {
-       $month_full=month_full($year,$month,$month_last);
-       $base="img/eap-$year-$month_full";
-       $name=        "$year/$month_full";
-       print("<a href=\"${base}.jpg\">"
-                       ."<img src=\"${base}s.jpg\" ".img_size(98,138)." alt=\"titulní stránka $name\" /></a><br />\n"
-                       ."<a href=\"obsah.php?year=$year&month=$month\">obsah $name</a>"
+       $month_a=month_a($year,$month,$month_last);
+       print("<a href=\"title.php?year=$year&amp;month=$month\">"
+                               ."<img src=\"".$month_a["icon"]."\" ".img_size($month_a["icon"])
+                               ." alt=\"titulní stránka ".$month_a["name"]."\" /></a><br />\n"
+                       ."<a href=\"obsah.php?year=$year&amp;month=$month\">obsah ".$month_a["name"]."</a>"
                        );
 }
 
@@ -45,7 +44,7 @@ while ($row=mysql_fetch_array($result)) {
 
                $year=$row["year"];
                print("<table border=\"0\" width=\"100%\"><tr><td align=\"center\"><table border=\"1\" cellpadding=\"5\">\n"
-                               ."<tr><th colspan=\"$split\">Roèník $year (<a href=\"obsah.php?year=$year\">obsahy èísel</a>)</td></tr>\n"
+                               ."<tr><th colspan=\"$split\">Roèník $year (<a href=\"obsah.php?year=$year\">obsahy èísel</a>)</th></tr>\n"
                                );
                $fin_year="</table></td></tr></table>\n";
                $month=-$split;