-
Notifications
You must be signed in to change notification settings - Fork 24
/
Copy pathnews.php
198 lines (167 loc) · 6.22 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
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
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
<?php
require("cek.php");
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Language" content="en-us">
<title>.: Your MLM Website :.</title>
<meta content=Panjianom name=Author>
<meta content="your keywords, your keywords here" name=Keywords>
<meta content="your description here." name=Description>
<meta http-equiv=robots content="index, follow">
<meta http-equiv=rating content=general>
</head>
<style>
body {
scrollbar-face-color: #006699;
scrollbar-highlight-color: #cc3300;
scrollbar-shadow-color: #000000;
scrollbar-3dlight-color: #006699;
scrollbar-arrow-color: #ffffff;
scrollbar-track-color: #0099cc;
scrollbar-darkshadow-color: #000000;
scrollbar-base-color: #848ea9;
}
.lnk1:hover {
color: #0000fa;
text-decoration: none;
}
.lnk:link {
color: #ffff00;
text-decoration: none;
}
</style>
<body topmargin="0" leftmargin="0">
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="780" id="AutoNumber1">
<tr>
<td>
<p align="center">
<img border="0" src="images/banner.jpg" width="780" height="154"></p>
</td>
</tr>
<tr>
<td>
<div align="center">
<center>
<table border="1" cellpadding="4" cellspacing="0" style="border-collapse: collapse" bordercolor="#3E6F7C" width="780" id="AutoNumber2">
<tr>
<td width="207" valign="top">
<p style="margin-top: 0; margin-bottom: 0" align="center">
<font face="Verdana" style="font-weight: 700" size="2" color="#000080">..::
MENU UTAMA ::..</font></p>
<p style="margin-top: 0; margin-bottom: 0" align="center">
<? include "menu.php"; ?>
</p>
<p style="margin-top: 0; margin-bottom: 0" align="center"> </p>
<p style="margin-top: 0; margin-bottom: 0" align="center"> </td>
<td width="573" valign="top">
<div align="center">
<center>
<table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="549" id="AutoNumber3">
<tr>
<td width="549">
<p align="right">
<font face="Verdana" color="#000080" style="font-size: 8pt">Diperkenalkan : <b><? echo "$session_nama_sponsor" ?></b> - <b><? echo "$session_kota_sponsor" ?></b></font>
</td>
</tr>
<tr>
<td width="549"> </td>
</tr>
<tr>
<td width="549">
<p align="center" style="margin-top: 0; margin-bottom: 0">
<b> <font face="Verdana" size="5" color="#FF0000">News
- Berita terbaru dari kami</font></b></p>
<p style="margin-top: 0; margin-bottom: 0" align="center"> </p>
<p style="margin-top: 0; margin-bottom: 0" align="center">
<?
//require( "config.php" );
$newsPage = 10;
$id = @mysql_connect($dbHost,$dbUser,$dbPasswd);
$db = @mysql_select_db($dbName,$id);
function buildLeadIndex($qty, $newsPage) {
if($qty > $newsPage) {
echo "Halaman : ";
$index = 0;
$start = 0;
while($qty > 0) {
echo ' <a href="news.php?start='.$start.'">'.++$index.'</a>';
$qty = $qty - $newsPage;
$start = $start + $newsPage;
}
}
}
if($id == 0 || $db == 0) {
// Problems with MySQL connection
error( mysql_error());
exit;
}
// incoming vars
// $_REQUEST[act, lID, start]
if($_REQUEST[act] == 'lDel') {
$l = $_REQUEST[user_id];
for($i = 0; $i < count($l); $i++) {
mysql_query("DELETE FROM news WHERE user_id=$l[$i]",$id);
}
}
// get total News
$qryT = mysql_query("SELECT * FROM news",$id);
$totalNews = mysql_num_rows($qryT);
// get News
if($_REQUEST[start]) { $start = $_REQUEST[start]; }
else { $start = 0; }
$qry = mysql_query("SELECT * FROM news ORDER BY user_id DESC LIMIT $start,$newsPage",$id);
?>
<? buildLeadIndex($totalNews, $newsPage); ?>
<?
// Tampilkan News
if(mysql_num_rows($qry) > 0) {
while($row = mysql_fetch_array($qry)) {
echo "<p style=\"margin-top: 0; margin-bottom: 0\" align=\"justify\"><b><font face=\"Verdana\" font style=\"font-size: 8pt\" color=\"#000080\"> $row[judul]</font></b></p>\n";
echo "<p style=\"margin-top: 0; margin-bottom: 0\" align=\"justify\"><i><font face=\"Verdana\" font style=\"font-size: 8pt\" color=\"#FF0000\"> $row[tanggal]</font></i></p>\n";
echo "<p style=\"margin-top: 0; margin-bottom: 0\" align=\"justify\"><font face=\"Verdana\" font style=\"font-size: 8pt\">$row[isi_berita]</font></p>\n";
echo "<p style=\"margin-top: 0; margin-bottom: 0\" align=\"justify\"><font face=\"Verdana\" size=\"2\">\n";
echo "<hr color=\"#000000\" size=\"1\"></font></p>\n";
}
} else {
echo "<p align=\"center\"><font size=\"3\"><b>Maaf Belum Ada Berita terbaru dari kami !!!</b></font></p>\n";
}
?>
</p>
<p style="margin-top: 0; margin-bottom: 0" align="center"> </td>
</tr>
</table>
</center>
</div>
<p style="margin-top: 0; margin-bottom: 0"> <p style="margin-top: 0; margin-bottom: 0"> </td>
</tr>
</table>
</center>
</div>
</td>
</tr>
<tr>
<td background="bg3.jpg"> </td>
</tr>
<tr>
<td bgcolor="#6D93A0">
<p align="center" style="margin-top: 0; margin-bottom: 0">
<font face="Verdana" style="font-size: 8pt" color="#FFFFFF">Copyright (c)
2005 Nama Bisnis Anda</font></p>
<p align="center" style="margin-top: 0; margin-bottom: 0">
<font face="Verdana" style="font-size: 8pt" color="#FFFFFF">Powered by
<a target="_blank" href="http://digidzine.com/" style="text-decoration: none; font-weight: 700">
<font color="#FFFFFF">digidzine.com</font></a></font></p>
</td>
</tr>
<tr>
<td bgcolor="#3E6F7C"> </td>
</tr>
</table>
</center>
</div>
</body>
</html>