in reply to Re^3: Russian Language read from mysql into perl script problem
in thread Russian Language read from mysql into perl script problem
That is the first part of the header.<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" lang="en-US" xml:lang="en-U +S"> <head> <title>Richard's Back Office Manager</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <meta http-equiv="Content-language" content="RU"> <meta name="audience" content="All" />
#Get the content of the language tag to be edited from the dat +abase 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 curre +nt content... if($_tableName ne "en_lang") { $sth = $dbh->prepare(qq{select * from `en_lang` where `lng +Id` = ?}); $sth->execute($in{lngId}); my $_enLang = $sth->fetchrow_hashref(); $sth->finish(); } # Build the web form $_page_content contains the whole page co +ntent 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~ <table border="0" cellpadding="2" cellspacing="2" align="cente +r" width="650"> <tr> <td class="td_header_green" colspan="2"> Modify a Language Tag </td> </tr> <tr> <td class="label_cell"> Language: </td> <td class="non_label_cell"> $_languagenames{$_tableName} </td> </tr> <tr> <td class="label_cell"> Last Modified: </td> <td class="non_label_cell"> ~ . buildDate($_tr->{d},"common_layout_wt") . qq~ </td> </tr> <tr> <td class="label_cell"> Tag: </td> <td class="non_label_cell"> $_tr->{tag} </td> </tr> <tr> <td class="label_cell_center" colspan="2"> Current Content: </td> </tr> <tr> <td class="non_label_cell_center" colspan="2"> $_tr->{value} <!-- This displays the Content from +the database... --> </td> </tr> <tr> <td class="label_cell_center" colspan="2"> New Content: </td> </tr> <tr> <td class="non_label_cell_center" colspan="2"> ~ . textarea(-name=>"tagvalue", -default=>$_tr->{v +alue}, -onfocus=>"this.select()", -cols=>85, -rows=>10, -class=>"form +field") . qq~ </td> </tr> ~; # again check if this tag is not the english version if no +t, then show the english version now so they know what they should be + translating... if($_tableName ne "en_lang") { $_page_content .= qq~ <tr> <td class="label_cell" colspan="2"> English Version Content: </td> </tr> <tr> <td class="non_label_cell_center" colspan="2"> $_enLang->{value} </td> </tr> <tr> <td class="label_cell"> English Version Last Modified: </td> <td class="non_label_cell"> ~ . buildDate($_enLang->{d},"common_layout_wt") . +qq~ </td> </tr> ~; } # Done checking english version or not... complete the for +m. $_page_content .= qq~ <tr> <td class="non_label_cell_center" colspan="2"> ~ . submit(-name=>"choice", -value=>"Save Changes" +, -class=>"submit") . qq~ </td> </tr> </table> ~ . end_form() . br() x 2; # done building the web form and pa +ge...
|
|---|