Esempio n. 1
0
 /**
  * Display the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function show($id, $option = false)
 {
     if (strtolower(Session::get('account_type')) == 'admin') {
         $transactions = Mradiwallettransaction::where('user_id', $id)->orderBy('id', 'desc')->paginate(15);
         $myBalance = Helpers::investorBalance($id);
         $totalInvestorBid = Helpers::getTotalInvestorBid($id, false, true);
         return View::make('admin.pages.investor_transactions_admin')->with(compact('totalInvestorBid', 'myBalance'))->withObjects($transactions);
     } else {
         //get transactions of a single investor
         $transactions = Mraditransactionlog::find($id);
         // show the view and pass the investor transactions to it
         return View::make('admin.pages.jambo_form')->withObjects($transactions);
     }
 }
Esempio n. 2
0
                <input type="text" name="subscribers_email" class="form-control" placeholder="Email Address" style="height:30px;">               
                <span class="input-group-btn">
                    <button class="btn btn-default" type="submit" style="height:30px; padding-top: 1px">Subscribe Newsletter</button>
                </span>
                
            </div></div></center></div>

<div class="video_spacer"></div>
<div id="sticky-anchor"></div>
<?php 
include 'common/headerB.php';
?>


<center><h1 style="color: #57A0C9; font-size: 40px; font-family: 'Kirvy-regular'; clear: both;">Over <b>KES <?php 
echo number_format(Helpers::getTotalInvestorBid("guest")->sum('Amount'), 2);
?>
</b> Raised</h1></center>


<!--<div style='height: 720px;'></div> -->
<div style="width: 100%; clear: both; background: url('<?php 
echo url();
?>
/media/img/xcx.jpg') no-repeat; padding: 20px; margin-top: 30px">   
    <div class="jumbotron center-block" style='border-top: 1px #ccc solid; clear: both; width: 70%; background-color: #96864C; background-color: rgba(252, 228, 106, 0.8); padding: 20px;  margin-top: 30px;'>
        <h3 style='color: #fff;' class="mradi_header">Mradifund</h3>
        <p class="lead" style='font-size: 1.1em;  color: #000000; '>
            <span style=""><b>Mradifund is an online fundraising platform. We connect small business owners with investors who provide the expansion
                    capital and mentorship they need to get to the next level. <br />At the same time, we give investors an opportunity to hand pick  
                    small companies to privately invest it, allowing them to diversify their portfolios and find the next big thing before it 
Esempio n. 3
0
    public function getList($status = false)
    {
        //get all bids
        // load the view and pass the all transactions
        $status = e(Input::get('categories_list'));
        if ($status == "" || $status == "All") {
            $condition = "";
        } else {
            $condition = " where tbl_campaigns.campaignstatus = '" . $status . "'";
        }
        if (strtolower(Session::get('account_type')) == 'admin') {
            $transactions = DB::select(DB::raw('select mcb.*, drv.*, tbl_campaigns.campaignstatus from mradicampaignbids mcb
							inner join
							(SELECT campaign_id as cid, count(id) as count, max(total_bidded) as totalBid, max(updated_at) as last_bid
							from mradicampaignbids group by campaign_id order by id desc) drv
							on mcb.campaign_id = drv.cid
							inner join tbl_campaigns on mcb.campaign_id = tbl_campaigns.uniqueid
							' . $condition . '
							group by mcb.campaign_id'));
            $pageNumber = Input::get('page', 1);
            $perpage = 15;
            $slice = array_slice($transactions, $perpage * ($pageNumber - 1), $perpage);
            $transactions = Paginator::make($slice, count($transactions), $perpage);
        } elseif (strtolower(Session::get('account_type')) == 'entrepreneur') {
            $con = "where " . strtolower(Session::get('account_type')) . "_id = " . Session::get('account_id');
            $transactions = DB::select(DB::raw('select mcb.*, drv.*, tbl_campaigns.campaignstatus from mradicampaignbids mcb 
							inner join
							(SELECT campaign_id as cid, count(id) as count, max(total_bidded) as totalBid, max(updated_at) as last_bid
							from mradicampaignbids ' . $con . ' group by campaign_id order by id desc) drv
							on mcb.campaign_id = drv.cid
							inner join tbl_campaigns on mcb.campaign_id = tbl_campaigns.uniqueid
							' . $condition . '
							group by mcb.campaign_id'));
            $pageNumber = Input::get('page', 1);
            $perpage = 15;
            $slice = array_slice($transactions, $perpage * ($pageNumber - 1), $perpage);
            $transactions = Paginator::make($slice, count($transactions), $perpage);
        } else {
            //$transactions = Mradicampaignbid::where(strtolower(Session::get('account_type')).'_id', Session::get('account_id'))->orderBy('id','desc')->paginate(15);
            $con = "where " . strtolower(Session::get('account_type')) . "_id = " . Session::get('account_id');
            $transactions = DB::select(DB::raw('select mcb.*, drv.*, tbl_campaigns.campaignstatus from mradicampaignbids mcb 
							inner join
							(SELECT campaign_id as cid, count(id) as count, max(total_bidded) as totalBid, max(updated_at) as last_bid
							from mradicampaignbids ' . $con . ' group by campaign_id order by id desc) drv
							on mcb.campaign_id = drv.cid
							inner join tbl_campaigns on mcb.campaign_id = tbl_campaigns.uniqueid
							' . $condition . '
							group by mcb.campaign_id'));
            $pageNumber = Input::get('page', 1);
            $perpage = 15;
            $slice = array_slice($transactions, $perpage * ($pageNumber - 1), $perpage);
            $transactions = Paginator::make($slice, count($transactions), $perpage);
        }
        $totalInvestorBid = Helpers::getTotalInvestorBid(Session::get('account_id'));
        $totalOnlineBid = Helpers::getTotalInvestorBid(Session::get('account_id'), true);
        $myBalance = Helpers::investorBalance(Session::get('account_id'));
        return View::make('admin.pages.campaign_bids')->with(compact('totalInvestorBid', 'myBalance', 'totalOnlineBid'))->withObjects($transactions);
    }