#!/usr/bin/perl use CGI qw(:cgi-lib); &ReadParse; #script linked to html file photogallery.htm, takes data from form named frmyr $yearOne = $in{'firstYear'};#assigns input from top text box in frmyr to variable $yearTwo = $in{'secondYear'};#assigns input from bottom text box in frmyr to variable $loopnum = $yearTwo - $yearOne;#variable that will be used as counter to loop through the array of years #Error message in case user fails to enter years in both or either text box in frmyr if($yearOne eq undef || $yearOne eq "" || $yearTwo eq undef || $yearTwo eq "" || $yearOne =~ /[abcdefghijklmnopqrstuvwxyz;@#$&*]/i || $yearTwo =~ /[abcdefghijklmnopqrstuvwxyz;@#$&*]/i) { &errTop(); print "

Error

You may have forgotten to fill in a year or you may have filled in the text box with inappropriate characters. To search by year range, please enter a year (between 1881 and 1972) in each of the text boxes provided. Thank you.

Back to Search
\n"; &errBottom(); } #Error message in case user enters years outside the date range supported by this script. elsif($yearOne ne undef && $yearOne ne "" && $yearTwo ne undef && $yearTwo ne "" && $yearOne < 1881 || $yearTwo > 1972){ &errTop(); print "

Error

You may have entered a year that was less than 1881 or greater than 1972. The search engine only supports searches that fall between 1881 and 1972, including 1881 to 1972. Thank you.

Back to Search
\n"; &errBottom(); } #Error message in case the user enters a later date in the top text box and earlier in the bottom. if($loopnum < 0){ &errTop(); print "

Error

You may have entered a year in the Beginning Year text box that was later than the year in the Ending Year text box. Please enter the earlier year in the top text box and the later year in the bottom.

Correct:

Incorrect:

Back to Search
\n"; &errBottom(); } #Creates a multidimensional array which holds a list of links to all dated photos in collection. @names =( ["1881-1890

1881:

Parents

"], [""], [""], ["1884:

Harry\ at age 1


"], [""], [""], [""], [""], [""], [""], [""], [""], [""], [""], [""], [""], [""], [""], [""], [""], ["1900-1910

1901:

\ Senior Class Photo, Independence High School, 1901

"],#1901 [""], [""], ["1904:

\ Bess Wallace in her backyard

"],#1904 [""], ["1906:

Truman\ in his National Guard Uniform

"],#1906 [""], ["1908:

\ Truman at age 24


"],#1908 [""], [""], ["1911-1920

1911:

\ Harry, Bess and friends out for a ride in Harry's 1911\ Stafford car

"],#1911 [""], [""], [""], ["1915:

\ Wallace Family Summer Picnic

"],#1915 ["1916 or 1917:

\ Truman standing in front of his oil wells

"],#1916 [""],#1917 ["1918:

\ Harry Truman shortly before he went to France. About 1917 or\ 1918.

"],#1918 ["1919:

\ Wedding Photo of Harry and Bess Truman


"],#1919 [""],#1920 ["1921-1930

1921:

\ Truman and the 129th Field Artillery in front of the Muelebach\ Hotel during the November 1921 homecoming parade in Kansas City,\ Mo. Truman is in uniform, on the far side of the street, behind the\ man in the suit.\

", "\ The Triangle\ Club, 1921. This picture was taken in Swope Park, Kansas\ City, Missouri. Truman is in the back row, far left. The Triangle\ Club may have been an association of area merchants.\


"],#1921 [""],#1922 [""],#1923 [""],#1924 [""],#1925 [""],#1926 [""],#1927 [""],#1928 [""],#1929 [""],#1930 ["1931-1940

1931:

\ Truman being sworn in as presiding judge of Jackson County, 1931.\

"],#1931 ["1932:

\ Truman at Fort Ripley, Minnesota with unidentified man. Taken in\ July, 1 while Truman was in the Army Reserve\

"],#1932 [""],#1933 [""],#1934 [""],#1935 ["1936:

\ Truman while serving with the Army Reserve, July,\ 1936.

"],#1936 [""],#1937 ["1938:

\ Senator Truman laughing during an outing of\ the Alfalfa Club, June, 1938. Also present are Gen. Marlin Gray,\ Senator Carl A. Hayden, and Alva B. Adams.

"],#1938 [""],#1939 ["1940:

