$atmail->Language = $pref['Language']; } // Print the error screen if the account has auth errors, or session timeout. if ($atmail->status == 1) { $atmail->auth_error(); } if ($atmail->status == 2) { $atmail->session_error(); } $atmail->httpheaders(); // Load the account preferences $atmail->loadprefs(); // Parse the users custom stylesheet $var['atmailstyle'] = $atmail->parse("html/{$atmail->Language}/{$atmail->LoginType}/atmailstyle.css"); $var['mailstyle'] = $atmail->parse("html/{$atmail->Language}/{$atmail->LoginType}/atmailstyle-mail.css"); $var['folder'] = $atmail->escape_html($_REQUEST['Folder'], false); $var['newfolder'] = $atmail->escape_html(urldecode($_REQUEST['NewFolder']), false); $var['acc'] = $acc; if ($_REQUEST['sort']) { $var['sort'] = $_REQUEST['sort']; } elseif ($atmail->MboxOrder) { $var['sort'] = $atmail->MboxOrder; } else { $var['sort'] = 'id'; } $var['order'] = $_REQUEST['order'] ? $_REQUEST['order'] : ''; $var['order'] = Filter::stringMatch($var['order'], array('desc', 'asc')); $var['flag'] = $_REQUEST['Flag']; $var['XML'] = $_REQUEST['XML']; $var['suffix'] = '_ajax'; // Make sure we are ordering the query with an allowed field