class Useradmin extends Controller { function __construct() { parent::Controller(); } function Index() { $data['view']='Test Text'; $this->load->view('main',$data); } }
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title><?=$this->config->item('page_title');?></title> <link href="<?=$this->config->item('base_url');?>/css/suckerfish.css" rel="stylesheet" type="text/css" /> </head> <body> <table width="100%" border="1" cellspacing="0" cellpadding="5" style="border-collapse:collapse;"> <tr> <td><h1><?=$this->config->item('page_header');?></h1></td> </tr> <tr> <td> <div id="nav"> <?=modules::run('adminmenu');?> </div> </td> </tr> <tr> <td><?=$view?></td> </tr> </table> </body> </html>