本文整理汇总了PHP中Banner::get方法的典型用法代码示例。如果您正苦于以下问题:PHP Banner::get方法的具体用法?PHP Banner::get怎么用?PHP Banner::get使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Banner
的用法示例。
在下文中一共展示了Banner::get方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: cauhinh
function MY_Controller()
{
parent::Controller();
$this->load->library('enum');
$this->load->config('fireignition');
$this->load->helper('language');
$this->lang->load('site');
$this->load->library('hit_counter');
$this->load->library('FirePHP');
if ($this->config->item('fireignition_enabled')) {
if (floor(phpversion()) < 5) {
log_message('error', 'PHP 5 is required to run fireignition');
} else {
$this->load->library('FirePHP');
}
} else {
$this->load->library('Firephp_fake');
$this->firephp =& $this->firephp_fake;
}
//redirect from old website
$this->redirectList();
$cauhinh = new cauhinh();
$cauhinh->get();
$this->cauhinh = $cauhinh;
if ($this->uri->segment(1, "") == "admin") {
$this->logged_in_user = $this->_get_user();
$this->admin = $this->config->item('admin');
$this->admin_url = $this->config->item('admin_url');
$this->admin_images = base_url() . "images/admin/";
//LOAD HELPER
$this->load_admin_resource();
//check maintenance admin , only webmaster can login
$this->resetNewsViewMost();
} else {
//check login user
//$this->flogged_in_user=$this->_fget_user();
$this->isCache = true;
$this->userLoginFlag = 0;
$userLogin = $this->session->userdata('userLogin');
$userToken = $this->session->userdata('userToken');
$customer = new Customer();
$customer->get_by_username($userLogin);
if ($customer->exists() && md5($customer->id) == trim($userToken)) {
$loginUsername = $customer->username;
$this->customer = $customer;
if ($this->session->userdata('userloginFlag') == "1") {
$this->userLoginFlag = 1;
$this->session->set_userdata('userloginFlag', "0");
}
} else {
$loginUsername = "";
}
$this->loginUsername = $loginUsername;
$this->loginUser = $customer;
$this->page_title = getconfigkey("defaultPageTitle");
$this->load->helper('language');
$this->show_analytic = TRUE;
$this->page_keyword = getconfigkey("defaultKeyword");
$this->page_description = getconfigkey("defaultDescription");
$this->isRobotFollow = true;
//------------------------------------------------
// get data handler
//------------------------------------------------
$listAllCat = array();
$newsCate = new Newscatalogue();
$newsCate->order_by('position');
$newsCate->where(array('recycle' => 0, 'parentcat_id' => 58));
$newsCate->get_iterated();
$this->newsCate = $newsCate;
foreach ($newsCate as $row) {
array_push($listAllCat, $row->id);
}
/*Get all business cat*/
$businessCat = new Newscatalogue();
$businessCat->order_by('position');
$businessCat->where(array('recycle' => 0, 'parentcat_id' => 91));
$businessCat->get_iterated();
$this->businessCat = $businessCat;
$guideCate = new Newscatalogue();
$guideCate->order_by('position');
$guideCate->where(array('recycle' => 0, 'parentcat_id' => 76));
$guideCate->get_iterated();
$this->guideCate = $guideCate;
foreach ($guideCate as $row) {
array_push($listAllCat, $row->id);
}
$this->listAllCat = $listAllCat;
$projectsCate = new Newscatalogue();
$projectsCate->order_by('position');
$projectsCate->where(array('recycle' => 0, 'parentcat_id' => 83));
$projectsCate->get_iterated();
$this->projectsCate = $projectsCate;
$arrayCateNewsId = array();
foreach ($this->projectsCate as $row) {
$arrayCateNewsId[] = $row->id;
}
$this->arrCateProject = $arrayCateNewsId;
// project hot
$projectHot = new Article();
$projectHot->where('recycle', 0);
//.........这里部分代码省略.........
示例2: setConfig
$result .= $content;
}
$this->codes_count -= $count;
$this->setToBase();
return $result;
}
public function setConfig($count)
{
$this->codes_count = $count;
$this->setToBase();
}
}
$banner = new Banner('banner');
echo $banner->get(50);
$banner_id = new Banner('ban');
echo $banner_id->get(1);
//задать значение по умолчанию
$banner->setConfig(100);
?>
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/1.9.1/jquery.min.js"></script>
<script>
var id = window.location.hash.replace("#","");
banner_id = id.split('-')[1];
var offset = $("#"+banner_id).offset().top ;
$("body").animate({ scrollTop: offset}, 1000 );
$("#"+banner_id).css({
'border': '1px solid rgb(255, 0, 0)',
'display' : 'inline-block'