<option value="">All Days</option>
			<?php 
    wp_dropdown_daily(test_param('m') ? get_param('m') : '');
} elseif ($GLOBALS['archive_mode'] == "weekly") {
    ?>
		<select name="w" style="width:120px;">
			<option value="">All Weeks</option>
			<?php 
    wp_dropdown_weekly(test_param('w') ? get_param('w') : '');
} elseif ($GLOBALS['archive_mode'] == "postbypost") {
    ?>
		<input type="hidden" name="more" value="1" />
		<select name="p" style="width:120px;">
			<option value="">All Posts</option>
			<?php 
    wp_dropdown_postbypost(test_param('p') ? get_param('p') : '');
}
?>
		</select>
	    <input type="submit" name="submit" value="View" />
      </form>
    </td>
  </tr>
</table>

<?php 
if ($GLOBALS['posts']) {
    foreach ($GLOBALS['posts'] as $GLOBALS['post']) {
        start_wp();
        ?>
<p>
			<option value="">All Days</option>
			<?php 
    wp_dropdown_daily(isset($m) ? $m : "");
} elseif ($archive_mode == "weekly") {
    ?>
		<select name="w" style="width:120px;">
			<option value="">All Weeks</option>
			<?php 
    wp_dropdown_weekly(isset($w) ? $w : "");
} elseif ($archive_mode == "postbypost") {
    ?>
		<input type="hidden" name="more" value="1" />
		<select name="p" style="width:120px;">
			<option value="">All Posts</option>
			<?php 
    wp_dropdown_postbypost(isset($p) ? $p : "");
}
?>
		</select>
	    <input type="submit" name="submit" value="View" />
      </form>
    </td>
  </tr>
</table>

<?php 
include dirname(__FILE__) . "/../wp-blog-header.php";
if ($posts) {
    foreach ($posts as $post) {
        start_wp();
        ?>