Re: multi-page form and cgi.pm

2002-07-18 Thread zentara

On Wed, 17 Jul 2002 17:17:21 -0400, [EMAIL PROTECTED]
(Andrew Hughes) wrote:

>I have been given the task of creating a multi-page form that will consist
>of 4 parts.  The final page will the list out everything that the users have
>entered and ask if they would like to go back to any of the 4 sections to
>update the information.  Once the users are satisfied with the final
>product, they will print it out.  I know how to do this with multiple
>scripts and html forms and hidden fields.  However, I would like to try to
>use one script with subroutines.  I guess my main stumbling block is passing
>hidden form fields between subroutines.  Can anyone offer me a simple
>example of how to go about passing a form field from one subroutine to
>another subroutine where it is a hidden field using cgi.pm?  And/Or, can
>anyone point me in toward an applicable tutorial?

I like to use here documents, instead of CGI.pm, because it gives me
more control over the output.
Here is an example of a cgi script, which outputs forms with hidden
fields based on the previous submission's input.

You should be able to get the idea.

##start order-action
buttons#
print<






























END_HTML
print "";
###


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Viruses

2002-07-18 Thread zentara

On Wed, 17 Jul 2002 23:21:06 -0400, [EMAIL PROTECTED] (Admin)
wrote:

>Please ensure your computers are virus free before sending attachments
>through this mailing list.  In the past 2 weeks I have received
>notification from my Microtrend PC-cillin of no less than 6 worm/trojan
>infected files sent through this group.  If others on this list do not have
>adequate virus protection please beware of possible viruses circulating
>through this email list.

I havn't received any viruii thru this list, exactly which messages are
you talking about. Maybe you should get rid of MS Windows.



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Viruses

2002-07-18 Thread Shawn

"zentara" <[EMAIL PROTECTED]> wrote in message 
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> On Wed, 17 Jul 2002 23:21:06 -0400, [EMAIL PROTECTED] (Admin)
> wrote:
> 
> >Please ensure your computers are virus free before sending attachments
> >through this mailing list.  In the past 2 weeks I have received
> >notification from my Microtrend PC-cillin of no less than 6 worm/trojan
> >infected files sent through this group.  If others on this list do not have
> >adequate virus protection please beware of possible viruses circulating
> >through this email list.
> 
> I havn't received any viruii thru this list, exactly which messages are
> you talking about. Maybe you should get rid of MS Windows.

Hey, while your at it, why not stop breathing, since they come that way too...

Or maybe that is a bit harsh, I guess you could get an antibiotic instead.

Norton has seemed to work quite well for the past several years.

Shawn


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




CGI::Application

2002-07-18 Thread Boex,Matthew W.


anyone out there using CGI::Application?  i am thinking about building some
multi-state cgi apps, under mod_perl,  and want to hear any praise/horror
stories.  is there a better module out there or more elegant method(s) to
use?

matt


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: Viruses

2002-07-18 Thread Camilo Gonzalez

Antibiotics won't work against viruses. Like the anti-windows message
though.

