예제 #1
0
파일: test.php 프로젝트: Rhenan/intranet-1
<?php

include 'include.php';
emailITTicket(20195, 'new', false, true);
예제 #2
0
파일: index.php 프로젝트: Rhenan/intranet-1
<?php

include "include.php";
if ($posting) {
    $user_id = $page['is_admin'] ? $_POST["user_id"] : $_SESSION["user_id"];
    format_post_nulls("type_id");
    $id = db_query("INSERT INTO helpdesk_tickets (\r\n    \tcreated_user,\r\n    \ttype_id,\r\n\t\tpriorityID,\r\n\t\tdepartmentID,\r\n\t\tdescription,\r\n\t\tstatusID,\r\n\t\tipAddress,\r\n\t\tcreated_date,\r\n\t\tupdated_date,\r\n\t\ttitle\r\n\t) VALUES (\r\n\t\t" . $user_id . ",\r\n\t\t" . $_POST["type_id"] . ",\r\n\t\t'" . $_POST["priorityID"] . "',\r\n\t\t'" . $_POST["departmentID"] . "',\r\n\t\t'" . $_POST["description"] . "',\r\n\t\t1,\r\n\t\t'{$_SERVER["REMOTE_ADDR"]}',\r\n\t\tGETDATE(),\r\n\t\tGETDATE(),\r\n\t\t'" . $_POST["title"] . "'\r\n    );");
    //$r = db_grab("SELECT MAX(id) id FROM helpdesk_tickets");
    //todo - email mohammed for critical
    emailITTicket($id, 'new');
    //special for carla
    url_change('ticket.php?id=' . $id);
}
echo drawTop();
echo drawMessage($helpdeskStatus, "center");
?>

<script language="javascript">
	<!--
	function updateTypes(departmentID) {
		var types = new Array(3, 8);
		<?php 
$types = db_query("SELECT id, departmentID, description FROM helpdesk_tickets_types ORDER BY departmentID, description");
$options = array();
while ($t = db_fetch($types)) {
    $options[$t["departmentID"]][] = '"' . $t["id"] . '|' . $t["description"] . '"';
}
while (list($key, $value) = each($options)) {
    ?>
			types[<?php 
    echo $key;
예제 #3
0
<?php

//$_josh["debug"] = true;
$_SERVER["DOCUMENT_ROOT"] = "D:\\Sites\\seedco.org\\intranet\\";
$_SERVER["HTTP_HOST"] = "intranet.seedco.org";
$_SERVER["SCRIPT_NAME"] = "/helpdesk/alerts.php";
$_COOKIE["last_login"] = "******";
chdir(dirname(__FILE__));
include "include.php";
$tickets = db_query("SELECT id FROM helpdesk_tickets WHERE priorityID = 1 AND statusID <> 9 AND DATEDIFF(mi, created_date, GETDATE()) > 60");
while ($t = db_fetch($tickets)) {
    emailITTicket($t["id"], "critical", true);
}
$tickets = db_query("SELECT id FROM helpdesk_tickets WHERE statusID <> 9 AND DATEDIFF(dd, created_date, GETDATE()) > 5");
//while ($t = db_fetch($tickets)) emailITTicket($t["id"], "languishing", true);
echo "finished!";