Código PHP:
<? if (!($_COOKIE['uid'])){ ?>
<!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=iso-8859-1" />
<title>Documento sin título</title>
<link href="stylesheet.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
body {
margin-left: 120px;
margin-top: 65px;
}
-->
</style></head>
<body>
<table width="342" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" class="login">
<!--DWLayoutTable-->
<tr>
<td height="23" colspan="2" align="center" valign="middle" bgcolor="#E8E8E8"><strong>UserCP Login </strong></td>
</tr>
<tr>
<td width="210" height="29"> </td>
<td width="130"> </td>
</tr>
<tr>
<td height="182" valign="middle">
<form id="form1" name="form1" method="post" action="usercp/login.php">
<p> Username:
<label>
<input name="username" type="text" class="login" id="username" />
</label>
</p>
<p> Password:
<input name="password" type="text" class="login" id="password" />
</p>
<p align="center">
<label>
<input type="submit" name="Submit" value="Login" />
</label>
</p>
</form></td>
<td align="center" valign="middle"><img src="img/lock.jpg" width="120" height="139" /></td>
</tr>
<tr>
<td height="35"> </td>
<td> </td>
</tr>
</table>
</body>
</html>
<? } else {
echo "Welcome, ".$_COOKIE[unick];
echo "<a href='usercp/index.php'>Go to my UserCP</a><br />";
echo "<a href='usercp/logout.php'>Logout</a>";
}
?>
Código PHP:
<? if (!($_COOKIE['uid'])){ ?>