<!-- -*- PHP -*- -->
<!-- $Id$ -->
<!-- Last Update: "2005/06/13 08:25:28 makoto" -->
<html>
<head>
<link rel=stylesheet href="./.css">
<title>¤è¤¦¤³¤½
</title>
</head>
<body>
<?php
// http://www.php.net/manual/ja/index.php
include '.ptr.php';
?>
<h1> </h1>
<? php
function get_lastpostdate($timezone = 'server') {
        global $tableposts, $cache_lastpostdate, $pagenow, $wpdb;
        $add_seconds_blog = get_settings('gmt_offset') * 3600;
        $add_seconds_server = date('Z');
        $now = current_time('mysql', 1);
        if ( !isset($cache_lastpostdate[$timezone]) ) {
                switch(strtolower($timezone)) {
                        case 'gmt':
                                $lastpostdate = $wpdb->get_var("SELECT post_date_gmt FROM $tableposts WHERE post_date_gmt <= '$now' AND post_status = 'publish' ORDER BY post_date_gmt DESC L
IMIT 1");
                                break;
                        case 'blog':
                                $lastpostdate = $wpdb->get_var("SELECT post_date FROM $tableposts WHERE post_date_gmt <= '$now' AND post_status = 'publish' ORDER BY post_date_gmt DESC LIMIT
 1");
                                break;
                        case 'server':
                                $lastpostdate = $wpdb->get_var("SELECT post_date_gmt + interval '$add_seconds_server second' FROM $tableposts WHERE post_date_gmt <= '$now' AND post_status =
 'publish' ORDER BY post_date_gmt DESC LIMIT 1");
                                break;
                }
                $cache_lastpostdate[$timezone] = $lastpostdate;
        } else {
                $lastpostdate = $cache_lastpostdate[$timezone];
        }
        return $lastpostdate;
}
?>
</body>
</html>
<?php
?>