<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <link href="style.css" rel="stylesheet" type="text/css" media="all" /> </head> <body> <script language="javascript" type="text/javascript"> clearForm(AForm); function validateForm(AForm) { //1. NICK ALLEGROWICZA reg1 = /^[a-zA-Z0-9a±ę¶ćżĽńłóˇĘ¦ĆŻ¬ŃŁÓ@_-.]{2,30}$/; wyn = AForm.nick.value.match(reg1); if (wyn == null) { alert("Prosze podac poprawne NICK ALLEGROWICZA. " + "NICK musi zawierac od 2 do 30 liter. " + "Zadne znaki poza literami nie sa dozwolone."); return false; } reg2 = /^[a-zA-Z0-9@._-.]{1,30}$/; wyn = AForm.email.value.match(reg2); if (wyn == null) { alert("Prosze podac poprawny adres e-mail. " + "Wprowadz e-mail jak w szablonie 'tresc@domen.pl'. " + "Wszystkie standardowe znaki sa dozwolone."); return false; } if (!(AForm.plakat.selectedIndex > 0 && AForm.plakat.selectedIndex <= 4)) { alert("Proszę wybrać województwo."); return false; }; AForm.elements['blad'].value = "Wysylanie zdjec. Prosze czekac..."; return true; } function clearForm(AForm) { for (i = 0; i < AForm.elements.length; i++) { if (AForm.elements[i].type == "radio") { AForm.elements[i].checked = false; } else if (AForm.elements[i].type == "checkbox") { AForm.elements[i].checked = false; } else if (AForm.elements[i].type == "text") { AForm.elements[i].value = ''; } else if (AForm.elements[i].type == "textarea") { AForm.elements[i].value = ''; } else if (AForm.elements[i].type == "select-one") { AForm.elements[i].selectedIndex = 0; } else if (AForm.elements[i].type == "select-multiple") { AForm.elements[i].selectedIndex = -1; } } return true; } </script> <form class="normal" action="uparray3.php" method="post" enctype="multipart/form-data"> <table> <tr> <td> Nick allegrowicza: <input class="formularz" type="text" name="nick"/> </td> </tr> <tr> <td> Email: <input class="formularz" type="text" name="email"/> </td> </tr> <tr> <td>Zakupiny plakat: <select class="formularz" name="plakat"> </select> </td> </tr> <tr> <td> <input class="blad" type="text" name="maxzd" readonly="readonly" /> </td> </tr> <tr> Wyslij nam zdjecia które chcesz umiescic na plakacie: </td> </tr> <tr> <td> Zdjecie nr 1:<br /> <input type="file" name="pictures[]" width="250px" size="40" accept="image/jpeg,image/gif,image/tiff,image/png"/> </td> <td> Dodaj tekst pod zdjeciem: <input class="formularz" type="checkbox" name="checktekst[]" value="wartosc" onclick="this.form.elements['tekst0'].disabled = !this.checked"/> <input class="formularz" type="text" name="tekst0" size="40" disabled="disabled" /> </td> </tr> <tr> <td> Zdjecie nr 2:<br /> <input type="file" name="pictures[]" width="250px" size="40" accept="image/jpeg,image/gif,image/tiff,image/png"/> </td> <td> Dodaj tekst pod zdjeciem: <input class="formularz" type="checkbox" name="checktekst[]" value="wartosc" onclick="this.form.elements['tekst1'].disabled = !this.checked" /> <input class="formularz" type="text" name="tekst1" size="40" disabled="disabled" /> </td> </tr> <tr> <td> Zdjecie nr 3:<br /> <input type="file" name="pictures[]" width="250px" size="40" accept="image/jpeg,image/gif,image/tiff,image/png"/> </td> <td> Dodaj tekst pod zdjeciem: <input class="formularz" type="checkbox" name="checktekst[]" value="wartosc" onclick="this.form.elements['tekst2'].disabled = !this.checked" /> <input class="formularz" type="text" name="tekst2" size="40" disabled="disabled" /> </td> </tr> <tr> <td> <input type="image" src="bt_wyslij.jpg" value="wyslij" name="wyslij" onclick="return validateForm(this.form);"/> <input type="image" src="bt_wyczysc.jpg" value="kasuj" name="kasuj" onclick="return clearForm(this.form);"/> </td> </tr> </table> <input class="blad" type="text" name="blad" size="50" readonly="readonly" /> </form> </body> </html>