What is used to save login information??

I want to make a html page that has a login screen on it. My question is what is the correct way to store this information for later use. I thought of using a text file but that would not be secure. Also wouldn't a database have the same problem?? How does a web site like
E-bay handle customer login?

i used to use ldap till i decided to try the method in the ways mentioned here... for those interested, here's what i got: btw its pretty long and in some place very implmentation specific. Also i don't doc caus it bores me.
UserTable.java
package com.tempo.Schools;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Date;
import java.io.*;
import java.util.*;
public class UserTable implements Serializable
     private Connection connection;
     private PreparedStatement stmt;
     private ResultSet rset;
     private int id;
     private String username;
     private String name;
     private String password;
     private String email;
     private String date;
     private String lastpasschg;
     private String dateexpire;
     public void setId (int id) { this.id = id; }
     public int getId () { return id; }
     public void setUsername(String userid) { this.username = username; }
     public String getUsername() { return username; }
     public void setName(String name) { this.name = name; }
     public String getName() { return name; }
     public void setPassword(String password) { this.password = password; }
     public String getPassword() { return password; }
     public void setEmail(String email) { this.email = email; }
     public String getEmail() { return email; }
     public void setDate(String date) { this.date = date; }
     public String getDate() { return date; }
     public void setLastpasschg(String Lastpasschg) { this.lastpasschg = lastpasschg; }
     public String getLastpasschg() { return lastpasschg; }
     public void setDateexpire(String dateexpire) { this.dateexpire = dateexpire; }
     public String getDateexpire() { return dateexpire; }
     public UserTable(Connection connection)
          this.connection = connection;
     public void selectTable() throws SQLException
          stmt = connection.prepareStatement("SELECT * FROM USER_TABLE");
          rset = stmt.executeQuery();
     public void selectRowByID( int id ) throws SQLException
          stmt = connection.prepareStatement("SELECT * FROM USER_TABLE WHERE ID = ?");
          stmt.setInt(1, id);
          rset = stmt.executeQuery();
     public void selectRowByUsername( String userid ) throws SQLException
          stmt = connection.prepareStatement("SELECT * FROM USER_TABLE WHERE USERID = ?");
          stmt.setString(1, username);
          rset = stmt.executeQuery();
     public int selectNewID() throws SQLException
          stmt = connection.prepareStatement("SELECT USER_TABLE_SEQ.NEXTVAL FROM DUAL");
          rset = stmt.executeQuery();
          rset.next();
          int id = rset.getInt(1);
          rset.close();
          stmt.close();
          return id;
     protected int createUser() throws SQLException
          setId(selectNewID());
          if (getUsername().length()<5)
               return -1;
          PreparedStatement stmt = connection.prepareStatement("INSERT INTO USER_TABLE (ID, USERID, NAME, PASSWORD, EMAIL, DATECREATE, LASTPASSCHANGE, DATEEXPIRE)"
                                                  + " VALUES (?, ?, ?, ?, ?, TO_DATE('', 'YYYY-MM-DD'),TO_DATE('', 'YYYY-MM-DD'),TO_DATE('?', 'YYYY-MM-DD'))");
          stmt.setInt(1, getId());
          stmt.setString(2, getUsername());
          stmt.setString(3, getName());
          stmt.setString(4, getPassword());
          stmt.setString(5, getEmail());
          stmt.setString(6, getDateexpire());
          int result = stmt.executeUpdate();
          stmt.close();
          if (result==0)
               return 0;
          else
               return getId();
     protected int updateRowByID( int id ) throws SQLException
          stmt = connection.prepareStatement("UPDATE USER_TABLE ID = ?, USERID = ?, NAME = ?,"
                                   + "PASSWORD = ?, EMAIL = ?, DATECREATE = ?, LASTPASSCHG = ?, DATEEXPIRE = ?"
                                   + "WHERE ID = ?");
          stmt.setInt(1, id);
          stmt.setString(2, getUsername());
          stmt.setString(3, getName());
          stmt.setString(4, getPassword());
          stmt.setString(5, getEmail());
          stmt.setString(6, getDate());
          stmt.setString(7, getLastpasschg());
          stmt.setString(8, getDateexpire());
          stmt.setInt(9, id);
          return stmt.executeUpdate();
     protected boolean deleteRowByID( int id ) throws SQLException
          PreparedStatement stmt = connection.prepareStatement("DELETE FROM USER_TABLE WHERE ID = ?");
          stmt.setInt(1, id);
          int result = stmt.executeUpdate();
          stmt.close();
          if (result==0)
               return false;
          else
               return true;
     protected boolean changePassword(int id, String password) throws SQLException
          PreparedStatement stmt = connection.prepareStatement("UPDATE USER_TABLE SET PASSWORD = ? WHERE ID = ?");
          stmt.setString(1, password);
          stmt.setInt(2, id);
          int result = stmt.executeUpdate();
          stmt.close();
          if (result==0)
               return false;
          else
               return true;
    public boolean fetch() throws SQLException
        if ( rset.next() )
            setId(rset.getInt(1));
            setUsername(rset.getString(2));
            setName(rset.getString(3));
            setPassword(rset.getString(4));
            setEmail(rset.getString(5));
            setDate(rset.getString(6));
            setLastpasschg(rset.getString(7));
            setDateexpire(rset.getString(8));
            return true;
        else
            rset.close();
            stmt.close();
            return false;
    public void close()
