Beispiel #1
0
    $obj->assocSite = strtolower($_REQUEST['addclassid']);
    $obj->type = 'class';
    $obj->uploadlimit = 'NULL';
    $obj->insertDB();
    //db_query($query);
}
/******************************************************************************
 * Delete Associated Site:
 ******************************************************************************/
if ($_REQUEST['action'] == "deletesite" && $_REQUEST['delstudentsite']) {
    $slot_name = $_REQUEST['delstudentsite'];
    $id = db_get_value("slot", "slot_id", "slot_name='" . addslashes($slot_name) . "'");
    if ($id > 0) {
        // delete a slot
        $slotObj = new slot("", "", "", "", $id);
        $slotObj->delete();
    }
}
/******************************************************************************
 * Add student to a class site
 ******************************************************************************/
if ($_REQUEST['action'] == "add" && $_REQUEST['addstudent']) {
    // make sure the user is in the db
    $valid = 0;
    foreach ($_auth_mods as $_auth) {
        $func = "_valid_" . $_auth;
        //		print "<br />AUTH: trying ".$_auth ."..."; //debug
        if ($x = $func($_REQUEST['addstudent'], "", 1)) {
            $valid = 1;
            break;
        }