\ Harry S. Truman during the 1940 Senatorial\ campaign.


"],#1940 [""],#1941 ["1941-1950

1942:

\ Senator Truman touring and inspecting Ft. Leonard, Missouri, August\ 21, 1942.

"],#1942 [""],#1943 ["1944:

\ Senator Truman and others inspecting Camp Crowder, Missouri, August\ 20, 1944.

", "\ President Franklin D. Roosevelt, Vice-President-elect Harry S.\ Truman Henry Wallace and others, November 10, 1944.

"],#1944 ["1945:

\ President Harry S. Truman, November 1945.

", "\ Harry Truman and Anna Roosevelt, President Roosevelt's daughter,\ during funeral services for Franklin D. Roosevelt. April 14, 1945.\

", "\ Swearing In

", "\ Atom Bomb

", "\ President Truman, Prime Minister Churchill, and\ Premier Joseph Stalin at Potsdam, July 18, 1945.

", "\ Prime Minister Clement Atlee, President Truman, and Premier Joseph\ Stalin at the Potsdam Conference, August 1, 1945.\

", "Premier\ Joseph Stalin, President Truman, and Prime Minister Winston\ Churchill, July 17, 1945.

", "\ Premier Joseph Stalin, President Truman, and Soviet Foreign\ Minister Andrei Gromyko during the Potsdam Conference, July 20,\ 1945.

", "Truman's\ residence during the Potsdam Conference, the Little White House\ in Babelsburg, Berlin.

", "\ Big Three with staffs around the Conference table, August 1,\ 1945.\

", "General\ George Patton, President Truman and General Dwight D. Eisenhower\ at a flag raising ceremony in Berlin July 21, 1945.\

", "\ President Truman and James F. Byrnes on the USS Augusta on their\ way to attend the Potsdam Conference, July 1945.\

", "\ President Truman and General Dwight D. Eisenhower at National\ Airport, Washington D.C., June 19, 1945.

", "\ President Truman presents General George Marshall with permanent\ membership in the Reserve Officers Association, October 16,\ 1945.\

"], ["1946:

\ President Harry S. Truman, 1946.\

", "\ President Truman relaxes during a fishing trip in Florida,\ 1946.\

"],#1946 [""],#1947 ["1948:

\ Truman at the beginning of his 1948 Whistle Stop campaign June 3,\ 1948.\

", "\ Truman at a campaign stop in Seattle, Washington, June 10, 1948.\

", "\ President Truman holds up the Chicago Daily Tribune headline,\ Dewey Defeats Truman in St. Louis, Mo., November 3, 1948.\

", "\ President Truman with a group of Boy Scouts, May 14, 1948.\

", "\ President Truman with radio contest winners, January 27,\ 1948.\

", "\ President Truman making a campaign speech in Washington, D.C.\ October 2, 1948.\

"],#1948 ["1949:

\ Inaugural Parade

", "\ President Truman and his Cabinet, January 8, 1949.\

", "\ President\ Truman looks on as President Eurico Dutra of Brazil, is presented\ with a key to the city from the Commissioner of Washington, D.C.\ John Russell Young, May 18, 1949.\

"],#1949 ["1950:

\ Flag salute\ ceremony during Truman's stopover at Honolulu on his way to\ Wake Island conference. Admiral Arthur Radford and Col. Manning\ Tillery accompany the President, October 13, 1950.\

", "\ President Truman and General Harry Vaughan leave for Wake Island,\ October 11, 1950.\

", "\ Truman and General MacArthur shake hands during their conference at\ Wake Island, October 15, 1950.\

", "\ President Truman awarding the Congressional Medal of Honor to a\ Korean War veteran at the White House, November 1, 1950.\

", "\ President Truman and the Army-Navy union at the White House,\ December 6, 1950.\

", "President\ Truman\ meets with the captains of the Army and Navy football\ teams before their regular game, December 2, 1950.\

", "


"],#1950 ["1951-1960

1951:

\ President Truman and Margaret Truman on vacation in Key West,\ Florida, November 30, 1951.\

", "\ President\ Truman with representatives of Girls Nation of the\ American Legion Auxiliary, August 1, 1951.\

", "\ President Truman receiving a pledge from the Boy Scouts of America,\ February 6, 1951.\

", "\ Harry S. Truman receiving a cake for his 67th birthday, May 8,\ 1951.\

"],#1951 ["1952:

