2007-10-27 11:59:23 +00:00
|
|
|
require "functions.pl";
|
|
|
|
|
|
|
|
#initialize session data
|
|
|
|
CGI::Session->name($session_name);
|
|
|
|
$query = new CGI;
|
|
|
|
$session = new CGI::Session;
|
|
|
|
|
2007-10-29 15:00:40 +00:00
|
|
|
@userinfo = get_userinfo_from_sid($session->id);
|
2007-10-27 11:59:23 +00:00
|
|
|
|
2007-12-17 12:38:02 +00:00
|
|
|
if($userinfo->{'username'})
|
|
|
|
{
|
2007-12-18 12:39:27 +00:00
|
|
|
if($query->param('submit'))
|
2007-12-17 12:38:02 +00:00
|
|
|
{
|
|
|
|
$dbh->do(qq{update users set locale = ?, pagesize = ?, cortado = ? where id = ?}, undef, $query->param('locale'), $query->param('pagesize'), $query->param('cortado'), $userinfo->{'id'} ) or die $dbh->errstr;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@userinfo = get_userinfo_from_sid($session->id);
|
|
|
|
|
2007-10-29 15:00:40 +00:00
|
|
|
@page = get_page_array(@userinfo);
|
|
|
|
|
|
|
|
if($userinfo->{'username'})
|
2007-10-27 11:59:23 +00:00
|
|
|
{
|
2007-12-19 23:12:39 +00:00
|
|
|
$page->{'settings'}->{'locale'} = $userinfo->{'locale'};
|
|
|
|
$page->{'settings'}->{'pagesize'} = $userinfo->{'pagesize'};
|
|
|
|
$page->{'settings'}->{'cortado'} = $userinfo->{'cortado'}
|
2007-10-27 11:59:23 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
$page->{'message'}->{'type'} = "error";
|
|
|
|
$page->{'message'}->{'text'} = "error_202c";
|
|
|
|
}
|
|
|
|
|
2007-12-17 18:55:33 +00:00
|
|
|
print output_page();
|