Jackthumper
Members-
Posts
19 -
Joined
-
Last visited
Never
Profile Information
-
Gender
Not Telling
Jackthumper's Achievements
Member (2/5)
0
Reputation
-
i need help gettig the size of a directory
-
please could someone review my site http://toxipcets.co.uk
-
Hello my name is jack wright my website is http://toxipcets.co.uk and i am a beginner php learner
-
heres the page http://toxicpets.co.uk/search.php it just dosent get the stuff from the database
-
<html> <body> <script type='text/javascript'> var currenttime = new Date() var montharray=new Array('Jan','Feb','March','April','May','June','July','Aug','Sept','Oct','Nov','Dec') var serverdate=new Date(currenttime) function padlength(what){ var output=(what.toString().length==1)? '0'+what : what return output } function displaytime(){ serverdate.setSeconds(serverdate.getSeconds()+1) var timestring=padlength(serverdate.getHours())+':'+padlength(serverdate.getMinutes())+':'+padlength(serverdate.getSeconds()) document.getElementById('servertime').innerHTML=timestring+' MST ' document.getElementById('nav_servertime').innerHTML=timestring+' MST ' } window.onload=function(){ setInterval('displaytime()', 1000) } </script> </body> </html> <html> <head> <link rel="shortcut icon" href="http://www.toxicpets.co.uk/favicon.ico" > <meta name="description" content="toxicpets Is A FREE Online Virtual Pet Site For All Ages"> <meta name="keywords" content="Toxicpets, adopt, free, online, site, pets, kids, games, children, safe, virtual, fun, Jack, Wright"> <meta name="google-site-verification" content="BeR9LIHxeOGKgw90pAZG6o3dS-Ym3lxxPlH1LTgFiLY" /> <meta name="google-site-verification" content="JXFL8M3LU47SMJZ6aNi4u8BSyD8PWqsqlrORFHkvDfE" /> <meta name="CREATOR" content="Jack Wright"> <meta name="copyright" content="Copyright Toxicpets - 2010"> <meta name="author" content="Jack Wright"> <meta name="email" content="admin@toxicpets.co.uk"> <meta name="Charset" content="ISO-8859-1"> <meta name="Distribution" content="Global"> <meta name="Rating" content="General"> <meta name="Robots" content="INDEX,FOLLOW"> <meta name="Revisit-after" content="1 Day"> </body> </html> <?php $time = date("H"); if ($time <= 5 || $time >= 19) { $backgroundColor = "#3366FF"; $tableOutline = "#000000"; $topAndBottomBG = "#003399"; $topAndBottomText = "#FFFFFF"; $middleBG = "#99CCFF"; $middleTEXT = "#000000"; $reallyLight = "#DEF2FF"; $menuColor = "#FFFFFF"; $maincellColor = "#FFFFFF"; $maincellText = "#000000"; $menulinkColor = "#003399"; $mainlinkColor = "#003399"; $bottomlinkColor = "#FFFFFF"; } else { $backgroundColor = "#333333"; $tableOutline = "#333333"; $topAndBottomBG = "#000000"; $topAndBottomText = "#FFFFFF"; $middleBG = "#CCCCCC"; $middleTEXT = "#000000"; $reallyLight = "#F8F8F8"; $maincellColor = "#FFFFFF"; $maincellText = "#000000"; $menuColor = "#666666"; $menulinkColor = "#FFFFFF"; $menutextColor = "#FFFFFF"; $mainlinkColor = "#003399"; $bottomlinkColor = "#FFFFFF"; } // Page Colors // End Page Colors // Ranks ect if ($rank == { $admin_line .= "<br><a href=$base_url1/admin/admin.php?game=$game class=menu>Admin Panel</a><BR> <a href=$base_url1/dom.php>Show Maintenance?</a> "; } if ($rank == 5) { $admin_line .= "<p align=center>Admin Stuff: <br> <a class=menu href=# onClick=\"window.open('$base_url1/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_url1/warn_user.php?game=$game>Warn User</a>"; //$get = mysql_query("SELECT number FROM dom"); //if ($get = 1) //echo "<meta http-equiv='refresh' content='0;url=http://toxicpets.co.uk/down_for_maitenence.php'>"; //elseif ($get = 0) //echo "<meta http-equiv='refresh' content='0;url=http://toxicpets.co.uk/index.php'>"; } if ($rank == 7) { $admin_line .= "<br><a href=$base_url1/admin/admin.php?game=$game class=menu>Admin Panel</a>"; //$get = mysql_query("SELECT number FROM dom"); //if ($get = 1) //echo "<meta http-equiv='refresh' content='0;url=http://toxicpets.co.uk/down_for_maitenence.php'>"; //elseif ($get = 0) //echo "<meta http-equiv='refresh' content='0;url=http://toxicpets.co.uk/index.php'>"; } if ($rank == null) { $updateLine2 = "<p><a href=register.php?game=$game><img src=http://toxicpets.co.uk/images/nav_register.jpg width=113 height=101 border=0></a></p>"; //End Ranks } { } $rc = mysql_fetch_array( mysql_query("SELECT * FROM members2 WHERE id = '$userid'") ); $menu = "$updateLine2<p><ul id='MenuBar1' class='MenuBarVertical'> <li><a class='MenuBarItemSubmenu' href='#'>My Profile</a> <ul> <li><a href='#'>$username</a></li> <li><a href='#'>Control Panel</a></li> <li><a href='#'>Edit Profile</a></li> <li><a href='#'>Toxic Mail</a></li> <li><a href='#'><span id='nav_servertime'></span></a></li> </ul> </li> <li><a class='MenuBatItemSubmenu' href='/mypets.php?game=1'>Pets</a> <ul> <li><a href='/adopt.php?game=1'>Adoption Center</a></li> </ul> </li> <li><a class='MenuBarItemSubmenu' href='/index.php'>Explore</a> <ul> <li><a href='/index.php?game=$game'>Toxopada</a></li> <li><a href='/blanchills.php?game=$game'>Blanc Hills</a></li> <li><a href='/rija?game=$game'>Rija Mountian</a></li> </ul> </li> </li> <li><a class='MenuBarItemSubmenu' href='/games.php'>Games</a></li> <li><a class='MenuBarItemSubmenu href='#'>Your Stuff</a> <ul> <li><a href='/bank.php'>Slime: $points</a></li> <li><a href='#'>Hunger Level : $hungerLevel</a></li> <li><a href='/myitems.php'>Your Items</a></li> <li><a href='/myshop.php'>Your Shop</a></li> <li><a href='/rarerumble.php'>Rare Coins : $rc[rc]</a></li> </ul> </li> </ul> <script type='text/javascript'> var MenuBar1 = new Spry.Widget.MenuBar('MenuBar1', {imgRight:'../SpryMenuBarRightHover.gif'}); </script> </font></p>$admin_line <center> "; $userInfo = "<P><FONT SIZE=\"-1\"> Username: <A HREF=$base_url1/update_profile.php?game=$game class=menu>$display_name</A><BR> Hunger: <A HREF=$base_url1/myitems.php?game=$game class=menu><FONT SIZE=-1>$hungerLevel</A><BR> $pointVar: <a href=$base_url1/bank.php?game=$game>$points</a><BR> $rp_: <a href=$base_url1/bank.php?game=$game>???</a><BR>"; //PUT IN $rp_: TO ACTIVATE RP!!! //$rp___ $links = "<center><p><b><u>My Prefs</u></b></p></center> <center><a href=$base_url1/myitems.php?game=$game>Items</a><center> <center><a href=$base_url1/mypets.php?game=$game>Pets</a></center> <center><a href=$base_url1/nursery.php?game=$game>Nursery</a></center>"; // SearchBox $searchBox = "<form action=$base_url1/search.php?game=$game method=post><p align=center><INPUT TYPE=text NAME=command VALUE='' SIZE=8><BR><INPUT TYPE=submit NAME=submit VALUE='Do it'></P></form>";; //End SearchBox // Bottom Copyright $Time = "<span id='servertime'></span>"; $Toxicpets = "<a href=http://www.toxicpets.co.uk class=bottom>Run By ToxicPets.co.uk</a><br>"; $Terms = "<a href=$base_url1/tos.php?game=$game class=bottom>Terms/Rules</a>"; $Privacy = "<a href=$base_url1/privacy.php class=bottom>Privacy</a>"; $Upgrade = "<a href=upgrade.php?game=$game class=bottom>Upgrade to Premium Now!</a>"; $Sitemap = "<a href=http://toxicpets.co.uk/sitemap2.xml class=bottom onclick='return popitup('popupex.html')'>Sitemap</a>"; $copywrite =" $Time | $Toxicpets | $Terms | $Privacy | $Upgrade | $Sitemap "; //End Bottom Copyright // // // © // // // // CSS // //CSS INCUDED IN PHP// $openHTML = " <HTML> <HEAD> <center><TITLE>$gameName2 - $page_title</TITLE></center> <style><!-- INPUT {color:#000000; font: 9pt verdana; font-weight: none; text-decoration: none; background: $maincellColor; border: 1 solid $topAndBottomBG; } TEXTAREA {color:#000000; font: 9pt verdana; font-weight: none; text-decoration: none; background: $maincellColor; border: 1 solid $topAndBottomBG; } BUTTON {color:#000000; font: 9pt verdana; font-weight: none; text-decoration: none; background: $maincellColor; border: 0 solid $topAndBottomBG; } SELECT {color:#000000; font: 9pt verdana; font-weight: none; text-decoration: none; background: $maincellColor; border: 1 solid $topAndBottomBG; } INPUT {color:#000000; font: 9pt verdana; font-weight: none; text-decoration: none; background: $maincellColor; border: 1 solid $topAndBottomBG; } OPTION {color:#000000; font: 9pt verdana; font-weight: none; text-decoration: none; background: $maincellColor; border: 1 solid $topAndBottomBG; } RESET {color:#000000; font: 9pt verdana; font-weight: none; text-decoration: none; background: $maincellColor; border: 1 solid $topAndBottomBG; } SUBMIT {color:#000000; font: 9pt verdana; font-weight: none; text-decoration: none; background: $maincellColor; border: 1 solid $topAndBottomBG; } A:link { text-decoration: underline; color: $mainlinkColor; } A:visited { text-decoration: underline; color: $mainlinkColor; } A:hover { text-decoration: underline; color: $mainlinkColor; } A:active { text-decoration: underline; color: $mainlinkColor; } A:link.menu { text-decoration: underline; color: $menulinkColor; } A:visited.menu { text-decoration: underline; color: $menulinkColor; } A:hover.menu { text-decoration: underline; color: $menulinkColor; } A:active.menu { text-decoration: underline; color: $menulinkColor; } A:link.bottom { text-decoration: underline; color: $bottomlinkColor; } A:visited.bottom { text-decoration: underline; color: $bottomlinkColor; } A:hover.bottom { text-decoration: underline; color: $bottomlinkColor; } A:active.bottom { text-decoration: underline; color: $bottomlinkColor; } p { font-family: verdana; font-size: 11pt; color: black; } p.error { font-family: verdana; font-weight: bold; color: red; } p.white { font-family: verdana; color: white; } a.white { color: white; text-decoration: underline; } hr { margin: -1; } img { border: 0 } --></style> <script type=text/javascript src=popupBox.js></script> <script type='text/javascript'> var MenuBar1 = new Spry.Widget.MenuBar('MenuBar1', {imgRight:'../SpryMenuBarRightHover.gif'}); </script> <script src='../SpryMenuBar.js' type='text/javascript'></script> <link href='../SpryMenuBarVertical.css' rel='stylesheet' type='text/css' /> </HEAD> <BODY BGCOLOR=\"$backgroundColor\"> <TR BGCOLOR=\"#FFCC00\" width=100%> <TD VALIGN=bottom COLSPAN=2 HEIGHT=60 body background=\"bg.jpg\" width=12> <CENTER> <a href='http://www.toxicpets.co.uk/login.php' onMouseOver=\"image3.src='http://toxicpets.co.uk/login_over.png';\" onmouseout=\"image3.src='http://toxicpets.co.uk/login.png';\"><img name=\"image3\" src='http://toxicpets.co.uk/login.png' border=0></a> <a href='http://www.toxicpets.co.uk/logout.php' onMouseOver=\"image12.src='http://toxicpets.co.uk/logout_over.png';\" onMouseOut=\"image12.src='http://toxicpets.co.uk/logout.png';\"><img name=\"image12\" src='http://toxicpets.co.uk/logout.png' border=0></a> <a href='http://www.toxicpets.co.uk/mypets.php' onMouseOver=\"image1.src='http://toxicpets.co.uk/pets_over.png';\" onMouseOut=\"image1.src='http://toxicpets.co.uk/pets.png';\"><img name=\"image1\" src='http://toxicpets.co.uk/pets.png' border=0></a> <a href='http://www.index.php/explore.php' onMouseOver=\"image2.src='http://toxicpets.co.uk/explore_over.png';\" onMouseOut=\"image2.src='http://toxicpets.co.uk/explore.png';\"><img name=\"image2\" src='http://toxicpets.co.uk/explore.png' border=0></a> <a href='http://www.toxicpets.co.uk/forums.php' onMouseOver=\"image4.src='http://toxicpets.co.uk/forums_over.png';\" onMouseOut=\"image4.src='http://toxicpets.co.uk/forums.png';\"><img name=\"image4\" src='http://toxicpets.co.uk/forums.png' border=0></a> <a href='http://www.toxicpets.co.uk/clubs.php' onMouseOver=\"image6.src='http://toxicpets.co.uk/clubs_over.png';\" onMouseOut=\"image6.src='http://toxicpets.co.uk/clubs.png';\"><img name=\"image6\" src='http://toxicpets.co.uk/clubs.png' border=0></a> <BR style='padding:0;'> <a href='http://www.toxicpets.co.uk/shops.php' onMouseOver=\"image7.src='http://toxicpets.co.uk/shops_over.png';\" onMouseOut=\"image7.src='http://toxicpets.co.uk/shops.png';\"><img name=\"image7\" src='http://toxicpets.co.uk/shops.png' border=0></a> <a href='http://www.toxicpets.co.uk/upgrades.php' onMouseOver=\"image8.src='http://toxicpets.co.uk/upgrade_over.png';\" onMouseOut=\"image8.src='http://toxicpets.co.uk/upgrade.png';\"><img name=\"image8\" src='http://toxicpets.co.uk/upgrade.png' border=0></a> <a href='http://www.toxicpets.co.uk/updates.php' onMouseOver=\"image9.src='http://toxicpets.co.uk/news_over.png';\" onMouseOut=\"image9.src='http://toxicpets.co.uk/news.png';\"><img name=\"image9\" src='http://toxicpets.co.uk/news.png' border=0></a> <a href='http://www.toxicpets.co.uk/battle_center.php' onMouseOver=\"image10.src='http://toxicpets.co.uk/battle_over.png';\" onMouseOut=\"image10.src='http://toxicpets.co.uk/battle.png';\"><img name=\"image10\" src='http://toxicpets.co.uk/battle.png' border=0></a> <a href='http://www.toxicpets.co.uk/auctions.php' onMouseOver=\"image11.src='http://toxicpets.co.uk/auctions_over.png';\" onMouseOut=\"image11.src='http://toxicpets.co.uk/auctions.png';\"><img name=\"image11\" src='http://toxicpets.co.uk/auctions.png' border=0></a><BR style='padding:0;'> <TABLE BGCOLOR=\"$tableOutline\" CELLSPACING=1 CELLPADDING=0 WIDTH=\"95%\"> <TR BGCOLOR=\"#FFCC00\" width=100%> <TD VALIGN=bottom COLSPAN=2 HEIGHT=60 BGCOLOR=\"$topAndBottomBG\" width=12> <P ALIGN=right><FONT SIZE=\"+3\" COLOR=\"$topAndBottomText\"><B>$gameName</B></FONT></P> </TD> </TR> <TR> <TD VALIGN=top BGCOLOR=\"$menuColor\" width=120> $menu $userInfo $links $searchBox </TD> <TD VALIGN=top BGCOLOR='$maincellColor'><font color=$maincellText> "; $closeHTML = " </font></TD> </TR> </CENTER> </TABLE> </BODY> </HTML> <TR BGCOLOR='$topAndBottomBG'> <TD COLSPAN=150> <center><P align=center><FONT SIZE= '-1' color='$topAndBottomText'>$copywrite</FONT></P></center> </TD> </TR> "; ?>
-
it show my "Array".
-
@$pet = mysql_fetch_array(mysql_query("SELECT * FROM pets));
-
But how can i do that when its getting the images from a database $getPet = fetch("SELECT * FROM pets2 WHERE id = '$array[species]' AND game = '$game'"); $getOwner = fetch("SELECT display_name,username FROM members2 WHERE id = '$array[owner]' AND game = '$game'"); $image = "pet_$getPet[id]";
-
Im Am Trying To Display A Random Image Every Time The Page Refreshs i dont know if this will help??? <?php /* User Pets (user_pets.php) */ $rank_check = 1; $page_title = "User Pets"; include "header.inc.php"; print $openHTML; $array = fetch("SELECT * FROM user_pets2 WHERE id = '$id' AND game = '$game'"); if (!$array[id]) { die("<p align=center class=error>That is not a real pet</p>$closeHTML"); } if ($array[pet_desc]) { $petNote = "<tr><td colspan=2><p align=center><font size=-1><i>$array[pet_desc]</i></font></p></td></tr>"; } print "<center><table>$petNote<tr> <td width=200> "; $id = $array[id]; $getPet = fetch("SELECT * FROM pets2 WHERE id = '$array[species]' AND game = '$game'"); $getOwner = fetch("SELECT display_name,username FROM members2 WHERE id = '$array[owner]' AND game = '$game'"); $image = "pet_$getPet[id]"; if ($array[wearing] != 0) { $findLook = fetch("SELECT * FROM pet_looks WHERE change_from = '$array[species]' AND item_name = '$array[wearing]'"); if ($findLook[id]) { $image = "pet2_$findLook[id]"; } } $hunger = $array[$hunger]; $hungerLevel = $hungerArray[$hunger]; if (($array[hunger] > 10) OR ($array[hunger] < 0)) { $hungerLevel = "Unknown ($array[hunger])"; } $percentHealth = ($array[current_hp] / $array[max_hp]) * 100; if ($percentHealth > 0) { $healthLine = "<font color=red>$array[current_hp]/$array[max_hp]</font>"; } if ($percentHealth > 35) { $healthLine = "<font color=orange>$array[current_hp]/$array[max_hp]</font>"; } if ($percentHealth > 75) { $healthLine = "<font color=green>$array[current_hp]/$array[max_hp]</font>"; } ECHO <<<END <br> <CENTER><TABLE BGCOLOR="#$tableOutline" CELLSPACING=1 CELLPADDING=0 WIDTH=400> <tr> <td colspan=2 bgcolor=#$topAndBottomBG><font color=#$topAndBottomText><b>View Pet:</b></font></td></tr> <TR> <TD BGCOLOR=#$middleBG> <p> <font size=-1> Name: $array[name]<br> Level: $array[level]<br> Experience: $array[experience]<br> Next Level: $nextLevel[$id]<br> Health: <b>$healthLine</b><br> Strength: $array[strength]<br> Intelligence: $array[intelligence]<br> Speed: $array[speed]<br> Defense: $array[defense]<br> Hunger: $hungerLevel<Br> </font> </p> <p> <font size=-1> 1-Player Wins: $array[one_p_wins]<br> 1-Player Loses: $array[one_p_loses] </font> </p> </TD> <TD WIDTH=175 BGCOLOR=#FFFFFF> <p align=center> <img src=$base_url/images/user_images/opg_$game/pets/$image.gif border=1> <br><a href=view_pet.php?id=$array[id]&game=$game><b>$array[name]</b> the $getPet[name]!$petNote[$id]</a></P> <p align=center>$attitude[$id]</p> </TD> </TR> </TABLE> </CENTER> <p align=center><a href=user_profile.php?game=$game&user=$getOwner[username]>Back to $getOwner[display_name]'s Profile!</a></p> END; print "$closeHTML"; ?> Please Help Me Jackthumper
-
<?php $get = fetch("SELECT number FROM dom") if "$get = 1" echo "<meta http-equiv='refresh' content='0;url=http://toxicpets.co.uk/down_for_maitenence.php'>"; elseif "$get = 0" echo "<meta http-equiv='refresh' content='0;url=http://toxicpets.co.uk/index.php'>"; ?> is this code right???
-
I don't Get That it has (a,b,c) VALUES (1,2,3)
-
I want it to update but if the user has no table in the database i want it to create one with there userid ,username and game which is '1'
-
The Second Query Was Wrong But How Will It Insert If There Is No Table To Update???
-
This Is The Database