Ir para conteúdo

POWERED BY:

Arquivado

Este tópico foi arquivado e está fechado para novas respostas.

Pedroalves

Dreamweaver

Recommended Posts

segue-se o codigo

<?php require_once('Connections/ola.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") 
{
  if (PHP_VERSION < 6) {
    $theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
  }

  $theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);

  switch ($theType) {
    case "text":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;    
    case "long":
    case "int":
      $theValue = ($theValue != "") ? intval($theValue) : "NULL";
      break;
    case "double":
      $theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
      break;
    case "date":
      $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
      break;
    case "defined":
      $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
      break;
  }
  return $theValue;
}
}
?>
<?php
// *** Validate request to login to this site.
if (!isset($_SESSION)) {
  session_start();
}

$loginFormAction = $_SERVER['PHP_SELF'];
if (isset($_GET['accesscheck'])) {
  $_SESSION['PrevUrl'] = $_GET['accesscheck'];
}

if (isset($_POST['textfield'])) {
  $loginUsername=$_POST['textfield'];
  $password=$_POST['textfield2'];
  $MM_fldUserAuthorization = "";
  $MM_redirectLoginSuccess = "entrar.php";
  $MM_redirectLoginFailed = "erro.php";
  $MM_redirecttoReferrer = false;
  mysql_select_db($database_ola, $ola);
  
  $LoginRS__query=sprintf("SELECT username, password FROM `user` WHERE username=%s AND password=%s",
    GetSQLValueString($loginUsername, "text"), GetSQLValueString($password, "text")); 
   
  $LoginRS = mysql_query($LoginRS__query, $ola) or die(mysql_error());
  $loginFoundUser = mysql_num_rows($LoginRS);
  if ($loginFoundUser) {
     $loginStrGroup = "";
    
	if (PHP_VERSION >= 5.1) {session_regenerate_id(true);} else {session_regenerate_id();}
    //declare two session variables and assign them
    $_SESSION['MM_Username'] = $loginUsername;
    $_SESSION['MM_UserGroup'] = $loginStrGroup;	      

    if (isset($_SESSION['PrevUrl']) && false) {
      $MM_redirectLoginSuccess = $_SESSION['PrevUrl'];	
    }
    header("Location: " . $MM_redirectLoginSuccess );
  }
  else {
    header("Location: ". $MM_redirectLoginFailed );
  }
}
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>TUGASERVEGAME</title>

	<link rel="stylesheet" href="css/lightbox.css" type="text/css" media="screen" />
	
	<script src="js/prototype.js" type="text/javascript"></script>
	<script src="js/scriptaculous.js?load=effects,builder" type="text/javascript"></script>
	<script src="js/lightbox.js" type="text/javascript"></script>
	<script src="SpryAssets/SpryValidationTextField.js" type="text/javascript"></script>
	<script src="SpryAssets/SpryValidationPassword.js" type="text/javascript"></script>
<style type="text/css">
#apDiv1 {
	position:absolute;
	left:4px;
	top:0px;
	width:1387px;
	height:991px;
	z-index:1;
}
#apDiv2 {
	position:absolute;
	left:-169px;
	top:0px;
	width:1553px;
	height:115px;
	z-index:2;
	text-align: center;
}
#apDiv3 {
	position:absolute;
	left:9px;
	top:111px;
	width:1px;
	height:4px;
	z-index:3;
}
#apDiv4 {
	position:absolute;
	left:-126px;
	top:1px;
	width:471px;
	height:294px;
	z-index:3;
}
#apDiv5 {
	position:absolute;
	left:287px;
	top:111px;
	width:377px;
	height:292px;
	z-index:4;
}
#apDiv6 {
	position:absolute;
	left:4px;
	top:111px;
	width:148px;
	height:883px;
	z-index:4;
}
body,td,th {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 16px;
	color: #000;
	font-weight: bold;
}
#apDiv7 {
	position:absolute;
	left:7px;
	top:112px;
	width:149px;
	height:50px;
	z-index:5;
}
#apDiv8 {
	position:absolute;
	left:8px;
	top:191px;
	width:144px;
	height:25px;
	z-index:6;
	text-align: center;
	font-size: 17px;
}
#apDiv9 {
	position:absolute;
	left:6px;
	top:139px;
	width:144px;
	height:24px;
	z-index:7;
	text-align: center;
}
#apDiv10 {
	position:absolute;
	left:0px;
	top:248px;
	width:148px;
	height:27px;
	z-index:8;
	text-align: center;
}
#apDiv11 {
	position:absolute;
	left:773px;
	top:116px;
	width:617px;
	height:188px;
	z-index:9;
	text-align: center;
}
#apDiv12 {
	position:absolute;
	left:154px;
	top:437px;
	width:835px;
	height:199px;
	z-index:10;
}
#apDiv13 {
	position:absolute;
	left:2px;
	top:293px;
	width:148px;
	height:35px;
	z-index:11;
	text-align: center;
}
    </style>
