Esempio n. 1
0
function drawStaffList($where, $searchterms = false)
{
    global $isAdmin, $_josh;
    $return = drawJumpToStaff() . '<table class="left" cellspacing="1">';
    if ($isAdmin) {
        $colspan = 5;
        $return .= drawHeaderRow(false, $colspan, "new", "add_edit.php");
    } else {
        $colspan = 4;
        $return .= drawHeaderRow(false, $colspan);
    }
    $return .= '<tr>
		<th class="image"></th>
		<th>Name / Office</th>
		<th>Title / Department</th>
		<th class="r">Phone</th>';
    if ($isAdmin) {
        $return .= '<th></th>';
    }
    $return .= '</tr>';
    $result = db_query("SELECT \n\t\t\tu.userID, \n\t\t\tu.lastname,\n\t\t\tISNULL(u.nickname, u.firstname) firstname, \n\t\t\tu.bio, \n\t\t\tu.phone,\n\t\t\tc.description corporationName,\n\t\t\tu.corporationID,\n\t\t\to.name office, \n\t\t\tu.title, \n\t\t\td.departmentName\n\t\tFROM intranet_users u\n\t\tLEFT JOIN intranet_departments d\tON d.departmentID = u.departmentID \n\t\tLEFT JOIN organizations c\t\t\tON u.corporationID = c.id\n\t\tLEFT JOIN intranet_offices o\t\tON o.id = u.officeID\n\t\tWHERE " . $where . "\n\t\tORDER BY u.lastname, ISNULL(u.nickname, u.firstname)");
    $count = db_found($result);
    if ($count) {
        if ($count == 1 && $searchterms) {
            $r = db_fetch($result);
            $_josh["slow"] = true;
            url_change("view.php?id=" . $r["userID"]);
        } else {
            while ($r = db_fetch($result)) {
                $return .= drawStaffRow($r, $searchterms);
            }
        }
    } else {
        $return .= drawEmptyResult("No staff match those criteria.", $colspan);
    }
    return $return . '</table>';
}
Esempio n. 2
0
            echo $r["id"];
            ?>
"><?php 
            echo format_string($r["headline"], 40);
            ?>
</a></td>
			<td><?php 
            echo $r["outlet"];
            ?>
</td>
			<td><?php 
            echo $r["organization"];
            ?>
</td>
			<td class="r"><?php 
            echo format_date($r["pubdate"], "n/a", "M d, Y", false);
            ?>
</td>
			<?php 
            echo drawdrawColumnDelete("Delete news clip?", $r["id"]);
            ?>
		</tr>
		<?php 
        }
    } else {
        echo drawEmptyResult("No stories in the system yet");
    }
    echo drawTableEnd();
    include "edit.php";
}
echo drawBottom();
Esempio n. 3
0
.</nobr></td>
			<td><?php 
            echo $r["description"];
            ?>
</td>
			<td align="center"><?php 
            echo $r["owner"];
            ?>
</td>
		</tr>
		<?php 
        }
    }
} else {
    echo drawHeaderRow("No Tickets", 1, "new", "#bottom");
    echo drawEmptyResult("There are no open {$deptName} tickets right now!", 4);
}
?>
</table>

<a name="bottom"></a>
<?php 
$form = new intranet_form();
if ($page['is_admin']) {
    $form->addUser("user_id", "Posted By", $_SESSION["user_id"], false);
}
$form->addRow("itext", "Problem", "title", "", "", true);
if ($page['is_admin']) {
    $form->addRow("select", "Priority", "priorityID", "SELECT id, description FROM helpdesk_tickets_priorities", 3);
} else {
    $form->addRow("select", "Priority", "priorityID", "SELECT id, description FROM helpdesk_tickets_priorities WHERE is_admin <> 1", 3);
Esempio n. 4
0
}
echo drawTop();
echo drawTableStart();
if ($isAdmin) {
    echo drawHeaderRow($skill, 1, 'Edit', 'skill_add_edit.php?id=' . url_id());
} else {
    echo drawHeaderRow($skill, 1);
}
if ($users = db_table('SELECT 
		u.userID, 
		u.firstName,
		u.lastName 
	FROM users_to_skills u2s 
	JOIN intranet_users u ON u2s.user_id = u.userID
	WHERE u2s.skill_id = ' . url_id() . ' AND u.isActive = 1
	ORDER BY u.lastName, u.firstName')) {
    ?>
	<tr>
		<th>User</th>
	</tr>
	<?php 
    foreach ($users as $u) {
        echo '<tr>
			<td><a href="view.php?id=' . $u['userID'] . '">' . $u['firstName'] . ' ' . $u['lastName'] . '</a></td>
		</tr>';
    }
} else {
    echo drawEmptyResult('No users are tagged with this skill.');
}
echo drawTableEnd();
echo drawBottom();
Esempio n. 5
0
    }
    ?>
