Jump to content

Recommended Posts

 

bank.php

<?php
include('inc/header.php');


$amount= $_POST[amount];
$action= $_POST[name];

if ($action == withdraw)
{
if ($amount > $user->bank_gold)
{
echo ' You dont have enough money for your transaction';
}
elseif ($amount > 0)
{
mysql_query("UPDATE `users` SET bank_gold = bank_gold-($amount) WHERE username = '$user->username'");
mysql_query("UPDATE `users` SET gold = gold+($amount) WHERE username = '$user->username'");
echo 'You Withdrew '; echo "$amount"; echo ' Gold';
}
}

if ($action == deposit)
{
if ($amount > $user->gold)
{
echo ' You dont have enough money for your transaction';
}
elseif ($amount > 0)
{
mysql_query("UPDATE `users` SET gold = gold-($amount) WHERE username = '$user->username'");
mysql_query("UPDATE `users` SET bank_gold = bank_gold+($amount) WHERE username = '$user->username'");
echo 'You Deposited '; echo "$amount"; echo ' Gold';
}
}

echo ' 
<center>Welcome to the Silent Wars bank<center><br>
<center><img src = http://www.cardweb.com/graphic/flashgraphics/bank.gif /></center><Br><BR>

  The bank is an easy way to protect your wealth without worrying about people stealing it.  To deposit, type in the coins you wish to deposit, and to withdraw, type in the number of coins you wish to withdraw.
   Your Current Balance is:'; echo "$user->bank_gold<br><br>";


echo'
  <form method=POST name=bank>
  <select name=name>
    <option value="deposit">Deposit</option>
    <option value="withdraw">Withdraw</option>
      </select>
  
  Amount of Gold:
  <input name=amount size=12 maxlength=255 value=';echo"$user->gold";echo
'>
  <input type=submit name=submit id=submit value=Proceed> ';

include("inc/footer.php");
?>

 

in my includes, header and footer, i have html and stuff, right? ill shwo the code here:

 

 

 

header.php


<?php

if(isset($_COOKIE[username]))
{
include ('inc/connect.php');
include ('inc/define.php');
$result = @mysql_query("SELECT * FROM users WHERE username = '$_COOKIE[username]'"); 
$temp = @mysql_fetch_object($result);
$user = $temp; 
}
else
{
header('location:index.htm');
}
?>



<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link href="style.css" rel="stylesheet" type="text/css" />
<title> template</title>
</head>

<body>
<div id="container">
<div id="header">
	<ul>
		<center>Level : <?php echo ''.$user->level.''; ?> |  Magic Energy :  <?php echo ''.$user->energy.''; ?> / <?php echo ''.$user->max_energy.''; ?> | Exp : <?php echo ''.$user->exp.''; ?> / <?php echo ''.$user->exp_required.''; ?> | Health :  <?php echo ''.$user->hp.''; ?> / <?php echo ''.$user->max_hp.''; ?>  | Gold: <?php echo ''.$user->gold.''; ?> | Diamonds: <?php echo ''.$user->diamond.''; ?> |</center>
	</ul>
</div>
<div id="content">
	<div id="left">
		<div class="menu">
			<div class="menuheader"><h3>Personal Area</h3></div>
			<div class="menucontent">
				<ul>
					<li><a href="profile.php">Home</a></li>
					<li><a href="news.php">News</a></li>
					<li><a href="bank.php">Banking</a></li>
					<li><a href="ranking.php">Ranking</a></li>
					<li><a href="chat.php">Shout-Box(notyet)</a></li>
					<li><a href="battle.php">Battle Zone</a></li>
					<li><a href="stats.php">Statistics Page(notyeT)</a></li>
					<li><a href="account.php">Your Account(notyet)</a></li>
				</ul>
			</div>
			<div class="menufooter"></div>
		</div>
		<div class="menu">
		<div class="menuheader"><h3>City</h3></div>
		<div class="menucontent">

<ul>

				<li><a href="clan2.php">Clan</a></li>
<li><a href="mining.php">Mining</a></li>
	<li><a href="forest.php">Forest</a></li>
					<li><a href="train1.php">Training</a></li>
