Jump to content

eaglelegend

Members
  • Posts

    353
  • Joined

  • Last visited

    Never

Everything posted by eaglelegend

  1. ah sorry new one is html and and old one is PHP.
  2. Hi, I am trying to integrate my newly bought design into my old site design - obviously replacing the old design. However every time I try to do this there is a parse error coming up saying "unexpected end". I hope someone can help me do this thanks - btw this are the original files and not the intergrated file - I am hoping someone else could do it for me since I seem to be unable to do it. New design code; <html> <head> <title>Eagle Legend</title> </head> <body background="bg.gif" bgproperties="fixed"> <table width="1024" height="768" border="0" cellpadding="0" cellspacing="0"> <tr> <td colspan="3" width="1024" height="302"><img src="1col2.gif"></td> </tr> <tr> <td colspan="1" width="266" valign="top"><img name="Image20" src="2.gif" width="266" height="440" border="0" usemap="#Image2" alt="" /></td> <td colspan="1" width="667" valign="top" align="left" bgcolor="white"> <!-- Text goes below --> Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Etiam ut sapien. Aliquam ipsum. Fusce ac sem. Sed erat. Curabitur quam. In eros. Vestibulum lacus risus, tincidunt ut, ultrices lacinia, viverra quis, lacus. Sed id massa. Integer sodales leo eu nunc. Proin scelerisque, enim non tempus condimentum, dui augue laoreet velit, in luctus lectus purus eu lorem. Cras mi justo, vestibulum sit amet, fringilla in, pulvinar euismod, turpis. Suspendisse enim. Suspendisse iaculis viverra ipsum. Etiam at metus. Nulla iaculis neque eget nulla elementum venenatis. Aenean dictum. <BR><BR> Cras consequat metus ac mi. Aenean posuere metus eu diam. Mauris massa. Praesent mauris tellus, fringilla sed, congue vel, congue sit amet, risus. Praesent porta imperdiet nunc. Mauris fermentum imperdiet nisl. Phasellus et diam ut tortor pharetra consequat. Vestibulum pulvinar purus gravida lacus. Morbi eget orci et arcu ultrices rhoncus. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Curabitur turpis. Donec molestie convallis lectus. Mauris ultricies ullamcorper sapien. <BR><BR> In faucibus aliquet massa. Cras fermentum semper nisl. Nulla auctor, nunc sed dapibus pulvinar, libero risus viverra diam, eget vehicula ipsum risus vitae risus. Pellentesque varius semper risus. In metus arcu, tincidunt in, adipiscing nec, condimentum et, augue. Nunc fermentum, dolor ac vulputate luctus, urna eros blandit leo, vitae gravida nunc ipsum ut lorem. Curabitur fermentum. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Suspendisse potenti. In hac habitasse platea dictumst. <!-- End Text --> </td> <td colspan="1" width="91"></td> </tr> <tr> <td colspan="3" width="1024" height="8"><img src="3.gif"></td> </tr> <tr> <td colspan="3" width="1024" height="33" background="4.gif"><div id = "footer"><center> <font face="verdana" size="1">(c)2008 Eagle Legend. All Rights Reserved. <a href="tos.php">Terms/Rules</a> <a href="privacy.php">Privacy</a></font></center></div></td> </tr> </table> <map name="Image2"> <area shape="rect" coords="121,99,201,122" href="home.php" alt=""> <area shape="rect" coords="119,123,203,147" href="index.php" alt=""> <area shape="rect" coords="117,148,206,169" href="games.php" alt=""> <area shape="rect" coords="120,171,206,192" href="mail.php" alt=""> <area shape="rect" coords="115,193,211,215" href="forums.php" alt=""> <area shape="rect" coords="116,217,212,239" href="club.php" alt=""> <area shape="rect" coords="106,239,225,262" href="mystuff.php" alt=""> </map> </body> </html> Old design code; <?php if ($rank >= 5) { $admin_line .= "<p align=center>Admin Stuff:<br><a class=menu href=# onClick=\"window.open('$base_url/admin/admin_remote.php?game=$game','remote','toolbar=no,location=no,status=no,menubar=no,scrollbars=no,resizable=no,width=200,height=60')\">Mute User</a><br><a class=menu href=$base_url/warn_user.php?game=$game>Warn User</a>"; } if ($rank >= 7) { $admin_line .= "<br><a href=$base_url/admin/admin.php?game=$game class=menu>Admin Section</a>"; } if ($rank == null) { $updateLine2 = "<p><a href=register.php?game=$game><img src=images/nav_register.jpg width=113 height=101 border=0></a></p>"; } if ($premium == null) { $menu = " <p><map name=\"Image2\"> <area shape=\"rect\" coords=\"121,99,201,122\" href=\"$base_url/index.php?game=$game\" alt=\"Go back to the main page of Eagle Legend!\" title=\"Go back to the main page of Eagle Legend!\"> <area shape=\"rect\" coords=\"119,123,203,147\" href=\"$base_url/index.php?game=$game\" alt=\"Go back to the main page of Eagle Legend!\" title=\"Go back to the main page of Eagle Legend!\"> <area shape=\"rect\" coords=\"117,148,206,169\" href=\"$base_url/games.php?game=$game\" alt=\"Click here to play our games!\" title=\"Click here to play our games!\"> <area shape=\"rect\" coords=\"120,171,206,192\" href=\"$base_url/mail.php?game=$game\" alt=\"Click here to read, write and delete your mail!\" title=\"Click here to read, write and delete your mail!\"> <area shape=\"rect\" coords=\"115,193,211,215\" href=\"$base_url/forums.php?game=$game\" alt=\"Click here to chat in our forums!\" title=\"Click here to chat in our forums!\"> <area shape=\"rect\" coords=\"116,217,212,239\" href=\"$base_url/club.php?game=$game\" alt=\"Click here to view and create your own club(s)!\" title=\"Click here to view and create your own club(s)!\"> <area shape=\"rect\" coords=\"106,239,225,262\" href=\"$base_url/mystuff.php?game=$game\" alt=\"Click here to edit your account details!\" title=\"Click here to edit your account details!\"> </map></p>"; $userInfo = "<p><font size=\"-1\"> Username: <a href=$base_url/update_profile.php?game=$game class=menu>$display_name</a><br> Hunger: <a href=$base_url/myitems.php?game=$game class=menu><font size=-1>$hungerLevel</a><br> $pointVar: <a href=$base_url/bank.php?game=$game>$points</a><br>"; $searchBox = "<form action=$base_url/prompt.pro.php?game=$game method=post><p align=center><input type=text name=command value=\"\" size=8><br><input type=submit name=submit value=\"Search\"></p></form>"; $copywrite = " <tr> <td colspan=\"3\" width=\"1024\" height=\"33\" background=\"4.gif\"><div id = \"footer\"><center> <font face=\"verdana\" size=\"1\">The Legend time is: $timestamp2. © 2008 Eagle Legend. All Rights Reserved. <a href=\"$base_url/tos.php class=bottom\">Terms/Rules</a> <a href=\"$base_url/privacy.php class=bottom\">Privacy</a></font></center></div></td> </tr>"; $openHTML = " <html> <head> <title>$gameName2 - $page_title</title> </head> <body background=\"bg.gif\" bgproperties=\"fixed\"> <table width=\"1024\" height=\"768\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\"> <tr> <td colspan=\"3\" width=\"1024\" height=\"302\"><img src=\"1col2.gif\"></td> </tr> <tr> <td colspan=\"1\" width=\"266\" valign=\"top\"><img name=\"Image20\" src=\"2.gif\" width=\"266\" height=\"440\" border=\"0\" usemap=\"#Image2\" alt=\"\" /></td> <td colspan=\"1\" width=\"667\" valign=\"top\" align=\"left\" bgcolor=\"white\"> <!-- Text goes below --> Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Etiam ut sapien. Aliquam ipsum. Fusce ac sem. Sed erat. Curabitur quam. In eros. Vestibulum lacus risus, tincidunt ut, ultrices lacinia, viverra quis, lacus. Sed id massa. Integer sodales leo eu nunc. Proin scelerisque, enim non tempus condimentum, dui augue laoreet velit, in luctus lectus purus eu lorem. Cras mi justo, vestibulum sit amet, fringilla in, pulvinar euismod, turpis. Suspendisse enim. Suspendisse iaculis viverra ipsum. Etiam at metus. Nulla iaculis neque eget nulla elementum venenatis. Aenean dictum. <BR><BR> Cras consequat metus ac mi. Aenean posuere metus eu diam. Mauris massa. Praesent mauris tellus, fringilla sed, congue vel, congue sit amet, risus. Praesent porta imperdiet nunc. Mauris fermentum imperdiet nisl. Phasellus et diam ut tortor pharetra consequat. Vestibulum pulvinar purus gravida lacus. Morbi eget orci et arcu ultrices rhoncus. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Curabitur turpis. Donec molestie convallis lectus. Mauris ultricies ullamcorper sapien. <BR><BR> In faucibus aliquet massa. Cras fermentum semper nisl. Nulla auctor, nunc sed dapibus pulvinar, libero risus viverra diam, eget vehicula ipsum risus vitae risus. Pellentesque varius semper risus. In metus arcu, tincidunt in, adipiscing nec, condimentum et, augue. Nunc fermentum, dolor ac vulputate luctus, urna eros blandit leo, vitae gravida nunc ipsum ut lorem. Curabitur fermentum. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Suspendisse potenti. In hac habitasse platea dictumst. <!-- End Text --> "; $closeHTML = " </td> <td colspan=\"1\" width=\"91\"></td> </tr> <tr> <td colspan=\"3\" width=\"1024\" height=\"8\"><img src=\"3.gif\"></td> </tr> $copywrite </table> $menu </body> </html> "; ?>
  3. The code seems to work fine, however I think I have found an issiue, although what users search for comes up, it dont seem to keep the users logged in ie. if you search home, you will come accross the main page, yet if you click on it, it logs you out or if you search or click on other links through the java search engine, it sayhs "you cannot access this page, you must be logged in" etc. I am wondering if the java needs to use any kind of info to tell it that the user is logged in, and allow the site to let you on.
  4. Great stuff!, it works, thanks mate!
  5. ok I have just quickly cleared it and reloaded it, and apparently an error came up "Searchbox is not defined"
  6. basically it is a search engine, when you click ok to search, nothing happens. in internet explorer when you click ok/search it opens up underneith it with what the person was looking for
  7. http://webredeveloper.com/error%20console.jpg is what shown up on the error console any idea?
  8. Ugh, I have this great search engine, created using Java, however the issiue I am having it is not working with Firefox (unsure if it works with anything else) but I know for definately that it works on IE any advise? var SearchWord; var FindWord; var result = 0; var Final = new Array(); var WritePage; var ShowPage; var search = new Array(); var site = new Array(); // This is where you can edit the colors and the font along with some other things in order for the script to fit your site. var websitetitle="Title"; var websiteurl="site"; var objectbg="#dddddd"; var tableborder="#000000"; var tablewidth="75%"; var resultbg="#eeeeee"; var headerbg="#eeeeee"; var objecttext="#000000"; var headertitle="#000080"; var searchtext="#000080"; var searchborder="#000000"; var searchbg="#ffffff"; var searchsitetext="#000000"; var buttonbg="#c0c0c0"; var buttontext="#000000"; var buttonborder="#000000"; var resulttext="#000000"; var fortext="#000000"; var font="Verdana"; var linecolor="#808080"; document.write("<div align='center'><center>\n" + "<table border='0' cellpadding='5' cellspacing='0' width='" + tablewidth + "' height='50' style='border: 1px solid " + tableborder + "' bgcolor='" + headerbg + "'>\n" + "<tr>\n" + "<td width='50%'><font face='" + font + "' color='" + headertitle + "'><big><strong><big>" + websitetitle + "</big></strong></big></font></td>\n" + "<td width='50%'><div align='right'><table border='0' cellpadding='0' cellspacing='0'>\n" + "<tr>\n" + "<td colspan='3'><strong><small><small><font face='" + font + "'>Search " + websiteurl + ": </font></small></small></strong></td>\n" + "</tr>\n" + "<tr>\n" + "<td><input type='text' name='searchbox' size='20' style='font-family: " + font + "; font-size: xx-small; background-color: " + searchbg + "; color: " + searchtext + "; font-weight: bold; border-left: 2px solid " + searchborder + "; border-right: 1px solid " + searchborder + "; border-top: 2px solid " + searchborder + "; border-bottom: 1px solid " + searchborder + "'></td>\n" + "<td width='3'></td>\n" + "<td><input type='button' value='Ok' onclick='SearchSite(searchbox.value.toLowerCase())' style='font-family: " + font + "; font-size: xx-small; background-color: " + buttonbg + "; color: " + buttontext + "; font-weight: bold; border: 1px solid " + buttonborder + "'></td>\n" + "</tr>\n" + "</table>\n" + "</div></td>\n" + "</tr>\n" + "</table>\n" + "</center></div><div id='searchresult'></div>") // This is where you add your own links and keywords. As for now you are limited to 15 keywords. and the number(#) in //brackets must begin with 0 and count from there. When creating your keywords you do not have to have exactly 15 words you //may have less in the event that you do have less then make sure you add extra "|" to the end as if there were 15 words. // search[#]="word1|word2|word3|word4|word5|word6|word7|word8|word9|word10|word11|word12|word13|word14|word15" // site[#]="title|url|description" search[0]="home|main|ablazen|ablazen.com|art|programming|software|tutorials|web|design|||||" site[0]="Ablazen Art & Software : Enter|http://www.ablazen.com|Art, programming, and web design all in one place. What more could you ask for?" search[1]="home|main|ablazen|ablazen.com|art|programming|software|tutorials|web|design|||||" site[1]="Ablazen Art & Software : A4|http://www.ablazen.com/index2.htm|Art, programming, and web design all in one place. What more could you ask for?" search[2]="resources|links|affiliates|webpages|web|sites|pages||||||||" site[2]="Resources|http://www.ablazen.com/links|Check out links to other great sites where you can find stuff similar to whats on the Ablazen site." search[3]="tshirts|shirts|t|gear|ablazen|stuff|buy|t-shirt|t-shirts|shirt|||||" site[3]="Ablazen Gear!|http://www.cafepress.com/ablzn_gear1|Buy Ablazen gear and show your support for Ablazen.com, help fund the site so we can keep bringing you cool programs, tutorials, and art." search[4]="forums|bulletin|boards|message|question|join|sign|up|help|questions|answers|members|member|forum|answer" site[4]="Ablazen Forums|http://www.ablazen.com/cgi-bin/bbs/ikonboard.cgi|Join the Ablazen forums and get all the answers to your questions." search[5]="site|map|list|site|||||||||||" site[5]="Site Map|http://www.ablazen.com/sitemap|View a complete list of everything on the Ablazen site." search[6]="contact|tainted|e|mail|e-mail|send|message|tainted@ablazen.com|||||||" site[6]="Contact tainted@ablazen.com|http://www.ablazen.com/contact/index.htm?tainted@ablazen.com|Contact tainted@ablazen.com." search[7]="contact|help|e|mail|e-mail|send|message|help@ablazen.com|questions|answers|answer|question|||" site[7]="Contact help@ablazen.com|http://www.ablazen.com/contact/index.htm?help@ablazen.com|Contact help@ablazen.com and ask questions about programs, tutorials, or just about anything else." search[8]="contact|webmaster|e|mail|e-mail|send|message|webmaster@ablazen.com|questions|answers|answer|question|web|master|site" site[8]="Contact webmaster@ablazen.com|http://www.ablazen.com/contact/index.htm?webmaster@ablazen.com|Contact webmaster@ablazen.com and ask any questions that may pertain to the site, report errors, broken links, make suggestions." search[9]="affiliates|link|exchange|trade|links|affiliate|advertise||||||||" site[9]="Become an Affiliate|http://www.ablazen.com/affiliates.htm|Submit your site to become one of the Ablazen.com affiliates." function SearchSite(wrd){ for (i = 0; i < search.length; i++){ for (a = 0; a < 14; a++){ // If you need to use more keywords for each site change the number to one less than how many you need in this case we use 15 keywords so we use the number 14 FindWord = search[i].split("|")[a] for (n = 0; n < wrd.length; n++){ SearchWord = wrd.split(" ")[n] if(FindWord == SearchWord){ Final[i] = "<tr>\n<td bgcolor='" + objectbg + "' colspan='2'><font face='" + font + "' size='2'><a href='" + site[i].split("|")[1] + "' target='_top'><b>" + site[i].split("|")[0] + "</b></a> : " + site[i].split("|")[1] + "<br><hr size='1' color='" + linecolor + "'><font face='" + font + "' size='1'>" + site[i].split("|")[2] + "</font></td>\n</tr>\n"; } } } } WritePage = "<center><table width='" + tablewidth + "' cellpadding='5' cellspacing='1' bgcolor='" + tableborder + "'><tr>\n<td bgcolor='" + resultbg + "'>\n<table border='0' width='100%' cellpadding='0' cellspacing='0'>\n<tr>\n<td><p align='left'><font face='" + font + "' size='2'>Searched " + websiteurl + " for <b>" + wrd + "</b>.</font></p></td>\n<td><p align='right'><font face='" + font + "' size='2'><span id='pagecount'></span></font></p></td>\n</tr></table></td></tr>" for (i = 0; i < Final.length; i++){ if(Final[i] != null) { WritePage= WritePage + Final[i]; result=result+1; } } WritePage = WritePage + "</table></center>" searchresult.innerHTML=WritePage; pagecount.innerHTML = "Results <b>" + result + "</b> of <b>" + site.length + "</b> pages." SearchWord = null; FindWord = null; result = 0; for(i = 0; i < search.length; i++){ Final[i] = null; } }
  9. Hi I am soon to be opening up a photo uploading site, I wanted some advice/help on good ideas that can make it safe it. cannot be database injected etc.
  10. it is to display if the club dont exsit shows "This club dont exist"
  11. ok I deleted die now, however it is still redirecting; <?php /* Club include (club.inc.php) */ $clubid = $_GET['clubid']; mysql_query("UPDATE clubs2 SET hits = hits + 1 WHERE id = '$clubid' AND game = '$game'") or die (mysql_error()); $q = "SELECT * FROM clubs2 WHERE id = '$clubid' AND game = '$game'";$rs = mysql_query($q) or die("Problem with the query: $q<br>" . mysql_error());$getclub = mysql_fetch_assoc($rs); if (mysql_num_rows($getclub) == 0) { header(error("club.php?game=$game","This is not a real club.")); } $getmemberdata = fetch("SELECT * FROM club_members2 WHERE club = '$clubid' AND user = '$userid' AND game = '$game'"); $getmemberdata4 = fetch("SELECT * FROM club_members2 WHERE user = '$userid' AND game = '$game'"); if (!$getmemberdata[id]) { $getmemberdata[position] = 0; } $clubrank = $getmemberdata[position]; if ($clubrank == 0) { $position = "Visitor, <a href=$base_url/club_join.pro.php?game=$game&clubid=$clubid><font color=$topAndBottomText>join</font></a>"; } if ($clubrank == 1) { $position = "Member, <a href=$base_url/club_leave.pro.php?game=$game&clubid=$clubid onClick=\"if ( !confirm ('Are you sure you want to leave this club?') ) { return false; }\"><font color=$topAndBottomText>leave</font></a>"; } if ($clubrank == 2) { $position = "Moderator, <a href=$base_url/club_leave.pro.php?game=$game&clubid=$clubid onClick=\"if ( !confirm ('Are you sure you want to leave this club?') ) { return false; }\"><font color=$topAndBottomText>leave</font></a>"; } if ($clubrank == 3) { $position = "Admin"; $club_admin_line = "<br><a href=club_admin.php?game=$game&clubid=$clubid>Admin Page</a>"; } if ($clubrank < $clubrank_check) { die(header(error("clubs.php?game=$game","You do not have access to this page."))); } $num_members = mysql_num_rows(mysql_query("SELECT id FROM club_members2 WHERE club = '$clubid' AND game = '$game'")); echo '<pre>' . var_export($getclub,true) . '</pre>'; $date_created = date("M j, Y",$getclub['datecreated']); $owner = fetch("SELECT display_name FROM members2 WHERE id = '$getclub[owner]' AND game = '$game'"); $numPosts = mysql_num_rows(mysql_query("SELECT id FROM club_forums2 WHERE club = '$clubid'")); $topmenu = " <center><table width=95% bgcolor=\"$tableOutline\" cellpadding=0 cellspacing=1><tr bgcolor=\"$topAndBottomBG\" width=100%><td><p><font color=$topAndBottomText><b>$getclub[name]</b> <i>owned by $owner[display_name]</i></font></p></td><td width=150><p><font color=$topAndBottomText>$display_name ($position)</font></p></td></tr><tr height=100 bgcolor=\"$reallyLight\"><TD colspan=2><p align=center><b><i>$getclub[motto]</i></b></p><center><table bgcolor=\"$tableOutline\" cellpadding=0 cellspacing=1 width=375><tr bgcolor=\"$topAndBottomBG\"><td width=50%><p align=center><b><font color=$topAndBottomText>Stats</font></b></p></td><td width=50%><p align=center><b><font color=$topAndBottomText>Links</font></b></p></td></tr><tr bgcolor=\"$reallyLight\"><td valign=top> <p>Members: <a href=club_members.php?game=$game&clubid=$clubid>$num_members</a><br> Created: $date_created<Br> Hits: $getclub[hits]</p> </td><td valign=top> <p><a href=$base_url/club.php?game=$game&clubid=$clubid>Home</a><br> <a href=$base_url/club_forums.php?game=$game&clubid=$clubid>Chat Boards</a> ($numPosts Posts) $club_admin_line</p></td> </tr></table><Br></center></td></tr></table>"; $startClub = "<Br>$topmenu<br><table width=95% bgcolor=\"$tableOutline\" cellpadding=0 cellspacing=1><tr bgcolor=\"$topAndBottomBG\"><td><p align=left class=white><b>$page_heading</b></p></td></tr><tr bgcolor=\"$maincellColor\"><td>"; $endClub = "</td></tr></table></center><br>"; ?>
  12. Hi, on my club.php file, I am getting this when viewed on my site, through firefox. Redirect Loop Redirection limit for this URL exceeded. Unable to load the requested page. This may be caused by cookies that are blocked. The browser has stopped trying to retrieve the requested item. The site is redirecting the request in a way that will never complete. * Have you disabled or blocked cookies required by this site? * NOTE: If accepting the site's cookies does not resolve the problem, it is probably a server configuration issue and not your computer. code as below; <?php /* Club include (club.inc.php) */ $clubid = $_GET['clubid']; mysql_query("UPDATE clubs2 SET hits = hits + 1 WHERE id = '$clubid' AND game = '$game'") or die (mysql_error()); $q = "SELECT * FROM clubs2 WHERE id = '$clubid' AND game = '$game'";$rs = mysql_query($q) or die("Problem with the query: $q<br>" . mysql_error());$getclub = mysql_fetch_assoc($rs); if (mysql_num_rows($getclub) == 0) { die(header(error("club.php?game=$game","This is not a real club."))); } $getmemberdata = fetch("SELECT * FROM club_members2 WHERE club = '$clubid' AND user = '$userid' AND game = '$game'"); $getmemberdata4 = fetch("SELECT * FROM club_members2 WHERE user = '$userid' AND game = '$game'"); if (!$getmemberdata[id]) { $getmemberdata[position] = 0; } $clubrank = $getmemberdata[position]; if ($clubrank == 0) { $position = "Visitor, <a href=$base_url/club_join.pro.php?game=$game&clubid=$clubid><font color=$topAndBottomText>join</font></a>"; } if ($clubrank == 1) { $position = "Member, <a href=$base_url/club_leave.pro.php?game=$game&clubid=$clubid onClick=\"if ( !confirm ('Are you sure you want to leave this club?') ) { return false; }\"><font color=$topAndBottomText>leave</font></a>"; } if ($clubrank == 2) { $position = "Moderator, <a href=$base_url/club_leave.pro.php?game=$game&clubid=$clubid onClick=\"if ( !confirm ('Are you sure you want to leave this club?') ) { return false; }\"><font color=$topAndBottomText>leave</font></a>"; } if ($clubrank == 3) { $position = "Admin"; $club_admin_line = "<br><a href=club_admin.php?game=$game&clubid=$clubid>Admin Page</a>"; } if ($clubrank < $clubrank_check) { die(header(error("clubs.php?game=$game","You do not have access to this page."))); } $num_members = mysql_num_rows(mysql_query("SELECT id FROM club_members2 WHERE club = '$clubid' AND game = '$game'")); echo '<pre>' . var_export($getclub,true) . '</pre>'; $date_created = date("M j, Y",$getclub['datecreated']); $owner = fetch("SELECT display_name FROM members2 WHERE id = '$getclub[owner]' AND game = '$game'"); $numPosts = mysql_num_rows(mysql_query("SELECT id FROM club_forums2 WHERE club = '$clubid'")); $topmenu = " <center><table width=95% bgcolor=\"$tableOutline\" cellpadding=0 cellspacing=1><tr bgcolor=\"$topAndBottomBG\" width=100%><td><p><font color=$topAndBottomText><b>$getclub[name]</b> <i>owned by $owner[display_name]</i></font></p></td><td width=150><p><font color=$topAndBottomText>$display_name ($position)</font></p></td></tr><tr height=100 bgcolor=\"$reallyLight\"><TD colspan=2><p align=center><b><i>$getclub[motto]</i></b></p><center><table bgcolor=\"$tableOutline\" cellpadding=0 cellspacing=1 width=375><tr bgcolor=\"$topAndBottomBG\"><td width=50%><p align=center><b><font color=$topAndBottomText>Stats</font></b></p></td><td width=50%><p align=center><b><font color=$topAndBottomText>Links</font></b></p></td></tr><tr bgcolor=\"$reallyLight\"><td valign=top> <p>Members: <a href=club_members.php?game=$game&clubid=$clubid>$num_members</a><br> Created: $date_created<Br> Hits: $getclub[hits]</p> </td><td valign=top> <p><a href=$base_url/club.php?game=$game&clubid=$clubid>Home</a><br> <a href=$base_url/club_forums.php?game=$game&clubid=$clubid>Chat Boards</a> ($numPosts Posts) $club_admin_line</p></td> </tr></table><Br></center></td></tr></table>"; $startClub = "<Br>$topmenu<br><table width=95% bgcolor=\"$tableOutline\" cellpadding=0 cellspacing=1><tr bgcolor=\"$topAndBottomBG\"><td><p align=left class=white><b>$page_heading</b></p></td></tr><tr bgcolor=\"$maincellColor\"><td>"; $endClub = "</td></tr></table></center><br>"; ?>
  13. Hi, I am currently wanting to use paypal to "subscribe" users to my site, however I am not sure how I can "safetly" upgrade (or downgrade users if they cancel or dont pay) so if I had a php file with UPDATE member SET upgrade 1/0 (1 = is premium 0 = not) without people like "passing on" the link to other users and them getting premium for free? Mark
  14. <?php /* Club include (club.inc.php) */ $clubid = $_GET['clubid']; mysql_query("UPDATE clubs2 SET hits = hits + 1 WHERE id = '$clubid' AND game = '$game'") or die (mysql_error()); $q = "SELECT * FROM clubs2 WHERE id = '$clubid' AND game = '$game'"; $rs = mysql_query($q) or die("Problem with the query: $q<br>" . mysql_error()); $getclub = mysql_fetch_assoc($rs); if (mysql_num_rows($getclub) == 0) { die(header(error("club.php?game=$game","This is not a real club."))); } $getmemberdata = fetch("SELECT * FROM club_members2 WHERE club = '$clubid' AND user = '$userid' AND game = '$game'"); $getmemberdata4 = fetch("SELECT * FROM club_members2 WHERE user = '$userid' AND game = '$game'"); if (!$getmemberdata[id]) { $getmemberdata[position] = 0; } $clubrank = $getmemberdata[position]; if ($clubrank == 0) { $position = "Visitor, <a href=$base_url/club_join.pro.php?game=$game&clubid=$clubid><font color=$topAndBottomText>join</font></a>"; } if ($clubrank == 1) { $position = "Member, <a href=$base_url/club_leave.pro.php?game=$game&clubid=$clubid onClick=\"if ( !confirm ('Are you sure you want to leave this club?') ) { return false; }\"><font color=$topAndBottomText>leave</font></a>"; } if ($clubrank == 2) { $position = "Moderator, <a href=$base_url/club_leave.pro.php?game=$game&clubid=$clubid onClick=\"if ( !confirm ('Are you sure you want to leave this club?') ) { return false; }\"><font color=$topAndBottomText>leave</font></a>"; } if ($clubrank == 3) { $position = "Admin"; $club_admin_line = "<br><a href=club_admin.php?game=$game&clubid=$clubid>Admin Page</a>"; } if ($clubrank < $clubrank_check) { die(header(error("clubs.php?game=$game","You do not have access to this page."))); } $num_members = mysql_num_rows(mysql_query("SELECT id FROM club_members2 WHERE club = '$clubid' AND game = '$game'")); echo '<pre>' . var_export($getclub,true) . '</pre>'; $date_created = date("M j, Y",$getclub['datecreated']); $owner = fetch("SELECT display_name FROM members2 WHERE id = '$getclub[owner]' AND game = '$game'"); $numPosts = mysql_num_rows(mysql_query("SELECT id FROM club_forums2 WHERE club = '$clubid'")); $topmenu = " <center><table width=95% bgcolor=\"$tableOutline\" cellpadding=0 cellspacing=1><tr bgcolor=\"$topAndBottomBG\" width=100%><td><p><font color=$topAndBottomText><b>$getclub[name]</b> <i>owned by $owner[display_name]</i></font></p></td><td width=150><p><font color=$topAndBottomText>$display_name ($position)</font></p></td></tr><tr height=100 bgcolor=\"$reallyLight\"><TD colspan=2><p align=center><b><i>$getclub[motto]</i></b></p><center><table bgcolor=\"$tableOutline\" cellpadding=0 cellspacing=1 width=375><tr bgcolor=\"$topAndBottomBG\"><td width=50%><p align=center><b><font color=$topAndBottomText>Stats</font></b></p></td><td width=50%><p align=center><b><font color=$topAndBottomText>Links</font></b></p></td></tr><tr bgcolor=\"$reallyLight\"><td valign=top> <p>Members: <a href=club_members.php?game=$game&clubid=$clubid>$num_members</a><br> Created: $date_created<Br> Hits: $getclub[hits]</p> </td><td valign=top> <p><a href=$base_url/club.php?game=$game&clubid=$clubid>Home</a><br> <a href=$base_url/club_forums.php?game=$game&clubid=$clubid>Chat Boards</a> ($numPosts Posts) $club_admin_line</p></td> </tr></table><Br></center></td></tr></table>"; $startClub = "<Br>$topmenu<br><table width=95% bgcolor=\"$tableOutline\" cellpadding=0 cellspacing=1><tr bgcolor=\"$topAndBottomBG\"><td><p align=left class=white><b>$page_heading</b></p></td></tr><tr bgcolor=\"$maincellColor\"><td>"; $endClub = "</td></tr></table></center><br>"; ?> ok, I just tried the "this is not a real club one" one without the header and one without the die, however without the die it loops - like it is doing with the current code. however without header it just comes up "Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/webredev/public_html/eaglelegend/club.inc.php on line 12 Location: club.php?game=1&error=This+is+not+a+real+club." and well, if you want, I could give you access to the database - to check that out,if you need.
  15. thanks for that - that got rid of the redirect, however the testcode you gavwe me still states null and the date is still that 1969 date. The error is basically goes on the URL like error+that+club+dont+exsist and also it posts it on the page that they are viewing - if it dont exsist - I very much suggest you visit the sites yourself, or join up so you can actually see what I am...
  16. Thanks - The problem I have now it is saying "Redirect loop"; <?php /* Club include (club.inc.php) */ $clubid = $_GET['clubid']; mysql_query("UPDATE clubs2 SET hits = hits + 1 WHERE id = '$clubid' AND game = '$game'") or die (mysql_error()); $q = "SELECT * FROM clubs2 WHERE id = '$clubid' AND game = '$game'"; $rs = mysql_query($q) or die("Problem with the query: $q<br>" . mysql_error()); $getclub = mysql_fetch_assoc($rs); if (mysql_num_rows($getclub) == 0) { die(header(error("club.php?game=$game","This is not a real club."))); } $getmemberdata = fetch("SELECT * FROM club_members2 WHERE club = '$clubid' AND user = '$userid' AND game = '$game'"); $getmemberdata4 = fetch("SELECT * FROM club_members2 WHERE user = '$userid' AND game = '$game'"); if (!$getmemberdata[id]) { $getmemberdata[position] = 0; } $clubrank = $getmemberdata[position]; if ($clubrank == 0) { $position = "Visitor, <a href=$base_url/club_join.pro.php?game=$game&clubid=$clubid><font color=$topAndBottomText>join</font></a>"; } if ($clubrank == 1) { $position = "Member, <a href=$base_url/club_leave.pro.php?game=$game&clubid=$clubid onClick=\"if ( !confirm ('Are you sure you want to leave this club?') ) { return false; }\"><font color=$topAndBottomText>leave</font></a>"; } if ($clubrank == 2) { $position = "Moderator, <a href=$base_url/club_leave.pro.php?game=$game&clubid=$clubid onClick=\"if ( !confirm ('Are you sure you want to leave this club?') ) { return false; }\"><font color=$topAndBottomText>leave</font></a>"; } if ($clubrank == 3) { $position = "Admin"; $club_admin_line = "<br><a href=club_admin.php?game=$game&clubid=$clubid>Admin Page</a>"; } if ($clubrank < $clubrank_check) { die(header(error("clubs.php?game=$game","You do not have access to this page."))); } $num_members = mysql_num_rows(mysql_query("SELECT id FROM club_members2 WHERE club = '$clubid' AND game = '$game'")); echo '<pre>' . var_export($getclub,true) . '</pre>'; $date_created = date("M j, Y",$getclub['datecreated']); $owner = fetch("SELECT display_name FROM members2 WHERE id = '$getclub[owner]' AND game = '$game'"); $numPosts = mysql_num_rows(mysql_query("SELECT id FROM club_forums2 WHERE club = '$clubid'")); $topmenu = " <center><table width=95% bgcolor=\"$tableOutline\" cellpadding=0 cellspacing=1><tr bgcolor=\"$topAndBottomBG\" width=100%><td><p><font color=$topAndBottomText><b>$getclub[name]</b> <i>owned by $owner[display_name]</i></font></p></td><td width=150><p><font color=$topAndBottomText>$display_name ($position)</font></p></td></tr><tr height=100 bgcolor=\"$reallyLight\"><TD colspan=2><p align=center><b><i>$getclub[motto]</i></b></p><center><table bgcolor=\"$tableOutline\" cellpadding=0 cellspacing=1 width=375><tr bgcolor=\"$topAndBottomBG\"><td width=50%><p align=center><b><font color=$topAndBottomText>Stats</font></b></p></td><td width=50%><p align=center><b><font color=$topAndBottomText>Links</font></b></p></td></tr><tr bgcolor=\"$reallyLight\"><td valign=top> <p>Members: <a href=club_members.php?game=$game&clubid=$clubid>$num_members</a><br> Created: $date_created<Br> Hits: $getclub[hits]</p> </td><td valign=top> <p><a href=$base_url/club.php?game=$game&clubid=$clubid>Home</a><br> <a href=$base_url/club_forums.php?game=$game&clubid=$clubid>Chat Boards</a> ($numPosts Posts) $club_admin_line</p></td> </tr></table><Br></center></td></tr></table>"; $startClub = "<Br>$topmenu<br><table width=95% bgcolor=\"$tableOutline\" cellpadding=0 cellspacing=1><tr bgcolor=\"$topAndBottomBG\"><td><p align=left class=white><b>$page_heading</b></p></td></tr><tr bgcolor=\"$maincellColor\"><td>"; $endClub = "</td></tr></table></center><br>"; ?>
  17. after putting that on - this came up -Parse error: syntax error, unexpected T_VARIABLE, expecting ',' or ';' in /home/webredev/public_html/eaglelegend/club.inc.php on line 50 I put ; at the end of the new bit of code you have added - and now at the top of the page shows "NULL"
  18. int(10) unsigned is the "type" in the mysql database.
  19. <?php /* Club include (club.inc.php) */ $clubid = $_GET['clubid']; mysql_query("UPDATE clubs2 SET hits = hits + 1 WHERE id = '$clubid' AND game = '$game'") or die (mysql_error()); $getclub = mysql_query("SELECT * FROM clubs2 WHERE id = '$clubid' AND game = '$game'") or die (mysql_error()); if (mysql_num_rows($getclub) == 0) { die(header(error("club.php?game=$game","This is not a real club."))); } $getmemberdata = fetch("SELECT * FROM club_members2 WHERE club = '$clubid' AND user = '$userid' AND game = '$game'"); $getmemberdata4 = fetch("SELECT * FROM club_members2 WHERE user = '$userid' AND game = '$game'"); if (!$getmemberdata[id]) { $getmemberdata[position] = 0; } $clubrank = $getmemberdata[position]; if ($clubrank == 0) { $position = "Visitor, <a href=$base_url/club_join.pro.php?game=$game&clubid=$clubid><font color=$topAndBottomText>join</font></a>"; } if ($clubrank == 1) { $position = "Member, <a href=$base_url/club_leave.pro.php?game=$game&clubid=$clubid onClick=\"if ( !confirm ('Are you sure you want to leave this club?') ) { return false; }\"><font color=$topAndBottomText>leave</font></a>"; } if ($clubrank == 2) { $position = "Moderator, <a href=$base_url/club_leave.pro.php?game=$game&clubid=$clubid onClick=\"if ( !confirm ('Are you sure you want to leave this club?') ) { return false; }\"><font color=$topAndBottomText>leave</font></a>"; } if ($clubrank == 3) { $position = "Admin"; $club_admin_line = "<br><a href=club_admin.php?game=$game&clubid=$clubid>Admin Page</a>"; } if ($clubrank < $clubrank_check) { die(header(error("clubs.php?game=$game","You do not have access to this page."))); } $num_members = mysql_num_rows(mysql_query("SELECT id FROM club_members2 WHERE club = '$clubid' AND game = '$game'")); $date_created = date("M j, Y",strtotime($getclub['datecreated'])); $owner = fetch("SELECT display_name FROM members2 WHERE id = '$getclub[owner]' AND game = '$game'"); $numPosts = mysql_num_rows(mysql_query("SELECT id FROM club_forums2 WHERE club = '$clubid'")); $topmenu = " <center><table width=95% bgcolor=\"$tableOutline\" cellpadding=0 cellspacing=1><tr bgcolor=\"$topAndBottomBG\" width=100%><td><p><font color=$topAndBottomText><b>$getclub[name]</b> <i>owned by $owner[display_name]</i></font></p></td><td width=150><p><font color=$topAndBottomText>$display_name ($position)</font></p></td></tr><tr height=100 bgcolor=\"$reallyLight\"><TD colspan=2><p align=center><b><i>$getclub[motto]</i></b></p><center><table bgcolor=\"$tableOutline\" cellpadding=0 cellspacing=1 width=375><tr bgcolor=\"$topAndBottomBG\"><td width=50%><p align=center><b><font color=$topAndBottomText>Stats</font></b></p></td><td width=50%><p align=center><b><font color=$topAndBottomText>Links</font></b></p></td></tr><tr bgcolor=\"$reallyLight\"><td valign=top> <p>Members: <a href=club_members.php?game=$game&clubid=$clubid>$num_members</a><br> Created: $date_created<Br> Hits: $getclub[hits]</p> </td><td valign=top> <p><a href=$base_url/club.php?game=$game&clubid=$clubid>Home</a><br> <a href=$base_url/club_forums.php?game=$game&clubid=$clubid>Chat Boards</a> ($numPosts Posts) $club_admin_line</p></td> </tr></table><Br></center></td></tr></table>"; $startClub = "<Br>$topmenu<br><table width=95% bgcolor=\"$tableOutline\" cellpadding=0 cellspacing=1><tr bgcolor=\"$topAndBottomBG\"><td><p align=left class=white><b>$page_heading</b></p></td></tr><tr bgcolor=\"$maincellColor\"><td>"; $endClub = "</td></tr></table></center><br>"; ?> This includes the modification you suggested. (club.inc.php - include file for clubs)
  20. Dec 31, 1969 however its the same date every club :s
  21. Sorry - still having issiues, and no one is helping me - sorry to be a pain :S
  22. OK, last attempt. It's your database and presumably you can view what's in it, not guess. Notice that you've clearly told us what format you're using for date. Notice that you've given us two different answers to that question. So, take a deep breath, take a careful look and tell us without reservation which it is - and please note that MM -DD-YYYY is not the same as MM-DD-YYYY. In case it isn't obvious yet, the best date format to use in your database is the MySQL date type - it uses the ISO standard (and absolutely unambiguous) YYYY-MM-DD form. You can easily perform all sorts of manipulations very simply once you have a real date in a real format. Just because the database format is different from how you might want to display dates should not affect your choice of a standard date field. Extraordinarily unlikely. Thanks, but you may not be aware but F1 made the topic solved - so really there is no error left.
×
×
  • 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.