Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[PHP Issue] Trying to include php code in a html content box but it is giving issues

Newbie Spellweaver
Joined
Aug 22, 2008
Messages
56
Reaction score
3
Code:
<?php
include "config.php";

//Check wether user is logged in or not.
session_start();
if(!session_is_registered(user)){
header("location:login.php");
} 

include "onlinecheck.php";

//Get user information
//Username is really easy, its just to get data from the session
$username = $_SESSION['user']; //retrieve data

//However, now comes the difficult part, we got to retrieve data from the db for the other vars
mysql_connect("$dbhost", "$dbusername", "$dbpassword")or die("Feil ved databaseoppkobling!");
mysql_select_db("$dbdatabase")or die("Kan ikke velge database");

$sql="SELECT * FROM `users` WHERE username='$username'";
$result=mysql_query($sql);

// Mysql_num_row is counting table row
$count=mysql_num_rows($result);

if($count==1){

while($data = mysql_fetch_object($result))
{
    $city = $data->city;
	include "phpfuncs/cityname.php";
	
	$dead = $data->dead;
	
    $money = $data->money;
	$money_formatted = number_format($money);
	$urank = $data->urank;
	$faction = $data->faction;
    include "phpfuncs/factionname.php";
	
	$rank = $data->rank;
	include "phpfuncs/rankname.php";
	
	$rankpoints = $data->rankpoints;
} 

}
else {
die("User doesnt exist?");
}

if ($dead == 1)
{
echo "Du har blitt drept.";
die;
}

$ip = $_SERVER['REMOTE_ADDR'];

$timeOfDay = date("H:i:s");  
$date = date("F j, Y");
?>

<html>
<meta http-equiv="content-type" content="text/html;charset=ISO-8859-1"><!-- /Added by HTTrack -->
<head>
<title>Undergrunnen - ?</title>
<meta name="description" content="Et tekstbasert online mafia spill hvor du kjemper om å bli den mest mektige gudfaren. Start opp din egen gjeng, eget firma eller spill bort pengene i et casino i Oslo. Driv med streetracing og tjen penger, stjel biler, lag film, gjør en kriminell handling, driv med organisert krim og mye mer!">
<meta name="keywords" content="nordicmafia, norskmafia, gangster, rpg, online, tekstbasert, streetracing, krim, kriminalitet, stjel, mafia, mafioso, textbased, norsk, gangsta, spill, game, organisert krim, organized, oc, crime, biltyveri">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<LINK REL="SHORTCUT ICON" href="favicon.ico">
<META HTTP-EQUIV="Content-Language" CONTENT="no-bok">
<LINK REL="stylesheet" type="text/css" href="stil.css">
 <script type="text/javascript" src="jquery.js"></script>          
 <script type="text/javascript">                                         

 //JS Code here
 
function numbersonly(myfield, e, dec) {
	var key;
	var keychar;
	if (window.event)
		key = window.event.keyCode;
	else if (e)
		key = e.which;
	else return true;
	keychar = String.fromCharCode(key);
	// control keys
	if ((key==null) || (key==0) || (key==8) || (key==9) || (key==13) || (key==27) )
		return true;
	// numbers
	else if ((("0123456789").indexOf(keychar) > -1))
		return true;
	// decimal point jump
	else if (dec && (keychar == ".")) {
		myfield.form.elements[dec].focus();
		return false;
	} else
		return false;
}
//-->
var currenttime = '<?php echo "$date"; ?> <?php echo "$timeOfDay"; ?>'
var montharray=new Array("Januar","Februar","Mars","April","Mai","Juni","Juli","August","September","Oktober","November","Desember")
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 datestring=padlength(serverdate.getDate())+". "+montharray[serverdate.getMonth()]+" "+serverdate.getFullYear()
var timestring=padlength(serverdate.getHours())+":"+padlength(serverdate.getMinutes())+":"+padlength(serverdate.getSeconds())
document.getElementById("servertid").innerHTML=datestring+" "+timestring
}
</script>

<SCRIPT LANGUAGE="JavaScript">
<!-- Start
var submitcount=0;

