-
Notifications
You must be signed in to change notification settings - Fork 0
/
archieved_offers.php
49 lines (47 loc) · 1.73 KB
/
archieved_offers.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
<?php
include("smartyConfig.php");
include("appWideConfig.php");
include("dbConfig.php");
include("includes/configs/configs.php");
include("builder_function.php");
include("modelsConfig.php");
global $arrOfferTypes;
$projectId = $_REQUEST['projectId'];
$offerDetails = ProjectOffers::find('all',array('conditions'=>array('project_id'=>$projectId)));
?>
<link href="css/css.css" rel="stylesheet" type="text/css">
<TABLE cellSpacing=1 cellPadding=4 width="97%" align=center border=0>
<TBODY>
<TR class = "headingrowcolor">
<TH class=whiteTxt width=1% align="center">SL</TH>
<TH class=whiteTxt width=5% align="center">Offer Type</TH>
<TH class=whiteTxt width=23% align="left">Offer Desc</TH>
<TH class=whiteTxt width=5% align="left">Start Date</TH>
<TH class=whiteTxt width=5% align="left">End Date</TH>
<TH class=whiteTxt width=5% align="center">Status</TH>
</TR>
<?php if($offerDetails){
$count = 0;
foreach ($offerDetails as $key=>$data){
$count = $count+1;
if ($count%2 == 0){
$color = "bgcolor = '#F7F7F7'";
}else{
$color = "bgcolor = '#FCFCFC'";
}
print '<TR '.$color.'>
<TD>'.$count.'</TD>
<TD>'.$arrOfferTypes[$data->offer].'</TD>
<TD>'.$data->offer_desc.'</TD>
<TD>'.date('d-m-Y',strtotime(trim(substr($data->created_at,0,11)))).'</TD>
<TD>'.date('d-m-Y',strtotime(trim(substr($data->offer_end_date,0,11)))).'</TD>
<TD>'.$data->status.'</TD>
</TR>';
}
}else{
print '<tr>
<td colspan=4>No Record Found.</td>
</tr>';
} ?>
</TBODY>
</TABLE>