<?php
if (!$prefs->isLocked('default_identity')):
    if (!($identities = @unserialize($prefs->getValue('identities'))) || count($identities) == 0) {
        $identities = array();
        $identities[0] = array('id' => _("Default Identity"));
    }

    if (($default_identity = $prefs->getValue('default_identity')) == null ||
        !isset($identities[$default_identity])) {
        $default_identity = 0;
    }
?>

<?php echo _("Your default identity:") ?><br />
<select name="default_identity" class="fixed">
<?php for ($i = 0; $i < count($identities); $i++): ?>
    <option value="<?php echo $i ?>"<?php if ($i == $default_identity) echo ' selected="selected"'; ?>><?php echo $identities[$i]['id'] ?></option>
<?php endfor; ?>
</select><br /><br />
<?php endif; ?>
