Пример #1
0
         header('Location:index.php?ac=1&f=' . urlencode('index.php?ac=12'));
         exit;
     }
     break;
 default:
     // blog list
     if (isset($_GET['e'])) {
         $has_error = true;
         $error_msg = $_GET['e'];
     } else {
         $has_error = false;
     }
     if (empty($blog_serial)) {
         $page_title = $lang['home'];
         if (empty($category_name) && empty($archive_date)) {
             $blogs = blog_list($search_key);
             if (strlen(trim($search_key)) > 0) {
                 $page_title = $lang['search'] . ' :: ' . $search_key;
             }
         } else {
             if (!empty($category_name)) {
                 $blogs = blog_list_by_category($category_name);
                 $page_title = $lang['category'] . ' :: ' . $category_name;
             } else {
                 if (!empty($archive_date)) {
                     $blogs = blog_list_by_archive($archive_date);
                     $page_title = $lang['archive'] . ' :: ' . $archive_date;
                 }
             }
         }
         $page_blogs = blog_page($curr_page, blog_sort($blogs));
Пример #2
0
				
				<div id="feed-sources">
					<?php 
echo source_list(true, true);
?>
				</div>
				
				<form name="modules" id="modules" method="post" action="<?php 
echo $_SERVER['PHP_SELF'];
?>
#modules">
					<div class="drop-boxes">
						<div id="blogs" class="drop">
							<h3>Blogs Module</h3>
							<?php 
echo blog_list(false, true);
?>
						</div>
						<div id="tweet" class="drop">
							<h3>Status Module</h3>
							<?php 
echo tweet_list(false, true);
?>
						</div>
						<div id="bookmarks" class="drop">
							<h3>Bookmarks Module</h3>
							<?php 
echo bookmark_list(false, true);
?>
						</div>
						<div id="photos" class="drop">
Пример #3
0
    }
}
function rss_create($arr_blog_list)
{
    global $site_name;
    global $site_slogan;
    global $context_root;
    echo "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>\n";
    echo "<rss version=\"2.0\">\n";
    echo "<channel>\n";
    echo "<title><![CDATA[{$site_name}]]></title>\n";
    echo "<description><![CDATA[{$site_slogan}]]></description>\n";
    echo "<link>http://" . $_SERVER['HTTP_HOST'] . $context_root . "</link>\n";
    if (!empty($arr_blog_list)) {
        foreach ($arr_blog_list as $blog) {
            echo "<item>\n";
            echo "<title><![CDATA[{$blog['title']}]]></title>\n";
            echo "<link>http://" . $_SERVER['HTTP_HOST'] . $context_root . "index.php?b={$blog['serial']}&amp;c={$blog['category']}</link>\n";
            echo "<description><![CDATA[{$blog['content']}]]></description>";
            echo "<category><![CDATA[{$blog['category']}]]></category>\n";
            echo "<comments>http://" . $_SERVER['HTTP_HOST'] . $context_root . "index.php?b={$blog['serial']}&amp;c={$blog['category']}</comments>\n";
            echo "<pubDate>" . date('r', $blog['timestamp']) . "</pubDate>\n";
            echo "</item>\n";
        }
    }
    echo "</channel>\n";
    echo "</rss>";
}
include_once 'secret.php';
$page_blogs = blog_page(1, blog_sort(blog_list()));
rss_create($page_blogs['blogs']);