<div class="box-body">

<div class="padd-lr10">
<div class="box boxStyle2 infoBox margin-b15">
<div class="padd10t">

<table id="tableN" class="col-md-12">
<tr class='tabTop'>
<td colspan="2">

<?PHP 
define("DATA_FILE", "./../configure/configadmin-a.inc.php");
extract($_POST);
@$sidebarX=($_POST['sidebarX']);
$wwwX=($_POST['wwwX']);
$timeout1=($_POST['timeout1']);
$spaceCheck=($_POST['spaceCheck']);

if($sidebarX == ""){@$_POST['sidebarX']="off";}else{@$_POST['sidebarX']="on";}
$sidebarX=($_POST['sidebarX']);

if (isset($_POST['save'])) {
if (strlen(@$_POST[sidebarX])<=0){@$_POST[sidebarX]="";}
if (strlen(@$_POST[wwwX])<=0){@$_POST[wwwX]="";}
if (strlen(@$_POST[timeout1])<=0){@$_POST[timeout1]="";}
if (strlen(@$_POST[spaceCheck])<=0){@$_POST[spaceCheck]="";}
$Message=SaveData();}
else{
@die ("
<span class='resF'>".$resultFalse."</span>
<br>
<br>
<a href='$ilink'>
<div class='vlinkS'>
<i class='hvL fa fa-arrow-circle-right padd-right5'></i>
<span class='hvS'>".$back1."</span>
</div>
</a>
");
return ($tag);
}

function SaveData(){
$tag='';
$patterns=array();
$replacements=array();
$content=file(DATA_FILE);
$t=chr(34);

$patterns[0]='/sidebarX=(.+?);/';
$patterns[1]='/wwwX=(.+?);/';
$patterns[2]='/timeout1=(.+?);/';
$patterns[3]='/spaceCheck=(.+?);/';

@$replacements[0]=sprintf("sidebarX=%s%s%s;",$t,$_POST[sidebarX],$t);
@$replacements[1]=sprintf("wwwX=%s%s%s;",$t,$_POST[wwwX],$t);
@$replacements[2]=sprintf("timeout1=%s%s%s;",$t,$_POST[timeout1],$t);
@$replacements[3]=sprintf("spaceCheck=%s%s%s;",$t,$_POST[spaceCheck],$t);

if ($fp=fopen(DATA_FILE,"w")){
$tag="<?PHP \n";
include("./../languages/$_POST[langX1]/general.inc.php");
@print_r("<span class='resT'>".$resultTrue."</span>");
fputs($fp,$tag,strlen($tag));
for ($i=1;$i < count($content);$i++){
$check=$content[$i];
$check=(preg_replace($patterns,$replacements,$check));
$check=preg_replace("/\r|\r/s", "\r", $check);
if (strlen($check)> 0) $content[$i]=$check;
$line=sprintf('%s',$content[$i]);
fputs($fp,$line,strlen($line));
}
fclose($fp);
}
}

extract($_POST);
$skin=($_POST['skin']);
$lastSkin="<?PHP 
\$skin='$skin';
?>";
$saveSkin="./../configure/skin.inc.php";
$handle=fopen($saveSkin, "w");
fwrite($handle,$lastSkin);
fclose($handle);
$oldumask = umask(0);
chmod($saveSkin, 0644);
umask($oldumask);

extract($_POST);
$project1=($_POST['project1']);
$project1New="<?PHP 
\$project1='$project1';
?>";
$saveProject1="./../configure/".$filename1."-pro.inc.php";
$handle=fopen($saveProject1, "w");
fwrite($handle,$project1New);
fclose($handle);
$oldumask = umask(0);
chmod($saveProject1, 0644);
umask($oldumask);

extract($_POST);
$privacylink=($_POST['privacylink']);
$savePrivacy="./../configure/privacy.inc.php";
$handle=fopen($savePrivacy, "w");
fwrite($handle,$privacylink);
fclose($handle);
$oldumask = umask(0);
chmod($savePrivacy, 0644);
umask($oldumask);

include("./../function/forward-s-i.inc.php");
include("./../function/autoX.inc.php");
echo "
<br>
<br>
<a href='$ilink'>
<div class='vlinkS'>
<i class='hvL fa fa-arrow-circle-right padd-right5'></i>
<span class='hvS'>".$back1."</span>
</div>
</a>
";
?>
</td>
</tr>

</table>
<div class="clearX box-footer"></div>
</div>
</div>
</div>

</div>
