# # ---------------------- # DBMan # ---------------------- # Database Administrator # # File: html.pl # Description: This file contains all the HTML that the program generates. # Author: Alex Krohn # Web: http://www.gossamer-threads.com/ # Version: 2.05 # CVS Revision: $Id: html.pl,v 1.3 2000/07/08 18:14:40 alex Exp $ # # COPYRIGHT NOTICE: # # Copyright 1997 Gossamer Threads Inc. All Rights Reserved. # # This program is being distributed as shareware. It may be used and # modified free of charge for personal, academic, government or non-profit # use, so long as this copyright notice and the header above remain intact. # Any commercial use should be registered. Please also send me an email, # and let me know where you are using this script. By using this program # you agree to indemnify Gossamer Threads Inc. from any liability. # # Selling the code for this program without prior written consent is # expressly forbidden. Obtain permission before redistributing this # program over the Internet or in any other medium. In all cases # copyright and header must remain intact. # # Please check the README file for full details on registration. # ===================================================================== ########################################################## ## HTML Globals ## ########################################################## # Put any globals you like in here for your html pages. $html_title = 'Database - Linguists'; ########################################################## ## Record Layout ## ########################################################## sub html_record_form { # -------------------------------------------------------- # The form fields that will be displayed each time a record is # edited (including searching). You don't want to put the #
tags, merely the tags for each field. # The values to be displayed are in %rec and should be incorporated # into your form. You can use &build_select_field, &build_checkbox_field # and &build_radio_field to generate the respective input boxes. Text and # Textarea inputs can be inserted as is. If you turn on form auto # generation, the program will build the forms for you (all though they may # not be as nice). See the README for more info. my (%rec) = @_; ($db_auto_generate and print &build_html_record_form(%rec) and return); my $font = 'Font face="Verdana, Arial, Helvetica" Size=2 Color=#003399'; ###MULTIPAGE MOD: ################ Global Items to Print on Top of All Pages ################## print qq| |; ###MULTIPAGE MOD: ################ Page One ############### if ($in{'PageStatus'} eq "1") { print qq| |; ###MULTIPAGE MOD: Sets status for next page: 1 if modifying; 2 if adding. if ($in{'add_form'}) {print qq| |;} else {print qq| |;} } if (($in{'PageStatus'} eq "1") || ($in{'modify_search'} eq "1") || ($in{'view_search'} eq "1") || ($in{'delete_search'} eq "1")){ print qq|<$font>Company: | |
<$font>First Name: | |
<$font>Surname: | |
<$font>Telephone: | |
<$font>Fax: | |
<$font>Mobile: | |
<$font>Address1: | |
<$font>Address2: | |
<$font>Town: | |
<$font>County/Province: | |
<$font>Post Code: | |
<$font>Country: | |
<$font>E-mail: |
<$font>Academic Qualifications: | |
<$font>Years of experience: | |
<$font>Professional Associations: |
<$font>Mother Tongue | |
<$font>TSource1 | |
<$font>TRate1 | |
<$font>TSource2 | |
<$font>TRate2 | |
<$font>TSource3 | |
<$font>TRate3 | |
<$font>TSource4 | |
<$font>TRate4 | |
<$font>TSource5 | |
<$font>TRate5 | |
<$font>TSource6 | |
<$font>TRate6 | |
<$font>TSource7 | |
<$font>TRate7 | |
<$font>TSource8 | |
<$font>TRate8 | |
<$font>MinFee | |
<$font>ProofHourly |
<$font>ArtsLiterature | |
<$font>BioNaturalSciences | |
<$font>ChemistryPolymers | |
<$font>ContractsManagement | |
<$font>CivilEngConstruction | |
<$font>Defence | |
<$font>Education | |
<$font>EEC | |
<$font>Electronics | |
<$font>EnergyTransport | |
<$font>FinanceAccounting | |
<$font>ITComputing | |
<$font>Law | |
<$font>LocalGovernment | |
<$font>Materials | |
<$font>MechEngToolsAuto | |
<$font>Medicine | |
<$font>PatentsStandards | |
<$font>PhysicsMaths | |
<$font>PRMarketingMedia | |
<$font>Technical | |
<$font>Telecommunications |
<$font>Compatibility: | |
<$font>Trados: | |
<$font>SDLX: | |
<$font>DejaVu: | |
<$font>OfficeSoftware: | |
<$font>TypesettingSoftware: | |
<$font>WebDesignSoftware: | |
<$font>Typesetting: | |
<$font>TypesettingHourly: | |
<$font>TypesettingMin: | |
<$font>Voiceovers: | |
<$font>VoiceoverHourly: | |
<$font>VoiceoverMin: |
<$font>AdHoc1: | |
<$font>AdHoc1ActorPass: | |
<$font>AdHoc2: | |
<$font>AdHoc2ActorPass: | |
<$font>AdHoc3: | |
<$font>AdHoc3ActorPass: | |
<$font>AdHoc4: | |
<$font>AdHoc4ActorPass: | |
<$font>AdHoc5: | |
<$font>AdHoc5ActorPass: | |
<$font>AdHocDay: | |
<$font>AdHocHourly: |
<$font>SimInt1: | |
<$font>SimInt1ActorPass: | |
<$font>SimInt2: | |
<$font>SimInt2ActorPass: | |
<$font>SimInt3: | |
<$font>SimInt3ActorPass: | |
<$font>SimInt4: | |
<$font>SimInt4ActorPass: | |
<$font>SimInt5: | |
<$font>SimInt5ActorPass: | |
<$font>SimIntDay: |
<$font>Professional Profile
Academic Qualifications: $rec{'Academic Qualifications'}
Years of experience: $rec{'Years of experience'}
Professional Associations: $rec{'Professional Associations'}
<$font>Translation Skills
Mother Tongue: $rec{'Mother Tongue'}
TSource1: $rec{'TSource1'}
TRate1: $rec{'TRate1'}
TSource2: $rec{'TSource2'}
TRate2: $rec{'TRate2'}
TSource3: $rec{'TSource3'}
TRate3: $rec{'TRate3'}
TSource4: $rec{'TSource4'}
TRate4: $rec{'TRate4'}
TSource5: $rec{'TSource5'}
TRate5: $rec{'TRate5'}
TSource6: $rec{'TSource6'}
TRate6: $rec{'TRate6'}
TSource7: $rec{'TSource7'}
TRate7: $rec{'TRate7'}
TSource8: $rec{'TSource8'}
TRate8: $rec{'TRate8'}
MinFee: $rec{'MinFee'}
ProofHourly: $rec{'ProofHourly'}
<$font>Specialist Subjects
ArtsLiterature: $rec{'ArtsLiterature'}
BioNaturalSciences: $rec{'BioNaturalSciences'}
ChemistryPolymers: $rec{'ChemistryPolymers'}
ContractsManagement: $rec{'ContractsManagement'}
CivilEngConstruction: $rec{'CivilEngConstruction'}
Defence: $rec{'Defence'}
Education: $rec{'Education'}
EEC: $rec{'EEC'}
Electronics: $rec{'Electronics'}
EnergyTransport: $rec{'EnergyTransport'}
FinanceAccounting: $rec{'FinanceAccounting'}
ITComputing: $rec{'ITComputing'}
Law: $rec{'Law'}
LocalGovernment: $rec{'LocalGovernment'}
Materials: $rec{'Materials'}
MechEngToolsAuto: $rec{'MechEngToolsAuto'}
Medicine: $rec{'Medicine'}
PatentsStandards: $rec{'PatentsStandards'}
PhysicsMaths: $rec{'PhysicsMaths'}
PRMarketingMedia: $rec{'PRMarketingMedia'}
Technical: $rec{'Technical'}
Telecommunications: $rec{'Telecommunications'}
<$font>Computer and Technical Skills
Compatibility: $rec{'Compatibility'}
Trados: $rec{'Trados'}
SDLX: $rec{'SDLX'}
DejaVu: $rec{'DejaVu'}
OfficeSoftware: $rec{'OfficeSoftware'}
TypesettingSoftware: $rec{'TypesettingSoftware'}
WebDesignSoftware: $rec{'WebDesignSoftware'}
Typesetting: $rec{'Typesetting'}
TypesettingHourly: $rec{'TypesettingHourly'}
TypesettingMin: $rec{'TypesettingMin'}
Voiceovers: $rec{'Voiceovers'}
VoiceoverHourly: $rec{'VoiceoverHourly'}
VoiceoverMin: $rec{'VoiceoverMin'}
<$font>Ad Hoc Interpreting Skills
AdHoc1: $rec{'AdHoc1'}
AdHoc1ActorPass: $rec{'AdHoc1ActorPass'}
AdHoc2: $rec{'AdHoc2'}
AdHoc2ActorPass: $rec{'AdHoc2ActorPass'}
AdHoc3: $rec{'AdHoc3'}
AdHoc3ActorPass: $rec{'AdHoc3ActorPass'}
AdHoc4: $rec{'AdHoc4'}
AdHoc4ActorPass: $rec{'AdHoc4ActorPass'}
AdHoc5: $rec{'AdHoc5'}
AdHoc5ActorPass: $rec{'AdHoc5ActorPass'}
AdHocDay: $rec{'AdHocDay'}
AdHocHourly: $rec{'AdHocHourly'}
<$font>Conference Interpreting Skills
SimInt1: $rec{'SimInt1'}
SimInt1ActorPass: $rec{'SimInt1ActorPass'}
SimInt2: $rec{'SimInt2'}
SimInt2ActorPass: $rec{'SimInt2ActorPass'}
SimInt3: $rec{'SimInt3'}
SimInt3ActorPass: $rec{'SimInt3ActorPass'}
SimInt4: $rec{'SimInt4'}
SimInt4ActorPass: $rec{'SimInt4ActorPass'}
SimInt5: $rec{'SimInt5'}
SimInt5ActorPass: $rec{'SimInt5ActorPass'}
SimIntDay: $rec{'SimIntDay'}
|;
}
##########################################################
## Home Page ##
##########################################################
sub html_home {
# --------------------------------------------------------
# The database manager home page.
&html_print_headers;
print qq|
$html_title: Main Menu | |
Permissions: |; print " View " if ($per_view); print " Add " if ($per_add); print " Delete " if ($per_del); print " Modify " if ($per_mod); print " Admin " if ($per_admin); print " None " if (!($per_view || $per_add || $per_del || per_mod)); print qq| <$font>
This database has been set up so any user can view any other users information, but you can
only modify and delete your own records. If you have admin access, you can of course do anything
you like. |
<$font>!; print qq!| Home !; print qq!| Add ! if ($per_add); print qq!| View ! if ($per_view); print qq!| Delete ! if ($per_del); print qq!| Modify ! if ($per_mod); print qq!| List All ! if ($per_view); print qq!| Admin ! if ($per_admin); print qq!| Log Off |!; print qq!
!; # Print the Footer -- note: a link (doesn't have to be the graphic) is required unless you purchase # a license. See: http://gossamer-threads.com/scripts/register/ for more info. print qq!<$font>Database Powered by Alpha-Omega Language Services Ltd. |
Search Options:
Match Any
Match Case
Whole Words
Reg. Expression
Keyword Search (will match against all fields)
Max. Returned Hits
Sort By:
Sort Order:
Search Tips:
- use '*' to match everything in a field)
- put a '>' or '<' at the beginning to to do range searches.
~;
}
##########################################################
## Adding ##
##########################################################
sub html_add_form {
# --------------------------------------------------------
# The add form page where the user fills out all the details
# on the new record he would like to add. You should use
# &html_record_form to print out the form as it makes
# updating much easier. Feel free to edit &get_defaults
# to change the default values.
&html_print_headers;
print qq|
Please Wait... Loading Page 2 |
|; } sub html_view_failure { # -------------------------------------------------------- # The search for viewing failed. The reason is stored in $message # and a new search form is printed out. my ($message) = $_[0]; &html_print_headers; print qq|
$html_title: Search Results <$font> Your search returned $db_total_hits matches. |; if ($db_next_hits) { print "
<$font>Pages: $db_next_hits"; } # Go through each hit and convert the array to hash and send to # html_record for printing. for (0 .. $numhits - 1) { print ""; &html_record (&array_to_hash($_, @hits)); } if ($db_next_hits) { print "
<$font>Pages: $db_next_hits"; } print qq|
|; &html_footer; print qq|
Please Wait... |
$html_title: Error! Unauthorized Action. | |
<$font> The database program received a command that you are not authorized for. |; &html_footer; print qq| |
$html_title: Error! Unkown Action. | |
<$font> The database program received a command that it did not understand. |; &html_footer; print qq| |