summaryrefslogtreecommitdiff
path: root/flowsheet_details.inc
diff options
context:
space:
mode:
authorprashantsinalkar2017-03-03 12:09:11 +0530
committerprashantsinalkar2017-03-03 12:09:11 +0530
commit10d19cc6eca64805e8a80e8115fc1a740e9c354b (patch)
treec3e7a5c4591b3362fca216f0840539545a8fd640 /flowsheet_details.inc
parent33f9be37e7bf0287f6ad12f501462cf7632f21a1 (diff)
downloaddwsim_flowsheet-10d19cc6eca64805e8a80e8115fc1a740e9c354b.tar.gz
dwsim_flowsheet-10d19cc6eca64805e8a80e8115fc1a740e9c354b.tar.bz2
dwsim_flowsheet-10d19cc6eca64805e8a80e8115fc1a740e9c354b.zip
added new text message
Diffstat (limited to 'flowsheet_details.inc')
-rwxr-xr-xflowsheet_details.inc132
1 files changed, 66 insertions, 66 deletions
diff --git a/flowsheet_details.inc b/flowsheet_details.inc
index e85f03b..1626754 100755
--- a/flowsheet_details.inc
+++ b/flowsheet_details.inc
@@ -1,70 +1,70 @@
<?php
// DWSIM Flowsheet display completed proposals
function dwsim_flowsheet_completed_proposals_all()
- {
- $output = "";
- $query = db_select('dwsim_flowsheet_proposal');
- $query->fields('dwsim_flowsheet_proposal');
- $query->condition('approval_status', 3);
- $query->condition('is_completed', 1);
- $result = $query->execute();
- //$result = db_query($query);
- if ($result->rowCount() == 0)
- {
- $output .= "No completed flowsheet proposal available";
- }
- else
- {
- $preference_rows = array();
- $i = 1;
- while ($row = $result->fetchObject())
- {
- $approval_date = date("Y", $row->approval_date);
- $preference_rows[] = array(
- $i,
- $row->university,
- l($row->project_title, "lab-migration/lab-migration-run/" . $row->id),
- $approval_date
- );
- $i++;
- }
- $preference_header = array(
- 'No',
- 'Institute',
- 'Flowsheet Project',
- 'Year'
- );
- $output .= theme('table', array(
- 'header' => $preference_header,
- 'rows' => $preference_rows
- ));
- }
- return $output;
- }
- // DWSIM Flowsheet display in progress proposals
+{
+ $output = "";
+ $query = db_select('dwsim_flowsheet_proposal');
+ $query->fields('dwsim_flowsheet_proposal');
+ $query->condition('approval_status', 3);
+ $query->condition('is_completed', 1);
+ $result = $query->execute();
+ if ($result->rowCount() == 0)
+ {
+ $output .= "Work has been completed for the following flowsheets under Flowsheeting Project<hr>";
+ } //$result->rowCount() == 0
+ else
+ {
+ $output .= "Work has been completed for the following flowsheets under Flowsheeting Project <hr>";
+ $preference_rows = array();
+ $i = 1;
+ while ($row = $result->fetchObject())
+ {
+ $approval_date = date("Y", $row->approval_date);
+ $preference_rows[] = array(
+ $i,
+ l($row->project_title, "flowsheeting-project/dwsim-flowsheet-run/" . $row->id),
+ $row->university,
+ $approval_date
+ );
+ $i++;
+ } //$row = $result->fetchObject()
+ $preference_header = array(
+ 'No',
+ 'Flowsheet Project',
+ 'Institute',
+ 'Year'
+ );
+ $output .= theme('table', array(
+ 'header' => $preference_header,
+ 'rows' => $preference_rows
+ ));
+ }
+ return $output;
+}
+// DWSIM Flowsheet display in progress proposals
function dwsim_flowsheet_progress_all()
- {
- $page_content = "";
- $query = db_select('dwsim_flowsheet_proposal');
- $query->fields('dwsim_flowsheet_proposal');
- $query->condition('approval_status', 1);
- $query->condition('is_completed', 0);
- $result = $query->execute();
- if ($result->rowCount() == 0)
- {
- $page_content .= "Currently no proposals in progress";
- }
- else
- {
- //$result = db_query($query);
- $page_content .= "<ol>";
- while ($row = $result->fetchObject())
- {
- $page_content .= "<li>";
- $page_content .= $row->project_title;
- $page_content .= "</li>";
- }
- $page_content .= "</ol>";
- }
- return $page_content;
- }
+{
+ $page_content = "";
+ $query = db_select('dwsim_flowsheet_proposal');
+ $query->fields('dwsim_flowsheet_proposal');
+ $query->condition('approval_status', 1);
+ $query->condition('is_completed', 0);
+ $result = $query->execute();
+ if ($result->rowCount() == 0)
+ {
+ $page_content .= "Work is in progress for the following flowsheets under Flowsheeting Project<hr>";
+ } //$result->rowCount() == 0
+ else
+ {
+ $page_content .= "Work is in progress for the following flowsheets under Flowsheeting Project<hr>";
+ $page_content .= "<ol>";
+ while ($row = $result->fetchObject())
+ {
+ $page_content .= "<li>";
+ $page_content .= $row->project_title;
+ $page_content .= "</li>";
+ } //$row = $result->fetchObject()
+ $page_content .= "</ol>";
+ }
+ return $page_content;
+}