Service Personnel

[insert_php]

/* Author: Gerry Haran
* Original program name: listAlphabet5.php
* Program version for WordPress: service-personel
* Sub menu in WordPress : Service Personnel
* Menu structure in WordPress : World War 1 \ Service Personnel
* Description: Program shows letters of the alphabet and a drop-down list of servicemen names for chosen surname initial
* Linked pages: Each name links to page world-war-1-service which shows service biography for serviceman selected by user
*
* Functions called: getServiceNames($chosenInitial)
*
* Backed up as ServicePersonnel.wp on 21 April 2016
*
* Modified 19 October 2017 to include initials of names researched by Lynne; now that all data found by the three researchers,
* June, Carol and Lynne have been entered in the database, the set of initials for the servicemen surnames is known; thus the
* modification limits the initials presented to a user to just those initials for which there are names in the database; at
* present there are no surnames beginning with I, N, Q, V, X, Y and Z.
*
* The function getServiceNames($chosenInitial) is modified so that the list of names presented to this
* page for display in the drop-down list for the chosen initial is ordered first by the surname and then by the forename.
*
* Backed up on 19 October 2017 as ServicePersonnel_19Oct2017.wp
* Backed up for completeness as ServicePersonnel_12Dec2017.wp on 12 December 2017
*
*
* Date of WordPress program : 19 March 2016
*
* The user is presented with a subset of the alphabet as large letters
* Click a letter to select that letter then the script searches the database for
* surnames beginning with selected letter and provides the answers as a
* drop-down list from which the user can choose a serviceman name to display the biography.
*/

echo “

To find a serviceman in the database, first click on the letter corresponding to the initial of his surname.

\n”;
echo “

Then select the name from the drop down list and click the Select Name button.

\n”;

$chosenInitial= “A”;

if (!empty($_GET[‘ebname’]))
{
$chosenInitial= $_GET[‘ebname’];

}
/*
alphabet for J and C data
$labels = array(“A”=>”A”, “B”=>”B”, “C”=>”C”, “D”=>”D”, “E”=>”E”, “F”=>”F”,”P”=>”P”, “R”=>”R”, “S”=>”S”, “T”=>”T”, “U”=>”U”, “W”=>”W”);

Complete alphabet
$labels = array(“A”=>”A”, “B”=>”B”, “C”=>”C”, “D”=>”D”, “E”=>”E”, “F”=>”F”, “G”=>”G”, “H”=>”H”, “I”=>”I”,
“J”=>”J”, “K”=>”K”, “L”=>”L”, “M”=>”M”, “N”=>”N”, “O”=>”O”, “P”=>”P”, “Q”=>”Q”, “R”=>”R”,
“S”=>”S”, “T”=>”T”, “U”=>”U”, “V”=>”V”, “W”=>”W”, “X”=>”X”, “Y”=>”Y”, “Z”=>”Z”);

*/

$labels = array(“A”=>”A”, “B”=>”B”, “C”=>”C”, “D”=>”D”, “E”=>”E”, “F”=>”F”, “G”=>”G”, “H”=>”H”, “J”=>”J”, “K”=>”K”, “L”=>”L”, “M”=>”M”, “O”=>”O”, “P”=>”P”, “R”=>”R”, “S”=>”S”, “T”=>”T”, “U”=>”U”, “W”=>”W”);

echo “

“;
/*echo “

“;*/

echo “

\n”;

foreach( $labels as $field =>$value)
{
echo “$value“;

}

echo “

\n”;

$EBServiceManInfo = getServiceNames($chosenInitial);

echo ““;

echo ““;

echo “

“;

[/insert_php]