summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorprashantsinalkar2017-02-28 15:03:06 +0530
committerprashantsinalkar2017-02-28 15:03:06 +0530
commitf43c880366b90fc11a1540e17235c9ddd471ddc1 (patch)
treea2b99627997cfa4ff523f91337acd30c6b0d490b
parent496be134a1b5c14a854d0dad992916855976e681 (diff)
downloaddwsim_flowsheet-f43c880366b90fc11a1540e17235c9ddd471ddc1.tar.gz
dwsim_flowsheet-f43c880366b90fc11a1540e17235c9ddd471ddc1.tar.bz2
dwsim_flowsheet-f43c880366b90fc11a1540e17235c9ddd471ddc1.zip
fixed email template issue
-rwxr-xr-xemail.inc98
1 files changed, 9 insertions, 89 deletions
diff --git a/email.inc b/email.inc
index 55c20db..a8b34e1 100755
--- a/email.inc
+++ b/email.inc
@@ -17,23 +17,6 @@ function dwsim_flowsheet_mail($key, &$message, $params)
$query->range(0, 1);
$proposal_data = $query->execute()->fetchObject();
$user_data = user_load($params['dwsim_flowsheet_proposal_received']['user_id']);
- if ($proposal_data->user_defined_compounds_used_in_process == NULL)
- {
- $user_defined_compounds_used_in_process = "Not Entered";
- } //$proposal_data->user_defined_compounds_used_in_process == NULL
- else
- {
- $user_defined_compounds_used_in_process = $proposal_data->user_defined_compounds_used_in_process;
- }
- if ($proposal_data->user_defined_compound_filepath == "NULL")
- {
- $file_name = "File not uploaded";
- } //$proposal_data->user_defined_compound_filepath == NULL
- else
- {
- $file_name = basename($proposal_data->user_defined_compound_filepath);
- }
-
if ($proposal_data->project_guide_name == "NULL" || $proposal_data->project_guide_name == "")
{
$project_guide_name = "Not Entered";
@@ -102,23 +85,7 @@ FOSSEE,IIT Bombay', array(
$query->range(0, 1);
$proposal_data = $query->execute()->fetchObject();
$user_data = user_load($params['dwsim_flowsheet_proposal_disapproved']['user_id']);
- if ($proposal_data->user_defined_compounds_used_in_process == NULL)
- {
- $user_defined_compounds_used_in_process = "Not Entered";
- } //$proposal_data->user_defined_compounds_used_in_process == NULL
- else
- {
- $user_defined_compounds_used_in_process = $proposal_data->user_defined_compounds_used_in_process;
- }
- if ($proposal_data->user_defined_compound_filepath == "NULL")
- {
- $file_name = "File not uploaded";
- } //$proposal_data->user_defined_compound_filepath == NULL
- else
- {
- $file_name = basename($proposal_data->user_defined_compound_filepath);
- }
- if ($proposal_data->project_guide_name == "NULL")
+ if ($proposal_data->project_guide_name == "NULL" || $proposal_data->project_guide_name == "")
{
$project_guide_name = "Not Entered";
} //$proposal_data->project_guide_name == NULL
@@ -126,7 +93,7 @@ FOSSEE,IIT Bombay', array(
{
$project_guide_name = $proposal_data->project_guide_name;
}
- if ($proposal_data->project_guide_email_id == "NULL")
+ if ($proposal_data->project_guide_email_id == "NULL" || $proposal_data->project_guide_email_id == "")
{
$project_guide_email_id = "Not Entered";
} //$proposal_data->project_guide_email_id == NULL
@@ -188,23 +155,7 @@ FOSSEE,IIT Bombay', array(
$query->range(0, 1);
$proposal_data = $query->execute()->fetchObject();
$user_data = user_load($params['dwsim_flowsheet_proposal_approved']['user_id']);
- if ($proposal_data->user_defined_compounds_used_in_process == NULL)
- {
- $user_defined_compounds_used_in_process = "Not Entered";
- } //$proposal_data->user_defined_compounds_used_in_process == NULL
- else
- {
- $user_defined_compounds_used_in_process = $proposal_data->user_defined_compounds_used_in_process;
- }
- if ($proposal_data->user_defined_compound_filepath == "NULL")
- {
- $file_name = "File not uploaded";
- } //$proposal_data->user_defined_compound_filepath == NULL
- else
- {
- $file_name = $params['dwsim_flowsheet_proposal_approved']['file_name'];
- }
- if ($proposal_data->project_guide_name == "NULL")
+ if ($proposal_data->project_guide_name == "NULL" || $proposal_data->project_guide_name == "")
{
$project_guide_name = "Not Entered";
} //$proposal_data->project_guide_name == NULL
@@ -212,7 +163,7 @@ FOSSEE,IIT Bombay', array(
{
$project_guide_name = $proposal_data->project_guide_name;
}
- if ($proposal_data->project_guide_email_id == "NULL")
+ if ($proposal_data->project_guide_email_id == "NULL" || $proposal_data->project_guide_email_id == "")
{
$project_guide_email_id = "Not Entered";
} //$proposal_data->project_guide_email_id == NULL
@@ -271,23 +222,7 @@ FOSSEE,IIT Bombay', array(
$query->range(0, 1);
$proposal_data = $query->execute()->fetchObject();
$user_data = user_load($params['dwsim_flowsheet_proposal_approved']['user_id']);
- if ($proposal_data->user_defined_compounds_used_in_process == NULL)
- {
- $user_defined_compounds_used_in_process = "Not Entered";
- } //$proposal_data->user_defined_compounds_used_in_process == NULL
- else
- {
- $user_defined_compounds_used_in_process = $proposal_data->user_defined_compounds_used_in_process;
- }
- if ($proposal_data->user_defined_compound_filepath == "NULL")
- {
- $file_name = "File not uploaded";
- } //$proposal_data->user_defined_compound_filepath == NULL
- else
- {
- $file_name = $params['dwsim_flowsheet_proposal_approved']['file_name'];
- }
- if ($proposal_data->project_guide_name == "NULL")
+ if ($proposal_data->project_guide_name == "NULL" || $proposal_data->project_guide_name == "")
{
$project_guide_name = "Not Entered";
} //$proposal_data->project_guide_name == NULL
@@ -295,7 +230,7 @@ FOSSEE,IIT Bombay', array(
{
$project_guide_name = $proposal_data->project_guide_name;
}
- if ($proposal_data->project_guide_email_id == "NULL")
+ if ($proposal_data->project_guide_email_id == "NULL" || $proposal_data->project_guide_email_id == "")
{
$project_guide_email_id = "Not Entered";
} //$proposal_data->project_guide_email_id == NULL
@@ -350,23 +285,8 @@ FOSSEE,IIT Bombay', array(
$query->range(0, 1);
$proposal_data = $query->execute()->fetchObject();
$user_data = user_load($params['dwsim_flowsheet_proposal_deleted']['user_id']);
- if ($proposal_data->user_defined_compounds_used_in_process == NULL)
- {
- $user_defined_compounds_used_in_process = "Not Entered";
- } //$proposal_data->user_defined_compounds_used_in_process == NULL
- else
- {
- $user_defined_compounds_used_in_process = $proposal_data->user_defined_compounds_used_in_process;
- }
- if ($proposal_data->user_defined_compound_filepath == "NULL")
- {
- $file_name = "File not uploaded";
- } //$proposal_data->user_defined_compound_filepath == NULL
- else
- {
- $file_name = $params['dwsim_flowsheet_proposal_approved']['file_name'];
- }
- if ($proposal_data->project_guide_name == "NULL")
+
+ if ($proposal_data->project_guide_name == "NULL" || $proposal_data->project_guide_name == "")
{
$project_guide_name = "Not Entered";
} //$proposal_data->project_guide_name == NULL
@@ -374,7 +294,7 @@ FOSSEE,IIT Bombay', array(
{
$project_guide_name = $proposal_data->project_guide_name;
}
- if ($proposal_data->project_guide_email_id == "NULL")
+ if ($proposal_data->project_guide_email_id == "NULL" || $proposal_data->project_guide_email_id == "")
{
$project_guide_email_id = "Not Entered";
} //$proposal_data->project_guide_email_id == NULL