Warning: Cannot modify header information - headers already sent by (output started at /home/destefa1/public_html/nf/function.php:1) in /home/destefa1/public_html/nf/function.php on line 215
Warning: Cannot modify header information - headers already sent by (output started at /home/destefa1/public_html/nf/function.php:1) in /home/destefa1/public_html/nf/function.php on line 216
Warning: Cannot modify header information - headers already sent by (output started at /home/destefa1/public_html/nf/function.php:1) in /home/destefa1/public_html/nf/function.php on line 217
Warning: Cannot modify header information - headers already sent by (output started at /home/destefa1/public_html/nf/function.php:1) in /home/destefa1/public_html/nf/function.php on line 218
Warning: Cannot modify header information - headers already sent by (output started at /home/destefa1/public_html/nf/function.php:1) in /home/destefa1/public_html/nf/function.php on line 219
Warning: Cannot modify header information - headers already sent by (output started at /home/destefa1/public_html/nf/function.php:1) in /home/destefa1/public_html/nf/function.php on line 220
Gagal: Mohon mengisi semua input.";
} else if ($post_level != "Member" AND $post_level != "Reseller" AND $post_level != "Admin" AND $post_level != "Agen") {
$msg_type = "error";
$msg_content = "Gagal: Input tidak sesuai.";
} else if (mysqli_num_rows($checkdb_user) > 0) {
$msg_type = "error";
$msg_content = "Gagal: Username $post_username sudah terdaftar dalam database.";
} else {
$post_api = random(20);
$insert_user = mysqli_query($db, "INSERT INTO users (username, password, balance, level, registered, status, api_key, email, uplink) VALUES ('$post_username', '$post_password', '$post_balance', '$post_level', '$date', 'Active', '$post_api', '$post_email', '$sess_username')");
if ($insert_user == TRUE) {
$msg_type = "success";
$msg_content = "Berhasil: Pengguna berhasil ditambahkan.
Username: $post_username
Password: $post_password
Level: $post_level
Saldo: Rp ".number_format($post_balance,0,',','.');
} else {
$msg_type = "error";
$msg_content = "Gagal: Error system.";
}
}
}
include("../../lib/headeradmin.php");
?>