-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathuser_account2.php
158 lines (125 loc) · 5.75 KB
/
user_account2.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
<?php include('include/connect.php');?>
<?php include('include/session.php');
include('announce2.php');
include('function.php');
$page = (int) (!isset($_GET["page"]) ? 1 : $_GET["page"]);
$limit = 2;
$startpoint = ($page * $limit) - $limit;
//to make pagination
$statement = "`tb_announcement`";
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<link rel="shortcut icon" href="img/aalogo.jpg">
<title>Jersey Developers Ltd.</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="">
<meta name="author" content="">
<!-- Less styles
<link rel="stylesheet/less" type="text/css" href="less/bootsshop.less">
<script src="less.js" type="text/javascript"></script>
-->
<!-- Le styles -->
<link href="assets/css/bootstrap.css" rel="stylesheet"/>
<link href="assets/css/docs.css" rel="stylesheet"/>
<link href="assets/style.css" rel="stylesheet"/>
<link href="assets/js/google-code-prettify/prettify.css" rel="stylesheet"/>
<!-- Le HTML5 shim, for IE6-8 support of HTML5 elements -->
<!--[if lt IE 9]>
<script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<style>
body {
background-image: url("background1.JPG");
background-repeat: repeat;
}
</style>
<!-- Le fav and touch icons -->
</head>
<body>
<!-- Navbar
================================================== -->
<div class="navbar navbar-fixed-top">
<div class="navbar-inner">
<div class="container">
<a id="logoM" href="user_index.php"><img src="" /></a>
<a data-target="#sidebar" data-toggle="collapse" class="btn btn-navbar">
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</a>
<div class="nav-collapse">
<ul class="nav">
<li class=""><a href="user_index.php"><i class="icon-home icon-large"></i> Home</a></li>
<li class=""><a href="user_products.php"><i class=" icon-th-large icon-large"></i> Properties</a></li>
<li class=""><a href="user_contact.php"><i class="icon-signal"></i> Contact Us</a></li>
<li class=""><a href="user_aboutus.php"><i class="icon-flag"></i> About Us</a></li>
<li class=""><a href="user_order.php"><i class="icon-shopping-cart"></i> Paid/Pending</a></li>
</ul>
<ul class="nav pull-right">
<li class="active">
<a href="user_account2.php"><?php $query = mysql_query("select * from customers where CustomerID='$ses_id'") or die(mysql_error());
$row = mysql_fetch_array($query); ?>
<b>Welcome! </b> <?php echo $row['Firstname'];?> <?php echo $row['Lastname'];?> <span class="badge badge-info"> <?Php include('announce.php');?></span></a>
<li>
<a href="logout.php"><i class="icon-off"></i> Log Out</a>
</li>
</ul>
</div><!-- /.nav-collapse -->
</div>
</div><!-- /navbar-inner -->
</div>
<div class="container">
<div class="row row-offcanvas row-offcanvas-right">
<div class="well">
<center><h2>Jersey Developers Ltd.</h2></center>
</div><br />
<div class="well pull-right">
<a href="user.php"><i class="icon-cog"></i> <font color="blue">Profile Account</font></a><br />
<a href="Email.php"><i class="icon-envelope"></i> <font color="blue">Email sent</font></a>
</div>
<div class="container">
<?php
$query = mysql_query("select * from tb_announcement {$statement} LIMIT {$startpoint} , {$limit} ") or die(mysql_error());
while ($row = mysql_fetch_array($query)) {
?>
<br />
<div class="well row">
<div>
<a href="announcement_detail.php?id=<?php echo $row['announcementID']; ?>">
<img src="server/ADMIN/SERVER/ADS/<?php echo $row['image'];?>" width="250" height="250" class="img-responsive"/>
</a>
</div>
<div class="col-md-6">
<h3><a href="announcement_detail.php?id=<?php echo $row['announcementID']; ?>"><?php echo $row['name'];?></a>
</h3>
<p>Date: <?php echo date("F j, Y - h:i A ", strtotime($row['date'])) ?></p>
<p>
<?php $string=$row['detail'];
$string = strip_tags($string);
if (strlen($string) > 100) {
// truncate string
$stringCut = substr($string, 0, 200);
$string = substr($stringCut, 0, strrpos($stringCut, ' '));
}
echo $string ."...";
?>
</p>
<a class="btn btn-primary" href="announcement_detail.php?id=<?php echo $row['announcementID']; ?>">Read More <i class="fa fa-angle-right"></i></a>
</div>
</div>
<br/><br/>
<?php } ?>
<div class="col-lg-12">
<ul class="pagination">
<?php
echo pagination($statement,$limit,$page);
?>
</ul>
</div>
</div>
</div><!--/span-->
</div>
</div></body>