get('id'); $roleid = $current_user->get('roleid'); //get year $today = date("Y-m-d", strtotime('today')); function getDetailSplashScreen($today , $roleid ){ global $adb; $query = "SELECT * FROM splash_screen where date_debut <= '".$today."' and date_fin >= '".$today."' and `visible_pour` like '%::{$roleid}::%' order by ordre ASC"; $sql_get_result = $adb->query($query); $Details = array(); while ($recordinfo = $adb->fetch_array($sql_get_result)) { $Details[] = $recordinfo; } //echo $query; return $Details; } $Detail = getDetailSplashScreen($today , $roleid); //print("
".print_r($Detail,true)."
"); if( sizeof($Detail) > 0 ){ echo'
X
'; } ?>