emailHelp.php
2.55 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
84
85
86
87
88
89
90
91
92
93
<?php
/**
* emailHelp.php
*
* Creates the Help page
* Creates the form and functionaility for emailing bugs to the developers
*
*
* @author Mukhtar Dharsey
* @date 22 January 2003
*/
require_once("../../../../config/dmsDefaults.php");
global $default;
require_once("$default->fileSystemRoot/lib/email/Email.inc");
if(checkSession()) {
// include the page template (with navbar)
require_once("$default->fileSystemRoot/presentation/webpageTemplate.inc");
// when email button sent..send email
if ($submit) {
//set up body and link
$body = $message;
$hyperlink = $linkToBug;
//create email object
$emailLink= new Email();
//send email
$success = $emailLink->sendHelpEmail($fromEmail,$fromName,$toEmail,$subject,$body, $hyperlink);
//if successful ..rerender the page
if($success == True) {
$Center = "<br>Email Successfully Sent</br>";
$oPatternCustom = & new PatternCustom();
$oPatternCustom->setHtml($Center);
$main->setCentralPayload($oPatternCustom);
$main->render();
} Else {
$Center = "<br>Email Unsuccessful</br>";
$oPatternCustom = & new PatternCustom();
$oPatternCustom->setHtml($Center);
$main->setCentralPayload($oPatternCustom);
$main->render();
}
} else {
//create the necessary HTML for the emailing
$Center = "
<br>
</br>
<Center><b> Email the Development Team if you have found a Bug</b></center>
<br>
</br>
<TABLE BORDER=\"0\" CELLSPACING=\"2\" CELLPADDING=\"2\">
<tr>
<td>To Email: <TD WIDTH=\"100%\"><INPUT type=\"Text\" name=\"toEmail\" size=\"30\" value = \"dmsHelp@jamwarehouse.com \"></td></td>
</tr>
<tr>
<td>Your Name: <TD WIDTH=\"80%\"><INPUT type=\"Text\" name=\"fromName\" size=\"30\"></td></td>
</tr>
<tr>
<td>Your Email: <TD WIDTH=\"80%\"><INPUT type=\"Text\" name=\"fromEmail\" size=\"30\"></td></td>
</tr>
<tr>
<td>Subject: <TD WIDTH=\"80%\"><INPUT type=\"Text\" name=\"subject\" size=\"30\" value = \"Bug Found: \" ></td></td>
</tr>
<tr>
<td>Link to Page: <TD WIDTH=\"80%\"><INPUT type=\"Text\" name=\"linkToBug\" size=\"60\" ></td></td>
</tr>
<tr>
<td>Bug Description: <TD WIDTH=\"80%\"><TEXTAREA NAME=\"message\" COLS=\"45\" ROWS=\"5\" WRAP=\"VIRTUAL\"></TEXTAREA></td></td>
</td>
</tr>
<tr>
</tr>
</table>
<center><INPUT type=\"Submit\" name=\"submit\" value=\"Send Email\"></center>
";
$oPatternCustom = & new PatternCustom();
$oPatternCustom->setHtml($Center);
$main->setCentralPayload($oPatternCustom);
$main->setFormAction($_SERVER["PHP_SELF"]);
$main->render();
}
}
?>