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 22:09:42
|
Update of /cvsroot/mxbb/core/modules/mx_navmenu/language/lang_english In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv15381/modules/mx_navmenu/language/lang_english Added Files: index.htm Log Message: Security --- NEW FILE: index.htm --- <html> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body bgcolor="#FFFFFF" text="#000000"> </body> </html> |
|
From: Jon O. <jon...@us...> - 2006-06-17 22:09:42
|
Update of /cvsroot/mxbb/core/modules/mx_navmenu In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv15381/modules/mx_navmenu Added Files: index.htm Log Message: Security --- NEW FILE: index.htm --- <html> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body bgcolor="#FFFFFF" text="#000000"> </body> </html> |
|
From: Jon O. <jon...@us...> - 2006-06-17 22:09:42
|
Update of /cvsroot/mxbb/core/modules/mx_mod_rewrite In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv15381/modules/mx_mod_rewrite Added Files: index.htm Log Message: Security --- NEW FILE: index.htm --- <html> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body bgcolor="#FFFFFF" text="#000000"> </body> </html> |
|
From: Jon O. <jon...@us...> - 2006-06-17 22:09:42
|
Update of /cvsroot/mxbb/core/modules/mx_coreblocks In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv15381/modules/mx_coreblocks Added Files: index.htm Log Message: Security --- NEW FILE: index.htm --- <html> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body bgcolor="#FFFFFF" text="#000000"> </body> </html> |
|
From: Jon O. <jon...@us...> - 2006-06-17 22:09:42
|
Update of /cvsroot/mxbb/core/modules/mx_navmenu/language In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv15381/modules/mx_navmenu/language Added Files: index.htm Log Message: Security --- NEW FILE: index.htm --- <html> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body bgcolor="#FFFFFF" text="#000000"> </body> </html> |
|
From: Jon O. <jon...@us...> - 2006-06-17 22:09:42
|
Update of /cvsroot/mxbb/core/modules/mx_coreblocks/templates In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv15381/modules/mx_coreblocks/templates Added Files: index.htm Log Message: Security --- NEW FILE: index.htm --- <html> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body bgcolor="#FFFFFF" text="#000000"> </body> </html> |
|
From: Jon O. <jon...@us...> - 2006-06-17 22:09:42
|
Update of /cvsroot/mxbb/core/includes In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv15381/includes Added Files: .htaccess index.htm Log Message: Security --- NEW FILE: .htaccess --- deny from all --- NEW FILE: index.htm --- <html> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body bgcolor="#FFFFFF" text="#000000"> </body> </html> |
|
From: Jon O. <jon...@us...> - 2006-06-17 22:09:42
|
Update of /cvsroot/mxbb/core/modules In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv15381/modules Added Files: index.htm Log Message: Security --- NEW FILE: index.htm --- <html> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body bgcolor="#FFFFFF" text="#000000"> </body> </html> |
|
From: Jon O. <jon...@us...> - 2006-06-17 22:09:42
|
Update of /cvsroot/mxbb/core/contrib In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv15381/contrib Added Files: index.htm Log Message: Security --- NEW FILE: index.htm --- <html> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body bgcolor="#FFFFFF" text="#000000"> </body> </html> |
|
From: Jon O. <jon...@us...> - 2006-06-17 22:09:42
|
Update of /cvsroot/mxbb/core/modules/mx_coreblocks/templates/subSilver In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv15381/modules/mx_coreblocks/templates/subSilver Added Files: index.htm Log Message: Security --- NEW FILE: index.htm --- <html> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body bgcolor="#FFFFFF" text="#000000"> </body> </html> |
|
From: Jon O. <jon...@us...> - 2006-06-17 20:51:33
|
Update of /cvsroot/mxbb/mx_smartor In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv7322/modules/mx_smartor Modified Files: album.php album_lists.php Log Message: security Index: album_lists.php =================================================================== RCS file: /cvsroot/mxbb/mx_smartor/album_lists.php,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** album_lists.php 2 May 2006 23:29:32 -0000 1.14 --- album_lists.php 17 Jun 2006 20:51:30 -0000 1.15 *************** *** 37,40 **** --- 37,44 ---- else { + if( !defined('IN_PORTAL') ) + { + die("Hacking attempt"); + } // // Read Block Settings Index: album.php =================================================================== RCS file: /cvsroot/mxbb/mx_smartor/album.php,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** album.php 2 May 2006 23:29:32 -0000 1.11 --- album.php 17 Jun 2006 20:51:30 -0000 1.12 *************** *** 39,42 **** --- 39,46 ---- else { + if( !defined('IN_PORTAL') ) + { + die("Hacking attempt"); + } // // Read Block Settings |
|
From: Jon O. <jon...@us...> - 2006-06-17 20:51:11
|
Update of /cvsroot/mxbb/mx_sitestats/includes In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv7266/modules/mx_sitestats/includes Modified Files: common.php Log Message: security Index: common.php =================================================================== RCS file: /cvsroot/mxbb/mx_sitestats/includes/common.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** common.php 2 May 2006 23:29:13 -0000 1.5 --- common.php 17 Jun 2006 20:51:08 -0000 1.6 *************** *** 9,12 **** --- 9,17 ---- */ + if( !defined('IN_PORTAL') ) + { + die("Hacking attempt"); + } + define( '_SITESTATS_VERSION', 'v1.3.0' ); *************** *** 14,21 **** if ( empty( $mx_table_prefix ) ) ! { ! // Workaround to retrieve MX config data from phpBB scope... ! if ( !function_exists( 'get_mx_table_prefix' ) ) { --- 19,26 ---- if ( empty( $mx_table_prefix ) ) ! { ! // Workaround to retrieve MX config data from phpBB scope... ! if ( !function_exists( 'get_mx_table_prefix' ) ) { *************** *** 73,80 **** $sitestats_config[$row['config_name']] = $row['config_value']; } ! } ! // Set Default Configuration (safety)... ! if ( empty( $sitestats_config['text_class'] ) ) { --- 78,85 ---- $sitestats_config[$row['config_name']] = $row['config_value']; } ! } ! // Set Default Configuration (safety)... ! if ( empty( $sitestats_config['text_class'] ) ) { *************** *** 112,116 **** { var $sql; // Last SQL query executed. ! function dbQuery( $sql ) { --- 117,121 ---- { var $sql; // Last SQL query executed. ! function dbQuery( $sql ) { *************** *** 144,162 **** class sitestats_counter extends sitestats ! { ! // Public Properties ! var $id, // Internal page identifier. $page, // Human page identifier. $hits_counter, // Hits Counter. $sess_counter; // Sessions Counter. ! var $digits_path, // Current relative path to digits path. $digits_ext; // File Extension for current digit images. ! ! // Constructor... ! function sitestats_counter() { --- 149,167 ---- class sitestats_counter extends sitestats ! { ! // Public Properties ! var $id, // Internal page identifier. $page, // Human page identifier. $hits_counter, // Hits Counter. $sess_counter; // Sessions Counter. ! var $digits_path, // Current relative path to digits path. $digits_ext; // File Extension for current digit images. ! ! // Constructor... ! function sitestats_counter() { *************** *** 175,182 **** $this->SERVER = &$_SERVER; } ! } ! // Public Methods related to the Counter... ! function readCounter( $page ) { --- 180,187 ---- $this->SERVER = &$_SERVER; } ! } ! // Public Methods related to the Counter... ! function readCounter( $page ) { *************** *** 210,217 **** { if ( $this->id == 0 ) ! { ! // There is still no counter for this page? ! $this->id = $this->dbMaxId( SITESTATS_COUNTER_TABLE, 'id' ); if ( empty( $this->id ) ) --- 215,222 ---- { if ( $this->id == 0 ) ! { ! // There is still no counter for this page? ! $this->id = $this->dbMaxId( SITESTATS_COUNTER_TABLE, 'id' ); if ( empty( $this->id ) ) *************** *** 221,228 **** } else ! { ! // Update the hits counter for this page... ! $sql = 'UPDATE ' . SITESTATS_COUNTER_TABLE . " SET page = '" . $this->page . "' , " . ' hits_counter = ' . $this->hits_counter . ' , ' . ' sess_counter = ' . $this->sess_counter . ' WHERE id = ' . $this->id; } --- 226,233 ---- } else ! { ! // Update the hits counter for this page... ! $sql = 'UPDATE ' . SITESTATS_COUNTER_TABLE . " SET page = '" . $this->page . "' , " . ' hits_counter = ' . $this->hits_counter . ' , ' . ' sess_counter = ' . $this->sess_counter . ' WHERE id = ' . $this->id; } *************** *** 233,240 **** $sql = 'DELETE FROM ' . SITESTATS_COUNTER_TABLE . ' WHERE id = ' . $this->id; return $this->dbQuery( $sql ) ? true : false; ! } ! // Public Methods related to Counter Images... ! function _getDigitsExt() { --- 238,245 ---- $sql = 'DELETE FROM ' . SITESTATS_COUNTER_TABLE . ' WHERE id = ' . $this->id; return $this->dbQuery( $sql ) ? true : false; ! } ! // Public Methods related to Counter Images... ! function _getDigitsExt() { *************** *** 293,300 **** ksort( $digits_ary ); return $digits_ary; ! } ! // Public Methods related to HTTP Referer... ! function updateReferer() { --- 298,305 ---- ksort( $digits_ary ); return $digits_ary; ! } ! // Public Methods related to HTTP Referer... ! function updateReferer() { *************** *** 330,337 **** var $usercount, $newestuser, $postcount, $topiccount; // get_db_stat var $return_limit; ! var $text_class; ! // Constructor ! function sitestats_phpbb() { --- 335,342 ---- var $usercount, $newestuser, $postcount, $topiccount; // get_db_stat var $return_limit; ! var $text_class; ! // Constructor ! function sitestats_phpbb() { *************** *** 342,349 **** $this->postcount = -1; $this->topiccount = -1; ! } ! // Basic phpBB statistics... ! function get_db_stat( $mode ) { --- 347,354 ---- $this->postcount = -1; $this->topiccount = -1; ! } ! // Basic phpBB statistics... ! function get_db_stat( $mode ) { *************** *** 353,360 **** } return $this->$mode; ! } ! // Compute the percent math... ! function do_percent_math( $firstval, $value, $total ) { --- 358,365 ---- } return $this->$mode; ! } ! // Compute the percent math... ! function do_percent_math( $firstval, $value, $total ) { *************** *** 366,373 **** $percent_array['bar_percent'] = max( 1, round( $value * $cst ) ); return $percent_array; ! } ! // Get voting bar info and Set templates variables... ! function set_voting_bar() { --- 371,378 ---- $percent_array['bar_percent'] = max( 1, round( $value * $cst ) ); return $percent_array; ! } ! // Get voting bar info and Set templates variables... ! function set_voting_bar() { *************** *** 381,385 **** $template->assign_vars( array( 'LEFT_GRAPH_IMAGE' => $vote_left, 'RIGHT_GRAPH_IMAGE' => $vote_right, ! 'GRAPH_IMAGE' => $vote_bar ) ); } --- 386,390 ---- $template->assign_vars( array( 'LEFT_GRAPH_IMAGE' => $vote_left, 'RIGHT_GRAPH_IMAGE' => $vote_right, ! 'GRAPH_IMAGE' => $vote_bar ) ); } |
|
From: Jon O. <jon...@us...> - 2006-06-17 20:50:52
|
Update of /cvsroot/mxbb/mx_simpledoc/simpledoc/includes In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv6843/modules/mx_simpledoc/simpledoc/includes Modified Files: functions_cache.php functions_io.php functions_node.php functions_simpledoc.php functions_zip.php simpledoc_constants.php sugolib4.php Log Message: security Index: functions_node.php =================================================================== RCS file: /cvsroot/mxbb/mx_simpledoc/simpledoc/includes/functions_node.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** functions_node.php 23 Apr 2006 19:21:27 -0000 1.1 --- functions_node.php 17 Jun 2006 20:50:47 -0000 1.2 *************** *** 1,3 **** --- 1,12 ---- <?php + /** + * + * @package mxBB Portal Module - mx_simpledoc + * @version $Id$ + * @copyright (c) 2002-2006 [wGEric, Jon Ohlsson] mxBB Project Team + * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 + * + */ + // +--------------------------------------------------------------------+ // | DO NOT REMOVE THIS | *************** *** 12,15 **** --- 21,29 ---- // +--------------------------------------------------------------------+ + if( !defined('IN_PORTAL') ) + { + die("Hacking attempt"); + } + // Nodes management. // Dependencies: IoFile, IoDir *************** *** 23,27 **** var $currFolder; // current folder, the node exists inside it, for the root element it points to itself var $level; // level of immersion, 0 for the root dir ! // this properties are overwritten on object creation, using global variables, see Node::Node() var $root = 'content'; // path to root element, without slash at the end --- 37,41 ---- var $currFolder; // current folder, the node exists inside it, for the root element it points to itself var $level; // level of immersion, 0 for the root dir ! // this properties are overwritten on object creation, using global variables, see Node::Node() var $root = 'content'; // path to root element, without slash at the end *************** *** 31,35 **** function Node($id = '') { ! global $CONTENT, $SORT, $CHMOD_FILE, $CHMOD_DIR; $this->root = $CONTENT; --- 45,49 ---- function Node($id = '') { ! global $CONTENT, $SORT, $CHMOD_FILE, $CHMOD_DIR; $this->root = $CONTENT; *************** *** 54,58 **** } } ! // ------- // ACTIONS --- 68,72 ---- } } ! // ------- // ACTIONS *************** *** 198,202 **** } } ! // ---- // INFO --- 212,216 ---- } } ! // ---- // INFO *************** *** 230,234 **** // SORT // ---- ! // returns array of given folder nodes (full paths) function loadSort($folder) { --- 244,248 ---- // SORT // ---- ! // returns array of given folder nodes (full paths) function loadSort($folder) { Index: functions_simpledoc.php =================================================================== RCS file: /cvsroot/mxbb/mx_simpledoc/simpledoc/includes/functions_simpledoc.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** functions_simpledoc.php 23 Apr 2006 19:21:27 -0000 1.1 --- functions_simpledoc.php 17 Jun 2006 20:50:47 -0000 1.2 *************** *** 13,17 **** die( "Hacking attempt" ); } ! // =================================================== // public mx_simpledoc class --- 13,17 ---- die( "Hacking attempt" ); } ! // =================================================== // public mx_simpledoc class *************** *** 20,25 **** { var $modules = array(); ! var $module_name = ''; ! // =================================================== // load module --- 20,25 ---- { var $modules = array(); ! var $module_name = ''; ! // =================================================== // load module *************** *** 30,34 **** if ( !class_exists( 'mx_simpledoc_' . $module_name ) ) { ! global $phpbb_root_path, $phpEx; global $mx_root_path, $module_root_path, $is_block, $phpEx; --- 30,34 ---- if ( !class_exists( 'mx_simpledoc_' . $module_name ) ) { ! global $phpbb_root_path, $phpEx; global $mx_root_path, $module_root_path, $is_block, $phpEx; *************** *** 43,48 **** } } ! } ! // =================================================== // this will be replaced by the loaded module --- 43,48 ---- } } ! } ! // =================================================== // this will be replaced by the loaded module *************** *** 51,56 **** { return false; ! } ! } --- 51,56 ---- { return false; ! } ! } *************** *** 61,71 **** { var $modified = false; ! var $error = array(); ! var $page_title = ''; ! var $debug = true; var $debug_msg = array(); ! // =================================================== // Prepare data --- 61,71 ---- { var $modified = false; ! var $error = array(); ! var $page_title = ''; ! var $debug = true; var $debug_msg = array(); ! // =================================================== // Prepare data *************** *** 76,89 **** $this->debug('mx_simpledoc->init', basename( __FILE__ )); ! ! } // =================================================== // Clean up ! // =================================================== function _simpledoc() { $this->debug('mx_simpledoc->_simpledoc', basename( __FILE__ )); ! if ( $this->modified ) { --- 76,89 ---- $this->debug('mx_simpledoc->init', basename( __FILE__ )); ! ! } // =================================================== // Clean up ! // =================================================== function _simpledoc() { $this->debug('mx_simpledoc->_simpledoc', basename( __FILE__ )); ! if ( $this->modified ) { *************** *** 94,98 **** // =================================================== // Add debug message ! // =================================================== function debug($debug_msg, $file = '', $line_break = true) { --- 94,98 ---- // =================================================== // Add debug message ! // =================================================== function debug($debug_msg, $file = '', $line_break = true) { *************** *** 105,113 **** } } ! // =================================================== // Display debug message ! // =================================================== function display_debug() { --- 105,113 ---- } } ! // =================================================== // Display debug message ! // =================================================== function display_debug() { *************** *** 119,145 **** $debug_message .= $value; } ! return $debug_message; } } ! function modified( $true_false = false ) { $this->debug('mx_simpledoc->modified', basename( __FILE__ )); ! $this->modified = $true_false; ! } ! // ---------- // HELP FUNCS // ---------- ! function send_zip($dir, $filename, $new_dir = null) { global $module_root_path, $phpEx; ! include_once( $module_root_path . 'simpledoc/includes/functions_zip.' . $phpEx ); ! $files = IoDir::readFull($dir); ! $zip = new zip; foreach ($files as $file) { --- 119,145 ---- $debug_message .= $value; } ! return $debug_message; } } ! function modified( $true_false = false ) { $this->debug('mx_simpledoc->modified', basename( __FILE__ )); ! $this->modified = $true_false; ! } ! // ---------- // HELP FUNCS // ---------- ! function send_zip($dir, $filename, $new_dir = null) { global $module_root_path, $phpEx; ! include_once( $module_root_path . 'simpledoc/includes/functions_zip.' . $phpEx ); ! $files = IoDir::readFull($dir); ! $zip = new zip; foreach ($files as $file) { *************** *** 151,170 **** } } ! header("Content-type: application/octet-stream"); header("Content-Disposition: attachment; filename=\"$filename\""); header("Pragma: no-cache"); header("Expires: 0"); ! echo $zip->get_file(); exit; } ! function send_zip_clear($dir, $filename, $new_dir = null) { global $module_root_path, $phpEx; ! include_once( $module_root_path . 'simpledoc/includes/functions_zip.' . $phpEx ); $files = IoDir::readFull($dir); ! $zip = new zip(); foreach ($files as $file) { --- 151,170 ---- } } ! header("Content-type: application/octet-stream"); header("Content-Disposition: attachment; filename=\"$filename\""); header("Pragma: no-cache"); header("Expires: 0"); ! echo $zip->get_file(); exit; } ! function send_zip_clear($dir, $filename, $new_dir = null) { global $module_root_path, $phpEx; ! include_once( $module_root_path . 'simpledoc/includes/functions_zip.' . $phpEx ); $files = IoDir::readFull($dir); ! $zip = new zip(); foreach ($files as $file) { *************** *** 176,204 **** } } ! IoDir::delete($dir); ! header("Content-type: application/octet-stream"); header("Content-Disposition: attachment; filename=\"$filename\""); header("Pragma: no-cache"); header("Expires: 0"); ! echo $zip->get_file(); exit; ! } ! function extract_zip($file, $to) { global $CHMOD_FILE, $CHMOD_DIR, $module_root_path; ! ! include_once( $module_root_path . 'simpledoc/includes/functions_zip.' . $phpEx ); ! $zip = new zip; $list = $zip->get_List($file); if (!count($list)) return; ! $root = $list[0]['filename']; $root = substr($root, 0, strpos($root, '/')); IoDir::create($to.'/'.$root, $CHMOD_DIR); ! $list2 = array(); foreach ($list as $v) { --- 176,204 ---- } } ! IoDir::delete($dir); ! header("Content-type: application/octet-stream"); header("Content-Disposition: attachment; filename=\"$filename\""); header("Pragma: no-cache"); header("Expires: 0"); ! echo $zip->get_file(); exit; ! } ! function extract_zip($file, $to) { global $CHMOD_FILE, $CHMOD_DIR, $module_root_path; ! ! include_once( $module_root_path . 'simpledoc/includes/functions_zip.' . $phpEx ); ! $zip = new zip; $list = $zip->get_List($file); if (!count($list)) return; ! $root = $list[0]['filename']; $root = substr($root, 0, strpos($root, '/')); IoDir::create($to.'/'.$root, $CHMOD_DIR); ! $list2 = array(); foreach ($list as $v) { *************** *** 206,213 **** $list2[substr_count($v['filename'], '/')][] = $v; } ! $a = array_keys($list2); sort($a); ! foreach ($a as $level) { foreach ($list2[$level] as $v) { --- 206,213 ---- $list2[substr_count($v['filename'], '/')][] = $v; } ! $a = array_keys($list2); sort($a); ! foreach ($a as $level) { foreach ($list2[$level] as $v) { *************** *** 220,229 **** } } ! $er = error_reporting(E_ALL ^ E_NOTICE); $zip->extract($file, $to); error_reporting($er); } ! // // ??? publish/raw.php and publish/tree.php --- 220,229 ---- } } ! $er = error_reporting(E_ALL ^ E_NOTICE); $zip->extract($file, $to); error_reporting($er); } ! // // ??? publish/raw.php and publish/tree.php *************** *** 234,238 **** return substr($s, strrpos($s, '/')+1); } ! function get_readable_size($bytes) { $base = 1024; --- 234,238 ---- return substr($s, strrpos($s, '/')+1); } ! function get_readable_size($bytes) { $base = 1024; *************** *** 251,261 **** // // ??? publish/raw.php and publish/tree.php ! // function fetch_document($id) { global $CONTENT, $CONFIG, $module_root_path, $mx_root_path; ! $path = $CONTENT.'/'.$id; $html = IoFile::read($path); ! if (preg_match('#<h1>(.+)</h1>#i', $html, $matches)) { $title = $matches[1]; --- 251,261 ---- // // ??? publish/raw.php and publish/tree.php ! // function fetch_document($id) { global $CONTENT, $CONFIG, $module_root_path, $mx_root_path; ! $path = $CONTENT.'/'.$id; $html = IoFile::read($path); ! if (preg_match('#<h1>(.+)</h1>#i', $html, $matches)) { $title = $matches[1]; *************** *** 264,268 **** $title = substr($title, -5) == '.html' ? substr($title, 0, strlen($title)-5) : $title; } ! $Page = new sugolibTemplate($module_root_path.'simpledoc/shared/publish/document.tpl'); $Page->setArray(array( --- 264,268 ---- $title = substr($title, -5) == '.html' ? substr($title, 0, strlen($title)-5) : $title; } ! $Page = new sugolibTemplate($module_root_path.'simpledoc/shared/publish/document.tpl'); $Page->setArray(array( *************** *** 273,286 **** return $Page->fetch(); } ! // // ??? publish/tree.php ! // function fetch_document_tree($id) { global $CONTENT, $CONFIG, $module_root_path; ! $path = $CONTENT.'/'.$id; $html = IoFile::read($path); ! if (preg_match('#<h1>(.+)</h1>#i', $html, $matches)) { $title = $matches[1]; --- 273,286 ---- return $Page->fetch(); } ! // // ??? publish/tree.php ! // function fetch_document_tree($id) { global $CONTENT, $CONFIG, $module_root_path; ! $path = $CONTENT.'/'.$id; $html = IoFile::read($path); ! if (preg_match('#<h1>(.+)</h1>#i', $html, $matches)) { $title = $matches[1]; *************** *** 289,293 **** $title = substr($title, -5) == '.html' ? substr($title, 0, strlen($title)-5) : $title; } ! $Page = new sugolibTemplate($module_root_path.'simpledoc/shared/publish/document.tpl'); $Page->setArray(array( --- 289,293 ---- $title = substr($title, -5) == '.html' ? substr($title, 0, strlen($title)-5) : $title; } ! $Page = new sugolibTemplate($module_root_path.'simpledoc/shared/publish/document.tpl'); $Page->setArray(array( *************** *** 299,306 **** return $Page->fetch(); } ! ! // // ??? publish/tre.php and tre-tre.php ! // function build_tree(&$tree, $root, $path = null) { if (!isset($path)) $path = $root; --- 299,306 ---- return $Page->fetch(); } ! ! // // ??? publish/tre.php and tre-tre.php ! // function build_tree(&$tree, $root, $path = null) { if (!isset($path)) $path = $root; *************** *** 334,338 **** } } ! // // Build the $tree html --- 334,338 ---- } } ! // // Build the $tree html *************** *** 358,362 **** function _build_tree_html($tree) { global $module_root_path, $PUBLISH; ! $ret = ''; foreach ($tree as $id => $v) { --- 358,362 ---- function _build_tree_html($tree) { global $module_root_path, $PUBLISH; ! $ret = ''; foreach ($tree as $id => $v) { *************** *** 371,377 **** } return $ret; ! } - // remove unsafe chars when saving config function config_safe($str) { --- 371,377 ---- } return $ret; ! } ! // remove unsafe chars when saving config function config_safe($str) { *************** *** 380,384 **** return $str; } ! function fix_path($s) { $s = str_replace('\\', '/', $s); --- 380,384 ---- return $str; } ! function fix_path($s) { $s = str_replace('\\', '/', $s); *************** *** 386,390 **** return $s; } ! // =================================================== // url rewrites --- 386,390 ---- return $s; } ! // =================================================== // url rewrites *************** *** 393,397 **** { global $mx_root_path, $module_root_path, $page_id, $phpEx; ! $mxurl = $mx_root_path . 'index.' . $phpEx; if ( is_numeric( $page_id ) ) --- 393,397 ---- { global $mx_root_path, $module_root_path, $page_id, $phpEx; ! $mxurl = $mx_root_path . 'index.' . $phpEx; if ( is_numeric( $page_id ) ) *************** *** 403,409 **** $mxurl .= ( $args == '' ? '' : '?' . $args ); } ! return $mxurl; ! } } --- 403,409 ---- $mxurl .= ( $args == '' ? '' : '?' . $args ); } ! return $mxurl; ! } } Index: functions_zip.php =================================================================== RCS file: /cvsroot/mxbb/mx_simpledoc/simpledoc/includes/functions_zip.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** functions_zip.php 23 Apr 2006 19:21:27 -0000 1.1 --- functions_zip.php 17 Jun 2006 20:50:47 -0000 1.2 *************** *** 1,3 **** --- 1,16 ---- <?php + /** + * + * @package mxBB Portal Module - mx_simpledoc + * @version $Id$ + * @copyright (c) 2002-2006 [wGEric, Jon Ohlsson] mxBB Project Team + * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 + * + */ + + if( !defined('IN_PORTAL') ) + { + die("Hacking attempt"); + } // Created by bouchon *************** *** 61,83 **** } ! function add_dir($name) ! { ! $name = str_replace("\\", "/", $name); ! $fr = "\x50\x4b\x03\x04\x0a\x00\x00\x00\x00\x00\x00\x00\x00\x00"; ! $fr .= pack("V",0).pack("V",0).pack("V",0).pack("v", strlen($name) ); ! $fr .= pack("v", 0 ).$name.pack("V", 0).pack("V", 0).pack("V", 0); $this -> datasec[] = $fr; ! $new_offset = strlen(implode("", $this->datasec)); ! $cdrec = "\x50\x4b\x01\x02\x00\x00\x0a\x00\x00\x00\x00\x00\x00\x00\x00\x00"; ! $cdrec .= pack("V",0).pack("V",0).pack("V",0).pack("v", strlen($name) ); ! $cdrec .= pack("v", 0 ).pack("v", 0 ).pack("v", 0 ).pack("v", 0 ); ! $ext = "\xff\xff\xff\xff"; ! $cdrec .= pack("V", 16 ).pack("V", $this -> old_offset ).$name; ! $this -> ctrl_dir[] = $cdrec; ! $this -> old_offset = $new_offset; $this -> dirs[] = $name; } --- 74,96 ---- } ! function add_dir($name) ! { ! $name = str_replace("\\", "/", $name); ! $fr = "\x50\x4b\x03\x04\x0a\x00\x00\x00\x00\x00\x00\x00\x00\x00"; ! $fr .= pack("V",0).pack("V",0).pack("V",0).pack("v", strlen($name) ); ! $fr .= pack("v", 0 ).$name.pack("V", 0).pack("V", 0).pack("V", 0); $this -> datasec[] = $fr; ! $new_offset = strlen(implode("", $this->datasec)); ! $cdrec = "\x50\x4b\x01\x02\x00\x00\x0a\x00\x00\x00\x00\x00\x00\x00\x00\x00"; ! $cdrec .= pack("V",0).pack("V",0).pack("V",0).pack("v", strlen($name) ); ! $cdrec .= pack("v", 0 ).pack("v", 0 ).pack("v", 0 ).pack("v", 0 ); ! $ext = "\xff\xff\xff\xff"; ! $cdrec .= pack("V", 16 ).pack("V", $this -> old_offset ).$name; ! $this -> ctrl_dir[] = $cdrec; ! $this -> old_offset = $new_offset; $this -> dirs[] = $name; } *************** *** 132,136 **** $timearray['minutes'] = 0; $timearray['seconds'] = 0; } ! return (($timearray['year'] - 1980) << 25) | ($timearray['mon'] << 21) | ($timearray['mday'] << 16) | ($timearray['hours'] << 11) | ($timearray['minutes'] << 5) | ($timearray['seconds'] >> 1); } --- 145,149 ---- $timearray['minutes'] = 0; $timearray['seconds'] = 0; } ! return (($timearray['year'] - 1980) << 25) | ($timearray['mon'] << 21) | ($timearray['mday'] << 16) | ($timearray['hours'] << 11) | ($timearray['minutes'] << 5) | ($timearray['seconds'] >> 1); } *************** *** 158,162 **** if(in_array("-1",$index)||in_array($i,$index)) $stat[$header['filename']]=$this->ExtractFile($header, $to, $zip); ! } fclose($zip); --- 171,175 ---- if(in_array("-1",$index)||in_array($i,$index)) $stat[$header['filename']]=$this->ExtractFile($header, $to, $zip); ! } fclose($zip); Index: sugolib4.php =================================================================== RCS file: /cvsroot/mxbb/mx_simpledoc/simpledoc/includes/sugolib4.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** sugolib4.php 23 Apr 2006 19:21:27 -0000 1.1 --- sugolib4.php 17 Jun 2006 20:50:47 -0000 1.2 *************** *** 1,3 **** --- 1,16 ---- <?php + /** + * + * @package mxBB Portal Module - mx_simpledoc + * @version $Id$ + * @copyright (c) 2002-2006 [wGEric, Jon Ohlsson] mxBB Project Team + * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 + * + */ + + if( !defined('IN_PORTAL') ) + { + die("Hacking attempt"); + } // +---------------------------------------------+ *************** *** 723,727 **** $c['comment'] = '#808080'; ! if (count($info)) { foreach ($info as $k => $v) { echo '<b>'; --- 736,740 ---- $c['comment'] = '#808080'; ! if (count($info)) { foreach ($info as $k => $v) { echo '<b>'; *************** *** 744,760 **** echo '<span style="font-family: monospaced; font-size: 11px; cursor: pointer;" onclick="showDetails('.count($trace).')">[show details]</span> '; echo '<span style="font-family: monospaced; font-size: 11px; cursor: pointer;" onclick="hideDetails('.count($trace).')">[hide details]</span>'; ! echo "\r\n"; echo "\r\n"; ! echo '<ul>'; $currentParam = -1; ! foreach ($trace as $k => $v) { ! $currentParam++; ! echo '<li style="list-style-type: square;">'; ! if (isset($v['class'])) { echo '<span onmouseover="this.style.color=\'#0000ff\'" onmouseout="this.style.color=\''.$c['keyword'].'\'" style="color: '.$c['keyword'].'; cursor: pointer;" onclick="showFile('.$k.')">'; --- 757,773 ---- echo '<span style="font-family: monospaced; font-size: 11px; cursor: pointer;" onclick="showDetails('.count($trace).')">[show details]</span> '; echo '<span style="font-family: monospaced; font-size: 11px; cursor: pointer;" onclick="hideDetails('.count($trace).')">[hide details]</span>'; ! echo "\r\n"; echo "\r\n"; ! echo '<ul>'; $currentParam = -1; ! foreach ($trace as $k => $v) { ! $currentParam++; ! echo '<li style="list-style-type: square;">'; ! if (isset($v['class'])) { echo '<span onmouseover="this.style.color=\'#0000ff\'" onmouseout="this.style.color=\''.$c['keyword'].'\'" style="color: '.$c['keyword'].'; cursor: pointer;" onclick="showFile('.$k.')">'; *************** *** 764,772 **** echo '<span onmouseover="this.style.color=\'#0000ff\'" onmouseout="this.style.color=\''.$c['keyword'].'\'" style="color: '.$c['keyword'].'; cursor: pointer;" onclick="showFile('.$k.')">'; } ! echo $v['function']; echo '</span>'; echo " ("; ! $sep = ''; $v['args'] = (array) @$v['args']; --- 777,785 ---- echo '<span onmouseover="this.style.color=\'#0000ff\'" onmouseout="this.style.color=\''.$c['keyword'].'\'" style="color: '.$c['keyword'].'; cursor: pointer;" onclick="showFile('.$k.')">'; } ! echo $v['function']; echo '</span>'; echo " ("; ! $sep = ''; $v['args'] = (array) @$v['args']; *************** *** 774,778 **** $currentParam++; ! echo $sep; $sep = ', '; --- 787,791 ---- $currentParam++; ! echo $sep; $sep = ', '; *************** *** 780,784 **** switch (true) { ! case is_bool($arg): $param = 'TRUE'; --- 793,797 ---- switch (true) { ! case is_bool($arg): $param = 'TRUE'; *************** *** 837,841 **** } ! echo ")"; echo "\r\n"; --- 850,854 ---- } ! echo ")"; echo "\r\n"; *************** *** 855,864 **** echo 'DIR: ' . fontStart('#007700') . dirname($v['file']) . fontEnd(); echo '</span>'; ! echo '</li>'; } ! echo '</ul>'; ! } else { echo '<b>File:</b> '; --- 868,877 ---- echo 'DIR: ' . fontStart('#007700') . dirname($v['file']) . fontEnd(); echo '</span>'; ! echo '</li>'; } ! echo '</ul>'; ! } else { echo '<b>File:</b> '; *************** *** 867,871 **** echo dirname($file); } ! ?> --- 880,884 ---- echo dirname($file); } ! ?> *************** *** 906,910 **** } function fetch() { ! if (!file_exists($this->file) || !is_file($this->file)) { return trigger_error("sugolibTemplate::fetch() failed, file does not exist '{$this->file}'", E_USER_ERROR); } --- 919,923 ---- } function fetch() { ! if (!file_exists($this->file) || !is_file($this->file)) { return trigger_error("sugolibTemplate::fetch() failed, file does not exist '{$this->file}'", E_USER_ERROR); } *************** *** 938,942 **** return $ret; } ! // // ??? publish/document.tpl // --- 951,955 ---- return $ret; } ! // // ??? publish/document.tpl // *************** *** 951,955 **** $s2 = str_pad($t % 60, 2, '0', STR_PAD_LEFT); return 'GMT'.$sign.$s1.':'.$s2; ! } } --- 964,968 ---- $s2 = str_pad($t % 60, 2, '0', STR_PAD_LEFT); return 'GMT'.$sign.$s1.':'.$s2; ! } } Index: functions_cache.php =================================================================== RCS file: /cvsroot/mxbb/mx_simpledoc/simpledoc/includes/functions_cache.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** functions_cache.php 23 Apr 2006 19:21:27 -0000 1.1 --- functions_cache.php 17 Jun 2006 20:50:47 -0000 1.2 *************** *** 2,6 **** /** * ! * @package mxBB Portal Module - mx_kb * @version $Id$ * @copyright (c) 2002-2006 [wGEric, Jon Ohlsson] mxBB Project Team --- 2,6 ---- /** * ! * @package mxBB Portal Module - mx_simpledoc * @version $Id$ * @copyright (c) 2002-2006 [wGEric, Jon Ohlsson] mxBB Project Team *************** *** 8,12 **** * */ ! if ( !defined( 'IN_PORTAL' ) ) { --- 8,12 ---- * */ ! if ( !defined( 'IN_PORTAL' ) ) { Index: functions_io.php =================================================================== RCS file: /cvsroot/mxbb/mx_simpledoc/simpledoc/includes/functions_io.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** functions_io.php 23 Apr 2006 19:21:27 -0000 1.1 --- functions_io.php 17 Jun 2006 20:50:47 -0000 1.2 *************** *** 1,3 **** --- 1,12 ---- <?php + /** + * + * @package mxBB Portal Module - mx_simpledoc + * @version $Id$ + * @copyright (c) 2002-2006 [wGEric, Jon Ohlsson] mxBB Project Team + * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 + * + */ + // +--------------------------------------------------------------------+ // | DO NOT REMOVE THIS | *************** *** 9,12 **** --- 18,26 ---- // +--------------------------------------------------------------------+ + if( !defined('IN_PORTAL') ) + { + die("Hacking attempt"); + } + // File operations. // Author: Cezary Tomczak [www.gosu.pl] Index: simpledoc_constants.php =================================================================== RCS file: /cvsroot/mxbb/mx_simpledoc/simpledoc/includes/simpledoc_constants.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** simpledoc_constants.php 23 Apr 2006 19:21:27 -0000 1.1 --- simpledoc_constants.php 17 Jun 2006 20:50:47 -0000 1.2 *************** *** 2,6 **** /** * ! * @package mxBB Portal Module - mx_kb * @version $Id$ * @copyright (c) 2002-2006 [wGEric, Jon Ohlsson] mxBB Project Team --- 2,6 ---- /** * ! * @package mxBB Portal Module - mx_simpledoc * @version $Id$ * @copyright (c) 2002-2006 [wGEric, Jon Ohlsson] mxBB Project Team *************** *** 9,12 **** --- 9,17 ---- */ + if( !defined('IN_PORTAL') ) + { + die("Hacking attempt"); + } + // ------------------------------------------------------------------------- // This file defines specific constants for the module *************** *** 26,31 **** // - IMAGES: MX_IMAGES (default), MX_IMAGES_NONE // ------------------------------------------------------------------------- ! $mx_user->extend(MX_LANG_ALL, MX_IMAGES_NONE); ! $mx_page->add_copyright( 'mxBB SimpleDoc' ); } --- 31,36 ---- // - IMAGES: MX_IMAGES (default), MX_IMAGES_NONE // ------------------------------------------------------------------------- ! $mx_user->extend(MX_LANG_ALL, MX_IMAGES_NONE); ! $mx_page->add_copyright( 'mxBB SimpleDoc' ); } |
|
From: Jon O. <jon...@us...> - 2006-06-17 20:50:51
|
Update of /cvsroot/mxbb/mx_simpledoc/simpledoc/modules In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv6843/modules/mx_simpledoc/simpledoc/modules Modified Files: simpledoc_export.php simpledoc_export_single.php simpledoc_import.php simpledoc_index.php simpledoc_publish.php simpledoc_publish_export.php simpledoc_settings.php simpledoc_view.php simpledoc_view_plain.php Log Message: security Index: simpledoc_settings.php =================================================================== RCS file: /cvsroot/mxbb/mx_simpledoc/simpledoc/modules/simpledoc_settings.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** simpledoc_settings.php 23 Apr 2006 19:21:27 -0000 1.1 --- simpledoc_settings.php 17 Jun 2006 20:50:47 -0000 1.2 *************** *** 8,12 **** * */ ! class mx_simpledoc_settings extends mx_simpledoc_public { --- 8,17 ---- * */ ! ! if( !defined('IN_PORTAL') ) ! { ! die("Hacking attempt"); ! } ! class mx_simpledoc_settings extends mx_simpledoc_public { *************** *** 14,18 **** { global $template, $lang, $db, $theme, $board_config, $phpEx, $simpledoc_config, $debug, $mx_root_path, $module_root_path, $CONTENT, $PUBLISH; ! global $CONFIG, $simpledoc_projectName; $template->set_filenames( array( 'body' => 'simpledoc_settings.tpl' )); --- 19,23 ---- { global $template, $lang, $db, $theme, $board_config, $phpEx, $simpledoc_config, $debug, $mx_root_path, $module_root_path, $CONTENT, $PUBLISH; ! global $CONFIG, $simpledoc_projectName; $template->set_filenames( array( 'body' => 'simpledoc_settings.tpl' )); *************** *** 20,55 **** // // Start ! // $mayEdit = IoFile::isWritable($module_root_path . 'config.php'); ! $encoding = post('encoding'); $editorWidth = post('editor-width'); $editorHeight = post('editor-height'); $publish_dir = post('publish_dir'); ! $encoding = $this->config_safe($encoding); $publish_dir = $this->config_safe($publish_dir); $publish_dir = str_replace('\\', '/', $publish_dir); ! if (substr($publish_dir, -1) == '/') { $publish_dir = substr($publish_dir, 0, -1); } ! if (!is_numeric($editorWidth)) { $editorWidth = null; } if (!is_numeric($editorHeight)) { $editorHeight = null; } ! if (!$encoding) { $publish_dir = $CONFIG['publish_dir']; } ! // ! // Prefix // $publish_dir_full = $module_root_path . 'simpledoc/' . $publish_dir; ! $err_publish_dir = false; ! if (!$publish_dir_full || !IoDir::exists($publish_dir_full) || !IoDir::isWritable($publish_dir_full)) { $err_publish_dir = true;} ! $ok = $mayEdit && $encoding && $editorWidth && $editorHeight && !$err_publish_dir; ! if ($ok) { $s = "<"."?"."php\r\n"; --- 25,60 ---- // // Start ! // $mayEdit = IoFile::isWritable($module_root_path . 'config.php'); ! $encoding = post('encoding'); $editorWidth = post('editor-width'); $editorHeight = post('editor-height'); $publish_dir = post('publish_dir'); ! $encoding = $this->config_safe($encoding); $publish_dir = $this->config_safe($publish_dir); $publish_dir = str_replace('\\', '/', $publish_dir); ! if (substr($publish_dir, -1) == '/') { $publish_dir = substr($publish_dir, 0, -1); } ! if (!is_numeric($editorWidth)) { $editorWidth = null; } if (!is_numeric($editorHeight)) { $editorHeight = null; } ! if (!$encoding) { $publish_dir = $CONFIG['publish_dir']; } ! // ! // Prefix // $publish_dir_full = $module_root_path . 'simpledoc/' . $publish_dir; ! $err_publish_dir = false; ! if (!$publish_dir_full || !IoDir::exists($publish_dir_full) || !IoDir::isWritable($publish_dir_full)) { $err_publish_dir = true;} ! $ok = $mayEdit && $encoding && $editorWidth && $editorHeight && !$err_publish_dir; ! if ($ok) { $s = "<"."?"."php\r\n"; *************** *** 63,67 **** IoFile::write($module_root_path . 'config.php', $s); } ! if (!$encoding) { $encoding = $CONFIG['encoding']; --- 68,72 ---- IoFile::write($module_root_path . 'config.php', $s); } ! if (!$encoding) { $encoding = $CONFIG['encoding']; *************** *** 70,107 **** $publish_dir = $CONFIG['publish_dir']; } ! // // Error // ! if ($ok) { $message = 'Settings saved successfully'; } ! if (!$mayEdit) { $message = 'File /config.php must be writable to change settings'; } ! if ($err_publish_dir) { $message = 'Publish Dir doesn\'t exist or is not writable'; } ! $template->assign_block_vars("message", array( 'MESSAGE' => $message ! )); ! ! $template->assign_vars( array( 'MX_ROOT_PATH' => $mx_root_path, 'MODULE_ROOT_PATH' => $module_root_path, 'TEMPLATE_PATH' => $template->module_template_path, ! ! 'L_PROJECT_NAME' => $simpledoc_projectName, // // Menu ! // 'MODE_MANAGE_URL' => $this->this_simpledoc_mxurl('mode=index'), 'MODE_PUBLISH_URL' => $this->this_simpledoc_mxurl('mode=publish'), --- 75,112 ---- $publish_dir = $CONFIG['publish_dir']; } ! // // Error // ! if ($ok) { $message = 'Settings saved successfully'; } ! if (!$mayEdit) { $message = 'File /config.php must be writable to change settings'; } ! if ($err_publish_dir) { $message = 'Publish Dir doesn\'t exist or is not writable'; } ! $template->assign_block_vars("message", array( 'MESSAGE' => $message ! )); ! ! $template->assign_vars( array( 'MX_ROOT_PATH' => $mx_root_path, 'MODULE_ROOT_PATH' => $module_root_path, 'TEMPLATE_PATH' => $template->module_template_path, ! ! 'L_PROJECT_NAME' => $simpledoc_projectName, // // Menu ! // 'MODE_MANAGE_URL' => $this->this_simpledoc_mxurl('mode=index'), 'MODE_PUBLISH_URL' => $this->this_simpledoc_mxurl('mode=publish'), *************** *** 110,149 **** 'MODE_EXPORT_URL' => $this->this_simpledoc_mxurl('mode=export'), 'MODE_VIEW_URL' => $this->this_simpledoc_mxurl('mode=view'), ! 'MODE_SETTINGS_URL' => $this->this_simpledoc_mxurl('mode=settings'), ! 'ENCODING' => $encoding, 'EDITOR_WIDTH' => $editorWidth, 'EDITOR_HEIGHT' => $editorHeight, 'PUBLISH_DIR' => $publish_dir, ! 'DISABLED' => !$mayEdit ? 'disabled="disabled"' : '', ! // // Menu langs // ! 'L_PROJECT' => $lang['sd_Project'], ! 'L_MANAGEMENT' => $lang['sd_Management'], ! 'L_PUBLISH' => $lang['sd_Publish'], ! 'L_IMPORT_CONTENT' => $lang['sd_Import_content'], ! 'L_EXPORT_CONTENT' => $lang['sd_Export_content'], ! 'L_OPTIONS' => $lang['sd_Options'], ! 'L_SETTINGS' => $lang['sd_Settings'], ! 'L_DOC_VIEW' => $lang['sd_Doc_view'], ! 'L_HELP' => $lang['sd_Help'], ! 'L_CONTENTS' => $lang['sd_Contents'], ! 'L_ABOUT' => $lang['sd_About'], ! // // Tree // ! 'L_TREE_VIEW' => $lang['sd_Tree_View'], ! 'L_WHERE' => $lang['sd_Where'], ! 'L_BEFORE' => $lang['sd_Before'], ! 'L_AFTER' => $lang['sd_After'], ! 'L_TYPE' => $lang['sd_Type'], ! 'L_NAME' => $lang['sd_Name'], ! 'L_DOCUMENT' => $lang['sd_Document'], ! 'L_FOLDER' => $lang['sd_Folder'], ! // // Theme --- 115,154 ---- 'MODE_EXPORT_URL' => $this->this_simpledoc_mxurl('mode=export'), 'MODE_VIEW_URL' => $this->this_simpledoc_mxurl('mode=view'), ! 'MODE_SETTINGS_URL' => $this->this_simpledoc_mxurl('mode=settings'), ! 'ENCODING' => $encoding, 'EDITOR_WIDTH' => $editorWidth, 'EDITOR_HEIGHT' => $editorHeight, 'PUBLISH_DIR' => $publish_dir, ! 'DISABLED' => !$mayEdit ? 'disabled="disabled"' : '', ! // // Menu langs // ! 'L_PROJECT' => $lang['sd_Project'], ! 'L_MANAGEMENT' => $lang['sd_Management'], ! 'L_PUBLISH' => $lang['sd_Publish'], ! 'L_IMPORT_CONTENT' => $lang['sd_Import_content'], ! 'L_EXPORT_CONTENT' => $lang['sd_Export_content'], ! 'L_OPTIONS' => $lang['sd_Options'], ! 'L_SETTINGS' => $lang['sd_Settings'], ! 'L_DOC_VIEW' => $lang['sd_Doc_view'], ! 'L_HELP' => $lang['sd_Help'], ! 'L_CONTENTS' => $lang['sd_Contents'], ! 'L_ABOUT' => $lang['sd_About'], ! // // Tree // ! 'L_TREE_VIEW' => $lang['sd_Tree_View'], ! 'L_WHERE' => $lang['sd_Where'], ! 'L_BEFORE' => $lang['sd_Before'], ! 'L_AFTER' => $lang['sd_After'], ! 'L_TYPE' => $lang['sd_Type'], ! 'L_NAME' => $lang['sd_Name'], ! 'L_DOCUMENT' => $lang['sd_Document'], ! 'L_FOLDER' => $lang['sd_Folder'], ! // // Theme *************** *** 161,177 **** 'T_FONTFACE1' => $theme['fontface1'], 'T_TD_COLOR1' => '#'.$theme['td_color1'], // Background code/quote ! 'T_TD_COLOR2' => '#'.$theme['td_color2'], // Background post/input ! // // Settings ! // ! 'L_CHANGE_SETTINGS' => $lang['sd_Change_settings'], ! 'L_ERROR_EMPTY' => $lang['sd_Error_empty'], ! 'L_ERROR_WIDTH' => $lang['sd_Error_width'], ! 'L_ERROR_HEIGHT' => $lang['sd_Error_height'], ! 'L_ERROR_DIR' => $lang['sd_Error_dir'], ! ! ! )); } --- 166,182 ---- 'T_FONTFACE1' => $theme['fontface1'], 'T_TD_COLOR1' => '#'.$theme['td_color1'], // Background code/quote ! 'T_TD_COLOR2' => '#'.$theme['td_color2'], // Background post/input ! // // Settings ! // ! 'L_CHANGE_SETTINGS' => $lang['sd_Change_settings'], ! 'L_ERROR_EMPTY' => $lang['sd_Error_empty'], ! 'L_ERROR_WIDTH' => $lang['sd_Error_width'], ! 'L_ERROR_HEIGHT' => $lang['sd_Error_height'], ! 'L_ERROR_DIR' => $lang['sd_Error_dir'], ! ! ! )); } Index: simpledoc_publish.php =================================================================== RCS file: /cvsroot/mxbb/mx_simpledoc/simpledoc/modules/simpledoc_publish.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** simpledoc_publish.php 23 Apr 2006 19:21:27 -0000 1.1 --- simpledoc_publish.php 17 Jun 2006 20:50:47 -0000 1.2 *************** *** 8,17 **** * */ ! class mx_simpledoc_publish extends mx_simpledoc_public { function main( $action ) { ! global $template, $lang, $db, $theme, $board_config, $phpEx, $simpledoc_config, $debug, $mx_root_path, $module_root_path, $CONTENT, $PUBLISH; global $mx_page, $simpledoc_projectName; --- 8,22 ---- * */ ! ! if( !defined('IN_PORTAL') ) ! { ! die("Hacking attempt"); ! } ! class mx_simpledoc_publish extends mx_simpledoc_public { function main( $action ) { ! global $template, $lang, $db, $theme, $board_config, $phpEx, $simpledoc_config, $debug, $mx_root_path, $module_root_path, $CONTENT, $PUBLISH; global $mx_page, $simpledoc_projectName; *************** *** 20,41 **** // // Start ! // $documents = 0; $folders = 0; $size = 0; ! $files = IoDir::readFull($CONTENT); $sections = array(); ! foreach ($files as $file) { if ($this->get_name($file) == $SORT) continue; $id = substr($file, strlen($CONTENT)+1); ! ! if (IoFile::exists($file)) { $documents++; $size += IoFile::getSize($file); ! } ! else if (IoDir::exists($file)) { $folders++; --- 25,46 ---- // // Start ! // $documents = 0; $folders = 0; $size = 0; ! $files = IoDir::readFull($CONTENT); $sections = array(); ! foreach ($files as $file) { if ($this->get_name($file) == $SORT) continue; $id = substr($file, strlen($CONTENT)+1); ! ! if (IoFile::exists($file)) { $documents++; $size += IoFile::getSize($file); ! } ! else if (IoDir::exists($file)) { $folders++; *************** *** 43,69 **** } } ! $publish_dir_ok = true; ! if ($CONFIG['publish_dir']) { if (!IoDir::exists($PUBLISH) || !IoDir::isWritable($PUBLISH)) { $publish_dir_ok = false; } } ! $size = $this->get_readable_size($size); ! $publish_dir_error = !$publish_dir_ok ? 'Publish Dir doesn\'t exist or is not writable' : ''; $template_options = sugolibTemplate::htmlOptions($sections); ! ! $template->assign_vars( array( 'MX_ROOT_PATH' => $mx_root_path, 'MODULE_ROOT_PATH' => $module_root_path, 'TEMPLATE_PATH' => $template->module_template_path, 'PAGE_ID' => $mx_page->page_id, ! ! 'L_PROJECT_NAME' => $simpledoc_projectName, ! // // Menu ! // 'MODE_MANAGE_URL' => $this->this_simpledoc_mxurl('mode=index'), 'MODE_PUBLISH_URL' => $this->this_simpledoc_mxurl('mode=publish'), --- 48,74 ---- } } ! $publish_dir_ok = true; ! if ($CONFIG['publish_dir']) { if (!IoDir::exists($PUBLISH) || !IoDir::isWritable($PUBLISH)) { $publish_dir_ok = false; } } ! $size = $this->get_readable_size($size); ! $publish_dir_error = !$publish_dir_ok ? 'Publish Dir doesn\'t exist or is not writable' : ''; $template_options = sugolibTemplate::htmlOptions($sections); ! ! $template->assign_vars( array( 'MX_ROOT_PATH' => $mx_root_path, 'MODULE_ROOT_PATH' => $module_root_path, 'TEMPLATE_PATH' => $template->module_template_path, 'PAGE_ID' => $mx_page->page_id, ! ! 'L_PROJECT_NAME' => $simpledoc_projectName, ! // // Menu ! // 'MODE_MANAGE_URL' => $this->this_simpledoc_mxurl('mode=index'), 'MODE_PUBLISH_URL' => $this->this_simpledoc_mxurl('mode=publish'), *************** *** 73,82 **** 'MODE_VIEW_URL' => $this->this_simpledoc_mxurl('mode=view'), 'MODE_SETTINGS_URL' => $this->this_simpledoc_mxurl('mode=settings'), ! ! 'DOCUMENT' => $documents, ! 'FOLDERS' => $folders, ! 'SIZE' => $size, ! 'PUBLISH_DIR' => $CONFIG['publish_dir'], ! 'PUBLISH_DIR_ERROR' => $publish_dir_error, 'TEMPLATE_OPTIONS' => $template_options, --- 78,87 ---- 'MODE_VIEW_URL' => $this->this_simpledoc_mxurl('mode=view'), 'MODE_SETTINGS_URL' => $this->this_simpledoc_mxurl('mode=settings'), ! ! 'DOCUMENT' => $documents, ! 'FOLDERS' => $folders, ! 'SIZE' => $size, ! 'PUBLISH_DIR' => $CONFIG['publish_dir'], ! 'PUBLISH_DIR_ERROR' => $publish_dir_error, 'TEMPLATE_OPTIONS' => $template_options, *************** *** 84,111 **** // Menu langs // ! 'L_PROJECT' => $lang['sd_Project'], ! 'L_MANAGEMENT' => $lang['sd_Management'], ! 'L_PUBLISH' => $lang['sd_Publish'], ! 'L_IMPORT_CONTENT' => $lang['sd_Import_content'], ! 'L_EXPORT_CONTENT' => $lang['sd_Export_content'], ! 'L_OPTIONS' => $lang['sd_Options'], ! 'L_SETTINGS' => $lang['sd_Settings'], ! 'L_DOC_VIEW' => $lang['sd_Doc_view'], ! 'L_HELP' => $lang['sd_Help'], ! 'L_CONTENTS' => $lang['sd_Contents'], ! 'L_ABOUT' => $lang['sd_About'], ! // // Tree // ! 'L_TREE_VIEW' => $lang['sd_Tree_View'], ! 'L_WHERE' => $lang['sd_Where'], ! 'L_BEFORE' => $lang['sd_Before'], ! 'L_AFTER' => $lang['sd_After'], ! 'L_TYPE' => $lang['sd_Type'], ! 'L_NAME' => $lang['sd_Name'], ! 'L_DOCUMENT' => $lang['sd_Document'], ! 'L_FOLDER' => $lang['sd_Folder'], ! // // Theme --- 89,116 ---- // Menu langs // ! 'L_PROJECT' => $lang['sd_Project'], ! 'L_MANAGEMENT' => $lang['sd_Management'], ! 'L_PUBLISH' => $lang['sd_Publish'], ! 'L_IMPORT_CONTENT' => $lang['sd_Import_content'], ! 'L_EXPORT_CONTENT' => $lang['sd_Export_content'], ! 'L_OPTIONS' => $lang['sd_Options'], ! 'L_SETTINGS' => $lang['sd_Settings'], ! 'L_DOC_VIEW' => $lang['sd_Doc_view'], ! 'L_HELP' => $lang['sd_Help'], ! 'L_CONTENTS' => $lang['sd_Contents'], ! 'L_ABOUT' => $lang['sd_About'], ! // // Tree // ! 'L_TREE_VIEW' => $lang['sd_Tree_View'], ! 'L_WHERE' => $lang['sd_Where'], ! 'L_BEFORE' => $lang['sd_Before'], ! 'L_AFTER' => $lang['sd_After'], ! 'L_TYPE' => $lang['sd_Type'], ! 'L_NAME' => $lang['sd_Name'], ! 'L_DOCUMENT' => $lang['sd_Document'], ! 'L_FOLDER' => $lang['sd_Folder'], ! // // Theme *************** *** 123,144 **** 'T_FONTFACE1' => $theme['fontface1'], 'T_TD_COLOR1' => '#'.$theme['td_color1'], // Background code/quote ! 'T_TD_COLOR2' => '#'.$theme['td_color2'], // Background post/input ! // // Publish // ! 'L_DOCUMENTS' => $lang['sd_p_Documents'], ! 'L_FOLDERS' => $lang['sd_p_Folders'], ! 'L_SIZE' => $lang['sd_p_Size'], ! 'L_SENDTEMPLATES' => $lang['sd_p_SendTemplates'], ! 'L_OPTIONMENU' => $lang['sd_p_optionMenu'], ! 'L_OPTIONRAW' => $lang['sd_p_optionRaw'], ! 'L_SENDZIP' => $lang['sd_p_SendZip'], ! 'L_PUBLISHTEMPLATES' => $lang['sd_p_PublishTemplates'], ! 'L_OPTIONSECTION' => $lang['sd_p_optionSection'], ! 'L_PUBLISHDIR' => $lang['sd_p_PublishDir'], ! 'L_PUBLISH' => $lang['sd_p_Publish'], ! ! )); } --- 128,149 ---- 'T_FONTFACE1' => $theme['fontface1'], 'T_TD_COLOR1' => '#'.$theme['td_color1'], // Background code/quote ! 'T_TD_COLOR2' => '#'.$theme['td_color2'], // Background post/input ! // // Publish // ! 'L_DOCUMENTS' => $lang['sd_p_Documents'], ! 'L_FOLDERS' => $lang['sd_p_Folders'], ! 'L_SIZE' => $lang['sd_p_Size'], ! 'L_SENDTEMPLATES' => $lang['sd_p_SendTemplates'], ! 'L_OPTIONMENU' => $lang['sd_p_optionMenu'], ! 'L_OPTIONRAW' => $lang['sd_p_optionRaw'], ! 'L_SENDZIP' => $lang['sd_p_SendZip'], ! 'L_PUBLISHTEMPLATES' => $lang['sd_p_PublishTemplates'], ! 'L_OPTIONSECTION' => $lang['sd_p_optionSection'], ! 'L_PUBLISHDIR' => $lang['sd_p_PublishDir'], ! 'L_PUBLISH' => $lang['sd_p_Publish'], ! ! )); } Index: simpledoc_export_single.php =================================================================== RCS file: /cvsroot/mxbb/mx_simpledoc/simpledoc/modules/simpledoc_export_single.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** simpledoc_export_single.php 23 Apr 2006 19:21:27 -0000 1.1 --- simpledoc_export_single.php 17 Jun 2006 20:50:47 -0000 1.2 *************** *** 8,27 **** * */ ! class mx_simpledoc_export_single extends mx_simpledoc_public { function main( $action ) { ! global $template, $lang, $db, $board_config, $phpEx, $simpledoc_config, $debug, $mx_root_path, $module_root_path, $CONTENT, $PUBLISH; $id = get('id'); $name = $this->get_name($id); $html = $this->fetch_document($id); ! header("Content-type: application/octet-stream"); header("Content-Disposition: attachment; filename=\"$name\""); header("Pragma: no-cache"); header("Expires: 0"); ! echo $html; exit; --- 8,32 ---- * */ ! ! if( !defined('IN_PORTAL') ) ! { ! die("Hacking attempt"); ! } ! class mx_simpledoc_export_single extends mx_simpledoc_public { function main( $action ) { ! global $template, $lang, $db, $board_config, $phpEx, $simpledoc_config, $debug, $mx_root_path, $module_root_path, $CONTENT, $PUBLISH; $id = get('id'); $name = $this->get_name($id); $html = $this->fetch_document($id); ! header("Content-type: application/octet-stream"); header("Content-Disposition: attachment; filename=\"$name\""); header("Pragma: no-cache"); header("Expires: 0"); ! echo $html; exit; Index: simpledoc_import.php =================================================================== RCS file: /cvsroot/mxbb/mx_simpledoc/simpledoc/modules/simpledoc_import.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** simpledoc_import.php 23 Apr 2006 19:21:27 -0000 1.1 --- simpledoc_import.php 17 Jun 2006 20:50:47 -0000 1.2 *************** *** 8,35 **** * */ ! class mx_simpledoc_import extends mx_simpledoc_public { function main( $action ) { ! global $template, $lang, $db, $theme, $board_config, $phpEx, $simpledoc_config, $debug, $mx_root_path, $module_root_path, $CONTENT, $PUBLISH, $CHMOD_FILE, $CHMOD_DIR; global $simpledoc_projectName; include_once( $module_root_path . 'simpledoc/includes/functions_zip.' . $phpEx ); ! $template->set_filenames( array( 'body' => 'simpledoc_import.tpl' )); ! $ZipFile = new Upload('zip_file'); $err = array(); ! if (isPOST() && $ZipFile->isValid()) { ! $name = substr($ZipFile->filename, 0, -strlen($ZipFile->getExtension())); $path = $ZipFile->tmp; ! $zip = new zip; $list = @$zip->get_List($path); if (!$list || !count($list)) $err['invalid_zip'] = true; ! if (!count($err)) { $root = $list[0]['filename']; --- 8,40 ---- * */ ! ! if( !defined('IN_PORTAL') ) ! { ! die("Hacking attempt"); ! } ! class mx_simpledoc_import extends mx_simpledoc_public { function main( $action ) { ! global $template, $lang, $db, $theme, $board_config, $phpEx, $simpledoc_config, $debug, $mx_root_path, $module_root_path, $CONTENT, $PUBLISH, $CHMOD_FILE, $CHMOD_DIR; global $simpledoc_projectName; include_once( $module_root_path . 'simpledoc/includes/functions_zip.' . $phpEx ); ! $template->set_filenames( array( 'body' => 'simpledoc_import.tpl' )); ! $ZipFile = new Upload('zip_file'); $err = array(); ! if (isPOST() && $ZipFile->isValid()) { ! $name = substr($ZipFile->filename, 0, -strlen($ZipFile->getExtension())); $path = $ZipFile->tmp; ! $zip = new zip; $list = @$zip->get_List($path); if (!$list || !count($list)) $err['invalid_zip'] = true; ! if (!count($err)) { $root = $list[0]['filename']; *************** *** 37,41 **** if ($root != $name) $err['invalid_zip'] = true; } ! if (!count($err)) { $tmp = $PUBLISH.'/import-'.$name; --- 42,46 ---- if ($root != $name) $err['invalid_zip'] = true; } ! if (!count($err)) { $tmp = $PUBLISH.'/import-'.$name; *************** *** 53,63 **** die('There was an error while uploading file'); } ! if (isset($err['invalid_zip'])) { die('The zip file contains invalid data'); } ! ! $template->assign_vars( array( 'MX_ROOT_PATH' => $mx_root_path, 'MODULE_ROOT_PATH' => $module_root_path, --- 58,68 ---- die('There was an error while uploading file'); } ! if (isset($err['invalid_zip'])) { die('The zip file contains invalid data'); } ! ! $template->assign_vars( array( 'MX_ROOT_PATH' => $mx_root_path, 'MODULE_ROOT_PATH' => $module_root_path, *************** *** 65,72 **** 'L_PROJECT_NAME' => $simpledoc_projectName, ! // // Menu ! // 'MODE_MANAGE_URL' => $this->this_simpledoc_mxurl('mode=index'), 'MODE_PUBLISH_URL' => $this->this_simpledoc_mxurl('mode=publish'), --- 70,77 ---- 'L_PROJECT_NAME' => $simpledoc_projectName, ! // // Menu ! // 'MODE_MANAGE_URL' => $this->this_simpledoc_mxurl('mode=index'), 'MODE_PUBLISH_URL' => $this->this_simpledoc_mxurl('mode=publish'), *************** *** 76,108 **** 'MODE_SETTINGS_URL' => $this->this_simpledoc_mxurl('mode=settings'), 'MODE_VIEW_URL' => $this->this_simpledoc_mxurl('mode=view'), ! 'TREE_HTML' => $tree_html, ! // // Menu langs // ! 'L_PROJECT' => $lang['sd_Project'], ! 'L_MANAGEMENT' => $lang['sd_Management'], ! 'L_PUBLISH' => $lang['sd_Publish'], ! 'L_IMPORT_CONTENT' => $lang['sd_Import_content'], ! 'L_EXPORT_CONTENT' => $lang['sd_Export_content'], ! 'L_OPTIONS' => $lang['sd_Options'], ! 'L_SETTINGS' => $lang['sd_Settings'], ! 'L_DOC_VIEW' => $lang['sd_Doc_view'], ! 'L_HELP' => $lang['sd_Help'], ! 'L_CONTENTS' => $lang['sd_Contents'], ! 'L_ABOUT' => $lang['sd_About'], ! // // Tree // ! 'L_TREE_VIEW' => $lang['sd_Tree_View'], ! 'L_WHERE' => $lang['sd_Where'], ! 'L_BEFORE' => $lang['sd_Before'], ! 'L_AFTER' => $lang['sd_After'], ! 'L_TYPE' => $lang['sd_Type'], ! 'L_NAME' => $lang['sd_Name'], ! 'L_DOCUMENT' => $lang['sd_Document'], ! 'L_FOLDER' => $lang['sd_Folder'], ! // // Theme --- 81,113 ---- 'MODE_SETTINGS_URL' => $this->this_simpledoc_mxurl('mode=settings'), 'MODE_VIEW_URL' => $this->this_simpledoc_mxurl('mode=view'), ! 'TREE_HTML' => $tree_html, ! // // Menu langs // ! 'L_PROJECT' => $lang['sd_Project'], ! 'L_MANAGEMENT' => $lang['sd_Management'], ! 'L_PUBLISH' => $lang['sd_Publish'], ! 'L_IMPORT_CONTENT' => $lang['sd_Import_content'], ! 'L_EXPORT_CONTENT' => $lang['sd_Export_content'], ! 'L_OPTIONS' => $lang['sd_Options'], ! 'L_SETTINGS' => $lang['sd_Settings'], ! 'L_DOC_VIEW' => $lang['sd_Doc_view'], ! 'L_HELP' => $lang['sd_Help'], ! 'L_CONTENTS' => $lang['sd_Contents'], ! 'L_ABOUT' => $lang['sd_About'], ! // // Tree // ! 'L_TREE_VIEW' => $lang['sd_Tree_View'], ! 'L_WHERE' => $lang['sd_Where'], ! 'L_BEFORE' => $lang['sd_Before'], ! 'L_AFTER' => $lang['sd_After'], ! 'L_TYPE' => $lang['sd_Type'], ! 'L_NAME' => $lang['sd_Name'], ! 'L_DOCUMENT' => $lang['sd_Document'], ! 'L_FOLDER' => $lang['sd_Folder'], ! // // Theme *************** *** 120,134 **** 'T_FONTFACE1' => $theme['fontface1'], 'T_TD_COLOR1' => '#'.$theme['td_color1'], // Background code/quote ! 'T_TD_COLOR2' => '#'.$theme['td_color2'], // Background post/input ! // // Import ! // ! 'L_ZIP_FILE' => $lang['sd_Zip_file'], ! 'L_ZIP_IMPORT' => $lang['sd_Import'], ! 'L_ZIP_FILE_REQUIRED' => $lang['sd_Zip_file_required'], ! 'L_ZIP_INFO' => $lang['sd_Zip_info'], ! ! )); } } --- 125,139 ---- 'T_FONTFACE1' => $theme['fontface1'], 'T_TD_COLOR1' => '#'.$theme['td_color1'], // Background code/quote ! 'T_TD_COLOR2' => '#'.$theme['td_color2'], // Background post/input ! // // Import ! // ! 'L_ZIP_FILE' => $lang['sd_Zip_file'], ! 'L_ZIP_IMPORT' => $lang['sd_Import'], ! 'L_ZIP_FILE_REQUIRED' => $lang['sd_Zip_file_required'], ! 'L_ZIP_INFO' => $lang['sd_Zip_info'], ! ! )); } } Index: simpledoc_view_plain.php =================================================================== RCS file: /cvsroot/mxbb/mx_simpledoc/simpledoc/modules/simpledoc_view_plain.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** simpledoc_view_plain.php 23 Apr 2006 19:21:27 -0000 1.1 --- simpledoc_view_plain.php 17 Jun 2006 20:50:47 -0000 1.2 *************** *** 8,36 **** * */ ! class mx_simpledoc_view_plain extends mx_simpledoc_public { function main( $action ) { ! global $template, $lang, $db, $theme, $board_config, $phpEx, $simpledoc_config, $debug, $mx_root_path, $module_root_path, $CONTENT, $PUBLISH; global $mx_page, $mx_block, $simpledoc_projectName; ! $template->set_filenames( array( 'body' => 'simpledoc_view_plain.tpl' )); ! $edit_auth = ( $mx_block->auth_view && $mx_block->auth_edit && $mx_block->show_block ) || $mx_block->auth_mod ? true : false; ! //$published_folder = $PUBLISH . '/html'; ! $template->assign_vars( array( 'MX_ROOT_PATH' => $mx_root_path, 'MODULE_ROOT_PATH' => $module_root_path, 'TEMPLATE_PATH' => $template->module_template_path, ! 'BLOCK_ID' => $mx_block->block_id, 'PAGE_ID' => $mx_page->page_id, ! ! 'L_PROJECT_NAME' => $simpledoc_projectName, ! 'PUBLISH_DIR' => $PUBLISH, ! // // Menu --- 8,41 ---- * */ ! ! if( !defined('IN_PORTAL') ) ! { ! die("Hacking attempt"); ! } ! class mx_simpledoc_view_plain extends mx_simpledoc_public { function main( $action ) { ! global $template, $lang, $db, $theme, $board_config, $phpEx, $simpledoc_config, $debug, $mx_root_path, $module_root_path, $CONTENT, $PUBLISH; global $mx_page, $mx_block, $simpledoc_projectName; ! $template->set_filenames( array( 'body' => 'simpledoc_view_plain.tpl' )); ! $edit_auth = ( $mx_block->auth_view && $mx_block->auth_edit && $mx_block->show_block ) || $mx_block->auth_mod ? true : false; ! //$published_folder = $PUBLISH . '/html'; ! $template->assign_vars( array( 'MX_ROOT_PATH' => $mx_root_path, 'MODULE_ROOT_PATH' => $module_root_path, 'TEMPLATE_PATH' => $template->module_template_path, ! 'BLOCK_ID' => $mx_block->block_id, 'PAGE_ID' => $mx_page->page_id, ! ! 'L_PROJECT_NAME' => $simpledoc_projectName, ! 'PUBLISH_DIR' => $PUBLISH, ! // // Menu *************** *** 42,74 **** 'MODE_EXPORT_URL' => $this->this_simpledoc_mxurl('mode=export'), 'MODE_SETTINGS_URL' => $this->this_simpledoc_mxurl('mode=settings'), ! 'TREE_HTML' => $tree_html, ! // // Menu langs // ! 'L_PROJECT' => $lang['sd_Project'], ! 'L_MANAGEMENT' => $lang['sd_Management'], ! 'L_PUBLISH' => $lang['sd_Publish'], ! 'L_IMPORT_CONTENT' => $lang['sd_Import_content'], ! 'L_EXPORT_CONTENT' => $lang['sd_Export_content'], ! 'L_OPTIONS' => $lang['sd_Options'], ! 'L_SETTINGS' => $lang['sd_Settings'], ! 'L_HELP' => $lang['sd_Help'], ! 'L_CONTENTS' => $lang['sd_Contents'], ! 'L_ABOUT' => $lang['sd_About'], ! // // Tree // ! 'L_TREE_VIEW' => $lang['sd_Tree_View'], 'L_TOC' => $lang['sd_Toc'], ! 'L_WHERE' => $lang['sd_Where'], ! 'L_BEFORE' => $lang['sd_Before'], ! 'L_AFTER' => $lang['sd_After'], ! 'L_TYPE' => $lang['sd_Type'], ! 'L_NAME' => $lang['sd_Name'], ! 'L_DOCUMENT' => $lang['sd_Document'], ! 'L_FOLDER' => $lang['sd_Folder'], ! // // Theme --- 47,79 ---- 'MODE_EXPORT_URL' => $this->this_simpledoc_mxurl('mode=export'), 'MODE_SETTINGS_URL' => $this->this_simpledoc_mxurl('mode=settings'), ! 'TREE_HTML' => $tree_html, ! // // Menu langs // ! 'L_PROJECT' => $lang['sd_Project'], ! 'L_MANAGEMENT' => $lang['sd_Management'], ! 'L_PUBLISH' => $lang['sd_Publish'], ! 'L_IMPORT_CONTENT' => $lang['sd_Import_content'], ! 'L_EXPORT_CONTENT' => $lang['sd_Export_content'], ! 'L_OPTIONS' => $lang['sd_Options'], ! 'L_SETTINGS' => $lang['sd_Settings'], ! 'L_HELP' => $lang['sd_Help'], ! 'L_CONTENTS' => $lang['sd_Contents'], ! 'L_ABOUT' => $lang['sd_About'], ! // // Tree // ! 'L_TREE_VIEW' => $lang['sd_Tree_View'], 'L_TOC' => $lang['sd_Toc'], ! 'L_WHERE' => $lang['sd_Where'], ! 'L_BEFORE' => $lang['sd_Before'], ! 'L_AFTER' => $lang['sd_After'], ! 'L_TYPE' => $lang['sd_Type'], ! 'L_NAME' => $lang['sd_Name'], ! 'L_DOCUMENT' => $lang['sd_Document'], ! 'L_FOLDER' => $lang['sd_Folder'], ! // // Theme *************** *** 86,105 **** 'T_FONTFACE1' => $theme['fontface1'], 'T_TD_COLOR1' => '#'.$theme['td_color1'], // Background code/quote ! 'T_TD_COLOR2' => '#'.$theme['td_color2'], // Background post/input ! // // View // ! 'L_DOC_INFO' => $lang['sd_Doc_info'], ! 'L_EDIT_CONTENT' => $lang['sd_Edit_content'], ! 'L_DEFAULT_EDIT' => $lang['sd_Default_edit'], ! 'L_LOADING' => $lang['sd_Loading'], 'L_SAVING' => $lang['sd_Saving'], ! 'MANAGE' => $edit_auth ? ' - <a href="'.$this->this_simpledoc_mxurl('mode=index').'" >[' . $lang['sd_Management'] . ']</a>' : '', ! ! ! )); ! } } --- 91,110 ---- 'T_FONTFACE1' => $theme['fontface1'], 'T_TD_COLOR1' => '#'.$theme['td_color1'], // Background code/quote ! 'T_TD_COLOR2' => '#'.$theme['td_color2'], // Background post/input ! // // View // ! 'L_DOC_INFO' => $lang['sd_Doc_info'], ! 'L_EDIT_CONTENT' => $lang['sd_Edit_content'], ! 'L_DEFAULT_EDIT' => $lang['sd_Default_edit'], ! 'L_LOADING' => $lang['sd_Loading'], 'L_SAVING' => $lang['sd_Saving'], ! 'MANAGE' => $edit_auth ? ' - <a href="'.$this->this_simpledoc_mxurl('mode=index').'" >[' . $lang['sd_Management'] . ']</a>' : '', ! ! ! )); ! } } Index: simpledoc_index.php =================================================================== RCS file: /cvsroot/mxbb/mx_simpledoc/simpledoc/modules/simpledoc_index.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** simpledoc_index.php 23 Apr 2006 19:21:27 -0000 1.1 --- simpledoc_index.php 17 Jun 2006 20:50:47 -0000 1.2 *************** *** 8,21 **** * */ ! class mx_simpledoc_index extends mx_simpledoc_public { function main( $action ) { ! global $template, $lang, $db, $theme, $board_config, $phpEx, $simpledoc_config, $debug, $mx_root_path, $module_root_path, $CONTENT, $PUBLISH; global $mx_page, $mx_block, $simpledoc_projectName; ! $template->set_filenames( array( 'body' => 'simpledoc_index.tpl' )); ! // // Build the $tree and html --- 8,26 ---- * */ ! ! if( !defined('IN_PORTAL') ) ! { ! die("Hacking attempt"); ! } ! class mx_simpledoc_index extends mx_simpledoc_public { function main( $action ) { ! global $template, $lang, $db, $theme, $board_config, $phpEx, $simpledoc_config, $debug, $mx_root_path, $module_root_path, $CONTENT, $PUBLISH; global $mx_page, $mx_block, $simpledoc_projectName; ! $template->set_filenames( array( 'body' => 'simpledoc_index.tpl' )); ! // // Build the $tree and html *************** *** 23,38 **** $tree = array(); $this->build_tree($tree, $CONTENT); ! $tree_html = $this->build_tree_html($tree); ! ! $template->assign_vars( array( 'MX_ROOT_PATH' => $mx_root_path, 'MODULE_ROOT_PATH' => $module_root_path, 'TEMPLATE_PATH' => $template->module_template_path, ! 'BLOCK_ID' => $mx_block->block_id, 'PAGE_ID' => $mx_page->page_id, ! 'L_PROJECT_NAME' => $simpledoc_projectName, ! // // Menu --- 28,43 ---- $tree = array(); $this->build_tree($tree, $CONTENT); ! $tree_html = $this->build_tree_html($tree); ! ! $template->assign_vars( array( 'MX_ROOT_PATH' => $mx_root_path, 'MODULE_ROOT_PATH' => $module_root_path, 'TEMPLATE_PATH' => $template->module_template_path, ! 'BLOCK_ID' => $mx_block->block_id, 'PAGE_ID' => $mx_page->page_id, ! 'L_PROJECT_NAME' => $simpledoc_projectName, ! // // Menu *************** *** 45,50 **** 'MODE_SETTINGS_URL' => $this->this_simpledoc_mxurl('mode=settings'), 'MODE_VIEW_URL' => $this->this_simpledoc_mxurl('mode=view'), ! 'TREE_HTML' => $tree_html, ! // // Theme --- 50,55 ---- 'MODE_SETTINGS_URL' => $this->this_simpledoc_mxurl('mode=settings'), 'MODE_VIEW_URL' => $this->this_simpledoc_mxurl('mode=view'), ! 'TREE_HTML' => $tree_html, ! // // Theme *************** *** 64,110 **** 'T_TD_COLOR2' => '#'.$theme['td_color2'], // Background post/input ! // // Menu langs // ! 'L_PROJECT' => $lang['sd_Project'], ! 'L_MANAGEMENT' => $lang['sd_Management'], ! 'L_PUBLISH' => $lang['sd_Publish'], ! 'L_IMPORT_CONTENT' => $lang['sd_Import_content'], ! 'L_EXPORT_CONTENT' => $lang['sd_Export_content'], ! 'L_OPTIONS' => $lang['sd_Options'], ! 'L_SETTINGS' => $lang['sd_Settings'], ! 'L_DOC_VIEW' => $lang['sd_Doc_view'], ! 'L_HELP' => $lang['sd_Help'], ! 'L_CONTENTS' => $lang['sd_Contents'], ! 'L_ABOUT' => $lang['sd_About'], ! // // Tree // ! 'L_TREE_VIEW' => $lang['sd_Tree_View'], ! 'L_TOC' => $lang['sd_Toc'], ! 'L_WHERE' => $lang['sd_Where'], ! 'L_BEFORE' => $lang['sd_Before'], ! 'L_AFTER' => $lang['sd_After'], ! 'L_TYPE' => $lang['sd_Type'], ! 'L_NAME' => $lang['sd_Name'], ! 'L_DOCUMENT' => $lang['sd_Document'], ! 'L_FOLDER' => $lang['sd_Folder'], ! // // Index // ! 'L_DOC_INFO' => $lang['sd_Doc_info'], ! 'L_DOC_PREVIEW' => $lang['sd_Doc_preview'], ! 'L_EDIT_CONTENT' => $lang['sd_Edit_content'], ! 'L_DEFAULT_EDIT' => $lang['sd_Default_edit'], ! 'L_LOADING' => $lang['sd_Loading'], ! 'L_SAVING' => $lang['sd_Saving'], ! 'VIEW_DOC' => ' - <a href="'.$this->this_simpledoc_mxurl('mode=view').'" >[' . $lang['sd_Doc_view'] . ']</a>', ! ! )); ! } } --- 69,115 ---- 'T_TD_COLOR2' => '#'.$theme['td_color2'], // Background post/input ! // // Menu langs // ! 'L_PROJECT' => $lang['sd_Project'], ! 'L_MANAGEMENT' => $lang['sd_Management'], ! 'L_PUBLISH' => $lang['sd_Publish'], ! 'L_IMPORT_CONTENT' => $lang['sd_Import_content'], ! 'L_EXPORT_CONTENT' => $lang['sd_Export_content'], ! 'L_OPTIONS' => $lang['sd_Options'], ! 'L_SETTINGS' => $lang['sd_Settings'], ! 'L_DOC_VIEW' => $lang['sd_Doc_view'], ! 'L_HELP' => $lang['sd_Help'], ! 'L_CONTENTS' => $lang['sd_Contents'], ! 'L_ABOUT' => $lang['sd_About'], ! // // Tree // ! 'L_TREE_VIEW' => $lang['sd_Tree_View'], ! 'L_TOC' => $lang['sd_Toc'], ! 'L_WHERE' => $lang['sd_Where'], ! 'L_BEFORE' => $lang['sd_Before'], ! 'L_AFTER' => $lang['sd_After'], ! 'L_TYPE' => $lang['sd_Type'], ! 'L_NAME' => $lang['sd_Name'], ! 'L_DOCUMENT' => $lang['sd_Document'], ! 'L_FOLDER' => $lang['sd_Folder'], ! // // Index // ! 'L_DOC_INFO' => $lang['sd_Doc_info'], ! 'L_DOC_PREVIEW' => $lang['sd_Doc_preview'], ! 'L_EDIT_CONTENT' => $lang['sd_Edit_content'], ! 'L_DEFAULT_EDIT' => $lang['sd_Default_edit'], ! 'L_LOADING' => $lang['sd_Loading'], ! 'L_SAVING' => $lang['sd_Saving'], ! 'VIEW_DOC' => ' - <a href="'.$this->this_simpledoc_mxurl('mode=view').'" >[' . $lang['sd_Doc_view'] . ']</a>', ! ! )); ! } } Index: simpledoc_export.php =================================================================== RCS file: /cvsroot/mxbb/mx_simpledoc/simpledoc/modules/simpledoc_export.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** simpledoc_export.php 23 Apr 2006 19:21:27 -0000 1.1 --- simpledoc_export.php 17 Jun 2006 20:50:47 -0000 1.2 *************** *** 8,17 **** * */ ! class mx_simpledoc_export extends mx_simpledoc_public { function main( $action ) { ! global $template, $lang, $db, $board_config, $phpEx, $simpledoc_config, $debug, $mx_root_path, $module_root_path, $CONTENT, $PUBLISH; $this->send_zip($CONTENT, 'content-'.date('Y-m-d').'.zip', 'content-'.date('Y-m-d')); --- 8,22 ---- * */ ! ! if( !defined('IN_PORTAL') ) ! { ! die("Hacking attempt"); ! } ! class mx_simpledoc_export extends mx_simpledoc_public { function main( $action ) { ! global $template, $lang, $db, $board_config, $phpEx, $simpledoc_config, $debug, $mx_root_path, $module_root_path, $CONTENT, $PUBLISH; $this->send_zip($CONTENT, 'content-'.date('Y-m-d').'.zip', 'content-'.date('Y-m-d')); Index: simpledoc_view.php =================================================================== RCS file: /cvsroot/mxbb/mx_simpledoc/simpledoc/modules/simpledoc_view.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** simpledoc_view.php 23 Apr 2006 19:21:27 -0000 1.1 --- simpledoc_view.php 17 Jun 2006 20:50:47 -0000 1.2 *************** *** 8,23 **** * */ ! class mx_simpledoc_view extends mx_simpledoc_public { function main( $action ) { ! global $template, $lang, $db, $theme, $board_config, $phpEx, $simpledoc_config, $debug, $mx_root_path, $module_root_path, $CONTENT, $PUBLISH; global $mx_page, $mx_block, $simpledoc_projectName; ! $template->set_filenames( array( 'body' => 'simpledoc_view.tpl' )); ! $edit_auth = ( $mx_block->auth_view && $mx_block->auth_edit && $mx_block->show_block ) || $mx_block->auth_mod ? true : false; ! $published_folder = $PUBLISH . '/html'; --- 8,28 ---- * */ ! ! if( !defined('IN_PORTAL') ) ! { ! die("Hacking attempt"); ! } ! class mx_simpledoc_view extends mx_simpledoc_public { function main( $action ) { ! global $template, $lang, $db, $theme, $board_config, $phpEx, $simpledoc_config, $debug, $mx_root_path, $module_root_path, $CONTENT, $PUBLISH; global $mx_page, $mx_block, $simpledoc_projectName; ! $template->set_filenames( array( 'body' => 'simpledoc_view.tpl' )); ! $edit_auth = ( $mx_block->auth_view && $mx_block->auth_edit && $mx_block->show_block ) || $mx_block->auth_mod ? true : false; ! $published_folder = $PUBLISH . '/html'; *************** *** 27,42 **** $tree = array(); $this->build_tree($tree, $published_folder); ! $tree_html = $this->build_tree_html($tree); ! ! $template->assign_vars( array( 'MX_ROOT_PATH' => $mx_root_path, 'MODULE_ROOT_PATH' => $module_root_path, 'TEMPLATE_PATH' => $template->module_template_path, ! 'BLOCK_ID' => $mx_block->block_id, 'PAGE_ID' => $mx_page->page_id, ! ! 'L_PROJECT_NAME' => $simpledoc_projectName, ! // // Menu --- 32,47 ---- $tree = array(); $this->build_tree($tree, $published_folder); ! $tree_html = $this->build_tree_html($tree); ! ! $template->assign_vars( array( 'MX_ROOT_PATH' => $mx_root_path, 'MODULE_ROOT_PATH' => $module_root_path, 'TEMPLATE_PATH' => $template->module_template_path, ! 'BLOCK_ID' => $mx_block->block_id, 'PAGE_ID' => $mx_page->page_id, ! ! 'L_PROJECT_NAME' => $simpledoc_projectName, ! // // Menu *************** *** 48,80 **** 'MODE_EXPORT_URL' => $this->this_simpledoc_mxurl('mode=export'), 'MODE_SETTINGS_URL' => $this->this_simpledoc_mxurl('mode=settings'), ! 'TREE_HTML' => $tree_html, ! // // Menu langs // ! 'L_PROJECT' => $lang['sd_Project'], ! 'L_MANAGEMENT' => $lang['sd_Management'], ! 'L_PUBLISH' => $lang['sd_Publish'], ! 'L_IMPORT_CONTENT' => $lang['sd_Import_content'], ! 'L_EXPORT_CONTENT' => $lang['sd_Export_content'], ! 'L_OPTIONS' => $lang['sd_Options'], ! 'L_SETTINGS' => $lang['sd_Settings'], ! 'L_HELP' => $lang['sd_Help'], ! 'L_CONTENTS' => $lang['sd_Contents'], ! 'L_ABOUT' => $lang['sd_About'], ! // // Tree // ! 'L_TREE_VIEW' => $lang['sd_Tree_View'], 'L_TOC' => $lang['sd_Toc'], ! 'L_WHERE' => $lang['sd_Where'], ! 'L_BEFORE' => $lang['sd_Before'], ! 'L_AFTER' => $lang['sd_After'], ! 'L_TYPE' => $lang['sd_Type'], ! 'L_NAME' => $lang['sd_Name'], ! 'L_DOCUMENT' => $lang['sd_Document'], ! 'L_FOLDER' => $lang['sd_Folder'], ! // // Theme --- 53,85 ---- 'MODE_EXPORT_URL' => $this->this_simpledoc_mxurl('mode=export'), 'MODE_SETTINGS_URL' => $this->this_simpledoc_mxurl('mode=settings'), ! 'TREE_HTML' => $tree_html, ! // // Menu langs // ! 'L_PROJECT' => $lang['sd_Project'], ! 'L_MANAGEMENT' => $lang['sd_Management'], ! 'L_PUBLISH' => $lang['sd_Publish'], ! 'L_IMPORT_CONTENT' => $lang['sd_Import_content'], ! 'L_EXPORT_CONTENT' => $lang['sd_Export_content'], ! 'L_OPTIONS' => $lang['sd_Options'], ! 'L_SETTINGS' => $lang['sd_Settings'], ! 'L_HELP' => $lang['sd_Help'], ! 'L_CONTENTS' => $lang['sd_Contents'], ! 'L_ABOUT' => $lang['sd_About'], ! // // Tree // ! 'L_TREE_VIEW' => $lang['sd_Tree_View'], 'L_TOC' => $lang['sd_Toc'], ! 'L_WHERE' => $lang['sd_Where'], ! 'L_BEFORE' => $lang['sd_Before'], ! 'L_AFTER' => $lang['sd_After'], ! 'L_TYPE' => $lang['sd_Type'], ! 'L_NAME' => $lang['sd_Name'], ! 'L_DOCUMENT' => $lang['sd_Document'], ! 'L_FOLDER' => $lang['sd_Folder'], ! // // Theme *************** *** 92,111 **** 'T_FONTFACE1' => $theme['fontface1'], 'T_TD_COLOR1' => '#'.$theme['td_color1'], // Background code/quote ! 'T_TD_COLOR2' => '#'.$theme['td_color2'], // Background post/input ! // // View // ! 'L_DOC_INFO' => $lang['sd_Doc_info'], ! 'L_EDIT_CONTENT' => $lang['sd_Edit_content'], ! 'L_DEFAULT_EDIT' => $lang['sd_Default_edit'], ! 'L_LOADING' => $lang['sd_Loading'], 'L_SAVING' => $lang['sd_Saving'], ! 'MANAGE' => $edit_auth ? ' - <a href="'.$this->this_simpledoc_mxurl('mode=index').'" >[' . $lang['sd_Management'] . ']</a>' : '', ! ! ! )); ! } } --- 97,116 ---- 'T_FONTFACE1' => $theme['fontface1'], 'T_TD_COLOR1' => '#'.$theme['td_color1'], // Background code/quote ! 'T_TD_COLOR2' => '#'.$theme['td_color2'], // Background post/input ! // // View // ! 'L_DOC_INFO' => $lang['sd_Doc_info'], ! 'L_EDIT_CONTENT' => $lang['sd_Edit_content'], ! 'L_DEFAULT_EDIT' => $lang['sd_Default_edit'], ! 'L_LOADING' => $lang['sd_Loading'], 'L_SAVING' => $lang['sd_Saving'], ! 'MANAGE' => $edit_auth ? ' - <a href="'.$this->this_simpledoc_mxurl('mode=index').'" >[' . $lang['sd_Management'] . ']</a>' : '', ! ! ! )); ! } } Index: simpledoc_publish_export.php =================================================================== RCS file: /cvsroot/mxbb/mx_simpledoc/simpledoc/modules/simpledoc_publish_export.php,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** simpledoc_publish_export.php 23 Apr 2006 19:21:27 -0000 1.1 --- simpledoc_publish_export.php 17 Jun 2006 20:50:47 -0000 1.2 *************** *** 8,17 **** * */ ! class mx_simpledoc_publish_export extends mx_simpledoc_public { function main( $action ) { ! global $template, $lang, $db, $board_config, $phpEx, $simpledoc_config, $debug, $mx_root_path, $module_root_path, $CONTENT, $PUBLISH, $CHMOD_FILE, $CHMOD_DIR, $SORT, $mx_simpledoc_functions; global $mx_page, $simpledoc_projectName; --- 8,22 ---- * */ ! ! if( !defined('IN_PORTAL') ) ! { ! die("Hacking attempt"); ! } ! class mx_simpledoc_publish_export extends mx_simpledoc_public { function main( $action ) { ! global $template, $lang, $db, $board_config, $phpEx, $simpledoc_config, $debug, $mx_root_path, $module_root_path, $CONTENT, $PUBLISH, $CHMOD_FILE, $CHMOD_DIR, $SORT, $mx_simpledoc_functions; global $mx_page, $simpledoc_projectName; *************** *** 19,23 **** $publish_dir = get('publish_dir'); $section = get('section'); ! switch ($template) { case 'tree': --- 24,28 ---- $publish_dir = get('publish_dir'); $section = get('section'); ! switch ($template) { case 'tree': *************** *** 27,31 **** $TMP = $PUBLISH.'/tmp-'.$DIR; $SECTION = $section ? $CONTENT.'/'.$section : $CONTENT; ! if ($publish_dir) { IoDir::delete($PUBLISH, false); --- 32,36 ---- $TMP = $PUBLISH.'/tmp-'.$DIR; $SECTION = $section ? $CONTENT.'/'.$section : $CONTENT; ! if ($publish_dir) { IoDir::delete($PUBLISH, false); *************** *** 34,39 **** IoDir::delete($TMP); sugolib_redirect($module_root_path . 'redirect.php?msg=Published+successfully&url=./../../index.php?page=' . $mx_page->page_id . '&mode=publish'); ! } ! else { include $module_root_path . "simpledoc/shared/publish/$template.php"; --- 39,44 ---- IoDir::delete($TMP); sugolib_redirect($module_root_path . 'redirect.php?msg=Published+successfully&url=./../../index.php?page=' . $mx_page->page_id . '&mode=publish'); ! } ! else { include $module_root_path . "simpledoc/shared/publish/$template.php"; *************** *** 46,50 **** break; } ! } } --- 51,55 ---- break; } ! } } |
|
From: Jon O. <jon...@us...> - 2006-06-17 20:50:19
|
Update of /cvsroot/mxbb/mx_quotations/includes In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv6753/modules/mx_quotations/includes Modified Files: mx_quotations_constants.php Log Message: security Index: mx_quotations_constants.php =================================================================== RCS file: /cvsroot/mxbb/mx_quotations/includes/mx_quotations_constants.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** mx_quotations_constants.php 5 Apr 2006 23:04:08 -0000 1.2 --- mx_quotations_constants.php 17 Jun 2006 20:50:15 -0000 1.3 *************** *** 8,12 **** * */ ! // ------------------------------------------------------------------------- // This file defines specific constants for the module --- 8,17 ---- * */ ! ! if( !defined('IN_PORTAL') ) ! { ! die("Hacking attempt"); ! } ! // ------------------------------------------------------------------------- // This file defines specific constants for the module *************** *** 24,28 **** // ------------------------------------------------------------------------- $mx_user->extend(MX_LANG_MAIN, MX_IMAGES_NONE); ! $mx_page->add_copyright( 'mxBB Quotations Module' ); } --- 29,33 ---- // ------------------------------------------------------------------------- $mx_user->extend(MX_LANG_MAIN, MX_IMAGES_NONE); ! $mx_page->add_copyright( 'mxBB Quotations Module' ); } |
|
From: Jon O. <jon...@us...> - 2006-06-17 20:50:18
|
Update of /cvsroot/mxbb/mx_quotations In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv6753/modules/mx_quotations Modified Files: mx_last_quotations.php mx_quotations.php Log Message: security Index: mx_last_quotations.php =================================================================== RCS file: /cvsroot/mxbb/mx_quotations/mx_last_quotations.php,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** mx_last_quotations.php 5 Apr 2006 23:04:07 -0000 1.8 --- mx_last_quotations.php 17 Jun 2006 20:50:15 -0000 1.9 *************** *** 8,12 **** * */ ! // // Set $limit to the number of quotes you want to display --- 8,17 ---- * */ ! ! if( !defined('IN_PORTAL') || !is_object($mx_block)) ! { ! die("Hacking attempt"); ! } ! // // Set $limit to the number of quotes you want to display *************** *** 54,58 **** $author = array(); ! $template->set_filenames( array( "mx_last_quotations" => "mx_last_quotations.tpl" ) ); --- 59,63 ---- $author = array(); ! $template->set_filenames( array( "mx_last_quotations" => "mx_last_quotations.tpl" ) ); *************** *** 77,82 **** 'AUTHOR' => $author, 'POSTER' => $poster, ! 'POST_TIME' => $post_time ! ) ); } --- 82,87 ---- 'AUTHOR' => $author, 'POSTER' => $poster, ! 'POST_TIME' => $post_time ! ) ); } *************** *** 85,89 **** { $no_quotes_msg = ( !empty( $lang['No_quotes'] ) ? $lang['No_quotes'] : 'Sorry No Quotes' ); ! $template->assign_vars( array( 'L_NO_QUOTES' => $no_quotes_msg ) ); --- 90,94 ---- { $no_quotes_msg = ( !empty( $lang['No_quotes'] ) ? $lang['No_quotes'] : 'Sorry No Quotes' ); ! $template->assign_vars( array( 'L_NO_QUOTES' => $no_quotes_msg ) ); *************** *** 97,101 **** 'BLOCK_SIZE' => ( !empty( $block_size ) ? $block_size : '100%' ), 'L_TITLE' => ( !empty( $lang[$title] ) ? $lang[$title] : $title ), ! 'L_POSTED_BY' => ( !empty( $lang['Posted_by'] ) ? $lang['Posted_by'] : 'Posted by:' ) ) ); --- 102,106 ---- 'BLOCK_SIZE' => ( !empty( $block_size ) ? $block_size : '100%' ), 'L_TITLE' => ( !empty( $lang[$title] ) ? $lang[$title] : $title ), ! 'L_POSTED_BY' => ( !empty( $lang['Posted_by'] ) ? $lang['Posted_by'] : 'Posted by:' ) ) ); Index: mx_quotations.php =================================================================== RCS file: /cvsroot/mxbb/mx_quotations/mx_quotations.php,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** mx_quotations.php 2 May 2006 23:28:43 -0000 1.12 --- mx_quotations.php 17 Jun 2006 20:50:15 -0000 1.13 *************** *** 30,33 **** --- 30,37 ---- else { + if( !defined('IN_PORTAL') || !is_object($mx_block)) + { + die("Hacking attempt"); + } // // Read Block Settings |
|
From: Jon O. <jon...@us...> - 2006-06-17 20:49:56
|
Update of /cvsroot/mxbb/mx_profilecp In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv6302/modules/mx_profilecp Modified Files: profile.php Log Message: security Index: profile.php =================================================================== RCS file: /cvsroot/mxbb/mx_profilecp/profile.php,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** profile.php 2 May 2006 23:28:36 -0000 1.10 --- profile.php 17 Jun 2006 20:49:53 -0000 1.11 *************** *** 38,41 **** --- 38,45 ---- else { + if( !defined('IN_PORTAL') || !is_object($mx_block)) + { + die("Hacking attempt"); + } // // Read Block Settings |
|
From: Jon O. <jon...@us...> - 2006-06-17 20:49:28
|
Update of /cvsroot/mxbb/mx_pafiledb In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv6231/modules/mx_pafiledb Modified Files: dload.php dload_lists.php dload_quickdl.php Log Message: security Index: dload_lists.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/dload_lists.php,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** dload_lists.php 17 Jun 2006 20:13:22 -0000 1.18 --- dload_lists.php 17 Jun 2006 20:49:26 -0000 1.19 *************** *** 39,42 **** --- 39,46 ---- else { + if( !defined('IN_PORTAL') || !is_object($mx_block)) + { + die("Hacking attempt"); + } // // Read Block Settings Index: dload.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/dload.php,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** dload.php 17 Jun 2006 20:13:22 -0000 1.20 --- dload.php 17 Jun 2006 20:49:26 -0000 1.21 *************** *** 67,70 **** --- 67,74 ---- else { + if( !defined('IN_PORTAL') || !is_object($mx_block)) + { + die("Hacking attempt"); + } // // Read Block Settings (default mode) Index: dload_quickdl.php =================================================================== RCS file: /cvsroot/mxbb/mx_pafiledb/dload_quickdl.php,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** dload_quickdl.php 17 Jun 2006 20:13:22 -0000 1.10 --- dload_quickdl.php 17 Jun 2006 20:49:26 -0000 1.11 *************** *** 39,42 **** --- 39,46 ---- else { + if( !defined('IN_PORTAL') || !is_object($mx_block)) + { + die("Hacking attempt"); + } // // Read Block Settings |
|
From: Jon O. <jon...@us...> - 2006-06-17 20:49:05
|
Update of /cvsroot/mxbb/mx_newssuite In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv5967/modules/mx_newssuite Modified Files: news.php Log Message: security Index: news.php =================================================================== RCS file: /cvsroot/mxbb/mx_newssuite/news.php,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** news.php 5 Apr 2006 22:35:24 -0000 1.14 --- news.php 17 Jun 2006 20:49:02 -0000 1.15 *************** *** 9,12 **** --- 9,17 ---- */ + if( !defined('IN_PORTAL') || !is_object($mx_block)) + { + die("Hacking attempt"); + } + $newssuite_config = ''; $category_nav_mode = ''; *************** *** 74,78 **** $news_sort_method_pin = $newssuite_config['news_mode_pinning'] == '1'; // order by type $news_sort_par = $newssuite_config['news_sort_par']; // ASC, DESC ! $news_filter_time = $newssuite_config['news_filter_time']; // no limit, last day, 2 days, 3 days, week, 2 weeks, 3 weeks, month, 2 months, 3 months, 6 months, i year, // --- 79,83 ---- $news_sort_method_pin = $newssuite_config['news_mode_pinning'] == '1'; // order by type $news_sort_par = $newssuite_config['news_sort_par']; // ASC, DESC ! $news_filter_time = $newssuite_config['news_filter_time']; // no limit, last day, 2 days, 3 days, week, 2 weeks, 3 weeks, month, 2 months, 3 months, 6 months, i year, // *************** *** 89,108 **** { case 'Default_Block_Mode': ! $template->set_filenames( array( 'body' => 'news_body.tpl' ) ); break; case 'Newspaper_Mode': ! $template->set_filenames( array( 'body' => 'news_body_paper.tpl' ) ); break; case 'Category_Nav_Mode': ! $template->set_filenames( array( 'body' => 'news_body_nav.tpl' ) ); $category_nav_mode = true; break; default: ! $template->set_filenames( array( 'body' => 'news_body.tpl' ) ); --- 94,113 ---- { case 'Default_Block_Mode': ! $template->set_filenames( array( 'body' => 'news_body.tpl' ) ); break; case 'Newspaper_Mode': ! $template->set_filenames( array( 'body' => 'news_body_paper.tpl' ) ); break; case 'Category_Nav_Mode': ! $template->set_filenames( array( 'body' => 'news_body_nav.tpl' ) ); $category_nav_mode = true; break; default: ! $template->set_filenames( array( 'body' => 'news_body.tpl' ) ); *************** *** 113,120 **** { $template->assign_block_vars( "switch_standard_title", array() ); ! } // Assign some basic language variables ! // $template->assign_vars( array( 'BLOCK_SIZE' => $block_size, 'BLOCK_ID' => $block_id, --- 118,125 ---- { $template->assign_block_vars( "switch_standard_title", array() ); ! } // Assign some basic language variables ! // $template->assign_vars( array( 'BLOCK_SIZE' => $block_size, 'BLOCK_ID' => $block_id, *************** *** 129,134 **** 'L_NEWS_NONE' => $lang['News_none'], ! 'NEWS_BLOCK_BORDER_STYLE' => $news_block_border_style ! ) ); --- 134,139 ---- 'L_NEWS_NONE' => $lang['News_none'], ! 'NEWS_BLOCK_BORDER_STYLE' => $news_block_border_style ! ) ); *************** *** 143,151 **** $news_type_select_data = array(); $news_type_select_data[$item_types_all] = array(); ! for( $z = 0; $z < ( count( $item_types_array ) ); $z++ ) { $news_type_select_data[$item_types_array[$z]] = array(); ! } } --- 148,156 ---- $news_type_select_data = array(); $news_type_select_data[$item_types_all] = array(); ! for( $z = 0; $z < ( count( $item_types_array ) ); $z++ ) { $news_type_select_data[$item_types_array[$z]] = array(); ! } } |
|
From: Jon O. <jon...@us...> - 2006-06-17 20:48:36
|
Update of /cvsroot/mxbb/mx_linkdb In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv5687/modules/mx_linkdb Modified Files: linkdb.php Log Message: security Index: linkdb.php =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/linkdb.php,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** linkdb.php 2 May 2006 23:27:29 -0000 1.7 --- linkdb.php 17 Jun 2006 20:48:33 -0000 1.8 *************** *** 37,40 **** --- 37,44 ---- else { + if( !defined('IN_PORTAL') || !is_object($mx_block)) + { + die("Hacking attempt"); + } // // Read Block Settings |
|
From: Jon O. <jon...@us...> - 2006-06-17 20:48:36
|
Update of /cvsroot/mxbb/mx_linkdb/linkdb/includes In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv5687/modules/mx_linkdb/linkdb/includes Modified Files: functions.php functions_linkdb.php linkdb_common.php Log Message: security Index: functions.php =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/linkdb/includes/functions.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** functions.php 2 May 2006 23:27:29 -0000 1.6 --- functions.php 17 Jun 2006 20:48:33 -0000 1.7 *************** *** 9,15 **** */ ! if ( !defined( 'IN_PHPBB' ) ) { ! die( "Hacking attempt" ); } --- 9,15 ---- */ ! if( !defined('IN_PORTAL') ) { ! die("Hacking attempt"); } *************** *** 46,50 **** global $db; ! $sql = "SELECT * FROM " . LINK_CONFIG_TABLE; --- 46,50 ---- global $db; ! $sql = "SELECT * FROM " . LINK_CONFIG_TABLE; *************** *** 62,70 **** return ( $linkdb_config ); ! } ! // since that I can't use the original function with new template system // I just copy it and chagne it ! function sql_query_limit( $query, $total, $offset = 0 ) { --- 62,70 ---- return ( $linkdb_config ); ! } ! // since that I can't use the original function with new template system // I just copy it and chagne it ! function sql_query_limit( $query, $total, $offset = 0 ) { *************** *** 79,84 **** global $db, $lang; ! $sql = "SELECT AVG(rate_point) AS rating ! FROM " . LINK_VOTES_TABLE . " WHERE votes_link = '" . $link_id . "'"; --- 79,84 ---- global $db, $lang; ! $sql = "SELECT AVG(rate_point) AS rating ! FROM " . LINK_VOTES_TABLE . " WHERE votes_link = '" . $link_id . "'"; *************** *** 101,106 **** $where_sql = ( $userdata['user_id'] != ANONYMOUS ) ? "user_id = '" . $userdata['user_id'] . "'" : "votes_ip = '" . $user_ip . "'"; ! $sql = "SELECT user_id, votes_ip ! FROM " . LINK_VOTES_TABLE . " WHERE $where_sql AND votes_link = '" . $link_id . "' --- 101,106 ---- $where_sql = ( $userdata['user_id'] != ANONYMOUS ) ? "user_id = '" . $userdata['user_id'] . "'" : "votes_ip = '" . $user_ip . "'"; ! $sql = "SELECT user_id, votes_ip ! FROM " . LINK_VOTES_TABLE . " WHERE $where_sql AND votes_link = '" . $link_id . "' *************** *** 114,118 **** if ( !$db->sql_numrows( $result ) ) { ! $sql = "INSERT INTO " . LINK_VOTES_TABLE . " (user_id, votes_ip, votes_link, rate_point) VALUES('" . $userdata['user_id'] . "', '" . $user_ip . "', '" . $link_id . "','" . $rating . "')"; if ( !( $db->sql_query( $sql ) ) ) --- 114,118 ---- if ( !$db->sql_numrows( $result ) ) { ! $sql = "INSERT INTO " . LINK_VOTES_TABLE . " (user_id, votes_ip, votes_link, rate_point) VALUES('" . $userdata['user_id'] . "', '" . $user_ip . "', '" . $link_id . "','" . $rating . "')"; if ( !( $db->sql_query( $sql ) ) ) Index: linkdb_common.php =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/linkdb/includes/linkdb_common.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** linkdb_common.php 5 Apr 2006 22:35:24 -0000 1.4 --- linkdb_common.php 17 Jun 2006 20:48:33 -0000 1.5 *************** *** 9,15 **** */ ! if ( !defined( 'IN_PHPBB' ) ) { ! die( "Hacking attempt" ); } --- 9,15 ---- */ ! if( !defined('IN_PORTAL') ) { ! die("Hacking attempt"); } Index: functions_linkdb.php =================================================================== RCS file: /cvsroot/mxbb/mx_linkdb/linkdb/includes/functions_linkdb.php,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** functions_linkdb.php 2 May 2006 23:27:29 -0000 1.6 --- functions_linkdb.php 17 Jun 2006 20:48:33 -0000 1.7 *************** *** 9,27 **** */ ! if ( !defined( 'IN_PHPBB' ) ) { ! die( "Hacking attempt" ); } // public linkdb class ! // class linkdb_public extends linkdb { var $modules = array(); ! var $module_name = ''; ! // load module // $module name : send module name to load it ! function adminmodule( $module_name ) { --- 9,27 ---- */ ! if( !defined('IN_PORTAL') ) { ! die("Hacking attempt"); } // public linkdb class ! // class linkdb_public extends linkdb { var $modules = array(); ! var $module_name = ''; ! // load module // $module name : send module name to load it ! function adminmodule( $module_name ) { *************** *** 58,74 **** } } ! } ! // this will be replaced by the loaded module ! // function main( $module_id = false ) { return false; ! } ! // go ahead and output the page // $page title : send page title // $tpl_name : template file name ! function display( $page_title1, $tpl_name ) { --- 58,74 ---- } } ! } ! // this will be replaced by the loaded module ! // function main( $module_id = false ) { return false; ! } ! // go ahead and output the page // $page title : send page title // $tpl_name : template file name ! function display( $page_title1, $tpl_name ) { *************** *** 103,107 **** unset( $this->subcat_rowset ); ! $sql = 'SELECT * FROM ' . LINK_CATEGORIES_TABLE . ' ORDER BY cat_order ASC'; --- 103,107 ---- unset( $this->subcat_rowset ); ! $sql = 'SELECT * FROM ' . LINK_CATEGORIES_TABLE . ' ORDER BY cat_order ASC'; *************** *** 121,126 **** $this->total_cat++; } ! } ! // Jump menu function // $cat_id : to handle parent cat_id --- 121,126 ---- $this->total_cat++; } ! } ! // Jump menu function // $cat_id : to handle parent cat_id *************** *** 129,133 **** // $for_file: TRUE high category ids will be -1 // $check_upload: if true permission for upload will be checked ! function jumpmenu_option( $cat_id = 0, $depth = 0, $default = '', $for_file = false, $check_upload = false ) { --- 129,133 ---- // $for_file: TRUE high category ids will be -1 // $check_upload: if true permission for upload will be checked ! function jumpmenu_option( $cat_id = 0, $depth = 0, $default = '', $for_file = false, $check_upload = false ) { *************** *** 190,197 **** return; } ! } ! // if there is no cat ! function cat_empty() { --- 190,197 ---- return; } ! } ! // if there is no cat ! function cat_empty() { *************** *** 202,210 **** { $this->modified = $true_false; ! } ! // get all sub category in side certain category // $cat_id : category id ! function get_sub_cat( $cat_id ) { --- 202,210 ---- { $this->modified = $true_false; ! } ! // get all sub category in side certain category // $cat_id : category id ! function get_sub_cat( $cat_id ) { *************** *** 245,250 **** $sql = 'SELECT file_time, file_id, file_name, file_catid ! FROM ' . LINKS_TABLE . " ! WHERE file_approved = '1' AND file_catid IN (" . $this->gen_cat_ids($cat_id) . ") ORDER BY file_time DESC"; --- 245,250 ---- $sql = 'SELECT file_time, file_id, file_name, file_catid ! FROM ' . LINKS_TABLE . " ! WHERE file_approved = '1' AND file_catid IN (" . $this->gen_cat_ids($cat_id) . ") ORDER BY file_time DESC"; *************** *** 264,269 **** { $sql = 'UPDATE ' . LINK_CATEGORIES_TABLE . " ! SET cat_last_file_id = " . intval($file_info['file_id']) . ", ! cat_last_file_name = '" . addslashes($file_info['file_name']) . "', cat_last_file_time = " . intval($file_info['file_time']) . " WHERE cat_id = $cat_id"; --- 264,269 ---- { $sql = 'UPDATE ' . LINK_CATEGORIES_TABLE . " ! SET cat_last_file_id = " . intval($file_info['file_id']) . ", ! cat_last_file_name = '" . addslashes($file_info['file_name']) . "', cat_last_file_time = " . intval($file_info['file_time']) . " WHERE cat_id = $cat_id"; *************** *** 311,315 **** { $template->assign_block_vars( 'navlinks', array( 'CAT_NAME' => $parent_name, ! 'U_VIEW_CAT' => append_sid( linkdb_this_mxurl( 'action=category&cat_id=' . $parent_cat_id ) ) ) ); } --- 311,315 ---- { $template->assign_block_vars( 'navlinks', array( 'CAT_NAME' => $parent_name, ! 'U_VIEW_CAT' => append_sid( linkdb_this_mxurl( 'action=category&cat_id=' . $parent_cat_id ) ) ) ); } *************** *** 317,321 **** $template->assign_block_vars( 'navlinks', array( 'CAT_NAME' => $this->cat_rowset[$cat_id]['cat_name'], ! 'U_VIEW_CAT' => append_sid( linkdb_this_mxurl( 'action=category&cat_id=' . $this->cat_rowset[$cat_id]['cat_id'] ) ) ) ); --- 317,321 ---- $template->assign_block_vars( 'navlinks', array( 'CAT_NAME' => $this->cat_rowset[$cat_id]['cat_name'], ! 'U_VIEW_CAT' => append_sid( linkdb_this_mxurl( 'action=category&cat_id=' . $this->cat_rowset[$cat_id]['cat_id'] ) ) ) ); *************** *** 340,345 **** $sql = 'SELECT COUNT(link_id) as total_files ! FROM ' . LINKS_TABLE . " ! WHERE link_approved = '1' AND link_catid IN (" . $this->gen_cat_ids( $cat_id ) . ') ORDER BY link_time DESC'; --- 340,345 ---- $sql = 'SELECT COUNT(link_id) as total_files ! FROM ' . LINKS_TABLE . " ! WHERE link_approved = '1' AND link_catid IN (" . $this->gen_cat_ids( $cat_id ) . ') ORDER BY link_time DESC'; *************** *** 409,420 **** $template->assign_vars( array( 'L_SUB_CAT' => $lang['Sub_category'], 'L_CATEGORY' => $lang['Category'], ! 'L_FILES' => $lang['Files'] ) ! ); // output the root level category if ( isset( $this->subcat_rowset[$cat_id] ) ) ! { ! // Separate link categories into $catcol columns, script by CRLin ! $catnum = count( $this->subcat_rowset[$cat_id] ); $catcol = $linkdb_config['cat_col']; --- 409,420 ---- $template->assign_vars( array( 'L_SUB_CAT' => $lang['Sub_category'], 'L_CATEGORY' => $lang['Category'], ! 'L_FILES' => $lang['Files'] ) ! ); // output the root level category if ( isset( $this->subcat_rowset[$cat_id] ) ) ! { ! // Separate link categories into $catcol columns, script by CRLin ! $catnum = count( $this->subcat_rowset[$cat_id] ); $catcol = $linkdb_config['cat_col']; *************** *** 433,442 **** $sub_cat = $this->get_sub_cat( $subcat_id ); ! $template->assign_block_vars( 'CAT_PARENT.catcol.no_cat_parent', array( 'U_CAT' => append_sid( linkdb_this_mxurl( 'action=category&cat_id=' . $subcat_id ) ), // 'SUB_CAT' => ( !empty($sub_cat) ) ? $sub_cat : $lang['None'], 'SUB_CAT' => ( !empty( $sub_cat ) ) ? " $sub_cat" : "", 'CAT_IMAGE' => $images['linkdb_folder'], 'CAT_NAME' => $subcat_row['cat_name'], ! 'FILECAT' => $this->file_in_cat( $subcat_id ) ) ); } --- 433,442 ---- $sub_cat = $this->get_sub_cat( $subcat_id ); ! $template->assign_block_vars( 'CAT_PARENT.catcol.no_cat_parent', array( 'U_CAT' => append_sid( linkdb_this_mxurl( 'action=category&cat_id=' . $subcat_id ) ), // 'SUB_CAT' => ( !empty($sub_cat) ) ? $sub_cat : $lang['None'], 'SUB_CAT' => ( !empty( $sub_cat ) ) ? " $sub_cat" : "", 'CAT_IMAGE' => $images['linkdb_folder'], 'CAT_NAME' => $subcat_row['cat_name'], ! 'FILECAT' => $this->file_in_cat( $subcat_id ) ) ); } *************** *** 471,475 **** AND f1.link_approved = 1 $cat_where ! GROUP BY f1.link_id ORDER BY $sort_method $sort_order"; break; --- 471,475 ---- AND f1.link_approved = 1 $cat_where ! GROUP BY f1.link_id ORDER BY $sort_method $sort_order"; break; *************** *** 482,486 **** WHERE f1.link_approved = 1 $cat_where ! GROUP BY f1.link_id ORDER BY $sort_method $sort_order"; break; --- 482,486 ---- WHERE f1.link_approved = 1 $cat_where ! GROUP BY f1.link_id ORDER BY $sort_method $sort_order"; break; *************** *** 501,505 **** $where_sql = ( !empty( $cat_id ) ) ? "AND link_catid = $cat_id" : ''; $sql = "SELECT COUNT(link_id) as total_file ! FROM " . LINKS_TABLE . " WHERE link_approved='1' $where_sql"; --- 501,505 ---- $where_sql = ( !empty( $cat_id ) ) ? "AND link_catid = $cat_id" : ''; $sql = "SELECT COUNT(link_id) as total_file ! FROM " . LINKS_TABLE . " WHERE link_approved='1' $where_sql"; *************** *** 549,553 **** 'START' => $start, ! 'S_ACTION_SORT' => append_sid( linkdb_this_mxurl( "action=$action" ) ) ) ); --- 549,553 ---- 'START' => $start, ! 'S_ACTION_SORT' => append_sid( linkdb_this_mxurl( "action=$action" ) ) ) ); *************** *** 557,568 **** } for ( $i = 0; $i < count( $file_rowset ); $i++ ) ! { ! // Format the date for the given file ! ! $date = create_date( $board_config['default_dateformat'], $file_rowset[$i]['link_time'], $board_config['board_timezone'] ); ! // If the file is new then put a new image in front of it ! /*$is_new = FALSE; if (time() - ($linkdb_config['settings_newdays'] * 24 * 60 * 60) < $file_rowset[$i]['link_time']) --- 557,568 ---- } for ( $i = 0; $i < count( $file_rowset ); $i++ ) ! { ! // Format the date for the given file ! ! $date = create_date( $board_config['default_dateformat'], $file_rowset[$i]['link_time'], $board_config['board_timezone'] ); ! // If the file is new then put a new image in front of it ! /*$is_new = FALSE; if (time() - ($linkdb_config['settings_newdays'] * 24 * 60 * 60) < $file_rowset[$i]['link_time']) *************** *** 577,584 **** $file_poster .= ( $file_rowset[$i]['user_id'] != ANONYMOUS ) ? $file_rowset[$i]['username'] : $file_rowset[$i]['post_username'] . '(' . $lang['Guest'] . ')'; $file_poster .= ( $file_rowset[$i]['user_id'] != ANONYMOUS ) ? '</a>' : ''; ! $file_rating = ( $file_rowset[$i]['rating'] != 0 ) ? round( $file_rowset[$i]['rating'], 2 ) . '/10' : $lang['Not_rated']; ! // Assign Vars ! $template->assign_block_vars( "FILELIST.file_rows", array( 'COLOR' => ( $linkdb_config['split_links'] ) ? "row1" : ( ( $i % 2 ) ? "row2" : "row1" ), 'L_NEW_FILE' => $lang['New_file'], --- 577,584 ---- $file_poster .= ( $file_rowset[$i]['user_id'] != ANONYMOUS ) ? $file_rowset[$i]['username'] : $file_rowset[$i]['post_username'] . '(' . $lang['Guest'] . ')'; $file_poster .= ( $file_rowset[$i]['user_id'] != ANONYMOUS ) ? '</a>' : ''; ! $file_rating = ( $file_rowset[$i]['rating'] != 0 ) ? round( $file_rowset[$i]['rating'], 2 ) . '/10' : $lang['Not_rated']; ! // Assign Vars ! $template->assign_block_vars( "FILELIST.file_rows", array( 'COLOR' => ( $linkdb_config['split_links'] ) ? "row1" : ( ( $i % 2 ) ? "row2" : "row1" ), 'L_NEW_FILE' => $lang['New_file'], *************** *** 599,603 **** 'U_CAT' => $cat_url, ! 'U_FILE' => append_sid( linkdb_this_mxurl( 'action=link&link_id=' . $file_rowset[$i]['link_id'] ) ) ) ); if ( $linkdb_config['allow_vote'] ) --- 599,603 ---- 'U_CAT' => $cat_url, ! 'U_FILE' => append_sid( linkdb_this_mxurl( 'action=link&link_id=' . $file_rowset[$i]['link_id'] ) ) ) ); if ( $linkdb_config['allow_vote'] ) *************** *** 616,620 **** $template->assign_vars( array( 'NO_FILE' => $show_file_message, 'L_NO_FILES' => $lang['No_links'], ! 'L_NO_FILES_CAT' => $lang['No_links_cat'] ) ); } --- 616,620 ---- $template->assign_vars( array( 'NO_FILE' => $show_file_message, 'L_NO_FILES' => $lang['No_links'], ! 'L_NO_FILES_CAT' => $lang['No_links_cat'] ) ); } *************** *** 645,652 **** return $banner; ! } ! // Admin and mod functions ! function update_add_cat( $cat_id = false ) { --- 645,652 ---- return $banner; ! } ! // Admin and mod functions ! function update_add_cat( $cat_id = false ) { *************** *** 692,696 **** $cat_order += 10; ! $sql = 'INSERT INTO ' . LINK_CATEGORIES_TABLE . " (cat_name, cat_parent, cat_order) VALUES('$cat_name', $cat_parent, $cat_order)"; --- 692,696 ---- $cat_order += 10; ! $sql = 'INSERT INTO ' . LINK_CATEGORIES_TABLE . " (cat_name, cat_parent, cat_order) VALUES('$cat_name', $cat_parent, $cat_order)"; *************** *** 702,706 **** else { ! $sql = 'UPDATE ' . LINK_CATEGORIES_TABLE . " SET cat_name = '$cat_name', cat_parent = $cat_parent WHERE cat_id = $cat_id"; --- 702,706 ---- else { ! $sql = 'UPDATE ' . LINK_CATEGORIES_TABLE . " SET cat_name = '$cat_name', cat_parent = $cat_parent WHERE cat_id = $cat_id"; *************** *** 759,763 **** } ! $sql = 'DELETE FROM ' . LINK_CATEGORIES_TABLE . " WHERE cat_id = $cat_id"; --- 759,763 ---- } ! $sql = 'DELETE FROM ' . LINK_CATEGORIES_TABLE . " WHERE cat_id = $cat_id"; *************** *** 798,802 **** $file_ids = array(); $files_data = array(); ! $sql = 'SELECT link_id FROM ' . LINKS_TABLE . " WHERE link_catid = $id"; --- 798,802 ---- $file_ids = array(); $files_data = array(); ! $sql = 'SELECT link_id FROM ' . LINKS_TABLE . " WHERE link_catid = $id"; *************** *** 817,821 **** else { ! $sql = 'SELECT link_id FROM ' . LINKS_TABLE . " WHERE link_id = $id"; --- 817,821 ---- else { ! $sql = 'SELECT link_id FROM ' . LINKS_TABLE . " WHERE link_id = $id"; *************** *** 884,888 **** $this->delete_subcat( $sub_cat_id, $file_mode, $to_cat ); ! $sql = 'DELETE FROM ' . LINK_CATEGORIES_TABLE . " WHERE cat_id = $sub_cat_id"; --- 884,888 ---- $this->delete_subcat( $sub_cat_id, $file_mode, $to_cat ); ! $sql = 'DELETE FROM ' . LINK_CATEGORIES_TABLE . " WHERE cat_id = $sub_cat_id"; *************** *** 1064,1075 **** else { ! $sql = "UPDATE " . LINKS_TABLE . " ! SET link_name = '" . str_replace( "\'", "''", $file_name ) . "', ! link_longdesc = '" . str_replace( "\'", "''", $file_long_desc ) . "', link_url = '$file_remote_url', link_logo_src = '$link_logo_src', ! link_catid = '$cat_id', ! link_hits = '$file_dls', ! link_approved = '$file_approved' WHERE link_id = '$file_id'"; } --- 1064,1075 ---- else { ! $sql = "UPDATE " . LINKS_TABLE . " ! SET link_name = '" . str_replace( "\'", "''", $file_name ) . "', ! link_longdesc = '" . str_replace( "\'", "''", $file_long_desc ) . "', link_url = '$file_remote_url', link_logo_src = '$link_logo_src', ! link_catid = '$cat_id', ! link_hits = '$file_dls', ! link_approved = '$file_approved' WHERE link_id = '$file_id'"; } |
|
From: Jon O. <jon...@us...> - 2006-06-17 20:48:15
|
Update of /cvsroot/mxbb/mx_kb In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv5620/modules/mx_kb Modified Files: kb.php kb_article_reader.php Log Message: security Index: kb.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/kb.php,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** kb.php 17 Jun 2006 20:11:23 -0000 1.31 --- kb.php 17 Jun 2006 20:48:10 -0000 1.32 *************** *** 79,82 **** --- 79,87 ---- else { + if( !defined('IN_PORTAL') || !is_object($mx_block)) + { + die("Hacking attempt"); + } + if ( MXBB_27x ) { Index: kb_article_reader.php =================================================================== RCS file: /cvsroot/mxbb/mx_kb/kb_article_reader.php,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** kb_article_reader.php 2 May 2006 23:27:19 -0000 1.14 --- kb_article_reader.php 17 Jun 2006 20:48:10 -0000 1.15 *************** *** 79,82 **** --- 79,86 ---- else { + if( !defined('IN_PORTAL') || !is_object($mx_block)) + { + die("Hacking attempt"); + } if ( MXBB_27x ) { |
|
From: Jon O. <jon...@us...> - 2006-06-17 20:47:46
|
Update of /cvsroot/mxbb/mx_import_tools/includes In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv5214/modules/mx_import_tools/includes Modified Files: functions_mod_user.php Log Message: security Index: functions_mod_user.php =================================================================== RCS file: /cvsroot/mxbb/mx_import_tools/includes/functions_mod_user.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** functions_mod_user.php 5 Apr 2006 22:33:30 -0000 1.5 --- functions_mod_user.php 17 Jun 2006 20:47:43 -0000 1.6 *************** *** 8,12 **** * */ ! include_once( $phpbb_root_path . 'includes/functions_validate.' . $phpEx ); include_once( $phpbb_root_path . 'includes/functions_post.' . $phpEx ); --- 8,17 ---- * */ ! ! if( !defined('IN_PORTAL') ) ! { ! die("Hacking attempt"); ! } ! include_once( $phpbb_root_path . 'includes/functions_validate.' . $phpEx ); include_once( $phpbb_root_path . 'includes/functions_post.' . $phpEx ); *************** *** 14,18 **** class user ! { // These are the 3 critical values for any user var $username; --- 19,23 ---- class user ! { // These are the 3 critical values for any user var $username; *************** *** 20,30 **** var $user_email; ! var $user_id; // The remaining userdata fields are stored in an array ! var $user_fields; // This stores details of any usergroups that the user should be in ! var $groups; // The constructor for this class ! // The password must be in MD5 format, but we'll handle escaping any special // characters in any field within the function --- 25,35 ---- var $user_email; ! var $user_id; // The remaining userdata fields are stored in an array ! var $user_fields; // This stores details of any usergroups that the user should be in ! var $groups; // The constructor for this class ! // The password must be in MD5 format, but we'll handle escaping any special // characters in any field within the function *************** *** 37,41 **** $this->user_email = $this->sql_escape( $email ); ! $this->user_id = ''; // Now we need to set the remaining fields to some default values // If you wish to integrate with another MOD, you should add any initilization --- 42,46 ---- $this->user_email = $this->sql_escape( $email ); ! $this->user_id = ''; // Now we need to set the remaining fields to some default values // If you wish to integrate with another MOD, you should add any initilization *************** *** 68,76 **** $this->user_fields['user_style'] = $board_config['default_style']; $this->user_fields['user_level'] = USER; ! $this->user_fields['user_posts'] = 0; // addon entries $this->user_fields['user_realname'] = $name; $this->user_fields['user_list_option'] = '0110000000100000000000000000101'; ! } // This function escapes any special characters in a string to allow for safe // use in the SQL query. It is used in the constructor and should be used on --- 73,81 ---- $this->user_fields['user_style'] = $board_config['default_style']; $this->user_fields['user_level'] = USER; ! $this->user_fields['user_posts'] = 0; // addon entries $this->user_fields['user_realname'] = $name; $this->user_fields['user_list_option'] = '0110000000100000000000000000101'; ! } // This function escapes any special characters in a string to allow for safe // use in the SQL query. It is used in the constructor and should be used on *************** *** 79,91 **** { return str_replace( "\'", "''", addslashes( $data ) ); ! } // This function is used to set any of the user fields if you do not want to // use the default values. Any field listed in the array in this function // will have special characters escaped function set_field( $field_name, $data ) ! { // It's not the most efficient, but we escape everything just to be safe $this->user_fields[$field_name] = $this->sql_escape( $data ); ! } // This function allows you to set a specific user_id for this user // You should only call this if you know that the user_id you are specifying --- 84,96 ---- { return str_replace( "\'", "''", addslashes( $data ) ); ! } // This function is used to set any of the user fields if you do not want to // use the default values. Any field listed in the array in this function // will have special characters escaped function set_field( $field_name, $data ) ! { // It's not the most efficient, but we escape everything just to be safe $this->user_fields[$field_name] = $this->sql_escape( $data ); ! } // This function allows you to set a specific user_id for this user // You should only call this if you know that the user_id you are specifying *************** *** 95,99 **** { $this->user_id = intval( $id ); ! } // This function returns the user_id of the user. // It is only really useful after the call to insert_user() --- 100,104 ---- { $this->user_id = intval( $id ); ! } // This function returns the user_id of the user. // It is only really useful after the call to insert_user() *************** *** 101,105 **** { return $this->user_id; ! } // This function is used to set any usergroups the user should be added to // upon registration. --- 106,110 ---- { return $this->user_id; ! } // This function is used to set any usergroups the user should be added to // upon registration. *************** *** 108,124 **** { $this->groups[] = $group_id; ! } // This function validates the userdata to ensure that the user can be inserted // into the database. It checks for duplicate usernames, disallowed usernames, // invalid email addresses and disallowed email addresses ! // Returns true if the user can be inserted, false otherwise function validate_user() { $return_msg = array(); ! $return_msg['is_ok'] = true; $return_msg['username_ok'] = true; $return_msg['mail_ok'] = true; ! $name_check = validate_username( stripslashes( str_replace( "''", "\'", $this->username ) ) ); if ( $name_check['error'] ) --- 113,129 ---- { $this->groups[] = $group_id; ! } // This function validates the userdata to ensure that the user can be inserted // into the database. It checks for duplicate usernames, disallowed usernames, // invalid email addresses and disallowed email addresses ! // Returns true if the user can be inserted, false otherwise function validate_user() { $return_msg = array(); ! $return_msg['is_ok'] = true; $return_msg['username_ok'] = true; $return_msg['mail_ok'] = true; ! $name_check = validate_username( stripslashes( str_replace( "''", "\'", $this->username ) ) ); if ( $name_check['error'] ) *************** *** 137,151 **** } return $return_msg; ! } // This is the function which actually inserts the user into the database ! // NB. This function does not validate the user allowing you to register names // and email addresses which might otherwise be disallowed, if you want to // validate the data you should call validate_user() first ! // Returns true on success, false otherwise function insert_user() { ! global $db; // Get the user_id if one has not already been set if ( $this->user_id == '' ) --- 142,156 ---- } return $return_msg; ! } // This is the function which actually inserts the user into the database ! // NB. This function does not validate the user allowing you to register names // and email addresses which might otherwise be disallowed, if you want to // validate the data you should call validate_user() first ! // Returns true on success, false otherwise function insert_user() { ! global $db; // Get the user_id if one has not already been set if ( $this->user_id == '' ) *************** *** 163,182 **** } $this->user_id = $row['total'] + 1; ! } // Build the main SQL query $sql = "INSERT INTO " . USERS_TABLE . " (user_id, username, user_regdate, user_password, user_email, user_icq, user_website, user_occ, user_from, user_interests, user_sig, user_sig_bbcode_uid, user_avatar, user_avatar_type, user_viewemail, user_aim, user_yim, user_msnm, user_attachsig, user_allowsmile, user_allowhtml, user_allowbbcode, user_allow_viewonline, user_notify, user_notify_pm, user_popup_pm, user_timezone, user_dateformat, user_lang, user_style, user_level, user_allow_pm, user_active, user_actkey, user_posts, user_realname) "; ! $sql .= "VALUES (" . $this->user_id . ", '" . $this->username . "', '" . $this->user_fields['user_regdate'] . "', '" . $this->user_password . "', '" . $this->user_email . "', '" . $this->user_fields['user_icq'] . "', '" . $this->user_fields['user_website'] . "', '" . $this->user_fields['user_occ'] . "', '" . $this->user_fields['user_from'] . "', '" . $this->user_fields['user_interests'] . "', '" . $this->user_fields['user_sig'] . "', '" . $this->user_fields['user_sig_bbcode_uid'] . "', '" . $this->user_fields['user_avatar'] . "', '" . $this->user_fields['user_avatar_type'] . "', " . $this->user_fields['user_viewemail'] . ", '" . str_replace( ' ', '+', $this->user_fields['user_aim'] ) . "', '" . $this->user_fields['user_yim'] . "', '" . $this->user_fields['user_msnm'] . "', " . $this->user_fields['user_attachsig'] . ", " . $this->user_fields['user_allowsmile'] . ", " . $this->user_fields['user_allowhtml'] . ", " . $this->user_fields['user_allowbbcode'] . ", " . $this->user_fields['user_allow_viewonline'] . ", " . $this->user_fields['user_notify'] . ", " . $this->user_fields['user_notify_pm'] . ", " . $this->user_fields['user_popup_pm'] . ", " . $this->user_fields['user_timezone'] . ", '" . $this->user_fields['user_dateformat'] . "', '" . $this->user_fields['user_lang'] . "', " . $this->user_fields['user_style'] . ", " . $this->user_fields['user_level'] . ", 1, 1, '', '" . $this->user_fields['user_posts'] . "', '" . $this->user_fields['user_realname'] . "')"; ! // Insert the user ! if ( !( $result = $db->sql_query( $sql, BEGIN_TRANSACTION ) ) ) { $error = true; ! } ! // Insert the personal group $sql = "INSERT INTO " . GROUPS_TABLE . " (group_name, group_description, group_single_user, group_moderator) VALUES ('', 'Personal User', 1, 0)"; ! if ( !( $result = $db->sql_query( $sql ) ) ) { --- 168,187 ---- } $this->user_id = $row['total'] + 1; ! } // Build the main SQL query $sql = "INSERT INTO " . USERS_TABLE . " (user_id, username, user_regdate, user_password, user_email, user_icq, user_website, user_occ, user_from, user_interests, user_sig, user_sig_bbcode_uid, user_avatar, user_avatar_type, user_viewemail, user_aim, user_yim, user_msnm, user_attachsig, user_allowsmile, user_allowhtml, user_allowbbcode, user_allow_viewonline, user_notify, user_notify_pm, user_popup_pm, user_timezone, user_dateformat, user_lang, user_style, user_level, user_allow_pm, user_active, user_actkey, user_posts, user_realname) "; ! $sql .= "VALUES (" . $this->user_id . ", '" . $this->username . "', '" . $this->user_fields['user_regdate'] . "', '" . $this->user_password . "', '" . $this->user_email . "', '" . $this->user_fields['user_icq'] . "', '" . $this->user_fields['user_website'] . "', '" . $this->user_fields['user_occ'] . "', '" . $this->user_fields['user_from'] . "', '" . $this->user_fields['user_interests'] . "', '" . $this->user_fields['user_sig'] . "', '" . $this->user_fields['user_sig_bbcode_uid'] . "', '" . $this->user_fields['user_avatar'] . "', '" . $this->user_fields['user_avatar_type'] . "', " . $this->user_fields['user_viewemail'] . ", '" . str_replace( ' ', '+', $this->user_fields['user_aim'] ) . "', '" . $this->user_fields['user_yim'] . "', '" . $this->user_fields['user_msnm'] . "', " . $this->user_fields['user_attachsig'] . ", " . $this->user_fields['user_allowsmile'] . ", " . $this->user_fields['user_allowhtml'] . ", " . $this->user_fields['user_allowbbcode'] . ", " . $this->user_fields['user_allow_viewonline'] . ", " . $this->user_fields['user_notify'] . ", " . $this->user_fields['user_notify_pm'] . ", " . $this->user_fields['user_popup_pm'] . ", " . $this->user_fields['user_timezone'] . ", '" . $this->user_fields['user_dateformat'] . "', '" . $this->user_fields['user_lang'] . "', " . $this->user_fields['user_style'] . ", " . $this->user_fields['user_level'] . ", 1, 1, '', '" . $this->user_fields['user_posts'] . "', '" . $this->user_fields['user_realname'] . "')"; ! // Insert the user ! if ( !( $result = $db->sql_query( $sql, BEGIN_TRANSACTION ) ) ) { $error = true; ! } ! // Insert the personal group $sql = "INSERT INTO " . GROUPS_TABLE . " (group_name, group_description, group_single_user, group_moderator) VALUES ('', 'Personal User', 1, 0)"; ! if ( !( $result = $db->sql_query( $sql ) ) ) { *************** *** 184,190 **** $error = true; } - ! $group_id = $db->sql_nextid(); // Insert the user_group entry --- 189,195 ---- $error = true; } ! ! $group_id = $db->sql_nextid(); // Insert the user_group entry *************** *** 195,199 **** echo('error - couldn\'t insert user group: ' . $this->username ); $error = true; ! } // Add the user to any applicable groups --- 200,204 ---- echo('error - couldn\'t insert user group: ' . $this->username ); $error = true; ! } // Add the user to any applicable groups *************** *** 208,212 **** } } ! return ( $error == true ) ? false : true; } --- 213,217 ---- } } ! return ( $error == true ) ? false : true; } *************** *** 215,219 **** function move_user() { ! global $db; // Get the user_id if one has not already been set if ( $this->user_id == '' ) --- 220,224 ---- function move_user() { ! global $db; // Get the user_id if one has not already been set if ( $this->user_id == '' ) *************** *** 233,237 **** } $this->user_id = $row['user_id']; ! } // Add the user to any applicable groups --- 238,242 ---- } $this->user_id = $row['user_id']; ! } // Add the user to any applicable groups *************** *** 244,248 **** $sql = "SELECT * FROM " . USER_GROUP_TABLE . " ! WHERE user_id = '" . $this->user_id . "' AND group_id = '" . $this->groups[$i] . "'" ; --- 249,253 ---- $sql = "SELECT * FROM " . USER_GROUP_TABLE . " ! WHERE user_id = '" . $this->user_id . "' AND group_id = '" . $this->groups[$i] . "'" ; *************** *** 270,274 **** } } ! return ( $error == true ) ? false : true; } --- 275,279 ---- } } ! return ( $error == true ) ? false : true; } *************** *** 277,281 **** function update_user() { ! global $db; // Get the user_id if one has not already been set if ( $this->user_id == '' ) --- 282,286 ---- function update_user() { ! global $db; // Get the user_id if one has not already been set if ( $this->user_id == '' ) *************** *** 295,299 **** } $this->user_id = $row['user_id']; ! } $sql = "UPDATE " . USERS_TABLE . " --- 300,304 ---- } $this->user_id = $row['user_id']; ! } $sql = "UPDATE " . USERS_TABLE . " *************** *** 309,314 **** { $error = true; ! } ! return ( $error == true ) ? false : true; } --- 314,319 ---- { $error = true; ! } ! return ( $error == true ) ? false : true; } |
|
From: Jon O. <jon...@us...> - 2006-06-17 20:47:23
|
Update of /cvsroot/mxbb/mx_gallery2 In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv5129/modules/mx_gallery2 Modified Files: gallery2.php gallery2_toplist.php Log Message: security Index: gallery2.php =================================================================== RCS file: /cvsroot/mxbb/mx_gallery2/gallery2.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** gallery2.php 5 Apr 2006 22:34:09 -0000 1.5 --- gallery2.php 17 Jun 2006 20:47:18 -0000 1.6 *************** *** 8,15 **** * */ ! ! if( !defined('IN_PORTAL') ) { ! die("Hacking attempt !!!"); } --- 8,15 ---- * */ ! ! if( !defined('IN_PORTAL') || !is_object($mx_block)) { ! die("Hacking attempt"); } *************** *** 45,49 **** // Include the gallery embed class // ! require_once($relativeG2Path . '/embed.php'); // --- 45,49 ---- // Include the gallery embed class // ! require_once($relativeG2Path . '/embed.php'); // *************** *** 67,89 **** echo($map_debug); } ! // // Init the GalleryEmbed class, passing current user_id // ! if($userdata['user_id'] != ANONYMOUS) { ! $ret = GalleryEmbed::init(array( 'embedUri' => $embedUri, 'embedPath' => $embedPath, 'relativeG2Path' => $relativeG2Path, 'loginRedirect' => $loginRedirect, 'activeUserId' => $userdata['user_id'])); ! if ($ret->isError()) { echo $ret->getAsHtml(); ! exit; ! } } ! else { ! $ret = GalleryEmbed::init(array( 'embedUri' => $embedUri, 'embedPath' => $embedPath, 'relativeG2Path' => $relativeG2Path, 'loginRedirect' => $loginRedirect, 'activeUserId' => 0)); ! if ($ret->isError()) { echo $ret->getAsHtml(); ! exit; ! } } --- 67,89 ---- echo($map_debug); } ! // // Init the GalleryEmbed class, passing current user_id // ! if($userdata['user_id'] != ANONYMOUS) { ! $ret = GalleryEmbed::init(array( 'embedUri' => $embedUri, 'embedPath' => $embedPath, 'relativeG2Path' => $relativeG2Path, 'loginRedirect' => $loginRedirect, 'activeUserId' => $userdata['user_id'])); ! if ($ret->isError()) { echo $ret->getAsHtml(); ! exit; ! } } ! else { ! $ret = GalleryEmbed::init(array( 'embedUri' => $embedUri, 'embedPath' => $embedPath, 'relativeG2Path' => $relativeG2Path, 'loginRedirect' => $loginRedirect, 'activeUserId' => 0)); ! if ($ret->isError()) { echo $ret->getAsHtml(); ! exit; ! } } *************** *** 92,107 **** // GalleryCapabilities::set('showSidebarBlocks', true); ! $g2data = GalleryEmbed::handleRequest(); ! if ($g2data['isDone']) { ! exit; // Gallery 2 has already sent output (redirect or binary data) ! } ! // Use $g2data['headHtml'] and $g2data['bodyHtml'] ! // to display Gallery 2 content inside embedding application ! // if you don't want to use $g2data['headHtml'] directly, you can get the css, ! // javascript and page title separately by calling... ! if (isset($g2data['headHtml'])) { ! list($title, $css, $javascript) = GalleryEmbed::parseHead($g2data['headHtml']); } --- 92,107 ---- // GalleryCapabilities::set('showSidebarBlocks', true); ! $g2data = GalleryEmbed::handleRequest(); ! if ($g2data['isDone']) { ! exit; // Gallery 2 has already sent output (redirect or binary data) ! } ! // Use $g2data['headHtml'] and $g2data['bodyHtml'] ! // to display Gallery 2 content inside embedding application ! // if you don't want to use $g2data['headHtml'] directly, you can get the css, ! // javascript and page title separately by calling... ! if (isset($g2data['headHtml'])) { ! list($title, $css, $javascript) = GalleryEmbed::parseHead($g2data['headHtml']); } Index: gallery2_toplist.php =================================================================== RCS file: /cvsroot/mxbb/mx_gallery2/gallery2_toplist.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** gallery2_toplist.php 5 Apr 2006 22:34:09 -0000 1.5 --- gallery2_toplist.php 17 Jun 2006 20:47:18 -0000 1.6 *************** *** 8,38 **** * */ ! /* ! Externt Bildblock ! Använd ett PHP-block liknande det som visas nedan för att inkludera ett blidblock på en PHP sida utanför Gallery. ! <?php @readfile('http://www.samskolan.se/modules/gallery2/main.php?g2_view=imageblock.External&g2_blocks=randomImage&g2_show=title'); ?> ! g2_blocks Pipe(|) separate list chosen from: randomImage, recentImage, viewedImage, randomAlbum, recentAlbum, viewedAlbum, dailyImage, weeklyImage, monthlyImage, dailyAlbum, weeklyAlbum, monthlyAlbum, specificItem; default is randomImage ! g2_show * Pipe(|) separated list chosen from: title, date, views, owner, heading, fullSize; the value can also be: none ! g2_itemId Limit the item selection to the subtree of the gallery under the album with the given id; or the id of the item to display when used with specificItem block type ! g2_maxSize Scale images to this maximum size. If maxSize exceeds the thumbnail dimensions, you must also specify g2_show=fullSize ! g2_linkTarget Add a link target (for example, to open links in a new browser window) ! g2_itemFrame * Ram att använda runt bilder ! g2_albumFrame * Ram att använda runt album ! If a parameter marked with * is omitted then the site default defined above is used. ! Image frames require CSS to be displayed correctly. Include the following in the <head> section to support image frames. ! <link rel="stylesheet" href="http://www.samskolan.se/modules/gallery2/main.php?g2_controller=imageblock.ExternalCSS&g2_frames=wood"/> ! Specify the frame id (or pipe separated list of ids) in the frames parameter. Omit the parameter to support the image frames configured above. Frame ids are the directory names in the modules/imageframe/frames directory. */ ! if( !defined('IN_PORTAL') ) { ! die("Hacking attempt !!!"); } --- 8,38 ---- * */ ! /* ! Externt Bildblock ! Använd ett PHP-block liknande det som visas nedan för att inkludera ett blidblock på en PHP sida utanför Gallery. ! <?php @readfile('http://www.samskolan.se/modules/gallery2/main.php?g2_view=imageblock.External&g2_blocks=randomImage&g2_show=title'); ?> ! g2_blocks Pipe(|) separate list chosen from: randomImage, recentImage, viewedImage, randomAlbum, recentAlbum, viewedAlbum, dailyImage, weeklyImage, monthlyImage, dailyAlbum, weeklyAlbum, monthlyAlbum, specificItem; default is randomImage ! g2_show * Pipe(|) separated list chosen from: title, date, views, owner, heading, fullSize; the value can also be: none ! g2_itemId Limit the item selection to the subtree of the gallery under the album with the given id; or the id of the item to display when used with specificItem block type ! g2_maxSize Scale images to this maximum size. If maxSize exceeds the thumbnail dimensions, you must also specify g2_show=fullSize ! g2_linkTarget Add a link target (for example, to open links in a new browser window) ! g2_itemFrame * Ram att använda runt bilder ! g2_albumFrame * Ram att använda runt album ! If a parameter marked with * is omitted then the site default defined above is used. ! Image frames require CSS to be displayed correctly. Include the following in the <head> section to support image frames. ! <link rel="stylesheet" href="http://www.samskolan.se/modules/gallery2/main.php?g2_controller=imageblock.ExternalCSS&g2_frames=wood"/> ! Specify the frame id (or pipe separated list of ids) in the frames parameter. Omit the parameter to support the image frames configured above. Frame ids are the directory names in the modules/imageframe/frames directory. */ ! if( !defined('IN_PORTAL') || !is_object($mx_block)) { ! die("Hacking attempt"); } *************** *** 101,105 **** { $$getImageBlockargs['itemFrame'] = $g2_itemFrame; ! $g2_frames = 'g2_frames=' . $g2_itemFrame; } else if ( !empty($g2_albumFrame) ) --- 101,105 ---- { $$getImageBlockargs['itemFrame'] = $g2_itemFrame; ! $g2_frames = 'g2_frames=' . $g2_itemFrame; } else if ( !empty($g2_albumFrame) ) *************** *** 108,112 **** $g2_frames = 'g2_frames=' . $g2_albumFrame; } ! else { $g2_frames = ''; --- 108,112 ---- $g2_frames = 'g2_frames=' . $g2_albumFrame; } ! else { $g2_frames = ''; *************** *** 133,137 **** // Include the gallery embed class // ! require_once($relativeG2Path . '/embed.php'); // --- 133,137 ---- // Include the gallery embed class // ! require_once($relativeG2Path . '/embed.php'); // *************** *** 155,177 **** echo($map_debug); } ! // // Init the GalleryEmbed class, passing current user_id // ! if($userdata['user_id'] != ANONYMOUS) { ! $ret = GalleryEmbed::init(array( 'embedUri' => $embedUri, 'embedPath' => $embedPath, 'relativeG2Path' => $relativeG2Path, 'loginRedirect' => $loginRedirect, 'activeUserId' => $userdata['user_id'])); ! if ($ret->isError()) { echo $ret->getAsHtml(); ! exit; ! } } ! else { ! $ret = GalleryEmbed::init(array( 'embedUri' => $embedUri, 'embedPath' => $embedPath, 'relativeG2Path' => $relativeG2Path, 'loginRedirect' => $loginRedirect, 'activeUserId' => 2)); ! if ($ret->isError()) { echo $ret->getAsHtml(); ! exit; ! } } --- 155,177 ---- echo($map_debug); } ! // // Init the GalleryEmbed class, passing current user_id // ! if($userdata['user_id'] != ANONYMOUS) { ! $ret = GalleryEmbed::init(array( 'embedUri' => $embedUri, 'embedPath' => $embedPath, 'relativeG2Path' => $relativeG2Path, 'loginRedirect' => $loginRedirect, 'activeUserId' => $userdata['user_id'])); ! if ($ret->isError()) { echo $ret->getAsHtml(); ! exit; ! } } ! else { ! $ret = GalleryEmbed::init(array( 'embedUri' => $embedUri, 'embedPath' => $embedPath, 'relativeG2Path' => $relativeG2Path, 'loginRedirect' => $loginRedirect, 'activeUserId' => 2)); ! if ($ret->isError()) { echo $ret->getAsHtml(); ! exit; ! } } *************** *** 186,194 **** header('Content-Type: text/html; charset=' . $lang['ENCODING']); } ! // // Hook up with ImageAlbum // ! $g2data = GalleryEmbed::getImageBlock($getImageBlockargs); $bodyHtml = GalleryUtilities::utf8ToUnicodeEntities($g2data[1]); // --- 186,194 ---- header('Content-Type: text/html; charset=' . $lang['ENCODING']); } ! // // Hook up with ImageAlbum // ! $g2data = GalleryEmbed::getImageBlock($getImageBlockargs); $bodyHtml = GalleryUtilities::utf8ToUnicodeEntities($g2data[1]); // |
|
From: Jon O. <jon...@us...> - 2006-06-17 20:47:21
|
Update of /cvsroot/mxbb/mx_gallery2/includes In directory sc8-pr-cvs7.sourceforge.net:/tmp/cvs-serv5129/modules/mx_gallery2/includes Modified Files: gallery_constants.php gallery_functions.php Log Message: security Index: gallery_constants.php =================================================================== RCS file: /cvsroot/mxbb/mx_gallery2/includes/gallery_constants.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** gallery_constants.php 5 Apr 2006 22:34:09 -0000 1.4 --- gallery_constants.php 17 Jun 2006 20:47:18 -0000 1.5 *************** *** 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 *************** *** 28,32 **** // ------------------------------------------------------------------------- $mx_user->extend(MX_LANG_MAIN, MX_IMAGES_NONE); ! $mx_page->add_copyright( 'mxBB Gallery2 Module' ); } --- 33,37 ---- // ------------------------------------------------------------------------- $mx_user->extend(MX_LANG_MAIN, MX_IMAGES_NONE); ! $mx_page->add_copyright( 'mxBB Gallery2 Module' ); } Index: gallery_functions.php =================================================================== RCS file: /cvsroot/mxbb/mx_gallery2/includes/gallery_functions.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** gallery_functions.php 5 Apr 2006 22:34:09 -0000 1.3 --- gallery_functions.php 17 Jun 2006 20:47:18 -0000 1.4 *************** *** 9,12 **** --- 9,17 ---- */ + if( !defined('IN_PORTAL') || !is_object($mx_block)) + { + die("Hacking attempt"); + } + // // Gallery Embed Doc *************** *** 57,61 **** // if you don't want to use $g2data['headHtml'] directly, you can get the css, // javascript and page title separately by calling... ! if (isset($g2moddata['headHtml'])) { list($title, $css, $javascript) = GalleryEmbed::parseHead($g2moddata['headHtml']); --- 62,66 ---- // if you don't want to use $g2data['headHtml'] directly, you can get the css, // javascript and page title separately by calling... ! if (isset($g2moddata['headHtml'])) { list($title, $css, $javascript) = GalleryEmbed::parseHead($g2moddata['headHtml']); *************** *** 113,120 **** users directly. ! If the emApp supports user groups then add hooks to keep groups in sync. Synchronizing groups is optional, even if the emApp supports groups. The process is the same as above, using GalleryEmbed::createGroup, ::updateGroup, ::deleteGroup(), ::addUserToGroup() and ! ::removeUserFromGroup(). Note that G2 does not support nested groups.. if the emApp does then the hooks will have to expand the groups into the list of users and update the G2 groups accordingly. --- 118,125 ---- users directly. ! If the emApp supports user groups then add hooks to keep groups in sync. Synchronizing groups is optional, even if the emApp supports groups. The process is the same as above, using GalleryEmbed::createGroup, ::updateGroup, ::deleteGroup(), ::addUserToGroup() and ! ::removeUserFromGroup(). Note that G2 does not support nested groups.. if the emApp does then the hooks will have to expand the groups into the list of users and update the G2 groups accordingly. *************** *** 140,181 **** var $user_map_data = array(); // current user map data var $user_gallery_user_data = array(); // duplicate gallery user data ! /*********************************************************/ /* Init Gallery Embed Class */ /*********************************************************/ ! function init() { global $db, $gallery, $embedPath, $embedUri, $relativeG2Path, $loginRedirect, $fullInit, $map_debug; ! // // only init once // ! if ($this->isInitiated) { $map_debug .= "<br>GalleryEmbed is inititated - resting"; return true; } ! $map_debug .= "<br>Inititating GalleryEmbed - ..."; $ret = GalleryEmbed :: init(array ( 'embedPath' => $embedPath, ! 'embedUri' => $embedUri, 'relativeG2Path' => $relativeG2Path, 'loginRedirect' => $loginRedirect, ! 'activeUserId' => '', 'fullInit' => $fullInit)); ! $gallery->guaranteeTimeLimit(300); ! ! if (!$ret->isSuccess()) { $map_debug .= '<br>G2 did not return a success status upon an init request. Here is the error message from G2: <br /> [#(1)]'.$ret->getAsHtml(); return false; } ! $this->isInitiated = true; return true; } ! // // Syncronize GD and phpBB Users --- 145,186 ---- var $user_map_data = array(); // current user map data var $user_gallery_user_data = array(); // duplicate gallery user data ! /*********************************************************/ /* Init Gallery Embed Class */ /*********************************************************/ ! function init() { global $db, $gallery, $embedPath, $embedUri, $relativeG2Path, $loginRedirect, $fullInit, $map_debug; ! // // only init once // ! if ($this->isInitiated) { $map_debug .= "<br>GalleryEmbed is inititated - resting"; return true; } ! $map_debug .= "<br>Inititating GalleryEmbed - ..."; $ret = GalleryEmbed :: init(array ( 'embedPath' => $embedPath, ! 'embedUri' => $embedUri, 'relativeG2Path' => $relativeG2Path, 'loginRedirect' => $loginRedirect, ! 'activeUserId' => '', 'fullInit' => $fullInit)); ! $gallery->guaranteeTimeLimit(300); ! ! if (!$ret->isSuccess()) { $map_debug .= '<br>G2 did not return a success status upon an init request. Here is the error message from G2: <br /> [#(1)]'.$ret->getAsHtml(); return false; } ! $this->isInitiated = true; return true; } ! // // Syncronize GD and phpBB Users *************** *** 194,236 **** * @return bool true or false */ ! function _g2addexternalMapEntry($externalId, $entityId, $entityType ) { ! global $db, $failures, $fullpath, $map_debug; ! $is_ok = true; ! if (is_int($entityType)) { $entityType = $entityType == MAP_MXBB_USER ? 'GalleryUser' : 'GalleryGroup'; } ! require_once ($fullpath."/".'modules/core/classes/ExternalIdMap.class'); ! $ret = ExternalIdMap :: addMapEntry(array ('externalId' => $externalId, 'entityType' => $entityType, 'entityId' => $entityId)); ! ! if ($ret->isError()) { $failures[] = $externalId; $is_ok = false; } ! $map_debug .= $is_ok ? '<br>externalMapEntry inserted successfully' : '<br>ERROR: externalMapEntry not inserted'; return $is_ok; } ! ! function _g2updateexternalMapEntry($externalId, $entityId, $entityType) { ! global $db, $failures, $fullpath, $map_debug; ! $is_ok = true; ! if (is_int($entityType)) { $entityType = $entityType == MAP_MXBB_USER ? 'GalleryUser' : 'GalleryGroup'; } ! require_once ($fullpath."/".'modules/core/classes/ExternalIdMap.class'); $ret = ExternalIdMap :: removeMapEntry(array ('externalId' => $externalId)); ! if ($ret->isError()) { $map_debug .= 'WARNING: mapping does not exist'; --- 199,241 ---- * @return bool true or false */ ! function _g2addexternalMapEntry($externalId, $entityId, $entityType ) { ! global $db, $failures, $fullpath, $map_debug; ! $is_ok = true; ! if (is_int($entityType)) { $entityType = $entityType == MAP_MXBB_USER ? 'GalleryUser' : 'GalleryGroup'; } ! require_once ($fullpath."/".'modules/core/classes/ExternalIdMap.class'); ! $ret = ExternalIdMap :: addMapEntry(array ('externalId' => $externalId, 'entityType' => $entityType, 'entityId' => $entityId)); ! ! if ($ret->isError()) { $failures[] = $externalId; $is_ok = false; } ! $map_debug .= $is_ok ? '<br>externalMapEntry inserted successfully' : '<br>ERROR: externalMapEntry not inserted'; return $is_ok; } ! ! function _g2updateexternalMapEntry($externalId, $entityId, $entityType) { ! global $db, $failures, $fullpath, $map_debug; ! $is_ok = true; ! if (is_int($entityType)) { $entityType = $entityType == MAP_MXBB_USER ? 'GalleryUser' : 'GalleryGroup'; } ! require_once ($fullpath."/".'modules/core/classes/ExternalIdMap.class'); $ret = ExternalIdMap :: removeMapEntry(array ('externalId' => $externalId)); ! if ($ret->isError()) { $map_debug .= 'WARNING: mapping does not exist'; *************** *** 240,254 **** $ret = ExternalIdMap :: addMapEntry(array ('externalId' => $externalId, 'entityType' => $entityType, 'entityId' => $entityId)); ! ! if ($ret->isError()) { $failures[] = $externalId; $is_ok = false; } ! $map_debug .= $is_ok ? '<br>externalMapEntry updated successfully' : '<br>ERROR: externalMapEntry not updated'; return $is_ok; ! } ! // // Do a standard phpbb db query, to find out if gallery is syncronized with current user --- 245,259 ---- $ret = ExternalIdMap :: addMapEntry(array ('externalId' => $externalId, 'entityType' => $entityType, 'entityId' => $entityId)); ! ! if ($ret->isError()) { $failures[] = $externalId; $is_ok = false; } ! $map_debug .= $is_ok ? '<br>externalMapEntry updated successfully' : '<br>ERROR: externalMapEntry not updated'; return $is_ok; ! } ! // // Do a standard phpbb db query, to find out if gallery is syncronized with current user *************** *** 256,261 **** function _is_mapped() { ! global $db, $userdata, $map_debug; ! // // Try to reuse old check result --- 261,266 ---- function _is_mapped() { ! global $db, $userdata, $map_debug; ! // // Try to reuse old check result *************** *** 269,275 **** return $is_mapped; } ! ! $map_debug .= '<br>Qeury to see if user is mapped'; ! // // Validate if the mxBB is already mapped in Gallery2 --- 274,280 ---- return $is_mapped; } ! ! $map_debug .= '<br>Qeury to see if user is mapped'; ! // // Validate if the mxBB is already mapped in Gallery2 *************** *** 277,302 **** $sql = "SELECT * FROM " . GALLERY_USER_MAP_TABLE . " map, ! " . GALLERY_USER_TABLE . " gus WHERE map.g_externalId = '" . $userdata['user_id'] . "' AND map.g_entityId = gus.g_id"; ! if ( !$result = $db->sql_query( $sql ) ) { mx_message_die( GENERAL_ERROR, "Could not query Gallery count", "", __LINE__, __FILE__, $sql ); ! } ! if( $total_maps = $db->sql_numrows($result) ) { $this->user_map_data = $db->sql_fetchrow($result); ! } ! $is_mapped = $total_maps > 0; ! $userdata[$userdata_key] = $is_mapped; $map_debug .= '<br>is_mapped: ' . intval($is_mapped); ! return $is_mapped; } ! // // Find already registered gallery users, also registered by phpbb, and not mapped --- 282,307 ---- $sql = "SELECT * FROM " . GALLERY_USER_MAP_TABLE . " map, ! " . GALLERY_USER_TABLE . " gus WHERE map.g_externalId = '" . $userdata['user_id'] . "' AND map.g_entityId = gus.g_id"; ! if ( !$result = $db->sql_query( $sql ) ) { mx_message_die( GENERAL_ERROR, "Could not query Gallery count", "", __LINE__, __FILE__, $sql ); ! } ! if( $total_maps = $db->sql_numrows($result) ) { $this->user_map_data = $db->sql_fetchrow($result); ! } ! $is_mapped = $total_maps > 0; ! $userdata[$userdata_key] = $is_mapped; $map_debug .= '<br>is_mapped: ' . intval($is_mapped); ! return $is_mapped; } ! // // Find already registered gallery users, also registered by phpbb, and not mapped *************** *** 308,313 **** global $db, $userdata, $map_debug; ! $map_debug .= '<br>Qeury to see if user is already a gallery user'; ! // // Validate if the mxBB is already mapped in Gallery2 --- 313,318 ---- global $db, $userdata, $map_debug; ! $map_debug .= '<br>Qeury to see if user is already a gallery user'; ! // // Validate if the mxBB is already mapped in Gallery2 *************** *** 318,339 **** WHERE gus.g_userName = '" . $userdata['username'] . "' OR gus.g_email = '" . $userdata['user_email'] . "'"; ! if ( !$result = $db->sql_query( $sql ) ) { mx_message_die( GENERAL_ERROR, "Could not query Gallery count", "", __LINE__, __FILE__, $sql ); ! } ! if( $total_gallery_users = $db->sql_numrows($result) ) { $this->user_gallery_user_data = $db->sql_fetchrow($result); ! } ! $is_gallery_user = $total_gallery_users > 0; ! $map_debug .= '<br>is_gallery_user: ' . intval($is_gallery_user); ! ! return $is_gallery_user; } ! // // Public class method --- 323,344 ---- WHERE gus.g_userName = '" . $userdata['username'] . "' OR gus.g_email = '" . $userdata['user_email'] . "'"; ! if ( !$result = $db->sql_query( $sql ) ) { mx_message_die( GENERAL_ERROR, "Could not query Gallery count", "", __LINE__, __FILE__, $sql ); ! } ! if( $total_gallery_users = $db->sql_numrows($result) ) { $this->user_gallery_user_data = $db->sql_fetchrow($result); ! } ! $is_gallery_user = $total_gallery_users > 0; ! $map_debug .= '<br>is_gallery_user: ' . intval($is_gallery_user); ! ! return $is_gallery_user; } ! // // Public class method *************** *** 343,349 **** { global $userdata, $map_debug; ! $map_ok = true; ! if ( $userdata['user_id'] != ANONYMOUS ) { --- 348,354 ---- { global $userdata, $map_debug; ! $map_ok = true; ! if ( $userdata['user_id'] != ANONYMOUS ) { *************** *** 354,373 **** $args['fullname'] = $userdata['username']; $args['username'] = $userdata['username']; ! $args['hashedpassword'] = $userdata['user_password']; $args['hashmethod'] = 'md5'; $args['email'] = $userdata['user_email']; $args['creationtimestamp'] = $userdata['user_regdate']; ! ! if( !$this->_is_mapped() ) { $map_debug .= '<br>Not mapped - do mapping'; ! // // only init once // ! if (!$this->init()) { return false; ! } // --- 359,378 ---- $args['fullname'] = $userdata['username']; $args['username'] = $userdata['username']; ! $args['hashedpassword'] = $userdata['user_password']; $args['hashmethod'] = 'md5'; $args['email'] = $userdata['user_email']; $args['creationtimestamp'] = $userdata['user_regdate']; ! ! if( !$this->_is_mapped() ) { $map_debug .= '<br>Not mapped - do mapping'; ! // // only init once // ! if (!$this->init()) { return false; ! } // *************** *** 375,379 **** // For exdample the mxBB admin may have configured the Gallery admin account WITH THE SAME EMAIL // ! if ($this->_is_gallery_user()) { // --- 380,384 ---- // For exdample the mxBB admin may have configured the Gallery admin account WITH THE SAME EMAIL // ! if ($this->_is_gallery_user()) { // *************** *** 383,412 **** // $is_ok = true; ! // // Map mxBB user to existing Gallery user // ! if ( !$this->_g2addexternalMapEntry($user_id, $this->user_gallery_user_data['g_id'], MAP_MXBB_USER) ) { $map_debug .= '<br>Gallery user exists - do mapping to this user...'; $failures[] = $user_id; $is_ok = false; ! } ! $map_debug .= $is_ok ? '<br>mapping ok' : '<br>ERROR: mapping failed'; ! // // Nothing else to do ;) // return $is_ok; ! } ! // // we create the user ! // $ret = GalleryEmbed :: createUser($user_id, $args); $map_debug .= '<br>Creating user...'; ! ! if ( !$ret->isSuccess() ) { $map_debug .= 'ERROR: Could not create user'; --- 388,417 ---- // $is_ok = true; ! // // Map mxBB user to existing Gallery user // ! if ( !$this->_g2addexternalMapEntry($user_id, $this->user_gallery_user_data['g_id'], MAP_MXBB_USER) ) { $map_debug .= '<br>Gallery user exists - do mapping to this user...'; $failures[] = $user_id; $is_ok = false; ! } ! $map_debug .= $is_ok ? '<br>mapping ok' : '<br>ERROR: mapping failed'; ! // // Nothing else to do ;) // return $is_ok; ! } ! // // we create the user ! // $ret = GalleryEmbed :: createUser($user_id, $args); $map_debug .= '<br>Creating user...'; ! ! if ( !$ret->isSuccess() ) { $map_debug .= 'ERROR: Could not create user'; *************** *** 414,455 **** $map_ok = false; } ! // // Add a mxBB user group (if not exists) // list ($ret, $group) = GalleryCoreApi::loadEntityByExternalId(MAP_USERGROUP_ID, 'GalleryGroup'); ! if ($ret->isError()) { $map_debug .= '<br>Adding mxBB user group...'; ! // // If group doesn't exists - ADD // $ret = GalleryEmbed :: createGroup(MAP_USERGROUP_ID, 'mxBB Users'); ! ! if ( !$ret->isSuccess() ) { $map_debug .= 'ERROR: Could not create mxBB user group'; $failures[] = $user_id; $map_ok = false; ! } } ! $ret = GalleryEmbed :: addUserToGroup($user_id, MAP_USERGROUP_ID); $map_debug .= '<br>Adding user to mxBB user group...'; ! if ( !$ret->isSuccess() ) { $map_debug .= 'ERROR: Could not add user to mxBB user group'; $failures[] = $user_id; $map_ok = false; ! } ! // // Add admin to admin group ! // if ($userdata['user_level'] == ADMIN) { $map_debug .= '<br>User is admin - to additional settings'; ! // // Map the ExternalmapId for admins to the gallery admingroup --- 419,460 ---- $map_ok = false; } ! // // Add a mxBB user group (if not exists) // list ($ret, $group) = GalleryCoreApi::loadEntityByExternalId(MAP_USERGROUP_ID, 'GalleryGroup'); ! if ($ret->isError()) { $map_debug .= '<br>Adding mxBB user group...'; ! // // If group doesn't exists - ADD // $ret = GalleryEmbed :: createGroup(MAP_USERGROUP_ID, 'mxBB Users'); ! ! if ( !$ret->isSuccess() ) { $map_debug .= 'ERROR: Could not create mxBB user group'; $failures[] = $user_id; $map_ok = false; ! } } ! $ret = GalleryEmbed :: addUserToGroup($user_id, MAP_USERGROUP_ID); $map_debug .= '<br>Adding user to mxBB user group...'; ! if ( !$ret->isSuccess() ) { $map_debug .= 'ERROR: Could not add user to mxBB user group'; $failures[] = $user_id; $map_ok = false; ! } ! // // Add admin to admin group ! // if ($userdata['user_level'] == ADMIN) { $map_debug .= '<br>User is admin - to additional settings'; ! // // Map the ExternalmapId for admins to the gallery admingroup *************** *** 457,461 **** // list ($ret, $adminGroupId) = GalleryCoreApi::getPluginParameter('module', 'core', 'id.adminGroup'); ! if ($ret->isError()) { $map_debug .= '<br>ERROR: Unable to fetch the admin group. Here is the error message from G2: <br />'.$ret->getAsHtml(); --- 462,466 ---- // list ($ret, $adminGroupId) = GalleryCoreApi::getPluginParameter('module', 'core', 'id.adminGroup'); ! if ($ret->isError()) { $map_debug .= '<br>ERROR: Unable to fetch the admin group. Here is the error message from G2: <br />'.$ret->getAsHtml(); *************** *** 463,489 **** return false; } ! // // Is there a mapping to the gallery admin group? // list ($ret, $GroupId) = GalleryCoreApi::loadEntityByExternalId(MAP_ADMINGROUP_ID, 'GalleryGroup'); ! if ($ret->isError() || $adminGroupId != $GroupId) { $map_debug .= '<br>Map to the Gallery admin group...'; ! // // If not, do it // ! if ( !$this->_g2updateexternalMapEntry(MAP_ADMINGROUP_ID, $adminGroupId, MAP_MXBB_GROUP) ) { $map_debug .= 'ERROR: Could not create group mapping to gallery admin group'; $failures[] = $user_id; $map_ok = false; ! } } ! $ret = GalleryEmbed :: addUserToGroup($user_id, MAP_ADMINGROUP_ID); $map_debug .= '<br>Adding user to mxBB admin group...'; ! if ( !$ret->isSuccess() ) { $map_debug .= 'ERROR: Could not add user to mxBB admin group'; --- 468,494 ---- return false; } ! // // Is there a mapping to the gallery admin group? // list ($ret, $GroupId) = GalleryCoreApi::loadEntityByExternalId(MAP_ADMINGROUP_ID, 'GalleryGroup'); ! if ($ret->isError() || $adminGroupId != $GroupId) { $map_debug .= '<br>Map to the Gallery admin group...'; ! // // If not, do it // ! if ( !$this->_g2updateexternalMapEntry(MAP_ADMINGROUP_ID, $adminGroupId, MAP_MXBB_GROUP) ) { $map_debug .= 'ERROR: Could not create group mapping to gallery admin group'; $failures[] = $user_id; $map_ok = false; ! } } ! $ret = GalleryEmbed :: addUserToGroup($user_id, MAP_ADMINGROUP_ID); $map_debug .= '<br>Adding user to mxBB admin group...'; ! if ( !$ret->isSuccess() ) { $map_debug .= 'ERROR: Could not add user to mxBB admin group'; *************** *** 492,496 **** } } ! $map_debug .= $map_ok ? '<br>User added/mapped successfully' : '<br>ERROR: user not added/mapped'; } --- 497,501 ---- } } ! $map_debug .= $map_ok ? '<br>User added/mapped successfully' : '<br>ERROR: user not added/mapped'; } *************** *** 503,507 **** { $map_debug .= '<br>Already mapped but userdata is changed - update mapping'; ! // // only init once --- 508,512 ---- { $map_debug .= '<br>Already mapped but userdata is changed - update mapping'; ! // // only init once *************** *** 510,514 **** return false; } ! // // if the map exists, just update the user data --- 515,519 ---- return false; } ! // // if the map exists, just update the user data *************** *** 516,521 **** $ret = GalleryEmbed :: updateUser($user_id, $args); $map_debug .= '<br>Updating user...'; ! ! if ( !$ret->isSuccess() ) { $map_debug .= 'ERROR: Could not update user<br>'; --- 521,526 ---- $ret = GalleryEmbed :: updateUser($user_id, $args); $map_debug .= '<br>Updating user...'; ! ! if ( !$ret->isSuccess() ) { $map_debug .= 'ERROR: Could not update user<br>'; *************** *** 523,538 **** $map_ok = false; } ! ! $map_debug .= $map_ok ? '<br>user updated successfully' : '<br>ERROR: user not updated'; } } ! else { ! $map_debug .= '<br>Guest user - no mapping needed'; } return $map_ok; } ! /* // --- 528,543 ---- $map_ok = false; } ! ! $map_debug .= $map_ok ? '<br>user updated successfully' : '<br>ERROR: user not updated'; } } ! else { ! $map_debug .= '<br>Guest user - no mapping needed'; } return $map_ok; } ! /* // |