Update of /cvsroot/webnotes/webnotes
In directory sc8-pr-cvs1:/tmp/cvs-serv9034
Modified Files:
admin_manage_notes.php
Log Message:
M admin_manage_notes.php
- Added current time.
- Added number of notes for each page.
- Added last updated time for each page.
Index: admin_manage_notes.php
===================================================================
RCS file: /cvsroot/webnotes/webnotes/admin_manage_notes.php,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -d -r1.19 -r1.20
--- admin_manage_notes.php 3 Oct 2002 03:47:50 -0000 1.19
+++ admin_manage_notes.php 19 Aug 2003 23:19:58 -0000 1.20
@@ -46,22 +46,31 @@
echo "<tr bgcolor=\"$color\"><td><a href=\"$v_url\">$v_page</a></td><td>$v_url</td><td>$v_notes_count</td></tr>\n";
}
+ $t_now = date( config_get( 'date_format' ) );
echo <<<EOT
</table>
<p>There are $count page(s) to be moderated.</p>\n
<hr>
<div class="spacer"></div>
<p><strong>Following are all the pages that use phpWebNotes:</strong></p>
+ <p>Time now is $t_now</p>
<table class="box" summary="">
- <tr><th>Page</th><th>URL</th></tr>\n
+ <tr><th>Page</th><th># of Notes</th><th>Last Updated</td><th>URL</th></tr>\n
EOT;
$count = 0;
$pages = page_get_array ( page_where_url_exists(), 'last_updated DESC' );
foreach( $pages as $page ) {
extract( $page, EXTR_PREFIX_ALL, 'v' );
+ $v_id = (integer)$v_id;
+ $query = "SELECT COUNT(*) FROM " . config_get( 'phpWN_note_table' ) . ' ' .
+ "WHERE (page_id = $v_id )";
+ $result = db_query( $query );
+ $t_number = db_result( $result );
+ $t_last_updated = date( config_get( 'date_format' ), $v_last_updated );
+
$color = util_alternate_colors( $count++ );
- echo "<tr bgcolor=\"$color\"><td><a href=\"$v_url\">$v_page</a></td><td>$v_url</td></tr>\n";
+ echo "<tr bgcolor=\"$color\"><td><a href=\"$v_url\">$v_page</a></td><td>$t_number</td><td>$t_last_updated</td><td>$v_url</td></tr>\n";
}
echo <<<EOT
@@ -73,4 +82,4 @@
print_bottom_page( $g_bottom_page_inc );
print_body_bottom();
print_html_bottom();
-?>
\ No newline at end of file
+?>
|