<?php
if (file_exists("embedded/functions/site_functions.php"))
	{
	include_once("embedded/functions/site_functions.php");
	}
else
	{
include_once("../../embedded/functions/site_functions.php");
	}
$language=$_SESSION['language'];
if ($language==1)
	{
	$head1="Βήμα 1: Όνομα και Κανόνες";
	$head2="Όνομα σεναρίου:";
	$head3="Ονομάστε το σενάριο!";
	$head4="Αισθητήρας:";
	$head5="θερμοκρασία";
	$head6="υγρασία";
	$head7="έδαφος";
	$head8="φωτισμός";
	$head9="χωρίς";
	$head10="Επόμενο βήμα";
	$scenario_n="όνομα σεναρίου";
	}
else
	{
	$head1="Step 1: Name and Rules";
	$head2="Scenario Name:";
	$head3="Please fill in scenario name!";
	$head4="Sensor:";
	$head5="temperature";
	$head6="humidity";
	$head7="soil moisture";
	$head8="indoor lighting";
	$head9="no sensor";
	$head10="Next Step";
	$scenario_n="scenario name";
	}
echo<<<s
<div id="marginn">
<div id="step1" class="vision">
<span class="step">$head1</span>
<table id='p_i' class='margin5' class="vision">
<tr id="line0"><td class="p_i_title1">$head2</td><td><input type ='text' id="scenario_name" name='scenario_name' size='20' placeholder="$scenario_n" onkeyup="scenario_name_validator(this.value);" onchange="scenario_name_validator(this.value);"></input>
<a id="1" class="o_msg"><span class="invalid">$head3</span></a></td></tr>
<tr id="line1">
<td class="p_i_title1" >
<select id="sensor1" name="select_sensor_1" disabled="true" onchange="load_data(this.value,1);select_rule(this.value,1);" >
<option value="">$head4</option>
<option value="temperature">$head5</option>
<option value="humidity">$head6</option>
<option value="soil_moisture">$head7</option>
<option value="indoor_lighting">$head8</option>
<option value="no_sensor">$head9</option>
</td>
<td id="line1_data" class="vision"> </td>
</tr>
<tr id="line2" class="vision">
<td class="p_i_title1">
<a id="r2"> </a>
<select id="sensor2" name="select_sensor_2" disabled="true" onchange="load_data(this.value,2);select_rule(this.value,2);" >
<option value="">$head4</option>
<option value="temperature">$head5</option>
<option value="humidity">$head6</option>
<option value="soil_moisture">$head7</option>
<option value="indoor_lighting">$head8</option>
</td>
<td id="line2_data" class="vision"> </td>
</tr>

<tr id="line3" class="vision"><td class="p_i_title1">
<a id="r3"> </a>
<select id="sensor3" name="select_sensor_3" disabled="true" onchange="load_data(this.value,3);select_rule(this.value,3);" >
<option value="">$head4</option>
<option value="temperature">$head5</option>
<option value="humidity">$head6</option>
<option value="soil_moisture">$head7</option>
<option value="indoor_lighting">$head8</option>
</td>
<td id="line3_data" class="vision"> </td>
</tr>

<tr id="line4" class="vision"><td class="p_i_title1">
<a id="r4"> </a>
<select id="sensor4" name="select_sensor_4" disabled="true" onchange="load_data(this.value,4);select_rule(this.value,4);" >
<option value="">$head4</option>
<option value="temperature">$head5</option>
<option value="humidity">$head6</option>
<option value="soil_moisture">$head7</option>
<option value="indoor_lighting">$head8</option>
</td>
<td id="line4_data" class="vision"> </td>
</tr>

<tr id="line5" class="vision"><td class="p_i_title1">
<a id="r5"> </a>
<select id="sensor5" name="select_sensor_5" disabled="true" onchange="load_data(this.value,5);select_rule(this.value,5);" >
<option value="">$head4</option>
<option value="temperature">$head5</option>
<option value="humidity">$head6</option>
<option value="soil_moisture">$head7</option>
<option value="indoor_lighting">$head8</option>
</td>
<td id="line5_data" class="vision"> </td>
</tr>
</table>
<input type="button" value="$head10" disabled="true" id="next_step1"onclick="step2(); visibility(1)" />
</div>
<div id="step2" class="vision">
</div>
</div>
s;

?>