projects
/
technostate.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
582478e
)
*** empty log message ***
author
ivan
<ivan>
Thu, 22 Apr 1999 05:58:06 +0000
(
05:58
+0000)
committer
ivan
<ivan>
Thu, 22 Apr 1999 05:58:06 +0000
(
05:58
+0000)
cgi/persons.cgi
patch
|
blob
|
history
cgi/sets.cgi
patch
|
blob
|
history
diff --git
a/cgi/persons.cgi
b/cgi/persons.cgi
index
0a84508
..
d011913
100755
(executable)
--- a/
cgi/persons.cgi
+++ b/
cgi/persons.cgi
@@
-1,5
+1,5
@@
#!/usr/bin/perl -Tw
#!/usr/bin/perl -Tw
-# $Id: persons.cgi,v 1.
6 1999-04-22 05:54:53
ivan Exp $
+# $Id: persons.cgi,v 1.
7 1999-04-22 05:58:06
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
# 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
@@
-27,7
+27,7
@@
$dbh = DBI->connect( $data_source, $user, $password )
unless ( $cgi->param('magic') ) { #first time through
unless ( $cgi->param('magic') ) { #first time through
- my $sth = $dbh->prepare( "SELECT * FROM
PERSONS
" )
+ my $sth = $dbh->prepare( "SELECT * FROM
$table
" )
or die $dbh->errstr;
my $rv = $sth->execute;
die $sth->errstr unless $rv;
or die $dbh->errstr;
my $rv = $sth->execute;
die $sth->errstr unless $rv;
@@
-85,7
+85,7
@@
unless ( $cgi->param('magic') ) { #first time through
$cgi->param( $field, $1);
}
}
$cgi->param( $field, $1);
}
}
- my $statement =
'INSERT INTO PERSONS ( '
.
+ my $statement =
"INSERT INTO $table ( "
.
join(', ', @fields ).
' ) VALUES ( '.
join( ', ', map { $dbh->quote($cgi->param($_)) } @fields ).
join(', ', @fields ).
' ) VALUES ( '.
join( ', ', map { $dbh->quote($cgi->param($_)) } @fields ).
diff --git
a/cgi/sets.cgi
b/cgi/sets.cgi
index
b4ef999
..
9bab6a3
100755
(executable)
--- a/
cgi/sets.cgi
+++ b/
cgi/sets.cgi
@@
-1,5
+1,5
@@
#!/usr/bin/perl -Tw
#!/usr/bin/perl -Tw
-# $Id: sets.cgi,v 1.
2 1999-04-22 05:54:53
ivan Exp $
+# $Id: sets.cgi,v 1.
3 1999-04-22 05:58:06
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
# 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
@@
-33,8
+33,8
@@
unless ( $cgi->param('magic') ) { #first time through
die $sth->errstr unless $rv;
print $cgi->header( '-expires' => 'now' ),
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' ) {
;
unless ( $sth eq '0E0' ) {
@@
-59,15
+59,15
@@
unless ( $cgi->param('magic') ) { #first time through
}
$cgi->param('magic', 'new_form');
}
$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' ) {
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');
$cgi->param('magic', 'process_form');
- &print_form( $cgi, "Add
person
" );
+ &print_form( $cgi, "Add
set
" );
exit;
} elsif ( $cgi->param('magic') eq 'process_form' ) {
exit;
} elsif ( $cgi->param('magic') eq 'process_form' ) {
@@
-78,7
+78,7
@@
unless ( $cgi->param('magic') ) { #first time through
$cgi->param( $field, $1);
}
}
$cgi->param( $field, $1);
}
}
- my $statement =
'INSERT INTO PERSONS ( '
.
+ my $statement =
"INSERT INTO $table ( "
.
join(', ', @fields ).
' ) VALUES ( '.
join( ', ', map { $dbh->quote($cgi->param($_)) } @fields ).
join(', ', @fields ).
' ) VALUES ( '.
join( ', ', map { $dbh->quote($cgi->param($_)) } @fields ).