Exemplo n.º 1
0
echo $testTypeMapping->name;
?>
</div><div id='commonTestNameError' style='display:none'>
            <label class="error" id="commonTestNameErrorLabel"><small><font color="red"><?php 
echo LangUtil::getGeneralTerm("MSG_REQDFIELD");
?>
</font></small></label>
    </div></td>
       <td> <div id="commonTestNameEdit" class="editLink"> <a onclick="toggle_div('0')">Edit</a></div></td>
    
    </tr>
    <tr><td></td></tr>
    <?php 
$count = 1;
//$siteList = get_site_list($_SESSION['user_id']);
$config_list = get_lab_configs_imported();
foreach ($config_list as $lab_config) {
    //print_r($mapping_list);
    // echo $mapping_list[(int)$lab_config->id].".";
    echo "<tr><td>" . $lab_config->name . "</td>";
    $testTypeList = get_test_types_by_site($lab_config->id);
    $stcheck = $mapping_list[$lab_config->id];
    $tname = "Unassigned";
    echo "<td><div id='labTestName" . $lab_config->id . "' class='variableData' style='display:none;'><select id='testNameSelect{$count}'>";
    foreach ($testTypeList as $testType) {
        if ($testType->testTypeId == $stcheck) {
            $tname = $testType->getName();
            echo "<option value='{$lab_config->id}:{$testType->testTypeId}' selected>" . $testType->getName() . "</option>";
        } else {
            echo "<option value='{$lab_config->id}:{$testType->testTypeId}'>" . $testType->getName() . "</option>";
        }
Exemplo n.º 2
0
	public function getTestCategoryNamesSelector() {
		#Return table which includes dropdowns of test categories configured in all labs in the country
		echo "<table>";
		$count = 1;
		 $config_list = get_lab_configs_imported();
		foreach($config_list as $lab_config) {
			echo "<tr><td>".$lab_config->name."</td>";
			echo "<td><select id='testCategoryNameSelect$count'>";
			$testCategoriesList = get_test_categories($lab_config->id);
			foreach( $testCategoriesList as $testCategoryId => $testCategoryName ) {
				echo "<option value='$lab_config->id:$testCategoryId'>".$testCategoryName."</option>";
			}
			echo "</select></td></tr>";
			$count++;
		}
		echo "<tr><td></td><td></td>";
		echo "</tr>";
		echo "<tr>"; ?>
		<td>Country Category Name:</td>
		<td><input type="text" id="commonTestCategoryName" size="50"></input>
		<div id='commonTestCategoryNameError' style='display:none'>
			<label class="error" id="commonTestCategoryNameErrorLabel"><small><font color="red"><?php echo LangUtil::getGeneralTerm("MSG_REQDFIELD"); ?></font></small></label>
		</div>
		</td>
		</tr>
		<tr>
		<td></td>		
		<td><input type="button" id="submit" type="submit" onclick="submitTestCategoryNames();" value="<?php echo LangUtil::$generalTerms['CMD_SUBMIT']; ?>" size="20" />
		<?
	}
Exemplo n.º 3
0
	dataString = dataString.substring(0, dataString.length-1);
	$('#commonTestNameError').hide();
	$.ajax({
		type: "POST",
		url: "ajax/add_country_level_tests.php",
		data: dataString,
		success: function(data) {
			$('#progress_test_spinner').hide();
			window.location = "country_catalog.php?show_t";
		}
	});
}

function submitTestCategoryNames() {
var count = <?php 
echo count(get_lab_configs_imported());
?>
;
	if( $('#commonTestCategoryName').val() == "") {
		$('#commonTestCategoryNameError').show();
		return;
	}
	$('#progress_tc_spinner').show();
	var dataString = "testCategoryName="+$('#commonTestCategoryName').val();
	dataString += "&labIdTestCategoryId=";
	for( var i=1; i<=count; i++) {
		value = $('#testCategoryNameSelect'+i).val();
		dataString += value+";";
	}
	dataString = dataString.substring(0, dataString.length-1);
	$('#commonTestNameError').hide();
Exemplo n.º 4
0
	&nbsp;&nbsp;
	<a href='javascript:search_labs(1)' id='viewall_link' style='display:none;' title='Click to View All Lab Configurations'><small><?php 
echo LangUtil::$pageTerms['CMD_VIEWALL'];
?>
</small></a>
	&nbsp;&nbsp;
	<span id='lab_search_progress_bar' style='display:none;'>
		<?php 
$page_elems->getProgressSpinner(LangUtil::$generalTerms['CMD_SEARCHING']);
?>
	</span>
</p>
<?php 
$admin_user_id = $_SESSION['user_id'];
$lab_config_list = get_lab_configs($admin_user_id);
$lab_config_list_imported = get_lab_configs_imported();
//print_r($lab_config_list);
//echo "<br>";
//print_r($lab_config_list_imported);
?>
<div id='lab_config_list_imported'>
       <br>
    <b>Lab Backups</b>
	<?php 
$page_elems->getLabConfigTableImported($lab_config_list_imported);
?>
</div>
    <br>
<div id='lab_config_list'>
    <b>Lab Config Templates</b>
	<?php 
Exemplo n.º 5
0
<?php

include "redirect.php";
include "includes/header.php";
// Load all laboratories that will be seen for this particular page.
$director_id = $_SESSION['user_id'];
$lab_array = get_lab_configs_imported($director_id);
$country_name = get_country_from_user_id();
$labs = array();
foreach ($lab_array as $lab) {
    if ($lab != NULL) {
        $lab_id = $lab->id;
        $lab_name = $lab->name;
        $coords = is_lab_placed($lab_id, $director_id);
        $labs[$lab_name] = array($lab_id, $lab_name, $coords);
    }
}
?>
		<script src="js/raphael-min.js"></script>

		<script type="text/javascript">
			function getRandomColorHex()
			{
				var num = Math.floor(Math.random() * 16777215).toString(16);
				var pad = "000000";
				num = pad.substring(0, pad.length - num.length) + num;
				return '#' + num;
			}

			$(document).ready(function() {
				// Start drawing the Map.