\ President Harry S. Truman, December 14, 1952.\

", "\ White House photograph contest winners with President Truman,\ February 11, 1952.\

", "\ Bess Truman with Mamie Eisenhower at the White House, December 1,\ 1952.\

", "\ President Truman with Adlai Stevenson at the White House, December\ 4, 1952.\

"],#1952 [""],#1953 [""],#1954 [""],#1955 [""],#1956 ["1957:

\ Bess Truman, Eleanor Roosevelt, Earl Warren, Herbert Hoover, Basil\ O'Connor, and Harry Truman at the dedication of the Truman Library,\ July 6, 1957.\

"],#1957 [""],#1958 ["1959:

\ Harry Truman in the Oval Office reproduction at the Truman Library\ July 1959.\

", "\ Harry Truman with Senator John F. Kennedy, November 19, 1959.\

", "\ Harry Truman and Jack Benny play a duet at the Truman Library.\ Truman on\ the Piano and Benny on the violin, September 3, 1959.\


"],#1959 [""],#1960 ["1961-1970

1961:

\ Harry Truman and Attorney General Robert F. Kennedy at the Truman\ Library, October 11, 1961.\

"],#1961 ["1962:

\ Harry Truman with a group of students at the Truman Library July,\ 1962.\

", "\ Harry Truman in his office at the Truman Library in December, 1962.\

"],#1962 [""],#1963 ["1964:

\ Harry Truman speaks to a group of students at the Truman\ Library, 1964.

"], #1964 [""], #1965 ["1966:

\ Harry Truman with President Lyndon B. Johnson at the Truman\ Library, January, 1966.\

"], #1966 [""], [""], ["1969:

\ President Richard Nixon with Harry Truman at the Truman Library,\ March 2, 1969.\


"], #1969 [""], [""], ["1971-1980

1972:

An Honor guard stands around Truman's\ casket during his funeral services, December 27, 1972.

"] ); #subroutine for outputting top of error message page sub errTop{ print "Content-type: text/html\n\n"; print " Results\n"; print "\n"; print "\n"; &outputheader(); } #subroutine for outputting bottom of error message page sub errBottom { &outputfooter(); print "\n"; } #subroutine for outputting top of results page sub outputheader { print ""; } sub outputfooter { $absolutepath = "http://www.trumanlibrary.org"; $homepage = "$absolutepath"; print "

The Harry S. Truman Library is one of ten Presidential Libraries administered by the National Archives and Records Administration
Copyright © 2001 Harry S. Truman Library & Museum. 500 W. US Hwy. 24. Independence MO 64050
truman.library\@nara.gov; Phone: 816-833-1400 or 1-800-833-1225\; Fax: 816-833-4368
.

 

\n"; } sub pgeTop { print "Content-type: text/html\n\n"; print "Truman Library Photograph Search Results\n"; print "\n"; print "\n"; &outputheader(); if($yearOne ne $yearTwo){ print "

Search Results - $yearOne to $yearTwo


\n"; } elsif($yearOne = $yearTwo) { print "

Search Results - $yearOne


\n"; } print "

\n"; print "
\n"; #print "Date Range $yearOne to #$yearTwo

\n"; } #subroutine for outputting bottom of results page sub pgeBottom { print "

