} // 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']); // Delete the file unlink(THpath . 'unlinked/' . $_GET['username'] . '.' . $desired_picture); // Clear the db record $profile_dbi->approvalaction($_GET['username'], "picture", false); } $users = $profile_dbi->getprofilemodqueue(); if ($users != null) { $pend_regs = array(); $pend_caps = array(); $pend_pics = array(); foreach ($users as $user) { if ($user['approved'] == 0) { $pend_regs[] = array("username" => $user['username'], "email" => $user['email']); } if ($user['proposed_capcode']) { $pend_caps[] = array("username" => $user['username'], "proposed_capcode" => $user['proposed_capcode']); } if ($user['pic_pending']) { $pend_pics[] = array("username" => $user['username'], "pic_pending" => $user['pic_pending']); } }