-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpage.php
More file actions
95 lines (56 loc) · 1.7 KB
/
page.php
File metadata and controls
95 lines (56 loc) · 1.7 KB
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
<!DOCTYPE html>
<html>
<head>
<?php include("inc/meta.php"); ?>
<Title>
<?php include("inc/page-index.php"); ?>
</Title>
<?php include("inc/stylesheet.php"); ?>
<?php include("inc/head.php"); ?>
</head>
<body>
<?php include("inc/background-image.php"); ?>
<div id="container">
<?php include("inc/header.php"); ?>
<?php include("inc/widemenu.php"); ?>
<?php include("inc/sidebar-left.php"); ?>
<div id="content">
<?php include("inc/plugin01.php"); ?>
<?php //
/* This script retrieves entries from the database. */
include("admin/mysql-connect.php"); // Connect to MySQL
// Create NEXT link variable
$nextlink = $_GET['id'] + 1;
// Define the query.
$query = "SELECT title, entry, category, author FROM blog WHERE entry_id={$_GET['id']}";
// Run the query
if ($r = mysql_query($query, $dbc)) {
// Retrieve the information
$row = mysql_fetch_array($r);
// Process & print the information
print "
<h1>";
print "
{$row['title']}";
print "
</h1>";
print "
{$row['entry']}";
// Build NEXT link
print "<div class=\"nextdemo\"><a href=\"page.php?id=";
print $nextlink;
print "\" title=\"Next demo\">Next page ></a></div>";
// End of process & print
} else { // Couldn't get the information.
print '<p style="color: red;">Could not retrieve the entry because:<br />' . mysql_error($dbc) . '.</p><p>The query being run was: ' . $query . '</p>';
}
mysql_close($dbc); // Close the connection.
?>
<?php include("inc/plugin02.php"); ?>
</div>
<?php include("inc/sidebar-right.php"); ?>
<?php include("inc/footer.php"); ?>
</div>
<?php include("inc/scripts.php"); ?>
</body>
</html>