read()) { if ($f != '.' && $f != '..') { $fullpath = $path.'/'.$f; if (is_link($fullpath)) continue; elseif (!is_dir($fullpath)) { if (!chmod($fullpath, 0664)) return FALSE; } elseif(!chmod_group($fullpath)) return FALSE; } } $d->close(); if(chmod($path, 0775)) return TRUE; else return FALSE; } # 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]; }