"; } } #### end of function display_sql_results #### ## End of all functions ## ########################################################################################### ## Begin body of script ## getSQL(); $query = "SELECT to_id, letter_id, letter_to, name_id, new_name_variants, prefix, first_name, last_name, maiden_name FROM corresp, people WHERE name_id=to_id GROUP BY name_id ORDER BY last_name"; if ($query) { // Execute the SQL query here and display the results $result = runSQLQuery($query); if ($result) { display_sql_results ($result, $query, $card); } else { err_msg ("MySQL Error", "MySQL Error"); echo "\t

Query = ", $query, "

\n"; $query = ""; } } #################################################################################### ?>

Addressees

This list contains the names, in standardized form, of all addressees in the correspondence found among the Tirocchi records. Most correspondence was from clients to Anna and Laura Tirocchi.
Click on a name to browse that person's letters.

", $foo); $foobar2 = eregi_replace("%%ITALIC", "", $foobar); $barfoo = eregi_replace("%ITALIC;", "", $foobar2); $barfoo2 = eregi_replace("%ITALIC", "", $barfoo); $blortfoo = eregi_replace("%eacute;", "é", $barfoo2); $blortfoo2 = eregi_replace("%lt;", "<", $blortfoo); $blortfoo3 = eregi_replace("%gt;", ">", $blortfoo2); $blortfoo4 = eregi_replace("%amp;", "&", $blortfoo3); $farble = eregi_replace("%plus;", "+", $blortfoo4); $finalCellContents = stripslashes($farble); $colname = mysql_field_name ($result, $i); switch ($colname) { case to_id: $to_id[$nameNum] = "$finalCellContents "; break; case letter_id: $letter_id[$nameNum] = "$finalCellContents "; break; case new_name_variants: if (!$row[$i]) { $husbandFlag = 0; } else { $husbandFlag = 1; $allNameVariants = $row[$i]; $positionOfFirstSemiColon = strpos($allNameVariants,';'); if (! $positionOfFirstSemiColon) { $positionOfFirstSemiColon = strlen($allNameVariants); } $firstNameVariant = substr($allNameVariants,0,$positionOfFirstSemiColon); if (ereg("Miss ",$firstNameVariant)) { $husbandFlag = 0; } else { $full_name[$nameNum] = "$firstNameVariant"; } } break; case prefix: if (!$husbandFlag) { $full_name[$nameNum] = "$row[$i] "; } break; case first_name: if ($husbandFlag && $row[$i]) { $full_name[$nameNum] .= " ($row[$i]"; $firstNameFlag = 1; } else { $firstNameFlag = 0; $first_name = $row[$i]; $full_name[$nameNum] .= " $row[$i] "; } break; case maiden_name: if ($husbandFlag && $row[$i]) { $full_name[$nameNum] .= " $row[$i]) "; } else if ($firstNameFlag) { $full_name[$nameNum] .= ") "; } break; case last_name: if (!$husbandFlag) { $full_name[$nameNum] .= " $row[$i]"; } break; } } $nameNum++; } $full_name_second_column = ""; $to_id_second_column = ""; $k = 0; for ($j=$nameNum/2+1;$j<$nameNum;$j++) { $full_name_second_column[$k] = $full_name[$j]; $to_id_second_column[$k] = $to_id[$j]; $k++; } echo "
"; for ($cnt=0;$cnt<$nameNum/2;$cnt++) { echo " $full_name[$cnt]
"; } echo "
"; for ($cnt=0;$cnt<$nameNum/2;$cnt++) { if (preg_match("/.*Tirocchi.*$/",$full_name_second_column[$cnt])) $full_name_second_column[$cnt] = "Anna and/or Laura Tirocchi"; echo " $full_name_second_column[$cnt]
"; } echo "
Browse All Letters >> Senders