Ejemplo n.º 1
0
<h1>Preventivo inviato</h1>
<?php 
include 'includes/archivio.php';
include '../../tools/mailer/send-email.inc.php';
include '../../classes/logging.php';
$log = new logging("log/log.txt");
$archivio = new archivio();
$prezzo = 0;
$rows = '';
$token = $archivio->generaToken($_POST['ordine']);
//Impostazioni lingua
$lingua = 0;
$arr_lang = array('0' => 'it', '1' => 'en', '2' => 'ru');
if (isset($_POST['lang']) && array_key_exists($_POST['lang'], $arr_lang)) {
    $lingua = $_POST['lang'];
    $log->debug("Settaggio lingua " . $lingua);
}
//Inclusione dizionario
$log->debug("Label lingua " . $arr_lang[$lingua]);
include 'includes/language/' . $arr_lang[$lingua] . '/preventivo.php';
if (isset($_POST)) {
    // INCLUSIONE SMARTY
    require_once "../../tools/smarty/Smarty.class.php";
    $smarty = new Smarty();
    $smarty->force_compile = true;
    $smarty->debugging = false;
    $smarty->caching = false;
    $smarty->compile_dir = '../../tools/smarty/templates_c/';
    $smarty->config_dir = '../../tools/smarty/configs/';
    $smarty->cache_dir = '../../tools/smarty/cache/';
    //Numero di articoli