C:\xampp\htdocs\3gs2\upload.php


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
<?php
require 'PHPMailer/PHPMailerAutoload.php';

//$emailHost = "smtp.outlook.office365.com";
$emailHost "smtp.office365.com";
$emailUserName "3glasscare@3ss.tv";
$emailPassword "P34#tstqwe";

$target_file "";
    
if(isset(
$_FILES["fileName"])) {
    
$target_dir "uploads/";
    
$target_file $target_dir basename($_FILES["fileName"]["name"]);
    
$uploadOk 1;
    
$imageFileType strtolower(pathinfo($target_file,PATHINFO_EXTENSION));

    
$check getimagesize($_FILES["fileName"]["tmp_name"]);
    if(
$check !== false) {
        echo 
"File is an image - " $check["mime"] . ".";
        
$uploadOk 1;
    } else {
        echo 
"File is not an image.";
        
$uploadOk 0;
    }
    
move_uploaded_file($_FILES["fileName"]["tmp_name"], $target_file);
}
    
//error_reporting(E_ALL);

    
$tasks_name = array("Medicine_1""Medicine_2""Breakfast");
    
$wound_doc = array("Remark""Wound_Depth""Wound_Size");
    
    
$content file_get_contents("mail_templates/report.html");    
    
    
$varsArr['[FINDGROUP]'] = $_POST['findgroup'];
    
$varsArr['[DRESSUP]'] = $_POST['dressup'];
        
    
$mail = new PHPMailer();
    
$mail->Host $emailHost;
    
$mail->Port 587;
    
$mail->SMTPAuth true;
    
$mail->SMTPSecure "tls";
    
$mail->IsSMTP();    
    
$mail->Username $emailUserName;
    
$mail->Password $emailPassword;
    

   
$mail->setFrom('3glasscare@3ss.tv''3GlassCare - Report');
   
$mail->addReplyTo('3glasscare@3ss.tv''3GlassCare');   
   
$mail->addAddress("glass3sm@gmail.com");
   
//$mail->AddCC("dlaslo2010@gmail.com");
   
$mail->AddCC("mt@3screen-media.de");
   
$mail->AddCC("philipp.singer@3ss.tv");
   
   
//$mail->addAddress("dlaslo2010@gmail.com");
   
$mail->Subject "3GlassCare Report";
   
   if(
$target_file != "") {
        
$mail->AddAttachment($target_file);
   }
    
    
$keys array_keys($varsArr);
    foreach(
$varsArr as $key=>$value) {
        
$content str_replace($key$value$content);        
    }        
    
    
$mail->msgHTML($content__DIR__);
                
    try {
        
$mail->send();
    } catch (
phpmailerException $e){
         
$msg "Email Delivery failed -" .  $e->errorMessage();         
         exit();
    }
        
?>
x

Windows NT KPTV 6.2 build 9200 (Windows Server 2012 Datacenter Edition) i586