"><?php 
    echo $u["last"];
    ?>
, <?php 
    echo $u["first"];
    ?>
</td>
			<td align="right"><?php 
    echo number_format($u["tickets"]);
    ?>
</a></td>
			<td align="right"><?php 
    echo @round($u["minutes"] / $total["minutes"] * 100);
    ?>
</td>
		</tr>
	<?php 
}
if (!$counter) {
    if ($filtered) {
        echo drawEmptyResult("No tickets were assigned to this admin in this month / year.", 3);
    } else {
        echo drawEmptyResult("No tickets have been assigned to this admin.", 3);
    }
}
?>
</table>
<?php 
echo drawBottom();
Esempio n. 6
0
<?php

include "include.php";
url_query_require("users.php");
echo drawTop();
$result = db_query("select\r\n\t\t\t\tt.title,\r\n\t\t\t\tt.statusID,\r\n\t\t\t\t(SELECT COUNT(*) FROM helpdesk_tickets_followups f where f.ticketID = t.id) as ticketfollowups,\r\n\t\t\t\tt.created_user,\r\n\t\t\t\tt.updated_date,\r\n\t\t\t\tt.id,\r\n\t\t\t\tt.ownerID,\r\n\t\t\t\tt.priorityID,\r\n\t\t\t\tt.created_date,\r\n\t\t\t\tISNULL(u.nickname, u.firstname) first,\r\n\t\t\t\tu.lastname last,\r\n\t\t\t\t(SELECT COUNT(*) FROM users_to_modules a WHERE a.module_id = 3 AND a.user_id = t.created_user) is_adminIT\r\n\t\t\tFROM helpdesk_tickets t\r\n\t\t\tJOIN users u ON u.id = t.created_user\r\n\t\t\tWHERE t.created_user = {$_GET["id"]} {$where}\r\n\t\t\tORDER BY t.created_date DESC");
echo drawTicketFilter();
?>
<table class="left" cellspacing="1">
	<?php 
$u = db_grab("SELECT ISNULL(nickname, firstname) first, lastname last FROM users WHERE id = " . $_GET["id"]);
echo drawHeaderRow("<a href='users.php' class='white'>Users</a> &gt; " . $u["first"] . " " . $u["last"] . " (" . db_found($result) . ")", 5);
if (db_found($result)) {
    echo drawTicketHeader();
    while ($r = db_fetch($result)) {
        echo drawTicketRow($r);
    }
} else {
    if ($filtered) {
        echo drawEmptyResult("No tickets for this user / month / year.", 5);
    } else {
        echo drawEmptyResult("This user hasn't posted any tickets.", 5);
    }
}
?>
</table>
<?php 
echo drawBottom();
Esempio n. 7
0
	<tr height="36">
		<td></td>
		<td><a href="topic.php?id=<?php 
        echo $t["id"];
        ?>
"><?php 
        echo $t["title"];
        ?>
</a></td>
		<td><?php 
        echo $t["first"];
        ?>
 <?php 
        echo $t["last"];
        ?>
</td>
		<td align="right"><?php 
        echo format_date($t["created_date"]);
        ?>
</td>
	</tr>
	<?php 
    }
} else {
    echo drawEmptyResult("No Wiki Topics have been entered into the system with this type yet.", 4);
}
?>
</table>

<?php 
echo drawBottom();
Esempio n. 8
0
?>
<table class="left" id="bb">
	<thead>
	<?php 
echo drawHeaderRow("", 4, "new", "#bottom");
?>
	<tr>
		<th width="320">Topic</th>
		<th width="120">Starter</th>
		<th class="c">Replies</th>
		<th class="r">Last Post</th>
	</tr>
	</thead>
	<tbody>
	<?php 
