Jump to content

Why doesn't my page display correctly ? pls see below...


Recommended Posts

<?php
if (!$_SESSION["username"]) { 
session_start();
header("Cache-control: private");
}
?>

<html>

<head>

<title>Nintendo ROMS</title>

<style type="text/css">

    @import url(style.css);

</style>

</head>

<body>

<!--Logo-->
<img  id="logo" src="images/logo.png" alt="Nintendo ROMS Logo" width="700" height="100">

<!--Login/Logged area-->
<?php include("logarea.php"); ?>

<div id='navbar'><pre>  <a id='navbar2' href='index.php#add'><b>Add A ROM</b></a> | <a id='navbar2' href='about.php'>About</a> | <a id='navbar2' href='faq.php'>FAQ</a>  </pre></div>

<!--Game List-->
<?php include("gamelist.php"); ?>

<a name='add'><div id="add2" style="visibility:visible; z-index:2;">
<?php 

//echo "";
//$error=$_GET["error"];
//$error2=$_GET["error2"];
//echo "<font color=red>".$error."</font>";
//echo "<font color=red>".$error2."</font>";
$w=rand(1,10);
$w=substr($w,0,2);
$y=md5(rand(1,10));
$y=substr($w,0,2);
$z=$w.$y;
//echo "<a href='logout.php'>Log Out</a>";
echo "
<form method='post' action='addarom.php?var3=$z'>
<label id=gname for=gname><b>Game Name:</b></label> <input id=gname_input type='text' name='gamename' />
<label id=glink for=glink><b>Game Download Link:</b></label> <input id=glink_input type='text' name='gamelink' /><br><br>
<label id=grom for=grom><b>ROM Number:</b></label> <input id=grom_input type='text' name='gameromno' />
<label id=glang for=grom><b>Language:</b></label>"; 
$lang=array('English', 'Japanese', 'Other');
echo "<select id=glang_select name='language'>";
for ($i=0; $i<count($lang); $i++) {
echo "<option value=$lang[$i]>$lang[$i]</option>";
}
echo "</select>";
echo "<br><br>";

echo "<b>Enter this code $z </b>";
echo "<b>here:</b>";
echo "<input type='text' name='scode' />";
echo "<input type='submit' value='Add' />";        
echo "</form>";
?>
</div></a>

</body>
</html>

 

this section doesn't get displayed :

 

<a name='add'><div id="add2" style="visibility:visible; z-index:2;">
<?php 

//echo "";
//$error=$_GET["error"];
//$error2=$_GET["error2"];
//echo "<font color=red>".$error."</font>";
//echo "<font color=red>".$error2."</font>";
$w=rand(1,10);
$w=substr($w,0,2);
$y=md5(rand(1,10));
$y=substr($w,0,2);
$z=$w.$y;
//echo "<a href='logout.php'>Log Out</a>";
echo "
<form method='post' action='addarom.php?var3=$z'>
<label id=gname for=gname><b>Game Name:</b></label> <input id=gname_input type='text' name='gamename' />
<label id=glink for=glink><b>Game Download Link:</b></label> <input id=glink_input type='text' name='gamelink' /><br><br>
<label id=grom for=grom><b>ROM Number:</b></label> <input id=grom_input type='text' name='gameromno' />
<label id=glang for=grom><b>Language:</b></label>"; 
$lang=array('English', 'Japanese', 'Other');
echo "<select id=glang_select name='language'>";
for ($i=0; $i<count($lang); $i++) {
echo "<option value=$lang[$i]>$lang[$i]</option>";
}
echo "</select>";
echo "<br><br>";

echo "<b>Enter this code $z </b>";
echo "<b>here:</b>";
echo "<input type='text' name='scode' />";
echo "<input type='submit' value='Add' />";        
echo "</form>";
?>
</div></a>

 

why ?

gamelist.php is not working too.

 

this is gamelist.php:

 

