-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinsert_work_done.php
More file actions
83 lines (76 loc) · 2.86 KB
/
Copy pathinsert_work_done.php
File metadata and controls
83 lines (76 loc) · 2.86 KB
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
<?php
include "header.php";
$student_id;
$hour10_11=str_replace(array("'", "\"", """), "", htmlspecialchars($_POST['10_11']));
$hour11_12=str_replace(array("'", "\"", """), "", htmlspecialchars($_POST['11_12']));
$hour12_1=str_replace(array("'", "\"", """), "", htmlspecialchars($_POST['12_1']));
$hour1_2=str_replace(array("'", "\"", """), "", htmlspecialchars($_POST['1_2']));
$hour2_3=str_replace(array("'", "\"", """), "", htmlspecialchars($_POST['2_3']));
$hour3_4=str_replace(array("'", "\"", """), "", htmlspecialchars($_POST['3_4']));
$hour4_5=str_replace(array("'", "\"", """), "", htmlspecialchars($_POST['4_5']));
$query=mysql_query("INSERT INTO `confirm_work_done`(`admin_id`, `10_11`, `11_12`, `12_1`, `1_2`, `2_3`, `3_4`, `4_5`) VALUES ('$student_id','$hour10_11','$hour11_12','$hour12_1','$hour1_2','$hour2_3','$hour3_4','$hour4_5')");
if($query)
{
echo "<b><big>Thank you so much for all the time and effort.</big></b>";
//$to="krinajoshi@rocketmail.com";
$to="krinajoshi@rocketmail.com,kris@ccbst.ca";
$subject="Work Done by ";
$subject .= $myusername;
$subject .= "-";
$subject .= date("Y/m/d");
$headers = 'From: pmtool@ccbst.info' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
$messages ="=====================================" ;
$messages .="\r\n" ;
$messages .="10 to 11: " ;
$messages .= $hour10_11;
$messages .="\r\n" ;
$messages .= "----------------------------------------------------------------";
$messages .="\r\n" ;
$messages .="11 to 12: " ;
$messages .= $hour11_12;
$messages .="\r\n" ;
$messages .= "----------------------------------------------------------------";
$messages .="\r\n" ;
$messages .="12 to 1: " ;
$messages .= $hour12_1;
$messages .="\r\n" ;
$messages .= "----------------------------------------------------------------";
$messages .="\r\n" ;
$messages .="1 to 2: " ;
$messages .= $hour1_2;
$messages .="\r\n" ;
$messages .= "----------------------------------------------------------------";
$messages .="\r\n" ;
$messages .="2 to 3: " ;
$messages .= $hour2_3;
$messages .="\r\n" ;
$messages .= "----------------------------------------------------------------";
$messages .="\r\n" ;
$messages .="3 to 4: " ;
$messages .= $hour3_4;
$messages .="\r\n" ;
$messages .= "----------------------------------------------------------------";
$messages .="\r\n" ;
$messages .="4 to 5: " ;
$messages .= $hour4_5;
$messages .="\r\n" ;
$messages .= "----------------------------------------------------------------";
$messages .="\r\n" ;
$messages .="=====================================" ;
$ret = mail($to, $subject, $messages, $headers);
}
else
{
echo "Something went wrong.Please try again later";
}
?>
<button onclick="goBack()">Go Back</button>
<script>
function goBack() {
window.history.back();
}
</script>
<?
include "footer.php";
?>