Jump to content

Recommended Posts

I am moving my site to a home web server and while testing it, all of my includes seem to be showing up as code, and not executing properly.  I am using php5.2.6, Apache 2.2 Mysql 5.0.67 and Activeperl 5.10.  I have tried editing the includes_path in the php.ini file, but no luck.  Any suggestions?

Link to comment
https://forums.phpfreaks.com/topic/130374-includes-showing-up-as-code/
Share on other sites

When a file is included' date=' parsing drops out of PHP mode and into HTML mode at the beginning of the target file, and resumes again at the end. For this reason, any code inside the target file which should be executed as PHP code must be enclosed within valid PHP start and end tags.[/quote']

 

http://php.net/include

here is the code for the top part of index.php.

 

<?php
$title="Welcome to Immortalix.net";
include "head.php";
?>
<tr>
  <td><img src="images/titlepic.jpg"></td>

 

And here is the results before the image and the rest of my page displays.

 

","",$text); $text = str_replace("","",$text); $text = str_replace("","",$text); $text = str_replace("","",$text); $text = str_replace("","",$text); $text = str_replace("","",$text); $text = str_replace("","",$text); $text = str_replace("","",$text); $text = str_replace("","",$text); $text = str_replace("","",$text); $text = str_replace("","[/col]",$text); $text = str_replace("

","\n", $text); $text = str_replace("

","[qwerty]",$text); //Special manager html function $text = str_replace("

","[/qwerty]",$text) ; //Special manager html function $text = str_replace("", ":)", $text); $text = str_replace("", ":(", $text); $text = str_replace("", ":P", $text); $text = str_replace("", ";)", $text); $text = str_replace("", ":'(", $text); $text = str_replace("", ":D", $text); $text = str_replace("", ">:", $text); $text = str_replace("", ":o", $text); $text = str_replace("", ":-/", $text); $text = str_replace("", "-_-", $text); $text = str_replace("", ":|", $text); $text = str_replace("", "8)", $text); $text = str_replace("", ":*", $text); $text = str_replace("", "*rolleyes*", $text); $text = str_replace("", "", $text); $text = str_replace("", "", $text); $text = str_replace("", "", $text); $text = str_replace("", "", $text); $text = str_replace("", "", $text); $text = str_replace("", "", $text); $text = str_replace("", "[/]", $text); $text = str_replace(">", "]", $text); return $text; } if ($type == "encode"){ $title1 = ereg_replace("'", "`", $title1); $title1 = htmlspecialchars($title1); $text = ereg_replace("'", "`", $text); $text = str_replace(":)", "", $text); $text = str_replace(":(", "", $text); $text = str_replace(":P", "", $text); $text = str_replace(";)", "", $text); $text = str_replace(":'(", "", $text); $text = str_replace(":D", "", $text); $text = str_replace(">:","", $text); $text = str_replace(":o","", $text); $text = str_replace(":-/","", $text); $text = str_replace("-_-","", $text); $text = str_replace(":|","", $text); $text = str_replace("8)","", $text); $text = str_replace(":*","", $text); $text = str_replace("*rolleyes*","", $text); $text = str_replace("","",$text); $text = str_replace("","",$text); $text = str_replace("","",$text); $text = str_replace("","",$text); $text = str_replace("","",$text); $text = str_replace("","",$text); $text = str_replace("","",$text); $text = str_replace("","",$text); $text = str_replace("","",$text); $text = str_replace("","",$text); $text = str_replace("[/col]","",$text); // format $text = str_replace("", "", $text); $text = str_replace("", "", $text); $text = str_replace("", "", $text); $text = str_replace("", "", $text); $text = str_replace("", "", $text); $text = str_replace("", "", $text); $text = str_replace("[http://", "", $text); if (strstr($text, "", $text); } $text = htmlspecialchars($text); return array("message"=>$text, "message2"=>$title1); } } function proper_money($type, $amount){ switch($type){ case "gold" : $type2 = "gold"; $sing = "1"; break; case "hacks" : $type2 = "mythril"; $sing = "1"; break; case "nectar" : $type2 = "nectar point"; break; case "diamonds" : $type2 = "diamond"; break; case "emeralds" : $type2 = "emerald"; break; case "crystals" : $type2 = "crystal"; break; case "lcrystal" : $type2 = "large crystal"; break; case "scrystal" : $type2 = "super crystal"; break; case "mcrystal" : $type2 = "master crystal"; break; case "ldiamond" : $type2 = "large diamond"; break; case "sdiamond" : $type2 = "super diamond"; break; case "mdiamond" : $type2 = "master diamond"; break; case "lemerald" : $type2 = "large emerald"; break; case "semerald" : $type2 = "super emerald"; break; case "memerald" : $type2 = "master emerald"; break; } if($sing){ $type3 = $type2; }else{ $type3 = $type2."s"; } if($amount == 1){ return "$amount $type2"; }else{ return number_format($amount)." $type3"; } } //end function proper_money(); function delete_user($id){ $time = date("j\/m H:i:s"); $realtime = date("YzHis"); $userget = mysql_query("SELECT * FROM userdb WHERE id = '$id'"); $deletee = mysql_fetch_array($userget); //Clan deletions if(mysql_query("DELETE FROM clan_app WHERE userid = '$id'")){ echo "Deleted all clan application for user $id

