From: <vb...@us...> - 2002-09-10 13:58:39
|
Update of /cvsroot/webnotes/webnotes In directory usw-pr-cvs1:/tmp/cvs-serv5632 Modified Files: action.php admin_index_files.php Log Message: - Clean up work in admin_index_files.php - Added the possibility of indexing / unindexing single pages. Index: action.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/action.php,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- action.php 6 Sep 2002 17:03:35 -0000 1.1 +++ action.php 10 Sep 2002 13:58:33 -0000 1.2 @@ -26,20 +26,27 @@ } # @@@@ add handling for confirm? - - if ( !isset( $f_note_id )) { - echo 'f_note_id not defined<br />'; - exit; - } - if ( 'accept' === $f_action ) { - note_accept( $f_note_id ); - } else if ( 'reject' === $f_action ) { - note_decline( $f_note_id ); - } else if ( 'archive' === $f_action ) { - note_archive( $f_note_id ); - } else if ( 'delete' === $f_action ) { - note_delete( $f_note_id ); + if ( isset( $f_note_id )) { + if ( 'accept' === $f_action ) { + note_accept( $f_note_id ); + } else if ( 'reject' === $f_action ) { + note_decline( $f_note_id ); + } else if ( 'archive' === $f_action ) { + note_archive( $f_note_id ); + } else if ( 'delete' === $f_action ) { + note_delete( $f_note_id ); + } + } + + if ( isset( $f_page_id ) ) { + $c_page_id = stripslashes( urldecode( $f_page_id ) ); + if ( 'unindex' === $f_action ) { + page_delete( $c_page_id ); + } + if ( 'index' === $f_action ) { + page_add( $c_page_id ); + } } if ( isset( $f_wait ) ) { Index: admin_index_files.php =================================================================== RCS file: /cvsroot/webnotes/webnotes/admin_index_files.php,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- admin_index_files.php 10 Sep 2002 10:34:14 -0000 1.14 +++ admin_index_files.php 10 Sep 2002 13:58:33 -0000 1.15 @@ -1,17 +1,16 @@ -<? +<?php # phpWebNotes - a php based note addition system - # Copyright (C) 2000 Kenzaburo Ito - ke...@30... - # 2002 Webnotes Team - web...@so... + # Copyright (C) 2000-2002 Webnotes Team - web...@so... # This program is distributed under the terms and conditions of the GPL # See the files README and LICENSE for details # -------------------------------------------------------- # $Id$ # -------------------------------------------------------- -?> -<? include ( "core" . DIRECTORY_SEPARATOR . "api.php" ) ?> -<? login_cookie_check() ?> -<? + + require_once ( "core" . DIRECTORY_SEPARATOR . "api.php" ); + login_cookie_check(); + if ( !isset( $f_dir ) ) { $f_dir = dirname( __FILE__ ); } else { @@ -21,56 +20,46 @@ if ( ( substr( $f_dir, -1 ) != '\\' ) && ( substr ( $f_dir, -1 ) != '/' ) ) { $f_dir = $f_dir . DIRECTORY_SEPARATOR; } -?> -<? print_html_top() ?> -<? print_head_top() ?> -<? print_title( $g_window_title ) ?> -<? print_css( $g_css_inc_file ) ?> -<? print_head_bottom() ?> -<? print_body_top() ?> -<? print_header( $g_page_title ) ?> -<? print_top_page( $g_top_page_inc ) ?> -<? print_admin_menu() ?> + print_html_top(); + print_head_top(); + print_title( $g_window_title ); + print_css( $g_css_inc_file ); + print_head_bottom(); + print_body_top(); + print_header( $g_page_title ); + print_top_page( $g_top_page_inc ); -<table bgcolor="<? echo $g_table_border_color ?>" width="75%" cellspacing="1" border="0"> -<tr bgcolor="<? echo $g_header_color ?>"> + print_admin_menu(); + echo '<br />'; +?> + +<table bgcolor="<?php echo $g_table_border_color ?>" width="75%" cellspacing="1" border="0"> +<tr bgcolor="<?php echo $g_header_color ?>"> <td> - <strong><? echo $s_index_files_title ?></strong> + <strong><?php echo $s_index_files_title ?></strong> </td> </tr> -<tr bgcolor="<? echo $g_white_color ?>"> +<tr bgcolor="<?php echo $g_white_color ?>"> <td> - <? echo $s_current_directory ?>: - <? echo $f_dir; ?> + <?php + echo "$s_current_directory: $f_dir"; + ?> </td> </tr> -<? +<?php if ( isset( $f_action_index ) ) { -?> -<tr bgcolor="<? echo $g_white_color ?>"> - <td> - <? echo $s_indexed_following_files ?>: - <br /> - <? page_add_dir( $f_dir, false ) ?> - </td> -</tr> -<? } ?> -<? + page_add_dir( $f_dir, false ); + } + if ( isset( $f_action_index_tree ) ) { + page_add_dir( $f_dir, true ); + } ?> -<tr bgcolor="<? echo $g_white_color ?>"> - <td> - <? echo $s_indexed_following_files ?>: - <br /> - <? page_add_dir( $f_dir, true ) ?> - </td> -</tr> -<? } ?> -<tr bgcolor="<? echo $g_primary_light_color ?>"> +<tr bgcolor="<?php echo $g_primary_light_color ?>"> <td> - <? - print_dirs( $f_dir ); + <?php + print_dirs( $f_dir, $PHP_SELF ); ?> </td> </tr> @@ -88,7 +77,9 @@ </table> </div> -<? print_footer( __FILE__ ) ?> -<? print_bottom_page( $g_bottom_page_inc ) ?> -<? print_body_bottom() ?> -<? print_html_bottom() ?> \ No newline at end of file +<?php + print_footer( __FILE__ ); + print_bottom_page( $g_bottom_page_inc ); + print_body_bottom(); + print_html_bottom(); +?> \ No newline at end of file |