コード例 #1
0
        echo "\t\t\t<h2>Invalid movie ID: Choose a movie-goer from the menu on the right</h2>\n";
        echo "\t\t</div>\n\n";
        include 'footer.inc.php';
        exit;
    case "no_data":
        echo "\t\t<div class='message alert'>\n";
        echo "\t\t\t<h2>No movies in database: Add movies below</h2>\n";
        echo "\t\t</div>\n\n";
        include 'admin-movies.inc.php';
        include 'footer.inc.php';
        exit;
    case "no_id":
        $greeting = showUsers('get_name');
        break;
    case "id_set":
        $singleMovie = showMovies('single');
        break;
}
echo "\t\t<nav class='favs_list'>\n";
echo "\t\t\t<h2>{$favsTitle}</h2>\n\n";
echo "\t\t\t<ul class='favs'>\n";
echo $favsList;
echo "\t\t\t</ul>\n\n";
echo "\t\t\t<div class='trash {$trashClass}'></div>\n";
echo "\t\t</nav>\n\n";
switch ($testMovies) {
    case "no_id":
        echo "\t\t<section class='movie_list'>\n";
        echo $greeting;
        echo "\t\t\t<p class='welcome {$welcomeClass}'>{$welcome}</p>\n\n";
        echo "\t\t\t{$openTag}\n";
コード例 #2
0
<?php

$favsList = showMovies('favs');
?>

<nav class="favs_list">
	<h2>Favourites</h2>
	<ul class="favs">
		<?php 
echo $favsList;
?>
	</ul>
	<div class='trash'></div>            
</nav>
コード例 #3
0
<?php

$dataRow = showMovies('admin');
echo "\t\t<section class='admin'>\n";
echo "\t\t\t<div class='admin_movies'>\n";
if (!isset($testMovies) || $testMovies != "no_data") {
    echo "\t\t\t\t<h2>Manage movies</h2>\n";
}
echo "\t\t\t\t<table class='admin_table'>\n";
echo "\t\t\t\t\t<tr>\n";
echo "\t\t\t\t\t\t<th class='data_col'>Title</th>\n";
echo "\t\t\t\t\t\t<th class='data_col'>Description</th>\n";
echo "\t\t\t\t\t\t<th class='admin_col'>Insert/Delete</th>\n";
echo "\t\t\t\t\t</tr>\n";
echo $dataRow;
echo "\t\t\t\t\t<tr class='newdatarow'>\n";
echo "\t\t\t\t\t\t<td><input class='newdata' type='text' name='title' value=''></td>\n";
echo "\t\t\t\t\t\t<td><input class='newdata' type='text' name='description' value=''></td>\n";
echo "\t\t\t\t\t\t<td class='insertcell'><div class='insert hidden'></div></td>\n";
echo "\t\t\t\t\t</tr>\n";
echo "\t\t\t\t</table>\n";
echo "\t\t\t</div>\n";
echo "\t\t</section>\n\n";
コード例 #4
0
<?php

$nonfavsList = showMovies('non_favs');
$greeting = showUsers('get_name');
?>

<section class="movie_list">
	<?php 
echo $greeting;
?>
	<p class="welcome">Here are some movies you might like.
	Click on the heart icon to add them to your favourites list.</p>
	<ul>
		<li>
			<?php 
echo $nonfavsList;
?>
		</li>
	</ul>
</section>