}
    echo "</table>\n";
}
echo "<br/><br/>Create a new record:&nbsp;<a class='new' href='" . $_SERVER['PHP_SELF'] . "?name={$name}&new=1'></a>";
echo "</div>\n";
// display left content panel
echo "<div class='admin-content-edit'>\n";
if ($selectedRecordName) {
    echo "<h2>Edit the following properties for '{$selectedRecordName}' and save</h2>\n";
    echo "<form method='post' action='" . $_SERVER['PHP_SELF'] . "' enctype='multipart/form-data'>";
    // update values
    $index = 0;
    if ($textArray) {
        foreach ($textArray as $textField) {
            echo "<h3>" . $textField[2] . "</h3>\n";
            switch (StructuredFieldValue::getType($textField[2])) {
                case 'text':
                    echo "<input type='text' name='value" . $index++ . "' value='" . restoreValue($textField[3]) . "' width=40></input><br/>\n";
                    break;
                case 'textarea':
                    echo "<textarea name='value" . $index++ . "' rows='15' cols='70'>" . restoreValue($textField[3]) . "</textarea>";
                    break;
            }
        }
    }
    // update assets
    $index = 0;
    if ($assetArray) {
        foreach ($assetArray as $asset) {
            echo "<h3>" . $asset[5] . "</h3>\n";
            echo "enter the title here<br/><input type='text' name='asset{$index}' value='" . displayValue($asset[1]) . "' width=40></input><br/>\n";