-Original Message-
From: Shawn [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 18, 2002 9:21 AM
To: [EMAIL PROTECTED]
Subject: Re: Viruses


"zentara" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> On Wed, 17 Jul 2002 23:21:06 -0400, [EMAIL PROTECTED] (Admin)
> wrote:
> 
> >Please ensure your computers are virus free before sending attachments
> >through this mailing list.  In the past 2 weeks I have received
> >notification from my Microtrend PC-cillin of no less than 6 worm/trojan
> >infected files sent through this group.  If others on this list do not
have
> >adequate virus protection please beware of possible viruses circulating
> >through this email list.
> 
> I havn't received any viruii thru this list, exactly which messages are
> you talking about. Maybe you should get rid of MS Windows.

Hey, while your at it, why not stop breathing, since they come that way
too...

Or maybe that is a bit harsh, I guess you could get an antibiotic instead.

Norton has seemed to work quite well for the past several years.

Shawn


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Viruses

2002-07-18 Thread Shawn

You get my point.  The business world uses MS, live with it.  I use Win2K, OS X, and 
*nix, but to say "Maybe you should get rid of MS Windows" a not even an option for 
most businesses.  Be prepared when *nix gets to a point of the average Joe being able 
to use it for the viruses to start appearing on non-MS platforms.

Shawn

- Original Message - 
From: "Camilo Gonzalez" <[EMAIL PROTECTED]>
To: "'Shawn'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
Sent: Thursday, July 18, 2002 9:37 AM
Subject: RE: Viruses


> Antibiotics won't work against viruses. Like the anti-windows message
> though.
> 
> -Original Message-
> From: Shawn [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, July 18, 2002 9:21 AM
> To: [EMAIL PROTECTED]
> Subject: Re: Viruses
> 
> 
> "zentara" <[EMAIL PROTECTED]> wrote in message
> [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > On Wed, 17 Jul 2002 23:21:06 -0400, [EMAIL PROTECTED] (Admin)
> > wrote:
> > 
> > >Please ensure your computers are virus free before sending attachments
> > >through this mailing list.  In the past 2 weeks I have received
> > >notification from my Microtrend PC-cillin of no less than 6 worm/trojan
> > >infected files sent through this group.  If others on this list do not
> have
> > >adequate virus protection please beware of possible viruses circulating
> > >through this email list.
> > 
> > I havn't received any viruii thru this list, exactly which messages are
> > you talking about. Maybe you should get rid of MS Windows.
> 
> Hey, while your at it, why not stop breathing, since they come that way
> too...
> 
> Or maybe that is a bit harsh, I guess you could get an antibiotic instead.
> 
> Norton has seemed to work quite well for the past several years.
> 
> Shawn
> 
> 
> -- 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> -- 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: Viruses

2002-07-18 Thread Nikola Janceski

Viruses work only because of homogeny. The more systems with more diversity
and the harder it is for viruses to make any kind of impact. Every system
has security holes, but if everyone had the same system you can exploit that
hole (MS virus frenzy). But what happens when you hit another system?
Nothing. It would be 100Mb+ attachment for a virus to threaten every known
OS, and it still wouldn't effect the unknown OSes that some wackos still
build. :)

But this is getting way off topic.

> -Original Message-
> From: Shawn [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, July 18, 2002 10:53 AM
> To: Camilo Gonzalez; [EMAIL PROTECTED]
> Subject: Re: Viruses
> 
> 
> You get my point.  The business world uses MS, live with it.  
> I use Win2K, OS X, and *nix, but to say "Maybe you should get 
> rid of MS Windows" a not even an option for most businesses.  
> Be prepared when *nix gets to a point of the average Joe 
> being able to use it for the viruses to start appearing on 
> non-MS platforms.
> 
> Shawn
> 
> - Original Message - 
> From: "Camilo Gonzalez" <[EMAIL PROTECTED]>
> To: "'Shawn'" <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>
> Sent: Thursday, July 18, 2002 9:37 AM
> Subject: RE: Viruses
> 
> 
> > Antibiotics won't work against viruses. Like the 
> anti-windows message
> > though.
> > 
> > -Original Message-
> > From: Shawn [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, July 18, 2002 9:21 AM
> > To: [EMAIL PROTECTED]
> > Subject: Re: Viruses
> > 
> > 
> > "zentara" <[EMAIL PROTECTED]> wrote in message
> > [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > > On Wed, 17 Jul 2002 23:21:06 -0400, 
> [EMAIL PROTECTED] (Admin)
> > > wrote:
> > > 
> > > >Please ensure your computers are virus free before 
> sending attachments
> > > >through this mailing list.  In the past 2 weeks I have received
> > > >notification from my Microtrend PC-cillin of no less 
> than 6 worm/trojan
> > > >infected files sent through this group.  If others on 
> this list do not
> > have
> > > >adequate virus protection please beware of possible 
> viruses circulating
> > > >through this email list.
> > > 
> > > I havn't received any viruii thru this list, exactly 
> which messages are
> > > you talking about. Maybe you should get rid of MS Windows.
> > 
> > Hey, while your at it, why not stop breathing, since they 
> come that way
> > too...
> > 
> > Or maybe that is a bit harsh, I guess you could get an 
> antibiotic instead.
> > 
> > Norton has seemed to work quite well for the past several years.
> > 
> > Shawn
> > 
> > 
> > -- 
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> > -- 
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> > 
> > 
> 
> 
> -- 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 



The views and opinions expressed in this email message are the sender's
own, and do not necessarily represent the views and opinions of Summit
Systems Inc.


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: Viruses

2002-07-18 Thread Bob Showalter

> -Original Message-
> From: Nikola Janceski [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, July 18, 2002 11:07 AM
> To: 'Shawn'; Camilo Gonzalez; [EMAIL PROTECTED]
> Subject: RE: Viruses
> 
> 
> Viruses work only because of homogeny. The more systems with 
> more diversity
> and the harder it is for viruses to make any kind of impact. 
> Every system
> has security holes, but if everyone had the same system you 
> can exploit that
> hole (MS virus frenzy). But what happens when you hit another system?
> Nothing. It would be 100Mb+ attachment for a virus to 
> threaten every known
> OS, and it still wouldn't effect the unknown OSes that some 
> wackos still
> build. :)
> 
> But this is getting way off topic.

My recent practice is to simply delete all MIME posts. There should be
no reason to post MIME to the list, correct?

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Viruses

2002-07-18 Thread Michael Maibaum

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

* Bob Showalter <[EMAIL PROTECTED]> [2002-07-18 08:13]:
> > -Original Message-
> > From: Nikola Janceski [mailto:[EMAIL PROTECTED]]
> > 
> > Viruses work only because of homogeny. The more systems with 
> > more diversity
> > and the harder it is for viruses to make any kind of impact. 
> > Every system
> > has security holes, but if everyone had the same system you 
> > can exploit that
> > hole (MS virus frenzy). But what happens when you hit another system?
> > Nothing. It would be 100Mb+ attachment for a virus to 
> > threaten every known
> > OS, and it still wouldn't effect the unknown OSes that some 
> > wackos still
> > build. :)
> > 
> > But this is getting way off topic.
> 
> My recent practice is to simply delete all MIME posts. There should be
> no reason to post MIME to the list, correct?

yes, signed mail should be MIME. Some people (like me) sign everything.

Michael

- -- 
Dr Michael A. Maibaum - (W)+1 (415) 561 1682 /~\ The ASCII
<[EMAIL PROTECTED]>- (H)+1 (415) 626 6733 \ /   Ribbon Campaign
  X  Help Cure
 / \HTML Email
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.7 (FreeBSD)

iD8DBQE9NuPIilk3LUlIL0MRAtm5AKCQ6lS0KasuaUVUDzZTYp7ik+4JOwCfX0i1
EmM3yN75Owr+WO6yev5c7/A=
=x/8T
-END PGP SIGNATURE-

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Viruses

2002-07-18 Thread drieux


On Thursday, July 18, 2002, at 07:53 , Shawn wrote:

> [..]  I use Win2K, OS X, and *nix, but to say "Maybe you should get rid 
> of MS Windows" a not even an option for most businesses.  Be prepared 
> when *nix gets to a point of the average Joe being able to use it for the 
> viruses to start appearing on non-MS platforms.
[..]

Another way of going around this would be:

a) if people would adopt appropriate security precautions
AND maintain them, then it is not the OS's "fault".

b) Some forget that in early Mac there were a lot of people
who had too much fun creating 'virii' because of defects
in the 'resource fork' model that Apple adopted to make
their 'platform' "user friendly".

c) Some may even recall 'the internet worm' that 'escaped'
from 'the lab' - and brought major chunks of the internet
by being 'adaptable' and capable of exploiting holes in
multiple classes of *nix OS's

So we have seen this process before, on other 'platforms' -
and we keep revisiting it time and again as people keep
producing 'user friendly' "web applications" - without
regard for the 'security issues' - and/or simple Quality
Control standards that would prevent most of the problems.

The cheap excuse of 'blame M$' and/or 'joe six pack' may
be emotionally re-assuring - but they do not focus on
means and methods of 'solving' the root problems.

r1: If people do not keep their systems and virii
detection software/hardware/firmware up to date,
then they leave themselves exposed to problems.

r2: As long as people 'share information' there will be
vectors of infections - including software virii
as well as 'urban legends'

r3: As long as there are Coders, there will be new Software,
some of it will have unintended consequences, these will
either be 'security holes' or 'features' - depending upon
how marketting 'sells' them.

r4: As long as people can Code, some will code with malice of 
forethought,
others will code without any regard for thought at all.

r5: There are people doing 'coding' who do not think of themselves
as 'coders' - because they are 'web artists' - or it is just
a simple script that does

If It Runs in a 'Universal Turing Machine' -
Then Deal with the reality that 'it is code'!

IF we could stop the Coders,
Then we could stop the Problems.

So why not advocate:

Find a Cure for Software Development!
Now, More than Ever! For reasons of
national security! Patriotism! and
to protect the innocent children!!!
Think of the Children!

Or maybe, I don't know, keep working on the solutions we can?

ciao
drieux

---


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




running tar from a browser

2002-07-18 Thread Soheil Shaghaghi

Hello everyone.

Here is my problem, if anyone can please help me:
Running, Linux.
I am trying to write a simple backup program to backup the data from a
directory.
The script works from the command line.
But when I try to run the same script from the browser, it doesn't work.
I get this message:
"Data could not be backed up.
Exited with the following message: No such file or directory"

The error logs say:
tar: backup.tar: Permission denied
tar: Error is not recoverable: exiting now

Can anyone please help me?


Here is the contents of the script:
#!/usr/bin/perl
my
($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,$blksize,
$block);
my $command1 = "tar cvf backup.tar members templates reviews";

system($command1);


($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$ctime,$blksize,
$block) = stat "backup.tar";

my $DAT_SIZE = $size;

print "Content-Type: text/html\n\n";

if (-e "backup.tar") {
print "Backup
complete.\n";
print "We recommend that you download the Data Backup File ($DAT_SIZE Bytes)to
your local computer for safe keeping...\n";
print "Note: The backup file (backup.tar) is in 
the
same directory as your CGI Programs Data.  It is possible that you may not
be able to download it using the link above (.cgi-bin directories will not
allow downloads from them).  If you cannot download it with the provided
link, we recommend that you FTP into your server and retreive the file
manually.\n";
}
else {
print "Data could not be backed up.\n";
print "Exited with the following message: $!\n";
}

exit 0;



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




RE: running tar from a browser

2002-07-18 Thread Bob Showalter

> -Original Message-
> From: Soheil Shaghaghi [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, July 18, 2002 2:48 PM
> To: [EMAIL PROTECTED]
> Subject: running tar from a browser
> 
> 
> Hello everyone.
> 
> Here is my problem, if anyone can please help me:
> Running, Linux.
> I am trying to write a simple backup program to backup the data from a
> directory.
> The script works from the command line.
> But when I try to run the same script from the browser, it 
> doesn't work.
> I get this message:
> "Data could not be backed up.
> Exited with the following message: No such file or directory"
> 
> The error logs say:
> tar: backup.tar: Permission denied
   ^
   This is the relevant problem

> tar: Error is not recoverable: exiting now
> 
> Can anyone please help me?
> 
> 
> Here is the contents of the script:
> #!/usr/bin/perl
>   my
> ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$c
> time,$blksize,
> $block);
>   my $command1 = "tar cvf backup.tar members templates reviews";

You need to change directories. This is probably running from your
cgi-bin directory, which the web server doesn't have (or need) write 
access to. Is cgi-bin where members, templates, and reviews are kept?

The directory you switch to must be writable by the web server in
order to create backup.tar, or you will have to specify a directory
that *is* writable.

> 
>   system($command1);
> 
> 
> ($dev,$ino,$mode,$nlink,$uid,$gid,$rdev,$size,$atime,$mtime,$c
> time,$blksize,
> $block) = stat "backup.tar";
> 
>   my $DAT_SIZE = $size;
> 
>   print "Content-Type: text/html\n\n";
> 
>   if (-e "backup.tar") {
>   print "Backup
> complete.\n";
>   print "We recommend that you download the 
>  HREF=\"backup.tar\">Data Backup File ($DAT_SIZE 
> Bytes)to
> your local computer for safe keeping...\n";
>   print "Note: The backup 
> file (backup.tar) is in the
> same directory as your CGI Programs Data.  It is possible 
> that you may not
> be able to download it using the link above (.cgi-bin 
> directories will not
> allow downloads from them).  If you cannot download it with 
> the provided
> link, we recommend that you FTP into your server and retreive the file
> manually.\n";
>   }
>   else {
>   print "Data could not be backed up.\n";
>   print "Exited with the following message: 
> $!\n";
>   }
> 
>   exit 0;
> 
> 
> 
> -- 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: running tar from a browser

