Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- /*place this in Model folder*/
- class General extends CI_Model{
- function __construct(){
- parent::__construct();
- $this->load->helper('url');
- $this->load->library('menu/menu_lib');
- }
- function setpage($title){
- $menu=new Menu_lib;
- $tmp=anchor('Help/about','About');
- $hdr = new Menu_header;
- $chd['satu']='';
- $prd['index']='Index';$prd['Add']='Add Product';
- $clt['index']='Index';$clt['Add']='Add Client';
- $abt['index']='Index';$abt['faq']='F.A.Q';$abt['About']='About';
- $menu_header['1']=$hdr->accept_param('Home/index','Home',$chd);
- $menu_header['2']=$hdr->accept_param('Product/index','Product',$prd);
- $menu_header['3']=$hdr->accept_param('Client/index','Client',$clt);
- $menu_header['4']=$hdr->accept_param('Help/index','Help',$abt);
- $data['menu']=$menu->show_menu($menu_header);
- $data['header']="<div>PHP Menu Header</div>";
- $data['footer']="<div>PHP Menu Footer</div>";
- $data['standard_css']='<link rel="stylesheet" type="text/css" href=' . $this->config->item('base_url') . '/' . $this->config->item('css') . '>';
- $data['title']='<h1>' .$title . '</h1>';
- $data['css']=$this->config->item('css');
- $data['base']=$this->config->item('base_url');
- return $data;
- }
- }
Add Comment
Please, Sign In to add comment