include "../includes/db_lib.php"; $file_name = $_REQUEST['fl']; $file_name_and_extension = explode('.', $file_name); $file_name_parts = explode("_", $file_name_and_extension['0']); $count = 0; if ($file_name_parts[0] == 'blis') { $count++; } if ($file_name_parts[2] == 'backup') { $count++; } if (is_numeric($file_name_parts[1])) { $count++; } if (is_numeric($file_name_parts[1])) { $last = get_last_import_date(intval($file_name_parts[1])); if (isset($last)) { $last = date('F j, Y g:i a', strtotime($last)); } else { $last = 'Never'; } } else { $last = "Unknown"; } $lname = "Unknown"; if (is_numeric($file_name_parts[1])) { $lab_obj = LabConfig::getById(intval($file_name_parts[1])); if (isset($lab_obj)) { $lname = $lab_obj->name; } }
public function getLabConfigTableImported($lab_config_list) { # Returns HTML table of site/locations # Called from lab_configs.php if(count($lab_config_list) == 0) { echo "<div class='sidetip_nopos'>".LangUtil::$generalTerms['MSG_NOTFOUND']."</div>"; return; } ?> <table class='hor-minimalist-b' style='width:950px;'> <thead> <tr valign='top'> <th> # </th> <th> <?php echo LangUtil::$generalTerms['FACILITY']; ?> </th> <th> <?php echo LangUtil::$generalTerms['LOCATION']; ?> </th> <th> <?php echo LangUtil::$generalTerms['LAB_MGR']; ?> </th> <th> <?php echo "Last Import Date"; ?> </th> <th> </th> </tr> </thead> <tbody> <?php $count = 1; foreach($lab_config_list as $lab_config) { ?> <tr valign='top'> <td> <?php echo $count; ?>. </td> <!--<td> <a href='lab_config_home.php?id=<?php echo $lab_config->id; ?>' title='Click to Manage Lab Configuration'><?php echo $lab_config->name; ?></a> </td>--> <td> <?php echo $lab_config->name; ?> </td> <td> <?php echo $lab_config->location; ?> </td> <td> <?php echo get_username_by_id($lab_config->adminUserId); ?> </td> <td> <?php echo get_last_import_date($lab_config->id); ?> </td> <td> <a rel='facebox' href='lab_config_status.php?id=<?php echo $lab_config->id; ?>' title='Click to view pending tests at the lab'><?php echo LangUtil::$generalTerms['LAB_STATUS']; ?></a> </td> <!--<td> <a href='lab_config_home.php?id=<?php echo $lab_config->id; ?>' title='Click to Manage Lab Configuration'><?php echo LangUtil::$generalTerms['MANAGE']; ?></a> </td> <td> <a href='switchto_tech.php?id=<?php echo $lab_config->id; ?>' title='Click to perform technician tasks in this lab'><?php echo LangUtil::$generalTerms['SWITCH_TOTECH']; ?></a> </td>--> <!-- <td> <a href="javascript:delete_lab_config('<?php #echo $lab_config->getSiteName(); ?>', <?php #echo $lab_config->id; ?>);" title='Click to Delete Lab Configuration' > Delete </a> </td> --> </tr> <?php $count++; } ?> </tbody> </table> <?php }