Esempio n. 1
0
<?php

include_once 'functions.php';
require $this->template_path . 'config.php';
?>
<section class="site_body">
<?php 
$highest_bidder = getTopBidder();
$totalproduct = getTotalProduct();
if ($totalproduct > 0) {
    $product = getProductList();
    for ($i = 0; $i < $totalproduct; $i++) {
        $pro_id = $product[$i]["pid"];
        $pro_brand = $product[$i]["brand"];
        $pro_model = $product[$i]["model"];
        $pro_mprice = $product[$i]["mprice"];
        $pro_aprice = $product[$i]["aprice"];
        //		$pro_category =$product[$i]["category"];
        //		$pro_availability = $product[$i]["availability"];
        //		$pro_description = $product[$i]["description"];
        $pro_bid = $product[$i]["bid"];
        //		$pro_astart = $product[$i]["astart"];
        $pro_aend = $product[$i]["aend"];
        $auctiontime = $pro_aend - time();
        if ($pro_bid <= 200) {
            $tokenneed = 1;
        }
        if ($pro_bid <= 400 && $pro_bid > 200) {
            $tokenneed = 2;
        }
        if ($pro_bid <= 600 && $pro_bid > 400) {
Esempio n. 2
0
<?php

include_once 'functions.php';
require $this->template_path . 'config.php';
?>
<div id="wrapper">
    <section id="content_container">
		<section class="site_body">
		<?php 
$top_bidder = getTopBidder();
if (isset($_GET['search'])) {
    $search_terms = trim($_GET['search']);
    if (strlen($search_terms) < 3) {
        echo "Search terms must be longer than 3 characters.";
    } else {
        $totalproduct = searchTotalProduct($search_terms);
        $searchproduct = getProductList($search_terms);
        if ($totalproduct > 0) {
            for ($i = 0; $i < $totalproduct; $i++) {
                $productID = $searchproduct[$i]["pid"];
                $Brand = $searchproduct[$i]["brand"];
                $Model = $searchproduct[$i]["model"];
                $Marketprice = $searchproduct[$i]["mprice"];
                $Auctionprice = $searchproduct[$i]["aprice"];
                $auctionend = $searchproduct[$i]["aend"];
                $auctiontime = $auctionend - time();
                $token_needed = $searchproduct[$i]["bid"];
                if ($token_needed <= 200) {
                    $tokenneed = 1;
                }
                if ($token_needed <= 400 && $token_needed > 200) {