diff options
author | Sashi20 | 2018-10-12 12:44:09 +0530 |
---|---|---|
committer | Sashi20 | 2018-10-12 12:44:09 +0530 |
commit | 7dcdf4160a48f53f3312d3461add0d8a6a61536f (patch) | |
tree | e2ecc4b9c3c5bb8804dcf866e69d0fc9144c579e /pssp_details.inc | |
parent | 4d7d7ebab467cd373dd9d71e36dea67c24c7ba56 (diff) | |
download | om_pssp-7dcdf4160a48f53f3312d3461add0d8a6a61536f.tar.gz om_pssp-7dcdf4160a48f53f3312d3461add0d8a6a61536f.tar.bz2 om_pssp-7dcdf4160a48f53f3312d3461add0d8a6a61536f.zip |
created proposal submission interface
Diffstat (limited to 'pssp_details.inc')
-rw-r--r-- | pssp_details.inc | 100 |
1 files changed, 100 insertions, 0 deletions
diff --git a/pssp_details.inc b/pssp_details.inc new file mode 100644 index 0000000..179a060 --- /dev/null +++ b/pssp_details.inc @@ -0,0 +1,100 @@ +<?php +function om_pssp_completed_proposals_all() +{ + $output = ""; + $query = db_select('om_pssp_proposal'); + $query->fields('om_pssp_proposal'); + $query->condition('approval_status', 3); + $query->orderBy('actual_completion_date', 'DESC'); + //$query->condition('is_completed', 1); + $result = $query->execute(); + + if ($result->rowCount() == 0) + { + $output .= "Work has been completed for the following power system simulation. We welcome your contributions." ."<hr>"; + + } //$result->rowCount() == 0 + else + { + $output .= "Work has been completed for the following power system simulation. We welcome your contributions." . "<hr>"; + $preference_rows = array(); + $i = 1; + while ($row = $result->fetchObject()) + { + $proposal_id = $row->id; + $query1 = db_select('om_pssp_submitted_abstracts_file'); + $query1->fields('om_pssp_submitted_abstracts_file'); + $query1->condition('file_approval_status', 1); + $query1->condition('proposal_id', $proposal_id); + $esim_project_files = $query1->execute(); + $esim_project_abstract = $esim_project_files->fetchObject(); + $approval_date = date("Y", $row->approval_date); + $preference_rows[] = array( + $i, + l($row->project_title, "powersystems/pssp/om-pssp-run/" . $row->id), + l('Download', "powersystems/pssp/download/project-file/" . $row->id), + $row->contributor_name, + $row->university, + $approval_date + ); + $i++; + } //$row = $result->fetchObject() + $preference_header = array( + 'No', + 'power system simulation Project', + 'Abstract File', + 'Contributor Name', + 'Institute', + 'Year' + ); + $output .= theme('table', array( + 'header' => $preference_header, + 'rows' => $preference_rows + )); + } + return $output; +} +// eSim power system simulation display in progress proposals +function om_pssp_progress_all() +{ + $page_content = ""; + $query = db_select('om_pssp_proposal'); + $query->fields('om_pssp_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 power system simulation under power system simulation Project<hr>"; + } //$result->rowCount() == 0 + else + { + $page_content .= "Work is in progress for the following power system simulation under power system simulation Project<hr>"; + $preference_rows = array(); + $i = 1; + while ($row = $result->fetchObject()) + { + $approval_date = date("Y", $row->approval_date); + $preference_rows[] = array( + $i, + $row->project_title, + $row->contributor_name, + $row->university, + $approval_date + ); + $i++; + } //$row = $result->fetchObject() + $preference_header = array( + 'No', + 'power system simulation Project', + 'Contributor Name', + 'Institute', + 'Year' + ); + $page_content .= theme('table', array( + 'header' => $preference_header, + 'rows' => $preference_rows + )); + } + return $page_content; +}
\ No newline at end of file |