sendDenial($_GET['username'], $email); } } if (isset($_GET['action']) && $_GET['action'] == "capyes" && isset($_GET['username'])) { // Approve a proposed capcode // This abstracts the rest of the DB queries for us $profile_dbi->approvalaction($_GET['username'], "capcode", true); } if (isset($_GET['action']) && $_GET['action'] == "capno" && isset($_GET['username'])) { //this capcode isn't going to work for whatever reason, deny it $profile_dbi->approvalaction($_GET['username'], "capcode", false); } if (isset($_GET['action']) && $_GET['action'] == "picyes" && isset($_GET['username'])) { // Approving a requested picture // Get the file extension of the current picture (if any) $old_picture = $profile_dbi->getuserimage($_GET['username']); // Get the file extension of the wanted picture $desired_picture = $profile_dbi->getpendinguserimage($_GET['username']); // Delete the old picture, if there is one if ($old_picture) { unlink(THpath . 'images/profiles/' . $_GET['username'] . '.' . $old_picture); } // Move the new picture into the profiles directory rename(THpath . 'unlinked/' . $_GET['username'] . '.' . $desired_picture, THpath . 'images/profiles/' . $_GET['username'] . '.' . $desired_picture); // Update the db to reflect this $profile_dbi->approvalaction($_GET['username'], "picture", true); } if (isset($_GET['action']) && $_GET['action'] == "picno" && isset($_GET['username'])) { // Denying a requested picture // Get the file extension of the wanted picture $desired_picture = $profile_dbi->getpendinguserimage($_GET['username']);