function checkFields() {
   {
   if (submitcount == 0)
      {
      submitcount++;
      return true;
      }
   else 
      {
      return false;
      }
   }
}
//  Slutt -->
</script>
<script language="JavaScript">
<!-- Start
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=500,height=500');");
}
// Slutt -->
</script>
</head>
<body onLoad="displaytime(); setInterval('displaytime()', 1000 )">
<div id="overDiv" style="position:absolute; visibility:hidden; z-index:1000;"></div>
<table border="0" width="750" id="table1" align="center" cellspacing="0" cellpadding="0">
	<tr><td width="75" colspan="3" align="left" valign="top" style="padding-bottom: 10px;">
		<table border="0" width="750" id="table2" cellspacing="0" cellpadding="0">
			<tr><td align="left" valign="top">
				<a href="login735f.html?side=hoved"><img border="0" src="http://forum.ragezone.com/images/nordic/designbilder/logo.jpg">
				</a></td><td align="left" valign="middle"><img border="0" src="http://forum.ragezone.com/images/nordic/designbilder/hoyre_logo.png" title="">
				<br><br><font color="#4682B4"><b>Hjelp med å spille? <a href="content.php?file=faq.html" target="main" style="color: #4682B4">Les FAQ</a> - <a href="login735f.html?side=support" style="color: #4682B4">In-game Support!</a></b></font>	
				</td></tr></table></td></tr><tr><td width="145" align="left" valign="top">
				<table border="0" width="100%" id="table3" cellspacing="0" cellpadding="0">
			<tr style="background: url(images/nordic/designbilder/menybar.gif);" width="145" height="16">
				<td align="center">
				<b>Hoved</b>
				</td>
			</tr>
			<tr>
				<td class="menuborder" style="padding-top: 4px; padding-bottom: 3px">
				<table border="0" width="100%"  cellspacing="0" cellpadding="0" class="menuarea">
				<tr width="100%">
				<td width="100%" valign="top"><a href="login735f.html?side=poeng"><b><s>Poenghandel</s></b></a><br></td>
				</tr>
				<tr width="100%">
				<td width="100%" valign="top"><a href="login735f.html?side=poverfor"><b>Overfør Poeng</b></a><br></td>
				</tr>
				<tr width="100%">
				<td width="100%" valign="top"><a href="bank.php" target="main"><b>Banken</b></a><br></td>
				</tr>
				<tr width="100%">
				<td width="100%" valign="top"><a href="login735f.html?side=bedriftsbank"><b>Bedriftsbanken</b></a><br></td>
				</tr>
				<tr width="100%">
				<td width="100%" valign="top"><a href="login735f.html?side=politi"><b>Politistasjon</b></a><br></td>
				</tr>
				<tr width="100%">
				<td width="100%" valign="top"><a href="login735f.html?side=politinytt"><b>Politinytt</b></a><br></td>
				</tr>
				<tr width="100%">
				<td width="100%" valign="top"><a href="login735f.html?side=fest"><b>Fester</b></a><br></td>
				</tr>
				<tr width="100%">
				<td width="100%" valign="top"><a href="login735f.html?side=eiendom"><b>Eiendom</b></a><br></td>
				</tr>
				<tr width="100%">
				<td width="100%" valign="top"><a href="login735f.html?side=omrader"><b>Territorium</b></a><br></td>
				</tr>
				<tr width="100%">
				<td width="100%" valign="top"><a href="login735f.html?side=lesavis"><b>Les Avis</b></a><br></td>
				</tr>
				<tr width="100%">
				<td width="100%" valign="top"><a href="etc/airport.php" target="main"><b>Flyplass</b></a><br></td>
				</tr>
				<tr><td><br></td></tr>
				<tr width="100%">
				<td width="100%" valign="top"><a href="funcs/krim.php" target="main"><b>Kriminalitet</b></a><br></td>
				</tr>
				<tr width="100%">
				<td width="100%" valign="top"><a href="login735f.html?side=utpressing"><b>Utpressing</b></a><br></td>
				</tr>
				<tr width="100%">
				<td width="100%" valign="top"><a href="login735f.html?side=drep"><b>Drep</b></a><br></td>
				</tr>
				<tr width="100%">
				<td width="100%" valign="top"><a href="login735f.html?side=sykehus"><b>Sykehus</b></a><br></td>
				</tr>
				<tr width="100%">
				<td width="100%" valign="top"><a href="login735f.html?side=hitlist"><b>Hitlist</b></a><br></td>
				</tr>
				<tr width="100%">
				<td width="100%" valign="top"><a href="login735f.html?side=gta"><b>Biltyveri/Garasje</b></a><br></td>
				</tr>
				<tr width="100%">
				<td width="100%" valign="top"><a href="login735f.html?side=oc"><b>Organisert Krim</b></a><br></td>
				</tr>
				<tr width="100%">
				<td width="100%" valign="top"><a href="login735f.html?side=skytetrening"><b>Skytetrening</b></a><br></td>
				</tr>
				<tr width="100%">
				<td width="100%" valign="top"><a href="login735f.html?side=cdgny"><b>Club dè Gangster</b></a><br></td>
				</tr>
				<tr width="100%">
				<td width="100%" valign="top"><a href="login735f.html?side=oppdrag"><b>Oppdrag</b></a><br></td>
				</tr>
				
				<tr><td><br></td></tr>
						
				<tr width="100%">
				<td width="100%" valign="top"><a href="login735f.html?side=fightclub"><b>Fight Club</b></a><br></td>
				</tr>
				<tr width="100%">
				<td width="100%" valign="top"><a href="login735f.html?side=livvakt"><b>Livvaktutleie</b></a><br></td>
				</tr>
				<tr width="100%">
				<td width="100%" valign="top"><a href="login735f.html?side=plantasje"><b>Hasjplantasje</b></a><br></td>
				</tr>
				<tr width="100%">
				<td width="100%" valign="top"><a href="login735f.html?side=filmprod"><b>Filmproduksjon</b></a><br></td>
				</tr>
				<tr width="100%">
				<td width="100%" valign="top"><a href="login735f.html?side=racing&valg=mod"><b>Modifiser Bil</b></a><br></td>
				</tr>
				<tr width="100%">
				<td width="100%" valign="top"><a href="login735f.html?side=racing&valg=race"><b>Streetracing</b></a><br></td>
				</tr>
				<tr width="100%">
				<td width="100%" valign="top"><a href="jail.php" target="main"><b>Fengsel</b></a><br></td>
				</tr>
								
			</table>
			</td>
			</tr>

			<tr>
				<td>
				<img border="0" src="http://forum.ragezone.com/images/nordic/designbilder/left_bottom.gif" width="145" height="7" alt=""><br><br></td>
			</tr>
			<tr style="background: url(images/nordic/designbilder/menybar.gif);" width="145" height="16">
				<td align="center">
				<b>Annet</b>
				</td>
			</tr>
			<tr>
				<td class="menuborder" style="padding-top: 4px; padding-bottom: 3px">
				<table border="0" width="100%"  cellspacing="0" cellpadding="0" class="menuarea">
								<tr width="100%">
				<td width="100%" valign="top"><a href="login735f.html?side=kuler"><b>Kjøp Kuler</b></a><br></td>
				</tr>
				<tr width="100%">
				<td width="100%" valign="top"><a href="login735f.html?side=bruktbilo"><b>Kjøp Bruktbil</b></a><br></td>
				</tr>
				<tr width="100%">
				<td width="100%" valign="top"><a href="login735f.html?side=bruktbilo&akt=selg"><b>Selg Bruktbil</b></a><br></td>
				</tr>
				<tr width="100%">
				<td width="100%" valign="top"><a href="login735f.html?side=flyhandel"><b>Kjøp Fly</b></a><br></td>
				</tr>
				<tr width="100%">
				<td width="100%" valign="top"><a href="login735f.html?side=vapenhandel"><b>Kjøp Våpen</b></a><br></td>
				</tr>
				<tr width="100%">
				<td width="100%" valign="top"><a href="login735f.html?side=protecthandel"><b>Kjøp Beskyttelse</b></a><br></td>
				</tr>
				<tr width="100%">
				<td width="100%" valign="top"><a href="login735f.html?side=underground"><b>The Underground</b></a><br></td>
				</tr>
				
                <tr><td><br></td></tr>
				<tr width="100%">
				<td width="100%" valign="top"><a href="login735f.html?side=forsok"><b>Mordforsøk</b></a><br></td>
				</tr>
				<tr width="100%">
				<td width="100%" valign="top"><a href="login735f.html?side=rankbar"><b>Rankbar</b></a><br></td>
				</tr>
				<tr width="100%">
				<td width="100%" valign="top"><a href="etc/gjeng.php" target="main"><b>Gjengsenter</b></a><br></td>
				</tr>
                <tr width="100%">
				<td width="100%" valign="top"><a href="login735f.html?side=firmacp"><b>Firmapanel</b></a><br></td>
				</tr>
				<tr width="100%">
				<td width="100%" valign="top"><a href="login735f.html?side=openbud"><b>Statsauksjon</b></a><br></td>
				</tr>
                <tr width="100%">
				<td width="100%" valign="top"><a href="login735f.html?side=avisfirma"><b>Avisfirma</b></a><br></td>
				</tr>				
				
				<tr><td><br></td></tr>
				<tr width="100%">
				<td width="100%" valign="top"><a href="etc/mafiaoversikt.php" target="main"><b>Mafiaoversikt</b></a><br></td>
				</tr>
			</table>
			</td>
			</tr>
			<tr>
				<td style="padding-bottom: 10px"><img border="0" src="http://forum.ragezone.com/images/nordic/designbilder/left_bottom.gif" width="145" height="7" alt=""></td>
			</tr>
		
		<tr style="background: url(images/nordic/designbilder/menybar.gif);" width="145" height="16">
				<td align="center">
				<b>Gambling</b>
				</td>
			</tr>
			<tr>
				<td class="menuborder" style="padding-top: 4px; padding-bottom: 3px">
				<table border="0" width="100%"  cellspacing="0" cellpadding="0" class="menuarea">
			    <tr width="100%">
				<td width="100%" valign="top"><a href="login735f.html?side=poker5"><b>Poker <font color="red">(v.2)</font></b></a><br></td>
				</tr>
				<tr width="100%">
				<td width="100%" valign="top"><a href="login735f.html?side=chips"><b>Veksle Chips</b></a><br></td>
				</tr>
				<tr width="100%">
				<td width="100%" valign="top"><a href="login735f.html?side=blackjack"><b>Blackjack</b></a><br></td>
				</tr>
				<tr width="100%">
				<td width="100%" valign="top"><a href="login735f.html?side=keno"><b>Keno</b></a><br></td>
				</tr>
				<tr width="100%">
				<td width="100%" valign="top"><a href="login735f.html?side=lotto"><b>Lotto</b></a><br></td>
				</tr>
				<tr width="100%">
				<td width="100%" valign="top"><a href="login735f.html?side=hestelop"><b>Veddeløpsbanen</b></a><br></td>
				</tr>
				<tr width="100%">
				<td width="100%" valign="top"><a href="login735f.html?side=russisk"><b>Russisk Rulett</b></a><br></td>
				</tr>
				<tr width="100%">
				<td width="100%" valign="top"><a href="login735f.html?side=nummer"><b>Nummerspillet</b></a><br></td>
				</tr>
			</table>
			</td>
			</tr>
			<tr>
				<td style="padding-bottom: 10px"><img border="0" src="http://forum.ragezone.com/images/nordic/designbilder/left_bottom.gif" width="145" height="7" alt=""></td>
			</tr>
		</table>
		</td>
		<td width="570" align="left" valign="top" style="padding-left: 5px; padding-right: 5px;">
				<table border="0" width="570" cellspacing="0" cellpadding="0">
			<!--<tr>
				<td width="570" align="right" style="border-top:1px solid #6F6F6F; border-right:1px solid #6F6F6F; background-color: #111111; padding-right: 5px" nowrap><br><br><br></td>
			</tr> -->
			<tr>
