$this->db->select('*');
$this->db->from('crawl');
$this->db->join('news', 'crawl.site_id = news.site_id');
$query = $this->db->get();
$this->email->initialize (array (
'mailtype' => $mailtype,
'charset' => $charset,
'useragent' => 'PHPSender',
'protocol' => 'smtp',
'smtp_host' => $host,
'smtp_port' => 25,
//'mailpath' => '/sbin/sendmail',
/**'smtp_user' => '',
'smtp_pass' => '',*/
));
$this->view_data = array (
'page_title' => 'Some title', // текст, идущий в <h1>
'page_content' => 'view_dir/view_name', // путь к нужной вьюхе относительно каталога views
// куча других переменных, идущих во вьюху
);
$this->load->view ('page', $this->view_data);
<?php
$page = array (
'layout/header', // путь к общему хэдеру
$page_content, // контент
'layout/footer' // путь к общему футеру
);
foreach ($page as $item) {
$this->load->view ($item);
}
/* End of file page.php */
/* Location: ./application/views/page.php */
$route['ex'] = "ex/index";
$route['ex/(:num)'] = "ex/index/$1";
$this->load->library ('pagination');
$pg_cfg = array (
'base_url' => base_url () . 'gallery/show_album/' . $id . '/',
'total_rows' => count ($images),
'per_page' => $this->Gallery_model->get_images_number_per_page (),
'uri_segment' => 4,
'num_links' => 10,
'full_tag_open' => '<p class="paginator"> Страницы: ',
'full_tag_close' => '</p>',
'first_link' => 'первая',
'first_tag_open' => '<span>',
'first_tag_close' => '</span>',
'last_link' => 'последняя',
'last_tag_open' => '<span>',
'last_tag_close' => '</span>',
'prev_tag_open' => '<span>',
'prev_tag_close' => '</span>',
'next_tag_open' => '<span>',
'next_tag_close' => '</span>',
'num_tag_open' => '<span>',
'num_tag_close' => '</span>',
'cur_tag_open' => '<span class="current">',
'cur_tag_close' => '</span>',
);
$this->pagination->initialize ($pg_cfg);
$pg_links = $this->pagination->create_links ();