Jump to content

paddyhaig

Members
  • Posts

    131
  • Joined

  • Last visited

    Never

Everything posted by paddyhaig

  1. I feel like I am eventually making progress. A huge thanks to Ignace and PHPFreaks. However the is still so much more to be done... I want to be able to secure all the pages so that no one can circumnavigate the initial authentication page. I am not sure how this is done, possibly with a cookie of some description. As it is you can go straight in if you know the URL. http://www.onina.net/concierge/admin/index.php Now I would like to make. 1, A common .css document (For the rest of the site) 2, A common .dbx document, so that the database (mySQL) coneXion settings are all in the same document. 3, Figure out a better, maybe cleaner interface. I would like for it to possibly be used in a kiosk with a touch screen. SO all the buttons have to be fairly large. I have a virtual keyboard, that runs as a Windows app, and a batch script that brings up both ie in kiosk mode and the virtual keyboard placed where I want it on the screen. But I would like it if the Web app had it's own virtual keyboard (Possibly java or flash) that was platform independent. Any and all ideas are greatly appreciated.
  2. It's Ok I got it! For any one else out there here's an example of where to use this little bit of code to make your cursor start in a specific dorm field. Thanks go to Ignace. This is the line that does the magic: <body onload="document.getElementById('username').focus()"><div id="blue-box"> <html> <head> <meta http-equiv="Content-Language" content="en-us"> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>Concierge</title> <style type="text/css"> #blue-box { position: relative; width: 384px; height: 357px; margin: 0 auto; background-image: url(graphics/concierge_auth.jpg); color: #FFF; font-family: Helvetica, Arial, Verdana, sans-serif; } form { position: absolute; top: 50%; left: 50%; margin-top: -55px; margin-left: -65px; width: 200px; height: 150px; } form label { font-weight: bold; } </style> <!--[if IE]><style type="text/css">body { text-align: center; } #blue-box { text-align: left; }</style><![endif]--> </head> <body onload="document.getElementById('username').focus()"><div id="blue-box"> <form action="scripts/authenticate/auth.php" method="POST"> <div> <label for="username">Username</label> <input type="text" id="username" name="username"> </div> <div> <label for="password">Password</label> <input type="password" id="password" name="password"> </div> <input type="submit" name="submit" value="Login"> </form> </div> <div style="text-align:center">Concierge system powered by <a href="#">Onina</a></div> </body> </html>
  3. Ahhh, If it were as easy as that! I found the same string out there on the tinternet, but alas dear Yorick, I don't know where to put the damned thing and me being a grown man and all that. I really hate to bother you any more ignace, you have been God sent! Did you log in and take a look at what's yet to be done. Daunting!~ I just want to say thank you for everything. Thank you, thank you, thank you.
  4. That did it! Phew! We were in a pickle for a while there... Do you know if the is any way of making the browser cursor start in the first input box ( Username) by default, instead of having to click on it? Like if I go to Google, my cursor always automatically starts in the query box?
  5. Couple of things! 1, I noticed when I was entering my password it was no longer obscured by asterisks. 2, I made the change you suggested <input type="submit" name="submit" value="Login"> and although the page appears to do something, nothing seems to come up? See web site: http://www.onina.net/concierge/index.php Username: admin / Password: 1234
  6. Well it was kinda three tiered with different levels of access. If you were an Administrator you got one page, if you were a manager you got another and if you were staff you got another still. The admin user name is: admin and the password is: 1234 The web site is: http://www.onina.net/concierge/ Here's a copy of the auth.php page. I just changed the sql user/pass (Not that I don't trust you, but this is pretty public.) <?php if (isset($_POST['submit'])) { $db = mysql_connect('localhost', 'onina', 'example') or die("Couldn't connect to the database<br>" . mysql_error()); mysql_select_db('oninacom_concierge', $db) or die("Couldn't select<br>" . mysql_error()); $login = mysql_real_escape_string($_POST['login'], $db); $password = mysql_real_escape_string($_POST['password'], $db); $query = "SELECT privilage FROM auth WHERE login = '$login' AND password = '$password'"; $result = mysql_query($query, $db) or die("Problem with the query: $query<br>" . mysql_error()); if (0 === mysql_num_rows($result)) { header('Location: ../../index.php'); exit(0); } $row = mysql_fetch_assoc($result); $privilage = $row['privilage']; session_start(); $_SESSION['username'] = $login; $_SESSION['privilage'] = $privilage; if ('receptionist' === $privilage) { header('Location: ../../employees/receptionist/index2.htm'); exit(0); } if ('manager' === $privilage) { header('Location: ../../employees/managers/index1.htm'); exit(0); } if ('administrator' === $privilage) { header('Location: ../../admin/index.php'); exit(0); } } ?>
  7. So I got it looking a whole lot better. There's still a couple of things I would like to fix if anyone knows how? 1, I would like the text in the form to be bold and white. That is 'Username' & 'Password' 2, I would also like for the form to actually work again, that is login as it did before. (I think I know what the problem is there.) 3, I would also like for the footer tables to be in css as well. (I will probably put them in a separate file at some point). Any and all help greatly appreciated. To see live view: http://www.onina.net/concierge/ I just wanna say thanks for everyone's help so far, especially 'Ignace' <html> <head> <meta http-equiv="Content-Language" content="en-us"> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>Concierge</title> <!-- ------------------------------------------------------------------------------------------------- --> <!-- These are the css styles --> <style type="text/css"> <!-- This is my own experiment as I want the text in the form to be bold and white --> #text_color { white } <!-- Just not 100% sure how to implement it --> #wrapper { width: 384px; height: 358px; margin: 0 auto;/*center it in the viewport*/ background: url(graphics/concierge_auth.jpg); } #content form { width: 200px; height: 150px; } #content { position: absolute; top: 50%; left: 50%; margin-top: -150px; margin-left: -70px; } </style> </head> <!-- ------------------------------------------------------------------------------------------------- <!-- This is the form and background graphic --> <body> <div id="wrapper"> <div id="content"> <form action="scripts/authenticate/auth.php" method="POST"> <div> <label for="username">Username</label> <input type="text" id="username" name="username"> </div> <div> <label for="password">Password</label> <input type="text" id="password" name="password"> </div> <input type="submit" value="Login"> </form> </div> </div> <!-- ------------------------------------------------------------------------------------------------- --> <!-- This is the lower section still using tables with the Onina URL --> <div align="center"> <center> <table border="0" cellpadding="0" cellspacing="0"> <tr> <td align="center"><font color="#808080" size="2">Concierge System </font></td> </tr> <tr> <td align="center"><font color="#808080" size="2">Powered by</font></td> </tr> <tr> <td align="center"><a href="http://www.onina.net/onina/public_html2/" target="_blank"><font size="2" color="#0000FF">Onina</font></a></td> </tr> </table> </center> </div> <p align="center"> </p> </body> </html>
  8. Ok I messed with it and it works a little better now, but it's still not right. <html> <head> <meta http-equiv="Content-Language" content="en-us"> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>Concierge</title> <!-- ------------------------------------------------------------------------------------------------- --> <!-- These are the css styles --> <style type="text/css"> #wrapper { width: 400px; height: 400px; margin: 0 auto;/*center it in the viewport*/ background: url(graphics/concierge_auth.jpg); } #content form { width: 200px; height: 150px; } #content { position: absolute; top: 50%; left: 50%; margin-top: -75px; margin-left: -100px; } </style> <!-- ------------------------------------------------------------------------------------------------- <!-- This is the form and background graphic --> </head> <body> <div id="wrapper"> <div id="content"> <form action="scripts/authenticate/auth.php" method="POST"> <div> <label for="username">Username</label> <input type="text" id="username" name="username"> </div> <div> <label for="password">Password</label> <input type="text" id="password" name="password"> </div> <input type="submit" value="Login"> </form> </div> </div> <!-- ------------------------------------------------------------------------------------------------- --> <!-- This is the lower section still using tables with the Onina URL --> <div align="center"> <center> <table border="0" cellpadding="0" cellspacing="0"> <tr> <td align="center"><font color="#808080" size="2">Concierge System </font></td> </tr> <tr> <td align="center"><font color="#808080" size="2">Powered by</font></td> </tr> <tr> <td align="center"><a href="http://www.onina.net/onina/public_html2/" target="_blank"><font size="2" color="#0000FF">Onina</font></a></td> </tr> </table> </center> </div> <p align="center"> </p> </body> </html>
  9. I was just looking at this a little more and it dawned on me that this index page should not be pulling styles from any where else. So I don't see why it needs to import anything. All the css should be self contained on this page. <style type="text/css"> @import url(layout/style.css);
  10. I would like to say that fixed it, but it's even worse now! CSS layout is really not as easy as people like to say it is. See: http://www.onina.net/concierge/ <html> <head> <meta http-equiv="Content-Language" content="en-us"> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>Concierge</title> <style type="text/css"> @import url(layout/style.css); } #wrapper { width: 400px; height: 400px; margin: 0 auto;/*center it in the viewport*/ background: url(graphics/concierge_auth.jpg); } #content form { width: 200px; height: 150px; } #content { position: absolute; top: 50%; left: 50%; margin-top: -75px; margin-left: -100px; } </style> </head> <body> <div id="wrapper"> <div id="content"> <form action="scripts/authenticate/auth.php" method="POST"> <div> <label for="username">Username</label> <input type="text" id="username" name="username"> </div> <div> <label for="password">Password</label> <input type="text" id="password" name="password"> </div> <input type="submit" value="Login"> </form> </div> </div> <div align="center"> <center> <table border="0" cellpadding="0" cellspacing="0"> <tr> <td align="center"><font color="#808080" size="2">Concierge System </font></td> </tr> <tr> <td align="center"><font color="#808080" size="2">Powered by</font></td> </tr> <tr> <td align="center"><a href="http://www.onina.net/onina/public_html2/" target="_blank"><font size="2" color="#0000FF">Onina</font></a></td> </tr> </table> </center> </div> <p align="center"> </p> </body> </html>
  11. It's still messed up. What <form> tag <html> <head> <meta http-equiv="Content-Language" content="en-us"> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>Concierge</title> <!-- @import url(layout/style.css); --> <style type="text/css">body,td,th { color: #283A86; } #wrapper { width: 400px; height: 400px; margin: 0 auto;/*center it in the viewport*/ background: url(graphics/concierge_auth.jpg); } #content form { width: 200px; height: 150px; } #content { position: absolute; top: 50%; left: 50%; margin-top: -75px; margin-left: -100px; } </style> </head> <body> <div id="wrapper"> <div id="content"> <form action="scripts/authenticate/auth.php" method="POST"> <div> <label for="username">Username</label> <input type="text" id="username" name="username"> </div> <div> <label for="password">Password</label> <input type="text" id="password" name="password"> </div> <input type="submit" value="Login"> </form> </div> </div> <div align="center"> <center> <table border="0" cellpadding="0" cellspacing="0"> <tr> <td align="center"><font color="#808080" size="2">Concierge System </font></td> </tr> <tr> <td align="center"><font color="#808080" size="2">Powered by</font></td> </tr> <tr> <td align="center"><a href="http://www.onina.net/onina/public_html2/" target="_blank"><font size="2" color="#0000FF">Onina</font></a></td> </tr> </table> </center> </div> <p align="center"> </p> </body> </html>
  12. Here's what I got so far: It looks ugly! http://www.onina.net/concierge/ Here's the code. And the ability to login has gone. <html> <head> <meta http-equiv="Content-Language" content="en-us"> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>Concierge</title> <!-- @import url(layout/style.css); --> <style type="text/css">body,td,th { color: #283A86; } #wrapper { width: 400px; height: 400px; margin: 0 auto;/*center it in the viewport*/ background: url(graphics/concierge_auth.jpg); } #content form { width: 200px; height: 150px; } #content { position: absolute; top: 50%; left: 50%; margin-top: -75px; margin-left: -100px; } </style> </head> <body> <form method="POST" action="scripts/authenticate/auth.php"> <div id="wrapper"> <div id="content"> <form action="#" method="POST"> <div> <label for="username">Username</label> <input type="text" id="username" name="username"> </div> <div> <label for="password">Password</label> <input type="text" id="password" name="password"> </div> <input type="submit" value="Login"> </form> </div> </div> <div align="center"> <center> <table border="0" cellpadding="0" cellspacing="0"> <tr> <td align="center"><font color="#808080" size="2">Concierge System </font></td> </tr> <tr> <td align="center"><font color="#808080" size="2">Powered by</font></td> </tr> <tr> <td align="center"><a href="http://www.onina.net/onina/public_html2/" target="_blank"><font size="2" color="#0000FF">Onina</font></a></td> </tr> </table> </center> </div> <p align="center"> </p> </body> </html>
  13. I noticed that you had moved away from using multiple graphics and where now layering the table over a single background graphic. I have just made up that background graphic and introduced it's path to the code. It doesn't log in any more, you can see it here: http://www.onina.net/concierge/
  14. <!-- Here's what I got. --> <html> <head> <meta http-equiv="Content-Language" content="en-us"> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>Concierge</title> <!-- @import url(layout/style.css); --> <style type="text/css">body,td,th { color: #283A86; } #wrapper { width: 400px; height: 400px; margin: 0 auto;/*center it in the viewport*/ background: url(path/to/background/image.fig); } #content form { width: 200px; height: 150px; } #content { position: absolute; top: 50%; left: 50%; margin-top: -75px; margin-left: -100px; } </style> </head> <body> <form method="POST" action="scripts/authenticate/auth.php"> <div id="wrapper"> <div id="content"> <form action="#" method="POST"> <div> <label for="username">Username</label> <input type="text" id="username" name="username"> </div> <div> <label for="password">Password</label> <input type="text" id="password" name="password"> </div> <input type="submit" value="Login"> </form> </div> </div> <div align="center"> <center> <table border="0" cellpadding="0" cellspacing="0"> <tr> <td align="center"><font color="#808080" size="2">Concierge System </font></td> </tr> <tr> <td align="center"><font color="#808080" size="2">Powered by</font></td> </tr> <tr> <td align="center"><a href="http://www.onina.net/onina/public_html2/" target="_blank"><font size="2" color="#0000FF">Onina</font></a></td> </tr> </table> </center> </div> <p align="center"> </p> </body> </html> Now all the blue stuff has gone, the graphics and the authentication box. All I have is the two text fields and a button. And it doesn't seem to want to work any more. Log-in that is. The input boxes are however in the middle of the screen, so all is not lost! All help greatly appreciated and I am really not just saying that.
  15. Thank you Ignace, for the code. Although I am not altogether really sure what to do with it. I think the divs go in the header and the rest of the code in the body right? As I might of said earlier I have really no idea what I am doing with css. The html aspect I developed 7 years ago. Since then I really haven't touched code. I think if I can just get a couple of working templates then I will be able to work it out from there. I am watching css videos and reading all I can at this very moment. To answer n000bie, it seemed like a good idea at the time! I think the reasoning behind the sliced pictures was two-fold. 1, The smaller graphics seemed to load faster than one large graphic and also the graphics are only on the periphery of the authentication box. The center of the box is a regular html table just colored to match the surrounding graphics. I might go with the single graphic method now that we all have more bandwidth and I am starting to get a grasp of layering in css. 2, I new absolutely nothing about css and layering when I started the project 7 years ago. I had already built the interface, when I stumbled across more efficient ways that I could of coding it (If that is I had known at the time how to use css). Now I am trying to implement those more efficient technologies. Again, I am always very grateful of all and any feedback. Thanks again all!
  16. I have just got a grasp on how to include a graphic in my question: Here is what I am trying to construct using css instead of html tables. The actual page is: http://www.onina.net/concierge/index.php
  17. Here's a link to what I am trying to achieve, (See: onina.net / concierge) at the moment it's using html tables. I would like it if it used css tables instead of html tables. This particular page is unique in it's design, so I don't mind if the css is internal on this specific page. The other pages are slightly different looking so I will probably need an external style sheet. One other thing is, the dialog box and table structure of this page need to be in the center of the browser window. http://onina.net/concierge
  18. Hi ignace, I guess one of my questions would be, am I really centering the box? Or is the div in the top left corner, so there-for I would have to make sure that the box top left corner was always 1/3 away from the top left corner of the browser window, but I guess that is also relative to the size of the centered box? As you can see I obviously have no clue? But I do seriously appreciate you feed back.
  19. Here is the beginning of my project. http://www.onina.net/concierge/ I need css relative positioning for the entire blue interface on the browser page, so it is located (Center/middle) despite browser size. Then I need each of the elements inside of the blue box absolutely positioned in relation to the box. The are eight graphics and a table with User and Pass dialog boxes in the middle. I would actually like to get rid of the table completely if it was possible. I believe the is a cleaner and more efficient way of doing this in css, but I haven't got a clue as to where to start? Any and all help greatly appreciated.
  20. Wow ignace, you are truly everywhere! I have no clue as to what you have wrote. I have really no idea when it comes to css. All I know is that I have to create a css style sheet and in that style sheet are parameters pertaining to layout, text color and background color. I know the are div's that can be used for placement of items on the page and that they can be used with percentages.
  21. Could this be done with CSS layout. It needs to be centered, preferably near the top of the page. And stay centered despite the size of the browser window. It's presently just made up of tables. I am looking for a smoother more efficient way of building this layout. Any and all help is greatly appreciated. http://www.onina.net/concierge/
  22. Dude!!! That did it, it exposed the fact that my databases names are changed automatically by my hosting provider. I didn't take this into account when I uploaded my scripts. Thank you so very much. As it is, I have a number of CSS issues that I would also like to fix. I suppose this is the wrong place. But If anyone knows where I can get help regarding CSS I would be so very grateful of their suggestions.
  23. I uploaded it to my Linux server and: Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home1/oninacom/public_html/concierge/scripts/authenticate/auth.php on line 12 Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home1/oninacom/public_html/concierge/scripts/authenticate/auth.php on line 17 Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home1/oninacom/public_html/concierge/scripts/authenticate/auth.php:12) in /home1/oninacom/public_html/concierge/scripts/authenticate/auth.php on line 20 Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home1/oninacom/public_html/concierge/scripts/authenticate/auth.php:12) in /home1/oninacom/public_html/concierge/scripts/authenticate/auth.php on line 20
  24. Mmmm, so I tried it up on my Linux server and not so good!~ What can this mean? Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home1/oninacom/public_html/concierge/scripts/authenticate/auth.php on line 12 Warning: mysql_fetch_assoc(): supplied argument is not a valid MySQL result resource in /home1/oninacom/public_html/concierge/scripts/authenticate/auth.php on line 17 Warning: session_start() [function.session-start]: Cannot send session cookie - headers already sent by (output started at /home1/oninacom/public_html/concierge/scripts/authenticate/auth.php:12) in /home1/oninacom/public_html/concierge/scripts/authenticate/auth.php on line 20 Warning: session_start() [function.session-start]: Cannot send session cache limiter - headers already sent (output started at /home1/oninacom/public_html/concierge/scripts/authenticate/auth.php:12) in /home1/oninacom/public_html/concierge/scripts/authenticate/auth.php on line 20
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.