view reclib.php @ 50:c18851a70d33

fix: height use real number
author Sushi-k <epgrec@park.mda.or.jp>
date Tue, 28 Jul 2009 19:18:00 +0900
parents f5a9f0eb4858
children f268d7d10590
line wrap: on
line source

<?php

// ライブラリ

function toTimestamp( $string ) {
	sscanf( $string, "%4d-%2d-%2d %2d:%2d:%2d", $y, $mon, $day, $h, $min, $s );
	return mktime( $h, $min, $s, $mon, $day, $y );
}

function toDatetime( $timestamp ) {
	return date("Y-m-d H:i:s", $timestamp);
}


function jdialog( $message, $url = "index.php" ) {
    header( "Content-Type: text/html;charset=utf-8" );
    exit( "<script type=\"text/javascript\">\n" .
          "<!--\n".
         "alert(\"". $message . "\");\n".
         "window.open(\"".$url."\",\"_self\");".
         "// -->\n</script>" );
}

?>