sqlQuery($sql); /********************* PC版とスマホ版の振り分け *********************/ $ua = $_SERVER['HTTP_USER_AGENT']; //PC版 if(!((strpos($ua, 'iPhone') !== false) || ((strpos($ua, 'Android') !== false) && (strpos($ua, 'Mobile') !== false)) || (strpos($ua, 'Windows Phone') !== false) || (strpos($ua, 'BlackBerry') !== false))){ //スケジュールタグの作成 $notice_tag = ""; $notice_count = 0; foreach( $rows as $row ){ $title = $row["title"]; $start = $row["start"]; $start_year = date( "Y", strtotime($start) ); $start_month = date( "n", strtotime($start) ); $start_day = date( "j", strtotime($start) ); $start_month_0 = date( "m", strtotime($start) ); $start_day_0 = date( "d", strtotime($start) ); $is_new = $row["is_new"]; $is_new_tag = $is_new ? "" : ""; $category = $row["category"]; $comment = $row["comment"]; $url = $row["url"]; //カテゴリによるクラス名の設定 if( $category == 1 ){ $category_class = "category_1"; } elseif( $category == 2 ){ $category_class = "category_2"; } else { $category_class = "category_3"; } $notice_count++; $notice_tag .= << EOT; } $notice_tag .= "
{$is_new_tag} {$start_year}/{$start_month_0}/{$start_day_0} {$title} {$comment}
"; print << 桜田淳美 OFFICIAL WEBSITE 本日もあずましく
EOT; //スマホ } else { //スケジュールタグの作成 $notice_tag = "
"; print << 桜田淳美 OFFICIAL WEBSITE 本日もあずましく