本文整理汇总了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;
示例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']);
}
示例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);
}