<?
session_start();


include "include/db_connect.php";
include "include/functions_sql.php";
include "include/tables.php";
include "include/menu.php";
include "include/functions_www.php";
include "include/functions_display.php";

include "public/home.php";
include "public/forum.php";
include "public/jukebox.php";
include "public/photos.php";
include "public/photos_show.php";
include "public/videos.php";
include "public/members.php";
include "public/contacts.php";
include "public/connection.php";



include "admin/admin_home.php";




if (!$_SESSION["user_right"]) {
	$_SESSION["user_right"] = 0;
	;
}

if (!$_SESSION["user_id"]) {
	$_SESSION["user_id"] = 0;
	;
}

if ($_SESSION["user_right"] == -1) {
	go_random_blacksite();
	return;
}


?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>EPTV - Epita Epitech Video Association</title>
<style type="text/css" media="screen" title="Style par defaut">
@import url(css/main.css) ;
</style>
<script type="text/javascript" src="css/niftycube.js"></script>
<script type="text/javascript">
window.onload=function()
{
	Nifty("div#newsbox h1","top big");
	Nifty("div#newsbox ul","bottom big");
	Nifty("div.rightbox h1","top big");
	Nifty("div.rightbox ul","bottom big");
}
</script>

<SCRIPT TYPE="text/javascript">
<!--
function popitup(mylink, windowname)
{
if (! window.focus)return true;
var href;
if (typeof(mylink) == 'string')
   href=mylink;
else
   href=mylink.href;
window.open(href, 'EPTV - By Dailymotion', 'width=510,height=418,toolbar=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no');
return false;
}
//-->
</SCRIPT>
<STYLE TYPE="text/css">

.D11
  {
   POSITION:absolute;
   VISIBILITY:hidden;
   Z-INDEX:200;
  }
</STYLE>
<SCRIPT TYPE="text/javascript">
Xoffset=-60;
Yoffset= 20;
var isNS4=document.layers?true:false;
var isIE=document.all?true:false;
var isNS6=!isIE&&document.getElementById?true:false;
var old=!isNS4&&!isNS6&&!isIE;

var skn;
function initThis()
{
  if(isNS4)skn=document.d11;
  if(isIE)skn=document.all.d11.style;
  if(isNS6)skn=document.getElementById("d11").style;
}


/*
function popup(_m,_b)
{
	
  var content="<TABLE  WIDTH=130 BORDER=1 BORDERCOLOR=black CELLPADDING=2 CELLSPACING=0 "+"BGCOLOR="+_b+"><TD ALIGN=center><FONT COLOR=black SIZE=2>"+_m+"</FONT></TD></TABLE>";
  if(old)
  {
    alert("You have an old web browser:\n"+_m);
        return;
  }
  else
  {
        if(isNS4)
        {
          skn.document.open();
          skn.document.write(content);
          skn.document.close();
          skn.visibility="visible";
        }
        if(isNS6)
        {
          document.getElementById("d11").style.position="absolute";
          document.getElementById("d11").style.left=x;
          document.getElementById("d11").style.top=y;
          document.getElementById("d11").innerHTML=content;
          skn.visibility="visible";
        }
        if(isIE)
        {
          document.all("d11").innerHTML=content;
          skn.visibility="visible";
        }
  }
}
*/
var x;
var y;
function get_mouse(e)
{
  x=(isNS4||isNS6)?e.pageX:event.clientX+document.body.scrollLeft;
  y=(isNS4||isNS6)?e.pageY:event.clientY+document.body.scrollLeft;
  if(isIE&&navigator.appVersion.indexOf("MSIE 4")==-1)
          y+=document.body.scrollTop;
  skn.left=x+Xoffset;
  skn.top=y+Yoffset;
}


function removeBox()
{
  if(!old)
  {
        skn.visibility="hidden";
  }
}


if(isNS4)
  document.captureEvents(Event.MOUSEMOVE);
if(isNS6)
  document.addEventListener("mousemove", get_mouse, true);
if(isNS4||isIE)
  document.onmousemove=get_mouse;
// -->
</SCRIPT>

</head>

<?
	if ($_GET['connect']) {
		$connect_tv = $_GET['connect'];
		if ($connect_tv == 1)
		{
			checkUser($_POST['user_login'],	$_POST['user_pass']);
		}
		else if ($connect_tv == -1)
		{
			userDisconnect();
		}
	}

?>

<body>
<basefont face="lucida">
<DIV ID="d11" CLASS="d11"></DIV>
<div id="main_container">
    <!-- header and top menu -->
    <div id="main_header_home">
        <div id="menu_left"></div>
        <div id="menu_right"></div>
        <?
				dispMenu();
		?>
        
    </div>
 

			<?		
				/*if ($_SESSION["user_right"] > 0) {
					echo '<img src="images/logo_up_green_xmas.jpg" width="100%" height="105">';
				}
				else {
					echo '<img src="images/logo_up_red_xmas.jpg" width="100%" height="105">';
				}*/
			?>	
		

	<?
		if ($_GET['section']) {
			$section_www = $_GET['section'];
		}
		else
		{
			$section_www = "Home";
		}

		$tab_section[$section_www]($_GET['action']);
	?>

	
<script>
initThis();
</script>
</div>		
	<div id="main_footer">
			<span id="foot_logo"><img src="Nomad%20Concept%20V5_files/nomad_v5-43.png"></span>
			<div id="foot_menu">
				<ul>
					<li><a href="#" title="Accueil du site">Eptv.fr</a></li>
					<li><a href="http://www.nomad-concept.fr" title="Nomad-concept.fr">Nomad</a></li>
					<li><a href="http://www.epita.fr" title="Site epita">Epita</a></li>
       				<li><a href="http://www.epitech.net" title="Site epitech">Epitech</a></li>
				</ul>
			</div>			
			<div id="ft_img_left"></div>
			<div id="ft_img_right"></div>
			<div id="ft_img_mid"></div>
			<p class="copyrights"><br>&copy; 2010 EPTV<br /><br /><br /></p>
</div>
</body>
</html>
