################################################################# # Database Definition Variables # ################################################################# $db{"breed"} = 0; $db{"group"} = 1; $db{"club_name"} = 2; $db{"club_contact"} = 3; $db{"club_address"} = 4; $db{"club_city"} = 5; $db{"club_state"} = 6; $db{"club_zip"} = 7; $db{"club_url"} = 8; $db{"club_email"} = 9; $db{"links"} = 10; $db{"image"} = 11; $db{"pronounce"} = 12; $db{"bark"} = 13; $db{"descrip"} = 14; $db{"pros"} = 15; $db{"cons"} = 16; $db{"health"} = 17; $db{"fun"} = 18; $db{"history"} = 19; $db{"modification_time"}= 20; $db{"who_modified"} = 21; $db{"group_modified"} = 22; $db{"db_id"} = 23; $index_of_db_id_number = 23; $index_of_who_modified = 21; $index_of_group_who_modified = 22; $index_of_modification_time = 20; $index_of_field_to_be_sorted_by = "0"; # Information for different types of fields # additional important fields $index_for_email = 9; $index_of_multi_link_field = 10; $index_of_webpage = 8; $index_of_image = 11; @index_of_files = (12, 13); @index_of_uploads = ("image", "pronounce", "bark"); $index_for_menu = 0; @db_user_definable_field_order = ("breed", "group", "club_name", "club_contact", "club_address", "club_city", "club_state", "club_zip", "club_url", "club_email", "links", "image", "pronounce", "bark", "descrip", "pros", "cons", "health", "fun", "history"); @db_display_fields = ("Dog Breed", "Dog Group", "Dog Club Name", "Contact", "Address", "City", "State", "Zip", "Webpage", "Email", "Additional Links", "Picture", "Bark (sound)", "Pronunciation (sound)", "Description", "Pros (what we like about this breed)", "Cons(things to watch out for)", "Health & Genetics", "Fun things to do", "History & Uses"); @db_index_for_display = ($db{"breed"}, $db{"group"}, $db{"club_name"}, $db{"club_contact"}, $db{"club_address"}, $db{"club_city"}, $db{"club_state"}, $db{"club_zip"}, $db{"club_url"}, $db{"club_email"}, $db{"links"}, $db{"image"}, $db{"pronounce"}, $db{"bark"}, $db{"descrip"}, $db{"pros"}, $db{"cons"}, $db{"health"}, $db{"fun"}, $db{"history"}); @db_query_criteria = ("breed|0|=|string", "group|1|=|string", "club_name|2|=|string", "club_contact|3|=|string", "club_address|4|=|string", "club_city|5|=|string", "club_state|6|=|string", "club_zip|7|=|string", "club_url|8|=|string", "club_email|9|=|string", "pronounce|14|=|string", "pros|15|=|string", "cons|16|=|string", "health|17|=|string", "fun|18|=|string", "history|18|=|string"); ######################################################################### # Authentication Variables # ######################################################################### $should_i_authenticate = "yes"; $auth_lib = "./Library"; $auth_server = "off"; $auth_cgi = "off"; $auth_user_file = "./Users/default.users"; $auth_alt_user_file = ""; $auth_default_group = "user"; $auth_add_register = "on"; $auth_allow_register = "on"; $auth_email_register = "off"; $auth_admin_from_address = "you\@yourdomain.com"; $auth_admin_email_address = "you\@yourdomain.com"; $auth_session_length = 1; $auth_session_dir = "./Session_files"; $auth_register_message = "Thanks, you may now logon with your new username and password."; $auth_allow_search = "off"; $auth_generate_password = "off"; $auth_check_duplicates = "on"; $auth_password_message = "Thanks for applying to our site, your password is"; @auth_extra_fields = ("auth_first_name", "auth_last_name", "auth_email"); @auth_extra_desc = ("First Name", "Last Name", "Email"); ################################################################# # Miscellaneous Variables # ################################################################# $site_title = "CARE Pet Database"; $bgcolor="#ffffff"; $data_file_path = "./Data_files/pet_info.data"; $max_rows_returned = "300"; $current_century = "20"; $this_script_url = "db_manager.cgi"; $location_of_counter_file = "./Data_files/pet_info.counter"; $location_of_log_file = "./Data_files/pet_info.log"; $location_of_lock_file = "./Data_files/pet_info.lock"; $upload_dir = "./files"; ################################################################# # Generic Header Subroutine # ################################################################# sub generic_header { local ($title) = @_; print qq~
~; # # # # print qq~
| @db_display_fields[$index] | $fields[$index]- |
|---|
"; } print "