You can subscribe to this list here.
| 2005 |
Jan
|
Feb
|
Mar
(95) |
Apr
(270) |
May
(111) |
Jun
|
Jul
|
Aug
(64) |
Sep
(130) |
Oct
(319) |
Nov
(17) |
Dec
(191) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2006 |
Jan
(53) |
Feb
|
Mar
|
Apr
|
May
(6) |
Jun
(387) |
Jul
(102) |
Aug
(247) |
Sep
(120) |
Oct
(1) |
Nov
(8) |
Dec
(21) |
| 2007 |
Jan
(38) |
Feb
(36) |
Mar
|
Apr
(32) |
May
(135) |
Jun
(523) |
Jul
(192) |
Aug
(103) |
Sep
(533) |
Oct
(77) |
Nov
(23) |
Dec
(203) |
| 2008 |
Jan
(312) |
Feb
(1193) |
Mar
(404) |
Apr
(67) |
May
(62) |
Jun
(497) |
Jul
(297) |
Aug
(110) |
Sep
(335) |
Oct
(256) |
Nov
(50) |
Dec
(118) |
| 2009 |
Jan
(67) |
Feb
(10) |
Mar
(1) |
Apr
(1) |
May
|
Jun
(10) |
Jul
(61) |
Aug
|
Sep
(16) |
Oct
(45) |
Nov
(12) |
Dec
(14) |
| 2010 |
Jan
(30) |
Feb
|
Mar
|
Apr
(4) |
May
|
Jun
|
Jul
(7) |
Aug
(7) |
Sep
(5) |
Oct
(5) |
Nov
|
Dec
|
| 2011 |
Jan
(7) |
Feb
(3) |
Mar
(89) |
Apr
(11) |
May
(5) |
Jun
|
Jul
(8) |
Aug
(1) |
Sep
(2) |
Oct
|
Nov
(2) |
Dec
(89) |
| 2012 |
Jan
(7) |
Feb
(1) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(4) |
Sep
(3) |
Oct
(42) |
Nov
(1) |
Dec
|
| 2013 |
Jan
|
Feb
|
Mar
(19) |
Apr
(90) |
May
(38) |
Jun
(235) |
Jul
(38) |
Aug
(10) |
Sep
|
Oct
(29) |
Nov
|
Dec
|
| 2014 |
Jan
|
Feb
|
Mar
|
Apr
(6) |
May
(52) |
Jun
|
Jul
(7) |
Aug
|
Sep
(17) |
Oct
|
Nov
|
Dec
|
|
From: Jon O. <jon...@us...> - 2006-06-17 20:46:56
|
Update of /cvsroot/mxbb/mx_errordocs/includes In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv4691/modules/mx_errordocs/includes Modified Files: common.php Log Message: security Index: common.php =================================================================== RCS file: /cvsroot/mxbb/mx_errordocs/includes/common.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** common.php 5 Apr 2006 22:11:19 -0000 1.3 --- common.php 17 Jun 2006 20:46:53 -0000 1.4 *************** *** 9,12 **** --- 9,17 ---- */ + if( !defined('IN_PORTAL') ) + { + die("Hacking attempt"); + } + // // Define table names. |
|
From: Jon O. <jon...@us...> - 2006-06-17 20:46:56
|
Update of /cvsroot/mxbb/mx_errordocs In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv4691/modules/mx_errordocs Modified Files: errordocs.php Log Message: security Index: errordocs.php =================================================================== RCS file: /cvsroot/mxbb/mx_errordocs/errordocs.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** errordocs.php 2 May 2006 23:26:34 -0000 1.6 --- errordocs.php 17 Jun 2006 20:46:53 -0000 1.7 *************** *** 15,18 **** --- 15,23 ---- if( function_exists('read_block_config') ) { + if( !defined('IN_PORTAL') || !is_object($mx_block)) + { + die("Hacking attempt"); + } + // // Running as a Block... |
|
From: Jon O. <jon...@us...> - 2006-06-17 20:46:30
|
Update of /cvsroot/mxbb/mx_dev_startkit In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv4620/modules/mx_dev_startkit Modified Files: mx_dev_startkit.php Log Message: security Index: mx_dev_startkit.php =================================================================== RCS file: /cvsroot/mxbb/mx_dev_startkit/mx_dev_startkit.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** mx_dev_startkit.php 5 Apr 2006 20:55:19 -0000 1.4 --- mx_dev_startkit.php 17 Jun 2006 20:46:27 -0000 1.5 *************** *** 41,45 **** | $mx_module->smilies_pass() | $mx_module->generate_smilies() ! | | | Remember: All instances of page_header and page_tail inclusions should be removed, not to interfer with mxBB headers --- 41,45 ---- | $mx_module->smilies_pass() | $mx_module->generate_smilies() ! | | | Remember: All instances of page_header and page_tail inclusions should be removed, not to interfer with mxBB headers *************** *** 49,53 **** | ------------------ | Core provides a rich set of parameter types. Additional block specific types are defined in module_root/admin/mx_module_defs.php. ! | Block parameters are accessed with the mx_block->get_parameters() method. | | mx_block->get_parameters() Api --- 49,53 ---- | ------------------ | Core provides a rich set of parameter types. Additional block specific types are defined in module_root/admin/mx_module_defs.php. ! | Block parameters are accessed with the mx_block->get_parameters() method. | | mx_block->get_parameters() Api *************** *** 57,61 **** | Examples: | ! | $mx_block->get_parameters( MX_GET_ALL_PARS ) | - returns an array with all parameters :: array('par_name1' => $par1_value, 'par_name2' => $par2_value, ...) | --- 57,61 ---- | Examples: | ! | $mx_block->get_parameters( MX_GET_ALL_PARS ) | - returns an array with all parameters :: array('par_name1' => $par1_value, 'par_name2' => $par2_value, ...) | *************** *** 69,73 **** | Module Settings using additional db tables | ------------------ ! | More advanced modules need additional settings, intended for ALL module blocks. | For example, a image album module needs a defined pics folder and other modules may use global settings | NOTE: Block specific parameters should never use additional (non portal) db tables, since such data is NOT included in the portal cache engine and therefore speed will be affected. --- 69,73 ---- | Module Settings using additional db tables | ------------------ ! | More advanced modules need additional settings, intended for ALL module blocks. | For example, a image album module needs a defined pics folder and other modules may use global settings | NOTE: Block specific parameters should never use additional (non portal) db tables, since such data is NOT included in the portal cache engine and therefore speed will be affected. *************** *** 77,87 **** | Data should be managed in an axtra module adminCP panel | Db tables to be used should be defined in the includes/mx_module_constants.php file ! | Data should be accessed using the standard $db api. | \********************************************************************************/ ! ! if( !defined('IN_PORTAL') ) { ! die("Hacking attempt !!!"); } --- 77,87 ---- | Data should be managed in an axtra module adminCP panel | Db tables to be used should be defined in the includes/mx_module_constants.php file ! | Data should be accessed using the standard $db api. | \********************************************************************************/ ! ! if( !defined('IN_PORTAL') || !is_object($mx_block)) { ! die("Hacking attempt"); } *************** *** 89,93 **** // Load module constants and functions // ! include_once($mx_root_path . $mx_block->module_root_path . "includes/startkit_constants.$phpEx"); // Will load additional module lang keys, definitions, copyrights and theme data include_once($mx_root_path . $mx_block->module_root_path . "includes/startkit_functions.$phpEx"); // Will load additional module functions (be sure to prefix with 'mx_' to avoid function conflicts) --- 89,93 ---- // Load module constants and functions // ! include_once($mx_root_path . $mx_block->module_root_path . "includes/startkit_constants.$phpEx"); // Will load additional module lang keys, definitions, copyrights and theme data include_once($mx_root_path . $mx_block->module_root_path . "includes/startkit_functions.$phpEx"); // Will load additional module functions (be sure to prefix with 'mx_' to avoid function conflicts) *************** *** 140,144 **** { mx_message_die( CRITICAL_ERROR, "Could not query module information", "", __LINE__, __FILE__, $sql ); ! } $results = $db->sql_fetchrow( $result ); $startkit_module_name = $results['module_name']; --- 140,144 ---- { mx_message_die( CRITICAL_ERROR, "Could not query module information", "", __LINE__, __FILE__, $sql ); ! } $results = $db->sql_fetchrow( $result ); $startkit_module_name = $results['module_name']; *************** *** 155,159 **** // ! // Block Body // - not much to do in this simple block // --- 155,159 ---- // ! // Block Body // - not much to do in this simple block // *************** *** 171,202 **** // Pass Block data to template // ! $template->assign_vars( array( // // Titles // 'L_STARTKIT' => $lang['Startkit'], ! 'L_STARTKIT_PARAMETER' => $lang['Startkit_parameter'], 'L_STARTKIT_PARAMETER_EXPLAIN' => $lang['Startkit_parameter_explain'], 'L_TEST_STRING' => $lang['Test_string'], 'L_TEST_NUMBER' => $lang['Test_number'], ! 'L_STARTKIT_PARAMETER_MODIFIED' => $lang['Startkit_parameter_modified'], 'L_STARTKIT_PARAMETER_MODIFIED_EXPLAIN' => $lang['Startkit_parameter_modified_explain'], 'L_TEST_MODIFIED' => $lang['Test_modified'], ! 'L_STARTKIT_PARAMETER_CUSTOM' => $lang['Startkit_parameter_custom'], 'L_STARTKIT_PARAMETER_CUSTOM_EXPLAIN' => $lang['Startkit_parameter_custom_explain'], 'L_TEST_CUSTOM' => $lang['Test_custom'], ! 'L_STARTKIT_CONFIG' => $lang['Startkit_config'], 'L_STARTKIT_CONFIG_EXPLAIN' => $lang['Startkit_config_explain'], 'L_TEST_CONFIG1' => $lang['Test_config1'], 'L_TEST_CONFIG2' => $lang['Test_config2'], ! 'L_STARTKIT_GET' => $lang['Startkit_get'], 'L_STARTKIT_GET_EXPLAIN' => $lang['Startkit_get_explain'], 'L_TEST_GET' => $lang['Test_get_par'], ! // // Values --- 171,202 ---- // Pass Block data to template // ! $template->assign_vars( array( // // Titles // 'L_STARTKIT' => $lang['Startkit'], ! 'L_STARTKIT_PARAMETER' => $lang['Startkit_parameter'], 'L_STARTKIT_PARAMETER_EXPLAIN' => $lang['Startkit_parameter_explain'], 'L_TEST_STRING' => $lang['Test_string'], 'L_TEST_NUMBER' => $lang['Test_number'], ! 'L_STARTKIT_PARAMETER_MODIFIED' => $lang['Startkit_parameter_modified'], 'L_STARTKIT_PARAMETER_MODIFIED_EXPLAIN' => $lang['Startkit_parameter_modified_explain'], 'L_TEST_MODIFIED' => $lang['Test_modified'], ! 'L_STARTKIT_PARAMETER_CUSTOM' => $lang['Startkit_parameter_custom'], 'L_STARTKIT_PARAMETER_CUSTOM_EXPLAIN' => $lang['Startkit_parameter_custom_explain'], 'L_TEST_CUSTOM' => $lang['Test_custom'], ! 'L_STARTKIT_CONFIG' => $lang['Startkit_config'], 'L_STARTKIT_CONFIG_EXPLAIN' => $lang['Startkit_config_explain'], 'L_TEST_CONFIG1' => $lang['Test_config1'], 'L_TEST_CONFIG2' => $lang['Test_config2'], ! 'L_STARTKIT_GET' => $lang['Startkit_get'], 'L_STARTKIT_GET_EXPLAIN' => $lang['Startkit_get_explain'], 'L_TEST_GET' => $lang['Test_get_par'], ! // // Values *************** *** 206,220 **** 'TEST_MODIFIED' => $mx_manipulated_test_number, 'TEST_CUSTOM' => $startkit_module_name, ! 'TEST_CONFIG1' => $mx_module_configs['startkit_config1'], ! 'TEST_CONFIG2' => $mx_module_configs['startkit_config2'], ! 'TEST_GET' => $test_get_var )); ! // // Generate Block // ! $template->pparse( 'body' ); ?> \ No newline at end of file --- 206,220 ---- 'TEST_MODIFIED' => $mx_manipulated_test_number, 'TEST_CUSTOM' => $startkit_module_name, ! 'TEST_CONFIG1' => $mx_module_configs['startkit_config1'], ! 'TEST_CONFIG2' => $mx_module_configs['startkit_config2'], ! 'TEST_GET' => $test_get_var )); ! // // Generate Block // ! $template->pparse( 'body' ); ?> \ No newline at end of file |
|
From: Jon O. <jon...@us...> - 2006-06-17 20:46:30
|
Update of /cvsroot/mxbb/mx_dev_startkit/includes In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv4620/modules/mx_dev_startkit/includes Modified Files: startkit_constants.php startkit_functions.php Log Message: security Index: startkit_constants.php =================================================================== RCS file: /cvsroot/mxbb/mx_dev_startkit/includes/startkit_constants.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** startkit_constants.php 5 Apr 2006 20:55:19 -0000 1.3 --- startkit_constants.php 17 Jun 2006 20:46:27 -0000 1.4 *************** *** 8,12 **** * */ ! // ---------------------------------------------------------------------START // This file defines specific constants for the module --- 8,17 ---- * */ ! ! if( !defined('IN_PORTAL') || !is_object($mx_block)) ! { ! die("Hacking attempt"); ! } ! // ---------------------------------------------------------------------START // This file defines specific constants for the module *************** *** 27,31 **** // ------------------------------------------------------------------------- $mx_user->extend(); ! $mx_page->add_copyright( 'mxBB Dev Startkit Module' ); } --- 32,36 ---- // ------------------------------------------------------------------------- $mx_user->extend(); ! $mx_page->add_copyright( 'mxBB Dev Startkit Module' ); } Index: startkit_functions.php =================================================================== RCS file: /cvsroot/mxbb/mx_dev_startkit/includes/startkit_functions.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** startkit_functions.php 5 Apr 2006 20:55:19 -0000 1.3 --- startkit_functions.php 17 Jun 2006 20:46:27 -0000 1.4 *************** *** 9,12 **** --- 9,17 ---- */ + if( !defined('IN_PORTAL') || !is_object($mx_block)) + { + die("Hacking attempt"); + } + // // Module functions class *************** *** 18,22 **** // Public Methods // ! /********************************************************************************\ | Double --- 23,27 ---- // Public Methods // ! /********************************************************************************\ | Double *************** *** 25,29 **** { $new_number = $number + $number; ! return $new_number; } --- 30,34 ---- { $new_number = $number + $number; ! return $new_number; } |
|
From: Jon O. <jon...@us...> - 2006-06-17 20:45:58
|
Update of /cvsroot/mxbb/mx_calsnails In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv4201/modules/mx_calsnails Modified Files: mx_calendar_events.php mx_calendar_mini.php mx_calendar_query.php Log Message: security Index: mx_calendar_mini.php =================================================================== RCS file: /cvsroot/mxbb/mx_calsnails/mx_calendar_mini.php,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** mx_calendar_mini.php 29 May 2006 15:38:05 -0000 1.10 --- mx_calendar_mini.php 17 Jun 2006 20:45:55 -0000 1.11 *************** *** 17,20 **** include( $module_root_path . 'calendar.' . $phpEx ); $cal_mode_mini = false; - ?> \ No newline at end of file --- 17,19 ---- Index: mx_calendar_events.php =================================================================== RCS file: /cvsroot/mxbb/mx_calsnails/mx_calendar_events.php,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** mx_calendar_events.php 2 May 2006 23:25:58 -0000 1.18 --- mx_calendar_events.php 17 Jun 2006 20:45:55 -0000 1.19 *************** *** 14,19 **** } // Common Includes and Read Calendar Lite Settings ! include_once( $module_root_path . 'includes/mx_common.' . $phpEx ); --- 14,20 ---- } + // // Common Includes and Read Calendar Lite Settings ! // include_once( $module_root_path . 'includes/mx_common.' . $phpEx ); *************** *** 93,100 **** { // -------------------------------------------------------------------------------- ! $template->set_filenames( array( 'body' => 'mx_calendar_events.tpl' ) ); ! // Compute date range depending on block parameters. ! switch ( $events_range ) { --- 94,101 ---- { // -------------------------------------------------------------------------------- ! $template->set_filenames( array( 'body' => 'mx_calendar_events.tpl' ) ); ! // Compute date range depending on block parameters. ! switch ( $events_range ) { *************** *** 136,143 **** } list( $ini_yy, $ini_mm, $ini_dd ) = explode( '-', create_date( 'Y-m-j', $ini_time, $cal_timezone ) ); ! list( $end_yy, $end_mm, $end_dd ) = explode( '-', create_date( 'Y-m-j', $end_time, $cal_timezone ) ); ! // Build the query (note use of fixed condition: valid = 'yes'). ! $sql = "SELECT * FROM " . CALLITE_EVENTS_TABLE . " WHERE valid = 'yes' AND "; --- 137,144 ---- } list( $ini_yy, $ini_mm, $ini_dd ) = explode( '-', create_date( 'Y-m-j', $ini_time, $cal_timezone ) ); ! list( $end_yy, $end_mm, $end_dd ) = explode( '-', create_date( 'Y-m-j', $end_time, $cal_timezone ) ); ! // Build the query (note use of fixed condition: valid = 'yes'). ! $sql = "SELECT * FROM " . CALLITE_EVENTS_TABLE . " WHERE valid = 'yes' AND "; *************** *** 153,160 **** { mx_message_die( GENERAL_ERROR, 'Could not select Event data', '', __LINE__, __FILE__, $sql ); ! } ! // Loop through Calendar Events... ! $today = create_date( 'Y-m-d', time(), $cal_timezone ); $check = 0; --- 154,161 ---- { mx_message_die( GENERAL_ERROR, 'Could not select Event data', '', __LINE__, __FILE__, $sql ); ! } ! // Loop through Calendar Events... ! $today = create_date( 'Y-m-d', time(), $cal_timezone ); $check = 0; *************** *** 182,186 **** $u_end_date = append_sid( $mx_root_path . 'index.' . $phpEx . "?page=" . $cal_page_id . "&day=" . $dd . "&month=" . $mm . "&year=" . $yy . "&mode=display" ); ! $template->assign_block_vars( 'event_row', array( 'SUBJECT' => $subject, 'ROW_CLASS' => ( $today >= substr( $row['stamp'], 0, 10 ) && $today <= $row['eventspan'] ? 'row1' : 'row1' ), --- 183,187 ---- $u_end_date = append_sid( $mx_root_path . 'index.' . $phpEx . "?page=" . $cal_page_id . "&day=" . $dd . "&month=" . $mm . "&year=" . $yy . "&mode=display" ); ! $template->assign_block_vars( 'event_row', array( 'SUBJECT' => $subject, 'ROW_CLASS' => ( $today >= substr( $row['stamp'], 0, 10 ) && $today <= $row['eventspan'] ? 'row1' : 'row1' ), *************** *** 193,197 **** 'AUTHOR' => stripslashes( $row['username'] ), 'DESC' => $zdesc, ! 'U_MORE_INFO' => $u_ini_date . "&id=" . $id ) ); --- 194,198 ---- 'AUTHOR' => stripslashes( $row['username'] ), 'DESC' => $zdesc, ! 'U_MORE_INFO' => $u_ini_date . "&id=" . $id ) ); *************** *** 211,219 **** $lastdate = $ini_date; $check++; ! } $db->sql_freeresult($result); ! // Do we get any event? Do we need to enable scrollbars? ! if ( $check == 0 ) { --- 212,220 ---- $lastdate = $ini_date; $check++; ! } $db->sql_freeresult($result); ! // Do we get any event? Do we need to enable scrollbars? ! if ( $check == 0 ) { *************** *** 230,234 **** $cdd = create_date( "j", time(), $userdata['calsnails_timezone'] ); $cmm = create_date( "m", time(), $userdata['calsnails_timezone'] ); ! $cyy = create_date( "Y", time(), $userdata['calsnails_timezone'] ); // Added Week $currentweek = week_of_year( $cdd, $cmm, $cyy ); --- 231,235 ---- $cdd = create_date( "j", time(), $userdata['calsnails_timezone'] ); $cmm = create_date( "m", time(), $userdata['calsnails_timezone'] ); ! $cyy = create_date( "Y", time(), $userdata['calsnails_timezone'] ); // Added Week $currentweek = week_of_year( $cdd, $cmm, $cyy ); *************** *** 241,246 **** $nextmonthname = $lang['datetime'][gmdate( "F", gmmktime( 0, 0, 0, $mm_tmp, 1, $yy_tmp ) )]; ! $curdayname = $lang['datetime'][gmdate( "D", gmmktime( 0, 0, 0, $cmm, $cdd, $cyy ) )]; ! // Compute top label. switch ( $events_range ) --- 242,247 ---- $nextmonthname = $lang['datetime'][gmdate( "F", gmmktime( 0, 0, 0, $mm_tmp, 1, $yy_tmp ) )]; ! $curdayname = $lang['datetime'][gmdate( "D", gmmktime( 0, 0, 0, $cmm, $cdd, $cyy ) )]; ! // Compute top label. switch ( $events_range ) *************** *** 263,270 **** default: break; ! } ! // Setup common template vars and display the block. ! $template->assign_vars( array( 'BLOCK_SIZE' => $block_size, 'EVENTS_LABEL' => $events_label, --- 264,271 ---- default: break; ! } ! // Setup common template vars and display the block. ! $template->assign_vars( array( 'BLOCK_SIZE' => $block_size, 'EVENTS_LABEL' => $events_label, *************** *** 272,276 **** 'BLOCK_VSIZE' => $block_vsize, 'L_TITLE' => $block_title, ! 'L_MORE_INFO' => $lang['More_Info'] ) ); --- 273,277 ---- 'BLOCK_VSIZE' => $block_vsize, 'L_TITLE' => $block_title, ! 'L_MORE_INFO' => $lang['More_Info'] ) ); Index: mx_calendar_query.php =================================================================== RCS file: /cvsroot/mxbb/mx_calsnails/mx_calendar_query.php,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** mx_calendar_query.php 2 May 2006 23:25:58 -0000 1.12 --- mx_calendar_query.php 17 Jun 2006 20:45:55 -0000 1.13 *************** *** 14,19 **** } // Common Includes and Read Calendar Lite Settings ! include_once( $module_root_path . 'includes/mx_common.' . $phpEx ); --- 14,20 ---- } + // // Common Includes and Read Calendar Lite Settings ! // include_once( $module_root_path . 'includes/mx_common.' . $phpEx ); *************** *** 54,58 **** { // -------------------------------------------------------------------------------- ! $template->set_filenames( array( 'body' => 'mx_calendar_query.tpl' ) ); --- 55,59 ---- { // -------------------------------------------------------------------------------- ! $template->set_filenames( array( 'body' => 'mx_calendar_query.tpl' ) ); *************** *** 82,86 **** 'DESC' => '<b>DESCRIPTION</b>', 'BBTEXT' => '', ! 'AUTHOR' => '<b>USERNAME</b>' ) ); } --- 83,87 ---- 'DESC' => '<b>DESCRIPTION</b>', 'BBTEXT' => '', ! 'AUTHOR' => '<b>USERNAME</b>' ) ); } *************** *** 92,101 **** 'DESC' => stripslashes( $row['description'] ), 'BBTEXT' => my_decode_bbtext( $row['description'], $row['bbcode_uid'] ), ! 'AUTHOR' => stripslashes( $row['username'] ) ) ); $check++; } $db->sql_freeresult($result); ! if ( $check == 0 ) { --- 93,102 ---- 'DESC' => stripslashes( $row['description'] ), 'BBTEXT' => my_decode_bbtext( $row['description'], $row['bbcode_uid'] ), ! 'AUTHOR' => stripslashes( $row['username'] ) ) ); $check++; } $db->sql_freeresult($result); ! if ( $check == 0 ) { *************** *** 103,107 **** } $template->assign_vars( array( 'BLOCK_SIZE' => $block_size, ! 'L_TITLE' => ( $block_title == '' ? $lang['Calendar_Events'] : $block_title ) ) ); $template->pparse( 'body' ); --- 104,108 ---- } $template->assign_vars( array( 'BLOCK_SIZE' => $block_size, ! 'L_TITLE' => ( $block_title == '' ? $lang['Calendar_Events'] : $block_title ) ) ); $template->pparse( 'body' ); |
|
From: Jon O. <jon...@us...> - 2006-06-17 20:45:27
|
Update of /cvsroot/mxbb/core/modules/mx_textblocks In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv4108/modules/mx_textblocks Modified Files: mx_textblock_blog.php Log Message: security Index: mx_textblock_blog.php =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_textblocks/mx_textblock_blog.php,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** mx_textblock_blog.php 5 Apr 2006 21:07:17 -0000 1.12 --- mx_textblock_blog.php 17 Jun 2006 20:45:22 -0000 1.13 *************** *** 4,20 **** * @package mxBB Portal Module - mx_textblocks * @version $Id$ ! * @copyright (c) 2002-2006 [Jon Ohlsson] mxBB Project Team * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 * */ ! // NOTE: This script is NOT updated for mxBB 2.8 ! ! if( !defined('IN_PORTAL') ) { die("Hacking attempt"); } - if( isset($HTTP_POST_VARS['u']) || isset($HTTP_GET_VARS['u']) ) { --- 4,19 ---- * @package mxBB Portal Module - mx_textblocks * @version $Id$ ! * @copyright (c) 2002-2006 [Jon Ohlsson] mxBB Project Team * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 * */ ! // NOTE: This script is NOT updated for mxBB 2.8 ! ! if( !defined('IN_PORTAL') || !is_object($mx_block)) { die("Hacking attempt"); } if( isset($HTTP_POST_VARS['u']) || isset($HTTP_GET_VARS['u']) ) { *************** *** 136,140 **** if( !empty($blog_id) && $userdata['session_logged_in'] && $blog_mode == 'user' ) { ! $template->assign_block_vars('switch_blog_id', array( 'BLOG_ID' => sprintf($blog_id, $userdata['username']) )); --- 135,139 ---- if( !empty($blog_id) && $userdata['session_logged_in'] && $blog_mode == 'user' ) { ! $template->assign_block_vars('switch_blog_id', array( 'BLOG_ID' => sprintf($blog_id, $userdata['username']) )); *************** *** 152,156 **** 'L_TOC' => $lang['Toc_title'], 'L_GOTO_PAGE' => $lang['Goto_page'] ! )); // --- 151,155 ---- 'L_TOC' => $lang['Toc_title'], 'L_GOTO_PAGE' => $lang['Goto_page'] ! )); // *************** *** 198,202 **** { $article_toc = str_replace('\"', '"', substr(preg_replace('#(\>(((?>([^><]+|(?R)))*)\<))#se', "preg_replace(\$orig_word, \$replacement_word, '\\0')", '>' . $article_toc . '<'), 1, -1)); ! } // Replace newlines (we use this rather than nl2br because // till recently it wasn't XHTML compliant) --- 197,201 ---- { $article_toc = str_replace('\"', '"', substr(preg_replace('#(\>(((?>([^><]+|(?R)))*)\<))#se', "preg_replace(\$orig_word, \$replacement_word, '\\0')", '>' . $article_toc . '<'), 1, -1)); ! } // Replace newlines (we use this rather than nl2br because // till recently it wasn't XHTML compliant) |
|
From: Jon O. <jon...@us...> - 2006-06-17 20:45:26
|
Update of /cvsroot/mxbb/core/modules/mx_navmenu In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv4108/modules/mx_navmenu Modified Files: mx_menu_nav.php Log Message: security Index: mx_menu_nav.php =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_navmenu/mx_menu_nav.php,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** mx_menu_nav.php 2 May 2006 23:22:17 -0000 1.10 --- mx_menu_nav.php 17 Jun 2006 20:45:22 -0000 1.11 *************** *** 9,12 **** --- 9,17 ---- */ + if( !defined('IN_PORTAL') || !is_object($mx_block)) + { + die("Hacking attempt"); + } + // // Read Block Settings |
|
From: Jon O. <jon...@us...> - 2006-06-17 20:45:26
|
Update of /cvsroot/mxbb/core/modules/mx_mod_rewrite/includes In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv4108/modules/mx_mod_rewrite/includes Modified Files: rewrite_constants.php rewrite_functions.php Log Message: security Index: rewrite_constants.php =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_mod_rewrite/includes/rewrite_constants.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** rewrite_constants.php 5 Apr 2006 20:58:16 -0000 1.2 --- rewrite_constants.php 17 Jun 2006 20:45:22 -0000 1.3 *************** *** 8,12 **** * */ ! // ------------------------------------------------------------------------- // Extend User Style with module lang and images --- 8,17 ---- * */ ! ! if( !defined('IN_PORTAL') ) ! { ! die("Hacking attempt"); ! } ! // ------------------------------------------------------------------------- // Extend User Style with module lang and images Index: rewrite_functions.php =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_mod_rewrite/includes/rewrite_functions.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** rewrite_functions.php 5 Apr 2006 20:58:16 -0000 1.2 --- rewrite_functions.php 17 Jun 2006 20:45:22 -0000 1.3 *************** *** 9,12 **** --- 9,17 ---- */ + if( !defined('IN_PORTAL') ) + { + die("Hacking attempt"); + } + // // Module functions class *************** *** 18,32 **** { global $mx_root_path; ! // // First redirect to *.htm // ! $input = array( "'(?)index.php'", ! ); $output = array( "index.htm", ! ); ! $url = preg_replace($input, $output, $url); // --- 23,37 ---- { global $mx_root_path; ! // // First redirect to *.htm // ! $input = array( "'(?)index.php'", ! ); $output = array( "index.htm", ! ); ! $url = preg_replace($input, $output, $url); // *************** *** 36,44 **** { include_once( $mx_root_path . 'modules/mx_mod_rewrite/includes/rewrite_custom_defs.php' ); ! if (class_exists('mx_mod_rewrite_custom')) { $mx_mod_rewrite_custom = new mx_mod_rewrite_custom(); ! if ( method_exists( $mx_mod_rewrite_custom, 'encode' ) ) { --- 41,49 ---- { include_once( $mx_root_path . 'modules/mx_mod_rewrite/includes/rewrite_custom_defs.php' ); ! if (class_exists('mx_mod_rewrite_custom')) { $mx_mod_rewrite_custom = new mx_mod_rewrite_custom(); ! if ( method_exists( $mx_mod_rewrite_custom, 'encode' ) ) { *************** *** 47,56 **** } } ! // // Now do a standard mxBB mapping // - the keys are defined in the lang files ! // ! $input = array( // // General --- 52,61 ---- } } ! // // Now do a standard mxBB mapping // - the keys are defined in the lang files ! // ! $input = array( // // General *************** *** 60,77 **** "'(&|\&)dynamic_block=([0-9]*)'", "'(&|\&)cat_link=([0-9]*)'", ! ); $output = array( // // General ! // ! "page\\1", ! "block\\1", ! "/sub\\2", ! "/catlink\\2", ! ); ! $url = preg_replace($input, $output, $url); ! ! return $url; ! } } ?> \ No newline at end of file --- 65,82 ---- "'(&|\&)dynamic_block=([0-9]*)'", "'(&|\&)cat_link=([0-9]*)'", ! ); $output = array( // // General ! // ! "page\\1", ! "block\\1", ! "/sub\\2", ! "/catlink\\2", ! ); ! $url = preg_replace($input, $output, $url); ! ! return $url; ! } } ?> \ No newline at end of file |
|
From: Jon O. <jon...@us...> - 2006-06-17 20:45:26
|
Update of /cvsroot/mxbb/core/modules/mx_navmenu/includes In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv4108/modules/mx_navmenu/includes Modified Files: navmenu_functions.php Log Message: security Index: navmenu_functions.php =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_navmenu/includes/navmenu_functions.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** navmenu_functions.php 3 May 2006 12:02:44 -0000 1.1 --- navmenu_functions.php 17 Jun 2006 20:45:22 -0000 1.2 *************** *** 43,47 **** } - function menu_auth($type, $menu_id, $userdata, $f_access = '', $f_access_group = '') { --- 43,46 ---- |
|
From: Jon O. <jon...@us...> - 2006-06-17 20:45:25
|
Update of /cvsroot/mxbb/core/modules/mx_phpbb2blocks In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv4108/modules/mx_phpbb2blocks Modified Files: mx_last_msg.php mx_statistics.php Log Message: security Index: mx_statistics.php =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_phpbb2blocks/mx_statistics.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** mx_statistics.php 2 May 2006 23:22:17 -0000 1.1 --- mx_statistics.php 17 Jun 2006 20:45:22 -0000 1.2 *************** *** 27,30 **** --- 27,34 ---- else { + if( !defined('IN_PORTAL') || !is_object($mx_block)) + { + die("Hacking attempt"); + } // // Read Block Settings Index: mx_last_msg.php =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_phpbb2blocks/mx_last_msg.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** mx_last_msg.php 2 May 2006 23:22:17 -0000 1.1 --- mx_last_msg.php 17 Jun 2006 20:45:22 -0000 1.2 *************** *** 9,13 **** */ ! if( !defined('IN_PORTAL') ) { die("Hacking attempt"); --- 9,13 ---- */ ! if( !defined('IN_PORTAL') || !is_object($mx_block)) { die("Hacking attempt"); |
|
From: Jon O. <jon...@us...> - 2006-06-17 20:45:25
|
Update of /cvsroot/mxbb/core/modules/mx_mod_rewrite/contrib In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv4108/modules/mx_mod_rewrite/contrib Modified Files: rewrite_custom_defs.php Log Message: security Index: rewrite_custom_defs.php =================================================================== RCS file: /cvsroot/mxbb/core/modules/mx_mod_rewrite/contrib/rewrite_custom_defs.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** rewrite_custom_defs.php 5 Apr 2006 20:58:13 -0000 1.2 --- rewrite_custom_defs.php 17 Jun 2006 20:45:22 -0000 1.3 *************** *** 8,12 **** * */ ! // // Module functions class --- 8,17 ---- * */ ! ! if( !defined('IN_PORTAL') ) ! { ! die("Hacking attempt"); ! } ! // // Module functions class *************** *** 17,21 **** /* Examples given below will define rules for the following site urls: ! http://domain/home http://domain/forum --- 22,26 ---- /* Examples given below will define rules for the following site urls: ! http://domain/home http://domain/forum *************** *** 26,39 **** http://domain/info/p2 http://domain/info/p3 ! */ ! function encode($url) { ! $input = array( // // What to map? // ! /* // Examples --- 31,44 ---- http://domain/info/p2 http://domain/info/p3 ! */ ! function encode($url) { ! $input = array( // // What to map? // ! /* // Examples *************** *** 42,46 **** "'(?)index.htm\?page=3($|&|\&)'", // Something "'(?)index.htm\?page=4($|&|\&)'", // Something_more ! "'(?)index.htm\?page=5($|&|\&)'", // info "'(&|\&)dynamic_block=1'", // Sub page 1 --- 47,51 ---- "'(?)index.htm\?page=3($|&|\&)'", // Something "'(?)index.htm\?page=4($|&|\&)'", // Something_more ! "'(?)index.htm\?page=5($|&|\&)'", // info "'(&|\&)dynamic_block=1'", // Sub page 1 *************** *** 48,58 **** "'(&|\&)dynamic_block=3'", // Sub page 3 */ ! ); ! $output = array( // // Map to... // ! /* "home\\1", --- 53,63 ---- "'(&|\&)dynamic_block=3'", // Sub page 3 */ ! ); ! $output = array( // // Map to... // ! /* "home\\1", *************** *** 60,75 **** "something\\1", "something_more\\1", ! ! "info\\1", ! "/p1", ! "/p2", ! "/p3", */ ! ); ! ! $url = preg_replace($input, $output, $url); ! ! return $url; ! } } --- 65,80 ---- "something\\1", "something_more\\1", ! ! "info\\1", ! "/p1", ! "/p2", ! "/p3", */ ! ); ! ! $url = preg_replace($input, $output, $url); ! ! return $url; ! } } |
|
From: Jon O. <jon...@us...> - 2006-06-17 20:22:47
|
Update of /cvsroot/mxbb/mx_phpbb/includes In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv26581/modules/mx_phpbb/includes Modified Files: forum_hack.php Log Message: security Index: forum_hack.php =================================================================== RCS file: /cvsroot/mxbb/mx_phpbb/includes/forum_hack.php,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** forum_hack.php 29 May 2006 15:42:16 -0000 1.11 --- forum_hack.php 17 Jun 2006 20:22:44 -0000 1.12 *************** *** 9,12 **** --- 9,17 ---- */ + if ( !defined( 'IN_PORTAL' ) && !defined( 'IN_PHPBB' ) ) + { + die( "Hacking attempt" ); + } + define( 'MX_FORUM_DEBUG', 1 ); |
|
From: Jon O. <jon...@us...> - 2006-06-17 20:14:03
|
Update of /cvsroot/mxbb/mx_phpbb/admin In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv22751/modules/mx_phpbb/admin Modified Files: mx_module_defs.php Log Message: Syncronizing...and code cleanup Index: mx_module_defs.php =================================================================== RCS file: /cvsroot/mxbb/mx_phpbb/admin/mx_module_defs.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** mx_module_defs.php 29 May 2006 15:42:16 -0000 1.8 --- mx_module_defs.php 17 Jun 2006 20:14:00 -0000 1.9 *************** *** 9,12 **** --- 9,17 ---- */ + if ( !defined( 'IN_PORTAL' ) ) + { + die( "Hacking attempt" ); + } + /********************************************************************************\ | Class: mx_module_defs |
|
From: Jon O. <jon...@us...> - 2006-06-17 20:14:03
|
Update of /cvsroot/mxbb/mx_phpbb/includes In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv22751/modules/mx_phpbb/includes Modified Files: phpbb_constants.php phpbb_defs.php Log Message: Syncronizing...and code cleanup Index: phpbb_defs.php =================================================================== RCS file: /cvsroot/mxbb/mx_phpbb/includes/phpbb_defs.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** phpbb_defs.php 5 Apr 2006 22:36:12 -0000 1.3 --- phpbb_defs.php 17 Jun 2006 20:14:00 -0000 1.4 *************** *** 8,12 **** * */ ! define( 'NEWS_CAT_TABLE', FORUMS_TABLE ); $cat_extract_order = 'cat_id, forum_order'; --- 8,17 ---- * */ ! ! if ( !defined( 'IN_PORTAL' ) ) ! { ! die( "Hacking attempt" ); ! } ! define( 'NEWS_CAT_TABLE', FORUMS_TABLE ); $cat_extract_order = 'cat_id, forum_order'; Index: phpbb_constants.php =================================================================== RCS file: /cvsroot/mxbb/mx_phpbb/includes/phpbb_constants.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** phpbb_constants.php 5 Apr 2006 22:36:12 -0000 1.4 --- phpbb_constants.php 17 Jun 2006 20:14:00 -0000 1.5 *************** *** 8,12 **** * */ ! define( 'PAGE_FORUM', -502 ); define( 'PHPBB_CONFIG_TABLE', $mx_table_prefix . 'phpbb_plugin_config' ); --- 8,17 ---- * */ ! ! if ( !defined( 'IN_PORTAL' ) ) ! { ! die( "Hacking attempt" ); ! } ! define( 'PAGE_FORUM', -502 ); define( 'PHPBB_CONFIG_TABLE', $mx_table_prefix . 'phpbb_plugin_config' ); |
|
From: Jon O. <jon...@us...> - 2006-06-17 20:13:27
|
Update of /cvsroot/mxbb/mx_pafiledb/pafiledb/modules In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv22598/modules/mx_pafiledb/pafiledb/modules Modified Files: pa_download.php pa_file.php pa_license.php pa_main.php pa_mcp.php pa_post_comment.php pa_rate.php pa_search.php pa_stats.php pa_user_upload.php pa_viewall.php Log Message: Finalizing module Index: pa_viewall.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/pafiledb/modules/pa_viewall.php,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** pa_viewall.php 7 Jun 2006 20:29:52 -0000 1.14 --- pa_viewall.php 17 Jun 2006 20:13:22 -0000 1.15 *************** *** 94,105 **** $pafiledb_template->assign_vars( array( ! 'L_VIEWALL' => $lang['Viewall'], ! 'L_INDEX' => "<<", ! 'U_INDEX' => append_sid( $mx_root_path . 'index.' . $phpEx ), ! 'U_DOWNLOAD' => append_sid( pa_this_mxurl() ), ! 'DOWNLOAD' => $pafiledb_config['module_name'] ) ! ); $this->display_files( $sort_method, $sort_order, $start, true ); --- 94,105 ---- $pafiledb_template->assign_vars( array( ! 'L_VIEWALL' => $lang['Viewall'], ! 'L_INDEX' => "<<", ! 'U_INDEX' => append_sid( $mx_root_path . 'index.' . $phpEx ), ! 'U_DOWNLOAD' => append_sid( pa_this_mxurl() ), ! 'DOWNLOAD' => $pafiledb_config['module_name'] ! )); $this->display_files( $sort_method, $sort_order, $start, true ); *************** *** 112,115 **** } } - ?> \ No newline at end of file --- 112,114 ---- Index: pa_download.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/pafiledb/modules/pa_download.php,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** pa_download.php 7 Jun 2006 20:29:52 -0000 1.15 --- pa_download.php 17 Jun 2006 20:13:22 -0000 1.16 *************** *** 137,163 **** $pafiledb_template->assign_vars( array( ! 'L_INDEX' => "<<", ! 'L_MIRRORS' => $lang['Mirrors'], ! 'L_MIRROR_LOCATION' => $lang['Mirror_location'], ! 'L_DOWNLOAD' => $lang['Download_file'], ! 'U_INDEX' => append_sid( $mx_root_path . 'index.' . $phpEx ), ! 'U_DOWNLOAD_HOME' => append_sid( pa_this_mxurl() ), ! 'FILE_NAME' => $file_data['file_name'], ! 'DOWNLOAD' => $pafiledb_config['module_name'] ) ! ); $pafiledb_template->assign_block_vars( 'mirror_row', array( ! 'U_DOWNLOAD' => append_sid( $pa_this_mxurl( 'action=download&file_id=' . $file_id . '&mirror_id=-1' ) ), ! 'MIRROR_LOCATION' => $board_config['sitename'] ) ! ); foreach( $mirrors_data as $mir_id => $mirror_data ) { $pafiledb_template->assign_block_vars( 'mirror_row', array( ! 'U_DOWNLOAD' => append_sid( pa_this_mxurl( 'action=download&file_id=' . $file_id . '&mirror_id=' . $mir_id ) ), ! 'MIRROR_LOCATION' => $mirror_data['mirror_location'] ) ! ); } --- 137,163 ---- $pafiledb_template->assign_vars( array( ! 'L_INDEX' => "<<", ! 'L_MIRRORS' => $lang['Mirrors'], ! 'L_MIRROR_LOCATION' => $lang['Mirror_location'], ! 'L_DOWNLOAD' => $lang['Download_file'], ! 'U_INDEX' => append_sid( $mx_root_path . 'index.' . $phpEx ), ! 'U_DOWNLOAD_HOME' => append_sid( pa_this_mxurl() ), ! 'FILE_NAME' => $file_data['file_name'], ! 'DOWNLOAD' => $pafiledb_config['module_name'] ! )); $pafiledb_template->assign_block_vars( 'mirror_row', array( ! 'U_DOWNLOAD' => append_sid( $pa_this_mxurl( 'action=download&file_id=' . $file_id . '&mirror_id=-1' ) ), ! 'MIRROR_LOCATION' => $board_config['sitename'] ! )); foreach( $mirrors_data as $mir_id => $mirror_data ) { $pafiledb_template->assign_block_vars( 'mirror_row', array( ! 'U_DOWNLOAD' => append_sid( pa_this_mxurl( 'action=download&file_id=' . $file_id . '&mirror_id=' . $mir_id ) ), ! 'MIRROR_LOCATION' => $mirror_data['mirror_location'] ! )); } *************** *** 233,389 **** } } - // ========================================================================= - // this function Borrowed from Acyd Burn attachment mod, (thanks Acyd for this great mod) - // ========================================================================= - function send_file_to_browser( $real_filename, $mimetype, $physical_filename, $upload_dir ) - { - global $_SERVER, $HTTP_USER_AGENT, $HTTP_SERVER_VARS, $lang, $db, $pafiledb_functions; - - if ( $upload_dir == '' ) - { - $filename = $physical_filename; - } - else - { - $filename = $upload_dir . $physical_filename; - } - - $gotit = false; - - if ( @!file_exists( @$pafiledb_functions->pafiledb_realpath( $filename ) ) ) - { - mx_message_die( GENERAL_ERROR, $lang['Error_no_download'] . '<br /><br /><b>404 File Not Found:</b> The File <i>' . $filename . '</i> does not exist.' ); - } - else - { - $gotit = true; - $size = @filesize( $filename ); - if ( $size > ( 1048575 * 6 ) ) - { - return false; - } - } - - // Determine the Browser the User is using, because of some nasty incompatibilities. - // Most of the methods used in this function are from phpMyAdmin. :) - - $user_agent = ( !empty( $_SERVER['HTTP_USER_AGENT'] ) ) ? $_SERVER['HTTP_USER_AGENT'] : ( ( !empty( $HTTP_SERVER_VARS['HTTP_USER_AGENT'] ) ) ? $HTTP_SERVER_VARS['HTTP_USER_AGENT'] : '' ); - - if ( ereg( 'Opera(/| )([0-9].[0-9]{1,2})', $user_agent, $log_version ) ) - { - $browser_version = $log_version[2]; - $browser_agent = 'opera'; - } - else if ( ereg( 'MSIE ([0-9].[0-9]{1,2})', $user_agent, $log_version ) ) - { - $browser_version = $log_version[1]; - $browser_agent = 'ie'; - } - else if ( ereg( 'OmniWeb/([0-9].[0-9]{1,2})', $user_agent, $log_version ) ) - { - $browser_version = $log_version[1]; - $browser_agent = 'omniweb'; - } - else if ( ereg( '(Konqueror/)(.*)(;)', $user_agent, $log_version ) ) - { - $browser_version = $log_version[2]; - $browser_agent = 'konqueror'; - } - else if ( ereg( 'Mozilla/([0-9].[0-9]{1,2})', $user_agent, $log_version ) && ereg( 'Safari/([0-9]*)', $user_agent, $log_version2 ) ) - { - $browser_version = $log_version[1] . '.' . $log_version2[1]; - $browser_agent = 'safari'; - } - else if ( ereg( 'Mozilla/([0-9].[0-9]{1,2})', $user_agent, $log_version ) ) - { - $browser_version = $log_version[1]; - $browser_agent = 'mozilla'; - } - else - { - $browser_version = 0; - $browser_agent = 'other'; - } - - // Correct the Mime Type, if it's an octetstream - - if ( ( $mimetype == 'application/octet-stream' ) || ( $mimetype == 'application/octetstream' ) ) - { - if ( ( $browser_agent == 'ie' ) || ( $browser_agent == 'opera' ) ) - { - $mimetype = 'application/octetstream'; - } - else - { - $mimetype = 'application/octet-stream'; - } - } - - @ob_end_clean(); - @ini_set( 'zlib.output_compression', 'Off' ); - header( 'Pragma: public' ); - header( 'Content-Transfer-Encoding: none' ); - - // Send out the Headers - - if ( $browser_agent == 'ie' ) - { - header( 'Content-Type: ' . $mimetype . '; name="' . $real_filename . '"' ); - header( 'Content-Disposition: inline; filename="' . $real_filename . '"' ); - } - else - { - header( 'Content-Type: ' . $mimetype . '; name="' . $real_filename . '"' ); - header( 'Content-Disposition: attachment; filename=' . $real_filename ); - } - - // Now send the File Contents to the Browser - - if ( $gotit ) - { - if ( $size ) - { - header( "Content-length: $size" ); - } - - $result = @readfile( $filename ); - - if ( !$result ) - { - return true; - } - } - else - { - return false; - } - - @flush(); - exit(); - } - - function pa_redirect( $file_url ) - { - global $pafiledb_cache, $db; - if ( isset( $db ) ) - { - $db->sql_close(); - } - - if ( isset( $pafiledb_cache ) ) - { - $pafiledb_cache->unload(); - } - // Redirect via an HTML form for PITA webservers - if ( @preg_match( '/Microsoft|WebSTAR|Xitami/', getenv( 'SERVER_SOFTWARE' ) ) ) - { - header( 'Refresh: 0; URL=' . $file_url ); - echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><meta http-equiv="refresh" content="0; url=' . $file_url . '"><title>Redirect</title></head><body><div align="center">If your browser does not support meta redirection please click <a href="' . $file_url . '">HERE</a> to be redirected</div></body></html>'; - exit; - } - // Behave as per HTTP/1.1 spec for others - Header( "Location: $file_url" ); - exit(); - } - ?> \ No newline at end of file --- 233,235 ---- Index: pa_post_comment.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/pafiledb/modules/pa_post_comment.php,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** pa_post_comment.php 7 Jun 2006 20:29:52 -0000 1.14 --- pa_post_comment.php 17 Jun 2006 20:13:22 -0000 1.15 *************** *** 40,44 **** // Request vars // ! $cid = $mx_request_vars->request('cid', MX_TYPE_INT, ''); if ( $mx_request_vars->is_request('item_id') && $mx_request_vars->is_request('cat_id') ) --- 40,44 ---- // Request vars // ! $cid = $mx_request_vars->request('cid', MX_TYPE_INT, 0); if ( $mx_request_vars->is_request('item_id') && $mx_request_vars->is_request('cat_id') ) *************** *** 59,63 **** $message = ( !empty( $_POST['message'] ) ) ? htmlspecialchars( trim( stripslashes( $_POST['message'] ) ) ) : ''; ! $sql = "SELECT file_name, file_catid FROM " . PA_FILES_TABLE . " WHERE file_id = '" . $item_id . "'"; --- 59,63 ---- $message = ( !empty( $_POST['message'] ) ) ? htmlspecialchars( trim( stripslashes( $_POST['message'] ) ) ) : ''; ! $sql = "SELECT * FROM " . PA_FILES_TABLE . " WHERE file_id = '" . $item_id . "'"; *************** *** 393,469 **** if ( $submit ) { ! // ! // vars ! // ! $length = strlen( $_POST['message'] ); ! ! $title = ( !empty( $_POST['subject'] ) ) ? htmlspecialchars( trim ( $_POST['subject'] ) ) : ''; ! ! $comment_bbcode_uid = make_bbcode_uid(); ! $comments_text = str_replace( '<br />', "\n", $_POST['message'] ); ! $comments_text = prepare_message( trim($comments_text), $html_on, $bbcode_on, $smilies_on, $comment_bbcode_uid ); ! $comments_text = bbencode_first_pass( $comments_text, $comment_bbcode_uid ); ! ! if ( $length > $pafiledb_config['max_comment_chars'] ) ! { ! mx_message_die( GENERAL_ERROR, 'Your comment is too long!<br/>The maximum length allowed in characters is ' . $pafiledb_config['max_comment_chars'] . '' ); ! } ! ! if ( $mx_request_vars->is_request('cid') ) ! { ! if ( $this->comments[$file_data['file_catid']]['internal_comments'] ) ! { ! $sql = "UPDATE " . PA_COMMENTS_TABLE . " ! SET comments_text = '" . str_replace( "\'", "''", $comments_text ) . "', ! comments_title = '" . str_replace( "\'", "''", $title ) . "', ! comment_bbcode_uid = '" . $comment_bbcode_uid . "' ! WHERE comments_id = " . $mx_request_vars->request('cid', MX_TYPE_INT, 0) . " ! AND file_id = ". $item_id; ! } ! else ! { ! include( $module_root_path . 'pafiledb/includes/functions_comment.' . $phpEx ); ! $pafiledb_comments = new pafiledb_comments(); ! $pafiledb_comments->init( $item_id ); ! ! $pafiledb_comments->post( 'update', $cid, $title, $comments_text, $userdata['user_id'], $userdata['username'], 0, '', '', $comment_bbcode_uid); ! //$pafiledb_comments->insert_phpbb_post( $title, $comments_text, $forum_id, $userdata['user_id'], $userdata['username'], 0, $topic_id, $cid, '', '', $comment_bbcode_uid ); ! } ! ! } ! else ! { ! if ( $this->comments[$file_data['file_catid']]['internal_comments'] ) ! { ! $time = time(); ! $poster_id = intval( $userdata['user_id'] ); ! $sql = "INSERT INTO " . PA_COMMENTS_TABLE . "(file_id, comments_text, comments_title, comments_time, comment_bbcode_uid, poster_id) ! VALUES('$item_id','" . str_replace( "\'", "''", $comments_text ) . "','" . str_replace( "\'", "''", $title ) . "','$time', '$comment_bbcode_uid','$poster_id')"; ! } ! else ! { ! include( $module_root_path . 'pafiledb/includes/functions_comment.' . $phpEx ); ! $pafiledb_comments = new pafiledb_comments(); ! $pafiledb_comments->init( $item_id ); ! ! $pafiledb_comments->post( 'insert', '', $title, $comments_text, $userdata['user_id'], $userdata['username'], 0, '', '', $comment_bbcode_uid); ! //$pafiledb_comments->insert_phpbb_post( $title, $comments_text, $forum_id, $userdata['user_id'], $userdata['username'], 0, $topic_id, '', '', '', $comment_bbcode_uid ); ! ! } ! ! } ! ! // ! // Notification ! // ! ! ! // ! // Done ! // ! if ( !( $db->sql_query( $sql ) ) ) ! { ! mx_message_die( GENERAL_ERROR, 'Couldnt insert comments', '', __LINE__, __FILE__, $sql ); ! } $message = $lang['Comment_posted'] . '<br /><br />' . sprintf( $lang['Click_return'], '<a href="' . append_sid( pa_this_mxurl( 'action=file&file_id=' . $item_id ) ) . '">', '</a>' ); --- 393,397 ---- if ( $submit ) { ! $this->update_add_comment($file_data, $item_id, $cid, '', '', $html_on, $bbcode_on, $smilies_on); $message = $lang['Comment_posted'] . '<br /><br />' . sprintf( $lang['Click_return'], '<a href="' . append_sid( pa_this_mxurl( 'action=file&file_id=' . $item_id ) ) . '">', '</a>' ); Index: pa_user_upload.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/pafiledb/modules/pa_user_upload.php,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** pa_user_upload.php 7 Jun 2006 20:29:52 -0000 1.18 --- pa_user_upload.php 17 Jun 2006 20:13:22 -0000 1.19 *************** *** 27,31 **** function main( $action ) { ! global $_REQUEST, $_POST, $pafiledb_config, $phpbb_root_path; global $pafiledb_template, $db, $lang, $userdata, $user_ip, $phpEx, $pafiledb_functions; global $mx_root_path, $module_root_path, $is_block, $phpEx; --- 27,31 ---- function main( $action ) { ! global $_REQUEST, $_POST, $pafiledb_config, $board_config, $phpbb_root_path; global $pafiledb_template, $db, $lang, $userdata, $user_ip, $phpEx, $pafiledb_functions; global $mx_root_path, $module_root_path, $is_block, $phpEx; *************** *** 36,39 **** --- 36,51 ---- include( $module_root_path . 'pafiledb/includes/functions_field.' . $phpEx ); + // ********************************************************************** + // Read language definition + // ********************************************************************** + if ( !file_exists( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ) ) + { + include( $module_root_path . 'language/lang_english/lang_admin.' . $phpEx ); + } + else + { + include( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ); + } + $custom_field = new custom_field(); $custom_field->init(); *************** *** 88,91 **** --- 100,135 ---- if ( ( $this->auth[$file_info['file_catid']]['auth_delete_file'] && $file_info['user_id'] == $userdata['user_id'] ) || $this->auth[$file_info['file_catid']]['auth_mod'] ) { + // + // Notification + // + $this->update_add_file_notify($file_id, 'delete'); + + // + // Comments + // + if ($this->comments[$file_info['file_catid']]['activated'] && $pafiledb_config['del_topic']) + { + if ( $this->comments[$file_info['file_catid']]['internal_comments'] ) + { + $sql = 'DELETE FROM ' . PA_COMMENTS_TABLE . " + WHERE file_id = '" . $file_id . "'"; + + if ( !( $db->sql_query( $sql ) ) ) + { + mx_message_die( GENERAL_ERROR, 'Couldnt delete comments', '', __LINE__, __FILE__, $sql ); + } + } + else + { + if ( $file_info['topic_id'] ) + { + include( $module_root_path . 'pafiledb/includes/functions_comment.' . $phpEx ); + $mx_pa_comments = new pafiledb_comments(); + $mx_pa_comments->init( $file_info, 'phpbb'); + $mx_pa_comments->post('delete_all', $file_info['topic_id']); + } + } + } + $this->delete_files( $file_id ); $this->_pafiledb(); *************** *** 106,115 **** if ( !$file_id ) { ! $temp_id = $this->update_add_file(); ! $custom_field->file_update_data( $temp_id ); if ( $this->auth[$cat_id]['auth_approval'] || ( $this->auth[$cat_id]['auth_mod'] && $userdata['session_logged_in'] )) { ! $message = $lang['Fileadded'] . '<br /><br />' . sprintf( $lang['Click_return'], '<a href="' . append_sid( pa_this_mxurl( "action=file&file_id=" . $temp_id ) ) . '">', '</a>' ); } else --- 150,160 ---- if ( !$file_id ) { ! $pa_post_mode = 'add'; ! $file_id = $this->update_add_file(); ! $custom_field->file_update_data( $file_id ); if ( $this->auth[$cat_id]['auth_approval'] || ( $this->auth[$cat_id]['auth_mod'] && $userdata['session_logged_in'] )) { ! $message = $lang['Fileadded'] . '<br /><br />' . sprintf( $lang['Click_return'], '<a href="' . append_sid( pa_this_mxurl( "action=file&file_id=" . $file_id ) ) . '">', '</a>' ); } else *************** *** 119,180 **** $this->_pafiledb(); - - /* - $pa_pm = array(); - - // - // Populate the pa_pm variable - // - $pa_pm = pa_get_pm_data( $temp_id ); - - // - // Compose post header - // - $pa_message_tmp = pa_compose_pm( $pa_pm ); - $pa_message = $pa_message_tmp['message']; - $pa_update_message = $pa_message_tmp['update_message']; - - // - // PM notify - // - $pa_admins = pa_get_admins( true ); - - for ($i = 0; $i < count($pa_admins) || $i < 10; $i++) - { - pa_notify( $pafiledb_config['notify'], $pa_message, $pa_admins[$i]['user_id'], $pa_pm['file_editor_id'], $info = 'new' ); - } - */ } ! elseif ( $file_id != '' ) { $file_id = $this->update_add_file( $file_id ); $custom_field->file_update_data( $file_id ); - $this->_pafiledb(); ! $pa_pm = array(); ! // ! // Populate the pa_pm variable ! // ! $pa_pm = pa_get_pm_data( $file_id ); // ! // Compose post header // ! $pa_message_tmp = pa_compose_pm( $pa_pm ); ! $pa_message = $pa_message_tmp['message']; ! $pa_update_message = $pa_message_tmp['update_message']; // ! // PM notify // ! $pa_admins = pa_get_admins( true); ! ! for ($i = 0; $i < count($pa_admins) || $i < 10; $i++) ! { ! pa_notify( $pafiledb_config['notify'], $pa_message, $pa_admins[$i]['user_id'], $pa_pm['file_editor_id'], $info = 'edited' ); ! } ! ! $message = $lang['Fileedited'] . '<br /><br />' . sprintf( $lang['Click_return'], '<a href="' . append_sid( pa_this_mxurl( "action=file&file_id=" . $file_id ) ) . '">', '</a>' ); } --- 164,200 ---- $this->_pafiledb(); } ! else { + $pa_post_mode = 'edit'; $file_id = $this->update_add_file( $file_id ); $custom_field->file_update_data( $file_id ); ! $message = $lang['Fileedited'] . '<br /><br />' . sprintf( $lang['Click_return'], '<a href="' . append_sid( pa_this_mxurl( "action=file&file_id=" . $file_id ) ) . '">', '</a>' ); ! $this->_pafiledb(); ! } + // + // Notification + // + $this->update_add_file_notify($file_id, $pa_post_mode); + + // + // Auto comment + // + if ( $this->comments[$cat_id]['activated'] && $this->comments[$cat_id]['autogenerate_comments'] ) + { // ! // Autogenerate comment (duplicate the notification message) // ! $mx_pa_notification = new mx_pa_notification(); ! $mx_pa_notification->init( $file_id ); ! $mx_pa_notification->_compose_auto_note($pa_post_mode == 'add' ? MX_NEW_NOTIFICATION : MX_EDITED_NOTIFICATION); // ! // Generate comment // ! $this->update_add_comment('', $file_id, 0, addslashes(trim($mx_pa_notification->subject)), addslashes(trim($mx_pa_notification->message))); } *************** *** 258,336 **** $pafiledb_template->assign_vars( array( ! 'S_ADD_FILE_ACTION' => append_sid( pa_this_mxurl() ), ! ! 'DOWNLOAD' => $pafiledb_config['module_name'], ! 'FILESIZE' => intval( $pafiledb_config['max_file_size'] ), ! 'FILE_NAME' => $file_name, ! 'FILE_DESC' => $file_desc, ! 'FILE_LONG_DESC' => $file_long_desc, ! 'FILE_AUTHOR' => $file_author, ! 'FILE_VERSION' => $file_version, ! 'FILE_SSURL' => $file_ssurl, ! 'FILE_WEBSITE' => $file_website, ! 'FILE_DLURL' => $file_url, ! 'FILE_DOWNLOAD' => $file_download, ! 'CUSTOM_EXIST' => $custom_exist, ! 'AUTH_APPROVAL' => false, ! 'APPROVED_CHECKED_YES' => $approved_checked_yes, ! 'APPROVED_CHECKED_NO' => $approved_checked_no, ! 'SS_CHECKED_YES' => $ss_checked_yes, ! 'SS_CHECKED_NO' => $ss_checked_no, ! 'PIN_CHECKED_YES' => $pin_checked_yes, ! 'PIN_CHECKED_NO' => $pin_checked_no, ! 'L_INDEX' => "<<", ! 'L_UPLOAD' => $lang['User_upload'], ! 'L_FILE_TITLE' => $l_title, ! 'L_FILE_APPROVED' => $lang['Approved'], ! 'L_FILE_APPROVED_INFO' => $lang['Approved_info'], ! 'L_ADDTIONAL_FIELD' => $lang['Addtional_field'], ! 'L_SCREENSHOT' => $lang['Scrsht'], ! 'L_FILES' => $lang['Files'], ! 'L_FILE_NAME' => $lang['Filename'], ! 'L_FILE_NAME_INFO' => $lang['Filenameinfo'], ! 'L_FILE_SHORT_DESC' => $lang['Filesd'], ! 'L_FILE_SHORT_DESC_INFO' => $lang['Filesdinfo'], ! 'L_FILE_LONG_DESC' => $lang['Fileld'], ! 'L_FILE_LONG_DESC_INFO' => $lang['Fileldinfo'], ! 'L_FILE_AUTHOR' => $lang['Filecreator'], ! 'L_FILE_AUTHOR_INFO' => $lang['Filecreatorinfo'], ! 'L_FILE_VERSION' => $lang['Fileversion'], ! 'L_FILE_VERSION_INFO' => $lang['Fileversioninfo'], ! 'L_FILESS' => $lang['Filess'], ! 'L_FILESSINFO' => $lang['Filessinfo'], ! 'L_FILESS_UPLOAD' => $lang['Filess_upload'], ! 'L_FILESSINFO_UPLOAD' => $lang['Filessinfo_upload'], ! 'L_FILE_SSLINK' => $lang['Filess_link'], ! 'L_FILE_SSLINK_INFO' => $lang['Filess_link_info'], ! 'L_FILESSUPLOAD' => $lang['Filessupload'], ! 'L_FILE_WEBSITE' => $lang['Filedocs'], ! 'L_FILE_WEBSITE_INFO' => $lang['Filedocsinfo'], ! 'L_FILE_URL' => $lang['Fileurl'], ! 'L_FILE_UPLOAD' => $lang['File_upload'], ! 'L_FILEINFO_UPLOAD' => $lang['Fileinfo_upload'], ! 'L_FILE_URL_INFO' => $lang['Fileurlinfo'], ! 'L_FILE_POSTICONS' => $lang['Filepi'], ! 'L_FILE_POSTICONS_INFO' => $lang['Filepiinfo'], ! 'L_FILE_CAT' => $lang['Filecat'], ! 'L_FILE_CAT_INFO' => $lang['Filecatinfo'], ! 'L_FILE_LICENSE' => $lang['Filelicense'], ! 'L_NONE' => $lang['None'], ! 'L_FILE_LICENSE_INFO' => $lang['Filelicenseinfo'], ! 'L_FILE_PINNED' => $lang['Filepin'], ! 'L_FILE_PINNED_INFO' => $lang['Filepininfo'], ! 'L_FILE_DOWNLOAD' => $lang['Filedls'], ! 'L_NO' => $lang['No'], ! 'L_YES' => $lang['Yes'], ! 'S_POSTICONS' => $file_posticons, ! 'S_LICENSE_LIST' => $file_license, ! 'S_CAT_LIST' => $file_cat_list, ! 'S_HIDDEN_FIELDS' => $s_hidden_fields, ! 'MODE' => $mode, ! 'U_INDEX' => append_sid( $mx_root_path . 'index.' . $phpEx ), ! 'U_DOWNLOAD' => append_sid( pa_this_mxurl() ) ) ! ); $this->display( $lang['Download'], 'pa_file_add.tpl' ); --- 278,355 ---- $pafiledb_template->assign_vars( array( ! 'S_ADD_FILE_ACTION' => append_sid( pa_this_mxurl() ), ! 'DOWNLOAD' => $pafiledb_config['module_name'], ! 'FILESIZE' => intval( $pafiledb_config['max_file_size'] ), ! 'FILE_NAME' => $file_name, ! 'FILE_DESC' => $file_desc, ! 'FILE_LONG_DESC' => $file_long_desc, ! 'FILE_AUTHOR' => $file_author, ! 'FILE_VERSION' => $file_version, ! 'FILE_SSURL' => $file_ssurl, ! 'FILE_WEBSITE' => $file_website, ! 'FILE_DLURL' => $file_url, ! 'FILE_DOWNLOAD' => $file_download, ! 'CUSTOM_EXIST' => $custom_exist, ! 'AUTH_APPROVAL' => false, ! 'APPROVED_CHECKED_YES' => $approved_checked_yes, ! 'APPROVED_CHECKED_NO' => $approved_checked_no, ! 'SS_CHECKED_YES' => $ss_checked_yes, ! 'SS_CHECKED_NO' => $ss_checked_no, ! 'PIN_CHECKED_YES' => $pin_checked_yes, ! 'PIN_CHECKED_NO' => $pin_checked_no, ! 'L_INDEX' => "<<", ! 'L_UPLOAD' => $lang['User_upload'], ! 'L_FILE_TITLE' => $l_title, ! 'L_FILE_APPROVED' => $lang['Approved'], ! 'L_FILE_APPROVED_INFO' => $lang['Approved_info'], ! 'L_ADDTIONAL_FIELD' => $lang['Addtional_field'], ! 'L_SCREENSHOT' => $lang['Scrsht'], ! 'L_FILES' => $lang['Files'], ! 'L_FILE_NAME' => $lang['Filename'], ! 'L_FILE_NAME_INFO' => $lang['Filenameinfo'], ! 'L_FILE_SHORT_DESC' => $lang['Filesd'], ! 'L_FILE_SHORT_DESC_INFO' => $lang['Filesdinfo'], ! 'L_FILE_LONG_DESC' => $lang['Fileld'], ! 'L_FILE_LONG_DESC_INFO' => $lang['Fileldinfo'], ! 'L_FILE_AUTHOR' => $lang['Filecreator'], ! 'L_FILE_AUTHOR_INFO' => $lang['Filecreatorinfo'], ! 'L_FILE_VERSION' => $lang['Fileversion'], ! 'L_FILE_VERSION_INFO' => $lang['Fileversioninfo'], ! 'L_FILESS' => $lang['Filess'], ! 'L_FILESSINFO' => $lang['Filessinfo'], ! 'L_FILESS_UPLOAD' => $lang['Filess_upload'], ! 'L_FILESSINFO_UPLOAD' => $lang['Filessinfo_upload'], ! 'L_FILE_SSLINK' => $lang['Filess_link'], ! 'L_FILE_SSLINK_INFO' => $lang['Filess_link_info'], ! 'L_FILESSUPLOAD' => $lang['Filessupload'], ! 'L_FILE_WEBSITE' => $lang['Filedocs'], ! 'L_FILE_WEBSITE_INFO' => $lang['Filedocsinfo'], ! 'L_FILE_URL' => $lang['Fileurl'], ! 'L_FILE_UPLOAD' => $lang['File_upload'], ! 'L_FILEINFO_UPLOAD' => $lang['Fileinfo_upload'], ! 'L_FILE_URL_INFO' => $lang['Fileurlinfo'], ! 'L_FILE_POSTICONS' => $lang['Filepi'], ! 'L_FILE_POSTICONS_INFO' => $lang['Filepiinfo'], ! 'L_FILE_CAT' => $lang['Filecat'], ! 'L_FILE_CAT_INFO' => $lang['Filecatinfo'], ! 'L_FILE_LICENSE' => $lang['Filelicense'], ! 'L_NONE' => $lang['None'], ! 'L_FILE_LICENSE_INFO' => $lang['Filelicenseinfo'], ! 'L_FILE_PINNED' => $lang['Filepin'], ! 'L_FILE_PINNED_INFO' => $lang['Filepininfo'], ! 'L_FILE_DOWNLOAD' => $lang['Filedls'], ! 'L_NO' => $lang['No'], ! 'L_YES' => $lang['Yes'], ! 'S_POSTICONS' => $file_posticons, ! 'S_LICENSE_LIST' => $file_license, ! 'S_CAT_LIST' => $file_cat_list, ! 'S_HIDDEN_FIELDS' => $s_hidden_fields, ! 'MODE' => $mode, ! 'U_INDEX' => append_sid( $mx_root_path . 'index.' . $phpEx ), ! 'U_DOWNLOAD' => append_sid( pa_this_mxurl() ) ! )); $this->display( $lang['Download'], 'pa_file_add.tpl' ); *************** *** 338,341 **** } } - ?> \ No newline at end of file --- 357,359 ---- Index: pa_file.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/pafiledb/modules/pa_file.php,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** pa_file.php 7 Jun 2006 20:29:52 -0000 1.18 --- pa_file.php 17 Jun 2006 20:13:22 -0000 1.19 *************** *** 34,38 **** --- 34,40 ---- // Request vars // ======================================================= + $start = $mx_request_vars->get('start', MX_TYPE_INT, 0); $file_id = $mx_request_vars->request('file_id', MX_TYPE_INT, ''); + $page_num = $mx_request_vars->request('page_num', MX_TYPE_INT, 1) - 1; if ( empty( $file_id ) ) *************** *** 101,112 **** $pafiledb_template->assign_vars( array( ! 'L_INDEX' => "<<", ! 'U_INDEX' => append_sid( $mx_root_path . 'index.' . $phpEx ), ! 'U_DOWNLOAD_HOME' => append_sid( pa_this_mxurl() ), ! 'FILE_NAME' => $file_data['file_name'], ! 'DOWNLOAD' => $pafiledb_config['module_name'] ) ! ); // =================================================== --- 103,114 ---- $pafiledb_template->assign_vars( array( ! 'L_INDEX' => "<<", ! 'U_INDEX' => append_sid( $mx_root_path . 'index.' . $phpEx ), ! 'U_DOWNLOAD_HOME' => append_sid( pa_this_mxurl() ), ! 'FILE_NAME' => $file_data['file_name'], ! 'DOWNLOAD' => $pafiledb_config['module_name'] ! )); // =================================================== *************** *** 178,183 **** 'U_EDIT' => append_sid( pa_this_mxurl( 'action=user_upload&file_id=' . $file_id ) ), ! 'U_EMAIL' => append_sid( pa_this_mxurl( 'action=email&file_id=' . $file_id ) ) ) ! ); include( $module_root_path . 'pafiledb/includes/functions_field.' . $phpEx ); --- 180,185 ---- 'U_EDIT' => append_sid( pa_this_mxurl( 'action=user_upload&file_id=' . $file_id ) ), ! 'U_EMAIL' => append_sid( pa_this_mxurl( 'action=email&file_id=' . $file_id ) ) ! )); include( $module_root_path . 'pafiledb/includes/functions_field.' . $phpEx ); *************** *** 223,227 **** // Instatiate comments // ! include( $module_root_path . 'pafiledb/includes/functions_comment.' . $phpEx ); $pafiledb_comments = new pafiledb_comments(); $pafiledb_comments->init( $file_data, $comments_type ); --- 225,229 ---- // Instatiate comments // ! include_once( $module_root_path . 'pafiledb/includes/functions_comment.' . $phpEx ); $pafiledb_comments = new pafiledb_comments(); $pafiledb_comments->init( $file_data, $comments_type ); *************** *** 245,248 **** } } - ?> \ No newline at end of file --- 247,249 ---- Index: pa_license.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/pafiledb/modules/pa_license.php,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** pa_license.php 7 Jun 2006 20:29:52 -0000 1.15 --- pa_license.php 17 Jun 2006 20:13:22 -0000 1.16 *************** *** 107,112 **** 'FILE_NAME' => $file_data['file_name'], 'LE_TEXT' => nl2br( $license['license_text'] ), ! 'DOWNLOAD' => $pafiledb_config['module_name'] ) ! ); // =================================================== --- 107,112 ---- 'FILE_NAME' => $file_data['file_name'], 'LE_TEXT' => nl2br( $license['license_text'] ), ! 'DOWNLOAD' => $pafiledb_config['module_name'] ! )); // =================================================== *************** *** 118,121 **** } } - ?> \ No newline at end of file --- 118,120 ---- Index: pa_mcp.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/pafiledb/modules/pa_mcp.php,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** pa_mcp.php 7 Jun 2006 20:29:52 -0000 1.12 --- pa_mcp.php 17 Jun 2006 20:13:22 -0000 1.13 *************** *** 31,34 **** --- 31,46 ---- global $mx_root_path, $module_root_path, $is_block, $phpEx; + // ********************************************************************** + // Read language definition + // ********************************************************************** + if ( !file_exists( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ) ) + { + include( $module_root_path . 'language/lang_english/lang_admin.' . $phpEx ); + } + else + { + include( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ); + } + $this->init(); *************** *** 38,41 **** --- 50,54 ---- $mode = ( isset( $_REQUEST['mode'] ) ) ? htmlspecialchars( $_REQUEST['mode'] ) : ''; + $mode_notification = ( isset( $_REQUEST['mode'] ) ) ? htmlspecialchars( $_REQUEST['mode'] ) : ''; $mode_js = ( isset( $_REQUEST['mode_js'] ) ) ? htmlspecialchars( $_REQUEST['mode_js'] ) : ''; $mode = ( isset( $_POST['approve'] ) ) ? 'do_approve' : $mode; *************** *** 143,173 **** { $this->file_approve( $mode, $temp_file_id ); - - if ( $pafiledb_config['notify'] ) - { - $pa_pm = array(); - - // - // Populate the pa_pm variable - // - $pa_pm = pa_get_pm_data( $temp_file_id ); - - // - // Compose post header - // - $pa_message_tmp = pa_compose_pm( $pa_pm ); - $pa_message = $pa_message_tmp['message']; - $pa_update_message = $pa_message_tmp['update_message']; - - // - // PM notify - // - $pa_admins = pa_get_admins( true ); - - for ($i = 0; $i < count($pa_admins) || $i < 10; $ii) - { - pa_notify( $pafiledb_config['notify'], $pa_message, $pa_admins[$i]['user_id'], $pa_pm['file_editor_id'], $info = $mode_temp ); - } - } } } --- 156,159 ---- *************** *** 176,205 **** $this->file_approve( $mode, $file_id ); - if ( $pafiledb_config['notify'] ) - { - $pa_pm = array(); - - // - // Populate the pa_pm variable - // - $pa_pm = pa_get_pm_data( $file_id ); - - // - // Compose post header - // - $pa_message_tmp = pa_compose_pm( $pa_pm ); - $pa_message = $pa_message_tmp['message']; - $pa_update_message = $pa_message_tmp['update_message']; - - // - // PM notify - // - $pa_admins = pa_get_admins( true ); - - for ($i = 0; $i < count($pa_admins) || $i < 10; $ii) - { - pa_notify( $pafiledb_config['notify'], $pa_message, $pa_admins[$i]['user_id'], $pa_pm['file_editor_id'], $info = $mode_temp ); - } - } } --- 162,165 ---- *************** *** 217,232 **** $s_hidden_fields = '<input type="hidden" name="cat_id" value="' . $cat_id . '">'; ! $pafiledb_template->assign_vars( array( 'L_INDEX' => "<<", ! 'U_INDEX' => append_sid( $mx_root_path . 'index.' . $phpEx ), ! 'U_DOWNLOAD_HOME' => append_sid( pa_this_mxurl() ), ! 'U_DOWNLOAD' => append_sid( pa_this_mxurl() ), ! 'DOWNLOAD' => $pafiledb_config['module_name'], ! 'L_MCP_TITLE' => $l_title, ! 'L_MCP_EXPLAIN' => $l_explain, ! 'L_ADD_FILE' => $lang['Afiletitle'], ! 'S_HIDDEN_FIELDS' => $s_hidden_fields, ! 'S_FILE_ACTION' => append_sid( pa_this_mxurl( "action=mcp" ) ) ) ! ); if ( in_array( $mode, array( '', 'approved', 'broken', 'do_approve', 'do_unapprove', 'file_cat', 'all_file' ) ) ) --- 177,193 ---- $s_hidden_fields = '<input type="hidden" name="cat_id" value="' . $cat_id . '">'; ! $pafiledb_template->assign_vars( array( ! 'L_INDEX' => "<<", ! 'U_INDEX' => append_sid( $mx_root_path . 'index.' . $phpEx ), ! 'U_DOWNLOAD_HOME' => append_sid( pa_this_mxurl() ), ! 'U_DOWNLOAD' => append_sid( pa_this_mxurl() ), ! 'DOWNLOAD' => $pafiledb_config['module_name'], ! 'L_MCP_TITLE' => $l_title, ! 'L_MCP_EXPLAIN' => $l_explain, ! 'L_ADD_FILE' => $lang['Afiletitle'], ! 'S_HIDDEN_FIELDS' => $s_hidden_fields, ! 'S_FILE_ACTION' => append_sid( pa_this_mxurl( "action=mcp" ) ) ! )); if ( in_array( $mode, array( '', 'approved', 'broken', 'do_approve', 'do_unapprove', 'file_cat', 'all_file' ) ) ) *************** *** 337,341 **** if ( $mode == '' ) { ! $global_array = array( 0 => array( 'lang_var' => $lang['Approved_files'], 'row_set' => $approved_file_rowset, 'approval' => 'approve' ), --- 298,303 ---- if ( $mode == '' ) { ! $global_array = array( ! 0 => array( 'lang_var' => $lang['Approved_files'], 'row_set' => $approved_file_rowset, 'approval' => 'approve' ), *************** *** 349,353 **** elseif ( $mode == 'all_file' ) { ! $global_array = array( 0 => array( 'lang_var' => $lang['Approved_files'], 'row_set' => $approved_file_rowset, 'approval' => 'approve' ), --- 311,316 ---- elseif ( $mode == 'all_file' ) { ! $global_array = array( ! 0 => array( 'lang_var' => $lang['Approved_files'], 'row_set' => $approved_file_rowset, 'approval' => 'approve' ), *************** *** 466,469 **** --- 429,438 ---- } + // + // Notification + // + $fileId = !empty($file_id) ? $file_id : $file_ids; + $this->update_add_file_notify($fileId, $mode_notification); + $pafiledb_template->assign_vars( array( 'ERROR' => ( sizeof( $this->error ) ) ? implode( '<br />', $this->error ) : '' ) ); *************** *** 472,475 **** } } - ?> \ No newline at end of file --- 441,443 ---- Index: pa_main.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/pafiledb/modules/pa_main.php,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** pa_main.php 7 Jun 2006 20:29:52 -0000 1.13 --- pa_main.php 17 Jun 2006 20:13:22 -0000 1.14 *************** *** 30,41 **** $pafiledb_template->assign_vars( array( ! 'L_INDEX' => "<<", ! ! 'U_INDEX' => append_sid( $mx_root_path . 'index.' . $phpEx ), ! 'U_DOWNLOAD' => append_sid( pa_this_mxurl() ), ! 'DOWNLOAD' => $pafiledb_config['module_name'], ! 'TREE' => $menu_output ) ! ); // =================================================== --- 30,40 ---- $pafiledb_template->assign_vars( array( ! 'L_INDEX' => "<<", ! 'U_INDEX' => append_sid( $mx_root_path . 'index.' . $phpEx ), ! 'U_DOWNLOAD' => append_sid( pa_this_mxurl() ), ! 'DOWNLOAD' => $pafiledb_config['module_name'], ! 'TREE' => $menu_output ! )); // =================================================== *************** *** 43,50 **** // =================================================== $this->display_categories(); - $this->display( $lang['Download'], 'pa_main_body.tpl' ); } } - ?> \ No newline at end of file --- 42,47 ---- Index: pa_search.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/pafiledb/modules/pa_search.php,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** pa_search.php 7 Jun 2006 20:29:52 -0000 1.16 --- pa_search.php 17 Jun 2006 20:13:22 -0000 1.17 *************** *** 269,275 **** { $sql = "SELECT file_id ! FROM " . PA_COMMENTS_TABLE . " ! WHERE (comments_title LIKE '$match_word' ! OR comments_text LIKE '$match_word')"; if ( !( $result = $db->sql_query( $sql ) ) ) --- 269,275 ---- { $sql = "SELECT file_id ! FROM " . PA_COMMENTS_TABLE . " ! WHERE (comments_title LIKE '$match_word' ! OR comments_text LIKE '$match_word')"; if ( !( $result = $db->sql_query( $sql ) ) ) *************** *** 344,351 **** { $sql = "SELECT file_id, file_catid ! FROM " . PA_FILES_TABLE . " ! WHERE file_id IN (" . implode( ", ", $search_ids ) . ") ! $where_sql ! GROUP BY file_id"; } else --- 344,351 ---- { $sql = "SELECT file_id, file_catid ! FROM " . PA_FILES_TABLE . " ! WHERE file_id IN (" . implode( ", ", $search_ids ) . ") ! $where_sql ! GROUP BY file_id"; } else *************** *** 361,368 **** $sql = "SELECT f.file_id, f.file_catid ! FROM $from_sql ! WHERE f.file_id IN (" . implode( ", ", $search_ids ) . ") $where_sql ! GROUP BY f.file_id"; } --- 361,368 ---- $sql = "SELECT f.file_id, f.file_catid ! FROM $from_sql ! WHERE f.file_id IN (" . implode( ", ", $search_ids ) . ") $where_sql ! GROUP BY f.file_id"; } *************** *** 658,661 **** } } - ?> \ No newline at end of file --- 658,660 ---- Index: pa_rate.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/pafiledb/modules/pa_rate.php,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** pa_rate.php 7 Jun 2006 20:29:52 -0000 1.13 --- pa_rate.php 17 Jun 2006 20:13:22 -0000 1.14 *************** *** 107,120 **** $pafiledb_template->assign_vars( array( ! 'L_INDEX' => "<<", ! 'L_RATE' => $lang['Rate'], ! 'U_INDEX' => append_sid( $mx_root_path . 'index.' . $phpEx ), ! 'U_DOWNLOAD_HOME' => append_sid( pa_this_mxurl() ), ! 'U_FILE_NAME' => append_sid( pa_this_mxurl( 'action=file&file_id=' . $file_id ) ), ! 'FILE_NAME' => $file_data['file_name'], ! 'DOWNLOAD' => $pafiledb_config['module_name'] ) ! ); if ( isset( $_POST['submit'] ) ) --- 107,120 ---- $pafiledb_template->assign_vars( array( ! 'L_INDEX' => "<<", ! 'L_RATE' => $lang['Rate'], ! 'U_INDEX' => append_sid( $mx_root_path . 'index.' . $phpEx ), ! 'U_DOWNLOAD_HOME' => append_sid( pa_this_mxurl() ), ! 'U_FILE_NAME' => append_sid( pa_this_mxurl( 'action=file&file_id=' . $file_id ) ), ! 'FILE_NAME' => $file_data['file_name'], ! 'DOWNLOAD' => $pafiledb_config['module_name'] ! )); if ( isset( $_POST['submit'] ) ) *************** *** 143,162 **** $pafiledb_template->assign_vars( array( ! 'S_RATE_ACTION' => append_sid( pa_this_mxurl( 'action=rate&file_id=' . $file_id ) ), ! 'L_RATE' => $lang['Rate'], ! 'L_RERROR' => $lang['Rerror'], ! 'L_R1' => $lang['R1'], ! 'L_R2' => $lang['R2'], ! 'L_R3' => $lang['R3'], ! 'L_R4' => $lang['R4'], ! 'L_R5' => $lang['R5'], ! 'L_R6' => $lang['R6'], ! 'L_R7' => $lang['R7'], ! 'L_R8' => $lang['R8'], ! 'L_R9' => $lang['R9'], ! 'L_R10' => $lang['R10'], ! 'RATEINFO' => $rate_info, ! 'ID' => $file_id ) ! ); } --- 143,162 ---- $pafiledb_template->assign_vars( array( ! 'S_RATE_ACTION' => append_sid( pa_this_mxurl( 'action=rate&file_id=' . $file_id ) ), ! 'L_RATE' => $lang['Rate'], ! 'L_RERROR' => $lang['Rerror'], ! 'L_R1' => $lang['R1'], ! 'L_R2' => $lang['R2'], ! 'L_R3' => $lang['R3'], ! 'L_R4' => $lang['R4'], ! 'L_R5' => $lang['R5'], ! 'L_R6' => $lang['R6'], ! 'L_R7' => $lang['R7'], ! 'L_R8' => $lang['R8'], ! 'L_R9' => $lang['R9'], ! 'L_R10' => $lang['R10'], ! 'RATEINFO' => $rate_info, ! 'ID' => $file_id ! )); } *************** *** 165,172 **** // =================================================== $this->generate_navigation( $file_data['file_catid'] ); - $this->display( $lang['Download'], 'pa_rate_body.tpl' ); } } - ?> \ No newline at end of file --- 165,170 ---- Index: pa_stats.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/pafiledb/modules/pa_stats.php,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** pa_stats.php 7 Jun 2006 20:29:52 -0000 1.18 --- pa_stats.php 17 Jun 2006 20:13:22 -0000 1.19 *************** *** 330,333 **** } } - ?> \ No newline at end of file --- 330,332 ---- |
Update of /cvsroot/mxbb/mx_pafiledb/pafiledb/includes In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv22598/modules/mx_pafiledb/pafiledb/includes Modified Files: functions.php functions_admin.php functions_comment.php functions_pafiledb.php pafiledb_constants.php Log Message: Finalizing module Index: functions.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/pafiledb/includes/functions.php,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** functions.php 7 Jun 2006 20:29:52 -0000 1.22 --- functions.php 17 Jun 2006 20:13:22 -0000 1.23 *************** *** 114,119 **** include( $mx_root_path . 'includes/page_header.' . $phpEx ); ! $pafiledb_template->set_filenames( array( 'smiliesbody' => 'posting_smilies.tpl' ) ! ); } --- 114,118 ---- include( $mx_root_path . 'includes/page_header.' . $phpEx ); ! $pafiledb_template->set_filenames( array( 'smiliesbody' => 'posting_smilies.tpl' ) ); } *************** *** 152,159 **** $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, ! 'SMILEY_DESC' => $data['emoticon'] ) ! ); $s_colspan = max( $s_colspan, $col + 1 ); --- 151,158 ---- $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, ! 'SMILEY_DESC' => $data['emoticon'] ! )); $s_colspan = max( $s_colspan, $col + 1 ); *************** *** 179,191 **** $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'], ! 'S_SMILIES_COLSPAN' => $s_colspan ) ! ); } } --- 178,191 ---- $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'], ! 'S_SMILIES_COLSPAN' => $s_colspan ! )); } } *************** *** 298,302 **** { global $pafiledb_config; - // MX global $mx_root_path, $module_root_path, $is_block, $phpEx; --- 298,301 ---- *************** *** 336,340 **** { global $phpbb_root_path, $lang, $phpEx, $board_config, $pafiledb_config, $userdata; - // MX global $pafiledb, $cat_id, $mx_root_path, $module_root_path, $is_block, $phpEx; --- 335,338 ---- *************** *** 636,640 **** /** ! * mx_kb_user_info * * This class is used to determin Browser and operating system info of the user --- 634,638 ---- /** ! * pafiledb_user_info * * This class is used to determin Browser and operating system info of the user *************** *** 861,865 **** /** ! * mx_pafiledb_text_tools * * Description --- 859,863 ---- /** ! * mx_pa_text_tools * * Description *************** *** 869,873 **** * */ - class mx_pa_text_tools { --- 867,870 ---- *************** *** 1173,1178 **** } } ! $return_data = array($mytext, $do_trunc); ! return $return_data; } } --- 1170,1175 ---- } } ! //$return_data = array($mytext, $do_trunc); ! return $mytext; } } *************** *** 1188,1191 **** --- 1185,1194 ---- define('MX_DELETED_NOTIFICATION' , 14); + // + // Includes + // + include_once( $phpbb_root_path . 'includes/bbcode.'.$phpEx); + include_once( $phpbb_root_path . 'includes/functions_post.' . $phpEx ); + /** * mx_pa_notification. *************** *** 1237,1247 **** function init( $item_id = 0) { ! global $db, $lang, $pafiledb_custom_field; ! ! // ! // Includes ! // ! include_once( $phpbb_root_path . 'includes/bbcode.'.$phpEx); ! include_once( $phpbb_root_path . 'includes/functions_post.' . $phpEx ); // ======================================================= --- 1240,1244 ---- function init( $item_id = 0) { ! global $db, $lang, $mx_pa_custom_field, $module_root_path, $phpbb_root_path, $phpEx, $mx_pafiledb, $userdata; // ======================================================= *************** *** 1256,1260 **** { include_once( $module_root_path . 'pafiledb/includes/functions_field.' . $phpEx ); ! $this->custom_field = new pafiledb_custom_field(); $this->custom_field->init(); } --- 1253,1257 ---- { include_once( $module_root_path . 'pafiledb/includes/functions_field.' . $phpEx ); ! $this->custom_field = new custom_field(); $this->custom_field->init(); } *************** *** 1266,1289 **** // $this->langs['item_not_exist'] = $lang['File_not_exist']; ! $this->langs['module_title'] = $lang['KB_title']; ! $this->langs['notify_subject_new'] = $lang['KB_notify_subject_new']; ! $this->langs['notify_subject_edited'] = $lang['KB_notify_subject_edited']; ! $this->langs['notify_subject_approved'] = $lang['KB_notify_subject_approved']; ! $this->langs['notify_subject_unapproved'] = $lang['KB_notify_subject_unapproved']; ! $this->langs['notify_subject_deleted'] = $lang['KB_notify_subject_deleted']; ! $this->langs['notify_new_body'] = $lang['KB_notify_new_body']; ! $this->langs['notify_edited_body'] = $lang['KB_notify_edited_body']; ! $this->langs['notify_approved_body'] = $lang['KB_notify_approved_body']; ! $this->langs['notify_unapproved_body'] = $lang['KB_notify_unapproved_body']; ! $this->langs['notify_deleted_body'] = $lang['KB_notify_deleted_body']; ! $this->langs['item_title'] = $lang['Article_title']; ! $this->langs['author'] = $lang['Author']; ! $this->langs['item_description'] = $lang['Article_description']; ! $this->langs['item_type'] = $lang['Article_type']; $this->langs['category'] = $lang['Category']; ! $this->langs['read_full_item'] = $lang['Read_full_article']; $this->langs['edited_item_info'] = $lang['Edited_Article_info']; --- 1263,1286 ---- // $this->langs['item_not_exist'] = $lang['File_not_exist']; ! $this->langs['module_title'] = $lang['PA_title']; ! $this->langs['notify_subject_new'] = $lang['PA_notify_subject_new']; ! $this->langs['notify_subject_edited'] = $lang['PA_notify_subject_edited']; ! $this->langs['notify_subject_approved'] = $lang['PA_notify_subject_approved']; ! $this->langs['notify_subject_unapproved'] = $lang['PA_notify_subject_unapproved']; ! $this->langs['notify_subject_deleted'] = $lang['PA_notify_subject_deleted']; ! $this->langs['notify_new_body'] = $lang['PA_notify_new_body']; ! $this->langs['notify_edited_body'] = $lang['PA_notify_edited_body']; ! $this->langs['notify_approved_body'] = $lang['PA_notify_approved_body']; ! $this->langs['notify_unapproved_body'] = $lang['PA_notify_unapproved_body']; ! $this->langs['notify_deleted_body'] = $lang['PA_notify_deleted_body']; ! $this->langs['item_title'] = $lang['File']; ! $this->langs['author'] = $lang['Creator']; ! $this->langs['item_description'] = $lang['Desc']; ! $this->langs['item_type'] = ''; $this->langs['category'] = $lang['Category']; ! $this->langs['read_full_item'] = $lang['PA_goto']; $this->langs['edited_item_info'] = $lang['Edited_Article_info']; *************** *** 1292,1296 **** case 'oracle': $sql = "SELECT f.*, 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 f, " . PA_VOTES_TABLE . " AS r, " . USERS_TABLE . " AS u, " . PA_CATEGORIES_TABLE . " AS c, " . PA_COMMENTS_TABLE . " AS cm WHERE f.file_id = r.votes_file(+) AND f.user_id = u.user_id(+) --- 1289,1293 ---- case 'oracle': $sql = "SELECT f.*, 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 f, " . PA_VOTES_TABLE . " AS r, " . USERS_TABLE . " AS u, " . PA_CATEGORY_TABLE . " AS c, " . PA_COMMENTS_TABLE . " AS cm WHERE f.file_id = r.votes_file(+) AND f.user_id = u.user_id(+) *************** *** 1303,1311 **** default: $sql = "SELECT f.*, 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 f, " . PA_CATEGORIES_TABLE . " AS c LEFT JOIN " . PA_VOTES_TABLE . " AS r ON f.file_id = r.votes_file LEFT JOIN " . USERS_TABLE . " AS u ON f.user_id = u.user_id LEFT JOIN " . PA_COMMENTS_TABLE . " AS c ON f.file_id = c.file_id ! WHERE c.cat_id = a.file_catid AND f.file_id = '" . $item_id . "' GROUP BY f.file_id "; --- 1300,1308 ---- default: $sql = "SELECT f.*, 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 f, " . PA_CATEGORY_TABLE . " AS cat LEFT JOIN " . PA_VOTES_TABLE . " AS r ON f.file_id = r.votes_file LEFT JOIN " . USERS_TABLE . " AS u ON f.user_id = u.user_id LEFT JOIN " . PA_COMMENTS_TABLE . " AS c ON f.file_id = c.file_id ! WHERE cat.cat_id = f.file_catid AND f.file_id = '" . $item_id . "' GROUP BY f.file_id "; *************** *** 1373,1377 **** * @param unknown_type $smilies_on */ ! function notify( $mode = MX_PM_MODE, $action = MX_NEW_NOTIFICATION, $to_id, $from_id = '', $subject = '', $message = '', $html_on = 0, $bbcode_on = 1, $smilies_on = 1 ) { global $lang, $board_config, $pafiledb_config, $db, $module_root_path, $phpbb_root_path, $mx_root_path, $phpEx, $userdata; --- 1370,1374 ---- * @param unknown_type $smilies_on */ ! function notify( $mode = MX_PM_MODE, $action = MX_NEW_NOTIFICATION, $to_id = 0, $from_id = '', $subject = '', $message = '', $html_on = 1, $bbcode_on = 1, $smilies_on = 1 ) { global $lang, $board_config, $pafiledb_config, $db, $module_root_path, $phpbb_root_path, $mx_root_path, $phpEx, $userdata; *************** *** 1407,1494 **** $this->smilies_on = $smilies_on; ! // ! // Compose Subject ! // ! if (empty($subject)) ! { ! // ! // Auto generated subject ! // ! switch ( $action ) ! { ! case MX_NEW_NOTIFICATION: ! $this->subject = $this->langs['module_title'] . ' - ' . $this->langs['notify_subject_new']; ! break; ! ! case MX_EDITED_NOTIFICATION: ! $this->subject = $this->langs['module_title'] . ' - ' . $this->langs['notify_subject_edited']; ! break; ! ! case MX_APPROVED_NOTIFICATION: ! $this->subject = $this->langs['module_title'] . ' - ' . $this->langs['notify_subject_approved']; ! break; ! ! case MX_UNAPPROVED_NOTIFICATION: ! $this->subject = $this->langs['module_title'] . ' - ' . $this->langs['notify_subject_unapproved']; ! break; ! ! case MX_DELETED_NOTIFICATION: ! $this->subject = $this->langs['module_title'] . ' - ' . $this->langs['notify_subject_deleted']; ! break; ! ! default: ! mx_message_die(GENERAL_ERROR, 'Bad notify action'); ! } ! } ! else ! { ! // ! // Custom subject ! // ! $this->subject = $subject; ! } // ! // Compose Message // ! if (empty($message)) { - // - // Auto generated message - // $this->_compose_auto_note($action); - - switch ( $action ) - { - case MX_NEW_NOTIFICATION: - $this->message = $this->langs['notify_new_body'] . '\n\n' . $this->auto_message; - break; - - case MX_EDITED_NOTIFICATION: - $this->message = $this->langs['notify_edited_body'] . '\n\n' . $this->auto_message_update . '\n' . $this->auto_message; - break; - - case MX_APPROVED_NOTIFICATION: - $this->message = $this->langs['notify_approved_body'] . '\n\n' . $this->auto_message; - break; - - case MX_UNAPPROVED_NOTIFICATION: - $this->message = $this->langs['notify_unapproved_body'] . '\n\n' . $this->auto_message; - break; - - case MX_DELETED_NOTIFICATION: - $this->message = $this->langs['notify_deleted_body'] . '\n\n' . $this->auto_message; - break; - - default: - mx_message_die(GENERAL_ERROR, 'Bad notify action'); - } - } - else - { - // - // Custom message - // - $this->message = $message; } --- 1404,1416 ---- $this->smilies_on = $smilies_on; ! $this->subject = $subject; ! $this->message = $message; // ! // Compose Subject // ! if (empty($this->subject) || empty($this->message)) { $this->_compose_auto_note($action); } *************** *** 1499,1503 **** { $this->to_id = $id; - $mx_kb->debug($this->to_id, '', false); // --- 1421,1424 ---- *************** *** 1574,1578 **** } ! $privmsg_message = prepare_message($this->message, $this->html_on, $this->bbcode_on, $this->smilies_on, $bbcode_uid); $privmsg_message = str_replace('\\\n', '\n', $privmsg_message); } --- 1495,1499 ---- } ! $privmsg_message = prepare_message(addslashes($this->message), $this->html_on, $this->bbcode_on, $this->smilies_on, $bbcode_uid); $privmsg_message = str_replace('\\\n', '\n', $privmsg_message); } *************** *** 1805,1828 **** global $lang, $phpEx; - $search = array ( "'&(quot|#34);'i", // Replace HTML entities - "'&(amp|#38);'i", - "'&(lt|#60);'i", - "'&(gt|#62);'i" - ); - - $replace = array ( "\"", - "&", - "<", - ">" - ); - // // Compose phpBB post header // ! $temp_url = PORTAL_URL . pa_this_mxurl("mode=" . "article&k=" . $this->data['item_id'], false, true); ! $this->auto_message = "[b]" . $this->langs['item_title'] . ":[/b] " . preg_replace( $search, $replace, $this->data['item_title'] ) . "\n"; $this->auto_message .= "[b]" . $this->langs['author'] . ":[/b] " . $this->data['item_author'] . "\n"; ! $this->auto_message .= "[b]" . $this->langs['item_description'] . ":[/b] [i]" . preg_replace( $search, $replace, $this->data['item_desc'] ) . "[/i]\n\n"; //$this->auto_message .= "[b]" . $this->langs['category'] . ":[/b] " . $this->data['item_category_name'] . "\n"; --- 1726,1737 ---- global $lang, $phpEx; // // Compose phpBB post header // ! $temp_url = PORTAL_URL . pa_this_mxurl("action=" . "file&file_id=" . $this->data['item_id'], false, true); ! $this->auto_message = "[b]" . $this->langs['item_title'] . ":[/b] " . $this->data['item_title'] . "\n"; $this->auto_message .= "[b]" . $this->langs['author'] . ":[/b] " . $this->data['item_author'] . "\n"; ! $this->auto_message .= "[b]" . $this->langs['item_description'] . ":[/b] [i]" . $this->data['item_desc'] . "[/i]\n\n"; //$this->auto_message .= "[b]" . $this->langs['category'] . ":[/b] " . $this->data['item_category_name'] . "\n"; *************** *** 1840,1843 **** --- 1749,1786 ---- // $this->auto_message_update = "[i]" . $this->langs['edited_item_info'] . $this->data['item_editor'] . "[/i]" . "\n\n"; + + // + // Auto generated subject amd message + // + switch ( $action ) + { + case MX_NEW_NOTIFICATION: + $this->subject = $this->langs['module_title'] . ' - ' . $this->langs['notify_subject_new']; + $this->message = $this->langs['notify_new_body'] . "\n\n" . $this->auto_message; + break; + + case MX_EDITED_NOTIFICATION: + $this->subject = $this->langs['module_title'] . ' - ' . $this->langs['notify_subject_edited']; + $this->message = $this->langs['notify_edited_body'] . "\n\n" . $this->auto_message_update . $this->auto_message; + break; + + case MX_APPROVED_NOTIFICATION: + $this->subject = $this->langs['module_title'] . ' - ' . $this->langs['notify_subject_approved']; + $this->message = $this->langs['notify_approved_body'] . "\n\n" . $this->auto_message; + break; + + case MX_UNAPPROVED_NOTIFICATION: + $this->subject = $this->langs['module_title'] . ' - ' . $this->langs['notify_subject_unapproved']; + $this->message = $this->langs['notify_unapproved_body'] . "\n\n" . $this->auto_message; + break; + + case MX_DELETED_NOTIFICATION: + $this->subject = $this->langs['module_title'] . ' - ' . $this->langs['notify_subject_deleted']; + $this->message = $this->langs['notify_deleted_body'] . "\n\n" . $this->auto_message; + break; + + default: + mx_message_die(GENERAL_ERROR, 'Bad notify action'); + } } *************** *** 1921,1924 **** --- 1864,1871 ---- } + // ------------------------------------ + // Functions + // ------------------------------------ + /** * Enter description here... *************** *** 2064,2066 **** --- 2011,2246 ---- return $formated_url; } + + /** + * Enter description here... + * + * @param unknown_type $args + * @param unknown_type $force_standalone_mode + * @param unknown_type $non_html_amp + * @return unknown + */ + function pa_this_mxurl( $args = '', $force_standalone_mode = false, $non_html_amp = false ) + { + global $mx_root_path, $module_root_path, $page_id, $phpEx, $is_block; + + if ( $force_standalone_mode || !$is_block ) + { + $mxurl = $module_root_path . 'dload.' . $phpEx . ( $args == '' ? '' : '?' . $args ); + } + else + { + $mxurl = $mx_root_path . 'index.' . $phpEx; + + if ( is_numeric( $page_id ) ) + { + $mxurl .= '?page=' . $page_id . ( $args == '' ? '' : ( $non_html_amp ? '&' : '&' ) . $args ); + } + else + { + $mxurl .= ( $args == '' ? '' : '?' . $args ); + } + } + return $mxurl; + } + + /** + * Enter description here... + * + * @param unknown_type $args + * @param unknown_type $force_standalone_mode + * @param unknown_type $page_id + * @return unknown + */ + function pa_this_mxurl_list( $args = '', $force_standalone_mode = false, $page_id = 1 ) + { + global $mx_root_path, $module_root_path, $phpEx, $is_block; + + if ( $force_standalone_mode || !$is_block ) + { + $mxurl = $module_root_path . 'dload.' . $phpEx . ( $args == '' ? '' : '?' . $args ); + } + else + { + $mxurl = $mx_root_path . 'index.' . $phpEx; + if ( is_numeric( $page_id ) ) + { + $mxurl .= '?page=' . $page_id . ( $args == '' ? '' : '&' . $args ); + } + else + { + $mxurl .= ( $args == '' ? '' : '?' . $args ); + } + } + return $mxurl; + } + + /** + * Enter description here... + * + * @param unknown_type $rating + * @return unknown + */ + function paImageRating( $rating ) + { + global $db, $album_sp_config, $module_root_path; + + if ( !$rating ) + return( "<i>Not Rated</i>" ); + else + return ( round( $rating, 2 ) ); + } + + // ========================================================================= + // this function Borrowed from Acyd Burn attachment mod, (thanks Acyd for this great mod) + // ========================================================================= + function send_file_to_browser( $real_filename, $mimetype, $physical_filename, $upload_dir ) + { + global $_SERVER, $HTTP_USER_AGENT, $HTTP_SERVER_VARS, $lang, $db, $pafiledb_functions; + + if ( $upload_dir == '' ) + { + $filename = $physical_filename; + } + else + { + $filename = $upload_dir . $physical_filename; + } + + $gotit = false; + + if ( @!file_exists( @$pafiledb_functions->pafiledb_realpath( $filename ) ) ) + { + mx_message_die( GENERAL_ERROR, $lang['Error_no_download'] . '<br /><br /><b>404 File Not Found:</b> The File <i>' . $filename . '</i> does not exist.' ); + } + else + { + $gotit = true; + $size = @filesize( $filename ); + if ( $size > ( 1048575 * 6 ) ) + { + return false; + } + } + + // Determine the Browser the User is using, because of some nasty incompatibilities. + // Most of the methods used in this function are from phpMyAdmin. :) + + $user_agent = ( !empty( $_SERVER['HTTP_USER_AGENT'] ) ) ? $_SERVER['HTTP_USER_AGENT'] : ( ( !empty( $HTTP_SERVER_VARS['HTTP_USER_AGENT'] ) ) ? $HTTP_SERVER_VARS['HTTP_USER_AGENT'] : '' ); + + if ( ereg( 'Opera(/| )([0-9].[0-9]{1,2})', $user_agent, $log_version ) ) + { + $browser_version = $log_version[2]; + $browser_agent = 'opera'; + } + else if ( ereg( 'MSIE ([0-9].[0-9]{1,2})', $user_agent, $log_version ) ) + { + $browser_version = $log_version[1]; + $browser_agent = 'ie'; + } + else if ( ereg( 'OmniWeb/([0-9].[0-9]{1,2})', $user_agent, $log_version ) ) + { + $browser_version = $log_version[1]; + $browser_agent = 'omniweb'; + } + else if ( ereg( '(Konqueror/)(.*)(;)', $user_agent, $log_version ) ) + { + $browser_version = $log_version[2]; + $browser_agent = 'konqueror'; + } + else if ( ereg( 'Mozilla/([0-9].[0-9]{1,2})', $user_agent, $log_version ) && ereg( 'Safari/([0-9]*)', $user_agent, $log_version2 ) ) + { + $browser_version = $log_version[1] . '.' . $log_version2[1]; + $browser_agent = 'safari'; + } + else if ( ereg( 'Mozilla/([0-9].[0-9]{1,2})', $user_agent, $log_version ) ) + { + $browser_version = $log_version[1]; + $browser_agent = 'mozilla'; + } + else + { + $browser_version = 0; + $browser_agent = 'other'; + } + + // Correct the Mime Type, if it's an octetstream + + if ( ( $mimetype == 'application/octet-stream' ) || ( $mimetype == 'application/octetstream' ) ) + { + if ( ( $browser_agent == 'ie' ) || ( $browser_agent == 'opera' ) ) + { + $mimetype = 'application/octetstream'; + } + else + { + $mimetype = 'application/octet-stream'; + } + } + + @ob_end_clean(); + @ini_set( 'zlib.output_compression', 'Off' ); + header( 'Pragma: public' ); + header( 'Content-Transfer-Encoding: none' ); + + // Send out the Headers + + if ( $browser_agent == 'ie' ) + { + header( 'Content-Type: ' . $mimetype . '; name="' . $real_filename . '"' ); + header( 'Content-Disposition: inline; filename="' . $real_filename . '"' ); + } + else + { + header( 'Content-Type: ' . $mimetype . '; name="' . $real_filename . '"' ); + header( 'Content-Disposition: attachment; filename=' . $real_filename ); + } + + // Now send the File Contents to the Browser + + if ( $gotit ) + { + if ( $size ) + { + header( "Content-length: $size" ); + } + + $result = @readfile( $filename ); + + if ( !$result ) + { + return true; + } + } + else + { + return false; + } + + @flush(); + exit(); + } + + function pa_redirect( $file_url ) + { + global $pafiledb_cache, $db; + if ( isset( $db ) ) + { + $db->sql_close(); + } + + if ( isset( $pafiledb_cache ) ) + { + $pafiledb_cache->unload(); + } + // Redirect via an HTML form for PITA webservers + if ( @preg_match( '/Microsoft|WebSTAR|Xitami/', getenv( 'SERVER_SOFTWARE' ) ) ) + { + header( 'Refresh: 0; URL=' . $file_url ); + echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><meta http-equiv="refresh" content="0; url=' . $file_url . '"><title>Redirect</title></head><body><div align="center">If your browser does not support meta redirection please click <a href="' . $file_url . '">HERE</a> to be redirected</div></body></html>'; + exit; + } + // Behave as per HTTP/1.1 spec for others + Header( "Location: $file_url" ); + exit(); + } ?> \ No newline at end of file Index: pafiledb_constants.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/pafiledb/includes/pafiledb_constants.php,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** pafiledb_constants.php 7 Jun 2006 20:29:52 -0000 1.17 --- pafiledb_constants.php 17 Jun 2006 20:13:22 -0000 1.18 *************** *** 72,76 **** define( 'PA_MIRRORS_TABLE', $mx_table_prefix . 'pa_mirrors' ); - if ( !MXBB_MODULE || MXBB_27x ) { --- 72,75 ---- Index: functions_admin.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/pafiledb/includes/functions_admin.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** functions_admin.php 7 Jun 2006 20:29:52 -0000 1.3 --- functions_admin.php 17 Jun 2006 20:13:22 -0000 1.4 *************** *** 23,31 **** foreach( $pafiledb->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_pa_catauth.$phpEx?cat_parent=$sub_cat_id" ) ) ! ); for( $j = 0; $j < count( $cat_auth_fields ); $j++ ) --- 23,32 ---- foreach( $pafiledb->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_pa_catauth.$phpEx?cat_parent=$sub_cat_id" ) ! )); for( $j = 0; $j < count( $cat_auth_fields ); $j++ ) *************** *** 40,45 **** $custom_auth[$j] .= '</select> '; ! $pafiledb_template->assign_block_vars( 'cat_row.cat_auth_data', array( 'S_AUTH_LEVELS_SELECT' => $custom_auth[$j] ) ! ); } admin_display_cat_auth( $sub_cat_id, $depth + 1 ); --- 41,45 ---- $custom_auth[$j] .= '</select> '; ! $pafiledb_template->assign_block_vars( 'cat_row.cat_auth_data', array( 'S_AUTH_LEVELS_SELECT' => $custom_auth[$j] ) ); } admin_display_cat_auth( $sub_cat_id, $depth + 1 ); *************** *** 59,75 **** foreach( $pafiledb->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_pa_catauth.$phpEx?cat_id=$sub_cat_id" ), ! ! 'S_MOD_SELECT' => $optionlist_mod[$sub_cat_id] ) ! ); 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] ) ! ); } admin_display_cat_auth_ug( $sub_cat_id, $depth + 1 ); --- 59,73 ---- foreach( $pafiledb->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_pa_catauth.$phpEx?cat_id=$sub_cat_id" ), ! 'S_MOD_SELECT' => $optionlist_mod[$sub_cat_id] ! )); 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] ) ); } admin_display_cat_auth_ug( $sub_cat_id, $depth + 1 ); *************** *** 89,102 **** foreach( $pafiledb->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_pa_category.php?cat_id=' . $subcat_id ), ! 'U_CAT_EDIT' => append_sid( "admin_pa_category.$phpEx?mode=edit&cat_id=$subcat_id" ), ! 'U_CAT_DELETE' => append_sid( "admin_pa_category.$phpEx?mode=delete&cat_id=$subcat_id" ), ! 'U_CAT_MOVE_UP' => append_sid( "admin_pa_category.$phpEx?mode=cat_order&move=-15&cat_id_other=$subcat_id" ), ! 'U_CAT_MOVE_DOWN' => append_sid( "admin_pa_category.$phpEx?mode=cat_order&move=15&cat_id_other=$subcat_id" ), ! 'U_CAT_RESYNC' => append_sid( "admin_pa_category.$phpEx?mode=sync&cat_id_other=$subcat_id" ), ! 'CAT_NAME' => $cat_data['cat_name'], ! 'PRE' => $pre ) ! ); admin_cat_main( $subcat_id, $depth + 1 ); } --- 87,101 ---- foreach( $pafiledb->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_pa_category.php?cat_id=' . $subcat_id ), ! 'U_CAT_EDIT' => append_sid( "admin_pa_category.$phpEx?mode=edit&cat_id=$subcat_id" ), ! 'U_CAT_DELETE' => append_sid( "admin_pa_category.$phpEx?mode=delete&cat_id=$subcat_id" ), ! 'U_CAT_MOVE_UP' => append_sid( "admin_pa_category.$phpEx?mode=cat_order&move=-15&cat_id_other=$subcat_id" ), ! 'U_CAT_MOVE_DOWN' => append_sid( "admin_pa_category.$phpEx?mode=cat_order&move=15&cat_id_other=$subcat_id" ), ! 'U_CAT_RESYNC' => append_sid( "admin_pa_category.$phpEx?mode=sync&cat_id_other=$subcat_id" ), ! 'CAT_NAME' => $cat_data['cat_name'], ! 'PRE' => $pre ! )); admin_cat_main( $subcat_id, $depth + 1 ); } *************** *** 106,112 **** } ! function get_forums( $sel_id = 0 ) { ! global $db; $sql = "SELECT forum_id, forum_name --- 105,119 ---- } ! /** ! * Enter description here... ! * ! * @param unknown_type $sel_id ! * @param unknown_type $use_default_option ! * @param unknown_type $select_name ! * @return unknown ! */ ! function get_forums( $sel_id = 0, $use_default_option = false, $select_name = 'forum_id' ) { ! global $db, $lang; $sql = "SELECT forum_id, forum_name *************** *** 118,126 **** } ! $forumlist = '<select name="forum_id">'; if ( $sel_id == 0 ) { ! $forumlist .= '<option value="0" selected > Select a Forum !</option>'; } --- 125,139 ---- } ! $forumlist = '<select name="'.$select_name.'">'; if ( $sel_id == 0 ) { ! $forumlist .= '<option value="0" selected >'.$lang['Select_topic_id'].'</option>'; ! } ! ! if ( $use_default_option ) ! { ! $status = $sel_id == "-1" ? "selected" : ""; ! $forumlist .= '<option value="-1" '.$status.' >::'.$lang['Use_default'].'::</option>'; } Index: functions_comment.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/pafiledb/includes/functions_comment.php,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** functions_comment.php 7 Jun 2006 20:29:52 -0000 1.19 --- functions_comment.php 17 Jun 2006 20:13:22 -0000 1.20 *************** *** 89,94 **** // // This is specific for pafileDB ! // ! $this->forum_id = $pafiledb->modules[$pafiledb->module_name]->cat_rowset[$this->cat_id]['comments_forum_id']; $this->auth['auth_view'] = $pafiledb->modules[$pafiledb->module_name]->auth[$this->cat_id]['auth_view_comment']; --- 89,93 ---- // // This is specific for pafileDB ! $this->forum_id = $pafiledb->modules[$pafiledb->module_name]->comments[$this->cat_id]['comments_forum_id']; $this->auth['auth_view'] = $pafiledb->modules[$pafiledb->module_name]->auth[$this->cat_id]['auth_view_comment']; *************** *** 180,184 **** // Get all comments // ! $this->get_internal_comments(); $ranksrow = array(); --- 179,183 ---- // Get all comments // ! $result = $this->get_internal_comments(); $ranksrow = array(); *************** *** 418,422 **** // Get all comments // ! $this->get_phpbb_comments(); $ranksrow = array(); --- 417,421 ---- // Get all comments // ! $result = $this->get_phpbb_comments(); $ranksrow = array(); *************** *** 726,729 **** --- 725,730 ---- )); } + + return $result; } *************** *** 773,776 **** --- 774,779 ---- )); } + + return $result; } *************** *** 1324,1327 **** --- 1327,1355 ---- * Enter description here... * + * @param unknown_type $topic_id + */ + function delete_phpbb_topic($topic_id) + { + global $board_config, $lang, $db, $phpbb_root_path, $phpEx; + global $userdata, $user_ip; + + $sql = "SELECT * + FROM " . POSTS_TABLE . " + WHERE topic_id = '$topic_id'"; + + if ( !( $result = $db->sql_query( $sql ) ) ) + { + mx_message_die( GENERAL_ERROR, "Could not obtain topic data", '', __LINE__, __FILE__, $sql ); + } + + while( $row = $db->sql_fetchrow( $result ) ) + { + $this->delete_phpbb_post($row['forum_id'], $row['topic_id'], $row['post_id']); + } + } + + /** + * Enter description here... + * */ function validate_topic_id() *************** *** 1381,1384 **** --- 1409,1417 ---- switch ($mode) { + case 'delete_all': + $return_data = $this->delete_phpbb_topic($this->topic_id ); + $this->validate_topic_id(); + break; + case 'delete': $return_data = $this->delete_phpbb_post($this->forum_id, $this->topic_id, $cid ); Index: functions_pafiledb.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/pafiledb/includes/functions_pafiledb.php,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** functions_pafiledb.php 7 Jun 2006 20:29:52 -0000 1.27 --- functions_pafiledb.php 17 Jun 2006 20:13:22 -0000 1.28 *************** *** 147,155 **** $this->comments[$cat_rowset[$i]['cat_id']]['internal_comments'] = $cat_rowset[$i]['internal_comments'] == -1 ? ($pafiledb_config['internal_comments'] == 1 ? true : false ) : ( $cat_rowset[$i]['internal_comments'] == 1 ? true : false ); // phpBB or internal comments $this->comments[$cat_rowset[$i]['cat_id']]['autogenerate_comments'] = $cat_rowset[$i]['autogenerate_comments'] == -1 ? ($pafiledb_config['autogenerate_comments'] == 1 ? true : false ) : ( $cat_rowset[$i]['autogenerate_comments'] == 1 ? true : false ); // autocreate comments when updated ! $this->comments[$cat_rowset[$i]['cat_id']]['comments_forum_id'] = $cat_rowset[$i]['comments_forum_id'] == -1 ? ($pafiledb_config['comments_forum_id'] == 1 ? true : false ) : ( $cat_rowset[$i]['comments_forum_id'] == 1 ? true : false ); // phpBB target forum (only used for phpBB comments) if (!$this->comments[$cat_rowset[$i]['cat_id']]['internal_comments'] && intval($this->comments[$cat_rowset[$i]['cat_id']]['comments_forum_id']) < 1) { ! // mx_message_die(GENERAL_ERROR, 'Init Failure, phpBB comments with no target forum_id :('); } --- 147,155 ---- $this->comments[$cat_rowset[$i]['cat_id']]['internal_comments'] = $cat_rowset[$i]['internal_comments'] == -1 ? ($pafiledb_config['internal_comments'] == 1 ? true : false ) : ( $cat_rowset[$i]['internal_comments'] == 1 ? true : false ); // phpBB or internal comments $this->comments[$cat_rowset[$i]['cat_id']]['autogenerate_comments'] = $cat_rowset[$i]['autogenerate_comments'] == -1 ? ($pafiledb_config['autogenerate_comments'] == 1 ? true : false ) : ( $cat_rowset[$i]['autogenerate_comments'] == 1 ? true : false ); // autocreate comments when updated ! $this->comments[$cat_rowset[$i]['cat_id']]['comments_forum_id'] = $cat_rowset[$i]['comments_forum_id'] < 1 ? ( intval($pafiledb_config['comments_forum_id']) ) : ( intval($cat_rowset[$i]['comments_forum_id']) ); // phpBB target forum (only used for phpBB comments) if (!$this->comments[$cat_rowset[$i]['cat_id']]['internal_comments'] && intval($this->comments[$cat_rowset[$i]['cat_id']]['comments_forum_id']) < 1) { ! mx_message_die(GENERAL_ERROR, 'Init Failure, phpBB comments with no target forum_id :( <br> Category: ' . $cat_rowset[$i]['cat_name'] . ' Forum_id: ' . $this->comments[$cat_rowset[$i]['cat_id']]['comments_forum_id']); } *************** *** 1480,1484 **** $cat_internal_comments = ( isset( $_POST['internal_comments'] ) ) ? intval( $_POST['internal_comments'] ) : 0; $cat_autogenerate_comments = ( isset( $_POST['autogenerate_comments'] ) ) ? intval( $_POST['autogenerate_comments'] ) : 0; ! $comments_forum_id = intval( $_POST['forum_id'] ); $cat_show_pretext = ( isset( $_POST['show_pretext'] ) ) ? intval( $_POST['show_pretext'] ) : 0; --- 1480,1484 ---- $cat_internal_comments = ( isset( $_POST['internal_comments'] ) ) ? intval( $_POST['internal_comments'] ) : 0; $cat_autogenerate_comments = ( isset( $_POST['autogenerate_comments'] ) ) ? intval( $_POST['autogenerate_comments'] ) : 0; ! $comments_forum_id = intval( $_POST['comments_forum_id'] ); $cat_show_pretext = ( isset( $_POST['show_pretext'] ) ) ? intval( $_POST['show_pretext'] ) : 0; *************** *** 1902,1916 **** $cat_id = ( isset( $_REQUEST['cat_id'] ) ) ? intval( $_REQUEST['cat_id'] ) : 0; ! $file_name = ( isset( $_POST['name'] ) ) ? htmlspecialchars( $_POST['name'] ) : ''; ! $file_long_desc = ( isset( $_POST['long_desc'] ) ) ? $_POST['long_desc'] : ''; ! $file_short_desc = ( isset( $_POST['short_desc'] ) ) ? $_POST['short_desc'] : ( ( !empty( $_POST['long_desc'] ) ) ? substr( $_POST['long_desc'], 0, 50 ) . '...' : '' ); ! $file_author = ( isset( $_POST['author'] ) ) ? htmlspecialchars( $_POST['author'] ) : ( ( $userdata['user_id'] != ANONYMOUS ) ? $userdata['username'] : '' ); ! $file_version = ( isset( $_POST['version'] ) ) ? htmlspecialchars( $_POST['version'] ) : ''; ! $file_website = ( isset( $_POST['website'] ) ) ? htmlspecialchars( $_POST['website'] ) : ''; if ( !empty( $file_website ) ) { --- 1902,1916 ---- $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 ) ) { *************** *** 2096,2099 **** --- 2096,2189 ---- * * @param unknown_type $file_id + * @param unknown_type $cat_id + * @param unknown_type $mode_notification + */ + function update_add_file_notify( $file_id = false, $mode_notification = 'edit' ) + { + global $db; + + if ( in_array( $mode_notification, array( 'add', 'edit', 'do_approve', 'do_unapprove', 'delete' ) ) ) + { + if (!$file_id) + { + die('bad update_add_file_notify arg'); + } + + if (is_array( $file_id ) && !empty( $file_id )) + { + $fileIdsArray = $file_id; + } + else + { + $fileIdsArray[] = $file_id; + } + + foreach($fileIdsArray as $fileId) + { + $sql = "SELECT file_catid + FROM " . PA_FILES_TABLE . " + WHERE file_id = '" . $fileId . "'"; + + if ( !$result = $db->sql_query( $sql ) ) + { + mx_message_die( GENERAL_ERROR, 'Couldn\'t get file info', '', __LINE__, __FILE__, $sql ); + } + + $row = $db->sql_fetchrow( $result ); + $catId = $row['file_catid']; + + // + // Notification + // + if ( $this->notification[$catId]['activated'] > 0 ) // -1, 0, 1, 2 + { + // + // Instatiate notification + // + $mx_pa_notification = new mx_pa_notification(); + $mx_pa_notification->init( $fileId ); + + // + // Now send notification + // + $mx_notification_mode = $this->notification[$catId]['activated'] == 1 ? MX_PM_MODE : MX_MAIL_MODE; + + switch ( $mode_notification ) + { + case 'add': + $mx_notification_action = MX_NEW_NOTIFICATION; + break; + case 'edit': + $mx_notification_action = MX_EDITED_NOTIFICATION; + break; + case 'do_approve': + $mx_notification_action = MX_APPROVED_NOTIFICATION; + break; + case 'do_unapprove': + $mx_notification_action = MX_UNAPPROVED_NOTIFICATION; + break; + case 'delete': + $mx_notification_action = MX_DELETED_NOTIFICATION; + break; + } + + $html_entities_match = array('#&(?!(\#[0-9]+;))#', '#<#', '#>#', '#"#'); + $html_entities_replace = array('&', '<', '>', '"'); + + $mx_pa_notification->notify( $mx_notification_mode, $mx_notification_action ); + + if ( $this->notification[$cat_id]['notify_group'] > 0 ) + { + $mx_pa_notification->notify( $mx_notification_mode, $mx_notification_action, - intval($this->notification[$catId]['notify_group']) ); + } + } + } + } + } + + /** + * Enter description here... + * + * @param unknown_type $file_id * @param unknown_type $file_upload * @param unknown_type $file_remote_url *************** *** 2386,2389 **** --- 2476,2617 ---- * Enter description here... * + * @param unknown_type $article_data + * @param unknown_type $item_id + * @param unknown_type $cid + * @param unknown_type $subject + * @param unknown_type $message + * @param unknown_type $html_on + * @param unknown_type $bbcode_on + * @param unknown_type $smilies_on + */ + function update_add_comment($file_data = '', $item_id, $cid, $subject = '', $message = '', $html_on = false, $bbcode_on = true, $smilies_on = false) + { + global $pafiledb_template, $pafiledb_functions, $lang, $board_config, $phpEx, $pafiledb_config, $db, $images, $userdata; + global $html_entities_match, $html_entities_replace, $unhtml_specialchars_match, $unhtml_specialchars_replace; + global $mx_root_path, $module_root_path, $phpbb_root_path, $is_block, $phpEx, $mx_request_vars; + + // + // Ensure we have article_data defined + // + if (!is_array($article_data) && !empty($item_id) && $item_id > 0) + { + $sql = "SELECT * + FROM " . PA_FILES_TABLE . " + WHERE file_id = '" . $item_id . "'"; + + if ( !( $result = $db->sql_query( $sql ) ) ) + { + mx_message_die( GENERAL_ERROR, 'Couldnt select download', '', __LINE__, __FILE__, $sql ); + } + + if ( !$article_data = $db->sql_fetchrow( $result ) ) + { + mx_message_die( GENERAL_MESSAGE, $lang['Article_not_exsist'] ); + } + + $db->sql_freeresult( $result ); + } + + // + // vars (can both be POSTed or send through the function) + // + $update_comment = $cid > 0 ? true : false; + $subject = !empty($subject) ? $subject : $_POST['subject']; + $message = !empty($message) ? $message : $_POST['message']; + + $length = strlen( $message ); + $title = ( !empty( $subject ) ) ? htmlspecialchars( trim ( $subject ) ) : ''; + + // + // Formatting + // + $comment_bbcode_uid = make_bbcode_uid(); + $comments_text = str_replace( '<br />', "\n", $message ); + $comments_text = prepare_message( trim($comments_text), $html_on, $bbcode_on, $smilies_on, $comment_bbcode_uid ); + $comments_text = bbencode_first_pass( $comments_text, $comment_bbcode_uid ); + + if ( $length > $pafiledb_config['max_comment_chars'] ) + { + mx_message_die( GENERAL_ERROR, 'Your comment is too long!<br/>The maximum length allowed in characters is ' . $pafiledb_config['max_comment_chars'] . '' ); + } + + if ( $update_comment ) + { + if ( $this->comments[$file_data['file_catid']]['internal_comments'] ) + { + $sql = "UPDATE " . PA_COMMENTS_TABLE . " + SET comments_text = '" . str_replace( "\'", "''", $comments_text ) . "', + comments_title = '" . str_replace( "\'", "''", $title ) . "', + comment_bbcode_uid = '" . $comment_bbcode_uid . "' + WHERE comments_id = " . $cid . " + AND file_id = ". $item_id; + + if ( !( $db->sql_query( $sql ) ) ) + { + mx_message_die( GENERAL_ERROR, 'Couldnt update comments', '', __LINE__, __FILE__, $sql ); + } + } + else + { + include( $module_root_path . 'pafiledb/includes/functions_comment.' . $phpEx ); + $pafiledb_comments = new pafiledb_comments(); + $pafiledb_comments->init( $item_id ); + + $return_data = $pafiledb_comments->post( 'update', $cid, $title, $comments_text, $userdata['user_id'], $userdata['username'], 0, '', '', $comment_bbcode_uid); + } + + } + else + { + if ( $this->comments[$file_data['file_catid']]['internal_comments'] ) + { + $time = time(); + $poster_id = intval( $userdata['user_id'] ); + $sql = "INSERT INTO " . PA_COMMENTS_TABLE . "(file_id, comments_text, comments_title, comments_time, comment_bbcode_uid, poster_id) + VALUES('$item_id','" . str_replace( "\'", "''", $comments_text ) . "','" . str_replace( "\'", "''", $title ) . "','$time', '$comment_bbcode_uid','$poster_id')"; + + if ( !( $db->sql_query( $sql ) ) ) + { + mx_message_die( GENERAL_ERROR, 'Couldnt insert comments', '', __LINE__, __FILE__, $sql ); + } + } + else + { + include( $module_root_path . 'pafiledb/includes/functions_comment.' . $phpEx ); + $pafiledb_comments = new pafiledb_comments(); + $pafiledb_comments->init( $item_id ); + + $return_data = $pafiledb_comments->post( 'insert', '', $title, $comments_text, $userdata['user_id'], $userdata['username'], 0, '', '', $comment_bbcode_uid); + } + } + + if ( !$this->comments[$file_data['file_catid']]['internal_comments'] ) + { + + // + // Update the item data itself + // + if ($file_data['topic_id'] == 0 ) + { + // + // Update item with new topic_id + // + $sql = "UPDATE " . PA_FILES_TABLE . " + SET topic_id = '" . $return_data['topic_id'] . "' + WHERE file_id = ". $item_id; + + if ( !( $result = $db->sql_query( $sql ) ) ) + { + mx_message_die( GENERAL_ERROR, 'Couldnt update item', '', __LINE__, __FILE__, $sql ); + } + + $db->sql_freeresult( $result ); + } + } + } + + /** + * Enter description here... + * * @param unknown_type $cat_id */ |
|
From: Jon O. <jon...@us...> - 2006-06-17 20:13:26
|
Update of /cvsroot/mxbb/mx_pafiledb/language/lang_english In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv22598/modules/mx_pafiledb/language/lang_english Modified Files: lang_admin.php lang_main.php Log Message: Finalizing module Index: lang_main.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/language/lang_english/lang_main.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** lang_main.php 29 May 2006 15:41:46 -0000 1.7 --- lang_main.php 17 Jun 2006 20:13:22 -0000 1.8 *************** *** 1,11 **** <?php /** ! * ! * @package mxBB Portal Module - mx_pafiledb ! * @version $Id$ ! * @copyright (c) 2002-2006 [Mohd Basri, PHP Arena, pafileDB, Jon Ohlsson] mxBB Project Team ! * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 ! * ! */ // Toplist --- 1,21 ---- <?php + /** ------------------------------------------------------------------------ + * Subject : mxBB - a fully modular portal and CMS (for phpBB) + * Author : Jon Ohlsson and the mxBB Team + * Credits : The phpBB Group & Marc Morisette, Mohd Basri & paFileDB 3.0 ©2001/2002 PHP Arena + * Copyright : (C) 2002-2005 mxBB Portal + * Email : jo...@mx... + * Project site : www.mxbb-portal.com + * ------------------------------------------------------------------------- + * + * $Id$ + */ + /** ! * This program is free software; you can redistribute it and/or modify ! * it under the terms of the GNU General Public License as published by ! * the Free Software Foundation; either version 2 of the License, or ! * (at your option) any later version. ! */ // Toplist *************** *** 15,18 **** --- 25,29 ---- $lang['Most_downloads'] = 'Most Popular Files'; $lang['Rated_downloads'] = 'Top Rated Files'; + $lang['Total_new_files'] = 'Total New Downloads'; $lang['Show'] = 'Show'; *************** *** 34,41 **** // Toplists mx blocks ! $lang['Recent_Public_Files'] = 'Latest DLs'; ! $lang['Random_Public_Files'] = 'Random DLs'; ! $lang['Toprated_Public_Files'] = 'Toprated DLs'; $lang['Most_Public_Files'] = 'Most downloaded'; $lang['File_Title'] = 'Title'; $lang['File_Desc'] = 'Description'; --- 45,53 ---- // Toplists mx blocks ! $lang['Recent_Public_Files'] = 'Latest dls'; ! $lang['Random_Public_Files'] = 'Random dls'; ! $lang['Toprated_Public_Files'] = 'Toprated dls'; $lang['Most_Public_Files'] = 'Most downloaded'; + $lang['File_Title'] = 'Title'; $lang['File_Desc'] = 'Description'; *************** *** 83,164 **** $lang['Not_available'] = 'Not Available!'; $lang['Bytes'] = 'Bytes'; ! $lang['KB'] = 'Kilobyte'; ! $lang['MB'] = 'Megabyte'; $lang['Mirrors'] = 'Mirrors'; ! $lang['Mirrors_explain'] = 'Here you can add or edit mirrors for this file. Make sure to verify all the information because the file will be submitted to the database'; $lang['Click_here_mirrors'] = 'Click Here to Add mirrors'; $lang['Mirror_location'] = 'Mirror Location'; $lang['Add_new_mirror'] = 'Add new mirror'; - $lang['Afile'] = 'File: Add'; - $lang['Efile'] = 'File: Edit'; - $lang['Dfile'] = 'File: Delete'; - $lang['Afiletitle'] = 'Add File'; - $lang['Efiletitle'] = 'Edit File'; - $lang['Dfiletitle'] = 'Delete File'; - $lang['Fileexplain'] = 'You can use the file management section to add, edit, and delete files.'; - $lang['Upload'] = 'Upload File'; - $lang['Uploadinfo'] = 'Upload this file'; - $lang['Uploaderror'] = 'This file already exists. Please rename the file and try again.'; - $lang['Uploaddone'] = 'This file has been successfully uploaded. The URL to the file is'; - $lang['Uploaddone2'] = 'Click Here to place this URL in the Download URL field.'; - $lang['Upload_do_done'] = 'Uploaded Sucessfully'; - $lang['Upload_do_not'] = 'Not Uploaded'; - $lang['Upload_do_exist'] = 'File Exist'; - $lang['Filename'] = 'File Name'; - $lang['Filenameinfo'] = 'This is the name of the file you are adding, such as \'My Picture.\''; - $lang['Filesd'] = 'Short Description'; - $lang['Filesdinfo'] = 'This is a short description of the file. This will go on the page that lists all the files in a category, so this description should be short'; - $lang['Fileld'] = 'Long Description'; - $lang['Fileldinfo'] = 'This is a longer description of the file. This will go on the file\'s information page so this description can be longer'; - $lang['Filecreator'] = 'Creator/Author'; - $lang['Filecreatorinfo'] = 'This is the name of whoever created the file.'; - $lang['Fileversion'] = 'File Version'; - $lang['Fileversioninfo'] = 'This is the version of the file, such as 3.0 or 1.3 Beta'; - $lang['Filess'] = 'Screenshot URL'; - $lang['Filessinfo'] = 'This is a URL to a screenshot of the file. For example, if you are adding a Winamp skin, this would be a URL to a screenshot of Winamp with this skin. You can manually enter a URL or you can leave it blank and upload a screen shot using "Browse" above.'; - $lang['Filess_upload'] = 'Upload Screenshot'; - $lang['Filessinfo_upload'] = 'You can upload a screenshot by clicking on "Browse"'; - $lang['Filess_link'] = 'Screenshot as a Link'; - $lang['Filess_link_info'] = 'If you want to show the screenshot as a link, choose "yes".'; - $lang['Filedocs'] = 'Documentation/Manual URL'; - $lang['Filedocsinfo'] = 'This is a URL to the documentation or a manual for the file'; - $lang['Fileurl'] = 'File URL'; - $lang['Fileurlinfo'] = 'This is a URL to the file that will be downloaded. You can type it in manually or you can click on "Browse" above and upload a file.'; - $lang['File_upload'] = 'File Upload'; - $lang['Fileinfo_upload'] = 'You can upload a file by clicking on "Browse"'; - $lang['Uploaded_file'] = 'Uploaded file'; - $lang['Filepi'] = 'Post Icon'; - $lang['Filepiinfo'] = 'You can choose a post icon for the file. The post icon will be shown next to the file in the list of files.'; - $lang['Filecat'] = 'Category'; - $lang['Filecatinfo'] = 'This is the category the file belongs in.'; - $lang['Filelicense'] = 'License'; - $lang['Filelicenseinfo'] = 'This is the license agreement the user must agree to before downloading the file.'; - $lang['Filepin'] = 'Pin File'; - $lang['Filepininfo'] = 'Choose if you want the file pinned or not. Pinned files will always be shown at the top of the file list.'; - $lang['Fileadded'] = 'The new file has been successfully added'; - $lang['Filedeleted'] = 'The file has been successfully deleted'; - $lang['Fileedited'] = 'The file you selected has been successfully edited'; - $lang['Fderror'] = 'You didn\'t select any files to delete'; - $lang['Filesdeleted'] = 'The files you selected have been successfully deleted'; - $lang['Filetoobig'] = 'That file is too big!'; - $lang['Approved'] = 'Approved'; - $lang['Not_approved'] = '(Not Approved)'; - $lang['Approved_info'] = 'Use this option to make the file available for users, and also to approve a file that has been uploaded by the users.'; - $lang['Fchecker'] = 'File: Maintenance'; - $lang['File_checker'] = 'File Maintenance'; - $lang['File_checker_explain'] = 'Here you can perform a checking for all file in database and the file in the download directory.'; - $lang['File_saftey'] = 'File maintenance will attempt to delete all files and screenshots that are currently not needed and will remove any file records where the file has been deleted and will clear all screenshots that are not found.<br /><br />If the files do not start with <FONT COLOR="#FF0000">{html_path}</FONT> then the files will be skipped for security reasons.<br /><br />Please make sure that <FONT COLOR="#FF0000">{html_path}</FONT> is the path that you use for your files.<br /><br />.'; - // <a href="' . append_sid($phpbb_root_path . "admin/admin_db_utilities.php?perform=backup") . '" class="genmed">Backup your database</a> - $lang['File_checker_perform'] = 'Perform Checking'; - $lang['Checker_saved'] = 'Total Saved Space'; - $lang['Checker_sp1'] = 'Checking for records with missing files...'; - $lang['Checker_sp2'] = 'Checking for records with missing screenshots...'; - $lang['Checker_sp3'] = 'Deleting unused Files...'; - $lang['Filedls'] = 'Download Total'; - $lang['Addtional_field'] = 'Additional Field'; - $lang['File_not_found'] = 'The file you specified cannot be found'; - $lang['SS_not_found'] = 'The screenshot you specified cannot be found'; - //User Upload $lang['User_upload'] = 'User Upload'; --- 95,106 ---- $lang['Not_available'] = 'Not Available!'; $lang['Bytes'] = 'Bytes'; ! $lang['KB'] = 'Kilo Byte'; ! $lang['MB'] = 'Mega Byte'; $lang['Mirrors'] = 'Mirrors'; ! $lang['Mirrors_explain'] = 'Here you can add or edit mirrors for this file, make sure to verify all the information because the file will be submitted to the database'; $lang['Click_here_mirrors'] = 'Click Here to Add mirrors'; $lang['Mirror_location'] = 'Mirror Location'; $lang['Add_new_mirror'] = 'Add new mirror'; //User Upload $lang['User_upload'] = 'User Upload'; *************** *** 168,172 **** $lang['Licensewarn'] = 'You must agree to this license agreement to download'; $lang['Iagree'] = 'I Agree'; ! $lang['Dontagree'] = 'I Don\'t Agree'; // Search --- 110,114 ---- $lang['Licensewarn'] = 'You must agree to this license agreement to download'; $lang['Iagree'] = 'I Agree'; ! $lang['Dontagree'] = 'I Dont Agree'; // Search *************** *** 179,183 **** $lang['Choose_cat'] = 'Choose Category:'; $lang['Include_comments'] = 'Include Comments'; ! $lang['Submiter'] = 'Submitted by'; // Statistics --- 121,125 ---- $lang['Choose_cat'] = 'Choose Category:'; $lang['Include_comments'] = 'Include Comments'; ! $lang['Submiter'] = 'Submited by'; // Statistics *************** *** 263,267 **** //Permission ! $lang['Sorry_auth_view'] = 'Sorry, but only %s can view files and subcategory in this category.'; $lang['Sorry_auth_file_view'] = 'Sorry, but only %s can view this file in this category.'; $lang['Sorry_auth_upload'] = 'Sorry, but only %s can upload file in this category.'; --- 205,209 ---- //Permission ! $lang['Sorry_auth_view'] = 'Sorry, but only %s can view files and sub category in this category.'; $lang['Sorry_auth_file_view'] = 'Sorry, but only %s can view this file in this category.'; $lang['Sorry_auth_upload'] = 'Sorry, but only %s can upload file in this category.'; *************** *** 281,285 **** // General $lang['Category'] = 'Category'; ! $lang['Error_no_download'] = 'The selected file does not exist anymore'; $lang['Options'] = 'Options'; $lang['Click_return'] = 'Click %sHere%s to return to the previous page'; --- 223,227 ---- // General $lang['Category'] = 'Category'; ! $lang['Error_no_download'] = 'The selected File does not exist anymore'; $lang['Options'] = 'Options'; $lang['Click_return'] = 'Click %sHere%s to return to the previous page'; *************** *** 305,328 **** $lang['Quickdl'] = 'Default Pa Cat'; ! $lang['Quickdl_explain'] = 'This is the default pafileDB category to display, if no mapping is activated'; ! $lang['Pa_updated_return_settings'] = "pafileDB QuickDL configuration updated successfully.<br /><br />Click %shere%s to return to main page."; // %s's for URI params - DO NOT REMOVE ! $lang['Pa_update_error'] = "Couldn't update pafileDB QuickDL configuration.<br /><br />This module is designed for MySQL so please contact the author if you are having problems. If you can offer a translation of the SQL into other database formats, please send them to:<br />"; ! $lang['Pa_settings'] = "pafileDB mapping settings"; ! $lang['Pa_settings_short_explain'] = "Settings for mapping pafileDB catagories and dynamic blocks."; ! $lang['Pa_settings_explain'] = "Here you can edit the configuration for the pa module. This panel lets you associate pafileDB categories and dynamic blocks for the QuickDL block."; ! // PM Notification $lang['PA_title'] = 'Download database'; - $lang['PA_goto_file'] = 'View file'; - $lang['PA_notify_subject_new'] = 'New file uploaded!'; - $lang['PA_notify_subject_edited'] = 'Edited File!'; - $lang['PA_notify_subject_approved'] = 'Approved File!'; - $lang['PA_notify_subject_unapproved'] = 'Unapproved File!'; - $lang['PA_notify_body'] = 'A file has been uploaded or modified:'; ! $lang['kb_no_ratings'] = 'Disabled in this category'; $lang['PA_Rules_upload_can'] = 'You <b>can</b> upload new files in this category'; $lang['PA_Rules_upload_cannot'] = 'You <b>cannot</b> upload new files in this category'; --- 247,282 ---- $lang['Quickdl'] = 'Default Pa Cat'; ! $lang['Quickdl_explain'] = 'This is the default pafiledb category to display, if no mapping is activated'; ! $lang['Pa_updated_return_settings'] = "Pa quickdl configuration updated successfully.<br /><br />Click %shere%s to return to main page."; // %s's for URI params - DO NOT REMOVE ! $lang['Pa_update_error'] = "Couldn't update Pa quickdl configuration.<br /><br />This mod is designed for MySQL so please contact the author if you have troubles. If you can offer a translation of the SQL into other database formats, please send them to:<br />"; ! $lang['Pa_settings'] = "Pa mapping settings"; ! $lang['Pa_settings_short_explain'] = "Settings for mapping pa cats and dynamic blocks."; ! $lang['Pa_settings_explain'] = "Here you can edit the configuration for the pa module. This panel lets you associate pa cats and dynamic blocks for the quickdl block."; ! // ! // Notification ! // $lang['PA_title'] = 'Download database'; ! $lang['PA_notify_subject_new'] = 'New file!'; ! $lang['PA_notify_subject_edited'] = 'Edited file!'; ! $lang['PA_notify_subject_approved'] = 'Approved file!'; ! $lang['PA_notify_subject_unapproved'] = 'Unapproved file!'; ! $lang['PA_notify_subject_deleted'] = 'Removed file!'; + $lang['PA_notify_new_body'] = 'A new file was uploaded in the download manager.'; + $lang['PA_notify_edited_body'] = 'A file has been edited in the download manager.'; + $lang['PA_notify_approved_body'] = 'A file has been approved in the download manager.'; + $lang['PA_notify_unapproved_body'] = 'A file has been unapproved in the download manager.'; + $lang['PA_notify_deleted_body'] = 'A file has been removed from the download manager.'; + $lang['Edited_Article_info'] = 'The file was updated by '; + + $lang['PA_goto'] = '>>View file'; + + // + // Auth Can + // $lang['PA_Rules_upload_can'] = 'You <b>can</b> upload new files in this category'; $lang['PA_Rules_upload_cannot'] = 'You <b>cannot</b> upload new files in this category'; Index: lang_admin.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/language/lang_english/lang_admin.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** lang_admin.php 29 May 2006 15:41:46 -0000 1.8 --- lang_admin.php 17 Jun 2006 20:13:22 -0000 1.9 *************** *** 1,15 **** <?php /** ! * ! * @package mxBB Portal Module - mx_pafiledb ! * @version $Id$ ! * @copyright (c) 2002-2006 [Mohd Basri, PHP Arena, pafileDB, Jon Ohlsson] mxBB Project Team ! * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 ! * */ ! // Categories ! $lang['Cat_manage_title'] = 'Category Management'; ! $lang['File_manage_title'] = 'File Management'; $lang['All_files'] = 'All Files'; $lang['Approved_files'] = 'Unapproved Files'; --- 1,266 ---- <?php + /** ------------------------------------------------------------------------ + * Subject : mxBB - a fully modular portal and CMS (for phpBB) + * Author : Jon Ohlsson and the mxBB Team + * Credits : The phpBB Group & Marc Morisette, Mohd Basri & paFileDB 3.0 ©2001/2002 PHP Arena + * Copyright : (C) 2002-2005 mxBB Portal + * Email : jo...@mx... + * Project site : www.mxbb-portal.com + * ------------------------------------------------------------------------- + * + * $Id$ + */ + /** ! * This program is free software; you can redistribute it and/or modify ! * it under the terms of the GNU General Public License as published by ! * the Free Software Foundation; either version 2 of the License, or ! * (at your option) any later version. ! */ ! ! // ! // adminCP index ! // ! $lang['pafileDB_Download'] = 'PafileDB Admin'; ! $lang['0_Configuration'] = 'General Settings'; ! $lang['1_Cat_manage'] = 'Category Management'; ! $lang['2_File_manage'] = 'File Management'; ! $lang['3_Permissions'] = 'Permissions'; ! $lang['4_License'] = 'License'; ! $lang['5_Custom_manage'] = 'Custom fields'; ! $lang['6_Fchecker'] = 'File checker'; ! ! // ! // Parameter Types ! // ! $lang['ParType_pa_mapping'] = "pafileDB category mapping"; ! $lang['ParType_pa_mapping_info'] = ""; ! ! $lang['ParType_pa_quick_cat'] = "pafileDB default category"; ! $lang['ParType_pa_quick_cat_info'] = ""; ! ! // ! // Parameter Names ! // ! $lang['pa_mapping'] = "pafileDB category mapping"; ! $lang['pa_mapping_explain'] = "pafileDB categories and portal dynamic blocks mapping"; ! ! $lang['pa_quick_cat'] = "pafileDB default category"; ! $lang['pa_quick_cat_explain'] = "This category is used if no matching mapping is found"; ! ! // ! // Admin Panels - Configuration ! // ! $lang['Panel_config_title'] = 'Download Configuration'; ! $lang['Panel_config_explain'] = 'The form below will allow you to customize all the general download options.'; ! ! // ! // General ! // ! $lang['General_title'] = 'General'; ! ! $lang['Module_name'] = 'Database Name'; ! $lang['Module_name_explain'] = 'This is the name of the database, such as \'Download Index\''; ! ! $lang['Enable_module'] = 'Enable this module'; ! $lang['Enable_module_explain'] = 'This will make the download section unavailable to users. This is a good option to use when making modifications to your database. Only Admins will be able to view the database.'; ! ! $lang['Wysiwyg_path'] = 'Path to WYSIWYG software'; ! $lang['Wysiwyg_path_explain'] = 'This is the path (from mxBB/phpBB root) to the WYSIWYG software folder, eg \'modules/mx_shared/\' if you have uploaded, for example, TinyMCE in modules/mx_shared/tinymce.'; ! ! $lang['Upload_directory'] = 'Upload Directory'; ! $lang['Upload_directory_explain'] = 'Enter the relative path from your root installation (where phpBB or mxBB is located) to the files upload directory. If you stick to the file structure provided in the shipped package, enter \'pafiledb/uploads/\'.'; ! ! $lang['Screenshots_directory'] = 'Screenshots Directory'; ! $lang['Screenshots_directory_explain'] = 'Enter the relative path from your root installation (where phpBB or mxBB is located) to the Screenshots upload directory. If you stick to the file structure provided in the shipped package, enter \'pafiledb/images/screenshots/\'.'; ! ! ! // ! // File ! // ! $lang['File_title'] = 'File'; ! ! $lang['Hotlink_prevent'] = 'Hotlink Prevention'; ! $lang['Hotlinl_prevent_info'] = 'Set this to yes if you don\'t want to allow hotlinks to the files'; ! ! $lang['Hotlink_allowed'] = 'Allowed domains for hotlink'; ! $lang['Hotlink_allowed_info'] = 'Allowed domains for hotlink (separated by a comma), for example, www.phpbb.com, www.forumimages.com'; ! ! $lang['Php_template'] = 'PHP in template'; ! $lang['Php_template_info'] = 'This will allow you to use php directly in the template files'; ! ! $lang['Max_filesize'] = 'Maximum Filesize'; ! $lang['Max_filesize_explain'] = 'Maximum filesize for Files. A value of 0 means \'unlimited\'. This Setting is restricted by your Server Configuration. For example, if your php Configuration only allows a maximum of 2 MB uploads, this cannot be overwritten by the Mod.'; ! ! $lang['Forbidden_extensions'] = 'Forbidden Extensions'; ! $lang['Forbidden_extensions_explain'] = 'Here you can add or delete the forbidden extensions. Seprate each extenstion with comma.'; ! ! $lang['Bytes'] = 'Bytes'; ! $lang['KB'] = 'KB'; ! $lang['MB'] = 'MB'; ! ! // ! // Appearance ! // ! $lang['Appearance_title'] = 'Appearance'; ! ! $lang['File_pagination'] = 'File pagination'; ! $lang['File_pagination_explain'] = 'The number of files to show in a category before pagination.'; ! ! $lang['Sort_method'] = 'Sorting method'; ! $lang['Sort_method_explain'] = 'Define how files are sorted within its category.'; ! ! $lang['Sort_order'] = 'ASC or DESC sorting'; ! $lang['Sort_order_explain'] = ''; ! ! $lang['Topnum'] = 'Top Number'; ! $lang['Topnuminfo'] = 'This is how many files will be displayed on the Top X Downloaded files list'; ! ! $lang['Nfdays'] = 'New File Days'; ! $lang['Nfdaysinfo'] = 'How many days a new file is to be listed with a \'New File\' icon. If this is set to 5, then all files added within the past 5 days will have the \'New File\' icon'; ! ! $lang['Showva'] = 'Show \'View All Files\''; ! $lang['Showvainfo'] = 'Choose whether or not you wish to have the \'View All Files\' category displayed with the other categories on the main page'; ! ! // ! // Comments ! // ! $lang['Comments_title'] = 'Comments'; ! $lang['Comments_title_explain'] = 'Some comments settings are default settings, and can be overridden per category'; ! ! $lang['Use_comments'] = 'Comments'; ! $lang['Use_comments_explain'] = 'Enable comments for files, to be inserted in the forum'; ! ! $lang['Internal_comments'] = 'Internal or phpBB Comments'; ! $lang['Internal_comments_explain'] = 'Use internal comments, or phpBB comments'; ! ! $lang['Select_topic_id'] = 'Select phpBB Comments Topic!'; ! ! $lang['Internal_comments_phpBB'] = 'phpBB Comments'; ! $lang['Internal_comments_internal'] = 'Internal Comments'; ! ! $lang['Forum_id'] = 'phpBB Forum ID'; ! $lang['Forum_id_explain'] = 'If phpBB comments are used, this is the forum where the comments will be kept'; ! ! $lang['Autogenerate_comments'] = 'Autogenerate comments when fil are managed'; ! $lang['Autogenerate_comments_explain'] = 'When editing/adding a file, a notifying reply is posted in the file topic.'; ! ! $lang['Del_topic'] = 'Delete Topic'; ! $lang['Del_topic_explain'] = 'When you delete a file, do you want its comments topic to be deleted also?'; ! ! $lang['Comments_pag'] = 'Comments pagination'; ! $lang['Comments_pag_explain'] = 'The number of comments to show for the file before pagination.'; ! ! $lang['Allow_Wysiwyg'] = 'Use WYSIWYG editor'; ! $lang['Allow_Wysiwyg_explain'] = 'If enabled, the standard BBCode/HTML/Smilies input dialog is replaced by a WYSIWYG editor.'; ! ! $lang['Allow_links'] = 'Allow Links'; ! $lang['Allow_links_message'] = 'Default \'No Links\' Message'; ! $lang['Allow_links_explain'] = 'If links are not allowed this text will be displayed instead'; ! ! $lang['Allow_images'] = 'Allow Images'; ! $lang['Allow_images_message'] = 'Default \'No Images\' Message'; ! $lang['Allow_images_explain'] = 'If images are not allowed this text will be displayed instead'; ! ! $lang['Max_subject_char'] = 'Maximum Number of charcters in subject'; ! $lang['Max_subject_char_explain'] = 'If to big, you get an error message (Limit the subject).'; ! ! $lang['Max_desc_char'] = 'Maximum Number of charcters in description'; ! $lang['Max_desc_char_explain'] = 'If to big, you get an error message (Limit the subject).'; ! ! $lang['Max_char'] = 'Maximum Number of charcters in text'; ! $lang['Max_char_explain'] = 'If to big, you get an error message (Limit the comment).'; ! ! $lang['Format_wordwrap'] = 'Word wrapping'; ! $lang['Format_wordwrap_explain'] = 'Text control filter'; ! ! $lang['Format_truncate_links'] = 'Truncate Links'; ! $lang['Format_truncate_links_explain'] = 'Links are shortened, eg t ex \'www.mxbb-portal...\''; ! ! $lang['Format_image_resize'] = 'Image resize'; ! $lang['Format_image_resize_explain'] = 'Resize images to this width (pixels)'; ! ! // ! // Ratings ! // ! $lang['Ratings_title'] = 'Ratings'; ! $lang['Ratings_title_explain'] = 'Some ratings settings are default settings, and can be overridden per category'; ! ! $lang['Use_ratings'] = 'Ratings'; ! $lang['Use_ratings_explain'] = 'Enable ratings'; ! ! $lang['Votes_check_ip'] = 'Validate ratings - IP'; ! $lang['Votes_check_ip_explain'] = 'Only one vote per IP address is permitted.'; ! ! $lang['Votes_check_userid'] = 'Validate ratings - User'; ! $lang['Votes_check_userid_explain'] = 'Users may only vote once.'; ! ! // ! // Instructions ! // ! $lang['Instructions_title'] = 'User Instructions'; ! ! $lang['Pre_text_name'] = 'File Submission Instructions'; ! $lang['Pre_text_explain'] = 'Activate Submission Instructions displayed to users at the top of the submission forum.'; ! ! $lang['Pre_text_header'] = 'File Submission Instructions Header'; ! $lang['Pre_text_body'] = 'File Submission Instructions Body'; ! ! $lang['Show'] = 'Show'; ! $lang['Hide'] = 'Hide'; ! ! // ! // Notifications ! // ! $lang['Notifications_title'] = 'Notification'; ! ! $lang['Notify'] = 'Notify admin by'; ! $lang['Notify_explain'] = 'Choose which way to receive notices that new files have been uploaded'; ! $lang['PM'] = 'PM'; ! $lang['Notify_group'] = 'and groupmembers '; ! $lang['Notify_group_explain'] = 'Also send notification to members in this group'; ! ! // ! // Permissions ! // ! $lang['Permission_settings'] = 'Permission settings'; ! ! $lang['Auth_search'] = 'Search Permission'; ! $lang['Auth_search_explain'] = 'Allow search for specific type of users'; ! ! $lang['Auth_stats'] = 'Stats Permission'; ! $lang['Auth_stats_explain'] = 'Allow stats for specific type of users'; ! ! $lang['Auth_toplist'] = 'Toplist Permission'; ! $lang['Auth_toplist_explain'] = 'Allow toplist for specific type of users'; ! ! $lang['Auth_viewall'] = 'Viewall Permission'; ! $lang['Auth_viewall_explain'] = 'Allow viewall for specific type of users'; ! ! $lang['Settings'] = 'Configuration'; ! $lang['Settings_changed'] = 'Your settings have been successfully updated'; ! ! /* ! $lang['Sitename'] = 'Site Name'; ! $lang['Sitenameinfo'] = 'This is the name of your site for the navigation menu, such as \'Home\''; ! $lang['Dburl'] = 'Database URL'; ! $lang['Dburlinfo'] = 'This is the URL to the directory where this is installed'; ! $lang['Hpurl'] = 'Homepage URL'; ! $lang['Hpurlinfo'] = 'This is the URL to your portal or home page'; ! $lang['Dbdl'] = 'Disable Downloads'; ! $lang['Dbdlinfo'] = 'This will make the download section unavailable to users. This is a good option to use when making modifications to your database. Only Admins will be able to view the database'; ! $lang['Isdisabled'] = 'The download section is currently unavailable, please try again later.'; ! $lang['File_per_page'] = 'Number of file per Page'; ! $lang['File_per_page_info'] = 'Here you can set the number of file per page, if you leave it empty the number of per page will be 20.'; */ ! // ! // Admin Panels - Categories ! // ! $lang['Panel_cat_title'] = 'Category administration'; ! $lang['Panel_cat_explain'] = ''; ! ! $lang['Use_default'] = 'Use default setting'; ! $lang['All_files'] = 'All Files'; $lang['Approved_files'] = 'Unapproved Files'; *************** *** 37,41 **** $lang['Dcattitle'] = 'Delete Category'; $lang['Rcattitle'] = 'Reorder Categories'; ! $lang['Catexplain'] = 'You can use the Category Management section to add, edit, delete, and reorder categories. In order to add files to your database, you must have at least one category created. You can select a link below to manage your categories.'; $lang['Rcatexplain'] = 'You can reorder categories to change the position they are displayed in on the main page. To reorder the categories, change the numbers to the order you want them shown in. 1 will be showed first, 2 will be shown second, etc. This does not affect sub-categories.'; $lang['Catadded'] = 'The new category has been successfully added'; --- 288,292 ---- $lang['Dcattitle'] = 'Delete Category'; $lang['Rcattitle'] = 'Reorder Categories'; ! $lang['Catexplain'] = 'You can use the Category Management section to add, edit, delete and reorder categories. In order to add files to your database, you must have at least one category created. You can select a link below to manage your categories.'; $lang['Rcatexplain'] = 'You can reorder categories to change the position they are displayed in on the main page. To reorder the categories, change the numbers to the order you want them shown in. 1 will be showed first, 2 will be shown second, etc. This does not affect sub-categories.'; $lang['Catadded'] = 'The new category has been successfully added'; *************** *** 45,49 **** $lang['Catdescinfo'] = 'This is a description of the files in the category'; $lang['Catparent'] = 'Parent Category'; ! $lang['Catparentinfo'] = 'If you want this category to be a subcategory, select the category you want it to be a sub-category of.'; $lang['Allow_file'] = 'Allow Adding file'; $lang['Allow_file_info'] = 'If you not allow adding file to this category it will be higher level category and you can add category as a sub for this category, like in the forum.'; --- 296,300 ---- $lang['Catdescinfo'] = 'This is a description of the files in the category'; $lang['Catparent'] = 'Parent Category'; ! $lang['Catparentinfo'] = 'If you want this category to be a sub-category, select the category you want it to be a sub-category of.'; $lang['Allow_file'] = 'Allow Adding file'; $lang['Allow_file_info'] = 'If you not allow adding file to this category it will be higher level category and you can add category as a sub for this category, like in the forum.'; *************** *** 51,55 **** $lang['Catedited'] = 'The category you selected has been successfully edited'; $lang['Delfiles'] = 'What do you want to do with the files in this category?'; ! $lang['Do_cat'] = 'What do you want to do with the subcategory in this category?'; $lang['Move_to'] = 'Move to'; $lang['Catsdeleted'] = 'The categories you selected have been successfully deleted'; --- 302,306 ---- $lang['Catedited'] = 'The category you selected has been successfully edited'; $lang['Delfiles'] = 'What do you want to do with the files in this category?'; ! $lang['Do_cat'] = 'What do you want to do with the sub category in this category?'; $lang['Move_to'] = 'Move to'; $lang['Catsdeleted'] = 'The categories you selected have been successfully deleted'; *************** *** 57,61 **** $lang['Rcatdone'] = 'The categories have been successfully re-ordered'; ! //Catgories Permission $lang['View'] = 'View'; $lang['Read'] = 'Read'; --- 308,314 ---- $lang['Rcatdone'] = 'The categories have been successfully re-ordered'; ! // ! // Admin Panels - Permissions ! // $lang['View'] = 'View'; $lang['Read'] = 'Read'; *************** *** 85,153 **** $lang['Category_ADMIN'] = 'ADMIN'; ! // Configuration ! $lang['Settings'] = 'Configuration'; ! $lang['Settingstitle'] = 'Download Configuration'; ! $lang['Settingsexplain'] = 'The form below will allow you to customize all the general download options.'; ! $lang['Dbname'] = 'Database Name'; ! $lang['Dbnameinfo'] = 'This is the name of the database, such as \'Download Index\''; ! $lang['Sitename'] = 'Site Name'; ! $lang['Sitenameinfo'] = 'This is the name of your site for the navigation menu, such as \'Home\''; ! $lang['Dburl'] = 'Database URL'; ! $lang['Dburlinfo'] = 'This is the URL to the directory where this is installed'; ! $lang['Hpurl'] = 'Homepage URL'; ! $lang['Hpurlinfo'] = 'This is the URL to your portal or home page'; ! $lang['Topnum'] = 'Top Number'; ! $lang['Topnuminfo'] = 'This is how many files will be displayed on the Top X Downloaded files list'; ! $lang['Nfdays'] = 'New File Days'; ! $lang['Nfdaysinfo'] = 'How many days a new file is to be listed with a \'New File\' icon. If this is set to 5, then all files added within the past 5 days will have the \'New File\' icon'; ! $lang['Showva'] = 'Show \'View All Files\''; ! $lang['Showvainfo'] = 'Choose whether or not you wish to have the \'View All Files\' category displayed with the other categories on the main page'; ! $lang['Php_template'] = 'PHP in template'; ! $lang['Php_template_info'] = 'This will allow you to use PHP directly in the template files'; ! $lang['Dbdl'] = 'Disable Downloads'; ! $lang['Dbdlinfo'] = 'This will make the download section unavailable to users. This is a good option to use when making modifications to your database. Only admins will be able to view the database'; ! $lang['Isdisabled'] = 'The download section is currently unavailable. Please try again later.'; ! $lang['Com_allowh'] = 'Allow HTML'; ! $lang['Com_allowb'] = 'Allow BBCode'; ! $lang['Com_allows'] = 'Allow Smilies'; ! $lang['Com_allowl'] = 'Allow Links'; ! $lang['Com_messagel'] = 'Default \'No Links\' Message'; ! $lang['Com_messagel_info'] = 'If links are not allowed this text will be displayed instead'; ! $lang['Com_allowi'] = 'Allow Images'; ! $lang['Com_messagei'] = 'Default \'No Images\' Message'; ! $lang['Com_messagei_info'] = 'If images are not allowed this text will be displayed instead'; ! $lang['Max_char'] = 'Maximum Number of characters'; ! $lang['Max_char_info'] = 'If some one posted a comment in which characters is more that this it will give them an error message (Limit the comment).'; ! $lang['Settings_changed'] = 'Your settings have been successfully updated'; ! $lang['File_per_page'] = 'Number of files per page'; ! $lang['File_per_page_info'] = 'Here you can set the number of files per page. If you leave it empty the number of per page will be 20.'; ! $lang['Hotlink_prevent'] = 'Hotlink Prevention'; ! $lang['Hotlinl_prevent_info'] = 'Set this to yes if you don\'t want to allow hotlinks to the files'; ! $lang['Hotlink_allowed'] = 'Allowed domains for hotlink'; ! $lang['Hotlink_allowed_info'] = 'Allowed domains for hotlink (separated by a comma), for example, www.phpbb.com, www.forumimages.com'; ! $lang['Default_sort_method'] = 'Default Sort Method'; ! $lang['Default_sort_order'] = 'Default Sort Order'; ! $lang['Max_filesize'] = 'Maximum Filesize'; ! $lang['Max_filesize_explain'] = 'Maximum filesize for Files. A value of 0 means \'unlimited\'. This Setting is restricted by your Server Configuration. For example, if your PHP Configuration only allows a maximum of 2 MB uploads, this cannot be overwritten by the module.'; ! $lang['Upload_directory'] = 'Upload Directory'; ! $lang['Upload_directory_explain'] = 'Enter the relative path from your root installation (where phpBB or mxBB is located) to the files upload directory. If you stick to the file structure provided in the shipped package, enter \'pafiledb/uploads/\'.'; ! $lang['Screenshots_directory'] = 'Screenshots Directory'; ! $lang['Screenshots_directory_explain'] = 'Enter the relative path from your root installation (where phpBB or mxBB is located) to the Screenshots upload directory. If you stick to the file structure provided in the shipped package, enter \'pafiledb/images/screenshots/\'.'; ! $lang['Forbidden_extensions'] = 'Forbidden Extensions'; ! $lang['Forbidden_extensions_explain'] = 'Here you can add or delete the forbidden extensions. Separate each extenstion with comma.'; ! $lang['Permission_settings'] = 'Permission settings'; ! $lang['Auth_search'] = 'Search Permission'; ! $lang['Auth_search_explain'] = 'Allow search for specific type of users'; ! $lang['Auth_stats'] = 'Stats Permission'; ! $lang['Auth_stats_explain'] = 'Allow stats for specific type of users'; ! $lang['Auth_toplist'] = 'Toplist Permission'; ! $lang['Auth_toplist_explain'] = 'Allow toplist for specific type of users'; ! $lang['Auth_viewall'] = 'Viewall Permission'; ! $lang['Auth_viewall_explain'] = 'Allow viewall for specific type of users'; ! $lang['Bytes'] = 'Bytes'; ! $lang['KB'] = 'KB'; ! $lang['MB'] = 'MB'; ! // Custom Field $lang['Fieldselecttitle'] = 'Select what to do'; $lang['Afield'] = 'Custom Field: Add'; --- 338,363 ---- $lang['Category_ADMIN'] = 'ADMIN'; ! // ! // Admin Panels - Votes ! // ! /* ! $lang['Votes_check_ip'] = 'Validate ratings - IP'; ! $lang['Votes_check_ip_explain'] = 'Only one vote per IP address is permitted.'; ! $lang['Votes_check_userid'] = 'Validate ratings - User'; ! $lang['Votes_check_userid_explain'] = 'Users may only vote once.'; ! ! $lang['Comment_info'] = 'Comments settings'; ! $lang['Rating_info'] = 'Ratings settings'; ! ! $lang['Use_comments'] = 'Comments'; ! $lang['Use_comments_explain'] = 'Enable comments for articles, to be inserted in the forum'; ! $lang['Use_ratings'] = 'Ratings'; ! $lang['Use_ratings_explain'] = 'Enable ratings for articles'; ! */ ! ! // ! // Admin Panels - Custom Fields ! // $lang['Fieldselecttitle'] = 'Select what to do'; $lang['Afield'] = 'Custom Field: Add'; *************** *** 169,178 **** $lang['Field_data'] = 'Options'; ! $lang['Field_data_info'] = 'Enter the options that the user can choose from. Separate each option with a newline (carriage return).'; $lang['Field_regex'] = 'Regular Expression'; $lang['Field_regex_info'] = 'You may require the input field to match a regular expression %s(PCRE)%s.'; $lang['Field_order'] = 'Display Order'; ! // License $lang['Alicense'] = 'License: Add'; $lang['Elicense'] = 'License: Edit'; --- 379,466 ---- $lang['Field_data'] = 'Options'; ! $lang['Field_data_info'] = 'Enter the options that the user can choose from. Separate each option with a new-line (carriage return).'; $lang['Field_regex'] = 'Regular Expression'; $lang['Field_regex_info'] = 'You may require the input field to match a regular expression %s(PCRE)%s.'; $lang['Field_order'] = 'Display Order'; ! // ! // Admin Panels - File ! // ! $lang['File_manage_title'] = 'File Management'; ! ! $lang['Afile'] = 'File: Add'; ! $lang['Efile'] = 'File: Edit'; ! $lang['Dfile'] = 'File: Delete'; ! $lang['Afiletitle'] = 'Add File'; ! $lang['Efiletitle'] = 'Edit File'; ! $lang['Dfiletitle'] = 'Delete File'; ! $lang['Fileexplain'] = 'You can use the file management section to add, edit, and delete files.'; ! $lang['Upload'] = 'Upload File'; ! $lang['Uploadinfo'] = 'Upload this file'; ! $lang['Uploaderror'] = 'This file already exists. Please rename the file and try again.'; ! $lang['Uploaddone'] = 'This file has been successfully uploaded. The URL to the file is'; ! $lang['Uploaddone2'] = 'Click Here to place this URL in the Download URL field.'; ! $lang['Upload_do_done'] = 'Uploaded Sucessfully'; ! $lang['Upload_do_not'] = 'Not Uploaded'; ! $lang['Upload_do_exist'] = 'File Exist'; ! $lang['Filename'] = 'File Name'; ! $lang['Filenameinfo'] = 'This is the name of the file you are adding, such as \'My Picture.\''; ! $lang['Filesd'] = 'Short Description'; ! $lang['Filesdinfo'] = 'This is a short description of the file. This will go on the page that lists all the files in a category, so this description should be short'; ! $lang['Fileld'] = 'Long Description'; ! $lang['Fileldinfo'] = 'This is a longer description of the file. This will go on the file\'s information page so this description can be longer'; ! $lang['Filecreator'] = 'Creator/Author'; ! $lang['Filecreatorinfo'] = 'This is the name of whoever created the file.'; ! $lang['Fileversion'] = 'File Version'; ! $lang['Fileversioninfo'] = 'This is the version of the file, such as 3.0 or 1.3 Beta'; ! $lang['Filess'] = 'Screenshot URL'; ! $lang['Filessinfo'] = 'This is a URL to a screenshot of the file. For example, if you are adding a Winamp skin, this would be a URL to a screenshot of Winamp with this skin. You can manually enter a URL or you can leave it blank and upload a screen shot using "Browse" above.'; ! $lang['Filess_upload'] = 'Upload Screenshot'; ! $lang['Filessinfo_upload'] = 'You can upload a screenshot by clicking on "Browse"'; ! $lang['Filess_link'] = 'Screenshot as a Link'; ! $lang['Filess_link_info'] = 'If you want to show the screenshot as a link, choose "yes".'; ! $lang['Filedocs'] = 'Documentation/Manual URL'; ! $lang['Filedocsinfo'] = 'This is a URL to the documentation or a manual for the file'; ! $lang['Fileurl'] = 'File URL'; ! $lang['Fileurlinfo'] = 'This is a URL to the file that will be downloaded. You can type it in manually or you can click on "Browse" above and upload a file.'; ! $lang['File_upload'] = 'File Upload'; ! $lang['Fileinfo_upload'] = 'You can upload a file by clicking on "Browse"'; ! $lang['Uploaded_file'] = 'Uploaded file'; ! $lang['Filepi'] = 'Post Icon'; ! $lang['Filepiinfo'] = 'You can choose a post icon for the file. The post icon will be shown next to the file in the list of files.'; ! $lang['Filecat'] = 'Category'; ! $lang['Filecatinfo'] = 'This is the category the file belongs in.'; ! $lang['Filelicense'] = 'License'; ! $lang['Filelicenseinfo'] = 'This is the license agreement the user must agree to before downloading the file.'; ! $lang['Filepin'] = 'Pin File'; ! $lang['Filepininfo'] = 'Choose if you want the file pinned or not. Pinned files will always be shown at the top of the file list.'; ! $lang['Fileadded'] = 'The new file has been successfully added'; ! $lang['Filedeleted'] = 'The file has been successfully deleted'; ! $lang['Fileedited'] = 'The file you selected has been successfully edited'; ! $lang['Fderror'] = 'You didn\'t select any files to delete'; ! $lang['Filesdeleted'] = 'The files you selected have been successfully deleted'; ! $lang['Filetoobig'] = 'That file is too big!'; ! $lang['Approved'] = 'Approved'; ! $lang['Not_approved'] = '(Not Approved)'; ! $lang['Approved_info'] = 'Use this option to make the file available for users, and also to approve a file that has been uploaded by the users.'; ! $lang['Fchecker'] = 'File: Maintenance'; ! $lang['File_checker'] = 'File Maintenance'; ! $lang['File_checker_explain'] = 'Here you can perform a checking for all file in database and the file in the download directory.'; ! $lang['File_saftey'] = 'File maintenance will attempt to delete all files and screenshots that are currently not needed and will remove any file records where the file has been deleted and will clear all screenshots that are not found.<br /><br />If the files do not start with <FONT COLOR="#FF0000">{html_path}</FONT> then the files will be skipped for security reasons.<br /><br />Please make sure that <FONT COLOR="#FF0000">{html_path}</FONT> is the path that you use for your files.<br /><br />.'; ! // <a href="' . append_sid($phpbb_root_path . "admin/admin_db_utilities.php?perform=backup") . '" class="genmed">Backup your database</a> ! $lang['File_checker_perform'] = 'Perform Checking'; ! $lang['Checker_saved'] = 'Total Saved Space'; ! $lang['Checker_sp1'] = 'Checking for records with missing files...'; ! $lang['Checker_sp2'] = 'Checking for records with missing screenshots...'; ! $lang['Checker_sp3'] = 'Deleting unused Files...'; ! $lang['Filedls'] = 'Download Total'; ! $lang['Addtional_field'] = 'Additional Field'; ! $lang['File_not_found'] = 'The file you specified cannot be found'; ! $lang['SS_not_found'] = 'The screenshot you specified cannot be found'; ! ! ! // ! // Admin Panels - License ! // $lang['Alicense'] = 'License: Add'; $lang['Elicense'] = 'License: Edit'; *************** *** 195,205 **** //JavaScript messages and PHP errors $lang['Cat_name_missing'] = 'Please fill the category name field'; ! $lang['Cat_conflict'] = 'You can\'t have a category with no file inside a category that doesn\'t allow files'; $lang['Cat_id_missing'] = 'Please select a category'; $lang['Missing_field'] = 'Please complete all the required fields'; ! ! //Fields Types ! $lang['Field_Input'] = 'Single-Line Text Box'; $lang['Field_Textarea'] = 'Multiple-Line Text Box'; --- 483,493 ---- //JavaScript messages and PHP errors $lang['Cat_name_missing'] = 'Please fill the category name field'; ! $lang['Cat_conflict'] = 'You can\'t have a category with no file in side a category that doesn\'t allow files'; $lang['Cat_id_missing'] = 'Please select a category'; $lang['Missing_field'] = 'Please complete all the required fields'; ! // ! // Admin Panels - Fields Types ! // $lang['Field_Input'] = 'Single-Line Text Box'; $lang['Field_Textarea'] = 'Multiple-Line Text Box'; *************** *** 225,231 **** $lang['MCP_title_explain'] = 'Here moderators can approve and manage files'; ! $lang['Fileadded_not_validated'] = 'The new file has been successfully added, but a moderator (or administrator) needs to validate the file before approval.'; ! // Toplists $lang['display_most_posts'] = "Most visited/viewed/downloaded<br />"; $lang['display_random_posts'] = "Random<br />"; --- 513,521 ---- $lang['MCP_title_explain'] = 'Here moderators can approve and manage files'; ! $lang['Fileadded_not_validated'] = 'The new file has been successfully added, but a moderator (admin) need to validate the file before approval.'; ! // ! // Admin Panels - Toplists ! // $lang['display_most_posts'] = "Most visited/viewed/downloaded<br />"; $lang['display_random_posts'] = "Random<br />"; *************** *** 236,238 **** --- 526,537 ---- $lang['target_block'] = "Associated (target) pafileDB Block"; + // + // Quickdl + // + $lang['Panel_title'] = "pafileDB Mapping"; + $lang['Panel_title_explain'] = "Here you can associate portal dynamic blocks and pafileDB categories. The quickdl block will show the pafiledb category when the dynamic block is active."; + + $lang['Map_pafiledb'] = "Select a pafileDB category..."; + $lang['Map_mxbb'] = "...to be mapped to this dynamic portal block"; + ?> \ No newline at end of file |
|
From: Jon O. <jon...@us...> - 2006-06-17 20:13:26
|
Update of /cvsroot/mxbb/mx_pafiledb In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv22598/modules/mx_pafiledb Modified Files: db_install.php db_upgrade.php dload.php dload_lists.php dload_quickdl.php Log Message: Finalizing module Index: db_upgrade.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/db_upgrade.php,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** db_upgrade.php 2 May 2006 23:28:15 -0000 1.14 --- db_upgrade.php 17 Jun 2006 20:13:22 -0000 1.15 *************** *** 30,34 **** } ! $mx_module_version = '2.0.2'; $mx_module_copy = 'Original phpBB <i>pafileDB</i> MOD by <a href="http://www.phpbb.com/phpBB/viewtopic.php?t=56035" target="_phpbb" >Mohd/Jon</a> based on <a href="http://www.phparena.net/" target="_blank">PHP Arena, pafileDB</a> :: Adapted for mxBB by <a href="http://www.mxbb-portal.com" target="_blank">Jon</a>'; --- 30,34 ---- } ! $mx_module_version = '2.8.0'; $mx_module_copy = 'Original phpBB <i>pafileDB</i> MOD by <a href="http://www.phpbb.com/phpBB/viewtopic.php?t=56035" target="_phpbb" >Mohd/Jon</a> based on <a href="http://www.phparena.net/" target="_blank">PHP Arena, pafileDB</a> :: Adapted for mxBB by <a href="http://www.mxbb-portal.com" target="_blank">Jon</a>'; *************** *** 49,52 **** --- 49,53 ---- $upgrade_103 = 0; $upgrade_201 = 0; + $upgrade_280 = 0; // mxBB 2.8 branch -> $message = "<b>Upgrading!</b><br/><br/>"; *************** *** 85,88 **** --- 86,101 ---- } + // validate before 2.8.0 + $result = $db->sql_query( "SELECT config_value from " . $mx_table_prefix . "pa_config WHERE config_name = 'comments_forum_id'" ); + if ( $db->sql_numrows( $result ) == 0 || true) + { + $upgrade_280 = 1; + $message .= "<b>Upgrading to v. 2.8.0...ok</b><br/><br/>"; + } + else + { + $message .= "<b>Validating v. 2.8.0...ok</b><br/><br/>"; + } + // ------------------------------------------------------------------------------------------------------ if ( $upgrade_103 == 1 ) *************** *** 140,144 **** $sql[] = "DELETE FROM " . $mx_table_prefix . "pa_config" . " WHERE config_name = 'validator'"; ! $sql[] = "INSERT INTO " . $mx_table_prefix . "pa_config VALUES ('wysiwyg_path', 'modules/')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "pa_config VALUES ('use_comments', '1')"; --- 153,157 ---- $sql[] = "DELETE FROM " . $mx_table_prefix . "pa_config" . " WHERE config_name = 'validator'"; ! $sql[] = "INSERT INTO " . $mx_table_prefix . "pa_config VALUES ('wysiwyg_path', 'modules/mx_shared/')"; $sql[] = "INSERT INTO " . $mx_table_prefix . "pa_config VALUES ('use_comments', '1')"; *************** *** 190,193 **** --- 203,216 ---- // add fields to pa_files table $sql[] = "ALTER TABLE " . $mx_table_prefix . "pa_files ADD topic_id mediumint(8) unsigned NOT NULL default '0'"; + + } + + if ( $upgrade_280 == 1 ) + { + $sql[] = "INSERT INTO " . $mx_table_prefix . "pa_config VALUES ('comments_forum_id', '0')"; + } + else + { + $message .= "<b>Nothing to upgrade...</b><br/><br/>"; } Index: dload_lists.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/dload_lists.php,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** dload_lists.php 2 May 2006 23:28:15 -0000 1.17 --- dload_lists.php 17 Jun 2006 20:13:22 -0000 1.18 *************** *** 9,46 **** */ - function this_pa_mxurl( $args = '', $force_standalone_mode = false, $page_id = 1 ) - { - global $mx_root_path, $module_root_path, $phpEx, $is_block; - - if ( $force_standalone_mode || !$is_block ) - { - $mxurl = $module_root_path . 'dload.' . $phpEx . ( $args == '' ? '' : '?' . $args ); - } - else - { - $mxurl = $mx_root_path . 'index.' . $phpEx; - if ( is_numeric( $page_id ) ) - { - $mxurl .= '?page=' . $page_id . ( $args == '' ? '' : '&' . $args ); - } - else - { - $mxurl .= ( $args == '' ? '' : '?' . $args ); - } - } - return $mxurl; - } - - function paImageRating( $rating ) - { - global $db, $album_sp_config, $module_root_path; - - if ( !$rating ) - return( "<i>Not Rated</i>" ); - else - return ( round( $rating, 2 ) ); - } - - // MX if ( !function_exists( 'read_block_config' ) ) { --- 9,12 ---- *************** *** 50,58 **** include_once( $mx_root_path . 'common.' . $phpEx ); // Start session management ! $mx_user->init($user_ip, PAGE_INDEX); ! // End session management $block_id = ( !empty( $HTTP_GET_VARS['block_id'] ) ) ? $HTTP_GET_VARS['block_id'] : $HTTP_POST_VARS['id']; --- 16,26 ---- include_once( $mx_root_path . 'common.' . $phpEx ); + // // Start session management ! // $mx_user->init($user_ip, PAGE_INDEX); ! // // End session management + // $block_id = ( !empty( $HTTP_GET_VARS['block_id'] ) ) ? $HTTP_GET_VARS['block_id'] : $HTTP_POST_VARS['id']; *************** *** 81,90 **** } define( 'MXBB_MODULE', true ); define( 'MXBB_27x', file_exists( $mx_root_path . 'mx_login.php' ) ); ! include_once( $module_root_path . 'pafiledb/includes/pafiledb_constants.' . $phpEx ); ! include_once( $module_root_path . 'pafiledb/includes/functions_auth.' . $phpEx ); ! include_once( $module_root_path . 'pafiledb/includes/functions_pafiledb.' . $phpEx ); // --- 49,62 ---- } + // + // Definitions + // define( 'MXBB_MODULE', true ); define( 'MXBB_27x', file_exists( $mx_root_path . 'mx_login.php' ) ); ! // =================================================== ! // Include the common file ! // =================================================== ! include_once( $module_root_path . 'pafiledb/pafiledb_common.' . $phpEx ); // *************** *** 111,120 **** $pafiledb_page_id = $pafiledb_block_id > 0 ? get_page_id( $pafiledb_block_id ) : get_page_id( 'dload.php', true ); ! /* ! +---------------------------------------------------------- ! | Build Categories Index ! +---------------------------------------------------------- ! */ ! $sql = "SELECT c.*, COUNT(p.file_id) AS count FROM " . PA_CATEGORY_TABLE . " AS c --- 83,89 ---- $pafiledb_page_id = $pafiledb_block_id > 0 ? get_page_id( $pafiledb_block_id ) : get_page_id( 'dload.php', true ); ! // ! // Build Categories Index ! // $sql = "SELECT c.*, COUNT(p.file_id) AS count FROM " . PA_CATEGORY_TABLE . " AS c *************** *** 199,208 **** $file_screenshot_url = trim( $recentrow[$j]['file_ssurl'] ); $template->assign_block_vars( 'recent_pics_block.recent_pics.recent_col', array( ! // 'U_PIC' => ($album_config['fullpic_popup']) ? append_sid(this_smartor_mxurl("smartor_mode=album_pic&pic_id=". $recentrow[$j]['pic_id'])) : append_sid(this_smartor_mxurl("smartor_mode=album_showpage&pic_id=". $recentrow[$j]['pic_id'])), ! // 'THUMBNAIL' => append_sid(this_smartor_mxurl("smartor_mode=album_thumbnail&pic_id=". $recentrow[$j]['pic_id'], TRUE)), ! // 'DESC' => $recentrow[$j]['pic_desc'] ! 'SS' => ( !empty( $file_screenshot_url ) ) ? '<hr><a href="' . append_sid( this_pa_mxurl( "action=file&file_id=" . $recentrow[$j]['file_id'], false, $pafiledb_page_id ) ) . '"><img src="' . $file_screenshot_url . '" width="100" border="0"></a><br /><span class="genmed"><i><a href="' . append_sid( this_pa_mxurl( "action=file&file_id=" . $recentrow[$j]['file_id'], false, $pafiledb_page_id ) ) . '">' . $recentrow[$j]['file_name'] . '</a></i></span>' : '' ! ) ! ); if ( ( $recentrow[$j]['user_id'] == ALBUM_GUEST ) or ( $recentrow[$j]['username'] == '' ) ) --- 168,176 ---- $file_screenshot_url = trim( $recentrow[$j]['file_ssurl'] ); $template->assign_block_vars( 'recent_pics_block.recent_pics.recent_col', array( ! // 'U_PIC' => ($album_config['fullpic_popup']) ? append_sid(this_smartor_mxurl("smartor_mode=album_pic&pic_id=". $recentrow[$j]['pic_id'])) : append_sid(this_smartor_mxurl("smartor_mode=album_showpage&pic_id=". $recentrow[$j]['pic_id'])), ! // 'THUMBNAIL' => append_sid(this_smartor_mxurl("smartor_mode=album_thumbnail&pic_id=". $recentrow[$j]['pic_id'], TRUE)), ! // 'DESC' => $recentrow[$j]['pic_desc'] ! 'SS' => ( !empty( $file_screenshot_url ) ) ? '<hr><a href="' . append_sid( pa_this_mxurl_list( "action=file&file_id=" . $recentrow[$j]['file_id'], false, $pafiledb_page_id ) ) . '"><img src="' . $file_screenshot_url . '" width="100" border="0"></a><br /><span class="genmed"><i><a href="' . append_sid( pa_this_mxurl_list( "action=file&file_id=" . $recentrow[$j]['file_id'], false, $pafiledb_page_id ) ) . '">' . $recentrow[$j]['file_name'] . '</a></i></span>' : '' ! )); if ( ( $recentrow[$j]['user_id'] == ALBUM_GUEST ) or ( $recentrow[$j]['username'] == '' ) ) *************** *** 217,233 **** $rating_image = paImageRating( $recentrow[$j]['rating'] ); ! $template->assign_block_vars( 'recent_pics_block.recent_pics.recent_detail', array( 'TITLE' => ( empty( $file_screenshot_url ) ) ? '<b>' . $lang['File_Title'] . ': <a href="' . append_sid( this_pa_mxurl( "action=file&file_id=" . $recentrow[$j]['file_id'], false, $pafiledb_page_id ) ) . '">' . $recentrow[$j]['file_name'] . '</a></b><br />' : '', ! 'DESC' => $recentrow[$j]['file_desc'], ! 'POSTER' => $recent_poster, ! 'TIME' => create_date( $board_config['default_dateformat'], $recentrow[$j]['file_time'], $board_config['board_timezone'] ), ! 'UPDATED' => create_date( $board_config['default_dateformat'], $recentrow[$j]['file_update_time'], $board_config['board_timezone'] ), ! ! 'VIEW' => $recentrow[$j]['file_dls'], ! ! 'RATING' => ( $album_config['rate'] == 1 ) ? ( $lang['Rating'] . ': ' . $rating_image . ', ' ) : '', ! 'COMMENTS' => ( $album_config['comment'] == 1 ) ? ( '<a href="' . append_sid( this_pa_mxurl( "action=file&file_id=" . $recentrow[$j]['file_id'], false, $pafiledb_page_id ) ) . '">' . $lang['Comments'] . '</a>: ' . $recentrow[$j]['comments'] . '<br />' ) : '' ! // 'IP' => ($userdata['user_level'] == ADMIN) ? $lang['IP_Address'] . ': <a href="http://www.nic.com/cgi-bin/whois.cgi?query=' . decode_ip($recentrow[$j]['pic_user_ip']) . '" target="_blank">' . decode_ip($recentrow[$j]['pic_user_ip']) .'</a><br />' : '' ! ) ! ); } } --- 185,199 ---- $rating_image = paImageRating( $recentrow[$j]['rating'] ); ! $template->assign_block_vars( 'recent_pics_block.recent_pics.recent_detail', array( ! 'TITLE' => ( empty( $file_screenshot_url ) ) ? '<b>' . $lang['File_Title'] . ': <a href="' . append_sid( pa_this_mxurl_list( "action=file&file_id=" . $recentrow[$j]['file_id'], false, $pafiledb_page_id ) ) . '">' . $recentrow[$j]['file_name'] . '</a></b><br />' : '', ! 'DESC' => $recentrow[$j]['file_desc'], ! 'POSTER' => $recent_poster, ! 'TIME' => create_date( $board_config['default_dateformat'], $recentrow[$j]['file_time'], $board_config['board_timezone'] ), ! 'UPDATED' => create_date( $board_config['default_dateformat'], $recentrow[$j]['file_update_time'], $board_config['board_timezone'] ), ! 'VIEW' => $recentrow[$j]['file_dls'], ! 'RATING' => ( $album_config['rate'] == 1 ) ? ( $lang['Rating'] . ': ' . $rating_image . ', ' ) : '', ! 'COMMENTS' => ( $album_config['comment'] == 1 ) ? ( '<a href="' . append_sid( pa_this_mxurl_list( "action=file&file_id=" . $recentrow[$j]['file_id'], false, $pafiledb_page_id ) ) . '">' . $lang['Comments'] . '</a>: ' . $recentrow[$j]['comments'] . '<br />' ) : '' ! // 'IP' => ($userdata['user_level'] == ADMIN) ? $lang['IP_Address'] . ': <a href="http://www.nic.com/cgi-bin/whois.cgi?query=' . decode_ip($recentrow[$j]['pic_user_ip']) . '" target="_blank">' . decode_ip($recentrow[$j]['pic_user_ip']) .'</a><br />' : '' ! )); } } *************** *** 235,241 **** else { ! // No Pics Found ! $template->assign_block_vars( 'recent_pics_block.no_pics', array() ); } --- 201,207 ---- else { ! // // No Pics Found ! // $template->assign_block_vars( 'recent_pics_block.no_pics', array() ); } *************** *** 243,249 **** else { ! // No Cats Found ! $template->assign_block_vars( 'recent_pics_block.no_pics', array() ); } --- 209,215 ---- else { ! // // No Cats Found ! // $template->assign_block_vars( 'recent_pics_block.no_pics', array() ); } *************** *** 297,306 **** $file_screenshot_url = trim( $mostrow[$j]['file_ssurl'] ); $template->assign_block_vars( 'most_pics_block.most_pics.most_col', array( ! // 'U_PIC' => ($album_config['fullpic_popup']) ? append_sid(this_smartor_mxurl("smartor_mode=album_pic&pic_id=". $recentrow[$j]['pic_id'])) : append_sid(this_smartor_mxurl("smartor_mode=album_showpage&pic_id=". $recentrow[$j]['pic_id'])), ! // 'THUMBNAIL' => append_sid(this_smartor_mxurl("smartor_mode=album_thumbnail&pic_id=". $recentrow[$j]['pic_id'], TRUE)), ! // 'DESC' => $recentrow[$j]['pic_desc'] ! 'SS' => ( !empty( $file_screenshot_url ) ) ? '<hr><a href="' . append_sid( this_pa_mxurl( "action=file&file_id=" . $mostrow[$j]['file_id'], false, $pafiledb_page_id ) ) . '"><img src="' . $file_screenshot_url . '" width="100" border="0"></a><br /><span class="genmed"><i><a href="' . append_sid( this_pa_mxurl( "action=file&file_id=" . $mostrow[$j]['file_id'], false, $pafiledb_page_id ) ) . '">' . $mostrow[$j]['file_name'] . '</a></i></span>' : '' ! ) ! ); if ( ( $mostrow[$j]['user_id'] == ALBUM_GUEST ) or ( $mostrow[$j]['username'] == '' ) ) --- 263,271 ---- $file_screenshot_url = trim( $mostrow[$j]['file_ssurl'] ); $template->assign_block_vars( 'most_pics_block.most_pics.most_col', array( ! // 'U_PIC' => ($album_config['fullpic_popup']) ? append_sid(this_smartor_mxurl("smartor_mode=album_pic&pic_id=". $recentrow[$j]['pic_id'])) : append_sid(this_smartor_mxurl("smartor_mode=album_showpage&pic_id=". $recentrow[$j]['pic_id'])), ! // 'THUMBNAIL' => append_sid(this_smartor_mxurl("smartor_mode=album_thumbnail&pic_id=". $recentrow[$j]['pic_id'], TRUE)), ! // 'DESC' => $recentrow[$j]['pic_desc'] ! 'SS' => ( !empty( $file_screenshot_url ) ) ? '<hr><a href="' . append_sid( pa_this_mxurl_list( "action=file&file_id=" . $mostrow[$j]['file_id'], false, $pafiledb_page_id ) ) . '"><img src="' . $file_screenshot_url . '" width="100" border="0"></a><br /><span class="genmed"><i><a href="' . append_sid( pa_this_mxurl_list( "action=file&file_id=" . $mostrow[$j]['file_id'], false, $pafiledb_page_id ) ) . '">' . $mostrow[$j]['file_name'] . '</a></i></span>' : '' ! )); if ( ( $mostrow[$j]['user_id'] == ALBUM_GUEST ) or ( $mostrow[$j]['username'] == '' ) ) *************** *** 315,331 **** $rating_image = paImageRating( $mostrow[$j]['rating'] ); ! $template->assign_block_vars( 'most_pics_block.most_pics.most_detail', array( 'TITLE' => ( empty( $file_screenshot_url ) ) ? '<b>' . $lang['File_Title'] . ': <a href="' . append_sid( this_pa_mxurl( "action=file&file_id=" . $mostrow[$j]['file_id'], false, $pafiledb_page_id ) ) . '">' . $mostrow[$j]['file_name'] . '</a></b><br />' : '', ! 'DESC' => $mostrow[$j]['file_desc'], ! 'POSTER' => $most_poster, ! 'TIME' => create_date( $board_config['default_dateformat'], $mostrow[$j]['file_time'], $board_config['board_timezone'] ), ! 'UPDATED' => create_date( $board_config['default_dateformat'], $mostrow[$j]['file_update_time'], $board_config['board_timezone'] ), ! ! 'VIEW' => $mostrow[$j]['file_dls'], ! ! 'RATING' => ( $album_config['rate'] == 1 ) ? ( $lang['Rating'] . ': ' . $rating_image . ', ' ) : '', ! 'COMMENTS' => ( $album_config['comment'] == 1 ) ? ( '<a href="' . append_sid( this_pa_mxurl( "action=file&file_id=" . $mostrow[$j]['file_id'], false, $pafiledb_page_id ) ) . '">' . $lang['Comments'] . '</a>: ' . $mostrow[$j]['comments'] . '<br />' ) : '' ! // 'IP' => ($userdata['user_level'] == ADMIN) ? $lang['IP_Address'] . ': <a href="http://www.nic.com/cgi-bin/whois.cgi?query=' . decode_ip($recentrow[$j]['pic_user_ip']) . '" target="_blank">' . decode_ip($recentrow[$j]['pic_user_ip']) .'</a><br />' : '' ! ) ! ); } } --- 280,294 ---- $rating_image = paImageRating( $mostrow[$j]['rating'] ); ! $template->assign_block_vars( 'most_pics_block.most_pics.most_detail', array( ! 'TITLE' => ( empty( $file_screenshot_url ) ) ? '<b>' . $lang['File_Title'] . ': <a href="' . append_sid( pa_this_mxurl_list( "action=file&file_id=" . $mostrow[$j]['file_id'], false, $pafiledb_page_id ) ) . '">' . $mostrow[$j]['file_name'] . '</a></b><br />' : '', ! 'DESC' => $mostrow[$j]['file_desc'], ! 'POSTER' => $most_poster, ! 'TIME' => create_date( $board_config['default_dateformat'], $mostrow[$j]['file_time'], $board_config['board_timezone'] ), ! 'UPDATED' => create_date( $board_config['default_dateformat'], $mostrow[$j]['file_update_time'], $board_config['board_timezone'] ), ! 'VIEW' => $mostrow[$j]['file_dls'], ! 'RATING' => ( $album_config['rate'] == 1 ) ? ( $lang['Rating'] . ': ' . $rating_image . ', ' ) : '', ! 'COMMENTS' => ( $album_config['comment'] == 1 ) ? ( '<a href="' . append_sid( pa_this_mxurl_list( "action=file&file_id=" . $mostrow[$j]['file_id'], false, $pafiledb_page_id ) ) . '">' . $lang['Comments'] . '</a>: ' . $mostrow[$j]['comments'] . '<br />' ) : '' ! // 'IP' => ($userdata['user_level'] == ADMIN) ? $lang['IP_Address'] . ': <a href="http://www.nic.com/cgi-bin/whois.cgi?query=' . decode_ip($recentrow[$j]['pic_user_ip']) . '" target="_blank">' . decode_ip($recentrow[$j]['pic_user_ip']) .'</a><br />' : '' ! )); } } *************** *** 333,339 **** else { ! // No Pics Found ! $template->assign_block_vars( 'most_pics_block.no_pics', array() ); } --- 296,302 ---- else { ! // // No Pics Found ! // $template->assign_block_vars( 'most_pics_block.no_pics', array() ); } *************** *** 341,347 **** else { ! // No Cats Found ! $template->assign_block_vars( 'most_pics_block.no_pics', array() ); } --- 304,310 ---- else { ! // // No Cats Found ! // $template->assign_block_vars( 'most_pics_block.no_pics', array() ); } *************** *** 396,405 **** $file_screenshot_url = trim( $highestrow[$j]['file_ssurl'] ); $template->assign_block_vars( 'highest_pics_block.highest_pics.highest_col', array( ! // 'U_PIC' => ($album_config['fullpic_popup']) ? append_sid(this_smartor_mxurl("smartor_mode=album_pic&pic_id=". $highestrow[$j]['pic_id'])) : append_sid(this_smartor_mxurl("smartor_mode=album_showpage&pic_id=". $highestrow[$j]['pic_id'])), ! // 'THUMBNAIL' => append_sid(this_smartor_mxurl("smartor_mode=album_thumbnail&pic_id=". $highestrow[$j]['pic_id'], TRUE)), ! // 'DESC' => $highestrow[$j]['pic_desc'] ! 'SS' => ( !empty( $file_screenshot_url ) ) ? '<hr><a href="' . append_sid( this_pa_mxurl( "action=file&file_id=" . $highestrow[$j]['file_id'], false, $pafiledb_page_id ) ) . '"><img src="' . $file_screenshot_url . '" width="100" border="0"></a><br /><span class="genmed"><i><a href="' . append_sid( this_pa_mxurl( "action=file&file_id=" . $highestrow[$j]['file_id'], false, $pafiledb_page_id ) ) . '">' . $highestrow[$j]['file_name'] . '</a></i></span>' : '' ! ) ! ); if ( ( $highestrow[$j]['user_id'] == ALBUM_GUEST ) or ( $highestrow[$j]['username'] == '' ) ) --- 359,367 ---- $file_screenshot_url = trim( $highestrow[$j]['file_ssurl'] ); $template->assign_block_vars( 'highest_pics_block.highest_pics.highest_col', array( ! // 'U_PIC' => ($album_config['fullpic_popup']) ? append_sid(this_smartor_mxurl("smartor_mode=album_pic&pic_id=". $highestrow[$j]['pic_id'])) : append_sid(this_smartor_mxurl("smartor_mode=album_showpage&pic_id=". $highestrow[$j]['pic_id'])), ! // 'THUMBNAIL' => append_sid(this_smartor_mxurl("smartor_mode=album_thumbnail&pic_id=". $highestrow[$j]['pic_id'], TRUE)), ! // 'DESC' => $highestrow[$j]['pic_desc'] ! 'SS' => ( !empty( $file_screenshot_url ) ) ? '<hr><a href="' . append_sid( pa_this_mxurl_list( "action=file&file_id=" . $highestrow[$j]['file_id'], false, $pafiledb_page_id ) ) . '"><img src="' . $file_screenshot_url . '" width="100" border="0"></a><br /><span class="genmed"><i><a href="' . append_sid( pa_this_mxurl_list( "action=file&file_id=" . $highestrow[$j]['file_id'], false, $pafiledb_page_id ) ) . '">' . $highestrow[$j]['file_name'] . '</a></i></span>' : '' ! )); if ( ( $highestrow[$j]['user_id'] == ALBUM_GUEST ) or ( $highestrow[$j]['username'] == '' ) ) *************** *** 414,430 **** $rating_image = paImageRating( $highestrow[$j]['rating'] ); ! $template->assign_block_vars( 'highest_pics_block.highest_pics.highest_detail', array( 'H_TITLE' => ( empty( $file_screenshot_url ) ) ? '<b>' . $lang['File_Title'] . ': <a href="' . append_sid( this_pa_mxurl( "action=file&file_id=" . $highestrow[$j]['file_id'], false, $pafiledb_page_id ) ) . '">' . $highestrow[$j]['file_name'] . '</a></b><br />' : '', ! 'H_DESC' => $highestrow[$j]['file_desc'], ! 'H_POSTER' => $highest_poster, ! 'H_TIME' => create_date( $board_config['default_dateformat'], $highestrow[$j]['file_time'], $board_config['board_timezone'] ), ! 'UPDATED' => create_date( $board_config['default_dateformat'], $highestrow[$j]['file_update_time'], $board_config['board_timezone'] ), ! ! 'H_VIEW' => $highestrow[$j]['file_dls'], ! ! 'H_RATING' => ( $album_config['rate'] == 1 ) ? ( $lang['Rating'] . ': ' . $rating_image . ', ' ) : '', ! 'H_COMMENTS' => ( $album_config['comment'] == 1 ) ? ( '<a href="' . append_sid( this_pa_mxurl( "action=file&file_id=" . $highestrow[$j]['file_id'], false, $pafiledb_page_id ) ) . '">' . $lang['Comments'] . '</a>: ' . $highestrow[$j]['comments'] . '<br />' ) : '' ! // 'H_IP' => ($userdata['user_level'] == ADMIN) ? $lang['IP_Address'] . ': <a href="http://www.nic.com/cgi-bin/whois.cgi?query=' . decode_ip($highestrow[$j]['pic_user_ip']) . '" target="_blank">' . decode_ip($highestrow[$j]['pic_user_ip']) .'</a><br />' : '' ! ) ! ); } } --- 376,390 ---- $rating_image = paImageRating( $highestrow[$j]['rating'] ); ! $template->assign_block_vars( 'highest_pics_block.highest_pics.highest_detail', array( ! 'H_TITLE' => ( empty( $file_screenshot_url ) ) ? '<b>' . $lang['File_Title'] . ': <a href="' . append_sid( pa_this_mxurl_list( "action=file&file_id=" . $highestrow[$j]['file_id'], false, $pafiledb_page_id ) ) . '">' . $highestrow[$j]['file_name'] . '</a></b><br />' : '', ! 'H_DESC' => $highestrow[$j]['file_desc'], ! 'H_POSTER' => $highest_poster, ! 'H_TIME' => create_date( $board_config['default_dateformat'], $highestrow[$j]['file_time'], $board_config['board_timezone'] ), ! 'UPDATED' => create_date( $board_config['default_dateformat'], $highestrow[$j]['file_update_time'], $board_config['board_timezone'] ), ! 'H_VIEW' => $highestrow[$j]['file_dls'], ! 'H_RATING' => ( $album_config['rate'] == 1 ) ? ( $lang['Rating'] . ': ' . $rating_image . ', ' ) : '', ! 'H_COMMENTS' => ( $album_config['comment'] == 1 ) ? ( '<a href="' . append_sid( pa_this_mxurl_list( "action=file&file_id=" . $highestrow[$j]['file_id'], false, $pafiledb_page_id ) ) . '">' . $lang['Comments'] . '</a>: ' . $highestrow[$j]['comments'] . '<br />' ) : '' ! // 'H_IP' => ($userdata['user_level'] == ADMIN) ? $lang['IP_Address'] . ': <a href="http://www.nic.com/cgi-bin/whois.cgi?query=' . decode_ip($highestrow[$j]['pic_user_ip']) . '" target="_blank">' . decode_ip($highestrow[$j]['pic_user_ip']) .'</a><br />' : '' ! )); } } *************** *** 496,504 **** $file_screenshot_url = trim( $randrow[$j]['file_ssurl'] ); $template->assign_block_vars( 'random_pics_block.rand_pics.rand_col', array( ! // 'U_PIC' => ($album_config['fullpic_popup']) ? append_sid(this_pa_mxurl("smartor_mode=album_pic&pic_id=". $randrow[$j]['pic_id'])) : append_sid(this_pa_mxurl("smartor_mode=album_showpage&pic_id=". $randrow[$j]['pic_id'])), ! // 'THUMBNAIL' => append_sid(this_pa_mxurl("smartor_mode=album_thumbnail&pic_id=". $randrow[$j]['pic_id'], TRUE)), ! // 'DESC' => $randrow[$j]['file_desc'] ! 'SS' => ( !empty( $file_screenshot_url ) ) ? '<hr><a href="' . append_sid( this_pa_mxurl( "action=file&file_id=" . $randrow[$j]['file_id'], false, $pafiledb_page_id ) ) . '"><img src="' . $file_screenshot_url . '" width="100" border="0"></a><br /><span class="genmed"><i><a href="' . append_sid( this_pa_mxurl( "action=file&file_id=" . $randrow[$j]['file_id'], false, $pafiledb_page_id ) ) . '">' . $randrow[$j]['file_name'] . '</a></i></span>' : '' ! ) ); if ( ( $randrow[$j]['user_id'] == ALBUM_GUEST ) or ( $randrow[$j]['username'] == '' ) ) --- 456,464 ---- $file_screenshot_url = trim( $randrow[$j]['file_ssurl'] ); $template->assign_block_vars( 'random_pics_block.rand_pics.rand_col', array( ! // 'U_PIC' => ($album_config['fullpic_popup']) ? append_sid(pa_this_mxurl_list("smartor_mode=album_pic&pic_id=". $randrow[$j]['pic_id'])) : append_sid(pa_this_mxurl_list("smartor_mode=album_showpage&pic_id=". $randrow[$j]['pic_id'])), ! // 'THUMBNAIL' => append_sid(pa_this_mxurl_list("smartor_mode=album_thumbnail&pic_id=". $randrow[$j]['pic_id'], TRUE)), ! // 'DESC' => $randrow[$j]['file_desc'] ! 'SS' => ( !empty( $file_screenshot_url ) ) ? '<hr><a href="' . append_sid( pa_this_mxurl_list( "action=file&file_id=" . $randrow[$j]['file_id'], false, $pafiledb_page_id ) ) . '"><img src="' . $file_screenshot_url . '" width="100" border="0"></a><br /><span class="genmed"><i><a href="' . append_sid( pa_this_mxurl_list( "action=file&file_id=" . $randrow[$j]['file_id'], false, $pafiledb_page_id ) ) . '">' . $randrow[$j]['file_name'] . '</a></i></span>' : '' ! )); if ( ( $randrow[$j]['user_id'] == ALBUM_GUEST ) or ( $randrow[$j]['username'] == '' ) ) *************** *** 513,530 **** $rating_image = paImageRating( $randrow[$j]['rating'] ); ! $template->assign_block_vars( 'random_pics_block.rand_pics.rand_detail', array( 'TITLE' => ( empty( $file_screenshot_url ) ) ? '<b>' . $lang['File_Title'] . ': <a href="' . append_sid( this_pa_mxurl( "action=file&file_id=" . $randrow[$j]['file_id'], false, $pafiledb_page_id ) ) . '">' . $randrow[$j]['file_name'] . '</a></b><br />' : '', ! 'DESC' => $randrow[$j]['file_desc'], ! 'POSTER' => $rand_poster, ! 'TIME' => create_date( $board_config['default_dateformat'], $randrow[$j]['file_time'], $board_config['board_timezone'] ), ! 'UPDATED' => create_date( $board_config['default_dateformat'], $randrow[$j]['file_update_time'], $board_config['board_timezone'] ), ! ! 'VIEW' => $randrow[$j]['file_dls'], ! ! 'RATING' => ( $album_config['rate'] == 1 ) ? ( $lang['Rating'] . ': ' . $rating_image . ', ' ) : '', ! ! 'COMMENTS' => ( $album_config['comment'] == 1 ) ? ( '<a href="' . append_sid( this_pa_mxurl( "action=file&file_id=" . $randrow[$j]['file_id'], false, $pafiledb_page_id ) ) . '">' . $lang['Comments'] . '</a>: ' . $randrow[$j]['comments'] . '<br />' ) : '' ! // 'IP' => ($userdata['user_level'] == ADMIN) ? $lang['IP_Address'] . ': <a href="http://www.nic.com/cgi-bin/whois.cgi?query=' . decode_ip($randrow[$j]['pic_user_ip']) . '" target="_blank">' . decode_ip($randrow[$j]['pic_user_ip']) .'</a><br />' : '' ! ) ! ); } } --- 473,487 ---- $rating_image = paImageRating( $randrow[$j]['rating'] ); ! $template->assign_block_vars( 'random_pics_block.rand_pics.rand_detail', array( ! 'TITLE' => ( empty( $file_screenshot_url ) ) ? '<b>' . $lang['File_Title'] . ': <a href="' . append_sid( pa_this_mxurl_list( "action=file&file_id=" . $randrow[$j]['file_id'], false, $pafiledb_page_id ) ) . '">' . $randrow[$j]['file_name'] . '</a></b><br />' : '', ! 'DESC' => $randrow[$j]['file_desc'], ! 'POSTER' => $rand_poster, ! 'TIME' => create_date( $board_config['default_dateformat'], $randrow[$j]['file_time'], $board_config['board_timezone'] ), ! 'UPDATED' => create_date( $board_config['default_dateformat'], $randrow[$j]['file_update_time'], $board_config['board_timezone'] ), ! 'VIEW' => $randrow[$j]['file_dls'], ! 'RATING' => ( $album_config['rate'] == 1 ) ? ( $lang['Rating'] . ': ' . $rating_image . ', ' ) : '', ! 'COMMENTS' => ( $album_config['comment'] == 1 ) ? ( '<a href="' . append_sid( pa_this_mxurl_list( "action=file&file_id=" . $randrow[$j]['file_id'], false, $pafiledb_page_id ) ) . '">' . $lang['Comments'] . '</a>: ' . $randrow[$j]['comments'] . '<br />' ) : '' ! // 'IP' => ($userdata['user_level'] == ADMIN) ? $lang['IP_Address'] . ': <a href="http://www.nic.com/cgi-bin/whois.cgi?query=' . decode_ip($randrow[$j]['pic_user_ip']) . '" target="_blank">' . decode_ip($randrow[$j]['pic_user_ip']) .'</a><br />' : '' ! )); } } *************** *** 532,538 **** else { ! // No Pics Found ! $template->assign_block_vars( 'random_pics_block.no_pics', array() ); } --- 489,495 ---- else { ! // // No Pics Found ! // $template->assign_block_vars( 'random_pics_block.no_pics', array() ); } *************** *** 540,546 **** else { ! // No Cats Found ! $template->assign_block_vars( 'random_pics_block.no_pics', array() ); } --- 497,503 ---- else { ! // // No Cats Found ! // $template->assign_block_vars( 'random_pics_block.no_pics', array() ); } *************** *** 559,594 **** } ! $template->set_filenames( array( 'body' => 'pa_lists.tpl' ) ! ); ! $template->assign_vars( array( 'L_CATEGORY' => $lang['Category'], ! 'L_PICS' => $lang['Pics'], ! 'L_LAST_PIC' => $lang['Last_Pic'], ! 'U_YOUR_PERSONAL_GALLERY' => append_sid( this_pa_mxurl( "smartor_mode=album_personal&user_id=" . $userdata['user_id'] ) ), ! 'L_YOUR_PERSONAL_GALLERY' => $lang['Your_Personal_Gallery'], ! 'U_USERS_PERSONAL_GALLERIES' => append_sid( this_pa_mxurl( "smartor_mode=album_personal_index" ) ), ! 'L_USERS_PERSONAL_GALLERIES' => $lang['Users_Personal_Galleries'], ! 'S_COLS' => $album_sp_config['img_cols'], ! 'S_COL_WIDTH' => ( 100 / $album_sp_config['img_cols'] ) . '%', ! 'TARGET_BLANK' => ( $album_config['fullpic_popup'] ) ? 'target="_blank"' : '', ! 'L_RECENT_PUBLIC_PICS' => $lang['Recent_Public_Files'], ! 'L_TOPRATED_PUBLIC_PICS' => $lang['Toprated_Public_Files'], ! 'L_RANDOM_PUBLIC_PICS' => $lang['Random_Public_Files'], ! 'L_MOST_PUBLIC_PICS' => $lang['Most_Public_Files'], ! 'L_NO_PICS' => $lang['No_Pics'], ! 'L_FILE_TITLE' => $lang['File_Title'], ! 'L_FILE_DESC' => $lang['File_Desc'], ! 'L_VIEW' => $lang['Dls'], ! 'L_POSTER' => $lang['Poster'], ! 'L_POSTED' => $lang['Posted'], ! 'L_UPDATE_TIME' => $lang['Update_time'], ! 'L_PUBLIC_CATS' => $lang['Public_Categories'] ) ! ); // Generate the page ! $template->pparse( 'body' ); --- 516,552 ---- } ! $template->set_filenames( array( 'body' => 'pa_lists.tpl' ) ); ! $template->assign_vars( array( ! 'L_CATEGORY' => $lang['Category'], ! 'L_PICS' => $lang['Pics'], ! 'L_LAST_PIC' => $lang['Last_Pic'], ! 'U_YOUR_PERSONAL_GALLERY' => append_sid( pa_this_mxurl_list( "smartor_mode=album_personal&user_id=" . $userdata['user_id'] ) ), ! 'L_YOUR_PERSONAL_GALLERY' => $lang['Your_Personal_Gallery'], ! 'U_USERS_PERSONAL_GALLERIES' => append_sid( pa_this_mxurl_list( "smartor_mode=album_personal_index" ) ), ! 'L_USERS_PERSONAL_GALLERIES' => $lang['Users_Personal_Galleries'], ! 'S_COLS' => $album_sp_config['img_cols'], ! 'S_COL_WIDTH' => ( 100 / $album_sp_config['img_cols'] ) . '%', ! 'TARGET_BLANK' => ( $album_config['fullpic_popup'] ) ? 'target="_blank"' : '', ! 'L_RECENT_PUBLIC_PICS' => $lang['Recent_Public_Files'], ! 'L_TOPRATED_PUBLIC_PICS' => $lang['Toprated_Public_Files'], ! 'L_RANDOM_PUBLIC_PICS' => $lang['Random_Public_Files'], ! 'L_MOST_PUBLIC_PICS' => $lang['Most_Public_Files'], ! 'L_NO_PICS' => $lang['No_Pics'], ! 'L_FILE_TITLE' => $lang['File_Title'], ! 'L_FILE_DESC' => $lang['File_Desc'], ! 'L_VIEW' => $lang['Dls'], ! 'L_POSTER' => $lang['Poster'], ! 'L_POSTED' => $lang['Posted'], ! 'L_UPDATE_TIME' => $lang['Update_time'], ! 'L_PUBLIC_CATS' => $lang['Public_Categories'] ) ! ); + // // Generate the page ! // $template->pparse( 'body' ); *************** *** 597,604 **** include( $mx_root_path . 'includes/page_tail.' . $phpEx ); } - // +--------------------------------------------------------+ - // | Powered by Photo Album 2.x.x (c) 2002-2003 Smartor | - // | with Volodymyr (CLowN) Skoryk's Service Pack 1 © 2003 | - // +--------------------------------------------------------+ - ?> \ No newline at end of file --- 555,557 ---- Index: db_install.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/db_install.php,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** db_install.php 2 May 2006 23:28:15 -0000 1.20 --- db_install.php 17 Jun 2006 20:13:22 -0000 1.21 *************** *** 30,34 **** } ! $mx_module_version = '2.0.2'; $mx_module_copy = 'Original phpBB <i>pafileDB</i> MOD by <a href="http://www.phpbb.com/phpBB/viewtopic.php?t=56035" target="_phpbb" >Mohd/Jon</a> based on <a href="http://www.phparena.net/" target="_blank">PHP Arena, pafileDB</a> :: Adapted for mxBB by <a href="http://www.mxbb-portal.com" target="_blank">Jon</a>'; --- 30,34 ---- } ! $mx_module_version = '2.8.0'; $mx_module_copy = 'Original phpBB <i>pafileDB</i> MOD by <a href="http://www.phpbb.com/phpBB/viewtopic.php?t=56035" target="_phpbb" >Mohd/Jon</a> based on <a href="http://www.phparena.net/" target="_blank">PHP Arena, pafileDB</a> :: Adapted for mxBB by <a href="http://www.mxbb-portal.com" target="_blank">Jon</a>'; *************** *** 273,277 **** "INSERT INTO " . $mx_table_prefix . "pa_config VALUES ('enable_module', '0')", // settings_disable "INSERT INTO " . $mx_table_prefix . "pa_config VALUES ('module_name', 'Download Database')", // settings_dbname ! "INSERT INTO " . $mx_table_prefix . "pa_config VALUES ('wysiwyg_path', 'modules/')", "INSERT INTO " . $mx_table_prefix . "pa_config VALUES ('upload_dir','pafiledb/uploads/')", "INSERT INTO " . $mx_table_prefix . "pa_config VALUES ('screenshots_dir','pafiledb/images/screenshots/')", --- 273,277 ---- "INSERT INTO " . $mx_table_prefix . "pa_config VALUES ('enable_module', '0')", // settings_disable "INSERT INTO " . $mx_table_prefix . "pa_config VALUES ('module_name', 'Download Database')", // settings_dbname ! "INSERT INTO " . $mx_table_prefix . "pa_config VALUES ('wysiwyg_path', 'modules/mx_shared/')", "INSERT INTO " . $mx_table_prefix . "pa_config VALUES ('upload_dir','pafiledb/uploads/')", "INSERT INTO " . $mx_table_prefix . "pa_config VALUES ('screenshots_dir','pafiledb/images/screenshots/')", *************** *** 315,318 **** --- 315,319 ---- "INSERT INTO " . $mx_table_prefix . "kb_config VALUES ('autogenerate_comments', '1')", // NEW "INSERT INTO " . $mx_table_prefix . "pa_config VALUES ('comments_pagination', '5')", + "INSERT INTO " . $mx_table_prefix . "pa_config VALUES ('comments_forum_id', '0')", // New // Ratings Index: dload.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/dload.php,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** dload.php 2 May 2006 23:28:15 -0000 1.19 --- dload.php 17 Jun 2006 20:13:22 -0000 1.20 *************** *** 81,84 **** --- 81,86 ---- // ------------------------------------------------------------------------------------------------------------------------- // ------------------------------------------------------------------------------------------------------------------------- + // Start + // ------------------------------------------------------------------------------------------------------------------------- // ------------------------------------------------------------------------------------------------------------------------- *************** *** 95,102 **** // =================================================== ! // Get action variable other wise set it to the main // =================================================== $action = $mx_request_vars->request('action', MX_TYPE_NO_TAGS, 'main'); $is_admin = ( ( $userdata['user_level'] == ADMIN ) && $userdata['session_logged_in'] ) ? true : 0; --- 97,107 ---- // =================================================== ! // Get action variable otherwise set it to the main // =================================================== $action = $mx_request_vars->request('action', MX_TYPE_NO_TAGS, 'main'); + // =================================================== + // Is admin? + // =================================================== $is_admin = ( ( $userdata['user_level'] == ADMIN ) && $userdata['session_logged_in'] ) ? true : 0; Index: dload_quickdl.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/dload_quickdl.php,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** dload_quickdl.php 2 May 2006 23:28:15 -0000 1.9 --- dload_quickdl.php 17 Jun 2006 20:13:22 -0000 1.10 *************** *** 16,24 **** include_once( $mx_root_path . 'common.' . $phpEx ); // Start session management ! $mx_user->init($user_ip, PAGE_INDEX); ! // End session management $block_id = ( !empty( $HTTP_GET_VARS['block_id'] ) ) ? $HTTP_GET_VARS['block_id'] : $HTTP_POST_VARS['id']; --- 16,26 ---- include_once( $mx_root_path . 'common.' . $phpEx ); + // // Start session management ! // $mx_user->init($user_ip, PAGE_INDEX); ! // // End session management + // $block_id = ( !empty( $HTTP_GET_VARS['block_id'] ) ) ? $HTTP_GET_VARS['block_id'] : $HTTP_POST_VARS['id']; *************** *** 50,54 **** --- 52,58 ---- $mx_script_name = preg_replace( '#^\/?(.*?)\/?$#', '\1', trim( $mx_script_name_temp ) ); + // // Setup config parameters + // $config_name = array( 'pa_mapping', 'pa_quick_cat' ); *************** *** 62,74 **** // Include the common file // =================================================== - /* - orig - include($phpbb_root_path . 'pafiledb/pafiledb_common.'.$phpEx); - */ - // MX include_once( $module_root_path . 'pafiledb/pafiledb_common.' . $phpEx ); // =================================================== // Get action variable other wise set it to the main // =================================================== $action = ( isset( $_REQUEST['action'] ) ) ? htmlspecialchars( $_REQUEST['action'] ) : 'quickdl'; // =================================================== // if the database disabled give them a nice message --- 66,76 ---- // Include the common file // =================================================== include_once( $module_root_path . 'pafiledb/pafiledb_common.' . $phpEx ); + // =================================================== // Get action variable other wise set it to the main // =================================================== $action = ( isset( $_REQUEST['action'] ) ) ? htmlspecialchars( $_REQUEST['action'] ) : 'quickdl'; + // =================================================== // if the database disabled give them a nice message *************** *** 78,86 **** mx_message_die( GENERAL_MESSAGE, $lang['pafiledb_disable'] ); } // =================================================== // an array of all expected actions // =================================================== ! $actions = array( 'quickdl' => 'quickdl', ! 'download' => 'download' ); // =================================================== // Lets Build the page --- 80,89 ---- mx_message_die( GENERAL_MESSAGE, $lang['pafiledb_disable'] ); } + // =================================================== // an array of all expected actions // =================================================== ! $actions = array( 'quickdl' => 'quickdl', 'download' => 'download' ); ! // =================================================== // Lets Build the page *************** *** 90,97 **** if ( $action != 'download' ) { - /* - orig - include($phpbb_root_path . 'includes/page_header.'.$phpEx); - */ - // MX if ( !$is_block ) { --- 93,96 ---- *************** *** 105,112 **** if ( $action != 'download' ) { - /* - orig - include($phpbb_root_path . 'includes/page_tail.'.$phpEx); - */ - // MX if ( !$is_block ) { --- 104,107 ---- *************** *** 114,117 **** } } - ?> \ No newline at end of file --- 109,111 ---- |
|
From: Jon O. <jon...@us...> - 2006-06-17 20:13:26
|
Update of /cvsroot/mxbb/mx_pafiledb/templates/subSilver/admin In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv22598/modules/mx_pafiledb/templates/subSilver/admin Modified Files: pa_admin_settings.tpl Log Message: Finalizing module Index: pa_admin_settings.tpl =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/templates/subSilver/admin/pa_admin_settings.tpl,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** pa_admin_settings.tpl 5 Apr 2006 21:30:45 -0000 1.9 --- pa_admin_settings.tpl 17 Jun 2006 20:13:22 -0000 1.10 *************** *** 32,44 **** <!-- TITLE ------------------------------------------------------------------------------------------- --> <th class="thHead" colspan="2"> {L_FILE_TITLE}</th> ! </tr> <tr> <td class="row1">{L_HOTLINK}<br><span class="gensmall">{L_HOTLINK_INFO}</span></td> <td class="row2" width="50%"><input type="radio" name="hotlink_prevent" value="1" {S_HOTLINK_YES} /> {L_YES} <input type="radio" name="hotlink_prevent" value="0" {S_HOTLINK_NO} /> {L_NO}</td> ! </tr> <tr> <td class="row1">{L_HOTLINK_ALLOWED}<br><span class="gensmall">{L_HOTLINK_ALLOWED_INFO}</span></td> <td class="row2"><input class="post" type="text" size="40" name="hotlink_allowed" value="{HOTLINK_ALLOWED}" /></td> ! </tr> <tr> <td class="row1">{L_PHP_TPL}<br><span class="gensmall">{L_PHP_TPL_INFO}</span></td> --- 32,44 ---- <!-- TITLE ------------------------------------------------------------------------------------------- --> <th class="thHead" colspan="2"> {L_FILE_TITLE}</th> ! </tr> <tr> <td class="row1">{L_HOTLINK}<br><span class="gensmall">{L_HOTLINK_INFO}</span></td> <td class="row2" width="50%"><input type="radio" name="hotlink_prevent" value="1" {S_HOTLINK_YES} /> {L_YES} <input type="radio" name="hotlink_prevent" value="0" {S_HOTLINK_NO} /> {L_NO}</td> ! </tr> <tr> <td class="row1">{L_HOTLINK_ALLOWED}<br><span class="gensmall">{L_HOTLINK_ALLOWED_INFO}</span></td> <td class="row2"><input class="post" type="text" size="40" name="hotlink_allowed" value="{HOTLINK_ALLOWED}" /></td> ! </tr> <tr> <td class="row1">{L_PHP_TPL}<br><span class="gensmall">{L_PHP_TPL_INFO}</span></td> *************** *** 60,64 **** <td class="row1" width="50%">{L_PAGINATION}<br /><span class="gensmall">{L_PAGINATION_EXPLAIN}</span></td> <td class="row2" width="50%"><input class="post" type="text" name="pagination" value="{PAGINATION}" size="5" maxlength="4" /></td> ! </tr> <tr> <td class="row1" width="50%">{L_SORT_METHOD}<br /><span class="gensmall">{L_SORT_METHOD_EXPLAIN}</span></td> --- 60,64 ---- <td class="row1" width="50%">{L_PAGINATION}<br /><span class="gensmall">{L_PAGINATION_EXPLAIN}</span></td> <td class="row2" width="50%"><input class="post" type="text" name="pagination" value="{PAGINATION}" size="5" maxlength="4" /></td> ! </tr> <tr> <td class="row1" width="50%">{L_SORT_METHOD}<br /><span class="gensmall">{L_SORT_METHOD_EXPLAIN}</span></td> *************** *** 68,72 **** <td class="row1" width="50%">{L_SORT_ORDER}<br /><span class="gensmall">{L_SORT_ORDER_EXPLAIN}</span></td> <td class="row2" width="50%">{SORT_ORDER} </td> ! </tr> <tr> <td class="row1">{L_TOPNUM}<br><span class="gensmall">{L_TOPNUMINFO}</span></td> --- 68,72 ---- <td class="row1" width="50%">{L_SORT_ORDER}<br /><span class="gensmall">{L_SORT_ORDER_EXPLAIN}</span></td> <td class="row2" width="50%">{SORT_ORDER} </td> ! </tr> <tr> <td class="row1">{L_TOPNUM}<br><span class="gensmall">{L_TOPNUMINFO}</span></td> *************** *** 76,84 **** <td class="row1">{L_NFDAYS}<br><span class="gensmall">{L_NFDAYSINFO}</span></td> <td class="row2"><input type="text" class="post" size="5" maxlength="5" name="settings_newdays" value="{SETTINGS_NEWDAYS}" /></td> ! </tr> <tr> <td class="row1">{L_SHOW_VIEWALL}<br><span class="gensmall">{L_VIEWALL_INFO}</span></td> <td class="row2" width="50%"><input type="radio" name="settings_viewall" value="1" {S_VIEW_ALL_YES} /> {L_YES} <input type="radio" name="settings_viewall" value="0" {S_VIEW_ALL_NO} /> {L_NO}</td> ! </tr> <tr> <!-- TITLE ------------------------------------------------------------------------------------------- --> --- 76,84 ---- <td class="row1">{L_NFDAYS}<br><span class="gensmall">{L_NFDAYSINFO}</span></td> <td class="row2"><input type="text" class="post" size="5" maxlength="5" name="settings_newdays" value="{SETTINGS_NEWDAYS}" /></td> ! </tr> <tr> <td class="row1">{L_SHOW_VIEWALL}<br><span class="gensmall">{L_VIEWALL_INFO}</span></td> <td class="row2" width="50%"><input type="radio" name="settings_viewall" value="1" {S_VIEW_ALL_YES} /> {L_YES} <input type="radio" name="settings_viewall" value="0" {S_VIEW_ALL_NO} /> {L_NO}</td> ! </tr> <tr> <!-- TITLE ------------------------------------------------------------------------------------------- --> *************** *** 88,108 **** <td class="row1" width="50%">{L_USE_COMMENTS}<br /><span class="gensmall">{L_USE_COMMENTS_EXPLAIN}</span></td> <td class="row2" width="50%"><input type="radio" name="use_comments" value="1" {S_USE_COMMENTS_YES} /> {L_YES} <input type="radio" name="use_comments" value="0" {S_USE_COMMENTS_NO} /> {L_NO}</td> ! </tr> <tr> <td class="row1" width="50%">{L_INTERNAL_COMMENTS}<br /><span class="gensmall">{L_INTERNAL_COMMENTS_EXPLAIN}</span></td> <td class="row2" width="50%"><input type="radio" name="internal_comments" value="1" {S_INTERNAL_COMMENTS_INTERNAL} /> {L_INTERNAL_COMMENTS_INTERNAL} <input type="radio" name="internal_comments" value="0" {S_INTERNAL_COMMENTS_PHPBB} /> {L_INTERNAL_COMMENTS_PHPBB}</td> ! </tr> <tr> <td class="row1" width="50%">{L_COMMENTS_PAG}<br /><span class="gensmall">{L_COMMENTS_PAG_EXPLAIN}</span></td> <td class="row2" width="50%"><input class="post" type="text" name="comments_pagination" value="{COMMENTS_PAG}" size="5" maxlength="4" /></td> ! </tr> ! <tr> ! <td class="row1" width="50%">{L_AUTOGENERATE_COMMENTS}<br /><span class="gensmall">{L_AUTOGENERATE_COMMENTS_EXPLAIN}</span></td> ! <td class="row2" width="50%"><input type="radio" name="autogenerate_comments" value="1" {S_AUTOGENERATE_COMMENTS_YES} /> {L_YES} <input type="radio" name="autogenerate_comments" value="0" {S_AUTOGENERATE_COMMENTS_NO} /> {L_NO}</td> </tr> <tr> <td class="row1" width="50%">{L_DEL_TOPIC}<br /><span class="gensmall">{L_DEL_TOPIC_EXPLAIN}</span></td> <td class="row2" width="50%"><input type="radio" name="del_topic" value="1" {S_DEL_TOPIC_YES} /> {L_YES} <input type="radio" name="del_topic" value="0" {S_DEL_TOPIC_NO} /> {L_NO}</td> ! </tr> <tr> <td class="row1" width="50%">{L_ALLOW_COMMENT_WYSIWYG}<br /><span class="gensmall">{L_ALLOW_COMMENT_WYSIWYG_EXPLAIN}</span></td> --- 88,112 ---- <td class="row1" width="50%">{L_USE_COMMENTS}<br /><span class="gensmall">{L_USE_COMMENTS_EXPLAIN}</span></td> <td class="row2" width="50%"><input type="radio" name="use_comments" value="1" {S_USE_COMMENTS_YES} /> {L_YES} <input type="radio" name="use_comments" value="0" {S_USE_COMMENTS_NO} /> {L_NO}</td> ! </tr> <tr> <td class="row1" width="50%">{L_INTERNAL_COMMENTS}<br /><span class="gensmall">{L_INTERNAL_COMMENTS_EXPLAIN}</span></td> <td class="row2" width="50%"><input type="radio" name="internal_comments" value="1" {S_INTERNAL_COMMENTS_INTERNAL} /> {L_INTERNAL_COMMENTS_INTERNAL} <input type="radio" name="internal_comments" value="0" {S_INTERNAL_COMMENTS_PHPBB} /> {L_INTERNAL_COMMENTS_PHPBB}</td> ! </tr> ! <tr> ! <td class="row1" width="50%">{L_FORUM_ID}<br /><span class="gensmall">{L_FORUM_ID_EXPLAIN}</span></td> ! <td class="row2" width="50%">{FORUM_LIST}</td> ! </tr> <tr> <td class="row1" width="50%">{L_COMMENTS_PAG}<br /><span class="gensmall">{L_COMMENTS_PAG_EXPLAIN}</span></td> <td class="row2" width="50%"><input class="post" type="text" name="comments_pagination" value="{COMMENTS_PAG}" size="5" maxlength="4" /></td> ! </tr> ! <tr> ! <td class="row1" width="50%">{L_AUTOGENERATE_COMMENTS}<br /><span class="gensmall">{L_AUTOGENERATE_COMMENTS_EXPLAIN}</span></td> ! <td class="row2" width="50%"><input type="radio" name="autogenerate_comments" value="1" {S_AUTOGENERATE_COMMENTS_YES} /> {L_YES} <input type="radio" name="autogenerate_comments" value="0" {S_AUTOGENERATE_COMMENTS_NO} /> {L_NO}</td> </tr> <tr> <td class="row1" width="50%">{L_DEL_TOPIC}<br /><span class="gensmall">{L_DEL_TOPIC_EXPLAIN}</span></td> <td class="row2" width="50%"><input type="radio" name="del_topic" value="1" {S_DEL_TOPIC_YES} /> {L_YES} <input type="radio" name="del_topic" value="0" {S_DEL_TOPIC_NO} /> {L_NO}</td> ! </tr> <tr> <td class="row1" width="50%">{L_ALLOW_COMMENT_WYSIWYG}<br /><span class="gensmall">{L_ALLOW_COMMENT_WYSIWYG_EXPLAIN}</span></td> *************** *** 116,128 **** <td class="row1" width="50%">{L_ALLOWED_COMMENT_HTML_TAGS}<br /><span class="gensmall">{L_ALLOWED_HTML_TAGS_EXPLAIN}</span></td> <td class="row2" width="50%"><input text="text" name="allowed_comment_html_tags" value="{ALLOWED_COMMENT_HTML_TAGS}" size="15" maxlength="50" /></td> ! </tr> <tr> <td class="row1" width="50%">{L_ALLOW_COMMENT_BBCODE}<br /><span class="gensmall">{L_ALLOW_BBCODE_EXPLAIN}</span></td> <td class="row2" width="50%"><input type="radio" name="allow_comment_bbcode" value="1" {S_ALLOW_COMMENT_BBCODE_YES} /> {L_YES} <input type="radio" name="allow_comment_bbcode" value="0" {S_ALLOW_COMMENT_BBCODE_NO} /> {L_NO}</td> ! </tr> <tr> <td class="row1" width="50%">{L_ALLOW_COMMENT_SMILIES}<br /><span class="gensmall">{L_ALLOW_SMILIES_EXPLAIN}</span></td> <td class="row2" width="50%"><input type="radio" name="allow_comment_smilies" value="1" {S_ALLOW_COMMENT_SMILIES_YES} /> {L_YES} <input type="radio" name="allow_comment_smilies" value="0" {S_ALLOW_COMMENT_SMILIES_NO} /> {L_NO}</td> ! </tr> <tr> <td class="row1" width="50%">{L_ALLOW_COMMENT_IMAGES}<br /><span class="gensmall">{L_ALLOW_IMAGES_EXPLAIN}</span></td> --- 120,132 ---- <td class="row1" width="50%">{L_ALLOWED_COMMENT_HTML_TAGS}<br /><span class="gensmall">{L_ALLOWED_HTML_TAGS_EXPLAIN}</span></td> <td class="row2" width="50%"><input text="text" name="allowed_comment_html_tags" value="{ALLOWED_COMMENT_HTML_TAGS}" size="15" maxlength="50" /></td> ! </tr> <tr> <td class="row1" width="50%">{L_ALLOW_COMMENT_BBCODE}<br /><span class="gensmall">{L_ALLOW_BBCODE_EXPLAIN}</span></td> <td class="row2" width="50%"><input type="radio" name="allow_comment_bbcode" value="1" {S_ALLOW_COMMENT_BBCODE_YES} /> {L_YES} <input type="radio" name="allow_comment_bbcode" value="0" {S_ALLOW_COMMENT_BBCODE_NO} /> {L_NO}</td> ! </tr> <tr> <td class="row1" width="50%">{L_ALLOW_COMMENT_SMILIES}<br /><span class="gensmall">{L_ALLOW_SMILIES_EXPLAIN}</span></td> <td class="row2" width="50%"><input type="radio" name="allow_comment_smilies" value="1" {S_ALLOW_COMMENT_SMILIES_YES} /> {L_YES} <input type="radio" name="allow_comment_smilies" value="0" {S_ALLOW_COMMENT_SMILIES_NO} /> {L_NO}</td> ! </tr> <tr> <td class="row1" width="50%">{L_ALLOW_COMMENT_IMAGES}<br /><span class="gensmall">{L_ALLOW_IMAGES_EXPLAIN}</span></td> *************** *** 132,148 **** <td class="row1">{L_COMMENT_IMAGES_MESSAGE}<br><span class="gensmall">{L_COMMENT_IMAGES_MESSAGE_EXPLAIN}</span></td> <td class="row2"><input type="text" class="post" size="50" name="no_comment_image_message" value="{COMMENT_MESSAGE_IMAGE}" /></td> ! </tr> <tr> <td class="row1" width="50%">{L_ALLOW_COMMENT_LINKS}<br /><span class="gensmall">{L_ALLOW_COMMENT_LINKS_EXPLAIN}</span></td> <td class="row2" width="50%"><input type="radio" name="allow_comment_links" value="1" {S_ALLOW_COMMENT_LINKS_YES} /> {L_YES} <input type="radio" name="allow_comment_links" value="0" {S_ALLOW_COMMENT_LINKS_NO} /> {L_NO}</td> ! </tr> <tr> <td class="row1">{L_COMMENT_LINKS_MESSAGE}<br><span class="gensmall">{L_COMMENT_LINKS_MESSAGE_EXPLAIN}</span></td> <td class="row2"><input type="text" class="post" size="50" name="no_comment_link_message" value="{COMMENT_MESSAGE_LINK}" /></td> ! </tr> <tr> <td class="row1" width="50%">{L_COMMENT_FORMAT_WORDWRAP}<br /><span class="gensmall">{L_COMMENT_FORMAT_WORDWRAP_EXPLAIN}</span></td> <td class="row2" width="50%"><input type="radio" name="formatting_comment_wordwrap" value="1" {S_COMMENT_FORMAT_WORDWRAP_YES} /> {L_YES} <input type="radio" name="formatting_comment_wordwrap" value="0" {S_COMMENT_FORMAT_WORDWRAP_NO} /> {L_NO}</td> ! </tr> <tr> <td class="row1">{L_COMMENT_FORMAT_IMAGE_RESIZE}<br><span class="gensmall">{L_COMMENT_FORMAT_IMAGE_RESIZE_EXPLAIN}</span></td> --- 136,152 ---- <td class="row1">{L_COMMENT_IMAGES_MESSAGE}<br><span class="gensmall">{L_COMMENT_IMAGES_MESSAGE_EXPLAIN}</span></td> <td class="row2"><input type="text" class="post" size="50" name="no_comment_image_message" value="{COMMENT_MESSAGE_IMAGE}" /></td> ! </tr> <tr> <td class="row1" width="50%">{L_ALLOW_COMMENT_LINKS}<br /><span class="gensmall">{L_ALLOW_COMMENT_LINKS_EXPLAIN}</span></td> <td class="row2" width="50%"><input type="radio" name="allow_comment_links" value="1" {S_ALLOW_COMMENT_LINKS_YES} /> {L_YES} <input type="radio" name="allow_comment_links" value="0" {S_ALLOW_COMMENT_LINKS_NO} /> {L_NO}</td> ! </tr> <tr> <td class="row1">{L_COMMENT_LINKS_MESSAGE}<br><span class="gensmall">{L_COMMENT_LINKS_MESSAGE_EXPLAIN}</span></td> <td class="row2"><input type="text" class="post" size="50" name="no_comment_link_message" value="{COMMENT_MESSAGE_LINK}" /></td> ! </tr> <tr> <td class="row1" width="50%">{L_COMMENT_FORMAT_WORDWRAP}<br /><span class="gensmall">{L_COMMENT_FORMAT_WORDWRAP_EXPLAIN}</span></td> <td class="row2" width="50%"><input type="radio" name="formatting_comment_wordwrap" value="1" {S_COMMENT_FORMAT_WORDWRAP_YES} /> {L_YES} <input type="radio" name="formatting_comment_wordwrap" value="0" {S_COMMENT_FORMAT_WORDWRAP_NO} /> {L_NO}</td> ! </tr> <tr> <td class="row1">{L_COMMENT_FORMAT_IMAGE_RESIZE}<br><span class="gensmall">{L_COMMENT_FORMAT_IMAGE_RESIZE_EXPLAIN}</span></td> *************** *** 156,164 **** <td class="row1">{L_COMMENT_MAX_SUBJECT_CHAR}<br><span class="gensmall">{L_COMMENT_MAX_SUBJECT_CHAR_EXPLAIN}</span></td> <td class="row2"><input type="text" class="post" size="50" name="max_comment_subject_chars" value="{COMMENT_MAX_SUBJECT_CHAR}" /></td> ! </tr> <tr> <td class="row1">{L_COMMENT_MAX_CHAR}<br><span class="gensmall">{L_COMMENT_MAX_CHAR_EXPLAIN}</span></td> <td class="row2"><input type="text" class="post" size="50" name="max_comment_chars" value="{COMMENT_MAX_CHAR}" /></td> ! </tr> <tr> <!-- TITLE ------------------------------------------------------------------------------------------- --> --- 160,168 ---- <td class="row1">{L_COMMENT_MAX_SUBJECT_CHAR}<br><span class="gensmall">{L_COMMENT_MAX_SUBJECT_CHAR_EXPLAIN}</span></td> <td class="row2"><input type="text" class="post" size="50" name="max_comment_subject_chars" value="{COMMENT_MAX_SUBJECT_CHAR}" /></td> ! </tr> <tr> <td class="row1">{L_COMMENT_MAX_CHAR}<br><span class="gensmall">{L_COMMENT_MAX_CHAR_EXPLAIN}</span></td> <td class="row2"><input type="text" class="post" size="50" name="max_comment_chars" value="{COMMENT_MAX_CHAR}" /></td> ! </tr> <tr> <!-- TITLE ------------------------------------------------------------------------------------------- --> *************** *** 176,180 **** <td class="row1" width="50%">{L_VOTES_CHECK_USERID}<br /><span class="gensmall">{L_VOTES_CHECK_USERID_EXPLAIN}</span></td> <td class="row2" width="50%"><input type="radio" name="votes_check_userid" value="1" {S_VOTES_CHECK_USERID_YES} /> {L_YES} <input type="radio" name="votes_check_userid" value="0" {S_VOTES_CHECK_USERID_NO} /> {L_NO}</td> ! </tr> <tr> <!-- TITLE ------------------------------------------------------------------------------------------- --> --- 180,184 ---- <td class="row1" width="50%">{L_VOTES_CHECK_USERID}<br /><span class="gensmall">{L_VOTES_CHECK_USERID_EXPLAIN}</span></td> <td class="row2" width="50%"><input type="radio" name="votes_check_userid" value="1" {S_VOTES_CHECK_USERID_YES} /> {L_YES} <input type="radio" name="votes_check_userid" value="0" {S_VOTES_CHECK_USERID_NO} /> {L_NO}</td> ! </tr> <tr> <!-- TITLE ------------------------------------------------------------------------------------------- --> *************** *** 192,196 **** <td class="row1" width="50%">{L_PRE_TEXT_BODY}</td> <td class="row2" width="50%"><textarea name="pt_body" cols="40" rows="5">{L_PT_BODY}</textarea></td> ! </tr> <tr> <!-- TITLE ------------------------------------------------------------------------------------------- --> --- 196,200 ---- <td class="row1" width="50%">{L_PRE_TEXT_BODY}</td> <td class="row2" width="50%"><textarea name="pt_body" cols="40" rows="5">{L_PT_BODY}</textarea></td> ! </tr> <tr> <!-- TITLE ------------------------------------------------------------------------------------------- --> *************** *** 225,232 **** <td class="row1" width="50%">{L_ATUH_VIEWALL}<br><span class="gensmall">{L_ATUH_VIEWALL_INFO}</span></td> <td class="row2" width="50%">{S_ATUH_VIEWALL}</td> ! </tr> <tr> <td class="cat" colspan="2" align="center">{S_HIDDEN_FIELDS}<input type="submit" name="submit" value="{L_SUBMIT}" class="mainoption" /> <input type="reset" value="{L_RESET}" class="liteoption" /></td> ! </tr> </table> </form> \ No newline at end of file --- 229,236 ---- <td class="row1" width="50%">{L_ATUH_VIEWALL}<br><span class="gensmall">{L_ATUH_VIEWALL_INFO}</span></td> <td class="row2" width="50%">{S_ATUH_VIEWALL}</td> ! </tr> <tr> <td class="cat" colspan="2" align="center">{S_HIDDEN_FIELDS}<input type="submit" name="submit" value="{L_SUBMIT}" class="mainoption" /> <input type="reset" value="{L_RESET}" class="liteoption" /></td> ! </tr> </table> </form> \ No newline at end of file |
|
From: Jon O. <jon...@us...> - 2006-06-17 20:13:26
|
Update of /cvsroot/mxbb/mx_pafiledb/admin In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv22598/modules/mx_pafiledb/admin Modified Files: admin_pa_catauth.php admin_pa_category.php admin_pa_custom.php admin_pa_fchecker.php admin_pa_file.php admin_pa_license.php admin_pa_settings.php admin_pa_ug_auth.php mx_module_defs.php Log Message: Finalizing module Index: admin_pa_category.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/admin/admin_pa_category.php,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** admin_pa_category.php 2 May 2006 23:28:15 -0000 1.16 --- admin_pa_category.php 17 Jun 2006 20:13:21 -0000 1.17 *************** *** 25,29 **** include_once( $module_root_path . 'pafiledb/includes/pafiledb_constants.' . $phpEx ); $file = basename( __FILE__ ); ! $module['pafileDB_Download']['1_Cat_manage_title'] = $file; return; } --- 25,29 ---- include_once( $module_root_path . 'pafiledb/includes/pafiledb_constants.' . $phpEx ); $file = basename( __FILE__ ); ! $module['pafileDB_Download']['1_Cat_manage'] = $file; return; } *************** *** 53,57 **** $file = basename( __FILE__ ); ! $module['pafileDB_Download']['1_Cat_manage_title'] = 'modules/mx_pafiledb/admin/' . $file; return; } --- 53,57 ---- $file = basename( __FILE__ ); ! $module['pafileDB_Download']['1_Cat_manage'] = 'modules/mx_pafiledb/admin/' . $file; return; } *************** *** 70,73 **** --- 70,88 ---- } + // ********************************************************************** + // Read language definition + // ********************************************************************** + if ( !file_exists( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ) ) + { + include( $module_root_path . 'language/lang_english/lang_admin.' . $phpEx ); + } + else + { + include( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ); + } + + // + // Init + // $pafiledb->init(); *************** *** 152,157 **** } ! $pafiledb_template->set_filenames( array( 'admin' => $template_file ) ! ); $pafiledb_template->assign_vars( array( --- 167,171 ---- } ! $pafiledb_template->set_filenames( array( 'admin' => $template_file ) ); $pafiledb_template->assign_vars( array( *************** *** 161,166 **** 'ERROR' => ( sizeof( $pafiledb->error ) ) ? implode( '<br />', $pafiledb->error ) : '', 'S_HIDDEN_FIELDS' => $s_hidden_fields, ! 'S_CAT_ACTION' => append_sid( "admin_pa_category.$phpEx" ) ) ! ); if ( $mode == '' || $mode == 'cat_order' || $mode == 'sync' || $mode == 'sync_all' ) --- 175,180 ---- 'ERROR' => ( sizeof( $pafiledb->error ) ) ? implode( '<br />', $pafiledb->error ) : '', 'S_HIDDEN_FIELDS' => $s_hidden_fields, ! 'S_CAT_ACTION' => append_sid( "admin_pa_category.$phpEx" ) ! )); if ( $mode == '' || $mode == 'cat_order' || $mode == 'sync' || $mode == 'sync_all' ) *************** *** 173,178 **** 'L_MOVE_DOWN' => $lang['Move_down'], 'L_SUB_CAT' => $lang['Sub_category'], ! 'L_RESYNC' => $lang['Resync'] ) ! ); admin_cat_main( $cat_id ); } --- 187,192 ---- 'L_MOVE_DOWN' => $lang['Move_down'], 'L_SUB_CAT' => $lang['Sub_category'], ! 'L_RESYNC' => $lang['Resync'] ! )); admin_cat_main( $cat_id ); } *************** *** 211,215 **** $autogenerate_comments_default = "checked=\"checked\""; ! $comments_forum_id = 0; // --- 225,229 ---- $autogenerate_comments_default = "checked=\"checked\""; ! $comments_forum_id = -1; // *************** *** 332,336 **** 'L_FORUM_ID' => $lang['Forum_id'], 'L_FORUM_ID_EXPLAIN' => $lang['Forum_id_explain'], ! 'FORUM_LIST' => get_forums( $comments_forum_id ), 'L_AUTOGENERATE_COMMENTS' => $lang['Autogenerate_comments'], --- 346,350 ---- 'L_FORUM_ID' => $lang['Forum_id'], 'L_FORUM_ID_EXPLAIN' => $lang['Forum_id_explain'], ! 'FORUM_LIST' => get_forums( $comments_forum_id, true, 'comments_forum_id' ), 'L_AUTOGENERATE_COMMENTS' => $lang['Autogenerate_comments'], *************** *** 420,425 **** 'L_SELECT_CAT' => $lang['Select_a_Category'], 'L_DELETE' => $lang['Delete'], ! 'L_MOVE' => $lang['Move'] ) ! ); } --- 434,439 ---- 'L_SELECT_CAT' => $lang['Select_a_Category'], 'L_DELETE' => $lang['Delete'], ! 'L_MOVE' => $lang['Move'] ! )); } *************** *** 431,434 **** include( $mx_root_path . 'admin/page_footer_admin.' . $phpEx ); - ?> \ No newline at end of file --- 445,447 ---- Index: admin_pa_file.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/admin/admin_pa_file.php,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** admin_pa_file.php 2 May 2006 23:28:15 -0000 1.19 --- admin_pa_file.php 17 Jun 2006 20:13:21 -0000 1.20 *************** *** 25,29 **** include_once( $module_root_path . 'pafiledb/includes/pafiledb_constants.' . $phpEx ); $file = basename( __FILE__ ); ! $module['pafileDB_Download']['2_File_manage_title'] = $file; return; } --- 25,29 ---- include_once( $module_root_path . 'pafiledb/includes/pafiledb_constants.' . $phpEx ); $file = basename( __FILE__ ); ! $module['pafileDB_Download']['2_File_manage'] = $file; return; } *************** *** 52,56 **** $file = basename( __FILE__ ); ! $module['pafileDB_Download']['2_File_manage_title'] = 'modules/mx_pafiledb/admin/' . $file; return; } --- 52,56 ---- $file = basename( __FILE__ ); ! $module['pafileDB_Download']['2_File_manage'] = 'modules/mx_pafiledb/admin/' . $file; return; } *************** *** 69,72 **** --- 69,89 ---- } + // ********************************************************************** + // Read language definition + // ********************************************************************** + if ( !file_exists( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ) ) + { + include( $module_root_path . 'language/lang_english/lang_admin.' . $phpEx ); + include( $module_root_path . 'language/lang_english/lang_main.' . $phpEx ); // For notification + } + else + { + include( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ); + include( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main.' . $phpEx ); // For notification + } + + // + // Init + // $custom_field = new custom_field(); $custom_field->init(); *************** *** 80,83 **** --- 97,101 ---- $mode = ( isset( $_REQUEST['mode'] ) ) ? htmlspecialchars( $_REQUEST['mode'] ) : ''; + $mode_notification = ( isset( $_REQUEST['mode'] ) ) ? htmlspecialchars( $_REQUEST['mode'] ) : ''; $mode_js = ( isset( $_REQUEST['mode_js'] ) ) ? htmlspecialchars( $_REQUEST['mode_js'] ) : ''; $mode = ( isset( $_POST['addfile'] ) ) ? 'add' : $mode; *************** *** 137,145 **** } ! $s_file_actions = array( 'approved' => $lang['Approved_files'], 'broken' => $lang['Broken_files'], 'file_cat' => $lang['File_cat'], 'all_file' => $lang['All_files'], ! 'maintenance' => $lang['Maintenance'] ); switch ( $mode ) --- 155,165 ---- } ! $s_file_actions = array( ! 'approved' => $lang['Approved_files'], 'broken' => $lang['Broken_files'], 'file_cat' => $lang['File_cat'], 'all_file' => $lang['All_files'], ! 'maintenance' => $lang['Maintenance'] ! ); switch ( $mode ) *************** *** 154,161 **** case 'all_file': default: - /* - orig - $template_file = 'admin/pa_admin_file.tpl'; - */ - // MX $template_file = 'admin/pa_admin_file.tpl'; $l_title = $lang['File_manage_title']; --- 174,177 ---- *************** *** 164,171 **** break; case 'add': - /* - orig - $template_file = 'admin/pa_admin_file_edit.tpl'; - */ - // MX $template_file = 'admin/pa_admin_file_edit.tpl'; $l_title = $lang['Afiletitle']; --- 180,183 ---- *************** *** 175,182 **** case 'edit': case 'do_add': - /* - orig - $template_file = 'admin/pa_admin_file_edit.tpl'; - */ - // MX $template_file = 'admin/pa_admin_file_edit.tpl'; $l_title = $lang['Efiletitle']; --- 187,190 ---- *************** *** 186,193 **** break; case 'maintenance': - /* - orig - $template_file = 'admin/pa_admin_file_checker.tpl'; - */ - // MX $template_file = 'admin/pa_admin_file_checker.tpl'; $l_title = $lang['File_checker']; --- 194,197 ---- *************** *** 210,219 **** $pafiledb->_pafiledb(); $mode = 'edit'; if ( !$mirrors ) { $message = $lang['Fileadded'] . '<br /><br />' . sprintf( $lang['Click_return'], '<a href="' . append_sid( "admin_pa_file.php" ) . '">', '</a>' ); mx_message_die( GENERAL_MESSAGE, $message ); } ! }elseif ( $mode == 'do_add' && $file_id ) { $file_id = $pafiledb->update_add_file( $file_id ); --- 214,250 ---- $pafiledb->_pafiledb(); $mode = 'edit'; + if ( !$mirrors ) { + // + // Notification + // + $pafiledb->update_add_file_notify($file_id, 'add'); + + /* + // + // Auto comment + // + if ( $pafiledb->comments[$cat_id]['activated'] && $this->comments[$cat_id]['autogenerate_comments'] ) + { + // + // Autogenerate comment (duplicate the notification message) + // + $mx_pa_notification = new mx_pa_notification(); + $mx_pa_notification->init( $file_id ); + $mx_pa_notification->_compose_auto_note($pa_post_mode == 'add' ? MX_NEW_NOTIFICATION : MX_EDITED_NOTIFICATION); + + // + // Generate comment + // + $this->update_add_comment('', $file_id, 0, addslashes(trim($mx_pa_notification->subject)), addslashes(trim($mx_pa_notification->message))); + } + */ + $message = $lang['Fileadded'] . '<br /><br />' . sprintf( $lang['Click_return'], '<a href="' . append_sid( "admin_pa_file.php" ) . '">', '</a>' ); mx_message_die( GENERAL_MESSAGE, $message ); } ! } ! elseif ( $mode == 'do_add' && $file_id ) { $file_id = $pafiledb->update_add_file( $file_id ); *************** *** 221,230 **** $pafiledb->_pafiledb(); $mode = 'edit'; if ( !$mirrors ) { $message = $lang['Fileedited'] . '<br /><br />' . sprintf( $lang['Click_return'], '<a href="' . append_sid( "admin_pa_file.$phpEx" ) . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Click_return_admin_index'], '<a href="' . append_sid( $mx_root_path . "admin/index.$phpEx?pane=right" ) . '">', '</a>' ); mx_message_die( GENERAL_MESSAGE, $message ); } ! }elseif ( $mode == 'delete' ) { if ( is_array( $file_ids ) && !empty( $file_ids ) ) --- 252,288 ---- $pafiledb->_pafiledb(); $mode = 'edit'; + if ( !$mirrors ) { + // + // Notification + // + $pafiledb->update_add_file_notify($file_id, 'edit'); + + /* + // + // Auto comment + // + if ( $pafiledb->comments[$cat_id]['activated'] && $this->comments[$cat_id]['autogenerate_comments'] ) + { + // + // Autogenerate comment (duplicate the notification message) + // + $mx_pa_notification = new mx_pa_notification(); + $mx_pa_notification->init( $file_id ); + $mx_pa_notification->_compose_auto_note($pa_post_mode == 'add' ? MX_NEW_NOTIFICATION : MX_EDITED_NOTIFICATION); + + // + // Generate comment + // + $this->update_add_comment('', $file_id, 0, addslashes(trim($mx_pa_notification->subject)), addslashes(trim($mx_pa_notification->message))); + } + */ + $message = $lang['Fileedited'] . '<br /><br />' . sprintf( $lang['Click_return'], '<a href="' . append_sid( "admin_pa_file.$phpEx" ) . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Click_return_admin_index'], '<a href="' . append_sid( $mx_root_path . "admin/index.$phpEx?pane=right" ) . '">', '</a>' ); mx_message_die( GENERAL_MESSAGE, $message ); } ! } ! elseif ( $mode == 'delete' ) { if ( is_array( $file_ids ) && !empty( $file_ids ) ) *************** *** 232,235 **** --- 290,335 ---- foreach( $file_ids as $temp_file_id ) { + $sql = 'SELECT * + FROM ' . PA_FILES_TABLE . " + WHERE file_id = $temp_file_id"; + + if ( !( $result = $db->sql_query( $sql ) ) ) + { + mx_message_die( GENERAL_ERROR, 'Couldn\'t get file info', '', __LINE__, __FILE__, $sql ); + } + $file_info = $db->sql_fetchrow( $result ); + + // + // Notification + // + $pafiledb->update_add_file_notify($temp_file_id, 'delete'); + + // + // Comments + // + if ($pafiledb->comments[$file_info['file_catid']]['activated'] && $pafiledb_config['del_topic']) + { + if ( $pafiledb->comments[$file_info['file_catid']]['internal_comments'] ) + { + $sql = 'DELETE FROM ' . PA_COMMENTS_TABLE . " + WHERE file_id = '" . $file_id . "'"; + + if ( !( $db->sql_query( $sql ) ) ) + { + mx_message_die( GENERAL_ERROR, 'Couldnt delete comments', '', __LINE__, __FILE__, $sql ); + } + } + else + { + if ( $file_info['topic_id'] ) + { + include( $module_root_path . 'pafiledb/includes/functions_comment.' . $phpEx ); + $mx_pa_comments = new pafiledb_comments(); + $mx_pa_comments->init( $file_info, 'phpbb'); + $mx_pa_comments->post('delete_all', $file_info['topic_id']); + } + } + } + $pafiledb->delete_files( $temp_file_id ); } *************** *** 237,247 **** else { $pafiledb->delete_files( $file_id ); } $pafiledb->_pafiledb(); ! }elseif ( $mode == 'do_maintenace' ) { $pafiledb->file_mainenance(); ! }elseif ( $mode == 'do_approve' || $mode == 'do_unapprove' ) { if ( is_array( $file_ids ) && !empty( $file_ids ) ) --- 337,391 ---- else { + $sql = 'SELECT * + FROM ' . PA_FILES_TABLE . " + WHERE file_id = $file_id"; + if ( !( $result = $db->sql_query( $sql ) ) ) + { + mx_message_die( GENERAL_ERROR, 'Couldn\'t get file info', '', __LINE__, __FILE__, $sql ); + } + $file_info = $db->sql_fetchrow( $result ); + + // + // Notification + // + $pafiledb->update_add_file_notify($file_id, 'delete'); + + // + // Comments + // + if ($pafiledb->comments[$file_info['file_catid']]['activated'] && $pafiledb_config['del_topic']) + { + if ( $pafiledb->comments[$file_info['file_catid']]['internal_comments'] ) + { + $sql = 'DELETE FROM ' . PA_COMMENTS_TABLE . " + WHERE file_id = '" . $file_id . "'"; + + if ( !( $db->sql_query( $sql ) ) ) + { + mx_message_die( GENERAL_ERROR, 'Couldnt delete comments', '', __LINE__, __FILE__, $sql ); + } + } + else + { + if ( $file_info['topic_id'] ) + { + include( $module_root_path . 'pafiledb/includes/functions_comment.' . $phpEx ); + $mx_pa_comments = new pafiledb_comments(); + $mx_pa_comments->init( $file_info, 'phpbb'); + $mx_pa_comments->post('delete_all', $file_info['topic_id']); + } + } + } + $pafiledb->delete_files( $file_id ); } + $pafiledb->_pafiledb(); ! } ! elseif ( $mode == 'do_maintenace' ) { $pafiledb->file_mainenance(); ! } ! elseif ( $mode == 'do_approve' || $mode == 'do_unapprove' ) { if ( is_array( $file_ids ) && !empty( $file_ids ) ) *************** *** 251,272 **** $pafiledb->file_approve( $mode, $temp_file_id ); } } else { $pafiledb->file_approve( $mode, $file_id ); } $pafiledb->_pafiledb(); } ! $pafiledb_template->set_filenames( array( 'admin' => $template_file ) ! ); ! $pafiledb_template->assign_vars( array( 'L_FILE_TITLE' => $l_title, ! 'L_FILE_EXPLAIN' => $l_explain, ! 'L_ADD_FILE' => $lang['Afiletitle'], ! 'S_HIDDEN_FIELDS' => $s_hidden_fields, ! 'S_FILE_ACTION' => append_sid( "admin_pa_file.$phpEx" ) ) ! ); if ( in_array( $mode, array( '', 'approved', 'broken', 'do_approve', 'do_unapprove', 'delete', 'file_cat', 'all_file' ) ) ) --- 395,424 ---- $pafiledb->file_approve( $mode, $temp_file_id ); } + // + // Notification + // + $pafiledb->update_add_file_notify($file_ids, $mode); } else { $pafiledb->file_approve( $mode, $file_id ); + // + // Notification + // + $pafiledb->update_add_file_notify($file_id, $mode); } $pafiledb->_pafiledb(); } ! $pafiledb_template->set_filenames( array( 'admin' => $template_file ) ); ! $pafiledb_template->assign_vars( array( ! 'L_FILE_TITLE' => $l_title, ! 'L_FILE_EXPLAIN' => $l_explain, ! 'L_ADD_FILE' => $lang['Afiletitle'], ! 'S_HIDDEN_FIELDS' => $s_hidden_fields, ! 'S_FILE_ACTION' => append_sid( "admin_pa_file.$phpEx" ) ! )); if ( in_array( $mode, array( '', 'approved', 'broken', 'do_approve', 'do_unapprove', 'delete', 'file_cat', 'all_file' ) ) ) *************** *** 297,300 **** --- 449,453 ---- mx_message_die( GENERAL_ERROR, 'Couldn\'t get file info', '', __LINE__, __FILE__, $sql ); } + while ( $row = $db->sql_fetchrow( $result ) ) { *************** *** 374,378 **** if ( $mode == '' ) { ! $global_array = array( 0 => array( 'lang_var' => $lang['Approved_files'], 'row_set' => $approved_file_rowset, 'approval' => 'approve' ), --- 527,532 ---- if ( $mode == '' ) { ! $global_array = array( ! 0 => array( 'lang_var' => $lang['Approved_files'], 'row_set' => $approved_file_rowset, 'approval' => 'approve' ), *************** *** 382,401 **** 2 => array( 'lang_var' => $lang['All_files'], 'row_set' => $all_file_rowset, ! 'approval' => 'unapprove' ) ); ! }elseif ( $mode == 'all_file' || $mode == 'file_cat' ) { ! $global_array = array( 0 => array( 'lang_var' => $lang['All_files'], ! 'row_set' => $all_file_rowset, ! 'approval' => 'unapprove' ) ); ! }elseif ( $mode == 'approved' ) { ! $global_array = array( 0 => array( 'lang_var' => $lang['Approved_files'], ! 'row_set' => $approved_file_rowset, ! 'approval' => 'approve' ) ); ! }elseif ( $mode == 'broken' ) { ! $global_array = array( 0 => array( 'lang_var' => $lang['Broken_files'], ! 'row_set' => $broken_file_rowset, ! 'approval' => 'both' ) ); } } --- 536,562 ---- 2 => array( 'lang_var' => $lang['All_files'], 'row_set' => $all_file_rowset, ! 'approval' => 'unapprove' ) ! ); ! } ! elseif ( $mode == 'all_file' || $mode == 'file_cat' ) { ! $global_array = array( 0 => array( ! 'lang_var' => $lang['All_files'], ! 'row_set' => $all_file_rowset, ! 'approval' => 'unapprove' ) ); ! } ! elseif ( $mode == 'approved' ) { ! $global_array = array( 0 => array( ! 'lang_var' => $lang['Approved_files'], ! 'row_set' => $approved_file_rowset, ! 'approval' => 'approve' ) ); ! } ! elseif ( $mode == 'broken' ) { ! $global_array = array( 0 => array( ! 'lang_var' => $lang['Broken_files'], ! 'row_set' => $broken_file_rowset, ! 'approval' => 'both' ) ); } } *************** *** 424,445 **** $cat_list .= '</select>'; ! $pafiledb_template->assign_vars( array( 'L_EDIT' => $lang['Edit'], ! 'L_DELETE' => $lang['Delete'], ! 'L_CATEGORY' => $lang['Category'], ! 'L_MODE' => $lang['View'], ! 'L_GO' => $lang['Go'], ! 'L_DELETE_FILE' => $lang['Delete_selected'], ! 'L_APPROVE' => $lang['Approve'], ! 'L_UNAPPROVE' => $lang['Unapprove'], ! 'L_APPROVE_FILE' => $lang['Approve_selected'], ! 'L_UNAPPROVE_FILE' => $lang['Unapprove_selected'], ! 'L_NO_FILES' => $lang['No_file'], ! 'PAGINATION' => generate_pagination( append_sid( "admin_pa_file.$phpEx?mode=$mode&sort_method=$sort_method&sort_order=$sort_order&cat_id=$cat_id" ), $total_files, $pafiledb_config['pagination'], $start ), ! 'PAGE_NUMBER' => sprintf( $lang['Page_of'], ( floor( $start / $pafiledb_config['pagination'] ) + 1 ), ceil( $total_files / $pafiledb_config['pagination'] ) ), ! 'S_CAT_LIST' => $cat_list, ! 'S_MODE_SELECT' => $s_file_list ) ! ); if ( $total_files > 0 ) --- 585,607 ---- $cat_list .= '</select>'; ! $pafiledb_template->assign_vars( array( ! 'L_EDIT' => $lang['Edit'], ! 'L_DELETE' => $lang['Delete'], ! 'L_CATEGORY' => $lang['Category'], ! 'L_MODE' => $lang['View'], ! 'L_GO' => $lang['Go'], ! 'L_DELETE_FILE' => $lang['Delete_selected'], ! 'L_APPROVE' => $lang['Approve'], ! 'L_UNAPPROVE' => $lang['Unapprove'], ! 'L_APPROVE_FILE' => $lang['Approve_selected'], ! 'L_UNAPPROVE_FILE' => $lang['Unapprove_selected'], ! 'L_NO_FILES' => $lang['No_file'], ! 'PAGINATION' => generate_pagination( append_sid( "admin_pa_file.$phpEx?mode=$mode&sort_method=$sort_method&sort_order=$sort_order&cat_id=$cat_id" ), $total_files, $pafiledb_config['pagination'], $start ), ! 'PAGE_NUMBER' => sprintf( $lang['Page_of'], ( floor( $start / $pafiledb_config['pagination'] ) + 1 ), ceil( $total_files / $pafiledb_config['pagination'] ) ), ! 'S_CAT_LIST' => $cat_list, ! 'S_MODE_SELECT' => $s_file_list ) ! ); if ( $total_files > 0 ) *************** *** 455,471 **** { $approve = $unapprove = true; ! }elseif ( $files_data['approval'] == 'approve' ) { $approve = true; ! }elseif ( $files_data['approval'] == 'unapprove' ) { $unapprove = true; } ! $pafiledb_template->assign_block_vars( 'file_mode', array( 'L_FILE_MODE' => $files_data['lang_var'], ! 'DATA' => ( isset( $files_data['row_set'] ) ) ? true : false, ! 'APPROVE' => $approve, ! 'UNAPPROVE' => $unapprove ) ! ); if ( isset( $files_data['row_set'] ) ) --- 617,636 ---- { $approve = $unapprove = true; ! } ! elseif ( $files_data['approval'] == 'approve' ) { $approve = true; ! } ! elseif ( $files_data['approval'] == 'unapprove' ) { $unapprove = true; } ! $pafiledb_template->assign_block_vars( 'file_mode', array( ! 'L_FILE_MODE' => $files_data['lang_var'], ! 'DATA' => ( isset( $files_data['row_set'] ) ) ? true : false, ! 'APPROVE' => $approve, ! 'UNAPPROVE' => $unapprove ! )); if ( isset( $files_data['row_set'] ) ) *************** *** 475,490 **** { $approve_mode = ( $file_data['file_approved'] ) ? 'do_unapprove' : 'do_approve'; ! $pafiledb_template->assign_block_vars( 'file_mode.file_row', array( 'FILE_NAME' => $file_data['file_name'], ! 'FILE_NUMBER' => $i++, ! 'FILE_ID' => $file_data['file_id'], ! 'U_FILE_EDIT' => append_sid( "admin_pa_file.$phpEx?mode=edit&file_id={$file_data['file_id']}" ), ! 'U_FILE_DELETE' => append_sid( "admin_pa_file.$phpEx?mode=delete&file_id={$file_data['file_id']}" ), ! 'U_FILE_APPROVE' => append_sid( "admin_pa_file.$phpEx?mode=$approve_mode&file_id={$file_data['file_id']}" ), ! 'L_APPROVE' => ( $file_data['file_approved'] ) ? $lang['Unapprove'] : $lang['Approve'] ) ! ); } } } ! }elseif ( $mode == 'add' || $mode == 'edit' || $mirrors ) { if ( $mode == 'add' ) --- 640,657 ---- { $approve_mode = ( $file_data['file_approved'] ) ? 'do_unapprove' : 'do_approve'; ! $pafiledb_template->assign_block_vars( 'file_mode.file_row', array( ! 'FILE_NAME' => $file_data['file_name'], ! 'FILE_NUMBER' => $i++, ! 'FILE_ID' => $file_data['file_id'], ! 'U_FILE_EDIT' => append_sid( "admin_pa_file.$phpEx?mode=edit&file_id={$file_data['file_id']}" ), ! 'U_FILE_DELETE' => append_sid( "admin_pa_file.$phpEx?mode=delete&file_id={$file_data['file_id']}" ), ! 'U_FILE_APPROVE' => append_sid( "admin_pa_file.$phpEx?mode=$approve_mode&file_id={$file_data['file_id']}" ), ! 'L_APPROVE' => ( $file_data['file_approved'] ) ? $lang['Unapprove'] : $lang['Approve'] ! )); } } } ! } ! elseif ( $mode == 'add' || $mode == 'edit' || $mirrors ) { if ( $mode == 'add' ) *************** *** 544,623 **** } ! $pafiledb_template->assign_vars( array( 'U_MIRRORS_PAGE' => append_sid( "admin_pa_file.$phpEx?mode=mirrors&file_id=$file_id" ), ! 'ADD_MIRRORS' => $mirrors, ! 'MODE_EDIT' => ( $mode == 'edit' ) ? true : false, ! 'MODE' => $mode, ! 'FILESIZE' => intval( $pafiledb_config['max_file_size'] ), ! 'FILE_NAME' => $file_name, ! 'FILE_DESC' => $file_desc, ! 'FILE_LONG_DESC' => $file_long_desc, ! 'FILE_AUTHOR' => $file_author, ! 'FILE_VERSION' => $file_version, ! 'FILE_SSURL' => $file_ssurl, ! 'FILE_WEBSITE' => $file_website, ! 'FILE_DLURL' => $file_url, ! 'FILE_DOWNLOAD' => $file_download, ! 'CUSTOM_EXIST' => $custom_exist, ! 'APPROVED_CHECKED_YES' => $approved_checked_yes, ! 'APPROVED_CHECKED_NO' => $approved_checked_no, ! 'SS_CHECKED_YES' => $ss_checked_yes, ! 'SS_CHECKED_NO' => $ss_checked_no, ! 'PIN_CHECKED_YES' => $pin_checked_yes, ! 'PIN_CHECKED_NO' => $pin_checked_no, ! 'MIRROR_FILE' => $file_unique_name, ! // 'U_UPLOADED_MIRROR' => get_formated_url() . '/' . $file_dir . $file_unique_name, ! 'U_UPLOADED_MIRROR' => PORTAL_URL . 'modules/mx_pafiledb/' . $file_dir . $file_unique_name, ! 'L_FILE_APPROVED' => $lang['Approved'], ! 'L_FILE_APPROVED_INFO' => $lang['Approved_info'], ! 'L_ADDTIONAL_FIELD' => $lang['Addtional_field'], ! 'L_SCREENSHOT' => $lang['Scrsht'], ! 'L_FILES' => $lang['Files'], ! 'L_FILE_NAME' => $lang['Filename'], ! 'L_FILE_NAME_INFO' => $lang['Filenameinfo'], ! 'L_FILE_SHORT_DESC' => $lang['Filesd'], ! 'L_FILE_SHORT_DESC_INFO' => $lang['Filesdinfo'], ! 'L_FILE_LONG_DESC' => $lang['Fileld'], ! 'L_FILE_LONG_DESC_INFO' => $lang['Fileldinfo'], ! 'L_FILE_AUTHOR' => $lang['Filecreator'], ! 'L_FILE_AUTHOR_INFO' => $lang['Filecreatorinfo'], ! 'L_FILE_VERSION' => $lang['Fileversion'], ! 'L_FILE_VERSION_INFO' => $lang['Fileversioninfo'], ! 'L_FILESS' => $lang['Filess'], ! 'L_FILESSINFO' => $lang['Filessinfo'], ! 'L_FILESS_UPLOAD' => $lang['Filess_upload'], ! 'L_FILESSINFO_UPLOAD' => $lang['Filessinfo_upload'], ! 'L_FILE_SSLINK' => $lang['Filess_link'], ! 'L_FILE_SSLINK_INFO' => $lang['Filess_link_info'], ! 'L_FILESSUPLOAD' => $lang['Filessupload'], ! 'L_FILE_WEBSITE' => $lang['Filedocs'], ! 'L_FILE_WEBSITE_INFO' => $lang['Filedocsinfo'], ! 'L_FILE_URL' => $lang['Fileurl'], ! 'L_FILE_UPLOAD' => $lang['File_upload'], ! 'L_FILEINFO_UPLOAD' => $lang['Fileinfo_upload'], ! 'L_FILE_URL_INFO' => $lang['Fileurlinfo'], ! 'L_FILE_POSTICONS' => $lang['Filepi'], ! 'L_FILE_POSTICONS_INFO' => $lang['Filepiinfo'], ! 'L_FILE_CAT' => $lang['Filecat'], ! 'L_FILE_CAT_INFO' => $lang['Filecatinfo'], ! 'L_FILE_LICENSE' => $lang['Filelicense'], ! 'L_NONE' => $lang['None'], ! 'L_FILE_LICENSE_INFO' => $lang['Filelicenseinfo'], ! 'L_FILE_PINNED' => $lang['Filepin'], ! 'L_FILE_PINNED_INFO' => $lang['Filepininfo'], ! 'L_FILE_DOWNLOAD' => $lang['Filedls'], ! 'L_MIRRORS' => $lang['Mirrors'], ! 'L_MIRRORS_INFO' => $lang['Mirrors_explain'], ! 'L_CLICK_HERE_MIRRORS' => $lang['Click_here_mirrors'], ! 'L_UPLOADED_FILE' => $lang['Uploaded_file'], ! 'L_NO' => $lang['No'], ! 'L_YES' => $lang['Yes'], ! 'S_POSTICONS' => $file_posticons, ! 'S_LICENSE_LIST' => $file_license, ! 'S_CAT_LIST' => $file_cat_list ) ! ); ! }elseif ( $mode == 'mirrors' ) { if ( isset( $_POST['delete_mirrors'] ) ) --- 711,792 ---- } ! $pafiledb_template->assign_vars( array( ! 'U_MIRRORS_PAGE' => append_sid( "admin_pa_file.$phpEx?mode=mirrors&file_id=$file_id" ), ! 'ADD_MIRRORS' => $mirrors, ! 'MODE_EDIT' => ( $mode == 'edit' ) ? true : false, ! 'MODE' => $mode, ! 'FILESIZE' => intval( $pafiledb_config['max_file_size'] ), ! 'FILE_NAME' => $file_name, ! 'FILE_DESC' => $file_desc, ! 'FILE_LONG_DESC' => $file_long_desc, ! 'FILE_AUTHOR' => $file_author, ! 'FILE_VERSION' => $file_version, ! 'FILE_SSURL' => $file_ssurl, ! 'FILE_WEBSITE' => $file_website, ! 'FILE_DLURL' => $file_url, ! 'FILE_DOWNLOAD' => $file_download, ! 'CUSTOM_EXIST' => $custom_exist, ! 'APPROVED_CHECKED_YES' => $approved_checked_yes, ! 'APPROVED_CHECKED_NO' => $approved_checked_no, ! 'SS_CHECKED_YES' => $ss_checked_yes, ! 'SS_CHECKED_NO' => $ss_checked_no, ! 'PIN_CHECKED_YES' => $pin_checked_yes, ! 'PIN_CHECKED_NO' => $pin_checked_no, ! 'MIRROR_FILE' => $file_unique_name, ! // 'U_UPLOADED_MIRROR' => get_formated_url() . '/' . $file_dir . $file_unique_name, ! 'U_UPLOADED_MIRROR' => PORTAL_URL . 'modules/mx_pafiledb/' . $file_dir . $file_unique_name, ! 'L_FILE_APPROVED' => $lang['Approved'], ! 'L_FILE_APPROVED_INFO' => $lang['Approved_info'], ! 'L_ADDTIONAL_FIELD' => $lang['Addtional_field'], ! 'L_SCREENSHOT' => $lang['Scrsht'], ! 'L_FILES' => $lang['Files'], ! 'L_FILE_NAME' => $lang['Filename'], ! 'L_FILE_NAME_INFO' => $lang['Filenameinfo'], ! 'L_FILE_SHORT_DESC' => $lang['Filesd'], ! 'L_FILE_SHORT_DESC_INFO' => $lang['Filesdinfo'], ! 'L_FILE_LONG_DESC' => $lang['Fileld'], ! 'L_FILE_LONG_DESC_INFO' => $lang['Fileldinfo'], ! 'L_FILE_AUTHOR' => $lang['Filecreator'], ! 'L_FILE_AUTHOR_INFO' => $lang['Filecreatorinfo'], ! 'L_FILE_VERSION' => $lang['Fileversion'], ! 'L_FILE_VERSION_INFO' => $lang['Fileversioninfo'], ! 'L_FILESS' => $lang['Filess'], ! 'L_FILESSINFO' => $lang['Filessinfo'], ! 'L_FILESS_UPLOAD' => $lang['Filess_upload'], ! 'L_FILESSINFO_UPLOAD' => $lang['Filessinfo_upload'], ! 'L_FILE_SSLINK' => $lang['Filess_link'], ! 'L_FILE_SSLINK_INFO' => $lang['Filess_link_info'], ! 'L_FILESSUPLOAD' => $lang['Filessupload'], ! 'L_FILE_WEBSITE' => $lang['Filedocs'], ! 'L_FILE_WEBSITE_INFO' => $lang['Filedocsinfo'], ! 'L_FILE_URL' => $lang['Fileurl'], ! 'L_FILE_UPLOAD' => $lang['File_upload'], ! 'L_FILEINFO_UPLOAD' => $lang['Fileinfo_upload'], ! 'L_FILE_URL_INFO' => $lang['Fileurlinfo'], ! 'L_FILE_POSTICONS' => $lang['Filepi'], ! 'L_FILE_POSTICONS_INFO' => $lang['Filepiinfo'], ! 'L_FILE_CAT' => $lang['Filecat'], ! 'L_FILE_CAT_INFO' => $lang['Filecatinfo'], ! 'L_FILE_LICENSE' => $lang['Filelicense'], ! 'L_NONE' => $lang['None'], ! 'L_FILE_LICENSE_INFO' => $lang['Filelicenseinfo'], ! 'L_FILE_PINNED' => $lang['Filepin'], ! 'L_FILE_PINNED_INFO' => $lang['Filepininfo'], ! 'L_FILE_DOWNLOAD' => $lang['Filedls'], ! 'L_MIRRORS' => $lang['Mirrors'], ! 'L_MIRRORS_INFO' => $lang['Mirrors_explain'], ! 'L_CLICK_HERE_MIRRORS' => $lang['Click_here_mirrors'], ! 'L_UPLOADED_FILE' => $lang['Uploaded_file'], ! 'L_NO' => $lang['No'], ! 'L_YES' => $lang['Yes'], ! 'S_POSTICONS' => $file_posticons, ! 'S_LICENSE_LIST' => $file_license, ! 'S_CAT_LIST' => $file_cat_list ) ! ); ! } ! elseif ( $mode == 'mirrors' ) { if ( isset( $_POST['delete_mirrors'] ) ) *************** *** 706,740 **** } ! $pafiledb_template->assign_vars( array( 'ROW_NOT_EMPTY' => ( empty( $mirrors_data ) ) ? false : true, ! 'FILESIZE' => intval( $pafiledb_config['max_file_size'] ), ! 'L_MIRROR_LOCATION' => $lang['Mirror_location'], ! 'L_FILE_UPLOAD' => $lang['File_upload'], ! 'L_FILE_DELETE' => $lang['Delete'], ! 'L_DELETE' => $lang['Delete_selected'], ! 'L_FILEINFO_UPLOAD' => $lang['Fileinfo_upload'], ! 'L_UPLOADED_FILE' => $lang['Uploaded_file'], ! 'L_FILE_URL' => $lang['Fileurl'], ! 'L_FILE_URL_INFO' => $lang['Fileurl'], ! 'L_MODIFY' => $lang['Efiletitle'], ! 'L_ADD_NEW' => $lang['Afiletitle'], ! 'L_ADD_NEW_MIRROR' => $lang['Add_new_mirror'] ) ! ); foreach( $mirrors_data as $mirror_id => $mirror_data ) { ! $pafiledb_template->assign_block_vars( 'row', array( 'LOCATION' => $mirror_data['mirror_location'], ! 'MIRROR_ID' => $mirror_id, ! 'MIRROR_URL' => $mirror_data['file_dlurl'], ! 'MIRROR_FILE' => $mirror_data['unique_name'], ! 'U_UPLOADED_MIRROR' => get_formated_url() . '/' . $mirror_data['file_dir'] . $mirror_data['unique_name'] ) ! ); } } ! $pafiledb_template->assign_vars( array( 'ERROR' => ( sizeof( $pafiledb->error ) ) ? implode( '<br />', $pafiledb->error ) : '' ) ! ); // Output include( $mx_root_path . 'admin/page_header_admin.' . $phpEx ); $pafiledb_template->display( 'admin' ); --- 875,912 ---- } ! $pafiledb_template->assign_vars( array( ! 'ROW_NOT_EMPTY' => ( empty( $mirrors_data ) ) ? false : true, ! 'FILESIZE' => intval( $pafiledb_config['max_file_size'] ), ! 'L_MIRROR_LOCATION' => $lang['Mirror_location'], ! 'L_FILE_UPLOAD' => $lang['File_upload'], ! 'L_FILE_DELETE' => $lang['Delete'], ! 'L_DELETE' => $lang['Delete_selected'], ! 'L_FILEINFO_UPLOAD' => $lang['Fileinfo_upload'], ! 'L_UPLOADED_FILE' => $lang['Uploaded_file'], ! 'L_FILE_URL' => $lang['Fileurl'], ! 'L_FILE_URL_INFO' => $lang['Fileurl'], ! 'L_MODIFY' => $lang['Efiletitle'], ! 'L_ADD_NEW' => $lang['Afiletitle'], ! 'L_ADD_NEW_MIRROR' => $lang['Add_new_mirror'] ! )); foreach( $mirrors_data as $mirror_id => $mirror_data ) { ! $pafiledb_template->assign_block_vars( 'row', array( ! 'LOCATION' => $mirror_data['mirror_location'], ! 'MIRROR_ID' => $mirror_id, ! 'MIRROR_URL' => $mirror_data['file_dlurl'], ! 'MIRROR_FILE' => $mirror_data['unique_name'], ! 'U_UPLOADED_MIRROR' => get_formated_url() . '/' . $mirror_data['file_dir'] . $mirror_data['unique_name'] ! )); } } ! $pafiledb_template->assign_vars( array( 'ERROR' => ( sizeof( $pafiledb->error ) ) ? implode( '<br />', $pafiledb->error ) : '' ) ); + // // Output + // include( $mx_root_path . 'admin/page_header_admin.' . $phpEx ); $pafiledb_template->display( 'admin' ); *************** *** 742,745 **** $pafiledb_cache->unload(); include( $mx_root_path . 'admin/page_footer_admin.' . $phpEx ); - ?> \ No newline at end of file --- 914,916 ---- Index: admin_pa_settings.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/admin/admin_pa_settings.php,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** admin_pa_settings.php 2 May 2006 23:28:15 -0000 1.17 --- admin_pa_settings.php 17 Jun 2006 20:13:21 -0000 1.18 *************** *** 25,29 **** include_once( $module_root_path . 'pafiledb/includes/pafiledb_constants.' . $phpEx ); $file = basename( __FILE__ ); ! $module['pafileDB_Download']['0_Configuration_title'] = $file; return; } --- 25,29 ---- include_once( $module_root_path . 'pafiledb/includes/pafiledb_constants.' . $phpEx ); $file = basename( __FILE__ ); ! $module['pafileDB_Download']['0_Configuration'] = $file; return; } *************** *** 52,56 **** $file = basename( __FILE__ ); ! $module['pafileDB_Download']['0_Configuration_title'] = 'modules/mx_pafiledb/admin/' . $file; return; } --- 52,56 ---- $file = basename( __FILE__ ); ! $module['pafileDB_Download']['0_Configuration'] = 'modules/mx_pafiledb/admin/' . $file; return; } *************** *** 70,73 **** --- 70,85 ---- } + // ********************************************************************** + // Read language definition + // ********************************************************************** + if ( !file_exists( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ) ) + { + include( $module_root_path . 'language/lang_english/lang_admin.' . $phpEx ); + } + else + { + include( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ); + } + $submit = ( isset( $_POST['submit'] ) ) ? true : false; $size = ( isset( $_POST['max_size'] ) ) ? $_POST['max_size'] : ''; *************** *** 243,246 **** --- 255,260 ---- $internal_comments_phpbb = ( !$new['internal_comments'] ) ? "checked=\"checked\"" : ""; + $comments_forum_id = $new['comments_forum_id']; + $del_topic_yes = ( $new['del_topic'] ) ? "checked=\"checked\"" : ""; $del_topic_no = ( !$new['del_topic'] ) ? "checked=\"checked\"" : ""; *************** *** 316,319 **** --- 330,334 ---- 'L_YES' => $lang['Yes'], 'L_NO' => $lang['No'], + 'L_NONE' => $lang['Acc_None'], // *************** *** 377,382 **** 'L_APPEARANCE_TITLE' => $lang['Appearance_title'], ! 'L_PAGINATION' => $lang['Article_pag'], ! 'L_PAGINATION_EXPLAIN' => $lang['Article_pag_explain'], 'PAGINATION' => $pagination, --- 392,397 ---- 'L_APPEARANCE_TITLE' => $lang['Appearance_title'], ! 'L_PAGINATION' => $lang['File_pagination'], ! 'L_PAGINATION_EXPLAIN' => $lang['File_pagination_explain'], 'PAGINATION' => $pagination, *************** *** 420,423 **** --- 435,442 ---- 'L_INTERNAL_COMMENTS_PHPBB' => $lang['Internal_comments_phpBB'], + 'L_FORUM_ID' => $lang['Forum_id'], + 'L_FORUM_ID_EXPLAIN' => $lang['Forum_id_explain'], + 'FORUM_LIST' => get_forums( $comments_forum_id, false, 'comments_forum_id' ), + 'L_AUTOGENERATE_COMMENTS' => $lang['Autogenerate_comments'], 'L_AUTOGENERATE_COMMENTS_EXPLAIN' => $lang['Autogenerate_comments_explain'], *************** *** 572,576 **** 'L_ATUH_VIEWALL_INFO' => $lang['Auth_viewall_explain'], 'S_ATUH_VIEWALL' => $auth_select['auth_viewall'], - )); --- 591,594 ---- *************** *** 581,584 **** $template->pparse( 'admin' ); include( $mx_root_path . 'admin/page_footer_admin.' . $phpEx ); - ?> \ No newline at end of file --- 599,601 ---- Index: admin_pa_catauth.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/admin/admin_pa_catauth.php,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** admin_pa_catauth.php 2 May 2006 23:28:15 -0000 1.15 --- admin_pa_catauth.php 17 Jun 2006 20:13:21 -0000 1.16 *************** *** 25,29 **** include_once( $module_root_path . 'pafiledb/includes/pafiledb_constants.' . $phpEx ); $file = basename( __FILE__ ); ! $module['pafileDB_Download']['3_Permissions_title'] = $file; return; } --- 25,29 ---- include_once( $module_root_path . 'pafiledb/includes/pafiledb_constants.' . $phpEx ); $file = basename( __FILE__ ); ! $module['pafileDB_Download']['3_Permissions'] = $file; return; } *************** *** 52,56 **** $file = basename( __FILE__ ); ! $module['pafileDB_Download']['3_Permissions_title'] = 'modules/mx_pafiledb/admin/' . $file; return; } --- 52,56 ---- $file = basename( __FILE__ ); ! $module['pafileDB_Download']['3_Permissions'] = 'modules/mx_pafiledb/admin/' . $file; return; } *************** *** 69,72 **** --- 69,87 ---- } + // ********************************************************************** + // Read language definition + // ********************************************************************** + if ( !file_exists( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ) ) + { + include( $module_root_path . 'language/lang_english/lang_admin.' . $phpEx ); + } + else + { + include( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ); + } + + // + // Init + // $pafiledb->init(); *************** *** 104,109 **** } // Start program proper ! if ( isset( $_POST['submit'] ) ) { --- 119,125 ---- } + // // Start program proper ! // if ( isset( $_POST['submit'] ) ) { *************** *** 140,144 **** $message = $lang['Category_auth_updated'] . '<br /><br />' . sprintf( $lang['Click_return_catauth'], '<a href="' . append_sid( "admin_pa_catauth.$phpEx" ) . '">', "</a>" ); mx_message_die( GENERAL_MESSAGE, $message ); ! } // End of submit // Output the authorisation details if an id was // specified --- 156,162 ---- $message = $lang['Category_auth_updated'] . '<br /><br />' . sprintf( $lang['Click_return_catauth'], '<a href="' . append_sid( "admin_pa_catauth.$phpEx" ) . '">', "</a>" ); mx_message_die( GENERAL_MESSAGE, $message ); ! } ! ! // End of submit // Output the authorisation details if an id was // specified *************** *** 146,160 **** $pafiledb_template->set_filenames( array( 'body' => 'admin/pa_auth_cat_body.tpl' ) ); ! $permissions_menu = array( append_sid( "admin_pa_catauth.$phpEx" ) => $lang['Cat_Permissions'], append_sid( "admin_pa_ug_auth.$phpEx?mode=user" ) => $lang['User_Permissions'], append_sid( "admin_pa_ug_auth.$phpEx?mode=group" ) => $lang['Group_Permissions'], append_sid( "admin_pa_ug_auth.$phpEx?mode=global_user" ) => $lang['User_Global_Permissions'], ! append_sid( "admin_pa_ug_auth.$phpEx?mode=global_group" ) => $lang['Group_Global_Permissions'] ); foreach( $permissions_menu as $url => $l_name ) { ! $pafiledb_template->assign_block_vars( 'pertype', array( 'U_NAME' => $url, ! 'L_NAME' => $l_name ) ! ); } --- 164,181 ---- $pafiledb_template->set_filenames( array( 'body' => 'admin/pa_auth_cat_body.tpl' ) ); ! $permissions_menu = array( ! append_sid( "admin_pa_catauth.$phpEx" ) => $lang['Cat_Permissions'], append_sid( "admin_pa_ug_auth.$phpEx?mode=user" ) => $lang['User_Permissions'], append_sid( "admin_pa_ug_auth.$phpEx?mode=group" ) => $lang['Group_Permissions'], append_sid( "admin_pa_ug_auth.$phpEx?mode=global_user" ) => $lang['User_Global_Permissions'], ! append_sid( "admin_pa_ug_auth.$phpEx?mode=global_group" ) => $lang['Group_Global_Permissions'] ! ); foreach( $permissions_menu as $url => $l_name ) { ! $pafiledb_template->assign_block_vars( 'pertype', array( ! 'U_NAME' => $url, ! 'L_NAME' => $l_name ! )); } *************** *** 166,172 **** $cell_title = $field_names[$cat_auth_fields[$j]]; ! $pafiledb_template->assign_block_vars( 'cat_auth_titles', array( 'CELL_TITLE' => $cell_title ) ! ); } if ( empty( $cat_id ) ) { --- 187,193 ---- $cell_title = $field_names[$cat_auth_fields[$j]]; ! $pafiledb_template->assign_block_vars( 'cat_auth_titles', array( 'CELL_TITLE' => $cell_title ) ); } + if ( empty( $cat_id ) ) { *************** *** 176,183 **** elseif ( !empty( $cat_id ) ) { ! $pafiledb_template->assign_block_vars( 'cat_row', array( 'CATEGORY_NAME' => $pafiledb->cat_rowset[$cat_id]['cat_name'], ! 'IS_HIGHER_CAT' => ( $pafiledb->cat_rowset[$cat_id] ) ? false : true, ! 'U_CAT' => append_sid( "admin_pa_catauth.$phpEx?cat_parent={$pafiledb->cat_rowset[$cat_id]['cat_parent']}" ) ) ! ); for( $j = 0; $j < count( $cat_auth_fields ); $j++ ) --- 197,205 ---- elseif ( !empty( $cat_id ) ) { ! $pafiledb_template->assign_block_vars( 'cat_row', array( ! 'CATEGORY_NAME' => $pafiledb->cat_rowset[$cat_id]['cat_name'], ! 'IS_HIGHER_CAT' => ( $pafiledb->cat_rowset[$cat_id] ) ? false : true, ! 'U_CAT' => append_sid( "admin_pa_catauth.$phpEx?cat_parent={$pafiledb->cat_rowset[$cat_id]['cat_parent']}" ) ! )); for( $j = 0; $j < count( $cat_auth_fields ); $j++ ) *************** *** 192,197 **** $custom_auth[$j] .= '</select> '; ! $pafiledb_template->assign_block_vars( 'cat_row.cat_auth_data', array( 'S_AUTH_LEVELS_SELECT' => $custom_auth[$j] ) ! ); } --- 214,218 ---- $custom_auth[$j] .= '</select> '; ! $pafiledb_template->assign_block_vars( 'cat_row.cat_auth_data', array( 'S_AUTH_LEVELS_SELECT' => $custom_auth[$j] ) ); } *************** *** 199,216 **** $cat_name = $pafiledb->cat_rowset[$cat_id]['cat_name']; } $s_column_span = count( $cat_auth_fields ) + 2; ! $pafiledb_template->assign_vars( array( 'CATEGORY_NAME' => $cat_name, ! 'L_CATEGORY' => $lang['Category'], ! 'L_AUTH_TITLE' => $lang['Auth_Control_Category'], ! 'L_AUTH_EXPLAIN' => $lang['Category_auth_explain'], ! 'L_SUBMIT' => $lang['Submit'], ! 'L_RESET' => $lang['Reset'], ! 'S_CATAUTH_ACTION' => append_sid( "admin_pa_catauth.$phpEx" ), ! 'S_COLUMN_SPAN' => $s_column_span, ! 'S_HIDDEN_FIELDS' => $s_hidden_fields ) ! ); // Output --- 220,239 ---- $cat_name = $pafiledb->cat_rowset[$cat_id]['cat_name']; } + $s_column_span = count( $cat_auth_fields ) + 2; ! $pafiledb_template->assign_vars( array( ! 'CATEGORY_NAME' => $cat_name, ! 'L_CATEGORY' => $lang['Category'], ! 'L_AUTH_TITLE' => $lang['Auth_Control_Category'], ! 'L_AUTH_EXPLAIN' => $lang['Category_auth_explain'], ! 'L_SUBMIT' => $lang['Submit'], ! 'L_RESET' => $lang['Reset'], ! 'S_CATAUTH_ACTION' => append_sid( "admin_pa_catauth.$phpEx" ), ! 'S_COLUMN_SPAN' => $s_column_span, ! 'S_HIDDEN_FIELDS' => $s_hidden_fields ! )); // Output *************** *** 220,223 **** $pafiledb_cache->unload(); include( $mx_root_path . 'admin/page_footer_admin.' . $phpEx ); - ?> \ No newline at end of file --- 243,245 ---- Index: admin_pa_license.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/admin/admin_pa_license.php,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** admin_pa_license.php 2 May 2006 23:28:15 -0000 1.15 --- admin_pa_license.php 17 Jun 2006 20:13:21 -0000 1.16 *************** *** 25,29 **** include_once( $module_root_path . 'pafiledb/includes/pafiledb_constants.' . $phpEx ); $file = basename( __FILE__ ); ! $module['pafileDB_Download']['4_License_title'] = $file; return; } --- 25,29 ---- include_once( $module_root_path . 'pafiledb/includes/pafiledb_constants.' . $phpEx ); $file = basename( __FILE__ ); ! $module['pafileDB_Download']['4_License'] = $file; return; } *************** *** 51,55 **** $file = basename( __FILE__ ); ! $module['pafileDB_Download']['4_License_title'] = 'modules/mx_pafiledb/admin/' . $file; return; } --- 51,55 ---- $file = basename( __FILE__ ); ! $module['pafileDB_Download']['4_License'] = 'modules/mx_pafiledb/admin/' . $file; return; } *************** *** 67,70 **** --- 67,82 ---- } + // ********************************************************************** + // Read language definition + // ********************************************************************** + if ( !file_exists( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ) ) + { + include( $module_root_path . 'language/lang_english/lang_admin.' . $phpEx ); + } + else + { + include( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ); + } + if ( isset( $HTTP_GET_VARS['license'] ) || isset( $HTTP_POST_VARS['license'] ) ) { *************** *** 75,85 **** case 'add': { ! $template->set_filenames( array( ! /* - orig ! 'admin' => 'admin/pa_admin_license_add.tpl') ! */ ! // MX ! 'admin' => 'admin/pa_admin_license_add.tpl' ) ! ); if ( isset( $HTTP_GET_VARS['add'] ) || isset( $HTTP_POST_VARS['add'] ) ) --- 87,91 ---- case 'add': { ! $template->set_filenames( array( 'admin' => 'admin/pa_admin_license_add.tpl' ) ); if ( isset( $HTTP_GET_VARS['add'] ) || isset( $HTTP_POST_VARS['add'] ) ) *************** *** 103,107 **** $message = $lang['Licenseadded'] . '<br /><br />' . sprintf( $lang['Click_return'], '<a href="' . append_sid( "admin_pa_license.$phpEx" ) . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Click_return_admin_index'], '<a href="' . append_sid( $mx_root_path . "admin/index.$phpEx?pane=right" ) . '">', '</a>' ); - mx_message_die( GENERAL_MESSAGE, $message ); } --- 109,112 ---- *************** *** 109,118 **** if ( empty( $add ) ) { ! $template->assign_vars( array( 'S_ADD_LIC_ACTION' => append_sid( "admin_pa_license.$phpEx" ), ! 'L_ALICENSETITLE' => $lang['Alicensetitle'], ! 'L_LICENSEEXPLAIN' => $lang['Licenseexplain'], ! 'L_LNAME' => $lang['Lname'], ! 'L_LTEXT' => $lang['Ltext'] ) ! ); } --- 114,124 ---- if ( empty( $add ) ) { ! $template->assign_vars( array( ! 'S_ADD_LIC_ACTION' => append_sid( "admin_pa_license.$phpEx" ), ! 'L_ALICENSETITLE' => $lang['Alicensetitle'], ! 'L_LICENSEEXPLAIN' => $lang['Licenseexplain'], ! 'L_LNAME' => $lang['Lname'], ! 'L_LTEXT' => $lang['Ltext'] ! )); } *************** *** 122,132 **** case 'edit': { ! $template->set_filenames( array( ! /* - orig ! 'admin' => 'admin/pa_admin_license_edit.tpl') ! */ ! // MX ! 'admin' => 'admin/pa_admin_license_edit.tpl' ) ! ); if ( isset( $HTTP_GET_VARS['edit'] ) || isset( $HTTP_POST_VARS['edit'] ) ) --- 128,132 ---- case 'edit': { ! $template->set_filenames( array( 'admin' => 'admin/pa_admin_license_edit.tpl' ) ); if ( isset( $HTTP_GET_VARS['edit'] ) || isset( $HTTP_POST_VARS['edit'] ) ) *************** *** 155,159 **** $message = $lang['Licenseedited'] . '<br /><br />' . sprintf( $lang['Click_return'], '<a href="' . append_sid( "admin_pa_license.$phpEx" ) . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Click_return_admin_index'], '<a href="' . append_sid( $mx_root_path . "admin/index.$phpEx?pane=right" ) . '">', '</a>' ); - mx_message_die( GENERAL_MESSAGE, $message ); } --- 155,158 ---- *************** *** 174,191 **** $license = $db->sql_fetchrow( $result ); - $text = str_replace( "<br>", "\n", $license['license_text'] ); $template->assign_block_vars( "license_form", array() ); ! $template->assign_vars( array( 'S_EDIT_LIC_ACTION' => append_sid( "admin_pa_license.$phpEx" ), ! 'L_ELICENSETITLE' => $lang['Elicensetitle'], ! 'L_LICENSEEXPLAIN' => $lang['Licenseexplain'], ! 'L_LNAME' => $lang['Lname'], ! 'LICENSE_NAME' => $license['license_name'], ! 'TEXT' => $text, ! 'SELECT' => $select, ! 'L_LTEXT' => $lang['Ltext'] ) ! ); } --- 173,190 ---- $license = $db->sql_fetchrow( $result ); $text = str_replace( "<br>", "\n", $license['license_text'] ); $template->assign_block_vars( "license_form", array() ); ! $template->assign_vars( array( ! 'S_EDIT_LIC_ACTION' => append_sid( "admin_pa_license.$phpEx" ), ! 'L_ELICENSETITLE' => $lang['Elicensetitle'], ! 'L_LICENSEEXPLAIN' => $lang['Licenseexplain'], ! 'L_LNAME' => $lang['Lname'], ! 'LICENSE_NAME' => $license['license_name'], ! 'TEXT' => $text, ! 'SELECT' => $select, ! 'L_LTEXT' => $lang['Ltext'] ! )); } *************** *** 206,214 **** $template->assign_block_vars( "license", array() ); ! $template->assign_vars( array( 'S_EDIT_LIC_ACTION' => append_sid( "admin_pa_license.$phpEx" ), ! 'L_ELICENSETITLE' => $lang['Elicensetitle'], ! 'L_LICENSEEXPLAIN' => $lang['Licenseexplain'], ! 'ROW' => $row ) ! ); } --- 205,214 ---- $template->assign_block_vars( "license", array() ); ! $template->assign_vars( array( ! 'S_EDIT_LIC_ACTION' => append_sid( "admin_pa_license.$phpEx" ), ! 'L_ELICENSETITLE' => $lang['Elicensetitle'], ! 'L_LICENSEEXPLAIN' => $lang['Licenseexplain'], ! 'ROW' => $row ! )); } *************** *** 218,228 **** case 'delete': { ! $template->set_filenames( array( ! /* - orig ! 'admin' => 'admin/pa_admin_license_delete.tpl') ! */ ! // MX ! 'admin' => 'admin/pa_admin_license_delete.tpl' ) ! ); if ( isset( $HTTP_GET_VARS['delete'] ) || isset( $HTTP_POST_VARS['delete'] ) ) --- 218,222 ---- case 'delete': { ! $template->set_filenames( array( 'admin' => 'admin/pa_admin_license_delete.tpl' ) ); if ( isset( $HTTP_GET_VARS['delete'] ) || isset( $HTTP_POST_VARS['delete'] ) ) *************** *** 283,291 **** } ! $template->assign_vars( array( 'S_DELETE_LIC_ACTION' => append_sid( "admin_pa_license.$phpEx" ), ! 'L_DLICENSETITLE' => $lang['Dlicensetitle'], ! 'L_LICENSEEXPLAIN' => $lang['Licenseexplain'], ! 'ROW' => $row ) ! ); } --- 277,286 ---- } ! $template->assign_vars( array( ! 'S_DELETE_LIC_ACTION' => append_sid( "admin_pa_license.$phpEx" ), ! 'L_DLICENSETITLE' => $lang['Dlicensetitle'], ! 'L_LICENSEEXPLAIN' => $lang['Licenseexplain'], ! 'ROW' => $row ! )); } *************** *** 297,307 **** { // main ! $template->set_filenames( array( ! /* - orig ! 'admin' => 'admin/pa_admin_license_delete.tpl') ! */ ! // MX ! 'admin' => 'admin/pa_admin_license.tpl' ) ! ); $sql = "SELECT * FROM " . PA_LICENSE_TABLE; --- 292,296 ---- { // main ! $template->set_filenames( array( 'admin' => 'admin/pa_admin_license.tpl' ) ); $sql = "SELECT * FROM " . PA_LICENSE_TABLE; *************** *** 317,328 **** } ! $template->assign_vars( array( 'S_DELETE_LIC_ACTION' => append_sid( "admin_pa_license.$phpEx" ), ! 'L_LICENSETITLE' => $lang['License_title'], ! 'L_ALICENSETITLE' => $lang['Alicensetitle'], ! 'L_ELICENSETITLE' => $lang['Elicensetitle'], ! 'L_DLICENSETITLE' => $lang['Dlicensetitle'], ! 'L_LICENSEEXPLAIN' => $lang['Licenseexplain'], ! 'ROW' => $row ) ! ); } --- 306,318 ---- } ! $template->assign_vars( array( ! 'S_DELETE_LIC_ACTION' => append_sid( "admin_pa_license.$phpEx" ), ! 'L_LICENSETITLE' => $lang['License_title'], ! 'L_ALICENSETITLE' => $lang['Alicensetitle'], ! 'L_ELICENSETITLE' => $lang['Elicensetitle'], ! 'L_DLICENSETITLE' => $lang['Dlicensetitle'], ! 'L_LICENSEEXPLAIN' => $lang['Licenseexplain'], ! 'ROW' => $row ! )); } *************** *** 331,334 **** $template->pparse( 'admin' ); include( $mx_root_path . 'admin/page_footer_admin.' . $phpEx ); - ?> \ No newline at end of file --- 321,323 ---- Index: admin_pa_fchecker.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/admin/admin_pa_fchecker.php,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** admin_pa_fchecker.php 2 May 2006 23:28:15 -0000 1.16 --- admin_pa_fchecker.php 17 Jun 2006 20:13:21 -0000 1.17 *************** *** 25,29 **** include_once( $module_root_path . 'pafiledb/includes/pafiledb_constants.' . $phpEx ); $file = basename( __FILE__ ); ! $module['pafileDB_Download']['6_Fchecker_title'] = $file; return; } --- 25,29 ---- include_once( $module_root_path . 'pafiledb/includes/pafiledb_constants.' . $phpEx ); $file = basename( __FILE__ ); ! $module['pafileDB_Download']['6_Fchecker'] = $file; return; } *************** *** 51,55 **** $file = basename( __FILE__ ); ! $module['pafileDB_Download']['6_Fchecker_title'] = 'modules/mx_pafiledb/admin/' . $file; return; } --- 51,55 ---- $file = basename( __FILE__ ); ! $module['pafileDB_Download']['6_Fchecker'] = 'modules/mx_pafiledb/admin/' . $file; return; } *************** *** 68,71 **** --- 68,83 ---- } + // ********************************************************************** + // Read language definition + // ********************************************************************** + if ( !file_exists( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ) ) + { + include( $module_root_path . 'language/lang_english/lang_admin.' . $phpEx ); + } + else + { + include( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ); + } + $this_dir = $module_root_path . 'pafiledb/uploads/'; *************** *** 78,93 **** } ! /* - Original ! $template->set_filenames(array( ! 'admin' => 'admin/pa_admin_file_checker.tpl') ! ); ! */ ! // MX Module ! $template->set_filenames( array( 'admin' => 'admin/pa_admin_file_checker.tpl' ) ! ); ! $template->assign_vars( array( 'L_FILE_CHECKER' => $lang['File_checker'], ! 'L_FCHECKER_EXPLAIN' => $lang['File_checker_explain'] ) ! ); if ( $safety == 1 ) --- 90,99 ---- } ! $template->set_filenames( array( 'admin' => 'admin/pa_admin_file_checker.tpl' ) ); ! $template->assign_vars( array( ! 'L_FILE_CHECKER' => $lang['File_checker'], ! 'L_FCHECKER_EXPLAIN' => $lang['File_checker_explain'] ! )); if ( $safety == 1 ) *************** *** 97,102 **** $template->assign_block_vars( "check", array() ); ! $template->assign_vars( array( 'L_FILE_CHECKER_SP1' => $lang['Checker_sp1'] ) ! ); $sql = "SELECT * FROM " . PA_FILES_TABLE; --- 103,107 ---- $template->assign_block_vars( "check", array() ); ! $template->assign_vars( array( 'L_FILE_CHECKER_SP1' => $lang['Checker_sp1'] ) ); $sql = "SELECT * FROM " . PA_FILES_TABLE; *************** *** 117,132 **** if ( !is_file( $this_dir . "/" . str_replace( $html_path, "", $temp_dlurl ) ) ) { ! /* $sql = "DELETE FROM " . PA_FILES_TABLE . " WHERE file_dlurl = '" . $temp_dlurl . "'"; ! if ( !($db->sql_query($sql)) ) ! { ! mx_message_die(GENERAL_ERROR, 'Couldnt Query info', '', __LINE__, __FILE__, $sql); ! }*/ ! $template->assign_block_vars( "check.check_step1", array( 'DEL_DURL' => $temp_dlurl ) ! ); } } ! $template->assign_vars( array( 'L_FILE_CHECKER_SP2' => $lang['Checker_sp2'] ) ! ); $sql = "SELECT * FROM " . PA_FILES_TABLE; --- 122,130 ---- if ( !is_file( $this_dir . "/" . str_replace( $html_path, "", $temp_dlurl ) ) ) { ! $template->assign_block_vars( "check.check_step1", array( 'DEL_DURL' => $temp_dlurl ) ); } } ! $template->assign_vars( array( 'L_FILE_CHECKER_SP2' => $lang['Checker_sp2'] ) ); $sql = "SELECT * FROM " . PA_FILES_TABLE; *************** *** 153,163 **** }*/ ! $template->assign_block_vars( "check.check_step2", array( 'DEL_SSURL' => $temp_file_id ) ! ); } } ! $template->assign_vars( array( 'L_FILE_CHECKER_SP3' => $lang['Checker_sp3'] ) ! ); $files = opendir( $this_dir ); --- 151,159 ---- }*/ ! $template->assign_block_vars( "check.check_step2", array( 'DEL_SSURL' => $temp_file_id ) ); } } ! $template->assign_vars( array( 'L_FILE_CHECKER_SP3' => $lang['Checker_sp3'] ) ); $files = opendir( $this_dir ); *************** *** 184,189 **** $saved = $saved + filesize( $this_dir . $temp ); // unlink($this_dir.$temp); ! $template->assign_block_vars( "check.check_step3", array( 'DEL_FILE' => $temp ) ! ); } } --- 180,184 ---- $saved = $saved + filesize( $this_dir . $temp ); // unlink($this_dir.$temp); ! $template->assign_block_vars( "check.check_step3", array( 'DEL_FILE' => $temp ) ); } } *************** *** 208,214 **** } ! $template->assign_vars( array( 'L_FILE_CHECKER_SAVED' => $lang['Checker_saved'], ! 'SAVED' => $saved ) ! ); } else --- 203,210 ---- } ! $template->assign_vars( array( ! 'L_FILE_CHECKER_SAVED' => $lang['Checker_saved'], ! 'SAVED' => $saved ! )); } else *************** *** 218,225 **** $lang['File_saftey'] = str_replace( "{html_path}", $html_path, $lang['File_saftey'] ); ! $template->assign_vars( array( 'L_FILE_CHECKER' => $lang['File_checker'], ! 'L_FILE_PERFORM' => $lang['File_checker_perform'], ! 'L_FILE_SAFTEY' => $lang['File_saftey'] ) ! ); } --- 214,222 ---- $lang['File_saftey'] = str_replace( "{html_path}", $html_path, $lang['File_saftey'] ); ! $template->assign_vars( array( ! 'L_FILE_CHECKER' => $lang['File_checker'], ! 'L_FILE_PERFORM' => $lang['File_checker_perform'], ! 'L_FILE_SAFTEY' => $lang['File_saftey'] ! )); } *************** *** 228,231 **** $template->pparse( 'admin' ); include( $mx_root_path . 'admin/page_footer_admin.' . $phpEx ); - ?> \ No newline at end of file --- 225,227 ---- Index: mx_module_defs.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/admin/mx_module_defs.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** mx_module_defs.php 2 May 2006 23:28:15 -0000 1.6 --- mx_module_defs.php 17 Jun 2006 20:13:22 -0000 1.7 *************** *** 9,12 **** --- 9,17 ---- */ + if ( !defined( 'IN_PORTAL' ) ) + { + die( "Hacking attempt" ); + } + /********************************************************************************\ | Class: mx_module_defs *************** *** 19,24 **** // Flow control ! define('MX_PANEL_DEBUG' , false); class mx_module_defs { --- 24,33 ---- // Flow control ! define('MX_PANEL_DEBUG', false); + /** + * Enter description here... + * + */ class mx_module_defs { *************** *** 146,150 **** // This is a PANEL - with it's own submit and reload interface // ! $this->is_panel = true; // --- 155,159 ---- // This is a PANEL - with it's own submit and reload interface //... [truncated message content] |
|
From: Jon O. <jon...@us...> - 2006-06-17 20:13:25
|
Update of /cvsroot/mxbb/mx_pafiledb/pafiledb In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv22598/modules/mx_pafiledb/pafiledb Modified Files: pafiledb_common.php Log Message: Finalizing module Index: pafiledb_common.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/pafiledb/pafiledb_common.php,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** pafiledb_common.php 7 Jun 2006 20:29:52 -0000 1.14 --- pafiledb_common.php 17 Jun 2006 20:13:22 -0000 1.15 *************** *** 90,125 **** $pafiledb_user = new pafiledb_user_info(); $pafiledb = new pafiledb_public(); - - /** - * Enter description here... - * - * @param unknown_type $args - * @param unknown_type $force_standalone_mode - * @param unknown_type $non_html_amp - * @return unknown - */ - function pa_this_mxurl( $args = '', $force_standalone_mode = false, $non_html_amp = false ) - { - global $mx_root_path, $module_root_path, $page_id, $phpEx, $is_block; - - if ( $force_standalone_mode || !$is_block ) - { - $mxurl = $module_root_path . 'dload.' . $phpEx . ( $args == '' ? '' : '?' . $args ); - } - else - { - $mxurl = $mx_root_path . 'index.' . $phpEx; - - if ( is_numeric( $page_id ) ) - { - $mxurl .= '?page=' . $page_id . ( $args == '' ? '' : ( $non_html_amp ? '&' : '&' ) . $args ); - } - else - { - $mxurl .= ( $args == '' ? '' : '?' . $args ); - } - } - return $mxurl; - } - ?> \ No newline at end of file --- 90,92 ---- |
|
From: Jon O. <jon...@us...> - 2006-06-17 20:12:36
|
Update of /cvsroot/mxbb/mx_newssuite/admin In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv22199/modules/mx_newssuite/admin Modified Files: mx_module_defs.php Log Message: Syncronizing...and code cleanup Index: mx_module_defs.php =================================================================== RCS file: /cvsroot/mxbb/mx_newssuite/admin/mx_module_defs.php,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** mx_module_defs.php 5 Apr 2006 22:35:24 -0000 1.9 --- mx_module_defs.php 17 Jun 2006 20:12:33 -0000 1.10 *************** *** 8,12 **** * */ ! /********************************************************************************\ | Class: mx_module_defs --- 8,17 ---- * */ ! ! if ( !defined( 'IN_PORTAL' ) ) ! { ! die( "Hacking attempt" ); ! } ! /********************************************************************************\ | Class: mx_module_defs *************** *** 32,43 **** { global $lang; ! if (empty($type_row)) { $type_row = array(); } ! $type_row['news_type_select'] = !empty($lang['ParType_news_type_select']) ? $lang['ParType_news_type_select'] : "NewsSuite phpBB/KB Source"; ! return $type_row; } --- 37,48 ---- { global $lang; ! if (empty($type_row)) { $type_row = array(); } ! $type_row['news_type_select'] = !empty($lang['ParType_news_type_select']) ? $lang['ParType_news_type_select'] : "NewsSuite phpBB/KB Source"; ! return $type_row; } *************** *** 50,57 **** global $HTTP_POST_VARS, $db, $board_config, $mx_blockcp, $mx_root_path, $phpEx; global $html_entities_match, $html_entities_replace; ! $parameter_value = $HTTP_POST_VARS[$parameter_data['parameter_name']]; $parameter_opt = ''; ! switch ( $parameter_data['parameter_type'] ) { --- 55,62 ---- global $HTTP_POST_VARS, $db, $board_config, $mx_blockcp, $mx_root_path, $phpEx; global $html_entities_match, $html_entities_replace; ! $parameter_value = $HTTP_POST_VARS[$parameter_data['parameter_name']]; $parameter_opt = ''; ! switch ( $parameter_data['parameter_type'] ) { *************** *** 60,64 **** $module_root_path = $mx_root_path . $mx_blockcp->module_root_path; include( $module_root_path . "includes/newssuite_defs.$phpEx" ); ! $news_types_list[$item_types_all] = $HTTP_POST_VARS[$item_types_all]; for( $z = 0; $z < ( count( $item_types_array ) ); $z++ ) --- 65,69 ---- $module_root_path = $mx_root_path . $mx_blockcp->module_root_path; include( $module_root_path . "includes/newssuite_defs.$phpEx" ); ! $news_types_list[$item_types_all] = $HTTP_POST_VARS[$item_types_all]; for( $z = 0; $z < ( count( $item_types_array ) ); $z++ ) *************** *** 66,77 **** $news_types_list[$item_types_array[$z]] = $HTTP_POST_VARS[$item_types_array[$z]]; } ! $parameter_value = addslashes( serialize( $news_types_list ) ); break; } ! return array('parameter_value' => $parameter_value, 'parameter_opt' => $parameter_opt); } ! // =================================================== // display parameter field and data in the add/edit page --- 71,82 ---- $news_types_list[$item_types_array[$z]] = $HTTP_POST_VARS[$item_types_array[$z]]; } ! $parameter_value = addslashes( serialize( $news_types_list ) ); break; } ! return array('parameter_value' => $parameter_value, 'parameter_opt' => $parameter_opt); } ! // =================================================== // display parameter field and data in the add/edit page *************** *** 88,92 **** } } ! function display_edit_News_type_select( $block_id, $parameter_id, $parameter_data ) { --- 93,97 ---- } } ! function display_edit_News_type_select( $block_id, $parameter_id, $parameter_data ) { *************** *** 95,102 **** $newssuite_config['news_source_switch'] = 'phpbb'; ! $module_root_path = $mx_root_path . $mx_blockcp->module_root_path; ! include( $module_root_path . 'includes/newssuite_constants.' . $phpEx ); ! include( $module_root_path . 'includes/newssuite_functions.' . $phpEx ); include( $module_root_path . "includes/newssuite_defs.$phpEx" ); --- 100,107 ---- $newssuite_config['news_source_switch'] = 'phpbb'; ! $module_root_path = $mx_root_path . $mx_blockcp->module_root_path; ! include( $module_root_path . 'includes/newssuite_constants.' . $phpEx ); ! include( $module_root_path . 'includes/newssuite_functions.' . $phpEx ); include( $module_root_path . "includes/newssuite_defs.$phpEx" ); *************** *** 104,134 **** 'parameter' => 'admin/mx_module_parameters.tpl') ); ! // Get number of forums in db ! $sql = "SELECT * FROM " . $news_cat_table . " ORDER BY $cat_extract_order"; ! if ( !( $result = $db->sql_query( $sql ) ) ) { mx_message_die( GENERAL_ERROR, "Couldn't obtain forums information.", "", __LINE__, __FILE__, $sql ); } ! $forums = $db->sql_fetchrowset( $result ); // Get array of categories from the database ! $categories = get_main_cats( $newssuite_config ); ! $news_type_select_data = ( !empty( $parameter_data['parameter_value'] ) ) ? unserialize($parameter_data['parameter_value']) : array(); ! // // Check that some categories exist ! // if ( $total_categories = count( $categories ) ) ! { ! // // Check that some forums exist (these were queried earlier) ! // if ( $total_forums = count( $forums ) ) { --- 109,139 ---- 'parameter' => 'admin/mx_module_parameters.tpl') ); ! // Get number of forums in db ! $sql = "SELECT * FROM " . $news_cat_table . " ORDER BY $cat_extract_order"; ! if ( !( $result = $db->sql_query( $sql ) ) ) { mx_message_die( GENERAL_ERROR, "Couldn't obtain forums information.", "", __LINE__, __FILE__, $sql ); } ! $forums = $db->sql_fetchrowset( $result ); // Get array of categories from the database ! $categories = get_main_cats( $newssuite_config ); ! $news_type_select_data = ( !empty( $parameter_data['parameter_value'] ) ) ? unserialize($parameter_data['parameter_value']) : array(); ! // // Check that some categories exist ! // if ( $total_categories = count( $categories ) ) ! { ! // // Check that some forums exist (these were queried earlier) ! // if ( $total_forums = count( $forums ) ) { *************** *** 136,160 **** { case 'phpbb': ! $template->assign_block_vars( 'switch_forums_phpbb', array( 'COLSPAN' => count( $item_types_array ) + 2 ) ); break; case 'kb': ! $template->assign_block_vars( 'switch_forums_kb', array( 'COLSPAN' => count( $item_types_array ) + 2 ) ); for( $z = 0; $z < ( count( $item_types_array ) ); $z++ ) { ! $template->assign_block_vars( 'switch_forums_kb.types_name', array( 'TYPES_NAME' => $item_types_name_array[$z] ) ); } break; } ! for( $i = 0; $i < $total_categories; $i++ ) { $template->assign_block_vars( 'catrow', array( 'CAT_ID' => $categories[$i]['cat_id'], 'COLSPAN' => count( $item_types_array ) + 1, ! 'CAT_NAME' => $categories[$i]['cat_title'] ) ); ! for( $j = 0; $j < $total_forums; $j++ ) { --- 141,165 ---- { case 'phpbb': ! $template->assign_block_vars( 'switch_forums_phpbb', array( 'COLSPAN' => count( $item_types_array ) + 2 ) ); break; case 'kb': ! $template->assign_block_vars( 'switch_forums_kb', array( 'COLSPAN' => count( $item_types_array ) + 2 ) ); for( $z = 0; $z < ( count( $item_types_array ) ); $z++ ) { ! $template->assign_block_vars( 'switch_forums_kb.types_name', array( 'TYPES_NAME' => $item_types_name_array[$z] ) ); } break; } ! for( $i = 0; $i < $total_categories; $i++ ) { $template->assign_block_vars( 'catrow', array( 'CAT_ID' => $categories[$i]['cat_id'], 'COLSPAN' => count( $item_types_array ) + 1, ! 'CAT_NAME' => $categories[$i]['cat_title'] ) ); ! for( $j = 0; $j < $total_forums; $j++ ) { *************** *** 167,175 **** 'FORUM_NAME' => $forums[$j][$catt_name], 'FORUM_DESC' => $forums[$j][$catt_desc], ! 'CHECKED' => ( $news_type_select_data['forum_news'][$forums[$j]['forum_id']] ? 'CHECKED' : '' ), 'ANNOUNCE_CHECKED' => ( $news_type_select_data['forum_news_announce'][$forums[$j]['forum_id']] ? 'CHECKED' : '' ), 'STICKY_CHECKED' => ( $news_type_select_data['forum_news_sticky'][$forums[$j]['forum_id']] ? 'CHECKED' : '' ), ! 'NORMAL_CHECKED' => ( $news_type_select_data['forum_news_post'][$forums[$j]['forum_id']] ? 'CHECKED' : '' ) ) ); break; --- 172,180 ---- 'FORUM_NAME' => $forums[$j][$catt_name], 'FORUM_DESC' => $forums[$j][$catt_desc], ! 'CHECKED' => ( $news_type_select_data['forum_news'][$forums[$j]['forum_id']] ? 'CHECKED' : '' ), 'ANNOUNCE_CHECKED' => ( $news_type_select_data['forum_news_announce'][$forums[$j]['forum_id']] ? 'CHECKED' : '' ), 'STICKY_CHECKED' => ( $news_type_select_data['forum_news_sticky'][$forums[$j]['forum_id']] ? 'CHECKED' : '' ), ! 'NORMAL_CHECKED' => ( $news_type_select_data['forum_news_post'][$forums[$j]['forum_id']] ? 'CHECKED' : '' ) ) ); break; *************** *** 178,183 **** 'FORUM_NAME' => $forums[$j][$catt_name], 'FORUM_DESC' => $forums[$j][$catt_desc], ! ! 'CHECKED' => ( $news_type_select_data['forum_news'][$forums[$j][$cool_array_category_id]] ? 'CHECKED' : '' ), ) ); for( $z = 0; $z < ( count( $item_types_array ) ); $z++ ) --- 183,188 ---- 'FORUM_NAME' => $forums[$j][$catt_name], 'FORUM_DESC' => $forums[$j][$catt_desc], ! ! 'CHECKED' => ( $news_type_select_data['forum_news'][$forums[$j][$cool_array_category_id]] ? 'CHECKED' : '' ), ) ); for( $z = 0; $z < ( count( $item_types_array ) ); $z++ ) *************** *** 185,189 **** $template->assign_block_vars( 'catrow.forumrow_kb.types', array( 'CHECKED' => ( $news_type_select_data[$item_types_array[$z]][$forums[$j][$cool_array_category_id]] ? 'CHECKED' : '' ), 'TYPE' => $item_types_array[$z], ! 'VALUE' => $item_types_id_array[$z] ) ); } --- 190,194 ---- $template->assign_block_vars( 'catrow.forumrow_kb.types', array( 'CHECKED' => ( $news_type_select_data[$item_types_array[$z]][$forums[$j][$cool_array_category_id]] ? 'CHECKED' : '' ), 'TYPE' => $item_types_array[$z], ! 'VALUE' => $item_types_id_array[$z] ) ); } *************** *** 195,199 **** } } ! $template->assign_vars(array( 'NAME' => $lang[$parameter_data['parameter_name']], --- 200,204 ---- } } ! $template->assign_vars(array( 'NAME' => $lang[$parameter_data['parameter_name']], *************** *** 202,206 **** 'PARAMETER_TYPE' => ( !empty($lang["ParType_".$parameter_data['parameter_type']]) ) ? $lang["ParType_".$parameter_data['parameter_type']] : '', 'PARAMETER_TYPE_EXPLAIN' => ( !empty($lang["ParType_".$parameter_data['parameter_type'] . "_info"]) ) ? '<br />' . $lang["ParType_".$parameter_data['parameter_type'] . "_info"] : '', ! 'MX_IMAGES_ROOT' => $images['mx_graphics']['block_icons'], 'SCRIPT_PATH' => $module_root_path, --- 207,211 ---- 'PARAMETER_TYPE' => ( !empty($lang["ParType_".$parameter_data['parameter_type']]) ) ? $lang["ParType_".$parameter_data['parameter_type']] : '', 'PARAMETER_TYPE_EXPLAIN' => ( !empty($lang["ParType_".$parameter_data['parameter_type'] . "_info"]) ) ? '<br />' . $lang["ParType_".$parameter_data['parameter_type'] . "_info"] : '', ! 'MX_IMAGES_ROOT' => $images['mx_graphics']['block_icons'], 'SCRIPT_PATH' => $module_root_path, *************** *** 208,219 **** 'I_STICKY' => $images['newssuite_folder_sticky'], 'I_NORMAL' => $images['newssuite_folder'], ! 'L_ANNOUNCEMENT' => $lang['Post_Announcement'], 'L_STICKY' => $lang['Post_Sticky'], ! 'L_NORMAL' => $lang['Posted'], )); ! $template->pparse('parameter'); ! } } --- 213,224 ---- 'I_STICKY' => $images['newssuite_folder_sticky'], 'I_NORMAL' => $images['newssuite_folder'], ! 'L_ANNOUNCEMENT' => $lang['Post_Announcement'], 'L_STICKY' => $lang['Post_Sticky'], ! 'L_NORMAL' => $lang['Posted'], )); ! $template->pparse('parameter'); ! } } |
|
From: Jon O. <jon...@us...> - 2006-06-17 20:12:36
|
Update of /cvsroot/mxbb/mx_newssuite/includes In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv22199/modules/mx_newssuite/includes Modified Files: newssuite_constants.php newssuite_defs.php Log Message: Syncronizing...and code cleanup Index: newssuite_constants.php =================================================================== RCS file: /cvsroot/mxbb/mx_newssuite/includes/newssuite_constants.php,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** newssuite_constants.php 5 Apr 2006 22:35:24 -0000 1.19 --- newssuite_constants.php 17 Jun 2006 20:12:33 -0000 1.20 *************** *** 8,12 **** * */ ! // ---------------------------------------------------------------------START // This file defines specific constants for the module --- 8,17 ---- * */ ! ! if ( !defined( 'IN_PORTAL' ) ) ! { ! die( "Hacking attempt" ); ! } ! // ---------------------------------------------------------------------START // This file defines specific constants for the module Index: newssuite_defs.php =================================================================== RCS file: /cvsroot/mxbb/mx_newssuite/includes/newssuite_defs.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** newssuite_defs.php 5 Apr 2006 22:35:24 -0000 1.6 --- newssuite_defs.php 17 Jun 2006 20:12:33 -0000 1.7 *************** *** 8,12 **** * */ ! switch ( $newssuite_config['news_source_switch'] ) { --- 8,17 ---- * */ ! ! if ( !defined( 'IN_PORTAL' ) ) ! { ! die( "Hacking attempt" ); ! } ! switch ( $newssuite_config['news_source_switch'] ) { *************** *** 20,26 **** $cat_table_category_id = 'f.forum_id'; ! $item_table_category_id = 't.forum_id'; ! $item_table_item_id = 't.topic_id'; $item_table_item_type = 't.topic_type'; --- 25,31 ---- $cat_table_category_id = 'f.forum_id'; ! $item_table_category_id = 't.forum_id'; ! $item_table_item_id = 't.topic_id'; $item_table_item_type = 't.topic_type'; |
|
From: Jon O. <jon...@us...> - 2006-06-17 20:12:04
|
Update of /cvsroot/mxbb/mx_linkdb/linkdb/includes In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv21784/modules/mx_linkdb/linkdb/includes Modified Files: functions_linkdb_field.php linkdb_constants.php Log Message: Syncronizing...and code cleanup Index: functions_linkdb_field.php =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/linkdb/includes/functions_linkdb_field.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** functions_linkdb_field.php 5 Apr 2006 22:35:24 -0000 1.4 --- functions_linkdb_field.php 17 Jun 2006 20:12:00 -0000 1.5 *************** *** 8,24 **** * */ ! class custom_field { var $field_rowset = array(); ! var $field_data_rowset = array(); ! // prepare data ! function init() { global $db; ! $sql = "SELECT * FROM " . LINK_CUSTOM_TABLE . " ORDER BY field_order ASC"; --- 8,29 ---- * */ ! ! if ( !defined( 'IN_PORTAL' ) ) ! { ! die( "Hacking attempt" ); ! } ! class custom_field { var $field_rowset = array(); ! var $field_data_rowset = array(); ! // prepare data ! function init() { global $db; ! $sql = "SELECT * FROM " . LINK_CUSTOM_TABLE . " ORDER BY field_order ASC"; *************** *** 36,40 **** $db->sql_freeresult( $result ); ! $sql = "SELECT * FROM " . LINK_CUSTOM_DATA_TABLE; --- 41,45 ---- $db->sql_freeresult( $result ); ! $sql = "SELECT * FROM " . LINK_CUSTOM_DATA_TABLE; *************** *** 52,59 **** $db->sql_freeresult( $result ); ! } ! // check if there is a data in the database ! function field_data_exist() { --- 57,64 ---- $db->sql_freeresult( $result ); ! } ! // check if there is a data in the database ! function field_data_exist() { *************** *** 72,79 **** } return false; ! } ! // display data in the file page ! function display_data( $file_id ) { --- 77,84 ---- } return false; ! } ! // display data in the file page ! function display_data( $file_id ) { *************** *** 102,106 **** $template->assign_block_vars( 'custom_field', array( 'CUSTOM_NAME' => $this->field_rowset[$field_id]['custom_name'], ! 'DATA' => $field_data ) ); } --- 107,111 ---- $template->assign_block_vars( 'custom_field', array( 'CUSTOM_NAME' => $this->field_rowset[$field_id]['custom_name'], ! 'DATA' => $field_data ) ); } *************** *** 109,114 **** global $db; ! $sql = "DELETE FROM " . LINK_CUSTOM_DATA_TABLE . " ! WHERE customdata_file = '$file_id' AND customdata_custom = '$field_id'"; --- 114,119 ---- global $db; ! $sql = "DELETE FROM " . LINK_CUSTOM_DATA_TABLE . " ! WHERE customdata_file = '$file_id' AND customdata_custom = '$field_id'"; *************** *** 129,136 **** return false; } ! } ! // display custom field and data in the add/edit page ! function display_edit( $file_id = false ) { --- 134,141 ---- return false; } ! } ! // display custom field and data in the add/edit page ! function display_edit( $file_id = false ) { *************** *** 174,178 **** 'FIELD_ID' => $field_data['custom_id'], 'FIELD_DESCRIPTION' => $field_data['custom_description'], ! 'FIELD_VALUE' => ( !empty( $this->field_data_rowset[$file_id][$field_id]['data'] ) ) ? $this->field_data_rowset[$file_id][$field_id]['data'] : '' ) ); } --- 179,183 ---- 'FIELD_ID' => $field_data['custom_id'], 'FIELD_DESCRIPTION' => $field_data['custom_description'], ! 'FIELD_VALUE' => ( !empty( $this->field_data_rowset[$file_id][$field_id]['data'] ) ) ? $this->field_data_rowset[$file_id][$field_id]['data'] : '' ) ); } *************** *** 184,188 **** 'FIELD_ID' => $field_data['custom_id'], 'FIELD_DESCRIPTION' => $field_data['custom_description'], ! 'FIELD_VALUE' => ( !empty( $this->field_data_rowset[$file_id][$field_id]['data'] ) ) ? $this->field_data_rowset[$file_id][$field_id]['data'] : '' ) ); } --- 189,193 ---- 'FIELD_ID' => $field_data['custom_id'], 'FIELD_DESCRIPTION' => $field_data['custom_description'], ! 'FIELD_VALUE' => ( !empty( $this->field_data_rowset[$file_id][$field_id]['data'] ) ) ? $this->field_data_rowset[$file_id][$field_id]['data'] : '' ) ); } *************** *** 193,197 **** $template->assign_block_vars( 'radio', array( 'FIELD_NAME' => $field_data['custom_name'], 'FIELD_ID' => $field_data['custom_id'], ! 'FIELD_DESCRIPTION' => $field_data['custom_description'] ) ); --- 198,202 ---- $template->assign_block_vars( 'radio', array( 'FIELD_NAME' => $field_data['custom_name'], 'FIELD_ID' => $field_data['custom_id'], ! 'FIELD_DESCRIPTION' => $field_data['custom_description'] ) ); *************** *** 204,208 **** { $template->assign_block_vars( 'radio.row', array( 'FIELD_VALUE' => $value, ! 'FIELD_SELECTED' => ( $data == $value ) ? ' checked="checked"' : '' ) ); } --- 209,213 ---- { $template->assign_block_vars( 'radio.row', array( 'FIELD_VALUE' => $value, ! 'FIELD_SELECTED' => ( $data == $value ) ? ' checked="checked"' : '' ) ); } *************** *** 215,219 **** $template->assign_block_vars( 'select', array( 'FIELD_NAME' => $field_data['custom_name'], 'FIELD_ID' => $field_data['custom_id'], ! 'FIELD_DESCRIPTION' => $field_data['custom_description'] ) ); --- 220,224 ---- $template->assign_block_vars( 'select', array( 'FIELD_NAME' => $field_data['custom_name'], 'FIELD_ID' => $field_data['custom_id'], ! 'FIELD_DESCRIPTION' => $field_data['custom_description'] ) ); *************** *** 226,230 **** { $template->assign_block_vars( 'select.row', array( 'FIELD_VALUE' => $value, ! 'FIELD_SELECTED' => ( $data == $value ) ? ' selected="selected"' : '' ) ); } --- 231,235 ---- { $template->assign_block_vars( 'select.row', array( 'FIELD_VALUE' => $value, ! 'FIELD_SELECTED' => ( $data == $value ) ? ' selected="selected"' : '' ) ); } *************** *** 237,241 **** $template->assign_block_vars( 'select_multiple', array( 'FIELD_NAME' => $field_data['custom_name'], 'FIELD_ID' => $field_data['custom_id'], ! 'FIELD_DESCRIPTION' => $field_data['custom_description'] ) ); --- 242,246 ---- $template->assign_block_vars( 'select_multiple', array( 'FIELD_NAME' => $field_data['custom_name'], 'FIELD_ID' => $field_data['custom_id'], ! 'FIELD_DESCRIPTION' => $field_data['custom_description'] ) ); *************** *** 257,261 **** } $template->assign_block_vars( 'select_multiple.row', array( 'FIELD_VALUE' => $value, ! 'FIELD_SELECTED' => $selected ) ); } --- 262,266 ---- } $template->assign_block_vars( 'select_multiple.row', array( 'FIELD_VALUE' => $value, ! 'FIELD_SELECTED' => $selected ) ); } *************** *** 268,272 **** $template->assign_block_vars( 'checkbox', array( 'FIELD_NAME' => $field_data['custom_name'], 'FIELD_ID' => $field_data['custom_id'], ! 'FIELD_DESCRIPTION' => $field_data['custom_description'] ) ); --- 273,277 ---- $template->assign_block_vars( 'checkbox', array( 'FIELD_NAME' => $field_data['custom_name'], 'FIELD_ID' => $field_data['custom_id'], ! 'FIELD_DESCRIPTION' => $field_data['custom_description'] ) ); *************** *** 288,292 **** } $template->assign_block_vars( 'checkbox.row', array( 'FIELD_VALUE' => $value, ! 'FIELD_CHECKED' => $checked ) ); } --- 293,297 ---- } $template->assign_block_vars( 'checkbox.row', array( 'FIELD_VALUE' => $value, ! 'FIELD_CHECKED' => $checked ) ); } *************** *** 342,346 **** $field_id = $db->sql_nextid(); ! $sql = "UPDATE " . LINK_CUSTOM_TABLE . " SET field_order = '$field_id' WHERE custom_id = $field_id"; --- 347,351 ---- $field_id = $db->sql_nextid(); ! $sql = "UPDATE " . LINK_CUSTOM_TABLE . " SET field_order = '$field_id' WHERE custom_id = $field_id"; *************** *** 353,357 **** else { ! $sql = "UPDATE " . LINK_CUSTOM_TABLE . " SET custom_name = '$field_name', custom_description = '$field_desc', data = '$data', regex = '$regex', field_order='$field_order' WHERE custom_id = $field_id"; --- 358,362 ---- else { ! $sql = "UPDATE " . LINK_CUSTOM_TABLE . " SET custom_name = '$field_name', custom_description = '$field_desc', data = '$data', regex = '$regex', field_order='$field_order' WHERE custom_id = $field_id"; *************** *** 376,380 **** } ! $sql = "DELETE FROM " . LINK_CUSTOM_TABLE . " WHERE custom_id = '$field_id'"; --- 381,385 ---- } ! $sql = "DELETE FROM " . LINK_CUSTOM_TABLE . " WHERE custom_id = '$field_id'"; *************** *** 390,397 **** $return_array['data'] = implode( "\n", unserialize( stripslashes( $return_array['data'] ) ) ); return $return_array; ! } ! // file data in custom field operations ! function file_update_data( $file_id ) { --- 395,402 ---- $return_array['data'] = implode( "\n", unserialize( stripslashes( $return_array['data'] ) ) ); return $return_array; ! } ! // file data in custom field operations ! function file_update_data( $file_id ) { *************** *** 424,429 **** } ! $sql = "DELETE FROM " . LINK_CUSTOM_DATA_TABLE . " ! WHERE customdata_file = '$file_id' AND customdata_custom = '$field_id'"; --- 429,434 ---- } ! $sql = "DELETE FROM " . LINK_CUSTOM_DATA_TABLE . " ! WHERE customdata_file = '$file_id' AND customdata_custom = '$field_id'"; *************** *** 435,439 **** if ( !empty( $data ) ) { ! $sql = "INSERT INTO " . LINK_CUSTOM_DATA_TABLE . " (customdata_file, customdata_custom, data) VALUES('$file_id', '$field_id', '$data')"; --- 440,444 ---- if ( !empty( $data ) ) { ! $sql = "INSERT INTO " . LINK_CUSTOM_DATA_TABLE . " (customdata_file, customdata_custom, data) VALUES('$file_id', '$field_id', '$data')"; Index: linkdb_constants.php =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/linkdb/includes/linkdb_constants.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** linkdb_constants.php 5 Apr 2006 22:35:24 -0000 1.6 --- linkdb_constants.php 17 Jun 2006 20:12:00 -0000 1.7 *************** *** 9,12 **** --- 9,17 ---- */ + if ( !defined( 'IN_PORTAL' ) ) + { + die( "Hacking attempt" ); + } + define( 'LINKDB_ROOT_CAT', 0 ); *************** *** 37,41 **** // ------------------------------------------------------------------------- $mx_user->extend(); ! $mx_page->add_copyright( 'mxBB LinkDb Module' ); } --- 42,46 ---- // ------------------------------------------------------------------------- $mx_user->extend(); ! $mx_page->add_copyright( 'mxBB LinkDb Module' ); } |
Update of /cvsroot/mxbb/mx_kb/admin In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv21631/modules/mx_kb/admin Modified Files: admin_kb_art.php admin_kb_auth.php admin_kb_cat.php admin_kb_custom.php admin_kb_settings.php admin_kb_types.php mx_module_defs.php Log Message: Finalizing this module Index: admin_kb_settings.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/admin/admin_kb_settings.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** admin_kb_settings.php 2 May 2006 23:27:19 -0000 1.4 --- admin_kb_settings.php 17 Jun 2006 20:11:23 -0000 1.5 *************** *** 37,40 **** --- 37,41 ---- include( $phpbb_root_path . 'kb/kb_common.' . $phpEx ); + include( $phpbb_root_path . 'kb/includes/functions_admin.' . $phpEx ); } else *************** *** 65,68 **** --- 66,70 ---- include( $module_root_path . 'kb/kb_common.' . $phpEx ); + include( $module_root_path . 'kb/includes/functions_admin.' . $phpEx ); } *************** *** 231,234 **** --- 233,238 ---- $internal_comments_phpbb = ( !$new['internal_comments'] ) ? "checked=\"checked\"" : ""; + $comments_forum_id = $new['comments_forum_id']; + $del_topic_yes = ( $new['del_topic'] ) ? "checked=\"checked\"" : ""; $del_topic_no = ( !$new['del_topic'] ) ? "checked=\"checked\"" : ""; *************** *** 443,446 **** --- 447,454 ---- 'L_INTERNAL_COMMENTS_PHPBB' => $lang['Internal_comments_phpBB'], + 'L_FORUM_ID' => $lang['Forum_id'], + 'L_FORUM_ID_EXPLAIN' => $lang['Forum_id_explain'], + 'FORUM_LIST' => get_forums( $comments_forum_id, false, 'comments_forum_id' ), + 'L_AUTOGENERATE_COMMENTS' => $lang['Autogenerate_comments'], 'L_AUTOGENERATE_COMMENTS_EXPLAIN' => $lang['Autogenerate_comments_explain'], Index: admin_kb_art.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/admin/admin_kb_art.php,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** admin_kb_art.php 7 Jun 2006 20:28:54 -0000 1.30 --- admin_kb_art.php 17 Jun 2006 20:11:23 -0000 1.31 *************** *** 68,79 **** --- 68,87 ---- { include( $module_root_path . 'language/lang_english/lang_admin.' . $phpEx ); + include( $module_root_path . 'language/lang_english/lang_main.' . $phpEx ); // Notification } else { include( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx ); + include( $module_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main.' . $phpEx ); // Notification } + // + // Init + // $mx_kb->init(); + // + // Get vars/mode + // $mode = $mx_request_vars->request('mode', MX_TYPE_NO_TAGS, ''); $start = $mx_request_vars->request('start', MX_TYPE_INT, 0); *************** *** 116,144 **** $topic_sql = ''; - /* - $kb_comment = array(); - - // Populate the kb_comment variable - $kb_comment = $this->kb_get_data($kb_row, $userdata ); - - // Compose post header - $subject = $lang['KB_comment_prefix'] . $kb_comment['article_title']; - $message_temp = $this->kb_compose_comment( $kb_comment ); - - $kb_message = $message_temp['message']; - $kb_update_message = $message_temp['update_message']; - - if ( $kb_config['use_comments'] ) - { - if ( !$kb_row['topic_id'] ) - { - // Post - $topic_data = kb_insert_post( $kb_message, $subject, $kb_comment['category_forum_id'], $kb_comment['article_editor_id'], $kb_comment['article_editor'], $kb_comment['article_editor_sig'], $kb_comment['topic_id'], $kb_update_message ); - - $topic_sql = ", topic_id = " . $topic_data['topic_id']; - } - } - */ - $sql = "UPDATE " . KB_ARTICLES_TABLE . " SET approved = 1 " . $topic_sql . " WHERE article_id = " . $article_id; --- 124,127 ---- *************** *** 149,159 **** } - /* - $this->kb_notify( $kb_config['notify'], $kb_message, $kb_config['admin_id'], $kb_comment['article_editor_id'], 'approved' ); - */ - $mx_kb->modified( true ); $mx_kb->_kb(); $message = $lang['Article_approved'] . '<br /><br />' . sprintf( $lang['Click_return_article_manager'], '<a href="' . append_sid( "admin_kb_art.$phpEx" ) . "&start=" . $start . '">', '</a>' ) ; mx_message_die( GENERAL_MESSAGE, $message ); --- 132,143 ---- } $mx_kb->modified( true ); $mx_kb->_kb(); + // + // Notification + // + $mx_kb->update_add_article_notify($article_id, 'approve'); + $message = $lang['Article_approved'] . '<br /><br />' . sprintf( $lang['Click_return_article_manager'], '<a href="' . append_sid( "admin_kb_art.$phpEx" ) . "&start=" . $start . '">', '</a>' ) ; mx_message_die( GENERAL_MESSAGE, $message ); *************** *** 174,177 **** --- 158,166 ---- $mx_kb->_kb(); + // + // Notification + // + $mx_kb->update_add_article_notify($article_id, 'unapprove'); + $message = $lang['Article_unapproved'] . '<br /><br />' . sprintf( $lang['Click_return_article_manager'], '<a href="' . append_sid( "admin_kb_art.$phpEx" ) . "&start=" . $start . '">', '</a>' ) ; mx_message_die( GENERAL_MESSAGE, $message ); *************** *** 194,205 **** $article_info = $db->sql_fetchrow( $result ); ! if ( $mx_kb->comments[$article_info['article_category_id']]['activated'] && !$mx_kb->comments[$article_info['article_category_id']]['internal_comments'] && $kb_config['del_topic'] && $article_info['topic_id'] ) { ! include( $module_root_path . 'kb/includes/functions_comment.' . $phpEx ); ! $mx_kb_comments = new mx_kb_comments(); ! $mx_kb_comments->init( $article_info, 'phpbb' ); ! $mx_kb_comments->post('delete', $article_info['topic_id']); } $sql = "DELETE FROM " . KB_ARTICLES_TABLE . " WHERE article_id = " . $article_id; --- 183,217 ---- $article_info = $db->sql_fetchrow( $result ); ! // ! // Comments ! // ! if ( $mx_kb->comments[$article_info['article_category_id']]['activated'] && $kb_config['del_topic']) { ! if ( $mx_kb->comments[$article_info['article_category_id']]['internal_comments'] ) ! { ! $sql = "DELETE FROM " . KB_COMMENTS_TABLE . " WHERE article_id = " . $article_id; ! ! if ( !( $result = $db->sql_query( $sql ) ) ) ! { ! mx_message_die( GENERAL_ERROR, "Could not delete article comments data", '', __LINE__, __FILE__, $sql ); ! } ! } ! else ! { ! if ( $article_info['topic_id'] ) ! { ! include( $module_root_path . 'kb/includes/functions_comment.' . $phpEx ); ! $mx_kb_comments = new mx_kb_comments(); ! $mx_kb_comments->init( $article_info, 'phpbb' ); ! $mx_kb_comments->post('delete_all', $article_info['topic_id']); ! } ! } } + // + // Notification + // + $mx_kb->update_add_article_notify($article_id, 'delete'); + $sql = "DELETE FROM " . KB_ARTICLES_TABLE . " WHERE article_id = " . $article_id; *************** *** 293,296 **** $template->pparse( 'body' ); include_once( $mx_root_path . 'admin/page_footer_admin.' . $phpEx ); - ?> \ No newline at end of file --- 305,307 ---- Index: admin_kb_types.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/admin/admin_kb_types.php,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** admin_kb_types.php 7 Jun 2006 20:28:54 -0000 1.21 --- admin_kb_types.php 17 Jun 2006 20:11:23 -0000 1.22 *************** *** 32,35 **** --- 32,36 ---- include( $phpbb_root_path . 'kb/kb_common.' . $phpEx ); + include( $phpbb_root_path . 'kb/includes/functions_admin.' . $phpEx ); } else *************** *** 60,93 **** include( $module_root_path . 'kb/kb_common.' . $phpEx ); ! } ! ! function get_list_kb( $id, $select ) ! { ! global $db; ! ! $idfield = 'id'; ! $namefield = 'type'; ! ! $sql = "SELECT * ! FROM " . KB_TYPES_TABLE; ! ! if ( $select == 0 ) ! { ! $sql .= " WHERE $idfield <> $id"; ! } ! ! if ( !$result = $db->sql_query( $sql ) ) ! { ! mx_message_die( GENERAL_ERROR, "Couldn't get list of types", "", __LINE__, __FILE__, $sql ); ! } ! ! $typelist = ""; ! ! while ( $row = $db->sql_fetchrow( $result ) ) ! { ! $typelist .= "<option value=\"$row[$idfield]\"$s>" . $row[$namefield] . "</option>\n"; ! } ! ! return( $typelist ); } --- 61,65 ---- include( $module_root_path . 'kb/kb_common.' . $phpEx ); ! include( $module_root_path . 'kb/includes/functions_admin.' . $phpEx ); } *************** *** 104,109 **** } ! // Load default header ! if ( isset( $HTTP_POST_VARS['mode'] ) || isset( $HTTP_GET_VARS['mode'] ) ) { --- 76,82 ---- } ! // ! // Load mode ! // if ( isset( $HTTP_POST_VARS['mode'] ) || isset( $HTTP_GET_VARS['mode'] ) ) { *************** *** 149,153 **** $message = $lang['Type_created'] . '<br /><br />' . sprintf( $lang['Click_return_type_manager'], '<a href="' . append_sid( "admin_kb_types.$phpEx" ) . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Click_return_admin_index'], '<a href="' . append_sid( $mx_root_path . "admin/index.$phpEx?pane=right" ) . '">', '</a>' ); - mx_message_die( GENERAL_MESSAGE, $message ); break; --- 122,125 ---- *************** *** 174,187 **** $template->set_filenames( array( 'body' => 'admin/kb_type_edit_body.tpl' ) ); ! $template->assign_vars( array( 'L_EDIT_TITLE' => $lang['Edit_type'], ! 'L_CATEGORY' => $lang['Article_type'], ! 'L_CAT_SETTINGS' => $lang['Cat_settings'], ! 'L_CREATE' => $lang['Edit'], ! 'S_ACTION' => append_sid( $module_root_path . "admin/admin_kb_types.$phpEx?mode=edit" ), ! 'CAT_NAME' => $type, ! 'S_HIDDEN' => '<input type="hidden" name="typeid" value="' . $type_id . '">' ) ! ); } else if ( $HTTP_POST_VARS['submit'] ) --- 146,160 ---- $template->set_filenames( array( 'body' => 'admin/kb_type_edit_body.tpl' ) ); ! $template->assign_vars( array( ! 'L_EDIT_TITLE' => $lang['Edit_type'], ! 'L_CATEGORY' => $lang['Article_type'], ! 'L_CAT_SETTINGS' => $lang['Cat_settings'], ! 'L_CREATE' => $lang['Edit'], ! 'S_ACTION' => append_sid( $module_root_path . "admin/admin_kb_types.$phpEx?mode=edit" ), ! 'CAT_NAME' => $type, ! 'S_HIDDEN' => '<input type="hidden" name="typeid" value="' . $type_id . '">' ! )); } else if ( $HTTP_POST_VARS['submit'] ) *************** *** 204,208 **** $message = $lang['Type_edited'] . '<br /><br />' . sprintf( $lang['Click_return_type_manager'], '<a href="' . append_sid( "admin_kb_types.$phpEx" ) . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Click_return_admin_index'], '<a href="' . append_sid( $mx_root_path . "admin/index.$phpEx?pane=right" ) . '">', '</a>' ); - mx_message_die( GENERAL_MESSAGE, $message ); } --- 177,180 ---- *************** *** 230,250 **** // Generate page ! $template->set_filenames( array( 'body' => 'admin/kb_cat_del_body.tpl' ) ! ); ! $template->assign_vars( array( 'L_DELETE_TITLE' => $lang['Type_delete_title'], ! 'L_DELETE_DESCRIPTION' => $lang['Type_delete_desc'], ! 'L_CAT_DELETE' => $lang['Type_delete_title'], ! 'L_CAT_NAME' => $lang['Article_type'], ! 'L_MOVE_CONTENTS' => $lang['Change_type'], ! 'L_DELETE' => $lang['Change_and_Delete'], ! 'S_HIDDEN_FIELDS' => '<input type="hidden" name="typeid" value="' . $type_id . '">', ! 'S_SELECT_TO' => get_list_kb( $type_id, 0 ), ! 'S_ACTION' => append_sid( $module_root_path . "admin/admin_kb_types.$phpEx?mode=delete" ), ! 'CAT_NAME' => $type_name ) ! ); } else if ( $HTTP_POST_VARS['submit'] ) --- 202,222 ---- // Generate page ! $template->set_filenames( array( 'body' => 'admin/kb_cat_del_body.tpl' ) ); ! $template->assign_vars( array( ! 'L_DELETE_TITLE' => $lang['Type_delete_title'], ! 'L_DELETE_DESCRIPTION' => $lang['Type_delete_desc'], ! 'L_CAT_DELETE' => $lang['Type_delete_title'], ! 'L_CAT_NAME' => $lang['Article_type'], ! 'L_MOVE_CONTENTS' => $lang['Change_type'], ! 'L_DELETE' => $lang['Change_and_Delete'], ! 'S_HIDDEN_FIELDS' => '<input type="hidden" name="typeid" value="' . $type_id . '">', ! 'S_SELECT_TO' => get_list_kb( $type_id, 0 ), ! 'S_ACTION' => append_sid( $module_root_path . "admin/admin_kb_types.$phpEx?mode=delete" ), ! 'CAT_NAME' => $type_name ! )); } else if ( $HTTP_POST_VARS['submit'] ) *************** *** 257,260 **** --- 229,233 ---- $sql = "UPDATE " . KB_ARTICLES_TABLE . " SET article_type = '$new_type' WHERE article_type = '$old_type'"; + if ( !( $move_result = $db->sql_query( $sql ) ) ) { *************** *** 262,265 **** --- 235,239 ---- } } + $sql = "DELETE FROM " . KB_TYPES_TABLE . " WHERE id = $old_type"; *************** *** 270,274 **** $message = $lang['Type_deleted'] . '<br /><br />' . sprintf( $lang['Click_return_type_manager'], '<a href="' . append_sid( "admin_kb_types.$phpEx" ) . '">', '</a>' ) . '<br /><br />' . sprintf( $lang['Click_return_admin_index'], '<a href="' . append_sid( $mx_root_path . "admin/index.$phpEx?pane=right" ) . '">', '</a>' ); - mx_message_die( GENERAL_MESSAGE, $message ); } --- 244,247 ---- *************** *** 279,298 **** // Generate page ! $template->set_filenames( array( 'body' => 'admin/kb_type_body.tpl' ) ! ); ! $template->assign_vars( array( 'L_KB_TYPE_TITLE' => $lang['Types_man'], ! 'L_KB_TYPE_DESCRIPTION' => $lang['KB_types_description'], ! 'L_CREATE_TYPE' => $lang['Create_type'], ! 'L_CREATE' => $lang['Create'], ! 'L_TYPE' => $lang['Article_type'], ! 'L_ACTION' => $lang['Art_action'], ! 'S_ACTION' => append_sid( $module_root_path . "admin/admin_kb_types.$phpEx?mode=create" ) ) ! ); ! // get categories ! $sql = "SELECT * ! FROM " . KB_TYPES_TABLE; if ( !( $cat_result = $db->sql_query( $sql ) ) ) --- 252,273 ---- // Generate page ! $template->set_filenames( array( 'body' => 'admin/kb_type_body.tpl' ) ); ! $template->assign_vars( array( ! 'L_KB_TYPE_TITLE' => $lang['Types_man'], ! 'L_KB_TYPE_DESCRIPTION' => $lang['KB_types_description'], ! 'L_CREATE_TYPE' => $lang['Create_type'], ! 'L_CREATE' => $lang['Create'], ! 'L_TYPE' => $lang['Article_type'], ! 'L_ACTION' => $lang['Art_action'], ! 'S_ACTION' => append_sid( $module_root_path . "admin/admin_kb_types.$phpEx?mode=create" ) ! )); ! ! // ! // get types ! // ! $sql = "SELECT * FROM " . KB_TYPES_TABLE; if ( !( $cat_result = $db->sql_query( $sql ) ) ) *************** *** 315,325 **** $row_class = ( !( $i % 2 ) ) ? $theme['td_class1'] : $theme['td_class2']; ! $template->assign_block_vars( 'typerow', array( 'TYPE' => $type_name, ! 'U_EDIT' => $edit, ! 'U_DELETE' => $delete, ! 'ROW_COLOR' => '#' . $row_color, ! 'ROW_CLASS' => $row_class ) ! ); $i++; } --- 290,301 ---- $row_class = ( !( $i % 2 ) ) ? $theme['td_class1'] : $theme['td_class2']; ! $template->assign_block_vars( 'typerow', array( ! 'TYPE' => $type_name, ! 'U_EDIT' => $edit, ! 'U_DELETE' => $delete, ! 'ROW_COLOR' => '#' . $row_color, ! 'ROW_CLASS' => $row_class ! )); $i++; } Index: mx_module_defs.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/admin/mx_module_defs.php,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** mx_module_defs.php 5 Apr 2006 22:34:48 -0000 1.9 --- mx_module_defs.php 17 Jun 2006 20:11:23 -0000 1.10 *************** *** 9,12 **** --- 9,17 ---- */ + if ( !defined( 'IN_PORTAL' ) ) + { + die( "Hacking attempt" ); + } + /********************************************************************************\ | Class: mx_module_defs *************** *** 32,43 **** { global $lang; ! if (empty($type_row)) { $type_row = array(); } ! $type_row['kb_type_select'] = !empty($lang['ParType_kb_type_select']) ? $lang['ParType_kb_type_select'] : "KB phpBB Source Forums"; ! return $type_row; } --- 37,48 ---- { global $lang; ! if (empty($type_row)) { $type_row = array(); } ! $type_row['kb_type_select'] = !empty($lang['ParType_kb_type_select']) ? $lang['ParType_kb_type_select'] : "KB phpBB Source Forums"; ! return $type_row; } *************** *** 49,57 **** { global $HTTP_POST_VARS, $db, $board_config, $mx_blockcp, $mx_root_path, $phpEx; ! global $html_entities_match, $html_entities_replace; $parameter_value = $HTTP_POST_VARS[$parameter_data['parameter_name']]; $parameter_opt = ''; ! switch ( $parameter_data['parameter_type'] ) { --- 54,62 ---- { global $HTTP_POST_VARS, $db, $board_config, $mx_blockcp, $mx_root_path, $phpEx; ! global $html_entities_match, $html_entities_replace; $parameter_value = $HTTP_POST_VARS[$parameter_data['parameter_name']]; $parameter_opt = ''; ! switch ( $parameter_data['parameter_type'] ) { *************** *** 60,67 **** break; } ! return array('parameter_value' => $parameter_value, 'parameter_opt' => $parameter_opt); } ! // =================================================== // display parameter field and data in the add/edit page --- 65,72 ---- break; } ! return array('parameter_value' => $parameter_value, 'parameter_opt' => $parameter_opt); } ! // =================================================== // display parameter field and data in the add/edit page *************** *** 78,82 **** } } ! function display_edit_KB_type_select( $block_id, $parameter_id, $parameter_data ) { --- 83,87 ---- } } ! function display_edit_KB_type_select( $block_id, $parameter_id, $parameter_data ) { *************** *** 91,97 **** 'parameter' => 'admin/mx_module_parameters.tpl') ); ! // Get number of forums in db ! $sql = "SELECT * FROM " . NEWS_CAT_TABLE . " ORDER BY $cat_extract_order"; --- 96,102 ---- 'parameter' => 'admin/mx_module_parameters.tpl') ); ! // Get number of forums in db ! $sql = "SELECT * FROM " . NEWS_CAT_TABLE . " ORDER BY $cat_extract_order"; *************** *** 100,130 **** mx_message_die( GENERAL_ERROR, "Couldn't obtain forums information.", "", __LINE__, __FILE__, $sql ); } ! $forums = $db->sql_fetchrowset( $result ); $kb_type_select_data = ( !empty( $parameter_data['parameter_value'] ) ) ? unserialize($parameter_data['parameter_value']) : array(); ! ! // // Check that some categories exist ! // $categories = array ( 0 => array ( 0 => '1', 'cat_id' => '1', 1 => 'KB', 'cat_title' => 'KB', ) ); ! if ( $total_categories = count( $categories ) ) ! { ! // // Check that some forums exist (these were queried earlier) ! // if ( $total_forums = count( $forums ) ) { ! $template->assign_block_vars( 'switch_forums_phpbb', array( 'COLSPAN' => count( $item_types_array ) + 2 ) ); ! for( $i = 0; $i < $total_categories; $i++ ) { $template->assign_block_vars( 'catrow', array( 'CAT_ID' => $categories[$i]['cat_id'], 'COLSPAN' => count( $item_types_array ) + 1, ! 'CAT_NAME' => $categories[$i]['cat_title'] ) ); ! for( $j = 0; $j < $total_forums; $j++ ) { --- 105,135 ---- mx_message_die( GENERAL_ERROR, "Couldn't obtain forums information.", "", __LINE__, __FILE__, $sql ); } ! $forums = $db->sql_fetchrowset( $result ); $kb_type_select_data = ( !empty( $parameter_data['parameter_value'] ) ) ? unserialize($parameter_data['parameter_value']) : array(); ! ! // // Check that some categories exist ! // $categories = array ( 0 => array ( 0 => '1', 'cat_id' => '1', 1 => 'KB', 'cat_title' => 'KB', ) ); ! if ( $total_categories = count( $categories ) ) ! { ! // // Check that some forums exist (these were queried earlier) ! // if ( $total_forums = count( $forums ) ) { ! $template->assign_block_vars( 'switch_forums_phpbb', array( 'COLSPAN' => count( $item_types_array ) + 2 ) ); ! for( $i = 0; $i < $total_categories; $i++ ) { $template->assign_block_vars( 'catrow', array( 'CAT_ID' => $categories[$i]['cat_id'], 'COLSPAN' => count( $item_types_array ) + 1, ! 'CAT_NAME' => $categories[$i]['cat_title'] ) ); ! for( $j = 0; $j < $total_forums; $j++ ) { *************** *** 134,139 **** 'FORUM_NAME' => $forums[$j][$catt_name], 'FORUM_DESC' => $forums[$j][$catt_desc], ! ! 'CHECKED' => ( $kb_type_select_data[$forums[$j][$cool_array_category_id]]['forum_news'] ? 'CHECKED' : '' ) ) ); } --- 139,144 ---- 'FORUM_NAME' => $forums[$j][$catt_name], 'FORUM_DESC' => $forums[$j][$catt_desc], ! ! 'CHECKED' => ( $kb_type_select_data[$forums[$j][$cool_array_category_id]]['forum_news'] ? 'CHECKED' : '' ) ) ); } *************** *** 142,146 **** } } ! $template->assign_vars(array( 'NAME' => $lang[$parameter_data['parameter_name']], --- 147,151 ---- } } ! $template->assign_vars(array( 'NAME' => $lang[$parameter_data['parameter_name']], *************** *** 149,161 **** 'PARAMETER_TYPE' => ( !empty($lang["ParType_".$parameter_data['parameter_type']]) ) ? $lang["ParType_".$parameter_data['parameter_type']] : '', 'PARAMETER_TYPE_EXPLAIN' => ( !empty($lang["ParType_".$parameter_data['parameter_type'] . "_info"]) ) ? '<br />' . $lang["ParType_".$parameter_data['parameter_type'] . "_info"] : '', ! 'SCRIPT_PATH' => $module_root_path, 'I_ANNOUNCE' => $images['kb_folder_announce'], 'I_STICKY' => $images['kb_folder_sticky'], ! 'I_NORMAL' => $images['kb_folder'], )); ! $template->pparse('parameter'); ! } } --- 154,166 ---- 'PARAMETER_TYPE' => ( !empty($lang["ParType_".$parameter_data['parameter_type']]) ) ? $lang["ParType_".$parameter_data['parameter_type']] : '', 'PARAMETER_TYPE_EXPLAIN' => ( !empty($lang["ParType_".$parameter_data['parameter_type'] . "_info"]) ) ? '<br />' . $lang["ParType_".$parameter_data['parameter_type'] . "_info"] : '', ! 'SCRIPT_PATH' => $module_root_path, 'I_ANNOUNCE' => $images['kb_folder_announce'], 'I_STICKY' => $images['kb_folder_sticky'], ! 'I_NORMAL' => $images['kb_folder'], )); ! $template->pparse('parameter'); ! } } Index: admin_kb_auth.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/admin/admin_kb_auth.php,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** admin_kb_auth.php 7 Jun 2006 20:28:54 -0000 1.15 --- admin_kb_auth.php 17 Jun 2006 20:11:23 -0000 1.16 *************** *** 75,78 **** --- 75,81 ---- } + // + // Init + // $mx_kb->init(); *************** *** 85,95 **** $template->set_filenames( array( 'body' => 'admin/kb_cat_select_body.tpl' ) ); ! $template->assign_vars( array( 'L_KB_AUTH_TITLE' => $lang['KB_Auth_Title'], ! 'L_KB_AUTH_EXPLAIN' => $lang['KB_Auth_Explain'], ! 'L_SELECT_CAT' => $lang['Select_a_Category'], ! 'S_KB_ACTION' => append_sid( "admin_kb_auth.$phpEx" ), ! 'L_LOOK_UP_CAT' => $lang['Look_up_Category'], ! 'CAT_SELECT_TITLE' => $s_kb_cat_list ) ! ); include( $mx_root_path . 'admin/page_header_admin.' . $phpEx ); --- 88,99 ---- $template->set_filenames( array( 'body' => 'admin/kb_cat_select_body.tpl' ) ); ! $template->assign_vars( array( ! 'L_KB_AUTH_TITLE' => $lang['KB_Auth_Title'], ! 'L_KB_AUTH_EXPLAIN' => $lang['KB_Auth_Explain'], ! 'L_SELECT_CAT' => $lang['Select_a_Category'], ! 'S_KB_ACTION' => append_sid( "admin_kb_auth.$phpEx" ), ! 'L_LOOK_UP_CAT' => $lang['Look_up_Category'], ! 'CAT_SELECT_TITLE' => $s_kb_cat_list ! )); include( $mx_root_path . 'admin/page_header_admin.' . $phpEx ); *************** *** 101,128 **** if ( !isset( $HTTP_GET_VARS['cat_id'] ) ) { ! $cat_id = intval( $HTTP_POST_VARS['cat_id'] ); $template->set_filenames( array( 'body' => 'admin/kb_cat_auth_body.tpl' ) ); ! $template->assign_vars( array( 'L_ALBUM_AUTH_TITLE' => $lang['Album_Auth_Title'], ! 'L_ALBUM_AUTH_EXPLAIN' => $lang['Album_Auth_Explain'], ! 'L_SUBMIT' => $lang['Submit'], ! 'L_RESET' => $lang['Reset'], ! 'L_GROUPS' => $lang['Usergroups'], ! 'L_VIEW' => $lang['View'], ! 'L_UPLOAD' => $lang['Upload'], ! 'L_RATE' => $lang['Rate'], ! 'L_COMMENT' => $lang['Comment'], ! 'L_EDIT' => $lang['Edit'], ! 'L_DELETE' => $lang['Delete'], ! // 'L_APPROVAL' => $lang['Approval'], ! // 'L_APPROVAL_EDIT' => $lang['Approval_edit'], ! 'L_IS_MODERATOR' => $lang['Is_Moderator'], ! 'S_ALBUM_ACTION' => append_sid( "admin_kb_auth.$phpEx?cat_id=$cat_id" ), ! ) ! ); // --- 105,132 ---- if ( !isset( $HTTP_GET_VARS['cat_id'] ) ) { ! $cat_id = $mx_request_vars->request('cat_id', MX_TYPE_INT, ''); $template->set_filenames( array( 'body' => 'admin/kb_cat_auth_body.tpl' ) ); ! $template->assign_vars( array( ! 'L_ALBUM_AUTH_TITLE' => $lang['Album_Auth_Title'], ! 'L_ALBUM_AUTH_EXPLAIN' => $lang['Album_Auth_Explain'], ! 'L_SUBMIT' => $lang['Submit'], ! 'L_RESET' => $lang['Reset'], ! 'L_GROUPS' => $lang['Usergroups'], ! 'L_VIEW' => $lang['View'], ! 'L_UPLOAD' => $lang['Upload'], ! 'L_RATE' => $lang['Rate'], ! 'L_COMMENT' => $lang['Comment'], ! 'L_EDIT' => $lang['Edit'], ! 'L_DELETE' => $lang['Delete'], ! // 'L_APPROVAL' => $lang['Approval'], ! // 'L_APPROVAL_EDIT' => $lang['Approval_edit'], ! 'L_IS_MODERATOR' => $lang['Is_Moderator'], ! 'S_ALBUM_ACTION' => append_sid( "admin_kb_auth.$phpEx?cat_id=$cat_id" ), ! )); // *************** *** 169,193 **** for ( $i = 0; $i < count( $groupdata ); $i++ ) { ! $template->assign_block_vars( 'grouprow', array( 'GROUP_ID' => $groupdata[$i]['group_id'], ! 'GROUP_NAME' => $groupdata[$i]['group_name'], ! ! 'VIEW_CHECKED' => ( in_array( $groupdata[$i]['group_id'], $view_groups ) ) ? 'checked="checked"' : '', ! ! 'POST_CHECKED' => ( in_array( $groupdata[$i]['group_id'], $post_groups ) ) ? 'checked="checked"' : '', ! ! 'RATE_CHECKED' => ( in_array( $groupdata[$i]['group_id'], $rate_groups ) ) ? 'checked="checked"' : '', ! ! 'COMMENT_CHECKED' => ( in_array( $groupdata[$i]['group_id'], $comment_groups ) ) ? 'checked="checked"' : '', ! ! 'EDIT_CHECKED' => ( in_array( $groupdata[$i]['group_id'], $edit_groups ) ) ? 'checked="checked"' : '', ! ! 'DELETE_CHECKED' => ( in_array( $groupdata[$i]['group_id'], $delete_groups ) ) ? 'checked="checked"' : '', ! ! // 'APPROVAL_CHECKED' => ( in_array( $groupdata[$i]['group_id'], $approval_groups ) ) ? 'checked="checked"' : '', ! ! // 'APPROVAL_EDIT_CHECKED' => ( in_array( $groupdata[$i]['group_id'], $approval_edit_groups ) ) ? 'checked="checked"' : '', ! ! 'MODERATOR_CHECKED' => ( in_array( $groupdata[$i]['group_id'], $moderator_groups ) ) ? 'checked="checked"' : '' ) ! ); } --- 173,189 ---- for ( $i = 0; $i < count( $groupdata ); $i++ ) { ! $template->assign_block_vars( 'grouprow', array( ! 'GROUP_ID' => $groupdata[$i]['group_id'], ! 'GROUP_NAME' => $groupdata[$i]['group_name'], ! 'VIEW_CHECKED' => ( in_array( $groupdata[$i]['group_id'], $view_groups ) ) ? 'checked="checked"' : '', ! 'POST_CHECKED' => ( in_array( $groupdata[$i]['group_id'], $post_groups ) ) ? 'checked="checked"' : '', ! 'RATE_CHECKED' => ( in_array( $groupdata[$i]['group_id'], $rate_groups ) ) ? 'checked="checked"' : '', ! 'COMMENT_CHECKED' => ( in_array( $groupdata[$i]['group_id'], $comment_groups ) ) ? 'checked="checked"' : '', ! 'EDIT_CHECKED' => ( in_array( $groupdata[$i]['group_id'], $edit_groups ) ) ? 'checked="checked"' : '', ! 'DELETE_CHECKED' => ( in_array( $groupdata[$i]['group_id'], $delete_groups ) ) ? 'checked="checked"' : '', ! // 'APPROVAL_CHECKED' => ( in_array( $groupdata[$i]['group_id'], $approval_groups ) ) ? 'checked="checked"' : '', ! // 'APPROVAL_EDIT_CHECKED' => ( in_array( $groupdata[$i]['group_id'], $approval_edit_groups ) ) ? 'checked="checked"' : '', ! 'MODERATOR_CHECKED' => ( in_array( $groupdata[$i]['group_id'], $moderator_groups ) ) ? 'checked="checked"' : '' ! )); } *************** *** 198,202 **** else { ! $cat_id = intval( $HTTP_GET_VARS['cat_id'] ); $view_groups = @implode( ',', $HTTP_POST_VARS['view'] ); --- 194,198 ---- else { ! $cat_id = $mx_request_vars->request('cat_id', MX_TYPE_INT, ''); $view_groups = @implode( ',', $HTTP_POST_VARS['view'] ); *************** *** 208,212 **** // $approval_groups = @implode( ',', $HTTP_POST_VARS['approval'] ); // $approval_edit_groups = @implode( ',', $HTTP_POST_VARS['approval_edit'] ); - $moderator_groups = @implode( ',', $HTTP_POST_VARS['moderator'] ); --- 204,207 ---- *************** *** 224,227 **** } } - ?> \ No newline at end of file --- 219,221 ---- Index: admin_kb_cat.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/admin/admin_kb_cat.php,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** admin_kb_cat.php 7 Jun 2006 20:28:54 -0000 1.24 --- admin_kb_cat.php 17 Jun 2006 20:11:23 -0000 1.25 *************** *** 76,79 **** --- 76,82 ---- } + // + // Init + // $mx_kb->init(); *************** *** 119,122 **** --- 122,127 ---- $internal_comments_default = "checked=\"checked\""; + $comments_forum_id = '-1'; + $autogenerate_comments_yes = ""; $autogenerate_comments_no = ""; *************** *** 198,202 **** 'L_FORUM_ID' => $lang['Forum_id'], 'L_FORUM_ID_EXPLAIN' => $lang['Forum_id_explain'], ! 'FORUM_LIST' => get_forums( ), 'L_AUTOGENERATE_COMMENTS' => $lang['Autogenerate_comments'], --- 203,207 ---- 'L_FORUM_ID' => $lang['Forum_id'], 'L_FORUM_ID_EXPLAIN' => $lang['Forum_id_explain'], ! 'FORUM_LIST' => get_forums( $comments_forum_id, true, 'comments_forum_id' ), 'L_AUTOGENERATE_COMMENTS' => $lang['Autogenerate_comments'], *************** *** 299,303 **** $cat_internal_comments = ( isset( $HTTP_POST_VARS['internal_comments'] ) ) ? intval( $HTTP_POST_VARS['internal_comments'] ) : 0; $cat_autogenerate_comments = ( isset( $HTTP_POST_VARS['autogenerate_comments'] ) ) ? intval( $HTTP_POST_VARS['autogenerate_comments'] ) : 0; ! $comments_forum_id = intval( $HTTP_POST_VARS['forum_id'] ); $cat_show_pretext = ( isset( $HTTP_POST_VARS['show_pretext'] ) ) ? intval( $HTTP_POST_VARS['show_pretext'] ) : 0; --- 304,308 ---- $cat_internal_comments = ( isset( $HTTP_POST_VARS['internal_comments'] ) ) ? intval( $HTTP_POST_VARS['internal_comments'] ) : 0; $cat_autogenerate_comments = ( isset( $HTTP_POST_VARS['autogenerate_comments'] ) ) ? intval( $HTTP_POST_VARS['autogenerate_comments'] ) : 0; ! $comments_forum_id = intval( $HTTP_POST_VARS['comments_forum_id'] ); $cat_show_pretext = ( isset( $HTTP_POST_VARS['show_pretext'] ) ) ? intval( $HTTP_POST_VARS['show_pretext'] ) : 0; *************** *** 359,363 **** $cat_name = $mx_kb->cat_rowset[$cat_id]['category_name']; $cat_desc = $mx_kb->cat_rowset[$cat_id]['category_details']; ! //$number_articles = $mx_kb->cat_rowset[$cat_id]['number_articles']; $number_articles = $mx_kb->article_in_cat($cat_id); $parent = $mx_kb->cat_rowset[$cat_id]['parent']; --- 364,368 ---- $cat_name = $mx_kb->cat_rowset[$cat_id]['category_name']; $cat_desc = $mx_kb->cat_rowset[$cat_id]['category_details']; ! $number_articles = $mx_kb->article_in_cat($cat_id); $parent = $mx_kb->cat_rowset[$cat_id]['parent']; *************** *** 458,462 **** 'L_FORUM_ID' => $lang['Forum_id'], 'L_FORUM_ID_EXPLAIN' => $lang['Forum_id_explain'], ! 'FORUM_LIST' => get_forums( $comments_forum_id ), 'L_AUTOGENERATE_COMMENTS' => $lang['Autogenerate_comments'], --- 463,467 ---- 'L_FORUM_ID' => $lang['Forum_id'], 'L_FORUM_ID_EXPLAIN' => $lang['Forum_id_explain'], ! 'FORUM_LIST' => get_forums( $comments_forum_id, true, 'comments_forum_id' ), 'L_AUTOGENERATE_COMMENTS' => $lang['Autogenerate_comments'], *************** *** 592,596 **** $cat_internal_comments = ( isset( $HTTP_POST_VARS['internal_comments'] ) ) ? intval( $HTTP_POST_VARS['internal_comments'] ) : 0; $cat_autogenerate_comments = ( isset( $HTTP_POST_VARS['autogenerate_comments'] ) ) ? intval( $HTTP_POST_VARS['autogenerate_comments'] ) : 0; ! $comments_forum_id = intval( $HTTP_POST_VARS['forum_id'] ); $cat_show_pretext = ( isset( $HTTP_POST_VARS['show_pretext'] ) ) ? intval( $HTTP_POST_VARS['show_pretext'] ) : 0; --- 597,601 ---- $cat_internal_comments = ( isset( $HTTP_POST_VARS['internal_comments'] ) ) ? intval( $HTTP_POST_VARS['internal_comments'] ) : 0; $cat_autogenerate_comments = ( isset( $HTTP_POST_VARS['autogenerate_comments'] ) ) ? intval( $HTTP_POST_VARS['autogenerate_comments'] ) : 0; ! $comments_forum_id = intval( $HTTP_POST_VARS['comments_forum_id'] ); $cat_show_pretext = ( isset( $HTTP_POST_VARS['show_pretext'] ) ) ? intval( $HTTP_POST_VARS['show_pretext'] ) : 0; Index: admin_kb_custom.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/admin/admin_kb_custom.php,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** admin_kb_custom.php 7 Jun 2006 20:28:54 -0000 1.15 --- admin_kb_custom.php 17 Jun 2006 20:11:23 -0000 1.16 *************** *** 178,183 **** } ! $template->set_filenames( array( 'admin' => $template_file ) ! ); switch ( $mode ) --- 178,182 ---- } ! $template->set_filenames( array( 'admin' => $template_file ) ); switch ( $mode ) *************** *** 221,231 **** $template->assign_vars( array( ! 'L_FIELD_TITLE' => $l_title, ! 'L_FIELD_EXPLAIN' => $lang['Fieldexplain'], ! 'L_SELECT_TITLE' => $lang['Fieldselecttitle'], ! 'S_HIDDEN_FIELDS' => $s_hidden_fields, ! 'S_FIELD_ACTION' => append_sid( "admin_kb_custom.$phpEx" ) ) ! ); if ( $mode == 'addfield' || $mode == 'editfield') --- 220,230 ---- $template->assign_vars( array( ! 'L_FIELD_TITLE' => $l_title, ! 'L_FIELD_EXPLAIN' => $lang['Fieldexplain'], ! 'L_SELECT_TITLE' => $lang['Fieldselecttitle'], ! 'S_HIDDEN_FIELDS' => $s_hidden_fields, ! 'S_FIELD_ACTION' => append_sid( "admin_kb_custom.$phpEx" ) ! )); if ( $mode == 'addfield' || $mode == 'editfield') *************** *** 236,272 **** } ! $template->assign_vars( array( 'L_FIELD_NAME' => $lang['Fieldname'], ! 'L_FIELD_NAME_INFO' => $lang['Fieldnameinfo'], ! 'L_FIELD_DESC' => $lang['Fielddesc'], ! 'L_FIELD_DESC_INFO' => $lang['Fielddescinfo'], ! 'L_FIELD_DATA' => $lang['Field_data'], ! 'L_FIELD_DATA_INFO' => $lang['Field_data_info'], ! 'L_FIELD_REGEX' => $lang['Field_regex'], ! 'L_FIELD_REGEX_INFO' => sprintf( $lang['Field_regex_info'], '<a href="http://www.php.net/manual/en/function.preg-match.php" target="_blank">', '</a>' ), ! 'L_FIELD_ORDER' => $lang['Field_order'], ! //'DATA' => ( $field_type != INPUT && $field_type != TEXTAREA ) ? true : false, ! //'REGEX' => ( $field_type == INPUT || $field_type == TEXTAREA ) ? true : false, ! //'ORDER' => ( $field_id ) ? true : false, ! 'FIELD_NAME' => $data['custom_name'], ! 'FIELD_DESC' => $data['custom_description'], ! 'FIELD_DATA' => $data['data'], ! 'FIELD_REGEX' => $data['regex'], ! 'FIELD_ORDER' => $data['field_order'] ) ! ); ! if ( $field_type != INPUT && $field_type != TEXTAREA ) ! { ! $template->assign_block_vars( 'data', array() ); ! } ! if ( $field_type == INPUT || $field_type == TEXTAREA ) ! { ! $template->assign_block_vars( 'regex', array() ); ! } ! if ( $field_id ) ! { ! $template->assign_block_vars( 'order', array() ); ! } } elseif ( $mode == 'add' ) --- 235,272 ---- } ! $template->assign_vars( array( ! 'L_FIELD_NAME' => $lang['Fieldname'], ! 'L_FIELD_NAME_INFO' => $lang['Fieldnameinfo'], ! 'L_FIELD_DESC' => $lang['Fielddesc'], ! 'L_FIELD_DESC_INFO' => $lang['Fielddescinfo'], ! 'L_FIELD_DATA' => $lang['Field_data'], ! 'L_FIELD_DATA_INFO' => $lang['Field_data_info'], ! 'L_FIELD_REGEX' => $lang['Field_regex'], ! 'L_FIELD_REGEX_INFO' => sprintf( $lang['Field_regex_info'], '<a href="http://www.php.net/manual/en/function.preg-match.php" target="_blank">', '</a>' ), ! 'L_FIELD_ORDER' => $lang['Field_order'], ! //'DATA' => ( $field_type != INPUT && $field_type != TEXTAREA ) ? true : false, ! //'REGEX' => ( $field_type == INPUT || $field_type == TEXTAREA ) ? true : false, ! //'ORDER' => ( $field_id ) ? true : false, ! 'FIELD_NAME' => $data['custom_name'], ! 'FIELD_DESC' => $data['custom_description'], ! 'FIELD_DATA' => $data['data'], ! 'FIELD_REGEX' => $data['regex'], ! 'FIELD_ORDER' => $data['field_order'] ! )); ! if ( $field_type != INPUT && $field_type != TEXTAREA ) ! { ! $template->assign_block_vars( 'data', array() ); ! } ! if ( $field_type == INPUT || $field_type == TEXTAREA ) ! { ! $template->assign_block_vars( 'regex', array() ); ! } ! if ( $field_id ) ! { ! $template->assign_block_vars( 'order', array() ); ! } } elseif ( $mode == 'add' ) *************** *** 275,278 **** --- 275,279 ---- $field_type_list = '<select name="field_type">'; + foreach( $field_types as $key => $value ) { *************** *** 281,286 **** $field_type_list .= '</select>'; ! $template->assign_vars( array( 'S_SELECT_FIELD_TYPE' => $field_type_list ) ! ); } elseif ( $mode == 'edit' || $mode == 'delete' || $mode == 'select' ) --- 282,286 ---- $field_type_list .= '</select>'; ! $template->assign_vars( array( 'S_SELECT_FIELD_TYPE' => $field_type_list ) ); } elseif ( $mode == 'edit' || $mode == 'delete' || $mode == 'select' ) *************** *** 289,296 **** { $template->assign_block_vars( 'field_row', array( ! 'FIELD_ID' => $field_id, ! 'FIELD_NAME' => $field_data['custom_name'], ! 'FIELD_DESC' => $field_data['custom_description'] ) ! ); } } --- 289,296 ---- { $template->assign_block_vars( 'field_row', array( ! 'FIELD_ID' => $field_id, ! 'FIELD_NAME' => $field_data['custom_name'], ! 'FIELD_DESC' => $field_data['custom_description'] ! )); } } *************** *** 299,302 **** $template->pparse( 'admin' ); include( $mx_root_path . 'admin/page_footer_admin.' . $phpEx ); - ?> \ No newline at end of file --- 299,301 ---- |