Jump to content
MakeWebGames

Haunted Dawg

Members
  • Posts

    2,933
  • Joined

  • Last visited

    Never
  • Days Won

    1

Everything posted by Haunted Dawg

  1. Re: [mccode v2] Battletent Fix   <?php include("globals.php"); echo ' <h2>Battle Tent</h2> [b]Welcome to the battle tent! Here you can challenge NPC\'s for money.[/b] <table border="0" width="100%" cellspacing="0" cellpadding="0" class="table"> <tr> <th>Bot Name</th> <th>Level</th> <th>Times Owned</th> <th>Challengable</th> <th>Location</th> <th>Money Won</th> <th>Challenge</th> </tr> <tr>'; $fetch = mysql_query("SELECT * FROM users WHERE user_level=0") or die(mysql_error()); while($user = mysql_fetch_assoc($fetch)) { $sele = mysql_query("SELECT * FROM challengebots WHERE cb_npcid=".$user['userid']) or die(mysql_error()); $sele = mysql_fetch_assoc($sele); $city = mysql_query("SELECT * FROM cities WHERE cityid=".$user['location']) or die(mysql_error()); $city = mysql_fetch_assoc($city); $count = mysql_num_rows(mysql_query("SELECT * FROM challengesbeaten WHERE npcid=".$user['userid'])); echo ' <td>[url="viewuser.php?u='.$user['userid'].'"]'.$user['username'].'[/url] ['.$user['userid'].']</td> <td>'.$user['level'].'</td> <td>'.$count.'</td> <td>'; if($ir['hp'] >= $ir['maxhp']/2 && $ir['hospital'] == 0 && $ir['jail'] == 0 && $ir['location'] == $user['location'] && $user['hospital'] == 0 && $user['jail'] == 0 && $user['hp'] >= $user['maxhp']/2) { echo ' <font color="green">Yes</font>'; } else { echo ' <font color="red">No</font>'; }echo ' </td> <td>'.$city['cityname'].'</td> <td>'.money_formatter($sele['cb_money']).'</td> <td>'; if($ir['hp'] >= $ir['maxhp']/2 && $ir['hospital'] == 0 && $ir['jail'] == 0 && $ir['location'] == $user['location'] && $user['hospital'] == 0 && $user['jail'] == 0 && $user['hp'] >= $user['maxhp']/2) { echo ' [url="attack.php?ID='.$user['userid'].'"]<font color="green">Attack</font>[/url]'; } else { echo ' <font color="red">You can\'t at this moment.</font>'; }echo ' </td> <tr>'; } echo ' </tr> </table>'; $h->endpage(); ?>   Noddy, try that.
  2. Re: A Gun I Created. It's a full gun yes. But it has no overlap. Overlap meaning going onto other side. It's like taking a bbgun and spliting it into 2 and you get 2 piecies. You can see it's not round? Well there.
  3. Re: House Picture You will have to add new picture's to the array each time you make a new house.   $pics = array ( 1 => 'picture id 1', 2 => 'picture id 2', 3 => 'picture id 3', 4 => 'and so forth', );
  4. Re: [mccode v2] Events Page Updated.   <?php include_once('globals.php'); if( isset($_POST['del_all']) ) { mysql_query("DELETE FROM `events` WHERE `evUSER` = ".$ir['userid']); echo 'All events have been deleted.'; } if( isset($_GET['del']) ) { mysql_query("DELETE FROM `events` WHERE `evID` = ".abs(@intval($_GET['del']))." AND `evUSER` = ".$ir['userid']); echo 'Event deleted.'; } if( isset($_POST['checkbox']) ) { $boxes = implode(',',$_POST['checkbox']); mysql_query("DELETE FROM `events` WHERE `evID` IN(".$boxes.") AND `evUSER` = ".$ir['userid']); if( mysql_affected_rows() == 0 ) { echo 'Error occured while trying to delete event(s).'; } else { echo mysql_affected_rows().' event(s) have been deleted.'; } } //Create Page Number's. $limit = 10; $page = abs(@intval($_GET['page'])); $page = isset($page) ? abs(@intval($_GET['page'])) : 0; $by = 'evTIME'; $order = 'DESC'; $rows = mysql_query("SELECT `evID` FROM `events` WHERE `evUSER` = ".$ir['userid']); $rows = mysql_num_rows($rows); $pages = abs(@intval(($rows / $limit) + 1)); if($rows % $limit == 0) { $pages--; } $pg = 'Pages: - '; echo '<h2>Events</h2> [b]Note:[/b] If you click on the check box and go to next page. The checkbox will be cleared. So delete the event\'s you want to delete before going to next page. <form action="'.$_SERVER['PHP_SELF'].'" method="post"> '.$pg; for($i = 0; $i <= $pages; $i++) { $next = ($i * $limit) - 10; echo '[url="'.$_SERVER['PHP_SELF'].'?page='.$next.'"]'.$i.'[/url] - '; } echo ' <table border="1" cellspacing="0" cellpadding="0" class="table" width="80%"> <tr> <th>Time</th> <th>Event</th> <th>Links</th> </tr>'; $clean = ""; $myEvents = mysql_query("SELECT `evTIME`, `evREAD`, `evTEXT`, `evID` FROM `events` WHERE `evUSER` = ".$ir['userid']." ORDER BY ".$by." ".$order." LIMIT ".$page.",".$limit); while($soc = mysql_fetch_assoc($myEvents)) { $time = date('F j Y, g:i:s a', $soc['evTIME']); if($soc['evREAD'] == 0) { $new = ' [b]New![/b]'; $clean .= mysql_query("UPDATE `events` SET `evREAD` = 1 WHERE `evREAD` = 0 AND `evUSER` = ".$ir['userid']." AND `evID` = ".$soc['evID']); } echo ' <tr> <td>'.$time.' '.isset($new).'</td> <td>'.$soc['evTEXT'].'</td> <td> <input type="checkbox" name="checkbox[]" value="'.$soc['evID'].'"> | '; if( isset($_GET['page']) ) { echo '[url="'.$_SERVER['PHP_SELF'].'?page='.$_GET['page'].'&del='.$soc['evID'].'"]Delete[/url]'; } else { echo '[url="'.$_SERVER['PHP_SELF'].'?del='.$soc['evID'].'"]Delete[/url]'; } echo ' </td> </tr> <tr>'; } echo ' </tr> </table> '.$pg; $clean; for($i = 0; $i <= $pages; $i++) { $next = ($i * $limit); echo '[url="'.$_SERVER['PHP_SELF'].'?page='.$next.'"]'.$i.'[/url] - '; } echo ' <input type="submit" value="Delete Selected Events"> <input name="del_all" id="del_all" type="submit" value="Delete All Events"> </form>'; if( $ir['new_events'] > 0) { mysql_query("UPDATE `users` SET `new_events` = 0 WHERE `userid` = ".$ir['userid']); } $h->endpage(); ?>   Enjoy uppated one with more to it.   UPDATED
  5. Re: [mccode v2] Events Page Updated. I see your point. And you have a reason there. But i was going to go with a way like you are using. Except in a different way and it added a , at the end each time. Here is where i originated it from to try it: www.deadlykillah.com/yubi_sucks.php And thought it would give an error. I then was fiddling around with the script and used for.. but infact forgot to take out the IN() function. Test out the yubi_sucks.php script on my website.. select a few check box's and see. And with that , being there i never wanted to cause a clash in the query. Then i thought of substr(). But unfortunatly could not get that to work since it just took all the ,'s out. Thank's for pointing that out. I will post an update with updated version now.
  6. Re: Changing Whole Header when in hospital Yeah i forgot to add the ,jail. But and agen.. why you remove the include_once?
  7. Re: [REVIEW] Crime-Network.com - Please review! It's been reviewed..  
  8. Re: [mccode] times kicked from gangs Very poorly done there crazy-t. You are not even declaring the function is sprintf!   mysql_query(sprintf("UPDATE `users` SET `timeskicked`=`timeskicked`+ '1' WHERE `userid`=`%u`",$who));
  9. Re: [mccode v2] Events Page Updated. Screenshot's:
  10. Re: [mccode v2] Events Page Updated. Please explain why it is wierd. Because as far as i know. Im counting how many tickbox's were ticked because the name of checkbox is checkbox[] which form's an array. In my sql i am using the IN() so it only verifys which id to delete. Got a better way? Please post it
  11. Re: [mccode v2] Events Page Updated. What browser you using? This all seem's to work completly fine on my end. And also the del all button work's perfectly fine also. It should start like this: Pages: - 0 - 1 - 2 - 3 - 0 being your last 10 event's. 1 being your second page. 2 being your third page. 3 being your fourth page.
  12. Re: [mccode V2] Ajax Shoutbox. [$12.00] After looking on paddy's game.. www.rapslife.com.. i find that there is no ajax inplemented in this. Im sure you would want to fix that eh iamwicked?
  13. Re: Airplanes [V2] And you said $10...
  14. Re: [mccode v2] Events Page Updated. Read carefully:   And what type of error are you having? :S
  15. Re: Changing Whole Header when in hospital Yes. Just use this:   <?php /*--------------------------------- -- MCCodes 2.0 -- By Dabomstew ---------------------------------*/ session_start(); ob_start(); if(get_magic_quotes_gpc() == 0) { die("Fatal error: MCCode cannot function without MagicQuotes GPC being turned on in PHP.INI."); } require "global_func.php"; if($_SESSION['loggedin']==0) { header("Location: login.php");exit; } $userid=$_SESSION['userid']; 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; $hospital_check = sprintf("SELECT hospital FROM users WHERE userid = %u",($userid)); $check = mysql_query($hospital_check); $hc = mysql_fetch_array($check); if($hc['hospital'] == 0) { include_once("header.php"); //Normal Header } else if($hc['hospital'] != 0) { include_once("header2.php"); //Hospital Header } else if($hc['jail'] != 0) { include_once("header3.php"); //Jail Header }
  16. Re: [mccodes V2] Donation Mod. If it put's the donator pack into the IPN.. i hope you fetching data from database in the ipn file or i could easily pay $0.01 for the highest prices pack.
  17. Re: SQL Injections Im sure you did.
  18. Re: SQL Injections Where does it say that?
  19. Re: [mccode V2] Ajax Shoutbox. [$12.00] My ajax script on other hand... If you are on one page and on another. Let's say you open the game in 2 browser's or 2 tab's. If you type in on one and shout. Go to the other tab / browser and it's already there. Instant ajax.
  20. Re: Airplanes [V2] And you were trying to sell this to me for $10? PFFT!
  21. Re: [mccode v2] Events Page Updated. Wow.. actualy a post by nyna on one of my mod thread's without her complaining about the mod itself..
  22. Re: [mccode V2] Ajax Shoutbox. [$12.00] Me and iamwicked have a thing where we always sort out our problem's. So clang keep out of it;)
  23. Re: [mccode V2] Ajax Shoutbox. [$12.00] I use: [ D ][ B ][ Time ] Username: Text You use: [ D ][ B ] Username Today at Time: Text See the resemblance?
  24. Re: [mccode V2] Ajax Shoutbox. [$12.00] Same layed out as mine :x I always added the [D] to my shoutbox's. jeez people like to copy and can not be unique now a day's.
  25. Re: [mccode V2]Loan Office $5 You know.. Altho it's a uselss mod and has already been made. You atleast got stuff to it. I would criticise. But you know what? What make's me happy is that there are new mod's being posted on the paid game modifications and not on the free game modification's. Keep it up!
×
×
  • Create New...