-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathBulletin.php
More file actions
150 lines (115 loc) · 2.38 KB
/
Bulletin.php
File metadata and controls
150 lines (115 loc) · 2.38 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
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
<?php
session_start();
include 'header.php';
if(!isset($_SESSION['login_user']))
{
echo 'Please <a href="loginpage.php">sign in</a> to continue';
}
else
{
?>
<!DOCTYPE html>
<html>
<body>
<style>
.floating-box {
display: inline-block;
float: right;
width: 650px;
height: auto;
margin-top: 200px;
margin-right: 10px;
border: 1px solid black;
}
.float-img1{
float:left;
margin-left:2px;
margin-right:10px;
margin-bottom:5px;
border: solid black 1px;
}
.float-img2{
float:left;
margin-left:340px;
margin-right:10px;
margin-bottom:5px;
border: solid black 1px;
}
/*
#customers {
font-family: "Trebuchet MS", Arial, Helvetica, sans-serif;
border-collapse: collapse;
width: 100%;
}
#customers td, #customers th {
border: 1px solid #ddd;
padding: 8px;
}
#customers tr:nth-child(even){background-color: #f2f2f2;}
#customers tr:hover {background-color: #ddd;}
#customers th {
padding-top: 12px;
padding-bottom: 12px;
text-align: left;
background-color: #4CAF50;
color: white;
}
*/
</style>
<?php
$connect=mysql_connect("localhost","id5043997_projectite","ceg.net");
mysql_select_db('id5043997_ceg');
$select="select * from upload order by image_id desc";
$result=mysql_query($select);
$i=0;
echo '<center>';
while($row=mysql_fetch_array($result))
{
echo'<br>';
echo'<br>';
echo'<table border="1" width="1200" >';
echo '<tr>';
echo '<th>';
echo $row['img_topic'];
echo '</th>';
echo '</tr>';
echo '<tr>';
if($row['img_description']!=NULL)
{
echo '<td>';
?>
<div id="image" style="display:inline;">
<img src="<?php echo $row['image'];?>" height="500" width="500" class="float-img1" >
</div>
<textarea rows="5" cols="40" class="floating-box"><?php echo $row['img_description']; ?></textarea>
<?php
}
echo '</td>';
if($row['img_description']==NULL)
{
echo '<td>';
?>
<div id="image" style="display:inline;">
<img src="<?php echo $row['image'];?>" height="500" width="500" class="float-img2" >
</div>
<?php
}
echo '</td>';
echo '</tr>';
echo '<tr>';
echo '<td>';
echo 'UPLOADED BY ';
echo $row['uploader_name'];
echo '</td>';
echo '</tr>';
echo'</table>';
echo'<br>';
echo'<br>';
echo'<br>';
}
echo '</center>/';
mysql_close($connect);
}
?>
</body>
</html>