Jump to content
MakeWebGames

Uridium

Members
  • Posts

    2,657
  • Joined

  • Last visited

  • Days Won

    74

Everything posted by Uridium

  1. Robert please keep to one thread....
  2. Upgrade Vote and refer would have looked better side by side thus creating less scrolling for the user when page reloads..
  3. 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
  4. 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
  5. 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 :)
  6. Look at how the Page count is used on the userlist.php and hange the SELECT to match for mails...
  7. England UK (Firefox, Chrome, Explorer) and yes I use XP too :)
  8. 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
  9. 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
  10. 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..
  11. 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....
  12. 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...
  13. Uridium

    Voice Overs

    Not sure if this will help you but its SPEACH to TEXT you type in what you want it to say and it says it has a decent amount of voices aswell. http://www2.research.att.com/~ttsweb/tts/demo.php
  14. Havent had chance to tet it CURT but very nice..
  15. That is quite true but if we deleted them they would only re-appear somewhere else. Im not quoting regards scam posts im quoting regards Danny's use of words to other users.
  16. Dont dis-resepct other users Apocalyptical asked a genuine question and you gave him/her a Rude response iv'e seen quite a few posts like this from you Danny696 if i see any more i'll just kill your account
  17. Its always hard to try sell something thats impossibe to show. What i mean is if you were to get someone on MSN and give them an idea of how it looks they could just go write their own from your ideas..
  18. I'm 41 its time i should be slowing down lol
  19. I really cant see you getting any help for Raven mods on here concidering its a knock off copy of MCC so i think im going to let this thread goto bed and close it :)
  20. If you dont mind me having cpanel access to your site i can fix some of these issues for you at no cost...
  21. so really your just asking for your money back ? 4.95 USD = 3.01201 GBP is their hosting that bad or is this their a genuine reason for the sale.
  22. http://makewebgames.io/showthread.php/39913-Well-i-am-back?highlight=ibrahim Yep seems you were/are both friends...
  23. he hasnt got the best REP on here at moment..
  24. Come to think of it I havent seen much of Paul since the launch of Redux, As an Engine goes its bloody brilliant but i have to say its quite annoying to add things to it which is its only downfall in my opinion.
  25. Im not sure but i did do a script that would backup SQLS to a folder on your FTP will have to dig it out...
×
×
  • Create New...