<div id="content" style="min-height: 300px;">
<div align="right">
<span class="nicktext">Beta </span><span id="servertid" class="nicktext"></span>
</div>

<div width="400">


<? 

$pa = $_GET["pa"];
if ($pa == null)
{
include "news.php";
} else {
include "$pa.php";
}
?>

</div>

<br>
</div>

				
			</tr><!--
			<tr>
				<td width="450" colspan="4">
				<table border="0" width="100%" cellspacing="0" cellpadding="0">
					<tr>
						<td width="71"><img border="0" src="http://forum.ragezone.com/images/nordic/designbilder/bottom_left.gif" width="71" height="13" alt=""></td>
						<td width="100%"  style="background-image: url('images/nordic/designbilder/bottom_bg.gif'); background-repeat: repeat;"></td>
						<td width="235"><img border="0" src="http://forum.ragezone.com/images/nordic/designbilder/bottom_right.gif" width="500" height="13" alt=""></td>
					</tr>
				</table>
				</td>
			</tr>-->
			
			<tr>
				<td width="450" colspan="4" style="padding-top: 3px">
				</td>
			</tr>
		</table>
		
		</td>
		<td width="145" align="left" valign="top">

				<table border="0" width="100%" cellspacing="0" cellpadding="0">
			<tr style="background: url(designbilder/menybar.gif);" width="145" height="16">
				<td align="center">
				<b>Din Info</b>
				</td>
			</tr>
			<tr>
				<td class="menuborder" style="padding-top: 4px">
				<table border="0" width="100%" id="table4" cellspacing="0" cellpadding="0" class="crimsmenu">
					<tr>

						<td colspan="2" style="padding-bottom: 5px; border-bottom:1px solid #6F6F6F;">
						<table border="0" width="100%" id="table5" cellspacing="0" cellpadding="0">
							<tr>
								<td width="100%" align="left" valign="top">
								<div align="center"><span class="menuyellowtext"><a href="profil.php?user=<? echo "$username"; ?>" target="main"><?php echo "$username"; ?></a></span><br>
