Skip to content

Commit

Permalink
Adding ticket_id in templates
Browse files Browse the repository at this point in the history
  • Loading branch information
jmontoyaa committed Aug 26, 2010
1 parent f357a3d commit 4a09127
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions client/pages/tickets.php
Original file line number Diff line number Diff line change
Expand Up @@ -41,13 +41,14 @@ public function content() { # Displays the page
$ticket_params['urgency'] = $main->postvar['urgency'];
$ticket_params['time'] = $time;
$ticket_params['userid'] = $user_id;
$ticket->create($ticket_params);
$ticket_id = $ticket->create($ticket_params);

$main->errors("Ticket has been added!");
$template = $db->emailTemplate("new ticket");
$template = $db->emailTemplate("new_ticket");
$array['TITLE'] = $main->postvar['title'];
$array['URGENCY'] = $main->postvar['urgency'];
$array['CONTENT'] = $main->postvar['content'];
$array['ID'] = $ticket_id;
$email->staff($template['subject'], $template['content'], $array);
$main->redirect('?page=tickets&sub=view&msg=1');
}
Expand All @@ -65,6 +66,7 @@ public function content() { # Displays the page
$array['TITLE'] = $data['title'];
$array['UPDATE'] = $ticket->lastUpdated($data['id']);
$array['ID'] = $data['id'];
$array['STATUS'] = $data['status'];
echo $style->replaceVar("tpl/support/ticketviewbox.tpl", $array);
}
}
Expand Down Expand Up @@ -96,7 +98,7 @@ public function content() { # Displays the page
$main->errors("Reply has been added!");
$data = $db->fetch_array($query);
$client = $db->client($user_id);
$template = $db->emailTemplate("new response");
$template = $db->emailTemplate("new_response");
$array['TITLE'] = $data['title'];
$array['USER'] = $client['user'];
$array['CONTENT'] = $main->postvar['content'];
Expand Down Expand Up @@ -130,8 +132,8 @@ public function content() { # Displays the page
}
else {
$array['ADDREPLY'] = "";
}

}
$array['ID'] = $data['id'];
echo $style->replaceVar("tpl/support/viewticket.tpl", $array);
}
}
Expand Down

0 comments on commit 4a09127

Please sign in to comment.