$v) $_POST[$k]=htmlspecialchars(strip_tags($v)); postvars('file1,file2,tablename,lang,trans,nazwisko,email,telefon,pytania,subm,temat,kat,smtpserver,jak,tr_nick,back_url,back,testform,exitURL,posted'); if (isset($_GET['page']) || isset($_POST['page'])) $page = getvar_escape('page'); if (!isset($_POST['jak']) && isset ($_GET['jak'])) $jak = getvar_escape('jak'); $lang = "SK"; $poszlo = 0; $lay = ""; if (isset($jak) && $jak == "popup") $lay = "mini_"; if (isset($page) && $page != null && $page != "") { $mailto = $CONF['confMail']; $mailto = explode(",", $mailto); } else { $mailFile = "UCIFORM_ADRES.html.i"; if (file_exists($mailFile)) $mailto = file_get_contents($mailFile); $mailto = explode(",", $mailto); } $katFile = "UCIFORM_KATEGORIE.html.i"; if (file_exists($katFile)) $kategorie = file_get_contents($katFile); $kategorie = explode("
", nl2br($kategorie)); // odseparowanie adresow email od tematow $katmail = array(); $katrest = array(); foreach ($kategorie as $key) { $reg = "^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)+$^"; $jest = preg_match($reg, $key, $matches); if ($jest == 1) { array_push($katmail, $matches[0]); } else { array_push($katmail, "0"); } } $ilen = 0; foreach ($kategorie as $key) { $ile = strlen($katmail[$ilen])."
"; if ($ile > 1) { $katcat = substr($key, 0, -$ile); array_push($katrest, $katcat); } else { array_push ($katrest, $key); } $ilen++; } //echo $katrest[$kat-1]; //echo $katmail[$kat-1]; if (isset($posted) && $posted == "1") { $nreg = '/^['.$trans[$lang]['Letters'].'\s\-]+$/'; if (!$nazwisko) $bledy.="
  • ".$trans[$lang]['ErrorName']."
  • "; if (!(preg_match($nreg, $nazwisko)) && ($bledy == "")) $bledy.="
  • ".$trans[$lang]['ErrorNameLetters']."
  • "; if (!$email) $bledy.="
  • ".$trans[$lang]['ErrorEmail']."
  • "; if (!ic_validate_email($email) && $email != "") $bledy.="
  • ".$trans[$lang]['ErrorEmailCorrect']."
  • "; if (!(isset($page) && $page != null && $page != "")) { if (!(preg_match('/^[\0-9]+$/D', $kat)) || $kat == "0") $bledy.="
  • ".$trans[$lang]['ErrorCategory']."
  • "; } if ($temat == null || $temat == "") $bledy.="
  • ".$trans[$lang]['ErrorTopic']."
  • "; if ($pytania == null || $temat == "") $bledy.="
  • ".$trans[$lang]['ErrorBody']."
  • "; if (!$bledy) { $nagFile = "UCIFORM_NAGLOWEK.html.i"; if (file_exists($nagFile)) $naglowek = file_get_contents($nagFile); $stFile = "UCIFORM_STOPKA.html.i"; if (file_exists($stFile)) $stopka = file_get_contents($stFile); $body = $naglowek; if (isset($page) && $page != null && $page != "") $body .= "\r\nUwagi do strony: ".$page; $body .= "\r\nImię i nazwisko: ".$nazwisko."\r\n"; $body .= "Email: ".$email."\r\n"; $body .= "Temat: ".$temat."\r\n"; $body .= "Pytania: ".$pytania."\r\n"; $body .= $stopka; if (isset($page) && $page != null && $page != "") $subject = $CONF['confSubject']; else $subject = $katrest[$kat-1]; foreach($mailto as $key) { $mail = ic_mail_send(array ( 'to' => $key, 'from' => $email, 'subject' => $subject, 'body' => $body, )); } //test $mail2 = ic_mail_send(array ( 'to' => $katmail[$kat-1], 'from' => $email, 'subject' => $subject, 'body' => $body, )); if ($mail == 0) { $poszlo = 1; } } } require_once 'email_'.$lay.'head.html'; if ($poszlo != 1) { if ($bledy && $back != "1") { echo '
    '; $invFile = "UCIFORM_INVALID.html.i"; if (file_exists($invFile)) $invalid = file_get_contents($invFile); echo $invalid; echo "
    "; if (isset($jak) && $jak == "popup") { echo '
    popraw

    '; } } } else { echo '
    '; $conFile = "UCIFORM_CONFIRM.html.i"; if (file_exists($conFile)) $confirm = file_get_contents($conFile); echo $confirm.'
    '; } if (isset($jak) && $jak == "popup") { echo '
    '.$trans[$lang]['Return'].' '.$trans[$lang]['Close'].'
    '; } if (!$poszlo) { ?>

    '.$pytania.'

    '; } else { echo '

    '; } ?>


    if (document.body.offsetWidth < 600) window.resizeTo (1010, 700);'; require_once 'email_'.$lay.'foot.html'; ?>