Beispiel #1
0
    for ($index = 0; $index < $len; $index++) {
        $message = $data[$index]["message"];
        $normal = "https://graph.facebook.com/" . $data[$index]["obj_id"] . "/picture?type=normal";
        $thumbnail = "https://graph.facebook.com/" . $data[$index]["obj_id"] . "/picture?type=thumbnail";
        $str .= '<a title="' . $message . '" class="swipebox" href="' . $normal . '">';
        $str .= '<img src="' . $thumbnail . '" alt="image" class="img-rounded">';
        $str .= '</a>';
    }
    return $str;
}
use flight\Engine;
$app = new Engine();
$app->route('GET /', function () {
    $str = RequsetData("正妹");
    $MaleFemale = '<li>
			<a href="/beauty-nttu/man">型男版</a>
        </li>';
    Flight::render('index_view.php', array('data' => $str, 'MaleFemale' => $MaleFemale));
});
$app->route('GET /@action', function ($action) {
    $str = "";
    $MaleFemale = '<li>
			<a href="/beauty-nttu/man">型男版</a>
        </li>
		<li>
            <a href="/beauty-nttu/">正妹版</a>
        </li>';
    switch ($action) {
        case "about":
            $str = '<h2>Blog: <a href="https://peterweb-uploadspace.rhcloud.com/" target="_blank">連結網址</a></h2>';
            break;