diff options
author | prashantsinalkar | 2017-03-03 11:32:30 +0530 |
---|---|---|
committer | prashantsinalkar | 2017-03-03 11:32:30 +0530 |
commit | 33f9be37e7bf0287f6ad12f501462cf7632f21a1 (patch) | |
tree | 3db2eb617db2bbfaa2ad68fabe37911f7e9df229 /flowsheet_details.inc | |
parent | 66eac54bc3cd2bd4ad8a41db7f51e4479671f0b0 (diff) | |
download | dwsim_flowsheet-33f9be37e7bf0287f6ad12f501462cf7632f21a1.tar.gz dwsim_flowsheet-33f9be37e7bf0287f6ad12f501462cf7632f21a1.tar.bz2 dwsim_flowsheet-33f9be37e7bf0287f6ad12f501462cf7632f21a1.zip |
added flowsheet details pages
Diffstat (limited to 'flowsheet_details.inc')
-rwxr-xr-x | flowsheet_details.inc | 70 |
1 files changed, 70 insertions, 0 deletions
diff --git a/flowsheet_details.inc b/flowsheet_details.inc new file mode 100755 index 0000000..e85f03b --- /dev/null +++ b/flowsheet_details.inc @@ -0,0 +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 +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; + } |