echo drawBBPosts(15, drawEmptyResult("No topics have been added yet.  Why not <a href='#bottom'>be the first</a>?", 4));
?>
	</tbody>
	<tfoot class="more">
		<tr>
			<td colspan="4">
				<input type="button" id="more" value="Load More">
			</td>
		</tr>
	</tfoot>
</table>
<a name="bottom"></a>
<?php 
$form = new intranet_form();
if ($isAdmin) {
    $form->addUser("createdBy", "Posted By", $user["id"], false, true);
Esempio n. 9
0
        ?>
&year=<?php 
        echo $_GET["year"];
    }
    ?>
"><?php 
    echo $o["name"];
    ?>
</a></td>
			<td align="right"><?php 
    echo number_format($o["tickets"]);
    ?>
</a></td>
			<td align="right"><?php 
    echo @round($o["minutes"] / $total["minutes"] * 100);
    ?>
</td>
		</tr>
	<?php 
}
if (!$counter) {
    if ($filtered) {
        echo drawEmptyResult("No tickets have been posted with this office / month / year.", 3);
    } else {
        echo drawEmptyResult("No tickets have been posted from this office.", 3);
    }
}
?>
</table>
<?php 
echo drawBottom();
Esempio n. 10
0
        ?>
</td>
		<td align="right">$<?php 
        echo number_format($ra["awardAmount"]);
        ?>
</td>
		<td width="16"><a href="javascript:deleteAward(<?php 
        echo $ra["awardID"];
        ?>
);"><img src="/images/icons/delete.png" width="16" height="16" border="0"></a></td>
	</tr>
	<?php 
    }
    ?>
	<tr class="total">
		<td colspan="4" align="right" width="99%">Total:&nbsp;</td>
		<td align="right" class="bold-w" width="20">$<?php 
    echo number_format($totalAwards);
    ?>
</td>
		<td width="16"></td>
	</tr>
<?php 
}
if (!$total_awards) {
    echo drawEmptyResult("No awards entered yet!", 6);
}
?>
</table>
<?php 
echo drawBottom();
Esempio n. 11
0
<?php

include "../include.php";
cookie("last_login");
if ($posting) {
    if ($r = db_grab("SELECT userID FROM intranet_users WHERE email = '{$_POST["email"]}' AND isActive = 1")) {
        email_user($_POST["email"], "Reset Your Password", drawEmptyResult('To reset your password, please <a href="http://' . $_josh["request"]["host"] . '/login/password_reset.php?id=' . $r . '">follow this link</a>.'));
        url_change("password_confirm.php");
    } else {
        url_query_add(array("msg" => "email-not-found", "email" => $_POST["email"]));
        //bad email
    }
} elseif (isset($_GET["id"])) {
    db_query("UPDATE intranet_users SET password = PWDENCRYPT('') WHERE userID = {$_GET["id"]} AND isActive = 1");
    if ($r = db_grab("SELECT u.email, p.url FROM intranet_users u JOIN pages p ON u.homePageID = p.ID WHERE u.userID = {$_GET["id"]} AND u.isActive = 1")) {
        login($r["email"], "", true);
        cookie("last_login", $r["email"]);
        url_change($r["url"]);
    } else {
        url_change(false);
    }
}
?>
<html>
	<head>
		<title>Reset Your Password</title>
		<link rel="stylesheet" type="text/css" href="<?php 
echo $locale;
?>
style.css" />
		<script language="javascript" src="/javascript.js"></script>
Esempio n. 12
0
					ORDER BY t.created_date DESC');
if (db_found($result)) {
    ?>
	<tr>
		<th>User</th>
		<th>Priority</th>
		<th>Status</th>
		<th>Assigned To</th>
		<th width="16"></th>
	</tr>
	<?php 
    while ($r = db_fetch($result)) {
        echo drawTicketRow($r);
    }
} else {
    echo drawEmptyResult("There are no open laptop requests right now!", 5);
}
?>
</table>

