<?php

/*
 * user/login.php
 *
 * - tries to validate login/pass
 * - sets 'pb' for problems
 *       - "badpass": bad password
 *       - "badlogin": unknown login
 *
 */

//add by Isa on 08.09.2009: get login info from FORM
if (isset($_POST['login'])) {  $login = strip_tags($_POST['login']); } else { $login = ""; }
if (isset($_POST['password'])) {  $password = strip_tags($_POST['password']); } else { $password = ""; }

require_once("../databases.php");
include("../sequencer.php");
require("../opendb.php");

require("checkpass.php");

$nbhourscookie=8;
setcookie("login", "$login", time() + $nbhourscookie*3600);
setcookie("password", "$password", time() + $nbhourscookie*3600);

?>



<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<HTML>
<HEAD>
<LINK rel="stylesheet" type="text/css" href="../sequencerstyle.css">
<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<META name="Author" lang="fr" content="Pierre Berthier">
<META name="keywords" lang="en"    content="">
<META name="keywords" lang="fr"    content="">
<META http-equiv="Pragma" content="no-cache">
<META http-equiv="Cache-Control" content="no-cache">
<META http-equiv="Cache-Control" content="must-revalidate">
<META http-equiv="Content-Script-Type" content="text/javascript">

<TITLE>CMPG sequencer - Registered User</TITLE>
</HEAD>

<BODY><A NAME="TOP"></A>

<TABLE BORDER=0 WIDTH="100%">
<TR>
<TD ALIGN=LEFT VALIGN=BOTTOM>
<A HREF="http://www.unibe.ch" TARGET=BLANK><IMG SRC="../images/unibern_logo.gif" BORDER=0></A>&nbsp;
<A HREF="http://cmpg.unibe.ch" TARGET=BLANK><IMG SRC="../images/new_banner_CMPG_Panorama_s3.jpg" BORDER=0></A>
</TD>
<TD ALIGN=RIGHT VALIGN=BOTTOM>
<H1 ALIGN=RIGHT CLASS=RED><A HREF="http://cmpg.unibe.ch/sequencer/">ABI 3100</A></H1>
</TD>
</TR>
</TABLE>



<HR NOSHADE SIZE=3>


<H2>Registered User</H2>


<?php

 echo "Welcome, ";

 $request = "SELECT first_name FROM people WHERE login=\"$login\";";

 $result = mysql_query ($request, $db)
 or
 mysql_die("Query SELECT failed.");

 echo "<B>". mysql_result($result, 0, "first_name") . ".</B> (login: <CODE>$login</CODE>)\n";

 mysql_free_result($result);

?>

<TABLE WIDTH="50%" CELLSPACING=0 CELLPADDING=0 BORDER=0><TR><TD><HR SIZE=3 NOSHADE></TD></TR></TABLE>

<I>Are you not </I><CODE><?php echo $login; ?></CODE><I>?</I> Then please click on <A HREF="./forgetlogin.php">forget login</A>, you will enter your login again.


<H3>News</H3>

<TABLE BORDER=0 CELLPADDING=4 CELLSPACING=0 WIDTH="66%">


<TR>
<TD><IMG SRC="../images/new3.gif" ALT="new!" BORDER=0 ALIGN=MIDDLE></TD>
<TD>
<IMG SRC="../images/greenbullet.gif" ALT="a green bullet" BORDER=0>
The <I>List of jobs</I> pages are (hopefully) more convenient by showing only a limited number of jobs per page (and not the whole list). You can choose how many jobs are displayed per page and navigate among the list.  <I>Please give <A HREF="mailto:isabelle.duperret@iee.unibe.ch">me</A> some feedback if you would like to have more options or if this new thing disturbs you...</I>
<P>
Remember that you can also sort the list by clicking the columns' names (for example by completion date).</TD>
</TR>

<TR>
<TD><IMG SRC="../images/updated3.gif" BORDER=0 ALT="Updated!" ALIGN=MIDDLE></TD>
<TD>
<IMG SRC="../images/greenbullet.gif" ALT="a green bullet" BORDER=0>
New dye set for fragment analysis, now with 5 colors! Select dye set <B>G5</B> when adding runs.
</TD>
</TR>



<!--<TR><TD COLSPAN=2>&nbsp;</TD></TR>-->


</TABLE>






<H3>Projects</H3>

Here you can

<UL>
<LI>access your current projects,
<LI>create new projects, or
<LI>join some existing ones created by others.
</UL>

<P>
<B>Joining</B> a project allows you later to open it. You are automatically joined to any project that you create yourself. <B>Opening</B> a project allows you to create, edit and submit jobs within this project.

<UL>
<LI><A HREF="newproject.php">Create New Project</A>
<LI><A HREF="listjoinproject.php">Join Other Projects</A>
<LI><A HREF="listprojects.php">Open one of my Projects</A>
</UL>





<H3>Samples deposit</H3>

We have set up a special place for you to deposit your samples, after a job submission.

<P><I>Please follow the <A HREF="../deposit.html">instructions on this page</A>.</I>






<H3>Personal info</H3>

<UL>
<LI><A HREF="info.php">Change Personal Info</A>
<LI><A HREF="forgetlogin.php">Forget my login/password</A>
</UL>

<P>
<TABLE WIDTH="50%" CELLSPACING=0 CELLPADDING=0 BORDER=0><TR><TD><HR SIZE=3 NOSHADE></TD></TR></TABLE>
<A HREF="../help.php">Help Desk</A>&nbsp;|&nbsp;<A HREF="../admin">Home Page</A>

<HR NOSHADE SIZE=3>

<TABLE WIDTH="100%">
<TR>
<TD WIDTH="50%" VALIGN=MIDDLE><A HREF="mailto:isabelle.duperret@iee.unibe.ch"><IMG SRC="../images/mail.gif" BORDER=0 WIDTH=30 ALIGN=TOP HSPACE=2 ALT="[Webmaster: isabelle.duperret@iee.unibe.ch]">Webmaster</A><BR><A HREF="../version.html">Version</A>: 2.0, 07.09.2009
</TD>
</TR>
</TABLE>

</BODY>
</HTML>



<?php mysql_close($db); ?>
