myaac/system/pages/movies.php
slawkens 37502c5562 * moved more templates to Twig
* now you can replace template in your main template, example is templates/kathrine/templates/success.html
* removed output_errors, replace with template
* some grammar fixes
* moved some forum code to Twig templates
* added movies link to tibiacom template
2017-08-31 17:01:17 +02:00

32 lines
854 B
PHP

<?php
/**
* Movies
*
* @package MyAAC
* @author Slawkens <slawkens@gmail.com>
* @copyright 2017 MyAAC
* @version 0.3.0
* @link http://my-aac.org
*/
defined('MYAAC') or die('Direct access not allowed!');
$title = 'Movies';
$movies = $db->query('SELECT * FROM `' . TABLE_PREFIX . 'movies` ORDER BY `ordering`;');
if(!$movies->rowCount())
{
?>
There are no movies added yet.
<?php
if(admin())
echo ' You can add new movies in phpmyadmin under ' . TABLE_PREFIX . 'movies table.';
return;
}
?>
<div style="text-align: center;">
<?php foreach($movies as $movie): ?>
<?php echo $movie['title']; ?><br/>
Author: <?php echo $movie['author']; ?><br/>
<iframe width="560" height="315" src="https://www.youtube.com/embed/<?php echo $movie['youtube_id']; ?>" frameborder="0" allowfullscreen></iframe><br/><br/>
<?php endforeach; ?>
</div>