<?php
include_once("embedded/functions/site_functions.php");
if ((isset($_SESSION) && !empty($_SESSION)))
{
$language=$_SESSION['language'];
db_open();
if ($language==1)
	{
	$head1="Στοιχεία Χρήστη";
	$head2="Ρυθμίσεις Συσκεής";
	$head3="Επικοινωνία";
	$head4="Σφάλματα";
	$script='<script type="text/javascript" src="scripts/formfunctions_profile_gr.js"></script>';
	$title="SmartGreenhouse - Προφίλ Χρήστη";
	}
else
	{
	$head1="Personal Info";
	$head2="Devices Info";
	$head3="Contact";
	$head4="Troubleshoots";
	$script='<script type="text/javascript" src="scripts/formfunctions_profile.js"></script>';
	$title="SmartGreenhouse - User Profile";
	}
$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<<<a
<div id ="main_window">
<div id="page_menu">
<div id="automation_menu_1" class="page_menu_button_automation" onclick="personal_info(1);" > $head1 </div>
<div id="automation_menu_2" class="page_menu_button_automation" onclick="machine_info(1);" > $head2 </div>
<div id="automation_menu_3" class="page_menu_button_automation" onclick="admin_contact(1);" > $head3 </div>
<div id="automation_menu_4" class="page_menu_button_automation" onclick="troubleshoots(1,0,0);" > $head4 </div>
</div>
a;
echo<<<b
<div id='personal_info'> </div>
<div id='machine_info'> </div>
<div id='admin_contact1'> </div>
<div id='troubleshoots1'> </div>
</div>
b;
footer();
db_close();
}
else
{
require("index.php");
die();
}
?>