|
From: Jon O. <jon...@us...> - 2006-07-04 18:02:14
|
Update of /cvsroot/mxbb/mx_pafiledb/admin In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv24281/modules/mx_pafiledb/admin Modified Files: admin_pa_category.php Log Message: adding a simple style mode, in sync with mx_linkdb templtes Index: admin_pa_category.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/admin/admin_pa_category.php,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** admin_pa_category.php 17 Jun 2006 20:13:21 -0000 1.17 --- admin_pa_category.php 4 Jul 2006 18:02:11 -0000 1.18 *************** *** 93,114 **** if ( $mode == 'do_add' && !$cat_id ) { ! $cat_id = $pafiledb->update_add_cat(); $mode = 'add'; if ( !sizeof( $pafiledb->error ) ) { $pafiledb->_pafiledb(); ! $message = $lang['Catadded'] . '<br /><br />' . sprintf( $lang['Click_return'], '<a href="' . append_sid( "admin_pa_category.$phpEx" ) . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Click_edit_permissions'], '<a href="' . append_sid( "admin_pa_catauth.$phpEx?cat_id=$cat_id" ) . '">', '</a>' ); mx_message_die( GENERAL_MESSAGE, $message ); } } elseif ( $mode == 'do_add' && $cat_id ) { ! $cat_id = $pafiledb->update_add_cat( $cat_id ); if ( !sizeof( $pafiledb->error ) ) { $pafiledb->_pafiledb(); ! $message = $lang['Catedited'] . '<br /><br />' . sprintf( $lang['Click_return'], '<a href="' . append_sid( "admin_pa_category.$phpEx" ) . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Click_edit_permissions'], '<a href="' . append_sid( "admin_pa_catauth.$phpEx?cat_id=$cat_id" ) . '">', '</a>' ); mx_message_die( GENERAL_MESSAGE, $message ); } } elseif ( $mode == 'do_delete' ) --- 93,116 ---- if ( $mode == 'do_add' && !$cat_id ) { ! $new_cat_id = $pafiledb->update_add_cat(); $mode = 'add'; if ( !sizeof( $pafiledb->error ) ) { $pafiledb->_pafiledb(); ! $message = $lang['Catadded'] . '<br /><br />' . sprintf( $lang['Click_return'], '<a href="' . append_sid( "admin_pa_category.$phpEx" ) . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Click_edit_permissions'], '<a href="' . append_sid( "admin_pa_catauth.$phpEx?cat_id=$new_cat_id" ) . '">', '</a>' ); mx_message_die( GENERAL_MESSAGE, $message ); } + $mode = 'add'; } elseif ( $mode == 'do_add' && $cat_id ) { ! $new_cat_id = $pafiledb->update_add_cat( $cat_id ); if ( !sizeof( $pafiledb->error ) ) { $pafiledb->_pafiledb(); ! $message = $lang['Catedited'] . '<br /><br />' . sprintf( $lang['Click_return'], '<a href="' . append_sid( "admin_pa_category.$phpEx" ) . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Click_edit_permissions'], '<a href="' . append_sid( "admin_pa_catauth.$phpEx?cat_id=$new_cat_id" ) . '">', '</a>' ); mx_message_die( GENERAL_MESSAGE, $message ); } + $mode = 'edit'; } elseif ( $mode == 'do_delete' ) *************** *** 169,172 **** --- 171,176 ---- $pafiledb_template->set_filenames( array( 'admin' => $template_file ) ); + if ( sizeof( $pafiledb->error ) ) $pafiledb_template->assign_block_vars( 'pafiledb_error', array() ); + $pafiledb_template->assign_vars( array( 'L_CAT_TITLE' => $l_title, *************** *** 204,208 **** } ! $cat_list .= ( !$_POST['cat_parent'] ) ? $pafiledb->generate_jumpbox() : $pafiledb-generate_jumpboxn( 0, 0, array( $_POST['cat_parent'] => 1 ) ); $checked_yes = ( $_POST['cat_allow_file'] ) ? ' checked' : ''; $checked_no = ( !$_POST['cat_allow_file'] ) ? ' checked' : ''; --- 208,212 ---- } ! $cat_list .= ( !$_POST['cat_parent'] ) ? $pafiledb->generate_jumpbox() : $pafiledb->generate_jumpbox( 0, 0, array( $_POST['cat_parent'] => 1 ) ); $checked_yes = ( $_POST['cat_allow_file'] ) ? ' checked' : ''; $checked_no = ( !$_POST['cat_allow_file'] ) ? ' checked' : ''; |