コード例 #1
0
<?php

include 'base.php';
User::protect();
include_class('tours');
$section = 'tours';
if ($_POST['submit']) {
    // add news entry
    $tour = Tour::add($_POST);
    if (!db::isError($tour)) {
        header('Location: tour_edit.php?id=' . $tour->getID());
    }
}
$page_title = 'Add Tour';
$calendar = true;
$editors = array('description');
include 'layout/header.php';
?>

<div id="breadcrumb">
	<a href="index.php">Audition &#62;</a>
	<a href="live.php">Live &#62;</a>
	<a href="tours.php">Tours &#62;</a>
</div>

<?php 
if (User::isAdmin()) {
    if (db::isError($tour)) {
        $tour->outputList();
    }
    ?>