Location: PHPKode > projects > WebAddressBook > webaddressbook/db_change_language.php
<?

session_start();
if(isset($_SESSION['username']))
{
    include('smarty_init.inc.php');
    include('language.inc.php');
    include('header.inc.php');
    include('db_functions.inc.php');
    include('footer.inc.php');

    $success = db_change_useroption($_SESSION['uid'], "language", $_POST['lang']);

    $smarty->assign("message", $lang['lang_changed']);
    if($success) {
        $smarty->assign("result", $lang['done']);
        $_SESSION['language'] = $_POST['lang'];
    } else {
        $smarty->assign("result", $lang['failed']);
    }

    $smarty->display('result_page.tpl');
}
else
{
    include('unauthorized.inc.php');
}

?>
Return current item: WebAddressBook