<?php
// echo $_GET["publisher_website"]

include '../config.php';
if($__testMode==true)
{
	return true;
}

	$inp = file_get_contents('userdata/containts.json',true);
	$existingPacks=json_decode($inp);
	$packs=json_decode($inp)->sticker_packs;

	foreach ($packs as $key => $value) 
	{
		if( number_format ($packs[$key]->identifier) == number_format($_POST["identifier"]) )
		{
			$existingPacks->sticker_packs[$key]->name=$_POST["StickerPackName"];
			$existingPacks->sticker_packs[$key]->publisher=$_POST["publisher"];
			//$existingPacks->sticker_packs[$key]->publisher_email=$_POST["publisher_email"];
			$existingPacks->sticker_packs[$key]->SignalStickerPackURL=$_POST["SignalStickerPackURL"];
		}
	}
	//print_r ($existingPacks);
	file_put_contents('userdata/containts.json', json_encode($existingPacks));



?>