/*index.php - This script builds the main page of the site - first gets the channel for which we want to build the index (via GET or mod_rewrite) - loads css, some javascripts, the header module (which builds the personalized header of the requested channel), and then loads any block's actives for thus channel ALso can be used to load a page of a module using the "mod" GET variable*/ /*include configuration, the user class declaration and the language files.*/ include ("config.php"); include ("classes/access_user/access_user_class.php"); include ("functions.php"); include ("language/".$config['language']."/main.php"); // this path works for me... /*Acces user*/ $page_protect = new Access_user; //$page_protect->access_page(); // only set this this method to protect your page $page_protect->get_user_info(); $hello_name = $page_protect->user; if ($page_protect->access_level == 10) $isadmin=1; else $isadmin=0; //are you an admin /*What channel are we going to show?*/ if (!$_GET['channel']) $channel = $config['default_channel']; else $channel = $_GET['channel']; /*select channel info and format it*/ $resultNWT = db_query ("SELECT title, filename, ID, emited, framestill, category, sinopsi, artist, download_filename, credits, keywords, video_dataformat, viewed, downloads FROM media WHERE channel=\"$channel\" ORDER BY published DESC LIMIT 1;"); $row = mysql_fetch_row($resultNWT); $ID=$row[2]; if ( !$ID ) $ID=-1; if ($_GET['ID']) { $ID=$_GET['ID']; } else { $_GET['ID']=$ID; } print "
"; ?>