Update of /cvsroot/mxbb/mx_pafiledb/pafiledb/includes In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv23199/includes Modified Files: functions.php functions_admin.php functions_comment.php functions_field.php functions_mx.php functions_pafiledb.php Log Message: for 2.9.x Index: functions.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/pafiledb/includes/functions.php,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** functions.php 6 Aug 2007 21:14:10 -0000 1.38 --- functions.php 9 Sep 2007 20:16:17 -0000 1.39 *************** *** 94,100 **** function generate_smilies( $mode, $page_id ) { ! global $db, $board_config, $pafiledb_template, $lang, $images, $theme, $phpEx, $phpbb_root_path; global $user_ip, $session_length, $starttime; ! global $userdata; global $mx_root_path, $module_root_path, $is_block, $phpEx; --- 94,100 ---- function generate_smilies( $mode, $page_id ) { ! global $db, $board_config, $template, $lang, $images, $theme, $phpEx, $phpbb_root_path; global $user_ip, $session_length, $starttime; ! global $userdata, $mx_user; global $mx_root_path, $module_root_path, $is_block, $phpEx; *************** *** 105,110 **** --- 105,113 ---- if ( $mode == 'window' ) { + /* $userdata = session_pagestart( $user_ip, $page_id ); init_userprefs( $userdata ); + */ + $mx_user->init($user_ip, PAGE_INDEX); $gen_simple_header = true; *************** *** 114,118 **** include( $mx_root_path . 'includes/page_header.' . $phpEx ); ! $pafiledb_template->set_filenames( array( 'smiliesbody' => 'posting_smilies.tpl' ) ); } --- 117,121 ---- include( $mx_root_path . 'includes/page_header.' . $phpEx ); ! $template->set_filenames( array( 'smiliesbody' => 'posting_smilies.tpl' ) ); } *************** *** 147,154 **** if ( !$col ) { ! $pafiledb_template->assign_block_vars( 'smilies_row', array() ); } ! $pafiledb_template->assign_block_vars( 'smilies_row.smilies_col', array( 'SMILEY_CODE' => $data['code'], 'SMILEY_IMG' => $phpbb_root_path . $board_config['smilies_path'] . '/' . $smile_url, --- 150,157 ---- if ( !$col ) { ! $template->assign_block_vars( 'smilies_row', array() ); } ! $template->assign_block_vars( 'smilies_row.smilies_col', array( 'SMILEY_CODE' => $data['code'], 'SMILEY_IMG' => $phpbb_root_path . $board_config['smilies_path'] . '/' . $smile_url, *************** *** 175,187 **** if ( $mode == 'inline' && $num_smilies > $inline_rows * $inline_columns ) { ! $pafiledb_template->assign_block_vars( 'switch_smilies_extra', array() ); ! $pafiledb_template->assign_vars( array( 'L_MORE_SMILIES' => $lang['More_emoticons'], ! 'U_MORE_SMILIES' => append_sid( $phpbb_root_path . "posting.$phpEx?mode=smilies" ) )); } ! $pafiledb_template->assign_vars( array( 'L_EMOTICONS' => $lang['Emoticons'], 'L_CLOSE_WINDOW' => $lang['Close_window'], --- 178,190 ---- if ( $mode == 'inline' && $num_smilies > $inline_rows * $inline_columns ) { ! $template->assign_block_vars( 'switch_smilies_extra', array() ); ! $template->assign_vars( array( 'L_MORE_SMILIES' => $lang['More_emoticons'], ! 'U_MORE_SMILIES' => mx_append_sid( $phpbb_root_path . "posting.$phpEx?mode=smilies" ) )); } ! $template->assign_vars( array( 'L_EMOTICONS' => $lang['Emoticons'], 'L_CLOSE_WINDOW' => $lang['Close_window'], *************** *** 193,197 **** if ( $mode == 'window' ) { ! $pafiledb_template->display( 'smiliesbody' ); include( $mx_root_path . 'includes/page_tail.' . $phpEx ); } --- 196,200 ---- if ( $mode == 'window' ) { ! $template->pparse( 'smiliesbody' ); include( $mx_root_path . 'includes/page_tail.' . $phpEx ); } *************** *** 248,252 **** function page_header( $page_title ) { ! global $pafiledb_config, $lang, $pafiledb_template, $userdata, $images, $action, $pafiledb; global $template, $db, $theme, $gen_simple_header, $starttime, $phpEx, $board_config, $user_ip, $phpbb_root_path; global $admin_level, $level_prior, $tree, $do_gzip_compress; --- 251,255 ---- function page_header( $page_title ) { ! global $pafiledb_config, $lang, $template, $userdata, $images, $action, $pafiledb; global $template, $db, $theme, $gen_simple_header, $starttime, $phpEx, $board_config, $user_ip, $phpbb_root_path; global $admin_level, $level_prior, $tree, $do_gzip_compress; *************** *** 260,265 **** if ( $action == 'category' ) { ! $upload_url = append_sid( $pafiledb->this_mxurl( "action=user_upload&cat_id={$_REQUEST['cat_id']}" ) ); ! $mcp_url = append_sid( $pafiledb->this_mxurl( "action=mcp&cat_id={$_REQUEST['cat_id']}" ) ); $upload_auth = $pafiledb->modules[$pafiledb->module_name]->auth_user[$_REQUEST['cat_id']]['auth_upload']; --- 263,268 ---- if ( $action == 'category' ) { ! $upload_url = mx_append_sid( $pafiledb->this_mxurl( "action=user_upload&cat_id={$_REQUEST['cat_id']}" ) ); ! $mcp_url = mx_append_sid( $pafiledb->this_mxurl( "action=mcp&cat_id={$_REQUEST['cat_id']}" ) ); $upload_auth = $pafiledb->modules[$pafiledb->module_name]->auth_user[$_REQUEST['cat_id']]['auth_upload']; *************** *** 268,272 **** else { ! $upload_url = append_sid( $pafiledb->this_mxurl( "action=user_upload" ) ); $cat_list = $pafiledb->modules[$pafiledb->module_name]->generate_jumpbox( 0, 0, '', true, true ); --- 271,275 ---- else { ! $upload_url = mx_append_sid( $pafiledb->this_mxurl( "action=user_upload" ) ); $cat_list = $pafiledb->modules[$pafiledb->module_name]->generate_jumpbox( 0, 0, '', true, true ); *************** *** 277,281 **** } ! $pafiledb_template->assign_vars( array( 'L_TITLE' => $title, 'IS_AUTH_VIEWALL' => ( $pafiledb_config['settings_viewall'] ) ? ( ( $pafiledb->modules[$pafiledb->module_name]->auth_global['auth_viewall'] ) ? true : false ) : false, 'IS_AUTH_SEARCH' => ( $pafiledb->modules[$pafiledb->module_name]->auth_global['auth_search'] ) ? true : false, --- 280,284 ---- } ! $template->assign_vars( array( 'L_TITLE' => $title, 'IS_AUTH_VIEWALL' => ( $pafiledb_config['settings_viewall'] ) ? ( ( $pafiledb->modules[$pafiledb->module_name]->auth_global['auth_viewall'] ) ? true : false ) : false, 'IS_AUTH_SEARCH' => ( $pafiledb->modules[$pafiledb->module_name]->auth_global['auth_search'] ) ? true : false, *************** *** 303,311 **** 'VIEW_ALL_IMG' => $images['pa_viewall'], ! 'U_TOPLIST' => append_sid( $pafiledb->this_mxurl( "action=toplist" ) ), ! 'U_PASEARCH' => append_sid( $pafiledb->this_mxurl( "action=search" ) ), 'U_UPLOAD' => $upload_url, ! 'U_VIEW_ALL' => append_sid( $pafiledb->this_mxurl( "action=viewall" ) ), ! 'U_PASTATS' => append_sid( $pafiledb->this_mxurl( "action=stats" ) ), 'MX_ROOT_PATH' => $mx_root_path, --- 306,314 ---- 'VIEW_ALL_IMG' => $images['pa_viewall'], ! 'U_TOPLIST' => mx_append_sid( $pafiledb->this_mxurl( "action=toplist" ) ), ! 'U_PASEARCH' => mx_append_sid( $pafiledb->this_mxurl( "action=search" ) ), 'U_UPLOAD' => $upload_url, ! 'U_VIEW_ALL' => mx_append_sid( $pafiledb->this_mxurl( "action=viewall" ) ), ! 'U_PASTATS' => mx_append_sid( $pafiledb->this_mxurl( "action=stats" ) ), 'MX_ROOT_PATH' => $mx_root_path, *************** *** 321,335 **** function page_footer() { ! global $pafiledb_cache, $lang, $pafiledb_template, $board_config, $pafiledb, $userdata, $phpbb_root_path; global $phpEx, $template, $do_gzip_compress, $debug, $db, $starttime; global $mx_root_path, $module_root_path, $is_block, $phpEx, $page_id; global $pa_module_version, $pa_module_orig_author, $pa_module_author; ! $pafiledb_template->assign_vars( array( 'L_QUICK_GO' => $lang['Quick_go'], 'L_QUICK_NAV' => $lang['Quick_nav'], 'L_QUICK_JUMP' => $lang['Quick_jump'], 'JUMPMENU' => $pafiledb->modules[$pafiledb->module_name]->generate_jumpbox( 0, 0, array( $_GET['cat_id'] => 1 ) ), ! 'S_JUMPBOX_ACTION' => append_sid( $pafiledb->this_mxurl( ) ), 'S_AUTH_LIST' => $pafiledb->modules[$pafiledb->module_name]->auth_can_list, --- 324,338 ---- function page_footer() { ! global $pafiledb_cache, $lang, $template, $board_config, $pafiledb, $userdata, $phpbb_root_path; global $phpEx, $template, $do_gzip_compress, $debug, $db, $starttime; global $mx_root_path, $module_root_path, $is_block, $phpEx, $page_id; global $pa_module_version, $pa_module_orig_author, $pa_module_author; ! $template->assign_vars( array( 'L_QUICK_GO' => $lang['Quick_go'], 'L_QUICK_NAV' => $lang['Quick_nav'], 'L_QUICK_JUMP' => $lang['Quick_jump'], 'JUMPMENU' => $pafiledb->modules[$pafiledb->module_name]->generate_jumpbox( 0, 0, array( $_GET['cat_id'] => 1 ) ), ! 'S_JUMPBOX_ACTION' => mx_append_sid( $pafiledb->this_mxurl( ) ), 'S_AUTH_LIST' => $pafiledb->modules[$pafiledb->module_name]->auth_can_list, *************** *** 346,355 **** if ( !MXBB_MODULE || MXBB_27x ) { ! $pafiledb_template->assign_block_vars( 'copy_footer', array() ); } if ( !isset( $_GET['explain'] ) ) { ! $pafiledb_template->display( 'body' ); } --- 349,358 ---- if ( !MXBB_MODULE || MXBB_27x ) { ! $template->assign_block_vars( 'copy_footer', array() ); } if ( !isset( $_GET['explain'] ) ) { ! $template->pparse( 'body' ); } *************** *** 1363,1367 **** function add_comment( $file_id ) { ! global $pafiledb_template; if ( $this->field_data_exist() ) { --- 1366,1370 ---- function add_comment( $file_id ) { ! global $template; if ( $this->field_data_exist() ) { *************** *** 1423,1427 **** function display_data( $file_id ) { ! global $pafiledb_template; if ( $this->field_data_exist() ) { --- 1426,1430 ---- function display_data( $file_id ) { ! global $template; if ( $this->field_data_exist() ) { *************** *** 1446,1450 **** } ! $pafiledb_template->assign_block_vars( 'custom_field', array( 'CUSTOM_NAME' => $this->field_rowset[$field_id]['custom_name'], 'DATA' => $field_data ) --- 1449,1453 ---- } ! $template->assign_block_vars( 'custom_field', array( 'CUSTOM_NAME' => $this->field_rowset[$field_id]['custom_name'], 'DATA' => $field_data ) *************** *** 1527,1534 **** function display_edit_input( $file_id, $field_id, $field_data ) { ! global $pafiledb_template; $field_value_temp = (!empty( $this->field_data_rowset[$file_id][$field_id]['data'] )) ? $this->field_data_rowset[$file_id][$field_id]['data'] : ''; $field_value = !empty( $_POST['field'][$field_data['custom_id']] ) ? $_POST['field'][$field_data['custom_id']] : $field_value_temp ; ! $pafiledb_template->assign_block_vars( 'input', array( 'FIELD_NAME' => $field_data['custom_name'], 'FIELD_ID' => $field_data['custom_id'], --- 1530,1537 ---- function display_edit_input( $file_id, $field_id, $field_data ) { ! global $template; $field_value_temp = (!empty( $this->field_data_rowset[$file_id][$field_id]['data'] )) ? $this->field_data_rowset[$file_id][$field_id]['data'] : ''; $field_value = !empty( $_POST['field'][$field_data['custom_id']] ) ? $_POST['field'][$field_data['custom_id']] : $field_value_temp ; ! $template->assign_block_vars( 'input', array( 'FIELD_NAME' => $field_data['custom_name'], 'FIELD_ID' => $field_data['custom_id'], *************** *** 1547,1554 **** function display_edit_textarea( $file_id, $field_id, $field_data ) { ! global $pafiledb_template; $field_value_temp = ( !empty( $this->field_data_rowset[$file_id][$field_id]['data'] ) ) ? $this->field_data_rowset[$file_id][$field_id]['data'] : ''; $field_value = !empty( $_POST['field'][$field_data['custom_id']] ) ? $_POST['field'][$field_data['custom_id']] : $field_value_temp ; ! $pafiledb_template->assign_block_vars( 'textarea', array( 'FIELD_NAME' => $field_data['custom_name'], 'FIELD_ID' => $field_data['custom_id'], --- 1550,1557 ---- function display_edit_textarea( $file_id, $field_id, $field_data ) { ! global $template; $field_value_temp = ( !empty( $this->field_data_rowset[$file_id][$field_id]['data'] ) ) ? $this->field_data_rowset[$file_id][$field_id]['data'] : ''; $field_value = !empty( $_POST['field'][$field_data['custom_id']] ) ? $_POST['field'][$field_data['custom_id']] : $field_value_temp ; ! $template->assign_block_vars( 'textarea', array( 'FIELD_NAME' => $field_data['custom_name'], 'FIELD_ID' => $field_data['custom_id'], *************** *** 1567,1572 **** function display_edit_radio( $file_id, $field_id, $field_data ) { ! global $pafiledb_template; ! $pafiledb_template->assign_block_vars( 'radio', array( 'FIELD_NAME' => $field_data['custom_name'], 'FIELD_ID' => $field_data['custom_id'], --- 1570,1575 ---- function display_edit_radio( $file_id, $field_id, $field_data ) { ! global $template; ! $template->assign_block_vars( 'radio', array( 'FIELD_NAME' => $field_data['custom_name'], 'FIELD_ID' => $field_data['custom_id'], *************** *** 1582,1586 **** foreach( $field_datas as $key => $value ) { ! $pafiledb_template->assign_block_vars( 'radio.row', array( 'FIELD_VALUE' => $value, 'FIELD_SELECTED' => ( $data == $value ) ? ' checked="checked"' : '' ) --- 1585,1589 ---- foreach( $field_datas as $key => $value ) { ! $template->assign_block_vars( 'radio.row', array( 'FIELD_VALUE' => $value, 'FIELD_SELECTED' => ( $data == $value ) ? ' checked="checked"' : '' ) *************** *** 1599,1604 **** function display_edit_select( $file_id, $field_id, $field_data ) { ! global $pafiledb_template; ! $pafiledb_template->assign_block_vars( 'select', array( 'FIELD_NAME' => $field_data['custom_name'], 'FIELD_ID' => $field_data['custom_id'], --- 1602,1607 ---- function display_edit_select( $file_id, $field_id, $field_data ) { ! global $template; ! $template->assign_block_vars( 'select', array( 'FIELD_NAME' => $field_data['custom_name'], 'FIELD_ID' => $field_data['custom_id'], *************** *** 1614,1618 **** foreach( $field_datas as $key => $value ) { ! $pafiledb_template->assign_block_vars( 'select.row', array( 'FIELD_VALUE' => $value, 'FIELD_SELECTED' => ( $data == $value ) ? ' selected="selected"' : '' ) --- 1617,1621 ---- foreach( $field_datas as $key => $value ) { ! $template->assign_block_vars( 'select.row', array( 'FIELD_VALUE' => $value, 'FIELD_SELECTED' => ( $data == $value ) ? ' selected="selected"' : '' ) *************** *** 1631,1636 **** function display_edit_select_multiple( $file_id, $field_id, $field_data ) { ! global $pafiledb_template; ! $pafiledb_template->assign_block_vars( 'select_multiple', array( 'FIELD_NAME' => $field_data['custom_name'], 'FIELD_ID' => $field_data['custom_id'], --- 1634,1639 ---- function display_edit_select_multiple( $file_id, $field_id, $field_data ) { ! global $template; ! $template->assign_block_vars( 'select_multiple', array( 'FIELD_NAME' => $field_data['custom_name'], 'FIELD_ID' => $field_data['custom_id'], *************** *** 1655,1659 **** } } ! $pafiledb_template->assign_block_vars( 'select_multiple.row', array( 'FIELD_VALUE' => $value, 'FIELD_SELECTED' => $selected ) --- 1658,1662 ---- } } ! $template->assign_block_vars( 'select_multiple.row', array( 'FIELD_VALUE' => $value, 'FIELD_SELECTED' => $selected ) *************** *** 1672,1677 **** function display_edit_checkbox( $file_id, $field_id, $field_data ) { ! global $pafiledb_template; ! $pafiledb_template->assign_block_vars( 'checkbox', array( 'FIELD_NAME' => $field_data['custom_name'], 'FIELD_ID' => $field_data['custom_id'], --- 1675,1680 ---- function display_edit_checkbox( $file_id, $field_id, $field_data ) { ! global $template; ! $template->assign_block_vars( 'checkbox', array( 'FIELD_NAME' => $field_data['custom_name'], 'FIELD_ID' => $field_data['custom_id'], *************** *** 1696,1700 **** } } ! $pafiledb_template->assign_block_vars( 'checkbox.row', array( 'FIELD_VALUE' => $value, 'FIELD_CHECKED' => $checked ) --- 1699,1703 ---- } } ! $template->assign_block_vars( 'checkbox.row', array( 'FIELD_VALUE' => $value, 'FIELD_CHECKED' => $checked ) Index: functions_admin.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/pafiledb/includes/functions_admin.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** functions_admin.php 1 Aug 2006 21:03:24 -0000 1.7 --- functions_admin.php 9 Sep 2007 20:16:17 -0000 1.8 *************** *** 45,49 **** function admin_display_cat_auth( $cat_parent = 0, $depth = 0 ) { ! global $lang, $phpbb_root_path, $pafiledb_template, $phpEx; global $cat_auth_fields, $cat_auth_const, $cat_auth_levels; global $cat_auth_approval_fields, $cat_auth_approval_const, $cat_auth_approval_levels; --- 45,49 ---- function admin_display_cat_auth( $cat_parent = 0, $depth = 0 ) { ! global $lang, $phpbb_root_path, $template, $phpEx; global $cat_auth_fields, $cat_auth_const, $cat_auth_levels; global $cat_auth_approval_fields, $cat_auth_approval_const, $cat_auth_approval_levels; *************** *** 54,62 **** foreach( $this->subcat_rowset[$cat_parent] as $sub_cat_id => $cat_data ) { ! $pafiledb_template->assign_block_vars( 'cat_row', array( 'CATEGORY_NAME' => $cat_data['cat_name'], 'IS_HIGHER_CAT' => ( $cat_data['cat_allow_file'] ) ? false : true, 'PRE' => $pre, ! 'U_CAT' => append_sid( "admin_pafiledb.$phpEx?action=catauth_manage&cat_parent=$sub_cat_id" ) )); --- 54,62 ---- foreach( $this->subcat_rowset[$cat_parent] as $sub_cat_id => $cat_data ) { ! $template->assign_block_vars( 'cat_row', array( 'CATEGORY_NAME' => $cat_data['cat_name'], 'IS_HIGHER_CAT' => ( $cat_data['cat_allow_file'] ) ? false : true, 'PRE' => $pre, ! 'U_CAT' => mx_append_sid( "admin_pafiledb.$phpEx?action=catauth_manage&cat_parent=$sub_cat_id" ) )); *************** *** 72,76 **** $custom_auth[$j] .= '</select> '; ! $pafiledb_template->assign_block_vars( 'cat_row.cat_auth_data', array( 'S_AUTH_LEVELS_SELECT' => $custom_auth[$j] ) ); } --- 72,76 ---- $custom_auth[$j] .= '</select> '; ! $template->assign_block_vars( 'cat_row.cat_auth_data', array( 'S_AUTH_LEVELS_SELECT' => $custom_auth[$j] ) ); } *************** *** 86,90 **** $custom_auth_approval[$j] .= '</select> '; ! $pafiledb_template->assign_block_vars( 'cat_row.cat_auth_data', array( 'S_AUTH_LEVELS_SELECT' => $custom_auth_approval[$j] ) ); } --- 86,90 ---- $custom_auth_approval[$j] .= '</select> '; ! $template->assign_block_vars( 'cat_row.cat_auth_data', array( 'S_AUTH_LEVELS_SELECT' => $custom_auth_approval[$j] ) ); } *************** *** 98,102 **** function admin_display_cat_auth_ug( $cat_parent = 0, $depth = 0 ) { ! global $phpbb_root_path, $pafiledb_template, $phpEx; global $cat_auth_fields, $cat_auth_const, $cat_auth_levels, $optionlist_mod, $optionlist_acl_adv; --- 98,102 ---- function admin_display_cat_auth_ug( $cat_parent = 0, $depth = 0 ) { ! global $phpbb_root_path, $template, $phpEx; global $cat_auth_fields, $cat_auth_const, $cat_auth_levels, $optionlist_mod, $optionlist_acl_adv; *************** *** 106,114 **** foreach( $this->subcat_rowset[$cat_parent] as $sub_cat_id => $cat_data ) { ! $pafiledb_template->assign_block_vars( 'cat_row', array( 'CAT_NAME' => $cat_data['cat_name'], 'IS_HIGHER_CAT' => ( $cat_data['cat_allow_file'] ) ? false : true, 'PRE' => $pre, ! 'U_CAT' => append_sid( "admin_pafiledb.$phpEx?action=catauth&cat_id=$sub_cat_id" ), 'S_MOD_SELECT' => $optionlist_mod[$sub_cat_id] )); --- 106,114 ---- foreach( $this->subcat_rowset[$cat_parent] as $sub_cat_id => $cat_data ) { ! $template->assign_block_vars( 'cat_row', array( 'CAT_NAME' => $cat_data['cat_name'], 'IS_HIGHER_CAT' => ( $cat_data['cat_allow_file'] ) ? false : true, 'PRE' => $pre, ! 'U_CAT' => mx_append_sid( "admin_pafiledb.$phpEx?action=catauth&cat_id=$sub_cat_id" ), 'S_MOD_SELECT' => $optionlist_mod[$sub_cat_id] )); *************** *** 116,120 **** for( $j = 0; $j < count( $cat_auth_fields ); $j++ ) { ! $pafiledb_template->assign_block_vars( 'cat_row.aclvalues', array( 'S_ACL_SELECT' => $optionlist_acl_adv[$sub_cat_id][$j] ) ); } $this->admin_display_cat_auth_ug( $sub_cat_id, $depth + 1 ); --- 116,120 ---- for( $j = 0; $j < count( $cat_auth_fields ); $j++ ) { ! $template->assign_block_vars( 'cat_row.aclvalues', array( 'S_ACL_SELECT' => $optionlist_acl_adv[$sub_cat_id][$j] ) ); } $this->admin_display_cat_auth_ug( $sub_cat_id, $depth + 1 ); *************** *** 127,131 **** function admin_cat_main( $cat_parent = 0, $depth = 0 ) { ! global $phpbb_root_path, $pafiledb_template, $phpEx; $pre = str_repeat( ' ', $depth ); --- 127,131 ---- function admin_cat_main( $cat_parent = 0, $depth = 0 ) { ! global $phpbb_root_path, $template, $phpEx; $pre = str_repeat( ' ', $depth ); *************** *** 134,145 **** foreach( $this->subcat_rowset[$cat_parent] as $subcat_id => $cat_data ) { ! $pafiledb_template->assign_block_vars( 'cat_row', array( 'IS_HIGHER_CAT' => ( $cat_data['cat_allow_file'] == PA_CAT_ALLOW_FILE ) ? false : true, ! 'U_CAT' => append_sid( "admin_pafiledb.$phpEx?action=cat_manage&cat_id=$subcat_id" ), ! 'U_CAT_EDIT' => append_sid( "admin_pafiledb.$phpEx?action=cat_manage&mode=edit&cat_id=$subcat_id" ), ! 'U_CAT_DELETE' => append_sid( "admin_pafiledb.$phpEx?action=cat_manage&mode=delete&cat_id=$subcat_id" ), ! 'U_CAT_MOVE_UP' => append_sid( "admin_pafiledb.$phpEx?action=cat_manage&mode=cat_order&move=-15&cat_id_other=$subcat_id" ), ! 'U_CAT_MOVE_DOWN' => append_sid( "admin_pafiledb.$phpEx?action=cat_manage&mode=cat_order&move=15&cat_id_other=$subcat_id" ), ! 'U_CAT_RESYNC' => append_sid( "admin_pafiledb.$phpEx?action=cat_manage&mode=sync&cat_id_other=$subcat_id" ), 'CAT_NAME' => $cat_data['cat_name'], 'PRE' => $pre --- 134,145 ---- foreach( $this->subcat_rowset[$cat_parent] as $subcat_id => $cat_data ) { ! $template->assign_block_vars( 'cat_row', array( 'IS_HIGHER_CAT' => ( $cat_data['cat_allow_file'] == PA_CAT_ALLOW_FILE ) ? false : true, ! 'U_CAT' => mx_append_sid( "admin_pafiledb.$phpEx?action=cat_manage&cat_id=$subcat_id" ), ! 'U_CAT_EDIT' => mx_append_sid( "admin_pafiledb.$phpEx?action=cat_manage&mode=edit&cat_id=$subcat_id" ), ! 'U_CAT_DELETE' => mx_append_sid( "admin_pafiledb.$phpEx?action=cat_manage&mode=delete&cat_id=$subcat_id" ), ! 'U_CAT_MOVE_UP' => mx_append_sid( "admin_pafiledb.$phpEx?action=cat_manage&mode=cat_order&move=-15&cat_id_other=$subcat_id" ), ! 'U_CAT_MOVE_DOWN' => mx_append_sid( "admin_pafiledb.$phpEx?action=cat_manage&mode=cat_order&move=15&cat_id_other=$subcat_id" ), ! 'U_CAT_RESYNC' => mx_append_sid( "admin_pafiledb.$phpEx?action=cat_manage&mode=sync&cat_id_other=$subcat_id" ), 'CAT_NAME' => $cat_data['cat_name'], 'PRE' => $pre Index: functions_mx.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/pafiledb/includes/functions_mx.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** functions_mx.php 7 Jun 2006 20:29:52 -0000 1.7 --- functions_mx.php 9 Sep 2007 20:16:18 -0000 1.8 *************** *** 49,53 **** $board_config['smilies_path'] = $smilies_path; $template->assign_vars(array( ! 'U_MORE_SMILIES' => append_sid(PHPBB_URL . "posting.$phpEx?mode=smilies")) ); } --- 49,53 ---- $board_config['smilies_path'] = $smilies_path; $template->assign_vars(array( ! 'U_MORE_SMILIES' => mx_append_sid(PHPBB_URL . "posting.$phpEx?mode=smilies")) ); } Index: functions_comment.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/pafiledb/includes/functions_comment.php,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** functions_comment.php 12 Jul 2007 22:51:22 -0000 1.25 --- functions_comment.php 9 Sep 2007 20:16:17 -0000 1.26 *************** *** 18,55 **** * */ ! class pafiledb_comments { - // - // Comments - // - var $cid = ''; // comment id - var $comments_type = ''; // internal or phpbb - [...1307 lines suppressed...] - break; - - case 'insert': - $return_data = $this->insert_phpbb_post( $title, $comments_text, $this->forum_id, $user_id, $username, $user_attach_sig, $this->topic_id, '', $title_first, $comments_text_first, $comment_bbcode_uid ); - break; - - case 'update': - $return_data = $this->insert_phpbb_post( $title, $comments_text, $this->forum_id, $user_id, $username, $user_attach_sig, $this->topic_id, $cid, $title_first, $comments_text_first, $comment_bbcode_uid ); - break; - - default: - mx_message_die(GENERAL_ERROR, 'bad post mode'); - } - - return $return_data; - } } ?> \ No newline at end of file --- 147,150 ---- Index: functions_field.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/pafiledb/includes/functions_field.php,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** functions_field.php 1 Aug 2006 21:03:24 -0000 1.9 --- functions_field.php 9 Sep 2007 20:16:18 -0000 1.10 *************** *** 104,108 **** function add_comment( $file_id ) { ! global $pafiledb_template; if ( $this->field_data_exist() ) { --- 104,108 ---- function add_comment( $file_id ) { ! global $template; if ( $this->field_data_exist() ) { *************** *** 164,168 **** function display_data( $file_id ) { ! global $pafiledb_template; if ( $this->field_data_exist() ) { --- 164,168 ---- function display_data( $file_id ) { ! global $template; if ( $this->field_data_exist() ) { *************** *** 187,191 **** } ! $pafiledb_template->assign_block_vars( 'custom_field', array( 'CUSTOM_NAME' => $this->field_rowset[$field_id]['custom_name'], 'DATA' => $field_data ) --- 187,191 ---- } ! $template->assign_block_vars( 'custom_field', array( 'CUSTOM_NAME' => $this->field_rowset[$field_id]['custom_name'], 'DATA' => $field_data ) *************** *** 268,275 **** function display_edit_input( $file_id, $field_id, $field_data ) { ! global $pafiledb_template; $field_value_temp = (!empty( $this->field_data_rowset[$file_id][$field_id]['data'] )) ? $this->field_data_rowset[$file_id][$field_id]['data'] : ''; $field_value = !empty( $_POST['field'][$field_data['custom_id']] ) ? $_POST['field'][$field_data['custom_id']] : $field_value_temp ; ! $pafiledb_template->assign_block_vars( 'input', array( 'FIELD_NAME' => $field_data['custom_name'], 'FIELD_ID' => $field_data['custom_id'], --- 268,275 ---- function display_edit_input( $file_id, $field_id, $field_data ) { ! global $template; $field_value_temp = (!empty( $this->field_data_rowset[$file_id][$field_id]['data'] )) ? $this->field_data_rowset[$file_id][$field_id]['data'] : ''; $field_value = !empty( $_POST['field'][$field_data['custom_id']] ) ? $_POST['field'][$field_data['custom_id']] : $field_value_temp ; ! $template->assign_block_vars( 'input', array( 'FIELD_NAME' => $field_data['custom_name'], 'FIELD_ID' => $field_data['custom_id'], *************** *** 288,295 **** function display_edit_textarea( $file_id, $field_id, $field_data ) { ! global $pafiledb_template; $field_value_temp = ( !empty( $this->field_data_rowset[$file_id][$field_id]['data'] ) ) ? $this->field_data_rowset[$file_id][$field_id]['data'] : ''; $field_value = !empty( $_POST['field'][$field_data['custom_id']] ) ? $_POST['field'][$field_data['custom_id']] : $field_value_temp ; ! $pafiledb_template->assign_block_vars( 'textarea', array( 'FIELD_NAME' => $field_data['custom_name'], 'FIELD_ID' => $field_data['custom_id'], --- 288,295 ---- function display_edit_textarea( $file_id, $field_id, $field_data ) { ! global $template; $field_value_temp = ( !empty( $this->field_data_rowset[$file_id][$field_id]['data'] ) ) ? $this->field_data_rowset[$file_id][$field_id]['data'] : ''; $field_value = !empty( $_POST['field'][$field_data['custom_id']] ) ? $_POST['field'][$field_data['custom_id']] : $field_value_temp ; ! $template->assign_block_vars( 'textarea', array( 'FIELD_NAME' => $field_data['custom_name'], 'FIELD_ID' => $field_data['custom_id'], *************** *** 308,313 **** function display_edit_radio( $file_id, $field_id, $field_data ) { ! global $pafiledb_template; ! $pafiledb_template->assign_block_vars( 'radio', array( 'FIELD_NAME' => $field_data['custom_name'], 'FIELD_ID' => $field_data['custom_id'], --- 308,313 ---- function display_edit_radio( $file_id, $field_id, $field_data ) { ! global $template; ! $template->assign_block_vars( 'radio', array( 'FIELD_NAME' => $field_data['custom_name'], 'FIELD_ID' => $field_data['custom_id'], *************** *** 323,327 **** foreach( $field_datas as $key => $value ) { ! $pafiledb_template->assign_block_vars( 'radio.row', array( 'FIELD_VALUE' => $value, 'FIELD_SELECTED' => ( $data == $value ) ? ' checked="checked"' : '' ) --- 323,327 ---- foreach( $field_datas as $key => $value ) { ! $template->assign_block_vars( 'radio.row', array( 'FIELD_VALUE' => $value, 'FIELD_SELECTED' => ( $data == $value ) ? ' checked="checked"' : '' ) *************** *** 340,345 **** function display_edit_select( $file_id, $field_id, $field_data ) { ! global $pafiledb_template; ! $pafiledb_template->assign_block_vars( 'select', array( 'FIELD_NAME' => $field_data['custom_name'], 'FIELD_ID' => $field_data['custom_id'], --- 340,345 ---- function display_edit_select( $file_id, $field_id, $field_data ) { ! global $template; ! $template->assign_block_vars( 'select', array( 'FIELD_NAME' => $field_data['custom_name'], 'FIELD_ID' => $field_data['custom_id'], *************** *** 355,359 **** foreach( $field_datas as $key => $value ) { ! $pafiledb_template->assign_block_vars( 'select.row', array( 'FIELD_VALUE' => $value, 'FIELD_SELECTED' => ( $data == $value ) ? ' selected="selected"' : '' ) --- 355,359 ---- foreach( $field_datas as $key => $value ) { ! $template->assign_block_vars( 'select.row', array( 'FIELD_VALUE' => $value, 'FIELD_SELECTED' => ( $data == $value ) ? ' selected="selected"' : '' ) *************** *** 372,377 **** function display_edit_select_multiple( $file_id, $field_id, $field_data ) { ! global $pafiledb_template; ! $pafiledb_template->assign_block_vars( 'select_multiple', array( 'FIELD_NAME' => $field_data['custom_name'], 'FIELD_ID' => $field_data['custom_id'], --- 372,377 ---- function display_edit_select_multiple( $file_id, $field_id, $field_data ) { ! global $template; ! $template->assign_block_vars( 'select_multiple', array( 'FIELD_NAME' => $field_data['custom_name'], 'FIELD_ID' => $field_data['custom_id'], *************** *** 396,400 **** } } ! $pafiledb_template->assign_block_vars( 'select_multiple.row', array( 'FIELD_VALUE' => $value, 'FIELD_SELECTED' => $selected ) --- 396,400 ---- } } ! $template->assign_block_vars( 'select_multiple.row', array( 'FIELD_VALUE' => $value, 'FIELD_SELECTED' => $selected ) *************** *** 413,418 **** function display_edit_checkbox( $file_id, $field_id, $field_data ) { ! global $pafiledb_template; ! $pafiledb_template->assign_block_vars( 'checkbox', array( 'FIELD_NAME' => $field_data['custom_name'], 'FIELD_ID' => $field_data['custom_id'], --- 413,418 ---- function display_edit_checkbox( $file_id, $field_id, $field_data ) { ! global $template; ! $template->assign_block_vars( 'checkbox', array( 'FIELD_NAME' => $field_data['custom_name'], 'FIELD_ID' => $field_data['custom_id'], *************** *** 437,441 **** } } ! $pafiledb_template->assign_block_vars( 'checkbox.row', array( 'FIELD_VALUE' => $value, 'FIELD_CHECKED' => $checked ) --- 437,441 ---- } } ! $template->assign_block_vars( 'checkbox.row', array( 'FIELD_VALUE' => $value, 'FIELD_CHECKED' => $checked ) Index: functions_pafiledb.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/pafiledb/includes/functions_pafiledb.php,v retrieving revision 1.48 retrieving revision 1.49 diff -C2 -d -r1.48 -r1.49 *** functions_pafiledb.php 10 Aug 2007 18:36:22 -0000 1.48 --- functions_pafiledb.php 9 Sep 2007 20:16:18 -0000 1.49 *************** *** 398,402 **** break; } ! $cat_sub .= (!empty($cat_sub) ? '<span class=' . $class . '>, </span>' : '') . '<a href="' . append_sid( $this->this_mxurl( 'action=category&cat_id=' . $cat_row['cat_id'] ) ) . '" class=' . $class . '>' . $cat_row['cat_name'] . '</a>'; } /* --- 398,402 ---- break; } ! $cat_sub .= (!empty($cat_sub) ? '<span class=' . $class . '>, </span>' : '') . '<a href="' . mx_append_sid( $this->this_mxurl( 'action=category&cat_id=' . $cat_row['cat_id'] ) ) . '" class=' . $class . '>' . $cat_row['cat_name'] . '</a>'; } /* *************** *** 415,419 **** break; } ! $cat_sub .= (!empty($cat_sub) ? '<span class=' . $class . '>, </span>' : '') . '<a href="' . append_sid( $this->this_mxurl( 'action=category&cat_id=' . $sub_cat_row['cat_id'] ) ) . '" class=' . $class . '>' . $sub_cat_row['cat_name'] . '</a>'; } } --- 415,419 ---- break; } ! $cat_sub .= (!empty($cat_sub) ? '<span class=' . $class . '>, </span>' : '') . '<a href="' . mx_append_sid( $this->this_mxurl( 'action=category&cat_id=' . $sub_cat_row['cat_id'] ) ) . '" class=' . $class . '>' . $sub_cat_row['cat_name'] . '</a>'; } } *************** *** 438,442 **** function generate_navigation( $cat_id ) { ! global $pafiledb_template, $db; if ( $this->cat_rowset[$cat_id]['parents_data'] == '' ) --- 438,442 ---- function generate_navigation( $cat_id ) { ! global $template, $db; if ( $this->cat_rowset[$cat_id]['parents_data'] == '' ) *************** *** 463,476 **** foreach ( $cat_nav as $parent_cat_id => $parent_name ) { ! $pafiledb_template->assign_block_vars( 'navlinks', array( 'CAT_NAME' => $parent_name, ! 'U_VIEW_CAT' => append_sid( $this->this_mxurl( 'action=category&cat_id=' . $parent_cat_id ) ) ) ); } } ! $pafiledb_template->assign_block_vars( 'navlinks', array( 'CAT_NAME' => $this->cat_rowset[$cat_id]['cat_name'], ! 'U_VIEW_CAT' => append_sid( $this->this_mxurl( 'action=category&cat_id=' . $this->cat_rowset[$cat_id]['cat_id'] ) ) ) ); --- 463,476 ---- foreach ( $cat_nav as $parent_cat_id => $parent_name ) { ! $template->assign_block_vars( 'navlinks', array( 'CAT_NAME' => $parent_name, ! 'U_VIEW_CAT' => mx_append_sid( $this->this_mxurl( 'action=category&cat_id=' . $parent_cat_id ) ) ) ); } } ! $template->assign_block_vars( 'navlinks', array( 'CAT_NAME' => $this->cat_rowset[$cat_id]['cat_name'], ! 'U_VIEW_CAT' => mx_append_sid( $this->this_mxurl( 'action=category&cat_id=' . $this->cat_rowset[$cat_id]['cat_id'] ) ) ) ); *************** *** 586,590 **** function display_categories( $cat_id = PA_ROOT_CAT ) { ! global $db, $pafiledb_template, $lang, $userdata, $phpEx, $images; global $pafiledb_config, $board_config, $debug; --- 586,590 ---- function display_categories( $cat_id = PA_ROOT_CAT ) { ! global $db, $template, $lang, $userdata, $phpEx, $images; global $pafiledb_config, $board_config, $debug; *************** *** 594,603 **** { $redirect = ( $cat_id != PA_ROOT_CAT ) ? $this->this_mxurl( "action=category&cat_id=$cat_id" ) : $this->this_mxurl(); ! redirect( append_sid( "login.$phpEx?redirect=$redirect", true ) ); } mx_message_die( GENERAL_ERROR, 'Either you are not allowed to view any category, or there is no category in the database' ); } ! $pafiledb_template->assign_vars( array( 'CAT_NAV_SIMPLE' => true, 'L_SUB_CAT' => $lang['Sub_category'], --- 594,603 ---- { $redirect = ( $cat_id != PA_ROOT_CAT ) ? $this->this_mxurl( "action=category&cat_id=$cat_id" ) : $this->this_mxurl(); ! mx_redirect( mx_append_sid( "login.$phpEx?redirect=$redirect", true ) ); } mx_message_die( GENERAL_ERROR, 'Either you are not allowed to view any category, or there is no category in the database' ); } ! $template->assign_vars( array( 'CAT_NAV_SIMPLE' => true, 'L_SUB_CAT' => $lang['Sub_category'], *************** *** 621,625 **** } ! $pafiledb_template->assign_vars( array( 'WIDTH' => 100 / $catcol ) ); $i = 0; --- 621,625 ---- } ! $template->assign_vars( array( 'WIDTH' => 100 / $catcol ) ); $i = 0; *************** *** 628,632 **** if ( $i == 0 || $i == $catcol) { ! $pafiledb_template->assign_block_vars( 'catcol', array() ); $i = 0; } --- 628,632 ---- if ( $i == 0 || $i == $catcol) { ! $template->assign_block_vars( 'catcol', array() ); $i = 0; } *************** *** 638,646 **** if ( !empty( $last_file_info['file_id'] ) && $this->auth_user[$subcat_id]['auth_read'] ) { ! $last_file_time = create_date( $board_config['default_dateformat'], $last_file_info['file_time'], $board_config['board_timezone'] ); $last_file = $last_file_time . '<br />'; $last_file_name = ( strlen( stripslashes( $last_file_info['file_name'] ) ) > 20 ) ? substr( stripslashes( $last_file_info['file_name'] ), 0, 20 ) . '...' : stripslashes( $last_file_info['file_name'] ); ! $last_file .= '<a href="' . append_sid( $this->this_mxurl( 'action=file&file_id=' . $last_file_info['file_id'] ) ) . '" alt="' . stripslashes( $last_file_info['file_name'] ) . '" title="' . stripslashes( $last_file_info['file_name'] ) . '">' . $last_file_name . '</a> '; ! $last_file .= '<a href="' . append_sid( $this->this_mxurl( 'action=file&file_id=' . $last_file_info['file_id'] ) ) . '"><img src="' . $images['pa_icon_latest_reply'] . '" border="0" alt="' . $lang['View_latest_file'] . '" title="' . $lang['View_latest_file'] . '" /></a>'; } else --- 638,646 ---- if ( !empty( $last_file_info['file_id'] ) && $this->auth_user[$subcat_id]['auth_read'] ) { ! $last_file_time = phpBB2::create_date( $board_config['default_dateformat'], $last_file_info['file_time'], $board_config['board_timezone'] ); $last_file = $last_file_time . '<br />'; $last_file_name = ( strlen( stripslashes( $last_file_info['file_name'] ) ) > 20 ) ? substr( stripslashes( $last_file_info['file_name'] ), 0, 20 ) . '...' : stripslashes( $last_file_info['file_name'] ); ! $last_file .= '<a href="' . mx_append_sid( $this->this_mxurl( 'action=file&file_id=' . $last_file_info['file_id'] ) ) . '" alt="' . stripslashes( $last_file_info['file_name'] ) . '" title="' . stripslashes( $last_file_info['file_name'] ) . '">' . $last_file_name . '</a> '; ! $last_file .= '<a href="' . mx_append_sid( $this->this_mxurl( 'action=file&file_id=' . $last_file_info['file_id'] ) ) . '"><img src="' . $images['pa_icon_latest_reply'] . '" border="0" alt="' . $lang['View_latest_file'] . '" title="' . $lang['View_latest_file'] . '" /></a>'; } else *************** *** 656,661 **** $sub_cat = $this->get_sub_cat( $subcat_id ); ! $pafiledb_template->assign_block_vars( 'catcol.no_cat_parent', array( ! 'U_CAT' => append_sid( $this->this_mxurl( 'action=category&cat_id=' . $subcat_id ) ), 'SUB_CAT' => ( !empty( $sub_cat ) ) ? " $sub_cat" : "", 'CAT_IMAGE' => ( $is_new ) ? $images['pa_folder_new'] : $images['pa_folder'], --- 656,661 ---- $sub_cat = $this->get_sub_cat( $subcat_id ); ! $template->assign_block_vars( 'catcol.no_cat_parent', array( ! 'U_CAT' => mx_append_sid( $this->this_mxurl( 'action=category&cat_id=' . $subcat_id ) ), 'SUB_CAT' => ( !empty( $sub_cat ) ) ? " $sub_cat" : "", 'CAT_IMAGE' => ( $is_new ) ? $images['pa_folder_new'] : $images['pa_folder'], *************** *** 674,678 **** function display_categories_original( $cat_id = PA_ROOT_CAT, $action_name = 'action', $action_default = 'category', $map_xtra = '' ) { ! global $db, $pafiledb_template, $lang, $userdata, $phpEx, $images; global $pafiledb_config, $board_config, $debug; global $phpbb_root_path, $mx_root_path, $module_root_path, $is_block, $phpEx; --- 674,678 ---- function display_categories_original( $cat_id = PA_ROOT_CAT, $action_name = 'action', $action_default = 'category', $map_xtra = '' ) { ! global $db, $template, $lang, $userdata, $phpEx, $images; global $pafiledb_config, $board_config, $debug; global $phpbb_root_path, $mx_root_path, $module_root_path, $is_block, $phpEx; *************** *** 683,692 **** { $redirect = ( $cat_id != PA_ROOT_CAT ) ? $this->this_mxurl( "$action_name=$action_default&cat_id=$cat_id" ) : $this->this_mxurl(); ! redirect( append_sid( "login.$phpEx?redirect=$redirect", true ) ); } mx_message_die( GENERAL_ERROR, 'Either you are not allowed to view any category, or there is no category in the database' ); } ! $pafiledb_template->assign_vars( array( 'CAT_NAV_STANDARD' => true, 'L_SUB_CAT' => $lang['Sub_category'], --- 683,692 ---- { $redirect = ( $cat_id != PA_ROOT_CAT ) ? $this->this_mxurl( "$action_name=$action_default&cat_id=$cat_id" ) : $this->this_mxurl(); ! mx_redirect( mx_append_sid( "login.$phpEx?redirect=$redirect", true ) ); } mx_message_die( GENERAL_ERROR, 'Either you are not allowed to view any category, or there is no category in the database' ); } ! $template->assign_vars( array( 'CAT_NAV_STANDARD' => true, 'L_SUB_CAT' => $lang['Sub_category'], *************** *** 711,719 **** if ( !empty( $last_file_info['file_id'] ) && $this->auth_user[$subcat_id]['auth_read'] ) { ! $last_file_time = create_date( $board_config['default_dateformat'], $last_file_info['file_time'], $board_config['board_timezone'] ); $last_file = $last_file_time . '<br />'; $last_file_name = ( strlen( stripslashes( $last_file_info['file_name'] ) ) > 20 ) ? substr( stripslashes( $last_file_info['file_name'] ), 0, 20 ) . '...' : stripslashes( $last_file_info['file_name'] ); ! $last_file .= '<a href="' . append_sid( $this->this_mxurl( 'action=file&file_id=' . $last_file_info['file_id'] ) ) . '" alt="' . stripslashes( $last_file_info['file_name'] ) . '" title="' . stripslashes( $last_file_info['file_name'] ) . '">' . $last_file_name . '</a> '; ! $last_file .= '<a href="' . append_sid( $this->this_mxurl( 'action=file&file_id=' . $last_file_info['file_id'] ) ) . '"><img src="' . $images['pa_icon_latest_reply'] . '" border="0" alt="' . $lang['View_latest_file'] . '" title="' . $lang['View_latest_file'] . '" /></a>'; } else --- 711,719 ---- if ( !empty( $last_file_info['file_id'] ) && $this->auth_user[$subcat_id]['auth_read'] ) { ! $last_file_time = phpBB2::create_date( $board_config['default_dateformat'], $last_file_info['file_time'], $board_config['board_timezone'] ); $last_file = $last_file_time . '<br />'; $last_file_name = ( strlen( stripslashes( $last_file_info['file_name'] ) ) > 20 ) ? substr( stripslashes( $last_file_info['file_name'] ), 0, 20 ) . '...' : stripslashes( $last_file_info['file_name'] ); ! $last_file .= '<a href="' . mx_append_sid( $this->this_mxurl( 'action=file&file_id=' . $last_file_info['file_id'] ) ) . '" alt="' . stripslashes( $last_file_info['file_name'] ) . '" title="' . stripslashes( $last_file_info['file_name'] ) . '">' . $last_file_name . '</a> '; ! $last_file .= '<a href="' . mx_append_sid( $this->this_mxurl( 'action=file&file_id=' . $last_file_info['file_id'] ) ) . '"><img src="' . $images['pa_icon_latest_reply'] . '" border="0" alt="' . $lang['View_latest_file'] . '" title="' . $lang['View_latest_file'] . '" /></a>'; } else *************** *** 730,736 **** $sub_cat = $this->get_sub_cat( $subcat_id ); ! $pafiledb_template->assign_block_vars( 'no_cat_parent', array( 'IS_HIGHER_CAT' => false, ! 'U_CAT' => append_sid( $this->this_mxurl( "$action_name=$action_default&cat_id=" . $subcat_id . $map_xtra ) ), 'SUB_CAT' => ( !empty( $sub_cat ) ) ? '<br /><b>' . $lang['Sub_category'] . ': </b>' . $sub_cat : '', 'CAT_IMAGE' => ( $is_new ) ? $images['pa_folder_new'] : $images['pa_folder'], --- 730,736 ---- $sub_cat = $this->get_sub_cat( $subcat_id ); ! $template->assign_block_vars( 'no_cat_parent', array( 'IS_HIGHER_CAT' => false, ! 'U_CAT' => mx_append_sid( $this->this_mxurl( "$action_name=$action_default&cat_id=" . $subcat_id . $map_xtra ) ), 'SUB_CAT' => ( !empty( $sub_cat ) ) ? '<br /><b>' . $lang['Sub_category'] . ': </b>' . $sub_cat : '', 'CAT_IMAGE' => ( $is_new ) ? $images['pa_folder_new'] : $images['pa_folder'], *************** *** 773,779 **** if ( $total_sub_cat ) { ! $pafiledb_template->assign_block_vars( 'no_cat_parent', array( 'IS_HIGHER_CAT' => true, ! 'U_CAT' => append_sid( $this->this_mxurl( "$action_name=$action_default&cat_id=" . $subcat_id . $map_xtra) ), 'CAT_NAME' => $subcat_row['cat_name'] ) ); --- 773,779 ---- if ( $total_sub_cat ) { ! $template->assign_block_vars( 'no_cat_parent', array( 'IS_HIGHER_CAT' => true, ! 'U_CAT' => mx_append_sid( $this->this_mxurl( "$action_name=$action_default&cat_id=" . $subcat_id . $map_xtra) ), 'CAT_NAME' => $subcat_row['cat_name'] ) ); *************** *** 789,797 **** if ( !empty( $last_file_info['file_id'] ) && $this->auth_user[$sub_cat_rowset[$k]['cat_id']]['auth_read'] ) { ! $last_file_time = create_date( $board_config['default_dateformat'], $last_file_info['file_time'], $board_config['board_timezone'] ); $last_file = $last_file_time . '<br />'; $last_file_name = ( strlen( $last_file_info['file_name'] ) > 20 ) ? substr( $last_file_info['file_name'], 0, 20 ) . '...' : $last_file_info['file_name']; ! $last_file .= '<a href="' . append_sid( $this->this_mxurl( 'action=file&file_id=' . $last_file_info['file_id'] ) ) . '">' . $last_file_name . '</a> '; ! $last_file .= '<a href="' . append_sid( $this->this_mxurl( 'action=file&file_id=' . $last_file_info['file_id'] ) ) . '"><img src="' . $images['pa_icon_latest_reply'] . '" border="0" alt="' . $lang['View_latest_file'] . '" title="' . $lang['View_latest_file'] . '" /></a>'; } else --- 789,797 ---- if ( !empty( $last_file_info['file_id'] ) && $this->auth_user[$sub_cat_rowset[$k]['cat_id']]['auth_read'] ) { ! $last_file_time = phpBB2::create_date( $board_config['default_dateformat'], $last_file_info['file_time'], $board_config['board_timezone'] ); $last_file = $last_file_time . '<br />'; $last_file_name = ( strlen( $last_file_info['file_name'] ) > 20 ) ? substr( $last_file_info['file_name'], 0, 20 ) . '...' : $last_file_info['file_name']; ! $last_file .= '<a href="' . mx_append_sid( $this->this_mxurl( 'action=file&file_id=' . $last_file_info['file_id'] ) ) . '">' . $last_file_name . '</a> '; ! $last_file .= '<a href="' . mx_append_sid( $this->this_mxurl( 'action=file&file_id=' . $last_file_info['file_id'] ) ) . '"><img src="' . $images['pa_icon_latest_reply'] . '" border="0" alt="' . $lang['View_latest_file'] . '" title="' . $lang['View_latest_file'] . '" /></a>'; } else *************** *** 809,815 **** $sub_cat = $this->get_sub_cat( $sub_cat_rowset[$k]['cat_id'] ); ! $pafiledb_template->assign_block_vars( 'no_cat_parent', array( 'IS_HIGHER_CAT' => false, ! 'U_CAT' => append_sid( $this->this_mxurl( "$action_name=$action_default&cat_id=" . $sub_cat_rowset[$k]['cat_id'] . $map_xtra ) ), 'SUB_CAT' => ( !empty( $sub_cat ) ) ? '<br /><b>' . $lang['Sub_category'] . ': </b>' . $sub_cat : '', 'CAT_IMAGE' => ( $is_new ) ? $images['pa_folder_new'] : $images['pa_folder'], --- 809,815 ---- $sub_cat = $this->get_sub_cat( $sub_cat_rowset[$k]['cat_id'] ); ! $template->assign_block_vars( 'no_cat_parent', array( 'IS_HIGHER_CAT' => false, ! 'U_CAT' => mx_append_sid( $this->this_mxurl( "$action_name=$action_default&cat_id=" . $sub_cat_rowset[$k]['cat_id'] . $map_xtra ) ), 'SUB_CAT' => ( !empty( $sub_cat ) ) ? '<br /><b>' . $lang['Sub_category'] . ': </b>' . $sub_cat : '', 'CAT_IMAGE' => ( $is_new ) ? $images['pa_folder_new'] : $images['pa_folder'], *************** *** 841,845 **** function display_items( $sort_method, $sort_order, $start, $cat_id = false, $show_file_message = true, $sort_options_list = false, $sql_xtra = '', $target_page_id = false ) { ! global $db, $pafiledb_config, $pafiledb_template, $board_config; global $images, $lang, $phpEx, $pafiledb_functions; global $phpbb_root_path, $mx_root_path, $module_root_path, $is_block, $phpEx; --- 841,845 ---- function display_items( $sort_method, $sort_order, $start, $cat_id = false, $show_file_message = true, $sort_options_list = false, $sql_xtra = '', $target_page_id = false ) { ! global $db, $pafiledb_config, $template, $board_config; global $images, $lang, $phpEx, $pafiledb_functions; global $phpbb_root_path, $mx_root_path, $module_root_path, $is_block, $phpEx; *************** *** 1005,1010 **** // Format the date for the given file // =================================================== ! $date = create_date( $board_config['default_dateformat'], $file_rowset[$i]['file_time'], $board_config['board_timezone'] ); ! $date_updated = create_date( $board_config['default_dateformat'], $file_rowset[$i]['file_update_time'], $board_config['board_timezone'] ); // =================================================== // Get rating and comments for the file and format it --- 1005,1010 ---- // Format the date for the given file // =================================================== ! $date = phpBB2::create_date( $board_config['default_dateformat'], $file_rowset[$i]['file_time'], $board_config['board_timezone'] ); ! $date_updated = phpBB2::create_date( $board_config['default_dateformat'], $file_rowset[$i]['file_update_time'], $board_config['board_timezone'] ); // =================================================== // Get rating and comments for the file and format it *************** *** 1022,1026 **** $cat_name = ( empty( $cat_id ) ) ? $this->cat_rowset[$file_rowset[$i]['file_catid']]['cat_name'] : ''; ! $cat_url = append_sid( $this->this_mxurl( 'action=category&cat_id=' . $file_rowset[$i]['file_catid'] ) ); // =================================================== // Get the post icon fot this file --- 1022,1026 ---- $cat_name = ( empty( $cat_id ) ) ? $this->cat_rowset[$file_rowset[$i]['file_catid']]['cat_name'] : ''; ! $cat_url = mx_append_sid( $this->this_mxurl( 'action=category&cat_id=' . $file_rowset[$i]['file_catid'] ) ); // =================================================== // Get the post icon fot this file *************** *** 1047,1051 **** // Poster // ! $file_poster = ( $file_rowset[$i]['user_id'] != ANONYMOUS ) ? '<a href="' . append_sid( $phpbb_root_path . 'profile.' . $phpEx . '?mode=viewprofile&' . POST_USERS_URL . '=' . $file_rowset[$i]['user_id'] ) . '" target=_blank>' : ''; $file_poster .= ( $file_rowset[$i]['user_id'] != ANONYMOUS ) ? $file_rowset[$i]['username'] : $file_rowset[$i]['post_username'] . '(' . $lang['Guest'] . ')'; $file_poster .= ( $file_rowset[$i]['user_id'] != ANONYMOUS ) ? '</a>' : ''; --- 1047,1051 ---- // Poster // ! $file_poster = ( $file_rowset[$i]['user_id'] != ANONYMOUS ) ? '<a href="' . mx_append_sid( $phpbb_root_path . 'profile.' . $phpEx . '?mode=viewprofile&' . POST_USERS_URL . '=' . $file_rowset[$i]['user_id'] ) . '" target=_blank>' : ''; $file_poster .= ( $file_rowset[$i]['user_id'] != ANONYMOUS ) ? $file_rowset[$i]['username'] : $file_rowset[$i]['post_username'] . '(' . $lang['Guest'] . ')'; $file_poster .= ( $file_rowset[$i]['user_id'] != ANONYMOUS ) ? '</a>' : ''; *************** *** 1055,1059 **** // =================================================== ! $pafiledb_template->assign_block_vars( "file_rows", array( 'L_NEW_FILE' => $lang['New_file'], 'L_SAVE_AS' => $lang['Save_as'], --- 1055,1059 ---- // =================================================== ! $template->assign_block_vars( "file_rows", array( 'L_NEW_FILE' => $lang['New_file'], 'L_SAVE_AS' => $lang['Save_as'], *************** *** 1065,1070 **** 'UPDATED' => $date_updated, 'L_RATING' => $lang['DlRating'], ! 'DO_RATE' => $this->auth_user[$cat_id]['auth_rate'] ? '<a href="' . append_sid( $this->this_mxurl( 'action=rate&file_id=' . $file_rowset[$i]['file_id'] ) ) . '">' . $lang['Do_rate'] . '</a>' : '', ! 'L_COMMENT' => '<a href="' . append_sid( $this->this_mxurl( 'action=post_comment&item_id=' . $file_rowset[$i]['file_id'] . '&cat_id=' . $file_rowset[$i]['file_catid'] ) ) . '">' . $lang['Comments'] . '</a>', 'RATING' => $rating, 'FILE_VOTES' => $file_rowset[$i]['total_votes'], --- 1065,1070 ---- 'UPDATED' => $date_updated, 'L_RATING' => $lang['DlRating'], ! 'DO_RATE' => $this->auth_user[$cat_id]['auth_rate'] ? '<a href="' . mx_append_sid( $this->this_mxurl( 'action=rate&file_id=' . $file_rowset[$i]['file_id'] ) ) . '">' . $lang['Do_rate'] . '</a>' : '', ! 'L_COMMENT' => '<a href="' . mx_append_sid( $this->this_mxurl( 'action=post_comment&item_id=' . $file_rowset[$i]['file_id'] . '&cat_id=' . $file_rowset[$i]['file_catid'] ) ) . '">' . $lang['Comments'] . '</a>', 'RATING' => $rating, 'FILE_VOTES' => $file_rowset[$i]['total_votes'], *************** *** 1075,1081 **** 'U_CAT' => $cat_url, 'SHOW_RATINGS' => ( $pa_use_ratings ? true : false ), ! 'U_FILE' => append_sid( $this->this_mxurl( 'action=file&file_id=' . $file_rowset[$i]['file_id'], false, false, $target_page_id ) ), ! 'U_FILE_JUMP' => append_sid( $this->this_mxurl( 'action=download&file_id=' . $file_rowset[$i]['file_id'], true, false ) ), ! 'U_FILE_JUMP_SAVE_AS' => append_sid( $this->this_mxurl( 'action=download&file_id=' . $file_rowset[$i]['file_id'] . '&save_as', true, false ) ), 'COLOR' => ( ( $i % 2 ) ? "row2" : "row1" ), 'POSTER' => $file_poster, --- 1075,1081 ---- 'U_CAT' => $cat_url, 'SHOW_RATINGS' => ( $pa_use_ratings ? true : false ), ! 'U_FILE' => mx_append_sid( $this->this_mxurl( 'action=file&file_id=' . $file_rowset[$i]['file_id'], false, false, $target_page_id ) ), ! 'U_FILE_JUMP' => mx_append_sid( $this->this_mxurl( 'action=download&file_id=' . $file_rowset[$i]['file_id'], true, false ) ), ! 'U_FILE_JUMP_SAVE_AS' => mx_append_sid( $this->this_mxurl( 'action=download&file_id=' . $file_rowset[$i]['file_id'] . '&save_as', true, false ) ), 'COLOR' => ( ( $i % 2 ) ? "row2" : "row1" ), 'POSTER' => $file_poster, *************** *** 1098,1111 **** { case 'date': ! $pafiledb_template->assign_block_vars( "file_rows.display_date", array()); break; case 'username': ! $pafiledb_template->assign_block_vars( "file_rows.display_username", array()); break; case 'counter': ! $pafiledb_template->assign_block_vars( "file_rows.display_counter", array()); break; case 'rate': ! $pafiledb_template->assign_block_vars( "file_rows.display_rate", array()); break; } --- 1098,1111 ---- { case 'date': ! $template->assign_block_vars( "file_rows.display_date", array()); break; case 'username': ! $template->assign_block_vars( "file_rows.display_username", array()); break; case 'counter': ! $template->assign_block_vars( "file_rows.display_counter", array()); break; case 'rate': ! $template->assign_block_vars( "file_rows.display_rate", array()); break; } *************** *** 1120,1124 **** { $action = ( empty( $cat_id ) ) ? 'viewall' : 'category&cat_id=' . $cat_id; ! $pafiledb_template->assign_vars( array( 'FILELIST' => $filelist, 'ORIGINAL_STYLE' => false, --- 1120,1124 ---- { $action = ( empty( $cat_id ) ) ? 'viewall' : 'category&cat_id=' . $cat_id; ! $template->assign_vars( array( 'FILELIST' => $filelist, 'ORIGINAL_STYLE' => false, *************** *** 1150,1154 **** 'SORT_ASC' => ( $sort_order == 'ASC' ) ? 'selected="selected"' : '', 'SORT_DESC' => ( $sort_order == 'DESC' ) ? 'selected="selected"' : '', ! 'PAGINATION' => generate_pagination( append_sid( $this->this_mxurl( "action=$action&sort_method=$sort_method&sort_order=$sort_order" ) ), $total_file, $pafiledb_config['pagination'], $start ), 'PAGE_NUMBER' => sprintf( $lang['Page_of'], ( floor( $start / $pafiledb_config['pagination'] ) + 1 ), ceil( $total_file / $pafiledb_config['pagination'] ) ), 'ID' => $cat_id, --- 1150,1154 ---- 'SORT_ASC' => ( $sort_order == 'ASC' ) ? 'selected="selected"' : '', 'SORT_DESC' => ( $sort_order == 'DESC' ) ? 'selected="selected"' : '', ! 'PAGINATION' => phpBB2::generate_pagination( mx_append_sid( $this->this_mxurl( "action=$action&sort_method=$sort_method&sort_order=$sort_order" ) ), $total_file, $pafiledb_config['pagination'], $start ), 'PAGE_NUMBER' => sprintf( $lang['Page_of'], ( floor( $start / $pafiledb_config['pagination'] ) + 1 ), ceil( $total_file / $pafiledb_config['pagination'] ) ), 'ID' => $cat_id, *************** *** 1156,1165 **** 'SHOW_RATINGS' => ( $pa_use_ratings ) ? true : false, ! 'S_ACTION_SORT' => append_sid( $this->this_mxurl( "action=$action" ) ) ) ); } else { ! $pafiledb_template->assign_vars( array( 'L_CATEGORY' => $lang['Category'], 'L_RATING' => $lang['DlRating'], --- 1156,1165 ---- 'SHOW_RATINGS' => ( $pa_use_ratings ) ? true : false, ! 'S_ACTION_SORT' => mx_append_sid( $this->this_mxurl( "action=$action" ) ) ) ); } else { ! $template->assign_vars( array( 'L_CATEGORY' => $lang['Category'], 'L_RATING' => $lang['DlRating'], *************** *** 1191,1195 **** function display_items_quickdl( $sort_method, $sort_order, $start, $show_file_message, $cat_id = false ) { ! global $db, $pafiledb_config, $pafiledb_template, $board_config; global $images... [truncated message content] |