<script language="javascript">
	<!--
	function validate(form) {
		if (!form.laptopName.value.length) {
			alert("Please enter a laptop name.");
			return false;
		}
		return true;
	}

	function deactivateLaptop(id,name) {
Esempio n. 13
0
<?php

include "../include.php";
drawTop();
echo drawTableStart();
echo drawHeaderRow();
echo drawEmptyResult("This is the admin page, which hasn't been created yet.");
echo drawTableEnd();
drawBottom();
Esempio n. 14
0
        $link = "./?id=" . $d["id"];
        ?>
	<tr>
		<td width="16"><?php 
        echo draw_img(DIRECTORY_WRITE . $d["icon"], $link);
        ?>
</td>
		<td><a href="<?php 
        echo $link;
        ?>
"><?php 
        echo $d["name"];
        ?>
</a></td>
		<td class="r"><?php 
        echo format_date($d["updated_date"]);
        ?>
</td>
		<?php 
        echo drawdrawColumnDelete("Delete document?", $d["id"]);
        ?>
	</tr>
		<?php 
    }
} else {
    echo drawEmptyResult("No docs added to this category yet!");
}
?>
</table>
<?php 
echo drawBottom();
Esempio n. 15
0
        echo $_GET["year"];
    }
    ?>
"><i>No Type</i></a></td>
		<td align="right"><?php 
    echo number_format($t["tickets"]);
    ?>
</td>
		<td align="right"><?php 
    echo @round($t["minutes"] / $total["minutes"] * 100);
    ?>
</td>
	</tr>
	<?php 
}
if (!$counter) {
    if ($filtered) {
        echo drawEmptyResult("No tickets for this month and year.", 3);
    } else {
        echo drawEmptyResult("No tickets.", 3);
    }
}
?>
</table>
<a name="bottom"></a>
<?php 
$form = new intranet_form();
$form->addRow("itext", "Name", "description", @$r["description"]);
$form->addRow("submit", "Add Type");
$form->draw("Add New Type");
echo drawBottom();
Esempio n. 16
0
        while ($r = db_fetch($tickets)) {
            echo drawTicketRow($r, "type");
        }
    } else {
        if ($filtered) {
            echo drawHeaderRow("<a class='white' href='types.php'>Types</a> &gt; " . $type . " (" . db_found($tickets) . ")", 5);
            echo drawEmptyResult("No tickets have this type / month / year.", 5);
        } else {
            echo drawHeaderRow("<a class='white' href='types.php'>Types</a> &gt; " . $type . " (" . db_found($tickets) . ")", 5, "edit name", "type_add_edit.php?id=" . $_GET["id"], "delete", $request["path_query"] . "&deleteType=true");
            echo drawEmptyResult("No tickets are tagged as this type.  You can delete the type above.", 5);
        }
    }
} else {
    echo drawHeaderRow("<a class='white' href='types.php'>Types</a> &gt; No Type Set" . " (" . db_found($tickets) . ")", 5);
    if (db_found($tickets)) {
        echo drawTicketHeader();
        while ($r = db_fetch($tickets)) {
            echo drawTicketRow($r, "type");
        }
    } else {
        if ($filtered) {
            echo drawEmptyResult("No tickets are untyped in this month / year.", 5);
        } else {
            echo drawEmptyResult("No tickets are untyped!  Excellent!", 5);
        }
    }
}
?>
</table>
<?php 
echo drawBottom();
Esempio n. 17
0
, <?php 
        echo $r["firstname"];
        ?>
</a></td>
	        <td><nobr><?php 
        echo $r["board_position"];
        ?>
</nobr></td>
			<?php 
        echo drawdrawColumnDelete("Are you sure you want to delete this board member?", $r["id"]);
        ?>
	    </tr>
	<?php 
    }
} else {
    echo drawEmptyResult("No board members added yet", $colspan);
}
echo drawTableEnd();
?>

<a name="bottom"></a>

<?php 
if ($page['is_admin']) {
    $form = new intranet_form();
    $form->addRow("itext", "First Name", "firstname", "", "", true, 255);
    $form->addRow("itext", "Last Name", "lastname", "", "", true, 255);
    $form->addRow("select", "Organization", "organization_id", "SELECT id, title from organizations ORDER BY title", "", true);
    $form->addRow("itext", "Position on Board", "board_position", "", "", false, 255);
    $form->addRow("itext", "Employment", "employment", "", "", false, 255);
    $form->addRow("textarea", "Bio", "bio", "", "", false);
Esempio n. 18
0
        }
        echo $t["description"];
        if ($t["topics"]) {
            ?>
</a><?php 
        }
        ?>
</td>
		<td align="right"><?php 
        echo $t["topics"];
        ?>
