diff options
author | Sashi20 | 2019-09-16 11:39:40 +0530 |
---|---|---|
committer | Sashi20 | 2019-09-16 11:39:40 +0530 |
commit | db34ba9fbc2a625d47f957144929706c2bdec653 (patch) | |
tree | 40b255c6caf5c2b29555a04b42a027beb69473c2 /lab_details.inc | |
parent | b8e07a4c41eea64ff50f88fd826c96f1a980b3b3 (diff) | |
download | cfd_lab_migration-db34ba9fbc2a625d47f957144929706c2bdec653.tar.gz cfd_lab_migration-db34ba9fbc2a625d47f957144929706c2bdec653.tar.bz2 cfd_lab_migration-db34ba9fbc2a625d47f957144929706c2bdec653.zip |
Add lab migration module files
Diffstat (limited to 'lab_details.inc')
-rwxr-xr-x | lab_details.inc | 69 |
1 files changed, 69 insertions, 0 deletions
diff --git a/lab_details.inc b/lab_details.inc new file mode 100755 index 0000000..b847f98 --- /dev/null +++ b/lab_details.inc @@ -0,0 +1,69 @@ +<?php +function lab_migration_completed_labs_all() + { + $output = ""; + //$query = "SELECT * FROM {lab_migration_proposal} WHERE approval_status = 3"; + $query = db_select('lab_migration_proposal'); + $query->fields('lab_migration_proposal'); + $query->condition('approval_status', 3); + $result = $query->execute(); + //$result = db_query($query); + if ($result->rowCount() == 0) + { + $output .= "We will in process to update lab migration data"; + } + 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->lab_title, "lab-migration/lab-migration-run/" . $row->id), + $approval_date + ); + $i++; + } + $preference_header = array( + 'No', + 'Institute', + 'Lab', + 'Year' + ); + $output .= theme('table', array( + 'header' => $preference_header, + 'rows' => $preference_rows + )); + } + return $output; + } +function lab_migration_labs_progress_all() + { + $page_content = ""; + //$query = "SELECT * FROM {lab_migration_proposal} WHERE approval_status = 1 and solution_status = 2"; + $query = db_select('lab_migration_proposal'); + $query->fields('lab_migration_proposal'); + $query->condition('approval_status', 1); + $query->condition('solution_status', 2); + $result = $query->execute(); + if ($result->rowCount() == 0) + { + $page_content .= "We will in process to update lab migration data"; + } + else + { + //$result = db_query($query); + $page_content .= "<ol>"; + while ($row = $result->fetchObject()) + { + $page_content .= "<li>"; + $page_content .= $row->university . " ({$row->lab_title})"; + $page_content .= "</li>"; + } + $page_content .= "</ol>"; + } + return $page_content; + } |