Click a link below to see a list of items published in the last  years, and added to the library in the last 30 days.
    
        Books
    
     
        - Adult         
             
        
- Young Adult
            
        
- Children's         
             
        
- Large Print
            
        
 
$heading) 
                {
                    $row[$heading] = (isset($data[$key])) ? $data[$key] : '';
                }
                $return[] = $row;
            } 
            else 
            {
                $return[] = $data;
            }
        }
        fclose($handle);
        return $return;
    }
    
    $data = importcsv($report_location);
    function culler($v)
    {
        /**
        * culler will examine the contents of the CSV file array of new items
        * and return only those that correspond to the collections the patron  
        * wants to see, based upon the call numbers of the collections.
        *
        * If call numbers won't work for your situation, change this function
        * as needed to make it work for you.
        */
        
        // collection the patron wants to see, parsed from the URL
        $items = $_GET['items'];
        
        // we'll check the GET variable against a list of valid collections
        $possible_collections = array("new_adult_fiction", 
                                      "new_adult_nonfiction",
                                      "new_young_adult_fiction",
                                      "new_young_adult_nonfiction",
                                      "new_children's_fiction",
                                      "new_children's_nonfiction",
                                      "new_large_print_fiction",
                                      "new_large_print_nonfiction",
                                      "new_adult_audiobooks",
                                      "new_children's_audiobooks",
                                      "new_ipod_books",
                                      "new_adult_music",
                                      "new_children's_music",
                                      "new_adult_videos",
                                      "new_children's_videos");
        
        $flag = false;
        foreach ($possible_collections as $value) 
        {
            if ($items == $value)
            {
                $flag = true;
            }
        }
        if ($flag == false)
        {
            die("\"" . $items . "\" is not a valid collection");
        }
        $this_year = (int)date("Y"); 
        $pub_year  = $v[5];
        
        // remove items more than $date_limit years old
        if ($this_year - $pub_year > date_limit())
        {
            return false;
        }
        else
        { 
            // split the call numbers up as arrays of their parts with [space] as the delimiter.
            $call_number_parts = explode(" ", $v[3]);
            
            // new_adult_fiction
            if ($items == "new_adult_fiction")
            {
                if ($call_number_parts[0] == "FIC" ||
                    $call_number_parts[0] == "M"   ||
                    $call_number_parts[0] == "SF"  ||
                    $call_number_parts[0] == "W"   ||
                    ($call_number_parts[0] == "MICHIGAN" && !is_numeric($call_number_parts[1])))
                {
                    return true;
                }
            }
            
            // new_adult_nonfiction
            if ($items == "new_adult_nonfiction")
            {
                if (is_numeric($call_number_parts[0]) ||
                    $call_number_parts[0] == "C&C"    ||
                    $call_number_parts[0] == "REF"    ||
                    $call_number_parts[0] == "TRAVEL" ||
                    $call_number_parts[0] == "A&C"    ||
                    ($call_number_parts[0] == "MICHIGAN" && is_numeric($call_number_parts[1])))
                {
                    return true;
                }
            }
            
            // new_young_adult_fiction
            if ($items == "new_young_adult_fiction")
            {
                if (($call_number_parts[0] == "YA" && !is_numeric($call_number_parts[1])))
                {
                    return true;
                }
            }
            
            // new_young_adult_nonfiction
            if ($items == "new_young_adult_nonfiction")
            {
                if (($call_number_parts[0] == "YA" && is_numeric($call_number_parts[1])))
                {
                    return true;
                }
            }
            
            // new_children's_fiction
            if ($items == "new_children's_fiction")
            {
                if (($call_number_parts[0] == "J"         && !is_numeric($call_number_parts[1])) ||
                    ($call_number_parts[0] == "J-HOLIDAY" && !is_numeric($call_number_parts[1])) ||
                    ($call_number_parts[0] == "J-KIT"     && !is_numeric($call_number_parts[1])) ||
                    $call_number_parts[0] == "J-M"   ||
                    $call_number_parts[0] == "J-SF"  ||
                    $call_number_parts[0] == "J-BEG" ||
                    ($call_number_parts[0] == "J-MICHIGAN" && !is_numeric($call_number_parts[1])))
                {
                    return true;
                }
            }
            
            // new_children's_nonfiction
            if ($items == "new_children's_nonfiction")
            {
                if (($call_number_parts[0] == "J"         && is_numeric($call_number_parts[1])) ||
                    ($call_number_parts[0] == "J-HOLIDAY" && is_numeric($call_number_parts[1])) ||
                    ($call_number_parts[0] == "J-KIT"     && is_numeric($call_number_parts[1])) ||
                    $call_number_parts[0] == "J-REF" ||
                    ($call_number_parts[0] == "J-MICHIGAN" && is_numeric($call_number_parts[1])))
                {
                    return true;
                }
            }
                
            // new_large_print_fiction
            if ($items == "new_large_print_fiction")
            {
                if (($call_number_parts[0] == "LP" && !is_numeric($call_number_parts[1])))
                {
                    return true;
                }
            }
            
            // new_large_print_nonfiction
            if ($items == "new_large_print_nonfiction")
            {
                if (($call_number_parts[0] == "LP" && is_numeric($call_number_parts[1])))
                {
                    return true;
                }
            }
            
            // new_adult_audiobooks
            if ($items == "new_adult_audiobooks")
            {
                if ($call_number_parts[0] == "AC" ||
                    $call_number_parts[0] == "CD")
                {
                    $call_number_parts =  array_reverse($call_number_parts);  
                    if ($call_number_parts[0] != "[MUSIC]")
                    {
                        return true;
                    }
                }
            }
            
            // new_children's_audiobooks
            if ($items == "new_children's_audiobooks")
            {
                if ($call_number_parts[0] == "J-AC" ||
                    $call_number_parts[0] == "J-CD" )
                {
                    $call_number_parts =  array_reverse($call_number_parts);  
                    if ($call_number_parts[0] != "[MUSIC]")
                    {
                        return true;
                    }
                }
            }
            
            // new_ipod_books
            if ($items == "new_ipod_books")
            {
                if ($call_number_parts[0] == "EPOD")
                {
                    return true;
                }
            }
            
            // new_adult_music
            if ($items == "new_adult_music")
            {
                if ($call_number_parts[0] == "CD")
                {
                    $call_number_parts =  array_reverse($call_number_parts);  
                    if ($call_number_parts[0] == "[MUSIC]")
                    {
                        return true;
                    }
                }
            }
            
            // new_children's_music
            if ($items == "new_adult_music")
            {
                if ($call_number_parts[0] == "J-CD")
                {
                    $call_number_parts =  array_reverse($call_number_parts);  
                    if ($call_number_parts[0] == "[MUSIC]")
                    {
                        return true;
                    }
                }
            }
            
            // new_adult_videos
            if ($items == "new_adult_videos")
            {
                if ($call_number_parts[0] == "VC" ||
                    $call_number_parts[0] == "DVD" )
                {
                    return true;
                }
            }
            
            // new_children's_videos
            if ($items == "new_children's_videos")
            {
                if ($call_number_parts[0] == "J-VC" ||
                    $call_number_parts[0] == "J-DVD" )
                {
                    return true;
                }
            }            
            return false;
        }
    }
    
    // remove all the items except those the patron want to see
    $data = array_filter($data, culler);
    $data_count = count($data);
    if ($data_count == 0)
    {
?>
    No items added in the last 30 days in "".
    ← Return to New Items Categories.
     items found in "".
    ← Return to New Items Categories.
        
    
        |   | ";} ?> 
             ()
 Call Number:
 Added on
 | 
    
        | 
 | 
 
    ← Return to New Items Categories.