Skip to content

Commit

Permalink
Added send email notification with results (bare bones results only s…
Browse files Browse the repository at this point in the history
…o far) and also removed a couple of $PHP_SELF references and exchanged with $_SERVER['PHP_SELF'] for register_globals stuff.

git-svn-id: file:///Users/Shitiz/Downloads/lssvn/trunk/unstable@712 b72ed6b6-b9f8-46b5-92b4-906544132732
  • Loading branch information
jcleeland committed Oct 12, 2003
1 parent 3658fe1 commit a56d389
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 6 deletions.
13 changes: 11 additions & 2 deletions group.php
Expand Up @@ -231,7 +231,7 @@
}
$completed = "<br /><b><font size='2' color='red'>"._DIDNOTSAVE."</b></font><br /><br />\n\n";
$completed .= _NOTACTIVE1."<br /><br />\n";
$completed .= "<a href='$PHP_SELF?sid=$sid&move=clearall'>"._CLEARRESP."</a><br /><br />\n";
$completed .= "<a href='{$_SERVER['PHP_SELF']}?sid=$sid&move=clearall'>"._CLEARRESP."</a><br /><br />\n";
$completed .= "<font size='1'>$subquery</font>\n";
}
else
Expand Down Expand Up @@ -293,12 +293,21 @@
$id = $savedid;
$to = $surveyadminemail;
$subject = "$sitename Survey Submitted";
$message = _CONFIRMATION_MESSAGE1." $sitename\r\n";
$message = _CONFIRMATION_MESSAGE1." $surveyname\r\n";
$message.= "\r\n";
$message.= _CONFIRMATION_MESSAGE2."\r\n";
$message.= " $homeurl/browse.php?sid=$sid&action=id&id=$id\r\n\r\n";
$message.= _CONFIRMATION_MESSAGE3."\r\n";
$message.= " $homeurl/statistics.php?sid=$sid\r\n\r\n";
if ($sendnotification > 1)
{ //Send results as well. Currently just bare-bones - will be extended in later release
$message .= "----------------------------\r\n";
foreach ($_SESSION['insertarray'] as $value)
{
$message .= "$value: {$_SESSION[$value]}\r\n";
}
$message .= "----------------------------\r\n\r\n";
}
$message.= "PHP Surveyor";
$headers = "From: $surveyadminemail\r\n";
mail($to, $subject, $message, $headers);
Expand Down
2 changes: 1 addition & 1 deletion index.php
Expand Up @@ -179,7 +179,7 @@
echo "\t<table align='center' cellpadding='30'><tr><td align='center' bgcolor='white'>\n";
echo "\t\t<font face='arial' size='2'>\n";
echo "\t\t<b><font color='red'>"._ANSCLEAR."</b></font><br /><br />";
echo "<a href='$PHP_SELF?sid=$sid'>"._RESTART."</a><br />\n";
echo "<a href='{$_SERVER['PHP_SELF]'}?sid=$sid'>"._RESTART."</a><br />\n";
echo "\t\t<a href='javascript: window.close()'>"._CLOSEWIN."</a>\n";
echo "\t\t</font>\n";
echo "\t</td></tr>\n";
Expand Down
11 changes: 10 additions & 1 deletion question.php
Expand Up @@ -278,12 +278,21 @@
$id = $savedid;
$to = $surveyadminemail;
$subject = "$sitename Survey Submitted";
$message = _CONFIRMATION_MESSAGE1." $sitename\r\n";
$message = _CONFIRMATION_MESSAGE1." $surveyname\r\n";
$message.= "\r\n";
$message.= _CONFIRMATION_MESSAGE2."\r\n";
$message.= " $homeurl/browse.php?sid=$sid&action=id&id=$id\r\n\r\n";
$message.= _CONFIRMATION_MESSAGE3."\r\n";
$message.= " $homeurl/statistics.php?sid=$sid\r\n\r\n";
if ($sendnotification > 1)
{ //Send results as well. Currently just bare-bones - will be extended in later release
$message .= "----------------------------\r\n";
foreach ($_SESSION['insertarray'] as $value)
{
$message .= "$value: {$_SESSION[$value]}\r\n";
}
$message .= "----------------------------\r\n\r\n";
}
$message.= "PHP Surveyor";
$headers = "From: $surveyadminemail\r\n";
mail($to, $subject, $message, $headers);
Expand Down
13 changes: 11 additions & 2 deletions survey.php
Expand Up @@ -240,7 +240,7 @@
}
$completed = "<br /><b><font size='2' color='red'>"._DIDNOTSAVE."</b></font><br /><br />\n\n";
$completed .= _NOTACTIVE1."<br /><br />\n";
$completed .= "<a href='$PHP_SELF?sid=$sid&move=clearall'>"._CLEARRESP."</a><br /><br />\n";
$completed .= "<a href='{$_SERVER['PHP_SELF']}?sid=$sid&move=clearall'>"._CLEARRESP."</a><br /><br />\n";
$completed .= "<font size='1'>$subquery</font>\n";
}
else
Expand Down Expand Up @@ -301,12 +301,21 @@
$id = $savedid;
$to = $surveyadminemail;
$subject = "$sitename Survey Submitted";
$message = _CONFIRMATION_MESSAGE1." $sitename\r\n";
$message = _CONFIRMATION_MESSAGE1." $surveyname\r\n";
$message.= "\r\n";
$message.= _CONFIRMATION_MESSAGE2."\r\n";
$message.= " $homeurl/browse.php?sid=$sid&action=id&id=$id\r\n\r\n";
$message.= _CONFIRMATION_MESSAGE3."\r\n";
$message.= " $homeurl/statistics.php?sid=$sid\r\n\r\n";
if ($sendnotification > 1)
{ //Send results as well. Currently just bare-bones - will be extended in later release
$message .= "----------------------------\r\n";
foreach ($_SESSION['insertarray'] as $value)
{
$message .= "$value: {$_SESSION[$value]}\r\n";
}
$message .= "----------------------------\r\n\r\n";
}
$message.= "PHP Surveyor";
$headers = "From: $surveyadminemail\r\n";
mail($to, $subject, $message, $headers);
Expand Down

0 comments on commit a56d389

Please sign in to comment.