home *** CD-ROM | disk | FTP | other *** search
/ ftp.sunet.sepub/pictures / 2014.11.ftp.sunet.se-pictures.tar / ftp.sunet.se / pub / pictures / ACiD-artpacks / www / mirrors / acheron / cgi-bin / discus_staff / board-contact.cgi < prev    next >
Text File  |  1999-01-29  |  3KB  |  76 lines

  1. #!/usr/bin/perl
  2. $discus_conf = '/usr/local/www/www.acheron.org/discus_admin_116439176/discus.conf';
  3. #Discus board contact script
  4. #-------------------------------------------------------------------------------
  5. # This script is copyright (c) 1998 by DiscusWare, LLC, all rights reserved.
  6. # Its use is subject to the license agreement that can be found at the following
  7. # URL:  http://www.chem.hope.edu/discus/license
  8. #-------------------------------------------------------------------------------
  9. if (open (FILE, "$discus_conf")) {
  10.     @file = <FILE>;
  11.     close (FILE);
  12.     $evals = "";
  13.     foreach $line (@file) {
  14.         if ($line =~ /^(\w+)=(.*)/) {
  15.             $varname = $1;
  16.             $value = $2;
  17.             $value =~ s/'/\\'/g; $value =~ s/\r//g;
  18.             $evals .= "\$$varname='$value'; ";
  19.         }
  20.     }
  21.     eval($evals);
  22.     require "$admin_dir/source/src-board-subs-common";
  23. } else {
  24.     print "Content-type: text/html\n\n";
  25.     print "<HTML><HEAD><TITLE>Script Execution Error</TITLE></HEAD>\n";
  26.     print "<BODY BGCOLOR=#ffffff TEXT=#000000>\n";
  27.     print "<H1>Script Execution Error</H1>\n";
  28.     print "Discus scripts could not execute because the discus.conf file\n";
  29.     print "could not be opened.";
  30.     print "<P>Reason: <FONT COLOR=#ff0000><B>$!</B></FONT>" if $!;
  31.     print "<P>This generally indicates a setup error of some kind.\n";
  32.     print "Consult the <A HREF=\"http://www.chem.hope.edu/discus/rc\">Discus ";
  33.     print "Resource Center</A> for troubleshooting information.</BODY></HTML>\n";
  34.     exit(0);
  35. }
  36. &parse_form;
  37. &header;
  38. &ex('printuntil', 1, 1, 0, "$L{BCTITLE}");
  39. print "<CENTER><FONT SIZE=+1><B>$L{BCTITLE}</B></FONT></CENTER>\n";
  40. print "<HR>\n";
  41. &ex('printuntil', 3, 9, 0, "", 0, 1);
  42. print "<P>$L{BCMOD}<P><UL>\n";
  43. open (PASSWD, "$admin_dir/passwd.txt");
  44. @passwd = <PASSWD>;
  45. close (PASSWD);
  46. foreach $line (@passwd) {
  47.     ($usr, $pas, $em, $fn) = split(/:/, $line);
  48.     $emf = 0; print "<LI>";
  49.     if ($pro) {
  50.         $filename = "$usr-MODERATOR.txt";
  51.         $filename = &getfn($filename);
  52.         if (-e "$admin_dir/profiles/$filename") {
  53.             print "<A HREF=\"$script_url/board-profile.$cgi_extension?action=display_profile&profile=$usr-MODERATOR\">$fn</A>";
  54.             next;
  55.         }
  56.     }
  57.     if ($em ne "email" && $em ne "none" && $em ne "") {
  58.         print "<A HREF=\"mailto:$em\">";
  59.         $emf = 1;
  60.     }
  61.     if ($fn ne "fullname" && $fn ne "none" && $fn ne "") {
  62.         print $fn;
  63.     } else {
  64.         print "\u$usr";
  65.     }
  66.     print "</A>" if $emf ne "";
  67.     print "</LI>\n";
  68. }
  69. print "</UL><P>\n";
  70. print "<P>$L{BCINSTR} $contact.<P>\n";
  71. print "<HR><CENTER><BR>\n";
  72. print "<A HREF=\"javascript:history.back()\">$L{BCBACK}</A>\n";
  73. print "</CENTER>\n";
  74. &ex('printuntil', 11, 17, 0, "", 0, 1);
  75. exit(0);
  76.