mirror of
https://github.com/NNTmux/newznab-tmux.git
synced 2026-08-29 01:08:56 +00:00
29 lines
591 B
PHP
29 lines
591 B
PHP
<?php
|
|
|
|
$contents = new Contents();
|
|
|
|
$role=0;
|
|
if ($page->userdata != null)
|
|
$role = $page->userdata["role"];
|
|
|
|
$contentid = 0;
|
|
if (isset($_GET["id"]))
|
|
$contentid = $_GET["id"];
|
|
|
|
if ($contentid == 0)
|
|
$content = $contents->getIndex();
|
|
else
|
|
$content = $contents->getByID($contentid, $role);
|
|
|
|
if ($content == null)
|
|
$page->show404();
|
|
|
|
$page->smarty->assign('content',$content);
|
|
$page->meta_title = $content["title"];
|
|
$page->meta_keywords = $content["metakeywords"];
|
|
$page->meta_description = $content["metadescription"];
|
|
|
|
$page->content = $page->smarty->fetch('content.tpl');
|
|
$page->render();
|
|
|