SessionTable.java
package com.tempo.Schools;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Date;
import java.io.*;
import java.util.*;
public class SessionTable implements Serializable
     private Connection connection;
     private PreparedStatement stmt;
     private ResultSet rset;
     private int id;
     private String username;
     private String password;
     private String datelogon;
     public int getId() { return id; }
     public void setId(int id) { this.id = id; }
     public String getUsername() { return username; }
     public void setUsername(String userid) { this.username = username; }
     public String getPassword() { return password; }
     public void setPassword(String password) { this.password = password; }
     public String getDatelogon() { return datelogon; }
     public void setDatelogon(String datelogon) { this.datelogon = datelogon; }
     public SessionTable(Connection connection)
          this.connection = connection;
    public int createSession(String username, String password, String datelogon) throws SQLException
          if (username.length()<5)
               return 0;
          stmt = connection.prepareStatement("SELECT SESSION_TABLE_SEQ.NEXTVAL FROM DUAL");
          rset = stmt.executeQuery();
          rset.next();
          int id = rset.getInt(1);
          rset.close();
          stmt.close();
          setId(id);
          setUsername(username);
          setPassword(password);
          setDatelogon(datelogon);
          if (!addRow())
               return 0;
          return id;
    public boolean addRow() throws SQLException
          PreparedStatement stmt2 = connection.prepareStatement("INSERT INTO SESSION_TABLE (ID, USERID, PASSWORD, DATELOGON) VALUES (?, ?, ?, ?)");
          stmt2.setInt(1, getId());
          stmt2.setString(2, getUsername());
          stmt2.setString(3, getPassword());
          stmt2.setString(4, getDatelogon());
          int result = stmt2.executeUpdate();
          stmt2.close();
          if (result==0)
               return false;
          else
               return true;
    public void selectRowByUsername(String username) throws SQLException
          stmt = connection.prepareStatement("SELECT * FROM SESSION_TABLE WHERE USERID = ?");
          stmt.setString(1, username);
          rset = stmt.executeQuery();
    public void selectRowById(int id) throws SQLException
          stmt = connection.prepareStatement("SELECT * FROM SESSION_TABLE WHERE ID = ?");
          stmt.setInt(1, id);
          rset = stmt.executeQuery();
     public int deleteRowById(int id) throws SQLException
          PreparedStatement stmt2 = connection.prepareStatement("DELETE FROM SESSION_TABLE WHERE ID = ?");
          stmt2.setInt(1, id);
          int result = stmt2.executeUpdate();
          stmt2.close();
          return result;
    public boolean fetch() throws SQLException
        if ( rset.next() )
            setId(rset.getInt(1));
            setUsername(rset.getString(2));
            setPassword(rset.getString(3));
            setDatelogon(rset.getString(4));
            return true;
        else
            rset.close();
            stmt.close();
            return false;
    public void close()
