"admin", "enable_nextmatchs_class" => True);
include("../header.inc.php");
$phpgw->template->set_file(array("form" => "mainscreen_message.tpl",
"row" => "mainscreen_message_row.tpl",
"row_2" => "mainscreen_message_row_2.tpl"
));
if ($submit) {
$phpgw->db->query("delete from lang where message_id='$section" . "_message' and app_name='"
. "$section' and lang='$select_lang'",__LINE__,__FILE__);
$phpgw->db->query("insert into lang values ('$section" . "_message','$section','$select_lang','"
. addslashes($message) . "')",__LINE__,__FILE__);
$message = "
".lang("message has been updated")."";
}
if (! isset($select_lang)) {
$phpgw->template->set_var("header_lang",lang("Main screen message"));
$phpgw->template->set_var("form_action",$phpgw->link("/admin/mainscreen_message.php"));
$phpgw->template->set_var("tr_color",$phpgw_info["theme"]["th_bg"]);
$phpgw->template->set_var("value"," ");
$phpgw->template->parse("rows","row_2",True);
$tr_color = $phpgw->nextmatchs->alternate_row_color($tr_color);
$phpgw->template->set_var("tr_color",$tr_color);
$select_lang = '';
$phpgw->template->set_var("label",lang("Language"));
$phpgw->template->set_var("value",$select_lang);
$phpgw->template->parse("rows","row",True);
$tr_color = $phpgw->nextmatchs->alternate_row_color($tr_color);
$phpgw->template->set_var("tr_color",$tr_color);
$select_section = '';
$phpgw->template->set_var("label",lang("Section"));
$phpgw->template->set_var("value",$select_section);
$phpgw->template->parse("rows","row",True);
$tr_color = $phpgw->nextmatchs->alternate_row_color($tr_color);
$phpgw->template->set_var("tr_color",$tr_color);
$phpgw->template->set_var("value",'');
$phpgw->template->parse("rows","row_2",True);
} else {
$phpgw->db->query("select content from lang where lang='$select_lang' and message_id='$section"
. "_message'");
$phpgw->db->next_record();
$current_message = $phpgw->db->f("content");
if ($section == "mainscreen") {
$phpgw->template->set_var("header_lang",lang("Edit main screen message"));
} else {
$phpgw->template->set_var("header_lang",lang("Edit login screen message"));
}
$phpgw->template->set_var("form_action",$phpgw->link("/admin/mainscreen_message.php","select_lang=$select_lang§ion=$section"));
$phpgw->template->set_var("tr_color",$phpgw_info["theme"]["th_bg"]);
$phpgw->template->set_var("value"," ");
$phpgw->template->parse("rows","row_2",True);
$tr_color = $phpgw->nextmatchs->alternate_row_color($tr_color);
$phpgw->template->set_var("tr_color",$tr_color);
$phpgw->template->set_var("value",'');
$phpgw->template->parse("rows","row_2",True);
$tr_color = $phpgw->nextmatchs->alternate_row_color($tr_color);
$phpgw->template->set_var("tr_color",$tr_color);
$phpgw->template->set_var("value",'');
$phpgw->template->parse("rows","row_2",True);
}
$phpgw->template->set_var("error_message",$message);
$phpgw->template->pparse("out","form");
$phpgw->common->phpgw_footer();
?>