<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Update Name/Version Mobile Device Tool</title>
<!--
<link rel="stylesheet" type="text/css" href="tool-name_files/reset.css" media="screen">
<link rel="stylesheet" type="text/css" href="tool-name_files/main_style.css" media="screen">
<link rel="stylesheet" type="text/css" href="tool-name_files/layout.css" media="screen">
<script src="jquery-1.10.2.js"></script>
<script src="jquery-ui.js"></script>
-->
<link rel="stylesheet" type="text/css" href="../css/reset.css" media="screen" />
<link rel="stylesheet" type="text/css" href="../css/main_style.css" media="screen" />
<link rel="stylesheet" type="text/css" href="../css/layout.css" media="screen" />
<script>
function ck_mobile(f)
{
	var r =f.elements['selected_device'];
	if (r[r.length-1].checked) {
		mess = ''
		if (f.model.value == '') mess += '\nYou need to enter phome model'
		if (f.make.value == '') mess += '\nYou need to enter phome make'
		if (f.os_version.value == '') mess += '\nYou need to enter phome OS version'
		if (f.firmware.value == '') mess += '\nYou need to enter phome firmware'
		if (mess == '') return true
		alert (mess)
		return false
	}
	return true
}
function ck_selection(f)
{
#	ok = false
	ok = true
	var r =f.elements['selected_device'];
	for (ix = 0, lx = r.length; ix < lx; ix++){
		if (r[ix].checked) {ok = true}
	}
	if (ok) return true
	alert('No device selected, You have to select a device');
	alert(r)
	return false;
}
function ck_selection1(f)
{
	mess = 'fix this mess';
	if (f.selected_device.value == '')
	{
		alert('You need to select a device');
		return false;
	}
	mess += ':\n'+f;
	mess += ':\n'+f.selected_device[0].value;
	alert(mess+': '+f.selected_device.value);
	return false;
}
function ck_tool (f)
{
	mess = '';
	if (f.toolname.value == '') {mess += 'You need to enter tool name.';};
	if (f.toolversion.value == '') {mess += '\nYou need to enter tool version.';};
	if (mess == '' ) {return true;};
	alert(mess);
	return false;
}
</script>
<style>
	table, th, td {
	   border-collapse: collapse;
	   border: 1px solid black;
	   } 
	tr {
	   border-collapse: collapse;
	   border: 2px solid black;
	   } 
</style>
</head>
<body id="menu1">
	<div id="mainWrapper">
		<div id="topBannerContainer">
			<div id="logoContainer">
  				<img src="../images/banner.png" alt="CFTT Federated Testing - NIST">
			</div>
            <!-- Menu Starts-->
			<div id="menuContainer">
                          <?php
                                include '../include/global.php';
                                print_main_horizontal_menu_contents();
                          ?>

    		</div>
            <!-- Menu Ends-->
		</div>
		<!-- TopBanner Ends-->
	  
		<!-- Main Content Starts-->	
		<div id="subContentContainer">
		  <div id="leftContent">
		    <div id="leftLinks">
<div>
<?php
include '../include/mdt-global.php';
?>
	<!--
	<ul>
	 <h1>Select a Mobile Device Testing Task</h1>
	<a style="font-size:1.15em;" href="mdt.php" class="html"><li id="function1nav" class="leftNavBottom">
	Mobile Device Home <img src="tool-name_files/home-16x16.png" alt="Home" height="16" width="16"></li></a>

	<a style="font-size:1.15em;" href="http://localhost/diskimaging/formatyourthumb.php" class="html"><li id="function1nav" class="leftNavBottom">Format FT-LOGS Flash Drive
	</li></a>

	<a style="font-size:1.15em;" href="http://localhost/cgi-bin/ft_mdt_record_tool.py" class="html"><li id="function1nav" class="leftNavBottom">
	Enter tool name and version</li></a>


	<a style="font-size:1.15em;" href="http://localhost/cgi-bin/ft_mdt_edit_devices.py" class="html"><li id="function1nav" class="leftNavBottom">
	Create/Edit Mobile Device List</li></a>

	 <a style="font-size:1.15em;" href="http://localhost/cgi-bin/ft_mdt_select_setup.py" class="html"><li id="function1nav" class="leftNavBottom">
	Record Device Setup</li></a>

	 <a style="font-size:1.15em;" href="http://localhost/cgi-bin/ft_mdt_select_results.py" class="html"><li id="function1nav" class="leftNavBottom">
	Record Device Test Results</li></a>

	<a style="font-size:1.15em;" href="http://localhost/cgi-bin/ft_mdt_prt_test_report.py" class="html"><li id="function1nav" class="leftNavBottom">Generate a Test Report</li></a>
	</ul>
-->




		    </div>
		    </div>
		  </div>			
		  <div id="rightContent">
<!--		    <div id="breadcrumb"><a href="../Federated_Testing_Home_Page.php">Home</a> > Test a disk imaging tool</div>-->
		    <div id="breadcrumb"><a href="../Federated_Testing_Home_Page.php" class="nav">Home</a> &gt; Mobile Device Home</div>
			
<!------------------------------------------------------------- -->

<h1>Update Test Device List</h1>
<div style="padding: 0em 1em .25em .5em; background: #eeeeee url(/images/ui-bg_highlight-soft_100_eeeeee_1x100.png) 50% top repeat-x;">


<!--                FILL in Here                -->

<?php
$have_phones = FALSE;
$root = "/media/FT-LOGS";
if (!file_exists($root)) $root = "/tmp";
$dname = sprintf ("%s/devices.txt",$root);
if (file_exists($dname)){
	$dfile = fopen($dname,"r");
	/*
	echo "<br>open<br>";
	*/
	$p_line = fgets($dfile);
	while (!feof($dfile)){
		/*
		printf ("<br>LINE: %s",$p_line);
		*/
		$the_phones [] = $p_line;
		$p_line = fgets($dfile);
		$have_phones = TRUE;
	}
}
echo "<br>Start of phone list";
if ($have_phones)
	{ echo '<br>have phones';
	foreach ($the_phones as $q){
		$p = explode(';',$q);
		echo "<br>";
		echo $p[0];
		echo ' ';
		echo $p[1];
		printf (" %s %s\n",$p[2],$p[3]);
	}
}
else { echo '<br>No phones';}
echo "<br>End of phone list<br>";
?>


<!------------------------------------------------------------- -->
</div>		        
		</div>
		<div class="push"></div>
	</div>
    <!-- Footer Starts-->
   <!-- Footer Starts-->
        <?php
     $fn = $_SERVER["SCRIPT_FILENAME"];
          print_footer_contents($fn);
        ?>
    <!-- Footer Ends-->

    <!-- Footer Ends-->
<!--
	<div class="footer"><div class="footerContentsWrapper"><p>The National Institute of Standards and Technology (NIST) is an agency of
 the U.S. Commerce Department.</p><br><br><p class="links"><a href="../Federated_Testing_Home_Page.php">Home</a>
 &nbsp;/&nbsp; <a href="http://localhost/about.php">About</a> &nbsp;/&nbsp;
<a href="mobile-definitions.html">Glossary of Mobile Device Terms</a>
&nbsp;/&nbsp; <a href="http://localhost/FAQ.php">FAQs</a> &nbsp;/&nbsp;
<a href="http://localhost/contacts.php">Contacts</a><br><br>Federated Testing Version:
1.1-3<br>Release Date: --/--/201-</p></div></div>    <!-- Footer Ends-->



</div></body></html>