SecurityTable.java
package com.tempo.Schools;
import java.sql.*;
import java.io.*;
import java.util.*;
public class SecurityTable implements Serializable
     private Connection connection;
     private PreparedStatement stmt;
     private ResultSet rset;
     private int id;
     private HashMap map = new HashMap();
     public HashMap getMap() { return map; }
     public int getId() { return id; }
     private void setId(int id) { this.id = id; }
     public SecurityTable(Connection connection)
          this.connection = connection;
     public void selectRowByID(int id) throws SQLException
          stmt = connection.prepareStatement("SELECT * FROM SECURITY_TABLE WHERE ID = ?");
          stmt.setInt(1, id);
          rset = stmt.executeQuery();
          parse();
    private void parse() throws SQLException
        if ( rset.next() )
            map.put("areamain_jsp", new Integer(rset.getInt(2)));
            map.put("FormPrint_sitevariations_jsp", new Integer(rset.getInt(3)));
            map.put("FormVer_sitevariations_jsp", new Integer(rset.getInt(4)));
            map.put("Form_sitedata_jsp", new Integer(rset.getInt(5)));
            map.put("Form_sitevariations_jsp", new Integer(rset.getInt(6)));
            map.put("noncontract_areamain_jsp", new Integer(rset.getInt(7)));
            map.put("noncontract_areamain1_jsp", new Integer(rset.getInt(8)));
            map.put("noncontract_sitemain_jsp", new Integer(rset.getInt(9)));
            map.put("siteaudits_jsp", new Integer(rset.getInt(10)));
            map.put("sitecarpet_jsp", new Integer(rset.getInt(11)));
            map.put("sitecarpetmod_jsp", new Integer(rset.getInt(12)));
            map.put("sitedata_jsp", new Integer(rset.getInt(13)));
            map.put("sitedataold_jsp", new Integer(rset.getInt(14)));
            map.put("sitefloordata_jsp", new Integer(rset.getInt(15)));
            map.put("sitemain_jsp", new Integer(rset.getInt(16)));
            map.put("siteohs_jsp", new Integer(rset.getInt(17)));
            map.put("siteperiodic_jsp", new Integer(rset.getInt(18)));
            map.put("siteperiodicedit_jsp", new Integer(rset.getInt(19)));
            map.put("siteperiodicprint_jsp", new Integer(rset.getInt(20)));
            map.put("siteplan_jsp", new Integer(rset.getInt(21)));
            map.put("siteplan_map_jsp", new Integer(rset.getInt(22)));
            map.put("siteqainspect_jsp", new Integer(rset.getInt(23)));
            map.put("sitevariations_jsp", new Integer(rset.getInt(24)));
            map.put("siteworksched_jsp", new Integer(rset.getInt(25)));
            map.put("siteworkschededit_jsp", new Integer(rset.getInt(26)));
            map.put("siteworkschedprint_jsp", new Integer(rset.getInt(27)));
            map.put("security_access", new Integer(rset.getInt(28)));
            map.put("admin_access", new Integer(rset.getInt(29)));
            map.put("report_access", new Integer(rset.getInt(30)));
            rset.close();
            stmt.close();
     protected int createUser(int id) throws SQLException
          stmt = connection.prepareStatement("INSERT INTO SECURITY_TABLE (ID) VALUES (?)");
          stmt.setInt(1, id);
          int result = stmt.executeUpdate();
          stmt.close();
          stmt = connection.prepareStatement("UPDATE SECURITY_TABLE SET " + access_defaults + "WHERE ID = ?");
          stmt.setInt(1, id);
          stmt.executeUpdate();
          stmt.close();
          if (result==0)
               return 0;
          else
               return id;
     protected void changeAccess(int id, String page, int access) throws SQLException
          Statement st = connection.createStatement();
          String query = "UPDATE SECURITY_TABLE SET " + page.toUpperCase() + " = "
               + Integer.toString(access) + " WHERE ID = " + Integer.toString(id);
          int result = st.executeUpdate(query);
     protected void deleteRowByID(int id) throws SQLException
          stmt = connection.prepareStatement("DELETE FROM SECURITY_TABLE WHERE ID = ?");
          stmt.setInt(1, id);
          stmt.executeUpdate();
     public void close()
     private static String access_defaults = "areamain_jsp = 15,"
                                             +"FormPrint_sitevariations_jsp = 1,"
                                             +"FormVer_sitevariations_jsp = 1,"
                                             +"Form_sitedata_jsp = 1,"
                                             +"Form_sitevariations_jsp = 1,"
                                             +"noncontract_areamain_jsp = 1,"
                                             +"noncontract_areamain1_jsp = 1,"
                                             +"noncontract_sitemain_jsp = , 1"
                                             +"siteaudits_jsp = 15,"
                                             +"sitecarpet_jsp = 15,"
                                             +"sitecarpetmod_jsp = 15,"
                                             +"sitedata_jsp = 5,"
                                             +"sitedataold_jsp = 1, "
                                             +"sitefloordata_jsp = 5,"
                                             +"sitemain_jsp = 1,"
                                             +"siteohs_jsp = 15,"
                                             +"siteperiodic_jsp = 15,"
                                             +"siteperiodicedit_jsp = 15,"
                                             +"siteperiodicprint_jsp = 1,"
                                             +"siteplan_jsp = 15,"
                                             +"siteplan_map_jsp = 1,"
                                             +"siteqainspect_jsp = 15,"
                                             +"sitevariations_jsp = 1,"
                                             +"siteworksched_jsp = 1,"
                                             +"siteworkschededit_jsp = 1,"
                                             +"siteworkschedprint_jsp = 1,"
                                             +"security_access = 0";
