File: _edit_navbar.php

package info (click to toggle)
b2evolution 0.9.2-3%2Betch1
  • links: PTS
  • area: main
  • in suites: etch
  • size: 12,972 kB
  • ctags: 5,460
  • sloc: php: 58,989; sh: 298; makefile: 36
file content (82 lines) | stat: -rw-r--r-- 3,097 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
<?php
/**
 * Displays the post browsing navigation bar
 *
 * b2evolution - {@link http://b2evolution.net/}
 * Released under GNU GPL License - {@link http://b2evolution.net/about/license.html}
 * @copyright (c)2003-2005 by Francois PLANQUE - {@link http://fplanque.net/}
 *
 * @package admin
 *
 * TODO: make it a method of ItemList, usable in real blogs, too
 * TODO: links to result's pages, not only stoopid 'forward'/'backward'
 * ...FP: change buttons into parameter-links 
 */
if( !defined('DB_USER') ) die( 'Please, do not access this page directly.' );
?>
<table cellpadding="0" cellspacing="0" border="0">
	<tr>
		<td>
		<table cellpadding="0" cellspacing="0" border="0"><tr>
		<?php	if($previousXend > 0) { ?>
		<td>
			<form name="nextXposts" method="post" action="<?php echo regenerate_url( array('poststart','postend'), array('poststart='.$previousXstart,'postend='.$previousXend), $pagenow ); ?>">
				<input type="submit" name="submitprevious" class="search" value="&lt; <?php 
				if( $MainList->what_to_show == 'days' )
					printf( T_('Next %d days'), $posts );
				else printf( T_('Previous %d'), $posts )
				?>" />
			</form>
		</td>
		<?php	}
		if($nextXstart <= $MainList->get_total_num_posts()) { ?>
		<td>
			<form name="nextXposts" method="post" action="<?php echo regenerate_url( array('poststart','postend'), array('poststart='.$nextXstart,'postend='.$nextXend), $pagenow ); ?>">
				<input type="submit" name="submitnext" class="search" value="<?php
					if( $MainList->what_to_show == 'days' )
						printf( T_('Previous %d days'), $posts );
					else printf( T_('Next %d'), $posts );
					?> &gt;" />
			</form>
		</td>
		<?php	}	?>
    <td></td>
		</tr></table>
		</td>
		<td>&nbsp;</td>

		<td align="right">
			<form action="b2browse.php" name="showXfirstlastposts" method="get">
				<input type="hidden" name="blog" value="<?php echo $blog ?>" />
				<?php
				if( $what_to_show == 'days' )
				{
					// TODO: dropdown / Javascript calendar?
					echo date_i18n( locale_datefmt(), $MainList->limitdate_end )
					.' './* TRANS: x TO y OF z */ T_(' to ').' '
					.date_i18n( locale_datefmt(), $MainList->limitdate_start );
				}
				else
				{ ?>
				<input type="text" name="poststart" value="<?php echo $poststart ?>" size="4" maxlength="10" />
				<?php /* TRANS: x TO y OF z */ echo T_(' to ') ?>
				<input type="text" name="postend" value="<?php echo $postend ?>" size="4" maxlength="10" />
				<?php /* TRANS: x TO y OF z */ echo T_(' of ') ?> <?php echo $MainList->get_total_num_posts() ?>
				<?php } ?>
				
				<select name="order">
					<option value="DESC" <?php
					$i = $order;
					if ($i == "DESC")
					echo ' selected="selected"';
					?>><?php echo T_('from the end') ?></option>
					<option value="ASC" <?php
					if ($i == "ASC")
					echo ' selected="selected"';
					?>><?php echo T_('from the start') ?></option>
				</select>
				<input type="submit" name="submitXtoX" class="search" value="<?php echo T_('OK') ?>" />
			</form>
		</td>
	</tr>
</table>