"; } if($deletee[clan]){ $wepget = mysql_query("SELECT * FROM pequipment WHERE userid = '$deletee[id]' AND brand = 'C$deletee[clan]'"); while($weaps = mysql_fetch_array($wepget)){ if(mysql_query("UPDATE pequipment SET userid = '0', username = 'C$deletee[clan]', equipped = 'N', market = 'N' WHERE id = '$weaps[id]'")){ echo "Returned $weaps[name] $weaps[brand] from $deletee[username] to the clan

"; } if($weaps[type] == "barmor"){ $equiptype = "Body Armor"; $eq1 = "has"; }elseif($weaps[type] == "weapon"){ $equiptype = "Weapon"; $eq1 = "has"; }elseif($weaps[type] == "helm"){ $equiptype = "Helm"; $eq1 = "has"; }elseif($weaps[type] == "boots"){ $equiptype = "Boots"; $eq1 = "have"; }elseif($weaps[type] == "gloves"){ $equiptype = "Gloves"; $eq1 = "have"; } if(mysql_query("INSERT INTO usernews (id, user, text, time) VALUES ('','C$deletee[clan]','$time Clan branded $weaps[type] $weaps[name] $weaps[brand] $eq1 been retrieved from $deletee[username].','$realtime')")){ echo "Added a clan message about return of $weaps[name] $weaps[brand] from $deletee[username]

"; } } if(mysql_query("DELETE FROM clan_mem WHERE userid = '$id'")){ echo "Deleted $deletee[username] from clan ID #$deletee[clan]

"; } if(mysql_query("INSERT INTO usernews (id, user, text, time) VALUES ('','C$deletee[clan]','$time Clan member $deletee[username] has been deleted.','$realtime')")){ echo "Added a clan news item about deletion of $deletee[username]

"; } } //Equipment deletions if(mysql_query("DELETE FROM pequipment WHERE userid = '$id'")){ echo "Deleted Weapons and Armor for $deletee[username]

"; } //Mythril Market deletions if(mysql_query("DELETE FROM mythmarket WHERE userid = '$id'")){ echo "Deleted mythril market sale for $deletee[username]

"; } //Usernews deletions if(mysql_query("DELETE FROM usernews WHERE user = '$id'")){ echo "Deleted news for $deletee[username]

"; } //Message Board deletions if(mysql_query("DELETE FROM mb_topics WHERE username like '%'")){ echo "Deleted Message Board posts for $deletee[username]

"; } if(mysql_query("DELETE FROM userdb WHERE id = '$id'")){ echo "Deleted $deletee[username]

"; } } function send_mail($email){ $userget = mysql_query("SELECT * FROM userdb WHERE email = '$email'"); $user = mysql_fetch_array($userget); /* recipients */ $to = "$user[username] <$user>"; /* subject */ $subject = "Player E-Mail Verification"; /* message */ $message = "

 

 

Now that I look at it.  It appears to be trying to display the contents of my targets of my urls on the page.  What would do that?

