#!/usr/bin/perl

# Angabe das hier CGI Prameter genutzt werden
use CGI qw(param);

######################################################
# Das Passwort für den Admin
$password = "Admin_not_used";
# Das Passwort für den User
$userp = "41oberwil04";

######################################################
# Variablendefinition von $action
# Es wird hier festgelegt bei welcher Aktion 
# welche Subroutine aufgerufen wird
$action = param('action');

######################################################
# Die action Parameter.
# Bei keinem Parameter (eq "") wird der Login aufgerufen
if ($action eq ""){&administratorlogin}
elsif ($action eq "login"){&startseite}
elsif ($action eq "zweiteseite"){&seitezwei}
elsif ($action eq "user"){&userdaten}

######################################################
sub administratorlogin {
print "Content-type: text/html\n\n";
print qq~

    
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>

<head>
	<meta http-equiv="Content-Type" content="text/html;CHARSET=iso-8859-1">
	<title>V E B A Consulting AG</title>
	<link rel="stylesheet" type="text/css" href="formate.css">
</head>

<body background="pix/hg.gif" bgcolor="aliceblue" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">

<form action="pass.pl" method="POST" enctype="application/x-www-form-urlencoded">
<center>

<table border="0" cellpadding="0" cellspacing="0" width="800">
	<tr>
		<td width="194" height="120" valign="TOP" bgcolor="#BBFFFF">
			<table border="0" cellpadding="0" cellspacing="0" width="194" height="120" bgcolor="#BBFFFF">
				<tr>
					<td width="100%" valign="MIDDLE">
						<p align="CENTER"><img src="pix/veba.gif" width="120" height="113" align="BOTTOM" border="0">&nbsp;
					</td>
				</tr>
			</table>
		</td>
		<td width="1" valign="TOP"  nowrap rowspan="3" bgcolor="#3D3D3D"><img src="pix/grau_senk.jpg" width="1" height="200" align="BOTTOM" border="0"></td>
		<td width="605" height="120" valign="TOP" bgcolor="#BBFFFF">
			<table border="0" cellpadding="0" cellspacing="0" width="605" height="120" bgcolor="#BBFFFF">
				<tr>
					<td width="605" valign="MIDDLE">
						<center>
						<p>
						<table border="0" cellpadding="0" cellspacing="0" width="478" height="47">
							<tr>
								<td width="478" valign="MIDDLE" bgcolor="#BBFFFF"><i><b><span style="Font-Size : 30pt"><font color="black" face="Arial, Helvetica">V E B A</font></span></b></i><b><span
									STYLE="Font-Size : 30pt"><font color="aliceblue" face="Arial, Helvetica"> </font></span></b><span style="Font-Size : 30pt"><font
									COLOR="aliceblue" FACE="Arial, Helvetica"><img src="pix/veba_k.gif" width="36" height="31" align="BOTTOM" border="0"></font></span><b><span
									STYLE="Font-Size : 30pt"><font color="aliceblue" face="Arial, Helvetica"> </font></span><span style="Font-Size : 30pt"><font
									COLOR="#3D3D3D" FACE="Arial, Helvetica">Consulting AG</font></span></b></td>
							</tr>
						</table>

</center>
					</td>
				</tr>
			</table>
		</td>
	</tr>
	<tr>
		<td width="194" valign="TOP"><img src="pix/grau_wag.jpg" width="194" height="1" align="BOTTOM" border="0"></td>
		<td width="605" valign="TOP"><img src="pix/grau_wag.jpg" width="605" height="1" align="BOTTOM" border="0"></td>
	</tr>
	<tr>
		<td width="194" valign="TOP" bgcolor="#BBFFFF">
			<table border="0" cellpadding="8" cellspacing="0" width="194">
				<tr>
					<td width="4" height="20" valign="TOP" bgcolor="#BBFFFF">&nbsp;</td>
					<td width="100%" height="20" valign="TOP" bgcolor="#BBFFFF">&nbsp;</td>
				</tr>
				<tr>
					<td width="4" height="60" valign="TOP" bgcolor="#BBFFFF">&nbsp;</td>
					<td width="100%" height="60" valign="TOP" bgcolor="#BBFFFF"><b><a href="index.php"><span style="Font-Size : 12pt">home</span></a></b></td>
				</tr>
				<tr>
					<td width="4" height="20" valign="TOP" bgcolor="#BBFFFF">&nbsp;</td>
					<td width="100%" height="20" valign="TOP" bgcolor="#BBFFFF"><a href="dienst_allg.html"><span style="Font-Size : 12pt">Dienstleistungen</span></a></td>
				</tr>
				<tr>
					<td width="4" height="20" valign="TOP" bgcolor="#BBFFFF">&nbsp;</td>
					<td width="100%" height="20" valign="TOP" bgcolor="#BBFFFF"><a href="aktuell.php"><span style="Font-Size : 12pt">Aktuelles</span></a></td>
				</tr>
				<tr>
					<td width="4" height="20" valign="TOP" bgcolor="#BBFFFF">&nbsp;</td>
					<td width="100%" height="20" valign="TOP" bgcolor="#BBFFFF"><a href="links_allg.html"><span style="Font-Size : 12pt">Links</span></a></td>
				</tr>
				<tr>
					<td width="4" height="20" valign="TOP" bgcolor="#BBFFFF">&nbsp;</td>
					<td width="100%" height="20" valign="TOP" bgcolor="#BBFFFF"><a href="standort.html"><span style="Font-Size : 12pt">Unser Standort</span></a></td>
				</tr>
				<tr>
					<td width="4" height="20" valign="TOP" bgcolor="#BBFFFF">&nbsp;</td>
					<td width="100%" height="20" valign="TOP" bgcolor="#BBFFFF"><a href="kontakt.shtml"><span style="Font-Size : 12pt">Kontakt</span></a></td>
				</tr>
				<TR>
					<TD WIDTH="4" VALIGN="TOP" BGCOLOR="#BBFFFF">&nbsp;</TD>
					<TD WIDTH="100%" VALIGN="TOP" BGCOLOR="#BBFFFF"><A HREF="partner.html"><SPAN STYLE="Font-Size : 12pt">Partner</SPAN></A></TD>
				</TR>
				<TR>
					<TD WIDTH="4" VALIGN="TOP" BGCOLOR="#BBFFFF">&nbsp;</TD>
					<TD WIDTH="100%" VALIGN="TOP" BGCOLOR="#BBFFFF">&nbsp;</TD>
				</TR>

			</table>
		</td>
		<td width="605" valign="TOP">
			<table border="0" cellpadding="8" cellspacing="0" width="605" height="302" background="pix/aktie.jpg">
				<tr>
					<td width="4" height="20" valign="TOP">&nbsp;</td>
					<td height="20" valign="TOP">&nbsp;</td>
					<td width="4" height="20" valign="TOP">&nbsp;</td>
				</tr>
				<tr>
					<td width="4" height="60" valign="TOP">&nbsp;</td>
					<td height="60" valign="TOP"><b><span style="Font-Size : 14pt">Login</span></b><span style="Font-Size : 14pt"><input type="HIDDEN" name="action"
						SIZE="-1" VALUE="user"></span></td>
					<td width="4" height="60" valign="TOP">&nbsp;</td>
				</tr>
				<tr>
					<td width="4" valign="TOP">&nbsp;</td>
					<td valign="TOP">Passwort: <input type="PASSWORD" name="userp" size="15"></td>
					<td width="4" valign="TOP">&nbsp;</td>
				</tr>
				<tr>
					<td width="4" valign="TOP">&nbsp;</td>
					<td valign="TOP"><input type="SUBMIT" value="Senden">&nbsp;</td>
					<td width="4" valign="TOP">&nbsp;</td>
				</tr>
				<tr>
					<td width="4" height="42" valign="TOP">&nbsp;</td>
					<td height="42" valign="TOP">&nbsp;</td>
					<td width="4" height="42" valign="TOP">&nbsp;</td>
				</tr>
				<tr>
					<td width="4" valign="TOP">&nbsp;</td>
					<td valign="TOP">&nbsp;</td>
					<td width="4" valign="TOP">&nbsp;</td>
				</tr>
			</table>
		</td>
	</tr>
</table>

</center>
<p>
</form>

</body>

</html>
~;
exit;
}


