Kanjut SHELL
Server IP : 172.16.15.8  /  Your IP : 52.14.252.16
Web Server : Apache
System : Linux zeus.vwu.edu 4.18.0-553.27.1.el8_10.x86_64 #1 SMP Wed Nov 6 14:29:02 UTC 2024 x86_64
User : apache ( 48)
PHP Version : 7.2.24
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0755) :  /home/vnlaughlin/public_html/test/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home/vnlaughlin/public_html/test/viewpost.php
<?php require('includes/db.php'); ?>

<!DOCTYPE html>
<html lang="en">
<head>
  <title>POST TITLE</title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.1.1/jquery.min.js"></script>
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>
<!-- Header -->

<nav class="navbar navbar-default">
	  <div class="container-fluid">
	    <div class="navbar-header">
	   <a class="navbar-brand" href="index.php">IDEArena</a>
	    </div>
	    <ul class="nav navbar-nav">
	    <li><a href="index.php">Home</a></li>
	 	<li><a href="">Catagories</a></li>
	 	<li><a href="user/signup.php">Sign Up</a></li>
	 	<li><a href="user/login.php">Login</a></li>
	    </ul>
	  </div>
</nav>

<?php

	$stmt = $connect->prepare('SELECT picID, postTitle, userID, image_path, image_name, description, postDate FROM an_posts WHERE picID = :picID');
	$stmt->execute(array(':picID' => $_GET['id']));
	$row = $stmt->fetch();
	$userID = $row['userID'];
	$path = $row['image_path'];
	$path .= $row['image_name'];

	$stmt = $connect->prepare('SELECT username FROM an_users where userID = :userID');
	$stmt->execute(array(':userID' => $userID));
	$row2 = $stmt->fetch();
	$username = $row2['username'];
?>

 <!-- Body -->
 <body>
	<div class="container">
	<img src="user/<?php echo $path; ?>" alt=<?php echo $row['postTitle']; ?> style="width:304px;height:228px;">
 	<h1><?php echo $row['postTitle']; ?> </h1>
	<p><a href=""><?php echo $username; ?></a></p>
 	<p>Posted on <?php echo date('M jS Y', strtotime($row['postDate'])); ?> </p>

	<p><?php echo $row['description']; ?> </p>

	</div>
 </body>
 </html>

Stv3n404 - 2023