cvs: php-master-web /manage user-notes.php

From: Date: Sun, 17 Jun 2007 19:03:45 +0000
Subject: cvs: php-master-web /manage user-notes.php
Groups: php.mirrors 
Request: Send a blank email to php-mirrors+get-35718@lists.php.net to get a copy of this message
bjori Sun Jun 17 19:03:45 2007 UTC Modified files: /php-master-web/manage user-notes.php Log: Add the ability to "browse" the notes # Useful when something happens to the mailing list http://cvs.php.net/viewvc.cgi/php-master-web/manage/user-notes.php?r1=1.62&r2=1.63&diff_format=u Index: php-master-web/manage/user-notes.php diff -u php-master-web/manage/user-notes.php:1.62 php-master-web/manage/user-notes.php:1.63 --- php-master-web/manage/user-notes.php:1.62 Sat Oct 14 12:02:46 2006 +++ php-master-web/manage/user-notes.php Sun Jun 17 19:03:45 2007 @@ -1,5 +1,5 @@ <?php -// $Id: user-notes.php,v 1.62 2006/10/14 12:02:46 bjori Exp $ +// $Id: user-notes.php,v 1.63 2007/06/17 19:03:45 bjori Exp $ // Force login before action can be taken include_once 'login.inc'; @@ -62,12 +62,19 @@ echo $str . '<br />'; } - if (isset($_REQUEST['keyword'])) { + if (isset($_REQUEST['keyword']) || isset($_REQUEST["view"])) { + if(isset($_REQUEST['keyword'])) { $sql = 'SELECT *,UNIX_TIMESTAMP(ts) AS ts FROM note WHERE note LIKE "%' . escape($_REQUEST['keyword']) . '%"'; if (is_numeric($_REQUEST['keyword'])) { $sql .= ' OR id = ' . $_REQUEST['keyword']; } $sql .= ' LIMIT 20'; + } else { + $page = (int)$_REQUEST["page"]; + if($page < 0) { $page = 0; } + $limit = $page * 10; $page++; + $sql = "SELECT *, UNIX_TIMESTAMP(ts) AS ts FROM note ORDER BY id DESC LIMIT $limit, 10"; + } if ($result = db_query($sql)) { if (mysql_num_rows($result) != 0) { @@ -86,7 +93,10 @@ "<a href=\"https://master.php.net/note/reject/$id\" target=\"_blank\">Reject Note</a>", "</p>", "<hr />"; - } + } + if(isset($_REQUEST["view"])) { + echo "<p><a href=\"?view=1&page=$page\">Next 10</a>"; + } } else { echo "no results<br />"; } @@ -110,6 +120,7 @@ </form> <p><a href="<?php echo $_SERVER['PHP_SELF'];?>?action=mass">Mass change of sections</a></p> +<p><a href="<?php echo $_SERVER['PHP_SELF'];?>?view=notes">View last 10 notes</a></p> <?php foot(); exit;

« previous php.mirrors (#35718) next »