</td>
	</tr>
	<?php 
    }
} else {
    echo drawEmptyResult("No types have been entered yet.", 2);
}
?>
</table>
<?php 
if ($page['is_admin']) {
    $form = new intranet_form();
    if ($page['is_admin']) {
        $form->addUser("created_user", "Posted By", $_SESSION["user_id"], false, true);
    }
    $form->addRow("itext", "Tag", "description", "", "", true, 255);
    $form->addRow("submit", "add tag");
    $form->draw("Add a New Type");
}
echo drawBottom();
Esempio n. 19
0
		<td><?php 
        echo $t["first"];
        ?>
 <?php 
        echo $t["last"];
        ?>
</td>
		<td align="right"><?php 
        echo format_date($t["created_date"]);
        ?>
</td>
	</tr>
	<?php 
    }
} else {
    echo drawEmptyResult("No Wiki Topics have been entered into the system yet.<br>Perhaps you would like to <a href='#bottom'>add one</a>?", 4);
}
?>
</table>

<a name="bottom"></a>

<?php 
if ($page['is_admin']) {
    $form = new intranet_form();
    if ($page['is_admin']) {
        $form->addUser("created_user", "Posted By", $_SESSION["user_id"], false, true);
    }
    $form->addRow("itext", "Title", "title", "", "", true, 255);
    $form->addRow("select", "Type", "type_id", "SELECT id, description FROM wiki_topics_types");
    $form->addCheckboxes("tags", "Tags", "wiki_tags", "wiki_topics_to_tags");
Esempio n. 20
0
				<td class="reorder"><i class="glyphicon glyphicon-menu-hamburger"></i></td>
				<td><?php 
        echo $l["text"];
        ?>
</td>
				<td><?php 
        echo $l["url"];
        ?>
</td>
				<?php 
        echo deleteColumn('Are you sure?', $l['id']);
        ?>
			</tr>
		<?php 
    }
} else {
    echo drawEmptyResult("No links entered in the system yet!", 4);
}
?>
	</tbody>
</table>

<a name="bottom"></a>
<?php 
$form = new intranet_form();
$form->addRow("hidden", "", "precedence", $max + 1);
$form->addRow("itext", "Link", "text", "", "", true, 255);
$form->addRow("itext", "Address", "url", "http://", "", true, 255);
$form->addRow("submit", "add new link");
$form->draw("Add a New Link");
drawBottom();
Esempio n. 21
0
		<th></th>
	</tr>
	<?php 
    while ($r = db_fetch($result)) {
        ?>
	<tr>
		<td><a href="view.php?id=<?php 
        echo $r["userid"];
        ?>
"><?php 
        echo $r["lastname"];
        ?>
, <?php 
        echo $r["firstname"];
        ?>
</a></td>
		<td class="r"><?php 
        echo format_date_time($r["createdOn"]);
        ?>
</td>
		<?php 
        echo deleteColumn("Delete user?", $r["userid"]);
        ?>
	</tr>
	<?php 
    }
} else {
    echo drawEmptyResult("No pending requests!");
}
echo drawTableEnd();
drawBottom();
Esempio n. 22
0
				<td><?php 
        echo $s['title'];
        ?>
</td>
				<td><?php 
        echo $s['url'];
        ?>
</td>
				<?php 
        echo deleteColumn('Are you sure?', $s['id']);
        ?>
			</tr>
		<?php 
    }
} else {
    echo drawEmptyResult('No spotlight stories entered in the system yet!', 5);
}
?>
	</tbody>
</table>

<a name="bottom"></a>
<?php 
$form = new intranet_form();
$form->addRow('hidden', '', 'precedence', ++$max);
$form->addRow('itext', 'Title', 'title', '', '', true, 255);
$form->addRow('itext', 'Link', 'url', 'http://', '', true, 255);
$form->addRow("file", "Image", "userfile");
$form->addRow('submit', 'add new link');
$form->draw('Add a New Link');
drawBottom();
Esempio n. 23
0
"><?php 
            echo $l['name'];
            ?>
</a></td>
					<td><?php 
            echo nl2br($l['address']);
            ?>
