2007-10-27 11:59:23 +00:00
|
|
|
require "functions.pl";
|
|
|
|
|
|
|
|
#initialize session data
|
2008-04-15 18:56:13 +00:00
|
|
|
CGI::Session->name($config->{"page_cookie_name"});
|
2007-10-27 11:59:23 +00:00
|
|
|
$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'})
|
|
|
|
{
|
2008-02-14 22:15:38 +00:00
|
|
|
if($query->param('submit'))
|
|
|
|
{
|
2008-04-23 07:08:14 +00:00
|
|
|
$dbh->do(qq{update users set pagesize = ? where id = ?}, undef, $query->param('pagesize'), $userinfo->{'id'} ) or die $dbh->errstr;
|
2008-02-14 22:15:38 +00:00
|
|
|
|
|
|
|
$page->{'message'}->{'type'} = "information";
|
|
|
|
$page->{'message'}->{'text'} = "information_settings_changed";
|
|
|
|
}
|
2007-12-17 12:38:02 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
@userinfo = get_userinfo_from_sid($session->id);
|
|
|
|
|
2007-10-29 15:00:40 +00:00
|
|
|
@page = get_page_array(@userinfo);
|
2008-02-14 22:15:38 +00:00
|
|
|
|
2007-10-29 15:00:40 +00:00
|
|
|
if($userinfo->{'username'})
|
2007-10-27 11:59:23 +00:00
|
|
|
{
|
2008-02-14 22:15:38 +00:00
|
|
|
$page->{'settings'}->{'pagesize'} = $userinfo->{'pagesize'};
|
2007-10-27 11:59:23 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2008-02-14 22:15:38 +00:00
|
|
|
$page->{'message'}->{'type'} = "error";
|
|
|
|
$page->{'message'}->{'text'} = "error_202c";
|
2007-10-27 11:59:23 +00:00
|
|
|
}
|
|
|
|
|
2007-12-17 18:55:33 +00:00
|
|
|
print output_page();
|