<?php 
	session_start();
	ob_start();
	
	include_once('include/functions.php');
	include_once('include/formular.php');

/*	
echo "<pre>";
print_r($_POST);
echo "</pre>";
*/
	$msg = "";

	if ($_GET['logout']=='y'){
		session_destroy();
	}
	if ($_POST['submit']){
		//echo "x";
		if (login(trim($_POST['oid']))){
			header("Location: index.php");
		}else {
			$msg = "Codul de acces introdus de dumneavoastra <br>NU este valid. <br> Va rugam incercati din nou. <br> Va multumim.";
		}
	}
	
	db_connect();
	

 include("includes/templates/header.tpl.php"); 

	?>	
<form action="<?= $_SERVER['PHP_SELF'] ?>" method="post">
<br>
<table width="100%"  cellpadding="0" cellspacing="0" border="0">
	<tr>
		<td align="left">
			<a href="?page=seal2" class="seal2">EuroRec Seal Level 2 </a> &nbsp; | &nbsp; <a href="http://prorec.ro/sondaj/viewAll.php" class="seal2">EuroRec Seal Level 1</a>
		</td>
	</tr>
<tr>
	<td  class="lineBet">
<br>


<table width="100%"  cellpadding="1" cellspacing="2" border="0" align="center" >
	<tr>
		<td valign="top">
			<table width="100%"  cellpadding="0" cellspacing="0" border="0">
				<tr>
					<td valign="top" class="leftText" >
<?php
	switch ($_GET['page']){
		case 'seal1':
			include_once('EuroRecSeal/EuroRecSeal1.php');
			break;
		case 'seal2':
			include_once('EuroRecSeal/EuroRecSeal2.php');
			break;
		default:
			include_once('EuroRecSeal/EuroRecSeal2.php');
			break;
	}
?>

				</tr>
			</table>
		</td>
		<td width="350px" valign="top">
		
			<table width="100%"  cellpadding="2" cellspacing="3" border="0" align="center" class="chenar">
				<tr>
					<td height="100px" align="center">
						<br>
					<br>
						<table width="96%"  cellpadding="0" cellspacing="0" border="0" align="center" class="chenarLittle">
							<tr>
								<td width="100px" bgcolor="#ffd926">
									<img src="img/EuroRecLevel2_yellow.gif">
								</td>
								<td valign="middle" align="center" class="titleSondajCriterii">
									<b>Sondaj Criterii</b>
								</td>
							</tr>
						</table>
					</td>
				</tr>
				<tr>
					<td>
						&nbsp;
					</td>
				</tr>
				<tr>
					<td class="infoTextBox" align="left">
					<table width="96%"  cellpadding="0" cellspacing="0" border="0" align="center" >
						<tr><td class="infoTextBox"><b>Cod autentificare:</b></td></tr>
					</table>
					</td>
				</tr>
				<tr>
					<td class="infoTextBox" align="left">
						<table width="96%"  cellpadding="0" cellspacing="0" border="0" align="center" >
							<tr><td class="infoTextBox"><input type="text" name="oid" size="50"></td></tr>
						</table>
					</td>
				</tr>
				<tr>
					<td class="infoTextBoxLittle" valign="top" align="left">
						&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;(ex. : EHRQTN____ )
						<br>
					</td>
				</tr>
				<tr>
				<br>
					<td class="infoTextBox" align="left">
					<br>
						<input type="submit" value=" Autentificare " name="submit" class="authentif">
						
					</td>
				</tr>
		
				<tr>
					<td class="infoTextBoxLittle" valign="top">
						&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
					</td>
				</tr>
				<tr>
					<td  align="center">
						<table width="96%"  cellpadding="0" cellspacing="0" border="0" align="center" >
							<tr><td class="lineBet">&nbsp;</tr>
						</table>
					</td>
				</tr>
				<tr>
					<td class="infoTextBox" align="left">
						<table width="96%"  cellpadding="0" cellspacing="0" border="0" align="center" >
							<tr><td class="infoTextBox"><b>&Icirc;nc&#259; nu ave&#539;i cod de autentificare ?</b></td></tr>
						<br>
						</table>
					</td>
				</tr>
				
				<tr>
				<br>
					<td class="infoTextBox" align="left">
						<table  cellpadding="0" cellspacing="0" border="0"  >
						<br>
							<tr><td class="background_07" height="25px">
					
							<a href="apply.php" class="seal2">&nbsp; Genereaz&#259; un nou cod &nbsp;</a> </td></tr>
						</table>
					</td>
				</tr>

				<tr>
					<td class="infoTextBoxLittle" valign="top">
						&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
					</td>
				</tr>

				<tr>
	
					<td class="infoTextBox" align="left">
						
						
							
					
							<a href="viewAll2010.php" class="infoTextBox" style="text-decoration:none">&nbsp;<b> Rezultate sondaj</b> &nbsp;</a> </td></tr>
						
					</td>
				</tr>
				<tr>
					<td class="infoTextBoxLittle" valign="top">
						&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
					</td>
				</tr>
			</table> 
		</td>
	</tr>
	<br>
</table>
		</td>
	</tr>
	
</table>
<?php 
 
 include("includes/templates/footer.tpl.php"); 
 
 ?>

	

