<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);
$ogSiteName=($_POST['ogSiteName']);
$ogTitle=($_POST['ogTitle']);
$ogDescription=($_POST['ogDescription']);
$ogImage=($_POST['ogImage']);
$ogURL=($_POST['ogURL']);
$ogType=($_POST['ogType']);

if (isset($_POST['save'])) {
if (strlen(@$_POST[ogSiteName])<=0){@$_POST[ogSiteName]="";}
if (strlen(@$_POST[ogTitle])<=0){@$_POST[ogTitle]="";}
if (strlen(@$_POST[ogDescription])<=0){@$_POST[ogDescription]="";}
if (strlen(@$_POST[ogImage])<=0){@$_POST[ogImage]="";}
if (strlen(@$_POST[ogURL])<=0){@$_POST[ogURL]="";}
if (strlen(@$_POST[ogType])<=0){@$_POST[ogType]="";}
$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]='/ogSiteName=(.+?);/';
$patterns[1]='/ogTitle=(.+?);/';
$patterns[2]='/ogDescription=(.+?);/';
$patterns[3]='/ogImage=(.+?);/';
$patterns[4]='/ogURL=(.+?);/';
$patterns[5]='/ogType=(.+?);/';

@$replacements[0]=sprintf("ogSiteName=%s%s%s;",$t,$_POST[ogSiteName],$t);
@$replacements[1]=sprintf("ogTitle=%s%s%s;",$t,$_POST[ogTitle],$t);
@$replacements[2]=sprintf("ogDescription=%s%s%s;",$t,$_POST[ogDescription],$t);
@$replacements[3]=sprintf("ogImage=%s%s%s;",$t,$_POST[ogImage],$t);
@$replacements[4]=sprintf("ogURL=%s%s%s;",$t,$_POST[ogURL],$t);
@$replacements[5]=sprintf("ogType=%s%s%s;",$t,$_POST[ogType],$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);
}
}

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>
