Viewing file: editEngine.php (1.36 KB) -rw-rw-rw- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?
$un = $_COOKIE['user'];
if(strlen($un)==0)
{
header("Location: index.php");
exit();
}
if($_POST['type'] == "profileEdit"){
$name = stripslashes($_POST['name']);
$age = stripslashes($_POST['age']);
$ocupation = stripslashes($_POST['ocupation']);
$email = stripslashes($_POST['email']);
$country = stripslashes($_POST['country']);
$state = stripslashes($_POST['state']);
$title = stripslashes($_POST['titler']);
if($myFile = fopen("profile.txt","w"))//this time write the file
{
$str = "title=$title";
$str .= "&name=$name";
$str .= "&age=$age";
$str .= "&ocupation=$ocupation";
$str .= "&email=$email";
$str .= "&country=$country";
$str .= "&state=$state";
$str .= stripslashes($_POST['rest']);
fwrite($myFile,$str);
$sentOk = true;
echo "sentOk=" . $sentOk . "&test=3243";
}
}
if($_POST['type'] == "sitePanel"){
if($myFile = fopen("profile.txt","w"))//this time write the file
{
$myStr = stripslashes($_POST['first'] . $_POST['second']);
fwrite($myFile,$myStr);
$sentOk = true;
echo "sentOk=" . $sentOk . "&test=24324";
}
}
if($_GET['type'] == "template"){
if($myFile = fopen("profile.txt","w"))//this time write the file
{
$myStr = stripslashes($_POST['string']);
fwrite($myFile,$myStr);
$sentOk = true;
echo "sentOk=" . $sentOk . "&test=24324";
}
}
?>
|