view reclib.php @ 114:f854f6606fa5

mod: DB¥Æ¡¼¥Ö¥ë¹½Â¤¤òconfig.php¤«¤éÀÚ¤êÎ¥¤·¤¿
author yoneda <epgrec@park.mda.or.jp>
date Sat, 13 Mar 2010 21:37:27 +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>" );
}

?>