</td>
					<?php 
            echo deleteColumn('Are you sure?', $l['id']);
            ?>
				</tr>
			<?php 
        }
    } else {
        echo drawEmptyResult('No intranet_offices entered in the system yet!', 4);
    }
    ?>
		</tbody>
	</table>
	
	<a name='bottom'></a>
	<?php 
    $form = new intranet_form();
    $form->addRow('hidden', '', 'precedence', $max + 1);
    $form->addRow('itext', 'Name', 'name', '', '', true, 255);
    $form->addRow('textarea-plain', 'Address', 'address', '', '', true, 255);
    $form->addRow('submit', 'add new link');
    $form->draw('Add a New Location');
}
drawBottom();
Esempio n. 24
0
                ?>
</a></td>
					<td><?php 
                echo $c['organization'];
                ?>
</td>
					<td><?php 
                echo $c['phone'];
                ?>
</td>
				</tr>
				<?php 
            }
        } else {
            echo drawHeaderRow('Empty Result', 4);
            echo drawEmptyResult('No contact records contain <i>' . formatArrayForText($terms) . '</i>.');
        }
        ?>
		<!--<tr>
			<td class="bottom" colspan="4">
				<?php 
        echo draw_form_button('Add a new contact', 'contact_edit.php');
        ?>
			</td>
		</tr>-->
	</table>
	<?php 
    }
}
?>
<script>
Esempio n. 25
0
		<th></th>
	</tr>
	<?php 
    while ($r = db_fetch($result)) {
        ?>
	<tr>
		<td><a href="view.php?id=<?php 
        echo $r["id"];
        ?>
"><?php 
        echo $r["lastname"];
        ?>
, <?php 
        echo $r["firstname"];
        ?>
</a></td>
		<td class="r"><?php 
        echo format_date($r["created_date"]);
        ?>
</td>
		<?php 
        echo drawdrawColumnDelete("Delete user?", $r["id"]);
        ?>
	</tr>
	<?php 
    }
} else {
    echo drawEmptyResult("All users have logged in.");
}
echo drawTableEnd();
echo drawBottom();
Esempio n. 26
0
			<td><?php 
        echo $status;
        ?>
</td>
			<td width="16"><a href="javascript:deleteActivity(<?php 
        echo $a["activityID"];
        ?>
,'<?php 
        echo $a["activityID"];
        ?>
');"><img src="/images/icons/delete.png" width="16" height="16" border="0"></a></td>
		</tr>
		<?php 
    }
} else {
    echo drawEmptyResult("No actiivty has been entered.", 4);
}
?>
</table>

<table class="left" cellspacing="1">
	<form action="<?php 
echo $_josh["request"]["path_query"];
?>
" method="post" onsubmit="javascript: return validate(this);" name="frmActivity">
	<tr>
		<td class="head">Add Activity to this Award</td>
	</tr>
	<tr>
		<td><br>
			<table width="100%" cellpadding="0" cellspacing="0" border="0" class="small">
Esempio n. 27
0
<?php

include "include.php";
url_query_require("admins.php");
echo drawTop();
echo drawTicketFilter();
?>

<table class="left" cellspacing="1">
	<?php 
$result = db_query("SELECT\r\n\t\t\t\t\t\tt.title,\r\n\t\t\t\t\t\tt.statusID,\r\n\t\t\t\t\t\t(SELECT COUNT(*) FROM helpdesk_tickets_followups f WHERE f.ticketID = t.id) as ticketfollowups,\r\n\t\t\t\t\t\tt.created_user,\r\n\t\t\t\t\t\tt.updated_date,\r\n\t\t\t\t\t\tt.id,\r\n\t\t\t\t\t\tt.ownerID,\r\n\t\t\t\t\t\tt.priorityID,\r\n\t\t\t\t\t\tt.created_date,\r\n\t\t\t\t\t\tISNULL(u.nickname, u.firstname) first,\r\n\t\t\t\t\t\tu.lastname last\r\n\t\t\t\t\tFROM helpdesk_tickets t\r\n\t\t\t\t\tJOIN users  u ON u.id    = t.created_user\r\n\t\t\t\t\tWHERE t.ownerID = {$_GET["id"]} {$where}\r\n\t\t\t\t\tORDER BY t.created_date DESC");
$admin = db_grab("SELECT ISNULL(u.nickname, u.firstname) first FROM users u WHERE u.id = " . $_GET["id"]);
echo drawHeaderRow("<a href='admins.php' class='white'>Admins</a> &gt; " . $admin["first"] . " (" . db_found($result) . ")", 5);
if (db_found($result)) {
    echo drawTicketHeader();
    while ($r = db_fetch($result)) {
        echo drawTicketRow($r);
    }
} else {
    if ($filtered) {
        echo drawEmptyResult("No tickets were assigned to this admin in this month / year", 5);
    } else {
        echo drawEmptyResult("No tickets were assigned to this admin.", 5);
    }
}
?>
</table>
<?php 
echo drawBottom();
Esempio n. 28
0
<?php

