-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsendmail.php
More file actions
22 lines (15 loc) · 805 Bytes
/
sendmail.php
File metadata and controls
22 lines (15 loc) · 805 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?php
session_start();
require_once 'lib.php';
require_once 'defines.php';
if (isset($_GET['organ']) && isset($_GET['file'])) {
if (checkOrgan($_GET['organ']) && checkReadPerms($_GET['organ']) && checkFilename($_GET['file'])) {
$file = REPORTDIR . SUBUNPUBLISHED . $_GET['organ'] . "/" . $_GET['file'];
pandocToPDF($file, $file . ".pdf");
$text = file_get_contents(REPORTDIR . $_GET['organ']. ".email");
$text .= "\n Edit-Link: https://protokolle.asta.kit.edu/edit/" . $_GET['organ'] . "/" . $_GET['file'] . " \n";
$text .= file_get_contents($file);
echo rlyWriteEmail("justkidding@asta-kit.de", "APVEL", $emailUN[$_GET['organ']], "Unveröffentlichtes Protokoll" . $_GET['file'] ." " . $_GET['organ'], $text, array($file . ".pdf", $file));
}
}
?>