/*
   This JavaScript code was generated by Jemplate, the JavaScript
   Template Toolkit. Any changes made to this file will be lost the next
   time the templates are compiled.

   Copyright 2006 - Ingy döt Net - All rights reserved.
*/

if (typeof(Jemplate) == 'undefined')
    throw('Jemplate.js must be loaded before any Jemplate template files');

Jemplate.templateMap['logged_in_as.tt'] = function(context) {
    if (! context) throw('Jemplate function called without context\n');
    var stash = context.stash;
    var output = '';

    try {
output += '<h3>Login</h3>\n<p class="logged_in_as">\n';
//line 7 "logged_in_as.tt"
if (stash.get('user_id') != 0) {
output += '\nLogged in as ';
//line 4 "logged_in_as.tt"

// FILTER
output += (function() {
    var output = '';

output += stash.get('fullname');

    return context.filter(output, 'html', []);
})();

output += ' (';
//line 4 "logged_in_as.tt"

// FILTER
output += (function() {
    var output = '';

output += stash.get('user_id');

    return context.filter(output, 'html', []);
})();

output += ').\n';
}
else {
output += '\nNot logged in. <a href="';
//line 6 "logged_in_as.tt"
output += stash.get('login_uri');
output += '">Log in</a>.\n';
}

output += '\n</p>\n\n';
    }
    catch(e) {
        var error = context.set_error(e, output);
        throw(error);
    }

    return output;
}

