public function getBidCampaign($campaignID)
 {
     $campaign = Helpers::getCampaignSummary($campaignID);
     //total investment sought
     $totatInvestment = Helpers::getTotalInvestment($campaignID);
     $cValue = $totatInvestment[0]->total_investment;
     //bidding done
     $myBid = Helpers::getTotalBidded($campaignID);
     $totalBid = $myBid ? $myBid->total_bidded : '0';
     //investor balance
     $user_id = Session::get('account_id');
     $investor_balance = Helpers::investorBalance($user_id);
     if (\Request::ajax()) {
         return View::make('admin.pages.bidder', compact('campaign', 'campaignID', 'cValue', 'totalBid', 'investor_balance'));
     }
 }
                    </div>

                    <div style="height:220px;  background-color: #fff; padding-top: 5px; margin-left: 300px">
						<?php 
if (strtolower(Helpers::getCampaignStatus($campaign)->campaignstatus) == 'ongoing' || strtolower(Helpers::getCampaignStatus($campaign)->campaignstatus) == 'closed') {
    ?>
                        <section class="content-header"> <h1>{{Helpers::getCampaignID($campaign,true)}}</h1> </section>
                        <h4>{{Campaign::getTotalViews($campaign)}} Views</h4>
                        <span style="width:40% !important;">
									<?php 
    //total amount bidded
    $myBid = Helpers::getTotalBidded($campaign);
    $totalBid = $myBid ? $myBid->total_bidded : '0';
    //campaign value
    $investment = Helpers::getTotalInvestment($campaign);
    $campaignValue = $investment ? $investment[0]->total_investment : 0;
    //$percentage_share_completion = ($item->share_bought * 100) / $item->no_of_shares;
    $percentage_share_completion = $totalBid * 100 / $campaignValue;
    ?>
                            <div class="progress" style="width: 40%; text-align: center; ">

                                <div class="progress-bar progress-bar-green" role="progressbar" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100" style="width: <?php 
    echo $percentage_share_completion;
    ?>
%;">
                                    <span class="sr-only" style="position: relative !important;"><?php 
    echo $percentage_share_completion;
    ?>
% Complete</span>
                                </div>
示例#3
0
</div> -->


<div class="row featured_campaign_holder">

    <div class="row center-block" style=" width: 1000px;  text-align: center; margin: 0 auto;">
        <?php 
$recent_campaigns = Campaign::get_campaigns("guest");
//$recent_campaigns = Campaign::get_recent_campaigns(3);
//dd($recent_campaigns);
foreach ($recent_campaigns as $item) {
    //total amount bidded
    $myBid = Helpers::getTotalBidded($item->uniqueid);
    $totalBid = $myBid ? $myBid->total_bidded : '0';
    //campaign value
    $investment = Helpers::getTotalInvestment($item->uniqueid);
    $campaignValue = $investment ? $investment[0]->total_investment : 0;
    //$percentage_share_completion = ($item->share_bought * 100) / $item->no_of_shares;
    $percentage_share_completion = $totalBid * 100 / $campaignValue;
    //echo $percentage_share_completion; exit;
    ?>

            <div class='temp_one_index_campaign_holder' style="height: auto !important;">
                <?php 
    $file = Helpers::getUploadedFileDetails($item->listing_logo);
    if (empty($file)) {
        $image = 'no-image.png';
    } else {
        $image = $file[0]->file_alias;
    }
    echo HTML::image("/assets/{$image}", $item->campaigname . ' campaign logo', array("height" => "180px", "width" => "100%"));
示例#4
0
 /**
  * Display the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function show($campaign_id)
 {
     $transactions = Mradicampaignbid::where('campaign_id', $campaign_id)->orderBy('id', 'desc')->paginate(15);
     //total amount bidded
     $myBid = Helpers::getTotalBidded($campaign_id);
     $totalBid = $myBid ? $myBid->total_bidded : '0';
     //campaign value
     $investment = Helpers::getTotalInvestment($campaign_id);
     $campaignValue = $investment ? $investment[0]->total_investment : 0;
     //no of investors
     $investorCount = $transactions->count();
     //online bids
     $totalOnlineBid = Helpers::getTotalInvestorBid(Session::get('account_id'), true);
     return View::make('admin.pages.campaign_bid_view')->with(compact('campaign_id', 'totalBid', 'campaignValue', 'investorCount', 'totalOnlineBid'))->withObjects($transactions);
 }