-
Posts
1,731 -
Joined
-
Last visited
-
Days Won
5
Content Type
Profiles
Forums
Events
Everything posted by Spudinski
-
What extreme power? The moderation panel is a mess, it takes 5 clicks to move a thread. The posts also doesn't delete immediately. Anyways, I'm just suggesting the code boxes for now.
-
On second though review, there is no opening form tag. Try... <?php ob_start(); include_once("config.php"); include_once("connect.php"); ?> <!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> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Welcome.</title> <link href="style.css" rel="stylesheet" type="text/css" /> <style type="text/css"> <!-- body { background-color: #222222; } --> </style></head> <body OnLoad="document.login.mail.focus();"> <table width="800" border="0" align="center" cellspacing="0"> <tr> <td><table border="0" align="left" cellspacing="2"> <tr> <td class="off" onmouseover="this.className='on'" onmouseout="this.className='off'" onclick="location.href='index.php'">[url="index.php"]Login.[/url]</td> <td class="off" onmouseover="this.className='on'" onmouseout="this.className='off'" onclick="location.href='register.php'">[url="register.php"]Register.[/url]</td> <td class="off" onmouseover="this.className='on'" onmouseout="this.className='off'" onclick="location.href='forgot.php'">[url="forgot.php"]Forgot Password.[/url]</td> <td class="off" onmouseover="this.className='on'" onmouseout="this.className='off'" onclick="location.href='screenshots.php'">[url="screenshots.php"]Screenshots.[/url]</td> <td class="off" onmouseover="this.className='on'" onmouseout="this.className='off'" onclick="location.href='http://www.gangsterlegends.com/sale/index.php'">[url="http://www.gangsterlegends.com/sale/index.php"]Script Shop.[/url]</td> </tr> </table></td> </tr> <tr> <td height="250" align="center" valign="middle"> Your Banner. </p> </td> </tr> <tr> <td align="center" valign="bottom"><form action="" method="post" name="login" id="login"> <?php if(isset($_SESSION['user_id'])) { // if already logged in. session_unset(); session_destroy(); echo "You have been logged out."; } if(isset($_POST['submit'])) { $sql = "SELECT status,admins_ip FROM sitestats WHERE id='1'"; $query = mysql_query($sql) or die(mysql_error()); $row = mysql_fetch_object($query); $page_status = htmlspecialchars($row->status); $page_status_array = explode("-", $page_status); $admins_ip = htmlspecialchars($row->admins_ip); $admin_ip_array = explode("-", $admins_ip); if(!empty($page_status_array[31]) and !in_array($_SERVER['REMOTE_ADDR'], $admin_ip_array)){ echo htmlspecialchars(stripslashes($page_status_array[31])); }else{ if(!preg_match("/^[A-Z0-9._%-]+@[A-Z0-9._%-]+\.[A-Z]{2,6}$/i", $_POST['mail'])) { echo "Invalid Password / Username combination."; }else{ $query = "SELECT password,id,login_ip,login_count FROM login WHERE mail='".mysql_real_escape_string($_POST['mail'])."'"; $result = mysql_query($query) or die(mysql_error()); $row = mysql_fetch_array($result); if(empty($row['id'])){ echo "Invalid Password / Username combination."; }else{ if($row['login_count'] >= 5 ){ echo "You have tried 5 or more false combinations you can reclaim your account with the forgot password option."; }else{ if(md5($_POST['pass']) != $row['password']){ echo "Invalid Password / Username combination."; $update_login = mysql_query("UPDATE login SET login_count=login_count+'1' WHERE mail='".mysql_real_escape_string($_POST['mail'])."'") or die(mysql_error()); }else{ if(empty($row['login_ip'])){ $row['login_ip'] = $_SERVER['REMOTE_ADDR']; }else{ $ip_information = explode("-", $row['login_ip']); if (in_array($_SERVER['REMOTE_ADDR'], $ip_information)) { $row['login_ip'] = $row['login_ip']; }else{ $row['login_ip'] = $row['login_ip']."-".$_SERVER['REMOTE_ADDR']; } } $_SESSION['user_id'] = $row['id']; $result = mysql_query("UPDATE login SET userip='".mysql_real_escape_string($_SERVER['REMOTE_ADDR'])."',login_ip='".mysql_real_escape_string($row['login_ip'])."',login_count='0' WHERE id='".mysql_real_escape_string($_SESSION['user_id'])."'") or die(mysql_error()); header("Location: news.php"); }// count check. }// id check. }// password check. }// mail check. }// disabled check. }// if isset submit. // output bufferer output ob_flush(); ?> <form method="post" action="index.php"> <table width="450" border="0" align="center" cellspacing="0"> <tr> <td align="right" class="style1"><label>Email: </label></td> <td width="150" align="center"><input name="mail" type="text" class="entryfield" id="mail" style='width: 95%;'/></td> <td width="60" align="right" class="style1"><label>Password: </label></td> <td width="150" align="center"><input name="pass" type="password" class="entryfield" id="pass" style='width: 95%; ' maxlength="20"/></td> </tr> <tr> <td height="35" colspan="4" align="center"><table width="100" border="0" cellspacing="0"> <tr> <td align="center"><input name="submit" type="submit" class="button" value="Login." onFocus="if(this.blur)this.blur()" style="background-color:#222222;"/></td> </tr> </table></td> </tr> </table> </form></td> </tr> </table> <center> || © [url]www.criminal-society.net[/url] || </center> </body> </html>
-
Try adding the output_bufferer's printing function at the end of the PHP block segment. <?php ob_start(); include_once("config.php"); include_once("connect.php"); ?> <!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> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Welcome.</title> <link href="style.css" rel="stylesheet" type="text/css" /> <style type="text/css"> <!-- body { background-color: #222222; } --> </style></head> <body OnLoad="document.login.mail.focus();"> <table width="800" border="0" align="center" cellspacing="0"> <tr> <td><table border="0" align="left" cellspacing="2"> <tr> <td class="off" onmouseover="this.className='on'" onmouseout="this.className='off'" onclick="location.href='index.php'">[url="index.php"]Login.[/url]</td> <td class="off" onmouseover="this.className='on'" onmouseout="this.className='off'" onclick="location.href='register.php'">[url="register.php"]Register.[/url]</td> <td class="off" onmouseover="this.className='on'" onmouseout="this.className='off'" onclick="location.href='forgot.php'">[url="forgot.php"]Forgot Password.[/url]</td> <td class="off" onmouseover="this.className='on'" onmouseout="this.className='off'" onclick="location.href='screenshots.php'">[url="screenshots.php"]Screenshots.[/url]</td> <td class="off" onmouseover="this.className='on'" onmouseout="this.className='off'" onclick="location.href='http://www.gangsterlegends.com/sale/index.php'">[url="http://www.gangsterlegends.com/sale/index.php"]Script Shop.[/url]</td> </tr> </table></td> </tr> <tr> <td height="250" align="center" valign="middle"> Your Banner. </p> </td> </tr> <tr> <td align="center" valign="bottom"><form action="" method="post" name="login" id="login"> <?php if(isset($_SESSION['user_id'])) { // if already logged in. session_unset(); session_destroy(); echo "You have been logged out."; } if(isset($_POST['submit'])) { $sql = "SELECT status,admins_ip FROM sitestats WHERE id='1'"; $query = mysql_query($sql) or die(mysql_error()); $row = mysql_fetch_object($query); $page_status = htmlspecialchars($row->status); $page_status_array = explode("-", $page_status); $admins_ip = htmlspecialchars($row->admins_ip); $admin_ip_array = explode("-", $admins_ip); if(!empty($page_status_array[31]) and !in_array($_SERVER['REMOTE_ADDR'], $admin_ip_array)){ echo htmlspecialchars(stripslashes($page_status_array[31])); }else{ if(!preg_match("/^[A-Z0-9._%-]+@[A-Z0-9._%-]+\.[A-Z]{2,6}$/i", $_POST['mail'])) { echo "Invalid Password / Username combination."; }else{ $query = "SELECT password,id,login_ip,login_count FROM login WHERE mail='".mysql_real_escape_string($_POST['mail'])."'"; $result = mysql_query($query) or die(mysql_error()); $row = mysql_fetch_array($result); if(empty($row['id'])){ echo "Invalid Password / Username combination."; }else{ if($row['login_count'] >= 5 ){ echo "You have tried 5 or more false combinations you can reclaim your account with the forgot password option."; }else{ if(md5($_POST['pass']) != $row['password']){ echo "Invalid Password / Username combination."; $update_login = mysql_query("UPDATE login SET login_count=login_count+'1' WHERE mail='".mysql_real_escape_string($_POST['mail'])."'") or die(mysql_error()); }else{ if(empty($row['login_ip'])){ $row['login_ip'] = $_SERVER['REMOTE_ADDR']; }else{ $ip_information = explode("-", $row['login_ip']); if (in_array($_SERVER['REMOTE_ADDR'], $ip_information)) { $row['login_ip'] = $row['login_ip']; }else{ $row['login_ip'] = $row['login_ip']."-".$_SERVER['REMOTE_ADDR']; } } $_SESSION['user_id'] = $row['id']; $result = mysql_query("UPDATE login SET userip='".mysql_real_escape_string($_SERVER['REMOTE_ADDR'])."',login_ip='".mysql_real_escape_string($row['login_ip'])."',login_count='0' WHERE id='".mysql_real_escape_string($_SESSION['user_id'])."'") or die(mysql_error()); header("Location: news.php"); }// count check. }// id check. }// password check. }// mail check. }// disabled check. }// if isset submit. // output bufferer output ob_flush(); ?> <table width="450" border="0" align="center" cellspacing="0"> <tr> <td align="right" class="style1"><label>Email: </label></td> <td width="150" align="center"><input name="mail" type="text" class="entryfield" id="mail" style='width: 95%;'/></td> <td width="60" align="right" class="style1"><label>Password: </label></td> <td width="150" align="center"><input name="pass" type="password" class="entryfield" id="pass" style='width: 95%; ' maxlength="20"/></td> </tr> <tr> <td height="35" colspan="4" align="center"><table width="100" border="0" cellspacing="0"> <tr> <td align="center"><input name="submit" type="submit" class="button" value="Login." onFocus="if(this.blur)this.blur()" style="background-color:#222222;"/></td> </tr> </table></td> </tr> </table> </form></td> </tr> </table> <center> || © [url]www.criminal-society.net[/url] || </center> </body> </html>
-
Give the guy a break man. It's looks very good DevonNice, looks like your put allot of effort into it. I have signed up.
-
Contact your host concerning the error message you received. It's an error on their side.
-
Moved... [mc code V2]Updated Lottery
-
Well, this is simple. Try: <?php include(dirname(__FILE__) . "/globals.php"); if ($gangdata['gangPRESIDENT'] !== $ir['userid']) { echo 'Only the gang president can perform this action.'; $h->endpage(); exit; } else { if ($gangdata['gangRESPECT'] >= 150) { mysql_query("UPDATE `gangs` SET `gangUPDATE` = 1, `gangRESPECT` - 150 ' WHERE `userid` = {gangdata['gangPRESIDENT']}"); echo ' Congratulation, Your gang now has been updated'; } else { echo 'you gang does not have enough respect .'; } } $h->endpage(); ?>
-
The script is messy, clean it up a bit. Secondly, I'm guessing you have three businesses on your game, eh? If the script wasn't so messy it would have been easier to detect the problem; Problem: Each time the script steps into another row of the database, the days gets updated - this is because you are running a query that is supposed to be global, but is used in a local scope. Try this for size: <?php include "config.php"; include "global_func.php"; global $_CONFIG; if ($_GET['code'] != $_CONFIG['code']) { die(""); } 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']; } $db->query("UPDATE `businesses` SET `brank` = '100000' WHERE `brank` > '100000'"); $select_businesses = $db->query("SELECT * FROM `businesses` LEFT JOIN `businesses_classes` ON (`classId` = `busClass`) ORDER BY `busId` ASC"); while ($bs = $db->fetch_row($select_businesses)) { $amount = $db->num_rows($db->query(sprintf("SELECT * FROM `businesses_members` WHERE `bmembBusiness` = '%u'", $bs['busId']))); $active = $db->num_rows($db->query(sprintf("SELECT * FROM `users` WHERE `business` = '%u' AND active='%d'", $bs['busId'], 1))); $new_customers = ($bs['brank'] * ($active) + rand(10, 20) * $bs['classCost'] / 200); $new_profit = (($new_customers) + rand(110, 990)); $new_rank = ($bs['classId'] * ($active) / 2); $db->query(sprintf("UPDATE `businesses` SET `busYCust` = `busCust`, `busYProfit` = `busProfit`, `busCust` = '%d', `busProfit` = '%d', `busCash` = '%d' WHERE `busId` = '%u'", $new_customers, $new_profit, ($new_profit + $bs['busCash']), $bs['busId'])); $db->query(sprintf("UPDATE `businesses` SET `brank` = `brank` + '%d' WHERE `busId` = '%u'", $new_rank, $bs['busId'])); $fetch_members = $db->query(sprintf("SELECT * FROM `businesses_members` LEFT JOIN `users` ON (`userid` = `bmembMember`) LEFT JOIN `businesses_ranks` ON (`rankId` = `bmembRank`) WHERE `bmembBusiness` = '%u'", $bs['busId'])) or die('Cron not run'); $db->query("UPDATE userstats SET labour = labour + 50, IQ = IQ + 50, strength = strength + 50 WHERE userid = {$bs['busDirector']}"); $db->query("UPDATE users SET comppoints = comppoints + 1 WHERE userid = {$bs['busDirector']}"); while ($fm = $db->fetch_row($fetch_members)) { $db->query(sprintf("UPDATE `userstats` SET `{$fm['rankPrim']}` = `{$fm['rankPrim']}` + '%.6f', `{$fm['rankSec']}` = `{$fm['rankSec']}` + '%.6f' WHERE (`userid` = '%u')", $fm['rankPGain'], $fm['rankSGain'], $fm['userid'])) or die('Cron not run'); $db->query(sprintf("UPDATE `users` SET `money` = `money` + '%d' WHERE `userid` = '%u'", $fm['bmembCash'], $fm['userid'])) or die('Cron not run'); $db->query(sprintf("UPDATE `users` SET `comppoints` = `comppoints` + '1' WHERE `userid` = '%u'", $fm['userid'])) or die('Cron not run'); if ($bs['busCash'] < $fm['bmembCash']) { $text = "Member ID {$fm['bmembMember']} was not paid their \$" . number_format($fm['bmembCash']) . " due to lack of funds." or die('Cron not run'); $db->query(sprintf("INSERT INTO `businesses_alerts` (`alertId`, `alertBusiness`, `alertText`, `alertTime`) VALUES ('NULL', '%u', '%s', '%d')", $bs['busId'], $text, time())) or die('Cron not run'); $db->query(sprintf("UPDATE `businesses` SET `busDebt` = `busDebt` + '%d' WHERE `busId` = '%u'", $fm['bmembCash'], $bs['busId'])) or die('Cron not run'); } else { $db->query(sprintf("UPDATE `businesses` SET `busCash` = `busCash` - '%d' WHERE `busId` = '%u'", $fm['bmembCash'], $bs['busId'])) or die('Cron not run'); } } if ($bs['busDebt'] > $bs['classCost']) { $send_event = $db->query(sprintf("SELECT `bmembMember` FROM WHERE `bmembBusiness` = '%u' ORDER BY `bmembId` DESC", $bs['busId'])) or die('Cron not run'); while ($se = $db->fetch_row($send_event)) { $text = "The {$bs['busName']} business went bankrupt\, all members have been made redundent." or die('Cron not run'); insert_event($se['bmembMember'], $text); } $db->query(sprintf("DELETE FROM `businesses_members` WHERE (`bmembBusiness` = '%u')", $bs['busId'])) or die('Cron not run'); $db->query(sprintf("DELETE FROM `businesses` WHERE (`busId` = '%u')", $bs['busId'])) or die('Cron not run'); } } // addition $db->query(sprintf("UPDATE `businesses` SET `busDays` = `busDays` + '1'")); $db->query(sprintf("UPDATE `users` SET `activedays` = `activedays` + '1' WHERE `active` = '1'")); $db->query(sprintf("UPDATE `users` SET `active` = '0' WHERE `active` = '1'")); ?>
-
Most do, including Ff and IE.
-
Well, I made this handy little thing for school way back. Though I'd share it in case somebody wants to change their screen resolution at school. :P It's made with Delphi. Download: http://www.aplision.com/~ferdi/screen_resolution.zip Edit: Upload limit really should be changed, download link added.
-
I wish SMF would be brought back. But yea, the PHP tags should also come into use.
-
Well, this might not work because they need a password, a username and an email address - this is required by most games. Also, storing unencrypted passwords in a database is very insecure - so no to plain text passwords. When I designed the showcase of Aplision, to list my modifications I thought about this as well. The only thing I came up with is making an auto generated account. Also, integrating OpenID would be useful... but to some extent.
-
Well, I like to go trough posts and read the scripts people post - it's an annoying habit. But there's one thing wrong with the whole thing; the code boxes are to large. They take up very much space and I have to scroll forever to get anywhere. I suggest setting the code boxes to a height of 500 pixels, it would render pages much more visually better. My only current solution is javascript, modifying the stylesheet rules to acquire the result I want. If anyone want a quick solution too: make a button with the url as: javascript:document.styleSheets[1].cssRules[474].style.cssText = "max-height:500px;overflow-y:scroll;";void(0); That small little piece of script will set the height of any code boxes on the page to 500 pixels, AND... add a handy little scroll-bar.
-
Well, if it runs out by the end of 2012, It won't concern me. The same systems will be used, and everything will be exactly the same. All the people who need to allocate a new IP address will have an IPv6 IP, and browsers will adapt to that. Everyone who is currently using IPv4 won't be affected. Sure, the systems will need to be updated, but this will be the exact same thing as the year 2000 bug - Only idiotic people will suffer. People like me, who design their systems to adapt won't have anything to worry about. I have my 3 IPv4 addresses and one IPv6, which is exactly right for me.
-
That's not necessarily so. IPv6 isn't a very big concern, neither is IPv4.
-
@BUG: table headings are vertically unaligned. Add to your table heading class: line-height: 20px; // or whatever the height of the heading is Also a suggestion: Vertically align the table cells, their at the top of the cell which doesn't look too good. @BUG: Karma system fails, as well as UserCP. After altering someones Karma level one receives "No input file specified.". I'm pretty sure it's something to do with your security(?), it's the same for the registration page's so-called checkers. @BUG: It's useless displaying empty boards. Suggestion: Make topics title bold, it will stand out more and I will know where to click. Enable BCCode in thread descriptions. @BUG: Search doesn't work. Wow, first time I actually sign up for anything.
-
No. Buying an illegal copy would make you the lessee of an illegal copy of MCCodes, which would go against MCCodes terms.
-
Flush your browser cookies. Flush DNS cache(optional) by opening the command prompt, and entering: "ipconfig /flushdns" without the quotes. It might be the problem. Just so everyone knows, it isn't an IE issue. EDIT: Might be the domain, make sure you are on http://makewebgames.io. The forum doesn't create global cookies.
-
Yea I liked SMF as well. :( But anyway, I think this would definitely we a good thing, will advertise mod dev's for free. :P But anyhow, maybe a badge that can be used on each developers personal website as well. This would require sites to be verified as well.
-
I don't see why MCCodes needs to be changed, even if you are using IPv6 protocol. I don't think I will be changing anytime soon, because my DNS server for instance(bind9), won't allow this to me unless I change everything.
-
PHP normally prints the permission error if there is any...
-
Before the forum change the attachment was actually there. Even so, I updated to post to include the attachment. Ps. I think this is the only addon I've ever released for free. :P
-
I must agree with rulerofzu, take a step higher. I mentioned somewhere something about their live support being worse than actual email contact. They must be a really poorly managed company, so they might not even have a abuse department. Taking the matter to the data center; I don't know anything about what their response time to this should be, but I know if within a certain time frame the demand is not met they're actual server(s) can be taken off the grid at the data center's. This would of course, depend on the host's host Terms of Service agreement.
-
Yea, not to bad. It's very simple use of jQuery, and elegant. Wouldn't mind using this as a template for future use.