예제 #1
0
function show_profile_form($profile, $warning = null)
{
    if ($profile) {
        page_head(tra("Edit your profile"), null, null, null, IE_COMPAT_MODE);
    } else {
        page_head(tra("Create a profile"), null, null, null, IE_COMPAT_MODE);
    }
    if ($warning) {
        echo "<span class=error>{$warning}</span><p>\n        ";
    }
    echo "\n        <form action=", $_SERVER['PHP_SELF'], " method=\"POST\", ENCTYPE=\"multipart/form-data\">\n    ";
    start_table_noborder();
    show_description();
    show_questions($profile);
    show_picture_option($profile);
    show_submit();
    end_table();
    echo "</form>";
    page_tail();
}
예제 #2
0
function show_profile_form($profile, $warning = null)
{
    if ($profile) {
        page_head(tra("Edit your profile"), null, null, null, recaptcha_get_head_extra());
    } else {
        page_head(tra("Create a profile"), null, null, null, recaptcha_get_head_extra());
    }
    if ($warning) {
        echo "<p class=\"text-danger\">{$warning}</p>\n        ";
    }
    echo "\n        <form action=", $_SERVER['PHP_SELF'], " method=\"POST\", ENCTYPE=\"multipart/form-data\">\n    ";
    start_table_noborder();
    show_description();
    show_questions($profile);
    show_picture_option($profile);
    show_submit();
    end_table();
    echo "</form>";
    page_tail();
}
예제 #3
0
            continue;
        }
        $user = $snap->users[$q->user_id];
        echo "<tr>\n\t\t\t<td>" . time_str($q->create_time) . "</td>\n\t\t\t<td><a href=student>{$user->name}</td>\n\t\t\t<td>{$q->question}</td>\n\t\t\t</tr>\n\t\t";
    }
    end_table();
    admin_page_tail();
}
$course_id = get_int('course_id');
$course = BoltCourse::lookup_id($course_id);
if (!$course) {
    error_page("no course");
}
$top_unit = (require_once $course->doc_file());
$action = get_str('action', true);
switch ($action) {
    case "":
        show_snap_form();
        break;
    case "snap_action":
        snap_action();
        break;
    case "map":
        show_map();
        break;
    case "questions":
        show_questions();
        break;
    default:
        error_page("Unknown action {$action}");
}