<link href="SpryAssets/SpryValidationTextField.css" rel="stylesheet" type="text/css" />
<link href="SpryAssets/SpryValidationPassword.css" rel="stylesheet" type="text/css" />
</head>

<body>
<div id="apDiv1">
  <p> </p>
</div>
<div id="apDiv2">
<h1>TUGASERVEGAME                          </h1>

<p><?php
include "index.xml";
$xml=simplexml_load_file("index.xml");
foreach ($xml->txt as $texto){		 
eval("\$texto=\"$texto\";");
echo $texto;

}
?> </p>
</div>
<div id="apDiv6"></div>
<div id="apDiv5"><a href="images/image-1.jpg" rel="lightbox[roadtrip]"><img src="images/thumb-1.jpg" width="470" height="319" alt="" /></a></div>
<div id="apDiv8">
  <form id="form2" name="form2" method="post" action="webmail">
    <p>
      <input type="submit" name="button2" id="button2" value="WEBMAIL" />
    </p>
  </form>
</div>
<div id="apDiv9">
  <form id="form1" name="form1" method="post" action="">
    <p>
      <input type="submit" name="button" id="button" value="REGISTAR" />
    </p>
  </form>
</div>
<div id="apDiv10">
  <form id="form3" name="form3" method="post" action="">
    <input type="submit" name="button3" id="button3" value="CONTACTO" />
  </form>
</div>
<div id="apDiv11">
  <form id="form4" name="form4" method="POST" action="<?php echo $loginFormAction; ?>">
    <p>LOGIN </p>
    <p>USERNAME
      <label for="textfield"></label>
      <span id="sprytextfield1">
      <input type="text" name="textfield" id="textfield" />
      <span class="textfieldRequiredMsg">A value is required.</span></span></p>
    <p>
      <label for="textfield2">PASSWORD</label>
      <span id="sprypassword1">
      <input type="password" name="textfield2" id="textfield2" />
      <span class="passwordRequiredMsg">A value is required.</span></span></p>
    <p>
      <input type="submit" name="button4" id="button4" value="LOGIN" />
</p>
  </form>
  <form id="form6" name="form6" method="post" action="">
    <blockquote>
      <blockquote>
        <blockquote>
          <blockquote>
            <blockquote> </blockquote>
          </blockquote>
        </blockquote>
      </blockquote>
    </blockquote>
  </form>
</div>
<div id="apDiv12">
  <p>O site deste servidor encontra-se em desenvolvimento</p>
  <p>Para criação do endereço do correio envio um mensagem para suporte@tuga.servegame.com</p>
  <p> nome, password,username,morada e o assunto pedido de   criacao de enderesso de correio eletronico </p>
</div>
<div id="apDiv13">
  <form id="form5" name="form5" method="post" action=":8080">
    <input name="button5" type="submit" id="button5" value="Login do Utilizador" />
  </form>
</div>
<p> </p>
<p> </p>
<div style="display:none;">
<a href="images/Oryx Antelope.jpg" rel="lightbox[roadtrip]"> <img src="images/Oryx Antelope.jpg" width="100" height="40" alt=""/></a></div>
<script type="text/javascript">
var sprytextfield1 = new Spry.Widget.ValidationTextField("sprytextfield1");
var sprypassword1 = new Spry.Widget.ValidationPassword("sprypassword1");
</script>
</body>
</html>

Compartilhar este post


Link para o post
Compartilhar em outros sites

×

Informação importante

Ao usar o fórum, você concorda com nossos Termos e condições.