$meno_csv = $meno_csv . "-pasy"; } $file = "{$c_obj}-{$meno_csv}.csv"; if (!file_exists($directory . "/" . $file)) { generate_csv_new($order, $revision, $sub); } else { unlink($directory . "/" . $file); generate_csv_new($order, $revision, $sub); } header("location: ?vyber=objednavky&order={$order}&revision={$revision}"); } if ($action == "send_mail") { send_email_revision($revision, 1); } if ($action == "send_mail_to") { send_email_revision($revision); } } //var_dump($form_data); //var_dump($form_data_narez); if ($_POST[submit]) { unset($form_data); $form_data[meno] = sec_sql(sec_input($_POST["meno"])); $form_data[adresa] = sec_sql(sec_input($_POST["adresa"])); $form_data[mesto] = sec_sql(sec_input($_POST["mesto"])); $form_data[ico_icdph] = sec_sql(sec_input($_POST["ico_icdph"])); $form_data[telefon] = sec_sql(sec_input($_POST["telefon"])); $form_data[email] = sec_sql(sec_input($_POST["email"])); $form_data[material] = sec_sql(sec_input($_POST["material"])); $form_data[hrubka_rev] = sec_sql(sec_input($_POST["hrubka_rev"])); $form_data[vyrobca] = sec_sql(sec_input($_POST["vyrobca"]));
foreach ($data[product_atribute_options_all][$i] as $key => $option) { $query = "INSERT INTO objednavka_row_atribute \r\n (id_revizia, id_objednavka_row, id_product_atribute, id_product_atribute_option)\r\n VALUES ({$revizia_id}, {$porez_id}, {$key}, {$option})"; //var_dump($query); $sql_porez_hrana = sql_insert($query); } } sql_update("UPDATE objednavka SET delivery=\"{$obj_delivery}\"\r\n WHERE id=\"{$obj_id}\""); //dd($data); mysql_query("COMMIT"); //unset($_SESSION['posted_form']); // ak je objednávka iba rozpracovaná, tak pošle mail iba zakaznikovy if ($_POST[submit_save]) { send_email_revision($revizia_id, "", "rozpracovana"); } if ($_POST[submit_confirm]) { send_email_revision($revizia_id); } header("location: index.php?message=OK"); die; } else { echo "<div id=error_message>" . implode("<br>", $error_msg) . "</div>"; } } echo "<div id=\"form_data\">"; display_form_data($fieldsets_c, $secure_key); echo "</div>"; } // =========================================================== // 2 stránka formulára - koniec if ($page == 3) { }