<?php
	require("settings.php");
	require_once("helper.php");

	session_start();
	html_start("Profil");

	if(!session_is_registered("id") || ($_SESSION["id"] == "")) {
		login_form("index.php");
	}

	echo "<H1>Profil</H1>";

	echo "<H3><IMG src=\"icons/textfield_key.png\" alt=\"Change Password\">Change Password</H3>\n";
	echo "<FORM action=\"passwd.php\" method=\"post\">\n";
	echo "<TABLE border=\"0\">\n";
	echo "<TR><TD>\n";
	echo "<LABEL for=\"oldpassword\">Old password:</LABEL></TD><TD>\n";
	echo "<INPUT type=\"password\" name=\"oldpassword\" id=\"oldpassword\" size=\"20\">\n";
	echo "</TD></TR><TR><TD>\n";
	echo "<LABEL for=\"newpassword1\">New password:</LABEL></TD><TD>\n";
	echo "<INPUT type=\"password\" name=\"newpassword1\" id=\"newpassword1\" size=\"20\">\n";
	echo "</TD></TR><TR><TD>\n";
	echo "<LABEL for=\"newpassword2\">Repeat new password:</LABEL></TD><TD>\n";
	echo "<INPUT type=\"password\" name=\"newpassword2\" id=\"newpassword2\" size=\"20\">\n";
	echo "</TD></TR><TR><TD></TD><TD>\n";
	echo "<INPUT type=\"submit\" value=\"Change password\">\n";
	echo "</TD></TR>\n";
	echo "</TABLE>\n";
	echo "</FORM>\n";

	echo "<DIV class=\"footer\">\n";
	echo "<A href=\"index.php\"><IMG src=\"icons/house.png\" alt=\"home\">Home</A>\n";
	echo "<A href=\"logout.php\"><IMG src=\"icons/door_in.png\" alt=\"logout\">Logout</A>\n";
	echo "</DIV>\n";
?>
 </BODY>
</HTML>