######################################################
sub startseite {

# Parameterdefinition für das zu übergebende Passwort
$pass = param("password");

# Entspricht das Passwort dem Passwort
if ($password eq $pass) {


print "Content-type: text/html\n\n";

print qq~
<html>
<head><title>Erste Seite nach Login</title></head>
<body>
Das ist die erste Seite nach dem Login<br>
<form action="pass.pl" method="post">
<input type="hidden" name="action" value="zweiteseite">
<input type="hidden" name="password" value="$pass">
<input type="Submit" value="Weiter zu Subroutine 2">
</body>
</html>

~;
}

else {
# Fehlermeldung bei ungültigen Daten
print qq~
<html>
<head><title>Erste Seite nach Login</title></head>
<body>
Das ist die Fehlermeldung wenn ungültige Dateneingegeben wurden
</body>
</html>
~;
}
}

######################################################
sub seitezwei {


# Parameterdefinition für das zu übergebende Passwort
$pass = param("password");

# Entspricht das Passwort dem Passwort
if ($password eq $pass) {


print "Content-type: text/html\n\n";
print qq~
<html>
<head><title>Zweite Seite nach Login</title></head>
<body>
Das ist die zweite Seite nach dem Login<br>
<form action="pass.pl" method="post">
<input type="hidden" name="action" value="login">
<input type="hidden" name="password" value="$pass">
<input type="Submit" value="Zurück zur Startseite"><br><br>
</body>
</html>
~;

} else {
# Fehlermeldung bei ungültigen Daten
print qq~
<html>
<head><title>Erste Seite nach Login</title></head>
<body>
Das ist die Fehlermeldung wenn ungültige Daten eingegeben wurden
</body>
</html>
~;
}
}

