/** * transformas de la post-^-methodo (c^) * al (HTML-)unikoda esperanto, aŭ al la x-metodo. * * @param eostring $teksto Teksto en UTF-8 kun c^-koditaj * supersignoj. * @param string $enkodo la transform-maniero por la teksto, unu el la * sekvaj valoroj: * - "por-tradukilo": transformas cx-kodigon al c'x ktp., kaj * samtempe c^ al cx, kaj E^ al €. * Estas uzata por transformi datumbazenhavon al * ĉenoj taŭgaj por la tradukilo. * - "x-metodo": transformas la Eo-signojn al iksa-kodigo, * "E^" al "Euro". * - "unikodo": HTMLa unikoda transformo, ekzemple ĉ por c^. * - "utf-8": rekta UTF-8-kodigo. * - "pdf-speciala": Kodigo al la speciala PDF-kodigo uzata de niaj * tiparoj por FPDF (la ne-unikoda versio). "E^" iĝas * "EUR", kaj ĉiuj ne-latin-1-aj signoj (kaj kelkaj aliaj) * ne estas montreblaj tiel (Vidu {@link eo()}, * {@link estas_ekster_latin1()}). Kontraŭe al la aliaj * kodigoj, tiu ĉi ne nur ŝanĝas la ^-koditajn signojn, * sed transkodigas la tutan tekston. * - "identa": identa transformo - ŝanĝas nenion. * * Ĉiuj aliaj valoroj nun ankaŭ funkcias kiel la identa * transformo, sed eble estonte aldoniĝos pliaj transformoj. * * @return string la transformita teksto. */ function eotransformado($teksto, $enkodo) { switch ($enkodo) { case 'pdf-speciala': return eo($teksto); case "por-tradukilo": $trans = array("Cx" => "C'x", "cx" => "c'x", "Gx" => "G'x", "gx" => "g'x", "Hx" => "H'x", "hx" => "h'x", "Jx" => "J'x", "jx" => "j'x", "Sx" => "S'x", "sx" => "s'x", "Ux" => "U'x", "ux" => "u'x", "C^" => "Cx", "c^" => "cx", "G^" => "Gx", "g^" => "gx", "H^" => "Hx", "h^" => "hx", "J^" => "Jx", "j^" => "jx", "S^" => "Sx", "s^" => "sx", "U^" => "Ux", "u^" => "ux", "E^" => "€"); break; case "x-metodo": $trans = array("C^" => "Cx", "c^" => "cx", "G^" => "Gx", "g^" => "gx", "H^" => "Hx", "h^" => "hx", "J^" => "Jx", "j^" => "jx", "S^" => "Sx", "s^" => "sx", "U^" => "Ux", "u^" => "ux", "E^" => "Euro"); break; case "unikodo": $trans = array("C^" => "Ĉ", "c^" => "ĉ", "G^" => "Ĝ", "g^" => "ĝ", "H^" => "Ĥ", "h^" => "ĥ", "J^" => "Ĵ", "j^" => "ĵ", "S^" => "Ŝ", "s^" => "ŝ", "U^" => "Ŭ", "u^" => "ŭ", "E^" => "€"); // TODO: eble ni uzu € ? break; case "utf-8": $trans = array("C^" => "Ĉ", "c^" => "ĉ", "G^" => "Ĝ", "g^" => "ĝ", "H^" => "Ĥ", "h^" => "ĥ", "J^" => "Ĵ", "j^" => "ĵ", "S^" => "Ŝ", "s^" => "ŝ", "U^" => "Ŭ", "u^" => "ŭ", "E^" => "€"); break; case 'identa': default: $trans = array(); } return strtr($teksto, $trans); }
function print_import() { global $self, $xurl, $DB; print_header(); ?> <center> <h3>Import DB</h3> <div class="frm"> <b>.sql</b> or <b>.gz</b> file: <input type="file" name="file1" value="" size=40><br> <input type="hidden" name="doim" value="1"> <input type="submit" value=" Upload and Import " onclick="return ays()"><input type="button" value=" Cancel " onclick="window.location='<?php eo($self . '?' . $xurl . '&db=' . $DB['db']); ?> '"> </div> <br><br><br> <!-- <h3>Import one Table from CSV</h3> <div class="frm"> .csv file (Excel style): <input type="file" name="file2" value="" size=40><br> <input type="checkbox" name="r1" value="1" checked> first row contain field names<br> <small>(note: for success, field names should be exactly the same as in DB)</small><br> Character set of the file: <select name="chset"><?php echo chset_select('utf8'); ?> </select> <br><br> Import into:<br> <input type="radio" name="tt" value="1" checked="checked"> existing table: <select name="t"> <option value=''>- select -</option> <?php echo sel(db_array('show tables', NULL, 0, 1), 0, ''); ?> </select> <div style="margin-left:20px"> <input type="checkbox" name="ttr" value="1"> replace existing DB data<br> <input type="checkbox" name="tti" value="1"> ignore duplicate rows </div> <input type="radio" name="tt" value="2"> create new table with name <input type="text" name="tn" value="" size="20"> <br><br> <input type="hidden" name="doimcsv" value="1"> <input type="submit" value=" Upload and Import " onclick="return ays()"><input type="button" value=" Cancel " onclick="window.location='<?php eo($self); ?> '"> </div> --> </center> <?php print_footer(); exit; }
function kreu_akceptofolio($partoprenantoID, $partoprenoID) { if ($partoprenoID != 0) { $partopreno = new Partopreno($partoprenoID); $partoprenanto = new Partoprenanto($partoprenantoID); } $ko = new Kotizo($partopreno, $partoprenanto, $_SESSION["renkontigxo"]); $this->pdf->setFontSize(10); $this->pdf->text(27, 20, 'Persona nomo:'); $this->pdf->text(40, 25, ' Nomo:'); if ($partoprenoID != 0) { $this->pdf->setFontSize(15); if ($partoprenanto->datoj[sxildnomo] != '') { $kajo = " (" . $partoprenanto->datoj[sxildnomo] . ")"; } $this->pdf->text(53, 20, eo($this->esso($partoprenanto->datoj[personanomo] . $kajo))); $this->pdf->text(53, 25, eo($this->esso($partoprenanto->datoj[nomo]))); $this->pdf->SetFont($this->font, '', 15); } $this->pdf->setFontSize(12); $this->pdf->setY(50); $this->pdf->MultiCell(160, 5, eo("1. Bonvolu tralegi c^i tiun folion kaj kontrolu, c^u la datumoj (nomo, adreso, telefonnumero ktp.) g^ustas."), 0, 'L'); $this->pdf->MultiCell(160, 5, eo("2. Se vi trovas eraron au^ se mankas informojn (ekz. naskig^dato) skribu la g^ustan informon dekstre apud la malg^usta (au^ mankanta)."), 0, 'L'); $this->pdf->MultiCell(160, 5, eo("3. Notu sur tiu c^i folio, je kioma horo estas noktomezo en via hejmurbo lau^ la c^i-loka tempo."), 0, 'L'); $this->pdf->MultiCell(160, 5, eo("4. Atendu en la antau^halo g^is ni alvokos vin au^ vian atendnumeron."), 0, 'L'); $this->pdf->SetFont($this->font . 'D', '', 20); $this->pdf->text(85, 40, 'Akcepto-Folio'); $this->pdf->setFontSize(13); $this->pdf->ln(1); $this->pdf->write(5, eo('Vi alig^is kiel:')); $this->pdf->SetFont($this->font, '', 12); /* $this->pdf->text(80,20,"Celo:"); $this->pdf->setFontSize(30); $this->pdf->text(90,20,$partopreno->datoj[traktstato]);*/ // aufgrund der mengenmäßigen Verteilung nicht benötigt. $this->pdf->setFontSize(13); $this->pdf->ln(5); $X = 50; $Y = 6; if ($partoprenoID != 0) { if ($partoprenanto->datoj[sxildnomo] != '') { $kajo = " (" . $partoprenanto->datoj[sxildnomo] . ")"; } } $this->pdf->cell($X, $Y, eo("Persona Nomo:"), 0, 0, 'R'); if ($partoprenoID != 0) { $this->pdf->cell($X, $Y, eo($this->esso($partoprenanto->datoj[personanomo] . $kajo)), 0, 1, 'L'); } $this->pdf->cell($X, $Y, eo("Nomo:"), 0, 0, 'R'); if ($partoprenoID != 0) { $this->pdf->cell($X, $Y, eo($this->esso($partoprenanto->datoj[nomo])), 0, 1, 'L'); } $this->pdf->SetFont($this->font, '', 13); $this->pdf->cell($X, $Y, eo("Adresaldonaj^o:"), 0, 0, 'R'); if ($partoprenoID != 0) { $this->pdf->cell($X, $Y, eo($partoprenanto->datoj[adresaldonajxo]), 0, 1, 'L'); } $this->pdf->cell($X, $Y, eo("Strato"), 0, 0, 'R'); if ($partoprenoID != 0) { $this->pdf->cell($X, $Y, eo($partoprenanto->datoj[strato]), 0, 1, 'L'); } $this->pdf->cell($X, $Y, eo("Pos^tkodo kaj urbo"), 0, 0, 'R'); if ($partoprenoID != 0) { $this->pdf->cell($X, $Y, eo($partoprenanto->datoj[posxtkodo] . ', ' . $partoprenanto->datoj[urbo]), 0, 1, 'L'); } $this->pdf->cell($X, $Y, eo("Lando kaj provinco:"), 0, 0, 'R'); if ($partoprenoID != 0) { if ($partoprenanto->datoj[sxildlando] != '') { $kajo = " (" . $partoprenanto->datoj[sxildlando] . ")"; } if ($partoprenanto->datoj[provinco] != '') { $kajo2 = " / " . $partoprenanto->datoj[provinco]; } $this->pdf->cell($X, $Y, eo(eltrovu_lando($partoprenanto->datoj[lando]) . $kajo . $kajo2), 0, 1, 'L'); } $this->pdf->cell($X, $Y, eo("Telefonnumero:"), 0, 0, 'R'); if ($partoprenoID != 0) { $this->pdf->cell($X, $Y, eo($partoprenanto->datoj[telefono]), 0, 1, 'L'); } $this->pdf->cell($X, $Y, eo("Telefakso:"), 0, 0, 'R'); if ($partoprenoID != 0) { $this->pdf->cell($X, $Y, eo($partoprenanto->datoj[telefakso]), 0, 0, 'L'); } $this->pdf->cell($X, $Y, eo("Partoprentempo:"), 0, 0, 'R'); if ($partoprenoID != 0) { $this->pdf->cell($X, $Y, eo(substr($partopreno->datoj[de], 8, 2) . "a g^is " . substr($partopreno->datoj[gxis], 8, 2) . "a"), 0, 1, 'L'); } $this->pdf->cell($X, $Y, eo("Retpos^tadreso:"), 0, 0, 'R'); if ($partoprenoID != 0) { $i = 23; $this->pdf->setFontSize(13); $epost = eo($partoprenanto->datoj[retposxto]); while ($this->pdf->GetStringWidth($epost) > 60) { $i--; $this->pdf->setFontSize($i); } $this->pdf->cell($X, $Y, eo($partoprenanto->datoj[retposxto]), 0, 0, 'L'); } $this->pdf->setFontSize(13); $this->pdf->cell($X, $Y, eo("Partoprentagoj:"), 0, 0, 'R'); if ($partoprenoID != 0) { $this->pdf->cell($X, $Y, eo($ko->partoprentagoj), 0, 1, 'L'); } $this->pdf->cell($X, $Y, eo("Naskig^dato:"), 0, 0, 'R'); if ($partoprenoID != 0) { $this->pdf->cell($X, $Y, eo($partoprenanto->datoj[naskigxdato]), 0, 0, 'L'); } $this->pdf->cell($X, $Y, eo("Memzorganto:"), 0, 0, 'R'); if ($partoprenoID != 0) { if ($partopreno->datoj[domotipo] == 'M') { $domo = "jes"; $domotipo = 'memzorgantejo'; } else { $domo = "ne"; $domotipo = 'junulargastejo'; } $this->pdf->cell($X, $Y, $domo, 0, 1, 'L'); } $this->pdf->cell($X, $Y, eo("Sekso:"), 0, 0, 'R'); if ($partoprenoID != 0) { $this->pdf->cell($X, $Y, eo($partoprenanto->sekso), 0, 0, 'L'); } $this->pdf->cell($X, $Y, eo("Vegetarano:"), 0, 0, 'R'); if ($partoprenoID != 0) { if ($partopreno->datoj[vegetare] == 'J') { $vegi = "jes"; } else { $vegi = "ne"; } $this->pdf->cell($X, $Y, $vegi, 0, 1, 'L'); } $this->pdf->ln(13); $this->pdf->write(5, eo("Je kioma horo estas noktomezo en via hejmurbo lau^ la c^i-loka tempo:")); $this->pdf->ln(20); $X = 40; $this->pdf->cell($X, $Y, eo("Kotizo"), 0, 0, 'R'); if ($partoprenoID != 0) { $this->pdf->cell($X, $Y, number_format($ko->bazakotizo - $ko->landarabato, 2) . " EUR", 0, 1, 'R'); } $this->pdf->cell($X, $Y, eo("Rabato"), 0, 0, 'R'); if ($partoprenoID != 0) { $this->pdf->cell($X, $Y, number_format($ko->rabato, 2) . " EUR", 0, 1, 'R'); } $this->pdf->cell($X, $Y, eo("Krompago"), 0, 0, 'R'); if ($partoprenoID != 0) { $this->pdf->cell($X, $Y, number_format($ko->krompago, 2) . " EUR", 0, 1, 'R'); } $this->pdf->ln(4); $this->pdf->cell($X, $Y, eo("Pagenda kotizo"), 0, 0, 'R'); if ($partoprenoID != 0) { $this->pdf->cell($X, $Y, number_format($ko->kotizo, 2) . " EUR", 0, 1, 'R'); } $this->pdf->cell($X, $Y, eo("Antau^pago"), 0, 0, 'R'); if ($partoprenoID != 0) { $this->pdf->cell($X, $Y, number_format($ko->antauxpago, 2) . " EUR", 0, 0, 'R'); $this->pdf->cell(30, $Y, eo("alvenis je la:"), 0, 0, 'R'); $this->pdf->cell(30, $Y, $ko->antauxpagdato, 0, 1, 'R'); } $this->pdf->cell($X, $Y, eo("Membrokotizo"), 0, 0, 'R'); // TODO: Überlegen, was tun // $this->pdf->cell($X,$Y,number_format(0.00,2)." EUR",0,1,'R'); $this->pdf->ln(4); $this->pdf->cell($X, $Y, eo("Pagenda"), 0, 0, 'R'); if ($partoprenoID != 0) { $this->pdf->cell($X, $Y, number_format($ko->pagenda, 2) . " EUR", 0, 1, 'R'); } $this->pdf->rect(160, 15, 30, 15); $this->pdf->rect(20, 265, 30, 15); $this->pdf->rect(90, 265, 30, 15); $this->pdf->rect(160, 265, 30, 15); $this->pdf->setFontSize(8); $this->pdf->text(31, 268, "pagis"); $this->pdf->text(97, 268, "enkomputiligita"); $this->pdf->text(170, 268, eo("C^ambro")); $this->pdf->text(168, 18, "Atendnumero"); $this->pdf->SetLineWidth(0.6); $this->pdf->line(20, 165, 190, 165); $this->pdf->line(20, 85, 190, 85); $this->pdf->line(20, 180, 190, 180); $this->pdf->line(30, 210, 100, 210); $this->pdf->line(30, 230, 100, 230); if (0 == $partoprenantoID) { echo " faris malplenan akzeptfolion<br/>\n"; } }
*/ require_once "iloj/iloj.php"; require_once 'iloj/fpdf/fpdf.php'; session_start(); malfermu_datumaro(); if (!rajtas("administri")) { ne_rajtas(); } define('FPDF_FONTPATH', './font/'); $font = 'TEMPO'; $pdf = new FPDF(); $pdf->AddFont($font, '', $font . '.php'); $pdf->Open(); $pdf->AddPage(); $pdf->SetFont($font, '', 12); $pdf->text(15, 17, eo("kelkajn statistikojn pri la " . $_SESSION["renkontigxo"]->datoj[nomo] . " en " . $_SESSION["renkontigxo"]->datoj[loko])); $pdf->text(15, 23, "Dato:" . date('Y-m-d')); /* eoecho ("cxiu vegetarano: <BR>\n"); $grr = $renkontigxo->datoj[de]; //FLOOR((TO_DAYS('$renkontigxo->datoj[de]') - TO_DAYS(naskigxdato))/365.25) $sql = "Select personanomo,nomo "; $sql .= "from partoprenantoj as pa,partoprenoj as pp "; $sql .= "where pa.id = pp.partoprenantoID and pp.vegetare = 'J' and alvenstato='a'"; $sql .= "order by personanomo"; sql_farukajmontru($sql); */ //echo "</TD></TR></TABLE>\n"; //la diverskategoria ABC statistiko //$this->agxkategorio = $this->kalkulu_agx_kategorio($agxo,$renkontigxo); //$this->landakategorio = eltrovu_landakategorio($partoprenanto->datoj[lando]);
/** * transformas la tekston laŭ lingvo kaj kodigo * al la taŭga rezulto. * * $tekstoj * aŭ ĉeno, aŭ array() de la formo: * 'eo' => ..., * 'de' => ... * ... * * 'eo' estas la defaŭlta lingvo uzata, kiam la elektita * lingvo mankas. * * La tekstoj estu kodita en UTF-8, eble kun esperantaj * signoj koditaj per c^-maniero. * * La funkcio redonas la tekston en ĝusta kodigo por PDF-eldono. */ function kodigu($teksto) { // TODO!: elprovu, ĉu tiel funkcias en ĉiuj kazoj. // ĝi laboras iom alie ol la varianto en kreu_konfirmilon.php. if ($this->unikode) { return uni($this->lauxlingve($teksto)); } else { return eo($this->lauxlingve($teksto)); } }
function kreu_permesilon($partoprenanto, $renkontigxo, $defVira = "") { if ($partoprenanto) { $vira = $partoprenanto->datoj['sekso'][0] == 'v'; } else { $vira = $defVira; } $this->pdf->AddPage(); $this->pdf->SetY(30); $this->pdf->SetFont($this->font, '', 30); $this->pdf->cell(160, 10, "Gepatra permeso por via IS partopreno", 0, 1, C); $this->pdf->SetFont($this->font, '', 14); $this->pdf->cell(160, 10, eo("(Nur por partoprenantoj, kiuj ankorau^ ne havas 18 jarojn je " . $renkontigxo->datoj['de'] . ")"), 0, 1, C); $this->pdf->SetY(55); $this->pdf->write(5, "Nomo de la partoprenanto: "); $this->pdf->cell(100, 5, eo($partoprenanto->datoj['personanomo'] . " " . $partoprenanto->datoj['nomo']), "B", 1, 'C'); // $this->pdf->line(76,60,180,60); $this->pdf->write(5, eo("\nSe vi je la komencig^o de la IS ankorau^ ne havas 18 jarojn, bonvolu nepre kunporti la suban permesilon de viaj gepatroj:\n\n")); $this->pdf->SetFont($this->font . "D"); $this->pdf->write(5, eo("Mi permesas al mia " . ($vira ? "filo" : "filino") . " vojag^i al la Internacia Seminario kaj partopreni g^in. Krome " . ($vira ? "li" : "s^i") . " rajtas sen gardpersono partopreni la ekskursojn (inklusive la nag^vesperon).")); $this->pdf->SetFont($this->font); $this->pdf->line(20, 109, 140, 109); $this->pdf->SetY(110); $this->pdf->cell(80, 5, "(dato kaj subskribo de la gepatroj)", 0, 1, C); $this->pdf->SetY(130); $this->pdf->SetFont($this->font, '', 8); $this->pdf->cell(160, 5, eo("Bonvolu uzi au^ la esperantlingvan, au^ la germanlingvan version / Benutze bitte entweder die deutsch-, oder die esperantosprachige Version."), 0, 1, C); $this->pdf->SetY(160); $this->pdf->SetFont($this->font, '', 30); $this->pdf->cell(160, 10, "Einverständnisserklärung der Eltern", 0, 1, C); $this->pdf->SetFont($this->font, '', 14); $this->pdf->cell(160, 10, "(Nur für Teilnehmer, die am " . $renkontigxo->datoj['de'] . " noch nicht 18 Jahre alt sind.)", 0, 1, C); $this->pdf->SetY(140 + 55); $this->pdf->write(5, "Name des Teilnehmers: "); $this->pdf->cell(100, 5, eo($partoprenanto->datoj['personanomo'] . " " . $partoprenanto->datoj['nomo']), "B", 1, 'C'); $this->pdf->write(5, "\nWenn du zu Beginn des IS noch keine 18 Jahre alt bist, bring bitte auf jeden Fall die untenstehende Erlaubnis von deinen Eltern mit:\n\n"); $this->pdf->SetFont($this->font . "D"); if ($vira) { $this->pdf->write(5, "Ich erlaube meinem Sohn zur Internationalen Woche zu reisen und daran teilzunehmen. Weiterhin darf er ohne Aufsichtsperson an den Ausflügen (inklusive des Schwimmabends) teilnehmen."); } else { $this->pdf->write(5, "Ich erlaube meiner Tochter zur Internationalen Woche zu reisen und daran teilzunehmen. Weiterhin darf sie ohne Aufsichtsperson an den Ausflügen (inklusive des Schwimmabends) teilnehmen."); } $this->pdf->SetFont($this->font); // $this->pdf->write(5,"Ich erlaube meinem Sohn / meiner Tochter zum Internationalen Seminar zu reisen und daran teilzunehmen. Weiterhin darf er / sie ohne Aufsichtsperson an den Ausfluegen (inklusive des Schwimmabends) teilnehmen.")); $this->pdf->line(20, 140 + 109, 140, 109 + 140); $this->pdf->SetY(110 + 140); $this->pdf->cell(80, 5, "(Datum und Unterschrift der Eltern)", 0, 1, C); }
/** * La cxefa funkcio por krei la PDF-dosieron. */ function kreu_pdf($dosiernomo) { $this->pdf->Open(); $this->pdf->AddPage(); $this->pdf->SetFont($this->font . 'D', '', 20); $this->pdf->Write(10, eo("Finkalkulo de kotizoj: " . $_SESSION["renkontigxo"]->datoj[nomo] . " en " . $_SESSION["renkontigxo"]->datoj[loko] . "\n")); $this->pdf->SetFontSize(12); $this->pdf->Write(10, "Dato: " . date('Y-m-d') . "\n"); $this->klarigoj(); // $this->pdf->setY(40); $rezulto = sql_faru(datumbazdemando(array("p.ID" => 'antoid', "pn.ID" => 'enoid'), array("partoprenantoj" => "p", "partoprenoj" => "pn"), "p.ID = pn.partoprenantoID", "renkontigxoID", array("order" => "alvenstato, personanomo, nomo"))); $this->kaplinio(); while ($row = mysql_fetch_assoc($rezulto)) { $partoprenanto = new Partoprenanto($row['antoid']); $partopreno = new Partopreno($row['enoid']); $this->tabellinio($partoprenanto, $partopreno); if ($this->pdf->getY() > 250) { $this->pagxsumo(); $this->kaplinio(); $this->pdf->AddPage(); $this->kaplinio(); } } $this->pagxsumo(); $this->fina_sumo(); $this->kaplinio(); $this->pdf->Output($dosiernomo); hazard_ligu($dosiernomo, "els^uti la kalkul-rezulton.", "_top", "jes"); }
/** * transformas tekston aux al UTF-8 aux al la speciala * Latina-1-varianto uzata de ni, depende de $this->unikode. * * @param u8string $teksto * @return u8string|lat1pdfstring */ function trans_uni($teksto) { if ($this->unikode) { return $teksto; } else { return eo(utf8_al_eo($teksto)); } }
/** * transformas tekston aux al UTF-8 aux al la speciala * Latina-1-varianto uzata de ni, depende de $this->unikode. * * $teksto - la teskto estu en UTF-8 kun c^-kodigo. */ function trans_eo($teksto) { if ($this->unikode) { return uni($teksto); } else { return eo($teksto); } }
function kreu_mangxkuponon($x, $y, $partoprenantoID, $partoprenoID, $savu, $vego) { $partopreno = new Partopreno($partoprenoID); $partoprenanto = new Partoprenanto($partoprenantoID); $this->pdf->setFontSize(15); $this->pdf->SetLineWidth(0.6); for ($i = 0; $i <= 6; $i++) { $this->pdf->rect($x + $i * 10, $y, 10, 24); $this->pdf->rect($x + $i * 10, $y + 94, 10, 24); $this->pdf->rect($x + 70, $y + 24 + $i * 10, 24, 10); } $this->pdf->rect($x, $y, 94, 118); $this->pdf->SetLineWidth(0.2); $this->pdf->rect($x, $y + 40, 53, 38); $this->pdf->text($x + 18, $y + 31, eo("Matenmang^o")); // TODO: eble prenu la germanajn nomojn el // TODO: datumbazo aux konfigurdosiero $this->pdf->text($x + 22, $y + 38, "Frühstück"); $this->pdf->text($x + 18, $y + 84, eo("Vespermang^o")); $this->pdf->text($x + 22, $y + 91, eo("Abendessen")); $this->pdf->image("bildoj/tagmangxo.png", $x + 56, $y + 48, 6); $this->pdf->image("bildoj/mittagessen.png", $x + 62, $y + 45, 6); // TODO: ne uzu bildojn, sed rekte generu la tekston // (kaj ne de 27.12. gxis 3.1., sed laux la renkontigxo-datoj) $this->pdf->image("bildoj/27.png", $x + 2, $y + 98, 5); for ($i = 28; $i <= 31; $i++) { $this->pdf->image("bildoj/{$i}.png", $x + 12 + ($i - 28) * 10, $y + 98, 5); $this->pdf->image("bildoj/{$i}.png", $x + 2 + ($i - 28) * 10, $y + 4, 5); $this->pdf->text($x + 74, $y + 32 + ($i - 28) * 10, "{$i}.12"); } for ($i = 01; $i <= 02; $i++) { $this->pdf->image("bildoj/{$i}.png", $x + 12 + ($i + 3) * 10, $y + 98, 5); $this->pdf->image("bildoj/{$i}.png", $x + 2 + ($i + 3) * 10, $y + 4, 5); $this->pdf->text($x + 74, $y + 32 + ($i + 3) * 10, "0{$i}.01."); } $this->pdf->image("bildoj/3.png", $x + 62, $y + 4, 5); $this->pdf->text($x + 74, $y + 32 + (3 + 3) * 10, "03.01."); $this->pdf->setFontSize(20); $i = 20; //$this->esso($partoprenanto->datoj[personanomo].$partoprenanto->datoj[nomo]); $nomo = eo($partoprenanto->datoj[personanomo]); if ($partoprenanto->datoj[sxildnomo] != '') { $nomo = eo($partoprenanto->datoj[sxildnomo]); } while ($this->pdf->GetStringWidth($nomo) > 47) { $i--; $this->pdf->setFontSize($i); } $this->pdf->text($x + 5, $y + 47, $nomo); $this->pdf->setFontSize(14); $this->pdf->text($x + 5, $y + 56, eo($partoprenanto->datoj[nomo])); $this->pdf->SetFont($this->font, '', 15); $this->pdf->line($x + 5, $y + 48, $x + 50, $y + 48); $this->pdf->line($x + 5, $y + 57, $x + 50, $y + 57); $this->pdf->setFontSize(16); if ($partopreno->datoj['vegetare'] == 'J' or $vego == 'J') { $this->pdf->text($x + 10, $y + 66, eo("Vegetarano")); $this->pdf->text($x + 14, $y + 73, eo("Vegetarier")); } else { if ($partopreno->datoj['vegetare'] == 'A' or $vego == 'A') { $this->pdf->text($x + 10, $y + 66, eo("Vegano")); $this->pdf->text($x + 14, $y + 73, eo("Veganer")); } else { $this->pdf->text($x + 10, $y + 66, eo("Viandmang^anto")); $this->pdf->text($x + 14, $y + 73, eo("Fleischesser")); } } $this->pdf->image("bildoj/eo-echt.png", $x + 72, $y + 8, 20, 12); $this->pdf->image("bildoj/eo-echt.png", $x + 72, $y + 100, 20, 12); if ($partopreno->datoj[partoprentipo] != 't' and $partoprenoID != '0') { $dauro = kalkulu_tagojn($_SESSION["renkontigxo"]->datoj[de], $_SESSION["renkontigxo"]->datoj[gxis]); $tagoj = kalkulu_tagojn($partopreno->datoj[de], $partopreno->datoj[gxis]); $ekas = kalkulu_tagojn($_SESSION["renkontigxo"]->datoj[de], $partopreno->datoj[de]); for ($i = 0; $i < $ekas; $i++) { $this->pdf->SetLineWidth(0.4); //matenmangxo $this->pdf->line($x + $i * 10, $y, $x + 10 + $i * 10, $y + 24); $this->pdf->line($x + 10 + $i * 10, $y, $x + 1 + $i * 10, $y + 24); //vespermangxo $this->pdf->line($x + $i * 10, $y + 94, $x + 10 + $i * 10, $y + 24 + 94); $this->pdf->line($x + 10 + $i * 10, $y + 94, $x + 1 + $i * 10, $y + 24 + 94); //tagmangxo $this->pdf->line($x + 70, $y + 24 + $i * 10, $x + 94, $y + 34 + $i * 10); $this->pdf->line($x + 94, $y + 24 + $i * 10, $x + 70, $y + 34 + $i * 10); } //la dekstra parto for ($i = $tagoj + $ekas; $i < $dauro; $i++) { $this->pdf->SetLineWidth(0.4); //matenmangxo $this->pdf->line($x + $i * 10, $y, $x + 10 + $i * 10, $y + 24); $this->pdf->line($x + 10 + $i * 10, $y, $x + 1 + $i * 10, $y + 24); //vespermangxo $this->pdf->line($x + $i * 10, $y + 94, $x + 10 + $i * 10, $y + 24 + 94); $this->pdf->line($x + 10 + $i * 10, $y + 94, $x + 1 + $i * 10, $y + 24 + 94); //tagmangxo $this->pdf->line($x + 70, $y + 24 + $i * 10, $x + 94, $y + 34 + $i * 10); $this->pdf->line($x + 94, $y + 24 + $i * 10, $x + 70, $y + 34 + $i * 10); } } $this->pdf->setFontSize(13); $this->pdf->setXY($x + 72, $y + 2); $loko = $this->renkontigxo->datoj['loko']; $lokolen = strlen($loko); if ($lokolen > 7 and substr($loko, $lokolen - 4) == 'burg') { $loko = substr($loko, 0, $lokolen - 4) . "- " . substr($loko, $lokolen - 4); } $this->pdf->multicell(22, 4, eo($this->renkontigxo->datoj['mallongigo'] . ' en ' . $loko), '', 'C'); $this->pdf->setFontSize(9); $this->pdf->setXY($x + 71, $y + 15); $this->pdf->multicell(22, 4, eo($this->renkontigxo->datoj['de'] . " g^is\n" . $this->renkontigxo->datoj['gxis']), '', 'C'); $this->pdf->setXY($x + 72, $y + 96); // TODO: prenu el datumbazo aux konfiguro $this->pdf->multicell(20, 4, eo("Germana\n\nEsperanto-\n\nJunularo"), '', 'C'); // TODO: text wirklich hochkant drucken (anstatt Bild) /*$pdf->text(10,20,eo("Tagmang^o")); $pdf->text(10,200,eo("Mittagessen")); $pdf->text(10,40,"27.12."); $pdf->text(10,60,"28.12."); $pdf->text(10,80,"29.12."); $pdf->text(10,100,"30.12."); $pdf->text(10,120,"31.12."); $pdf->text(10,140,"01.01."); $pdf->text(10,160,"02.01."); $pdf->text(10,180,"03.01.");*/ if ($savu == "J") { $partopreno->datoj[havasMangxkuponon] = 'P'; $partopreno->skribu(); } }