View file setup.php

File size: 1.81Kb
<?php 

include 'head.php';
if($_POST["bgcolor"]==""){ echo '<center>Error, background color left blank please go back and fix it.</center>'; include 'foot.php'; 

exit(); }
if($_POST["border"]==""){ echo '<center>Error, border left blank please go back and fix it.</center>'; include 'foot.php'; exit(); }
if($_POST["bgimage"]==""){ echo '<center>Error, image left blank please go back and fix it.</center>'; include 'foot.php'; exit(); }
if($_POST["alink"]==""){ echo '<center>Error, link left blank please go back and fix it.</center>'; include 'foot.php'; exit(); }
if($_POST["bsize"]==""){ echo '<center>Error, box size left blank please go back and fix it.</center>'; include 'foot.php'; exit(); }
$_POST["alink"] = str_replace($filter,"*",$_POST["alink"]); $_POST["bsize"] = str_replace($filter,"*",$_POST["bsize"]); $_POST

["border"] = str_replace($filter,"*",$_POST["border"]);
$_POST["bgimage"] = str_replace($filter,"*",$_POST["bgimage"]); $_POST["bgcolor"] = str_replace($filter,"*",$_POST["bgcolor"]); 

$_POST["js"] = str_replace($filter,"*",$_POST["js"]);
$f=fopen("user_settings/".$_SESSION["userName"].".php","w+"); fwrite($f,'<?php $style = "body { background-image:url('.$_POST

["bgimage"].'); background-color: '.$_POST["bgcolor"].'; color: '.$_POST["color"].'; }
a:link,a:active,a:hover,a:visited { color: '.$_POST["alink"].'; } input,textarea,select { border: '.$_POST["bsize"].' solid '.$_POST

["border"].'; background-color: '.$_POST["bgcolor"].';
color: '.$_POST["color"].'; } "; $js = "'.$_POST["js"].'"; ?>'); fclose($f);
echo "<center>Your settings was updated!</center>"; if($_POST["js"]=="no") { $f = @fopen('js.txt','w+'); @chmod('js.txt',0777); 

fwrite($f,'no'); fclose($f); } else {  $f = @fopen('js.txt','w+'); @chmod('js.txt',0777); fwrite($f,'blah'); fclose($f);  } include 

'foot.php'; ?>