######################################################
sub userdaten {

# Parameterdefinition für das zu übergebende Passwort
# Achtung, hier sind andere Variablen anzuwenden
$pass = param("userp");

# Entspricht das Passwort dem Passwort
# Achtung, hier sind andere Variablen anzuwenden
if ($userp eq $pass) {


print "Content-type: text/html\n\n";
print qq~
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>

<head>
	<meta http-equiv="Content-Type" content="text/html;CHARSET=iso-8859-1">
	<title>V E B A Consulting AG</title>
	<link rel="stylesheet" type="text/css" href="formate.css">
</head>

<body background="pix/hg.gif" bgcolor="aliceblue" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">

<center>

<table border="0" cellpadding="0" cellspacing="0" width="800">
	<tr>
		<td width="194" height="120" valign="TOP" bgcolor="#BBFFFF">
			<table border="0" cellpadding="0" cellspacing="0" width="194" height="120" bgcolor="#BBFFFF">
				<tr>
					<td width="100%" valign="MIDDLE">
						<p align="CENTER"><img src="pix/veba.gif" width="120" height="113" align="BOTTOM" border="0">&nbsp;
					</td>
				</tr>
			</table>
		</td>
		<td width="1" valign="TOP"  nowrap rowspan="3" bgcolor="#3D3D3D"><img src="pix/grau_senk.jpg" width="1" height="200" align="BOTTOM" border="0"></td>
		<td width="605" height="120" valign="TOP" bgcolor="#BBFFFF">
			<table border="0" cellpadding="0" cellspacing="0" width="605" height="120" bgcolor="#BBFFFF">
				<tr>
					<td width="605" valign="MIDDLE">
						<center>
						<p>
						<table border="0" cellpadding="0" cellspacing="0" width="478" height="47">
							<tr>
								<td width="478" valign="MIDDLE" bgcolor="#BBFFFF"><i><b><span style="Font-Size : 30pt"><font color="black" face="Arial, Helvetica">V E B A</font></span></b></i><b><span
									STYLE="Font-Size : 30pt"><font color="aliceblue" face="Arial, Helvetica"> </font></span></b><span style="Font-Size : 30pt"><font
									COLOR="aliceblue" FACE="Arial, Helvetica"><img src="pix/veba_k.gif" width="36" height="31" align="BOTTOM" border="0"></font></span><b><span
									STYLE="Font-Size : 30pt"><font color="aliceblue" face="Arial, Helvetica"> </font></span><span style="Font-Size : 30pt"><font
									COLOR="#3D3D3D" FACE="Arial, Helvetica">Consulting AG</font></span></b></td>
							</tr>
						</table>

</center>
					</td>
				</tr>
			</table>
		</td>
	</tr>
	<tr>
		<td width="194" valign="TOP"><img src="pix/grau_wag.jpg" width="194" height="1" align="BOTTOM" border="0"></td>
		<td width="605" valign="TOP"><img src="pix/grau_wag.jpg" width="605" height="1" align="BOTTOM" border="0"></td>
	</tr>
	<tr>
		<td width="194" valign="TOP" bgcolor="#BBFFFF">
			<table border="0" cellpadding="8" cellspacing="0" width="194">
				<tr>
					<td width="4" height="20" valign="TOP" bgcolor="#BBFFFF">&nbsp;</td>
					<td width="100%" height="20" valign="TOP" bgcolor="#BBFFFF">&nbsp;</td>
				</tr>
				<tr>
					<td width="4" height="60" valign="TOP" bgcolor="#BBFFFF">&nbsp;</td>
					<td width="100%" height="60" valign="TOP" bgcolor="#BBFFFF"><b><a href="index.php"><span style="Font-Size : 12pt">home</span></a></b></td>
				</tr>
				<tr>
					<td width="4" height="20" valign="TOP" bgcolor="#BBFFFF">&nbsp;</td>
					<td width="100%" height="20" valign="TOP" bgcolor="#BBFFFF"><a href="dienst_allg.html"><span style="Font-Size : 12pt">Dienstleistungen</span></a></td>
				</tr>
				<tr>
					<td width="4" height="20" valign="TOP" bgcolor="#BBFFFF">&nbsp;</td>
					<td width="100%" height="20" valign="TOP" bgcolor="#BBFFFF"><a href="aktuell.php"><span style="Font-Size : 12pt">Aktuelles</span></a></td>
				</tr>
				<tr>
					<td width="4" height="20" valign="TOP" bgcolor="#BBFFFF">&nbsp;</td>
					<td width="100%" height="20" valign="TOP" bgcolor="#BBFFFF"><a href="links_allg.html"><span style="Font-Size : 12pt">Links</span></a></td>
				</tr>
				<tr>
					<td width="4" height="20" valign="TOP" bgcolor="#BBFFFF">&nbsp;</td>
					<td width="100%" height="20" valign="TOP" bgcolor="#BBFFFF"><a href="standort.html"><span style="Font-Size : 12pt">Unser Standort</span></a></td>
				</tr>
				<tr>
					<td width="4" height="20" valign="TOP" bgcolor="#BBFFFF">&nbsp;</td>
					<td width="100%" height="20" valign="TOP" bgcolor="#BBFFFF"><a href="kontakt.shtml"><span style="Font-Size : 12pt">Kontakt</span></a></td>
				</tr>
				<TR>
					<TD WIDTH="4" VALIGN="TOP" BGCOLOR="#BBFFFF">&nbsp;</TD>
					<TD WIDTH="100%" VALIGN="TOP" BGCOLOR="#BBFFFF"><A HREF="partner.html"><SPAN STYLE="Font-Size : 12pt">Partner</SPAN></A></TD>
				</TR>
				<TR>
					<TD WIDTH="4" VALIGN="TOP" BGCOLOR="#BBFFFF">&nbsp;</TD>
					<TD WIDTH="100%" VALIGN="TOP" BGCOLOR="#BBFFFF">&nbsp;</TD>
				</TR>

			</table>
		</td>
		<td width="605" valign="TOP">
			<table border="0" cellpadding="8" cellspacing="0" width="605" height="100%" background="pix/aktie.jpg">
				<tr>
					<td width="4" height="20" valign="TOP">&nbsp;</td>
					<td height="20" valign="TOP">&nbsp;</td>
					<td width="4" height="20" valign="TOP">&nbsp;</td>
				</tr>
				<tr>
					<td width="4" height="60" valign="TOP">&nbsp;</td>
					<td height="60" valign="TOP"><b><span style="Font-Size : 14pt">Statistik</span></b></td>
					<td width="4" height="60" valign="TOP">&nbsp;</td>
				</tr>
				<tr>
					<td width="4" valign="TOP">&nbsp;</td>
					<td valign="TOP">
<iframe src="http://www.vebaconsulting.ch/stat.php?action=html" frameborder="1" name="sowieso" height="400" width="500" marginwidth="10" marginheight="10" scrolling="yes" noresize align="left"
>
						<p></iframe>
					</td>
					<td width="4" valign="TOP">&nbsp;</td>
				</tr>
				<tr>
					<td width="4" height="20" valign="TOP">&nbsp;</td>
					<td height="20" valign="TOP">&nbsp;</td>
					<td width="4" height="20" valign="TOP">&nbsp;</td>
				</tr>
			</table>
		</td>
	</tr>
</table>

</center>

</body>

</html>
~;

} else {
# Fehlermeldung bei ungültigen Daten
print qq~
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>

<head>
	<meta http-equiv="Content-Type" content="text/html;CHARSET=iso-8859-1">
	<title>V E B A Consulting AG</title>
	<link rel="stylesheet" type="text/css" href="formate.css">
</head>

<body background="pix/hg.gif" bgcolor="aliceblue" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">

<center>

<table border="0" cellpadding="0" cellspacing="0" width="800">
	<tr>
		<td width="194" height="120" valign="TOP" bgcolor="#BBFFFF">
			<table border="0" cellpadding="0" cellspacing="0" width="194" height="120" bgcolor="#BBFFFF">
				<tr>
					<td width="100%" valign="MIDDLE">
						<p align="CENTER"><img src="pix/veba.gif" width="120" height="113" align="BOTTOM" border="0">&nbsp;
					</td>
				</tr>
			</table>
		</td>
		<td width="1" valign="TOP"  nowrap rowspan="3" bgcolor="#3D3D3D"><img src="pix/grau_senk.jpg" width="1" height="200" align="BOTTOM" border="0"></td>
		<td width="605" height="120" valign="TOP" bgcolor="#BBFFFF">
			<table border="0" cellpadding="0" cellspacing="0" width="605" height="120" bgcolor="#BBFFFF">
				<tr>
					<td width="605" valign="MIDDLE">
						<center>
						<p>
						<table border="0" cellpadding="0" cellspacing="0" width="478" height="47">
							<tr>
								<td width="478" valign="MIDDLE" bgcolor="#BBFFFF"><i><b><span style="Font-Size : 30pt"><font color="black" face="Arial, Helvetica">V E B A</font></span></b></i><b><span
									STYLE="Font-Size : 30pt"><font color="aliceblue" face="Arial, Helvetica"> </font></span></b><span style="Font-Size : 30pt"><font
									COLOR="aliceblue" FACE="Arial, Helvetica"><img src="pix/veba_k.gif" width="36" height="31" align="BOTTOM" border="0"></font></span><b><span
									STYLE="Font-Size : 30pt"><font color="aliceblue" face="Arial, Helvetica"> </font></span><span style="Font-Size : 30pt"><font
									COLOR="#3D3D3D" FACE="Arial, Helvetica">Consulting AG</font></span></b></td>
							</tr>
						</table>

</center>
					</td>
				</tr>
			</table>
		</td>
	</tr>
	<tr>
		<td width="194" valign="TOP"><img src="pix/grau_wag.jpg" width="194" height="1" align="BOTTOM" border="0"></td>
		<td width="605" valign="TOP"><img src="pix/grau_wag.jpg" width="605" height="1" align="BOTTOM" border="0"></td>
	</tr>
	<tr>
		<td width="194" valign="TOP" bgcolor="#BBFFFF">
			<table border="0" cellpadding="8" cellspacing="0" width="194">
				<tr>
					<td width="4" height="20" valign="TOP" bgcolor="#BBFFFF">&nbsp;</td>
					<td width="100%" height="20" valign="TOP" bgcolor="#BBFFFF">&nbsp;</td>
				</tr>
				<tr>
					<td width="4" height="60" valign="TOP" bgcolor="#BBFFFF">&nbsp;</td>
					<td width="100%" height="60" valign="TOP" bgcolor="#BBFFFF"><b><a href="index.php"><span style="Font-Size : 12pt">home</span></a></b></td>
				</tr>
				<tr>
					<td width="4" valign="TOP" bgcolor="#BBFFFF">&nbsp;</td>
					<td width="100%" valign="TOP" bgcolor="#BBFFFF"><a href="dienst_allg.html"><span style="Font-Size : 12pt">Dienstleistungen</span></a></td>
				</tr>
				<tr>
					<td width="4" valign="TOP" bgcolor="#BBFFFF">&nbsp;</td>
					<td width="100%" valign="TOP" bgcolor="#BBFFFF"><a href="aktuell.php"><span style="Font-Size : 12pt">Aktuelles</span></a></td>
				</tr>
				<tr>
					<td width="4" valign="TOP" bgcolor="#BBFFFF">&nbsp;</td>
					<td width="100%" valign="TOP" bgcolor="#BBFFFF"><a href="links_allg.html"><span style="Font-Size : 12pt">Links</span></a></td>
				</tr>
				<tr>
					<td width="4" valign="TOP" bgcolor="#BBFFFF">&nbsp;</td>
					<td width="100%" valign="TOP" bgcolor="#BBFFFF"><a href="standort.html"><span style="Font-Size : 12pt">Unser Standort</span></a></td>
				</tr>
				<tr>
					<td width="4" valign="TOP" bgcolor="#BBFFFF">&nbsp;</td>
					<td width="100%" valign="TOP" bgcolor="#BBFFFF"><a href="kontakt.shtml"><span style="Font-Size : 12pt">Kontakt</span></a></td>
				</tr>
				<TR>
					<TD WIDTH="4" VALIGN="TOP" BGCOLOR="#BBFFFF">&nbsp;</TD>
					<TD WIDTH="100%" VALIGN="TOP" BGCOLOR="#BBFFFF"><A HREF="partner.html"><SPAN STYLE="Font-Size : 12pt">Partner</SPAN></A></TD>
				</TR>
				<TR>
					<TD WIDTH="4" VALIGN="TOP" BGCOLOR="#BBFFFF">&nbsp;</TD>
					<TD WIDTH="100%" VALIGN="TOP" BGCOLOR="#BBFFFF">&nbsp;</TD>
				</TR>

			</table>
		</td>
		<td width="605" valign="TOP">
			<table border="0" cellpadding="8" cellspacing="0" width="605" height="302" background="pix/aktie.jpg">
				<tr>
					<td width="4" height="20" valign="TOP">&nbsp;</td>
					<td height="20" valign="TOP">&nbsp;</td>
					<td width="4" height="20" valign="TOP">&nbsp;</td>
				</tr>
				<tr>
					<td width="4" height="60" valign="TOP">&nbsp;</td>
					<td height="60" valign="TOP"><b><span style="Font-Size : 14pt">Fehler</span></b></td>
					<td width="4" height="60" valign="TOP">&nbsp;</td>
				</tr>
				<tr>
					<td width="4" valign="TOP">&nbsp;</td>
					<td valign="TOP"><b>Sie haben keine Berechtigung f&uuml;r dieses Verzeichnis!</b></td>
					<td width="4" valign="TOP">&nbsp;</td>
				</tr>
				<tr>
					<td width="4" valign="TOP">&nbsp;</td>
					<td valign="TOP">&nbsp;</td>
					<td width="4" valign="TOP">&nbsp;</td>
				</tr>
				<tr>
					<td width="4" valign="TOP">&nbsp;</td>
					<td valign="TOP">&nbsp;</td>
					<td width="4" valign="TOP">&nbsp;</td>
				</tr>
				<tr>
					<td width="4" valign="TOP">&nbsp;</td>
					<td valign="TOP">&nbsp;</td>
					<td width="4" valign="TOP">&nbsp;</td>
				</tr>
				<tr>
					<td width="4" valign="TOP">&nbsp;</td>
					<td valign="TOP">&nbsp;</td>
					<td width="4" valign="TOP">&nbsp;</td>
				</tr>
			</table>
		</td>
	</tr>
</table>

</center>

</body>

</html>
~;
}
}