Events in Fukuoka, Kyushu

福岡、九州のイベント情報をこのページ登録しませんか?無料で出来ます。詳しくはこちらへ。
require_once('./wp-load.php' );

$arrival = $_GET["arrival"];
$nights = $_GET["nights"];
$name = $_GET["name"];
$source = $_GET["source"];

$nights = $nights+3;
$arrival_y = substr( $arrival, 0, 4);
$arrival_m = substr( $arrival, 5, 2);
$arrival_d = substr( $arrival, 8, 2);
$stamp = mktime("00","00","00",$arrival_m,$arrival_d,$arrival_y);
$dey_front = date("Y-m-d H:i:s", $stamp - (2 * 24 * 60 * 60));
$dey_tail = date("Y-m-d H:i:s", $stamp + ($nights * 24 * 60 * 60));
$today = date("Y-m-d");

if($source == ""){
upcoming();
}
elseif($source == "mail" or $source == "form"){
term();
}
else{
upcoming();
}

function upcoming(){
$today = date("Y-m-d");
//今日から先のイベント取得
$sql1="SELECT p.ID as id, s.start as start, s.end as end, p.post_title as title
from wp_ec3_schedule as s
inner join wp_posts as p
on p.ID = s.post_id
inner join wp_icl_translations as t
on p.ID = t.element_id
WHERE s.start >= ‘$today’ AND (p.post_status = ‘publish’) AND t.language_code = ‘en’
order by s.start ASC limit 0, 7″;
//今日より前に始まっているイベント取得
$sql2=”SELECT p.ID as id, s.start as start, s.end as end, p.post_title as title
from wp_ec3_schedule as s
inner join wp_posts as p
on p.ID = s.post_id
inner join wp_icl_translations as t
on p.ID = t.element_id
WHERE (‘$today’ BETWEEN s.start AND s.end) AND (p.post_status = ‘publish’) AND t.language_code = ‘en’
order by s.start ASC limit 0, 7″;

$res = mysql_query($sql1) or die(mysql_error());
$num = mysql_num_rows($res);
$res2 = mysql_query($sql2) or die(mysql_error());
$num2 = mysql_num_rows($res2);

if($num==’0′ AND $num2==’0′){
print(‘

There is no Events on these days currently

Please follow our twitter or RSS. We will announce when we find NEW EVENTS.

Other general what to see in Fukuoka CLICK HERE.

‘);
}
elseif($num==’0′ AND $num2!=’0′){
print(‘

The events in Fukuoka now on

    ‘);
    while($row2 = mysql_fetch_array($res2)){
    $start2 = substr($row2["start"], 0, 10);
    $end2 = substr($row2["end"], 0, 10);
    if($start2 != $end2){
    print(‘

  • ‘.get_the_post_thumbnail($row2["id"]).’ ‘.$row2["title"].’
    ‘.substr($row2["start"],0,10).’ to ‘.substr($row2["end"],0,10).’
  • ‘);
    }else{
    print(‘

  • ‘.get_the_post_thumbnail($row2["id"]).’ ‘.$row2["title"].’
    ‘.substr($row2["start"],0,10).’
  • ‘);
    }
    }
    print(‘

    Please follow our twitter or RSS. We will announce when we find NEW EVENTS.

    Other general what to see in Fukuoka CLICK HERE.

‘);
}
elseif($num!=’0′ AND $num2==’0′){
print(‘

Upcoming events in Fukuoka

    ‘);
    while($row = mysql_fetch_array($res)){
    $start = substr($row["start"], 0, 10);
    $end = substr($row["end"], 0, 10);
    if($start != $end){
    print(‘

  • ‘.get_the_post_thumbnail($row["id"]).’ ‘.$row["title"].’
    ‘.substr($row["start"],0,10).’ to ‘.substr($row["end"],0,10).’
  • ‘);
    }else{
    print(‘

  • ‘.get_the_post_thumbnail($row["id"]).’ ‘.$row["title"].’
    ‘.substr($row["start"],0,10).’
  • ‘);
    }
    }
    print(‘

    Please follow our twitter or RSS. We will announce when we find NEW EVENTS.

    Other general what to see in Fukuoka CLICK HERE.

‘);
}
elseif($num!=’0′ AND $num2!=’0′){

print(‘

The events in Fukuoka now on

    ‘);
    while($row2 = mysql_fetch_array($res2)){
    $start2 = substr($row2["start"], 0, 10);
    $end2 = substr($row2["end"], 0, 10);
    if($start2 != $end2){
    print(‘

  • ‘.get_the_post_thumbnail($row2["id"]).’ ‘.$row2["title"].’
    ‘.substr($row2["start"],0,10).’ to ‘.substr($row2["end"],0,10).’
  • ‘);
    }else{
    print(‘

  • ‘.get_the_post_thumbnail($row2["id"]).’ ‘.$row2["title"].’
    ‘.substr($row2["start"],0,10).’
  • ‘);
    }
    }
    print(‘

‘);
print(‘

Upcoming events in Fukuoka

    ‘);
    while($row = mysql_fetch_array($res)){
    $start = substr($row["start"], 0, 10);
    $end = substr($row["end"], 0, 10);
    if($start != $end){
    print(‘

  • ‘.get_the_post_thumbnail($row["id"]).’ ‘.$row["title"].’
    ‘.substr($row["start"],0,10).’ to ‘.substr($row["end"],0,10).’
  • ‘);
    }else{
    print(‘

  • ‘.get_the_post_thumbnail($row["id"]).’ ‘.$row["title"].’
    ‘.substr($row["start"],0,10).’
  • ‘);
    }
    }

    print(‘

    Please follow our twitter or RSS. We will announce when we find NEW EVENTS.

    Other general what to see in Fukuoka CLICK HERE.

‘);
}
}

