-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbag.php
More file actions
126 lines (112 loc) · 3.75 KB
/
bag.php
File metadata and controls
126 lines (112 loc) · 3.75 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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
<?php
global $dir;
global $logintbl, $companiestbl;
global $prefix;
$action = isset($_GET['action']) ? $_GET['action'] : '';
$name1 = isset($_GET['name']) ? $_GET['name'] : $_COOKIE['name'];
$name1 = urldecode($name1);
$email = $name1;
$query = "SELECT fullname FROM $logintbl WHERE name='$name1'";
$l = __LINE__;
$result = DoQuery($query, "$l");
$line = mysql_fetch_array($result, MYSQL_NUM);
$fullname = stripslashes($line[0]);
$query = "SELECT companyname FROM $companiestbl WHERE prefix='$prefix'";
$result = DoQuery($query, __LINE__);
$line = mysql_fetch_array($result, MYSQL_NUM);
$company = $line[0];
$subject1 = _("Subject");
$fullname1 = _("Full name");
$email1 = _("Email");
$message1 = _("Message");
$submit = _("Submit");
$sendrep=_("I want to send a detialed automatic error report genrated by the system");
$l = _("Hello");
$contactform = <<<EOF
<h2>$l: $fullname</h2><br />\n
<form action="?module=bag&action=submit" method="post">
<table class="formtbl" dir="$dir" width="100%">
<tr>
<td>$subject1: </td>
<td><input type="text" name="subject" size=\"30\" value="$subject" /></td>
</tr>
<tr>
<td><input type="checkbox" name="sendreport" value="true" /></td>
<td>$sendrep</td>
</tr>
<tr>
<td valign="top">$message1: </td>
<td><textarea rows="10" style="width:90%" name="message">$message</textarea></td>
</tr>
<tr>
<td colspan="2" align="center"><input type="submit" value="$submit" class='btnaction' /></td>
</tr>
</table>
</form>
EOF;
//phpinfo () ;
if($action == 'submit') {
//$name1 = isset($_GET['name']) ? $_GET['name'] : $_COOKIE['name'];
$sendreport=isset($_POST['sendreport'])?$_POST['sendreport']:false;
print $sendreport;
if($sendreport){
//דפדפן לקוח וגרסה
//פרטים מphp.ini
global $version;
$text.="<hr />/**********Version************/<hr />\n";
$text.=$version;
$text.="<hr />/**********Error-msg**********/<hr />\n";
$text.=$php_errormsg."\n";
$text.="<hr />/*******PHP-EXTENSIONS********/<hr />\n";
$ext=get_loaded_extensions ();
$text.=var_export($ext,true)."\n";
$text.="<hr />/************ENV**************/<hr />\n";
$text.=var_export($_ENV,true)."\n";
$text.="<hr />/***********POST**************/<hr />\n";
$text.=var_export($_POST,true)."\n";
$text.="<hr />/************GET**************/<hr />\n";
$text.=var_export($_GET,true)."\n";
$text.="<hr />/**********SERVER*************/<hr />\n";
$text.=var_export($_SERVER,true)."\n";
$text.="<hr />/**********COOKIE*************/<hr />\n";
$text.=var_export($_COOKIE,true)."\n";
$text.="<hr />/**********SESSION************/<hr />\n";
$text.=var_export($_SESSION,true)."\n";
$text.="<hr />/**********END REPORT*********/<hr />\n";
}else{
$text='';
}
$s = GetPost('subject');
$message = GetPost('message');
global $sendMailAddress;
$email=$sendMailAddress;
$to = "adam@speedcomp.co.il";
//$from = "From: $email";
$subject = "=?utf-8?B?" . base64_encode("[Linet] $s") . "?=";
$body .= "<div dir=\"$dir\">\n";
$l = _("From: ");
$l1 = _("Regarding company");
$body .= "$l$fullname <$email><br>$l1: $company<br>\n$message<br /><hr />";
$body.=$text;
$body .= "</div>\n";
$headers = "Content-type: text/html; charset=UTF-8\r\n";
$headers .= "From: $email\r\n";
$thanks =sendMail($email, $to, $subject, $body);
$contactform= "<h1>$thanks</h1>\n";
// $l = _("We will do our best to answer you shortly");
//$contactform.= "<h1>$l</h1>\n";
$l = _("Click here to continue");
$contactform.= "<br><h2><a href=\"index.php\">$l</a></h2>\n";
//return;
}
$haeder = _("send a Bug Report");
//print "<h3>$l</h3>\n";
//print "$contactform";
//print "</div>\n";
createForm($contactform,$haeder,'',600,'','',1,getHelp());
//print "<div class=\"lefthalf1\">\n";
//
//print
//print "</div>\n";
//createForm($text, $haeder);
?>