-
Notifications
You must be signed in to change notification settings - Fork 19
/
Copy pathdump_ebay.php
65 lines (58 loc) · 2.14 KB
/
dump_ebay.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
<?php
require_once ('lib/config.php');
require_once('blocks/head.php');
?>
<body>
<?
require_once('blocks/menu.php');
require_once('lib/ebay.php');
$items = Ebay::get_active_items();
$count = count($items);
if ($count == 0)
{
?>
<div id="ErrorMsg" class="alert alert-error">
<button type="button" class="close" data-dismiss="alert">×</button>
No items found. Error?
</div>
<p><strong>Products Unavailable</strong></p>
<?php
}
else
{
?>
<h3>Current products on eBay(<?php echo $count;?>)</h3>
<table class="table table-bordered">
<tr>
<th style="width:80px;">eBbay ID</th>
<th style="width:80px;">SKU</th>
<th style="width:320px;">Description</th>
<th style="width:50px;">Image</th>
<th style="width:50px;">CurrentPrice</th>
<th style="width:50px;">BuyItNowPrice</th>
<th style="width:50px;">Quantity</th>
<th style="width:120px;">Start time</th>
</tr>
<?php
foreach($items as $item)
{
$name = str_replace('-', ' ', preg_replace('%http://www.ebay.com/itm/(.*)/\d+%', '$1', $item->ListingDetails->ViewItemURL));
?>
<tr>
<td> <a href="<?php echo $item->ListingDetails->ViewItemURL; ?>"> <?php echo $item->ItemID; ?> </a></td>
<td> <?php echo $item->SKU; ?> </td>
<td> <?php echo $name; ?> </td>
<td> <img src='<?php echo $item->PictureDetails->GalleryURL; ?>' /> </td>
<td> <?php echo $item->SellingStatus->CurrentPrice; ?> </td>
<td> <?php echo $item->BuyItNowPrice; ?> </td>
<td> <?php echo $item->QuantityAvailable; ?> </td>
<td> <?php echo $item->ListingDetails->StartTime; ?> </td>
</tr>
<?
}
?>
</table>
<?
}
?>
</body>