<?php
$add=$_GET["add"];
echo $add;
$error3=$_GET["error3"];
echo $error3;
$var10=$_GET["var10"];
echo $var10;
$var11=$_GET["var11"];
echo $var11;
$not=$_GET["not"];
echo $not;
$no=$_GET["no"];
echo $no;
$d=$_GET["d"];
echo $d;
$top=160;
echo "Hello !";
if ($_SESSION["username"]=="")
{
include("connect.php");
$query2="SELECT MAX(id) FROM games";
  $result2=mysql_query($query2);
  $row2=mysql_fetch_row($result2);
for ($_id=1; $_id<=$row2[0]; $_id++) {
     $query="SELECT name, worked, notworked, romno FROM games WHERE id='$_id'";
     $result=mysql_query($query);
     $row=mysql_fetch_row($result);
  if (!$row)
  {

  }
  else
  {
   $total=$row[1]+$row[2];
   echo "<pre>
   <div style='position:absolute; top:$top; font-weight:bold; background-color:#C0C0C0; width:1000;'><a href='downloadrom.php?id=$_id'>$row[0]</a></div><div style='position:absolute; top:$top; left:325;font-weight:bold;'>$row[3]</div>    <div style='position:absolute; top:$top; left:375; font-weight:bold;'>This link worked for $row[1] out of $total people.</div>  <div style='position:absolute; top:$top; left:710; font-weight:bold;'>DID THIS LINK WORK FOR YOU ?</div> <div style='position:absolute; top:$top; left:945;font-weight:bold;'><a href='worked.php?var=$_id'>YES</a></div>      <div style='position:absolute; top:$top; left:975;font-weight:bold;'><a href='notworked.php?var2=$_id'>NO</a></div></pre>";
   $top+=30;
  }
} 
}
else if ($_SESSION["admin"]==0)
{
include("connect.php");
$query2="SELECT MAX(id) FROM games";
  $result2=mysql_query($query2);
  $row2=mysql_fetch_row($result2);
for ($_id=1; $_id<=$row2[0]; $_id++) {
$query="SELECT name, worked, notworked, romno, link FROM games WHERE id='$_id'";
$result=mysql_query($query); 
$row = mysql_fetch_row($result);
  if (!$row)
  {

  }
  else
  {
   $total=$row[1]+$row[2];
   echo "<pre>
   <div style='position:absolute; top:$top; font-weight:bold; background-color:#C0C0C0; width:1000;'><a href='downloadrom.php?id=$_id'>$row[0]</a></div><div style='position:absolute; top:$top; left:325;font-weight:bold;'>$row[3]</div>    <div style='position:absolute; top:$top; left:375; font-weight:bold;'>This link worked for $row[1] out of $total people.</div>  <div style='position:absolute; top:$top; left:710; font-weight:bold;'>DID THIS LINK WORK FOR YOU ?</div> <div style='position:absolute; top:$top; left:945;font-weight:bold;'><a href='worked.php?var=$_id'>YES</a></div>      <div style='position:absolute; top:$top; left:975;font-weight:bold;'><a href='notworked.php?var2=$_id'>NO</a></div></pre>";
   $top+=30;
  }
}
}
else if ($_SESSION["admin"]==1)
{
include("connect.php");
$query2="SELECT MAX(id) FROM games";
  $result2=mysql_query($query2);
  $row2=mysql_fetch_row($result2);
for ($_id=1; $_id<=$row2[0]; $_id++) {
  $query="SELECT name, worked, notworked, romno, link FROM games WHERE id='$_id'";
  $result=mysql_query($query);
  $row=mysql_fetch_row($result);
  
  if (!$row)
  {

  }
  else
  {
   $total=$row[1]+$row[2];
   echo "<span style='font-weight:bold;'>";
   echo "<pre>
   <div style='position:absolute; top:$top; font-weight:bold; background-color:#C0C0C0; width:1000'><a  href='downloadrom.php?id=$_id'>$row[0]</a></div> <div style='position:absolute; top:$top; left:235; font-weight:bold;'><a href='deletegames.php?var5=$_id'>[x]</a></div> <div style='position:absolute; top:$top; left:265; font-weight:bold;'><a href='editgames.php?vari=$_id'>[-]</a></div>    <div style='position:absolute; top:$top; left:325;font-weight:bold;'>$row[3]</div>    <div style='position:absolute; top:$top; left:375; font-weight:bold;'>This link worked for $row[1] out of $total people.</div>  <div style='position:absolute; top:$top; left:710; font-weight:bold;'>DID THIS LINK WORK FOR YOU ?</div> <div style='position:absolute; top:$top; left:945;font-weight:bold;'><a href='worked.php?var=$_id'>YES</a></div>      <div style='position:absolute; top:$top; left:975;font-weight:bold;'><a href='notworked.php?var2=$_id'>NO</a></div></div></pre>";
   echo "</span>";
   $top+=30;
  }
}
}
else
{}
?>

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.