<?php
include_once("embedded/functions/site_functions.php");
if ((isset($_SESSION) && !empty($_SESSION)))
{
db_open();
$language=$_SESSION['language'];
if ($language==1)
	{
	$head1="Νέο Σενάριο";
	$head2="Προγραμματισμός";
	$head3="Λίστα Σεναρίων";
	$script ='<script type="text/javascript" src="scripts/formfunctions_new_scenario_gr.js"></script>';
	$title="SmartGreenhouse-Προγραμματισμός";
	}
else
	{
	$head1="New Scenario";
	$head2="Schedule Scenario";
	$head3="Scenario List";
	$script ='<script type="text/javascript" src="scripts/formfunctions_new_scenario.js"></script>';
	$title="SmartGreenhouse-Automation";
	}
$time=time();
$a=password($option=4,$_SESSION['userlevel'],$_SESSION['email'],$_SESSION['password'],$_SESSION['device_id'],$time);

$css='<link href = "css/index.css" rel = "stylesheet" type = "text/css" />';
heder_js($title,$script,$css);
main_things();
echo"<div id ='main_window'>";
echo<<<a
<div id="automation_menu">
<div id="automation_menu_1" class="page_menu_button_automation" onclick="new_scenario();" >$head1</div>
<div id="automation_menu_2" class="page_menu_button_automation" onclick="schedule_scenario();" >$head2</div>
<div id="automation_menu_3" class="page_menu_button_automation" onclick="scenario_list(1);" >$head3</div>
</div>
<div id="new_scenario"></div>
<div id="schedule"></div>
<div id='list'></div>
a;
echo"</div>";
footer();
db_close();
}
else
{
require("index.php");
die();
}
?>