<?php
# ---------------------------------------------------------------------
# rth is a requirement, test, and bugtracking system
# Copyright (C) 2005 George Holbrook - rth@lists.sourceforge.net
# This program is distributed under the terms and conditions of the GPL
# See the README and LICENSE files for details
#----------------------------------------------------------------------
# ---------------------------------------------------------------------
# Test Step Import Page
#
# $RCSfile: results_remote_execution_page.php,v $  
# $Revision: 1.1 $
# ---------------------------------------------------------------------

include"./api/include_api.php";
auth_authenticate_user();

$page					= basename(__FILE__);
$s_user_properties		= session_get_user_properties();
$s_project_properties   = session_get_project_properties();
$project_name           = $s_project_properties['project_name'];
$project_id				= $s_project_properties['project_id'];
$testset_id				= $_GET['testset_id'];
$testset_id				= util_pad_id( $testset_id);
$testset_name			= testset_get_name( $testset_id );


html_window_title();
html_print_body();
html_page_title($project_name ." - ". lang_get('remote_execution_page') );
//html_page_header( $db, $project_name );

error_report_check( $_GET );

print"<br>";
print"<div align='center'>\n";
print"<table class=width90 rules=cols>";
print"<tr class='tbl_header'>";
html_tbl_print_header( lang_get('testset_id') );
html_tbl_print_header( lang_get('testset_name') );
print"</tr>";

print"<tr>";
print"<td class='tbl-c'>$testset_id</a></td>";
print"<td class='tbl-c'>$testset_name</td>";
print"</tr>";
print"</table>";
print"<br><br>";

# EXAMPLE TEMPLATE
/*
print"<table border=0 width='90%' align=center>";
print"<tr colspan='4'>\n";
print"<td><b>". lang_get('correct_file_format') .":</b></td>\n";
print"</tr>\n";
print"</table>\n";

# SAMPLE FILE
print"<table border=1 width='90%' rules=cols align=center>";

print"<tr style='font-weight:bold' class='tbl-header'>\n";
print"<th nowrap>". lang_get('run') ."</td>\n";
print"<th nowrap>". lang_get('test_name') ."</td>\n";
print"<th nowrap>". lang_get('test_path') ."</td>\n";
print"<th nowrap>". lang_get('parameters') ."</td>\n";
print"<th nowrap>". lang_get('priority') ."</td>\n";
print"<th nowrap>". lang_get('machine_name') ."</td>\n";
print"</tr>\n";

print"<tr class='row-1'>\n";
print"<td>Yes</td>\n";
print"<td>Demo Test1</td>";
print"<td>C:\Sandbox\Tests\DemoTestOne</td>";
print"<td>x=1#y=2</td>\n";
print"<td>1</td>\n";
print"<td>10.110.90.10</td>\n";
print"</tr>\n";

print"<tr class='row-2'>\n";
print"<td>Yes</td>\n";
print"<td>Demo Test2</td>";
print"<td>C:\Sandbox\Tests\DemoTestTwo</td>";
print"<td>x=3#y=4</td>\n";
print"<td>2</td>\n";
print"<td>10.110.90.10</td>\n";
print"</tr>\n";

print"<tr class='row-1'>\n";
print"<td>Yes</td>\n";
print"<td>Demo Test3</td>";
print"<td>C:\Sandbox\Tests\DemoTestThree</td>";
print"<td>user=johnny#password=rotten</td>\n";
print"<td>1</td>\n";
print"<td>10.110.90.21</td>\n";
print"</tr>\n";

print"<tr class='row-2'>\n";
print"<td>No</td>\n";
print"<td>Demo Test4</td>";
print"<td>C:\Sandbox\Tests\DemoTestFour</td>";
print"<td></td>\n";
print"<td>2</td>\n";
print"<td>10.110.90.21</td>\n";
print"</tr>\n";
print"</table>\n";

print"<br><br>\n";
*/

# DESCRIPTION OF FIELDS
/*
print"<table border=0 width='90%' align=center>";
print"<tr><td align='left'><b>". lang_get('run') ."</b> - Whether or not to run the test.</td></tr>\n";
print"<tr><td align='left'><b>". lang_get('test_name') ."</b> - The textual description of the test as it appears in RTH.</td></tr>\n";
print"<tr><td align='left'><b>". lang_get('test_path') ."</b> - The absolute path to the test.</td></tr>\n";
print"<tr><td align='left'><b>". lang_get('parameters') ."</b> - Any parameters that must be passed to the test.</td></tr>\n";
print"<tr><td align='left'><b>". lang_get('priority') ."</b> - The order of execution (tests can only be ordered when they run on the same machine)</td></tr>\n";
print"<tr><td align='left'><b>". lang_get('machine_name') ."</b> - The IP Address of the machine to be used.</td></tr>\n";
print"</table>\n";

print"<br><br>\n";
*/

# FILE UPLOAD FORM
print"<table class=width60>\n";
print"<tr>\n";
print"<td>\n";

print"<form method='POST' enctype='multipart/form-data' action='results_remote_execution_action.php'>\n";
print"<table class=inner>\n";

# FORM TITLE
print"<tr>\n";
print"<td colspan='2'><h4>". lang_get('upload_tests') ."</h4></td>\n";
print"</tr>\n";

# TEST TOOLS
$tool_array = array( 'WinRunner', );
print"<tr>\n";
print"<td class='form-lbl-r'>". lang_get('test_tool') ."</td>\n";
print"<td class='form-data-l'>\n";
print"<select name='test_tool'>";
	html_print_list_box_from_array( $tool_array );
print"</select>\n";
print"</td>\n";
print"</tr>";

# FILE
print"<tr>\n";
	print"<td class='form-lbl-r'>". lang_get('upload_tests') ."</td>\n";
	print"<td class='form-data-l'><input type='file' name='f'></input></td>\n";
print"</tr>\n";

util_add_spacer();

# SUBMIT BUTTON
print"<tr>\n";
print"<td colspan='2' class='form-data-c'><input type='submit' value='". lang_get('submit_btn') ."'></td>\n";
print"</tr>\n";

print"</table>\n";
print"</form>\n";

print"</td>\n";
print"</tr>\n";
print"</table>\n";

print"</div>\n";

print"<br><br>\n";

html_print_footer();

# ---------------------------------------------------------------------
# $Log: results_remote_execution_page.php,v $
# Revision 1.1  2006/05/03 20:23:13  gth2
# no message
#
# ---------------------------------------------------------------------

?>