PATH:
root
/
wulkantemplates
<?php $class = "page"; include_once "begin.php"; $messages = [ "ready" => "", "sending" => "Wysyłanie", "send-success" => "Sukces", "send-error" => "Błąd wysyłania", "verification-error" => "Błąd weryfikacji", "not-send" => "Problem z rozpoczęciem wysłania" ]; $_SESSION['form'] = array_merge([ "name" => false, "phone" => false, "mail" => false, "security" => false, "message" => false, "submit" => false, "zgoda2" => false, "cv" => false, "state" => "ready" ], isset($_SESSION['form']) ? $_SESSION['form'] : []); if (isset($_POST['form']) && $_SESSION['form']['state'] == "ready") { $_SESSION['form'] = array_merge($_SESSION['form'], [ "name" => isset($_POST["form"]["name"]) ? $_POST["form"]["name"] : false, "phone" => isset($_POST["form"]["phone"]) ? $_POST["form"]["phone"] : false, "mail" => isset($_POST["form"]["mail"]) ? $_POST["form"]["mail"] : false, "security" => isset($_POST["form"]["security"]) ? $_POST["form"]["security"] : false, "message" => isset($_POST["form"]["message"]) ? $_POST["form"]["message"] : false, "cv" => isset($_POST["form"]["cv"]) ? $_POST["form"]["cv"] : false, "submit" => isset($_POST["form"]["submit"]) ? $_POST["form"]["submit"] : false, "zgoda2" => isset($_POST["form"]["zgoda2"]) ? $_POST["form"]["zgoda2"] : false, "state" => "sending" ]); header("Location: {$_SERVER['REQUEST_URI']}"); } ?> <main class="main main--<?php echo $class . ($id_menu == 8 ? " main--contact" : ""); ?>"> <section class="container-margin container"> <h1 class="section__heading"> <?php echo WORK; ?> </h1><?php if ($id_menu == 8) { ?> <div class="main__two"> <?php } if ($currentPageInfo['tekst'] > 0) { echo $teksty[$currentPageInfo['tekst']]; } if ($id_menu == 8) { $a = isset($_POST['a']) ? intval($_POST['a']) % 10 : rand(0, 5); $b = isset($_POST['b']) ? intval($_POST['b']) % 10 : rand(0, 4); $formReadOnly = ""; if ($_SESSION['form']['state'] != "ready" && $_SESSION['form']['state'] != "verification-error" && $_SESSION['form']['state'] != "send-error" && $_SESSION['form']['state'] != "not-send") $formReadOnly = " readonly=\"readonly\" disabled=\"disabled\""; else $_SESSION['security'] = ["a" => $a, "b" => $b]; ?> </div> <div class="container__form work"> <div class="two-form__form"> <h2><?php echo CONTACT_FORM; ?></h2> <p class="form__message message"><?php echo isset($messages[$_SESSION['form']['state']]) ? $messages[$_SESSION['form']['state']] : ""; ?></p> <form class="form__contact" name="contact-form" method="POST" action="<?php echo $_SERVER['REQUEST_URI']; ?>" enctype="multipart/form-data"> <input name="form[name]" type="text" placeholder="<?php echo FORM_FULL_NAME; ?>" required="required"<?php echo $formReadOnly . ($_SESSION['form']['name'] ? " value=\"{$_SESSION['form']['name']}\"" : ""); ?>> <input name="form[phone]" type="text" placeholder="<?php echo FORM_PHONE; ?>"<?php echo $formReadOnly . ($_SESSION['form']['phone'] ? " value=\"{$_SESSION['form']['phone']}\"" : ""); ?>> <input name="form[mail]" type="text" placeholder="<?php echo FORM_MAIL; ?>" required="required"<?php echo $formReadOnly . ($_SESSION['form']['mail'] ? " value=\"{$_SESSION['form']['mail']}\"" : ""); ?>> <input name="form[security]" type="text" placeholder="<?php printf(FORM_SECURITY_QUESTION, $a, $b); ?>" required="required" autocomplete="off"<?php echo $formReadOnly . ($_SESSION['form']['security'] && $_SESSION['form']['state'] == "send-success" ? " value=\"{$_SESSION['form']['security']}\"" : ""); ?>> </br> <label class="small cv">CV</label> <input name="form[cv]" type="file" name="form[cv]" required="required"<?php echo $formReadOnly . ($_SESSION['form']['cv'] ? " value=\"{$_SESSION['form']['cv']}\"" : ""); ?> accept="application/pdf,application/msword,application/vnd.openxmlformats-officedocument.wordprocessingml.document"> <textarea name="form[message]" placeholder="<?php echo FORM_MESSAGE_CONTENT; ?>" required="required"<?php echo $formReadOnly; ?>><?php if ($_SESSION['form']['message']) echo $_SESSION['form']['message']; ?></textarea> <input class="btn-send" name="form[submit]" type="submit" value="<?php echo FORM_SUBMIT; ?>"<?php echo $formReadOnly; ?>> </br> <div class="container-checkbox"> <label class="label-c"> <input type="checkbox" name="form[check]" required="required" value="zgoda"> <?php echo FORM_ZGODA4; ?> <span class="checkmark"></span></label> </div> <div class="container-checkbox"> <label class="label-c"> <input type="checkbox" name="form[zgoda2]" value="zgoda3"> <?php echo FORM_ZGODA3; ?> <span class="checkmark"></span></label> </div> </form><?php if ($_SESSION['form']['state'] == "sending") { require_once "form-send2.php"; } ?> </div> </div> <?php ?> <?php } ?> </section> </main> <?php include_once "footer.php"; if ($_SESSION['form']['state'] != "ready" && !isset($_POST['form'])) unset($_SESSION['form']); ?> </body> </html>
[-] gallery.php
[edit]
[-] form-send2.php
[edit]
[-] paginator.php
[edit]
[+]
..
[-] form.php
[edit]
[-] page-multi.php
[edit]
[-] header.php
[edit]
[-] produkty.php
[edit]
[-] top.php
[edit]
[-] form-send.php
[edit]
[-] category.php
[edit]
[-] home.php
[edit]
[-] footer.php
[edit]
[-] page-m.php
[edit]
[-] page.php
[edit]
[-] jakosc.php
[edit]
[-] news.php
[edit]
[-] page-m2.php
[edit]
[-] page-work.php
[edit]
[-] ajax_more.php
[edit]
[-] begin.php
[edit]
[-] realizations.php
[edit]