|
Lines 113-119
if ( $op eq 'add_form' ) {
Link Here
|
| 113 |
my $checked = $input->param('checked') ? 1 : 0; |
113 |
my $checked = $input->param('checked') ? 1 : 0; |
| 114 |
if ($sth->rows) { |
114 |
if ($sth->rows) { |
| 115 |
$template->param(confirm_update => 1); |
115 |
$template->param(confirm_update => 1); |
| 116 |
$sth=$dbh->prepare("update z3950servers set host=?, port=?, db=?, userid=?, password=?, name=?, checked=?, rank=?,syntax=?,encoding=?,timeout=?,recordtype=? where name=?"); |
116 |
$sth=$dbh->prepare("update z3950servers set host=?, port=?, db=?, userid=?, password=?, name=?, checked=?, rank=?,syntax=?,encoding=?,timeout=?,recordtype=? where name=?"); |
| 117 |
$sth->execute($input->param('host'), |
117 |
$sth->execute($input->param('host'), |
| 118 |
$input->param('port'), |
118 |
$input->param('port'), |
| 119 |
$input->param('db'), |
119 |
$input->param('db'), |
|
Lines 133-140
if ( $op eq 'add_form' ) {
Link Here
|
| 133 |
$template->param(confirm_add => 1); |
133 |
$template->param(confirm_add => 1); |
| 134 |
$sth=$dbh->prepare( |
134 |
$sth=$dbh->prepare( |
| 135 |
"INSERT INTO z3950servers " . |
135 |
"INSERT INTO z3950servers " . |
| 136 |
"(host,port,db,userid,password,name,checked,rank,syntax,encoding,timeout,recordtype) " . |
136 |
"(host,port,db,userid,password,name,checked,rank,syntax,encoding,timeout,recordtype) " . |
| 137 |
"VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)" ); |
137 |
"VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)" ); |
| 138 |
$sth->execute( |
138 |
$sth->execute( |
| 139 |
$input->param('host'), $input->param('port'), |
139 |
$input->param('host'), $input->param('port'), |
| 140 |
$input->param('db'), $input->param('userid'), |
140 |
$input->param('db'), $input->param('userid'), |