コード例 #1
0
<?php

// FireBlog 1.0 Index page
// Copyright (C) Alex Smith 2005
// Initialize FireBlog
require 'inc/core.inc.php';
fb_init();
if (isset($_GET['module'])) {
    // Load the specified module
    $module = $_GET['module'];
    if (is_file("modules/{$module}.php")) {
        require "modules/{$module}.php";
    } else {
        echo 'I\'m sorry, but the module requested, ' . $module . ', doesn\'t exist';
    }
} else {
    // Load our default module
    echo '<h3>' . get_pref('tagline') . '</h3><br />';
    echo get_pref('desc') . '<br /><br />';
    $module = get_pref('defmod');
    if (is_file("modules/{$module}.php")) {
        require "modules/{$module}.php";
    } else {
        echo 'Uh oh... The default module, ' . $module . ', doesn\'t exist. You should contact the site admin.';
    }
}
// End the page
fb_close();
コード例 #2
0
function head($lan = "de", $scrnTtl, $url = "", $mbl = "N")
{
    $ret = '<!DOCTYPE html>';
    switch ($lan) {
        case "de":
            $ret .= '<html lang="de">';
            break;
        case "ch":
            $ret .= ' <html lang="zh">';
            break;
        default:
            $ret .= ' <html lang="en">';
    }
    $ret .= '<head>
  	<meta charset="utf-8"/> 
   	<meta http-equiv="X-UA-Compatible" content="IE=edge" />
   	<meta name="viewport" content="width=device-width, initial-scale=1" />
   	<meta name="author" content="Guy Lancaster" />
   	<link rel="shortcut icon" href="favicon.ico" type="image/x-icon" /> 
   	<link rel="icon" href="favicon.ico" type="image/x-icon" />';
    if (strlen($url) > 0) {
        if ($mbl == "Y") {
            $ret .= '<link rel="alternate" media="only screen and (max-width: 640px)" href="http://cuthbertson.de/m.' . $url . '" >';
        } else {
            $ret .= '<link rel="canonical" href="http://cuthbertson.de/' . $url . '" >';
        }
    }
    switch ($lan) {
        case "de":
            $ret .= '<title>William Cuthbertson klassischer Pianist - ' . $scrn . '</title>';
            $ret .= '<meta name="keywords" content="Piano, Klavier, Chopin, Beethoven, William, Cuthbertson, Waldkirch, Konzerte,' . $scrn . ' " />';
            $ret .= '<meta name="description" content="William Cuthbertson - Pianist, Komponist, Lehrer, Composer, Teacher,' . $scrn . ' " />';
            break;
        case "ch":
            $ret .= '<title>William Cuthbertson Classical Pianist - ' . $scrn . '</title>';
            $ret .= '<meta name="keywords" content=" 肖邦,贝多芬,   钢琴,  作曲家,  教师, Piano, Klavier, Chopin, Beethoven, William, Cuthbertson, Waldkirch, Konzerte,' . $scrn . ' " />';
            $ret .= '<meta name="description" content="William Cuthbertson - Classical Pianist, Composer, Teacher,' . $scrn . ' " />';
            break;
        default:
            $ret .= '<title>William Cuthbertson - Classical Pianist - ' . $scrn . '</title>';
            $ret .= '<meta name="keywords" content="Piano, Chopin, Beethoven, William, Cuthbertson, Waldkirch, Concerts,' . $scrn . ' " />';
            $ret .= '<meta name="description" content="William Cuthbertson - Pianist, Accompanyist, Composer, Teacher,' . $scrn . ' " />';
    }
    $ret .= '<meta name="viewport" content="width=device-width, initial-scale=1">
		   <link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.css">
		   <script src="http://code.jquery.com/jquery-1.11.3.min.js"></script>
		   <script src="http://code.jquery.com/mobile/1.4.5/jquery.mobile-1.4.5.min.js"></script>';
    $ret .= "<link href='http://fonts.googleapis.com/css?family=Old+Standard+TT:400,700' rel='stylesheet' type='text/css'>";
    $ret .= '<link rel="stylesheet" href="css/m.css">';
    $ret .= fb_init();
    $ret .= google_init($lan);
    $ret .= '</head>';
    return $ret;
}