2002-07-18 Thread fliptop

Bob Showalter wrote:

>>-Original Message-
>>From: Soheil Shaghaghi [mailto:[EMAIL PROTECTED]]
>>Sent: Thursday, July 18, 2002 2:48 PM
>>To: [EMAIL PROTECTED]
>>Subject: running tar from a browser
>>
>>
>>Hello everyone.
>>
>>Here is my problem, if anyone can please help me:
>>Running, Linux.
>>I am trying to write a simple backup program to backup the data from a
>>directory.
>>The script works from the command line.
>>But when I try to run the same script from the browser, it 
>>doesn't work.
>>I get this message:
>>"Data could not be backed up.
>>Exited with the following message: No such file or directory"
>>
>>The error logs say:
>>tar: backup.tar: Permission denied
>>
>^
>This is the relevant problem
> 
> 


[snip]

> The directory you switch to must be writable by the web server in
> order to create backup.tar, or you will have to specify a directory
> that *is* writable.


or sudo the cgi as a user that does have write permissions to the directory.


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Script for making declarations

2002-07-18 Thread Murli Nair

Hi !!
Is anyone aware of a script that I could use to make 
declarations in my perl code. I have a huge CGI 
which does all the work and it does not use strict.
It was written by someone else, and I am cleaning it  up. 
I have broken up this CGI into atleast 10 different 
CGI's,  I now have to make declarations for all the 
variables that it uses. If you have one  which does this 
I will appreciate if you could send me the same. 
Cheers always!!
Murli



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Script for making declarations

