-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathtest.txt
52 lines (52 loc) · 1.84 KB
/
test.txt
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
<div class="grid grid-rows-5 grid-cols-3">
<h3 class="row-span-1 col-span-2 text-2xl font-bold m-10 mb-0 p-4 bg-gray-200">
<?php echo $item_data["i_name"]; ?>
</h3>
<image class="row-span-5 col-span-1 p-0 m-5 bg-green-100 text-center" src="<?php echo imageSrc($item_data["i_image"]); ?>"/>
<p class="row-span-4 col-span-2 p-4 m-10 mt-0 bg-gray-200">
<?php echo $item_data["i_description"]; ?>
</p>
</div>
<div class="flex flex-row justify-between items-center">
<div id="price" class="p-4 m-10 bg-green-100 text-center">
<?php echo $item_data["i_price"]; ?>
</div>
<div class="flex flex-row justify-between items-center w-3/10">
<?php
if($is_users_listing){
echo drawEditItemButton($item_data['i_id'], $BLUE_BUTTON, $EDIT);
} else {
echo " ";
}
//check if user is signed in
if($signed_in){
//make sure user doesn't own the listing....
if(!$is_users_listing){
//if item is in cart of the user
if($is_item_in_cart){
//remove item
echo drawRemoveFromCartButton($item_data['i_id'], BLUE_BUTTON, REMOVE_FROM_CART);
} else {
//make sure item isn't currently pending (in an offer)..
if(!$is_item_pending){
if(Order::isItemOpen($item_data['i_id'])){
//add item button
echo drawAddToCartButton($item_data['i_id'], BLUE_BUTTON, ADD_TO_CART);
} else {
//draw this button to show the item is not available for offers at all
echo drawUnavailableButton($BLUE_BUTTON);
}
} else {
echo drawPendingButton($BLUE_BUTTON);
}
}
}
} else {
echo drawSignInButton('Sign In to Purchase', $BLUE_BUTTON);
}
?>
</div>
</div>
<div id="lineage" class="p-4 m-10 bg-green-100 text-center">
lineage
</div>