Jump to content

Cetanu

Members
  • Posts

    395
  • Joined

  • Last visited

    Never

Everything posted by Cetanu

  1. Well, in my CSS I have two basic containers. The sidebar, and everything else. Here: Cell One! Cell Two! When I view the site full-screen, all is good, but if I minimize the window just a little (imitating screen resolution) the text in Cell Two overlaps Cell one (sidebar). Is there a property I can declare to make the cells stay separate? CSS: *{ padding: 0; margin: 0; } body{ background-color: #22221F; color: #fff; font-family: tahoma, arial, times new roman; font-size: .800em; word-spacing: .100em; } /*Links*/ a{ color: #007DFF; text-decoration: none; font-weight: bold; } a:hover{ color: #B80000; text-decoration: underline; font-weight: bold; } a:visited{ color: #fff; text-decoration: underline; font-weight: bold; } a:active{ color: #22459B; text-decoration: underline; font-weight: bold; } /*Containers*/ #nav{ width: 99%; float: left; padding: 10px; height: 100px; background: url("images/d9bg.png") repeat-x; } #nav img{ float: left; } #nav ul{ dislay: inline; padding: 10px; font-size: .899em; float: right; } #nav li{ display: inline; padding: 10px; font-size: .899em; float: right; } #nav li a{ padding: 10px; } #nav li a:hover{ background-color: #555; color: #fff; padding: 10px; } #whole{ background-image: url("images/bwbg.png") repeat-x; width: 100%; } #sidebar{ float: left; width: 30%; } #footer{ background: url("/images/d9bg.png") repeat-x; height: 100px; padding: 3px; width: 99.5%; margin-top: 20%; } /*Classes*/ .clear{ clear: both; } img.center{ display: block; margin: 0 auto; } a img{ border: none; } img.head{ float: left; } /*IDs*/ /*Normal Properties*/ fieldset{ border: 2px solid rgb(0, 0, 0); float: left; margin-bottom: 10px; margin-left: 10px; margin-right: 10px; margin-top: -10px; padding: 10px; width: 25%; } legend{ background: url("images/d9header.png") no-repeat; margin: 0 auto; } input{ margin: 5px; border: 1px solid #44459B; background-color: #555; color: #fff; }
  2. Well, for one, <input> is a self-closing tag. That adds onto your errors. <input value="" type="" name="" id=""/> As for that URL I dunno why the validator is being retarded.... >.> <.< It's set up right. Alt is not an <a href=""> property, to have a mouseover text, use <a href="" title="TEXT TO DISPLAY"> </a> I dunno about that link, but it's making a big fuss.
  3. I've been looking over the test design, and I was just thinking that I cannot really integrate white into the design easily. I will never be able to make everyone happy, but I'd like to try, so does anyone have any tips for adding some lightness? BTW http://d9fans.freezoka.com is the new domain.
  4. What code is invalid? What are the validation errors? What does that map have to do with it?! Are you embedding?
  5. Interesting. Well, I personally enjoy designs that are black and stuff, but you brought up an interesting point... I'll have to keep that in mind as I move on with the design. Thanks.
  6. So, this is what I've gotten done in two hours. I know it doesn't validate I just haven't gotten that far. I am just fleshing out a design. What do you guys think of everything, before I move on? http://mythscape.freezoka.com/d9test/test.php
  7. I got it! Fixed. It was an issue with using isset() with $_SESSION I guess.
  8. Well I know that it's the right session, but look at the page: http://mythscape.freezoka.com/chrisrpg/shop.php It's nothingness, and that only happens when there's an error in my code.
  9. There's nothing wrong with my syntax anywhere?!
  10. I did try them individually to see, it didn't. I think the error is in the if statement that contains the INSERT.
  11. Okay I'll let you know how that goes...
  12. @Mark no, because I am designing this script for someone else. They user user_id and I user username, so I can test it in my database and then give it to them. I've already tried to get rid of the user_id statements, but it still doesn't work.
  13. mysql_query("UPDATE Reply SET image='{$image}' WHERE username='{$username1}'");
  14. Complete Code (which works without the erroneous part ^ ) <?php session_start(); ?> <html> <head> <title> <?php include "db.php"; $result=mysql_query("SELECT * FROM rpg WHERE player='{$_SESSION['username']}'") or die(mysql_error()); while($row=mysql_fetch_array($result)){ echo $row['species']; } ?> Shop </title> <style type="text/css"> body{ background-color: #000; font-family: Arial, Tahoma; font-size: .78em; } fieldset{ padding: 10px; margin: 10px; border: 1px solid #57626B; width: 60%; float: left; } legend{ background-color: #6A8CA5; border: 1px solid #000; padding: 5px; } input{ font-style: italic; } #tester{ background-color: #333; margin: 0 auto; padding: 10px; width: 70%; height: 99%; } #stats{ float: left; width: 25%; font-style: italic; color: #000; padding: 5px; border: 1px dashed #999; } table{ width: 98%; border: 2px solid #000; text-align: center; } </style> </head> <body> <div id="tester"> <?php //Shop script designed by Cetanu of http://mythscape.freezoka.com and http://tehfreerpg.proboards.com //This script is licensed by the Creative Commons for: Sharing, Attribution, Non-derivative, and non-commercial. //You MUST leave these notices in for LEGAL use of this script. YOU MAY NOT EDIT THIS SCRIPT LEGALLY. //For more: http://creativecommons.org/licenses/by-nc-nd/3.0/us/ include "db.php"; $result=mysql_query("SELECT * FROM rpg WHERE player='{$_SESSION['username']}'") or die(mysql_error()); while($row=mysql_fetch_array($result)){ if($row['species']=="Alien"){ echo "Welcome to the <strong>Alien Shop</strong>, ".$row['name'].". You currently have ".$row['money']." in money!<div style='text-align: right; font-weight: bold;'> <a href='cpanel.php'>Control Panel</a></div><br/> "; echo "<table><tr><td><strong>Item Name</strong></td> <td> <strong>Item Description</strong> </td><td> <strong>Quantity</strong></td><td><strong>Price</strong></td><td><strong> BUY!</strong></tr>"; include "db.php"; $result_shop=mysql_query("SELECT * FROM shop WHERE species='Alien'") or die(mysql_error()); while($row_shop=mysql_fetch_array($result_shop)){ echo "<tr><td style='background-color: rgb(22, 36, 45);'>".$row_shop['item_name']."</td><td style='background-color: #57626B;'>".$row_shop['item_description']."</td> <td style='background-color: rgb(22, 36, 45);'>".$row_shop['quantity']."</td><td style='background-color: #57626B;'>".$row_shop['price']."</td><td style='background-color: rgb(22, 36, 45);'> <form action='shop.php' method='post'> <input type='radio' name='BuyA' value='".$row_shop['item_name']."'/></td></tr>"; } echo "</table>"; echo "<br/><input type='submit' name='buyA' value='Confirm'/> </form>"; if($_POST['buyA'] && $_POST['BuyA']){ include "db.php"; $result_shop=mysql_query("SELECT * FROM shop WHERE species='Alien'") or die(mysql_error()); while($row_shop=mysql_fetch_array($result_shop)){ if($row_shop['item_name']=='Acidic Frenzy'){ $i=$row['money']; $w=$row_shop['price']; if($i < $w){ echo "You cannot buy this item! You do not have enough money!!!"; } if($row_shop['quantity']=='0'){ echo "Sorry, we're out of ".$row_shop['item_name']." please wait for us to re-stock the shop."; } if($i >= $w){ $purchased='Acidic Frenzy'; $money=$row['money']-1000; mysql_query("UPDATE rpg SET purchased='{$purchased}' , money='{$money}' WHERE player='{$_SESSION['username']}'"); mysql_query("UPDATE shop SET quantity='{$quant}' WHERE item_name='{$row_shop['item_name']}'"); echo $row_shop['item_name']." Purchased."; } //acidic frenzy close } //$row shop close } //if post buy } //predator } //player row if($row['species']=="Predator"){ echo "Welcome to the <strong>Predator Shop</strong>, ".$row['name'].". You currently have ".$row['money']." in money!<div style='text-align: right; font-weight: bold;'> <a href='cpanel.php'>Control Panel</a></div><br/> "; echo "<table><tr><td><strong>Item Name</strong></td> <td> <strong>Item Description</strong> </td><td> <strong>Quantity</strong></td><td><strong>Price</strong></td><td><strong> BUY!</strong></tr>"; include "db.php"; $result_shop=mysql_query("SELECT * FROM shop WHERE species='Predator'") or die(mysql_error()); while($row_shop=mysql_fetch_array($result_shop)){ echo "<tr><td style='background-color: rgb(22, 36, 45);'>".$row_shop['item_name']."</td><td style='background-color: #57626B;'>".$row_shop['item_description']."</td> <td style='background-color: rgb(22, 36, 45);'>".$row_shop['quantity']."</td><td style='background-color: #57626B;'>".$row_shop['price']."</td><td style='background-color: rgb(22, 36, 45);'> <form action='shop.php' method='post'> <input type='radio' name='Buy' value='".$row_shop['item_name']."'/></td></tr>"; } echo "</table>"; echo "<br/><input type='submit' name='buyP' value='Confirm'/> </form>"; if($_POST['buyP'] && $_POST['Buy']){ include "db.php"; $result_shop=mysql_query("SELECT * FROM shop WHERE species='Predator'") or die(mysql_error()); while($row_shop=mysql_fetch_array($result_shop)){ if($row_shop['item_name']=='Extended Wristblades'){ $i=$row['money']; $w=$row_shop['price']; if($i < $w){ echo "You cannot buy this item! You do not have enough money!!!"; } if($row_shop['quantity']=='0'){ echo "Sorry, we're out of ".$row_shop['item_name']." please wait for us to re-stock the shop."; } if($i >= $w){ $attack=$row['attack']+5; $money=$row['money']-450; $quant=$row_shop['quantity']-1; mysql_query("UPDATE rpg SET attack='{$attack}' , money='{$money}' WHERE player='{$_SESSION['username']}'"); mysql_query("UPDATE shop SET quantity='{$quant}' WHERE item_name='{$row_shop['item_name']}'"); echo $row_shop['item_name']." Purchased."; } //wristblades close if($row_shop['item_name']=='Plasmacaster'){ $i=$row['money']; $w=$row_shop['price']; if($i < $w){ echo "You cannot buy this item! You do not have enough money!!!"; } if($row_shop['quantity']=='0'){ echo "Sorry, we're out of ".$row_shop['item_name']." please wait for us to re-stock the shop."; } if($i >= $w){ $attack=$row['attack']+20; $money=$row['money']-2500; $quant=$row_shop['quantity']-1; mysql_query("UPDATE rpg SET attack='{$attack}' , money='{$money}' WHERE player='{$_SESSION['username']}'"); mysql_query("UPDATE shop SET quantity='{$quant}' WHERE item_name='{$row_shop['item_name']}'"); echo $row_shop['item_name']." Purchased."; } //plasmacaster close } //$row shop close } //if post buy } //predator } //player row } //mysterious & required if($row['species']=="Marine"){ echo "Welcome to the <strong>Marine Shop</strong>, ".$row['name'].". You currently have ".$row['money']." in money!<div style='text-align: right; font-weight: bold;'> <a href='cpanel.php'>Control Panel</a></div><br/> "; echo "<table><tr><td><strong>Item Name</strong></td> <td> <strong>Item Description</strong> </td><td> <strong>Quantity</strong></td><td><strong>Price</strong></td><td><strong> BUY!</strong></tr>"; include "db.php"; $result_shop=mysql_query("SELECT * FROM shop WHERE species='Marine'") or die(mysql_error()); while($row_shop=mysql_fetch_array($result_shop)){ echo "<tr><td style='background-color: rgb(22, 36, 45);'>".$row_shop['item_name']."</td><td style='background-color: #57626B;'>".$row_shop['item_description']."</td> <td style='background-color: rgb(22, 36, 45);'>".$row_shop['quantity']."</td><td style='background-color: #57626B;'>".$row_shop['price']."</td><td style='background-color: rgb(22, 36, 45);'> <form action='shop.php' method='post'> <input type='radio' name='BuyM' value='".$row_shop['item_name']."'/></td></tr>"; } echo "</table>"; echo "<br/><input type='submit' name='buyM' value='Confirm'/> </form>"; if($_POST['buyM'] && $_POST['BuyM']){ include "db.php"; $result_shop=mysql_query("SELECT * FROM shop WHERE species='Marine'") or die(mysql_error()); while($row_shop=mysql_fetch_array($result_shop)){ if($row_shop['item_name']=='Rocket Launcher'){ $i=$row['money']; $w=$row_shop['price']; if($i < $w){ echo "You cannot buy this item! You do not have enough money!!!"; } if($row_shop['quantity']=='0'){ echo "Sorry, we're out of ".$row_shop['item_name']." please wait for us to re-stock the shop."; } if($i >= $w){ $attack=$row['attack']+5; $money=$row['money']-450; $quant=$row_shop['quantity']-1; mysql_query("UPDATE rpg SET attack='{$attack}' , money='{$money}' WHERE player='{$_SESSION['username']}'"); mysql_query("UPDATE shop SET quantity='{$quant}' WHERE item_name='{$row_shop['item_name']}'"); echo $row_shop['item_name']." Purchased."; if(isset($_SESSION['username']=="Admin" || $_SESSION['user_id']=="Cetanu" || $_SESSION['user_id']=="Chris P")){ echo "<form action='shop.php' method='post'> Adding an Item<br/> Name: <input type='text' maxlength='30' name='name'/><br/> Description:<br/> <textarea rows='50' cols='50' name='description'>Be sure to remember the +attack, -attack, etc.</textarea><br/> Quantity: <input type='text' name='quant'/><br/> Price: <input type='text' name='price'/> <br/> <select name='species'> <option value='Predator'>Predator</option> <option value='Alien'>Alien</option> <option value='Marine'>Marine</option> </select><br/> <input type='submit' name='add' value='Confirm Add'/> | <input type='reset' value='Reset'/> </form> "; if(isset($_POST['add'])){ mysql_query("INSERT INTO shop (`item_name`, `item_description`, `price`, `quantity`, `species`) VALUES('{$_POST['name']}', '{$_POST['description']}', '{$_POST['price']}', '{$_POST['quant']}', '{$_POST['species']}'"); echo "<script>alert('Item Added');</script>"; } } } //rpg close } //$row shop close } //if post buy } //predator } //player row } //mysterious & required ?> </div> </body> </html>
  15. I've been tinkering with this forever and haven't seen any errors, but the page goes white (aka fatal error ) Here, I think I need a fresh set of eyes. <?php if(isset($_SESSION['username']=="Admin" || $_SESSION['user_id']=="Cetanu" || $_SESSION['user_id']=="Chris P")){ echo "<form action='shop.php' method='post'> Adding an Item<br/> Name: <input type='text' maxlength='30' name='name'/><br/> Description:<br/> <textarea rows='50' cols='50' name='description'>Be sure to remember the +attack, -attack, etc.</textarea><br/> Quantity: <input type='text' name='quant'/><br/> Price: <input type='text' name='price'/> <br/> <select name='species'> <option value='Predator'>Predator</option> <option value='Alien'>Alien</option> <option value='Marine'>Marine</option> </select><br/> <input type='submit' name='add' value='Confirm Add'/> | <input type='reset' value='Reset'/> </form> "; if(isset($_POST['add'])){ mysql_query("INSERT INTO shop (`item_name`, `item_description`, `price`, `quantity`, `species`) VALUES('{$_POST['name']}', '{$_POST['description']}', '{$_POST['price']}', '{$_POST['quant']}', '{$_POST['species']}'"); echo "<script>alert('Item Added');</script>"; } } ?> It works if I take away the if statments/brackets....but not if I leave them. O_o
  16. Aw, that's what I figured, I thought there would be an easier way, though. Anyway, I'll go do that. Thanks
  17. I loved it! Except all of the backgrounds are girly.....
  18. Oh, okay, well that makes a whole lot more sense. @ignace, if each character has different health, say...40, 55, 100, and 60, how would I determine their starting score to rejuvenate only that much? If I wanted to heal #1 with 40hp, and they had 60, I would add 20, but then that would add 20 to everyone that heals. I just want to heal them back to their starting score.
  19. I clicked the link... ...and was blown to oblivion by all of the stuff on the home page... There was waaaaaaay too much stuff on the home page for me, plus it didn't even seem to have a flow. It was like "Hmmm I'll put the Google search underneath the login, but above donations, oh, and lemme put the nav bar on the other side of the page.." I didn't want to click anything...there was too much. I was lost in the jumble. :-\
  20. Okay, About Page: - ??? - "Toadys" should be today's - Purchese should be purchase - Inteactive should be interactive -Broken link to Profile/Tutorials page. Donate Page: - appriciate should be appreciate
  21. Well, here it goes. -- I like the header of your website. -- The home page has this little tiny body of text and a load of white space. It looks off-balance/empty, barren, etcetera. "Tutorials" is spelled wrong on the home page (in the paragraph), it says "tutorails". I may just be an annoying pest, but there are also some commas missing in the text, so it makes it confusing. I'll use the classic example: "Eats, shoots, and leaves" is different from "Eats shoots and leaves". -- On the home page, rather than saying, "You can USE this page to contact us.", why don't you link to the page to make it easier? (Even though it's right there in the nav bar) -- It says "Or if your just curious" it should be "Or, if you're just curious..." -- All of the pages are dead links Maybe it's supposed to be that way now... -- Only 7 Errors! Niiiice! -- Awwwww Invalid CSS, but not bad. Overall, pretty good. Just the things I said up there ^, thanks for putting up with my English grammar-Naziness. XD
  22. How exactly can I use Start Transaction? I've seen numerous examples on the Internet, but they confuse me. They have different syntaxes... All I want to do is have an Infirmary for my RPG. Member 1 starts with 40 health. They take damage and have 25 health. They go to the infirmary and get rejuvenated to 40. Members will have different healths, so I can't just define a variable to restore them to their original health, so someone told me to use START TRANSACTION as an SQL statement.. Help pleeeeeease.
  23. ...I dunno what that means but I'll look into it. Okay, I've found the stuff on configuring cron, but how do I USE it?
×
×
  • 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.