Changeset 8251
- Timestamp:
- 01/05/09 22:59:11 (3 years ago)
- Location:
- trunk
- Files:
-
- 4 added
- 4 deleted
- 11 edited
-
aemodule.php (deleted)
-
change_status.php (modified) (3 diffs)
-
chat (deleted)
-
chat.php (deleted)
-
inc/admin.inc.php (modified) (2 diffs)
-
inc/classes/BxDolInstaller.php (modified) (1 diff)
-
inc/classes/BxDolModuleDb.php (added)
-
inc/classes/BxDolRequest.php (added)
-
inc/classes/BxDolService.php (added)
-
inc/modules.inc.php (deleted)
-
install/index.php (modified) (1 diff)
-
install/sql/v61.sql (modified) (6 diffs)
-
modules/boonex/chat/classes/BxChatDb.php (modified) (2 diffs)
-
modules/boonex/chat/index.php (modified) (2 diffs)
-
modules/boonex/chat/install/sql/install.sql (modified) (1 diff)
-
modules/boonex/chat/request.php (added)
-
modules/boonex/wall/classes/BxWallDb.php (modified) (2 diffs)
-
modules/index.php (modified) (1 diff)
-
periodic/cmd.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/change_status.php
r7109 r8251 22 22 require_once( BX_DIRECTORY_PATH_INC . 'design.inc.php' ); 23 23 require_once( BX_DIRECTORY_PATH_INC . 'profiles.inc.php' ); 24 require_once( BX_DIRECTORY_PATH_INC . 'modules.inc.php' );25 24 require_once( BX_DIRECTORY_PATH_INC . 'tags.inc.php' ); 26 25 … … 65 64 { 66 65 db_res( "UPDATE `Profiles` SET `Status` = 'Suspended' WHERE `ID` = '{$member['ID']}';" ); 67 68 modules_block($p_arr['ID']);69 66 } 70 67 break; … … 73 70 if ( $p_arr['Status'] == 'Suspended' ) 74 71 { 75 db_res( "UPDATE `Profiles` SET `Status` = 'Active' WHERE `ID` = {$member['ID']}" ); 76 77 // call modules to add user to modules 78 $check_res = checkAction($member['ID'], ACTION_ID_USE_CHAT); 79 if ( $check_res[CHECK_ACTION_RESULT] == CHECK_ACTION_RESULT_ALLOWED ) 80 modules_unblock($p_arr['ID'], 'chat'); 81 82 $check_res = checkAction($member['ID'], ACTION_ID_USE_FORUM); 83 if ( $check_res[CHECK_ACTION_RESULT] == CHECK_ACTION_RESULT_ALLOWED ) 84 modules_unblock($p_arr['ID'], 'forum'); 72 db_res( "UPDATE `Profiles` SET `Status` = 'Active' WHERE `ID` = {$member['ID']}" ); 85 73 } 86 74 break; -
trunk/inc/admin.inc.php
r8237 r8251 21 21 require_once( 'header.inc.php' ); 22 22 require_once( BX_DIRECTORY_PATH_INC . 'utils.inc.php' ); 23 require_once( BX_DIRECTORY_PATH_INC . 'modules.inc.php' );24 23 require_once( BX_DIRECTORY_PATH_INC . 'design.inc.php' ); 25 24 require_once( BX_DIRECTORY_PATH_INC . 'sharing.inc.php' ); 26 25 require_once( BX_DIRECTORY_PATH_INC . 'admin_design.inc.php' ); 27 28 //require_once( BX_DIRECTORY_PATH_CLASSES . 'BxDolBlogs.php' ); 29 require_once( BX_DIRECTORY_PATH_ROOT . 'modules/boonex/blogs/classes/BxBlogsModule.php'); 30 31 //require_once( BX_DIRECTORY_PATH_CLASSES . 'BxDolClassifieds.php' ); 32 require_once( BX_DIRECTORY_PATH_ROOT . 'modules/boonex/ads/classes/BxAdsModule.php'); 26 require_once( BX_DIRECTORY_PATH_MODULES . 'boonex/blogs/classes/BxBlogsModule.php'); 27 require_once( BX_DIRECTORY_PATH_MODULES . 'boonex/ads/classes/BxAdsModule.php'); 33 28 require_once( BX_DIRECTORY_PATH_CLASSES . 'BxDolEvents.php' ); 34 29 require_once( BX_DIRECTORY_PATH_CLASSES . 'BxDolSharedMedia.php' ); … … 1051 1046 1052 1047 if ( !getProfileInfo( $ID ) ) 1053 return false; 1054 1055 modules_del($ID); 1048 return false; 1056 1049 1057 1050 // create system event -
trunk/inc/classes/BxDolInstaller.php
r8229 r8251 83 83 $aResult = $this->_perform('install', 'Installation'); 84 84 if($aResult['result']) { 85 db_res("INSERT INTO `sys_modules`(`title`, `vendor`, `path`, `uri`, ` date`) VALUES ('" . $this->_aConfig['title'] . "', '" . $this->_aConfig['vendor'] . "', '" . $this->_aConfig['home_dir'] . "', '" . $this->_aConfig['home_uri'] . "', UNIX_TIMESTAMP())");85 db_res("INSERT INTO `sys_modules`(`title`, `vendor`, `path`, `uri`, `class_prefix`, `date`) VALUES ('" . $this->_aConfig['title'] . "', '" . $this->_aConfig['vendor'] . "', '" . $this->_aConfig['home_dir'] . "', '" . $this->_aConfig['home_uri'] . "', '" . $this->_aConfig['class_prefix'] . "', UNIX_TIMESTAMP())"); 86 86 $iModuleId = (int)db_last_id(); 87 87 -
trunk/install/index.php
r8236 r8251 132 132 define('BX_DIRECTORY_PATH_PLUGINS', \$dir['plugins']); 133 133 define('BX_DIRECTORY_PATH_DBCACHE', \$dir['inc'] . 'db_cached/' ); 134 define('BX_DIRECTORY_PATH_MODULES', \$dir['root'] . 'modules/' ); 134 135 135 136 define('DATABASE_HOST', \$db['host']); -
trunk/install/sql/v61.sql
r8242 r8251 6180 6180 6181 6181 INSERT INTO `MemActions` VALUES(1, 'send greetings', NULL); 6182 INSERT INTO `MemActions` VALUES(2, 'use chat', NULL);6183 6182 INSERT INTO `MemActions` VALUES(4, 'view profiles', NULL); 6184 6183 INSERT INTO `MemActions` VALUES(5, 'use forum', NULL); … … 6189 6188 INSERT INTO `MemActions` VALUES(10, 'use Ray instant messenger', NULL); 6190 6189 INSERT INTO `MemActions` VALUES(11, 'use Ray video recorder', NULL); 6191 INSERT INTO `MemActions` VALUES(12, 'use Ray chat', NULL);6192 6190 INSERT INTO `MemActions` VALUES(13, 'use guestbook', NULL); 6193 6191 INSERT INTO `MemActions` VALUES(14, 'view other members'' guestbooks', NULL); … … 8446 8444 INSERT INTO `TopMenu` VALUES(29, 28, 'All Videos', '_All Videos', 'browseMedia.php?type=video|viewVideo.php', 0, 'non,memb', '', '', '', 1, 1, 1, 'custom', 1, 'bx_videos.png', 1, ''); 8447 8445 INSERT INTO `TopMenu` VALUES(30, 28, 'Upload Video', '_Upload Video', 'uploadMedia.php?type=video', 1, 'memb', '', '', '', 1, 1, 1, 'custom', 0, 'bx_videos.png', 1, ''); 8448 INSERT INTO `TopMenu` VALUES(32, 0, 'Chat', '_Chat', 'chat.php', 11, 'non,memb', '', '', '', 1, 1, 1, 'top', 0, 'bx_chat.png', 1, '');8449 8446 INSERT INTO `TopMenu` VALUES(33, 0, 'Boards', '_Boards', 'board.php', 10, 'non,memb', '', '', '', 1, 1, 1, 'top', 0, 'bx_boards.png', 1, ''); 8450 8447 INSERT INTO `TopMenu` VALUES(38, 0, 'Music', '_Music', 'browseMedia.php?type=music|viewMusic.php', 5, 'non,memb', '', '', '', 1, 1, 1, 'top', 0, 'bx_music.png', 1, ''); … … 8502 8499 INSERT INTO `TopMenu` VALUES(99, 5, 'Login', '_Login', 'member.php', 2, 'non', '', 'showItemEditForm(''login_div''); $( ''#login_div'' ).show().load( ''member.php?action=show_login_form&relocate='' + encodeURIComponent( window.location ) );return false;', '', 0, 1, 1, 'custom', 0, '', 0, ''); 8503 8500 INSERT INTO `TopMenu` VALUES(100, 5, 'Main', '_Main', 'index.php|', 0, 'non,memb', '', '', '', 1, 1, 1, 'custom', 1, '', 0, ''); 8504 8501 INSERT INTO `TopMenu` VALUES(101, 'Chat', '_chat_top_menu_item', 'm/chat/', 11, 'non,memb', '', '', '', 1, 1, 1, 'top', 0, 'bx_chat.png', 1, ''); 8505 8502 -- -------------------------------------------------------- 8506 8503 … … 8769 8766 `path` varchar(255) NOT NULL default '', 8770 8767 `uri` varchar(255) NOT NULL default '', 8768 `class_prefix` varchar(32) NOT NULL default '', 8771 8769 `date` int(11) unsigned NOT NULL default '0', 8772 8770 PRIMARY KEY (`id`), … … 8778 8776 -- Dumping data for table `sys_modules` 8779 8777 -- 8780 INSERT INTO `sys_modules` (`title`, `vendor`, `path`, `uri`, `date`) VALUES ('Wall Module', 'Boonex', 'boonex/wall/', ' chat', UNIX_TIMESTAMP());8778 INSERT INTO `sys_modules` (`title`, `vendor`, `path`, `uri`, `date`) VALUES ('Wall Module', 'Boonex', 'boonex/wall/', 'wall', 'BxWall', UNIX_TIMESTAMP()); 8781 8779 8782 8780 -- -
trunk/modules/boonex/chat/classes/BxChatDb.php
r8219 r8251 21 21 ***************************************************************************/ 22 22 23 require_once( BX_DIRECTORY_PATH_CLASSES . 'BxDol Db.php' );23 require_once( BX_DIRECTORY_PATH_CLASSES . 'BxDolModuleDb.php' ); 24 24 25 class BxChatDb extends BxDol Db {25 class BxChatDb extends BxDolModuleDb { 26 26 var $_oConfig; 27 27 /* … … 29 29 */ 30 30 function BxChatDb(&$oConfig) { 31 parent::BxDol Db();31 parent::BxDolModuleDb(); 32 32 33 33 $this->_oConfig = $oConfig; -
trunk/modules/boonex/chat/index.php
r8229 r8251 18 18 ***************************************************************************/ 19 19 20 require_once( BX_DIRECTORY_PATH_INC . 'design.inc.php' ); 21 require_once( BX_DIRECTORY_PATH_ROOT . 'modules/boonex/chat/classes/BxChatModule.php'); 20 require_once( BX_DIRECTORY_PATH_MODULES . $aModule['path'] . '/classes/' . $aModule['class_prefix'] . 'Module.php'); 22 21 23 22 $iId = isset($_COOKIE['memberID']) ? (int)$_COOKIE['memberID'] : 0; 24 $ oChat = new BxChatModule();23 $iIndex = 57; 25 24 26 $_page['name_index'] = 57; 25 global $_page; 26 global $_page_cont; 27 28 $_page['name_index'] = $iIndex; 27 29 $_page['css_name'] = 'main.css'; 28 30 … … 32 34 $logged['member'] = member_auth(0); 33 35 34 $_ni = $_page['name_index']; 35 $_page_cont[$_ni]['page_main_code'] = $oChat->getContent($iId); 36 37 $oChat = new BxChatModule(); 38 $_page_cont[$iIndex]['page_main_code'] = $oChat->getContent($iId); 36 39 37 40 PageCode($oChat->_oTemplate); -
trunk/modules/boonex/chat/install/sql/install.sql
r8219 r8251 1 INSERT INTO `TopMenu` (`Parent`, `Name`, `Caption`, `Link`, `Order`, `Visible`, `Target`, `Onclick`, `Check`, `Editable`, `Deletable`, `Active`, `Type`, `Strict`, `Picture`, `BQuickLink`, `Statistics`) VALUES(0, 'Chat', '_chat_top_menu_item', 'm odules/boonex/chat/chat.php', 11, 'non,memb', '', '', '', 1, 1, 1, 'top', 0, 'bx_chat.png', 1, '');1 INSERT INTO `TopMenu` (`Parent`, `Name`, `Caption`, `Link`, `Order`, `Visible`, `Target`, `Onclick`, `Check`, `Editable`, `Deletable`, `Active`, `Type`, `Strict`, `Picture`, `BQuickLink`, `Statistics`) VALUES(0, 'Chat', '_chat_top_menu_item', 'm/chat/', 11, 'non,memb', '', '', '', 1, 1, 1, 'top', 0, 'bx_chat.png', 1, ''); 2 2 3 3 INSERT INTO `MemActions` SET `Name`='use chat'; -
trunk/modules/boonex/wall/classes/BxWallDb.php
r7803 r8251 21 21 ***************************************************************************/ 22 22 23 require_once( BX_DIRECTORY_PATH_CLASSES . 'BxDol Db.php' );23 require_once( BX_DIRECTORY_PATH_CLASSES . 'BxDolModuleDb.php' ); 24 24 25 class BxWallDb extends BxDol Db {25 class BxWallDb extends BxDolModuleDb { 26 26 var $_oConfig; 27 27 /* … … 29 29 */ 30 30 function BxWallDb(&$oConfig) { 31 parent::BxDol Db();31 parent::BxDolModuleDb(); 32 32 33 33 $this->_oConfig = $oConfig; -
trunk/modules/index.php
r8233 r8251 21 21 22 22 require_once("../inc/header.inc.php"); 23 require_once(BX_DIRECTORY_PATH_INC . "d b.inc.php");24 23 require_once(BX_DIRECTORY_PATH_INC . "design.inc.php"); 24 require_once(BX_DIRECTORY_PATH_CLASSES . 'BxDolModuleDb.php'); 25 25 26 26 $aRequest = explode('/', $_GET['r']); 27 $aModule = db_arr("SELECT `id`, `title`, `vendor`, `path`, `uri`, `date` FROM `sys_modules` WHERE `uri`='" . $aRequest[0] . "' LIMIT 1");28 $sRequest = $_SERVER['QUERY_STRING'];29 27 30 include(BX_DIRECTORY_PATH_ROOT . 'modules/' . $aModule['path'] . 'index.php'); 28 $oDb = new BxDolModuleDb(); 29 $aModule = $oDb->getModuleByUri(array_shift($aRequest)); 30 31 include(BX_DIRECTORY_PATH_MODULES . $aModule['path'] . 'request.php'); 31 32 ?> -
trunk/periodic/cmd.php
r7387 r8251 23 23 require_once( BX_DIRECTORY_PATH_INC . 'profiles.inc.php' ); 24 24 require_once( BX_DIRECTORY_PATH_INC . 'admin.inc.php' ); 25 require_once( BX_DIRECTORY_PATH_INC . 'modules.inc.php' );26 25 require_once( BX_DIRECTORY_PATH_INC . 'membership_levels.inc.php' ); 27 26 … … 147 146 } 148 147 149 150 151 function modules_proceed()152 {153 // select all profiles and check who can't use chat or forum154 $p_res = db_res( "SELECT `ID` FROM `Profiles`");155 while ( $p_arr = mysql_fetch_array($p_res) )156 {157 $check_res = checkAction($p_arr['ID'], ACTION_ID_USE_CHAT);158 if ( $check_res[CHECK_ACTION_RESULT] != CHECK_ACTION_RESULT_ALLOWED )159 {160 modules_block($p_arr['ID'], 'chat');161 }162 else163 {164 modules_unblock($p_arr['ID'], 'chat');165 }166 167 $check_res = checkAction($p_arr['ID'], ACTION_ID_USE_FORUM);168 if ( $check_res[CHECK_ACTION_RESULT] != CHECK_ACTION_RESULT_ALLOWED )169 {170 modules_block($p_arr['ID'], 'forum');171 }172 else173 {174 modules_unblock($p_arr['ID'], 'forum');175 }176 }177 178 echo "\n- Modules check -\n";179 echo "Profiles processed successfully\n";180 }181 182 148 // ------------- 183 149 … … 247 213 if ( $current_membership_arr['ID'] != $last_membership_arr['ID'] ) 248 214 { 249 modules_update($row['ID']); // Handle membership level change250 215 if ($further_membership_arr['ID'] == MEMBERSHIP_ID_STANDARD) 251 216 { … … 289 254 clean_database(); 290 255 291 modules_proceed();292 293 256 finish(); 294 257
Note: See TracChangeset
for help on using the changeset viewer.