<?
  /* Set up data incase we have globals off */
  if ($_REQUEST['data']) {
    $data = $_REQUEST['data'];
    }
  else { 
    $data = $_POST['data'];
    }

  if ($_REQUEST['user']) {
    $data['user'] = $_REQUEST['user'];
    }
  else { 
    $data['user'] = $_POST['user'];
    }

  if ($_REQUEST['active'])
    $data['active'] = $_REQUEST['active'];
  if ($_REQUEST['email'])
    $data['email'] = $_REQUEST['email'];

  $data['HTTP_REFERER'] = $_SERVER['HTTP_REFERER'];
  
  /* Main includes */
  include("fasttemp.inc");
  include("session.inc");
  include("funcs.inc");

  /* MYSQL Connection if needed */
  mysql_pconnect("Ivorytower.UbixOnline.com:3306","tuve","5558585");
  mysql_select_db("tuve");
	
  /* Set up template directory */
  $data['tpl'] = new FastTemplate("/usr/web/sites/tuve.tv/templates");
 
  /* Set up defaults */
  $data['url'] = $_SERVER['PHP_SELF'];
  $data['tpl']->assign("SELF","$data[url]");
  $data['REMOTE_ADDR'] = $REMOTE_ADDR;
  if ($data['stype'] == "video") {
    $data['tpl']->assign("V_OP","SELECTED");
    $data['tpl']->assign("P_OP","");
    }
  else {
    $data['tpl']->assign("P_OP","SELECTED");
    $data['tpl']->assign("V_OP","");
    }
?>
