
Nadeem0319
Members-
Posts
10 -
Joined
-
Last visited
Never
Content Type
Profiles
Forums
Events
Everything posted by Nadeem0319
-
Re: login.php help plese Hi, Yea... I would recommend you slice up the images rather then using one big background. You can play around with the margins i set for the login table and get it in the box, but most likely it will look different to other people with different resolutions and etc...
-
Re: login.php help! ^^lol ok good luck :P
-
Re: login.php help plese Try this bro :) re-coded some nasty HTML ;) I added the lines from 204-231. What i added: <form action=\"authenticate.php\" method=\"post\" name=\"login\" onsubmit=\"return saveme();\"> <table border=\"0\" cellspacing=\"0\" cellpadding=\"3\" style=\"color:#000000;font-weight:bold;margin-left:200px;\"> <tr> <td align=\"center\" colspan=\"2\">Login</td> </tr> <tr> <td>Username:</td> <td><input type=\"text\" name=\"username\"></td> </tr> <tr> <td>Password:</td> <td><input type=\"password\" name=\"password\"></td> </tr> <tr> <td align=\"center\" colspan=\"2\">Remember Me?</td> </tr> <tr> <td align=\"center\" colspan=\"2\"> <input type=\"radio\" value=\"ON\" name=\"save\"> Yes <input type=\"radio\" name=\"save\" value=\"OFF\" checked> No </td> </tr> <tr> <td align=\"center\" colspan=\"2\"><input type=\"submit\" value=\"Submit\"></td> </tr> </table> </form> New final code after integration (use this, i added the new html already): <?php session_start(); include "config.php"; global $_CONFIG; define("MONO_ON", 1); require "class/class_db_{$_CONFIG['driver']}.php"; $db=new database; $db->configure($_CONFIG['hostname'], $_CONFIG['username'], $_CONFIG['password'], $_CONFIG['database'], $_CONFIG['persistent']); $db->connect(); $c=$db->connection_id; $set=array(); $settq=$db->query("SELECT * FROM settings"); while($r=$db->fetch_row($settq)) { $set[$r['conf_name']]=$r['conf_value']; } print <<<EOF <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>{$set['game_name']}</title> <script language="JavaScript"> <!-- function getCookieVal (offset) { var endstr = document.cookie.indexOf (";", offset); if (endstr == -1) endstr = document.cookie.length; return unescape(document.cookie.substring(offset, endstr)); } function GetCookie (name) { var arg = name + "="; var alen = arg.length; var clen = document.cookie.length; var i = 0; while (i < clen) { var j = i + alen; if (document.cookie.substring(i, j) == arg) return getCookieVal (j); i = document.cookie.indexOf(" ", i) + 1; if (i == 0) break; } return null; } function SetCookie (name,value,expires,path,domain,secure) { document.cookie = name + "=" + escape (value) + ((expires) ? "; expires=" + expires.toGMTString() : "") + ((path) ? "; path=" + path : "") + ((domain) ? "; domain=" + domain : "") + ((secure) ? "; secure" : ""); } function DeleteCookie (name,path,domain) { if (GetCookie(name)) { document.cookie = name + "=" + ((path) ? "; path=" + path : "") + ((domain) ? "; domain=" + domain : "") + "; expires=Thu, 01-Jan-70 00:00:01 GMT"; } } // --> </script> <script language="JavaScript"> var usr; var pw; var sv; function getme() { usr = document.login.username; pw = document.login.password; sv = document.login.save; if (GetCookie('player') != null) { usr.value = GetCookie('username') pw.value = GetCookie('password') if (GetCookie('save') == 'true') { sv[0].checked = true; } } } function saveme() { if (usr.value.length != 0 && pw.value.length != 0) { if (sv[0].checked) { expdate = new Date(); expdate.setTime(expdate.getTime()+(365 * 24 * 60 * 60 * 1000)); SetCookie('username', usr.value, expdate); SetCookie('password', pw.value, expdate); SetCookie('save', 'true', expdate); } if (sv[1].checked) { DeleteCookie('username'); DeleteCookie('password'); DeleteCookie('save'); } } else { alert('You must enter a username/password.'); return false; } } </script> <style type="text/css"> body { font-family:Tahoma;font-size:9pt;color: white; font-variant: small-caps; background-color:#222222; scrollbar-base-color: #005B70; scrollbar-arrow-color: #F3960B; scrollbar-DarkShadow-Color: #000000; } a:visited,a:active,a:hover,a:link { color: white;text-decoration: none; } A:hover {cursor: crosshair; color: #0066FF; } table,tr,td { font-size:9pt; } img { border:none; } </style> </head> <body> <center> EOF; $ip = ($_SERVER['HTTP_X_FORWARDED_FOR']) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR']; if(file_exists('ipbans/'.$ip)) { die("[b]<font color=red size=+1>Your IP has been banned, there is no way around this.</font>[/b]</body></html>"); } print "<style type='text/css'> <!-- #Layer6 { position:absolute; width:200px; height:50px; z-index:2; left: 363px; top: 255px; } #Layer7 { position:absolute; width:200px; height:115px; z-index:3; left: 5px; top: 265px; } #Layer8 { position:absolute; width:1081px; height:33px; z-index:4; left: 122px; top: 800px; } #Layer9 { position:absolute; width:200px; height:50px; z-index:2; left: 563px; top: 255px; } #Layer10 { position:absolute; width:200px; height:50px; z-index:2; left: 763px; top: 255px; } #Layer11 { position:absolute; width:200px; height:50px; z-index:2; left: 763px; top: 255px; } body { background-color: #000000; background-image: url('criminal-business-newlogin1.gif'); background-repeat: no-repeat; background-position: top } --> </style> <body bgcolor='#444444'> <div id='Layer7'> <form action=\"authenticate.php\" method=\"post\" name=\"login\" onsubmit=\"return saveme();\"> <table border=\"0\" cellspacing=\"0\" cellpadding=\"3\" style=\"color:#000000;font-weight:bold;margin-left:200px;\"> <tr> <td align=\"center\" colspan=\"2\">Login</td> </tr> <tr> <td>Username:</td> <td><input type=\"text\" name=\"username\"></td> </tr> <tr> <td>Password:</td> <td><input type=\"password\" name=\"password\"></td> </tr> <tr> <td align=\"center\" colspan=\"2\">Remember Me?</td> </tr> <tr> <td align=\"center\" colspan=\"2\"> <input type=\"radio\" value=\"ON\" name=\"save\"> Yes <input type=\"radio\" name=\"save\" value=\"OFF\" checked> No </td> </tr> <tr> <td align=\"center\" colspan=\"2\"><input type=\"submit\" value=\"Submit\"></td> </tr> </table> </form> </center></td> </tr> </table> </div> <div id='Layer6'> <tr> </div> <div id='Layer8'> <table width='70%' border='0' bgcolor='#000000'> <tr> <th scope='col'><center> </div> </center>"; print "</body></html>"; ?>
-
Re: login.php help! I tried it in PHP works fine, except i had to remove all the php classes and functions for the design to show up with no php die errors... If you need help slicing it up properly and integrated properly with PHP, email me up and we can set a price :) or i think TJ has my msn, msg me if you ned help still.
-
Re: login.php help! hmmm... Everything seems fine except on your site.. :S http://www.nsyed.com/login.html
-
Re: login.php help! here you go bro, i did it for free :) I re-edited some html lines, and cleaned up unnecessary breaks. Also you coded some PHP wrong at the bottom which caused the huge break. I re-coded that PHP part for you and tested, works perfectly ;) <?php session_start(); include "config.php"; global $_CONFIG; define("MONO_ON", 1); require "class/class_db_{$_CONFIG['driver']}.php"; $db=new database; $db->configure($_CONFIG['hostname'], $_CONFIG['username'], $_CONFIG['password'], $_CONFIG['database'], $_CONFIG['persistent']); $db->connect(); $c=$db->connection_id; //count users and stats display $sql = "SELECT COUNT(userid) FROM users"; $rs = mysql_query($sql); $row = mysql_fetch_array($rs); $total_users = $row[0]; $sql = sprintf("SELECT COUNT(userid) FROM users WHERE (laston > %u)", time() - 900); $rs = mysql_query($sql); $row = mysql_fetch_array($rs); $users_online = $row[0]; $users_offline = $total_users - $users_online; //end stats display info $set=array(); $settq=$db->query("SELECT * FROM settings"); while($r=$db->fetch_row($settq)) { $set[$r['conf_name']]=$r['conf_value']; } print <<<EOF <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>{$set['game_name']}</title> <link rel="SHORTCUT ICON" href="favicon.ico" /> <script language="JavaScript"> <!-- function getCookieVal (offset) { var endstr = document.cookie.indexOf (";", offset); if (endstr == -1) endstr = document.cookie.length; return unescape(document.cookie.substring(offset, endstr)); } function GetCookie (name) { var arg = name + "="; var alen = arg.length; var clen = document.cookie.length; var i = 0; while (i < clen) { var j = i + alen; if (document.cookie.substring(i, j) == arg) return getCookieVal (j); i = document.cookie.indexOf(" ", i) + 1; if (i == 0) break; } return null; } function SetCookie (name,value,expires,path,domain,secure) { document.cookie = name + "=" + escape (value) + ((expires) ? "; expires=" + expires.toGMTString() : "") + ((path) ? "; path=" + path : "") + ((domain) ? "; domain=" + domain : "") + ((secure) ? "; secure" : ""); } function DeleteCookie (name,path,domain) { if (GetCookie(name)) { document.cookie = name + "=" + ((path) ? "; path=" + path : "") + ((domain) ? "; domain=" + domain : "") + "; expires=Thu, 01-Jan-70 00:00:01 GMT"; } } // --> </script> <script language="JavaScript"> var usr; var pw; var sv; function getme() { usr = document.login.username; pw = document.login.password; sv = document.login.save; if (GetCookie('player') != null) { usr.value = GetCookie('username') pw.value = GetCookie('password') if (GetCookie('save') == 'true') { sv[0].checked = true; } } } function saveme() { if (usr.value.length != 0 && pw.value.length != 0) { if (sv[0].checked) { expdate = new Date(); expdate.setTime(expdate.getTime()+(365 * 24 * 60 * 60 * 1000)); SetCookie('username', usr.value, expdate); SetCookie('password', pw.value, expdate); SetCookie('save', 'true', expdate); } if (sv[1].checked) { DeleteCookie('username'); DeleteCookie('password'); DeleteCookie('save'); } } else { alert('You must enter a username/password.'); return false; } } </script> <style type="text/css"> <!-- body { background-color: #000000; } a:link { color: #42465A; text-decoration: none; } a:visited { text-decoration: none; color: #42465A; } a:hover { text-decoration: none; color: #CED6CD; } a:active { text-decoration: none; color: #D6D6D6; } --> </style></head> <body leftmargin=\"0\" topmargin=\"0\" marginwidth=\"0\" marginheight=\"0\" onload=\"getme();\"> EOF; print " <div align=\"center\"> <form action=\"authenticate.php\" method=\"post\" name=\"login\" onsubmit=\"return saveme();\"> <table id=\"Table_01\" width=\"950\" height=\"751\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\"> <tr> <td colspan=\"9\"><img src=\"http://www.bornmobsters.com/images/index_01.gif\" width=\"950\" height=\"135\" alt=\"\"></td> </tr> <tr> <td colspan=\"3\" rowspan=\"2\"><img src=\"http://www.bornmobsters.com/images/index_02.gif\" width=\"123\" height=\"326\" alt=\"\"></td> <td colspan=\"5\"> <table width=\"342\" height=\"224\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\"> <tr> <td align=\"center\" valign=\"top\" background=\"http://www.bornmobsters.com/images/index_03.gif\">Here will place in some text. Users Online: {$users_online} Users Offline: {$users_offline} Total Users: {$total_users} <a href=\"http://bornmobsters.com/forgot_password.php\">Forgot password?</a> || <a href=\"http://bornmobsters.com/register.php\">[b]REGISTER NOW![/b]</a></td> </tr> </table> </td> <td rowspan=\"6\"><img src=\"http://www.bornmobsters.com/images/index_04.gif\" width=\"485\" height=\"615\" alt=\"\"></td> </tr> <tr> <td colspan=\"5\"><img src=\"http://www.bornmobsters.com/images/index_05.gif\" width=\"342\" height=\"102\" alt=\"\"></td> </tr> <tr> <td colspan=\"2\" rowspan=\"2\"><img src=\"http://www.bornmobsters.com/images/index_06.gif\" width=\"54\" height=\"42\" alt=\"\"></td> <td colspan=\"2\"> <table width=\"111\" height=\"28\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\"> <tr> <td><input name=\"username\" type=\"text\" id=\"username\" style=\"border: medium none ; background: transparent url(images/index_07.gif) no-repeat scroll 0pt; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; text-align: bottom; vertical-align: bottom; width: 111px; height: 28px; color: red; font-weight: bold;\" maxlength=\"25\"><input type=\"hidden\" value=\"ON\" name=\"save\" checked></td> </tr> </table> </td> <td rowspan=\"2\"><img src=\"http://www.bornmobsters.com/images/index_08.gif\" width=\"93\" height=\"42\" alt=\"\"></td> <td> <table width=\"114\" height=\"28\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\"> <tr> <td><input name=\"username\" type=\"text\" id=\"username\" style=\"border: medium none ; background: transparent url(images/index_09.gif) no-repeat scroll 0pt; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial; text-align: bottom; vertical-align: bottom; width: 114px; height: 28px; color: red; font-weight: bold;\" maxlength=\"25\"></td> </tr> </table> </td> <td colspan=\"2\" rowspan=\"2\"><img src=\"http://www.bornmobsters.com/images/index_10.gif\" width=\"93\" height=\"42\" alt=\"\"></td> </tr> <tr> <td colspan=\"2\"><img src=\"http://www.bornmobsters.com/images/index_11.gif\" width=\"111\" height=\"14\" alt=\"\"></td> <td><img src=\"http://www.bornmobsters.com/images/index_12.gif\" width=\"114\" height=\"14\" alt=\"\"></td> </tr> <tr> <td><img src=\"http://www.bornmobsters.com/images/index_13.gif\" width=\"40\" height=\"40\" alt=\"\"></td> <td colspan=\"6\"> <table width=\"354\" height=\"40\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\"> <tr> <td> <input src=\"http://www.bornmobsters.com/images/index_14.gif\" value=\"Submit\" alt=\"Submit\" type=\"image\"></td> </tr> </table> </td> <td rowspan=\"2\"><img src=\"http://www.bornmobsters.com/images/index_15.gif\" width=\"71\" height=\"247\" alt=\"\"></td> </tr> <tr> <td colspan=\"7\"> <table width=\"394\" height=\"207\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\"> <tr> <td width=\"394\" height=\"207\" background=\"http://www.bornmobsters.com/images/index_16.gif\">[i]<center>Provided by: Dedicated Gaming Network LLC © 2008. Game Copyright © 2008 Dedicated Gaming Network LLC</center>[/i]</td> </tr> </table> </td> </tr> <tr> <td><img src=\"http://www.bornmobsters.com/images/spacer.gif\" width=\"40\" height=\"1\" alt=\"\"></td> <td><img src=\"http://www.bornmobsters.com/images/spacer.gif\" width=\"14\" height=\"1\" alt=\"\"></td> <td><img src=\"http://www.bornmobsters.com/images/spacer.gif\" width=\"69\" height=\"1\" alt=\"\"></td> <td><img src=\"http://www.bornmobsters.com/images/spacer.gif\" width=\"42\" height=\"1\" alt=\"\"></td> <td><img src=\"http://www.bornmobsters.com/images/spacer.gif\" width=\"93\" height=\"1\" alt=\"\"></td> <td><img src=\"http://www.bornmobsters.com/images/spacer.gif\" width=\"114\" height=\"1\" alt=\"\"></td> <td><img src=\"http://www.bornmobsters.com/images/spacer.gif\" width=\"22\" height=\"1\" alt=\"\"></td> <td><img src=\"http://www.bornmobsters.com/images/spacer.gif\" width=\"71\" height=\"1\" alt=\"\"></td> <td><img src=\"http://www.bornmobsters.com/images/spacer.gif\" width=\"485\" height=\"1\" alt=\"\"></td> </tr> </table> </form> </div> </body> </html> \"; print <<<OUT OUT; ?>
-
Re: HOW DO I SORT OUT THE DATABASE!!! another reason could be that your login script is not posting the proper VARS. if everything looks ok in the mysql try looking into the login.php script and you should find a problem.