comparison reclib.php @ 1:f5a9f0eb4858

deleted: LICENSE.ja
author Sushi-k <epgrec@park.mda.or.jp>
date Wed, 08 Jul 2009 11:44:50 +0900
parents
children f268d7d10590
comparison
equal deleted inserted replaced
0:96312e6ab8d4 1:f5a9f0eb4858
1 <?php
2
3 // ライブラリ
4
5 function toTimestamp( $string ) {
6 sscanf( $string, "%4d-%2d-%2d %2d:%2d:%2d", $y, $mon, $day, $h, $min, $s );
7 return mktime( $h, $min, $s, $mon, $day, $y );
8 }
9
10 function toDatetime( $timestamp ) {
11 return date("Y-m-d H:i:s", $timestamp);
12 }
13
14
15 function jdialog( $message, $url = "index.php" ) {
16 header( "Content-Type: text/html;charset=utf-8" );
17 exit( "<script type=\"text/javascript\">\n" .
18 "<!--\n".
19 "alert(\"". $message . "\");\n".
20 "window.open(\"".$url."\",\"_self\");".
21 "// -->\n</script>" );
22 }
23
24 ?>