profile_save($profile_save_name, $_POST['profile'], $checked_ids, $rules);
    $messageStack->add('Profile saved', 'ready');
}
if ($_GET['del_sel_profile'] != '') {
    // del profile
    profile_delete($_GET['del_sel_profile']);
}
$profile_name = $_GET['profile_name'];
if ($profile_name == '') {
    if ($profile_save_name != '') {
        $profile_name = $profile_save_name;
    } else {
        $profile_name = 'default';
    }
}
$p = profile_load_n($profile_name);
$rules = $p['rules'];
if ($rules != '') {
    $rules_array = explode(' ', $rules);
    $rules_groups = array_chunk($rules_array, 4);
    $grouped = array();
    var_dump($rules_array);
    foreach ($rules_groups as $group) {
        $operation = 0;
        if ($group[1] == '!=') {
            $operation = 1;
        }
        $condition = 0;
        if ($group[3] == 'OR') {
            $condition = 1;
        }
Esempio n. 2
0
 // BOF - Fishnet Services - Nicolas Gemsjäger
 // PDF Rechnung automatisch generieren und per E-Mail versenden
 if (ENABLE_PDFBILL == 'true') {
     $pdfbill_send_check_qry = xtc_db_query("SELECT pdfbill_send FROM " . TABLE_ORDERS_STATUS . " WHERE orders_status_id = '" . $status . "' AND language_id = '" . $_SESSION['languages_id'] . "' AND pdfbill_send = '1' LIMIT 1");
     if (xtc_db_num_rows($pdfbill_send_check_qry) == 1) {
         // Rechnungsnummer erzeugen (Fakturieren)
         if ($order->info['ibn_billnr'] == 0) {
             require_once DIR_FS_INC . 'xtc_get_next_ibillnr.inc.php';
             require_once DIR_FS_INC . 'xtc_set_ibillnr.inc.php';
             require_once DIR_FS_INC . 'xtc_inc_next_ibillnr.inc.php';
             $ibillnr = xtc_get_next_ibillnr();
             xtc_set_ibillnr($oID, $ibillnr);
             xtc_inc_next_ibillnr();
         }
         // PDF erzeugen
         $profile = profile_load_n(profile_automatic_select($order));
         $profile = $profile['profile_parameter_arr'];
         $pdf = new pdfbill($profile, $oID);
         $pdf->max_height = 280;
         $pdf->doc_name = get_pdf_invoice_filename($oID);
         $pdf->LoadData($oID);
         // lieferdatum diskret eintragen
         $pdf->data['delivery_date'] = '';
         $pdf->format();
         $pdf->Output($pdf->doc_name, "F");
         // Rechnung per Mail verschicken
         $check_status_query = xtc_db_query("select customers_name, customers_email_address, orders_status, date_purchased, ibn_billdate, ibn_billnr from " . TABLE_ORDERS . " where orders_id = '" . xtc_db_input($oID) . "'");
         $check_status = xtc_db_fetch_array($check_status_query);
         $billnr = make_billnr($check_status['ibn_billdate'], $check_status['ibn_billnr']);
         // assign language to template for caching
         $smarty->assign('language', $_SESSION['language']);