function wptouch_core_subheader()
{
    $useragent = @$_SERVER['HTTP_USER_AGENT'];
    function agent($browser)
    {
        strstr($_GLOBALS['useragent'], $browser);
    }
    if (agent("iphone", "ipod") != FALSE) {
        include dirname(__FILE__) . '/../core/core-else-menu.php';
    } else {
        include dirname(__FILE__) . '/../core/core-apple-menu.php';
    }
}
示例#2
0
if (!$_) {
    agent();
    return;
}
extract($_);
if ($debug === true) {
    debugOn();
}
$ip = ip();
switch ($mode) {
    case "write":
        $today = getdate()[0];
        $f = fopen("archive/index-{$today}-{$ip}.html", "w+");
        chmod($handle, 0777);
        fwrite($f, $content);
        fwrite($f, agent(true));
        fclose($f);
        $f = fopen($handle, "w+");
        chmod($handle, 0777);
        fwrite($f, $content);
        fclose($f);
        break;
    case "mkdir":
        mkdir($handle) or die($handle . " not created.\n");
        chmod($handle, 0777);
        echo $handle . " created.\n";
        break;
    case "touch":
    case "mk":
        $f = fopen($handle, "w");
        chmod($handle, 0777);