Changeset 1245 for trunk/wp-admin/edit.php
- Timestamp:
- 05/09/2004 05:47:02 AM (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/edit.php
r1239 r1245 46 46 <fieldset> 47 47 <legend><?php _e('Show Posts From Month of...') ?></legend> 48 48 <select name='m'> 49 49 <?php 50 echo "<select name=\"m\" style=\"width:120px;\">"; 51 $arc_result=$wpdb->get_results("SELECT DISTINCT YEAR(post_date), MONTH(post_date) FROM $tableposts ORDER BY post_date DESC",ARRAY_A); 50 $arc_result=$wpdb->get_results("SELECT DISTINCT YEAR(post_date) AS yyear, MONTH(post_date) AS mmonth FROM $tableposts ORDER BY post_date DESC"); 52 51 foreach ($arc_result as $arc_row) { 53 $arc_year = $arc_row ["YEAR(post_date)"];54 $arc_month = $arc_row ["MONTH(post_date)"];52 $arc_year = $arc_row->yyear; 53 $arc_month = $arc_row->mmonth; 55 54 56 if( $arc_year.zeroise($arc_month,2) == $_GET['m'] )57 $default = "selected";55 if( isset($_GET['m']) && $arc_year . zeroise($arc_month, 2) == $_GET['m'] ) 56 $default = 'selected="selected"'; 58 57 else 59 58 $default = null; 60 59 61 echo "<option ".$default." value=\"".$arc_year.zeroise($arc_month,2)."\">";62 echo $month[zeroise($arc_month, 2)]." $arc_year";60 echo "<option $default value=\"" . $arc_year.zeroise($arc_month, 2) . '">'; 61 echo $month[zeroise($arc_month, 2)] . " $arc_year"; 63 62 echo "</option>\n"; 64 63 } 65 echo "</select>";66 64 ?> 65 </select> 67 66 <input type="submit" name="submit" value="<?php _e('Show Month') ?>" /> 68 67 </fieldset> … … 93 92 94 93 if ($posts) { 94 $bgcolor = ''; 95 95 foreach ($posts as $post) { start_wp(); 96 96 $bgcolor = ('#eee' == $bgcolor) ? 'none' : '#eee'; … … 99 99 <th scope="row"><?php echo $id ?></th> 100 100 <td><?php the_time('Y-m-d \<\b\r \/\> g:i:s a'); ?></td> 101 <td><a href="<?php permalink_link(); ?>" rel="permalink">101 <td><a href="<?php the_permalink(); ?>" rel="permalink"> 102 102 <?php the_title() ?> 103 103 </a> … … 123 123 </table> 124 124 <?php 125 if ( ($withcomments) or ($single)) {125 if ( 1 == count($posts) ) { 126 126 127 127 $comments = $wpdb->get_results("SELECT * FROM $tablecomments WHERE comment_post_ID = $id ORDER BY comment_date"); … … 172 172 }//end if comments 173 173 ?> 174 <p><a href="edit.php"><?php _e('Back to posts') ?></a></p>175 174 <?php } ?> 176 175 </div>
Note: See TracChangeset
for help on using the changeset viewer.