Jump to content

Cant get onto Website


seany123

Recommended Posts

well i removed include header.php from index and it did then go to my website (with obvious script error messages)

 

this is my header.php:

 

<!-- Edit templates/header.php to edit the layout -->
<html>
<head>
<title>Mafiakiller<?=PAGENAME?></title>
<link rel="stylesheet" type="text/css" href="./templates/style.css" />
</head>
<body>
<div id="wrapper">

<div id="header">
<div id="header-text"> MAFIAKILLER
</div>
</div>

<div id="left">
<div class="left-section">
<ul>
<li><span class="header">Links</span></li>
<li><a href="index.php">Home</a></li>
<li><a href="register.php">Register</a></li>
</ul>
</div>

<div class="left-section">
<ul>
<li><span class="header">Other</span></li>
<li><a href="#">Vote for us!</a></li>
<li><a href="http://www.ezrpgproject.com/">ezRPG Project</a></li>
</ul>
</div>

<br />
</div>

<div id="right">
<div id="content">

 

this is my private_header.php:

 

<!-- Edit templates/private_header.php to edit the layout -->
<html>
<head>
<title>Mafiakiller <?=PAGENAME?></title>
<link rel="stylesheet" type="text/css" href="./templates/style.css" />
<style type="text/css">
<!--
.style2 {color: #FFFFFF; font-weight: bold; }
.style3 {color: #FFFFFF}
body {
background-color: #000000;
}
a:link {
color: #FF0000;
}
a:visited {
color: #FF0000;
}
a:hover {
color: #666666;
}
a:active {
color: #FF0000;
}
-->
</style>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head>
<body>
<div id="header">
<div id="header-text">
  <table width="906" border="0">
    <tr>
      <td width="297" height="185"><img src="http://images.cooltext.com/137128.gif" alt="Mafiakiller" width="435" height="130" border="0" /></td>
      <td width="87"> </td>
      <td width="508"><table width="449" border="1" align="center" cellpadding="0" cellspacing="0" bordercolor="#FF0000">
        <tr>
          <td height="4" colspan="10"></td>
        </tr>
        <tr>
          <td width="13"></td>
          <td width="59" height="20" class="style2">User:</td>
          <td width="13"></td>
          <td height="20" colspan="2"><span class="style3">
            <?=$player->username?>
          </span> </td>
          <td width="0"></td>
          <td width="74" height="20" class="style2">EXP</td>
          <td width="0"></td>
          <td width="90" height="20" align="left" valign="middle"> </td>
          <td width="0"></td>
        </tr>
        <tr>
          <td height="4" colspan="10"></td>
        </tr>
        <tr>
          <td width="13"></td>
          <td width="59" height="20" class="style2">Level:</td>
          <td width="13"></td>
          <td height="20" colspan="2"><span class="style3">
            <?=$player->level?>
          </span> </td>
          <td width="0"></td>
          <td width="74" height="20" class="style2">HP</td>
          <td width="0"></td>
          <td width="90" height="20" align="left" valign="middle"><img src="bargen.php?hp" alt="hp"></td>
          <td width="0"></td>
        </tr>
        <tr>
          <td height="4" colspan="10"></td>
        </tr>
        <tr>
          <td width="13"></td>
          <td width="59" height="20" class="style2">Money:</td>
          <td width="13"></td>
          <td height="20" colspan="2"><span class="style3">$<?=$player->money?>
            [<a href="bank.php?auto=1">deposit</a>]</span></td>
          <td width="0"></td>
          <td width="74" height="20" class="style2">Energy</td>
          <td width="0"></td>
          <td width="90" height="20" align="left" valign="middle"><img src="bargen.php?energy" alt="energy"></td>
          <td width="0"></td>
        </tr>
        <tr>
          <td height="4" colspan="10"></td>
        </tr>
        <tr>
          <td width="13"></td>
          <td width="59" height="20" class="style2">Balance:</td>
          <td width="13"></td>
          <td height="20" colspan="2"><span class="style3"><b>$<?=$player->bank?>
          </b></span></td>
          <td width="0"></td>
          <td width="74" height="20" class="style2">Awake</td>
          <td width="0"></td>
          <td width="90" height="20" align="left" valign="middle"><img src="bargen.php?awake" alt="awake"></td>
          <td width="0"></td>
        </tr>
        <tr>
          <td height="4" colspan="10"></td>
        </tr>
        <tr>
          <td width="13"></td>
          <td width="59" height="20" class="style2">Points:</td>
          <td width="13"></td>
          <td width="17" height="20"><span class="style3">
            <?=$player->points?>
          </span></td>
          <td width="184"><span class="style3">[<a href="points.php">use</a>] [<a href="upgrade.php">buy</a>]</span></td>
          <td width="0"></td>
          <td width="74" height="20" class="style2">Nerve</td>
          <td width="0"></td>
          <td width="90" height="20" align="left" valign="middle"><img src="bargen.php?nerve" alt="nerve"></td>
          <td width="0"></td>
        </tr>
        <tr>
          <td height="4" colspan="10"></td>
        </tr>
      </table></td>
    </tr>
  </table>
  <div align="center"></div>
</div>
</div>

<div id="left">
<table width="121" border="1" align="center" cellpadding="1" cellspacing="1" bordercolor="#FF0000">
  <tr>
    <td width="113" align="center" valign="middle" bordercolor="#990000" background="images/Menu_Title_Background.jpg" bgcolor="#000000"><span class="style2">Menu</span></td>
  </tr>
  <tr>
    <td width="113" align="left" valign="middle" bordercolor="#666666" bgcolor="#000000" onMouseOver="this.className='highlight'" onMouseOut="this.className='normal'"><a href="home.php" width="140">Home</a></td>
  </tr>
  <tr>
    <td width="113" align="left" valign="middle" bordercolor="#666666" bgcolor="#000000" onMouseOver="this.className='highlight'" onMouseOut="this.className='normal'"><a href="inventory.php">Inventory</a></td>
  </tr>
  <tr>
    <td width="113" align="left" valign="middle" bordercolor="#666666" bgcolor="#000000" onMouseOver="this.className='highlight'" onMouseOut="this.className='normal'"><a href="city.php">London</a></td>
  </tr>
  <tr>
    <td width="113" align="left" valign="middle" bordercolor="#666666" bgcolor="#000000" onMouseOver="this.className='highlight'" onMouseOut="this.className='normal'"><a href="bank.php">Bank</a></td>
  </tr>
  <tr>
    <td width="113" align="left" valign="middle" bordercolor="#666666" bgcolor="#000000" onMouseOver="this.className='highlight'" onMouseOut="this.className='normal'"><a href="gym.php">Gym</a></td>
  </tr>
  <tr>
    <td width="113" align="left" valign="middle" bordercolor="#666666" bgcolor="#000000" onMouseOver="this.className='highlight'" onMouseOut="this.className='normal'"><a href="Crime.php">Crime</a></td>
  </tr>
  <tr>
    <td width="113" align="left" valign="middle" bordercolor="#666666" bgcolor="#000000" onMouseOver="this.className='highlight'" onMouseOut="this.className='normal'"><a href="yourgang.php">Your Gang</a></td>
  </tr>
  <tr>
    <td width="113" align="left" valign="middle" bordercolor="#666666" bgcolor="#000000" onMouseOver="this.className='highlight'" onMouseOut="this.className='normal'"><a href="mailbox.php">Mail Box [0]</a></td>
  </tr>
  <tr>
    <td width=113 align=left valign=middle bordercolor=#666666 bgcolor=#000000 onMouseOver=this.className='highlight' onMouseOut=this.className='normal'><a href=gangmail.php>Gang Mail [0]</a></td>
  </tr>
  <tr>
    <td width="113" align="left" valign="middle" bordercolor="#666666" bgcolor="#000000" onMouseOver="this.className='highlight'" onMouseOut="this.className='normal'"><a href="events.php">Events [0]</a></td>
  </tr>
  <tr>
    <td width="113" align="left" valign="middle" bordercolor="#666666" bgcolor="#000000" onMouseOver="this.className='highlight'" onMouseOut="this.className='normal'"><a href="prison.php">Prison [0]</a></td>
  </tr>
  <tr>
    <td width="113" align="left" valign="middle" bordercolor="#666666" bgcolor="#000000" onMouseOver="this.className='highlight'" onMouseOut="this.className='normal'"><a href="hospital.php">Hospital [0]</a></td>
  </tr>
  <tr>
    <td width="113" align="left" valign="middle" bordercolor="#666666" bgcolor="#000000" onMouseOver="this.className='highlight'" onMouseOut="this.className='normal'"><a href="vets.php">Vets [0]</a></td>
  </tr>
  <tr>
    <td width="113" align="left" valign="middle" bordercolor="#666666" bgcolor="#000000" onMouseOver="this.className='highlight'" onMouseOut="this.className='normal'"><a href="pound.php">Dog Pound [0]</a></td>
  </tr>
  <tr>
    <td width="113" align="left" valign="middle" bordercolor="#666666" bgcolor="#000000" onMouseOver="this.className='highlight'" onMouseOut="this.className='normal'"><a href="spylogs.php">Spy Logs</a></td>
  </tr>
  <tr>
    <td width="113" align="left" valign="middle" bordercolor="#666666" bgcolor="#000000" onMouseOver="this.className='highlight'" onMouseOut="this.className='normal'"><a href="yourcars.php">Your Cars</a></td>
  </tr>
  <tr>
    <td width="113" align="left" valign="middle" bordercolor="#666666" bgcolor="#000000" onMouseOver="this.className='highlight'" onMouseOut="this.className='normal'"><a href="yourpets.php">Your Pets</a></td>
  </tr>
  <td width="113" align="left" valign="middle" bordercolor="#666666" bgcolor="#000000" onMouseOver="this.className='highlight'" onMouseOut="this.className='normal'"><a href="yourhof.php">HOF</a></td>
  </tr>
  <tr>
    <td width="113" align="left" valign="middle" bordercolor="#666666" bgcolor="#000000" onMouseOver="this.className='highlight'" onMouseOut="this.className='normal'"><a href="notepad.php">Note Pad</a></td>
  </tr>
  <tr>
    <td width="113" align="left" valign="middle" bordercolor="#666666" bgcolor="#000000" onMouseOver="this.className='highlight'" onMouseOut="this.className='normal'"><a href="search.php">Search</a></td>
  </tr>
  <tr>
    <td width="113" align="left" valign="middle" bordercolor="#666666" bgcolor="#000000" onMouseOver="this.className='highlight'" onMouseOut="this.className='normal'"><a href="chatroom.php">Chat Room</a></td>
  </tr>
  <tr>
    <td width="113" align="left" valign="middle" bordercolor="#666666" bgcolor="#000000" onMouseOver="this.className='highlight'" onMouseOut="this.className='normal'"><a href="forum.php">Forum</a></td>
  </tr>
  <tr>
    <td width="113" align="center" valign="middle" bordercolor="#FF0000" background="images/Menu_Title_Background.jpg" bgcolor="#000000" class="style2">Help</td>
  </tr>
  <tr>
    <td width="113" align="left" valign="middle" bordercolor="#666666" bgcolor="#000000" onMouseOver="this.className='highlight'" onMouseOut="this.className='normal'"><a href="supportdesk.php">Support Desk</a></td>
  </tr>
  <tr>
    <td width="113" align="left" valign="middle" bordercolor="#666666" bgcolor="#000000" onMouseOver="this.className='highlight'" onMouseOut="this.className='normal'"><a href="bbcode.php">BBCode Help</a></td>
  </tr>
  <tr>
    <td width="113" align="center" valign="middle" bordercolor="#FF0000" background="images/Menu_Title_Background.jpg" bgcolor="#000000" class="style2">Account</td>
  </tr>
  <tr>
    <td width="113" align="left" valign="middle" bordercolor="#666666" bgcolor="#000000" onMouseOver="this.className='highlight'" onMouseOut="this.className='normal'"><a href="editaccount.php">Edit Account</a></td>
  </tr>
  <tr>
    <td width="113" align="left" valign="middle" bordercolor="#666666" bgcolor="#000000" onMouseOver="this.className='highlight'" onMouseOut="this.className='normal'"><a href="contactlist.php">Contact List</a></td>
  </tr>
  <tr>
    <td width="113" align="left" valign="middle" bordercolor="#666666" bgcolor="#000000" onMouseOver="this.className='highlight'" onMouseOut="this.className='normal'"><a href="manageignores.php">Manage Ignores</a></td>
  </tr>
  <tr>
    <td width="113" align="left" valign="middle" bordercolor="#666666" background="/images/menu_spacer.gif" bgcolor="#000000" onMouseOver="this.className='highlight'" onMouseOut="this.className='normal'"><a href="upgrade.php">Upgrade</a></td>
  </tr>
  <tr>
    <td width="113" align="left" valign="middle" bordercolor="#666666" bgcolor="#000000" onMouseOver="this.className='highlight'" onMouseOut="this.className='normal'"><a href="logout.php">Logout</a></td>
  </tr>
</table>
<p> </p>
</div>

Link to comment
Share on other sites

index.php:

<?php

include("lib.php");
define("PAGENAME", "Home");

//Begin checking if user has tried to login
$error = 0; //Error count
$errormsg = "<font color=\"red\">"; //Error message to be displayed in case of error (modified below depending on error)
if ($_POST['login'])
{
if ($_POST['username'] == "")
{
	$errormsg .= "Please enter a username!";
	$error = 1;
}
else if ($_POST['password'] == "")
{
	$errormsg .= "Please enter your password!";
	$error = 1;
}
else if ($error == 0)
{
	$query = $db->execute("select `id`, `username` from `players` where `username`=? and `password`=?", array($_POST['username'], sha1($_POST['password'])));
	if ($query->recordcount() == 0)
	{
		$errormsg .= "You could not login! Please check your username/password!";
		$error = 1;
	}
	else
	{
		$player = $query->fetchrow();
		$query = $db->execute("update `players` set `last_active`=? where `id`=?", array(time(), $player['id']));
		$hash = sha1($player['id'] . $_SERVER['REMOTE_ADDR'] . $secret_key);
		$_SESSION['userid'] = $player['id'];
		$_SESSION['hash'] = $hash;
		header("Location: home.php");
	}
}
}
$errormsg .= "</font>";


include("templates/header.php");
?>

<table width="100%" border="0">
<tr>
<td width="60%">
<!-- Put your game description here! -->
Welcome to ezRPG!
Login now to play, or <a href="register.php">Register</a> to join the game!
<br /><br />
<i>Edit index.php to change this text and introduce your game.</i>
</td>
<td width="40%">
Login:<br />
<?=($error==1)?$errormsg:""?>
<form method="POST" action="index.php">
Username: <input type="text" name="username" value="<?=$_POST['username']?>" /><br />
Password: <input type="password" name="password" /><br />

<?php
$query = 'SELECT * FROM ext_general';
$command = mysql_query ($query);
$result = mysql_fetch_array ($command)
or die ($db_error);
$debug = $result['debug'];
if ($debug == 1)
{
print "Game Repair! Be Back soon!!";
}
else
{
?>
<input name="login" type="submit" value="Login!" />
<?
}
?>

</form>
</td>
</tr>
</table>

<?php
include("templates/footer.php");
?>

Link to comment
Share on other sites

well first your problem with your header script is in the section that adds your css add another period, on windows machines it causes a problem(not sure what it is, happened to me long ago) with linux boxes it will try to execute the css instead of appling it to the page(which is what could be causeing the redirect). Second I too see your missing some semicolons (;). Also make sure you are declaring the session_start() function. Also I would try to cut down on as much code seperation (btw if you want to show an input field or anything for that matter including your tables you can use the 'echo '';' function to do that, and as for the td structures you can just do that as variables then plug them in, in the echo's. (would help make your code load easier). If you need further help feel free to email me. (email is on my profile) Also if your using php and your forget to use a semicolon then it will either pop up with an error, won't load, or it won't load completely

Link to comment
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.