當前位置: 首頁>>代碼示例>>PHP>>正文


PHP main::sendHeader方法代碼示例

本文整理匯總了PHP中main::sendHeader方法的典型用法代碼示例。如果您正苦於以下問題:PHP main::sendHeader方法的具體用法?PHP main::sendHeader怎麽用?PHP main::sendHeader使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在main的用法示例。


在下文中一共展示了main::sendHeader方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: main

include './libraries/class.main.php';
include './libraries/class.play.php';
include './libraries/class.search.php';
include './libraries/class.playlist.php';
include './libraries/class.updatedb.php';
include './libraries/class.admin.php';
$mp3 = new main();
$mp3play = new play();
$mp3playlist = new playlist();
$mp3updatedb = new updatedb();
if (isset($_POST['text'])) {
    $text = trim($_POST['text']);
} elseif (isset($_GET['text'])) {
    $text = trim($_GET['text']);
} else {
    $mp3->sendHeader('index.php', TRUE);
}
$cs = $cfg['command_string'];
switch ($text) {
    // main: help
    case substr($text, 0, 5) == $cs . 'help':
        $mp3->sendHeader('help.php', TRUE);
        break;
        // login
    // login
    case substr($text, 0, 6) == $cs . 'login':
        $mp3->adminLogin();
        if (!defined('LOGIN')) {
            define('LOGIN', TRUE);
        }
        $_SESSION['LOGIN'] = true;
開發者ID:entropie,項目名稱:Jamp,代碼行數:31,代碼來源:form.php

示例2: main

<?php

// $Id: playlist.php,v 1.8 2004/03/04 22:20:02 entropie Exp $ //
include './cfg/cfg.php';
include './libraries/class.main.php';
include './libraries/class.playlist.php';
$mp3 = new main();
$mp3playlist = new playlist();
if (isset($_GET['load'])) {
    $mp3playlist->load_playlist($_GET["load"]);
}
if (!isset($_GET['playlist']) || empty($_GET['playlist'])) {
    $mp3->sendHeader('index.php');
} else {
    $mp3playlist->view_playlists($_GET['playlist']);
}
開發者ID:entropie,項目名稱:Jamp,代碼行數:16,代碼來源:playlist.php

示例3: elseif

        } elseif (isset($irray["playlist_ids"]) && !empty($irray["playlist_ids"]) && $irray["pl_action"] == "rem_sel") {
            $mp3playlist_in->remove_songids($irray["playlist_ids"]);
            // clear all
        } elseif (isset($irray["playlist_play"]) && !empty($irray["playlist_play"]) && $irray["pl_action"] == "new_playlist") {
            $mp3playlist_in->pl_clear();
            // save as static playlist
        } elseif (isset($irray["playlist_play"]) && !empty($irray["playlist_play"]) && $irray["pl_action"] == "save_all" && isset($irray["save_plname"]) && !empty($irray["save_plname"])) {
            $mp3playlist_in->save_playlist($irray["playlist_play"], $irray["save_plname"]);
        }
        break;
        // logout
    // logout
    case isset($irray["logout"]):
        session_destroy();
        break;
        // play random song
    // play random song
    case isset($irray["random"]):
        $result = $mp3->log_mysql_query("SELECT COUNT(id) FROM " . $cfg["mysql"]["table_files"]);
        $row = mysql_fetch_array($result);
        $randsong = rand('1', $row["0"]);
        $m3ufile = $mp3play->playsongs($randsong);
        $is_play = true;
        break;
}
// switch
if (isset($is_play) && $is_play) {
    include "play.php";
} else {
    $mp3->sendHeader('index.php?pathid=' . (isset($_GET['backid']) ? $_GET['backid'] : 0), 1);
}
開發者ID:entropie,項目名稱:Jamp,代碼行數:31,代碼來源:handle.php


注:本文中的main::sendHeader方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。