Jump to content
MakeWebGames

Danny696

Members
  • Posts

    2,632
  • Joined

  • Last visited

  • Days Won

    5

Everything posted by Danny696

  1. LMAO, im sure that template was like 2500% your budget
  2. I did something like that on undeadland. But it just used a div and a class.
  3. Error in your post ;)
  4. filename.php?cmd=add -.-
  5. Don't use sprintf either.
  6. IT just the same as DJK's
  7. You should probabbly use someone thats heard of mcc. :)
  8. Danny696

    News about PHP 6

    It's been cancelled.
  9. Paul; Look at your first post, you didnt get the <?php part right xD you put <php?
  10. First post updated. Now includes; Search; $h instead of headers::
  11. In staff_cities: Find: (two places) $desc=$_POST['desc']; Add after: $donator = abs(@intval($_POST['desc'])); Find: $db->query("INSERT INTO cities VALUES(NULL, '$name', '$desc', '$minlevel')"); Replace with: $db->query("INSERT INTO cities VALUES(NULL, '$name', '$desc', '$minlevel',$donator)"); Find: Minimum Level: <input type='text' name='minlevel' /> Add after: Donator only: <select name='donator'> <option value='1'>Yes</option> <option value='0'>No</option> </select> Find: $db->query("UPDATE cities SET cityminlevel=$minlevel, citydesc='$desc', cityname='$name' WHERE cityid={$_POST['id']}"); Replace with: $db->query("UPDATE cities SET cityminlevel=$minlevel, citydesc='$desc', cityname='$name', `donator`=$donator WHERE cityid={$_POST['id']}"); Find: Minimum Level: <input type='text' name='minlevel' value='{$old['cityminlevel']}' />   Donator only: <select name='donator'> <option value='1'>Yes</option> <option value='0'>No</option> </select>
  12. Oh, i prolly should shouldnt i xD
  13. Well, code php HTML, CSS, JS all to the lastest standards, make sure its all valid etc. Dont overcrowd your site with images, mabey 1 or 2 a page (excluding the header) Dont use a free host there as slow as a turtle
  14. Try This: Run this in PHPMyAdmin [mysql]ALTER TABLE `cities` ADD `donator` INT(1) NOT NULL DEFAULT 0;[/mysql] Open monorail.php Find: else { $q=$db->query("SELECT * FROM cities WHERE cityid = {$_GET['to']} AND cityminlevel <= {$ir['level']}"); if(!$db->num_rows($q)) { print "Error, this city either does not exist or you cannot go there."; } else { $db->query("UPDATE users SET money=money-1000,location={$_GET['to']} WHERE userid=$userid"); $r=$db->fetch_row($q); print "Congratulations, you paid \$1000 and travelled to {$r['cityname']} on the monorail!"; } } Replace with: else { $q=$db->query("SELECT * FROM cities WHERE cityid = {$_GET['to']} AND cityminlevel <= {$ir['level']}"); if(!$db->num_rows($q)) { print "Error, this city either does not exist or you cannot go there."; } else { $r=$db->fetch_row($q); if($r['donator'] == 1 && $ir['donatordays'] == 0) { echo'Sorry, but this is a donator only city and your not a donator.'; exit(); } $db->query("UPDATE users SET money=money-1000,location={$_GET['to']} WHERE userid=$userid"); print "Congratulations, you paid \$1000 and travelled to {$r['cityname']} on the monorail!"; } } Find: print "<table width=75% cellspacing=1 class='table'><tr style='background:gray'><th>Name</th><th>Description</th><th>Min Level</th><th></th></tr>"; Replace with: print "<table width=75% cellspacing=1 class='table'> <tr style='background:gray'> <th>Name</th> <th>Description</th> <th>Min Level</th> <th>Donator Only</th> <th></th> </tr>"; Find: print "<tr><td>{$r['cityname']}</td><td>{$r['citydesc']}</td><td>{$r['cityminlevel']}</td><td>[url='monorail.php?to={$r[']Go[/url]</td></tr>"; Replace with: print "<tr> <td>{$r['cityname']}</td> <td>{$r['citydesc']}</td> <td>{$r['cityminlevel']}</td>"; echo ($ir['donatordays'] > 0 && $r['donator'] == 1) ? '<span style="color: green;">Donator\'s only.</span>' : '<span style="color: red;">Donator\'s only.</span>'; print"<td>[url='monorail.php?to={$r[']Go[/url]</td></tr>";
  15. The edit i added should work. He only had one chat in the table, and it was making it error. My edit made sure that if there were less than 15, nothing would happen or errror :)
  16. Try this: <?php include_once(DIRNAME(__FILE__) .'/globals.php'): $count = 0; $num = $db->fetch_row($db->query("SELECT COUNT(`id`) as `numb` FROM `shout_box`;")); $amount = $num['numb']-15; if($amount < 15) { exit(); } $chats = $db->query("SELECT `id` FROM `shout_box` ORDER BY `id` ASC LIMIT ". $amount .";"); while($chat = $db->fetch_row($chats)) { $db->query("DELETE FROM `shout_box` WHERE (`id` = ". $chat['id'] ."):"); $count++; } echo $count.' rows deleted.'; ?>
  17. LMAO, big difference in codes there.
  18. This would be usefull. I may use this in an upgrade of my blog system.
  19. Are there any messages in the shoutbox?
  20. Oh oh, i would like a free session :)
  21. Very nice :)
  22. Theres a program on here i think that does that :)
  23. Add a column in the city table. Then when there traveling check it :)
  24. Return is for use in functions, i see no functions.
  25. Oh, and echos faster than print ;)
×
×
  • Create New...