\n"; &outputfooter(); } #Need to begin the loop that loops through photo array at a specific number. #Sets the variable begindate, which enables the loop to begin at the right number. if($yearOne == 1881){ $begindate = 0; } if($yearOne == 1882){ $begindate = 1; } if($yearOne == 1883){ $begindate = 2; } if($yearOne == 1884){ $begindate = 3; } if($yearOne == 1885){ $begindate = 4; } if($yearOne == 1886){ $begindate = 5; } if($yearOne == 1887){ $begindate = 6; } if($yearOne == 1888){ $begindate = 7; } if($yearOne == 1889){ $begindate = 8; } if($yearOne == 1890){ $begindate = 9; } if($yearOne == 1891){ $begindate = 10; } if($yearOne == 1892){ $begindate = 11; } if($yearOne == 1893){ $begindate = 12; } if($yearOne == 1894){ $begindate = 13; } if($yearOne == 1895){ $begindate = 14; } if($yearOne == 1896){ $begindate = 15; } if($yearOne == 1897){ $begindate = 16; } if($yearOne == 1898){ $begindate = 17; } if($yearOne == 1899){ $begindate = 18; } if($yearOne == 1900){ $begindate = 19; } if($yearOne == 1901){ $begindate = 20; } if($yearOne == 1902){ $begindate = 21; } if($yearOne == 1903){ $begindate = 22; } if($yearOne == 1904){ $begindate = 23; } if($yearOne == 1905){ $begindate = 24; } if($yearOne == 1906){ $begindate = 25; } if($yearOne == 1907){ $begindate = 26; } if($yearOne == 1908){ $begindate = 27; } if($yearOne == 1909){ $begindate = 28; } if($yearOne == 1910){ $begindate = 29; } if($yearOne == 1911){ $begindate = 30; } if($yearOne == 1912){ $begindate = 31; } if($yearOne == 1913){ $begindate = 32; } if($yearOne == 1914){ $begindate = 33; } if($yearOne == 1915){ $begindate = 34; } if($yearOne == 1916){ $begindate = 35; } if($yearOne == 1917){ $begindate = 36; } if($yearOne == 1918){ $begindate = 37; } if($yearOne == 1919){ $begindate = 38; } if($yearOne == 1920){ $begindate = 39; } if($yearOne == 1921){ $begindate = 40; } if($yearOne == 1922){ $begindate = 41; } if($yearOne == 1923){ $begindate = 42; } if($yearOne == 1924){ $begindate = 43; } if($yearOne == 1925){ $begindate = 44; } if($yearOne == 1926){ $begindate = 45; } if($yearOne == 1927){ $begindate = 46; } if($yearOne == 1928){ $begindate = 47; } if($yearOne == 1929){ $begindate = 48; } if($yearOne == 1930){ $begindate = 49; } if($yearOne == 1931){ $begindate = 50; } if($yearOne == 1932){ $begindate = 51; } if($yearOne == 1933){ $begindate = 52; } if($yearOne == 1934){ $begindate = 53; } if($yearOne == 1935){ $begindate = 54; } if($yearOne == 1936){ $begindate = 55; } if($yearOne == 1937){ $begindate = 56; } if($yearOne == 1938){ $begindate = 57; } if($yearOne == 1939){ $begindate = 58; } if($yearOne == 1940){ $begindate = 59; } if($yearOne == 1941){ $begindate = 60; } if($yearOne == 1942){ $begindate = 61; } if($yearOne == 1943){ $begindate = 62; } if($yearOne == 1944){ $begindate = 63; } if($yearOne == 1945){ $begindate = 64; } if($yearOne == 1946){ $begindate = 65; } if($yearOne == 1947){ $begindate = 66; } if($yearOne == 1948){ $begindate = 67; } if($yearOne == 1949){ $begindate = 68; } if($yearOne == 1950){ $begindate = 69; } if($yearOne == 1951){ $begindate = 70; } if($yearOne == 1952){ $begindate = 71; } if($yearOne == 1953){ $begindate = 72; } if($yearOne == 1954){ $begindate = 73; } if($yearOne == 1955){ $begindate = 74; } if($yearOne == 1956){ $begindate = 75; } if($yearOne == 1957){ $begindate = 76; } if($yearOne == 1958){ $begindate = 77; } if($yearOne == 1959){ $begindate = 78; } if($yearOne == 1960){ $begindate = 79; } if($yearOne == 1961){ $begindate = 80; } if($yearOne == 1962){ $begindate = 81; } if($yearOne == 1963){ $begindate = 82; } if($yearOne == 1964){ $begindate = 83; } if($yearOne == 1965){ $begindate = 84; } if($yearOne == 1966){ $begindate = 85; } if($yearOne == 1967){ $begindate = 86; } if($yearOne == 1968){ $begindate = 87; } if($yearOne == 1969){ $begindate = 88; } if($yearOne == 1970){ $begindate = 89; } if($yearOne == 1971){ $begindate = 90; } if($yearOne == 1972){ $begindate = 91; } #Loops through list and prints out results so long as user has not made input error. if($loopnum >= 0 && $yearOne ne undef && $yearOne ne "" && $yearTwo ne undef && $yearTwo ne "" && $yearOne >= 1881 && $yearTwo <= 1972){ $topofloop = $begindate + $loopnum; &pgeTop(); for ($i = $begindate; $i <= $topofloop; $i++){ for $j( 0.. $#{$names[$i]}) { print "$names[$i][$j]\n"; } } &pgeBottom(); }