Beispiel #1
0
function drawStaffRow($r, $searchterms = false)
{
    global $isAdmin, $locale;
    if ($searchterms) {
        global $fields;
        foreach ($fields as $f) {
            if (isset($r[$f])) {
                $r[$f] = format_hilite($r[$f], $searchterms);
            }
        }
    }
    $return = '<tr height="38">';
    $return .= '<td class="image"><a href="/staff/view.php?id=' . $r["userID"] . '">' . drawImg($r["userID"]) . '</a></td>';
    $return .= '<td><nobr><a href="view.php?id=' . $r["userID"] . '">' . $r["lastname"] . ', ' . $r["firstname"] . '</a>';
    //if (!$r["isMain"]) $return .= "<br>" . $r["office"];
    $return .= '</nobr></td><td>';
    if ($r["title"]) {
        $return .= $r["title"] . '<br>';
    }
    if ($r["departmentName"]) {
        $return .= '<i>' . $r["departmentName"] . '</i><br>';
    }
    if ($r["corporationName"]) {
        $return .= '<a href="/staff/organizations.php?id=' . $r["corporationID"] . '">' . $r["corporationName"] . '</a>';
    }
    $return .= '</td>
		<td class="r"><nobr>' . format_phone($r["phone"]) . '</nobr></td>
		';
    if ($isAdmin) {
        $return .= '<td class="delete"><a href="javascript:promptRedirect(\'' . url_query_add(array("action" => "delete", "staffID" => $r["userID"]), false) . '\', \'Delete this staff member?\');"><i class="glyphicon glyphicon-remove"></i></a></td>';
    }
    return $return . '</tr>';
}
Beispiel #2
0
<table class="left" cellspacing="1">
	<?php 
echo drawHeaderRow("Goings", 4);
?>
	<tr>
		<th width="47"></th>
		<th width="25%" align="left">Name</th>
		<th width="50%" align="left">Title, Department</th>
		<th width="20%" align="right">Last Day</th>
	</tr>
	<?php 
while ($r = db_fetch($result)) {
    ?>
	<tr bgcolor="#FFFFFF" class="helptext" valign="top" height="38">
		<td><?php 
    echo drawImg($r['userID']);
    ?>
</td>
		<td><a href="/staff/view.php?id=<?php 
    echo $r["userID"];
    ?>
"><?php 
    echo $r["first"];
    ?>
 <?php 
    echo $r["last"];
    ?>
</a></td>
		<td><?php 
    echo $r["title"];
    ?>
Beispiel #3
0
function drawName($userID, $name, $date = false, $withtime = false, $separator = "<br>")
{
    global $_josh, $locale;
    $date = $date ? format_date_time($date, "", $separator) : false;
    return '
		<div class="user">
			<a href="http://' . $_josh["request"]["host"] . '/staff/view.php?id=' . $userID . '">' . drawImg($userID) . format_string($name, 20) . '</a>' . $date . '
		</div>';
}
Beispiel #4
0
<?php

include '../include.php';
drawTop();
?>
<table class="left" cellspacing="1">
	<?php 
echo drawHeaderRow("Former Staff", 5);
?>
	<?php 
$staff = db_query("SELECT \n\t\t\t\t\t\t\tu.userID, \n\t\t\t\t\t\t\tu.lastname,\n\t\t\t\t\t\t\tISNULL(u.nickname, u.firstname) firstname, \n\t\t\t\t\t\t\tu.bio, \n\t\t\t\t\t\t\tu.phone, \n\t\t\t\t\t\t\tf.name office, \n\t\t\t\t\t\t\tu.title, \n\t\t\t\t\t\t\td.departmentName\n\t\t\t\t\t\tFROM intranet_users u\n\t\t\t\t\t\tLEFT  JOIN intranet_departments d ON d.departmentID = u.departmentID \n\t\t\t\t\t\tLEFT  JOIN intranet_offices f     ON f.id = u.officeID\n\t\t\t\t\t\tWHERE u.isactive = 0\n\t\t\t\t\t\tORDER BY u.lastname, ISNULL(u.nickname, u.firstname)");
while ($s = db_fetch($staff)) {
    ?>
	<tr height="38">
		<td><?php 
    echo drawImg($staff['userID']);
    ?>
</td>
		<td><nobr><a href="view.php?id=<?php 
    echo $s["userID"];
    ?>
"><?php 
    echo $s["lastname"];
    ?>
, <?php 
    echo $s["firstname"];
    ?>
</a></nobr></td>
		<td><?php 
    echo $s["title"];
    ?>
Beispiel #5
0
		<th align="left">Phone</th>
	<?php 
if ($isAdmin) {
    ?>
		<th></th>
	<?php 
}
?>
	</tr>
	<?php 
$result = db_query("SELECT \n\t\t\t\t\t\t\tu.userID, \n\t\t\t\t\t\t\tu.lastname,\n\t\t\t\t\t\t\tISNULL(u.nickname, u.firstname) firstname, \n\t\t\t\t\t\t\tu.bio, \n\t\t\t\t\t\t\tu.phone, \n\t\t\t\t\t\t\tf.name office, \n\t\t\t\t\t\t\tu.title, \n\t\t\t\t\t\t\td.departmentName,\n\t\t\t\t\t\t\tr.isPayroll\n\t\t\t\t\t\tFROM intranet_users u\n\t\t\t\t\t\tJOIN intranet_ranks r ON u.rankID = r.id\n\t\t\t\t\t\tLEFT  JOIN intranet_departments d ON d.departmentID = u.departmentID \n\t\t\t\t\t\tLEFT  JOIN intranet_offices f     ON f.id = u.officeID\n\t\t\t\t\t\tLEFT  JOIN intranet_images m      ON u.imageID = m.imageID\n\t\t\t\t\t\tWHERE u.isActive = 1 AND r.isPayroll = 0\n\t\t\t\t\t\tORDER BY u.lastname, ISNULL(u.nickname, u.firstname)");
while ($r = db_fetch($result)) {
    ?>
	<tr height="38">
		<td><?php 
    echo drawImg($r['imageID']);
    ?>
</td>
		<td><nobr><a href="view.php?id=<?php 
    echo $r["userID"];
    ?>
"><?php 
    echo $r["lastname"];
    ?>
, <?php 
    echo $r["firstname"];
    ?>
</a></nobr></td>
		<td><?php 
    echo $r["title"];
    ?>
Beispiel #6
0
		<td width="99%" class="big"><?php 
echo $r["firstname"];
?>
 <?php 
if ($r["nickname"]) {
    ?>
(<?php 
    echo $r["nickname"];
    ?>
) <?php 
}
echo $r["lastname"];
?>
</td>
		<td rowspan="8" class="profile_image"><?php 
echo drawImg($_GET['id']);
?>
</td>
	</tr>
	<tr>
		<td class="left">Organization</td>
		<td><?php 
echo $r["corporationName"];
?>
</td>
	</tr>
	<tr>
		<td class="left">Title</td>
		<td><?php 
echo $r["title"];
?>