Esempio n. 1
0
                }
                dump_gs($rs2, $auth_count, 2, $gender, $rs->fields("first_name"), $rs->fields("last_name"), $username, $password);
                inc_auth_count($id);
            } else {
                if ($user_type == 'a') {
                    // XXX look only for active groups here ...
                    $sql = "select * from groups where true order by name";
                    $rs2 = $db->Execute($sql);
                    if (!$rs2) {
                        auth_sqlfail($db, $sql);
                    }
                    if ($rs2->RecordCount() < 1) {
                        auth_fail("There are currently no groups defined.");
                    }
                    dump_gs($rs2, $auth_count, 1, $gender, $rs->fields("first_name"), $rs->fields("last_name"), $username, $password);
                    inc_auth_count($id);
                } else {
                    auth_fail("Garbled DB record: id={$id} user_type={$user_type}");
                }
            }
        }
    }
} else {
    if ($action == "gamesave") {
        // XXX I believe this code path to be defunct and untraversed as of 28 SEP 2012 - jh
        // XXX indications are that only gamesave2 is ever called (below)
        // XXX
        // get user id
        $username = rt("username");
        if ($username == "") {
            auth_fail("Username not provided");
Esempio n. 2
0
                }
                dump_gs($rs2, $auth_count, 2, $gender, $rs->fields("first_name"), $rs->fields("last_name"), $username, $password);
                inc_auth_count($id, $tc);
            } else {
                if ($user_type == 'a') {
                    // XXX look only for active groups here ...
                    $sql = "select * from groups where true order by name";
                    $rs2 = $db->Execute($sql);
                    if (!$rs2) {
                        auth_sqlfail($db, $sql);
                    }
                    if ($rs2->RecordCount() < 1) {
                        auth_fail("There are currently no groups defined.");
                    }
                    dump_gs($rs2, $auth_count, 1, $gender, $rs->fields("first_name"), $rs->fields("last_name"), $username, $password);
                    inc_auth_count($id, $tc);
                } else {
                    auth_fail("Garbled DB record: id={$id} user_type={$user_type}");
                }
            }
        }
    }
} else {
    if ($action == "gamesave") {
        // XXX I believe this code path to be defunct and untraversed as of 28 SEP 2012 - jh
        // XXX indications are that only gamesave2 is ever called (below)
        // XXX
        // get user id
        $username = rt("username");
        if ($username == "") {
            auth_fail("Username not provided");