From ffd3bd41d1a0f91013b1e225051421de692de792 Mon Sep 17 00:00:00 2001 From: short <> Date: Sat, 2 Mar 2002 21:41:47 +0000 Subject: [PATCH 1/1] function data_href: new (optional) argument $details +function img_href --- common.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/common.php b/common.php index 118f447..59a765e 100644 --- a/common.php +++ b/common.php @@ -343,9 +343,15 @@ function usersize($size) return(round($size)." ".$suffix_a[0]."B"); } -function data_href($filename,$text) +function data_href($filename,$text,$details="") { - return("$text (".usersize(filesize($filename)).")"); + return("$text (".usersize(filesize($filename))."$details)"); +} + +function img_href($filename,$text) +{ + list($width,$height)=getimagesize($filename); + return(data_href($filename,$text,", ${width}x${height} bodù")); } function footer_img($url,$text,$size) -- 1.8.3.1