From 5edc2041acd486869b4b5644afb800bcc3e71b7f Mon Sep 17 00:00:00 2001 From: short <> Date: Fri, 28 Sep 2001 03:49:42 +0000 Subject: [PATCH] +function db_array() (differentiate from db_row()!) title_icons_table_month(): now references all articles, if found Fixed .htmlspecialchars() enwrapping for $title_tail --- common.php | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/common.php b/common.php index ab99ea7..4c6a1aa 100644 --- a/common.php +++ b/common.php @@ -105,6 +105,14 @@ function db_row($query) return($r); } +function db_array($query) +{ + $q=db_query($query); + $r=mysql_fetch_array($q); + mysql_free_result($q); + return($r); +} + function db_item($query) { $row=db_row($query); @@ -210,11 +218,14 @@ function title_month($year,$month) function title_icons_table_month($year,$month,$month_last,$sequential) { + global $tb_clanek; + $month_a=month_a($year,$month,$month_last,$sequential); print("" .img($month_a["icon"],"titulní stránka ".$month_a["name_full"])."
" - ."obsah ".$month_a["name"]."" - ); + ."obsah ".$month_a["name"].""); + if (db_item("select count(*) from $tb_clanek where year=$year and month=$month")) + print("
ukázka èlánkù"); } function title_icons($year,$month) @@ -361,7 +372,7 @@ function heading() Energie & peníze<?php if (isset($title_tail)) - print(": $title_tail"); + print(": ".htmlspecialchars($title_tail)); print("\n"); if ($have_css) { ?>