Jump to content
MakeWebGames

03laceys

Members
  • Posts

    863
  • Joined

  • Last visited

Everything posted by 03laceys

  1. Re: Mailbox popup... in header??? Its not anything to do with the box.. It's to do with the if statment. The popup box works fine (from dynamic drive) But will not open when i want it to lol. So its the statment.. must be not calling it properly
  2. Hello everybody, I was just wondering if you could be me your views on the new layout of my game. I think you will be very surprised. I believe its very unique. Thank you. URL: http://www.hitmanslegacy.com Username: test Password: test
  3. Re: Mailbox popup... in header??? I have the popup box working just not when a new mail is recived :?
  4. Re: Mailbox popup... in header??? I don't think its to do with div i think the header isn't searching the database for "new_mail" :?
  5. Re: Mailbox popup... in header??? Not working :? I have added it about the </body> tag... I get no error. just nothing.
  6. Re: Mailbox popup... in header??? Attacking, is one click attack ;) also i have no mainmenu on my game so it dosn't display mailbox (1) sort of thing.
  7. Hello, I have been trying over the past couple of hours to get a popup box to popup when you have a new message. As i have added the code into the header to do this the popup pops up on every page like i wish it to.. The problem is i only want it to pop up when a user has a new mail... I have tried this and a few others.. Add this below global at very top of the page... $mc=$ir['new_mail'];   Then add this at the very bottom of the page... if($mc > 0) { print "Pop up box here."; }   The box is popping up if there is a new mail or not it dosn't matter. Any help on fixing this would be great.
  8. Re: Probem :? please help... Will check it.
  9. Re: Probem :? please help... Nope no work.
  10. Re: Probem :? please help... Yes each on is set up the same... How has crons got to do with max brave and energy?
  11. Re: Probem :? please help... And global_func.php   <?php; function gang_dropdown($connection,$ddname="gang",$selected=-1) { $ret="<select name='$ddname' type='dropdown'>"; $q=mysql_query("SELECT * FROM gangs ORDER BY gangNAME ASC",$connection); if($selected == -1) { $first=0; } else { $first=1; } while($r=mysql_fetch_row($q)) { $ret.="\n<option value='{$r['gangID']}'"; if ($selected == $r['gangID'] || $first == 0) { $ret.=" selected='selected'";$first=1; } $ret.=">{$r['gangNAME']}</option>"; } $ret.="\n</select>"; return $ret; } function money_formatter($muny,$symb='$') { return $symb.number_format($muny); } function itemtype_dropdown($connection,$ddname="item_type",$selected=-1) { global $db; $ret="<select name='$ddname' type='dropdown'>"; $q=$db->query("SELECT * FROM itemtypes ORDER BY itmtypename ASC"); if($selected == -1) { $first=0; } else { $first=1; } while($r=$db->fetch_row($q)) { $ret.="\n<option value='{$r['itmtypeid']}'"; if ($selected == $r['itmtypeid'] || $first == 0) { $ret.=" selected='selected'";$first=1; } $ret.=">{$r['itmtypename']}</option>"; } $ret.="\n</select>"; return $ret; } function item_dropdown($connection,$ddname="item",$selected=-1) { global $db; $ret="<select name='$ddname' type='dropdown'>"; $q=$db->query("SELECT * FROM items ORDER BY itmname ASC"); if($selected == -1) { $first=0; } else { $first=1; } while($r=$db->fetch_row($q)) { $ret.="\n<option value='{$r['itmid']}'"; if ($selected == $r['itmid'] || $first == 0) { $ret.=" selected='selected'";$first=1; } $ret.=">{$r['itmname']}</option>"; } $ret.="\n</select>"; return $ret; } function item2_dropdown($connection,$ddname="item",$selected=-1) { global $db; $ret="<select name='$ddname' type='dropdown'>"; $q=$db->query("SELECT * FROM items ORDER BY itmname ASC"); if($selected < 1) { $ret.="<option value='0' selected='selected'>-- None --</option>"; } else { $ret.="<option value='0'>-- None --</option>"; } while($r=$db->fetch_row($q)) { $ret.="\n<option value='{$r['itmid']}'"; if ($selected == $r['itmid']) { $ret.=" selected='selected'";$first=1; } $ret.=">{$r['itmname']}</option>"; } $ret.="\n</select>"; return $ret; } function location_dropdown($connection,$ddname="location",$selected=-1) { global $db; $ret="<select name='$ddname' type='dropdown'>"; $q=$db->query("SELECT * FROM cities ORDER BY cityname ASC"); if($selected == -1) { $first=0; } else { $first=1; } while($r=$db->fetch_row($q)) { $ret.="\n<option value='{$r['cityid']}'"; if ($selected == $r['cityid'] || $first == 0) { $ret.=" selected='selected'";$first=1; } $ret.= ">{$r['cityname']}</option>"; } $ret.="\n</select>"; return $ret; } function shop_dropdown($connection,$ddname="shop",$selected=-1) { global $db; $ret="<select name='$ddname' type='dropdown'>"; $q=$db->query("SELECT * FROM shops ORDER BY shopNAME ASC"); if($selected == -1) { $first=0; } else { $first=1; } while($r=$db->fetch_row($q)) { $ret.="\n<option value='{$r['shopID']}'"; if ($selected == $r['shopID'] || $first == 0) { $ret.=" selected='selected'";$first=1; } $ret.= ">{$r['shopNAME']}</option>"; } $ret.="\n</select>"; return $ret; } function user_dropdown($connection,$ddname="user",$selected=-1) { global $db; $ret="<select name='$ddname' type='dropdown'>"; $q=$db->query("SELECT * FROM users ORDER BY username ASC"); if($selected == -1) { $first=0; } else { $first=1; } while($r=$db->fetch_row($q)) { $ret.="\n<option value='{$r['userid']}'"; if ($selected == $r['userid'] || $first == 0) { $ret.=" selected='selected'";$first=1; } $ret.= ">{$r['username']}</option>"; } $ret.="\n</select>"; return $ret; } function challengebot_dropdown($connection,$ddname="bot",$selected=-1) { global $db; $ret="<select name='$ddname' type='dropdown'>"; $q=$db->query("SELECT cb.*,u.* FROM challengebots AS cb LEFT JOIN users AS u ON cb.cb_npcid=u.userid ORDER BY u.username ASC"); if($selected == -1) { $first=0; } else { $first=1; } while($r=$db->fetch_row($q)) { $ret.="\n<option value='{$r['userid']}'"; if ($selected == $r['userid'] || $first == 0) { $ret.=" selected='selected'";$first=1; } $ret.= ">{$r['username']}</option>"; } $ret.="\n</select>"; return $ret; } function randomString($length) { $string = md5(time()); $highest_startpoint = 32-$length; $randomString = substr($string,rand(0,$highest_startpoint),$length); return $randomString; } function auction_action() { global $c, $db, $ir, $h; $time = time(); $select_bin = $db->query("SELECT * FROM auction_house WHERE ah_time_left < '$time' AND ah_complete = '0'"); while($bin = mysql_fetch_object($select_bin)) { $item = mysql_fetch_object($db->query("SELECT itmname FROM items WHERE itmid = '$bin->ah_item_id'")); if($bin->ah_current_highest > 0) { $them = mysql_fetch_object($db->query("SELECT userid,username FROM users WHERE userid = '$bin->ah_current_highest'")); event_add($bin->ah_current_highest, "You won the auction for $item->itmname, This item is now in your items.", $c); $db->query("UPDATE users SET money = money + '$bin->ah_buy_it_now_price' WHERE userid = '$bin->ah_owner'"); event_add($bin->ah_owner, "<a href = 'viewuser.php?u=$them->userid'>$them->username</a> won the auction $item->itmname from the auction market. \$".money_formatter($bin->ah_current_bid, "")." was added to your money balance.", $c); $time = time() - 1; $db->query("UPDATE auction_house SET ah_time_left = '$time', ah_complete = '1' WHERE ah_id = '$bin->ah_id'"); item_add($bin->ah_current_highest, $bin->ah_item_id, 1); } else { $time = time() - 1; $db->query("UPDATE auction_house SET ah_time_left = '$time', ah_complete = '1' WHERE ah_id = '$bin->ah_id'"); event_add($bin->ah_owner, "Your item, $item->itmname, Failed to sell in the auction house. It has been returned to your inventory.", $c); item_add($bin->ah_owner, $bin->ah_item_id, 1); } } } function custom_time_diff($first, $second) { // Assuming first to be the lower value // // This will work with that assumption // // This will give the amount of seconds between the 2 times // $time_diff = $second - $first; // Set the variables as 0 before we start: $days = 0; $hours = 0; $minutes = 0; // This will check is the time is longer than a day, If so, It will loop until it is below 1 day and store the day variable. if($time_diff > 86400) { while ($time_diff > 86400) { $days = $days + 1; $time_diff = $time_diff - 86400; } } if($time_diff > 3600) { while ($time_diff > 3600) { $hours = $hours + 1; $time_diff = $time_diff - 3600; } } if($time_diff > 60) { while ($time_diff > 60) { $minutes = $minutes + 1; $time_diff = $time_diff - 60; } } // This will set it to display days, hours and minutes. if($days > 0) { $time_d=$days . "d "; } else { $time_d=""; } if($hours > 0) { $time_d.=$hours . "h "; } else { $time_d.=""; } if($minutes > 0) { $time_d.=$minutes . "m"; } else { $time_d.=""; } // If below a minute, Just echo below 1 minute $time_diff_extra = $second - $first; if ($time_diff_extra < 60 AND $time_diff_extra > 0) { $time_d.="< 1 minute."; } if($time_diff_extra <= 0) { $time_d.="Ended"; } return $time_d; }function fed_user_dropdown($connection,$ddname="user",$selected=-1) { global $db; $ret="<select name='$ddname' type='dropdown'>"; $q=$db->query("SELECT * FROM users WHERE fedjail=1 ORDER BY username ASC"); if($selected == -1) { $first=0; } else { $first=1; } while($r=$db->fetch_row($q)) { $ret.="\n<option value='{$r['userid']}'"; if ($selected == $r['userid'] || $first == 0) { $ret.=" selected='selected'";$first=1; } $ret.= ">{$r['username']}</option>"; } $ret.="\n</select>"; return $ret; } function mailb_user_dropdown($connection,$ddname="user",$selected=-1) { global $db; $ret="<select name='$ddname' type='dropdown'>"; $q=$db->query("SELECT * FROM users WHERE mailban > 0 ORDER BY username ASC"); if($selected == -1) { $first=0; } else { $first=1; } while($r=$db->fetch_row($q)) { $ret.="\n<option value='{$r['userid']}'"; if ($selected == $r['userid'] || $first == 0) { $ret.=" selected='selected'";$first=1; } $ret.= ">{$r['username']}</option>"; } $ret.="\n</select>"; return $ret; } function forumb_user_dropdown($connection,$ddname="user",$selected=-1) { global $db; $ret="<select name='$ddname' type='dropdown'>"; $q=$db->query("SELECT * FROM users WHERE forumban > 0 ORDER BY username ASC"); if($selected == -1) { $first=0; } else { $first=1; } while($r=$db->fetch_row($q)) { $ret.="\n<option value='{$r['userid']}'"; if ($selected == $r['userid'] || $first == 0) { $ret.=" selected='selected'";$first=1; } $ret.= ">{$r['username']}</option>"; } $ret.="\n</select>"; return $ret; } function job_dropdown($connection,$ddname="job",$selected=-1) { global $db; $ret="<select name='$ddname' type='dropdown'>"; $q=$db->query("SELECT * FROM jobs ORDER BY jNAME ASC"); if($selected == -1) { $first=0; } else { $first=1; } while($r=$db->fetch_row($q)) { $ret.="\n<option value='{$r['jID']}'"; if ($selected == $r['jID'] || $first == 0) { $ret.=" selected='selected'";$first=1; } $ret.=">{$r['jNAME']}</option>"; } $ret.="\n</select>"; return $ret; } function jobrank_dropdown($connection,$ddname="jobrank",$selected=-1) { global $db; $ret="<select name='$ddname' type='dropdown'>"; $q=$db->query("SELECT jr.*,j.* FROM jobranks jr LEFT JOIN jobs j ON jr.jrJOB=j.jID ORDER BY j.jNAME ASC, jr.jrNAME ASC"); if($selected == -1) { $first=0; } else { $first=1; } while($r=$db->fetch_row($q)) { $ret.="\n<option value='{$r['jrID']}'"; if ($selected == $r['jrID'] || $first == 0) { $ret.=" selected='selected'";$first=1; } $ret.=">{$r['jNAME']} - {$r['jrNAME']}</option>"; } $ret.="\n</select>"; return $ret; } function house_dropdown($connection,$ddname="house",$selected=-1) { global $db; $ret="<select name='$ddname' type='dropdown'>"; $q=$db->query("SELECT * FROM houses ORDER BY hNAME ASC"); if($selected == -1) { $first=0; } else { $first=1; } while($r=$db->fetch_row($q)) { $ret.="\n<option value='{$r['hID']}'"; if ($selected == $r['hID'] || $first == 0) { $ret.=" selected='selected'";$first=1; } $ret.=">{$r['hNAME']}</option>"; } $ret.="\n</select>"; return $ret; } function house2_dropdown($connection,$ddname="house",$selected=-1) { global $db; $ret="<select name='$ddname' type='dropdown'>"; $q=$db->query("SELECT * FROM houses ORDER BY hNAME ASC"); if($selected == -1) { $first=0; } else { $first=1; } while($r=$db->fetch_row($q)) { $ret.="\n<option value='{$r['hWILL']}'"; if ($selected == $r['hWILL'] || $first == 0) { $ret.=" selected='selected'";$first=1; } $ret.=">{$r['hNAME']}</option>"; } $ret.="\n</select>"; return $ret; } function course_dropdown($connection,$ddname="course",$selected=-1) { global $db; $ret="<select name='$ddname' type='dropdown'>"; $q=$db->query("SELECT * FROM courses ORDER BY crNAME ASC"); if($selected == -1) { $first=0; } else { $first=1; } while($r=$db->fetch_row($q)) { $ret.="\n<option value='{$r['crID']}'"; if ($selected == $r['crID'] || $first == 0) { $ret.=" selected='selected'";$first=1; } $ret.=">{$r['crNAME']}</option>"; } $ret.="\n</select>"; return $ret; } function crime_dropdown($connection,$ddname="crime",$selected=-1) { global $db; $ret="<select name='$ddname' type='dropdown'>"; $q=$db->query("SELECT * FROM crimes ORDER BY crimeNAME ASC"); if($selected == -1) { $first=0; } else { $first=1; } while($r=$db->fetch_row($q)) { $ret.="\n<option value='{$r['crimeID']}'"; if ($selected == $r['crimeID'] || $first == 0) { $ret.=" selected='selected'";$first=1; } $ret.=">{$r['crimeNAME']}</option>"; } $ret.="\n</select>"; return $ret; } function crimegroup_dropdown($connection,$ddname="crimegroup",$selected=-1) { global $db; $ret="<select name='$ddname' type='dropdown'>"; $q=$db->query("SELECT * FROM crimegroups ORDER BY cgNAME ASC"); if($selected == -1) { $first=0; } else { $first=1; } while($r=$db->fetch_row($q)) { $ret.="\n<option value='{$r['cgID']}'"; if ($selected == $r['cgID'] || $first == 0) { $ret.=" selected='selected'";$first=1; } $ret.=">{$r['cgNAME']}</option>"; } $ret.="\n</select>"; return $ret; } function event_add($userid,$text,$connection=0) { global $db; $text=mysql_escape($text); $db->query("INSERT INTO events VALUES('',$userid,UNIX_TIMESTAMP(),0,'$text')"); $db->query("UPDATE users SET new_events=new_events+1 WHERE userid={$userid}"); return 1; } function mysql_escape($str) { return str_replace("'","''",$str); } function check_level() { global $ir,$c,$userid; $ir['exp_needed']=(int) (($ir['level']+1)*($ir['level']+1)*($ir['level']+1)*5.4); if($ir['exp'] >= $ir['exp_needed'] && $ir['level']!=70) { mysql_query("update users set upgrade=upgrade+1 where userid=$userid",$c); $expu=$ir['exp']-$ir['exp_needed']; $ir['exp']=$expu; $ir['exp_needed']=(int) (($ir['level']+1)*($ir['level']+1)*($ir['level']+1)*2.2); mysql_query("UPDATE users SET exp=$expu where userid=$userid",$c); } } function get_gamerank($networth) { $tp=($networth); if ( $tp < 1000 ) { return "#1 Absolute beginner"; } else if ( $tp < 4000 ) { return "#2 Beginner"; } else if ( $tp < 16000 ) { return "#3 Inexperienced"; } else if ( $tp < 64000 ) { return "#4 Rookie"; } else if ( $tp < 256000 ) { return "#5 Novice"; } else if ( $tp < 1024000 ) { return "#6 Below Average"; } else if ( $tp < 4096000 ) { return "#7 Average"; } else if ( $tp < 8192000 ) { return "#8 Reasonable"; } else if ( $tp < 32768000 ) { return "#9 Above Average"; } else if ( $tp < 131072000 ) { return "#10 competant"; } else if ( $tp < 524288000 ) { return "#11 Highly Compenant"; } else if ( $tp < 2097152000 ) { return "#12 Veteran"; } else if ( $tp < 8388608000 ) { return "#13 Distinguished"; } else if ( $tp < 33554432000 ) { return "#14 Highly Distinguished"; } else if ( $tp < 66558864000 ) { return "#15 Professional"; } $db->query("UPDATE users SET rank=rank where userid=$userid"); } function get_rank($stat, $mykey) { global $db; global $ir,$userid,$c; $q=$db->query("SELECT count(*) FROM userstats us LEFT JOIN users u ON us.userid=u.userid WHERE us.$mykey > $stat AND us.userid != $userid AND u.user_level != 0") ; return $db->fetch_single($q)+1; } function item_add($user, $itemid, $qty, $notid=0) { global $db; if($notid > 0) { $q=$db->query("SELECT * FROM inventory WHERE inv_userid={$user} and inv_itemid={$itemid} AND inv_id != {$notid}"); } else { $q=$db->query("SELECT * FROM inventory WHERE inv_userid={$user} and inv_itemid={$itemid}"); } if($db->num_rows($q) > 0) { $r=$db->fetch_row($q); $db->query("UPDATE inventory SET inv_qty=inv_qty+{$qty} WHERE inv_id={$r['inv_id']}"); } else { $db->query("INSERT INTO inventory (inv_itemid, inv_userid, inv_qty) VALUES ({$itemid}, {$user}, {$qty})"); } } function item_remove($user, $itemid, $qty) { global $db; $q=$db->query("SELECT * FROM inventory WHERE inv_userid={$user} AND inv_itemid={$itemid}"); if($db->num_rows($q) > 0) { $r=$db->fetch_row($q); if($r['inv_qty']>$qty) { $db->query("UPDATE inventory SET inv_qty=inv_qty-{$qty} WHERE inv_id={$r['inv_id']}"); } else { $db->query("DELETE FROM inventory WHERE inv_id={$r['inv_id']}"); } } } function forum_dropdown($connection,$ddname="forum",$selected=-1) { global $db; $ret="<select name='$ddname' type='dropdown'>"; $q=$db->query("SELECT * FROM forum_forums ORDER BY ff_name ASC"); if($selected == -1) { $first=0; } else { $first=1; } while($r=$db->fetch_row($q)) { $ret.="\n<option value='{$r['ff_id']}'"; if ($selected == $r['ff_id'] || $first == 0) { $ret.=" selected='selected'";$first=1; } $ret.= ">{$r['ff_name']}</option>"; } $ret.="\n</select>"; return $ret; } function forum2_dropdown($connection,$ddname="forum",$selected=-1) { global $db; $ret="<select name='$ddname' type='dropdown'>"; $q=$db->query("SELECT * FROM forum_forums WHERE ff_auth != 'gang' ORDER BY ff_name ASC"); if($selected == -1) { $first=0; } else { $first=1; } while($r=$db->fetch_row($q)) { $ret.="\n<option value='{$r['ff_id']}'"; if ($selected == $r['ff_id'] || $first == 0) { $ret.=" selected='selected'";$first=1; } $ret.= ">{$r['ff_name']}</option>"; } $ret.="\n</select>"; return $ret; } function make_bigint($str, $positive=1) { $str = (string) $str; $ret = ""; for($i=0;$i<strlen($str);$i++) { if((ord($str[$i]) > 47 && ord($str[$i]) < 58) or ($str[$i]=="-" && $positive == 0)) { $ret.=$str[$i]; } } if(strlen($ret) == 0) { return "0"; } return $ret; } function stafflog_add($text) { global $db, $ir; $IP = ($_SERVER['HTTP_X_FORWARDED_FOR']) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR']; $text=$db->escape($text); $db->query("INSERT INTO stafflog VALUES(NULL, {$ir['userid']}, unix_timestamp(), '$text', '$IP')"); } ?>
  12. Re: Probem :? please help... Ok my globals.php   <?php session_start(); ob_start(); if(get_magic_quotes_gpc() == 0) { foreach($_POST as $k => $v) { $_POST[$k]=addslashes($v); } foreach($_GET as $k => $v) { $_GET[$k]=addslashes($v); } } require "global_func.php"; if($_SESSION['loggedin']==0) { header("Location: login.php"); exit; } $userid=$_SESSION['userid']; require "header.php"; 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']; } $domain=$_SERVER['HTTP_HOST']; global $jobquery, $housequery; if($jobquery) { $is=$db->query("SELECT u.*,us.*,j.*,jr.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid LEFT JOIN jobs j ON j.jID=u.job LEFT JOIN jobranks jr ON jr.jrID=u.jobrank WHERE u.userid=$userid"); } else if($housequery) { $is=$db->query("SELECT u.*,us.*,h.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid LEFT JOIN houses h ON h.hWILL=u.maxwill WHERE u.userid=$userid"); } else { $is=$db->query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid=$userid"); } $ir=$db->fetch_row($is); if($ir['force_logout']) { $db->query("UPDATE users SET force_logout=0 WHERE userid=$userid"); session_unset(); session_destroy(); header("Location: login.php"); exit; } global $macropage; if($macropage && !$ir['verified'] && $set['validate_on']==1) { header("Location: macro1.php?refer=$macropage"); exit; } check_level(); $h = new headers; $h->startheaders(); $fm=money_formatter($ir['money']); $cm=money_formatter($ir['crystals'],''); $lv=date('F j, Y, g:i a',$ir['laston']); global $atkpage; if($atkpage) { $h->userdata($ir,$lv,$fm,$cm,0); } else { $h->userdata($ir,$lv,$fm,$cm); } global $menuhide; if(!$menuhide) { $h->menuarea(); } ?>
  13. Re: My other problem :? Thank very much i will try this.
  14. Re: Probem :? please help... I don't recall it working before now... It was pointed out in bug reports the game is new... So it proberbly didn't work before... My crons are not disabled as my other crons are still working fine...   I can not see anything wrong shall i post it???
  15. OK so on my game hitmanslegacy.com, My cron_day file isn't working... Votes are not reseting neither is anthing that has a day cron... My cron_Dy file...   <?php include "config.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; $db->query("UPDATE fedjail set fed_days=fed_days-1"); $q=$db->query("SELECT * FROM fedjail WHERE fed_days=0"); $ids=array(); while($r=$db->fetch_row($q)) { $ids[]=$r['fed_userid']; } if(count($ids) > 0) { $db->query("UPDATE users SET fedjail=0 WHERE userid IN(".implode(",", $ids).")"); } $db->query("DELETE FROM fedjail WHERE fed_days=0"); $db->query("UPDATE users SET gymp=gymp-1 WHERE gymp > 0"; $db->query("UPDATE users SET daysingang=daysingang+1 WHERE gang > 0"); $db->query("UPDATE users SET daysold=daysold+1"); $db->query("UPDATE users SET mailban=mailban-1 WHERE mailban > 0"); $db->query("UPDATE users SET donatordays=donatordays-1 WHERE donatordays > 0"); $db->query("UPDATE users SET daysmarried=daysmarried+1 WHERE married > 0"); $db->query("UPDATE users SET cdays=cdays-1 WHERE course > 0"); $db->query("UPDATE users SET thanks=0"); $db->query("UPDATE users SET boxes_opened=0"); $db->query("UPDATE passreset SET time=time-1 WHERE time > 0",$c) or die(mysql_error()); $db->query("DELETE FROM passreset WHERE time<=0",$c) or die(mysql_error()); $db->query("UPDATE users SET bankmoney=bankmoney*bankpercent+bankmoney WHERE bankmoney>0 AND laston>unix_timestamp()-432000"); $db->query("UPDATE users SET banklevel=1 WHERE bankmoney>0",$c); $db->query("UPDATE users SET cybermoney=cybermoney+(cybermoney/100*7) WHERE cybermoney>0 laston>unix_timestamp()-432000"); $db->query("UPDATE users set ttime=ttime-1 WHERE ttime>0"); $q=$db->query("SELECT * FROM users WHERE cdays=0 AND course > 0"); while($r=$db->fetch_row($q)) { $cd=$db->query("SELECT * FROM courses WHERE crID={$r['course']}"); $coud=$db->fetch_row($cd); $userid=$r['userid']; $db->query("INSERT INTO coursesdone VALUES({$r['userid']},{$r['course']})"); $upd=""; $ev=""; if($coud['crSTR'] > 0) { $upd.=",us.strength=us.strength+{$coud['crSTR']}"; $ev.=", {$coud['crSTR']} strength"; } if($coud['crGUARD'] > 0) { $upd.=",us.guard=us.guard+{$coud['crGUARD']}"; $ev.=", {$coud['crGUARD']} guard"; } if($coud['crLABOUR'] > 0) { $upd.=",us.labour=us.labour+{$coud['crLABOUR']}"; $ev.=", {$coud['crLABOUR']} labour"; } if($coud['crAGIL'] > 0) { $upd.=",us.agility=us.agility+{$coud['crAGIL']}"; $ev.=", {$coud['crAGIL']} agility"; } if($coud['crIQ'] > 0) { $upd.=",us.IQ=us.IQ+{$coud['crIQ']}"; $ev.=", {$coud['crIQ']} IQ"; } $ev=substr($ev,1); if ($upd) { $db->query("UPDATE users u LEFT JOIN userstats us ON u.userid=us.userid SET us.userid=us.userid $upd WHERE u.userid=$userid"); } $db->query("INSERT INTO events VALUES('',$userid,unix_timestamp(),0,'Congratulations, you completed the {$coud['crNAME']} and gained $ev!')"); } $db->query("UPDATE users SET course=0 WHERE cdays=0"); $db->query("TRUNCATE TABLE votes;"); ?>   Any help would be greatly appreciated.
  16. OK so my game www.hitmanslegacy.com has got a problem when you level, Your brave doesn't go up neither does your energy any help? I have tried finding the problem with no luck. Any help would be greatly appreciated.
  17. Re: Free chat mod I would recomend... "xat" this is a great chat room "FREE" and you get options to kick ban op and everything... My members love it so do i... (shame you cant pay to remove there logo) http://xat.com/
  18. Re: Java Hack How do you charge lostone??? Or anyone else that is able to do it **nyna** e.t.c..
  19. Re: Attractive Advertisement Tutorial! I have tried again and got it. but now on step 4 i think it is, with the brushes i have added brushes to each layer and clicked back onto the clouds one and it only shows layer one, what to do?
  20. Re: Attractive Advertisement Tutorial! how do you do that i have tried many ways...
  21. Re: Attractive Advertisement Tutorial! I am currently stuck on step 3... I have done everything so far but i am now pressing ctrl+shift to make the background black and it is doing nothing any help?
  22. Re: Medical Insurance / Hospital Bill [FREE] Welcome back genocide!!!
  23. Re: Sql error help with fixing please? Fixed thank you anyway ze0n. Still dont have a clue what was wrong :?
  24. Re: Sql error help with fixing please? Sorry i did try looking couldn't find the right section... just got back from the pub when i wrote is :lol: Any help guys?
  25. Ok firstly i was looking can't fint the right board for this so please move if needed... Ok i have added the time travel flights modification to my game but when adding the sql i get the error.... #1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ALTER TABLE `cities` ADD `citytime` INT( 11 ) NOT NULL' at line 2 How do i fix this error. Thank you.
×
×
  • Create New...