summaryrefslogtreecommitdiff
path: root/cfd_case_study_details.inc
diff options
context:
space:
mode:
authorSashi202018-06-26 16:00:03 +0530
committerSashi202018-06-26 16:00:03 +0530
commit55766fc5c32b8248432d905a3ede3e5c0e5357e2 (patch)
treef87228d5e91685dae2d8f93e085898e1317dee9f /cfd_case_study_details.inc
parent3ad251945e541ec355f458acdd9bbed6a1150e44 (diff)
downloadcfd_case_study-55766fc5c32b8248432d905a3ede3e5c0e5357e2.tar.gz
cfd_case_study-55766fc5c32b8248432d905a3ede3e5c0e5357e2.tar.bz2
cfd_case_study-55766fc5c32b8248432d905a3ede3e5c0e5357e2.zip
Interface created to propose a new case study project and manage the proposals
Diffstat (limited to 'cfd_case_study_details.inc')
-rwxr-xr-xcfd_case_study_details.inc102
1 files changed, 102 insertions, 0 deletions
diff --git a/cfd_case_study_details.inc b/cfd_case_study_details.inc
new file mode 100755
index 0000000..7ad9e60
--- /dev/null
+++ b/cfd_case_study_details.inc
@@ -0,0 +1,102 @@
+<?php
+// eSim case study display completed proposals
+function cfd_case_study_completed_proposals_all()
+{
+ $output = "";
+ $query = db_select('case_study_proposal');
+ $query->fields('case_study_proposal');
+ $query->condition('approval_status', 3);
+ $query->orderBy('actual_completion_date', 'DESC');
+ //$query->condition('is_completed', 1);
+ $result = $query->execute();
+
+ //var_dump($case_study_abstract);die;
+ if ($result->rowCount() == 0)
+ {
+ $output .= "Work has been completed for the following case study. We welcome your contributions." ."<hr>";
+
+ } //$result->rowCount() == 0
+ else
+ {
+ $output .= "Work has been completed for the following case study. We welcome your contributions." . "<hr>";
+ $preference_rows = array();
+ $i = 1;
+ while ($row = $result->fetchObject())
+ {
+ $proposal_id = $row->id;
+ $query1 = db_select('case_study_submitted_abstracts_file');
+ $query1->fields('case_study_submitted_abstracts_file');
+ $query1->condition('file_approval_status', 1);
+ $query1->condition('proposal_id', $proposal_id);
+ $case_study_files = $query1->execute();
+ $case_study_abstract = $case_study_files->fetchObject();
+ $approval_date = date("Y", $row->approval_date);
+ $preference_rows[] = array(
+ $i,
+ l($row->project_title, "case-study-project/case-study-run/" . $row->id),
+ l('Download', "case-study-project/download/project-file/" . $row->id),
+ $row->contributor_name,
+ $row->university,
+ $approval_date
+ );
+ $i++;
+ } //$row = $result->fetchObject()
+ $preference_header = array(
+ 'No',
+ 'case study Project',
+ 'Abstract File',
+ 'Contributor Name',
+ 'Institute',
+ 'Year'
+ );
+ $output .= theme('table', array(
+ 'header' => $preference_header,
+ 'rows' => $preference_rows
+ ));
+ }
+ return $output;
+}
+// eSim case study display in progress proposals
+function cfd_case_study_progress_all()
+{
+ $page_content = "";
+ $query = db_select('case_study_proposal');
+ $query->fields('case_study_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 case study under case study Project<hr>";
+ } //$result->rowCount() == 0
+ else
+ {
+ $page_content .= "Work is in progress for the following case study under case study 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',
+ 'case study Project',
+ 'Contributor Name',
+ 'Institute',
+ 'Year'
+ );
+ $page_content .= theme('table', array(
+ 'header' => $preference_header,
+ 'rows' => $preference_rows
+ ));
+ }
+ return $page_content;
+}