month_full()->month_a() to unify month elements naming
authorshort <>
Thu, 16 Aug 2001 12:31:59 +0000 (12:31 +0000)
committershort <>
Thu, 16 Aug 2001 12:31:59 +0000 (12:31 +0000)
Cosmetic: Explicit db_connect() no longer needed

obsah.php

index 3a8f994..aee9ede 100644 (file)
--- a/obsah.php
+++ b/obsah.php
                $title_tail="Obsahy v¹ech èísel";
        else if (!$month)
                $title_tail="Obsahy èísel roku $year";
-       else
-               $title_tail="Obsah èísla $year/".month_full($year,$month);
+       else {
+               $month_a=month_a($year,$month);
+               $title_tail="Obsah èísla ".$month_a["name"];
+               }
 
        $head_css="
 .page { font-style: italic; }
@@ -22,7 +24,6 @@
        heading();
        print("<h1>$title_tail</h1>\n");
 
-       db_connect();
        $result=db_query("select year,month,month_last,contents from $tb_obsah"
                        .($year  ? " where year='$year'"   : "")
                        .($month ?   " and month='$month'" : "")
        if (!mysql_num_rows($result))
                fatal("Obsah po¾adovan".($month ? "ého èísla" : "ých èísel")." bohu¾el není ulo¾en");
        while ($row=mysql_fetch_array($result)) {
-               if (!$month)
-                       print("<h2>Èíslo ".$row["year"]."/".month_full($row["year"],$row["month"],$row["month_last"])."</h2>\n");
+               if (!$month) {
+                       $month_a=month_a($row["year"],$row["month"],$row["month_last"]);
+                       print("<h2>Èíslo ".$month_a["name"]."</h2>\n");
+                       }
                $contents=htmlspecialchars($sep_obsah_contents.$row["contents"]);
                $contents=ereg_replace("http://[^[:space:]$page_obsah_contents$sep_obsah_contents]+",
                                "<a href=\"\\0\">\\0</a>",$contents);