#Get the content of the language tag to be edited from the database table... my $sth = $dbh->prepare(qq{select * from `$_tableName` where `lngId` = ?}); $sth->execute($in{lngId}); my $_tr = $sth->fetchrow_hashref(); $sth->finish(); # Got it... Check if this langauge is NOT the english version if not then get the english version of the same tag to show the current content... if($_tableName ne "en_lang") { $sth = $dbh->prepare(qq{select * from `en_lang` where `lngId` = ?}); $sth->execute($in{lngId}); my $_enLang = $sth->fetchrow_hashref(); $sth->finish(); } # Build the web form $_page_content contains the whole page content which will then print in the template of the design at the end of the programming... $_page_content .= start_form(-name=>"edit_form", -action=>url(), -method=>"POST") . hidden(-name=>"pg") . hidden(-name=>"do") . hidden(-name=>"view", -value=>"saveTag", -override=>1) . hidden(-name=>"lngId") . hidden(-name=>"r") . hidden(-name=>"q") . hidden(-name=>"p") . hidden(-name=>"timel", -value=>time(), -override=>1) . $hidden_inc_sess_id . qq~
| Modify a Language Tag | |
| Language: | $_languagenames{$_tableName} |
| Last Modified: | ~ . buildDate($_tr->{d},"common_layout_wt") . qq~ |
| Tag: | $_tr->{tag} |
| Current Content: | |
| $_tr->{value} | |
| New Content: | |
| ~ . textarea(-name=>"tagvalue", -default=>$_tr->{value}, -onfocus=>"this.select()", -cols=>85, -rows=>10, -class=>"formfield") . qq~ | |
| English Version Content: | |
| $_enLang->{value} | |
| English Version Last Modified: | ~ . buildDate($_enLang->{d},"common_layout_wt") . qq~ |
| ~ . submit(-name=>"choice", -value=>"Save Changes", -class=>"submit") . qq~ | |