<?php
/**
 * Phoebe pedagogic planner
 *
 * PHP version 5
 *
 * LICENSE: The GNU General Public License (GPL), version 2. See LICENSE.txt
 *
 * Copyright (c) 2006-2008 JISC/HEFCE/University of Oxford
 *
 * @author      David Balch <david.balch@conted.ox.ac.uk>
 * @license     http://opensource.org/licenses/gpl-license.php GPL2
 * @link        http://phoebe-project.conted.ox.ac.uk/
 */

$content['settings'] = 'dbWrite,userAcEdit';
include_once($_SERVER['DOCUMENT_ROOT'].'/inc/core.php');
include_once($_SERVER['DOCUMENT_ROOT'].'/inc/session.php');
include_once($_SERVER['DOCUMENT_ROOT'].'/inc/user.php');

// Construct page
$content['windowTitle'] = 'Your account | Phoebe';
$content['main'] = '<h1 id="mainTitle"><a href="/" class="titleLink">Phoebe</a></h1>';
$content['main'] .= $topNav;
$content['main'] .= '<p id="quickDesc">Edit your account details here.</p>';

$content['main'] .= '<form action="">';

$content['main'] .= '<fieldset><legend>Contact details</legend>';
$content['main'] .= '<table class="setWidth">';
$content['main'] .= ' <tr><th>Fullname</th><td><span class="user editable" id="fullname">'.$user['fullname']."</span></td></tr>\n";
$content['main'] .= ' <tr><th>Nickname</th><td><span class="user editable" id="nickname">'.$user['nickname']."</span></td></tr>\n";
$content['main'] .= ' <tr><th>Email address</th><td><span class="user editable" id="email">'.$user['email']."</span></td></tr>\n";
$content['main'] .= ' <tr><th>Website</th><td><span class="user editable" id="website">'.$user['website']."</span></td></tr>\n";
$content['main'] .= '</table>';
$content['main'] .= '</fieldset>';

$content['main'] .= '<fieldset><legend>Preferences</legend>';
$content['main'] .= '<table class="setWidth2">';
$content['main'] .= ' <tr><th>Show the introductory <i><a href="startEditing.php">Design editing in Phoebe</a></i> page</th>';
$content['main'] .= '  <td><input type="checkbox" name="pref_show_des_start_page" id="pref_show_des_start_page" onclick="setPref(this);"';
if ($user['pref_show_des_start_page']) {
    $content['main'] .= ' checked="checked"';
}
$content['main'] .= '/>'."</td></tr>\n";
$content['main'] .= '</table>';
$content['main'] .= '</fieldset>';

$content['main'] .= '</form>';

// Write via template
include_once($CNF->template);
?>