<?php
/*

#####################################################################################
# NIST-developed software is provided by NIST as a public service. You may use, 
# copy and distribute copies of the software in any medium, provided that you 
# keep intact this entire notice. You may improve, modify and create derivative 
# works of the software or any portion of the software, and you may copy and 
# distribute such modifications or works. Modified works should carry a notice 
# stating that you changed the software and should note the date and nature of 
# any such change. Please explicitly acknowledge the National Institute of 
# Standards and Technology as the source of the software.
# 
# NIST-developed software is expressly provided “AS IS.” NIST MAKES NO WARRANTY 
# OF ANY KIND, EXPRESS, IMPLIED, IN FACT OR ARISING BY OPERATION OF LAW, 
# INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS 
# FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT AND DATA ACCURACY. NIST NEITHER 
# REPRESENTS NOR WARRANTS THAT THE OPERATION OF THE SOFTWARE WILL BE 
# UNINTERRUPTED OR ERROR-FREE, OR THAT ANY DEFECTS WILL BE CORRECTED. NIST DOES 
# NOT WARRANT OR MAKE ANY REPRESENTATIONS REGARDING THE USE OF THE SOFTWARE OR 
# THE RESULTS THEREOF, INCLUDING BUT NOT LIMITED TO THE CORRECTNESS, ACCURACY, 
# RELIABILITY, OR USEFULNESS OF THE SOFTWARE.
# 
# You are solely responsible for determining the appropriateness of using and 
# distributing the software and you assume all risks associated with its use, 
# including but not limited to the risks and costs of program errors, compliance 
# with applicable laws, damage to or loss of data, programs or equipment, and the 
# unavailability or interruption of operation. This software is not intended to 
# be used in any situation where a failure could cause risk of injury or damage 
# to property. The software developed by NIST employees is not subject to 
# copyright protection within the United States.
#####################################################################################
Author: James R. Lyle
*/
$page_h1 = "Entering String Search Tool Name and Version";
$page_title = "SS Get Tool/Version";
include "ft_ss_need_logs.php";


if ($ftlogs_mounted == 1) { // we did a check for if the user's FT-LOGS drive was mounted in ft_ss_head.php  
	// (via ft_ss_need_logs.php). If the drive's not mounted, suppress/do not print the rest of this page.

	//printf ("<h1> LOG files saved on %s</h1>\n",$root);

	/*
	if (file_exists($root )){
			$need_tool = 0;
		} else {
	include "ft_ss_no_log.php";
	exit;
	}
	*/
	$mess = "";
 	$mess = $_GET["mess"];
	if ($mess == "xx"){
		printf ("<p><b>You can't <i>Run A Test Case</i> until you Enter Tool Name and Version</b>\n");
	}

	$tool_path = $root.'ss_tool.txt';
	/*
	echo '<p>TOOL PATH: ';
	echo $tool_path;
	*/
	$tool_name = '';
	$tool_version = '';
	if (file_exists($tool_path)){
		$tool = file($tool_path);
		$tool_name = $tool[0];
		$tool_version = $tool[1];
	}
	//echo $tool_name,$tool_version;
?>

<!--	<h2>Enter Tool Name &amp; Version</h2>-->
	<div style="padding: 1em 1em 0.5em 1em; background: #eeeeee url(" images="" ui-bg_highlight-soft_100_eeeeee_1x100.png")="" 50%="" top="" repeat-x;"="">
		<p>
		Use this page to record the name and version of the tool you're testing. Click the 'Update Tool Name' button to save the tool name and version to your FT-LOGS log drive.<p>
		<form method="POST"
		action="/stringsearch/ft_ss_update.php">
<?php
	$get_input = <<<END
<p>Enter the tool name:
<input name="toolname" style="background-color:#AAFFAA"
type="text" required value="%s"><br>
</p><p> Enter the tool version:
<input name="toolversion" style="background-color:#AAFFAA" type="text" required value="%s"></p>
END;
	$get_input = <<<END
<p>Enter the tool name: &nbsp;
<input name="toolname" 
type="text" required value="%s"><br>
</p><p> Enter the tool version:
<input name="toolversion" type="text" required value="%s"></p>
END;
	
	printf ($get_input,$tool_name,$tool_version);
?>
		<br>
	</div>
	<br>
	<input type="hidden" name="what" value="Tool">
	<input value="Update Tool Name" type="submit"> </form>
	<br>

<?php
	
}  // endif($ftlogs_mounted==1)
	
include "ft_ss_tail.php";
?>
