connect(DB_HOST, DB_USER, DB_PASS); $DBO->useDB(DB_NAME); } function redirect($url) { header("Location: ".$url); exit(); } function randomCharString($num) { $chars = range("a", "z"); $chars = array_merge($chars, range("A", "Z")); $chars = array_merge($chars, range(0, 9)); while($num--) { $str.= $chars[rand(0, count($chars))]; } return $str; } function passwordHash($str) { if(defined(PASSWORD_SALT)) { $str = PASSWORD_SALT.$str; } return sha1($str); } function approve_select($id, $selected) { $out .= ''; return $out; } ?>