-
Notifications
You must be signed in to change notification settings - Fork 0
/
home.php
140 lines (119 loc) · 5.96 KB
/
home.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
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
<?php include "base.php"; ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="en-US" xmlns="http://www.w3.org/1999/xhtml" dir="ltr">
<head>
<title>Wallam</title>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="css/style.css" type="text/css" media="all" />
<!--[if IE 6]>
<link rel="stylesheet" href="css/ie6.css" type="text/css" media="all" />
<![endif]-->
<link rel="shortcut icon" type="image/x-icon" href="css/images/favicon.png" />
<script src="js/jquery-1.4.2.js" type="text/javascript" charset="utf-8"></script>
<script src="js/jquery.jcarousel.min.js" type="text/javascript" charset="utf-8"></script>
<script src="js/functions.js" type="text/javascript" charset="utf-8"></script>
</head>
<body>
<?php include "header.php"; ?>
<div class="shell">
<div class="container">
<div class="slider">
<div class="slider-holder">
<ul>
<?php
$sql = "SELECT TOP 4 Features.*, title, description FROM Features inner join Movies on Movies.movieid = Features.movieid ORDER BY CreateDate DESC";
$stmt = sqlsrv_query(&$conn, $sql, array(date('m/d/y',strtotime("last Saturday"))) );
if( $stmt === false) {
die( print_r( sqlsrv_errors(), true) );
}
if(sqlsrv_has_rows($stmt) === true)
{
while($row = sqlsrv_fetch_array($stmt, SQLSRV_FETCH_ASSOC)) {
//echo "\t\t\t\t\t<li><img src=\"backdrops/".$row['backdrop']."\"/><a href=\"movies.php?id=".$row['movieid']."\"><title>".$row['title']."</title><plot>".$row['description']."</plot></a></li>\n";
echo "\t\t\t\t\t<li><img style=\"background-image:url('backdrops/".$row['backdrop']."')\" src=\"backdrops/slide.png\"/><a href=\"movies.php?id=".$row['movieid']."\"><title>".$row['title']."</title><plot>".$row['description']."</plot></a></li>\n";
}
}
?>
</ul>
</div>
<a href="#" title="Previous" class="slider-prev notext">prev</a>
<a href="#" title="Next" class="slider-next notext">next</a>
<div class="slider-nav">
<ul>
<li><a href="#" title="1" >1</a></li>
<li><a href="#" title="2" >2</a></li>
<li><a href="#" title="3" class="active">3</a></li>
<li><a href="#" title="4" >4</a></li>
</ul>
</div>
</div>
<div class="main">
<!--
<div class="cols">
<div class="col">
<div class="post">
<h2><a href="#" title="#">Who Are We?</a></h2>
<p><strong>Lorem Ipsum is simply dummy text of the printing and typesetting industry</strong>. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, <a href="#" title="free website css templates">free website css templates</a> unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
</div>
</div>
<div class="col">
<div class="post">
<h2><a href="#" title="#">What We Do?</a></h2>
<p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. <strong>Lorem Ipsum has been the industry's standard dummy</strong> text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. <a href="#" title="free website css templates">free website css templates</a> with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing </p>
</div>
</div>
<div class="col-last">
<div class="post">
<h2><a href="#" title="#">Latest Project</a></h2>
<p><strong>Lorem Ipsum is simply dummy text of the printing and typesetting industry</strong>. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, <a href="#" title="free website css templates">free website css templates</a> unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
</div>
</div>
<div class="cl"> </div>
</div>
-->
<div class="content">
<div class="post">
<h2>Blogs</h2>
<?php
$sql = "SELECT TOP(3) * FROM Blogs ORDER BY time DESC";
$stmt = sqlsrv_query(&$conn, $sql);
if( $stmt === false) {
die( print_r( sqlsrv_errors(), true) );
}
if(sqlsrv_has_rows($stmt) === true)
{
while($row = sqlsrv_fetch_array($stmt, SQLSRV_FETCH_ASSOC)) {
echo "\t\t\t\t<div class=\"post\">\n";
echo "\t\t\t\t\t<h2><a href=\"blog.php?id=".$row['blogid']."\" title=\"".$row['title']."\">".$row['title']."</a><date title=\"".$row['time']->format('F j, Y h:i:s A')."\">".$row['time']->format('F j, Y')."</date></h2>\n";
echo "\t\t\t\t\t<p>".nl2br($row['text'])."</p>\n";
echo "\t\t\t\t</div>\n";
}
}
?>
</div>
</div>
<div class="sidebar">
<div class="post">
<h2>Recently Updated</h2>
<?php
$sql = "SELECT TOP(5) * FROM Movies ORDER BY UpdateDate DESC";
$stmt = sqlsrv_query(&$conn, $sql);
if( $stmt === false) {
die( print_r( sqlsrv_errors(), true) );
}
if(sqlsrv_has_rows($stmt) === true)
{
while($row = sqlsrv_fetch_array($stmt, SQLSRV_FETCH_ASSOC)) {
echo "\t\t\t\t\t<h3><a href=\"movies.php?id=".$row['movieid']."\" title=\"".$row['title']."\">".$row['title']."</a><date>".$row['UpdateDate']->format('M j, Y')."</date></h3>\n";
}
}
?>
</div>
</div>
<div class="cl"> </div>
</div>
</div>
</div>
<?php include "footer.php"; ?>
</body>
</html>