<commit_before><div class='helptip' id='helptip' style="display:none;">
	<a class='label label-primary'>E</a> Edit /
	<a class='label label-danger'>X</a> Delete /
</div>
<div class="col-md-12">
	<table class="table table-striped">
		<thead>
			<tr>
                <th>Staff ID</th>
                <th>Staff Name</th>
                <th>User Name</th>
                <th>Role</th>
                <th>Phone Number</th>
                <th>Email</th>
                <th>
					Operation <a onclick="$('#helptip').toggle()" class="glyphicon glyphicon-question-sign icona"></a>
				</th>
              </tr>
        </thead>
		<tbody>
			<?php
				$sql_stf = "SELECT u.id,CONCAT(fname,' ',lname) AS realname,username,tel,email,r.name AS role FROM user AS u INNER JOIN role AS r ON u.role_id=r.id";
				$res_stf = $mysql->query($sql_stf);
				while($row_stf = $mysql->fetch($res_stf)){
					echo "<tr>
						<td>".$row_stf['id']."</td>
						<td>".$row_stf['realname']."</td>
						<td>".$row_stf['username']."</td>
						<td>".$row_stf['role']."</td>
						<td>".$row_stf['tel']."</td>
						<td>".$row_stf['email']."</td>
						<td>				
							<a class='label label-danger' onclick=\"if(confirm('Do you want to delete the user?')){location.href='index.php?page=staff&action=all&del=".$row_stf['id']."'}\">X</a>
						</td>
					</tr>";
				}	
			?>
        </tbody>
    </table>
</div>
<?php
	if(isset($_GET['del'])){
		$deluserid = inputCheck($_GET['del']);
		$sql_deluser = "DELETE FROM user WHERE id = '$deluserid'";
		$mysql->query($sql_deluser);
		redirect('index.php?page=staff&action=all','Delete user successfully!');
	}
?><commit_msg>commit staff_all page<commit_after><div class='helptip' id='helptip' style="display:none;">
	<a class='label label-primary'>E</a> Edit /
	<a class='label label-danger'>X</a> Delete /
</div>
<div class="col-md-12">
	<table class="table table-striped">
		<thead>
			<tr>
                <th>Staff ID</th>
                <th>Staff Name</th>
                <th>User Name</th>
                <th>Role</th>
                <th>Phone Number</th>
                <th>Email</th>
                <th>
					Operation <a onclick="$('#helptip').toggle()" class="glyphicon glyphicon-question-sign icona"></a>
				</th>
              </tr>
        </thead>
		<tbody>
			<?php // select staff infotmation from user and use while loop
				$sql_stf = "SELECT u.id,CONCAT(fname,' ',lname) AS realname,username,tel,email,r.name AS role FROM user AS u INNER JOIN role AS r ON u.role_id=r.id";
				$res_stf = $mysql->query($sql_stf);
				while($row_stf = $mysql->fetch($res_stf)){
					echo "<tr>
						<td>".$row_stf['id']."</td>
						<td>".$row_stf['realname']."</td>
						<td>".$row_stf['username']."</td>
						<td>".$row_stf['role']."</td>
						<td>".$row_stf['tel']."</td>
						<td>".$row_stf['email']."</td>
						<td>				
							<a class='label label-danger' onclick=\"if(confirm('Do you want to delete the user?')){location.href='index.php?page=staff&action=all&del=".$row_stf['id']."'}\">X</a>
						</td>
					</tr>";
				}	
			?>
        </tbody>
    </table>
</div>
<?php // delete the sfaff
	if(isset($_GET['del'])){
		$deluserid = inputCheck($_GET['del']);
		$sql_deluser = "DELETE FROM user WHERE id = '$deluserid'";
		$mysql->query($sql_deluser);
		redirect('index.php?page=staff&action=all','Delete user successfully!');
	}
?>
{'fraction_non_alphanumeric': 0.22116809961458642, 'fraction_numerical': 0.0011858879335902757, 'mean_word_length': 2.7117711771177118, 'pattern_counts': {'":': 0, '<': 107, '<?xml version=': 0, '>': 113, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4692853', 'n_tokens_mistral': 1451, 'n_tokens_neox': 1242, 'n_words': 222}