#!/usr/bin/perl -Tw
-# $Id: sets.cgi,v 1.2 1999-04-22 05:54:53 ivan Exp $
+# $Id: sets.cgi,v 1.4 1999-04-22 06:06:16 ivan Exp $
# Copyright (c) 1999 Ivan Kohler. All rights reserved.
# This program is free software; you can redistribute it and/or modify it under
# the same terms as perl itself
die $sth->errstr unless $rv;
print $cgi->header( '-expires' => 'now' ),
- $cgi->start_html('Person listing'),
- $cgi->h1('Person listing'),
+ $cgi->start_html('Set listing'),
+ $cgi->h1('Set listing'),
;
unless ( $sth eq '0E0' ) {
}
$cgi->param('magic', 'new_form');
- print '<P><A HREF="', $cgi->self_url, '">Add new person</A>';
+ print '<P><A HREF="', $cgi->self_url, '">Add new set</A>';
print $cgi->end_html;
exit;
} elsif ( $cgi->param('magic') eq 'new_form' ) {
- $cgi->param('PERSON_ID', 0);
+ $cgi->param('SET_ID', 0);
$cgi->param('magic', 'process_form');
- &print_form( $cgi, "Add person" );
+ &print_form( $cgi, "Add set" );
exit;
} elsif ( $cgi->param('magic') eq 'process_form' ) {
$cgi->param( $field, $1);
}
}
- my $statement = 'INSERT INTO PERSONS ( '.
+ $cgi->param('FILESIZE', 0);
+ $cgi->param('DOWNLOADS', 0);
+
+ my $statement = "INSERT INTO $table ( ".
join(', ', @fields ).
' ) VALUES ( '.
join( ', ', map { $dbh->quote($cgi->param($_)) } @fields ).
sub print_form {
my $cgi = shift;
my $action = shift;
- print $cgi->header( '-expires' => 'now' ),
+ print $cgi->header,
$cgi->start_html($action),
$cgi->h1($action),
$cgi->start_form,