</td> <td class=search>' . ($row[2] ? '<a target=_blank href="' . HEURIST_BASE_URL . '?w=bookmark&db=' . HEURIST_DBNAME . '&q=tag:%22' . $row[1] . '%22" title="View records with this tag" class="externalLink"></a>' : '') . '</td> <td class=replace style="padding-top: 4px;">' . ($row[2] ? '<a href=# onclick="show_replace_list(this, ' . $row[0] . '); return false;">replace...</a>' : '') . '</td> </tr>'; $foreach_kwd_js .= "kwd['" . escChars(strtolower($row[1])) . "'] = " . $row[0] . ";\n"; $tagsCount++; } if ($tagsCount == 0) { $foreach_kwd = '<h2>You have not defined any tags</h2>'; } else { $foreach_kwd_js .= 'tagsCount=' . $tagsCount . "\n"; } $kwd_select = "<select id=kwd_select style=\"display: none;\"><option value=\"\" disabled selected>select tag...</option>"; $res = mysql_query('select tag_ID, tag_Text from usrTags where tag_UGrpID= ' . get_user_id() . ' order by tag_Text'); while ($row = mysql_fetch_row($res)) { $kwd_select .= "<option value=" . $row[0] . ">" . escChars($row[1]) . "</option>"; } $kwd_select .= "</select>"; $sortby_button = @$_REQUEST['order_by_popularity'] ? '<input type="submit" class="button" value="Sort alphabetically" onclick="document.getElementById(\'sortby_input\').value = \'\';" style="float: right;">' : '<input type="submit" class="button" value="Sort by usage" onclick="document.getElementById(\'sortby_input\').value = \'order_by_popularity\';" style="float: right;">'; $sortby_input = @$_REQUEST['order_by_popularity'] ? '<input type="hidden" id="sortby_input" name="order_by_popularity" value="1">' : '<input type="hidden" id="sortby_input" name="order_by_popularity" value="">'; if ($tag_message != '') { $tag_message = $tag_message . '<script>setTimeout(function(){document.getElementById("div-tag-message").style.display="none";},2000);</script>'; } $template = str_replace('{ForeachTag}', $foreach_kwd, $template); $template = str_replace('{ForeachTagJs}', $foreach_kwd_js, $template); $template = str_replace('{TagMessage}', $tag_message, $template); $template = str_replace('{UserHyperlinksImport}', $user_hyperlinks_import, $template); $template = str_replace('{sortby_button}', $sortby_button, $template); $template = str_replace('{sortby_input}', $sortby_input, $template); $template = str_replace('{kwd_select}', $kwd_select, $template); /*
// lets make all of the user set variables are xml compliant, just in case $titleTAG = escChars($titleTAG); $descriptionTAG = escChars($descriptionTAG); $copyrightTAG = escChars($copyrightTAG); $languageTAG = escChars($languageTAG); $webMasterTAG = escChars($webMasterTAG); $generatorTAG = escChars($generatorTAG); $rssImageTitleTAG = escChars($rssImageTitleTAG); $summaryTAG = escChars($summaryTAG); $authorTAG = escChars($authorTAG); $ownerNameTAG = escChars($ownerNameTAG); $ownerEmailTAG = escChars($ownerEmailTAG); $topCategoryTAG = escChars($topCategoryTAG); $subCategoryTAG = escChars($subCategoryTAG); $keywordTAG = escChars($keywordTAG); $imageTitleTAG = escChars($imageTitleTAG); // For override logic $aItemsEmpty = array('title' => '', 'link' => '', 'author' => '', 'commentText' => '', 'commentCDATA' => '', 'pubDate' => '', 'enclosureURL' => '', 'enclosureLength' => '', 'enclosureType' => '', 'subtitle' => '', 'keywords' => '', 'allowItemImage' => '', 'imageURL' => '', 'imageTitle' => '', 'imageFileType' => '', 'duration' => '', 'guid' => '', 'artist' => '', 'album' => '', 'composer' => '', 'genre' => '', 'year' => '', 'track' => '', 'copyright' => '', 'summary' => ''); header('Content-type: text/xml', true); // 2007-11-12 - Some media players don't like the http:// in the middle if (empty($enclosurePrefix)) { $rootMP3URL = "http://" . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; } else { $rootMP3URL = $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']; } $rootMP3URL = substr($rootMP3URL, 0, strrpos($rootMP3URL, "/")); // Trim off script name itself // Add enclosure prefix if valued (ie., TPN stats) $rootMP3URL = $enclosurePrefix . $rootMP3URL; print "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"; print "<rss {$nameSpaceTAG} version=\"2.0\">\n";