#!/usr/local/bin/perl ################################################################################ # # File name: update (submit) # Project: PEERS # Description: Create or amend a record # # # External documents: # # # Author: Peter Haworth # Date created: 30/09/1998 (entered into SCCS) # # sccs version: 1.2 last changed: 09/30/98 # # Copyright Institute of Physics Publishing 1998 # ################################################################################ require 'IOPP/PEERS.pl'; require 'IOPP/hdbm.pl'; use CGI; use MailQ; $action=$PEERS_script; $query=new CGI; &escapeHTML_query($query); $query->import_names('query'); $query->autoEscape(undef); @args=split('/',$query->path_info); shift @args; while($arg=$args[0]){ if(0){ }else{ last; } } ($email)=@args; $admin=$PEERS_admin?'/Admin':''; if($action eq 'update'){ $act_name=$PEERS_admin?"Update Record":"Update Your Details"; }else{ $action='submit'; $act_name=$PEERS_admin?"Add Record":"Submit Your Details"; } &printHeader("$PEERS_name: $act_name",$act_name,undef,undef,[$action,'main','add','help']); print "$IopStyle::TABLE
To update your $PEERS directory details, enter your surname and the e-mail address currently held in the directory, then press the Submit button. You will then be presented with a screen containing your complete record which can be amended as required. "; # print "
|
|||
The record for email address $oemail has been successfully updated. "; }else{ push @errors,"The email database cannot be opened: $!"; } }else{ if(&hdbm_write(\%penddb,$PEERS_penddb)){ $seqn=$penddb{'_seqn_'}; ++$seqn; $penddb{'_seqn_'}=$seqn; $penddb{$seqn}=join("\0",@changerec); untie %penddb; my $name=&escapeHTML("$query::title $query::sname"); if($action eq 'submit'){ print "
Thank you for submitting your details $name.
They will be checked by the moderator before being added to
the $PEERS_name directory.
";
if(open(OFFER,"$PEERS_data/offer")){
my $name=&escapeHTML("$query::title $query::fname $query::sname");
my $email=&escapeHTML($query::email);
my $phone=&escapeHTML($changerec[$PEERS_db_phone]);
my $addr=&escapeHTML("$changerec[$PEERS_db_addr]\n$changerec[$PEERS_db_ctry]");
while( Thank your for updating your details $name.
Your details will be checked by the moderator before the updates are
made.
";
}
if(!$query::noconf){
my %message;
my $name=&accent2ascii("$query::title $query::sname");
$message{'to'}=$query::email;
$message{'from'}=$PEERS_email_mod;
$message{'text'}= <<"!EOF!";
To: $query::email
From: $PEERS_email_mod
Subject: Confirmation of $PEERS_name $action request (change #$seqn)
Dear $name
!EOF!
if($action eq 'submit'){
$message{'text'}.= <<"!EOF!";
Thank you for submitting your details to our $PEERS_name directory. As you are
aware, this directory is moderated. Your details will be checked, and you will
receive confirmation by e-mail when they have been added to the directory.
!EOF!
}else{
$message{'text'}.= <<"!EOF!";
Thank you for updating your details on our $PEERS_name directory. As you are
aware, this directory is moderated. Your updates will be checked, and you will
receive confirmation by e-mail when your record is updated.
!EOF!
}
$message{'text'}.= <<"!EOF!";
Should you have any questions regarding your submission, please contact the
moderator at $PEERS_email_mod quoting change #$seqn.
$PEERS_sig
!EOF!
&MailQ::queue_message(%message)
or print " Warning: The confirmation message could not be queued: $MailQ::error.";
}
}else{
push @errors,"The changes database cannot be opened: $!.";
}
}
}
}
# Print any errors which occurred, and the search form if necessary
if(!$query::submitting || @errors){
if(@errors){
print "
Sorry, your request could not be processed because of the following
errors: Thank you for your interest in the $PEERS_name directory. Please use this
form to submit your details for inclusion in the directory.
You may choose to receive an e-mail message confirming your submission.
";
}
if($action eq 'submit'){
print "
The $PEERS_name directory is a look-up service for physicists and other
scientists. It will not be used for commercial or promotional purposes,
nor will any of the information submitted to this service be forwarded to
other parties. In submitting your data, you are also protected by the
Data Protection Act 1984 (see below).
";
print "
Please complete the form as instructed. All fields are compulsory
unless otherwise stated. Please note that all submissions are moderated.
";
}else{
$PEERS_admin or print qq%
To update your entry in the $PEERS_name directory, edit the relevant
fields in the form below and press the `Submit Form' button at the
bottom of the page. Please note that all updates are moderated.
%;
}
# print "
",(map { "
$IopStyle::HR\n";
}elsif($action eq 'submit'){
print "
|
||||
Data Protection Notice
The data subject hereby freely gives consent to the specific data above
being processed and understands that it will be used solely for inclusion
in the IOP Publishing Ltd's $PEERS_name ($PEERS_longname)
directory. IOP Publishing Ltd undertakes to process the data
fairly and lawfully and that the data has been collected for specified,
explicit and legitimate purposes. At any time the data subject may view
the data, may obtain the recipients or categories of recipients to whom
the data are disclosed, and has the right to amend and keep up to date the
data or may object to the processing of personal data. IOP Publishing Ltd
will take all the measures it can to prevent
unauthorised alterations, disclosure or restriction of the data held in
the directory. If you have any further data protection requirements please
contact $PEERS_email_custserv.