Cleanup email code
This commit is contained in:
@@ -314,29 +314,22 @@ class Application {
|
|||||||
switch($sAction)
|
switch($sAction)
|
||||||
{
|
{
|
||||||
case "add":
|
case "add":
|
||||||
{
|
$sSubject = "Submitted application accepted";
|
||||||
$sSubject = "Submitted application accepted";
|
$sMsg = "The application you submitted (".$oApp->sName." ".$this->sName.") has been accepted.";
|
||||||
$sMsg = "The application you submitted (".$oApp->sName." ".$this->sName.") has been accepted.";
|
$sMsg .= "Administrators Responce:\n";
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case "reject":
|
case "reject":
|
||||||
{
|
$sSubject = "Submitted application rejected";
|
||||||
$sSubject = "Submitted application rejected";
|
$sMsg = "The application you submitted (".$oApp->sName." ".$this->sName.") has been rejected.";
|
||||||
$sMsg = "The application you submitted (".$oApp->sName." ".$this->sName.") has been rejected.";
|
$sMsg .= "Clicking on the link in this email will allow you to modify and resubmit the application. ";
|
||||||
$sMsg .= "Clicking on the link in this email will allow you to modify and resubmit the application. ";
|
$sMsg .= "A link to your queue of applications and versions will also show up on the left hand side of the Appdb site once you have logged in. ";
|
||||||
$sMsg .= "A link to your queue of applications and versions will also show up on the left hand side of the Appdb site once you have logged in. ";
|
$sMsg .= APPDB_ROOT."appsubmit.php?sub=view&apptype=applicationappId=".$this->iAppId."\n";
|
||||||
$sMsg .= APPDB_ROOT."appsubmit.php?sub=view&apptype=applicationappId=".$this->iAppId."\n";
|
$sMsg .= "Reason given:\n";
|
||||||
$sMsg .= "Reason given:\n";
|
|
||||||
$sMsg .= $_REQUEST['replyText']."\n"; /* append the reply text, if there is any */
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case "delete":
|
case "delete":
|
||||||
{
|
$sSubject = "Submitted application deleted";
|
||||||
$sSubject = "Submitted application deleted";
|
$sMsg = "The application you submitted (".$oApp->sName." ".$this->sName.") has been deleted.";
|
||||||
$sMsg = "The application you submitted (".$oApp->sName." ".$this->sName.") has been deleted.";
|
$sMsg .= "Reason given:\n";
|
||||||
$sMsg .= "Reason given:\n";
|
|
||||||
$sMsg .= $_REQUEST['replyText']."\n"; /* append the reply text, if there is any */
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
$sMsg .= $_REQUEST['replyText']."\n";
|
$sMsg .= $_REQUEST['replyText']."\n";
|
||||||
@@ -362,6 +355,12 @@ class Application {
|
|||||||
$sMsg .= "This application has been submitted by ".$oSubmitter->sRealname.".";
|
$sMsg .= "This application has been submitted by ".$oSubmitter->sRealname.".";
|
||||||
$sMsg .= "\n";
|
$sMsg .= "\n";
|
||||||
}
|
}
|
||||||
|
if($_REQUEST['replyText'])
|
||||||
|
{
|
||||||
|
$sMsg .= "Appdb admin reply text:\n";
|
||||||
|
$sMsg .= $_REQUEST['replyText']."\n"; // append the reply text, if there is any
|
||||||
|
}
|
||||||
|
|
||||||
addmsg("The application was successfully added into the database.", "green");
|
addmsg("The application was successfully added into the database.", "green");
|
||||||
} else
|
} else
|
||||||
{
|
{
|
||||||
@@ -379,11 +378,11 @@ class Application {
|
|||||||
case "delete":
|
case "delete":
|
||||||
$sSubject = $this->sName." has been deleted by ".$_SESSION['current']->sRealname;
|
$sSubject = $this->sName." has been deleted by ".$_SESSION['current']->sRealname;
|
||||||
|
|
||||||
/* if replyText is set we should report the reason the application was deleted */
|
// if replyText is set we should report the reason the application was deleted
|
||||||
if($_REQUEST['replyText'])
|
if($_REQUEST['replyText'])
|
||||||
{
|
{
|
||||||
$sMsg .= "Reason given:\n";
|
$sMsg .= "Reason given:\n";
|
||||||
$sMsg .= $_REQUEST['replyText']."\n"; /* append the reply text, if there is any */
|
$sMsg .= $_REQUEST['replyText']."\n"; // append the reply text, if there is any
|
||||||
}
|
}
|
||||||
|
|
||||||
addmsg("Application deleted.", "green");
|
addmsg("Application deleted.", "green");
|
||||||
@@ -392,11 +391,11 @@ class Application {
|
|||||||
$sSubject = $this->sName." has been rejected by ".$_SESSION['current']->sRealname;
|
$sSubject = $this->sName." has been rejected by ".$_SESSION['current']->sRealname;
|
||||||
$sMsg .= APPDB_ROOT."appsubmit.php?apptype=application&sub=view&appId=".$this->iAppId."\n";
|
$sMsg .= APPDB_ROOT."appsubmit.php?apptype=application&sub=view&appId=".$this->iAppId."\n";
|
||||||
|
|
||||||
/* if replyText is set we should report the reason the application was rejected */
|
// if replyText is set we should report the reason the application was rejected
|
||||||
if($_REQUEST['replyText'])
|
if($_REQUEST['replyText'])
|
||||||
{
|
{
|
||||||
$sMsg .= "Reason given:\n";
|
$sMsg .= "Reason given:\n";
|
||||||
$sMsg .= $_REQUEST['replyText']."\n"; /* append the reply text, if there is any */
|
$sMsg .= $_REQUEST['replyText']."\n"; // append the reply text, if there is any
|
||||||
}
|
}
|
||||||
|
|
||||||
addmsg("Application rejected.", "green");
|
addmsg("Application rejected.", "green");
|
||||||
|
|||||||
@@ -237,19 +237,18 @@ class testData{
|
|||||||
$sSubject = "Submitted testing data accepted";
|
$sSubject = "Submitted testing data accepted";
|
||||||
$sMsg = "The testing data you submitted (".$oApp->sName." ".$this->sName.") has been accepted.";
|
$sMsg = "The testing data you submitted (".$oApp->sName." ".$this->sName.") has been accepted.";
|
||||||
$sMsg .= APPDB_ROOT."appview.php?versionId=".$this->iVersionId."&iTestingId=".$this->iTestingId."\n";
|
$sMsg .= APPDB_ROOT."appview.php?versionId=".$this->iVersionId."&iTestingId=".$this->iTestingId."\n";
|
||||||
break;
|
$sMsg .= "Administrators Responce:\n";
|
||||||
|
break;
|
||||||
case "reject":
|
case "reject":
|
||||||
$sSubject = "Submitted testing data rejected";
|
$sSubject = "Submitted testing data rejected";
|
||||||
$sMsg = "The testing data you submitted (".$oApp->sName." ".$this->sName.") has been rejected.";
|
$sMsg = "The testing data you submitted (".$oApp->sName." ".$this->sName.") has been rejected.";
|
||||||
$sMsg .= APPDB_ROOT."testResults.php?sub=view&iTestingId=".$this->iTestingId."\n";
|
$sMsg .= APPDB_ROOT."testResults.php?sub=view&iTestingId=".$this->iTestingId."\n";
|
||||||
$sMsg .= "Reason given:\n";
|
$sMsg .= "Reason given:\n";
|
||||||
$sMsg .= $_REQUEST['replyText']."\n"; // append the reply text, if there is any
|
break;
|
||||||
break;
|
|
||||||
case "delete":
|
case "delete":
|
||||||
$sSubject = "Submitted testing data deleted";
|
$sSubject = "Submitted testing data deleted";
|
||||||
$sMsg = "The testing data you submitted (".$oApp->sName." ".$this->sName.") has been deleted.";
|
$sMsg = "The testing data you submitted (".$oApp->sName." ".$this->sName.") has been deleted.";
|
||||||
$sMsg .= "Reason given:\n";
|
$sMsg .= "Reason given:\n";
|
||||||
$sMsg .= $_REQUEST['replyText']."\n"; // append the reply text, if there is any
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
$sMsg .= $_REQUEST['replyText']."\n";
|
$sMsg .= $_REQUEST['replyText']."\n";
|
||||||
@@ -276,6 +275,9 @@ class testData{
|
|||||||
$oSubmitter = new User($this->iSubmitterId);
|
$oSubmitter = new User($this->iSubmitterId);
|
||||||
$sMsg .= "This Testing data has been submitted by ".$oSubmitter->sRealname.".";
|
$sMsg .= "This Testing data has been submitted by ".$oSubmitter->sRealname.".";
|
||||||
$sMsg .= "\n";
|
$sMsg .= "\n";
|
||||||
|
}
|
||||||
|
if($_REQUEST['replyText'])
|
||||||
|
{
|
||||||
$sMsg .= "Appdb admin reply text:\n";
|
$sMsg .= "Appdb admin reply text:\n";
|
||||||
$sMsg .= $_REQUEST['replyText']."\n"; // append the reply text, if there is any
|
$sMsg .= $_REQUEST['replyText']."\n"; // append the reply text, if there is any
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -421,30 +421,22 @@ class Version {
|
|||||||
switch($sAction)
|
switch($sAction)
|
||||||
{
|
{
|
||||||
case "add":
|
case "add":
|
||||||
{
|
$sSubject = "Submitted version accepted";
|
||||||
$sSubject = "Submitted version accepted";
|
$sMsg = "The version you submitted (".$oApp->sName." ".$this->sName.") has been accepted.";
|
||||||
$sMsg = "The version you submitted (".$oApp->sName." ".$this->sName.") has been accepted.";
|
$sMsg .= "Administrators Responce:\n";
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case "reject":
|
case "reject":
|
||||||
{
|
$sSubject = "Submitted version rejected";
|
||||||
$sSubject = "Submitted version rejected";
|
$sMsg = "The version you submitted (".$oApp->sName." ".$this->sName.") has been rejected. ";
|
||||||
$sMsg = "The version you submitted (".$oApp->sName." ".$this->sName.") has been rejected. ";
|
$sMsg .= "Clicking on the link in this email will allow you to modify and resubmit the version. ";
|
||||||
$sMsg .= "Clicking on the link in this email will allow you to modify and resubmit the version. ";
|
$sMsg .= "A link to your queue of applications and versions will also show up on the left hand side of the Appdb site once you have logged in. ";
|
||||||
$sMsg .= "A link to your queue of applications and versions will also show up on the left hand side of the Appdb site once you have logged in. ";
|
$sMsg .= APPDB_ROOT."appsubmit.php?sub=view&apptype=version&versionId=".$this->iVersionId."\n";
|
||||||
$sMsg .= APPDB_ROOT."appsubmit.php?sub=view&apptype=version&versionId=".$this->iVersionId."\n";
|
$sMsg .= "Reason given:\n";
|
||||||
$sMsg .= "Reason given:\n";
|
|
||||||
$sMsg .= $_REQUEST['replyText']."\n"; /* append the reply text, if there is any */
|
|
||||||
}
|
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case "delete":
|
case "delete":
|
||||||
{
|
$sSubject = "Submitted version deleted";
|
||||||
$sSubject = "Submitted version deleted";
|
$sMsg = "The version you submitted (".$oApp->sName." ".$this->sName.") has been deleted.";
|
||||||
$sMsg = "The version you submitted (".$oApp->sName." ".$this->sName.") has been deleted.";
|
$sMsg .= "Reason given:\n";
|
||||||
$sMsg .= "Reason given:\n";
|
|
||||||
$sMsg .= $_REQUEST['replyText']."\n"; /* append the reply text, if there is any */
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
$sMsg .= $_REQUEST['replyText']."\n";
|
$sMsg .= $_REQUEST['replyText']."\n";
|
||||||
@@ -470,9 +462,13 @@ class Version {
|
|||||||
$oSubmitter = new User($this->iSubmitterId);
|
$oSubmitter = new User($this->iSubmitterId);
|
||||||
$sMsg .= "This version has been submitted by ".$oSubmitter->sRealname.".";
|
$sMsg .= "This version has been submitted by ".$oSubmitter->sRealname.".";
|
||||||
$sMsg .= "\n";
|
$sMsg .= "\n";
|
||||||
$sMsg .= "Appdb admin reply text:\n";
|
|
||||||
$sMsg .= $_REQUEST['replyText']."\n"; /* append the reply text, if there is any */
|
|
||||||
}
|
}
|
||||||
|
if($_REQUEST['replyText'])
|
||||||
|
{
|
||||||
|
$sMsg .= "Appdb admin reply text:\n";
|
||||||
|
$sMsg .= $_REQUEST['replyText']."\n"; // append the reply text, if there is any
|
||||||
|
}
|
||||||
|
|
||||||
addmsg("The version was successfully added into the database.", "green");
|
addmsg("The version was successfully added into the database.", "green");
|
||||||
} else // Version queued.
|
} else // Version queued.
|
||||||
{
|
{
|
||||||
@@ -490,11 +486,11 @@ class Version {
|
|||||||
case "delete":
|
case "delete":
|
||||||
$sSubject = "Version '".$this->sName."' of '".$oApp->sName."' has been deleted by ".$_SESSION['current']->sRealname;
|
$sSubject = "Version '".$this->sName."' of '".$oApp->sName."' has been deleted by ".$_SESSION['current']->sRealname;
|
||||||
|
|
||||||
/* if replyText is set we should report the reason the application was deleted */
|
// if replyText is set we should report the reason the application was deleted
|
||||||
if($_REQUEST['replyText'])
|
if($_REQUEST['replyText'])
|
||||||
{
|
{
|
||||||
$sMsg .= "Reason given:\n";
|
$sMsg .= "Reason given:\n";
|
||||||
$sMsg .= $_REQUEST['replyText']."\n"; /* append the reply text, if there is any */
|
$sMsg .= $_REQUEST['replyText']."\n"; // append the reply text, if there is any
|
||||||
}
|
}
|
||||||
|
|
||||||
addmsg("Version deleted.", "green");
|
addmsg("Version deleted.", "green");
|
||||||
@@ -503,11 +499,11 @@ class Version {
|
|||||||
$sSubject = "Version '".$this->sName."' of '".$oApp->sName."' has been rejected by ".$_SESSION['current']->sRealname;
|
$sSubject = "Version '".$this->sName."' of '".$oApp->sName."' has been rejected by ".$_SESSION['current']->sRealname;
|
||||||
$sMsg .= APPDB_ROOT."appsubmit.php?apptype=application&sub=view&versionId=".$this->iVersionId."\n";
|
$sMsg .= APPDB_ROOT."appsubmit.php?apptype=application&sub=view&versionId=".$this->iVersionId."\n";
|
||||||
|
|
||||||
/* if replyText is set we should report the reason the application was rejected */
|
// if replyText is set we should report the reason the version was rejected
|
||||||
if($_REQUEST['replyText'])
|
if($_REQUEST['replyText'])
|
||||||
{
|
{
|
||||||
$sMsg .= "Reason given:\n";
|
$sMsg .= "Reason given:\n";
|
||||||
$sMsg .= $_REQUEST['replyText']."\n"; /* append the reply text, if there is any */
|
$sMsg .= $_REQUEST['replyText']."\n"; // append the reply text, if there is any
|
||||||
}
|
}
|
||||||
|
|
||||||
addmsg("Version rejected.", "green");
|
addmsg("Version rejected.", "green");
|
||||||
|
|||||||
Reference in New Issue
Block a user