2002-07-18 Thread Connie Chan

So what kinds / types of declarations you want to make ?

Rgds, 
Connie

- Original Message - 
From: "Murli Nair" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, July 19, 2002 3:58 AM
Subject: Script for making declarations


> Hi !!
> Is anyone aware of a script that I could use to make 
> declarations in my perl code. I have a huge CGI 
> which does all the work and it does not use strict.
> It was written by someone else, and I am cleaning it  up. 
> I have broken up this CGI into atleast 10 different 
> CGI's,  I now have to make declarations for all the 
> variables that it uses. If you have one  which does this 
> I will appreciate if you could send me the same. 
> Cheers always!!
> Murli
> 
> 
> 
> -- 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Script for making declarations

2002-07-18 Thread Murli Nair

Hi!!
I had send this request some time back and I am still looking 
for a code that will help me make declarations. If you use 
strict then every variable has to be declared using my and 
that is what I want to achieve. Let me know if anyone has
as script that does this.
Thanks and cheers always!!
Murli



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




What's wrong with the code?

2002-07-18 Thread Soheil Shaghaghi

Hi everyone,
Can anyone please tell me what's wrong with this code?
When I try to submit the form, it just reloads the page.
It never gets to the "sub addreport"
Thanks so much.

#!/usr/bin/perl

