Location: PHPKode > projects > AlumniServer > index.php
<?php
/**************************************************************************************************
* Copyright(c) 2009 Fabian Gerold, http://www.alumniserver.net
*
* This script is part of the AlumniServer project. It is free software; you can redistribute it
* and/or modify it under the terms of the GNU General Public License as published by the Free
* Software Foundation; either version 3 of the License, or (at your option) any later version.
*
* The GNU General Public License can be found at http://www.gnu.org/copyleft/gpl.html.
* A copy is found in the textfile GPL.txt
*
* This script is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without
* even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
* General Public License for more details.
*
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************************************************/

define('ALUMNISERVER',true);
include('src/loadconfig.php');
include('src/common.php');
$warning='';
if(isset($_GET['error'])){
	$error=requestVar('error',0);
	if($error==1) $warning=$tr['EmailSeemsToBeIncorrect'];
	if($error==2) $warning=$tr['PasswordWrong'];
	if($error==3) $warning=$tr['EmailOrPasswordWrong'];
	if($error==10) $warning='Wrong login. Please refer to installation guide';
	if($error==11) $warning='Wrong password. Please refer to installation guide';
	if($error==12) $warning='Login with default admin email ist discouraged';
	if($error==13) $warning='Could not insert admin user into database. Please check your config file and database configuration';
}

$loginform='<form action="login.php" method="post" style="padding:0px;margin:0px;">
	<label for="login" >E-Mail </label><br/>
	<input type="text" id="login" name="login" style="width:108px;margin-bottom:8px;" class="inp"><br/>
	<label for="password" >Passwort </label><br/>
	<input type="password" id="password" name="password" style="width:108px;margin-bottom:8px;" class="inp"><br/>
	<a><input type="submit" id="loginsubmit" value="login" class="btn" style="width:70px;margin-bottom:10px;float:right;"></a>
	<div style="clear:both;width:1px;height:1px;"></div>
	</form>';

echo '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html lang="de" xml:lang="de" xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>'.$cfg['pageTitleOrDomain'].'</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="description" content="Alumni Community">
<meta name="keywords" content="Alumni,Student,Network,Community,University">
<link rel="stylesheet" type="text/css" href="src/styles.css"/>
<script type="text/javascript" src="src/js/common.js"></script>
</head>
<body>

<table cellpadding="0" cellspacing="0" style="margin:0px auto;">'.$mainLayoutTop.'
	<tr>
		<td style="width:130px;height:600px;border:0px;border-left:#e5e5e5 1px solid;">
			<div style="margin:35px 10px 4px 6px;">
				'.$loginform.'
				'.$enablescript.'

				<div style="margin-top:15px;"><a href="Password.php">'.$tr['ForgotPassword'].'</a></div>

				<div style="margin-top:30px;color:#939393;">
				'.$tr['NoAccountYet'].'?<br/>
				<a href="Register.php">'.$tr['SignUpHere'].'</a>
				</div>
			</div>
		</td>

		<td style="width:600px;height:auto;border:0px;border-left:#e5e5e5 1px solid;border-right:#e5e5e5 1px solid;">
			<div style="margin:25px 15px 20px 15px;">';

if($warning!=''){
	echo '<div style="color:red;margin-bottom: 15px;">'.$warning.'</div>';
}
echo '<noscript><div style="color:red;margin-bottom: 15px;">Your browser does not support JavaScript!</div></noscript>';

switch($load){
	case 'password':			include('src/index/password.php');break;
	case 'changemail':			include('src/index/changemail.php');break;
	case 'imprint':				include('data/pageImprint.php');break;
	case 'dataprivacy': 		include('data/pageDataprivacy.php');break;
	case 'termsofuse': 			include('data/pageTermsofuse.php');break;
	case 'alumniserverproject': include('src/index/alumniserverproject.php');break;
	case 'register':			include('src/index/register.php');break;
	case 'profile':				include('src/index/publicPage.php');break;
	default: 					include('src/index/start.php');
}

echo '</div></td></tr>'.$mainLayoutBottom.'</table></body></html>';

?>
Return current item: AlumniServer