예제 #1
0
        }
        if ($_POST['email']) {
            $email = $_POST['email'];
        }
        if ($_POST['password']) {
            $password = hash('md4', $_POST['password']);
        }
        $dbh = Connection::cal_rw();
        $obj_assignee = new calendarConfig();
        $obj_assignee->editUserDetails($dbh, $user_id, $username, $name, $email, $password);
    }
    if ($action == "deleteuser") {
        $user_id = $_POST['user_id'];
        $dbh = Connection::cal_rw();
        $obj_assignee = new calendarConfig();
        $obj_assignee->deleteUser($dbh, $user_id);
    }
    ?>
<table  width =500px; height= 150px;>
<tr><td>
<a href="#" onclick="document.getElementById('hiddenForm').style.display = 'block';document.getElementById('hiddenForm2').style.display = 'none';document.getElementById('hiddenForm3').style.display = 'none'; return false;">Add new user</a>/
<a href="#" onclick="document.getElementById('hiddenForm2').style.display = 'block';document.getElementById('hiddenForm').style.display = 'none';document.getElementById('hiddenForm3').style.display = 'none'; return false;">Edit existing user details</a>
/<a href="#" onclick="document.getElementById('hiddenForm3').style.display = 'block';document.getElementById('hiddenForm2').style.display = 'none';document.getElementById('hiddenForm').style.display = 'none'; return false;">Delete an user</a>
    <form action="user_mgmt.php?action=adduser" method="post" id="hiddenForm" style="display: none;">
    <table border=2px;>
	<tr><td><b>Add New User:</b></td></tr>
         <tr><td width=200px;>Username:</td><td><input type="text" name="username"/></td></tr><br/>
         <tr><td>Name:</td><td><input type="text" name="name"/></td></tr><br/>
         <tr><td>Email ID:</td><td><input type="text" name="email"/></td></tr><br/>
	 <tr><td>Password:</td><td><input type="text" name="password" /></td></tr><br/> 
         </table>