$row[0],'tittle'=>$row[1],'comment'=>nl2br($row[2]),'date'=>$row[3]); } fclose($handle); foreach($whatsnew as $key => $row){ $id[$key] = $row['id']; $date[$key] = $row['date']; } array_multisort($id, SORT_DESC, $whatsnew); $whatsnew = $whatsnew[0]; // ---------------------------------- // カバーガール・ランダム // ---------------------------------- // 初期化 $cover_images = array(); $images_num =0; foreach (glob('../file/i_cover/*.jpg') as $images_name){ $cover_images[$images_num] = $images_name; $images_num++; } $images_num--; srand((double)microtime()*1000000); $rand_number = round(rand(0,$images_num)); // ---------------------------------- // ぐーぐる // ---------------------------------- // Copyright 2009 Google Inc. All Rights Reserved. $PAGE_TITTLE = "携帯-TOP"; $GA_ACCOUNT = "MO-16339768-5"; $GA_PIXEL = "ga.php"; function googleAnalyticsGetImageUrl() { global $PAGE_TITTLE ,$GA_ACCOUNT, $GA_PIXEL; $url = ""; $url .= $GA_PIXEL . "?"; $url .= "utmac=" . $GA_ACCOUNT; $url .= "&utmn=" . rand(0, 0x7fffffff); $url .= "&utmdt=" . urlencode($PAGE_TITTLE); $referer = $_SERVER["HTTP_REFERER"]; $query = $_SERVER["QUERY_STRING"]; $path = $_SERVER["REQUEST_URI"]; if (empty($referer)) { $referer = "-"; } $url .= "&utmr=" . urlencode($referer); if (!empty($path)) { $url .= "&utmp=" . urlencode($path); } $url .= "&guid=ON"; return $url; } $googleAnalyticsImageUrl = googleAnalyticsGetImageUrl(); // ------------------------ // Smartyに割り当て // ------------------------ // メッセージ $smarty->assign("whatsnew",$whatsnew); $smarty->assign("rand_number",$rand_number); $smarty->assign("googleAnalyticsImageUrl",$googleAnalyticsImageUrl); // ------------------------ // Smartyを表示 // ------------------------ $smarty->display('i_top.tpl'); ?>