Exemple #1
0
<?php

require_once 'requests/_main.php';
$story = getStory($_GET['id_story']);
?>
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="utf-8">
<title>FuDIT - Conciencia de Vida</title>

<link rel="shortcut icon" href="images/favicon.ico" />
<link href="css/fudit_style.css" rel="stylesheet" />
<!--[if IE]>
<link href="css/ie.css" rel="stylesheet" />
<![endif]-->

<!--@font-face-->
<link href="css/stylesheet.css" rel="stylesheet" />
<!--Hover effect-->
<link href="css/hover.css" rel="stylesheet" />
<!--Slideshow-->
<link rel="stylesheet" type="text/css" href="css/bx_styles.css" />

<!-- Libreria JQuery-->
<script src="js/jquery-1.7.2.min.js" type="text/javascript"></script>
<!--HTML5 IE-->
<script src="js/modernizr-2.5.3.js" type="text/javascript"></script>
<!--Menu desplegable-->
<script src="js/sub-menu.js" type="text/javascript"></script>
<!--Panel de usuarios-->
                if ($target == 'c') {
                    $stmt = $mysqli->prepare("update comments set comment = ? where comment_id = ?");
                    if (!$stmt) {
                        printf("Query Prep Failed: %s\n", $mysqli->error);
                        exit;
                    }
                    $stmt->bind_param('si', $_POST['content'], $item_ID);
                    $stmt->execute();
                    $stmt->close();
                    header("Location: ../story.php?id=" . $origin);
                    exit;
                }
            }
        } else {
            if ($target == 's') {
                $story = getStory($item_ID);
                $content = htmlspecialchars($story['commentary']);
            } else {
                if ($target == 'c') {
                    $comment = getComment($item_ID);
                    $content = htmlspecialchars($comment['comment']);
                }
            }
        }
    }
}
?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<?php

require 'includes/config.php';
require 'includes/functions.php';
session_start();
$loggedIn = true;
if (!isset($_SESSION['username'])) {
    $loggedIn = false;
}
if (!isset($_GET['id'])) {
    header("Location: index.php");
}
$story_ID = $_GET['id'];
$story = getStory($story_ID);
$title = $story["title"];
$comments = getComments($story_ID);
?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php 
echo $title;
?>
</title>
<link href="includes/style.css" rel="stylesheet" type="text/css">
</head>

<body>
	<a href="index.php">go back</a>
    <div id="stories">