<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", $targetedX);
extract($_POST);
$titleFoo1=($_POST['titleFoo1']);
$fooImgP=($_POST['fooImgP']);
$fooImgT=($_POST['fooImgT']);
$titleFoo2=($_POST['titleFoo2']);
$titleFoo3=($_POST['titleFoo3']);
$titleFoo4=($_POST['titleFoo4']);
$fooB1=($_POST['fooB1']);
$fooB4=($_POST['fooB4']);
$fooName=($_POST['fooName']);
$fooPhone=($_POST['fooPhone']);
$fooFax=($_POST['fooFax']);
$fooMobil=($_POST['fooMobil']);
$fooMail=($_POST['fooMail']);
$fooCompany=($_POST['fooCompany']);
$fooCompany2=($_POST['fooCompany2']);
$fooStreet=($_POST['fooStreet']);
$fooCity=($_POST['fooCity']);
$block1image=($_POST['block1image']);
$block1imgURL=($_POST['block1imgURL']);
$block1imgTitle=($_POST['block1imgTitle']);
$block4image=($_POST['block4image']);
$block4imgURL=($_POST['block4imgURL']);
$block4imgTitle=($_POST['block4imgTitle']);
$fooBg=($_POST['fooBg']);
$gooMaps=($_POST['gooMaps']);
$fooCR=($_POST['fooCR']);

