Jump to content
MakeWebGames

Uridium

Members
  • Posts

    2,701
  • Joined

  • Last visited

  • Days Won

    88

Everything posted by Uridium

  1. I dont think its the Installer thats at fault i think a better Readme file would help people with common errors and how to eliminate them exmple when setting up via xampp and the user doesnt have a password for the dbase setup the installer wont install
  2. spud i suggest changing max-width and max-height to just width and height it dont seem to work on IE
  3. Uridium

    Help me!!!

    wow people still use 600 x 800 screen res lol
  4. Ive got it to work but its putting a page within a page
  5. whilst i like cronus's work i did find a few flaws on this script mainly the lending of items i couldnt understand how this >>> at 60 lines long..   if($gangdata['gangPRESIDENT']==$userid && $i['armoryLENT']==0) { print " [<a href='ganggive.php?ID={$i['itmid']}&ITEMID={$i['armoryID']}'>Give To Member</a>]"; } if($gangdata['gangVICEPRES']==$userid && $i['armoryLENT']==0) { print " [<a href='ganggive.php?ID={$i['itmid']}&ITEMID={$i['armoryID']}'>Give To Member</a>]"; } if($gangdata['gangPRESIDENT']==$userid && $i['itmtypeid']==3 && $i['armoryLENT']==0) { print" [<a href='lenditem.php?ID={$i['itmid']}&ITEMID={$i['armoryID']}'>Lend To Member</a>]"; } if($gangdata['gangPRESIDENT']==$userid && $i['itmtypeid']==4 && $i['armoryLENT']==0) { print" [<a href='lenditem.php?ID={$i['itmid']}&ITEMID={$i['armoryID']}'>Lend To Member</a>]"; } if($gangdata['gangPRESIDENT']==$userid && $i['itmtypeid']==6 && $i['armoryLENT']==0) { print" [<a href='lenditem.php?ID={$i['itmid']}&ITEMID={$i['armoryID']}'>Lend To Member</a>]"; } if($gangdata['gangPRESIDENT']==$userid && $i['itmtypeid']==7 && $i['armoryLENT']==0) { print" [<a href='lenditem.php?ID={$i['itmid']}&ITEMID={$i['armoryID']}'>Lend To Member</a>]"; } if($gangdata['gangVICEPRES']==$userid && $i['itmtypeid']==3 && $i['armoryLENT']==0) { print" [<a href='lenditem.php?ID={$i['itmid']}&ITEMID={$i['armoryID']}'>Lend To Member</a>]"; } if($gangdata['gangVICEPRES']==$userid && $i['itmtypeid']==4 && $i['armoryLENT']==0) { print" [<a href='lenditem.php?ID={$i['itmid']}&ITEMID={$i['armoryID']}'>Lend To Member</a>]"; } if($gangdata['gangVICEPRES']==$userid && $i['itmtypeid']==6 && $i['armoryLENT']==0) { print" [<a href='lenditem.php?ID={$i['itmid']}&ITEMID={$i['armoryID']}'>Lend To Member</a>]"; } if($gangdata['gangVICEPRES']==$userid && $i['itmtypeid']==7 && $i['armoryLENT']==0) { print" [<a href='lenditem.php?ID={$i['itmid']}&ITEMID={$i['armoryID']}'>Lend To Member</a>]"; }   couldnt have just been like this at 8 lines doing the same job as the above..   if($gangdata['gangPRESIDENT']==$userid || $gangdata['gangVICEPRES']==$userid && $i['armoryLENT']==0) { print " [<a href='ganggive.php?ID={$i['itmid']}&ITEMID={$i['armoryID']}'>Give To Member</a>]"; } if($gangdata['gangPRESIDENT']==$userid || $gangdata['gangVICEPRES']==$userid && $i['itmtypeid']==3 OR 4 OR 5 OR 6 OR 7 && $i['armoryLENT']==0) { print" [<a href='lenditem.php?ID={$i['itmid']}&ITEMID={$i['armoryID']}'>Lend To Member</a>]"; }   Also for those using the Quantify items you'll find this script doesnt take the item back from the user..... this is due to the recall.php using an insert and as soon as a user Quantifies thier items the script can no longer grab the ID of the item loaned... so heres a fix.. change mysql_query("DELETE FROM inventory WHERE inv_itemid={$_GET['ITEMID']} AND inv_userid={$user['userid']} LIMIT 1;",$c); to mysql_query("UPDATE inventory SET inv_qty=inv_qty-1 WHERE inv_itemid={$_GET['ITEMID']} AND inv_userid={$user['userid']} LIMIT 1;",$c);
  6. Just one thing if non donators get 20 and donators get 20 wouldnt that cause a bit of friction between them both. id make 10 hits per non donator and 20 for donator... so on cron day just add..   $db->query("UPDATE users SET attacklimit=20 WHERE donatordays > 1");   And Non Donators   $db->query("UPDATE users SET attacklimit=10 WHERE donatordays = 0");
  7. Thread Now Closed...
  8. BIGINT (64) should cure your worries :)
  9. Original message removed by illusions
  10. Maybe its cos im testing on Localhost i'll upload to my test site and see if i get the same error as you....
  11. Strange it worked flawlessly when i was testing it...
  12. wildhickoks.com named after wild bill hickok
  13. Closed due to other thread being created
  14. Robert please keep to one thread....
  15. Upgrade Vote and refer would have looked better side by side thus creating less scrolling for the user when page reloads..
  16. Heres a script so users dont lose Emails once target reaches alotted page count in this case 15... add to global_func.php function pager($rpp, $count, $href, $opts = array()) { $pages = ceil($count / $rpp); if (!$opts["lastpagedefault"]) $pagedefault = 0; else { $pagedefault = floor(($count - 1) / $rpp); if ($pagedefault < 0) $pagedefault = 0; } if (isset($_GET["page"])) { $page = 0 + $_GET["page"]; if ($page < 0) $page = $pagedefault; } else $page = $pagedefault; $pager = ""; $mp = $pages - 1; $as = "<b>« Prev</b>"; if ($page >= 1) { $pager .= "<a href=\"{$href}page=" . ($page - 1) . "\">"; $pager .= $as; $pager .= "</a>"; } else $pager .= $as; $pager .= " "; $as = "<b>Next »</b>"; if ($page < $mp && $mp >= 0) { $pager .= "<a href=\"{$href}page=" . ($page + 1) . "\">"; $pager .= $as; $pager .= "</a>"; } else $pager .= $as; if ($count) { $pagerarr = array(); $dotted = 0; $dotspace = 3; $dotend = $pages - $dotspace; $curdotend = $page - $dotspace; $curdotstart = $page + $dotspace; for ($i = 0; $i < $pages; $i++) { if (($i >= $dotspace && $i <= $curdotend) || ($i >= $curdotstart && $i < $dotend)) { if (!$dotted) $pagerarr[] = "..."; $dotted = 1; continue; } $dotted = 0; $start = $i * $rpp + 1; $end = $start + $rpp - 1; if ($end > $count) $end = $count; //$text = "$start - $end"; $text = ($i + 1); if ($i != $page) $pagerarr[] = "<a href=\"{$href}page=$i\"><b>$text</b></a>"; else $pagerarr[] = "<b>$text</b>"; } $pagerstr = join(" | ", $pagerarr); $pagertop = "<p style=\"text-align: center;\">$pager<br />$pagerstr</p>\n"; $pagerbottom = "<p style=\"text-align: center;\">$pagerstr<br />$pager</p>\n"; } else { $pagertop = "<p style=\"text-align: center;\">$pager</p>\n"; $pagerbottom = $pagertop; } $start = $page * $rpp; return array($pagertop, $pagerbottom, "LIMIT $start,$rpp"); } Now on your mailbox.php if you havent made any edits to function mail_inbox() then overwrite with this one. function mail_inbox() { global $db,$ir,$c,$userid,$h; print<<<END <SCRIPT><!-- HIDE function setCheckboxes(the_form, do_check) { var elts = (typeof(document.forms[the_form].elements['ID[]']) != 'undefined') ? document.forms[the_form].elements['ID[]'] : (typeof(document.forms[the_form].elements['ID[]']) != 'undefined') ? document.forms[the_form].elements['ID[]'] : document.forms[the_form].elements['ID[]']; var elts_cnt = (typeof(elts.length) != 'undefined') ? elts.length : 0; if (elts_cnt) { for (var i = 0; i < elts_cnt; i++) { elts[i].checked = do_check; } // end for } else { elts.checked = do_check; } // end if... else return true; } // STOP HIDING --></SCRIPT> END; $res = mysql_query("SELECT COUNT(*) FROM mail WHERE mail_to=$userid") or die(mysql_error()); $row = mysql_fetch_array($res); $count = $row[0]; $addparam = ""; list($pagertop, $pagerbottom, $limit) = pager(15, $count, "mailbox.php?" . $addparam); $query = "SELECT m.*,u.* FROM mail m LEFT JOIN users u ON m.mail_from=u.userid WHERE m.mail_to=$userid ORDER BY mail_time DESC $limit"; $res = mysql_query($query) or die(mysql_error()); $i=0; echo "<p style=\"text-align: center;\">Mail Sorted By Newest.</p> $pagertop"; echo "<table style=\"margin: 0 auto 0 auto; border: solid #292929 0px; width: 90%;\"> <tr class=tablecellheader><td><p style=\"margin: 0 0 0 0; font-weight: bold; color: #ffffff;\">Subject</p></td> <td><p style=\"margin: 0 0 0 0; font-weight: bold; color: #ffffff;\">From</p></td> <td><p style=\"margin: 0 0 0 0; font-weight: bold; color: #ffffff;\">Status</p></td> <td><p style=\"margin: 0 0 0 0; font-weight: bold; color: #ffffff;\">Received</p></td> <td><p style=\"margin: 0 0 0 0; font-weight: bold; color: #ffffff;\">Read</p></td> <td><p style=\"margin: 0 0 0 0; font-weight: bold; color: #ffffff;\">Delete</p></td></tr>"; while ($r = mysql_fetch_array($res)) { if (!$i) { $bg = "#ffffff"; $i = 1; } elseif ($i) { $bg = "#ececec"; $i = 0; } if ($r[mail_subject] == "") { echo "<tr style=\"background-color: $bg;\"><td><p style=\"margin: 0 0 0 0;\">NO SUBJECT</p></td> <td><p style=\"margin: 0 0 0 0;\"><a href=\"viewuser.php?u=$r[userid]\">".$r[username]."</a></p></td>"; } else echo "<tr style=\"background-color: $bg;\"><td><p style=\"margin: 0 0 0 0;\">$r[mail_subject]</p></td> <td><p style=\"margin: 0 0 0 0;\"><a href=\"viewuser.php?u=$r[userid]\">".$r[username]."</a></p></td>"; if($res['mail_read'] == 1) { echo"<td><p style=\"margin: 0 0 0 0;\"><font color=green>Opened</font></p></td>"; } else { echo"<td><p style=\"margin: 0 0 0 0;\"><font color=red>Un-Opened</font></p></td>"; } echo"<td><p style=\"margin: 0 0 0 0;\">".$sent=date('F j, Y, g:i:s a',$r['mail_time'])."</p></td> <td><p style=\"margin: 0 0 0 0;\"><a href='mailbox.php?action=read&ID={$r['mail_id']}'>View</a></p></td> <td><p style=\"margin: 0 0 0 0;\"><a href='mailbox.php?action=delete&ID={$r['mail_id']}'> Delete </a><form name='masssell' method=post action=mailbox.php?action=del><input type='checkbox' name='del$i' value='yes'> <input type='hidden' name='id$i' value='{$r['mail_id']}'></td>"; $i++; //$fm=$r['mail_subject']; } echo "<br />"; print<<<END <tr> <td colspan=5 align=center> <input name=sellmass type=submit id=sellmass value='Delete selected'><a href=# onClick="setCheckboxes('masssell',true); return false;'><br> Check All</A> | <a href=# onClick="setCheckboxes('masssell',false); return false;">Uncheck All</A> </form> </td> </tr> </table> END; echo "$pagerbottom"; } add a bit of CSS to header which is .tablecellheader{ background-color:#0de0de; } On this script change list($pagertop, $pagerbottom, $limit) = pager(15, $count, "mailbox.php?" . $addparam); the 15 to the number of mails to show per page
  17. This should help you workd on MCv2 add to global_func.php   function pager($rpp, $count, $href, $opts = array()) { $pages = ceil($count / $rpp); if (!$opts["lastpagedefault"]) $pagedefault = 0; else { $pagedefault = floor(($count - 1) / $rpp); if ($pagedefault < 0) $pagedefault = 0; } if (isset($_GET["page"])) { $page = 0 + $_GET["page"]; if ($page < 0) $page = $pagedefault; } else $page = $pagedefault; $pager = ""; $mp = $pages - 1; $as = "<b>« Prev</b>"; if ($page >= 1) { $pager .= "<a href=\"{$href}page=" . ($page - 1) . "\">"; $pager .= $as; $pager .= "</a>"; } else $pager .= $as; $pager .= " "; $as = "<b>Next »</b>"; if ($page < $mp && $mp >= 0) { $pager .= "<a href=\"{$href}page=" . ($page + 1) . "\">"; $pager .= $as; $pager .= "</a>"; } else $pager .= $as; if ($count) { $pagerarr = array(); $dotted = 0; $dotspace = 3; $dotend = $pages - $dotspace; $curdotend = $page - $dotspace; $curdotstart = $page + $dotspace; for ($i = 0; $i < $pages; $i++) { if (($i >= $dotspace && $i <= $curdotend) || ($i >= $curdotstart && $i < $dotend)) { if (!$dotted) $pagerarr[] = "..."; $dotted = 1; continue; } $dotted = 0; $start = $i * $rpp + 1; $end = $start + $rpp - 1; if ($end > $count) $end = $count; //$text = "$start - $end"; $text = ($i + 1); if ($i != $page) $pagerarr[] = "<a href=\"{$href}page=$i\"><b>$text</b></a>"; else $pagerarr[] = "<b>$text</b>"; } $pagerstr = join(" | ", $pagerarr); $pagertop = "<p style=\"text-align: center;\">$pager<br />$pagerstr</p>\n"; $pagerbottom = "<p style=\"text-align: center;\">$pagerstr<br />$pager</p>\n"; } else { $pagertop = "<p style=\"text-align: center;\">$pager</p>\n"; $pagerbottom = $pagertop; } $start = $page * $rpp; return array($pagertop, $pagerbottom, "LIMIT $start,$rpp"); }   Now on your mailbox.php if you havent made any edits to function mail_inbox() then overwrite with this one.   function mail_inbox() { global $db,$ir,$c,$userid,$h; print<<<END <SCRIPT><!-- HIDE function setCheckboxes(the_form, do_check) { var elts = (typeof(document.forms[the_form].elements['ID[]']) != 'undefined') ? document.forms[the_form].elements['ID[]'] : (typeof(document.forms[the_form].elements['ID[]']) != 'undefined') ? document.forms[the_form].elements['ID[]'] : document.forms[the_form].elements['ID[]']; var elts_cnt = (typeof(elts.length) != 'undefined') ? elts.length : 0; if (elts_cnt) { for (var i = 0; i < elts_cnt; i++) { elts[i].checked = do_check; } // end for } else { elts.checked = do_check; } // end if... else return true; } // STOP HIDING --></SCRIPT> END; $res = mysql_query("SELECT COUNT(*) FROM mail WHERE mail_to=$userid") or die(mysql_error()); $row = mysql_fetch_array($res); $count = $row[0]; $addparam = ""; list($pagertop, $pagerbottom, $limit) = pager(2, $count, "mailbox.php?" . $addparam); $query = "SELECT m.*,u.* FROM mail m LEFT JOIN users u ON m.mail_from=u.userid WHERE m.mail_to=$userid ORDER BY mail_time DESC $limit"; $res = mysql_query($query) or die(mysql_error()); $i=0; echo "<p style=\"text-align: center;\">Mail Sorted By Newest.</p> $pagertop"; echo "<table style=\"margin: 0 auto 0 auto; border: solid #292929 0px; width: 90%;\"> <tr class=tablecellheader><td><p style=\"margin: 0 0 0 0; font-weight: bold; color: #ffffff;\">Subject</p></td> <td><p style=\"margin: 0 0 0 0; font-weight: bold; color: #ffffff;\">From</p></td> <td><p style=\"margin: 0 0 0 0; font-weight: bold; color: #ffffff;\">Status</p></td> <td><p style=\"margin: 0 0 0 0; font-weight: bold; color: #ffffff;\">Received</p></td> <td><p style=\"margin: 0 0 0 0; font-weight: bold; color: #ffffff;\">Read</p></td> <td><p style=\"margin: 0 0 0 0; font-weight: bold; color: #ffffff;\">Delete</p></td></tr>"; while ($r = mysql_fetch_array($res)) { if (!$i) { $bg = "#ffffff"; $i = 1; } elseif ($i) { $bg = "#ececec"; $i = 0; } if ($r[mail_subject] == "") { echo "<tr style=\"background-color: $bg;\"><td><p style=\"margin: 0 0 0 0;\">NO SUBJECT</p></td> <td><p style=\"margin: 0 0 0 0;\"><a href=\"viewuser.php?u=$r[userid]\">".$r[username]."</a></p></td>"; } else echo "<tr style=\"background-color: $bg;\"><td><p style=\"margin: 0 0 0 0;\">$r[mail_subject]</p></td> <td><p style=\"margin: 0 0 0 0;\"><a href=\"viewuser.php?u=$r[userid]\">".$r[username]."</a></p></td>"; if($r['mail_read'] == 1) { echo"<td><p style=\"margin: 0 0 0 0;\"><font color=green>Opened</font></p></td>"; } else { echo"<td><p style=\"margin: 0 0 0 0;\"><font color=red>Un-Opened</font></p></td>"; } echo"<td><p style=\"margin: 0 0 0 0;\">".$sent=date('F j, Y, g:i:s a',$r['mail_time'])."</p></td> <td><p style=\"margin: 0 0 0 0;\"><a href='mailbox.php?action=read&ID={$r['mail_id']}'>View</a></p></td> <td><p style=\"margin: 0 0 0 0;\"><a href='mailbox.php?action=delete&ID={$r['mail_id']}'> Delete </a><form name='masssell' method=post action=mailbox.php?action=del><input type='checkbox' name='del$i' value='yes'> <input type='hidden' name='id$i' value='{$r['mail_id']}'></td>"; $i++; //$fm=$r['mail_subject']; } echo "<br />"; print<<<END <tr> <td colspan=5 align=center> <input name=sellmass type=submit id=sellmass value='Delete selected'><a href=# onClick="setCheckboxes('masssell',true); return false;'><br> Check All</A> | <a href=# onClick="setCheckboxes('masssell',false); return false;">Uncheck All</A> </form> </td> </tr> </table> END; echo "$pagerbottom"; }   add a bit of CSS to header which is .tablecellheader{ background-color:#0de0de; } On this script change list($pagertop, $pagerbottom, $limit) = pager(2, $count, "mailbox.php?" . $addparam); the 2 to the number of mails to show per page
  18. Uridium

    The Grid

    I joined your game and have to say its very clever. Can see it becoming quite addictive for some players weldone Oldbard :)
  19. Look at how the Page count is used on the userlist.php and hange the SELECT to match for mails...
  20. England UK (Firefox, Chrome, Explorer) and yes I use XP too :)
  21. on line 116 add } and delete the } from line 170 You was nearly there you just forgot to close out the userdata function... also on line 61 change $IP = ($_SERVER['HTTP_X_FORWARDED_FOR']) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR']; to $IP = $_SERVER['REMOTE_ADDR']; This should prevent Firefox scripting
  22. Its getting even worse There's been a fight in the biscuit tin. A lad called Rocky, hit a Penguin over the head with a Club, tied him to a Wagon Wheel with a Blue Ribbon and made his Breakaway in a Taxi. Police say Rocky was last seen just After Eight in Maryland with a Ginger Nut as an accomplice only known to the police as Rich T.They didn't leave a crumb of evidence, so the Jammie Dodger might get away with it
  23. Its not about 1 persons life it probably started off that way for the first 5 mins then escelated due to other problems in the UK, example resession, dole, price increases. Silly thing is after all this damage the rioters are casuing its going to be us public that foot the bill to pay for it all..
  24. This seems to be an Internet Explorer bug copy and pasting makes the code look wrapped even when adding to notepad++. My reccomendation would be either use firefox as this works fine OR click on REPLY WITH QUOTE on the post with the code and copy it that way that also seems to work fine....
  25. Uridium

    Voice Overs

    @Runthis yep your right i finally got round to reading their TOS. says you can place it on your PC without any hassle but to place on a website could land you in hot water...
×
×
  • Create New...