<li><a href="heal.php">Fountain</a></li>

					<li><a href="convert.php">Convert(notyet)</a></li>
			<li><a href="clan.php">Element</a></li>

					<li><a href="fishing.php">Fishing(not yet)</a></li>
<li><a href="magic.php">Ye Olde Magic Shop</a></li>
				</ul>









</div>
<div class="menufooter"></div>

			<div class="menuheader"><h3>Game Stats</h3></div>
			<div class="menucontent">
				<ul>
				</ul>
			</div>

			</div>
			<div class="menufooter"></div>
		</div>
	</div>


	<div id="right">
		<div class="menu">
			<div class="menuheader"><h3>Recent Actions</h3></div>
			<div class="menucontent">
				<ul>
					<li><a href=mail.php>Mail(not yet)</a></li>
                                                <li><a href=battlelogs.php>Battle logs(soon!)</a></li>
<li><a href=bank.php>Bank Gold</a></li> 
					<li><a href=mail.php>Mail(not yet)</a></li>
                                                <li><a href=battlelogs.php>Battle logs(soon!)</a></li>
<li><a href=bank.php>Bank Gold</a></li> 
					<li><a href=mail.php>Mail(not yet)</a></li>
                                                <li><a href=battlelogs.php>Battle logs(soon!)</a></li>
<li><a href=bank.php>Bank Gold</a></li> 
				</ul><div class="menufooter"></div>

<div class="menuheader"><h3>Energy Zone</h3></div>


<ul>

Magic Crystals: <?php echo "$user->crystals";?>
<li><a href=makecrystal.php>Make Crystal</a></li>
<li><a href=usecrystal.php>Use Crystals
</ul>
</ul><div class="menufooter"></div>


<div class="menuheader"><h3>Chat</h3></div>




<!-- BEGIN CBOX - http://www.cbox.ws -->
<div align="center" id="cboxdiv">
<iframe frameborder="0" width="160" height="305" src="http://www3.cbox.ws/box/?boxid=2688957&boxtag=8561&sec=main" marginheight="2" marginwidth="2" scrolling="auto" allowtransparency="yes" name="cboxmain" style="border:#000000 1px solid;" id="cboxmain"></iframe><br/>
<iframe frameborder="0" width="160" height="75" src="http://www3.cbox.ws/box/?boxid=2688957&boxtag=8561&sec=form" marginheight="2" marginwidth="2" scrolling="no" allowtransparency="yes" name="cboxform" style="border:#000000 1px solid;border-top:0px" id="cboxform"></iframe>
</div>
<!-- END CBOX -->






<div class="menufooter"></div>
				<div class="clear"></div>
			</div>


		</div>
	</div>
	<div id="middle">
		<div class="post">
			<div class="postheader"><h1>Post title</h1></div>
			<div class="postcontent">

 

and footer.php

			</div>
			<div class="postfooter"></div>
		</div>
	</div>
</div>
<div id="footer">
	<ul>
	</ul>
</div>	
</div>
</body>
</html>

 

why is it when i visit bank.php, it doesnt work, as in the colors dont show, background is white, but its really supposed to look like this:

 

http://donkeygame.1gig.biz/index.php

Link to comment
https://forums.phpfreaks.com/topic/65408-solved-phpcss-problem/
Share on other sites

In this script you have:

<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link href="style.css" rel="stylesheet" type="text/css" />
<title> template</title>
</head>

 

and yet on you're index webpage you have:

<head>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

<link href="inc/style.css" rel="stylesheet" type="text/css" />

<title> template</title>

</head>

 

Maybe that?

Link to comment
https://forums.phpfreaks.com/topic/65408-solved-phpcss-problem/#findComment-326606
Share on other sites

nope, they are in different folders, trust me, they are both linked to the same files, header 2 and footer2, in the inc folder

one of the files are in the folder, its been happening even with my older site alot, espially on pages with forms.  i ono why though.  any ideas?

 

the bank.php SHOULD look like index.php, and it IS a php question.  my headers and footers work on every page, except where there are forms!

 

(for the record, i reverted bank.php back to the way it was b4 the new template was added, if u want, i could add the new footer and header to show u)

Link to comment
https://forums.phpfreaks.com/topic/65408-solved-phpcss-problem/#findComment-326608
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.