When a file is included' date=' parsing drops out of PHP mode and into HTML mode at the beginning of the target file, and resumes again at the end. For this reason, any code inside the target file which should be executed as PHP code must be enclosed within valid PHP start and end tags.[/quote']

 

http://php.net/include

 

Wish that was the problem.  All tags are in their proper place.  The site works fine on it's current host.  It is only on the new server I am having this issue.

 

guys.  This code WORKS on other sites.  I am pretty sure it is some kind of configuration issue.  I just don't know WHAT.  However, here is the code for head.php

 

<?php
require('gameconfig.php');
$title="Welcome to Immortalix.net";
$players = mysql_query("select id from userdb where id != 1");
$players = mysql_num_rows($players);
$active = $realtime-500;
$select_act = mysql_query("select * from userdb where active2>$active && active != '-Never-' order by active2 desc");
$select_chat = mysql_query("select * from userdb where ccheck>$active order by ccheck desc");
$playersonline = mysql_num_rows($select_act);
$inchat = mysql_num_rows($select_chat);
$view =  mysql_fetch_array(mysql_query("select clicks from economy order by id desc limit 1"));
$today = date("Y-m-d");
$signups2 = mysql_query("select * from tbl_dailystat where date='$today'");
$signups = mysql_fetch_array($signups2);
$balls = $view[clicks]?>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Immortalix - A Free Online MMORPG/PBBG</title>
<meta name="keywords" content="">
<meta name="description" content="">
<link href="default.css" rel="stylesheet" type="text/css">
</head>
<body>
<table width="982" border="0" align="center" cellpadding="0" cellspacing="0" class="bg1">
<tr>
	<td><table width="982" border="0" align="center" cellpadding="0" cellspacing="0" class="bg2">
			<tr>
				<td><table width="950" border="0" align="center" cellpadding="0" cellspacing="0">
						<tr>
							<td width="273"><img src="images/homepage06.jpg" alt="" width="273" height="141"></td>
							<td width="677"><img src="images/homepage07.jpg" alt="" width="677" height="141"></td>
						</tr>
						<tr>
							<td colspan="2" class="bg3" style="height:50px;"><table width="950" border="0" cellspacing="0" cellpadding="0" style="height:50px;">
									<tr>
										<td width="33"> </td>
										<td valign="middle" class="text2"><a href="#." class="link1"></a><a href="#" class="link1"></a><img src="images/spacer.gif" alt="" width="1" height="1" hspace="15"><a href="#" class="link1"></a><img src="images/spacer.gif" alt="" width="1" height="1" hspace="15"><a href="#" class="link1"></a><img src="images/spacer.gif" alt="" width="1" height="1" hspace="15"><a href="#" class="link1"></a><img src="images/spacer.gif" alt="" width="1" height="1" hspace="15"><a href="#" class="link1"></a>
											<table border="0" cellspacing="0" cellpadding="0">
												<tr>
													<td><a href="index.php" class="link1">Home</a></td>
													<td><img src="images/subpage1_02.jpg" alt="" width="4" height="16" hspace="15"></td>
													<td><a href="signup.php" class="link1">Register</a></td>
													<td><img src="images/subpage1_02.jpg" alt="" width="4" height="16" hspace="15"></td>
													<td><a href="verify.php" class="link1">Verify New Account</a></td>
													<td><img src="images/subpage1_02.jpg" alt="" width="4" height="16" hspace="15"></td>
													<td><a href="gamerules.php" class="link1">Game Rules</a></td>
													<td><img src="images/subpage1_02.jpg" alt="" width="4" height="16" hspace="15"></td>
													<td><a href="help.php" class="link1">Help Files</a></td>
													<td><img src="images/subpage1_02.jpg" alt="" width="4" height="16" hspace="15"></td>                         		<td><a href="staff.php" class="link1">Staff</a></td>
													<td><img src="images/subpage1_02.jpg" alt="" width="4" height="16" hspace="15"></td>
													<td><a href="contact.php" class="link1">Contact</a></td>
													<td><img src="images/subpage1_02.jpg" alt="" width="4" height="16" hspace="15"></td>
												</tr>
											</table></td>
										<td width="108" align="right" class="text1"><script language="JavaScript" type="text/javascript" src="date.js"></script></td>
										<td width="32"> </td>
									</tr>
								</table></td>
						</tr>
					</table>
					<table width="950" border="0" align="center" cellpadding="0" cellspacing="0">
						<tr valign="top">
							<td width="181"><table width="181" border="0" cellspacing="0" cellpadding="0">
									<tr>
										<td class="text2" style="background-image:url(images/homepage09.jpg); height:40px;"><table width="181" border="0" cellspacing="0" cellpadding="0">
												<tr>
													<td width="15"><img src="images/spacer.gif" alt="" width="15" height="40"></td>
													<td width="166" class="text2">Site Login</td>
												</tr>
											</table></td>
									</tr>
									<tr>
										<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
												<tr>


										<td><form name="form1" method="post" action="check.php">
												<table width="155" border="0" align="center" cellpadding="0" cellspacing="0">
													<tr>
														<td colspan="2"> </td>
													</tr>
													<tr>
														<td colspan="2" class="text1" style="height:25px;">Email:</td>
													</tr>
													<tr>
														<td colspan="2"><input name="email" type="text" class="input1"></td>
													</tr>
													<tr>
														<td colspan="2" class="text1" style="height:25px;">Password:</td>
													</tr>
													<tr>
														<td colspan="2"><input name="password" type="password" class="input1"></td>
													</tr>
													<tr>
														<td colspan="2"> </td>
													</tr>
													<tr>
														<td width="115"><p><a href="signup.php" class="link1">No Account?<br>
																Register for Free!</a></p> </td>
														<td width="43" align="right"><input name="imageField" type="image" src="images/homepage21a.jpg" align="right"></td>
													</tr>
													<tr>
														<td colspan="2"> </td>
													</tr>
												</table>
											</form></td>
                            
                            
                            
                            
												</tr>
											</table></td>
									</tr>
									<tr>
										<td><img src="images/homepage11.jpg" alt="" width="181" height="8"></td>
									</tr>
								</table>
								<table width="181" border="0" cellspacing="0" cellpadding="0">
									<tr>
										<td style="background-image:url(images/homepage09.jpg); height:40px;"><table width="181" border="0" cellspacing="0" cellpadding="0">
												<tr>
													<td width="15"><img src="images/spacer.gif" alt="" width="15" height="40"></td>
													<td width="166" class="text2">Latest Online Chat</td>
												</tr>
											</table></td>
									</tr>
<td bgcolor="#000000">
<table cellpadding="4" cellspacing="4"><tr><td>

<?php

$chatpull = mysql_query("SELECT * FROM chat_lines where staff != 1 and private = '0' ORDER BY timesent DESC, id ASC limit 0,10");

echo "<font face=Verdana size=1>";

while ($display=mysql_fetch_array($chatpull)){

$display[message] = str_replace("`namey`", "$playerinfo[username]", $display[message]);

$display[username] = str_replace("<a href=view.php?id=$display[userid] target=_parent>", "", $display[username]);

if(!$display[username]){

echo "</font>$display[message]</font></u></i></b></b></em></i></u></strike></b></i></u></strike></font></span><br>";}

else{

$find = mysql_query("select * from userdb where id='$display[userid]'");

$find2 = mysql_fetch_array($find);



if ($find2[status] == "Member") {

echo "</font><font color=#808080>$display[username]</font>> $display[message]</font></u></b></em></i></u></strike></b></i></u></strike></font></i></b></span><br>";}

else {

echo "</font>$display[username]> $display[message]</font></u></b></em></i></u></strike></b></i></u></strike></font></i></b></span><br>";

}}}?>

</td></tr></table>
                    
                    
									<tr>
										<td><img src="images/homepage11.jpg" alt="" width="181" height="8"></td>
									</tr>
								</table>
								</td>
							<td width="589"><table width="589" border="0" cellspacing="0" cellpadding="0">
									<tr>
										<td width="589" style="background-image:url(images/homepage13.jpg); height:40px;"><table width="181" border="0" cellspacing="0" cellpadding="0">
												<tr>
													<td width="15"><img src="images/spacer.gif" alt="" width="26" height="40"></td>
													<td width="166" class="text2"><? echo"$title"; ?> </td>
												</tr>
											</table></td>
									</tr>

You need to post gameconfig.php as well. xxxxxx out any sensitive information but don't change any syntax in the file.

 

Basically, we need to see all the relevant code to be able to determine what in your code is causing the problem.

ok, I found an include in the gameconfig file that was unnecessary, but it did not completely solve my problem.  I went to a different page which is shorter.  Here is the code. 

 

<?
session_start();
include("gameconfig.php");
$title = "Game Information- The Bank";
if(!$email || !$password){
error("field");
exit;}
if($playerinfo[jailtime] > 0){
    error("jail");
    exit;}
if($playerinfo[password] != $password){
error("password");}
else{
include("top.php");

//CAN ONLY VIEW INSIDE CORRECT CITY
if($playerinfo[city] == "side"){
  echo "You can't visit this place from the Countryside.<p>";
  echo "<a href = \"javascript:history.back()\"> Go Back </a>";
  include("bottom.php");
  exit;
}
else{
  if ($action != "withdraw" && $action != "deposit" && $action != "tdeposit"){
    echo "Welcome to the Bank. You can deposit your extra credits in here, to avoid having them stolen by attackers, or withdraw your funds to purchase that new equipment you desire.<br><br>";
?> <form method=post action=bank.php?action=withdraw> <?
    echo "<center><table border=1 cellspacing=0 cellpadding=5>";
    echo "<tr><td><center>Withdraw Gold</center></td><td><center><input type=text value=$playerinfo[bank] name=with size=12></center></td><td><center><input type=submit value=Withdraw></center></td></tr></form>";
?> <form method=post action=bank.php?action=deposit> <?
    echo "<tr><td><center>Deposit Gold</center></td><td><center><input type=text value=$playerinfo[gold] name=dep size=12></center></td><td><center><input type=submit value=Deposit></center></td></tr></form>";
    $tradeacct=mysql_query("select * from tradeaccount where id = '$playerinfo[id]'");
    $tradeamt = mysql_fetch_array($tradeacct);
    if (!$tradeamt[gold]){}
    else {
      if ($tradeamt[gold]>0){
?> <form method=post action=bank.php?action=tdeposit> <?
        echo "<tr><td><center>Deposit Trade Gold</center></td><td><center><input type=text value=$tradeamt[gold] name=dept size=12></center></td><td><center><input type=submit value=Deposit></center></td></tr></form>";
      }
    }
    echo "</table>";
  }

//WITHDRAWING GOLD FROM BANK
  if ($action == withdraw){
    if ($with > $playerinfo[bank] || $with <= 0){
      echo "<center>You cannot withdraw that amount.</center>";
      echo "<br><br><center>[<a href=bank.php>Back to the Bank</a>]</center>";
      echo "<br><br><center>[<a href=main.php>Back to Your Hut</a>]</center>";
      include("bottom.php");
      exit;
    }
    if (ctype_digit($with) != true){
      echo "<center>You need to enter a correct amount.</center>";
      include("bottom.php");
      exit;
    }
    mysql_query("update userdb set gold=gold+$with where id=$playerinfo[id]");
    mysql_query("update userdb set bank=bank-$with where id=$playerinfo[id]");
    echo "<center>You withdrew ".number_format($with)." gold.";
  }
//DEPOSITING GOLD INTO BANK
  if ($action == deposit){
    if ($dep > $playerinfo[gold] || $dep <= 0){
      echo "<center>You cannot deposit that amount.</center>";
      echo "<br><br><center>[<a href=bank.php>Back to the Bank</a>]</center>";
      echo "<br><br><center>[<a href=main.php>Back to Your Hut</a>]</center>";
      include("bottom.php");
      exit;
    }
    if (ctype_digit($dep) != true){
      echo "<center>You need to enter a correct amount.</center>";
      include("bottom.php");
      exit;
    }
    mysql_query("update userdb set gold=gold-$dep where id=$playerinfo[id]");
    mysql_query("update userdb set bank=bank+$dep where id=$playerinfo[id]");
    echo "<center>You deposited ".number_format($dep)." gold.</center>";
  }
//DEPOSITING TRADE GOLD INTO BANK
  if ($action == tdeposit){
    $tradeacct=mysql_query("select * from tradeaccount where id = '$playerinfo[id]'");
    $tradeamt = mysql_fetch_array($tradeacct);
    if ($dept > $tradeamt[gold] || $dept <= 0){
      echo "<center>You cannot deposit that amount.</center>";
      echo "<br><br><center>[<a href=bank.php>Back to the Bank</a>]</center>";
      echo "<br><br><center>[<a href=main.php>Back to Your Hut</a>]</center>";
      include("bottom.php");
      exit;
    }
    if (ctype_digit($dept) != true){
      echo "<center>You need to enter a correct amount.</center>";
      include("bottom.php");
      exit;
    }
    mysql_query("update tradeaccount set gold=gold-$dept where id=$playerinfo[id]");
    mysql_query("update userdb set bank=bank+$dept where id=$playerinfo[id]");
    echo "<center>You deposited ".number_format($dept)." gold.</center>";
  } 
  echo "<br><br><center>[<a href=main.php>Back to Your Hut</a>]</center>";}
  include("bottom.php");
}
?>

 

And here is gameconfig.php

 

<?php
$dbh=mysql_connect ("xxx", "xxx", "xxx") or die ('I cannot connect to the database because: ' . mysql_error());
mysql_select_db ("xxx");

ini_set('session.gc_maxlifetime', 300);

function sql_quote( $value ){
  if( get_magic_quotes_gpc() ){
    $value = stripslashes( $value );}
//check if this function exists
  if( function_exists( "mysql_real_escape_string" ) ){
    $value = mysql_real_escape_string( $value );}
  return $value;
}

if ($_SESSION["email"]){
$email=$_SESSION["email"];
$password=$_SESSION["password"];
}

$res = mysql_query("SELECT * FROM userdb WHERE email = '$email'");
$playerinfo = mysql_fetch_array($res);
mysql_free_result($res);
$time = date("j\/m H:i:s");
$realtime = time();

$ip=$_SERVER['REMOTE_ADDR'];
mysql_query("update userdb set active='$time' where email='$email'");
mysql_query("update userdb set active2='$realtime' where email='$email'");
mysql_query("update userdb set ipaddress='$ip' where email='$email'");

function jailerror($type, $email){
  if($type == "jail"){
    $res = mysql_query("SELECT * FROM userdb WHERE email='$email'");
    $playerinfo = mysql_fetch_array($res);
    mysql_free_result($res);
    include("style5.css");
    echo "<center><img src=\"images/dchaos.jpg\" border=0><br><br></center>";
    echo "<font color=red>You are in jail for another $playerinfo[jailtime] days.<p>Jailed by: <b>$playerinfo[jail_by]</b> for reason: <b>$playerinfo[jail_reason]</b>";
  }
}

function gem($type){
if($type == "c"){
	echo "<img src=\"images/gem_crystal.gif\">";}
if($type == "d"){
	echo "<img src=\"images/gem_diamond.gif\">";}
if($type == "e"){
	echo "<img src=\"images/gem_emerald.gif\">";}
if($type == "r"){
	echo "<img src=\"images/gem_ruby.gif\">";}
}

function error($type){
if($type == "field"){
	include "top.php";
	echo "<font color=red>You have left fields blank or you have been inactive for more than 5 minutes and your session has expired. Please <a href=\"index.php\">relogin</a></font>";
	include "bottom.php";}

if($type == "password"){
	include "top.php";
	echo "<font color=red>Incorrect password. Please <a href=\"index.php\">relogin</a></font>";
	include "bottom.php";}

if($type == "jail"){
	include "top.php";
	$res = mysql_query("SELECT * FROM userdb WHERE email='$email'");
	$playerinfo = mysql_fetch_array($res);
	echo "<font color=red>You are in jail for another $playerinfo[jailtime] days.<p>Jailed by: <b>$playerinfo[jail_by]</b> for reason: <b>$playerinfo[jail_reason]</b>";
	include "bottom.php";}

if($type == "verify"){
	include "top.php";
	echo "<font color=red>Verification required. Please <a href=verify.php>login</a> here.</font>";
	include "bottom.php";}
}

$act2=$_GET["act2"];
if ($act2 == ""){$act2=$_POST["act2"];}
$action=$_GET["action"];
if ($action == ""){$action=$_POST["action"];}
$action2=$_GET["action2"];
$accept=$_GET["accept"];
$acceptaps=$_POST["acceptaps"];
$acted=$_POST["acted"];
$addgem=$_POST["addgem"];
$age=$_POST["age"];
$agility=$_POST["agility"];
$agilreq=$_POST["agilreq"];
$amount=$_GET["amount"];
if ($amount == ""){$amount=$_POST["amount"];}
$announce=$_POST["announce"];
$ans=$_GET["ans"];
$ap=$_POST["ap"];
$arm=$_POST["arm"];
$arm2=$_POST["arm2"];
$arm_name=$_POST["arm_name"];
$arm_name2=$_POST["arm_name2"];
$armourer=$_POST["armourer"];
$armourer2=$_POST["armourer2"];
$attacks=$_POST["attacks"];
$bank=$_POST["bank"];
$bet=$_POST["bet"];
$bigcastle=$_POST["bigcastle"];
$blackid=$_POST["blackid"];
$body=$_POST["body"];
$box=$_GET["box"];
$buy=$_GET["buy"];
if ($buy == ""){$buy=$_POST["buy"];}
$banner=$_POST["banner"];
$bannera=$_POST["bannera"];
$banneri=$_POST["banneri"];
$belief=$_POST["belief"];
$cannon=$_POST["cannon"];
$cannounce=$_POST["cannounce"];
$castact=$_POST["castact"];
$castle=$_POST["castle"];
$catapolt=$_POST["catapolt"];
$challenge=$_GET["challenge"];
$change=$_POST["change"];
$changeit=$_POST["changeit"];
$choice=$_POST["choice"];
$check=$_POST["check"];
$city=$_POST["city"];
$clan5=$_POST["clan5"];
$clan_days=$_POST["clan_days"];
$clan_exp=$_POST["clan_exp"];
$clanb=$_GET["clanb"];
$clan_gold=$_POST["clan_gold"];
$clan_infl=$_POST["clan_infl"];
$clan_recieve=$_POST["clan_recieve"];
if ($clanb == ""){$clanb=$_POST["clanb"];}
$clant=$_GET["clant"];
$clantax=$_POST["clantax"];
$co=$_POST["co"];
$co2=$_POST["co2"];
$co_name=$_POST["co_name"];
$co_name2=$_POST["co_name2"];
$conf1=$_GET["conf1"];
$conf=$_GET["conf"];
if ($conf == ""){$conf=$_POST["conf"];}
$confirm=$_GET["confirm"];
if ($confirm == ""){$confirm=$_POST["confirm"];}
$coaccept=$_POST["coaccept"];
$codelnews=$_POST["codelnews"];
$coremove=$_POST["coremove"];
$coshop=$_POST["coshop"];
$costaff=$_POST["costaff"];
$cotreasury=$_POST["cotreasury"];
$counbrand=$_POST["counbrand"];
$country=$_POST["country"];
$crop=$_POST["crop"];
$crystals=$_POST["crystals"];
$credit=$_GET["credit"];
if ($credit == ""){$credit=$_POST["credit"];}
$days=$_GET["days"];
if ($days == ""){$days=$_POST["days"];}
$date=$_GET["date"];
$delete=$_POST["delete"];
$demote=$_GET["demote"];
$dep=$_POST["dep"];
$dept=$_POST["dept"];
$diamonds=$_POST["diamonds"];
$direction=$_GET["direction"];
$do=$_POST["do"];
$donorcreds=$_POST["donorcreds"];
$effect=$_POST["effect"];
$effect2=$_POST["effect2"];
$elixir=$_POST["elixir"];
$Email2=$_POST["Email2"];
$emblems=$_POST["emblems"];
$emeralds=$_POST["emeralds"];
$energy=$_POST["energy"];
$evasion=$_POST["evasion"];
$exercise=$_POST["exercise"];
$exp=$_POST["exp"];
$exp_lvl=$_POST["exp_lvl"];
$faith=$_POST["faith"];
$fg=$_POST["fg"];
$fromid=$_GET["fromid"];
$fs=$_POST["fs"];
if ($fromid == ""){$fromid=$_POST["fromid"];}
$gender=$_POST["gender"];
$gold=$_POST["gold"];
$gtax=$_POST["gtax"];
$hacks=$_POST["hacks"];
$HP=$_POST["HP"];
$HP_left=$_POST["HP_left"];
$id=$_GET["id"];
if ($id == ""){$id=$_POST["id"];}
$info=$_POST["info"];
$itemtag=$_POST["itemtag"];
$jailtime=$_POST["jailtime"];
$job=$_POST["job"];
$justnews=$_GET["justnews"];
$keys=$_GET["keys"];
if ($keys == ""){$keys=$_POST["keys"];}
$lcrystal=$_POST["lcrystal"];
$ldiamond=$_POST["ldiamond"];
$lemerald=$_POST["lemerald"];
$level=$_GET["level"];
if ($level == ""){$level=$_POST["level"];}
$level2=$_GET["level2"];
if ($level2 == ""){$level2=$_POST["level2"];}
$lvlreq=$_POST["lvlreq"];
$levelreward=$_POST["levelreward"];
$lopal=$_POST["lopal"];
$losses=$_POST["losses"];
$lruby=$_POST["lruby"];
$lucky=$_POST["lucky"];
$lvlreq=$_POST["lvlreq"];
$Mana=$_POST["Mana"];
$mcrystal=$_POST["mcrystal"];
$mdiamond=$_POST["mdiamond"];
$membertax=$_POST["membertax"];
$membo=$_POST["membo"];
$memerald=$_POST["memerald"];
$message=$_POST["message"];
$mod=$_POST["mod"];
$mod2=$_POST["mod2"];
$moddelnews=$_POST["moddelnews"];
$moderator=$_POST["moderator"];
$moderator2=$_POST["moderator2"];
$mod_name=$_POST["mod_name"];
$mod_name2=$_POST["mod_name2"];
$mopal=$_POST["mopal"];
$mruby=$_POST["mruby"];
$msg=$_POST["msg"];
$mythore=$_POST["mythore"];
$mythril=$_POST["mythril"];
$name=$_GET["name"];
if ($name == ""){$name=$_POST["name"];}
$nectar=$_POST["nectar"];
$newann=$_POST["newann"];
$newdet=$_POST["newdet"];
$newname=$_POST["newname"];
$news=$_POST["news"];
$newscreds=$_POST["newscreds"];
$newsig=$_POST["newsig"];
$npccreds=$_POST["npccreds"];
$npcid=$_GET["npcid"];
$nickname=$_POST["nickname"];
$note=$_POST["note"];
$number=$_POST["number"];
$opals=$_POST["opals"];
$open=$_GET["open"];
$option=$_GET["option"];
$otherclanid=$_GET["otherclanid"];
$otherclanname=$_GET["otherclanname"];
$owner=$_POST["owner"];
$owner_name=$_POST["owner_name"];
$padmin=$_POST["padmin"];
$padmin2=$_POST["padmin2"];
$page=$_GET["page"];
$pass=$_GET["pass"];
if ($pass == ""){$pass=$_POST["pass"];}
$password2=$_POST["password2"];
$peqid=$_GET["peqid"];
if ($peqid == ""){$peqid=$_POST["peqid"];}
$per2=$_POST["per2"];
$phrase=$_POST["phrase"];
$postid=$_GET["postid"];
$potions=$_POST["potions"];
$power=$_POST["power"];
$price=$_POST["price"];
$promote=$_GET["promote"];
if ($promote == ""){$promote=$_POST["promote"];}
$race=$_POST["race"];
$reason=$_GET["reason"];
if ($reason == ""){$reason=$_POST["reason"];}
$redirect2=$_POST["redirect2"];
$removeid=$_GET["removeid"];
$repeat=$_POST["repeat"];
$rexp=$_POST["rexp"];
$rexpneed=$_POST["rexpneed"];
$reward=$_POST["reward"];
$rkeys=$_POST["rkeys"];
$rubys=$_POST["rubys"];
$scrystal=$_POST["scrystal"];
$sdiamond=$_POST["sdiamond"];
$semerald=$_POST["semerald"];
$sendid=$_GET["sendid"];
if ($sendid == ""){$sendid=$_POST["sendid"];}
$sendto=$_POST["sendto"];
$senduser=$_GET["senduser"];
if ($senduser == ""){$senduser=$_POST["senduser"];}
$shinu=$_POST["shinu"];
$showid=$_GET["showid"];
$skill=$_POST["skill"];
$so=$_GET["so"];
$sockets=$_POST["sockets"];
$sopal=$_POST["sopal"];
$sruby=$_POST["sruby"];
$status=$_POST["status"];
$status1=$_POST["status1"];
$step=$_GET["step"];
if ($step == ""){$step=$_POST["step"];}
$strength=$_POST["strength"];
$strreq=$_POST["strreq"];
$subject=$_POST["subject"];
$syphon=$_POST["syphon"];
$tact=$_POST["tact"];
$tact2=$_POST["tact2"];
$tactician=$_POST["tactician"];
$tactician2=$_POST["tactician2"];
$tact_name=$_POST["tact_name"];
$tact_name2=$_POST["tact_name2"];
$tax=$_POST["tax"];
$text=$_POST["text"];
$text1=$_POST["text1"];
$text2=$_POST["text2"];
$text3=$_POST["text3"];
$toid=$_GET["toid"];
if ($toid == ""){$toid=$_POST["toid"];}
$topicid=$_GET["topicid"];
$total=$_POST["total"];
$total2=$_POST["total2"];
$tid=$_GET["tid"];
$timestampopt=$_POST["timestampopt"];
$topicid=$_GET["topicid"];
$trader=$_POST["trader"];
$tradeto=$_GET["tradeto"];
if ($tradeto == ""){$type=$_POST["tradeto"];}
$tradeto2=$_POST["tradeto2"];
$truceaction=$_GET["truceaction"];
$truceyn=$_GET["truceyn"];
$ts=$_POST["ts"];
$type=$_GET["type"];
if ($type == ""){$type=$_POST["type"];}
$user=$_POST["user"];
$view=$_GET["view"];
if ($view == ""){$view=$_POST["view"];}
$vote=$_GET["vote"];
$wall=$_POST["wall"];
$wco=$_POST["wco"];
$wid=$_GET["wid"];
$wins=$_POST["wins"];
$with=$_POST["with"];
$xco=$_POST["xco"];
$yco=$_POST["yco"];


$f_id=$_POST["f_id"];
$f_amnt=$_POST["f_amnt"];
$small_package=$_POST["small_package"];
$medium_package=$_POST["medium_package"];
$large_package=$_POST["large_package"];
$clan_package=$_POST["clan_package"];
$custom_packages=$_POST["custom_packages"];
$packages=$_POST["packages"];
$donated=$_POST["donated"];
$justdonated=$_POST["justdonated"];
$totaldonated=$_POST["totaldonated"];
$rank=$_POST["rank"];
$d_id=$_GET["d_id"];
if ($d_id == ""){$d_id=$_POST["d_id"];}
$f_id=$_GET["f_id"];
if ($f_id == ""){$f_id=$_POST["f_id"];}
?>

 

 

The previous gives me the following:

 

0){ error("jail"); exit;} if($playerinfo[password] != $password){ error("password");} else{ include("top.php"); //CAN ONLY VIEW INSIDE CORRECT CITY if($playerinfo[city] == "side"){ echo "You can't visit this place from the Countryside.

 

"; echo " Go Back "; include("bottom.php"); exit;} else{ if ($action != "withdraw" && $action != "deposit" && $action != "tdeposit"){ echo "Welcome to the Bank. You can deposit your extra credits in here, to avoid having them stolen by attackers, or withdraw your funds to purchase that new equipment you desire.

 

"; ?>

"; echo ""; ?> "; $tradeacct=mysql_query("select * from tradeaccount where id = '$playerinfo[id]'"); $tradeamt = mysql_fetch_array($tradeacct); if (!$tradeamt[gold]){} else { if ($tradeamt[gold]>0){ ?> "; } } echo "

Withdraw Gold

 

 

Deposit Gold

 

 

Deposit Trade Gold

 

 

"; } //WITHDRAWING GOLD FROM BANK if ($action == withdraw){ if ($with > $playerinfo[bank] || $with <= 0){ echo "

You cannot withdraw that amount.

"; echo "

 

[back to the Bank]

"; echo "

 

[back to Your Hut]

"; include("bottom.php"); exit;} if (ctype_digit($with) != true){ echo "

You need to enter a correct amount.

"; include("bottom.php"); exit;} mysql_query("update userdb set gold=gold+$with where id=$playerinfo[id]"); mysql_query("update userdb set bank=bank-$with where id=$playerinfo[id]"); echo "

You withdrew ".number_format($with)." gold.";} //DEPOSITING GOLD INTO BANK if ($action == deposit){ if ($dep > $playerinfo[gold] || $dep <= 0){ echo "

You cannot deposit that amount.

"; echo "

 

[back to the Bank]

"; echo "

 

[back to Your Hut]

"; include("bottom.php"); exit;} if (ctype_digit($dep) != true){ echo "

You need to enter a correct amount.

"; include("bottom.php"); exit;} mysql_query("update userdb set gold=gold-$dep where id=$playerinfo[id]"); mysql_query("update userdb set bank=bank+$dep where id=$playerinfo[id]"); echo "

You deposited ".number_format($dep)." gold.

";} //DEPOSITING TRADE GOLD INTO BANK if ($action == tdeposit){ $tradeacct=mysql_query("select * from tradeaccount where id = '$playerinfo[id]'"); $tradeamt = mysql_fetch_array($tradeacct); if ($dept > $tradeamt[gold] || $dept <= 0){ echo "

You cannot deposit that amount.

"; echo "

 

[back to the Bank]

"; echo "

 

[back to Your Hut]

"; include("bottom.php"); exit; } if (ctype_digit($dept) != true){ echo "

You need to enter a correct amount.

"; include("bottom.php"); exit; } mysql_query("update tradeaccount set gold=gold-$dept where id=$playerinfo[id]"); mysql_query("update userdb set bank=bank+$dept where id=$playerinfo[id]"); echo "

You deposited ".number_format($dept)." gold.

"; } echo "

 

[back to Your Hut]

";} include("bottom.php");}?>

 

 

Now as you can tell, the code was simply cut off an returned to html in the middle of this command:  if($playerinfo[jailtime] > 0){  What is it that can cause that?

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.