<?php
if (Session::has("username")){
	echo "Welcome " . Session::get("username");
}else{
	echo "<meta http-equiv='REFRESH'
	content = '3; url=pagelogin'>";
	die("You need to login first");
}

if (Session::get("userlevel") != 0)
	die("Only admin can access this page");

?>

<h1>ADD USER</h1>
<form method='POST' action='insertuser'>
<?php echo csrf_field(); ?>
Username: <input type='text' name='username' value=''><br>
Password: <input type='password' name='password' value=''><br>
Fullname: <input type='text' name='fullname' value=''><br>
Userlevel (0=admin, 1=user): <input type='number' name='userlevel' value=''><br>
<input type='submit' name='btnSubmit' value='Add'><br>
</form><?php /**PATH C:\xampp\htdocs\laravel8\resources\views/manageuser/adduser.blade.php ENDPATH**/ ?>