<?php
include_once ("_dirinfo.php");
include_once (PATH_TO_ROOT."init.php");

if ($_POST['action'] == 'save') {
	
	$sql = "UPDATE ".DB_WARPIT_MAIN."._WarpitConfig SET cValue = '".$_POST['warpit_server_www']."' WHERE cName = 'warpit_server_www'";
	$db->SQLexecute($sql);
	
	$sql = "UPDATE ".DB_WARPIT_MAIN."._WarpitConfig SET cValue = '".$_POST['warpit_license_key']."' WHERE cName = 'warpit_license_key'";
	$db->SQLexecute($sql);
	
	
}

$sql = "SELECT * FROM ".DB_WARPIT_MAIN."._WarpitConfig WHERE prefix = 'update'";
$res = $db->SQLexecute($sql);
while ($zad = mysql_fetch_assoc($res)) $data[] = $zad['cName']." : '".$zad['cValue']."'";


?>

{success: true, data:{ <?php echo implode(",",$data); ?> }}