uid(); $isadmin = ISADMIN(); if (! $isadmin) { USERERROR("Only testbed administrators people can access this page!", 1); } echo "

Approve local accounts on specific widearea nodes

You have the following choices for Action:

Postpone Do nothing; application remains, pending a decision.
Deny Deny user application and so notify the user.
Nuke Nuke user application. Kills user account, without notice to user. Useful for bogus applications.
Approve Approve the user

You have the following choices for Trust:

User User may log into the node
Root User gets local root on the node


\n"; # # Find all of the unapproved widearea account requests. # $query_result = DBQueryFatal("select w.* from widearea_accounts as w ". "left join users as u on u.uid_idx=w.uid_idx ". "WHERE u.status!='" . TBDB_USERSTATUS_UNVERIFIED . "' and ". "u.status!='" . TBDB_USERSTATUS_NEWUSER . "' and ". "w.trust='" . TBDB_TRUSTSTRING_NONE . "'"); if (mysql_num_rows($query_result) == 0) { USERERROR("There are no new accounts that need approval.", 1); } # # Now build a table with a bunch of selections. The thing to note about the # form inside this table is that the selection fields are constructed with # name= on the fly, from the uid of the user to be approved. In other words: # # uid menu node_id # name=stoller$$approval-wa33 value=approved,denied,postpone # name=stoller$$trust-wa33 value=user,local_root # # so that we can go through the entire list of post variables, looking # for these. The alternative is to work backwards, and I do not like that. # echo "\n"; echo "\n"; echo "\n"; while ($usersrow = mysql_fetch_array($query_result)) { $newuid = $usersrow["uid"]; $node_id = $usersrow["node_id"]; $date_applied = $usersrow["date_applied"]; # # Cause this field was added late and might be null. # if (! $date_applied) { $date_applied = "--"; } if (! ($user = User::Lookup($newuid))) { TBERROR("Could not lookup user $uid_idx", 1); } $name = $user->name(); $email = $user->email(); $title = $user->title(); $affil = $user->affil(); $addr = $user->addr(); $addr2 = $user->addr2(); $city = $user->city(); $state = $user->state(); $zip = $user->zip(); $country = $user->country(); $phone = $user->phone(); echo "\n"; echo " \n"; echo "\n"; } echo "
User Node ID Date
Applied
Action Trust Name Title Affil E-mail Phone
Address
$newuid $node_id $date_applied  $name   $title   $affil   $email   $phone 
 $addr "; if (strcmp($addr2,"")) { echo " $addr2 "; } echo "  $city   $state   $zip   $country 
\n"; # # Standard Testbed Footer # PAGEFOOTER(); ?>