Fix Sample Detection

maj : update file include/function.php