<a href="login735f.html?side=pm_inn">
<img border="0" src="http://forum.ragezone.com/images/nordic/iconer/flashpm.gif" alt="">
</a>
								<br>
								Rank: <span class="menuyellowtext"><? echo "$rankName"; ?><br>(<? echo "$rankpoints"; ?> pts)</span><br></div>

								Bosted: <span class="menuyellowtext"><?php echo "$cityName"; ?></span><br>
								Gjeng: <span class="menuyellowtext">Ingen</span><br>
								Mafia: <span class="menuyellowtext"><?php echo "$factionName"; ?></span><br>
								Penger: <span class="menuyellowtext"><?php echo "$money_formatted"; ?>kr</span><br>
								Kuler: <span class="menuyellowtext">0 stk</span><br>
							</tr>
						</table>
						</td>

					</tr>
					<tr>
						<td align="center" valign="top" width="50%" style="padding-bottom: 5px; padding-top: 5px; border-bottom:1px solid #6F6F6F;">
						Våpen:<br>
						<span class="menuyellowtext">Ingen</span><br><br>
						Beskyttelse:<br>
						<span class="menuyellowtext">Ingen</span><br>
 
					</tr>
					<tr>

						<td colspan="2" style="padding-bottom: 5px; padding-top: 3px; border-bottom:1px solid #6F6F6F;" align="center">
						Liv: 100%<br>
						 <table border="0" style="border-collapse: collapse;" width="130" cellspacing="0" cellpadding="0">
							<tr>
								<td style="border:1px solid #6F6F6F;">
								<table border="0" cellspacing="0" cellpadding="0" width="100%">
									<tr>
										<td style="height: 11px; background-image: url('designbilder/bilde_liv.jpg'); background-repeat: repeat;" width="100%"></td>
										<td bgcolor="#111111" width="0%"></td>
									</tr>
								</table>
								</td>
							</tr>
						  </table>						
						</td>
					</tr>
					<tr>
				</table>
				</td>
			</tr>
			<tr>
				<td>

				<img border="0" src="http://forum.ragezone.com/images/nordic/designbilder/right_bottom.gif" width="145" height="7" alt=""><br>
				<br></td>
			</tr>
			<tr style="background: url(designbilder/menybar.gif);" width="145" height="16">
								<td align="center">
				<b>Kommunikasjon</b>
				</td>
			</tr>
			<tr>
				<td class="menuborder" style="padding-top: 4px; padding-bottom: 3px">
				<table border="0" width="100%" id="table8" cellspacing="0" cellpadding="0" class="menuarea">
				<tr width="100%">
				<td width="100%" valign="top"><a href="pm.php?mode=0" target="main"><b>Innboks</b></a><br></td>
				</tr>
				<tr width="100%">
				<td width="100%" valign="top"><a href="pm.php?mode=3" target="main"><b>Send Melding</b></a><br></td>
				</tr>
				<tr width="100%">
				<td width="100%" valign="top"><a href="login735f.html?side=pm_sendt"><b>Utboks/sendte meld.</b></a><br></td>
				</tr>
				<tr width="100%">
				<td width="100%" valign="top"><a href="login735f.html?side=kontakter"><b>Kontakter</b></a><br></td>
				</tr>
				<tr><td><br></td></tr>
				<tr width="100%">
				<td width="100%" valign="top"><a href="login735f.html?side=genforum"><b>Generelt forum</b></a><br></td>
				</tr>
				<tr width="100%">
				<td width="100%" valign="top"><a href="login735f.html?side=sokforum"><b>Salg/Søknad-forum</b></a><br></td>
				</tr>
				<tr width="100%">
				<td width="100%" valign="top"><a href="login735f.html?side=cdgforum"><b>CDG-forum</b></a><br></td>
				</tr>
				<tr width="100%">
				<td width="100%" valign="top"><a href="login735f.html?side=otforum"><b>Offtopic-forum</b></a><br></td>
				</tr>
				<tr width="100%">
				<td width="100%" valign="top"><a href="login735f.html?side=gjengforum"><b>Gjengforum</b></a><br></td>
				</tr>
			</table>
			</td>
			</tr>
			<tr>
				<td style="padding-bottom: 10px"><img border="0" src="http://forum.ragezone.com/images/nordic/designbilder/right_bottom.gif" width="145" height="7" alt=""></td>
			</tr>
			<tr><td>
				<img border="0" src="http://forum.ragezone.com/images/nordic/designbilder/system.gif" width="145" height="15" alt=""></td>
			</tr>
			<tr>
				<td class="menuborder" style="padding-top: 4px; padding-bottom: 3px">
				<table border="0" width="100%" cellspacing="0" cellpadding="0" class="action">

					<tr>
						<td width="97%" class="menupadding" colspan="2">
						<table border="0" width="100%" cellspacing="0" cellpadding="0" class="menuarea">
							<tr>
								<td>
								<span class="link">
								<a href="content.php?file=mainpage.php" target="main">Hovedside</a><br>
								<a href="login735f.html?side=poeng"><b>Poenghandel</b></a><br>
								<a href="login735f.html?side=support"><b>In-game Support</b></a><br>
								<a href="login735f.html?side=finn">Finn Spiller</a><br>
								<a href="content.php?file=onlineusers.php" target="main">Spillere Pålogget</a><br>
								<a href="content.php?file=medlemsliste.php" target="main">Medlemsliste</a><br>
							    <a href="endreprofil.php" target="main">Rediger profil</a><br>
								<a href="login735f.html?side=stats">Statistikk</a><br>
								<a href="login735f.html?side=dagensmord">Dagens mord</a><br>
								<a href="content.php?file=faq.html" target="main">FAQ</a><br>
                                <a href="content.php?file=chat.php" target="main">Chat</a><br>									
								<a href="login735f.html?side=kontaktinfo">Kontaktinformasjon</a><br>
                                <?
                                if (($urank == 1) || ($urank == 2))
                                {
                                ?>
								<a href="staff.php" target="main">Staff panel</a><br>
                                <?
                                }
                                ?>
                                <a href="login735f.html?side=kontaktinfo">Crap deluxe</a><br><br>								
								<form method="post" action="sys/logout.php"><div align="center"><input type="submit" value="Logg ut!" name="subloggut">                        <input type="hidden" name="luz"></div>
								</form>
								</span></td>
							</tr>
						</table>
						</td>
					</tr>
				</table>
				</td>
			</tr>
			<tr>
				<td><img border="0" src="http://forum.ragezone.com/images/nordic/designbilder/right_bottom.gif" width="100%" height="7"></td>
			</tr>
		</table>
	</td>
	</tr>
