*
* -------------------------------------------- *
* This program is free software; you can redistribute it and/or modify it *
* under the terms of the GNU General Public License as published by the *
* Free Software Foundation; either version 2 of the License, or (at your *
* option) any later version. *
\**************************************************************************/
/* $Id$ */
class uimainscreen
{
var $public_functions = array
(
'index' => True,
'mainscreen' => True
);
function uimainscreen()
{
$GLOBALS['phpgw_info']['flags']['xslt_app'] = True;
$GLOBALS['phpgw']->nextmatchs = CreateObject('phpgwapi.nextmatchs');
}
function mainscreen()
{
$GLOBALS['phpgw']->xslttpl->add_file('app_data');
$GLOBALS['phpgw']->hooks->process('admin');
$GLOBALS['phpgw']->xslttpl->set_var('phpgw',array('list' => $GLOBALS['phpgw']->common->output));
}
function index()
{
if ($GLOBALS['HTTP_POST_VARS']['cancel'])
{
header('Location: ' . $GLOBALS['phpgw']->link('/admin/index.php'));
}
$GLOBALS['phpgw']->template->set_file(array('message' => 'mainscreen_message.tpl'));
$GLOBALS['phpgw']->template->set_block('message','form','form');
$GLOBALS['phpgw']->template->set_block('message','row','row');
$GLOBALS['phpgw']->template->set_block('message','row_2','row_2');
$section = $GLOBALS['HTTP_POST_VARS']['section'];
$select_lang = $GLOBALS['HTTP_POST_VARS']['select_lang'];
$message = $GLOBALS['HTTP_POST_VARS']['message'];
$GLOBALS['phpgw']->common->phpgw_header();
if ($GLOBALS['HTTP_POST_VARS']['submit'])
{
$GLOBALS['phpgw']->db->query("DELETE FROM phpgw_lang WHERE message_id='$section" . "_message' AND app_name='"
. "$section' AND lang='$select_lang'",__LINE__,__FILE__);
$GLOBALS['phpgw']->db->query("INSERT INTO phpgw_lang VALUES ('$section" . "_message','$section','$select_lang','"
. addslashes($message) . "')",__LINE__,__FILE__);
$message = '