Multi categories for the same picture

git-svn-id: http://piwigo.org/svn/trunk@61 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
z0rglub
2003-08-30 15:54:37 +00:00
parent b5bc939149
commit 044fba0256
17 changed files with 860 additions and 325 deletions
+26
View File
@@ -349,4 +349,30 @@ function templatize_array( $array, $global_array_name, $handle )
$vtp->setGlobalVar( $handle, $value, ${$global_array_name}[$value] );
}
}
function format_date( $date, $type = 'us', $show_time = false )
{
global $lang;
switch ( $type )
{
case 'us' :
list( $year,$month,$day ) = explode( '-', $date );
$unixdate = mktime(0,0,0,$month,$day,$year);
break;
case 'unix' :
$unixdate = $date;
break;
}
$formated_date = $lang['day'][date( "w", $unixdate )];
$formated_date.= date( " j ", $unixdate );
$formated_date.= $lang['month'][date( "n", $unixdate )];
$formated_date.= date( ' Y', $unixdate );
if ( $show_time )
{
$formated_date.= date( ' G:i', $unixdate );
}
return $formated_date;
}
?>