<?

include('Code/confHeader.inc');

$testCookieStatus = 0;

if (isset($myTstCky) && ($myTstCky == "ChocChip")) {
  $testCookieStatus = 1;
}
if (!isset($CCHK)) {
  setcookie("myTstCky", "ChocChip");
  header("Location: $PHP_SELF?CCHK=1");
  exit;
}

if (!$testCookieStatus) {
  $here = dirname($SCRIPT_NAME);
  header("Location: http://$HTTP_HOST" . "$here/YouMustAllowCookies.php");
}

if (!IsSet($Me) || ! $Me -> valid() ) {
  go("All/login.php");
}
$Conf -> connect();

if ( $AskedYouToUpdateContactInfo!=1
     && $Me -> valid()
     && ($Me -> firstName == "" || $Me -> lastName == "" ) )
{
  $AskedYouToUpdateContactInfo = 1;
  $here = dirname($SCRIPT_NAME);
  $Me -> goAlert("$here/All/UpdateContactInfo.php",
		 "Please take a second to enter your contact information");
}



?>

<html>

<? $Conf->header("Welcome") ?>

<body>

<?
if (! $Me -> valid() ) {
  echo "<p>\n";
  echo "To use the conference submission system, you must register an ";
  echo "account. This same account information will be used to identify ";
  echo " you throughout the paper evaluation process, whether you are simply ";
  echo " submitting a paper, co-authoring a paper, reviewing papers or ";
  echo " are a member of the program committee. ";
  echo "</p>\n";
  echo "<p> To get started with the system, please login or register </p>";
  print "<center>";
  $Conf->textButton("Login (or register)", "All/login.php");
  print "</center>";
  exit();
}
?>

<center>
<?
  $Conf->textButton("Logout", "All/Logout.php");
?>
</center>

<table align=center width=80%>
<tr>
<td>

<p>
You're logged as <? echo $Me->fullname(); echo " ($Me->email)" ?>.
If this is not you, please logout.
<br>
You will be automatically logged out if you are idle for more than
<? echo round(get_cfg_var("session.gc_maxlifetime")/60) ?> minutes.
</p>

<?

//
// Oh what the hell, update their roles each time
//
$Me -> updateContactRoleInfo($Conf);

$TaskSpan="100";

$AllPrefix="All/";
include("Tasks-All.inc");

$AuthorPrefix="Author/";
include("Tasks-Author.inc");

include("Tasks-Reviewer.inc");
include("Tasks-PC.inc");
include("Tasks-Chair.inc");
include("Tasks-Assistant.inc");


if (0) {
  print "<p> ";
  print $Me -> dump();
  print "</p>";
}
?>

</td>
</tr>
</table>



</body>
<? $Conf->footer() ?>
</html>
