예제 #1
0
function _tryNewList($opt, $listtype)
{
    global $Conf, $ConfSiteSuffix, $Me;
    if ($listtype == "u" && $Me->privChair) {
        $searchtype = defval($opt, "t") === "all" ? "all" : "pc";
        $q = "select email from ContactInfo";
        if ($searchtype == "pc") {
            $q .= " where (roles&" . Contact::ROLE_PC . ")!=0";
        }
        $result = $Conf->qx("{$q} order by lastName, firstName, email");
        $a = array();
        while ($row = edb_row($result)) {
            $a[] = $row[0];
        }
        $a["description"] = $searchtype == "pc" ? "Program committee" : "Users";
        $a["listid"] = "u:" . $searchtype . "::";
        $a["url"] = "users{$ConfSiteSuffix}?t=" . $searchtype;
        return $a;
    } else {
        require_once "search.inc";
        $search = new PaperSearch($Me, $opt);
        return $search->sessionList();
    }
}