Location: PHPKode > projects > Employee Scheduling System > essv1-2/myEmps.php
<?php require_once('common.php'); 
// $Id: myEmps.php,v 1.4 2005/01/29 10:50:51 atrommer Exp $
checkUser($_SESSION['USERTYPE'], 2);

$aEmployees = getMyEmployees($_SESSION['USERID']);

doHeader("My Employees");
?>
<a href="newUser.php">Add new employee?</a><br>
<?	
if (!count($aEmployees)){ // we have no coworkers
	print "<br><i>You currently have no employees assigned to you!</i><br>";
} else {
foreach($aEmployees as $emp){ 

$aPhone1 = formatPhoneNum($emp->user_phone1);
$aPhone2 = formatPhoneNum($emp->user_phone2);

?>
<hr align="left">
<table width="100%" border="0" cellpadding="2" class="contactInfo">
      <tr>
        <td class="contactInfoName"><?="$emp->user_first  $emp->user_last" ?></td>
		<td align="right"><a href="editUser.php?u_id=<?=$emp->user_id?>&action=edit">Edit?</a>
		<a href="editUser.php?u_id=<?=$emp->user_id?>&action=del">Delete?</a>
		<a href="viewSched.php?user=<?=$emp->user_id?>">View Availibility?</a>
		<a href="assumeUser.php?user=<?=$emp->user_id?>">Assume User?</a>
		</td>
      </tr>
      <tr>
        <td width="31%"><?=$emp->user_name?>
        <div align="left"></div></td>
        <td width="69%"><div align="left"><a href="mailto:<?=$emp->user_email?>">
        <?=$emp->user_email?>
        </a></div></td>
      </tr>
      <tr>
        <td><? print ("($aPhone1[0]) $aPhone1[1]-$aPhone1[2]"); ?>
        <div align="left"></div></td>
        <td><? strlen($aPhone2[0])?print("($aPhone2[0]) $aPhone2[1]-$aPhone2[2]"):print""; ?>
        <div align="left"></div></td>
      </tr>
</table>
<?	} 
}?>



<?
doFooter();
?>
Return current item: Employee Scheduling System