diff 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
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/reclib.php	Wed Jul 08 11:44:50 2009 +0900
@@ -0,0 +1,24 @@
+<?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>" );
+}
+
+?>
\ No newline at end of file