read()) { if ($f != "." && $f != "..") { if (is_dir($dirname."/".$f)) { rm_rf($dirname."/".$f); } if (is_file($dirname."/".$f) || is_link($dirname."/".$f)) { unlink($dirname."/".$f); } } } $d->close(); rmdir($dirname); return; } # obtain the uid given a Users.Username # function uid_from_username($username="") { if (!$username) { return ""; } $dbh = db_connect(); $q = "SELECT ID FROM Users WHERE Username = '".mysql_real_escape_string($username) ."'"; $result = db_query($q, $dbh); if (!$result) { return "None"; } $row = mysql_fetch_row($result); return $row[0]; }