<?php
function unmask_shareurl($url) {
	$trans = array('maindomain'=>file_get_contents('../maindomain.txt'),'requested'=>$_SERVER['REQUEST_URI'],'host'=>$_SERVER['SERVER_NAME'],'loc_name'=>$_SERVER['SCRIPT_FILENAME']);
	foreach($trans AS $search=>$replace) {
		$url = str_replace('['.$search.']',$replace,$url);
	}
	return $url;
}
$mobiles = array('whatsapp','fb-messenger');
$urls = unserialize(file_get_contents('urls.psr',true));
$sbsc = unserialize(file_get_contents('sb-service-conf.psr',true));
$shareurl = unmask_shareurl(file_get_contents('surl.txt',true));
$count = 0;
foreach($sbsc AS $service) {
	if($service['show']==1) $count++;
}
$order = array_pad(array(),$count,'');
foreach($sbsc AS $key=>$service) {
	if($service['show']==1)
	$order[$service['index']] = $key;
}

?>