Lines 85-100
if ($profile_name && $profile_content && $action) {
Link Here
|
85 |
my $rows; |
85 |
my $rows; |
86 |
|
86 |
|
87 |
if ($action eq "create") { |
87 |
if ($action eq "create") { |
88 |
my $query = "INSERT INTO export_format(export_format_id, profile, description, content, csv_separator, field_separator, subfield_separator, encoding, type) VALUES (NULL, ?, ?, ?, ?, ?, ?, ?, ?)"; |
88 |
my $query = "INSERT INTO export_format(export_format_id, profile, description, content, csv_separator, field_separator, subfield_separator, encoding, type) VALUES (NULL, ?, ?, ?, ?, ?, ?, ?, ?)"; |
89 |
my $sth = $dbh->prepare($query); |
89 |
my $sth = $dbh->prepare($query); |
90 |
$rows = $sth->execute($profile_name, $profile_description, $profile_content, $csv_separator, $field_separator, $subfield_separator, $encoding, $type); |
90 |
$rows = $sth->execute($profile_name, $profile_description, $profile_content, $csv_separator, $field_separator, $subfield_separator, $encoding, $type); |
91 |
|
91 |
|
92 |
} |
92 |
} |
93 |
|
93 |
|
94 |
if ($action eq "edit") { |
94 |
if ($action eq "edit") { |
95 |
my $query = "UPDATE export_format SET description=?, content=?, csv_separator=?, field_separator=?, subfield_separator=?, encoding=?, type=? WHERE export_format_id=? LIMIT 1"; |
95 |
my $query = "UPDATE export_format SET description=?, content=?, csv_separator=?, field_separator=?, subfield_separator=?, encoding=?, type=? WHERE export_format_id=? LIMIT 1"; |
96 |
my $sth = $dbh->prepare($query); |
96 |
my $sth = $dbh->prepare($query); |
97 |
$rows = $sth->execute($profile_description, $profile_content, $csv_separator, $field_separator, $subfield_separator, $encoding, $type, $profile_name); |
97 |
$rows = $sth->execute($profile_description, $profile_content, $csv_separator, $field_separator, $subfield_separator, $encoding, $type, $profile_name); |
98 |
} |
98 |
} |
99 |
|
99 |
|
100 |
if ($action eq "delete") { |
100 |
if ($action eq "delete") { |
Lines 112-118
if ($profile_name && $profile_content && $action) {
Link Here
|
112 |
|
112 |
|
113 |
# If a profile has been selected for modification |
113 |
# If a profile has been selected for modification |
114 |
if ($id) { |
114 |
if ($id) { |
115 |
my $query = "SELECT export_format_id, profile, description, content, csv_separator, field_separator, subfield_separator, encoding, type FROM export_format WHERE export_format_id = ?"; |
115 |
my $query = "SELECT export_format_id, profile, description, content, csv_separator, field_separator, subfield_separator, encoding, type FROM export_format WHERE export_format_id = ?"; |
116 |
my $sth; |
116 |
my $sth; |
117 |
$sth = $dbh->prepare($query); |
117 |
$sth = $dbh->prepare($query); |
118 |
|
118 |
|
Lines 122-128
if ($profile_name && $profile_content && $action) {
Link Here
|
122 |
selected_profile_id => $selected_profile->[0], |
122 |
selected_profile_id => $selected_profile->[0], |
123 |
selected_profile_name => $selected_profile->[1], |
123 |
selected_profile_name => $selected_profile->[1], |
124 |
selected_profile_description => $selected_profile->[2], |
124 |
selected_profile_description => $selected_profile->[2], |
125 |
selected_profile_content => $selected_profile->[3], |
125 |
selected_profile_content => $selected_profile->[3], |
126 |
selected_csv_separator => $selected_profile->[4], |
126 |
selected_csv_separator => $selected_profile->[4], |
127 |
selected_field_separator => $selected_profile->[5], |
127 |
selected_field_separator => $selected_profile->[5], |
128 |
selected_subfield_separator => $selected_profile->[6], |
128 |
selected_subfield_separator => $selected_profile->[6], |
129 |
- |
|
|