view reclib.php @ 4:103ca1503507

modified: do-record.sh.sample
author Sushi-k <epgrec@park.mda.or.jp>
date Wed, 08 Jul 2009 13:51:37 +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>" );
}

?>