本文整理汇总了PHP中PMF_Link::getSystemUri方法的典型用法代码示例。如果您正苦于以下问题:PHP PMF_Link::getSystemUri方法的具体用法?PHP PMF_Link::getSystemUri怎么用?PHP PMF_Link::getSystemUri使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PMF_Link
的用法示例。
在下文中一共展示了PMF_Link::getSystemUri方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: foreach
$rss->writeElement('link', PMF_Link::getSystemUri('/feed/topten/rss.php'));
if ($num > 0) {
$i = 0;
foreach ($rssData as $item) {
$i++;
// Get the url
$link = str_replace($_SERVER['SCRIPT_NAME'], '/index.php', $item['url']);
if (PMF_RSS_USE_SEO) {
if (isset($item['thema'])) {
$oLink = new PMF_Link($link);
$oLink->itemTitle = html_entity_decode($item['thema'], ENT_COMPAT, 'UTF-8');
$link = html_entity_decode($oLink->toString(), ENT_COMPAT, 'UTF-8');
}
}
$rss->startElement('item');
$rss->writeElement('title', PMF_Utils::makeShorterText(html_entity_decode($item['thema'], ENT_COMPAT, 'UTF-8'), 8) . " (" . $item['visits'] . " " . $PMF_LANG['msgViews'] . ")");
$rss->startElement('description');
$rss->writeCdata("[" . $i . ".] " . $item['thema'] . " (" . $item['visits'] . " " . $PMF_LANG['msgViews'] . ")");
$rss->endElement();
$rss->writeElement('link', PMF_Link::getSystemUri('/feed/topten/rss.php') . $link);
$rss->writeElement('pubDate', PMF_Date::createRFC822Date($item['last_visit'], false));
$rss->endElement();
}
}
$rss->endElement();
$rss->endElement();
$rssData = $rss->outputMemory();
header('Content-Type: application/rss+xml');
header('Content-Length: ' . strlen($rssData));
print $rssData;
$db->dbclose();
示例2: PMF_User
if (!isset($sent[$userId])) {
// TODO: Move this code to Category.php
$oUser = new PMF_User();
$oUser->getUserById($userId);
$catOwnerEmail = $oUser->getUserData('email');
$mail = new PMF_Mail();
$mail->unsetFrom();
$mail->setFrom($usermail);
$mail->addTo($faqconfig->get('main.administrationMail'));
// Let the category owner get a copy of the message
if ($faqconfig->get('main.administrationMail') != $catOwnerEmail) {
$mail->addCc($catOwnerEmail);
}
$mail->subject = '%sitename%';
// TODO: let the email contains the faq article both as plain text and as HTML
$mail->message = html_entity_decode($PMF_LANG['msgMailCheck']) . "\n\n" . $faqconfig->get('main.titleFAQ') . ": " . PMF_Link::getSystemUri('/index.php') . '/admin';
$result = $mail->send();
unset($mail);
$sent[$userId] = $catOwnerEmail;
}
}
$tpl->processTemplate('writeContent', array('msgNewContentHeader' => $PMF_LANG["msgNewContentHeader"], 'Message' => $isNew ? $PMF_LANG['msgNewContentThanks'] : $PMF_LANG['msgNewTranslationThanks']));
} else {
if (false === IPCheck($_SERVER['REMOTE_ADDR'])) {
$tpl->processTemplate('writeContent', array('msgNewContentHeader' => $PMF_LANG['msgNewContentHeader'], 'Message' => $PMF_LANG['err_bannedIP']));
} else {
if (is_null($faqid)) {
$faqsession->userTracking('error_save_entry', 0);
} else {
$faqsession->userTracking('error_save_translation_entry', 0);
}
示例3: foreach
foreach ($items as $item) {
$priority = PMF_SITEMAP_GOOGLE_PRIORITY_DEFAULT;
if ($visitsMax - $visitMin > 0) {
$priority = sprintf('%.1f', PMF_SITEMAP_GOOGLE_PRIORITY_DEFAULT * (1 + ($item['visits'] - $visitMin) / ($visitsMax - $visitMin)));
}
// a. We use plain PMF urls w/o any SEO schema
$link = str_replace($_SERVER['SCRIPT_NAME'], '/index.php', $item['url']);
// b. We use SEO PMF urls
if (PMF_SITEMAP_GOOGLE_USE_SEO) {
if (isset($item['thema'])) {
$oL = new PMF_Link($link);
$oL->itemTitle = $item['thema'];
$link = $oL->toString();
}
}
$sitemap .= buildSitemapNode(PMF_Link::getSystemUri('/sitemap.google.php') . $link, PMF_Date::createISO8601Date($item['date']), PMF_SITEMAP_GOOGLE_CHANGEFREQ_DAILY, $priority);
}
$sitemap .= '</urlset>';
$getgezip = PMF_Filter::filterInput(INPUT_GET, PMF_SITEMAP_GOOGLE_GET_GZIP, FILTER_VALIDATE_INT);
if (!is_null($getgezip) && 1 == $getgezip) {
if (function_exists('gzencode')) {
$sitemapGz = gzencode($sitemap);
header('Content-Type: application/x-gzip');
header('Content-Disposition: attachment; filename="' . PMF_SITEMAP_GOOGLE_FILENAME_GZ . '"');
header('Content-Length: ' . strlen($sitemapGz));
print $sitemapGz;
} else {
PMF_Helper_Http::getInstance()->printHTTPStatus404();
}
} else {
header('Content-Type: text/xml');
示例4: foreach
}
if ($useSticky) {
$text[$i][] = $data['faq_sticky'];
}
if ($useTitle) {
$text[$i][] = $report->convertEncoding($data['faq_question']);
}
if ($useCreationDate) {
$text[$i][] = $data['faq_creation'];
}
if ($useOwner) {
$text[$i][] = $report->convertEncoding($data['faq_org_author']);
}
if ($useLastModified) {
$text[$i][] = $report->convertEncoding($data['faq_last_author']);
}
if ($useUrl) {
$text[$i][] = $report->convertEncoding(sprintf('%sindex.php?action=artikel&cat=%d&id=%d&artlang=%s', PMF_Link::getSystemUri('admin/index.php'), $data['category_id'], $data['faq_id'], $data['faq_language']));
}
if ($useVisits) {
$text[$i][] = $data['faq_visits'];
}
}
$content = '';
foreach ($text as $row) {
$content .= implode(";", $row);
$content .= "\r\n";
}
$oHttpStreamer = new PMF_HttpStreamer('csv', $content);
$oHttpStreamer->send(PMF_HttpStreamer::HTTP_CONTENT_DISPOSITION_ATTACHMENT);
}
示例5: unset
$count++;
if (!($count % 10)) {
ob_flush();
}
}
echo "</div>";
}
// Clear the array with the queries
unset($query);
$query = [];
//
// 2nd UPDATES FROM 2.8.0-alpha2
//
if (version_compare($version, '2.8.0-alpha2', '<')) {
$link = new PMF_Link(null, $faqConfig);
$instanceData = array('url' => $link->getSystemUri($_SERVER['SCRIPT_NAME']), 'instance' => $link->getSystemRelativeUri('setup/update.php'), 'comment' => $faqConfig->get('main.titleFAQ'));
$faqInstance = new PMF_Instance($faqConfig);
$faqInstance->addInstance($instanceData);
$faqInstanceMaster = new PMF_Instance_Master($faqConfig);
$faqInstanceMaster->createMaster($faqInstance);
$faqConfig->add('records.autosaveActive', 'false');
$faqConfig->add('records.autosaveSecs', '180');
$faqConfig->add('main.maintenanceMode', 'false');
$faqConfig->add('security.salt', md5($faqConfig->get('main.referenceURL')));
}
//
// UPDATES FROM 2.8.0-alpha3
//
if (version_compare($version, '2.8.0-alpha3', '<')) {
$query[] = "DROP TABLE " . PMF_Db::getTablePrefix() . "faqlinkverifyrules";
$query[] = "INSERT INTO " . PMF_Db::getTablePrefix() . "faqright (right_id, name, description) VALUES\n (45, 'export', 'Right to export the complete FAQ')";
示例6: sprintf
$editThisEntry = '';
if (isset($permission['editbt'])) {
$editThisEntry = sprintf('<a href="%sadmin/index.php?action=editentry&id=%d&lang=%s">%s</a>', PMF_Link::getSystemRelativeUri('index.php'), $record_id, $lang, $PMF_LANG['ad_entry_edit_1'] . ' ' . $PMF_LANG['ad_entry_edit_2']);
}
// Is the faq expired?
$expired = date('YmdHis') > $faq->faqRecord['dateEnd'];
// Does the user have the right to add a comment?
if ($faq->faqRecord['active'] != 'yes' || 'n' == $faq->faqRecord['comment'] || $expired) {
$commentMessage = $PMF_LANG['msgWriteNoComment'];
} else {
$commentMessage = sprintf("%s<a href=\"javascript:void(0);\" onclick=\"javascript:\$('#comment').show();\">%s</a>", $PMF_LANG['msgYouCan'], $PMF_LANG['msgWriteComment']);
}
// Build Digg it! URL
$diggItUrl = sprintf('%s?cat=%s&id=%d&lang=%s&title=%s', PMF_Link::getSystemUri(), $currentCategory, $record_id, $lang, urlencode($thema));
// Build Facebook URL
$facebookUrl = sprintf('%s?cat=%s&id=%d&lang=%s', PMF_Link::getSystemUri(), $currentCategory, $record_id, $lang);
// Create commented out HTML for microsummary
$allVisitsData = $faqvisits->getAllData();
$faqPopularity = '';
$maxVisits = 0;
$minVisits = 0;
$currVisits = 0;
$faqVisitsCount = count($allVisitsData);
$percentage = 0;
if ($faqVisitsCount > 0) {
$percentage = 100 / $faqVisitsCount;
}
foreach ($allVisitsData as $_r) {
if ($minVisits > $_r['visits']) {
$minVisits = $_r['visits'];
}
示例7: Footer
/**
* The footer of the PDF file
*
* @return void
*/
public function Footer()
{
global $PMF_LANG;
$faqconfig = PMF_Configuration::getInstance();
$footer = sprintf('(c) %d %s <%s> | %s', date('Y'), $faqconfig->get('main.metaPublisher'), $faqconfig->get('main.administrationMail'), PMF_Date::format(date('Y-m-d H:i')));
$currentTextColor = $this->TextColor;
$this->SetTextColor(0, 0, 0);
$this->SetY(-25);
$this->SetFont($this->currentFont, '', 10);
$this->Cell(0, 10, $PMF_LANG['ad_gen_page'] . ' ' . $this->getAliasNumPage() . ' / ' . $this->getAliasNbPages(), 0, 0, 'C');
$this->SetY(-20);
$this->SetFont($this->currentFont, 'B', 8);
$this->Cell(0, 10, $footer, 0, 1, "C");
if ($this->enableBookmarks == false) {
$this->SetY(-15);
$this->SetFont($this->currentFont, '', 8);
$baseUrl = 'index.php';
if (is_array($this->faq) && !empty($this->faq)) {
$baseUrl .= '?action=artikel&';
if (array_key_exists($this->category, $this->categories)) {
$baseUrl .= 'cat=' . $this->categories[$this->category]['id'];
} else {
$baseUrl .= 'cat=0';
}
$baseUrl .= '&id=' . $this->faq['id'];
$baseUrl .= '&artlang=' . $this->faq['lang'];
}
$url = PMF_Link::getSystemUri('pdf.php') . $baseUrl;
$urlObj = new PMF_Link($url);
$urlObj->itemTitle = $this->question;
$_url = str_replace('&', '&', $urlObj->toString());
$this->Cell(0, 10, 'URL: ' . $_url, 0, 1, 'C', 0, $_url);
}
$this->TextColor = $currentTextColor;
}
示例8: startInstall
//.........这里部分代码省略.........
echo '<p class="alert alert-danger"><strong>Error:</strong> Your password and retyped password are too short.' . ' Please set your password and your retyped password with a minimum of 6 characters.</p>';
PMF_System::renderFooter(true);
}
if ($password != $password_retyped) {
echo '<p class="alert alert-danger"><strong>Error:</strong> Your password and retyped password are not equal.' . ' Please check your password and your retyped password.</p>';
PMF_System::renderFooter(true);
}
$language = PMF_Filter::filterInput(INPUT_POST, 'language', FILTER_SANITIZE_STRING, 'en');
$realname = PMF_Filter::filterInput(INPUT_POST, 'realname', FILTER_SANITIZE_STRING, '');
$email = PMF_Filter::filterInput(INPUT_POST, 'email', FILTER_SANITIZE_EMAIL, '');
$permLevel = PMF_Filter::filterInput(INPUT_POST, 'permLevel', FILTER_SANITIZE_STRING, 'basic');
$instanceSetup = new PMF_Instance_Setup();
$instanceSetup->setRootDir(PMF_ROOT_DIR);
// Write the DB variables in database.php
if (!$instanceSetup->createDatabaseFile($dbSetup)) {
echo "<p class=\"alert alert-danger\"><strong>Error:</strong> Setup cannot write to ./config/database.php.</p>";
$this->_system->cleanInstallation();
PMF_System::renderFooter(true);
}
// check LDAP if available
if (extension_loaded('ldap') && !is_null($ldapEnabled)) {
if (!$instanceSetup->createLdapFile($ldapSetup, '')) {
echo "<p class=\"alert alert-danger\"><strong>Error:</strong> Setup cannot write to ./config/ldap.php.</p>";
$this->_system->cleanInstallation();
PMF_System::renderFooter(true);
}
}
// connect to the database using config/database.php
require PMF_ROOT_DIR . '/config/database.php';
$db = PMF_Db::factory($dbSetup['dbType']);
$db->connect($DB['server'], $DB['user'], $DB['password'], $DB['db']);
if (!$db) {
echo "<p class=\"alert alert-danger\"><strong>DB Error:</strong> " . $db->error() . "</p>\n";
$this->_system->cleanInstallation();
PMF_System::renderFooter(true);
}
require PMF_ROOT_DIR . '/setup/assets/sql/' . $dbSetup['dbType'] . '.sql.php';
// CREATE TABLES
require PMF_ROOT_DIR . '/setup/assets/sql/stopwords.sql.php';
// INSERTs for stopwords
$this->_system->setDatabase($db);
echo '<p>';
// Erase any table before starting creating the required ones
if (!PMF_System::isSqlite($dbSetup['dbType'])) {
$this->_system->dropTables($uninst);
}
// Start creating the required tables
$count = 0;
foreach ($query as $executeQuery) {
$result = @$db->query($executeQuery);
if (!$result) {
echo '<p class="alert alert-danger"><strong>Error:</strong> Please install your version of phpMyFAQ once again or send
us a <a href=\\"http://www.phpmyfaq.de\\" target=\\"_blank\\">bug report</a>.</p>';
printf('<p class="alert alert-danger"><strong>DB error:</strong> %s</p>', $db->error());
printf('<code>%s</code>', htmlentities($executeQuery));
$this->_system->dropTables($uninst);
$this->_system->cleanInstallation();
PMF_System::renderFooter(true);
}
usleep(2500);
$count++;
if (!($count % 10)) {
echo '| ';
}
}
$link = new PMF_Link(null, $configuration);
// add main configuration, add personal settings
$this->_mainConfig['main.metaPublisher'] = $realname;
$this->_mainConfig['main.administrationMail'] = $email;
$this->_mainConfig['main.language'] = $language;
$this->_mainConfig['security.permLevel'] = $permLevel;
foreach ($this->_mainConfig as $name => $value) {
$configuration->add($name, $value);
}
$configuration->update(array('main.referenceURL' => $link->getSystemUri('/setup/index.php')));
$configuration->add('security.salt', md5($configuration->get('main.referenceURL')));
// add admin account and rights
$admin = new PMF_User($configuration);
if (!$admin->createUser($loginname, $password, 1)) {
printf("<p class=\"alert alert-danger\"><strong>Fatal installation error:</strong><br>" . "Couldn't create the admin user: %s</p>\n", $admin->error());
$this->_system->cleanInstallation();
PMF_System::renderFooter(true);
}
$admin->setStatus('protected');
$adminData = array('display_name' => $realname, 'email' => $email);
$admin->setUserData($adminData);
// add default rights
foreach ($this->_mainRights as $right) {
$admin->perm->grantUserRight(1, $admin->perm->addRight($right));
}
// Add anonymous user account
$instanceSetup->createAnonymousUser($configuration);
// Add master instance
$instanceData = array('url' => $link->getSystemUri($_SERVER['SCRIPT_NAME']), 'instance' => $link->getSystemRelativeUri('setup/index.php'), 'comment' => 'phpMyFAQ ' . PMF_System::getVersion());
$faqInstance = new PMF_Instance($configuration);
$faqInstance->addInstance($instanceData);
$faqInstanceMaster = new PMF_Instance_Master($configuration);
$faqInstanceMaster->createMaster($faqInstance);
echo '</p>';
}
示例9: html_entity_decode
$rss->startElement('channel');
$rss->writeElement('title', $faqconfig->get('main.titleFAQ') . ' - ');
$rss->writeElement('description', html_entity_decode($faqconfig->get('main.metaDescription')));
$rss->writeElement('link', PMF_Link::getSystemUri('/feed/category/rss.php'));
if (is_array($records)) {
foreach ($records as $item) {
$link = str_replace($_SERVER['SCRIPT_NAME'], '/index.php', $item['record_link']);
if (PMF_RSS_USE_SEO) {
if (isset($item['record_title'])) {
$oLink = new PMF_Link($link);
$oLink->itemTitle = $item['record_title'];
$link = $oLink->toString();
}
}
$rss->startElement('item');
$rss->writeElement('title', html_entity_decode($item['record_title'] . ' (' . $item['visits'] . ' ' . $PMF_LANG['msgViews'] . ')', ENT_COMPAT, 'UTF-8'));
$rss->startElement('description');
$rss->writeCdata($item['record_preview']);
$rss->endElement();
$rss->writeElement('link', PMF_Link::getSystemUri('/feed/category/rss.php') . $link);
$rss->writeElement('pubDate', PMF_Date::createRFC822Date($item['record_date'], true));
$rss->endElement();
}
}
$rss->endElement();
$rss->endElement();
$rssData = $rss->outputMemory();
header('Content-Type: application/rss+xml');
header('Content-Length: ' . strlen($rssData));
print $rssData;
$db->dbclose();
示例10:
<value-of select="id('main')/h2"/>
</template>
<?php
break;
case 'open':
// Open questions: Last question
?>
<template match="/">
<value-of select="id('main')/table/tbody/tr[last()]/td[2]"/>
</template>
<?php
break;
default:
?>
<template match="/">
<value-of select="id('header')/h1/a"/>
</template>
<?php
break;
}
?>
<pages>
<include><?php
print PMF_Link::getSystemUri('/microsummary.php');
?>
/*</include>
</pages>
</transform>
</template>
</generator>
示例11: renderOpenSearchLink
/**
* Renders the OpenSearchLink
*
* @return string
*/
public function renderOpenSearchLink()
{
return sprintf('<a class="searchplugin" href="#" onclick="window.external.AddSearchProvider(\'%s/opensearch.php\');">%s</a>', PMF_Link::getSystemUri('/index.php'), $this->translation['opensearch_plugin_install']);
}
示例12: define
*
* PHP Version 5.2
*
* The contents of this file are subject to the Mozilla Public License
* Version 1.1 (the "License"); you may not use this file except in
* compliance with the License. You may obtain a copy of the License at
* http://www.mozilla.org/MPL/
*
* Software distributed under the License is distributed on an "AS IS"
* basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
* License for the specific language governing rights and limitations
* under the License.
*
* @category phpMyFAQ
* @package Frontend
* @author Thorsten Rinne <thorsten@phpmyfaq.de>
* @copyright 2006-2010 phpMyFAQ Team
* @license http://www.mozilla.org/MPL/MPL-1.1.html Mozilla Public License Version 1.1
* @link http://www.phpmyfaq.de
* @since 2006-11-19
*/
define('PMF_ROOT_DIR', dirname(__FILE__));
require PMF_ROOT_DIR . '/inc/Init.php';
require PMF_ROOT_DIR . '/inc/Link.php';
require_once 'lang/' . $faqconfig->get('main.language');
$baseUrl = PMF_Link::getSystemUri('/opensearch.php');
$searchUrl = $baseUrl . '/index.php?action=search';
$srcUrl = $baseUrl;
$opensearch = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<OpenSearchDescription xmlns=\"http://a9.com/-/spec/opensearch/1.1/\">\n<ShortName>" . $faqconfig->get('main.titleFAQ') . "</ShortName>\n<Description>" . $faqconfig->get('main.metaDescription') . "</Description>\n<Url type=\"text/html\" template=\"" . $searchUrl . "&search={searchTerms}\" />\n<Language>" . $PMF_LANG['metaLanguage'] . "</Language>\n<OutputEncoding>utf-8</OutputEncoding>\n<Contact>" . $faqconfig->get('main.administrationMail') . "</Contact>\n<Image height=\"16\" width=\"16\" type=\"image/png\">" . $baseUrl . "/images/pmfsearch.png</Image>\n</OpenSearchDescription>";
header("Content-type: text/xml");
print $opensearch;
示例13: foreach
$sitemap = '';
// 1st entry: the faq server itself
$sitemap .= PMF_Link::getSystemUri('/sitemap.yahoo.php') . PMF_SITEMAP_YAHOO_END_OF_LINE;
// nth entry: each faq
foreach ($items as $item) {
// a. We use plain PMF urls w/o any SEO schema
$link = str_replace($_SERVER['PHP_SELF'], '/index.php', $item['url']);
// b. We use SEO PMF urls
if (PMF_SITEMAP_YAHOO_USE_SEO) {
if (isset($item['thema'])) {
$oL = new PMF_Link($link);
$oL->itemTitle = $item['thema'];
$link = $oL->toString();
}
}
$sitemap .= PMF_Link::getSystemUri('/sitemap.yahoo.php') . $link . PMF_SITEMAP_YAHOO_END_OF_LINE;
}
$getgezip = PMF_Filter::filterInput(INPUT_GET, PMF_SITEMAP_YAHOO_GET_GZIP, FILTER_VALIDATE_INT);
if (!is_null($getgezip) && 1 == $getgezip) {
if (function_exists('gzencode')) {
$sitemapGz = gzencode($sitemap);
header('Content-Type: application/x-gzip');
header('Content-Disposition: attachment; filename="' . PMF_SITEMAP_YAHOO_FILENAME_GZ . '"');
header('Content-Length: ' . strlen($sitemapGz));
print $sitemapGz;
} else {
printHTTPStatus404();
}
} else {
header('Content-Type: text/plain');
header('Content-Disposition: inline; filename="' . PMF_SITEMAP_YAHOO_FILENAME . '"');
示例14:
?>
" class="no-js ie9"> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--> <html lang="<?php
print $PMF_LANG['metaLanguage'];
?>
" class="no-js"> <!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title><?php
print $faqconfig->get('main.titleFAQ');
?>
- powered by phpMyFAQ</title>
<base href="<?php
print PMF_Link::getSystemUri('index.php');
?>
" />
<meta name="description" content="Only Chuck Norris can divide by zero.">
<meta name="author" content="phpMyFAQ Team">
<meta name="viewport" content="width=device-width; initial-scale=1.0; maximum-scale=1.0;">
<meta name="application-name" content="phpMyFAQ <?php
print $faqconfig->get('main.currentVersion');
?>
">
<meta name="copyright" content="(c) 2001-2010 phpMyFAQ Team">
<meta name="publisher" content="phpMyFAQ Team">
<meta name="MSSmartTagsPreventParsing" content="true">
<link rel="stylesheet" href="style/admin.css?v=1">
示例15: foreach
$rss->writeElement('link', PMF_Link::getSystemUri('/feed/topten/rss.php'));
if ($num > 0) {
$i = 0;
foreach ($rssData as $item) {
$i++;
// Get the url
$link = str_replace($_SERVER['PHP_SELF'], '/index.php', $item['url']);
if (PMF_RSS_USE_SEO) {
if (isset($item['thema'])) {
$oL = new PMF_Link($link);
$oL->itemTitle = $item['thema'];
$link = $oL->toString();
}
}
$rss->startElement('item');
$rss->writeElement('title', utf8_encode(PMF_Utils::makeShorterText($item['thema'], 8) . " (" . $item['visits'] . " " . $PMF_LANG['msgViews'] . ")"));
$rss->startElement('description');
$rss->writeCdata(utf8_encode("[" . $i . ".] " . $item['thema'] . " (" . $item['visits'] . " " . $PMF_LANG['msgViews'] . ")"));
$rss->endElement();
$rss->writeElement('link', utf8_encode(PMF_Link::getSystemUri('/feed/topten/rss.php') . $link));
$rss->writeElement('pubDate', PMF_Date::createRFC822Date($item['last_visit'], false));
$rss->endElement();
}
}
$rss->endElement();
$rss->endElement();
$rssData = $rss->outputMemory();
header('Content-Type: application/rss+xml');
header('Content-Length: ' . strlen($rssData));
print $rssData;
$db->dbclose();