view reclib.php @ 5:7283cff6dacb

new file: templates_c/index.html new file: thumbs/index.html new file: video/index.html
author Sushi-k <epgrec@park.mda.or.jp>
date Wed, 08 Jul 2009 17:58: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>" );
}

?>