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/';
/*
 * MAILER
 */
include_once "tools/mailer/send-email.inc.php";
$cart = new cart($db_conn, PREV, false, 1, $_SESSION['lang']['id'], $lang['prev'], DIR);
$ord = new ordini($db_conn, $_SESSION['lang']['id']);
$curr_page = "preventivo_riepilogo";
if (isset($_SESSION['prev_sended']) && $cart->get_quantity() > 0) {
    $clt = $ord->verifica_ordine($_SESSION['prev_sended']);
    if (!empty($clt)) {
        $spesa = $cart->print_cart('print');
        $nome = ucwords($clt->fields['nome']) . ' ' . ucwords($clt->fields['cognome']);
        $tel = $clt->fields['tel'];
        $mail = $clt->fields['email'];
        /*
         * INVIO MAIL ----------------------------------------------------------------------------
         */
        //Variabili Smarty
        $smarty->assign('table_prod', $spesa);
        $smarty->assign('nome', $nome);
        $smarty->assign('tel', $tel);
        $smarty->assign('email', $mail);
        $smarty->assign('nazione', $clt->fields['nazione']);
Ejemplo n.º 2
0
    ?>
<br />
      					<?php 
    echo $lang['catalogo']['qty_request'];
    ?>
: <?php 
    echo $prod->quantity;
    ?>
      				</div>
      				<div class="modal-footer">
      					<button type="button" class="btn btn-default" data-dismiss="modal">Ok</button>
      					<a href="<?php 
    echo $lang['header']['link_prev'][LINK];
    ?>
" class="btn btn-primary"><?php 
    echo $lang['header']['link_prev']['title'];
    ?>
</a>
      				</div>
      			</div>
      		</div>
      	</div>
<?php 
    exit;
}
//Richiesta elenco numero di prodotti nel preventivo
if (isset($_POST['tot_prod'])) {
    $cart = new cart($db_conn, PREV, false, 1, $_SESSION['lang']['id'], $lang['catalogo'], DIR);
    echo $cart->get_quantity();
}
$db_conn->Close();