-
Notifications
You must be signed in to change notification settings - Fork 0
/
home_user.php
149 lines (121 loc) · 3.18 KB
/
home_user.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
<?php
session_start();
include 'database.php';
?>
<!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>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link rel="stylesheet" href="css/home_user.css"/>
<title>home of sports zone</title>
</head>
<body>
<div class="fix main">
<div class="fix header">
<h1>SPORTS ZONE</h1>
</div>
<div class="fix navigation_bar">
<ul >
<?php
if($_COOKIE['id'])
{
if($_COOKIE['id']=='1234'){
?>
<li><a href="home.php">HOME</a></li>
<li><a href="#">LIVE SCORES</a></li>
<li><a href="#">NEWS</a></li>
<li><a href="#">PHOTOS</a></li>
<li><a href="register.php">REGISTRATION</a></li>
<li><a href="admin_page.php">ADMIN</a></li>
<li><a href="logout.php">LOGOUT</a></li>
<?php
} else{
?>
<li><a href="home.php">HOME</a></li>
<li><a href="#">LIVE SCORES</a></li>
<li><a href="#">NEWS</a></li>
<li><a href="#">PHOTOS</a></li>
<li><a href="register.php">REGISTRATION</a></li>
<li><a href="logout.php">LOGOUT</a></li>
<?php
}
}else
{
?>
<li><a href="home.php">HOME</a></li>
<li><a href="#">LIVE SCORES</a></li>
<li><a href="#">NEWS</a></li>
<li><a href="#">PHOTOS</a></li>
<li><a href="register.php">REGISTRATION</a></li>
<li><a href="login.php">LOGIN</a></li>
<?php
}
?>
</ul>
</div>
<div class="live_score">
<h1>live score is here</h1>
</div>
<div class="content">
<div class="fix sidebar">
<ul >
<li><a href="home.php">HOME</a></li>
<li><a href="fixtures.php">FIXTURES</a></li>
<li><a href="#">HISTORY</a></li>
<li><a href="#">VIDEOS</a></li>
<li><a href="#">REGISTER</a></li>
<li><a href="#">ABOUT</a></li>
</ul>
</div>
<div class="fix content_middle">
<?php
$sql="SELECT * FROM status";
$res=mysql_query($sql);
$n=0;
while($row=mysql_fetch_array($res)){
$showing_id[$i]=$row['news_id'];
$n=$i++;
}
sort($showing_id);
$first=$showing_id[0];
$sql="SELECT * FROM status WHERE news_id='$first'";
$res=mysql_query($sql);
while($row=mysql_fetch_array($res)){
?>
<div class="fix news1">
<img id="n1" src="<?php echo $row['image'];?>" alt="" />
<div class="news1_text">
<a href="read_more.php?p=<?php echo "0";?>" class="hyper_text"><h1 class="news1_h1"><?php echo $row['heading']; ?></h1></a>
<p id="news1_writer">writer:shuvro</p>
<p ><?php echo $row['shortcut_status']; ?></p>
</div>
</div>
<?php
}
for($i=1;$i<=$n;$i++){
$sql="SELECT * FROM status WHERE news_id='$showing_id[$i]'";
$res=mysql_query($sql);
while($row=mysql_fetch_array($res)){
?>
<div class="fix news2">
<img src="<?php echo $row['image'] ?>" alt="text"/>
<div class="news1_text">
<a href="read_more.php?p=<?php echo $i; ?>" class="hyper_text"><h1 class="news1_h1"><?php echo $row['heading']; ?></h1></a>
<p id="news1_writer">writer:shuvro</p>
<p ><?php echo $row['shortcut_status']?></p>
</div>
</div>
<?php
}
}
?>
</div>
</div>
</div>
<div class="fix footer">
<p class="fix footer_text1 ">Mahamudul Hasan Shuvro</p>
<p class="fix footer_text2">CSE 2K12</p>
<p class="fix footer_text3">Project 2-2</p>
</div>
</body>
</html>