本文整理汇总了PHP中Campaign::get_campaigns方法的典型用法代码示例。如果您正苦于以下问题:PHP Campaign::get_campaigns方法的具体用法?PHP Campaign::get_campaigns怎么用?PHP Campaign::get_campaigns使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Campaign
的用法示例。
在下文中一共展示了Campaign::get_campaigns方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: simple_campaign_table
public function simple_campaign_table($lang = false, $matrix)
{
require_once 'create.campaign.php';
$campaign = new Campaign($this->config);
$campaign->get_campaigns();
$total = 0;
foreach ($campaign->campaigns as $c) {
$hours = '-' . gmdate("h", $c['offset']);
$when = date("h:iA d-m-Y", strtotime($c['send_time']));
$subscribers = intval($c['subscribers']);
$total += $subscribers;
echo str_pad($c['title'], 20, '.') . "\t" . $when . " (offset {$hours} hours)" . " {$subscribers} subs \n\r";
}
echo 'Total subscribers: ' . $total;
exit;
}
示例2: generateCampaignGridList
public static function generateCampaignGridList($parameters = array(), $mystatus = false)
{
extract($parameters);
$gridComponent = '<div class="">
<div class="row" style="margin: 0 auto;">';
$category = Input::get('categories_list') != 'All' || Input::get('categories_list') != '0' ? Input::get('categories_list') : '';
if ($mystatus && strlen($mystatus) > 0) {
$recent_campaigns = Campaign::get_campaigns($category, $mystatus);
} else {
$recent_campaigns = Campaign::get_campaigns($category);
}
foreach ($recent_campaigns as $item) {
$file = Helpers::getUploadedFileDetails($item->listing_logo);
if (empty($file)) {
$image = 'no-image.png';
} else {
$image = $file[0]->file_alias;
}
$u = URL::route('campaigns_grid_info', array('campaign' => $item->uniqueid));
$moreInfo = HTML::link($u, '...view more', array("class" => ""));
$gridComponent .= " <div class='campaign_holder campaign_holder' style='height: auto !important;'>\n " . HTML::image("/assets/{$image}", $item->campaigname . ' campaign logo', array("height" => "180px", "width" => "100%")) . "\n <div class=''>\n <div class='panel-body'>\n <div style='color: #57A0C9;'>\n <h4>{$item->campaigname}</h4>\n <!--<div class=\"progress\">\n <div class=\"progress-bar progress-bar-warning\" role=\"progressbar\" aria-valuenow=\"60\" aria-valuemin=\"0\" aria-valuemax=\"100\" style=\"width: percentage_share_completion;\">\n <span class=\"sr-only\">percentage_share_completion Complete</span>\n </div>\n </div>-->\n </div>\n </div>\n <div class=\"panel-footer\" style='height: 100px;'>\n " . substr($item->business_summary, 0, 100) . $moreInfo . "\n </div>\n <!--<div class=\"panel-footer\" style='height: 100px;'>\n <h5>item->no_of_shares Shares </h5>\n <h6>item->no_of_shares - item->share_bought Remaining | Days Remaining</h6>\n </div>-->\n </div> \n </div>";
}
if (count($recent_campaigns) == 0) {
$gridComponent .= '<br/><br/><div class="callout callout-warning">
<h4>No campaigns found under category selected</h4>
</div>';
}
$gridComponent .= '</div>
</div>';
return $gridComponent;
}
示例3: rgb
</div>
<div class="video_spacer"></div>
<center><h1 style="color: #57A0C9; font-size: 40px; font-family: 'Kirvy-regular'; clear: both;">...Explore great projects</h1></center>
<!-- <div class="center-block" style=" color: rgb(108, 194, 200); font-size: 40px; font-family: 'Kirvy-regular'; margin-top: 70px; text-align: center;">
<h2 class="bold_header">Featured Campaigns</h2>
</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;">
示例4: realpath
$error = "";
require_once realpath(dirname(__FILE__)) . '/../classes/dashboard/Campaign.php';
$campaign = new Campaign();
if (isset($_REQUEST['sub']) && $_REQUEST['sub'] == 'delete') {
if (isset($_REQUEST['id'])) {
$id = (int) $_REQUEST['id'];
if ($campaign->delete($id)) {
$msg = "Campaign deleted successfully";
} else {
$error = "Error deleting campaign";
}
}
}
$q = "SELECT * FROM campaigns";
$r = $db->Execute($q);
$campaigns = $campaign->get_campaigns();
?>
<div class="row">
<div class="col-sm-4">
<ol class="breadcrumb bc-3">
<li> <a href="admin.php?act=dashboard"><i class="entypo-home"></i>Dashboard</a> </li>
<li class="active"> <strong>Campaigns</strong> </li>
</ol>
</div><div class="fr custom-btn"> <a href="admin.php?act=addcampaign" class="btn btn-blue fr">Add Campaign</a> </div>
<div class="clearfix"></div>
</div>
<h2>Manage Campaigns</h2>
<br />
<?php
print_success($msg);
print_error($error);