Inheritance: extends CI_Controller
Example #1
0
 public function __construct()
 {
     parent::__construct();
     $this->load->Model('User');
     $this->load->Model('Review');
     $this->load->Model('Book');
     if (!$this->is_login()) {
         $this->session->set_flashdata("error_message", "Please login");
         redirect(base_url('/'));
     }
     $this->load->Model("Author");
 }
Example #2
0
 function __construct($options = array())
 {
     $defaults = array('name' => __('Blog', 'largo'), 'description' => __('A blog-like list of posts with the ability to stick a post to the top of the homepage. Be sure to set Homepage Bottom to the single column view.', 'largo'), 'rightRail' => true, 'template' => get_template_directory() . '/homepages/templates/blog.php');
     $options = array_merge($defaults, $options);
     parent::__construct($options);
 }
Example #3
0
 function __construct($options = array())
 {
     $defaults = array('template' => get_template_directory() . '/homepages/templates/top-stories.php', 'assets' => array(array('homepage-slider', get_template_directory_uri() . '/homepages/assets/css/top-stories.css', array())), 'name' => __('Top Stories', 'largo'), 'type' => 'top-stories', 'description' => __('A newspaper-like layout highlighting one Top Story on the left and others to the right.', 'largo'), 'rightRail' => true, 'prominenceTerms' => array(array('name' => __('Homepage Top Story', 'largo'), 'description' => __('If you are using the Newspaper or Carousel optional homepage layout, add this label to a post to make it the top story on the homepage', 'largo'), 'slug' => 'top-story'), array('name' => __('Homepage Featured', 'largo'), 'description' => __('If you are using the Newspaper or Carousel optional homepage layout, add this label to posts to display them in the featured area on the homepage.', 'largo'), 'slug' => 'homepage-featured')));
     $options = array_merge($defaults, $options);
     parent::__construct($options);
 }
Example #4
0
 function __construct($options = array())
 {
     $defaults = array('template' => get_template_directory() . '/homepages/templates/full-width-image.php', 'type' => 'single', 'name' => __('Big story, full-width image', 'largo'), 'description' => __('A single story with full-width image treatment. Includes a headline and excerpt.', 'largo'), 'sidebars' => array(__('Home Bottom Left', 'largo'), __('Home Bottom Center', 'largo'), __('Home Bottom Right', 'largo')), 'assets' => array(array('homepage-single', get_template_directory_uri() . '/homepages/assets/css/single.css', array()), array('homepage-single', get_template_directory_uri() . '/homepages/assets/js/single.js', array('jquery'))), 'prominenceTerms' => array(array('name' => __('Homepage Top Story', 'largo'), 'description' => __('If you are using a "Big story" homepage layout, add this label to a post to make it the top story on the homepage', 'largo'), 'slug' => 'top-story')));
     $options = array_merge($defaults, $options);
     parent::__construct($options);
 }
Example #5
0
 function getRandomGame($random_id)
 {
     return Homepage::query('SELECT game_id, title, plays FROM tbl_games WHERE game_id=' . $random_id);
 }
Example #6
0
 function __construct($options = array())
 {
     $defaults = array('template' => get_template_directory() . '/homepages/templates/legacy-three-column.php', 'name' => __('Legacy Three Column', 'largo'), 'type' => 'legacy-three-column', 'description' => __('This layout has a skinny left sidebar, wide right sidebar and a list of stories in the middle column. This layout allows setting a homepage Top Story.', 'largo'), 'rightRail' => true, 'sidebars' => array(__('Homepage Left Rail', 'largo')), 'prominenceTerms' => array(array('name' => __('Homepage Top Story', 'largo'), 'description' => __('If you are using a "Big story" homepage layout, add this label to a post to make it the top story on the homepage', 'largo'), 'slug' => 'top-story')), 'assets' => array(array('legacy-three-column', get_template_directory_uri() . '/homepages/assets/css/legacy-three-column.css', array())));
     $options = array_merge($defaults, $options);
     parent::__construct($options);
 }
Example #7
0
     */
    public function getHackerNewsHtml()
    {
        $url = "https://news.ycombinator.com/news";
        $ch = curl_init();
        curl_setopt($ch, CURLOPT_URL, $url);
        curl_setopt($ch, CURLOPT_USERAGENT, self::USERAGENT);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
        $html = curl_exec($ch);
        $start = strpos($html, '<table border="0" cellpadding="0" cellspacing="0" class="itemlist">');
        $length = strpos($html, '<tr><td><img src="s.gif" height="10" width="0">') - $start;
        $frag = preg_replace("/href=\"item/", "href=\"https://news.ycombinator.com/item", substr($html, $start, $length));
        return "<section id=\"hn\">{$frag}</table></section>";
    }
}
$homepage = new Homepage();
?>
<!DOCTYPE html>
<html language="en">
<head>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Homepage</title>
<style>
body {
    padding-top: 10px;
}
header {
    position: fixed;
    top: 0;
    left: 0;
Example #8
0
        
        
        
        
        
        <div class="col-md-8" style="padding-top:20px;">
           <div class="row">
           <div class="col-md-4"><div class="rrowtitle"></div></div>
           <div class="col-md-4"><center><h3 class="rpopulartitle">ПОПУЛЯРНЫЕ ТОВАРЫ</h3></center></div>
           <div class="col-md-4"><div class="rrowtitle"></div></div>
           </div>
           
        <div class="row">
          <div class="popularbox">
           <?php 
echo Homepage::popularBox();
?>
 
         
          </div>
          <div class="clr"></div>
        </div>
  
         <div class="row">
          <div class="banner">
              <div class="banner_r">
                <div>
                 <ul>
                 <li><h3>НЕ МОЖЕШЬ ВЫБРАТЬ ??</h3></li>
                 <li><span>фишки рекомендуют</span></li>
                 <li><a class="btn_banner_test"><i class="fa fa-play"></i>ПРОЙДИ ТЕСТ</a></li>
Example #9
0
 public function __construct()
 {
     parent::__construct();
     $this->load->Model("User");
     //$this->output->enable_profiler();
 }