本文整理汇总了PHP中Campaign::getCampaignHome方法的典型用法代码示例。如果您正苦于以下问题:PHP Campaign::getCampaignHome方法的具体用法?PHP Campaign::getCampaignHome怎么用?PHP Campaign::getCampaignHome使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Campaign
的用法示例。
在下文中一共展示了Campaign::getCampaignHome方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: getIndex
public function getIndex()
{
$campaign = new Campaign();
$image = $campaign->getCampaignImage();
$users = new Users();
$member = $users->getRecentUsers();
$this->layout->foot = View::make("landing.foot")->with(array('data' => $image, 'data2' => $member));
$this->layout->title = "Welcome to Sagip.ph";
if (Session::has('userid')) {
$username = Session::get('username');
$logstatus = true;
$userid = Session::get('userid');
$profile = new Profile();
$pic = "#";
$result = $profile->getProfile($userid);
if ($result) {
$pic = $result->profilepic;
}
$data = array('username' => $username, 'logstatus' => $logstatus, 'profilepic' => $pic);
$campaign = new Campaign();
$data2 = $campaign->getCampaignHome();
$this->layout->head = View::make("landing.head")->with($data);
$this->layout->body = View::make("landing.bodycontributordash")->with($data);
} else {
$logstatus = false;
$data = array('logstatus' => $logstatus);
$campaign = new Campaign();
$data2 = $campaign->getCampaignHome();
$this->layout->head = View::make("landing.head")->with($data);
$this->layout->body = View::make("landing.bodycontributordash")->with($data);
}
}
示例2: getIndex
public function getIndex()
{
// Session::put('userid','001');
// Session::put('username','jehdeguzman');
$this->layout->title = "Welcome to Sagip.ph";
// $campaign = new Campaign;
// $result = $campaign->getImage();
$campaign = new Campaign();
$image = $campaign->getCampaignImage();
$users = new Users();
$member = $users->getRecentUsers();
$this->layout->foot = View::make("landing.foot")->with(array('data' => $image, 'data2' => $member));
if (Session::has('userid')) {
$username = Session::get('username');
$logstatus = true;
$userid = Session::get('userid');
$profile = new Profile();
$pic = "#";
$result = $profile->getProfile($userid);
if ($result) {
$pic = $result->profilepic;
}
$data = array('username' => $username, 'logstatus' => $logstatus, 'profilepic' => $pic);
$campaign = new Campaign();
$data2 = $campaign->getCampaignHome();
$donation = new Donations();
$data3 = $donation->getTopContributorsHome();
$this->layout->head = View::make("landing.head")->with($data);
$this->layout->body = View::make("landing.bodyhome")->with(array('data2' => $data2, 'data3' => $data3, 'logstatus' => $logstatus));
//return View::make('home')->with($data);
} else {
$logstatus = false;
$data = array('logstatus' => $logstatus);
$campaign = new Campaign();
$data2 = $campaign->getCampaignHome();
$donation = new Donations();
$data3 = $donation->getTopContributorsHome();
$this->layout->head = View::make("landing.head")->with($data);
$this->layout->body = View::make("landing.bodyhome")->with(array('data2' => $data2, 'data3' => $data3, 'logstatus' => $logstatus));
}
}