# Locate and load required files
eval {
# Get the script location (for UNIX and Windows)
($0 =~ m,(.*)/[^/]+,)   && unshift (@INC, "$1");

# Get the script location (for Windows)
($0 =~ m,(.*)\\[^\\]+,) && unshift (@INC, "$1");

# Load files
require "settings.cgi";
require "common.sub";
};

# Read the form
&readform;

&reportit;




### SUBROUTINES ###


# Display new member registration form
sub reportit {

# Load common vocabulary
require "$tmplpath/common.txt";

# Load Registration Form template
require "$tmplpath/reportit.tmpl";

# Smut filter indicator
$showsmutswitch = "$commonv
oc[35]$commonvoc[36]" if $badwords;


# Registration Form
$FORM_SUB = qq(



  $tempvoc[0]
  


  
$tempvoc[1]
  
  
$commonvoc[66]*

  

  
  
$commonvoc[67]*

  

  
  
$commonvoc[68]*

  

  
  
$commonvoc[69]*



  
  
$commonvoc[21] $showsmutswitch
  





  
);

# Perform template substitutions
$temphtml =~ s/\{FORM\}/$FORM_SUB/g;

# Display the screen
&showscreen;
}


# Add new member to the database
sub addreport {

# Check referring URL
&urlcheck;

# Check form fields
if ($FORM{'name'} !~ /\S/) {
push(@badfields, 3);
}

if ($FORM{'email'} !~ /[\w\-]+\@[\w\-]+\.[\w\-]+/) {
push(@badfields, 4);
}

if ($FORM{'title'} !~ /\S/) {
push(@badfields, 6);
}

if ($FORM{'description'} !~ /\S/) {
push(@badfields, 7);
}
# Display errors, if any
&formerror;

# Block Checker
&blocker($ENV{'REMOTE_ADDR'}, "IP Address",
 $FORM{'email'}, "E-Mail Address");

# Check for bad/rude words

&smut_detect($FORM{'name'},$FORM{'email'},$FORM{'title'},$FORM{'description'
});

# Strip html tags

&htmlstrip($FORM{'name'},$FORM{'email'},$FORM{'title'},$FORM{'description'})
;

# Get current time
$curtime = time();


# Add member to the waiting list
open(RLIST,">>$membpath/reportit.cgi") || err("Could not update
reportit.cgi: $!");
flock(RLIST,2);
seek(RLIST,0,2);
print RLIST
"$ENV{'REMOTE_ADDR'}\t$curtime\t$FORM{'name'}\t$FORM{'email'}\t$FORM{'title'
}\t$FORM{'description'}\n";
close(RLIST);

# Notify administrator of new application
if ($regadmin) {
$msgtext = "$FORM{'name'} has just applied to register with 
your Top
Sites script!\n".

"---\n\n
".
   "Note: this message was generated by Top Sites 
script.\n".
   "You can turn this notification off by adjusting 
the script
options.\n";
&sendmail($adminemail, $adminemail, "New Top Sites membership
application!", $msgtext);
}

# Send Waiting Approval Message
if ($appuseremail) {
$appmsg =~ s/\[name\]/$FORM{'name'}/g;
$appmsg =~ s/\[email\]/$FORM{'email'}/g;
$appmsg =~ s/\[title\]/$FORM{'title'}/g;
&sendmail($adminemail, $FORM{'email'}, $appsubject, 
$appmsg);
}

# Show Success Screen
&confirm(14,8,"$scripturl/index.cgi");

}



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




re: Viruses

2002-07-18 Thread John

All,

I am subscribed to both the Perl- and CGI-Beginners lists and get a ton of
your very informative questions and (what's best ) answers every day.

I run Norton's anti-virus which I keep up-to-date with the latest virus
signatures.

I can't remember having *ever* received a virus warning when looking at mail
from either of these two lists. Might I humbly suggest that the original
poster of the virus warning look to other possible contamination points on
their system?

It would seem to me that if any one of us received a virus laden e-mail from
this list, that we'd all get it at the same time causing many alarms to be
sounded -- instead of just the one lonely voice in the wilderness?

Just a thought...


John--

Vice President / Chief Technical Officer
Small Business Help Center, Inc.
http://www.helpbizowners.com
[EMAIL PROTECTED]



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: Viruses

2002-07-18 Thread Wiggins d'Anconia

Unless we are all running linux and mozilla and don't worry about such 
things ;-)(oh if only that could be)



John wrote:
> All,
> 
> I am subscribed to both the Perl- and CGI-Beginners lists and get a ton of
> your very informative questions and (what's best ) answers every day.
> 
> I run Norton's anti-virus which I keep up-to-date with the latest virus
> signatures.
> 
> I can't remember having *ever* received a virus warning when looking at mail
> from either of these two lists. Might I humbly suggest that the original
> poster of the virus warning look to other possible contamination points on
> their system?
> 
> It would seem to me that if any one of us received a virus laden e-mail from
> this list, that we'd all get it at the same time causing many alarms to be
> sounded -- instead of just the one lonely voice in the wilderness?
> 
> Just a thought...
> 
> 
> John--
> 
> Vice President / Chief Technical Officer
> Small Business Help Center, Inc.
> http://www.helpbizowners.com
> [EMAIL PROTECTED]
> 
> 
> 



-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




Re: What's wrong with the code?

2002-07-18 Thread Wiggins d'Anconia

Do you mean addreport never gets called, or is never loaded?  Should be 
loaded as it is in the same file as the eval, it appears you are trying 
to call "addreport" from the input variable of "action" but I don't see 
where that value is ever tested/used?

(you might consider use strict; on a side note)


Soheil Shaghaghi wrote:
> Hi everyone,
> Can anyone please tell me what's wrong with this code?
> When I try to submit the form, it just reloads the page.
> It never gets to the "sub addreport"
> Thanks so much.
> 
> #!/usr/bin/perl
> 
> # Locate and load required files
> eval {
>   # Get the script location (for UNIX and Windows)
>   ($0 =~ m,(.*)/[^/]+,)   && unshift (@INC, "$1");
> 
>   # Get the script location (for Windows)
>   ($0 =~ m,(.*)\\[^\\]+,) && unshift (@INC, "$1");
> 
>   # Load files
>   require "settings.cgi";
>   require "common.sub";
> };
> 
> # Read the form
> &readform;
> 
> &reportit;
> 
> 
> 
> 
> ### SUBROUTINES ###
> 
> 
> # Display new member registration form
> sub reportit {
> 
>   # Load common vocabulary
>   require "$tmplpath/common.txt";
> 
>   # Load Registration Form template
>   require "$tmplpath/reportit.tmpl";
> 
>   # Smut filter indicator
>   $showsmutswitch = " href=\"javascript:popup('$scripturl/members.cgi?action=showsmut')\">$commonv
> oc[35]$commonvoc[36]" if $badwords;
> 
> 
>   # Registration Form
>   $FORM_SUB = qq(
> 
> 
> 
>   $tempvoc[0]
>onSubmit="return Check_Data();">
> 
> 
>   
>  size="$sfontsize">$tempvoc[1]
>   
>   
>  size="$fontsize">$commonvoc[66]*
> 
>   
> 
>   
>   
>  size="$fontsize">$commonvoc[67]*
> 
>   
> 
>   
>   
>  size="$fontsize">$commonvoc[68]*
> 
>   
> 
>   
>   
>  size="$fontsize">$commonvoc[69]*
> 
>   COLS="40">
> 
>   
>   
>  size="$sfontsize">$commonvoc[21] $showsmutswitch
>   
> 
> 
> 
>  onClick="history.back()">
> 
>   
> );
> 
>   # Perform template substitutions
>   $temphtml =~ s/\{FORM\}/$FORM_SUB/g;
> 
>   # Display the screen
>   &showscreen;
> }
> 
> 
> # Add new member to the database
> sub addreport {
> 
>   # Check referring URL
>   &urlcheck;
> 
>   # Check form fields
>   if ($FORM{'name'} !~ /\S/) {
>   push(@badfields, 3);
>   }
> 
>   if ($FORM{'email'} !~ /[\w\-]+\@[\w\-]+\.[\w\-]+/) {
>   push(@badfields, 4);
>   }
> 
>   if ($FORM{'title'} !~ /\S/) {
>   push(@badfields, 6);
>   }
> 
>   if ($FORM{'description'} !~ /\S/) {
>   push(@badfields, 7);
>   }
>   # Display errors, if any
>   &formerror;
> 
>   # Block Checker
>   &blocker($ENV{'REMOTE_ADDR'}, "IP Address",
>$FORM{'email'}, "E-Mail Address");
> 
>   # Check for bad/rude words
> 
> &smut_detect($FORM{'name'},$FORM{'email'},$FORM{'title'},$FORM{'description'
> });
> 
>   # Strip html tags
> 
> &htmlstrip($FORM{'name'},$FORM{'email'},$FORM{'title'},$FORM{'description'})
> ;
> 
>   # Get current time
>   $curtime = time();
> 
> 
>   # Add member to the waiting list
>   open(RLIST,">>$membpath/reportit.cgi") || err("Could not update
> reportit.cgi: $!");
>   flock(RLIST,2);
>   seek(RLIST,0,2);
>   print RLIST
> "$ENV{'REMOTE_ADDR'}\t$curtime\t$FORM{'name'}\t$FORM{'email'}\t$FORM{'title'
> }\t$FORM{'description'}\n";
>   close(RLIST);
> 
>   # Notify administrator of new application
>   if ($regadmin) {
>   $msgtext = "$FORM{'name'} has just applied to register with 
>your Top
> Sites script!\n".
> 
> "---\n\n
> ".
>  "Note: this message was generated by Top Sites 
>script.\n".
>  "You can turn this notification off by adjusting 
>the script
> options.\n";
>   &sendmail($adminemail, $adminemail, "New Top Sites membership
> application!", $msgtext);
>   }
> 
>   # Send Waiting Approval Message
>   if ($appuseremail) {
>