</table>
</body>

<!-- Mirrored from www.nordicmafia.net/nordic/logginn.php?>postfile:K:\crap\httrack\pages\Nordic%20Mafia\hts-post0 by HTTrack Website Copier/3.x [XR&CO'2010], Fri, 13 May 2011 19:24:22 GMT -->
<!-- Added by HTTrack --><meta http-equiv="content-type" content="text/html;charset=ISO-8859-1"><!-- /Added by HTTrack -->
</html>


Screenshot of problem:





the problem is at the include news.php i think, please help fast :thumbup1:
 
Last edited:
Joined
Jun 8, 2007
Messages
1,985
Reaction score
490
Don't just dump your problem and expect us to fix it.. Make your thread more clear.. Those screen shots are far too small, and I have no idea what you mean by "issues"

Plus that heap of PHP thrown carelessly together with HTML doesn't tell me anything, either.

We're not here to read through 500 lines of code to solve your problem.
 
Newbie Spellweaver
Joined
Aug 22, 2008
Messages
56
Reaction score
3
Don't just dump your problem and expect us to fix it.. Make your thread more clear.. Those screen shots are far too small, and I have no idea what you mean by "issues"

Plus that heap of PHP thrown carelessly together with HTML doesn't tell me anything, either.

We're not here to read through 500 lines of code to solve your problem.


trying to put this code:

<?

$pa = $_GET["pa"];
if ($pa == null)
{
include "news.php";
} else {
include "$pa.php";
}
?>


into an html content form:
<div id="content" style="min-height: 300px;">
<div align="right">
<span class="nicktext">Beta </span><span id="servertid" class="nicktext"></span>
</div>
<div width="400">

just wont fit in there, and the right menu bar just goes below aswell "look at the picture"

also click on the picture to make them bigger..
 
Joined
Jun 8, 2007
Messages
1,985
Reaction score
490
Just so you know,
PHP:
$pa = $_GET['pa'];
//...
include "$pa.php";
Is a hacker's dream.

I highly encourage you make some attempt to secure this. As is, it let's anyone viewing that web-page to put any path to any file on your server.

You can use REGEX if you please,
PHP:
if( array_key_exists($_GET, 'pa') )
{
    include( preg_replace('/[a-zA-Z0-9-_]/', $_GET['pa']) . '.php' );
} else {
    include( 'news.php' );
}
That only let's a hacker get any PHP file included from a given directory... A little better I guess..


If you wanted to get it even better, don't include PHP files at all- and make an array of allowed files to include.


Don't mean to beat a dead horse, but... :deadhorse:
The "pictures" are still "150px × 84px", clicking on them does nothing for me, and zooming in using CTRL++ just makes them blurry. Just put a link to the web-page with the issues.


Back on topic, it's an HTML/CSS issue.

Start by putting a <!doctype> on your document,
Example (Using the w3schools DTD for HTML Strict):
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

Example 2 (Using the w3schools DTD for XHTML Strict):
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

The fact that these are strict should force you to create standards-compliant, up-to-date web-sites.

You can always double-check your mark-up's standards-compliance here:


And your CSS here:



Once your web-page is standards-compliant, if the issue doesn't get resolved in the process, it should become more clear. Not to mention doing this will help you a lot in the future.

I have a feeling (unfortunately) this will take you a long time and lot's of work to validate, but the truth of the matter is, if it's not valid for any particular doctype, it's difficult (if not impossible) to give you an answer which suits all popular browsers. This goes for CSS standards compliance as well as mark-up.
 
Last edited:
Newbie Spellweaver
Joined
Aug 22, 2008
Messages
56
Reaction score
3
Just so you know,
PHP:
$pa = $_GET['pa'];
//...
include "$pa.php";
Is a hacker's dream.

I highly encourage you make some attempt to secure this. As is, it let's anyone viewing that web-page to put any path to any file on your server.

You can use REGEX if you please,
PHP:
if( array_key_exists($_GET, 'pa') )
{
    include( preg_replace('/[a-zA-Z0-9-_]/', $_GET['pa']) . '.php' );
} else {
    include( 'news.php' );
}
That only let's a hacker get any PHP file included from a given directory... A little better I guess..


If you wanted to get it even better, don't include PHP files at all- and make an array of allowed files to include.


Don't mean to beat a dead horse, but... :deadhorse:
The "pictures" are still "150px × 84px", clicking on them does nothing for me, and zooming in using CTRL++ just makes them blurry. Just put a link to the web-page with the issues.


Back on topic, it's an HTML/CSS issue.

Start by putting a <!doctype> on your document,
Example (Using the w3schools DTD for HTML Strict):
Code:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

Example 2 (Using the w3schools DTD for XHTML Strict):
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

The fact that these are strict should force you to create standards-compliant, up-to-date web-sites.

You can always double-check your mark-up's standards-compliance here:


And your CSS here:



Once your web-page is standards-compliant, if the issue doesn't get resolved in the process, it should become more clear. Not to mention doing this will help you a lot in the future.

I have a feeling (unfortunately) this will take you a long time and lot's of work to validate, but the truth of the matter is, if it's not valid for any particular doctype, it's difficult (if not impossible) to give you an answer which suits all popular browsers. This goes for CSS standards compliance as well as mark-up.


First of your code gives errors:

Code:
Warning: array_key_exists() [function.array-key-exists]: The second argument should be either an array or an object in /home/a5896421/public_html/mafia/index.php on line 374


Also this has nothing to do whit unvalid html or css, its about where i should place the include code to make it all fit.


Last heres the images:



 
Joined
Jun 8, 2007
Messages
1,985
Reaction score
490
First of your code gives errors:
Code:
Warning: array_key_exists() [function.array-key-exists]: The  second argument should be either an array or an object in  /home/a5896421/public_html/mafia/index.php on line 374
Just switch $_GET and 'pa'.. Next time you get a parse error like that, goto the PHP manual and look up the function- it could've told you that.
PHP:
array_key_exists('pa', $_GET)

You probably don't want this insight again, but your problem is, indeed, a layout/web-design issue.

Sure, you include that design using PHP, but PHP doesn't reflect the look & feel of a web-page, HTML and CSS do.

If you refuse to make your site w3c-standards-compliant, I refuse to help you with HTML/CSS.

Good day, sir.
 
Newbie Spellweaver
Joined
Aug 22, 2008
Messages
56
Reaction score
3
Just switch $_GET and 'pa'.. Next time you get a parse error like that, goto the PHP manual and look up the function- it could've told you that.
PHP:
array_key_exists('pa', $_GET)

You probably don't want this insight again, but your problem is, indeed, a layout/web-design issue.

Sure, you include that design using PHP, but PHP doesn't reflect the look & feel of a web-page, HTML and CSS do.

If you refuse to make your site w3c-standards-compliant, I refuse to help you with HTML/CSS.

Good day, sir.

i dont refuse lol but i dont think its the problem, when i used iframes and not includes it fit perfectly
 

SQL

Initiate Mage
Joined
Jul 4, 2011
Messages
3
Reaction score
1
This code is trashed and messy, not even worth using.
 
Junior Spellweaver
Joined
Dec 15, 2010
Messages
179
Reaction score
247
Just so you know,
PHP:
$pa = $_GET['pa'];
//...
include "$pa.php";
Is a hacker's dream.

I highly encourage you make some attempt to secure this. As is, it let's anyone viewing that web-page to put any path to any file on your server.

You can use REGEX if you please,
PHP:
if( array_key_exists($_GET, 'pa') )
{
    include( preg_replace('/[a-zA-Z0-9-_]/', $_GET['pa']) . '.php' );
} else {
    include( 'news.php' );
}
That only let's a hacker get any PHP file included from a given directory... A little better I guess..
It is still lfi vulnerable, why not
PHP:
$szIncludePath = "includes/page." . $_GET['pa'] . ".php";
if( file_exists( $szFilePath ) )
{
include( $szIncludePath ); 
}
else
{
include( "includes/page.home.php" );
}
 
Initiate Mage
Joined
Aug 28, 2012
Messages
1
Reaction score
0
Qoyjpxcfy

cheap coach purses <a href=http://www.bagsoutletus.net/>coach factory online</a>
Result: used x_fields.txt; chosen nickname "fochjzvfrh"; registered; logged in; success - posted to first encountered partition "forum,Interscoutisme,0,1,0"; BB-code not working;
 
Newbie Spellweaver
Joined
Apr 18, 2007
Messages
14
Reaction score
0
Code:
[COLOR=#333333]<? [/COLOR]

[COLOR=#333333]$pa = $_GET["pa"];[/COLOR]
[COLOR=#333333]if ($pa == null)[/COLOR]
[COLOR=#333333]{[/COLOR]
[COLOR=#333333]include "news.php";[/COLOR]
[COLOR=#333333]} else {[/COLOR]
[COLOR=#333333]include "$pa.php";[/COLOR]
[COLOR=#333333]}[/COLOR]
[COLOR=#333333]?>[/COLOR]

if(isset($_GET['pa'])){
require("news.php");
}
else
{
if(!isset($_GET['pa'])){
session_destroy();
header('Location: index.php');
}
}
}
 
Infraction Baɴɴed
Loyal Member
Joined
Apr 9, 2008
Messages
1,416
Reaction score
169
Code:
[COLOR=#333333]<? [/COLOR]

[COLOR=#333333]$pa = $_GET["pa"];[/COLOR]
[COLOR=#333333]if ($pa == null)[/COLOR]
[COLOR=#333333]{[/COLOR]
[COLOR=#333333]include "news.php";[/COLOR]
[COLOR=#333333]} else {[/COLOR]
[COLOR=#333333]include "$pa.php";[/COLOR]
[COLOR=#333333]}[/COLOR]
[COLOR=#333333]?>[/COLOR]

if(isset($_GET['pa'])){
require("news.php");
}
else
{
if(!isset($_GET['pa'])){
session_destroy();
header('Location: index.php');
}
}
}
not even going to tell you whats wrong with that but if you noticed this was necro bumped
 
Back
Top