Location: PHPKode > projects > TVEz - Media Library > tvez-0.2.1/html/tvez.php
<?php

$GLOBALS['DEMO'] = FALSE;

	require "shared/session.php";

	if (isset($_REQUEST["content"]))
		$maincontent = $_REQUEST["content"];
	if ($maincontent == null)
		$maincontent = "home";

	require "../config/config_file.php";
	require "../config/shows_config.php";
	require "locale/localize.php";
	$TRANSLATED_TEXT = get_translation("locale");
	require "themes/theme.php";
	require "shared/mysql.inc";
	require "shared/user_mysql.inc";
	require "shared/browser.php";
	$BROWSER = new Browser;
	require "menu.inc";

	$theme = get_theme();
#	require $includes[$maincontent];

	# If a vote is cast, we are doing this here since we do not want to send
	# any headers before
	$castvote = (isset($_REQUEST['castvote'])) ? $_REQUEST['castvote'] : $castvote;
	if ($castvote) {
		$curInd = array_search(!0, $castvote);
		$suc = cast_vote($curInd,$castvote[$curInd]);
		header("HTTP/1.0 204 No Response");
		exit;
	}	

	if ( $_SESSION['tvezMenu'] == "left" ) {
		$left_class		= "menu";
		$right_class	= "content";
		$left_content	= "menu/menu.php";
		$right_content	= $contents[$maincontent];
	} else {
		$left_class		= "content";
		$right_class	= "menu";
		$left_content	= $contents[$maincontent];
		$right_content	= "menu/menu.php";
	}

echo '
<html>
	<head>
		<LINK REL="SHORTCUT ICON" href="'.dirname($_SERVER['PHP_SELF']).'/images/tvez.ico">
		<link rel="stylesheet" type="text/css" href="themes/theme.css.php?theme='.$theme.'">
		<script language="JavaScript" src="js/tvez.js"></script>
		<script language="JavaScript" src="nav/nav.js"></script>
		<script language="JavaScript" src="js/md5.js"></script>
	';
#		<script language="JavaScript" src="admin/accounts/accounts.js"></script>
?>
<!--
<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-5">
http://koi8.pp.ru/frame.html?/main.html
Russian charsets:
check BROWSER->Platform for OS
KOI8 (Unix)	charset=koi8-r
CP1251 (Windows)	charset=windows-1251
ISO 8859-5 (SunOs)	charset=iso-8859-5
CP866 (Dos)	charset=cp866
MacCyrillic (Mac)	charset=x-mac-cyrillic
(unregistered, but commonly recognized)
-->

	</head>
	<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" onload="javascript:load_imgs();">

<table width="100%" cellpadding="0" cellspacing="0" border="0">
	<tr>
		<td width="100%" class="topnav">
			<?php require "nav/topnav.php"; ?>
		</td>
	</tr>
<?php
	# Test the database configuration
	$DBERROR = "";
	$query = "select id from movies";
	query_db($query);
	if ($DBERROR != "") {
		echo '
			<tr>
				<td class="error" align="center">
	'.localize_string("Configuration Error").': '.$DBERROR.'<br>
	<a href="'.$_SERVER['PHP_SELF'].'?content=admin&page=tvezconfig">'.localize_string("Check the TVEz Configuration").'</a>
				</td>
			</tr>
		';
	}

?>
	<tr>
		<td valign="top">
<?php # Check for admin priviledges
	if ( isset($_REQUEST['content']) && $_REQUEST['content'] == "admin" )
		require "admin/admin_access.php";
?>
		<table class="main" width="100%" cellpadding="0" cellspacing="0" border="0">
			<tr>

<?php
	echo '
				<td class="'.$left_class.'" valign="top">
			';
			require $left_content;
	echo '
				</td>
				<td class="'.$right_class.'" valign="top">
			';
			require $right_content;
?>
				</td>
			</tr>
		</table>
		</td>
	</tr>
</table>

	</body>
</html>
Return current item: TVEz - Media Library