<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/socialmedia.inc.php");
extract($_POST);
$smWaX=($_POST['smWaX']);
$smFbX=($_POST['smFbX']);
$smGoX=($_POST['smGoX']);
$smTwX=($_POST['smTwX']);
$smPiX=($_POST['smPiX']);
$smYtX=($_POST['smYtX']);
$smLiX=($_POST['smLiX']);
$smXiX=($_POST['smXiX']);

if (isset($_POST['save'])) {
if (strlen(@$_POST[smWaX])<=0){@$_POST[smWaX]="";}
if (strlen(@$_POST[smFbX])<=0){@$_POST[smFbX]="";}
if (strlen(@$_POST[smGoX])<=0){@$_POST[smGoX]="";}
if (strlen(@$_POST[smTwX])<=0){@$_POST[smTwX]="";}
if (strlen(@$_POST[smPiX])<=0){@$_POST[smPiX]="";}
if (strlen(@$_POST[smYtX])<=0){@$_POST[smYtX]="";}
if (strlen(@$_POST[smLiX])<=0){@$_POST[smLiX]="";}
if (strlen(@$_POST[smXiX])<=0){@$_POST[smXiX]="";}
$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]='/smWaX=(.+?);/';
$patterns[1]='/smFbX=(.+?);/';
$patterns[2]='/smGoX=(.+?);/';
$patterns[3]='/smTwX=(.+?);/';
$patterns[4]='/smPiX=(.+?);/';
$patterns[5]='/smYtX=(.+?);/';
$patterns[6]='/smLiX=(.+?);/';
$patterns[7]='/smXiX=(.+?);/';

@$replacements[0]=sprintf("smWaX=%s%s%s;",$t,$_POST[smWaX],$t);
@$replacements[1]=sprintf("smFbX=%s%s%s;",$t,$_POST[smFbX],$t);
@$replacements[2]=sprintf("smGoX=%s%s%s;",$t,$_POST[smGoX],$t);
@$replacements[3]=sprintf("smTwX=%s%s%s;",$t,$_POST[smTwX],$t);
@$replacements[4]=sprintf("smPiX=%s%s%s;",$t,$_POST[smPiX],$t);
@$replacements[5]=sprintf("smYtX=%s%s%s;",$t,$_POST[smYtX],$t);
@$replacements[6]=sprintf("smLiX=%s%s%s;",$t,$_POST[smLiX],$t);
@$replacements[7]=sprintf("smXiX=%s%s%s;",$t,$_POST[smXiX],$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);
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-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>
