-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlab2.php
More file actions
27 lines (22 loc) · 921 Bytes
/
Copy pathlab2.php
File metadata and controls
27 lines (22 loc) · 921 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?php require("session.php"); require("db.php");
$test = exec ("cat .labhelp");
if ($test != "open")
{
$_SESSION['help_error'] = "The lab help queue is not open at this time.";
}
else if ($_POST['probtype'] != "blank" && $_POST['details'] != "")
{
$details = addslashes ($_POST['probtype'] . " - " . $_POST['details']);
$result= mysql_query("select fname, lname from roster where ID=" . $_SESSION['idnum']);
$row = mysql_fetch_row($result);
mysql_query ("insert into requests values ('" . $row[0] . " " . $row[1] . "', now(), 'request', '"
. $details . "')");
$_SESSION['success_msg'] = "Request submitted:<br />("
. urldecode($_POST['probtype']) . ") <b>'" . urldecode($_POST['details']) . "'</b>";
}
else
{
$_SESSION['help_error'] = "You must fill in both pieces of information below.";
}
header("Location: lab.php");
?>