Jump to content
MakeWebGames

Danny696

Members
  • Posts

    2,632
  • Joined

  • Last visited

  • Days Won

    5

Everything posted by Danny696

  1. honstly ive never seen someone mess up on an if, mabey whats inside the if, but not an if
  2. Danny696

    HTML Test

    its coming out soon, in the next html, will be droped
  3. Danny696

    HTML Test

    in html 5, and it tells you this on W3schools, how do we make some text bold?
  4. Danny696

    HTML Test

    What is the biggest heading, what is the smallest
  5. Its a file uploaded to your sever, the hacker will then open the file e.g shall.txt and it will run the php/other script.
  6. Theres a mod to stop meta's
  7. Looks like the basic one just with pagnation :P
  8. <A HREF wont work in js lol
  9. That'll make a button. try this: if($r['cnt'] != 0) { ?> <script type="text/javascript"> alert("You have mail"); </script> <?php }
  10. Danny696

    YQL

    Has anyone ever tried it, a freind from school told me about it, someone from yahho tried to help him understand it. Its f'ing hard
  11. Danny696

    Right Menu

    $IP=addslashes($IP); $IP=mysql_real_escape_string($IP); $IP=strip_tags($IP);   Waste of resources -.-
  12. mabey use a session or cookie?? to hold the question id in
  13. uses jquery, test it and find out
  14. Former network, what happened?
  15. Thanks rpmb
  16. Ima try and make it
  17. Imagine this, a table with 3 headings, and the name of an item in the box below, with unequip below 3 coloums.
  18. Well, i was trying to learn javascript, in the book, it had jQuery, talked about $.get and $.post so i thought could it be usefull for equiping/unequipping quicker. So ive re-coded it and im thinking of re-coding others with parts of jQuery, i pull it from google, uses less stress on sever load. but anyway, 4 re-coded files, no tables, great mod! inv/inventory.php: <?php @include_once(DIRNAME(__FILE__) .'/globals.php'); ?> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js"></script> <?php $items = $db->query(sprintf("SELECT itmname FROM items WHERE itmid IN(%u, %u, %u)", $ir['equip_primary'], $ir['equip_secondary'], $ir['equip_armor'])); $r = $db->fetch_row($items); echo'<h3><span style="font-weight: bold;">Equipped Items</span></h3>'; echo'<table width="80%" class="table" style="text-align: center;"> <tr style="align: center;"> <th>Primary Weapon</th> <th>Secondary Weapon</th> <th>Armor</th> </tr> <tr> <td>'; if($ir['equip_primary'] != 0) { $name = @mysql_result($db->query(sprintf("SELECT itmname FROM items WHERE itmid=%u LIMIT 1", $ir['equip_primary'])), 0, 0); echo $name; echo'</td><td>'; } else { echo'Nothing Equipped.</td><td>'; } if($ir['equip_secondary'] != 0) { $name = @mysql_result($db->query(sprintf("SELECT itmname FROM items WHERE itmid=%u LIMIT 1", $ir['equip_secondary'])), 0, 0); echo $name; echo'</td><td>'; } else { echo'Nothing Equipped.</td><td>'; } if($ir['equip_armor'] != 0) { $name = @mysql_result($db->query(sprintf("SELECT itmname FROM items WHERE itmid=%u LIMIT 1", $ir['equip_armor'])), 0, 0); echo $name; echo'</td>'; } else { echo'Nothing Equipped.</td>'; } echo'</tr> <tr> <td>'; if($ir['equip_primary'] != 0) { echo'[url=""]Unequip weapon[/url]</td><td>'; } else { echo'No weapon equipped.</td><td>'; } if($ir['equip_secondary'] != 0) { echo'[url=""]Unequip weapon[/url]</td><td>'; } else { echo'No weapon equipped.</td><td>'; } if($ir['equip_armor'] != 0) { echo'[url=""]Remove armor[/url]</td>'; } else { echo'No weapon equipped.</td>'; } echo'</tr> </table>'; $itemsleft = $db->query(sprintf("SELECT iv.*,i.*,it.* ". "FROM inventory iv ". "LEFT JOIN items i ON iv.inv_itemid=i.itmid ". "LEFT JOIN itemtypes it ON i.itmtype=it.itmtypeid ". "WHERE iv.inv_userid=%u ". "ORDER BY i.itmtype ASC, i.itmname ASC", $userid)); echo'<hr />'; if($db->num_rows($itemsleft) == 0) { echo'<big>You have no items!</big>'; $h->endpage(); exit; } echo'Your items are listed below. <table width="100%" class="table" style="text-align: center;"> <tr> <th>Item name</th> <th>Sell value</th> <th>Total sell value</th> <th>Links</th> </tr>'; $name=""; while($item = $db->fetch_row($itemsleft)) { if($name != $item['itmtypename']) { $name = $item['itmtypename']; echo'<tr> <td colspan="4"><span style="font-weight: bold;">'.$name.'</span></td> </tr>'; } $a = ($item['weapon'] > 0) ? '<span style="color: red;">*</span>' : ''; $b = ($item['armor'] > 0) ? '<span style="color: green;">*</span>' : ''; $c = ($item['inv_qty'] > 1) ? 'X '.number_format($item['inv_qty']).'' : ''; echo'<tr> <td>'.$a.$b.$item['itmname'].$c.'</td> <td>'.money_formatter($item['itmsellprice']).'</td> <td>'.money_formatter($item['itmsellprice']*$item['inv_qty']).'</td> <td>[[url="iteminfo.php?ID='.$item['itmid'].'"]Info[/url]][[url="itemsend.php?ID='.$item['inv_id'].'"]Send[/url]][[url="itemsell.php?ID='.$item['inv_id'].'"]Sell[/url]][[url="imadd.php?ID='.$item['inv_id'].'"]Add to market[/url]]'; if($item['effect1_on'] || $item['effect2_on'] || $item['effect3_on']) { echo'[[url="itemuse.php?ID='.$item['inv_id'].'"]Use[/url]]'; } if($item['weapon']) { echo' [[url=""]Equip as primary[/url]][[url=""]Equip as secondary[/url]]'; } if($item['armor']) { echo' [[url=""]Equip as armor[/url]]'; } echo'</td></tr>'; } echo'<tr> <td colspan="4">[size="1"]<span style="font-weight: bold;">Note:</span><small>Items with a small red [/size] <span style="color: red;">*</span>[size="1"]next to their name can be used as weapons in combat. Items with a small green [/size]<span style="color: green;">*</span>[size="1"] next to their name can be used as armor in combat.[/size] </td> </tr> </table>'; $h->endpage() ?>   Equip_armor.php: <?php @include_once(DIRNAME(__FILE__) .'/globals.php'); error_reporting(E_ALL); //The user should never see this file, no need to use echo or print anywhere!!!!!! :D $_GET['item'] = abs(@intval($_GET['item'])); $iteminfo = $db->query(sprintf("SELECT itmname, itmid, armor FROM items WHERE itmid=%u LIMIT 1", $_GET['item'])); if($db->num_rows($iteminfo) == 0) { exit; } $i = $db->fetch_row($iteminfo); if($i['armor'] == 0) { exit; } if($ir['equip_armor']) { item_add($userid, $ir['equip_armor'], 1); } item_remove($userid, $_GET['item'], 1); $db->query(sprintf("UPDATE users SET equip_armor=%u WHERE userid=%d", $_GET['item'], $userid)); ?>   equip_weapon.php: <?php @include_once(DIRNAME(__FILE__) .'/globals.php'); error_reporting(E_ALL); //The user should never see this file, no need to use echo or print anywhere!!!!!! :D $_GET['item'] = abs(@intval($_GET['item'])); $iteminfo = $db->query(sprintf("SELECT itmname, itmid, weapon FROM items WHERE itmid=%u LIMIT 1", $_GET['item'])); if($db->num_rows($iteminfo) == 0) { exit; } $i = $db->fetch_row($iteminfo); if($i['weapon'] == 0) { exit; } if(!in_array($_GET['slot'], array('pri', 'sec'))) { exit; } if($_GET['slot'] == 'pri') { if($ir['equip_primary']) { item_add($userid, $ir['equip_primary'], 1); } item_remove($userid, $_GET['item'], 1); $db->query(sprintf("UPDATE users SET `equip_primary`=%u WHERE userid=%d", $_GET['item'], $userid)); } else if($_GET['slot'] == 'sec') { if($ir['equip_secondary']) { item_add($userid, $ir['equip_secondary'], 1); } item_remove($userid, $_GET['item'], 1); $db->query(sprintf("UPDATE users SET `equip_secondary`=%u WHERE userid=%d", $_GET['item'], $userid)); } else { exit; } ?>   Unequip.php: <?php @include_once(DIRNAME(__FILE__) .'/globals.php'); error_reporting(E_ALL); //The user should never see this file, no need to use echo or print anywhere!!!!!! :D if(!in_array($_GET['type'], array('pri', 'sec', 'arm'))) { exit; } if($_GET['type'] == 'pri') { if($ir['equip_primary'] == 0) { exit; } item_add($userid, $ir['equip_primary'], 1); $db->query(sprintf("UPDATE users SET equip_primary=0 WHERE userid=%u", $userid)); } elseif($_GET['type'] == 'sec') { if($ir['equip_secondary'] == 0) { exit; } item_add($userid, $ir['equip_secondary'], 1); $db->query(sprintf("UPDATE users SET equip_secondary=0 WHERE userid=%u", $userid)); } elseif($_GET['type'] == 'arm') { if($ir['equip_armor'] == 0) { exit; } item_add($userid, $ir['equip_armor'], 1); $db->query(sprintf("UPDATE users SET equip_armor=0 WHERE userid=%u", $userid)); } else { exit; } ?>   Simplez
  19. print ""; should really be echo'';
  20. In header, do you have a function called smenuarea??
  21. I f**ked the windows transfer part, only my sexbox kept me sain this week, just had to do a F2 on startup, change the default startup drive to the D, secondary to DVD drive 1, and install linux that way. Seems good, some things dont work tho overall, i would say windows has the edge because more programs for it.
  22. lmao mdshare, go to you room now! and i think its a good idea.
  23. hmm flash, mabey its the only one he knew could do it.
  24. java
  25. So you dont have to reload the page
×
×
  • Create New...