usr_i18n.'.xml') ) $xmlTopics = GV_RootPath.'config/topics/topics_'.$session->usr_i18n.'.xml'; if(!$xmlTopics) { if( file_exists(GV_RootPath.'config/topics/topics.xml') ) { $xmlTopics = GV_RootPath.'config/topics/topics.xml'; } } $cssTopics = ''; if($xmlTopics && ($sxTopics = simplexml_load_file($xmlTopics))) { $cssTopics = (string)($sxTopics->display->css); } $out .= ''; $out .='
'; if($sxTopics) { $defaultview = mb_strtolower($sxTopics->display->defaultview); if(!$defaultview) $defaultview = 'static'; $out .= ("\n"); } $out .= '
'; return $out; } public static function topics_exists() { $session = session::getInstance(); if( file_exists(GV_RootPath.'config/topics/topics_'.$session->usr_i18n.'.xml') ) return true; if( file_exists(GV_RootPath.'config/topics/topics.xml') ) return true; return false; } public static function dropdown_topics() { $session = session::getInstance(); $out = ''; $xmlTopics = ''; $sxTopics = null; if( file_exists(GV_RootPath.'config/topics/topics_'.$session->usr_i18n.'.xml') ) $xmlTopics = GV_RootPath.'config/topics/topics_'.$session->usr_i18n.'.xml'; if($xmlTopics == '') { if( file_exists(GV_RootPath.'config/topics/topics.xml') ) { $xmlTopics = GV_RootPath.'config/topics/topics.xml'; } } if($xmlTopics == '') { return ''; } $jsTopics = 'null'; $maxdepth = 0; if( ($sxTopics = simplexml_load_file($xmlTopics)) ) { $jsTopics = self::topicsAsJS($sxTopics->topics, 0, $maxdepth); } $out .= ' '; $out .= '
'._('boutton::chercher').' :
'._('client::recherche: dans les categories').'
'; for($i=0; $i<=$maxdepth; $i++) { $out .= '

'; } $out .= '
'; return $out; } public static function history() { $conn = connection::getInstance(); $session = session::getInstance(); $usr_id = $session->usr_id; $sql = "SELECT query from dsel where usr_id='" . $conn->escape_string($usr_id). "' ORDER BY id DESC LIMIT 0,25"; $history = '