include "../include.php";
if ($posting) {
    $_POST["email"] = format_email($_POST["email"]);
    $_POST["phone"] = format_phone($_POST["phone"]);
    //create request
    //todo ~ check whether staff already exists -- forward to password reset
    if ($id = db_grab("SELECT userID FROM intranet_users WHERE email = '" . $_POST["email"] . "' AND isActive = 1")) {
        url_change("account_exists.php");
    } elseif ($id = db_grab("SELECT id FROM users_requests WHERE email = '" . $_POST["email"] . "'")) {
        db_query("UPDATE users_requests SET\n\t\t\tfirstname = '" . $_POST["firstname"] . "', \n\t\t\tlastname = '" . $_POST["lastname"] . "',\n\t\t\tnickname = '" . $_POST["nickname"] . "',\n\t\t\ttitle = '" . $_POST["title"] . "',\n\t\t\tphone = '" . $_POST["phone"] . "',\n\t\t\temail = '" . $_POST["email"] . "',\n\t\t\tdepartmentID = '" . $_POST["departmentID"] . "',\n\t\t\tcorporationID = '" . $_POST["corporationID"] . "',\n\t\t\tofficeID = '" . $_POST["officeID"] . "',\n\t\t\tbio = '" . $_POST["bio"] . "',\n\t\t\tcreatedOn = GETDATE()\n\t\tWHERE email = '" . $_POST["email"] . "'");
        email_user($_josh["email_admin"], "Repeat Account Request", drawEmptyResult($_POST["firstname"] . " " . $_POST["lastname"] . ' is <a href="http://' . $request["host"] . '/staff/add_edit.php?requestID=' . $id . '">re-requesting an account</a>.'));
    } else {
        $id = db_query("INSERT INTO users_requests (\n\t\t\tfirstname, \n\t\t\tlastname,\n\t\t\tnickname,\n\t\t\ttitle,\n\t\t\tphone,\n\t\t\temail,\n\t\t\tdepartmentID,\n\t\t\tcorporationID,\n\t\t\tofficeID,\n\t\t\tbio,\n\t\t\tcreatedOn\n\t\t) VALUES (\n\t\t\t'" . $_POST["firstname"] . "', \n\t\t\t'" . $_POST["lastname"] . "',\n\t\t\t'" . $_POST["nickname"] . "',\n\t\t\t'" . $_POST["title"] . "',\n\t\t\t'" . $_POST["phone"] . "',\n\t\t\t'" . $_POST["email"] . "',\n\t\t\t" . $_POST["departmentID"] . ",\n\t\t\t" . $_POST["corporationID"] . ",\n\t\t\t" . $_POST["officeID"] . ",\n\t\t\t'" . $_POST["bio"] . "',\n\t\t\tGETDATE()\n\t\t)");
        //prepare email
        reset($_POST);
        $message = "";
        while (list($key, $value) = each($_POST)) {
            $message .= '<tr><td class="left">' . $key . '</td>';
            if ($key == "email") {
                $message .= '<td><a href="mailto:' . $value . '">' . $value . '</a></td></tr>';
            } elseif ($key == "departmentID") {
                $r = db_grab("SELECT departmentName FROM intranet_departments WHERE departmentID = " . $value);
                $message .= '<td>' . $r . '</td></tr>';
            } elseif ($key == "officeID") {
                $r = db_grab("SELECT name FROM intranet_offices WHERE id = " . $value);
                $message .= '<td>' . $r . '</td></tr>';
            } elseif ($key == "corporationID") {
                $message .= '<td>' . db_grab("SELECT description FROM organizations WHERE id = " . $value) . '</td></tr>';
            } elseif ($key == "Additional Info") {
Esempio n. 29
0
</a>
			<a href="edit.php?id=<?php 
            echo $o['id'];
            ?>
" class="button-light right"><?php 
            echo getString('edit');
            ?>
</a>
			<?php 
        }
        ?>
			<a class='title' href='<?php 
        echo $o['url'];
        ?>
'><?php 
        echo $o['title'];
        ?>
</a><br><?php 
        echo $o['description'];
        ?>
		</td>
	</tr>
	<?php 
    }
} else {
    echo drawEmptyResult('There are no orgs listed for this type.');
}
echo drawTableEnd();
//add new
include 'edit.php';
echo drawBottom();
Esempio n. 30
0
<?php

include "include.php";
//delete user handled by include
if (url_action("undelete")) {
    //undelete user
    db_query("UPDATE intranet_users SET isActive = 1, deletedBy = NULL, deletedOn = NULL, endDate = NULL, updatedBy = {$user["id"]}, updatedOn = GETDATE() WHERE userID = " . $_GET["id"]);
    url_query_drop("action");
} elseif (url_action("passwd")) {
    db_query("UPDATE intranet_users SET password = PWDENCRYPT('') WHERE userID = " . $_GET["id"]);
    $r = db_grab("SELECT userID, email FROM intranet_users WHERE userID = " . $_GET["id"]);
    email_user($r["email"], "Intranet Password Reset", drawEmptyResult($user["first"] . ' has just reset your password on the Intranet.  To pick a new password, please <a href="http://' . $_josh["request"]["host"] . '/login/password_reset.php?id=' . $r["userID"] . '">follow this link</a>.'));
    url_query_drop("action");
} elseif (url_action("invite")) {
    $r = db_grab("SELECT nickname, email, firstname FROM intranet_users WHERE userID = " . $_GET["id"]);
    $name = !$r["nickname"] ? $r["firstname"] : $r["nickname"];
    email_invite($_GET["id"], $r["email"], $name);
    url_query_drop("action");
}
url_query_require();
drawTop();
$r = db_grab("SELECT \n\t\tu.firstname,\n\t\tu.lastname,\n\t\tu.nickname, \n\t\tu.bio, \n\t\tu.email,\n\t\t" . db_pwdcompare("", "u.password") . " password,\n\t\tu.phone, \n\t\tu.lastlogin, \n\t\tu.title,\n\t\tf.name office, \n\t\td.departmentName,\n\t\tu.corporationID,\n\t\tc.description corporationName,\n\t\tu.homeAddress1,\n\t\tu.homeAddress2,\n\t\tu.homeCity,\n\t\ts.stateAbbrev,\n\t\tu.homeZIP,\n\t\tu.homePhone,\n\t\tu.homeCell,\n\t\tu.homeEmail,\n\t\tu.emerCont1Name,\n\t\tu.emerCont1Relationship,\n\t\tu.emerCont1Phone,\n\t\tu.emerCont1Cell,\n\t\tu.emerCont1Email,\n\t\tu.emerCont2Name,\n\t\tu.emerCont2Relationship,\n\t\tu.emerCont2Phone,\n\t\tu.emerCont2Cell,\n\t\tu.emerCont2Email,\n\t\tu.startDate,\n\t\tu.longDistanceCode,\n\t\tu.endDate,\n\t\tu.isActive,\n\t\tr.description rank\n\tFROM intranet_users u\n\tJOIN intranet_ranks r ON u.rankID = r.id\n\tLEFT  JOIN organizations\t\t\tc ON u.corporationID = c.id\n\tLEFT  JOIN intranet_departments\t\td ON d.departmentID\t= u.departmentID \t\t\t\t\n\tLEFT  JOIN intranet_offices    \t\tf ON f.id\t\t\t= u.officeID \t\t\t\t\n\tLEFT  JOIN intranet_us_states\t\ts ON u.homeStateID\t= s.stateID\n\tWHERE u.userID = " . $_GET["id"]);
$r["corporationName"] = empty($r["corporationName"]) ? '<a href="organizations.php?id=0">Shared</a>' : '<a href="organizations.php?id=' . $r["corporationID"] . '">' . $r["corporationName"] . '</a>';
if (!isset($r["isActive"])) {
    url_change("./");
}
echo drawJumpToStaff($_GET["id"]);
if (!$r["isActive"]) {
    $msg = "This is a former staff member.  ";
    if ($r["endDate"]) {
        $msg .= $r["nickname"] ? $r["nickname"] : $r["firstname"];