Ejemplo n.º 1
0
<?php

require_once "DTTCore.php";
$action = $_GET["a"];
$template = file_get_contents("DTTHeader.html");
//just loading the page first time
if ($action == null) {
    header("Location: index.php");
} else {
    if (is_numeric($action)) {
        //no need for protection because if its not number does not go in
        $query = $pdo->prepare("SELECT * FROM articleTable WHERE id =" . $action);
        if ($query->execute()) {
            $row = $query->fetch();
            echo setTitle($template, $row["title"]);
            echo showArticle($row);
            $link = '<a href="index.php">Return to homepage</a>';
            echo setFoot($link);
        } else {
            header("Location: index.php");
        }
    } else {
        if ($action == "allStories") {
            try {
                $query = $pdo->prepare("SELECT * FROM articleTable ORDER BY id DESC");
                if ($query->execute()) {
                    $count = 0;
                    echo setTitle($template, "Article Archive");
                    while ($row = $query->fetch()) {
                        echo display($row);
                    }
Ejemplo n.º 2
0
     break;
 case 'dvd':
 case 'dvdprem':
     //dvdPrem();
     video_dvd_Prem('dvd');
     break;
 case 'statia':
     getStatia();
     break;
 case 'ost':
 case 'namm':
 case 'sound':
 case 'zad':
 case 'star':
 case '2double':
     showArticle();
     break;
 case 'film':
     film();
     break;
 case 'city':
     Grad();
     break;
 case 'cinema':
     Kino();
     break;
 case 'programa':
     Programa();
     break;
 case 'news':
     News();