// Preamble $pageName = "Admin - Add User"; $focused = "home"; // Dock icon name to gets a border $need = 'auth'; require("../parts/preamble.php"); // Load most of document ?> if ($u_username) { need('sql'); $u_username = AddSlashes($u_username); $u_fullname = AddSlashes($u_fullname); $u_email = AddSlashes($u_email); $u_password = AddSlashes($u_password); $u_addr1 = AddSlashes($u_addr1); $u_phone = AddSlashes($u_phone); $u_addr2 = AddSlashes($u_addr2); $u_country = AddSlashes($u_country); $u_admin = ($u_admin) ? 'Y' : 'N'; $conn = mysql_connect (sqlHost, sqlUser, sqlPass); if ($conn) { $query1 = 'INSERT into members (u_username, u_fullname, u_email, u_password, u_addr1, u_phone, u_addr2, u_country, u_admin) VALUES (' . " '$u_username', '$u_fullname', '$u_email', ENCRYPT('$u_password', '$u_username'), '$u_addr1', '$u_phone', '$u_addr2', '$u_country', '$u_admin')"; $result = mysql_db_query (sqlDB, $query1, $conn); if ($result) { $numRows = mysql_affected_rows ($conn); if ($numRows) { echo '
User added to members dbase successfully.'; } else { echo '
There was an error in your input. The error was ' . mysql_error ($conn); } } else { echo '
There was an error in your input. The error was ' . mysql_error ($conn); } $query2 = 'INSERT into devel_plans (p_user, p_date, p_plan) VALUES (' . "'$u_username', NOW(), 'None')"; $result = mysql_db_query (sqlDB, $query2, $conn); if ($result) { $numRows = mysql_affected_rows ($conn); if ($numRows) { echo '
User added to plan dbase successfully.'; } else { echo '
There was an error in your input. The error was ' . mysql_error ($conn); } } else { echo '
There was an error in your input. The error was ' . mysql_error ($conn); } mysql_close ($conn); } else { echo 'You suck, butthead.'; } } else { ?>
} ?> require (siteHome ."/parts/postamble.php"); // Finish this sucker up ?>