|
From: Jon O. <jon...@us...> - 2006-07-04 18:02:16
|
Update of /cvsroot/mxbb/mx_pafiledb/pafiledb/includes In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv24281/modules/mx_pafiledb/pafiledb/includes Modified Files: functions.php functions_pafiledb.php pafiledb_constants.php Log Message: adding a simple style mode, in sync with mx_linkdb templtes Index: functions.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/pafiledb/includes/functions.php,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** functions.php 1 Jul 2006 21:31:06 -0000 1.24 --- functions.php 4 Jul 2006 18:02:11 -0000 1.25 *************** *** 624,633 **** * @return unknown */ ! function sql_query_limit( $query, $total, $offset = 0 ) { global $db; $query .= ' LIMIT ' . ( ( !empty( $offset ) ) ? $offset . ', ' . $total : $total ); ! return $db->sql_query( $query ); } } --- 624,633 ---- * @return unknown */ ! function sql_query_limit( $query, $total, $offset = 0, $sql_cache = false ) { global $db; $query .= ' LIMIT ' . ( ( !empty( $offset ) ) ? $offset . ', ' . $total : $total ); ! return $sql_cache ? $db->sql_query( $query, $sql_cache ) : $db->sql_query( $query ); } } Index: pafiledb_constants.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/pafiledb/includes/pafiledb_constants.php,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** pafiledb_constants.php 17 Jun 2006 20:13:22 -0000 1.18 --- pafiledb_constants.php 4 Jul 2006 18:02:11 -0000 1.19 *************** *** 31,34 **** --- 31,52 ---- define( 'PAGE_DOWNLOAD', -501 ); // If this id generates a conflict with other mods, change it ;) + // + // Tables + // + define( 'PA_CATEGORY_TABLE', $mx_table_prefix . 'pa_cat' ); + define( 'PA_COMMENTS_TABLE', $mx_table_prefix . 'pa_comments' ); + define( 'PA_CUSTOM_TABLE', $mx_table_prefix . 'pa_custom' ); + define( 'PA_CUSTOM_DATA_TABLE', $mx_table_prefix . 'pa_customdata' ); + define( 'PA_DOWNLOAD_INFO_TABLE', $mx_table_prefix . 'pa_download_info' ); + define( 'PA_FILES_TABLE', $mx_table_prefix . 'pa_files' ); + define( 'PA_LICENSE_TABLE', $mx_table_prefix . 'pa_license' ); + define( 'PA_CONFIG_TABLE', $mx_table_prefix . 'pa_config' ); + define( 'PA_VOTES_TABLE', $mx_table_prefix . 'pa_votes' ); + define( 'PA_AUTH_ACCESS_TABLE', $mx_table_prefix . 'pa_auth' ); + define( 'PA_MIRRORS_TABLE', $mx_table_prefix . 'pa_mirrors' ); + + // + // Switches + // define( 'PAFILEDB_DEBUG', 1 ); // Pafiledb Mod Debugging on define( 'PAFILEDB_QUERY_DEBUG', 1 ); *************** *** 50,54 **** --- 68,74 ---- define( 'PA_AUTH_COMMENT_DELETE', 11 ); + // // Field Types + // define( 'INPUT', 0 ); define( 'TEXTAREA', 1 ); *************** *** 60,75 **** define( 'ICONS_DIR', 'pafiledb/images/icons/' ); - define( 'PA_CATEGORY_TABLE', $mx_table_prefix . 'pa_cat' ); - define( 'PA_COMMENTS_TABLE', $mx_table_prefix . 'pa_comments' ); - define( 'PA_CUSTOM_TABLE', $mx_table_prefix . 'pa_custom' ); - define( 'PA_CUSTOM_DATA_TABLE', $mx_table_prefix . 'pa_customdata' ); - define( 'PA_DOWNLOAD_INFO_TABLE', $mx_table_prefix . 'pa_download_info' ); - define( 'PA_FILES_TABLE', $mx_table_prefix . 'pa_files' ); - define( 'PA_LICENSE_TABLE', $mx_table_prefix . 'pa_license' ); - define( 'PA_CONFIG_TABLE', $mx_table_prefix . 'pa_config' ); - define( 'PA_VOTES_TABLE', $mx_table_prefix . 'pa_votes' ); - define( 'PA_AUTH_ACCESS_TABLE', $mx_table_prefix . 'pa_auth' ); - define( 'PA_MIRRORS_TABLE', $mx_table_prefix . 'pa_mirrors' ); - if ( !MXBB_MODULE || MXBB_27x ) { --- 80,83 ---- Index: functions_pafiledb.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/pafiledb/includes/functions_pafiledb.php,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** functions_pafiledb.php 1 Jul 2006 21:31:06 -0000 1.31 --- functions_pafiledb.php 4 Jul 2006 18:02:11 -0000 1.32 *************** *** 24,30 **** /** ! * Enter description here... * ! * @param unknown_type $module_name */ function adminmodule( $module_name ) --- 24,30 ---- /** ! * load admin module * ! * @param unknown_type $module_name send module name to load it */ function adminmodule( $module_name ) *************** *** 55,60 **** if ( !class_exists( 'pafiledb_' . $module_name ) ) { ! global $phpbb_root_path, $phpEx; ! global $mx_root_path, $module_root_path, $is_block, $phpEx; $this->module_name = $module_name; --- 55,59 ---- if ( !class_exists( 'pafiledb_' . $module_name ) ) { ! global $module_root_path, $phpEx; $this->module_name = $module_name; *************** *** 92,98 **** pafiledb_page_header( $page_title ); - $pafiledb_template->set_filenames( array( 'body' => $tpl_name ) ); - pafiledb_page_footer(); } --- 91,95 ---- *************** *** 343,347 **** if ( $this->cat_rowset[$cat_id]['cat_files'] == -1 || $this->modified ) { ! global $db, $db; $sql = 'SELECT COUNT(file_id) as total_files --- 340,344 ---- if ( $this->cat_rowset[$cat_id]['cat_files'] == -1 || $this->modified ) { ! global $db; $sql = 'SELECT COUNT(file_id) as total_files *************** *** 468,471 **** --- 465,518 ---- if ( !empty( $this->subcat_rowset[$cat_id] ) ) { + $class = "gensmall"; + $init_link_max = ( count( $this->subcat_rowset[$cat_id] ) > 3 ) ? 3 : count( $this->subcat_rowset[$cat_id] ); + $truncate = false; + $i = 0; + foreach( $this->subcat_rowset[$cat_id] as $cat_id => $cat_row ) + { + if ( $cat_row['cat_allow_file'] || !empty( $this->subcat_rowset[$cat_row['cat_id']] ) ) + { + $i++; + if ($i > $init_link_max) + { + $truncate = true; + break; + } + $cat_sub .= (!empty($cat_sub) ? '<span class=' . $class . '>, </span>' : '') . '<a href="' . append_sid( pa_this_mxurl( 'action=category&cat_id=' . $cat_row['cat_id'] ) ) . '" class=' . $class . '>' . $cat_row['cat_name'] . '</a>'; + } + /* + else + { + if ( !empty( $this->subcat_rowset[$cat_row['cat_id']] ) ) + { + foreach( $this->subcat_rowset[$cat_row['cat_id']] as $sub_cat_id => $sub_cat_row ) + { + if ( $sub_cat_row['cat_allow_file'] ) + { + $i++; + if ($i > $init_link_max) + { + $truncate = true; + break; + } + $cat_sub .= (!empty($cat_sub) ? '<span class=' . $class . '>, </span>' : '') . '<a href="' . append_sid( pa_this_mxurl( 'action=category&cat_id=' . $sub_cat_row['cat_id'] ) ) . '" class=' . $class . '>' . $sub_cat_row['cat_name'] . '</a>'; + } + } + } + } + */ + } + + if ($truncate) + { + $cat_sub .= '<span class=' . $class . '>, ...</span>'; + } + } + return $cat_sub; + + /* + $cat_sub = ''; + if ( !empty( $this->subcat_rowset[$cat_id] ) ) + { foreach( $this->subcat_rowset[$cat_id] as $cat_id => $cat_row ) { *************** *** 489,493 **** } } ! return $cat_sub; } --- 536,540 ---- } } ! */ } *************** *** 500,504 **** { global $pafiledb_template, $db; - global $mx_root_path, $module_root_path, $is_block, $phpEx; if ( $this->cat_rowset[$cat_id]['parents_data'] == '' ) --- 547,550 ---- *************** *** 525,537 **** 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( pa_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( pa_this_mxurl( 'action=category&cat_id=' . $this->cat_rowset[$cat_id]['cat_id'] ) ) ) ! ); return; --- 571,585 ---- 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( pa_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( pa_this_mxurl( 'action=category&cat_id=' . $this->cat_rowset[$cat_id]['cat_id'] ) ) ) ! ); return; *************** *** 649,656 **** 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; if ( $this->cat_empty() ) { mx_message_die( GENERAL_ERROR, 'Either you are not allowed to view any category, or there is no category in the database' ); } --- 697,708 ---- global $db, $pafiledb_template, $lang, $userdata, $phpEx, $images; global $pafiledb_config, $board_config, $debug; if ( $this->cat_empty() ) { + if ( !$userdata['session_logged_in'] ) + { + $redirect = ( $cat_id != PA_ROOT_CAT ) ? pa_this_mxurl( "action=category&cat_id=$cat_id" ) : pa_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' ); } *************** *** 665,669 **** // ! // output the root level category that allow file // if ( isset( $this->subcat_rowset[$cat_id] ) ) --- 717,812 ---- // ! // Output the categories ! // ! if ( isset( $this->subcat_rowset[$cat_id] ) ) ! { ! $pafiledb_config['cat_col'] = 2; ! $catnum = count($this->subcat_rowset[$cat_id]); ! $catcol = $pafiledb_config['cat_col'] > 0 ? $pafiledb_config['cat_col'] : 1; ! $num_of_rows = intval( $catnum / $catcol ); ! ! if ( $catnum % $catcol ) ! { ! $num_of_rows++; ! } ! ! $pafiledb_template->assign_vars( array( 'LINK_WIDTH' => 100 / $catcol ) ); ! ! $i = 0; ! foreach( $this->subcat_rowset[$cat_id] as $subcat_id => $subcat_row ) ! { ! if ( $i == 0 || $i == $catcol) ! { ! $pafiledb_template->assign_block_vars( 'catcol', array() ); ! $i = 0; ! } ! $i++; ! ! $last_file_info = array(); ! $this->last_file_in_cat( $subcat_id, $last_file_info ); ! ! if ( !empty( $last_file_info['file_id'] ) && $this->auth[$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( pa_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( pa_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 ! { ! $last_file = $lang['No_file']; ! } ! ! $is_new = false; ! if ( $this->new_file_in_cat( $subcat_id ) ) ! { ! $is_new = true; ! } ! ! $sub_cat = $this->get_sub_cat( $subcat_id ); ! $pafiledb_template->assign_block_vars( 'catcol.no_cat_parent', array( ! 'U_CAT' => append_sid( pa_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'], ! 'CAT_NAME' => $subcat_row['cat_name'], ! 'FILECAT' => $this->file_in_cat( $subcat_id ) ) ! ); ! } ! } ! } ! ! /** ! * Enter description here... ! * ! * @param unknown_type $cat_id ! */ ! function display_categories_original( $cat_id = PA_ROOT_CAT ) ! { ! 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; ! ! if ( $this->cat_empty() ) ! { ! if ( !$userdata['session_logged_in'] ) ! { ! $redirect = ( $cat_id != PA_ROOT_CAT ) ? pa_this_mxurl( "action=category&cat_id=$cat_id" ) : pa_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_PARENT_ORIGINAL' => true, ! 'L_SUB_CAT' => $lang['Sub_category'], ! 'L_CATEGORY' => $lang['Category'], ! 'L_LAST_FILE' => $lang['Last_file'], ! 'L_FILES' => $lang['Files'] ) ! ); ! ! // ! // Category navigation for cat_id that allow files ! // - used in cat pages without files // if ( isset( $this->subcat_rowset[$cat_id] ) ) *************** *** 697,713 **** $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( pa_this_mxurl( 'action=category&cat_id=' . $subcat_id ) ), ! 'SUB_CAT' => ( !empty( $sub_cat ) ) ? '<br /><b>' . $lang['Sub_category'] . ': </b>' . $sub_cat : '', ! 'CAT_IMAGE' => ( $is_new ) ? $images['pa_folder_new'] : $images['pa_folder'], ! 'CAT_NEW_FILE' => ( $is_new ) ? $lang['New_file'] : $lang['No_new_file'], ! 'CAT_NAME' => $subcat_row['cat_name'], ! 'FILECAT' => $this->file_in_cat( $subcat_id ), ! 'LAST_FILE' => $last_file, ! 'CAT_DESC' => $subcat_row['cat_desc'] ) ! ); } } } if ( isset( $this->subcat_rowset[$cat_id] ) ) { --- 840,862 ---- $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( pa_this_mxurl( 'action=category&cat_id=' . $subcat_id ) ), ! 'SUB_CAT' => ( !empty( $sub_cat ) ) ? '<br /><b>' . $lang['Sub_category'] . ': </b>' . $sub_cat : '', ! 'CAT_IMAGE' => ( $is_new ) ? $images['pa_folder_new'] : $images['pa_folder'], ! 'CAT_NEW_FILE' => ( $is_new ) ? $lang['New_file'] : $lang['No_new_file'], ! 'CAT_NAME' => $subcat_row['cat_name'], ! 'FILECAT' => $this->file_in_cat( $subcat_id ), ! 'LAST_FILE' => $last_file, ! 'CAT_DESC' => $subcat_row['cat_desc'] ) ! ); } } } + + // + // Category navigation for cat_id that doesn't allow files + // - used in cat pages with files + // if ( isset( $this->subcat_rowset[$cat_id] ) ) { *************** *** 727,739 **** } if ( ( $subcat_row['cat_allow_file'] != PA_CAT_ALLOW_FILE ) ) { if ( $total_sub_cat ) { ! $pafiledb_template->assign_block_vars( 'no_cat_parent', array( 'IS_HIGHER_CAT' => true, ! 'U_CAT' => append_sid( pa_this_mxurl( 'action=category&cat_id=' . $subcat_id ) ), ! 'CAT_NAME' => $subcat_row['cat_name'] ) ! ); } for( $k = 0; $k < $total_sub_cat; $k++ ) { --- 876,893 ---- } + // + // This is a container category + // if ( ( $subcat_row['cat_allow_file'] != PA_CAT_ALLOW_FILE ) ) { if ( $total_sub_cat ) { ! $pafiledb_template->assign_block_vars( 'no_cat_parent', array( ! 'IS_HIGHER_CAT' => true, ! 'U_CAT' => append_sid( pa_this_mxurl( 'action=category&cat_id=' . $subcat_id ) ), ! 'CAT_NAME' => $subcat_row['cat_name'] ) ! ); } + for( $k = 0; $k < $total_sub_cat; $k++ ) { *************** *** 765,778 **** $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( pa_this_mxurl( 'action=category&cat_id=' . $sub_cat_rowset[$k]['cat_id'] ) ), ! 'SUB_CAT' => ( !empty( $sub_cat ) ) ? '<br /><b>' . $lang['Sub_category'] . ': </b>' . $sub_cat : '', ! 'CAT_IMAGE' => ( $is_new ) ? $images['pa_folder_new'] : $images['pa_folder'], ! 'CAT_NEW_FILE' => ( $is_new ) ? $lang['New_file'] : $lang['No_new_file'], ! 'CAT_NAME' => $sub_cat_rowset[$k]['cat_name'], ! 'FILECAT' => $this->file_in_cat( $sub_cat_rowset[$k]['cat_id'] ), ! 'LAST_FILE' => $last_file, ! 'CAT_DESC' => $sub_cat_rowset[$k]['cat_desc'] ) ! ); } // Have a permission to view the category } // It is not parent category --- 919,933 ---- $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( pa_this_mxurl( 'action=category&cat_id=' . $sub_cat_rowset[$k]['cat_id'] ) ), ! 'SUB_CAT' => ( !empty( $sub_cat ) ) ? '<br /><b>' . $lang['Sub_category'] . ': </b>' . $sub_cat : '', ! 'CAT_IMAGE' => ( $is_new ) ? $images['pa_folder_new'] : $images['pa_folder'], ! 'CAT_NEW_FILE' => ( $is_new ) ? $lang['New_file'] : $lang['No_new_file'], ! 'CAT_NAME' => $sub_cat_rowset[$k]['cat_name'], ! 'FILECAT' => $this->file_in_cat( $sub_cat_rowset[$k]['cat_id'] ), ! 'LAST_FILE' => $last_file, ! 'CAT_DESC' => $sub_cat_rowset[$k]['cat_desc'] ) ! ); } // Have a permission to view the category } // It is not parent category *************** *** 792,796 **** global $db, $pafiledb_template, $lang, $userdata, $phpEx, $images; global $pafiledb_config, $board_config, $debug; - // MX global $phpbb_root_path, $mx_root_path, $module_root_path, $is_block, $phpEx; --- 947,950 ---- *************** *** 800,810 **** } ! $pafiledb_template->assign_vars( array( 'CAT_PARENT' => true, ! 'L_SUB_CAT' => $lang['Sub_category'], ! 'L_CATEGORY' => $lang['Category'], ! 'L_LAST_FILE' => $lang['Last_file'], ! 'L_FILES' => $lang['Files'] ) ! ); // output the root level category that allow file if ( isset( $this->subcat_rowset[$cat_id] ) ) { --- 954,968 ---- } ! $pafiledb_template->assign_vars( array( ! 'CAT_PARENT' => true, ! 'L_SUB_CAT' => $lang['Sub_category'], ! 'L_CATEGORY' => $lang['Category'], ! 'L_LAST_FILE' => $lang['Last_file'], ! 'L_FILES' => $lang['Files'] ) ! ); ! ! // // output the root level category that allow file + // if ( isset( $this->subcat_rowset[$cat_id] ) ) { *************** *** 839,855 **** $map_xtra = !empty( $pa_get_dynamic[$subcat_id] ) ? '&dynamic_block=' . $pa_get_dynamic[$subcat_id] : ''; ! $pafiledb_template->assign_block_vars( 'no_cat_parent', array( 'IS_HIGHER_CAT' => false, ! 'U_CAT' => append_sid( pa_this_mxurl( 'actionqdl=quickdl&cat_id=' . $subcat_id . $map_xtra ) ), ! 'SUB_CAT' => ( !empty( $sub_cat ) ) ? '<b>' . $lang['Sub_category'] . ': </b>' . $sub_cat : '', ! 'CAT_IMAGE' => ( $is_new ) ? $images['pa_folder_new'] : $images['pa_folder'], ! 'CAT_NEW_FILE' => ( $is_new ) ? $lang['New_file'] : $lang['No_new_file'], ! 'CAT_NAME' => $subcat_row['cat_name'], ! 'FILECAT' => $this->file_in_cat( $subcat_id ), ! 'LAST_FILE' => $last_file, ! 'CAT_DESC' => $subcat_row['cat_desc'] ) ! ); } } } if ( isset( $this->subcat_rowset[$cat_id] ) ) { --- 997,1015 ---- $map_xtra = !empty( $pa_get_dynamic[$subcat_id] ) ? '&dynamic_block=' . $pa_get_dynamic[$subcat_id] : ''; ! $pafiledb_template->assign_block_vars( 'no_cat_parent', array( ! 'IS_HIGHER_CAT' => false, ! 'U_CAT' => append_sid( pa_this_mxurl( 'actionqdl=quickdl&cat_id=' . $subcat_id . $map_xtra ) ), ! 'SUB_CAT' => ( !empty( $sub_cat ) ) ? '<b>' . $lang['Sub_category'] . ': </b>' . $sub_cat : '', ! 'CAT_IMAGE' => ( $is_new ) ? $images['pa_folder_new'] : $images['pa_folder'], ! 'CAT_NEW_FILE' => ( $is_new ) ? $lang['New_file'] : $lang['No_new_file'], ! 'CAT_NAME' => $subcat_row['cat_name'], ! 'FILECAT' => $this->file_in_cat( $subcat_id ), ! 'LAST_FILE' => $last_file, ! 'CAT_DESC' => $subcat_row['cat_desc'] ) ! ); } } } + if ( isset( $this->subcat_rowset[$cat_id] ) ) { *************** *** 869,880 **** } if ( ( $subcat_row['cat_allow_file'] != PA_CAT_ALLOW_FILE ) ) { if ( $total_sub_cat ) { ! $pafiledb_template->assign_block_vars( 'no_cat_parent', array( 'IS_HIGHER_CAT' => true, ! 'U_CAT' => append_sid( pa_this_mxurl( 'actionqdl=category&cat_id=' . $subcat_id ) ), ! 'CAT_NAME' => $subcat_row['cat_name'] ) ! ); } for( $k = 0; $k < $total_sub_cat; $k++ ) --- 1029,1044 ---- } + // + // Category container + // if ( ( $subcat_row['cat_allow_file'] != PA_CAT_ALLOW_FILE ) ) { if ( $total_sub_cat ) { ! $pafiledb_template->assign_block_vars( 'no_cat_parent', array( ! 'IS_HIGHER_CAT' => true, ! 'U_CAT' => append_sid( pa_this_mxurl( 'actionqdl=category&cat_id=' . $subcat_id ) ), ! 'CAT_NAME' => $subcat_row['cat_name'] ) ! ); } for( $k = 0; $k < $total_sub_cat; $k++ ) *************** *** 907,920 **** $sub_cat = $this->get_sub_cat( $sub_cat_rowset[$k]['cat_id'] ); ! $pafiledb_template->assign_block_vars( 'no_cat_parent', array( 'IS_HIGER_CAT' => false, ! 'U_CAT' => append_sid( pa_this_mxurl( 'actionqdl=category&cat_id=' . $sub_cat_rowset[$k]['cat_id'] ) ), ! 'SUB_CAT' => ( !empty( $sub_cat ) ) ? '<b>' . $lang['Sub_category'] . ': </b>' . $sub_cat : '', ! 'CAT_IMAGE' => ( $is_new ) ? $images['pa_folder_new'] : $images['pa_folder'], ! 'CAT_NEW_FILE' => ( $is_new ) ? $lang['New_file'] : $lang['No_new_file'], ! 'CAT_NAME' => $sub_cat_rowset[$k]['cat_name'], ! 'FILECAT' => $this->file_in_cat( $sub_cat_rowset[$k]['cat_id'] ), ! 'LAST_FILE' => $last_file, ! 'CAT_DESC' => $sub_cat_rowset[$k]['cat_desc'] ) ! ); } // Have a permission to view the category } // It is not parent category --- 1071,1085 ---- $sub_cat = $this->get_sub_cat( $sub_cat_rowset[$k]['cat_id'] ); ! $pafiledb_template->assign_block_vars( 'no_cat_parent', array( ! 'IS_HIGER_CAT' => false, ! 'U_CAT' => append_sid( pa_this_mxurl( 'actionqdl=category&cat_id=' . $sub_cat_rowset[$k]['cat_id'] ) ), ! 'SUB_CAT' => ( !empty( $sub_cat ) ) ? '<b>' . $lang['Sub_category'] . ': </b>' . $sub_cat : '', ! 'CAT_IMAGE' => ( $is_new ) ? $images['pa_folder_new'] : $images['pa_folder'], ! 'CAT_NEW_FILE' => ( $is_new ) ? $lang['New_file'] : $lang['No_new_file'], ! 'CAT_NAME' => $sub_cat_rowset[$k]['cat_name'], ! 'FILECAT' => $this->file_in_cat( $sub_cat_rowset[$k]['cat_id'] ), ! 'LAST_FILE' => $last_file, ! 'CAT_DESC' => $sub_cat_rowset[$k]['cat_desc'] ) ! ); } // Have a permission to view the category } // It is not parent category *************** *** 950,1006 **** } - switch ( SQL_LAYER ) - { - case 'oracle': - $sql = "SELECT f1.*, f1.file_id, r.votes_file, AVG(r.rate_point) AS rating, COUNT(r.votes_file) AS total_votes, u.user_id, u.username, COUNT(c.comments_id) AS total_comments, cat.cat_allow_ratings, cat.cat_allow_comments - FROM " . PA_FILES_TABLE . " AS f1, " . PA_VOTES_TABLE . " AS r, " . USERS_TABLE . " AS u, " . PA_COMMENTS_TABLE . " AS c, " . PA_CATEGORY_TABLE . " AS cat - WHERE f1.file_id = r.votes_file(+) - AND f1.user_id = u.user_id(+) - AND f1.file_id = c.file_id(+) - AND f1.file_pin = " . FILE_PINNED . " - AND f1.file_approved = 1 - AND f1.file_catid = cat.cat_id - $cat_where - GROUP BY f1.file_id - ORDER BY $sort_method $sort_order"; - break; - - default: - $sql = "SELECT f1.*, f1.file_id, r.votes_file, AVG(r.rate_point) AS rating, COUNT(r.votes_file) AS total_votes, u.user_id, u.username, COUNT(c.comments_id) AS total_comments, cat.cat_allow_ratings, cat.cat_allow_comments - FROM " . PA_FILES_TABLE . " AS f1 - LEFT JOIN " . PA_VOTES_TABLE . " AS r ON f1.file_id = r.votes_file - LEFT JOIN " . USERS_TABLE . " AS u ON f1.user_id = u.user_id - LEFT JOIN " . PA_COMMENTS_TABLE . " AS c ON f1.file_id = c.file_id - LEFT JOIN " . PA_CATEGORY_TABLE . " AS cat ON f1.file_catid = cat.cat_id - WHERE f1.file_pin = " . FILE_PINNED . " - AND f1.file_approved = 1 - $cat_where - GROUP BY f1.file_id - ORDER BY $sort_method $sort_order"; - break; - } - - if ( !( $result = $db->sql_query( $sql ) ) ) - { - mx_message_die( GENERAL_ERROR, 'Couldn\'t get file info for this category', '', __LINE__, __FILE__, $sql ); - } - $file_rowset = array(); $total_file = 0; - while ( $row = $db->sql_fetchrow( $result ) ) - { - if ( $this->auth[$row['file_catid']]['auth_read'] ) - { - $file_rowset[] = $row; - } - } - - $db->sql_freeresult( $result ); - switch ( SQL_LAYER ) { case 'oracle': ! $sql = "SELECT f1.*, f1.file_id, r.votes_file, AVG(r.rate_point) AS rating, COUNT(r.votes_file) AS total_votes, u.user_id, u.username, COUNT(c.comments_id), cat.cat_allow_ratings, cat.cat_allow_comments FROM " . PA_FILES_TABLE . " AS f1, " . PA_VOTES_TABLE . " AS r, " . USERS_TABLE . " AS u, " . PA_COMMENTS_TABLE . " AS c, " . PA_CATEGORY_TABLE . " AS cat WHERE f1.file_id = r.votes_file(+) --- 1115,1125 ---- } $file_rowset = array(); $total_file = 0; switch ( SQL_LAYER ) { case 'oracle': ! $sql = "SELECT f1.*, f1.file_id, r.votes_file, AVG(r.rate_point) AS rating, COUNT(r.votes_file) AS total_votes, u.user_id, u.username, COUNT(c.comments_id) AS total_comments, cat.cat_allow_ratings, cat.cat_allow_comments FROM " . PA_FILES_TABLE . " AS f1, " . PA_VOTES_TABLE . " AS r, " . USERS_TABLE . " AS u, " . PA_COMMENTS_TABLE . " AS c, " . PA_CATEGORY_TABLE . " AS cat WHERE f1.file_id = r.votes_file(+) *************** *** 1016,1020 **** default: ! $sql = "SELECT f1.*, f1.file_id, r.votes_file, AVG(r.rate_point) AS rating, COUNT(r.votes_file) AS total_votes, u.user_id, u.username, COUNT(c.comments_id), cat.cat_allow_ratings, cat.cat_allow_comments FROM " . PA_FILES_TABLE . " AS f1 LEFT JOIN " . PA_VOTES_TABLE . " AS r ON f1.file_id = r.votes_file --- 1135,1139 ---- default: ! $sql = "SELECT f1.*, f1.file_id, r.votes_file, AVG(r.rate_point) AS rating, COUNT(r.votes_file) AS total_votes, u.user_id, u.username, COUNT(c.comments_id) AS total_comments, cat.cat_allow_ratings, cat.cat_allow_comments FROM " . PA_FILES_TABLE . " AS f1 LEFT JOIN " . PA_VOTES_TABLE . " AS r ON f1.file_id = r.votes_file *************** *** 1062,1065 **** --- 1181,1187 ---- unset( $row ); + // + // Ratings + // $pa_use_ratings = false; for ( $i = 0; $i < count( $file_rowset ); $i++ ) *************** *** 1116,1140 **** // =================================================== ! $pafiledb_template->assign_block_vars( "file_rows", array( 'L_NEW_FILE' => $lang['New_file'], ! 'PIN_IMAGE' => $posticon, ! 'FILE_NEW_IMAGE' => $images['pa_file_new'], ! 'HAS_SCREENSHOTS' => ( !empty( $file_rowset[$i]['file_ssurl'] ) ) ? true : false, ! 'SS_AS_LINK' => ( $file_rowset[$i]['file_sshot_link'] ) ? true : false, ! 'FILE_SCREENSHOT' => $file_rowset[$i]['file_ssurl'], ! 'FILE_SCREENSHOT_URL' => $module_root_path . 'pafiledb/images/lwin.gif', ! 'FILE_NAME' => $file_rowset[$i]['file_name'], ! 'FILE_DESC' => $file_rowset[$i]['file_desc'], ! 'DATE' => $date, ! 'UPDATED' => $date_updated, ! 'RATING' => ( $this->ratings[$file_rowset[$i]['file_catid']]['activated'] ? $rating : $lang['kb_no_ratings'] ), ! 'FILE_DLS' => $file_rowset[$i]['file_dls'], ! 'CAT_NAME' => $cat_name, ! 'IS_NEW_FILE' => $is_new, - 'U_CAT' => $cat_url, - 'SHOW_RATINGS' => ( $pa_use_ratings ? true : false ), - 'U_FILE' => append_sid( pa_this_mxurl( 'action=file&file_id=' . $file_rowset[$i]['file_id'] ) ) ) - ); $filelist = true; $pa_use_ratings = $this->ratings[$file_rowset[$i]['file_catid']]['activated']; --- 1238,1264 ---- // =================================================== ! $pafiledb_template->assign_block_vars( "file_rows", array( ! 'L_NEW_FILE' => $lang['New_file'], ! 'PIN_IMAGE' => $posticon, ! 'FILE_NAME' => $file_rowset[$i]['file_name'], ! 'FILE_DESC' => $file_rowset[$i]['file_desc'], ! 'DATE' => $date, ! 'UPDATED' => $date_updated, ! 'RATING' => ( $this->ratings[$file_rowset[$i]['file_catid']]['activated'] ? $rating : $lang['kb_no_ratings'] ), ! 'FILE_DLS' => $file_rowset[$i]['file_dls'], ! 'CAT_NAME' => $cat_name, ! 'IS_NEW_FILE' => $is_new, ! 'U_CAT' => $cat_url, ! 'SHOW_RATINGS' => ( $pa_use_ratings ? true : false ), ! 'U_FILE' => append_sid( pa_this_mxurl( 'action=file&file_id=' . $file_rowset[$i]['file_id'] ) ), ! ! 'FILE_NEW_IMAGE' => $images['pa_file_new'], ! 'HAS_SCREENSHOTS' => ( !empty( $file_rowset[$i]['file_ssurl'] ) ) ? true : false, ! 'SS_AS_LINK' => ( $file_rowset[$i]['file_sshot_link'] ) ? true : false, ! 'FILE_SCREENSHOT' => $file_rowset[$i]['file_ssurl'], ! 'FILE_SCREENSHOT_URL' => $module_root_path . 'pafiledb/images/lwin.gif', ! )); $filelist = true; $pa_use_ratings = $this->ratings[$file_rowset[$i]['file_catid']]['activated']; *************** *** 1145,1197 **** $action = ( empty( $cat_id ) ) ? 'viewall' : 'category&cat_id=' . $cat_id; $pafiledb_template->assign_vars( array( ! 'L_CATEGORY' => $lang['Category'], ! 'L_RATING' => $lang['DlRating'], ! 'L_DOWNLOADS' => $lang['Dls'], ! 'L_DATE' => $lang['Date'], ! 'L_NAME' => $lang['Name'], ! 'L_FILE' => $lang['File'], ! 'L_UPDATE_TIME' => $lang['Update_time'], ! 'L_SCREENSHOTS' => $lang['Scrsht'], ! 'L_SELECT_SORT_METHOD' => $lang['Select_sort_method'], ! 'L_ORDER' => $lang['Order'], ! 'L_SORT' => $lang['Sort'], ! 'L_ASC' => $lang['Sort_Ascending'], ! 'L_DESC' => $lang['Sort_Descending'], ! 'SORT_NAME' => ( $sort_method == 'file_name' ) ? 'selected="selected"' : '', ! 'SORT_TIME' => ( $sort_method == 'file_time' ) ? 'selected="selected"' : '', ! 'SORT_RATING' => ( $sort_method == 'rating' ) ? 'selected="selected"' : '', ! 'SORT_DOWNLOADS' => ( $sort_method == 'file_dls' ) ? 'selected="selected"' : '', ! 'SORT_UPDATE_TIME' => ( $sort_method == 'file_update_time' ) ? 'selected="selected"' : '', ! 'SORT_ASC' => ( $sort_order == 'ASC' ) ? 'selected="selected"' : '', ! 'SORT_DESC' => ( $sort_order == 'DESC' ) ? 'selected="selected"' : '', ! 'PAGINATION' => generate_pagination( append_sid( pa_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'] ) ), ! 'FILELIST' => $filelist, ! 'ID' => $cat_id, ! 'START' => $start, ! 'SHOW_RATINGS' => ( $pa_use_ratings ) ? true : false, ! 'S_ACTION_SORT' => append_sid( pa_this_mxurl( "action=$action" ) ) ) ! ); } else { $pafiledb_template->assign_vars( array( ! 'L_CATEGORY' => $lang['Category'], ! 'L_RATING' => $lang['DlRating'], ! 'L_DOWNLOADS' => $lang['Dls'], ! 'L_DATE' => $lang['Date'], ! 'L_NAME' => $lang['Name'], ! 'L_FILE' => $lang['File'], ! 'L_UPDATE_TIME' => $lang['Update_time'], ! 'L_SCREENSHOTS' => $lang['Scrsht'], ! 'NO_FILE' => $show_file_message, ! 'L_NO_FILES' => $lang['No_files'], ! 'L_NO_FILES_CAT' => $lang['No_files_cat'] ) ! ); } } --- 1269,1321 ---- $action = ( empty( $cat_id ) ) ? 'viewall' : 'category&cat_id=' . $cat_id; $pafiledb_template->assign_vars( array( ! 'L_CATEGORY' => $lang['Category'], ! 'L_RATING' => $lang['DlRating'], ! 'L_DOWNLOADS' => $lang['Dls'], ! 'L_DATE' => $lang['Date'], ! 'L_NAME' => $lang['Name'], ! 'L_FILE' => $lang['File'], ! 'L_UPDATE_TIME' => $lang['Update_time'], ! 'L_SCREENSHOTS' => $lang['Scrsht'], ! 'L_SELECT_SORT_METHOD' => $lang['Select_sort_method'], ! 'L_ORDER' => $lang['Order'], ! 'L_SORT' => $lang['Sort'], ! 'L_ASC' => $lang['Sort_Ascending'], ! 'L_DESC' => $lang['Sort_Descending'], ! 'SORT_NAME' => ( $sort_method == 'file_name' ) ? 'selected="selected"' : '', ! 'SORT_TIME' => ( $sort_method == 'file_time' ) ? 'selected="selected"' : '', ! 'SORT_RATING' => ( $sort_method == 'rating' ) ? 'selected="selected"' : '', ! 'SORT_DOWNLOADS' => ( $sort_method == 'file_dls' ) ? 'selected="selected"' : '', ! 'SORT_UPDATE_TIME' => ( $sort_method == 'file_update_time' ) ? 'selected="selected"' : '', ! 'SORT_ASC' => ( $sort_order == 'ASC' ) ? 'selected="selected"' : '', ! 'SORT_DESC' => ( $sort_order == 'DESC' ) ? 'selected="selected"' : '', ! 'PAGINATION' => generate_pagination( append_sid( pa_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'] ) ), ! 'FILELIST' => $filelist, ! 'ID' => $cat_id, ! 'START' => $start, ! 'SHOW_RATINGS' => ( $pa_use_ratings ) ? true : false, ! 'S_ACTION_SORT' => append_sid( pa_this_mxurl( "action=$action" ) ) ) ! ); } else { $pafiledb_template->assign_vars( array( ! 'L_CATEGORY' => $lang['Category'], ! 'L_RATING' => $lang['DlRating'], ! 'L_DOWNLOADS' => $lang['Dls'], ! 'L_DATE' => $lang['Date'], ! 'L_NAME' => $lang['Name'], ! 'L_FILE' => $lang['File'], ! 'L_UPDATE_TIME' => $lang['Update_time'], ! 'L_SCREENSHOTS' => $lang['Scrsht'], ! 'NO_FILE' => $show_file_message, ! 'L_NO_FILES' => $lang['No_files'], ! 'L_NO_FILES_CAT' => $lang['No_files_cat'] ) ! ); } } *************** *** 1231,1281 **** AND f1.user_id = u.user_id(+) AND f1.file_id = c.file_id(+) - AND f1.file_pin = " . FILE_PINNED . " - AND f1.file_approved = 1 - $cat_where - GROUP BY f1.file_id - ORDER BY $sort_method $sort_order"; - break; - - default: - $sql = "SELECT f1.*, f1.file_id, r.votes_file, AVG(r.rate_point) AS rating, COUNT(r.votes_file) AS total_votes, u.user_id, u.username, COUNT(c.comments_id) AS total_comments - FROM " . PA_FILES_TABLE . " AS f1 - LEFT JOIN " . PA_VOTES_TABLE . " AS r ON f1.file_id = r.votes_file - LEFT JOIN " . USERS_TABLE . " AS u ON f1.user_id = u.user_id - LEFT JOIN " . PA_COMMENTS_TABLE . " AS c ON f1.file_id = c.file_id - WHERE f1.file_pin = " . FILE_PINNED . " - AND f1.file_approved = 1 - $cat_where - GROUP BY f1.file_id - ORDER BY $sort_method $sort_order"; - break; - } - - if ( !( $result = $db->sql_query( $sql, 300 ) ) ) - { - mx_message_die( GENERAL_ERROR, 'Couldn\'t get file info for this category', '', __LINE__, __FILE__, $sql ); - } - - $file_rowset = array(); - $total_file = 0; - - while ( $row = $db->sql_fetchrow( $result ) ) - { - if ( $this->auth[$row['file_catid']]['auth_read'] ) - { - $file_rowset[] = $row; - } - } - - $db->sql_freeresult( $result ); - - switch ( SQL_LAYER ) - { - case 'oracle': - $sql = "SELECT f1.*, f1.file_id, r.votes_file, AVG(r.rate_point) AS rating, COUNT(r.votes_file) AS total_votes, u.user_id, u.username, COUNT(c.comments_id) - FROM " . PA_FILES_TABLE . " AS f1, " . PA_VOTES_TABLE . " AS r, " . USERS_TABLE . " AS u, " . PA_COMMENTS_TABLE . " AS c - WHERE f1.file_id = r.votes_file(+) - AND f1.user_id = u.user_id(+) - AND f1.file_id = c.file_id(+) AND f1.file_pin <> " . FILE_PINNED . " AND f1.file_approved = 1 --- 1355,1358 ---- *************** *** 1286,1290 **** default: ! $sql = "SELECT f1.*, f1.file_id, r.votes_file, AVG(r.rate_point) AS rating, COUNT(r.votes_file) AS total_votes, u.user_id, u.username, COUNT(c.comments_id) FROM " . PA_FILES_TABLE . " AS f1 LEFT JOIN " . PA_VOTES_TABLE . " AS r ON f1.file_id = r.votes_file --- 1363,1367 ---- default: ! $sql = "SELECT f1.*, f1.file_id, r.votes_file, AVG(r.rate_point) AS rating, COUNT(r.votes_file) AS total_votes, u.user_id, u.username, COUNT(c.comments_id) AS total_comments FROM " . PA_FILES_TABLE . " AS f1 LEFT JOIN " . PA_VOTES_TABLE . " AS r ON f1.file_id = r.votes_file *************** *** 1749,1753 **** global $db; ! if ( count( $this->subcat_rowset[$cat_id] ) <= 0 ) { return; --- 1826,1830 ---- global $db; ! if ( empty( $this->subcat_rowset[$cat_id] ) || count( $this->subcat_rowset[$cat_id] ) <= 0 ) { return; *************** *** 1869,1873 **** function update_add_file( $file_id = false ) { ! global $db, $phpbb_root_path, $db, $_POST, $userdata, $pafiledb_config, $_FILES, $_REQUEST, $pafiledb_functions, $user_ip, $auth, $module_root_path, $pafiledb; $ss_upload = ( empty( $_POST['screen_shot_url'] ) ) ? true : false; --- 1946,1950 ---- function update_add_file( $file_id = false ) { ! global $db, $phpbb_root_path, $db, $userdata, $pafiledb_config, $_FILES, $pafiledb_functions, $user_ip, $auth, $module_root_path, $pafiledb; $ss_upload = ( empty( $_POST['screen_shot_url'] ) ) ? true : false; *************** *** 1885,1900 **** $cat_id = ( isset( $_REQUEST['cat_id'] ) ) ? intval( $_REQUEST['cat_id'] ) : 0; - $file_name = ( isset( $_POST['name'] ) ) ? addslashes( htmlspecialchars( $_POST['name'] ) ) : ''; - $file_long_desc = ( isset( $_POST['long_desc'] ) ) ? addslashes( htmlspecialchars( $_POST['long_desc'] ) ) : ''; - $file_short_desc = ( isset( $_POST['short_desc'] ) ) ? addslashes( htmlspecialchars( $_POST['short_desc'] ) ) : ( ( !empty( $_POST['long_desc'] ) ) ? substr( addslashes( htmlspecialchars( $_POST['long_desc'] ) ), 0, 50 ) . '...' : '' ); - $file_author = ( isset( $_POST['author'] ) ) ? addslashes( htmlspecialchars( $_POST['author'] ) ) : ( ( $userdata['user_id'] != ANONYMOUS ) ? $userdata['username'] : '' ); - $file_version = ( isset( $_POST['version'] ) ) ? addslashes( htmlspecialchars( $_POST['version'] ) ) : ''; - $file_website = ( isset( $_POST['website'] ) ) ? addslashes( htmlspecialchars( $_POST['website'] ) ) : ''; if ( !empty( $file_website ) ) { --- 1962,1972 ---- $cat_id = ( isset( $_REQUEST['cat_id'] ) ) ? intval( $_REQUEST['cat_id'] ) : 0; $file_name = ( isset( $_POST['name'] ) ) ? addslashes( htmlspecialchars( $_POST['name'] ) ) : ''; $file_long_desc = ( isset( $_POST['long_desc'] ) ) ? addslashes( htmlspecialchars( $_POST['long_desc'] ) ) : ''; $file_short_desc = ( isset( $_POST['short_desc'] ) ) ? addslashes( htmlspecialchars( $_POST['short_desc'] ) ) : ( ( !empty( $_POST['long_desc'] ) ) ? substr( addslashes( htmlspecialchars( $_POST['long_desc'] ) ), 0, 50 ) . '...' : '' ); $file_author = ( isset( $_POST['author'] ) ) ? addslashes( htmlspecialchars( $_POST['author'] ) ) : ( ( $userdata['user_id'] != ANONYMOUS ) ? $userdata['username'] : '' ); $file_version = ( isset( $_POST['version'] ) ) ? addslashes( htmlspecialchars( $_POST['version'] ) ) : ''; $file_website = ( isset( $_POST['website'] ) ) ? addslashes( htmlspecialchars( $_POST['website'] ) ) : ''; + if ( !empty( $file_website ) ) { *************** *** 1904,1913 **** $file_posticon = ( isset( $_POST['posticon'] ) ) ? htmlspecialchars( $_POST['posticon'] ) : ''; - $file_license = ( isset( $_POST['license'] ) ) ? intval( $_POST['license'] ) : 0; $file_pin = ( isset( $_POST['pin'] ) ) ? intval( $_POST['pin'] ) : 0; $file_ss_link = ( isset( $_POST['sshot_link'] ) ) ? intval( $_POST['sshot_link'] ) : 0; $file_dls = ( isset( $_POST['file_download'] ) ) ? intval( $_POST['file_download'] ) : 0; - $file_time = time(); --- 1976,1983 ---- *************** *** 1933,1937 **** $forbidden_extensions = array_map( 'trim', @explode( ',', $pafiledb_config['forbidden_extensions'] ) ); - $file_extension = $pafiledb_functions->get_extension( $file_realname ); --- 2003,2006 ---- |