<?php
session_start();
require_once 'inc/parametros.php';


$_SESSION['theme'] = clean($_POST['theme']);
$_SESSION['bg'] = clean($_POST['bg']);
$_SESSION['container'] = clean($_POST['container']);
// $_SESSION['background_config_taurus'] = clean($_POST['background_config_taurus']);
$_SESSION['background_config_taurus'] = $_POST['background_config_taurus'];

$parametros = parametros_getByNome('background_config_taurus');
if($parametros !== false){
  $parametros['ds_valor'] =  $_POST['background_config_taurus'];
  parametros_update($parametros);
}else{
  $parametros = parametros_create();
  $parametros['ds_parametro'] = 'background_config_taurus';
  $parametros['ds_valor'] =  $_POST['background_config_taurus'];
  parametros_insert($parametros);
}

function clean($str) {
  return htmlentities($str, ENT_QUOTES, 'utf-8');
}
