Example #1
0
        // default description
        $feed_description = !empty($details['description']) ? $details['description'] : "Articles filed under the category " . $details['title'];
        // podcast description
        if ($_GET['feed'] == 'podcast') {
            $feed_description = !empty($details['description']) ? $details['description'] : "The " . $details['title'] . " podcast - hosted by " . $config['site']['title'];
        }
    }
    // author
    if (isset($_GET['author_id']) && isset($_GET['author_url'])) {
        $details = get_author_details($_GET['author_id']);
        $config['site']['meta']['author'] = $details['name'];
        $feed_description = "Articles written by " . $details['name'];
    }
    // tag
    if (isset($_GET['tag_id']) && isset($_GET['tag_url'])) {
        $details = get_tag_details($_GET['tag_id']);
        $feed_description = "Articles tagged " . $details['title'];
    }
} else {
    header("HTTP/1.0 404 Not Found");
    header('Location: ' . WW_WEB_ROOT);
}
// start the xml feed
echo '
	<channel>
		<title>' . $config['site']['title'] . '</title>
		<description>' . $feed_description . '</description>
		<link>' . WW_WEB_ROOT . '</link>
		<copyright>' . $config['site']['title'] . ' - ' . $config['meta']['author'] . '</copyright>
		<generator>Wicked Words RSS Generator</generator>
		<atom:link href="' . $this_feed . '" rel="self" type="application/rss+xml" />';
Example #2
0
}
// cancel delete tag
if (isset($_POST['cancel_delete_tag']) && $_POST['cancel_delete_tag'] == 'No') {
    $tag_id = (int) $_GET['tag_id'];
    header('Location: ' . $_SERVER["PHP_SELF"] . '?page_name=tags&tag_id=' . $tag_id);
}
// get main data
$tag_id = isset($_GET['tag_id']) ? (int) $_GET['tag_id'] : 0;
if (empty($tag_id)) {
    $left_text = 'Tags';
    $right_text = '';
    $page_header = show_page_header($left_text, $right_text);
    $main_content = $page_header;
    $main_content .= '<p>No tag selected: choose a tag to edit from the right hand menu.</p>';
} else {
    $tag = get_tag_details($tag_id);
    $left_text = 'Tags: ' . $tag['title'];
    $right_text = $tag['url'];
    $page_header = show_page_header($left_text, $right_text);
    $main_content = $page_header;
    // confirm file delete
    if (isset($_GET['action']) && $_GET['action'] == 'delete') {
        $main_content .= '
				<h2>Are you sure you want to delete this tag?</h2>
				<form action="' . $action_url . '" method="post" name="confirm_delete_tag_form">
					<input name="confirm_delete_tag" type="submit" value="Yes"/>
					<input name="cancel_delete_tag" type="submit" value="No" />
				</form>
				<hr />
				';
    }