forked from storm95/nishiAgarwal.in
-
Notifications
You must be signed in to change notification settings - Fork 0
/
onePhotoBlog.php
78 lines (72 loc) · 1.89 KB
/
onePhotoBlog.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
<?php
$defineVariablesPhp = "defineVariables.php";
require $defineVariablesPhp;
require $dbConnectPhp;
require $queryFunctionsPhp;
require $phpFunctionsPhp;
?>
<?php
if(isset($_GET[$colName]) && ($photoRow = queryCol($photoTableName, $colName, $_GET[$colName])))
{
$getColName = $_GET[$colName];
}
else
{
//Redirect to index.php
$getMsg = "No Photo of ".$_GET[$colName]." Name is present";
$indexPageUrl = $indexPageUrl.'?msg='.$getMsg;
//die($getMsg.' $photoRow = '.$photoRow);
header('Location: '.$indexPageUrl);
}
//die($photoRow);
?>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=divice-width, initial-scale=1.0">
<title>Nishi Agarwal</title>
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
<link rel="stylesheet" type="text/css" href="css/customIndex.css">
</head>
<body>
<div class="container">
<?php require("header.php"); ?>
<hr>
<section>
<div class="row">
<div id="photoNameDiv">
<h2><span><?php echo $photoRow[$colName]; ?></span></h2>
</div>
</div>
<div class="row">
<div id="photoDiv">
<img src=<?php echo '"'.$photoDir.'/'.$photoRow[$colPhotoFileName].'"' ?> >
</div>
</div>
</section>
<hr>
<section>
<div class="row">
<div id="photoDescriptionDiv">
<p><span><?php echo $photoRow[$colDescription]; ?></span></p>
</div>
</div>
<div class="row">
<div id="photoFeatureDiv">
<ul>
<li><span>Size : </span><span><?php echo $photoRow[$colSize]; ?></span></li>
</ul>
</div>
</div>
</section>
<hr>
<?php require("footer.php"); ?>
</div>
<!-- Modals Start-->
<?php require("modal.php"); ?>
<!-- Modals end -->
<!-- JavaScript -->
<script type="text/javascript" src="js/jquery-3.1.0.min.js"></script>
<script type="text/javascript" src="js/bootstrap.min.js"></script>
</body>
</html>