-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathindex.php
More file actions
executable file
·66 lines (49 loc) · 1.95 KB
/
index.php
File metadata and controls
executable file
·66 lines (49 loc) · 1.95 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
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title>Online Judge</title>
<meta name="keywords" content="keywords, here" />
<meta name="robots" content="index, follow, noarchive" />
<meta name="googlebot" content="noarchive" />
<link rel="stylesheet" type="text/css" media="screen" href="css/screen.css" />
</head>
<body class="index">
<!-- wrap starts here -->
<div id="wrap">
<?php include('settings.php'); ?>
<?php include('header.php'); ?>
<!-- featured starts -->
<!-- content -->
<div id="content-outer" class="clear"><div id="content-wrap">
<div id="content">
<div id="left">
<h3><strong>Recent Blog Entries</strong></h3>
<?php
//<script src="http://l.yimg.com/a/i/us/pps/mapbadge_1.5.js">{"pipe_id":"1b24d69045fbb81d728903f9054452f9","_btype":"map","pipe_params":{"JobTitle":"mechanic","location":"San Francisco, CA","Distance":"50"}}</script>
$cn = mysql_connect('localhost', $DBUSER, $DBPASS);
mysql_select_db($DBNAME, $cn);
$query = "select count(*) from blog";
$logged = mysql_query($query);
$logg = mysql_fetch_array($logged);
$count = $logg['count(*)'];
if($count>=5) $query = "select *from blog where blogID<=".$count."and blogID>".$count."-5";
else $query = "select * from blog";
$logged = mysql_query($query);
while($logg = mysql_fetch_array($logged)){
echo"<div class='entry'>";
echo"<h4>".$logg['blogName']."</h4>";
$fread = fopen("blog/desc/".$logg['blogID'].".php","r");
if($fread==NULL) echo"<p>No Blog description</p>";
else include("blog/desc/".$logg['blogID'].".php");
echo"<p><a class='more-link' href=blog.php?blogID=".$logg['blogID'].">Continue Reading</a></p>";
echo"</div>";
}
?>
</div>
<?php include("sidebar.php"); ?>
<!-- footer starts here -->
<!-- wrap ends here -->
</div>
</body>
<?php include("footer.php"); ?>
</html>