#!/bin/perl # ########################## ## guestbook v1.1CH141 ########################## ## This first script is called by the user with the appropriate Q_STRING ## that includes their login name, guest page path (relative to their ## local public_html directory), and desired return page. ## It creates the forms page necessary for input to the addguest script, ## which actually adds the guest to the noted guest page. Note that the ## guest page of a user must be in their own public_html directory and ## be readable/writeable by whatever group/user the http server is run as ## (this generally means world readable/writeable). ## The first thing you probably should change in these scripts is the ## path to the PERL executable. ########################## # # QUERY_STRING should be of the form: # http://domain/scriptname?owner?guestpage?returnpage # # This gets the necessary info from the QUERY_STRING ($owner, $guestpage, $returnpage) = split('\?', $ENV{QUERY_STRING}); die "Content-type: text/plain\n\nLack of info sent to script, stopped" unless ($owner && $guestpage); # W3 root addresses (http version & server version) no trailing slashes $wwwroot = "http://www.colby.edu"; # This is the DocumentRoot of the W3 server, for root guestbooks $wwwserverroot = "/data/htdocs"; # domain name for addressing $domain = "\@colby.edu"; # path to addguest script (called when submitting guest book form) $addguest = "/cgi-bin/chemistry/GenChem/addguest"; %countryid = ('edu', 'USA', 'org', 'USA', 'com', 'USA', 'net', 'USA', 'gov', 'USA', 'mil', 'USA', 'us', 'USA', 'um', 'USA', 'af', 'Afghanistan', 'al', 'Albania', 'dz', 'Algeria', 'as', 'American Samoa', 'ad', 'Andorra', 'ao', 'Angola', 'ai', 'Anguilla', 'aq', 'Antarctica', 'ag', 'Antigua and Barbuda', 'ar', 'Argentina', 'am', 'Armenia', 'aw', 'Aruba', 'au', 'Australia', 'at', 'Austria', 'az', 'Azerbaijan', 'bs', 'Bahamas', 'bh', 'Bahrain', 'bd', 'Bangladesh', 'bb', 'Barbados', 'by', 'Belarus', 'be', 'Belgium', 'bz', 'Belize', 'bj', 'Benin', 'bm', 'Bermuda', 'bt', 'Bhutan', 'bo', 'Bolivia', 'ba', 'Bosnia and Herzegowina', 'bw', 'Botswana', 'bv', 'Bouvet Island', 'br', 'Brazil', 'io', 'British Indian Ocean Territory', 'bn', 'Brunei Darussalam', 'bg', 'Bulgaria', 'bf', 'Burkina Faso', 'bi', 'Burundi', 'kh', 'Cambodia', 'cm', 'Cameroon', 'ca', 'Canada', 'cv', 'Cape Verde', 'ky', 'Cayman Islands', 'cf', 'Central African Republic', 'td', 'Chad', 'cl', 'Chile', 'cn', 'China', 'cx', 'Christmas Island', 'cc', 'Cocos (Keeling) Islands', 'co', 'Colombia', 'km', 'Comoros', 'cg', 'Congo', 'ck', 'Cook Islands', 'cr', 'Costa Rica', 'ci', 'Cote d\'Ivoire', 'hr', 'Croatia (Hrvatska)', 'cu', 'Cuba', 'cy', 'Cyprus', 'cz', 'Czech Republic', 'dk', 'Denmark', 'dj', 'Djibouti', 'dm', 'Dominica', 'do', 'Dominican Republic', 'tp', 'East Timor', 'ec', 'Ecuador', 'eg', 'Egypt', 'sv', 'El Salvador', 'gq', 'Equatorial Guinea', 'er', 'Eritrea', 'ee', 'Estonia', 'et', 'Ethiopia', 'fk', 'Falkland Islands', 'fo', 'Faroe Islands', 'fj', 'Fiji', 'fi', 'Finland', 'fr', 'France', 'fx', 'France,', 'gf', 'French Guiana', 'pf', 'French Polynesia', 'tf', 'French Southern Territories', 'ga', 'Gabon', 'gm', 'Gambia', 'ge', 'Georgia', 'de', 'Germany', 'gh', 'Ghana', 'gi', 'Gibraltar', 'gr', 'Greece', 'gl', 'Greenland', 'gd', 'Grenada', 'gp', 'Guadeloupe', 'gu', 'Guam', 'gt', 'Guatemala', 'gn', 'Guinea', 'gw', 'Guinea-Bissau', 'gy', 'Guyana', 'ht', 'Haiti', 'hm', 'Heard and McDonald Islands', 'hn', 'Honduras', 'hk', 'Hong Kong', 'hu', 'Hungary', 'is', 'Iceland', 'in', 'India', 'id', 'Indonesia', 'ir', 'Iran', 'iq', 'Iraq', 'ie', 'Ireland', 'il', 'Israel', 'it', 'Italy', 'jm', 'Jamaica', 'jp', 'Japan', 'jo', 'Jordan', 'kz', 'Kazakhstan', 'ke', 'Kenya', 'ki', 'Kiribati', 'kp', 'Democratic People\'s Republic of Korea', 'kr', 'Republic of Korea', 'kw', 'Kuwait', 'kg', 'Kyrgyzstan', 'la', 'Lao Democratic Republic', 'lv', 'Latvia', 'lb', 'Lebanon', 'ls', 'Lesotho', 'lr', 'Liberia', 'ly', 'Libya', 'li', 'Liechtenstein', 'lt', 'Lithuania', 'lu', 'Luxembourg', 'mo', 'Macau', 'mk', 'Macedonia,', 'mg', 'Madagascar', 'mw', 'Malawi', 'my', 'Malaysia', 'mv', 'Maldives', 'ml', 'Mali', 'mt', 'Malta', 'mh', 'Marshall Islands', 'mq', 'Martinique', 'mr', 'Mauritania', 'mu', 'Mauritius', 'yt', 'Mayotte', 'mx', 'Mexico', 'fm', 'Micronesia', 'md', 'Moldova', 'mc', 'Monaco', 'mn', 'Mongolia', 'ms', 'Montserrat', 'ma', 'Morocco', 'mz', 'Mozambique', 'mm', 'Myanmar', 'na', 'Namibia', 'nr', 'Nauru', 'np', 'Nepal', 'nl', 'Netherlands', 'an', 'Netherlands Antilles', 'nc', 'New Caledonia', 'nz', 'New Zealand', 'ni', 'Nicaragua', 'ne', 'Niger', 'ng', 'Nigeria', 'nu', 'Niue', 'nf', 'Norfolk Island', 'mp', 'Northern Mariana Islands', 'no', 'Norway', 'om', 'Oman', 'pk', 'Pakistan', 'pw', 'Palau', 'pa', 'Panama', 'pg', 'Papua New Guinea', 'py', 'Paraguay', 'pe', 'Peru', 'ph', 'Philippines', 'pn', 'Pitcairn', 'pl', 'Poland', 'pt', 'Portugal', 'pr', 'Puerto Rico', 'qa', 'Qatar', 're', 'Reunion', 'ro', 'Romania', 'ru', 'Russian Federation', 'rw', 'Rwanda', 'kn', 'Saint Kitts and Nevis', 'lc', 'Saint Lucia', 'vc', 'Saint Vincent and the Grenadines', 'ws', 'Samoa', 'sm', 'San Marino', 'st', 'Sao Tome and Principe', 'sa', 'Saudi Arabia', 'sn', 'Senegal', 'sc', 'Seychelles', 'sl', 'Sierra Leone', 'sg', 'Singapore', 'sk', 'Slovakia', 'si', 'Slovenia', 'sb', 'Solomon Islands', 'so', 'Somalia', 'za', 'South Africa', 'gs', 'South Georgia', 'es', 'Spain', 'lk', 'Sri Lanka', 'sh', 'St. Helena', 'pm', 'St. Pierre and Miquelon', 'sd', 'Sudan', 'sr', 'Suriname', 'sj', 'Svalbard and Jan Mayen Islands', 'sz', 'Swaziland', 'se', 'Sweden', 'ch', 'Switzerland', 'sy', 'Syria', 'tw', 'Taiwan', 'tj', 'Tajikistan', 'tz', 'Tanzania', 'th', 'Thailand', 'tg', 'Togo', 'tk', 'Tokelau', 'to', 'Tonga', 'tt', 'Trinidad and Tobago', 'tn', 'Tunisia', 'tr', 'Turkey', 'tm', 'Turkmenistan', 'tc', 'Turks and Caicos Islands', 'tv', 'Tuvalu', 'ug', 'Uganda', 'ua', 'Ukraine', 'ae', 'United Arab Emirates', 'gb', 'United Kingdom', 'uk', 'United Kingdom', 'uy', 'Uruguay', 'uz', 'Uzbekistan', 'vu', 'Vanuatu', 'va', 'Vatican City', 've', 'Venezuela', 'vn', 'Viet Name', 'vg', 'British Virgin Islands', 'vi', 'US Virgin Islands', 'wf', 'Wallis and Futina Islands', 'eh', 'Western Sahara', 'ye', 'Yemen', 'yu', 'Yugoslavia', 'zr', 'Zaire', 'zm', 'Zambia', 'zw', 'Zimbabwe', ); if ($owner ne "root") { @val = getpwnam($owner); $dir = @val[7]; if (!$dir) { die "Content-type: text/plain\n\n$owner is not a valid user, stopped"; } $htmlpage = "$wwwroot/~$owner/$guestpage"; $address = "$owner$domain"; } else { $dir = $wwwserverroot; $htmlpage = "$wwwroot/$guestpage"; $owner = "bpmundy"; $address = "$owner$domain"; } @tmp = split(/\./, $ENV{REMOTE_HOST}); $country = @tmp[$#tmp]; $country =~ tr/A-Z/a-z/; $country = $countryid{$country}; print < Colby Chemistry Home Page

Welcome to the electronic study group for General Chemistry. This space is here to foster discussion among students in CH141-142. There are two steps to participating, read what others have said and then use the form on this page to add to the discussion, responding to an established topic or starting one of your own. The information you enter in the Name and E-Mail fields will only be seen by the faculty; if you wish you can add your name in the comment area.


Name:
E-mail:

Comments:

Return to the General Chemistry Page
GUESTPAGE exit;