Jump to content

UrbanTwitch

Members
  • Posts

    19
  • Joined

  • Last visited

    Never

Everything posted by UrbanTwitch

  1. It won't let me modify my topic post.
  2. flyhonee, I accidentally forgot to put the += $total_cookeis inside the loop which is WHY it didn't work. However, your work is very thorough and very appreciated.
  3. Thanks! I just had to put the += $total_cookeis INSIDE the loop
  4. Hi, I'm trying to add what the $total_overall_cookies variable would be. Here is an image to better explain myself. I want to add the Total Cookies on the right and present it somewhere near the bottom. The $totalcookies variable is displayed inside the while loop full page php: http://www.rmb.pastebin.com/d28d8111b is there any way to add the $total_cookie variable in every while loop made? Thanks.
  5. OK so recently, I create an image upload script for fun. Here is part of the code if ((($_FILES["file"]["type"] == "image/gif") // if the file is a .gif || ($_FILES["file"]["type"] == "image/jpeg") // or if the file is a .jpg/.jpeg || ($_FILES["file"]["type"] == "image/png")) // of if the file is a .png ) As you can see it's a basic simple upload prevention but images script. HOWEVER, I tested this on vista and I got through. My extensions were all LOWERCASE such as .png, .jpg, .gif, etc. However, my friend, who uses Windows XP, tried it and he could not upload ANY images. We put in the image-file-type tag inside the error and it said he uploaded things like pjpeg and x-png. What...? So.. I guess it's different for XP and Vista?
  6. Anyone? I do not see a bump button either.
  7. I am pretty familar with PHP/MySQL/HTML/JavaScript. But I want a challenge. I want to make a simple. Tile-based RPG. I tried Googling but found no good tutorials. Something of a sample is: queville.com. Thanks.
  8. http://www.cookyx.com/leaderboards.php If you scroll through the next pages, you'll see the rank numbers stay the same while the others change. How do I fix this so it shows correctly? code: (I am using a pagination script) <?php include "config.php"; session_start(); switch($_GET ) { default: $sql = "SELECT COUNT(*) FROM `members`"; $result = mysql_query($sql, $conn) or trigger_error("SQL", E_USER_ERROR); $r = mysql_fetch_row($result); $msgs = mysql_query("SELECT * FROM `members`") or die(mysql_error()); //get all the $a = mysql_fetch_array($msgs); $numxrows = mysql_num_rows($msgs); $numrows = $numxrows; $rowsperpage = 12; $totalpages = ceil($numrows / $rowsperpage); if (isset($_GET['currentpage']) && is_numeric($_GET['currentpage'])) { $currentpage = (int) $_GET['currentpage']; } else { $currentpage = 1; } // end if if ($currentpage > $totalpages) { $currentpage = $totalpages; } // end if if ($currentpage < 1) { $currentpage = 1; } // end if $offset = ($currentpage - 1) * $rowsperpage; $sql = "SELECT * FROM `members` WHERE `userlevel` = '2' OR `userlevel` = '4' ORDER BY `cookies` DESC LIMIT $offset, $rowsperpage"; $result = mysql_query($sql, $conn) or trigger_error("SQL", E_USER_ERROR); echo "<style> tr#tb { background:#BDB8A1; color:#7A7357; font-weight:bold; } td#d { padding:5px; } </style><table align='center'><tr id='tb'><td id='d' style='width:50px;text-align:center;'>Rank</td><td id='d' style='width:120px;text-align:center;'>Username</td><td id='d' style='width:70px;text-align:center;'>Cookies</td></tr>"; //table start for hiscores $fetch = mysql_query("SELECT * FROM `members` WHERE `userlevel` = '2' OR `userlevel` = '4' ORDER BY `cookies` DESC LIMIT 0,25"); //grabs exp and orders it by - highest at top and lowest at bottom $i = 1; $class1 = 'background:#D7D3BF;color:#928C72;font-weight:bold;'; $class2 = 'background:transparent;color:#928C72;font-weight:bold;'; $class = $class1; while ($pets = mysql_fetch_assoc($result)) { echo ("<tr style='$class'><td style='width:50px;text-align:center;'>$i</td><td style='width:120px;text-align:center;'><a href='http://cookyx.com/profile/$pets[id]'>$pets[username]</a></td><td style='width:70px;text-align:center;'>$pets[cookies]</td></tr>"); //the hiscore main table $i++; if($class == $class1){ $class = $class2; }else{ $class = $class1; } } $range = 3; echo "</table><div id='normal'>"; //end table /****** build the pagination links ******/ // range of num links to show $range = 3; // if not on page 1, don't show back links if ($currentpage > 1) { // show << link to go back to page 1 echo " <a href='{$_SERVER['PHP_SELF']}?currentpage=1'><img src='http://cookyx.com/icons/resultset_first.png' border='0'></a> "; // get previous page num $prevpage = $currentpage - 1; // show < link to go back to 1 page echo " <a href='{$_SERVER['PHP_SELF']}?currentpage=$prevpage'><img src='http://cookyx.com/icons/resultset_previous.png' border='0'></a> "; } // end if // loop to show links to range of pages around current page for ($x = (($currentpage - $range) - 1); $x < (($currentpage + $range) + 1); $x++) { // if it's a valid page number... if (($x > 0) && ($x <= $totalpages)) { // if we're on current page... if ($x == $currentpage) { // 'highlight' it but don't make a link echo " [<b>$x</b>] "; // if not current page... } else { // make it a link echo " <a href='{$_SERVER['PHP_SELF']}?currentpage=$x'>$x</a> "; } // end else } // end if } // end for // if not on last page, show forward and last page links if ($currentpage != $totalpages) { // get next page $nextpage = $currentpage + 1; // echo forward link for next page echo " <a href='{$_SERVER['PHP_SELF']}?currentpage=$nextpage'><img src='http://cookyx.com/icons/resultset_next.png' border='0'></a> "; // echo forward link for lastpage echo " <a href='{$_SERVER['PHP_SELF']}?currentpage=$totalpages'><img src='http://cookyx.com/icons/resultset_last.png' border='0'></a> "; } // end if /****** end build pagination links ******/ echo "</div>"; break; } ?>
  9. Yes, DarkerAnge, that is what I want. 100% working nested quote tags. Thank you thebadbad, I will try that.
  10. Why can't I edit this topic? Anyways here it is: The link I posted will not work unless you switch forumdisplay into topic
  11. http://cookyx.com/forum.php?at=forums&action=forumdisplay&id=15&currentpage=2#post_165 If you go to the last post: You will see the fault. The does not match the top one. The code: [*quote=Dan][*quote=Dan]Reppiggggggg[/quote] oh yeah!?!?[/quote] hahahahaa See? How do I fix this problem? Here is the BBcode if you need. '#\[quote=(.*?)\](.*?)\[\/quote\]#se' turns into: "'<div style=\"padding:5px;color:#929292;background:#ECECEC url(http://i38.tinypic.com/2navi3s.png) no-repeat right;border-left:4px solid #BDBDBD;border-top:1px solid #BDBDBD;border-right:1px solid #BDBDBD;\">QUOTE ( \\1 )</div> <div style=\"padding:5px;color:#929292;background:#FBFBFB;border-left:4px solid #BDBDBD;border-bottom:1px solid #BDBDBD;border-right:1px solid #BDBDBD;\">\\2</div>'" Thanks so much, I tried many variations.
  12. Yeah, I am working on making it fluid. I will make it so the right menu matches the left. Remember, there is always room for change.
  13. ohh, well i was on my laptop last time so i couldn't see. now I see it *registers* ^__^
  14. No worries about the full path closure. How do I remove the ability to post scripts in the areas you mentioned and how did get a blank username getting passed the filter?
  15. I cannot register. Where do I put the security code?
  16. In the past few months, I've been coding. I have been making a profile system along with a gallary. If you would, please take the time to visit my site and beta test for ANY kind of bugs you see. Weather it be style, coded, or even generic bugs. Post' em. http://sodadome.com
  17. sodaDome is a site where you can share, upload, and talk soda about sodaplay models. I made this site completley (web design) on my own. Please rate the web template. :-) http://sodadome.com
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.