if (isset($_POST['save'])) {
if (strlen(@$_POST[titleFoo1])<=0){@$_POST[titleFoo1]="";}
if (strlen(@$_POST[fooImgP])<=0){@$_POST[fooImgP]="";}
if (strlen(@$_POST[fooImgT])<=0){@$_POST[fooImgT]="";}
if (strlen(@$_POST[titleFoo2])<=0){@$_POST[titleFoo2]="";}
if (strlen(@$_POST[titleFoo3])<=0){@$_POST[titleFoo3]="";}
if (strlen(@$_POST[titleFoo4])<=0){@$_POST[titleFoo4]="";}
if (strlen(@$_POST[fooB1])<=0){@$_POST[fooB1]="";}
if (strlen(@$_POST[fooB4])<=0){@$_POST[fooB4]="";}
if (strlen(@$_POST[fooName])<=0){@$_POST[fooName]="";}
if (strlen(@$_POST[fooPhone])<=0){@$_POST[fooPhone]="";}
if (strlen(@$_POST[fooFax])<=0){@$_POST[fooFax]="";}
if (strlen(@$_POST[fooMobil])<=0){@$_POST[fooMobil]="";}
if (strlen(@$_POST[fooMail])<=0){@$_POST[fooMail]="";}
if (strlen(@$_POST[fooCompany])<=0){@$_POST[fooCompany]="";}
if (strlen(@$_POST[fooCompany2])<=0){@$_POST[fooCompany2]="";}
if (strlen(@$_POST[fooStreet])<=0){@$_POST[fooStreet]="";}
if (strlen(@$_POST[fooCity])<=0){@$_POST[fooCity]="";}
if (strlen(@$_POST[block1image])<=0){@$_POST[block1image]="";}
if (strlen(@$_POST[block1imgURL])<=0){@$_POST[block1imgURL]="";}
if (strlen(@$_POST[block1imgTitle])<=0){@$_POST[block1imgTitle]="";}
if (strlen(@$_POST[block4image])<=0){@$_POST[block4image]="";}
if (strlen(@$_POST[block4imgURL])<=0){@$_POST[block4imgURL]="";}
if (strlen(@$_POST[block4imgTitle])<=0){@$_POST[block4imgTitle]="";}
if (strlen(@$_POST[fooBg])<=0){@$_POST[fooBg]="";}
if (strlen(@$_POST[gooMaps])<=0){@$_POST[gooMaps]="";}
if (strlen(@$_POST[fooCR])<=0){@$_POST[fooCR]="";}
$Message=SaveData();}
else{
@die ("
<span class='resF'>".$resultFalse."</span>
<br>
<br>
<a href='$elink'>
<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]='/titleFoo1=(.+?);/';
$patterns[1]='/fooImgP=(.+?);/';
$patterns[2]='/fooImgT=(.+?);/';
$patterns[3]='/titleFoo2=(.+?);/';
$patterns[4]='/titleFoo3=(.+?);/';
$patterns[5]='/titleFoo4=(.+?);/';
$patterns[6]='/fooB1=(.+?);/';
$patterns[7]='/fooB4=(.+?);/';
$patterns[8]='/fooName=(.+?);/';
$patterns[9]='/fooPhone=(.+?);/';
$patterns[10]='/fooFax=(.+?);/';
$patterns[11]='/fooMobil=(.+?);/';
$patterns[12]='/fooMail=(.+?);/';
$patterns[13]='/fooCompany=(.+?);/';
$patterns[14]='/fooCompany2=(.+?);/';
$patterns[15]='/fooStreet=(.+?);/';
$patterns[16]='/fooCity=(.+?);/';
$patterns[17]='/block1image=(.+?);/';
$patterns[18]='/block1imgURL=(.+?);/';
$patterns[19]='/block1imgTitle=(.+?);/';
$patterns[20]='/block4image=(.+?);/';
$patterns[21]='/block4imgURL=(.+?);/';
$patterns[22]='/block4imgTitle=(.+?);/';
$patterns[23]='/fooBg=(.+?);/';
$patterns[24]='/gooMaps=(.+?);/';
$patterns[25]='/fooCR=(.+?);/';

@$replacements[0]=sprintf("titleFoo1=%s%s%s;",$t,$_POST[titleFoo1],$t);
@$replacements[1]=sprintf("fooImgP=%s%s%s;",$t,$_POST[fooImgP],$t);
@$replacements[2]=sprintf("fooImgT=%s%s%s;",$t,$_POST[fooImgT],$t);
@$replacements[3]=sprintf("titleFoo2=%s%s%s;",$t,$_POST[titleFoo2],$t);
@$replacements[4]=sprintf("titleFoo3=%s%s%s;",$t,$_POST[titleFoo3],$t);
@$replacements[5]=sprintf("titleFoo4=%s%s%s;",$t,$_POST[titleFoo4],$t);
@$replacements[6]=sprintf("fooB1=%s%s%s;",$t,$_POST[fooB1],$t);
@$replacements[7]=sprintf("fooB4=%s%s%s;",$t,$_POST[fooB4],$t);
@$replacements[8]=sprintf("fooName=%s%s%s;",$t,$_POST[fooName],$t);
@$replacements[9]=sprintf("fooPhone=%s%s%s;",$t,$_POST[fooPhone],$t);
@$replacements[10]=sprintf("fooFax=%s%s%s;",$t,$_POST[fooFax],$t);
@$replacements[11]=sprintf("fooMobil=%s%s%s;",$t,$_POST[fooMobil],$t);
@$replacements[12]=sprintf("fooMail=%s%s%s;",$t,$_POST[fooMail],$t);
@$replacements[13]=sprintf("fooCompany=%s%s%s;",$t,$_POST[fooCompany],$t);
@$replacements[14]=sprintf("fooCompany2=%s%s%s;",$t,$_POST[fooCompany2],$t);
@$replacements[15]=sprintf("fooStreet=%s%s%s;",$t,$_POST[fooStreet],$t);
@$replacements[16]=sprintf("fooCity=%s%s%s;",$t,$_POST[fooCity],$t);
@$replacements[17]=sprintf("block1image=%s%s%s;",$t,$_POST[block1image],$t);
@$replacements[18]=sprintf("block1imgURL=%s%s%s;",$t,$_POST[block1imgURL],$t);
@$replacements[19]=sprintf("block1imgTitle=%s%s%s;",$t,$_POST[block1imgTitle],$t);
@$replacements[20]=sprintf("block4image=%s%s%s;",$t,$_POST[block4image],$t);
@$replacements[21]=sprintf("block4imgURL=%s%s%s;",$t,$_POST[block4imgURL],$t);
@$replacements[22]=sprintf("block4imgTitle=%s%s%s;",$t,$_POST[block4imgTitle],$t);
@$replacements[23]=sprintf("fooBg=%s%s%s;",$t,$_POST[fooBg],$t);
@$replacements[24]=sprintf("gooMaps=%s%s%s;",$t,$_POST[gooMaps],$t);
@$replacements[25]=sprintf("fooCR=%s%s%s;",$t,$_POST[fooCR],$t);

if ($fp=fopen(DATA_FILE,"w")){
$tag="<?PHP \n";
include("./../languages/$_COOKIE[xlanguage]/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);
include("./../function/savecheck.inc.php");
if (strlen($check)> 0) $content[$i]=$check;
$line=sprintf('%s',$content[$i]);
fputs($fp,$line,strlen($line));
}
fclose($fp);
}
}

if (isset($_POST['editorLMs'])) {
define("DATA_FILE1", $exCC."/".$sitecontent.".inc.php");
extract($_POST);
$file=($_POST['editorLMs']);
$file=preg_replace("/\r|\r/s", "\r", $file);
$file=str_replace("<p></p>
","", $file);
$file=str_replace('\"','"',$file);
$file=str_replace('\\"','"',$file);
$file=str_replace('&Acirc;&#160;','',$file);
$file=str_replace('&Acirc;','',$file);
$file=str_replace('&#160;','',$file);
$file=str_replace('Â','',$file);
$file=str_replace('ÂÂ','',$file);
$fileX=strlen($file);
if($fileX == 9){$file=str_replace('<p></p>','',$file);}

$saveEditortext=$exCC."/".$sitecontent.".inc.php";
$handle=fopen($saveEditortext, "w");
fwrite($handle,$file);
fclose($handle);
$oldumask = umask(0);
chmod($saveEditortext, 0644);
umask($oldumask);
}

include("./../function/forward-s-e.inc.php");
include("./../function/autoX.inc.php");
echo "
<br>
<br>
<a href='$elink'>
<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>
