function formatAddresses($addresses) { $fa = array(); foreach ($addresses as $address) { $fa[] = formatAddress($address); } return implode(', ', $fa); }
function textDetailsOut($response, $nameresponse, $wikipediaresponse, $langs = "en", $offset = 0) { global $db, $id, $type; if ($response) { // setting header header("Content-Type: text/html; charset=UTF-8"); $output = "<meta http-equiv=\"content-type\" content=\"text/html; charset=UTF-8\">"; // translation of name if ($nameresponse) { $name = getNameDetail($langs, $nameresponse); } // if no name is set, use the poi type as name instead if ($name[0] == "") { $tags = getTags($db, $id, $type); foreach ($tags as $key => $value) { $tag = $key . "=" . $value; if (dgettext("tags", $tag) != "") { $name[0] = dgettext("tags", $tag); } if ($name[0] != $tag) { break; } } } $phone = getPhoneFaxDetail(array($response['phone1'], $response['phone2'], $response['phone3'])); $fax = getPhoneFaxDetail(array($response['fax1'], $response['fax2'], $response['fax3'])); $mobilephone = getPhoneFaxDetail(array($response['mobilephone1'], $response['mobilephone2'])); $website = getWebsiteDetail(array($response['website1'], $response['website2'], $response['website3'], $response['website4'])); $email = getMailDetail(array($response['email1'], $response['email2'], $response['email3'])); // get wikipedia link and make translation if ($wikipediaresponse) { $wikipedia = getWikipediaDetail($langs, $wikipediaresponse); } $openinghours = getOpeninghoursDetail($response['openinghours']); $servicetimes = getOpeninghoursDetail($response['servicetimes']); // printing popup details // image, only images from domains listed on a whitelist are displayed if (imageDomainAllowed($response['image'])) { $url = getImageUrl($response['image']); $tmp = parse_url($url); if (substr_count($tmp['host'], ".") > 1) { $domain = substr($tmp['host'], strpos($tmp['host'], ".") + 1); } else { $domain = $tmp['host']; } // image from wikimedia commons if ($domain == "wikimedia.org") { // creating url to Wikimedia Commons page of this image $attribution = explode("/", $url); if (substr($url, 34, 16) == "special:filepath") { $attribution = $attribution[5]; } else { $attribution = $attribution[7]; } $output .= "<div id=\"loadingImage\"><img id=\"image\" title=\"" . _("Fullscreen") . "\" src=\"" . getWikipediaThumbnailUrl($url) . "\" /></div><div class=\"attribution\"><a target=\"_blank\" href=\"http://commons.wikimedia.org/wiki/File:" . $attribution . "\">" . _("attribution-wikimedia.org") . "</a></div>\n"; } else { if ($domain == "openstreetmap.org") { // creating url to OpenStreetMap Wiki page of this image $attribution = explode("/", $url); if (substr($url, 35, 16) == "special:filepath") { $attribution = $attribution[5]; } else { $attribution = $attribution[7]; } $output .= "<div id=\"loadingImage\"><img id=\"image\" title=\"" . _("Fullscreen") . "\" src=\"" . getOsmWikiThumbnailUrl($url) . "\" /></div><div class=\"attribution\"><a target=\"_blank\" href=\"http://wiki.openstreetmap.org/wiki/File:" . $attribution . "\">" . _("attribution-openstreetmap.org") . "</a></div>\n"; } else { $output .= "<div id=\"loadingImage\"><img id=\"image\" title=\"" . _("Fullscreen") . "\" src=\"" . $url . "\" /></div><div class=\"attribution\"><a target=\"_blank\" href=\"" . _("attribution-url-" . $domain) . "\">" . _("attribution-" . $domain) . "</a></div>\n"; } } } else { if (getWikipediaImage($wikipedia[1])) { // creating url to Wikimedia Commons page of this image $attribution = explode("/", $url); if (substr($url, 34, 16) == "special:filepath") { $attribution = $attribution[5]; } else { $attribution = $attribution[7]; } $image = getWikipediaImage($wikipedia[1]); $output .= "<div id=\"loadingImage\"><img id=\"image\" title=\"" . _("Fullscreen") . "\" src=\"" . getWikipediaThumbnailUrl($image) . "\" /></div><div class=\"attribution\"><a target=\"_blank\" href=\"http://commons.wikimedia.org/wiki/File:" . $attribution . "\">" . _("attribution-wikimedia.org") . "</a></div>\n"; } } if ($name) { $output .= "<div class=\"container hcard vcard\"><div class=\"header\">\n"; $output .= "<strong class=\"name\">" . $name[0] . "</strong>\n"; $output .= "</div>\n"; } // address information if ($response['street'] || $response['housenumber'] || $response['country'] || $response['city'] || $response['postcode']) { $output .= "<div class=\"adr\">\n"; // country-dependend format of address $output .= formatAddress($response, $response['country']); $output .= "</div>\n"; } // contact information if ($phone || $fax || $mobilephone || $email) { $output .= "<div class=\"contact\">\n"; if ($phone) { $output .= "<div class=\"tel\"><span class=\"type\">" . _("Phone") . "</span>:"; foreach ($phone as $phonenumber) { $output .= " <a class=\"value\" href=\"tel:" . $phonenumber[0] . "\">" . $phonenumber[1] . "</a>"; } $output .= "</div>\n"; } if ($fax) { $output .= "<div class=\"tel\"><span class=\"type\">" . _("Fax") . "</span>:"; foreach ($fax as $faxnumber) { $output .= " <span class=\"value\">" . $faxnumber[1] . "</span>"; } $output .= "</div>\n"; } if ($mobilephone) { $output .= "<div class=\"tel\"><span class=\"type\">" . _("Mobile phone") . "</span>:"; foreach ($mobilephone as $mobilephonenumber) { $output .= " <span class=\"value\" href=\"tel:" . $mobilephonenumber[0] . "\">" . $mobilephonenumber[1] . "</span>"; } $output .= "</div>\n"; } if ($email) { $output .= "<div>" . _("Email") . ":"; foreach ($email as $emailaddress) { $output .= " <a class=\"email\" href=\"mailto:" . $emailaddress . "\">" . $emailaddress . "</a>"; } $output .= "</div>\n"; } $output .= "</div>\n"; } // website and wikipedia links if ($website || $wikipedia[0]) { $output .= "<div class=\"web\">\n"; if ($website) { $output .= "<div>" . _("Homepage") . ":"; foreach ($website as $webaddress) { if (($caption = strlen($webaddress[1]) > 37) && strlen($webaddress[1]) > 40) { $caption = substr($webaddress[1], 0, 37) . "..."; } else { $caption = $webaddress[1]; } $output .= " <a class=\"url\" target=\"_blank\" href=\"" . $webaddress[0] . "\">" . $caption . "</a>\n"; } $output .= "</div>\n"; } if ($wikipedia[1]) { $output .= "<div class=\"wikipedia\">" . _("Wikipedia") . ": <a target=\"_blank\" href=\"" . $wikipedia[1] . "\">" . urldecode($wikipedia[2]) . "</a></div>\n"; } $output .= "</div>\n"; } // operator if ($response['operator']) { $output .= "<div class=\"operator\">" . _("Operator") . ": " . $response['operator'] . "</div>\n"; } // opening hours if ($openinghours) { $output .= "<div class=\"openinghours\">" . _("Opening hours") . ":<br />" . $openinghours; if (isOpen247($response['openinghours'])) { $output .= "<br /><b class=\"open\">" . _("Open 24/7") . "</b>"; } else { if (isPoiOpen($response['openinghours'], $offset)) { $output .= "<br /><b class=\"open\">" . _("Now open") . "</b>"; } else { if (isInHoliday($response['openinghours'], $offset)) { $output .= "<br /><b class=\"maybeopen\">" . _("Open on holiday") . "</b>"; } else { $output .= "<br /><b class=\"closed\">" . _("Now closed") . "</b>"; } } } $output .= "</div>\n"; } // service times if ($servicetimes) { $output .= "<div class=\"servicetimes\">" . _("Service hours") . ":<br />" . $servicetimes; if (isPoiOpen($response['openinghours'], $offset)) { $output .= "<br /><b class=\"open\">" . _("Now open") . "</b>"; } else { if (isInHoliday($response['servicetimes'], $offset)) { $output .= "<br /><b class=\"maybeopen\">" . _("Open on holiday") . "</b>"; } else { $output .= "<br /><b class=\"closed\">" . _("Now closed") . "</b>"; } } $output .= "</div>\n"; } $output .= "</div>\n"; return $output; } else { return false; } }
/** * displayProfile * * @return void */ function displayProfile() { $memberId = (int) $_GET['member']; $this->displayHeader($memberId); // handle unknown user if ($memberId == 0) { echo ' <p class="error-alert"> <b>' . T_('Unknown member.') . '</b><br/> </p>'; $this->displayFooter(); return; } $sql = "SELECT u.fname, u.lname, u.email, u.`bio`, u.`dob_year`, u.`dob_month`, u.`dob_day`, \n u.`dod_year`, u.`dod_month`, u.`dod_day`, u.avatar, u.username, u.joindate, \n u.`activity`, u.`sex`, a.`id` AS aid, a.`address`, a.`city`, a.`state`, a.`zip`, \n a.`home`, a.`cell`, a.`work` \n FROM fcms_users AS u, fcms_address AS a \n WHERE u.id = ?\n AND u.id = a.user"; $row = $this->fcmsDatabase->getRow($sql, $memberId); if ($row === false) { $this->fcmsError->displayError(); $this->displayFooter(); return; } $tzOffset = getTimezone($memberId); $joinDate = fixDate(T_('F j, Y'), $tzOffset, $row['joindate']); $address = formatAddress($row); $contact = ''; $activityDate = T_('Never visited'); $points = getUserParticipationPoints($memberId); $level = getUserParticipationLevel($points); // Contacts - Email if (!empty($row['cell'])) { $contact .= '<p><span>' . T_('Email') . '</span> ' . $row['email'] . '</p>'; } // Contacts - Phone if (!empty($row['cell'])) { $contact .= '<p><span>' . T_('Cell') . '</span> ' . formatPhone($row['cell']) . '</p>'; } if (!empty($row['home'])) { $contact .= '<p><span>' . T_pgettext('The beginning or starting place.', 'Home') . '</span> ' . formatPhone($row['home']) . '</p>'; } if (!empty($row['work'])) { $contact .= '<p><span>' . T_('Work') . '</span> ' . formatPhone($row['work']) . '</p>'; } // Call $hasPhone = false; $call = ''; $tel = ''; if (!empty($row['cell'])) { $tel = $row['cell']; $hasPhone = true; } else { if (!empty($row['home'])) { $tel = $row['home']; $hasPhone = true; } else { if (!empty($row['work'])) { $tel = $row['work']; $hasPhone = true; } } } if ($hasPhone) { $call = '<li><a class="call" href="tel:' . $tel . '">' . sprintf(T_pgettext('%s is the name of a person. Call Bob. etc.', 'Call %s'), $row['fname']) . '</a></li>'; } // Activity if ($row['activity'] != '0000-00-00 00:00:00') { $activityDate = fixDate(T_('F j, Y g:i a'), $tzOffset, $row['activity']); } $bday = formatDate('F j, Y', $row['dob_year'] . '-' . $row['dob_month'] . '-' . $row['dob_day']); $age = getAge($row['dob_year'], $row['dob_month'], $row['dob_day']); $gender = $row['sex'] == 'M' ? T_('Male') : T_('Female'); echo ' <div id="avatar"> <h1><img class="avatar" src="' . getCurrentAvatar($memberId) . '" alt="avatar"/></h1> ' . $level . ' </div> <div class="name-contacts"> <h1>' . cleanOutput($row['fname']) . ' ' . cleanOutput($row['lname']) . '</h1> <h2>' . cleanOutput($row['username']) . '</h2> <ul> ' . $call . ' <li><a class="email" href="mailto:' . $row['email'] . '">' . T_('Send Email') . '</a></li> <li><a class="pm" href="privatemsg.php?compose=new&id=' . $memberId . '">' . T_('Send Private Message') . '</a></li> </ul> </div> <ul> <li> <ul> <li> <b>' . T_('Birthday') . '</b> <div>' . $bday . ' (' . sprintf(T_('%s years old'), $age) . ')</div> </li> <li> <b>' . T_('Gender') . '</b> <div>' . $gender . '</div> </li> </ul> </li> <li> <ul> <li> <b>' . T_('Location') . '</b> <div>' . $address . '</div> </li> <li> <b>' . T_('Contact') . '</b> <div>' . $contact . '</div> </li> </ul> </li> <li> <b>' . T_('Bio') . '</b> <div>' . cleanOutput($row['bio']) . '</div> </li> <li> <ul> <li> <b>' . T_('Join Date') . '</b> <div>' . $joinDate . '</div> </li> <li> <b>' . T_('Last Visit') . '</b> <div>' . $activityDate . '</div> </li> </ul> </li> </ul>'; $this->displayFooter($memberId); }
public function formatFields() { $this->firstname->formatFirstName(); $this->middlename->caseFix(); $this->firstname->caseFix(); $this->middlename = formatFirstname($this->middlename); $this->lastname = formatLastname($this->lastname); // $contact = new Contact(); // $contact->formatFields(); if (isset($_POST['mname']) && $_POST['mname'] != "") { $mname = formatFirstname($_POST['mname']); } else { $mname = ""; } if (isset($_POST['lname']) && $_POST['lname'] != "") { $lname = formatLastname($_POST['lname']); } else { $lname = ""; } if (isset($_POST['nickname']) && $_POST['nickname'] != "") { $nickname = formatFirstname($_POST['nickname']); } else { $nickname = ""; } if (isset($_POST['street_address']) && $_POST['street_address'] != "") { $street_address = formatAddress($_POST['street_address']); } else { $street_address = ""; } if (isset($_POST['city']) && $_POST['city'] != "") { $city = formatCity($_POST['city']); } else { $city = ""; } if (isset($_POST['zip']) && $_POST['zip'] != "") { $zip = formatZip($_POST['zip']); } else { $zip = ""; } }
function fixFormatting(&$postArray) { // fix some formatting if (isset($postArray['fname']) && $postArray['fname'] != "") { $postArray['fname'] = formatFirstname($postArray['fname']); } if (isset($postArray['mname']) && $postArray['mname'] != "") { $postArray['mname'] = formatFirstname($postArray['mname']); } if (isset($postArray['lname']) && $postArray['lname'] != "") { $postArray['lname'] = formatLastname($postArray['lname']); } if (isset($postArray['nickname']) && $postArray['nickname'] != "") { $postArray['nickname'] = formatFirstname($postArray['nickname']); } if (isset($postArray['street_address']) && $postArray['street_address'] != "") { $postArray['street_address'] = formatAddress($postArray['street_address']); } if (isset($postArray['city']) && $postArray['city'] != "") { $postArray['city'] = formatCity($postArray['city']); } if (isset($postArray['zip']) && $postArray['zip'] != "") { $postArray['zip'] = formatZip($postArray['zip']); } if (isset($postArray['parent1_fname']) && $postArray['parent1_fname'] != "") { $postArray['parent1_fname'] = formatFirstname($postArray['parent1_fname']); } if (isset($postArray['parent1_lname']) && $postArray['parent1_lname'] != "") { $postArray['parent1_lname'] = formatLastname($postArray['parent1_lname']); } if (isset($postArray['parent2_fname']) && $postArray['parent2_fname'] != "") { $postArray['parent2_fname'] = formatFirstname($postArray['parent2_fname']); } if (isset($postArray['parent2_lname']) && $postArray['parent2_lname'] != "") { $postArray['parent2_lname'] = formatLastname($postArray['parent2_lname']); } }
/** * Crea un pdf con el estado de cuenta de el cliente especificado * @param Array $args, $args['id_cliente'=>12[,'tipo_venta'=> 'credito | contado | saldo'] ], por default obtiene todas las compras del cliente */ public static function imprimirEstadoCuentaCliente($args) { //verificamos que se haya especificado el id del cliente if (!isset($args['id_cliente'])) { Logger::log("Error al obtener el estado de cuenta, no se ha especificado un cliente."); die('{"success": false, "reason": "Error al obtener el estado de cuenta, no se ha especificado un cliente."}'); } //verificamos que el cliente exista if (!($cliente = ClienteDAO::getByPK($args['id_cliente']))) { Logger::log("Error al obtener el estado de cuenta, no se tiene registro del cliente {$args['id_cliente']}."); die('{"success": false, "reason": "Error al obtener el estado de cuenta, no se tiene registro del cliente ' . $args['id_cliente'] . '"}'); } //obtenemos los datos del emisor $estado_cuenta = estadoCuentaCliente($args); //buscar los datos del emisor if (!($emisor = PosConfigDAO::getByPK('emisor'))) { Logger::log("no encuentro los datos del emisor"); die("no encuentro los datos del emisor"); } $emisor = json_decode($emisor->getValue())->emisor; $sucursal = SucursalDAO::getByPK($_SESSION['sucursal']); if (!$sucursal) { die("Sucursal invalida"); } include_once 'librerias/ezpdf/class.pdf.php'; include_once 'librerias/ezpdf/class.ezpdf.php'; $pdf = new Cezpdf(); $pdf->selectFont('../server/librerias/ezpdf/fonts/Helvetica.afm'); //margenes de un centimetro para toda la pagina $pdf->ezSetMargins(1, 1, 1, 1); /* * LOGO */ if (!($logo = PosConfigDAO::getByPK('url_logo'))) { Logger::log("Verifique la configuracion del pos_config, no se encontro el camṕo 'url_logo'"); die("Verifique la configuracion del POS, no se encontro el url del logo"); } //addJpegFromFile(imgFileName,x,y,w,[h]) //detectamos el tipo de imagen del logo if (substr($logo->getValue(), -3) == "jpg" || substr($logo->getValue(), -3) == "JPG" || substr($logo->getValue(), -4) == "jpeg" || substr($logo->getValue(), -4) == "JPEG") { $pdf->addJpegFromFile($logo->getValue(), puntos_cm(2), puntos_cm(25.5), puntos_cm(3.5)); } elseif (substr($logo->getValue(), -3) == "png" || substr($logo->getValue(), -3) == "PNG") { $pdf->addPngFromFile($logo->getValue(), puntos_cm(2), puntos_cm(25.5), puntos_cm(3.5)); } else { Logger::log("Verifique la configuracion del pos_config, la extension de la imagen del logo no es compatible"); die("La extension de la imagen usada para el logo del negocio no es valida."); } /* * ************************ * ENCABEZADO * ************************* */ $e = "<b>" . self::readableText($emisor->nombre) . "</b>\n"; $e .= formatAddress($emisor); $e .= "RFC: " . $emisor->rfc . "\n\n"; //datos de la sucursal $e .= "<b>Lugar de expedicion</b>\n"; $e .= self::readableText($sucursal->getDescripcion()) . "\n"; $e .= formatAddress($sucursal); $datos = array(array("emisor" => $e)); $pdf->ezSetY(puntos_cm(28.6)); $opciones_tabla = array(); $opciones_tabla['showLines'] = 0; $opciones_tabla['showHeadings'] = 0; $opciones_tabla['shaded'] = 0; $opciones_tabla['fontSize'] = 8; $opciones_tabla['xOrientation'] = 'right'; $opciones_tabla['xPos'] = puntos_cm(7.3); $opciones_tabla['width'] = puntos_cm(11); $opciones_tabla['textCol'] = array(0, 0, 0); $opciones_tabla['titleFontSize'] = 12; $opciones_tabla['rowGap'] = 3; $opciones_tabla['colGap'] = 3; $pdf->ezTable($datos, "", "", $opciones_tabla); $cajero = UsuarioDAO::getByPK($_SESSION['userid'])->getNombre(); $datos = array(array("col" => "<b>Cajero</b>"), array("col" => self::readableText($cajero)), array("col" => "<b>Cliente</b>"), array("col" => self::readableText($cliente->getRazonSocial())), array("col" => "<b>Limite de Credito</b>"), array("col" => FormatMoney($estado_cuenta->limite_credito, DONT_USE_HTML)), array("col" => "<b>Saldo</b>"), array("col" => FormatMoney($estado_cuenta->saldo, DONT_USE_HTML))); $pdf->ezSetY(puntos_cm(28.8)); $opciones_tabla['xPos'] = puntos_cm(12.2); $opciones_tabla['width'] = puntos_cm(6); $opciones_tabla['showLines'] = 0; $opciones_tabla['shaded'] = 2; $opciones_tabla['shadeCol'] = array(1, 1, 1); //$opciones_tabla['shadeCol2'] = array(0.054901961, 0.756862745, 0.196078431); $opciones_tabla['shadeCol2'] = array(0.8984375, 0.95703125, 0.99609375); $pdf->ezTable($datos, "", "", $opciones_tabla); //roundRect($pdf, puntos_cm(12.2), puntos_cm(28.8), puntos_cm(6), puntos_cm(4.25)); /** * ESTADO DE CUENTA */ $elementos = array(array('id_venta' => 'Venta', 'fecha' => 'Fecha', 'sucursal' => 'Sucursal', 'cajero' => 'Cajero', 'tipo_venta' => 'Tipo', 'tipo_pago' => 'Pago', 'total' => 'Total', 'pagado' => 'Pagado', 'saldo' => 'Saldo')); foreach ($estado_cuenta->array_ventas as $venta) { $array_venta = array(); $array_venta['id_venta'] = $venta['id_venta']; $array_venta['fecha'] = $venta['fecha']; $array_venta['sucursal'] = self::readableText($venta['sucursal']); $array_venta['cajero'] = self::readableText($venta['cajero']); $array_venta['cancelada'] = self::readableText($venta['cancelada']); $array_venta['tipo_venta'] = self::readableText($venta['tipo_venta']); $array_venta['tipo_pago'] = self::readableText($venta['tipo_pago']); $array_venta['total'] = FormatMoney($venta['total'], DONT_USE_HTML); $array_venta['pagado'] = FormatMoney($venta['pagado'], DONT_USE_HTML); $array_venta['saldo'] = FormatMoney($venta['saldo'], DONT_USE_HTML); array_push($elementos, $array_venta); } $pdf->ezText("", 8, array('justification' => 'center')); $pdf->ezSetY(puntos_cm(24)); $opciones_tabla['xPos'] = puntos_cm(2); $opciones_tabla['width'] = puntos_cm(16.2); $pdf->ezTable($elementos, "", "Estado de Cuenta", $opciones_tabla); //roundRect($pdf, puntos_cm(2), puntos_cm(24.3), puntos_cm(16.2), puntos_cm(3.2)); /* * ************************ * notas de abajo * ************************* */ $pdf->setLineStyle(1); $pdf->setStrokeColor(0.3359375, 0.578125, 0.89453125); $pdf->line(puntos_cm(2), puntos_cm(1.3), puntos_cm(18.2), puntos_cm(1.3)); $pdf->addText(puntos_cm(2), puntos_cm(1.0), 7, "Fecha de impresion: " . date("d/m/y") . " " . date("H:i:s")); //addJpegFromFile(imgFileName,x,y,w,[h]) //$pdf->addJpegFromFile("../www/media/logo_simbolo.jpg", puntos_cm(15.9), puntos_cm(.25), 25); $pdf->addText(puntos_cm(16.7), puntos_cm(0.6), 8, "caffeina.mx"); $pdf->ezStream(); }
/** * displayAddress * * Displays the address details. * * @param int $aid Id of the address * @param string $cat Category name * * @return void */ function displayAddress($aid, $cat) { $aid = (int) $aid; $cat = cleanOutput($cat); $sql = "SELECT a.`id`, a.`user`, `fname`, `lname`, `avatar`, `updated`, `country`, `address`, `city`, `state`, \n `zip`, `home`, `work`, `cell`, `email`, `phpass` \n FROM `fcms_address` AS a, `fcms_users` AS u \n WHERE a.`user` = u.`id` \n AND a.`id` = ?"; $r = $this->fcmsDatabase->getRow($sql, $aid); if ($r === false) { $this->fcmsError->displayError(); return; } if (count($r) <= 0) { echo ' <p class="error-alert">' . sprintf(T_('Could not find address (%s)'), $aid) . '</p>'; return; } // Edit / Delete links $edit_del = ''; if ($this->fcmsUser->id == $r['user'] || $this->fcmsUser->access < 2) { $edit_del = '<li id="edit"><a href="?cat=' . $cat . '&edit=' . $r['id'] . '">' . T_('Edit') . '</a></li>'; if ($r['phpass'] == 'NONMEMBER' || $r['phpass'] == 'PRIVATE') { $edit_del .= ' <li id="delete"><a id="del_address" href="?cat=' . $cat . '&delete=' . $r['id'] . '">' . T_('Delete') . '</a></li>'; } } // Address $address = formatAddress($r); $addressUrl = formatAddressUrl($address); if ($address == '') { $str = "<i>(" . T_('none') . ")</i>"; } $map_link = !empty($addressUrl) ? '<br/><a href="http://maps.google.com/maps?q=' . $addressUrl . '"/>' . T_('Map') . '</a>' : ''; // Email if (empty($r['email'])) { $email = "<i>(" . T_('none') . ")</i>"; } else { $email = cleanOutput($r['email']) . ' <a class="email" href="mailto:' . cleanOutput($r['email']) . '" title="' . T_('Email This Member') . '"> </a>'; } // Phone Number $home = empty($r['home']) ? '<i>(' . T_('none') . ')</i>' : formatPhone($r['home'], $r['country']); $work = empty($r['work']) ? '<i>(' . T_('none') . ')</i>' : formatPhone($r['work'], $r['country']); $cell = empty($r['cell']) ? '<i>(' . T_('none') . ')</i>' : formatPhone($r['cell'], $r['country']); // Display address echo ' <div id="leftcolumn">'; $this->displayCategories($cat); echo ' </div> <div id="maincolumn"> <div id="address-options"> <ul> <li id="back"><a href="?cat=' . $cat . '">' . T_('Back to Addresses') . '</a></li> <li id="email"><a href="mailto:' . cleanOutput($r['email']) . '">' . T_('Email') . '</a></li> ' . $edit_del . ' </ul> </div> <div id="address-details"> <p> <img alt="avatar" src="' . getCurrentAvatar($r['user']) . '"/> <b class="name">' . cleanOutput($r['fname']) . ' ' . cleanOutput($r['lname']) . '</b> </p> <p> <b class="label">' . T_('Address') . ':</b> <span class="data">' . $address . ' ' . $map_link . '</span> </p> <p> <b class="label">' . T_('Email') . ':</b> <span class="data">' . $email . '</span> </p> <p> <b class="label">' . T_pgettext('The dwelling where you live.', 'Home') . ':</b> <span class="data">' . $home . '</span> </p> <p> <b class="label">' . T_('Work') . ':</b> <span class="data">' . $work . '</span> </p> <p> <b class="label">' . T_('Mobile') . ':</b> <span class="data">' . $cell . '</span> </p> </div> </div>'; }
function textMoredetailsOut($response, $nameresponse, $wikipediaresponse, $langs, $offset = 0) { global $db, $id, $type; if ($response) { // setting header header("Content-Type: text/html; charset=UTF-8"); $output = "<meta http-equiv=\"content-type\" content=\"text/html; charset=UTF-8\">"; // translation of name if ($nameresponse) { $name = getNameDetail($langs, $nameresponse); } // if no name is set, use the poi type as name instead if ($name[0] == "") { $tags = getTags($db, $id, $type); foreach ($tags as $key => $value) { $tag = $key . "=" . $value; if (dgettext("tags", $tag) != "") { $name[0] = dgettext("tags", $tag); } if ($name[0] != $tag) { break; } } } $phone = getPhoneFaxDetail(array($response['phone1'], $response['phone2'], $response['phone3'])); $mobilephone = getPhoneFaxDetail(array($response['mobilephone1'], $response['mobilephone2'])); $fax = getPhoneFaxDetail(array($response['fax1'], $response['fax2'], $response['fax3'])); $website = getWebsiteDetail(array($response['website1'], $response['website2'], $response['website3'], $response['website4'])); $email = getMailDetail(array($response['email1'], $response['email2'], $response['email3'])); // get wikipedia link and make translation if ($wikipediaresponse) { $wikipedia = getWikipediaDetail($langs, $wikipediaresponse); } $openinghours = getOpeninghoursDetail($response['openinghours']); $servicetimes = getOpeninghoursDetail($response['servicetimes']); // title and description if ($name || $response['description']) { $output .= "<div class=\"moreInfoBox\">\n"; $output .= "<center>"; $output .= "<dfn><b>" . $name[0] . "</b></dfn><br />\n"; if ($response['description']) { $output .= "<dfn>" . $response['description'] . "</dfn><br />\n"; } $output .= "</center>\n"; $output .= "</div>\n"; } // address box if ($response['street'] || $response['housenumber'] || $response['country'] || $response['city'] || $response['postcode'] || $response['housename']) { $output .= "<div class=\"moreInfoBox\">\n"; $output .= "<strong>" . _("Address") . "</strong>\n"; $output .= "<table><tr><td>\n"; // country-dependend format of address $output .= formatAddress($response, $response['country']); $output .= "</td></tr></table>\n"; $output .= "</div>\n"; } // contact box if ($phone || $fax || $email || $mobilephone || $website[0]) { $output .= "<div class=\"moreInfoBox\">\n"; $output .= "<strong>" . _("Contact") . "</strong>\n"; $output .= "<table>\n"; if ($phone) { $output .= "<tr><td><u>" . _("Phone") . ":</u></td><td>"; foreach ($phone as $phonenumber) { $output .= " <a href=\"tel:" . $phonenumber[0] . "\">" . $phonenumber[1] . "</a>\n"; } $output .= "</td></tr>\n"; } if ($mobilephone) { $output .= "<tr><td><u>" . _("Mobile phone") . ":</u></td><td>"; foreach ($mobilephone as $mobilephonenumber) { $output .= " <a href=\"tel:" . $mobilephonenumber[0] . "\">" . $mobilephonenumber[1] . "</a>\n"; } $output .= "</td></tr>\n"; } if ($fax) { $output .= "<tr><td><u>" . _("Fax") . ":</u></td><td>"; foreach ($fax as $faxnumber) { $output .= " " . $faxnumber[1] . "\n"; } $output .= "</td></tr>\n"; } if ($email) { $output .= "<tr><td><u>" . _("Email") . ":</u> </td><td>"; foreach ($email as $emailaddress) { $output .= " <a href=\"mailto:" . $emailaddress . "\">" . $emailaddress . "</a>\n"; } $output .= "</td></tr>\n"; } if ($website) { $output .= "<tr><td><u>" . _("Homepage") . ":</u></td><td>"; foreach ($website as $webaddress) { if (($caption = strlen($webaddress[1]) > 31) && strlen($webaddress[1]) > 34) { $caption = substr($webaddress[1], 0, 31) . "..."; } else { $caption = $webaddress[1]; } $output .= "<a target=\"_blank\" href=\"" . $webaddress[0] . "\">" . $caption . "</a>\n"; } $output .= "</td></tr>\n"; } $output .= "</table>\n"; $output .= "</div>\n"; } // gastro box if ($response['cuisine'] || $response['stars'] || $response['smoking'] || $response['microbrewery'] || $response['beer']) { $output .= "<div class=\"moreInfoBox\">\n"; $output .= "<strong>" . _("Gastronomy") . "</strong>\n"; $output .= "<table>\n"; // cuisine if ($response['cuisine']) { $cuisinetag = "cuisine=" . str_replace(";", ", ", $response['cuisine']); $output .= "<tr><td><span><u>" . _("Cuisine") . ":</u> </td><td>" . (dgettext($lang . "-tags", $cuisinetag) != "" ? dgettext($lang . "-tags", $cuisinetag) : str_replace(";", ", ", $response['cuisine'])) . "</td></tr>\n"; } // stars if ($response['stars']) { $output .= "<tr><td><span><u>" . _("Stars") . ":</u> </td><td>"; for ($response['stars']; $response['stars'] > 0; $response['stars']--) { $output .= "<img class=\"star\" src=\"../img/star.png\"/>"; } $output .= "</td></tr>\n"; } // smoking if ($response['smoking']) { $output .= "<tr><td><span><u>" . _("Smoking") . ":</u> </td>"; if ($response['smoking'] == "yes") { $output .= "<td>" . _("allowed") . "</td></tr>\n"; } else { if ($response['smoking'] == "no") { $output .= "<td>" . _("prohibited") . "</td></tr>\n"; } else { if ($response['smoking'] == "dedicated") { $output .= "<td>" . _("dedicated") . "</td></tr>\n"; } else { if ($response['smoking'] == "separated") { $output .= "<td>" . _("separated smoking area") . "</td></tr>\n"; } else { if ($response['smoking'] == "isolated") { $output .= "<td>" . _("Isolated area") . "</td></tr>\n"; } } } } } } // beer sorts if ($response['beer']) { $output .= "<tr><td><span><u>" . _("Beer") . ":</u> </td><td>" . str_replace(";", ", ", $response['beer']) . "</td></tr>\n"; } // microbrewery if ($response['microbrewery'] == "yes") { $output .= "<tr><td><span>" . _("with microbrewery") . "</td></tr>\n"; } // biergarten if ($response['biergarten'] == "yes" || $response['beer_garden'] == "yes") { $output .= "<tr><td><span>" . _("Beergarden") . "</td></tr>\n"; } $output .= "</table>\n"; $output .= "</div>\n"; } // fuel box if ($response['carwash'] || $response['carrepair'] || $response['kiosk'] || $response['diesel'] == "yes" || $response['gtldiesel'] == "yes" || $response['hgvdiesel'] == "yes" || $response['biodiesel'] == "yes" || $response['octane91'] == "yes" || $response['octane95'] == "yes" || $response['octane98'] == "yes" || $response['octane100'] == "yes" || $response['octane98l'] == "yes" || $response['fuel25'] == "yes" || $response['fuel50'] == "yes" || $response['alcohol'] == "yes" || $response['ethanol'] == "yes" || $response['methanol'] == "yes" || $response['svo'] == "yes" || $response['e85'] == "yes" || $response['biogas'] == "yes" || $response['lpg'] == "yes" || $response['cng'] == "yes" || $response['lh2'] == "yes" || $response['electro'] == "yes" || $response['adblue'] == "yes") { $output .= "<div class=\"moreInfoBox\">\n"; $output .= "<strong>" . _("Fuel") . "</strong>\n"; $output .= "<table>\n"; // fuel sorts if ($response['diesel'] == "yes") { $output .= "<tr><td><span>" . _("Diesel") . "</span></td></tr>\n"; } if ($response['gtldiesel'] == "yes") { $output .= "<tr><td><span>" . _("High quality synthetic Diesel") . "</span></td></tr>\n"; } if ($response['hgvdiesel'] == "yes") { $output .= "<tr><td><span>" . _("HGV Diesel") . "</span></td></tr>\n"; } if ($response['biodiesel'] == "yes") { $output .= "<tr><td><span>" . _("Biodiesel") . "</span></td></tr>\n"; } if ($response['octane91'] == "yes") { $output .= "<tr><td><span>" . _("Octane 91") . "</span></td></tr>\n"; } if ($response['octane95'] == "yes") { $output .= "<tr><td><span>" . _("Octane 95") . "</span></td></tr>\n"; } if ($response['octane98'] == "yes") { $output .= "<tr><td><span>" . _("Octane 98") . "</span></td></tr>\n"; } if ($response['octane100'] == "yes") { $output .= "<tr><td><span>" . _("Octane 100") . "</span></td></tr>\n"; } if ($response['octane98l'] == "yes") { $output .= "<tr><td><span>" . _("Octane 98, leaded") . "</span></td></tr>\n"; } if ($response['fuel25'] == "yes") { $output .= "<tr><td><span>" . _("Mixture 1:25") . "</span></td></tr>\n"; } if ($response['fuel50'] == "yes") { $output .= "<tr><td><span>" . _("Mixture 1:50") . "</span></td></tr>\n"; } if ($response['alcohol'] == "yes") { $output .= "<tr><td><span>" . _("Alcohol") . "</span></td></tr>\n"; } if ($response['ethanol'] == "yes") { $output .= "<tr><td><span>" . _("Ethanol") . "</span></td></tr>\n"; } if ($response['methanol'] == "yes") { $output .= "<tr><td><span>" . _("Methanol") . "</span></td></tr>\n"; } if ($response['svo'] == "yes") { $output .= "<tr><td><span>" . _("Vegetable oil") . "</span></td></tr>\n"; } if ($response['e10'] == "yes") { $output .= "<tr><td><span>" . _("Ethanol-Mixture E10 (10% Ethanol)") . "</span></td></tr>\n"; } if ($response['e85'] == "yes") { $output .= "<tr><td><span>" . _("Ethanol-Mixture E85 (85% Ethanol)") . "</span></td></tr>\n"; } if ($response['biogas'] == "yes") { $output .= "<tr><td><span>" . _("Biogas") . "</span></td></tr>\n"; } if ($response['lpg'] == "yes") { $output .= "<tr><td><span>" . _("LPG") . "</span></td></tr>\n"; } if ($response['cng'] == "yes") { $output .= "<tr><td><span>" . _("CNG") . "</span></td></tr>\n"; } if ($response['lh2'] == "yes") { $output .= "<tr><td><span>" . _("Liquid hydrogen") . "</span></td></tr>\n"; } if ($response['electro'] == "yes") { $output .= "<tr><td><span>" . _("Electricity") . "</span></td></tr>\n"; } if ($response['adblue'] == "yes") { $output .= "<tr><td><span>" . _("AdBlue") . "</span></td></tr>\n"; } $output .= "<br/>"; // other properties of fuel station if ($response['carwash'] == "yes") { $output .= "<tr><td><i>" . _("Car wash") . "</i></td></tr>\n"; } if ($response['carrepair'] == "yes") { $output .= "<tr><td><i>" . _("Car repair") . "</i></td></tr>\n"; } if ($response['shop'] == "kiosk" || $response['kiosk'] == "yes") { $output .= "<tr><td><i>" . _("Shop") . "</i></td></tr>\n"; } $output .= "</table>\n"; $output .= "</div>\n"; } // other box if ($response['operator'] || $response['capacity'] || $response['fee'] || $openinghours || $response['fee'] || $response['internet_access'] || $response['toll'] || $response['ref']) { $output .= "<div class=\"moreInfoBox\">\n"; $output .= "<strong>" . _("Other") . "</strong>\n"; $output .= "<table>\n"; // opening hours if ($openinghours) { $output .= "<tr><td><span><u>" . _("Opening hours") . ":</u><br />" . $openinghours . "</span></td></tr>\n"; if (isOpen247($response['openinghours'])) { $output .= "<tr><td> <span class=\"open\">" . _("Open 24/7") . "</span></td></tr>\n"; } else { if (isPoiOpen($response['openinghours'], $offset)) { $output .= "<tr><td> <span class=\"open\">" . _("Now open") . "</span></td></tr>\n"; } else { if (isInHoliday($response['openinghours'], $offset)) { $output .= "<tr><td> <span class=\"maybeopen\">" . _("Open on holiday") . "</span></td></tr>\n"; } else { $output .= "<tr><td> <span class=\"closed\">" . _("Now closed") . "</span></td></tr>\n"; } } } } // service times if ($servicetimes) { $output .= "<tr><td><span><u>" . _("Service hours") . ":</u><br />" . $servicetimes . "</span></td></tr>\n"; if (isPoiOpen($response['servicetimes'], $offset)) { $output .= "<tr><td> <span class=\"open\">" . _("Now open") . "</span></td></tr>\n"; } else { if (isInHoliday($response['servicetimes'], $offset)) { $output .= "<tr><td> <span class=\"maybeopen\">" . _("Open on holiday") . "</span></td></tr>\n"; } else { $output .= "<tr><td> <span class=\"closed\">" . _("Now closed") . "</span></td></tr>\n"; } } } // operator if ($response['operator']) { $output .= "<tr><td><span><u>" . _("Operator") . ":</u> " . $response['operator'] . "</span></td></tr>\n"; } // capacity if ($response['capacity']) { $output .= "<tr><td><span><u>" . _("Capacity") . ":</u> " . $response['capacity'] . "</span></td></tr>\n"; } // ref if ($response['ref']) { $output .= "<tr><td><span><u>" . _("Reference") . "</u>: " . $response['ref'] . "</span></td></tr>\n"; } // internet access if ($response['internet_access']) { if ($response['internet_access'] == "terminal") { $output .= "<tr><td><span>" . _("Internet terminal") . "</span></td></tr>\n"; } else { if ($response['internet_access'] == "wlan") { $output .= "<tr><td><span>" . _("WLAN hotspot") . "</span></td></tr>\n"; } else { if ($response['internet_access'] == "wired") { $output .= "<tr><td><span>" . _("Wired internet access") . "</span></td></tr>\n"; } else { if ($response['internet_access'] == "service") { $output .= "<tr><td><span>" . _("Internet access via service") . "</span></td></tr>\n"; } } } } } // fee if ($response['fee'] == "yes") { $output .= "<tr><td><span>" . _("With costs") . "</span></td></tr>\n"; } else { if ($response['fee'] == "no") { $output .= "<tr><td><span>" . _("For free") . "</span></td></tr>\n"; } else { if ($response['fee'] == "interval") { $output .= "<tr><td><span>" . _("Partly with costs") . "</span></td></tr>\n"; } } } // toll if ($response['toll'] == "yes") { $output .= "<tr><td><span>" . _("Toll") . "</span></td></tr>\n"; } // disused if ($response['disused'] == "yes") { $output .= "<tr><td><span>" . _("Disused") . "</span></td></tr>\n"; } $output .= "</table>\n"; $output .= "</div>\n"; } // geographic box if ($response['ele'] || $response['population'] || $response['iata'] || $response['icao']) { $output .= "<div class=\"moreInfoBox\">\n"; $output .= "<strong>" . _("Geographic") . "</strong>\n"; $output .= "<table>\n"; if ($response['ele']) { $output .= "<tr><td><span><u>" . _("Height about sea level") . ":</u> " . $response['ele'] . "m</span></td></tr>\n"; } if ($response['population']) { $output .= "<tr><td><span><u>" . _("Population") . ":</u> " . number_format($response['population'], 0, ',', '.') . "</span></td></tr>\n"; } if ($response['iata']) { $output .= "<tr><td><span><u>" . _("IATA") . ":</u> " . $response['iata'] . "</span></td></tr>\n"; } if ($response['icao']) { $output .= "<tr><td><span><u>" . _("ICAO") . ":</u> " . $response['icao'] . "</span></td></tr>\n"; } $output .= "</table>\n"; $output .= "</div>\n"; } // wheelchair box if ($response['wheelchair'] || $response['wheelchair:toilets'] || $response['wheelchair:rooms'] || $response['wheelchair:access'] || $response['wheelchair:places']) { $output .= "<div class=\"moreInfoBox\">\n"; $output .= "<strong>" . _("Wheelchair") . "</strong>\n"; $output .= "<table>\n"; if ($response['wheelchair']) { if ($response['wheelchair'] == "yes") { $output .= "<tr><td><span>" . _("Accessible for wheelchairs") . "</span></td></tr>\n"; } else { if ($response['wheelchair'] == "no") { $output .= "<tr><td><span>" . _("Not accessible for wheelchairs") . "</span></td></tr>\n"; } else { if ($response['wheelchair'] == "limited") { $output .= "<tr><td><span>" . _("Limited accessible for wheelchairs") . "</span></td></tr>\n"; } } } } if ($response['wheelchair:toilets']) { if ($response['wheelchair:toilets'] == "yes") { $output .= "<tr><td><span>" . _("Toilets accessible") . "</span></td></tr>\n"; } else { if ($response['wheelchair:toilets'] == "no") { $output .= "<tr><td><span>" . _("Toilets not accessible") . "</span></td></tr>\n"; } else { if ($response['wheelchair:toilets'] == "limited") { $output .= "<tr><td><span>" . _("Toilets limited accessible") . "</span></td></tr>\n"; } } } } if ($response['wheelchair:rooms']) { if ($response['wheelchair:rooms'] == "yes" || $response['wheelchair:rooms'] != "no" || $response['wheelchair:rooms'] != "limited") { $output .= "<tr><td><span>" . _("All rooms accessible") . "</span></td></tr>\n"; } else { if ($response['wheelchair:rooms'] == "no") { $output .= "<tr><td><span>" . _("Rooms not accessible") . "</span></td></tr>\n"; } else { if ($response['wheelchair:rooms'] == "limited") { $output .= "<tr><td><span>" . _("Most rooms accessible") . "</span></td></tr>\n"; } } } } if ($response['wheelchair:access']) { if ($response['wheelchair:access'] == "yes" || $response['wheelchair:access'] != "no" || $response['wheelchair:access'] != "limited") { $output .= "<tr><td><span>" . _("Building accessible") . "</span></td></tr>\n"; } else { if ($response['wheelchair:access'] == "no") { $output .= "<tr><td><span>" . _("Building not accessible") . "</span></td></tr>\n"; } else { if ($response['wheelchair:access'] == "limited") { $output .= "<tr><td><span>" . _("Building limited accessible") . "</span></td></tr>\n"; } } } } if ($response['wheelchair:places']) { if ($response['wheelchair:places'] == "yes" || $response['wheelchair:places'] != "no" || $response['wheelchair:places'] != "limited") { $output .= "<tr><td><span>" . _("Places for wheelchairs") . "</span></td></tr>\n"; } else { if ($response['wheelchair:places'] == "no") { $output .= "<tr><td><span>" . _("No places for wheelchairs") . "</span></td></tr>\n"; } else { if ($response['wheelchair:places'] == "limited") { $output .= "<tr><td><span>" . _("Limited places for wheelchairs") . "</span></td></tr>\n"; } } } } $output .= "</table>\n"; $output .= "</div>\n"; } // wikipedia box if ($wikipedia) { $output .= "<div class=\"moreInfoBox\">\n"; $output .= "<table>\n"; $output .= "<tr><td><strong>" . _("Wikipedia") . "</strong> <i><a target=\"_blank\" id=\"moreWikipediaFull\" href=\"" . $wikipedia[1] . "\">" . _("Full article...") . "</a></i></td></tr>\n"; // request first lines $output .= "<tr><td>" . getWikipediaBeginning($wikipedia[1]) . "</td></tr>\n"; $output .= "</table>\n"; $output .= "</div>\n"; } // image box, only images from domains listed on a whitelist are displayed if (imageDomainAllowed($response['image'])) { $url = getImageUrl($response['image']); $tmp = parse_url($url); if (substr_count($tmp['host'], ".") > 1) { $domain = substr($tmp['host'], strpos($tmp['host'], ".") + 1); } else { $domain = $tmp['host']; } $output .= "<div class=\"moreInfoBox\">\n"; $output .= "<table>\n"; // image from wikimedia commons if ($domain == "wikimedia.org") { // creating url to Wikimedia Commons page of this image $attribution = explode("/", $url); if (substr($url, 34, 16) == "special:filepath") { $attribution = $attribution[5]; } else { $attribution = $attribution[7]; } if ($wikipedia) { $search = urldecode($wikipedia[2]); } else { $search = $name[0]; } $output .= "<tr><td><strong>" . _("Image") . "</strong> <i id=\"moreWikipediaFull\"><a target=\"_blank\" href=\"http://commons.wikimedia.org/w/index.php?title=Special%3ASearch&search=" . $search . "\">" . _("More images") . "</a></i></td></tr>\n"; $output .= "<tr><td id=\"loadingImage\"><img id=\"moreImage\" title=\"" . _("Fullscreen") . "\" src=\"" . getWikipediaThumbnailUrl($url) . "\" /></td></tr>\n"; $output .= "<tr><td><a target=\"_blank\" href=\"http://commons.wikimedia.org/wiki/File:" . $attribution . "\">" . _("attribution-wikimedia.org") . "</a></td></tr>\n"; } else { if ($domain == "openstreetmap.org") { // creating url to Wikimedia Commons page of this image $attribution = explode("/", $url); if (substr($url, 35, 16) == "special:filepath") { $attribution = $attribution[5]; } else { $attribution = $attribution[7]; } if ($wikipedia) { $search = urldecode($wikipedia[2]); } else { $search = $name[0]; } $output .= "<tr><td><strong>" . _("Image") . "</strong> <i id=\"moreWikipediaFull\"><a target=\"_blank\" href=\"http://commons.wikimedia.org/w/index.php?title=Special%3ASearch&search=" . $search . "\">" . _("More images") . "</a></i></td></tr>\n"; $output .= "<tr><td id=\"loadingImage\"><img id=\"moreImage\" title=\"" . _("Fullscreen") . "\" src=\"" . getOsmWikiThumbnailUrl($url) . "\" /></td></tr>\n"; $output .= "<tr><td><a target=\"_blank\" href=\"http://commons.wikimedia.org/wiki/File:" . $attribution . "\">" . _("attribution-openstreetmap.org") . "</a></td></tr>\n"; } else { $output .= "<tr><td><strong>" . _("Image") . "</strong></td></tr>\n"; $output .= "<tr><td id=\"loadingImage\"><img id=\"moreImage\" title=\"" . _("Fullscreen") . "\" src=\"" . $url . "\" /></td></tr>\n"; $output .= "<tr><td><a target=\"_blank\" href=\"" . _("attribution-url-" . $domain) . "\">" . _("attribution-" . $domain) . "</a></td></tr>\n"; } } $output .= "</table>\n"; $output .= "</div>\n"; } else { if (getWikipediaImage($wikipedia[1])) { $image = getWikipediaImage($wikipedia[1]); $output .= "<div class=\"moreInfoBox\">\n"; $output .= "<table>\n"; $output .= "<tr><td><strong>" . _("Image") . "</strong> <i id=\"moreWikipediaFull\"><a target=\"_blank\" href=\"http://commons.wikimedia.org/w/index.php?title=Special%3ASearch&search=" . urldecode($wikipedia[2]) . "\">" . _("More images") . "</a></i></td></tr>\n"; $output .= "<tr><td id=\"loadingImage\"><img id=\"moreImage\" title=\"" . _("Fullscreen") . "\" src=\"" . getWikipediaThumbnailUrl($image) . "\" /></a></td></tr>\n"; $output .= "<tr><td><a target=\"_blank\" href=\"" . $image . "\">" . _("License, author, original page...") . "</a></td></tr>\n"; $output .= "</table>\n"; $output .= "</div>\n"; } } /* // panorama, only images from domains listed on a whitelist are supported if (imageDomainAllowed($response['panorama'])) { $attribution = explode("/", $response['panorama']); $output .= "<div class=\"moreInfoBox\">\n"; $output .= "<table>\n"; $output .= "<tr><td><strong>"._("Panorama")."</strong></td></tr>\n"; $output .= "<tr><td><img id=\"morePanorama\" title=\""._("Fullscreen")."\" src=\"".getWikipediaThumbnailUrl($response['panorama'])."\" /></a></td></tr>\n"; $output .= "<tr><td><a target=\"_blank\" href=\"http://commons.wikimedia.org/wiki/File:".$attribution[7]."\">"._("License, author, original page...")."</a></td></tr>\n"; $output .= "</table>\n"; $output .= "</div>\n"; } */ $output .= "</div>\n"; return $output; } else { return false; } }
mail("*****@*****.**", $subj, $body, $headers); /* #20120522 @dscheff - add record to db ********\ ** INSERT INTO forms.contact ** (form_id, firstname, middlename, lastname, nickname, email, role, gender, street_address, street_address_2, city, state, country, postal_code, phone, dob, high_school, high_school_city, high_school_state, high_school_country, anticipated_grad_year, academic_interests, extra_curricular, ethnicity, reference, mail_list, `call`, comment, date_submitted) ** VALUES (form_id, 'firstname', 'middlename', 'lastname', 'nickname', 'email', 'role', 'gender', 'street_address', 'street_address_2', 'city', 'state', 'country', 'postal_code', 'phone', 'dob', high_school, high_school_city, high_school_state, high_school_country, anticipated_grad_year, 'academic_interests', 'extra_curricular', ethnicity, 'reference', 'mail_list', 'call', 'comment', 'date_submitted'); \************************************************/ $CLEAN_POST = array(); foreach ($_POST as $k => $v) { if ($k == "fname" || $k == "mname" || $k == "nickname") { $v = formatFirstname($v); } else { if ($k == "lname") { $v = formatLastname($v); } else { if ($k == "street_address") { $v = formatAddress($v); } else { if ($k == "city") { $v = formatCity($v); } else { if ($k == "zip") { $v = formatZip($v); } } } } } $CLEAN_POST[$k] = safe($v); echo "PRE-CLEAN {$k} : " . $v . "<br />"; echo "CLEAN {$k} : " . $CLEAN_POST[$k] . "<br /><br />"; }
echo "<tr><td>Permanent<br />Address:</td><td>" . $a1[0] . "</td><td>School<br />Address:</td><td>" . $b1[0] . "</td></tr>"; echo "<tr><td></td><td></td><td></td><td></td></tr>"; echo "<tr><td>Personal Email:</td><td>" . $a1[1] . "</td><td>School Email:</td><td>" . $b1[1] . "</td></tr>"; echo "<tr><td></td><td></td><td></td><td></td></tr>"; echo "<tr><td>Mobile Phone:</td><td>" . $a1[2] . "</td></tr>"; echo "<tr><td>Home Phone:</td><td>" . $a1[3] . "</td></tr>"; echo "<tr><td>Work Phone:</td><td></td></tr>"; ?> </table> </div> <div class="profileTabContent" id="emergency"> <table class="profile"> <?php $c = getEmergencyContacts($_SESSION['cruser']); $c1 = isset($c[0]) ? [$c[0]['firstName'] . " " . $c[0]['lastName'], $c[0]['relation'], formatAddress($c[0]), $c[0]['mobileNumber'], $c[0]['homeNumber']] : ["", "", "", "", ""]; $c2 = isset($c[1]) ? [$c[1]['firstName'] . " " . $c[1]['lastName'], $c[1]['relation'], formatAddress($c[1]), $c[1]['mobileNumber'], $c[1]['homeNumber']] : ["", "", "", "", ""]; echo "<tr><td>Contact #1:</td><td>" . $c1[0] . "</td><td>Contact #2:</td><td>" . $c2[0] . "</td></tr>"; echo "<tr><td>Relation:</td><td>" . $c1[1] . "</td><td>Relation:</td><td>" . $c2[1] . "</td></tr>"; echo "<tr><td>Address:</td><td>" . $c1[2] . "</td><td>Address:</td><td>" . $c2[2] . "</td></tr>"; echo "<tr><td></td><td></td><td></td><td></td></tr>"; echo "<tr><td>Phone:</td><td>" . $c1[3] . "</td><td>Phone:</td><td>" . $c2[3] . "</td></tr>"; echo "<tr><td>Alt Phone:</td><td>" . $c1[4] . "</td><td>Alt Phone:</td><td>" . $c2[4] . "</td></tr>"; ?> </table> </div> </div> </div> <br /> <img id="illuminimage" style="opacity:0;" src="images/illuminati.png" /> </div> <br>
$pdf = new PDF(); $pdf->AliasNbPages(); // Abstände auf der seite setzen $pdf->SetMargins(4, 2, 4); // Hinzufügen der 1. Seite $pdf->AddPage(); // Adressfeld mit Absender und Rechnungsanschrift $pdf->SetX(0); $pdf->SetY(58); $pdf->SetFont('Arial', '', 6); $pdf->SetTextColor(0); $pdf->Text(20, 50, utf8_decode(SHOPBETREIBER) . ' *' . utf8_decode(SHOPSTRASSE) . ' *' . utf8_decode(SHOPSTADT)); $pdf->SetFont('Arial', '', 9); $pdf->SetTextColor(0); $pdf->Cell(20); $pdf->MultiCell(70, 3.3, formatAddress($order), 0, 'L'); // Lieferanschrift /* $pdf->SetFont('Arial','B',8); $pdf->SetTextColor(0); $pdf->Text(117,71,ENTRY_SHIP_TO); $pdf->SetX(0); $pdf->SetY(74); $pdf->Cell(115); */ // Barcode /* if (BARCODE_RECHNUNG == 'ja'){ $print_barcode = pdf_open_jpeg($pdf, 'barcodegen.php?barcode= ' . tep_db_input($oID) .); $pdf->Image($print_barcode,120,74,60); } $bar = barcodegen.php?barcode=