SecurityManager.java (i stuffed up on the name here)
package com.tempo.Schools;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Date;
import java.io.*;
import com.tempo.Schools.*;
import java.security.MessageDigest;
import java.util.*;
import com.tempo.utils.*;
public class SecurityManager implements Serializable
     //The connection
     private Connection connection;
     //User information for when logged in
     private int userid = 0;
     private String username = "";
     private boolean loggedIn = false;
     private int sessionid = 0;
     //Contains all access definitions
     private HashMap securityMap = null;
     //Allows info to be retieved
     public int getUserID() { return userid; }
     public String getUsername() { return username; }
     public boolean isLoggedIn() { return loggedIn; }
     public int getSessionid() { return sessionid; }
    public boolean getAccess(String key, int mask) throws Exception
          if (!isLoggedIn())
               throw new Exception("Cannot check access until login");
          Integer temp = (Integer)securityMap.get( key );
          int access = temp.intValue();
          if ((access & mask) == mask)
               return true;
          else
               return false;
     public SecurityManager(Connection connection)
          this.connection = connection;
      *Doesn't require password caus its already
      *been stored in the session table.
      *Does require a session id number as provided
      *by the logon function. Also returns the session id again
     public int logonFromSession(int sessionid) throws Exception
          UserTable ut = new UserTable(this.connection);
          SecurityTable st = new SecurityTable(this.connection);
          SessionTable session = new SessionTable(this.connection);
          session.selectRowById(sessionid);
          if (!session.fetch())
               return -1;
          String username = session.getUsername();
          String password = session.getPassword();
          ut.selectRowByUsername(username);
          if (!ut.fetch()) {
               //session.deleteRowById( sessionid );
               return -1;
          if (!ut.getPassword().equals(password)) {
               session.deleteRowById( sessionid );
               return -2;
          //License Expired
          //if(ut.getDateexpire() > Today's Date)
               //return -3;
          //Must change password
          //if (!ut.getLastpasschg more than 6 months ago
               //return -4
          this.sessionid = sessionid;
          this.userid = ut.getId();
          ut.close();
          st.selectRowByID( userid );
          securityMap = st.getMap();
          st.close();
          loggedIn = true;
          return getSessionid();
      *Call this function to log a user in.
      *returns a session id
     public int logon(String username, String password) throws Exception
          UserTable ut = new UserTable(this.connection);
          SecurityTable st = new SecurityTable(this.connection);
          SessionTable session = new SessionTable(this.connection);
          session.selectRowByUsername(username);
          while (session.fetch()) {
               session.deleteRowById( session.getId() );
          String encryptedPassword = SecurityTools.encrypt(password);
          ut.selectRowByUsername(username);
          //No Such User
          if (!ut.fetch())
               return -1;
          //Incorrect Password
          if (!ut.getPassword().equals(encryptedPassword))
               return -2;
          //License Expired
          //if(ut.getDateexpire() > Today's Date)
               //return -3;
          //Must change password
          //if (!ut.getLastpasschg more than 6 months ago
               //return -4
          this.sessionid = session.createSession(ut.getUsername(), encryptedPassword, "");
          session.close();
          this.userid = ut.getId();
          ut.close();
          st.selectRowByID( this.userid );
          securityMap = st.getMap();
          st.close();
          loggedIn = true;
          return getSessionid();
     public static void main(String[] args)
          try {
               //dbConnection dbc = new OracleConnection();
               //dbc.createConnection("peter");
               //dbc.close();
          } catch (Exception e) {
               e.printStackTrace();
SecurityTools.java
package com.tempo.Schools;
import java.security.MessageDigest;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Date;
import java.io.*;
import java.util.*;
import com.tempo.Schools.*;
import com.tempo.Schools.SecurityManager;
import com.tempo.utils.*;
public class SecurityTools implements Serializable
     private Connection connection;
     private SecurityManager sm;
     public SecurityTools(Connection connection, SecurityManager sm)
          this.connection = connection;
          this.sm = sm;
     public int addUser(String username, String name, String password, String email, String expire ) throws Exception
          if (!sm.isLoggedIn())
               throw new Exception("Must be logged in to create new account");
          if (!sm.getAccess("security_access", ADD))
               throw new Exception("You do not have access to create new account");
          connection.setAutoCommit(false);
          String encryptedPassword = encrypt(password);
          UserTable ut = new UserTable(connection);
          ut.setUsername(username);
          ut.setName(name);
          ut.setPassword(encryptedPassword);
          ut.setEmail(email);
          ut.setDateexpire(expire);
          int id = ut.createUser();
          if (id==0)
               throw new Exception("Could not add user");
          ut.close();
          SecurityTable st = new SecurityTable(connection);
          int id2 = st.createUser(id);
          if (id!=id2) {
               connection.rollback();
               throw new Exception("Something broke");
          st.close();
          connection.commit();
          //send email to person
          //send email to admin
          return id;
     public void deleteUser(int userid) throws Exception
          if (!sm.isLoggedIn())
               throw new Exception("Must be logged in to delete account");
          if (!sm.getAccess("security_access", DELETE))
               throw new Exception("You do not have access to delete account");
          UserTable ut = new UserTable(connection);
          ut.deleteRowByID(userid);
          ut.close();
          SecurityTable st = new SecurityTable(connection);
          st.deleteRowByID(userid);
          st.close();
     public void updateUserAccess(int id, String page, int access) throws Exception
          if (!sm.isLoggedIn())
               throw new Exception("Must be logged in to edit account");
          if (!sm.getAccess("security_access", EDIT))
               throw new Exception("You do not have access to edit account");
          SecurityTable st = new SecurityTable(connection);
          st.changeAccess(id, page, access);
          st.close();
     public boolean updateUserPassword(String username, String oldPassword, String newPassword) throws Exception
          if (!sm.isLoggedIn())
               throw new Exception("Must be logged in");
          String encrypted_oldPassword = SecurityTools.encrypt(oldPassword);
          UserTable ut = new UserTable(connection);
          ut.selectRowByUsername(username);
          //Incorrect Username
          if (!ut.fetch())
               return false;
          //Incorrect password
          if (!ut.getPassword().equals(encrypted_oldPassword))
               return false;
          return ut.changePassword( ut.getId(), SecurityTools.encrypt(newPassword) );
     public boolean changeUserPassword(String username, String newPassword) throws Exception
          if (!sm.isLoggedIn())
               throw new Exception("Must be logged in");
          if (!sm.getAccess("security_access", EDIT))
               throw new Exception("You do not have access to change password");
          UserTable ut = new UserTable(connection);
          ut.selectRowByUsername(username);
          //Incorrect Username
          if (!ut.fetch())
               return false;
          return ut.changePassword( ut.getId(), SecurityTools.encrypt(newPassword) );
     public static String encrypt(String plaintext) throws Exception
          MessageDigest md5 = MessageDigest.getInstance("MD5");
          md5.update( plaintext.getBytes("UTF-8"));
          byte[] buffer = md5.digest();
          String pw = new String(buffer);
          return Integer.toString(pw.hashCode());
     public static int VIEW = 1;
     public static int ADD = 2;
     public static int EDIT = 4;
     public static int DELETE = 8;
     public static int NOPRIV = 16;
     public static int UNPRIV = 32;
     public static int PRIV      = 64;
     public static int OPRIV  = 128;
}If your got this far and you need anyhelp, give me your email address and i'll lend what i can

Similar Messages

  • I started the free adobe to word or excel package but I can't remember what I used as a login or password

    Document Cloud PDF services was really busy that day and I was having problems with the upload.  I didn't think that it had accepted my debit card but it did.  Now I have no idea how to get to it.  I think I had to use a different email or user name than the one I usually use because at the time I wasn't logged in as administrator. Actually I have no idea what happened I tried to contact adobe but I kept going in circles.  Can anyone give my any advice?  Please?  I feel like an idiot.  I use to be fairly competent on a computer but was away from them for about 5 years and I forgot quite a bit.  Add that to all the new technology and it feels like I have to learn to walk again.

    You should be able to login to Acrobat.com using the same Adobe ID (email address) and password that you used to login to this forum.

  • Parameters in Url..how do I use login information to insert the primary key

    Uggg, it is 3 am, I am so tired. Please help.
    I have made a registration page for my site. Hurray it works.
    Login Page. It works
    Protected some pages. Works
    Now I am trying to make a page that the users can go to and update their user information. User name, password, email ect.
    I can get it to prepopulate if I put ?id=3, or someother primary key in the url by hand.....and it does update the data.... but I can't, for the life of me, figure out how to make it use the users login information to get and insert the primary key in the url from the link to the update page.
    I have used the hyperlink box and chose the updateaccount.php file, then went to parameters and selected Name: id Value: I chose id from the dropdown from the data base. This puts in an echo that looks like it should work. NO SUCH LUCK.
    Pleeeese!!! What am I doing wrong.
    I am a total novice. Done a few static sites. So please speak slowly.
    Thanks sooooo much

    I really can´t recommend exposing critical stuff like e.g. the user´s login_id in the URL, because once it´s visible, it can be changed by anyone. Better insert the Session Variable kt_login_id, which will only be availabe on a custom PHP page when inserting...
    <?php session_start(); ?>
    ...on line 1 of this document.
    Cheers,
    Günter

  • Use stored login information from Safari/Firefox etc in Flash Player standalone? (Mac)

    I play a flash game called FFR (Flash Flash Revolution). It uses a login system to keep track of scores and ranks from the songs I play. On my late model eMac It's very laggy in-browser, even on low quality. I downloaded the Flash Player 9 stand alone and it runs smooth, however it doesn't use my stored login information from Safari/Firefox (or IE5 for that matter) Like Windows does. Is there any way to fix this?

    Anyone?

  • InfoView needs login information when dynamic parameters are included

    Hi,
    we've got a Crystal Reports Server 2008 and everything worked fine in the past, but then we had to reinstall the server and now we've got the following problem:
    Although we saved the Login information of the report on the server, InfoView asks the user again when you he wants to open the report. But this only happens when the report has a dynamical parameter.
    We really tried alot of things but we didn't find a solution and i'm very sure every setting is the same like before the new installation.
    Do you have any idea how we can fix this problem?
    Database connection is ODBC, but the settings of the connection wasn't changed and the reports are still the same, too. I think it has to be a problem of the server. When we create a new report everything works fine and the login informations are saved but as soon as we include a dynamical parameter, infoview wants the login information again. Btw: We're using Tomcat.
    Thanks for you help!

    Hi,
    thanks for you answer!
    I'm sorry, but yes, parameter means prompt.
    When I try Infoview I'm using the same login information as in CR, but we also tried different.
    The User has definitely the right to open the report, because he can type in the information when he opens the report in InfoView, and the report and prompt works. The strange thing is, that the login information are already saved in the properties of the report and should'nt be asked again.
    Still no solution for this problem... any other ideas?
    Again, everything works fine before we made a new installation of the server and im very sure that every setting now is the same, but the port of the infoview has changed, is there a possibility that some ports need to be opened now or something like that?

  • How to change company logo dynamically using login information of the user in flex4 CSS styl method?

    hi all,
    I am doing mxml flex4 web application. i am using a login in my application. this login for multi user  purpose.
    My need is when a user login using his username and password his company logo should show the top of my application and his copyright details show the bottom of my application
    if another user login means his company logo and copywrights should show in my application.
    This logo and copyrights details should change dynamically based on the login information.
    I want to create this using CSS file (skins and sparks)
    How to do this,i am struck in this place,
    Looking for useful and helpful suggession or snippet code,
    Thanks in advance,
    Cheers,
    B.Venkatesan.

    If the user is logging in, presumably you are having the user hit a back end web-server and database and using something like Blaze to connect? Right?
    I personally would not do this with CSS. I would map the company icons to the users in the DB, retrieve the proper company icon and then pass it down (or embed it in the app) when the user logs in. Then, I would just set the source of the icon to be what I passed down:
    Add your image where you want it to go:
    <s:Image id="emptyImage" x="locationx" y="locationy".../>
    Then in your ActionScript, when the user logs in and you know what company the user belongs you could do this:
    private function loginUserBlazeResponse(resultEvent:ResultEvent):void {
    var bytes:ByteArray = ByteArray(resultEvent.target);
    emptyImage.source = bytes;
    addElement(img);
    img.visible = false;
    img.addEventListener(FlexEvent.UPDATE_COMPLETE, imageLoaded);

  • How to tell what version of Acrobat or Reader was last used to save a PDF

    How can I tell what version of Acrobat or Reader was last used to save a PDF file? My users are using fillable forms from grants.gov. We want them to use Adobe Reader 8.1.3 to fill these forms, but some accidentally use the Pro version of Acrobat. They need this to make PDFs from Word & other apps, but Pro will corrupt the fillable forms.
    When I open a saved form in Reader 8.1.3 and click File > Properties it says Acrobat 7.x even though I know it was saved with 8.1.3.
    Is there a way to know which version number and type (Reader or Pro) last saved a PDF?

    But it won't tell you what was used last. It just gives the original information.
    It also won't differentiate between Pro and Standard and of course won't mention Reader at all.

  • I've stored login information for many sites but on some sites I've to login manually. What to do?

    I'd stored login information for Facebook. Earlier firefox used to fill in the login information but now it doesn't . What to do?

    You could try going into settings, Safari, auto fill then turn on names and passwords.

  • Can't save remote login information

    Until the last week, I had my remote login information saved
    in site management for the ftp server of my website. Now, I enter
    the information, use it to connect and work on my site. Then I
    close DW. When I restart DW to work on the site again, the remote
    login information is gone and I have to reenter it. I can work
    until I close the program, then it disappears again.
    The save box is checked.
    I recently installed Process Guard, but I haven't changed any
    other security features recently other than updates to Zone Alarm
    Free and AVG Free.
    It's not a fatal flaw, but it's VERY annoying.
    Any help is appreciated
    Diane

    dw 8?
    and internet explorer just upgraded to v7?
    go to the dreamweaver support
    page-->downloads-->updates and get the 8.02
    updater.
    Alan
    Adobe Community Expert, dreamweaver
    http://www.adobe.com/communities/experts/

  • What can i do ,who can save my iphone4,save my information

    i've owned a iphone 4 before 4months...but 4 days ago, it didn't work... and app flagship store not open in china spring festival and i need to use my iphone because of important information. so one of my friends helped to examine it in an authorized app store,but failed. Now i went to app flagship store and officer said it had examined personally. apple will not respond it.
    Now what can i do ,who can save me ,save my iphone4,save my information...
    please help me ,help my iphone4...

    Since you chose to have someone other than Apple open the device, the warranty has been voided.
    You can take it to a 3rd party repair place and pay for the repairs, if it is salvagable.
    You can purchase an Out of Warranty exchange via Apple.
    If the device has been synced and backed up regularly, only data since the last sync/backup will be lost.

  • Using the Active Directory login information by UNIX

    We have 3 servers in our organisation: W2K + Exchange - members of one DOMAIN and Sun server with Solaris 8. All our clients have their login and password for the DOMAIN and the according the security policy they have to change their password periodically. Only a part of our clients have their login on the Solaris (they work using X-Terminal from their PC ).
    My question is how can I receive and update automatically the login information on UNIX(Solaris) after updating on the Active Directory . Or how can I use the login information of the Active directory by Solaris

    Are the configuration reports with the 0.0.0.0 being printed directly from the printer?  A 0.0.0.0 address indicates the printer is not actually on the network (or at least not getting DHCP information from the router).  The Print and Scan Doctor should not have been able to print to it unless it happened to be connected by a USB cable as well.
    What brand and model is the router?
    Is the wireless light a solid blue light or a flashing blue light?
    You mentioned an Active Directory Domain Services error message.  Outside of corporate networks, this is not an error message you should get.  I suspect there might be a deeper software issue at fault.  Please provide the exact steps you are using to add the printer to generate that error message.
    ↙-----------How do I give Kudos?| How do I mark a post as Solved? ----------------↓

  • I'm  in Colombia, my ipad was stolen, 2 days ago, today i can't acces to iCloud for save my information, what should I do?, I'm  in Colombia, my ipad was stolen, 2 days ago, today i can't acces to iCloud for save my information, what should I do?

    I'm  in Colombia, my ipad was stolen, 2 days ago, today i can't acces to iCloud for save my information, what should I do?, I'm  in Colombia, my ipad was stolen, 2 days ago, today i can't acces to iCloud for save my information, what should I do?. Help me please

    Report to police along with serial number. Change all your passwords.
    These links may be helpful.
    How to Track and Report Stolen iPad
    http://www.ipadastic.com/tutorials/how-to-track-and-report-stolen-ipad
    Reporting a lost or stolen Apple product
    http://support.apple.com/kb/ht2526
    Report Stolen iPad Tips and iPad Theft Prevention
    http://www.stolen-property.com/report-stolen-ipad.php
    How to recover a lost or stolen iPad
    http://ipadhelp.com/ipad-help/how-to-recover-a-lost-or-stolen-ipad/
    How to Find a Stolen iPad
    http://www.ehow.com/how_7586429_stolen-ipad.html
    Apple Product Lost or Stolen
    http://sites.google.com/site/appleclubfhs/support/advice-and-articles/lost-or-st olen
    Oops! iForgot My New iPad On the Plane; Now What?
    http://online.wsj.com/article/SB10001424052702303459004577362194012634000.html
    If you don't know your lost/stolen iPad's serial number, use the instructions below. The S/N is also on the iPad's box.
    How to Find Your iPad Serial Number
    http://www.ipadastic.com/tutorials/how-to-find-your-ipad-serial-number
    iOS: How to find the serial number, IMEI, MEID, CDN, and ICCID number
    http://support.apple.com/kb/HT4061
     Cheers, Tom

  • Unable to enter login information to a password protected ebook on my Nook HD+ using adobe reader.

    Unable to enter login information to a password protected ebook on my Nook HD+ using adobe reader.  Would anyone be able to assist me as I am unable to get any help elsewhere and I need to be able to access this ebook for school.
    Thanks

    Yes, I have contacted my school and they stated they do not support Nook.  I called Nook and they said I would have to deregister, etc. as they are unable to determine what is wrong.  I tried to pull the document on my phone now and have not been able to do so.  I read the "Getting Started" and it states I should be able to fill out the form, which would be to provide my login information, but am not able to do so.  Maybe this has to do with the android part.  Thank you for providing that information as I did not even think about trying my phone too.  So as this did not work on there, my last conclusion is that it would now be the Adobe issue.  Hopefully this can be fixed as I need to read my document for school and would hate to have to sit behind my computer and not able to take my Nook or phone to read elsewhere. 

  • When I choose a photo to share on face book a drop down box appears with the message, Face book didn't recognise the information you entered for the account this is my Face book login information I use to access my face book page how can I overcome the b

    when I choose a photo to share on face book a drop down box appears with the message, Face book didn't recognise the information you entered for the account this is my Face book login information I use to access my face book page how can I overcome this.

    Delete abd re-enter your Facebook account information jnder the accounts tab in the iPhoto preferences
    You may also want to take a look at the user tip for Facebook problems
    LN

  • HT201317 When I go to log onto iCloud using my Windows 7 and it asks for my login information, I get the error saying my Apple account is valid but not an iCloud account. How do I get an iCloud account? Thank you

    When I go to log onto iCloud using my Windows 7 and it asks for my login information, I get the error saying my Apple ID is valid but not an iCloud account. How do I get an iCloud account?
    I don't have any apple products personally, this is for work to use Photo Stream so when Superintendents & Project Managers take pictures of their construction site, I am able to have those images immediately.
    Thank you

    You can not create an iCloud account using a PC, you will need an Apple product. Once the account exists you can logon to it from a PC.

Maybe you are looking for