<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>CFTT Federated Testing CD - test a  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();
                          ?>

<!--
 	<ul id="menu">
	 <li><a id="menu1nav" href="../Federated_Testing_Home_Page.php">Home</a></li>
	 <li><a id="menu3nav" href="http://localhost/about.php">About</a></li>
	 <li><a id="menu3nav" href="mobile-definitions.html">Glossary of Mobile Device Terms</a></li>
	 <li><a id="menu2nav" href="http://localhost/cgi-bin/FAQ.php">FAQs</a></li>
	 <li><a id="menu4nav" href="http://localhost/contacts.php">Contacts</a></li>
	</ul>
-->
    		</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 Testing Home</div>
			

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

<!-- ======================================================== -->



<h1>Describe Mobile Devices</h1>
<p>Use this page to either:
</p><ul>
<li>Enter the description of a device by selecting <b>Describe A Device</b> from the Known Mobile Devices
Table. Fill out the description fields below the Known Devices Table.
<li>As for testing SIM/UCCI card acquisition, this is optional. If you want to test SIM/UICC card acquisition, 
select one or more phones that have a SIM/UICC card.
</li><li>Edit an existing device description by selecting the device you want to change from the Known Devices
Table and filling out only the description fields that you want to change. If you
leave a field blank then the current value of the field is unchanged. The OS, Network and SIM/UICC
fields have default values and must always be set to the value you want.
</li><li>Click on <b>Update Selected Device</b> or <b>Add New Device</b> to apply the changes.
</li></ul>

<form method="POST" onsubmit="return ck_mobile(this)" action="ft_mdt_update_devices.php">

<?php
$have_phones = FALSE;
if (file_exists("/FedTest/media/FT-LOGS/devices.txt")){
	$dfile = fopen("/FedTest/media/FT-LOGS/devices.txt","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>";
*/
?>

<br>
<table>
<caption>
Known Mobile Devices
</caption>
<tbody><tr>
<th>Select</th>
<th>Make</th>
<th>Model</th>
<th>OS</th>
<th>Version</th>
<th>Firmware</th>
<th>Network</th>
<th>SIM/UICC</th>
</tr>
<!--
<tr> <td> <input name="selected_device" value="phone01" type="radio"> </td>
<td> ****MAKER*** </td>
<td> ****MODEL**** </td>
<td> iOS </td>
<td> ****OS-VERSION*** </td>
<td> ****FIRMWARE**** </td>
<td> CDMA </td>
<td> SIM/UICC </td>
</tr>
-->

<?php
if ($have_phones)
	{ 
	foreach ($the_phones as $q){
		$p = explode(';',$q);
		printf ('<tr> <td> <input name="selected_device"');
		printf (' value=%s type="radio"> </td>',$p[0]);
		printf ("<td>%s</td>",$p[1]);
		printf ("<td>%s</td>",$p[2]);
		printf ("<td>%s</td>",$p[3]);
		printf ("<td>%s</td>",$p[4]);
		printf ("<td>%s</td>",$p[5]);
		printf ("<td>%s</td>",$p[6]);
		printf ("<td>%s</td></tr>",$p[7]);
	}
}
?>

<tr>
<td>
<input checked="checked" name="selected_device" value="new_device" type="radio">
</td>
<td colspan="7" align="center">Enter Another Device</td>
</tr>
</tbody></table>
<h2>Make edits or describe new device:</h2>

<p> Enter the device maker: <input name="make" type="text"><br>
</p><p> Enter the device model: <input name="model" type="text"><br>
</p><p>Select the device OS: <select name="os">
<option selected="selected" value="iOS">iOS</option>
<option value="Android">Android</option>
<option value="Other">Other</option>
</select>
</p><p> Enter the device OS Version: <input name="os_version" type="text"><br>
</p><p> Enter the device firmware: <input name="firmware" type="text"><br>
</p><p>Select the device network: <select name="network">
<option selected="selected" value="CDMA">CDMA</option>
<option value="GSM">GSM</option>
</select>
<br>
</p><p><input checked="" name="has_sim" value="sim" type="radio"> Test SIM/UICC card acquisition with this phone<br>
<input checked="checked" name="has_sim" value="nosim" type="radio"> No SIM/UICC card<br>
<br></p><p><input value="Update Selected Device" name="update" type="submit">
<input value="Add New Device" name="update" type="submit">
<input value="Delete Selected Device" name="delete" type="submit">

</p></form>

	<p>
	<a href="mdt.php">
	Return to Mobile Device Home Page</a><br>
	</p>
<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>
