Jump to content
MakeWebGames

rjddev

Members
  • Posts

    43
  • Joined

  • Last visited

Everything posted by rjddev

  1. Done :) Also your php code is hard to read on those <img> tags... To make it more readable I would do if ($fetch->weapon == "0") { echo"/images/items/noweapon.png"; } elseif ($fetch->weapon == "G17") { echo"/images/items/G17.png"; } elseif ($fetch->weapon == "SA80") { echo"/images/items/SA80.png"; } elseif ($fetch->weapon == "M249") { echo"/images/items/M249.png"; } elseif ($fetch->weapon == "M16") { echo"/images/items/M16.png"; } elseif ($fetch->weapon == "AWP") { echo"/images/items/AWP.png"; } // To if ($fetch->weapon == "0") { $weaponPath = "/images/items/noweapon.png"; } elseif ($fetch->weapon == "G17") { $weaponPath = "/images/items/G17.png"; } elseif ($fetch->weapon == "SA80") { $weaponPath = "/images/items/SA80.png"; } elseif ($fetch->weapon == "M249") { $weaponPath = "/images/items/M249.png"; } elseif ($fetch->weapon == "M16") { $weaponPath = "/images/items/M16.png"; } elseif ($fetch->weapon == "AWP") { $weaponPath = "/images/items/AWP.png"; } // Then load them like this <img src="<?php echo $weaponPath;?>" />
  2. If like this [ATTACH=CONFIG]952[/ATTACH] Then this should do the job <?php ?> <!DOCTYPE HTML> <html> <head> <title>Table Test</title> <style type="text/css"> </style> </head> <body> <table width="98%" border="0" cellpadding="0" cellspacing="0" > <tr> <table width="100%" align="right" cellpadding="0" cellspacing="0"> <tr> <td align="right">This table should be right</td> </tr> </table> <table width="296" height="145" border="0" align="left" cellpadding="0" cellspacing="0" background="box.jpg"> <tr><td align="left"><table width="96%" border="0" align="center" cellpadding="0" cellspacing="0"> <tr> <td style="padding:2px;" width="100" height="100" class="item_cont" align="center"><img src=" <?php if ($fetch->protection == "0") { echo"/images/items/noprotection.png"; } elseif ($fetch->protection == "Helmet") { echo"/images/items/Helmet.png"; } elseif ($fetch->protection == "StabVest") { echo"/images/items/StabVest.png"; } elseif ($fetch->protection == "RiotSheild") { echo"/images/items/RiotSheild.png"; } elseif ($fetch->protection == "Safehouse") { echo"/images/items/Safehouse.png"; } elseif ($fetch->protection == "ArmyBunker") { echo"/images/items/ArmyBunker.png"; } elseif ($fetch->protection == "BodyGuard") { echo"/images/items/BodyGuard.png"; } ?> " width="100" height="100"></div></td> <td style="padding:2px;" width="100" height="100" class="item_cont" align="center"><img src=" <?php if ($fetch->weapon == "0") { echo"/images/items/noweapon.png"; } elseif ($fetch->weapon == "G17") { echo"/images/items/G17.png"; } elseif ($fetch->weapon == "SA80") { echo"/images/items/SA80.png"; } elseif ($fetch->weapon == "M249") { echo"/images/items/M249.png"; } elseif ($fetch->weapon == "M16") { echo"/images/items/M16.png"; } elseif ($fetch->weapon == "AWP") { echo"/images/items/AWP.png"; } ?> " width="100" height="100"></div></td> </tr> <tr> <td style="padding:2px;" width="90" class="item_cont" align="center"> <?php if ($fetch->protection == "0") { echo"No Protection"; } else { echo"$fetch->protection"; } ?> </div></td> <td style="padding:2px;" width="90" class="item_cont" align="center"> <?php if ($fetch->weapon == "0") { echo"No Weapon"; } else { echo"$fetch->weapon"; } ?> </div></td> </table></td></tr> </table> <div id="box"><img src=""></div></td> </tr></table></td> <td align="center" valign="top"><center><img width="1000" src="Banner.png"></div></td> </tr></table></td> </tr> </body> </html> </body> </html>
  3. In which section do you want the right table? at the top or?
  4. First of all, why not add a captcha to your register page, This way he won't be able to spam your game. Secondly, if this kid is going to try advertise other games, heres a function how to block... replacewords.function.php function ReplaceWords($str, $bad_words, $replace_str){ if (!is_array($bad_words)){ $bad_words = explode(',', $bad_words); } for ($x=0; $x < count($bad_words); $x++){ $fix = isset($bad_words[$x]) ? $bad_words[$x] : ''; $_replace_str = $replace_str; if (strlen($replace_str)==1){ $_replace_str = str_pad($_replace_str, strlen($fix), $replace_str); } $str = preg_replace('/'.$fix.'/i', $_replace_str, $str); } return $str; }   Place this somewhere in your files such as sending messages, chat etc. $banned_sites = array( 'games', 'are', 'listed', 'like', 'this' ); $replacement_text = "banned-site"; $row['msgtext'] = ReplaceWords($row['msgtext'], $banned_sites, $replacement_text);   Enjoy :)
  5. So recently i've been programming a multiple database connection file which lets you connect to 2 databases (or more, if you add new arrays for the db). Although its alot of code writing.. Is there a easier way to do this? The code looks like this: <?php error_reporting(E_ALL); // Database info through array $config = array( "database1" => array( "host" => "localhost", "user" => "root", "pass" => "usbw", "data" => "database2" ), "database2" => array( "host" => "localhost", "user" => "root", "pass" => "usbw", "data" => "database2" ) ); // Connect $connectDB1 = mysql_connect($config['database1']['host'], $config['database1']['user'], $config['database1']['pass']) or die(mysql_error()); $connectDB2 = mysql_connect($config['database2']['host'], $config['database2']['user'], $config['database2']['pass']) or die(mysql_error()); // Select Databases $selectDB1 = mysql_select_db($config['database1']['data'], $connectDB1) or die(mysql_error()); $selectDB2 = mysql_select_db($config['database2']['data'], $connectDB2) or die(mysql_error()); // Example to run queries $queryDB1 = mysql_query("SELECT * FROM `yourtable`", $selectDB1) or die(mysql_error()); $queryDB2 = mysql_query("SELECT * FROM `yourtable`", $selectDB2) or die(mysql_error()); ?>   The reason I have used this into an array, is that I like to have all website config into one single file, such as stylesheets, javascripts like this: <?php error_reporting(E_ALL); // Database info through array $config = array( "database1" => array( "host" => "localhost", "user" => "root", "pass" => "usbw", "data" => "database2" ), "database2" => array( "host" => "localhost", "user" => "root", "pass" => "usbw", "data" => "database2" ), "stylesheets" => array( "website" => 'websitestyle.css' ), "javascripts" => array( "jquery" => "http://code.jquery.com/jquery.min.js", "website" => "website.js" ) ); // Connect $connectDB1 = mysql_connect($config['database1']['host'], $config['database1']['user'], $config['database1']['pass']) or die(mysql_error()); $connectDB2 = mysql_connect($config['database2']['host'], $config['database2']['user'], $config['database2']['pass']) or die(mysql_error()); // Select Databases $selectDB1 = mysql_select_db($config['database1']['data'], $connectDB1) or die(mysql_error()); $selectDB2 = mysql_select_db($config['database2']['data'], $connectDB2) or die(mysql_error()); // Example to run queries $queryDB1 = mysql_query("SELECT * FROM yourtable", $selectDB1) or die(mysql_error()); $queryDB2 = mysql_query("SELECT * FROM yourtable", $selectDB2) or die(mysql_error()); ?>   So you will be able to do this when loading a stylesheet / javascript file <link rel="stylesheet" href="<?php echo $config['stylesheets']['website']; ?>" type="text/css" /> <script src="<?php echo $config['javascripts']['jquery']; ?>" type="text/javascript"></script> <script src="<?php echo $config['javascripts']['website']; ?>" type="text/javascript"></script>   and so on .. :) If you need it, feel free to use it as well ;)
  6. Netbeans ftw! :D
  7. Looks pretty awesome! Good luck with the project :)
  8. Looks pretty cool!
  9. The fact that he's not banned already makes me think, Admins do not care about this? (While ALOT of proof already has been given). Personally myself, I would of banned the scammer. :confused:
  10. Me too, but not so much as I don't have that much free time to develop something for "fun". :D
  11. So recently, me and a buddy have found a few glitches in the GRPG engine. One that could some damage to your game's economy. The stores such as Weapon Store, Armour Store, Shoes Store are vulnerable for mySQL injections. I'm not going to tell how, but we ended up having 1,000,000 items in our inventory. Also another thing is that the sessions in the GRPG Engine, are NOT secured. And are vulnerable for session hijacking. So we were wondering, would it be worth to work on this engine and get it all secured? Not sure if many game owners still use it, but it is a pretty nice engine once the bugs/glitches are fixed out.
  12. Mind putting up some screenshots, or a demo? :)
  13. http://rjddev.orgfree.com/ I've got a login/register system ready. Now need to code the inside of the game. This will only be an experiment I will be working on when I have time to do so. Thanks to Dave & Dayo! :)
×
×
  • Create New...