Jump to content

[SOLVED] Cookie problem


blufish

Recommended Posts

Code:

 

<html>
<head>
<?php
ini_set('error_reporting',E_ALL); //error reporting
if ($_GET['where']=='jokes/blond')
{
echo "<TITLE>Frozenoven :: Jokes :: Dumb Blonde Jokes</TITLE>";
}
if ($_GET['where']=='home')
{
echo "<TITLE>Frozenoven :: Home</TITLE>";
}
if ($_GET['where']=='customize')
{
echo "<TITLE>Frozenoven :: Customization</TITLE>";
}
if ($_GET['where']=='jokes/yourmother')
{
echo "<TITLE>Frozenoven :: Jokes :: Your Mother Jokes</TITLE>";
}
if ($_GET['where']=='jokes/6yroldbacktalk')
{
echo "<TITLE>Frozenoven :: Jokes :: 6-Year-Old-Back-Talk</TITLE>";
}
if (isset($_SESSION['name']))
{
echo '<link rel="stylesheet" type="text/css" href="'.$_SESSION['name'].'">';
}
else
{
echo '<link rel="stylesheet" type="text/css" href="white.css">';
}
?>
<script type="text/javascript">
function go(location)
{
parent.location = location
}
</script>
</head>
<body>
<?php
if (isset($_SESSION['name']))
{
echo 'Hey "'.$_SESSION['name'].'"! <a href=logout.php>Logout</a>';
}
else
{
echo "Hey Guest! <a href='http://www.frozenoven.com/index.php?where=make'>wanna customize?</a>";
}
?>
<center>
<table>
<tr>
<td align=center>
<img src="http://www.frozenoven.com/images/logo.gif" width="500" height="53.7" alt="www.frozenoven.com">
</td></tr>
<tr>
<td><table><tr>
<td width=100 valign=top>
<div class="side"><p class="option"><a href="http://www.frozenoven.com/index.php?where=account">Accounts</a></p></div>
<div class="side"><p class="option"><a href="http://www.frozenoven.com/index.php?where=jokes/index">Jokes</a></p></div>
</td><td valign=top>
<div class="main"><p>
<?php
$mypage = $_GET['where'];
$mypage = $mypage.".fzp";
if ($mypage==".fzp")
{
echo "<script type='text/javascript'>parent.location='http://www.frozenoven.com/index.php?where=home';</script>";
}
if (file_exists($mypage))
{
echo file_get_contents($mypage);
}
if (!file_exists($mypage))
{
echo "<h1 align=center>404 File not Found!</h1><p>Either the file you are looking for does not exist or you typed the url wrong.</p><p align=center><a href='http://www.frozenoven.com'>Home</a>";
}
?></p></div>
</td>
</tr>
</table>
</td>
</tr>
</table>
<table>
<tr>
<td>
<div class="ad">
<script type="text/javascript"><!--
google_ad_client = "pub-2142734016668784";
/* 728x90, created 5/30/08 */
google_ad_slot = "1701812294";
google_ad_width = 728;
google_ad_height = 90;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script>
</div>
</td>
</tr>
</table>
</center>
</body>
</html>

 

 

code part 2:

 

<?php
ini_set("error_reporting",E_ALL);
session_start();
?>
<?php
$name = strip_tags($_POST['name']);
if (file_exists($name))
{
echo "<h1 align=center>Account name already in use!</h1>";
}
if (!file_exists($name))
{
$layout = $_POST['layout'].".css";
$time = time()+3600*24*365;
$_SESSION['name'];
$nc = strtolower($name);
$pass = strtolower($_POST['pass']);
$pass = str_replace("a","[1]",$pass);
$pass = str_replace("b","[2]",$pass);
$pass = str_replace("c","[3]",$pass);
$pass = str_replace("d","[4]",$pass);
$pass = str_replace("e","[5]",$pass);
$pass = str_replace("f","[6]",$pass);
$pass = str_replace("g","[7]",$pass);
$pass = str_replace("h","[8]",$pass);
$pass = str_replace("i","[9]",$pass);
$pass = str_replace("j","[10]",$pass);
$pass = str_replace("k","[11]",$pass);
$pass = str_replace("l","[12]",$pass);
$pass = str_replace("m","[13]",$pass);
$pass = str_replace("n","[14]",$pass);
$pass = str_replace("o","[15]",$pass);
$pass = str_replace("p","[16]",$pass);
$pass = str_replace("q","[17]",$pass);
$pass = str_replace("r","[18]",$pass);
$pass = str_replace("s","[19]",$pass);
$pass = str_replace("t","[20]",$pass);
$pass = str_replace("u","[21]",$pass);
$pass = str_replace("v","[22]",$pass);
$pass = str_replace("w","[23]",$pass);
$pass = str_replace("x","[24]",$pass);
$pass = str_replace("y","[25]",$pass);
$pass = str_replace("z","[26]",$pass);
fopen($pass."+%+".$nc,"x");
fopen("check".$nc,"x");
file_put_contents("check".$nc,$name);
}
?>

 

 

Link to comment
Share on other sites

I got these errors:

 

Notice: A session had already been started - ignoring session_start() in /home/blufish/public_html/accounts/login.php on line 6

 

Notice: Undefined index: layout in /home/blufish/public_html/accounts/login.php on line 16

 

Notice: Undefined index: name in /home/blufish/public_html/accounts/login.php on line 18

 

Warning: fopen([16][15][15][16]+%+mark) [function.fopen]: failed to open stream: File exists in /home/blufish/public_html/accounts/login.php on line 47

 

Warning: fopen(checkmark) [function.fopen]: failed to open stream: File exists in /home/blufish/public_html/accounts/login.php on line 48

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.