<%-- 
    Document   : UpdateUser
    Created on : May 4, 2010, 1:22:09 AM
    Author     : zwergnase
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <link href="../design/css/pass_home.css" type="text/css" rel="stylesheet" />
        <title>Bilgi Güncelleme</title>
    </head>
    <body>


 <div id="genel">
<table id="anatablo">
    <tr ><td colspan="2" border-width="0px">
<div id="baslik">
    <%
        int type=Integer.parseInt(session.getAttribute("type").toString());
        if(type==2){
    %>
<a href="PassengerHome.jsp"><img src="../design/Pictures/homesmall.jpg" width="65px" height="65px" align="left"/></a>
<%
}else{
%>
<a href="../ListNews"><img src="../design/Pictures/homesmall.jpg" width="65px" height="65px" align="left"/></a>
<%}%>

<font id="basliktext"> TREN BİLGİ SİSTEMİ</font>
</div>
        </td> </tr>
<tr>
<td id="linkcolumn">
<%
                         
                         if(type==2)
                         {
                            %>
                        <div id="links">
                            <p>
                                <a href='http://www.ceng.metu.edu.tr/~e1502103' target="_blank">
                                    <input type="button" value="Tren Takip Sistemi" id="linkbutton" /></a>
                                
                            </p><p>
                            <input type="button" value="Kişisel Bilgiler" id="linkbutton"
                                   ONCLICK="window.location.href='../findperson'"/>
                            </p><p>
                            <input type="button" value="Seyir Defteri"  id="linkbutton"
                                   ONCLICK="window.location.href='../SeyirDefteri'"/>
                            </p><p>
                                <input type="button" value="Sorun Giderme"  id="linkbutton"
                                       ONCLICK="window.location.href='KnowledgeDB.jsp'"/>
                            </p>
                            <p>
                                <input type="button" value="Bize Ulaşın"  id="linkbutton"/>
                            </p>
                        </div>

                        <%}
                         else
                             {
                            %>
                             <div id="links">
                            <p>
                                <input type="button" value="Haber Ekle"  id="linkbutton"
                                       ONCLICK="window.location.href='../AddNews'"/>
                            </p><p>
                            <input type="button" value="Görev Ekle" id="linkbutton"
                                   ONCLICK="window.location.href='../AddSchedule'"/>
                            </p><p>
                            <input type="button" value="Sorun Giderme"  id="linkbutton"
                                   ONCLICK="window.location.href='KnowledgeDB.jsp'"/>
                            </p><p>
                                <input type="button" value="Kişisel Bilgiler"  id="linkbutton"
                                       ONCLICK="window.location.href='ShowUserInfo.jsp'"/>
                            </p>
                        </div>
                             <%}%></td>

<td>
<div id="secondcell">


        <h2 align="center">Bilgi Güncelleme </h2>
        <%
                HttpSession session2=request.getSession(true);
                ejb.Users U=(ejb.Users)session2.getAttribute("user");
                request.setCharacterEncoding("UTF-8");
                response.setCharacterEncoding("UTF-8");

        %>


              <table id="general" align="center">
            <tr><td>
        <form name="userRegisterForm" action="../UpdateUserInfo" method="POST">

            <tr><td> <sup>*</sup>Kullanıcı adınız:</td><td>  <input type="text" name="userName" value=<%= (U.getUserName()== null  || U.getUserName().equals("")) ? "-" : U.getUserName() %> size="29" readonly/></td></tr>
            <tr><td> <sup>*</sup>Şifreniz:</td><td> <input type="password" name="password" value=<%= (U.getPassword()== null || U.getPassword().equals("")) ? "-" : U.getPassword() %> size="29" /></td></tr>
            <tr><td> <sup>*</sup>Adınız:</td><td> <input type="text" name="name" value= <%=(U.getName()== null  || U.getName().equals("")) ? "-" : U.getName()  %> size="29"  /></td></tr>
            <tr><td> <sup>*</sup>Soyadınız:</td><td> <input type="text" name="surname" value=<%=( U.getSurname() == null|| U.getSurname().equals(""))  ? "-" : U.getSurname() %> size="29" /></td></tr>
            <tr><td><sup>*</sup>E-Posta Adresiniz: </td><td> <input type="text" name="email" value=<%=(U.getEmail()== null  || U.getEmail().equals("")) ? "-" : U.getEmail() %> size="29" /> </td></tr>
            <tr><td> <sup>*</sup>Telefonunuz:</td><td> <input type="text" name="phone" value=<%= (U.getTelephone()== null || U.getTelephone().equals(""))  ? "-" : U.getTelephone() %> size="29" /></td></tr>
            <tr><td> Doğum Tarihiniz:</td><td> <input type="text" name="birthday" value=<%= (U.getBirthday()== null || U.getBirthday().equals("")) ? "-" : U.getBirthday() %> size="29" /></td></tr>
            <tr><td> Yaşadığınız şehir</td><td> <input type="text" name="location" value=<%= (U.getLocation()== null || U.getLocation().equals("")) ? "-" : U. getLocation() %> size="29" /></td></tr>
            <tr><td> En çok sehayat ettiğiniz şehir</td><td> <input type="text" name="preferred" value=<%= (U.getPreferredCity()== null || U.getPreferredCity().equals("")) ? "-" : U.getPreferredCity() %> size="29" /></td></tr>

            <tr><td align="center" colspan="2"><input type="submit" value="Tamam" name="registerButton" ></td></tr>


        </form></table>

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



</div>

    </body>
</html>
