-
Notifications
You must be signed in to change notification settings - Fork 0
/
placed-bids.php
250 lines (240 loc) · 7.81 KB
/
placed-bids.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
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
<?
require_once('config/config.php');
validation_check($_SESSION['user_id'], 'login.php');
if(isset($_REQUEST['mode']) && ($_REQUEST['mode']=="del"))
{
Delete_Qry(PROPOSAL,"WHERE id='".base64_decode($_REQUEST['id'])."'");
$msg=successfulMessage("Deleted Successfully");
}
if(isset($_REQUEST['pid'])!="")
{
Update_Qry(PROPOSAL,"accept='3'","WHERE id='".$_REQUEST['pid']."'");
$objaccep=Select_Qry("*",PROPOSAL,"id='".$_REQUEST['pid']."'","","","","");
$siteowner3=Select_Qry("*",ADVERTISE,"add_id='".$objaccep['add_id']."'","","","","");
############### mail to seller ########
$mail_From=ADMIN_EMAIL;
$mail_subject="Your bid for ".ADDTITLE($siteowner3['add_id'])." was confirmed by ".USERNAME($objaccep['user_id'])." at ".WEB_ADDRESS;
$mail_To=USEREMAIL($objaccep['user_id']);
$mail_Body='<html>
<head>
<title></title>
<style type="text/css">
.font
{
FONT-FAMILY:tahoma, helvetica, sans-serif;
FONT-SIZE:10pt;
FONT-WEIGHT:normal;
COLOR:black;
}
</style>
</head>
<body>
<table border="0" cellpadding="0" cellspacing="0" width="80%" class="font">
<tr><td width="100%"> </td></tr>
<tr>
<td width="100%">Dear: '.USERNAME($siteowner3['user_id']).'</td>
</tr>
<tr><td width="100%"> </td></tr>
<tr>
<td width="100%">Your bid for '.ADDTITLE($siteowner3['add_id']).' was confirmed by '.USERNAME($objaccep['user_id']).' at '.WEB_ADDRESS.'</td>
</tr>
<tr>
<td width="100%"> </td></tr>
<tr>
<td width="100%">Click here to login to our site <a href="http://'.WEB_ADDRESS.'">http://'.WEB_ADDRESS.'/login.php</a>
</td></tr>
<tr>
<td width="100%"> </td></tr>
<tr>
<td width="100%">
Best Regards,
</td>
</tr>
<tr>
<td width="100%"> </td></tr>
<tr>
<td width="100%">'.WEB_ADDRESS.'</td>
</tr>
</table>
</body>
</html>';
Send_HTML_Mail($mail_To, $mail_From, '', $mail_subject, $mail_Body);
//print $mail_Body;
################### mail to buyer #########
$mail_From2=ADMIN_EMAIL;
$mail_subject2="You confirmed a bid for ".ADDTITLE($objaccep['add_id'])." at ".WEB_ADDRESS;
$mail_To2=USEREMAIL($objaccep['user_id']);
$mail_Body2='<html>
<head>
<title></title>
<style type="text/css">
.font
{
FONT-FAMILY:tahoma, helvetica, sans-serif;
FONT-SIZE:10pt;
FONT-WEIGHT:normal;
COLOR:black;
}
</style>
</head>
<body>
<table border="0" cellpadding="0" cellspacing="0" width="80%" class="font">
<tr><td width="100%"> </td></tr>
<tr>
<td width="100%">Dear: '.USERNAME($objaccep['user_id']).'</td>
</tr>
<tr><td width="100%"> </td></tr>
<tr>
<td width="100%">You confirmed a bid for '.ADDTITLE($objaccep['add_id']).' at '.WEB_ADDRESS.'</td>
</tr>
<tr>
<td> </td>
</tr>
<tr>
<td width="100%">Click here to login to our site <a href="http://'.WEB_ADDRESS.'">http://'.WEB_ADDRESS.'/login.php</a></td></tr>
<tr>
<td width="100%"> </td></tr>
<tr>
<td width="100%">
Best Regards,</td>
</tr>
<tr>
<td width="100%"> </td></tr>
<tr>
<td width="100%">'.WEB_ADDRESS.'</td>
</tr>
</table>
</body>
</html>';
Send_HTML_Mail($mail_To2, $mail_From2, '', $mail_subject2, $mail_Body2);
//print $mail_Body;
$msg=successfulMessage("You have successfully confirmed the bid amount, please wait for the seller to confirm. For further communication please use private message system.");
}
?>
<!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>
<title><?=TITLE?></title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="keywords" content="<?=META_KEYWORDS?>"/>
<meta name="description" content="<?=META_CONTENT?>"/>
<link href="css/fresh-auction.css" rel="stylesheet" type="text/css" />
<script type="text/javascript">
function jsHitListAction(p1)
{
document.frm.action = "<?=$_SERVER['PHP_SELF']?>?PageNo=" + eval(p1) ;
document.frm.submit()
}
</script>
</head>
<body>
<? include_once("toppage1.php");?>
<div id="container" >
<? include_once("left-menu.php");?>
<div id="content" >
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><img src="images/lbd_24.jpg" width="742" height="10" /></td>
</tr>
<tr>
<td>
<div class="header_top">
<? include_once("cart-info.php");?>
</div>
<div class="clear"></div>
<!--div class="menu_top">
<? include_once("top-menu.php")?>
</div-->
<p><span class="header_text_h">Placed Bids </span></p>
<p align="center">
<form name="frm" method="post" action="">
<table width="100%" border="0" cellspacing="0" cellpadding="5">
<tr><td align="left" valign="top"><?=$msg?></td></tr>
<tr><td align="left" valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="5" align="center" class="border">
<tr>
<td width="23%" align="left" valign="top" class="rowhead">Advertise Title </td>
<td width="16%" align="left" valign="top" class="rowhead">Bid Amount($)</td>
<td width="16%" align="left" valign="top" class="rowhead">Proposed By </td>
<td width="17%" align="left" valign="top" class="rowhead">Proposed Amount($) </td>
<td width="14%" align="left" valign="top" class="rowhead">Posted On </td>
<td width="14%" align="center" valign="top" class="rowhead">Action</td>
</tr>
<?
$PageSize =30;
$StartRow = 0;
$sql="SELECT p.id,p.user_id as USERID,p.add_id,p.proposed_amt,p.posted_on,p.accept,a.add_id,a.user_id as ADDUSERID,a.title,a.price,a.length,a.status FROM ".PROPOSAL." AS p LEFT JOIN ".ADVERTISE." AS a ON p.add_id=a.add_id WHERE p.user_id='".$_SESSION['user_id']."' ORDER BY p.id DESC ";
$slNo=0;
include_once('paging-top.php');
if(mysql_num_rows($rs)>0)
{
$bgColor = "#ffffff";
for($i=0;$i<mysql_num_rows($rs);$i++)
{
$slNo++;
$obj_fetch=mysql_fetch_array($rs);
?>
<tr>
<td align="left" valign="top"><a href="./<?=remspace($obj_fetch['add_id'])?>"><?=$obj_fetch['title']?></a></td>
<td align="left" valign="top"><?=$obj_fetch['price']?></td>
<td align="left" valign="top"><?=USER($obj_fetch['USERID'])?></td>
<td align="left" valign="top"><?=$obj_fetch['proposed_amt']?></td>
<td align="left" valign="top"><?=dateprint($obj_fetch['posted_on'])?></td>
<td align="center" valign="top">
<?php /*?><a href="<?=$_SERVER['PHP_SELF']?>?mode=del&id=<?=base64_encode($obj_fetch['id'])?>" onClick="return confirm('Are you sure to delete?')" title="Delete">Delete</a><?php */?>
<? if($obj_fetch['accept']=='0'){?>
Pending
<? }if($obj_fetch['accept']=='1'){?>
Rejected
<? }if($obj_fetch['accept']=='2'){?>
<a href="<?=$_SERVER['PHP_SELF']?>?pid=<?=$obj_fetch['id']?>">Confirm</a>
<? }if($obj_fetch['accept']=='3'){?>
Confirmed
<? }if($obj_fetch['accept']=='4'){?>
<span style="color:#E80000">Winner</span>
<br />
<?
$where="user_id='".$obj_fetch['ADDUSERID']."' AND posted_by='".$_SESSION['user_id']."' AND add_id='".$obj_fetch['add_id']."'";
$chk=Select_Qry("*",USER_FEEDBACK,$where,"","","","");
if($chk=='')
{
?>
<a href="post-feedback.php?u=<?=base64_encode($obj_fetch['ADDUSERID'])?>&add_id=<?=$obj_fetch['add_id']?>" class="">Feedback</a>
<?
}
}
?>
</td>
</tr>
<tr><td colspan="6" style="border-bottom:1px dashed #CCCCCC;"> </td></tr>
<?
}
?>
<tr><td align="right" valign="top" colspan="6"><? include_once('pageno.php');?></td></tr>
<?
}
else
{
?>
<tr><td align="center" valign="top" colspan="6"><?=errormessage("No Bid History")?></td></tr>
<?
}
?>
</table>
</td>
</tr>
</table>
</form>
</p>
<div class="sidebar_sep"></div>
</td>
</tr>
<tr>
<td><img src="images/lbd_24a.jpg" width="742" height="10" /></td>
</tr>
</table>
</div></div></div>
<? require_once("upper-footer.php"); ?>
<? require_once("footer.php");?>
</body>
</html>