summaryrefslogtreecommitdiff
path: root/lab_details.inc
diff options
context:
space:
mode:
authorprashant2015-11-04 19:06:22 +0530
committerprashant2015-11-04 19:06:22 +0530
commit1ba859d4f6b4fc64ac51eadc6bc1a5fa40869590 (patch)
tree1b4947d59b876ad80c053b0432250720b8e4207f /lab_details.inc
parentdee787c3aa6237b6bf732cdcd205265d10f26b97 (diff)
downloadDWSIM_lab_migration_module-1ba859d4f6b4fc64ac51eadc6bc1a5fa40869590.tar.gz
DWSIM_lab_migration_module-1ba859d4f6b4fc64ac51eadc6bc1a5fa40869590.tar.bz2
DWSIM_lab_migration_module-1ba859d4f6b4fc64ac51eadc6bc1a5fa40869590.zip
changed mail functions and formated the code
Diffstat (limited to 'lab_details.inc')
-rwxr-xr-xlab_details.inc46
1 files changed, 22 insertions, 24 deletions
diff --git a/lab_details.inc b/lab_details.inc
index 9c4db1e..66e35dd 100755
--- a/lab_details.inc
+++ b/lab_details.inc
@@ -1,6 +1,6 @@
<?php
function lab_migration_completed_labs_all()
-{
+ {
$output = "";
//$query = "SELECT * FROM {lab_migration_proposal} WHERE approval_status = 3";
$query = db_select('lab_migration_proposal');
@@ -8,15 +8,16 @@ function lab_migration_completed_labs_all()
$query->condition('approval_status', 3);
$result = $query->execute();
//$result = db_query($query);
-
- if ($result->rowCount() == 0) {
-
+ if ($result->rowCount() == 0)
+ {
$output .= "We will in process to update lab migration data";
-
- } else {
+ }
+ else
+ {
$preference_rows = array();
$i = 1;
- while ($row = $result->fetchObject()) {
+ while ($row = $result->fetchObject())
+ {
$approval_date = date("Y", $row->approval_date);
$preference_rows[] = array(
$i,
@@ -25,7 +26,7 @@ function lab_migration_completed_labs_all()
$approval_date
);
$i++;
- }
+ }
$preference_header = array(
'No',
'Institute',
@@ -36,13 +37,11 @@ function lab_migration_completed_labs_all()
'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');
@@ -50,23 +49,22 @@ function lab_migration_labs_progress_all()
$query->condition('approval_status', 1);
$query->condition('solution_status', 2);
$result = $query->execute();
-
- if ($result->rowCount() == 0) {
-
+ if ($result->rowCount() == 0)
+ {
$page_content .= "We will in process to update lab migration data";
-
- } else {
+ }
+ else
+ {
//$result = db_query($query);
$page_content .= "<ol>";
- while ($row = $result->fetchObject()) {
+ while ($row = $result->fetchObject())
+ {
$page_content .= "<li>";
$page_content .= $row->university . " ({$row->lab_title})";
$page_content .= "</li>";
- }
+ }
$page_content .= "</ol>";
- }
+ }
return $page_content;
-}
-
-
+ }
?>