return($row[0]);
}
-function month_full($year,$month,$month_last=0)
+function month_a($year,$month,$month_last=0)
{
global $tb_obsah;
if (!$month_last)
$month_last=db_item("select month_last from $tb_obsah where year='$year' and month='$month'");
- return(sprintf("%02d".($month==$month_last ? "" : "-%02d"),$month,$month_last));
+ $month_full=sprintf("%02d".($month==$month_last ? "" : "-%02d"),$month,$month_last);
+
+ $r=array("year"=>$year,"month"=>$month,"month_last"=>$month_last,"month_full"=>$month_full,
+ "name"=>"$year/${month_full}",
+ "img" =>"img/eap-$year-${month_full}.jpg",
+ "icon"=>"img/eap-$year-${month_full}s.jpg",
+ );
+ return($r);
}
-function img_size($width,$height)
+function img_size($width,$height=0)
{
+ if (!$height)
+ list($width,$height)=getimagesize($width);
return("style=\"border:0;width:${width}px;height:${height}px\" width=\"$width\" height=\"$height\"");
}