function term(){
$today = date(“Y-m-d”);
$arrival = $_GET["arrival"];
$nights = $_GET["nights"];
$name = $_GET["name"];
$source = $_GET["source"];

$nights = $nights+3;
$arrival_y = substr( $arrival, 0, 4);
$arrival_m = substr( $arrival, 5, 2);
$arrival_d = substr( $arrival, 8, 2);
$stamp = mktime(“00″,”00″,”00″,$arrival_m,$arrival_d,$arrival_y);
$dey_front = date(“Y-m-d H:i:s”, $stamp – (2 * 24 * 60 * 60));
$dey_tail = date(“Y-m-d H:i:s”, $stamp + ($nights * 24 * 60 * 60));

$sql1=”SELECT p.ID as id, s.start as start, s.end as end, p.post_title as title
from wp_ec3_schedule as s
inner join wp_posts as p
on p.ID = s.post_id
inner join wp_icl_translations as t
on p.ID = t.element_id
WHERE((‘$dey_front’ BETWEEN start AND end) or (‘$dey_tail’ BETWEEN start AND end) or (start BETWEEN ‘$dey_front’ AND ‘$dey_tail’ AND end BETWEEN ‘$dey_front’ AND ‘$dey_tail’)) AND (p.post_status = ‘publish’) AND t.language_code = ‘en’
order by s.start ASC”;

$res = mysql_query($sql1) or die(mysql_error());
$num = mysql_num_rows($res);

if($num==’0′){
print(‘

There is no Events on these days currently

Please follow our twitter or RSS. We will announce when we find NEW EVENTS.

Other general what to see in Fukuoka CLICK HERE.

‘);
}else{
if($source==”form”){
echo “

The Events around you selected date (“.$arrival.”)

“;
}
elseif($source==”mail”){
echo “

The Events around your itinerary (“.$arrival.”)

“;
}
else{

}
print(‘

    ‘);
    while($row = mysql_fetch_array($res)){
    $start = substr($row["start"], 0, 10);
    $end = substr($row["end"], 0, 10);
    if($start != $end){
    print(‘

  • ‘.get_the_post_thumbnail($row["id"]).’ ‘.$row["title"].’
    ‘.substr($row["start"],0,10).’ to ‘.substr($row["end"],0,10).’
  • ‘);
    }else{
    print(‘

  • ‘.get_the_post_thumbnail($row["id"]).’ ‘.$row["title"].’
    ‘.substr($row["start"],0,10).’
  • ‘);
    }
    }
    print(‘

    Please follow our twitter or RSS. We will announce when we find NEW EVENTS.

    Other general what to see in Fukuoka CLICK HERE.

    ‘);
    print(‘

‘);
}
}
?>

cleaner 募集

カオサン福岡ではお掃除ヘルパーさんを募集しています。詳しくは画像をクリックしてください。