summaryrefslogtreecommitdiff
path: root/lab_details.inc
diff options
context:
space:
mode:
authorSashi202019-03-20 12:18:54 +0530
committerSashi202019-03-20 12:18:54 +0530
commit21cfc2425884841b69969a6cddccd5201f053808 (patch)
tree8bcbe42d0a9a4ced047c3d2ca58f50169c1f27bd /lab_details.inc
downloadesim_lab_migration-21cfc2425884841b69969a6cddccd5201f053808.tar.gz
esim_lab_migration-21cfc2425884841b69969a6cddccd5201f053808.tar.bz2
esim_lab_migration-21cfc2425884841b69969a6cddccd5201f053808.zip
Initiated repo for esim lab migration
Diffstat (limited to 'lab_details.inc')
-rwxr-xr-xlab_details.inc40
1 files changed, 40 insertions, 0 deletions
diff --git a/lab_details.inc b/lab_details.inc
new file mode 100755
index 0000000..59898da
--- /dev/null
+++ b/lab_details.inc
@@ -0,0 +1,40 @@
+<?php
+ function lab_migration_completed_labs_all() {
+ $page_content = "";
+ //$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);
+ $proposal_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_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();
+ //$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;
+ }
+?>