                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        ('sondage_resulats_'.$val['id'],$affichage,$this->ci->config->item('cache_time'));
        }
        $this->ci->template->assign('retour_vote',$retour_vote);
        $this->ci->template->assign('affichage',$affichage);
        $this->ci->template->assign('total',$nb);
        return $this->ci->template->appel('widget/sondages_resultats');               
    }
    
    function focus($home = FALSE){
        if(!$val = $this->ci->caching->get('focus')){
            $val = $this->ci->wi->get_focus();
            $this->ci->caching->save('focus',$val,$this->ci->config->item('cache_time'));
        }  

        if(!$val){
            $this->ci->template->assign('focus',FALSE);
            return FALSE;
        }
        
        $val['texte'] = truncate($val['texte'],400);
        $this->ci->template->assign('v',$val);
        $this->ci->template->assign('homepage',$home);
        $this->ci->template->assign('focus',$this->ci->template->appel('widget/focus'));
    }
    
    function focus_categorie(){
        if(!$val = $this->ci->caching->get('focus_categorie_'.$this->focus_id)){
            $val = $this->ci->wi->get_focus_categorie($this->focus_id);
            $this->ci->caching->save('focus_categorie_'.$this->focus_id,$val,$this->ci->config->item('cache_time'));
        }  

        if(!$val){
            return FALSE;
        }
        
        $val['texte'] = truncate($val['texte'],400);
        $this->ci->template->assign('v',$val);
        $this->ci->template->assign('focus',$this->ci->template->appel('widget/focus'));
    }

    function parser_citation($article){
        for($i = 1 ; $i <4 ; $i++){
            $this->ci->template->assign('texte',$article['citation'.$i.'_texte']);
            $this->ci->template->assign('source',$article['citation'.$i.'_nom']);
            $article['texte'] = str_replace('#citation'.$i.'#',$this->ci->template->appel('commun/citation'),$article['texte']);
        }
        return $article;
    }

    function _pagination_recherche($table,$uri,$total,$segment){
        $this->load->library('pagination');
        $config['base_url']          = $uri;
        $config['total_rows']        = $total;
        $config['per_page']          = $this->total_par_page ;
        $config['num_links']         = 5;
        $config["uri_segment"]       = 3;
        $config['query_string_segment'] = 'p';
        $config['page_query_string'] = true;
        $this->pagination->initialize($config);
        $this->template->assign('pagination',$this->pagination->create_links());
    }

    function carousel($article,$id){
        if(!$val = $this->ci->caching->get('carousel_'.$id)){
            $val = $this->ci->wi->get_carousel($id);
            $this->ci->caching->save('carousel_'.$id,$val,$this->ci->config->item('cache_time'));
        }        

        if(!$val){
            return $article;
        }
        $this->ci->template->assign('carousel',$val);
        return str_replace('#carousel#',$this->ci->template->appel('commun/carousel'),$article);
    }
    
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Error</title>
<style type="text/css">

::selection { background-color: #E13300; color: white; }
::-moz-selection { background-color: #E13300; color: white; }
::-webkit-selection { background-color: #E13300; color: white; }

body {
	background-color: #fff;
	margin: 40px;
	font: 13px/20px normal Helvetica, Arial, sans-serif;
	color: #4F5155;
}

a {
	color: #003399;
	background-color: transparent;
	font-weight: normal;
}

h1 {
	color: #444;
	background-color: transparent;
	border-bottom: 1px solid #D0D0D0;
	font-size: 19px;
	font-weight: normal;
	margin: 0 0 14px 0;
	padding: 14px 15px 10px 15px;
}

code {
	font-family: Consolas, Monaco, Courier New, Courier, monospace;
	font-size: 12px;
	background-color: #f9f9f9;
	border: 1px solid #D0D0D0;
	color: #002166;
	display: block;
	margin: 14px 0 14px 0;
	padding: 12px 10px 12px 10px;
}

#container {
	margin: 10px;
	border: 1px solid #D0D0D0;
	box-shadow: 0 0 8px #D0D0D0;
}

p {
	margin: 12px 15px 12px 15px;
}
</style>
</head>
<body>
	<div id="container">
		<h1>An Error Was Encountered</h1>
		<p>Non-existent class: Widget</p>	</div>
</body>
</html>