Exemplo n.º 1
0
 public function notification($art_id, $user_id)
 {
     $bidders = bid::where('bids.art_id', $art_id)->join('arts', 'arts.id', '=', 'bids.art_id')->where('bids.user_id', '<>', $user_id)->select('bids.user_id', 'arts.title')->get();
     foreach ($bidders as $bidder) {
         $input = new notification();
         $input->user_id = $bidder->user_id;
         $input->notification = $bidder->title . " is sold.";
         $input->save();
     }
     $watchlist = watchlist::where('watchlists.art_id', $art_id)->join('arts', 'arts.id', '=', 'watchlists.art_id')->where('watchlists.user_id', '<>', $user_id)->select('watchlists.user_id', 'arts.title')->get();
     foreach ($watchlist as $list) {
         $input = new notification();
         $input->user_id = $list->user_id;
         $input->notification = $list->title . " from your watchlist is sold.";
         $input->save();
     }
 }
<div class="container-fluid">
	<div class="row">
		<div class="col-xs-12">
			<div class="page-title">Your BID History</div>
			<?php 
include "classes/bid.class.php";
$obid = new bid();
$obid->bidList();
?>
		</div>
	</div>
</div>
Exemplo n.º 3
0
<?php

// session_start();
include "classes/bid.class.php";
$obid = new bid();
if (isset($_POST['bid-submit'])) {
    $obid->amount = $_POST['amount'];
    $obid->odd = $_POST['odd'];
    $obid->weeklyoddid = $_POST['weeklyoddid'];
    switch ($obid->userweeklybid()) {
        case 'SUCCESS':
            $_SESSION['success_message'] = "Your Bid has been Successfully Place. Thank you.";
            echo "<script type=\"text/javascript\">window.location=\"index.php?page=yourbid\"</script>";
            break;
        case 'TRY_AGAIN':
            $_SESSION['error_message'] = "Error Occured Please Try Again Later!";
            echo "<script type=\"text/javascript\">window.location=\"index.php?page=yourbid\"</script>";
            break;
        default:
            $_SESSION['error_message'] = "Error Occured Please Try Again Later!";
            echo "<script type=\"text/javascript\">window.location=\"index.php?page=yourbid\"</script>";
            break;
    }
}
?>

<div class="container-fluid">
	<div class="row">
		<div class="col-xs-12 title">Weekly ODD Bid</div>
	</div>
</div>
<?php 
// session_start();
include "classes/bid.class.php";
$oBid = new bid();
$oBid->bidlist();