-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnews.php
96 lines (58 loc) · 2.1 KB
/
news.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
<?php
require_once ('postgres_connect.php');
// Prepare a query for execution
$news_result = pg_prepare($dbc, "news_query", 'select title,body from news where news_id=$1');
// Execute the prepared query. Note that it is not necessary to escape
// the string "Joe's Widgets" in any way
$news_result = pg_execute($dbc, "news_query", array($_GET['id']));
while ($row = db_fetch_array($news_result, MYSQL_ASSOC)) {
$title = $row['title'];
$body = $row['body']; }
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="icon" type="image/png" href="http://www.hta.org/images/icon.png"/>
<meta http-equiv="content-type" content="text/html;charset=utf-8" />
<meta name="generator" content="Adobe GoLive" />
<title><?php echo $title; ?> | Eureka Transit Service</title>
<link href="css/main.css" rel="stylesheet" type="text/css" media="all" />
<style type="text/css">
#instruction {float:left; width:200px;height:300px;margin-left:10px;margin-right:10px;}
li {margin-left:20px; padding-right:7px;}
#zone_name {text-align:center; font-size:20px; line-height:25px; width:40px; font-weight:bold;padding:0px}
td {border-bottom:1px solid #ccc;padding:1px;padding-right:10px}
#page_title {font-size:16px;font-weight:bold;text-align:left;padding:25px 0px 0px 17px;margin:0px}
</style>
<script type="text/javascript">
</script>
</head>
<body>
<a href="#Content" class="hidden">Skip to Content</a>
<div id="Container">
<div id="ContentWrapper">
<div id="logo_header">
<a href="index.php"><img src="images/ets_logo.gif" alt="" border="0" width="206" height="81" /></a>
</div>
<div id="header_area">
<div id="nav_path"><a href="index.php">ETS Home</a> ></div>
<br clear="left"/>
<h1 id="page_title">
<?php
echo $title;
?>
</h1>
</div>
<br clear="all">
<hr size="2" width="784" style="padding-left:10px;padding-right:10px;">
<div id="page_text_itself">
<?php
echo $body;
?>
</div>
</div>
<br clear="all" />
</div>
<?php require_once ('includes/footer.html'); ?>
</body>
</html>