function head (&$module, $row, $a) { $pic_max_width = $module->config->getValue("PersondetailsHeader", "img_width"); $pic_max_height = $module->config->getValue("PersondetailsHeader", "img_height"); // fit size of image if ($pic_max_width && $pic_max_height) { $pic_size = @getimagesize(Avatar::getAvatar($row['user_id'])->getFilename(Avatar::NORMAL)); if ($pic_size[0] > $pic_max_width || $pic_size[1] > $pic_max_height) { $fak_width = $pic_size[0] / $pic_max_width; $fak_height = $pic_size[1] / $pic_max_height; if ($fak_width > $fak_height) { $pic_width = (int) ($pic_size[0] / $fak_width); $pic_height = (int) ($pic_size[1] / $fak_width); } else { $pic_height = (int) ($pic_size[1] / $fak_height); $pic_width = (int) ($pic_size[0] / $fak_height); } } else { $pic_width = $pic_size[0]; $pic_height = $pic_size[1]; } $pic_max_width = $pic_width; $pic_max_height = $pic_height; } $module->config->config["PersondetailsHeader"]["img_width"] = $pic_max_width; $module->config->config["PersondetailsHeader"]["img_height"] = $pic_max_height; if ($module->config->getValue("Main", "showcontact") && $module->config->getValue("Main", "showimage")) $colspan = " colspan=\"2\""; else $colspan = ""; echo "<tr><td width=\"100%\">\n"; echo "<table" . $module->config->getAttributes("PersondetailsHeader", "table") . ">\n"; // display name as headline if (!$module->config->getValue('PersondetailsHeader', 'hidename')) { echo "<tr" . $module->config->getAttributes("PersondetailsHeader", "tr") . ">"; echo "<td$colspan width=\"100%\""; echo $module->config->getAttributes("PersondetailsHeader", "headlinetd") . ">"; echo "<font" . $module->config->getAttributes("PersondetailsHeader", "font") . ">"; echo htmlReady($row['fullname'], TRUE); echo "</font></td></tr>\n"; } if ($module->config->getValue("Main", "showimage") || $module->config->getValue("Main", "showcontact")) { echo "<tr>"; if ($module->config->getValue("Main", "showcontact") && ($module->config->getValue("Main", "showimage") == "right" || !$module->config->getValue("Main", "showimage"))) { echo "<td" . $module->config->getAttributes("PersondetailsHeader", "contacttd") . ">"; echo kontakt($module, $row) . "</td>\n"; } if ($module->config->getValue("Main", "showimage")) { echo "<td" . $module->config->getAttributes("PersondetailsHeader", "picturetd") . ">"; $avatar = Avatar::getAvatar($row['user_id']); if ($avatar->is_customized()) { echo "<img src=\"".$avatar->getURL(Avatar::NORMAL) . "\" alt=\"Foto " . htmlReady(trim($row['fullname'])) . "\""; echo $module->config->getAttributes("PersondetailsHeader", "img") . "></td>"; } else echo " </td>"; } if ($module->config->getValue("Main", "showcontact") && $module->config->getValue("Main", "showimage") == "left") { echo "<td" . $module->config->getAttributes("PersondetailsHeader", "contacttd") . ">"; echo kontakt($module, $row) . "</td>\n"; } echo "</tr>\n"; if ($module->config->getValue('Main', 'showcontact') && $module->config->getValue('Contact', 'separatelinks')) { echo "<tr><td"; if ($module->config->getValue('Main', 'showimage')) echo ' colspan="2"'; echo $module->config->getAttributes('PersondetailsHeader', 'contacttd') . ">\n"; echo kontakt($module, $row, TRUE); echo "</td></tr>\n"; } } echo "</table>\n</td></tr>\n"; }
$szkola = nazwaSzkoly($_POST['szkola']); $nr_dowodu1 = mb_convert_case($_POST['nr_dowodu1'], MB_CASE_UPPER); $nr_dowodu2 = $_POST['nr_dowodu2']; $data_urodzenia = mb_convert_case(data_u($_POST['rok'], $_POST['miesiac'], $_POST['dzien']), MB_CASE_LOWER); if (empty($_POST['muzyka[0]'])) { $muzyka = "Nic nie wybrano"; } else { $muzyka = przecinek($_POST['muzyka']); } if (empty($_POST['auto'])) { $auto = "Nic nie wybrano"; } else { $auto = przecinek($_POST['auto']); } $uwagi = str_split(uwagi($_POST['uwagi']), 700); $dane_kontaktowe = kontakt($_POST['dane_kontaktowe']); echo "<table>"; echo "<tr><th colspan=\"2\">Dane osobowe</th></tr>"; echo "<tr><td>Nazwisko: </td><td>" . sprawdzanieNazwiska($nazwisko) . "</td></tr>"; echo "<tr><td>Ilość znaków wprawdzonych w polu \"Nazwisko\": </td><td>" . $dlugosc_nazwisko . "</td></tr>"; echo "<tr><td>Imię: </td><td>" . $imie . "</td></tr>"; echo "<tr><td>Ilość znaków wprawdzonych w polu \"Imię\": </td><td>" . $dlugosc_imie . "</td></tr>"; echo "<tr><td>Drugie imię: </td><td>" . $drugie_imie . "</td></tr>"; echo "<tr><td>Ilość znaków wprawdzonych w polu \"Drugie imię\": </td><td>" . $dlugosc_drugie_imie . "</td></tr>"; echo "<tr><td>Nazwa szkoły: </td><td>" . $szkola . "</td></tr>"; echo "<tr><td>E-mail:</td><td>" . sprawdzanieEmail($mail) . "</td></tr>"; echo "<tr><td>PESEL:</td><td>" . $pesel . "</td></tr>"; echo "<tr><td>Sprawdzanie PESEL:</td><td>" . sprawdzaniePesel($pesel) . "</td></tr>"; echo "<tr><td>Nazwa użytkownika e-mail: </td><td>" . $user_host[0] . "</td></tr>"; echo "<tr><td>Nazwa domeny e-mail: </td><td>" . $user_host[1] . "</td></tr>"; echo "<tr><td>Numer dowodu: </td><td>" . $nr_dowodu1 . " " . $nr_dowodu2 . "</td></tr>";
function head (&$module, $data, $a) { if ($module->config->getValue("Main", "showcontact") && $module->config->getValue("Main", "showimage")) $colspan = " colspan=\"2\""; else $colspan = ""; echo "<tr><td width=\"100%\">\n"; echo "<table" . $module->config->getAttributes("PersondetailsHeader", "table") . ">\n"; if (!$module->config->getValue('PersondetailsHeader', 'hidename')) { echo "<tr" . $module->config->getAttributes("PersondetailsHeader", "tr") . ">"; echo "<td$colspan width=\"100%\""; echo $module->config->getAttributes("PersondetailsHeader", "headlinetd") . ">"; echo "<font" . $module->config->getAttributes("PersondetailsHeader", "font") . ">"; echo $data["fullname"]; echo "</font></td></tr>\n"; } if ($module->config->getValue("Main", "showimage") || $module->config->getValue("Main", "showcontact")) { echo "<tr>"; if ($module->config->getValue("Main", "showcontact") && ($module->config->getValue("Main", "showimage") == "right" || !$module->config->getValue("Main", "showimage"))) { echo "<td" . $module->config->getAttributes("PersondetailsHeader", "contacttd") . ">"; echo kontakt($module, $data) . "</td>\n"; } if ($module->config->getValue("Main", "showimage")) { echo "<td" . $module->config->getAttributes("PersondetailsHeader", "picturetd") . ">"; echo "<img src=\"".Avatar::getNobody()->getUrl(Avatar::NORMAL)."\" alt=\"Foto " . $data["fullname"] . "\""; echo $module->config->getAttributes("PersondetailsHeader", "img") . ">"; } if ($module->config->getValue("Main", "showcontact") && $module->config->getValue("Main", "showimage") == "left") { echo "<td" . $module->config->getAttributes("PersondetailsHeader", "contacttd") . ">"; echo kontakt($module, $data) . "</td>\n"; } echo "</tr>\n"; if ($module->config->getValue('Main', 'showcontact') && $module->config->getValue('Contact', 'separatelinks')) { echo "<tr><td"; if ($module->config->getValue('Main', 'showimage')) echo ' colspan="2"'; echo $module->config->getAttributes('PersondetailsHeader', 'contacttd') . ">\n"; echo kontakt($module, $data, TRUE); echo "</td></tr>\n"; } } echo "</table>\n</td></tr>\n"; }