AntonLV 2 лет назад
Родитель
Сommit
b31c26c12a
100 измененных файлов с 0 добавлено и 9846 удалено
  1. 0 51
      modules/boonex/accounts/updates/10.0.0_11.0.0/install/config.php
  2. 0 13
      modules/boonex/accounts/updates/10.0.0_11.0.0/install/installer.php
  3. 0 6
      modules/boonex/accounts/updates/10.0.0_11.0.0/install/langs/en.xml
  4. 0 13
      modules/boonex/accounts/updates/10.0.0_11.0.0/install/sql/enable.sql
  5. 0 443
      modules/boonex/accounts/updates/10.0.0_11.0.0/source/classes/BxAccntGridAdministration.php
  6. 0 65
      modules/boonex/accounts/updates/10.0.0_11.0.0/source/classes/BxAccntMenuManageTools.php
  7. 0 110
      modules/boonex/accounts/updates/10.0.0_11.0.0/source/classes/BxAccntModule.php
  8. 0 71
      modules/boonex/accounts/updates/10.0.0_11.0.0/source/install/config.php
  9. 0 82
      modules/boonex/accounts/updates/10.0.0_11.0.0/source/install/langs/en.xml
  10. 0 82
      modules/boonex/accounts/updates/10.0.0_11.0.0/source/install/sql/enable.sql
  11. 0 133
      modules/boonex/accounts/updates/10.0.0_11.0.0/source/js/manage_tools.js
  12. 0 51
      modules/boonex/accounts/updates/11.0.0_11.0.1/install/config.php
  13. 0 13
      modules/boonex/accounts/updates/11.0.0_11.0.1/install/installer.php
  14. 0 7
      modules/boonex/accounts/updates/11.0.0_11.0.1/install/langs/en.xml
  15. 0 7
      modules/boonex/accounts/updates/11.0.0_11.0.1/install/sql/enable.sql
  16. 0 32
      modules/boonex/accounts/updates/11.0.0_11.0.1/install/sql/install.sql
  17. 0 96
      modules/boonex/accounts/updates/11.0.0_11.0.1/source/classes/BxAccntConfig.php
  18. 0 511
      modules/boonex/accounts/updates/11.0.0_11.0.1/source/classes/BxAccntGridAdministration.php
  19. 0 71
      modules/boonex/accounts/updates/11.0.0_11.0.1/source/install/config.php
  20. 0 87
      modules/boonex/accounts/updates/11.0.0_11.0.1/source/install/langs/en.xml
  21. 0 83
      modules/boonex/accounts/updates/11.0.0_11.0.1/source/install/sql/enable.sql
  22. 0 51
      modules/boonex/accounts/updates/11.0.0_11.0.1/source/install/sql/install.sql
  23. 0 19
      modules/boonex/accounts/updates/11.0.0_11.0.1/source/template/create.html
  24. 0 51
      modules/boonex/accounts/updates/11.0.1_11.0.2/install/config.php
  25. 0 13
      modules/boonex/accounts/updates/11.0.1_11.0.2/install/installer.php
  26. 0 4
      modules/boonex/accounts/updates/11.0.1_11.0.2/install/langs/en.xml
  27. 0 13
      modules/boonex/accounts/updates/11.0.1_11.0.2/install/sql/enable.sql
  28. 0 517
      modules/boonex/accounts/updates/11.0.1_11.0.2/source/classes/BxAccntGridAdministration.php
  29. 0 71
      modules/boonex/accounts/updates/11.0.1_11.0.2/source/install/config.php
  30. 0 88
      modules/boonex/accounts/updates/11.0.1_11.0.2/source/install/langs/en.xml
  31. 0 84
      modules/boonex/accounts/updates/11.0.1_11.0.2/source/install/sql/enable.sql
  32. 0 51
      modules/boonex/accounts/updates/11.0.2_11.0.3/install/config.php
  33. 0 13
      modules/boonex/accounts/updates/11.0.2_11.0.3/install/installer.php
  34. 0 509
      modules/boonex/accounts/updates/11.0.2_11.0.3/source/classes/BxAccntGridAdministration.php
  35. 0 71
      modules/boonex/accounts/updates/11.0.2_11.0.3/source/install/config.php
  36. 0 51
      modules/boonex/accounts/updates/11.0.3_11.0.4/install/config.php
  37. 0 13
      modules/boonex/accounts/updates/11.0.3_11.0.4/install/installer.php
  38. 0 510
      modules/boonex/accounts/updates/11.0.3_11.0.4/source/classes/BxAccntGridAdministration.php
  39. 0 71
      modules/boonex/accounts/updates/11.0.3_11.0.4/source/install/config.php
  40. 0 51
      modules/boonex/accounts/updates/11.0.4_12.0.0/install/config.php
  41. 0 13
      modules/boonex/accounts/updates/11.0.4_12.0.0/install/installer.php
  42. 0 8
      modules/boonex/accounts/updates/11.0.4_12.0.0/install/langs/en.xml
  43. 0 19
      modules/boonex/accounts/updates/11.0.4_12.0.0/install/sql/enable.sql
  44. 0 6
      modules/boonex/accounts/updates/11.0.4_12.0.0/install/sql/install.sql
  45. 0 582
      modules/boonex/accounts/updates/11.0.4_12.0.0/source/classes/BxAccntGridAdministration.php
  46. 0 68
      modules/boonex/accounts/updates/11.0.4_12.0.0/source/classes/BxAccntMenuManageTools.php
  47. 0 131
      modules/boonex/accounts/updates/11.0.4_12.0.0/source/classes/BxAccntModule.php
  48. 0 49
      modules/boonex/accounts/updates/11.0.4_12.0.0/source/classes/BxAccntStudioPage.php
  49. 0 110
      modules/boonex/accounts/updates/11.0.4_12.0.0/source/classes/BxAccntTemplate.php
  50. 0 71
      modules/boonex/accounts/updates/11.0.4_12.0.0/source/install/config.php
  51. 0 92
      modules/boonex/accounts/updates/11.0.4_12.0.0/source/install/langs/en.xml
  52. 0 88
      modules/boonex/accounts/updates/11.0.4_12.0.0/source/install/sql/enable.sql
  53. 0 51
      modules/boonex/accounts/updates/11.0.4_12.0.0/source/install/sql/install.sql
  54. 0 14
      modules/boonex/accounts/updates/11.0.4_12.0.0/source/install/sql/uninstall.sql
  55. 0 26
      modules/boonex/accounts/updates/11.0.4_12.0.0/source/js/main.js
  56. 0 167
      modules/boonex/accounts/updates/11.0.4_12.0.0/source/js/manage_tools.js
  57. 0 19
      modules/boonex/accounts/updates/11.0.4_12.0.0/source/template/create.html
  58. 0 19
      modules/boonex/accounts/updates/11.0.4_12.0.0/source/template/css/manage_tools.css
  59. 0 19
      modules/boonex/accounts/updates/11.0.4_12.0.0/source/template/edit_email.html
  60. 0 15
      modules/boonex/accounts/updates/11.0.4_12.0.0/source/template/set_role_popup.html
  61. 0 51
      modules/boonex/accounts/updates/12.0.0_12.0.1/install/config.php
  62. 0 13
      modules/boonex/accounts/updates/12.0.0_12.0.1/install/installer.php
  63. 0 4
      modules/boonex/accounts/updates/12.0.0_12.0.1/install/langs/en.xml
  64. 0 97
      modules/boonex/accounts/updates/12.0.0_12.0.1/source/classes/BxAccntConfig.php
  65. 0 587
      modules/boonex/accounts/updates/12.0.0_12.0.1/source/classes/BxAccntGridAdministration.php
  66. 0 71
      modules/boonex/accounts/updates/12.0.0_12.0.1/source/install/config.php
  67. 0 93
      modules/boonex/accounts/updates/12.0.0_12.0.1/source/install/langs/en.xml
  68. 0 51
      modules/boonex/accounts/updates/12.0.1_12.0.2/install/config.php
  69. 0 13
      modules/boonex/accounts/updates/12.0.1_12.0.2/install/installer.php
  70. 0 589
      modules/boonex/accounts/updates/12.0.1_12.0.2/source/classes/BxAccntGridAdministration.php
  71. 0 71
      modules/boonex/accounts/updates/12.0.1_12.0.2/source/install/config.php
  72. 0 51
      modules/boonex/accounts/updates/12.0.2_12.0.3/install/config.php
  73. 0 13
      modules/boonex/accounts/updates/12.0.2_12.0.3/install/installer.php
  74. 0 4
      modules/boonex/accounts/updates/12.0.2_12.0.3/install/langs/en.xml
  75. 0 7
      modules/boonex/accounts/updates/12.0.2_12.0.3/install/sql/enable.sql
  76. 0 100
      modules/boonex/accounts/updates/12.0.2_12.0.3/source/classes/BxAccntConfig.php
  77. 0 119
      modules/boonex/accounts/updates/12.0.2_12.0.3/source/classes/BxAccntTemplate.php
  78. 0 71
      modules/boonex/accounts/updates/12.0.2_12.0.3/source/install/config.php
  79. 0 94
      modules/boonex/accounts/updates/12.0.2_12.0.3/source/install/langs/en.xml
  80. 0 88
      modules/boonex/accounts/updates/12.0.2_12.0.3/source/install/sql/enable.sql
  81. 0 18
      modules/boonex/accounts/updates/12.0.2_12.0.3/source/template/set_role_popup.html
  82. 0 51
      modules/boonex/accounts/updates/12.0.3_12.0.4/install/config.php
  83. 0 13
      modules/boonex/accounts/updates/12.0.3_12.0.4/install/installer.php
  84. 0 18
      modules/boonex/accounts/updates/12.0.3_12.0.4/install/langs/en.xml
  85. 0 26
      modules/boonex/accounts/updates/12.0.3_12.0.4/install/sql/enable.sql
  86. 0 103
      modules/boonex/accounts/updates/12.0.3_12.0.4/source/classes/BxAccntConfig.php
  87. 0 35
      modules/boonex/accounts/updates/12.0.3_12.0.4/source/classes/BxAccntDb.php
  88. 0 731
      modules/boonex/accounts/updates/12.0.3_12.0.4/source/classes/BxAccntGridAdministration.php
  89. 0 160
      modules/boonex/accounts/updates/12.0.3_12.0.4/source/classes/BxAccntModule.php
  90. 0 88
      modules/boonex/accounts/updates/12.0.3_12.0.4/source/classes/BxAccntSearchResult.php
  91. 0 45
      modules/boonex/accounts/updates/12.0.3_12.0.4/source/classes/BxAccntStudioPage.php
  92. 0 71
      modules/boonex/accounts/updates/12.0.3_12.0.4/source/install/config.php
  93. 0 110
      modules/boonex/accounts/updates/12.0.3_12.0.4/source/install/langs/en.xml
  94. 0 31
      modules/boonex/accounts/updates/12.0.3_12.0.4/source/install/sql/disable.sql
  95. 0 105
      modules/boonex/accounts/updates/12.0.3_12.0.4/source/install/sql/enable.sql
  96. 0 53
      modules/boonex/accounts/updates/8.0.0_8.0.1/install/config.php
  97. 0 13
      modules/boonex/accounts/updates/8.0.0_8.0.1/install/installer.php
  98. 0 8
      modules/boonex/accounts/updates/8.0.0_8.0.1/install/langs/en.xml
  99. 0 50
      modules/boonex/accounts/updates/8.0.0_8.0.1/install/sql/enable.sql
  100. 0 85
      modules/boonex/accounts/updates/8.0.0_8.0.1/source/classes/BxAccntConfig.php

+ 0 - 51
modules/boonex/accounts/updates/10.0.0_11.0.0/install/config.php

@@ -1,51 +0,0 @@
-<?php
-/**
- * Copyright (c) UNA, Inc - https://una.io
- * MIT License - https://opensource.org/licenses/MIT
- */
-
-$aConfig = array(
-    /**
-     * Main Section.
-     */
-    'title' => 'Accounts Manager',
-    'version_from' => '10.0.0',
-    'version_to' => '11.0.0',
-    'vendor' => 'BoonEx',
-
-    'compatible_with' => array(
-        '11.0.0-B1'
-    ),
-
-    /**
-     * 'home_dir' and 'home_uri' - should be unique. Don't use spaces in 'home_uri' and the other special chars.
-     */
-    'home_dir' => 'boonex/accounts/updates/update_10.0.0_11.0.0/',
-    'home_uri' => 'accounts_update_1000_1100',
-
-    'module_dir' => 'boonex/accounts/',
-    'module_uri' => 'accounts',
-
-    'db_prefix' => 'bx_accnt_',
-    'class_prefix' => 'BxAccnt',
-
-    /**
-     * Installation/Uninstallation Section.
-     */
-    'install' => array(
-        'execute_sql' => 1,
-        'update_files' => 1,
-        'update_languages' => 1,
-        'clear_db_cache' => 1,
-    ),
-
-    /**
-     * Category for language keys.
-     */
-    'language_category' => 'Accounts',
-
-    /**
-     * Files Section
-     */
-    'delete_files' => array(),
-);

+ 0 - 13
modules/boonex/accounts/updates/10.0.0_11.0.0/install/installer.php

@@ -1,13 +0,0 @@
-<?php
-/**
- * Copyright (c) UNA, Inc - https://una.io
- * MIT License - https://opensource.org/licenses/MIT
- */
-
-class BxAccntUpdater extends BxDolStudioUpdater
-{
-    function __construct($aConfig)
-    {
-        parent::__construct($aConfig);
-    }
-}

+ 0 - 6
modules/boonex/accounts/updates/10.0.0_11.0.0/install/langs/en.xml

@@ -1,6 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<resources name="en" flag="gb" title="English">
-	<string_add name="_bx_accnt_menu_item_title_system_confirm"><![CDATA[Confirm]]></string_add>
-    <string_add name="_bx_accnt_menu_item_title_confirm"><![CDATA[Confirm]]></string_add>
-	<string_add name="_bx_accnt_grid_action_title_adm_confirm"><![CDATA[Confirm]]></string_add>
-</resources>

+ 0 - 13
modules/boonex/accounts/updates/10.0.0_11.0.0/install/sql/enable.sql

@@ -1,13 +0,0 @@
-SET @sName = 'bx_accounts';
-
-
--- MENUS
-DELETE FROM `sys_menu_items` WHERE `set_name`='bx_accounts_menu_manage_tools' AND `name`='confirm';
-INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `addon`, `submenu_object`, `visible_for_levels`, `visibility_custom`, `active`, `copyable`, `order`) VALUES 
-('bx_accounts_menu_manage_tools', @sName, 'confirm', '_bx_accnt_menu_item_title_system_confirm', '_bx_accnt_menu_item_title_confirm', 'javascript:void(0)', 'javascript:{js_object}.onClickConfirm({content_id}, this);', '_self', 'fas check', '', '', 192, '', 1, 0, 3);
-
-
--- GRIDS
-DELETE FROM `sys_grid_actions` WHERE `object`='bx_accounts_administration' AND `name`='confirm';
-INSERT INTO `sys_grid_actions` (`object`, `type`, `name`, `title`, `icon`, `icon_only`, `confirm`, `order`) VALUES
-('bx_accounts_administration', 'bulk', 'confirm', '_bx_accnt_grid_action_title_adm_confirm', '', 0, 0, 4);

+ 0 - 443
modules/boonex/accounts/updates/10.0.0_11.0.0/source/classes/BxAccntGridAdministration.php

@@ -1,443 +0,0 @@
-<?php defined('BX_DOL') or die('hack attempt');
-/**
- * Copyright (c) UNA, Inc - https://una.io
- * MIT License - https://opensource.org/licenses/MIT
- *
- * @defgroup    Accounts Accounts
- * @ingroup     UnaModules
- * 
- * @{
- */
-
-class BxAccntGridAdministration extends BxBaseModProfileGridAdministration
-{
-    protected $_sFilter2Name;
-	protected $_sFilter2Value;
-	protected $_aFilter2Values;
-    
-    public function __construct ($aOptions, $oTemplate = false)
-    {
-    	$this->MODULE = 'bx_accounts';
-        parent::__construct ($aOptions, $oTemplate);
-
-        $CNF = &$this->_oModule->_oConfig->CNF;
-        $this->_aFilter1Values = array_merge($this->_aFilter1Values, array(
-            'unconfirmed' => $CNF['T']['filter_item_unconfirmed'],
-            'locked' => $CNF['T']['filter_item_locked'],
-        ));
-
-        $this->_sFilter2Name = 'filter2';
-        $this->_aFilter2Values = array(
-            'operators' => $CNF['T']['filter_item_operators']
-        );
-
-        $sFilter2 = bx_get($this->_sFilter2Name);
-        if(!empty($sFilter2)) {
-            $this->_sFilter2Value = bx_process_input($sFilter2);
-            $this->_aQueryAppend[$this->_sFilter2Name] = $this->_sFilter2Value;
-        }
-    }
-
-    protected function _getDataSql($sFilter, $sOrderField, $sOrderDir, $iStart, $iPerPage)
-    {
-        if(strpos($sFilter, $this->_sParamsDivider) !== false)
-            list($this->_sFilter1Value, $this->_sFilter2Value, $sFilter) = explode($this->_sParamsDivider, $sFilter);
-
-    	if(!empty($this->_sFilter1Value))
-            switch($this->_sFilter1Value) {
-                case 'unconfirmed':
-                    $sCnfnType = getParam('sys_account_confirmation_type');
-                    switch($sCnfnType) {
-                        case 'email':
-                            $this->_aOptions['source'] .= " AND `ta`.`email_confirmed`='0'";
-                            break;
-                        case 'phone':
-                            $this->_aOptions['source'] .= " AND `ta`.`phone_confirmed`='0'";
-                            break;
-                        case 'email_and_phone':
-                            $this->_aOptions['source'] .= " AND (`ta`.`email_confirmed`='0' OR `ta`.`phone_confirmed`='0')";
-                            break;
-                    }
-                    break;
-
-                case 'locked':
-                    $this->_aOptions['source'] .= " AND `ta`.`locked` = 1";
-                    break;
-
-                default:
-        	    $this->_aOptions['source'] .= $this->_oModule->_oDb->prepareAsString(" AND `tp`.`status`=?", $this->_sFilter1Value);
-            }
-
-        if(!empty($this->_sFilter2Value))
-        	$this->_aOptions['source'] .= $this->_oModule->_oDb->prepareAsString(" AND `ta`.`role` & " . BX_DOL_ROLE_ADMIN ." = " . BX_DOL_ROLE_ADMIN);
-
-        return parent::_getDataSqlInner($sFilter, $sOrderField, $sOrderDir, $iStart, $iPerPage);
-    }
-    
-    protected function _getFilterControls()
-    {
-        parent::_getFilterControls();
-
-        return  $this->_getFilterSelectOne($this->_sFilter1Name, $this->_sFilter1Value, $this->_aFilter1Values) . $this->_getFilterSelectOne($this->_sFilter2Name, $this->_sFilter2Value, $this->_aFilter2Values) . $this->_getSearchInput();
-    }
-    
-    public function getCode($isDisplayHeader = true)
-    {
-        return $this->_oModule->_oTemplate->getJsCode('main', array(
-        	'aHtmlIds' => $this->_oModule->_oConfig->getHtmlIds()
-        )) . parent::getCode($isDisplayHeader);
-    }
-
-    public function performActionActivate()
-    {
-    	$this->_performActionEnable(true);
-    }
-
-	public function performActionSuspend()
-    {
-    	$this->_performActionEnable(false);
-    }
-
-    public function performActionEditEmail()
-    {
-        $CNF = &$this->_oModule->_oConfig->CNF;
-
-        $aIds = bx_get('ids');
-        if(!$aIds || !is_array($aIds)) {
-            $iId = (int)bx_get('id');
-            if(!$iId)
-                return echoJson(array());
-
-            $aIds = array($iId);
-        }
-
-        $iId = $aIds[0];
-        $oAccount = BxDolAccount::getInstance($iId);
-        if(!$oAccount)
-            return echoJson(array());
-
-        $aAccount = $oAccount->getInfo();
-        $sAction = 'edit_email';
-
-        $oForm = BxDolForm::getObjectInstance($CNF['OBJECT_FORM_ACCOUNT'], $CNF['OBJECT_FORM_ACCOUNT_DISPLAY_SETTINGS_EMAIL']);
-        $oForm->aFormAttrs['action'] = BX_DOL_URL_ROOT . 'grid.php?o=' . $this->_sObject . '&a=' . $sAction . '&id=' . $iId;
-        $oForm->initChecker($aAccount);
-
-        if($oForm->isSubmittedAndValid()) {
-            $sEmail = $oForm->getCleanValue('email');
-            if(strcmp($aAccount['email'], $sEmail) !== 0 && BxDolAccountQuery::getInstance()->getIdByEmail($sEmail))
-                return echoJson(array('msg' => _t('_sys_form_account_input_email_uniq_error_loggedin')));
-
-            if($oForm->update($aAccount['id'])) {
-                bx_alert('account', 'edited', $aAccount['id'], BxDolAccount::getInstance()->id(), array('display' => $CNF['OBJECT_FORM_ACCOUNT_DISPLAY_SETTINGS_EMAIL']));
-
-                $aRes = array('grid' => $this->getCode(false), 'blink' => $iId);
-                
-                $oAccount->doAudit($iId, '_sys_audit_action_account_email_changed', array('old_email' => $oAccount->getEmail(), 'new_email' => $sEmail));
-            }
-            else
-                $aRes = array('msg' => _t('_sys_txt_error_account_update'));
-
-            echoJson($aRes);
-        }
-        else {
-            $sContent = BxTemplStudioFunctions::getInstance()->popupBox('bx-account-edit-email-popup', _t('_bx_accounts_form_display_account_settings_email_popup'), $this->_oModule->_oTemplate->parseHtmlByName('edit_email.html', array(
-                'form_id' => $oForm->id,
-                'form' => $oForm->getCode(true),
-                'object' => $this->_sObject,
-                'action' => $sAction
-            )));
-
-            echoJson(array('popup' => array('html' => $sContent, 'options' => array())));
-        }
-    }
-    
-    public function performActionConfirm()
-    {
-        $CNF = &$this->_oModule->_oConfig->CNF;
-
-    	$aIds = bx_get('ids');
-        if(!$aIds || !is_array($aIds)) {
-            echoJson(array());
-            return;
-        }
-
-        $oAccount = BxDolAccount::getInstance();
-
-        $iAffected = 0;
-        $aIdsAffected = array();
-        foreach($aIds as $iId){
-            if (BxDolAccount::isNeedConfirmEmail()){
-			    if($oAccount->updateEmailConfirmed(true, true, $iId)) {
-				    $aIdsAffected[] = $iId;
-        		    $iAffected++;  
-			    }
-            }
-            if (BxDolAccount::isNeedConfirmPhone()){
-			    if($oAccount->updatePhoneConfirmed(true, $iId)) {
-				    $aIdsAffected[] = $iId;
-        		    $iAffected++;  
-			    }
-            }
-        }
-		echoJson($iAffected ? array('grid' => $this->getCode(false), 'blink' => $aIdsAffected) : array('msg' => _t($CNF['T']['grid_action_err_perform'])));
-    }
-    
-    public function performActionResendCemail()
-    {
-    	$CNF = &$this->_oModule->_oConfig->CNF;
-
-    	$aIds = bx_get('ids');
-        if(!$aIds || !is_array($aIds)) {
-            echoJson(array());
-            return;
-        }
-
-        $oAccount = BxDolAccount::getInstance();
-
-        $iAffected = 0;
-        $aIdsAffected = array();
-        foreach($aIds as $iId)
-			if($oAccount->sendConfirmationEmail($iId)) {
-				$aIdsAffected[] = $iId;
-        		$iAffected++;  
-			}
-
-		echoJson($iAffected ? array('grid' => $this->getCode(false), 'blink' => $aIdsAffected) : array('msg' => _t($CNF['T']['grid_action_err_perform'])));
-    }
-
-    public function performActionResetPassword()
-    {
-    	$aIds = bx_get('ids');
-        if(!$aIds || !is_array($aIds)) {
-            echoJson(array());
-            return;
-        }
-
-        $iId = $aIds[0];
-        $oAccount = BxDolAccount::getInstance($iId);
-        if(!$oAccount)
-            return echoJson(array());
-
-        $sPwd = genRndPwd();
-        $sSalt = genRndSalt();
-        $sPasswordHash = encryptUserPwd($sPwd, $sSalt);
-
-        $aRes = array();
-        if((int)BxDolAccountQuery::getInstance()->updatePassword($sPasswordHash, $sSalt, $iId) > 0) {
-            bx_alert('account', 'edited', $iId, BxDolAccount::getInstance()->id(), array('action' => 'reset_password'));
-
-            $sPopupId = $this->_oModule->_oConfig->getHtmlIds('password_popup');
-            $sPopupTitle = _t('_bx_accounts_form_display_account_settings_password_popup');
-            $sPopupContent = $this->_oModule->_oTemplate->parseHtmlByName('reset_password.html', array(
-                'js_object' => $this->_oModule->_oConfig->getJsObject('main'),
-                'html_id_text' => $this->_oModule->_oConfig->getHtmlIds('password_text'),
-                'html_id_button' => $this->_oModule->_oConfig->getHtmlIds('password_button'),
-                'password' => $sPwd,
-            ));
-
-            $aRes = array('popup' => BxTemplStudioFunctions::getInstance()->popupBox($sPopupId, $sPopupTitle, $sPopupContent));
-            
-            $oAccount->doAudit($iId, '_sys_audit_action_account_reset_password');
-        }
-        else 
-            $aRes = array('msg' => _t('_bx_accnt_grid_action_err_perform'));
-
-        return echoJson($aRes);
-    }
-    
-    public function performActionUnlockAccount()
-    {
-    	$aIds = bx_get('ids');
-        if(!$aIds || !is_array($aIds)) {
-            echoJson(array());
-            return;
-        }
-		$oAccountQuery = BxDolAccountQuery::getInstance();
-		foreach($aIds as $iId){
-			$oAccount = BxDolAccount::getInstance($iId);
-			if(!$oAccount)
-				continue;
-			if ($oAccount->isLocked()){
-				$oAccountQuery->unlockAccount($iId);
-			}
-            
-            $oAccount->doAudit($iId, '_sys_audit_action_account_unlock');
-		}
-		$aRes = array('grid' => $this->getCode(false), 'blink' => $aIds);
-        return echoJson($aRes);
-    }
-
-	public function performActionMakeOperator()
-    {
-    	$this->_performActionChangeRole(3);
-    }
-
-	public function performActionUnmakeOperator()
-    {
-    	$this->_performActionChangeRole(1);
-    }
-
-	protected function _performActionChangeRole($iRole)
-    {
-    	$CNF = &$this->_oModule->_oConfig->CNF;
-
-    	$aIds = bx_get('ids');
-        if(!$aIds || !is_array($aIds)) {
-            echoJson(array());
-            return;
-        }
-
-        $iAffected = 0;
-        $aIdsAffected = array();
-        foreach($aIds as $iId)
-			if($this->_oModule->_oDb->updateAccount(array('role' => $iRole), array('id' => $iId))) {
-				$aIdsAffected[] = $iId;
-        		$iAffected++;
-                
-                $oAccount = BxDolAccount::getInstance($iId);
-                $oAccount->doAudit($iId, '_sys_audit_action_account_change_role_to_' . $iRole);
-			}
-
-		echoJson($iAffected ? array('grid' => $this->getCode(false), 'blink' => $aIdsAffected) : array('msg' => _t($CNF['T']['grid_action_err_perform'])));
-    }
-
-	protected function _performActionEnable($isChecked)
-    {
-    	$CNF = &$this->_oModule->_oConfig->CNF;
-
-    	$aIds = bx_get('ids');
-        if(!$aIds || !is_array($aIds)) {
-            echoJson(array());
-            return;
-        }
-        $iAffected = 0;
-        $aIdsAffected = array();
-        foreach($aIds as $iId)
-        	if($this->_enable($iId, $isChecked)) {
-        		$aIdsAffected[] = $iId;
-        		$iAffected++;
-                
-                $oAccount = BxDolAccount::getInstance($iId);
-                $oAccount->doAudit($iId, '_sys_audit_action_account_' . $isChecked ? 'activated' : 'suspended');
-        	}
-
-        echoJson($iAffected ? array('grid' => $this->getCode(false), 'blink' => $aIdsAffected) : array('msg' => _t($CNF['T']['grid_action_err_perform'])));
-    }
-
-    protected function _enable($mixedId, $isChecked)
-    {
-    	$oProfile = BxDolProfile::getInstanceAccountProfile($mixedId);
-    	if(!$oProfile)
-    	    return false;
-
-        $iAction = BX_PROFILE_ACTION_MANUAL;
-        $sMethod = $isChecked ? 'activate' : 'suspend';
-        if(!$oProfile->$sMethod($iAction, 0 ,false))
-            return false;
-
-        sendMailTemplate('t_ChangeStatusAccount' . ucfirst($sMethod), $oProfile->getAccountObject()->id(), $oProfile->id(), array(), BX_EMAIL_SYSTEM);
-        
-        $aProfiles = $oProfile->getAccountObject()->getProfiles();
-        foreach($aProfiles as $aProfile){
-            BxDolProfile::getInstance($aProfile['id'])->$sMethod($iAction, 0 ,false);
-        }
-        
-    	return true;
-    }
-
-    //--- Layout methods ---//
-    protected function _getActionEditEmail($sType, $sKey, $a, $isSmall = false, $isDisabled = false, $aRow = array())
-    {
-        return '';
-    }
-    
-    protected function _getCellEmailConfirmed($mixedValue, $sKey, $aField, $aRow)
-    {
-    	$mixedValue = (int)$mixedValue == 1 ? '_Yes' : '_No';
-        return parent::_getCellDefault(_t($mixedValue), $sKey, $aField, $aRow);
-    }
-
-    protected function _getActionResetPassword($sType, $sKey, $a, $isSmall = false, $isDisabled = false, $aRow = array())
-    {
-        return '';
-    }
-    
-    protected function _getActionUnlockAccount($sType, $sKey, $a, $isSmall = false, $isDisabled = false, $aRow = array())
-    {
-        return '';
-    }
-
-    protected function _getCellName($mixedValue, $sKey, $aField, $aRow)
-    {
-        $oAccount = BxDolAccount::getInstance($aRow['id']);
-        if ($oAccount)
-            $s = ($aRow['locked'] == 1 ? $this->_oTemplate->parseIcon("lock col-red1") . ' ' : '') . $oAccount->getDisplayName();
-        return parent::_getCellDefault ($s, $sKey, $aField, $aRow);
-    }
-    
-	protected function _getCellProfiles($mixedValue, $sKey, $aField, $aRow)
-    {
-        $s = $this->_oModule->_oTemplate->getProfilesByAccount($aRow);
-
-        return parent::_getCellDefault ($s, $sKey, $aField, $aRow);
-    }
-
-    protected function _getCellLogged($mixedValue, $sKey, $aField, $aRow)
-    {
-        $mixedValue = !empty($mixedValue) ? bx_time_js($mixedValue) : _t('_sys_not_available');
-
-        return parent::_getCellDefault($mixedValue, $sKey, $aField, $aRow);
-    }    
-    
-    protected function _getCellIsConfirmed($mixedValue, $sKey, $aField, $aRow)
-    {
-        $oAccount = BxDolAccount::getInstance($aRow['id']);
-        $s = "";
-        if ($oAccount)
-            $s = $oAccount->getCurrentConfirmationStatusValue();
-        return parent::_getCellDefault(_t('_bx_accnt_grid_confirmation_status_' . $s), $sKey, $aField, $aRow);
-    }
-
-    protected function _isCheckboxDisabled($aRow)
-    {
-        return false;
-    }
-
-	protected function _getContentInfo($iId)
-    {
-    	return BxDolAccountQuery::getInstance()->getInfoById($iId);
-    }
-
-	protected function _doDelete($iId, $aParams = array())
-    {
-    	return BxDolAccount::getInstance($iId)->delete(isset($aParams['with_content']) && $aParams['with_content'] === true);
-    }
-    
-    
-
-    protected function _addJsCss()
-    {
-        parent::_addJsCss();
-        
-        $this->_oTemplate->addJs(array(
-            'main.css'
-        ));
-
-        $this->_oTemplate->addJs(array(
-        	'jquery.form.min.js',
-            'clipboard.min.js',
-            'main.js'
-        ));
-    }
-
-    protected function _isVisibleGrid($a)
-    {
-        if(isAdmin())
-            return true;
-        
-        return parent::_isVisibleGrid($a);
-    }
-}
-
-/** @} */

+ 0 - 65
modules/boonex/accounts/updates/10.0.0_11.0.0/source/classes/BxAccntMenuManageTools.php

@@ -1,65 +0,0 @@
-<?php defined('BX_DOL') or die('hack attempt');
-/**
- * Copyright (c) UNA, Inc - https://una.io
- * MIT License - https://opensource.org/licenses/MIT
- *
- * @defgroup    Accounts Accounts
- * @ingroup     UnaModules
- *
- * @{
- */
-
-/**
- * 'Manage tools' menu.
- */
-class BxAccntMenuManageTools extends BxBaseModGeneralMenuManageTools
-{
-
-    public function __construct($aObject, $oTemplate = false)
-    {
-        $this->MODULE = 'bx_accounts';
-        parent::__construct($aObject, $oTemplate);
-    }
-
-    /**
-     * Check if menu items is visible.
-     * @param $a menu item array
-     * @return boolean
-     */
-    protected function _isVisible ($a)
-    {
-        if(!parent::_isVisible($a))
-            return false;
-
-        $aDataEntry = BxDolAccountQuery::getInstance()->getInfoById($this->_iContentId);
-        if(empty($aDataEntry) || !is_array($aDataEntry))
-        	return false;
-
-        $sCheckFuncName = '';
-        switch ($a['name']) {
-            case 'delete':
-            case 'delete-with-content':
-                $sCheckFuncName = 'checkAllowedDelete';
-                break;
-            case 'make-operator':
-            	$sCheckFuncName = 'checkAllowedMakeOperator';
-            	break;
-            case 'unmake-operator':
-            	$sCheckFuncName = 'checkAllowedUnmakeOperator';
-            	break;
-            case 'unlock-account':
-            	$sCheckFuncName = 'checkAllowedUnlockAccount';
-            	break;
-            case 'confirm':
-            	$sCheckFuncName = 'checkAllowedConfirm';
-            	break;
-        }
-
-        if(!$sCheckFuncName || !method_exists($this->_oModule, $sCheckFuncName))
-            return true;
-
-        return $this->_oModule->{$sCheckFuncName}($aDataEntry) === CHECK_ACTION_RESULT_ALLOWED;
-    }
-}
-
-/** @} */

+ 0 - 110
modules/boonex/accounts/updates/10.0.0_11.0.0/source/classes/BxAccntModule.php

@@ -1,110 +0,0 @@
-<?php defined('BX_DOL') or die('hack attempt');
-/**
- * Copyright (c) UNA, Inc - https://una.io
- * MIT License - https://opensource.org/licenses/MIT
- *
- * @defgroup    Accounts Accounts
- * @ingroup     UnaModules
- *
- * @{
- */
-
-class BxAccntModule extends BxBaseModGeneralModule
-{
-    /**
-     * Constructor
-     */
-    function __construct($aModule)
-    {
-        parent::__construct($aModule);
-
-        $this->_oConfig->init($this->_oDb);
-    }
-
-    public function serviceGetSafeServices()
-    {
-        return array ();
-    }
-
-    /**
-     * @page service Service Calls
-     * @section bx_accounts Accounts
-     * @subsection bx_accounts-other Other
-     * @subsubsection bx_accounts-get_menu_addon_manage_tools get_menu_addon_manage_tools
-     * 
-     * @code bx_srv('bx_accounts', 'get_menu_addon_manage_tools', [...]); @endcode
-     * 
-     * Get number of 'unconfirmed' accounts for User End -> Dasboard page -> Manage block.
-     *
-     * @return integer number of 'unconfirmed' accounts
-     * 
-     * @see BxAccntModule::serviceGetMenuAddonManageTools
-     */
-    /** 
-     * @ref bx_accounts-get_menu_addon_manage_tools "get_menu_addon_manage_tools"
-     */
-	public function serviceGetMenuAddonManageTools()
-	{
-		bx_import('SearchResult', $this->_aModule);
-        $sClass = $this->_aModule['class_prefix'] . 'SearchResult';
-        $o = new $sClass();
-        $o->unsetPaginate();
-        $iNumTotal = $o->getNum();
-        
-        $o->fillFilters(array(
-			'unconfirmed' => 1
-        ));
-      
-        return array('counter1_value' => $o->getNum(),'counter3_value' => $iNumTotal, 'counter1_caption' => _t('_bx_accnt_menu_dashboard_manage_tools_addon_counter1_caption'));
-	}
-    
-    public function checkAllowedConfirm(&$aDataEntry, $isPerformAction = false)
-    {
-    	$bAdmin = isAdmin();
-    	if(!$bAdmin || BxDolAccount::getInstance($aDataEntry['id'])->isConfirmed())
-    		return _t('_sys_txt_access_denied');
-
-    	return CHECK_ACTION_RESULT_ALLOWED;
-    }
-
-    public function checkAllowedDelete(&$aDataEntry, $isPerformAction = false)
-    {
-    	if(isAdmin() && (int)$aDataEntry['id'] == getLoggedId())
-    		return _t('_sys_txt_access_denied');
-
-        // check ACL
-        $aCheck = checkActionModule($this->_iProfileId, 'delete account', 'system', $isPerformAction);
-        if($aCheck[CHECK_ACTION_RESULT] != CHECK_ACTION_RESULT_ALLOWED)
-            return $aCheck[CHECK_ACTION_MESSAGE];
-
-        return CHECK_ACTION_RESULT_ALLOWED;
-    }
-
-    public function checkAllowedMakeOperator(&$aDataEntry, $isPerformAction = false)
-    {
-    	$bAdmin = isAdmin();
-    	if(!$bAdmin || (int)$aDataEntry['id'] == getLoggedId() || (int)$aDataEntry['role'] == 3)
-    		return _t('_sys_txt_access_denied');
-
-    	return CHECK_ACTION_RESULT_ALLOWED;
-    }
-
-	public function checkAllowedUnmakeOperator(&$aDataEntry, $isPerformAction = false)
-    {
-    	$bAdmin = isAdmin();
-    	if(!$bAdmin || (int)$aDataEntry['id'] == getLoggedId() || (int)$aDataEntry['role'] != 3)
-    		return _t('_sys_txt_access_denied');
-
-    	return CHECK_ACTION_RESULT_ALLOWED;
-    }
-    
-    public function checkAllowedUnlockAccount(&$aDataEntry, $isPerformAction = false)
-    {
-    	if((int)$aDataEntry['locked'] != 1)
-    		return _t('_sys_txt_access_denied');
-
-    	return CHECK_ACTION_RESULT_ALLOWED;
-    }
-}
-
-/** @} */

+ 0 - 71
modules/boonex/accounts/updates/10.0.0_11.0.0/source/install/config.php

@@ -1,71 +0,0 @@
-<?php
-/**
- * Copyright (c) UNA, Inc - https://una.io
- * MIT License - https://opensource.org/licenses/MIT
- *
- * @defgroup    Accounts Accounts
- * @ingroup     UnaModules
- *
- * @{
- */
-
-$aConfig = array(
-    /**
-     * Main Section.
-     */
-    'type' => BX_DOL_MODULE_TYPE_MODULE,
-    'name' => 'bx_accounts',
-    'title' => 'Accounts Manager',
-    'note' => 'Accounts Manager module.',
-    'version' => '11.0.0',
-    'vendor' => 'BoonEx',
-    'help_url' => 'http://feed.una.io/?section={module_name}',
-
-    'compatible_with' => array(
-        '11.0.0-B1'
-    ),
-
-    /**
-     * 'home_dir' and 'home_uri' - should be unique. Don't use spaces in 'home_uri' and the other special chars.
-     */
-    'home_dir' => 'boonex/accounts/',
-    'home_uri' => 'accounts',
-
-    'db_prefix' => 'bx_accnt_',
-    'class_prefix' => 'BxAccnt',
-
-    /**
-     * Category for language keys.
-     */
-    'language_category' => 'Accounts',
-
-    /**
-     * Installation/Uninstallation Section.
-     */
-    'install' => array(
-        'execute_sql' => 1,
-        'update_languages' => 1,
-        'clear_db_cache' => 1,
-    ),
-    'uninstall' => array (
-        'execute_sql' => 1,
-        'update_languages' => 1,
-        'clear_db_cache' => 1,
-    ),
-    'enable' => array(
-        'execute_sql' => 1,
-        'clear_db_cache' => 1,
-    ),
-    'disable' => array (
-        'execute_sql' => 1,
-        'clear_db_cache' => 1,
-    ),
-
-    /**
-     * Dependencies Section
-     */
-    'dependencies' => array(),
-
-);
-
-/** @} */

+ 0 - 82
modules/boonex/accounts/updates/10.0.0_11.0.0/source/install/langs/en.xml

@@ -1,82 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<resources name="en" flag="gb" title="English">
-    <string name="_bx_accnt"><![CDATA[Accounts]]></string>
-    <string name="_bx_accounts"><![CDATA[Accounts]]></string>
-
-    <string name="_bx_accounts_form_display_account_settings_email_popup"><![CDATA[Edit Email]]></string>
-    <string name="_bx_accounts_form_display_account_settings_password_popup"><![CDATA[Reset Password]]></string>
-
-    <string name="_bx_accnt_page_title_sys_manage_administration"><![CDATA[Manage All Accounts]]></string>
-    <string name="_bx_accnt_page_title_manage"><![CDATA[Manage Accounts]]></string>
-    <string name="_bx_accnt_page_title_browse"><![CDATA[Accounts]]></string>
-
-    <string name="_bx_accnt_page_block_title_system_manage_administration"><![CDATA[Manage All Accounts]]></string>
-    <string name="_bx_accnt_page_block_title_manage"><![CDATA[Manage Accounts]]></string>
-
-    <string name="_bx_accnt_menu_set_title_manage_tools"><![CDATA[Manage Tools Submenu]]></string>
-    <string name="_bx_accnt_menu_title_manage_tools"><![CDATA[Manage Tools Submenu]]></string>
-    <string name="_bx_accnt_menu_item_title_system_resend_cemail"><![CDATA[Resend Confirmation]]></string>
-    <string name="_bx_accnt_menu_item_title_resend_cemail"><![CDATA[Resend Confirmation]]></string>
-    <string name="_bx_accnt_menu_item_title_system_confirm"><![CDATA[Confirm]]></string>
-    <string name="_bx_accnt_menu_item_title_confirm"><![CDATA[Confirm]]></string>
-
-  <string name="_bx_accnt_menu_item_title_system_edit_email"><![CDATA[Edit Email]]></string>
-    <string name="_bx_accnt_menu_item_title_edit_email"><![CDATA[Edit Email]]></string>
-    <string name="_bx_accnt_menu_item_title_system_reset_password"><![CDATA[Reset Password]]></string>
-    <string name="_bx_accnt_menu_item_title_reset_password"><![CDATA[Reset Password]]></string>
-    <string name="_bx_accnt_menu_item_title_system_unlock_account"><![CDATA[Unlock]]></string>
-    <string name="_bx_accnt_menu_item_title_unlock_account"><![CDATA[Unlock]]></string>
-    <string name="_bx_accnt_menu_item_title_system_delete"><![CDATA[Delete]]></string>
-    <string name="_bx_accnt_menu_item_title_delete"><![CDATA[Delete]]></string>
-    <string name="_bx_accnt_menu_item_title_system_delete_with_content"><![CDATA[Delete With Content]]></string>
-    <string name="_bx_accnt_menu_item_title_delete_with_content"><![CDATA[Delete With Content]]></string>
-    <string name="_bx_accnt_menu_item_title_system_make_operator"><![CDATA[Make Operator]]></string>
-    <string name="_bx_accnt_menu_item_title_make_operator"><![CDATA[Make Operator]]></string>
-    <string name="_bx_accnt_menu_item_title_system_unmake_operator"><![CDATA[Unmake Operator]]></string>
-    <string name="_bx_accnt_menu_item_title_unmake_operator"><![CDATA[Unmake Operator]]></string>
-    <string name="_bx_accnt_menu_item_title_system_admt_accounts"><![CDATA[Accounts]]></string>
-    <string name="_bx_accnt_menu_item_title_admt_accounts"><![CDATA[Accounts]]></string>
-    <string name="_bx_accnt_menu_item_title_manage"><![CDATA[Manage]]></string>
-    <string name="_bx_accnt_menu_dashboard_manage_tools_addon_counter1_caption"><![CDATA[unconfirmed]]></string>
-
-    <string name="_bx_accnt_acl_action_edit_any_account"><![CDATA[Edit Any Account]]></string>
-
-    <string name="_bx_accnt_grid_filter_item_title_adm_select_one_filter1"><![CDATA[All Statuses]]></string>
-    <string name="_bx_accnt_grid_filter_item_title_adm_select_one_filter2"><![CDATA[All]]></string>
-    <string name="_bx_accnt_grid_filter_item_title_adm_active"><![CDATA[Active]]></string>
-    <string name="_bx_accnt_grid_filter_item_title_adm_operators"><![CDATA[Operators]]></string>
-    <string name="_bx_accnt_grid_filter_item_title_adm_pending"><![CDATA[Pending]]></string>
-    <string name="_bx_accnt_grid_filter_item_title_adm_suspended"><![CDATA[Suspended]]></string>    
-    <string name="_bx_accnt_grid_filter_item_title_adm_unconfirmed"><![CDATA[Unconfirmed]]></string>
-    <string name="_bx_accnt_grid_filter_item_title_adm_locked"><![CDATA[Locked]]></string>
-    <string name="_bx_accnt_grid_column_title_adm_active"><![CDATA[Active]]></string>
-    <string name="_bx_accnt_grid_column_title_adm_name"><![CDATA[Name]]></string>
-    <string name="_bx_accnt_grid_column_title_adm_email"><![CDATA[Email]]></string>
-    <string name="_bx_accnt_grid_column_title_adm_ip"><![CDATA[IP]]></string>
-
-    <string name="_bx_accnt_grid_column_title_adm_is_confirmed"><![CDATA[Confirmed]]></string>
-    <string name="_bx_accnt_grid_column_title_adm_profiles"><![CDATA[Profiles]]></string>
-    <string name="_bx_accnt_grid_column_title_adm_logged"><![CDATA[Last Logged]]></string>
-    <string name="_bx_accnt_grid_action_title_adm_activate"><![CDATA[Activate]]></string>
-    <string name="_bx_accnt_grid_action_title_adm_suspend"><![CDATA[Suspend]]></string>
-    <string name="_bx_accnt_grid_action_title_adm_confirm"><![CDATA[Confirm]]></string>
-    <string name="_bx_accnt_grid_action_title_adm_edit_email"><![CDATA[Edit Email]]></string>
-    <string name="_bx_accnt_grid_action_title_adm_resend_cemail"><![CDATA[Resend Confirmation]]></string>
-    <string name="_bx_accnt_grid_action_title_adm_reset_password"><![CDATA[Reset Password]]></string>
-    <string name="_bx_accnt_grid_action_title_adm_unlock_account"><![CDATA[Unlock]]></string>
-    <string name="_bx_accnt_grid_action_title_adm_delete"><![CDATA[Delete]]></string>
-    <string name="_bx_accnt_grid_action_title_adm_delete_with_content"><![CDATA[Delete With Content]]></string>
-    <string name="_bx_accnt_grid_action_title_adm_more_actions"><![CDATA[More Actions]]></string>
-    <string name="_bx_accnt_grid_action_err_delete"><![CDATA[Cannot delete the selected account(s).]]></string>
-    <string name="_bx_accnt_grid_action_err_perform"><![CDATA[Cannot perform the action for selected account(s).]]></string>
-    <string name="_bx_accnt_grid_action_unlock_successed"><![CDATA[Successfully unlocked]]></string>
-    <string name="_bx_accnt_grid_action_unlock_error"><![CDATA[Account is not blocked]]></string>
-    <string name="_bx_accnt_grid_confirmation_status_none"><![CDATA[No]]></string>
-    <string name="_bx_accnt_grid_confirmation_status_email"><![CDATA[Email]]></string>
-    <string name="_bx_accnt_grid_confirmation_status_phone"><![CDATA[Phone]]></string>
-    <string name="_bx_accnt_grid_confirmation_status_email_and_phone"><![CDATA[All]]></string>
-
-    <string name="_bx_accnt_txt_more"><![CDATA[{0} more]]></string>
-    <string name="_bx_accnt_txt_see_more"><![CDATA[See more]]></string>
-    <string name="_bx_accnt_txt_copy_to_clipboard"><![CDATA[Copy to Clipboard]]></string>
-</resources>

+ 0 - 82
modules/boonex/accounts/updates/10.0.0_11.0.0/source/install/sql/enable.sql

@@ -1,82 +0,0 @@
-SET @sName = 'bx_accounts';
-
-
--- PAGE: module administration
-INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `uri`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
-('bx_accounts_administration', '_bx_accnt_page_title_sys_manage_administration', '_bx_accnt_page_title_manage', @sName, 5, 192, 1, 'accounts-administration', 'page.php?i=accounts-administration', '', '', '', 0, 1, 0, '', '');
-
-INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES 
-('bx_accounts_administration', 1, @sName, '_bx_accnt_page_block_title_system_manage_administration', '_bx_accnt_page_block_title_manage', 11, 192, 'service', 'a:3:{s:6:\"module\";s:11:\"bx_accounts\";s:6:\"method\";s:12:\"manage_tools\";s:6:\"params\";a:1:{i:0;s:14:\"administration\";}}', 0, 1, 0);
-
-
--- MENU: manage tools submenu
-INSERT INTO `sys_objects_menu`(`object`, `title`, `set_name`, `module`, `template_id`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES 
-('bx_accounts_menu_manage_tools', '_bx_accnt_menu_title_manage_tools', 'bx_accounts_menu_manage_tools', @sName, 6, 0, 1, 'BxAccntMenuManageTools', 'modules/boonex/accounts/classes/BxAccntMenuManageTools.php');
-
-INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES 
-('bx_accounts_menu_manage_tools', @sName, '_bx_accnt_menu_set_title_manage_tools', 0);
-
-INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
-('bx_accounts_menu_manage_tools', @sName, 'edit-email', '_bx_accnt_menu_item_title_system_edit_email', '_bx_accnt_menu_item_title_edit_email', 'javascript:void(0)', 'javascript:{js_object}.onClickEditEmail({content_id}, this);', '_self', 'at', '', 192, 1, 0, 1),
-('bx_accounts_menu_manage_tools', @sName, 'resend-cemail', '_bx_accnt_menu_item_title_system_resend_cemail', '_bx_accnt_menu_item_title_resend_cemail', 'javascript:void(0)', 'javascript:{js_object}.onClickResendCemail({content_id}, this);', '_self', 'far envelope', '', 192, 1, 0, 2),
-('bx_accounts_menu_manage_tools', @sName, 'confirm', '_bx_accnt_menu_item_title_system_confirm', '_bx_accnt_menu_item_title_confirm', 'javascript:void(0)', 'javascript:{js_object}.onClickConfirm({content_id}, this);', '_self', 'fas check', '', 192, 1, 0, 3),
-('bx_accounts_menu_manage_tools', @sName, 'reset-password', '_bx_accnt_menu_item_title_system_reset_password', '_bx_accnt_menu_item_title_reset_password', 'javascript:void(0)', 'javascript:{js_object}.onClickResetPassword({content_id}, this);', '_self', 'eraser', '', 192, 1, 0, 4),
-('bx_accounts_menu_manage_tools', @sName, 'unlock-account', '_bx_accnt_menu_item_title_system_unlock_account', '_bx_accnt_menu_item_title_unlock_account', 'javascript:void(0)', 'javascript:{js_object}.onClickUnlockAccount({content_id}, this);', '_self', 'unlock', '', 192, 1, 0, 5),
-('bx_accounts_menu_manage_tools', @sName, 'delete', '_bx_accnt_menu_item_title_system_delete', '_bx_accnt_menu_item_title_delete', 'javascript:void(0)', 'javascript:{js_object}.onClickDelete({content_id}, this);', '_self', 'far trash-alt', '', 192, 1, 0, 6),
-('bx_accounts_menu_manage_tools', @sName, 'delete-with-content', '_bx_accnt_menu_item_title_system_delete_with_content', '_bx_accnt_menu_item_title_delete_with_content', 'javascript:void(0)', 'javascript:{js_object}.onClickDeleteWithContent({content_id}, this);', '_self', 'far trash-alt', '', 192, 1, 0, 7),
-('bx_accounts_menu_manage_tools', @sName, 'make-operator', '_bx_accnt_menu_item_title_system_make_operator', '_bx_accnt_menu_item_title_make_operator', 'javascript:void(0)', 'javascript:{js_object}.onClickMakeOperator({content_id}, this);', '_self', 'wrench', '', 192, 1, 0, 8),
-('bx_accounts_menu_manage_tools', @sName, 'unmake-operator', '_bx_accnt_menu_item_title_system_unmake_operator', '_bx_accnt_menu_item_title_unmake_operator', 'javascript:void(0)', 'javascript:{js_object}.onClickUnmakeOperator({content_id}, this);', '_self', 'wrench', '', 192, 1, 0, 9);
-
--- MENU: dashboard manage tools
-SET @iManageMenuOrder = (SELECT IFNULL(MAX(`order`), 0) FROM `sys_menu_items` WHERE `set_name`='sys_account_dashboard_manage_tools' LIMIT 1);
-INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `addon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
-('sys_account_dashboard_manage_tools', @sName, 'accounts-administration', '_bx_accnt_menu_item_title_system_admt_accounts', '_bx_accnt_menu_item_title_admt_accounts', 'page.php?i=accounts-administration', '', '_self', 'at', 'a:2:{s:6:"module";s:11:"bx_accounts";s:6:"method";s:27:"get_menu_addon_manage_tools";}', '', 192, 1, 0, @iManageMenuOrder + 1);
-
-
--- ACL
-INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
-(@sName, 'edit any entry', NULL, '_bx_accnt_acl_action_edit_any_account', '', 1, 3);
-SET @iIdActionProfileEditAny = LAST_INSERT_ID();
-
-SET @iUnauthenticated = 1;
-SET @iAccount = 2;
-SET @iStandard = 3;
-SET @iUnconfirmed = 4;
-SET @iPending = 5;
-SET @iSuspended = 6;
-SET @iModerator = 7;
-SET @iAdministrator = 8;
-SET @iPremium = 9;
-
-INSERT INTO `sys_acl_matrix` (`IDLevel`, `IDAction`) VALUES
-
--- edit any entry 
-(@iModerator, @iIdActionProfileEditAny),
-(@iAdministrator, @iIdActionProfileEditAny);
-
-
--- GRIDS: administration
-INSERT INTO `sys_objects_grid` (`object`, `source_type`, `source`, `table`, `field_id`, `field_order`, `field_active`, `paginate_url`, `paginate_per_page`, `paginate_simple`, `paginate_get_start`, `paginate_get_per_page`, `filter_fields`, `filter_fields_translatable`, `filter_mode`, `sorting_fields`, `sorting_fields_translatable`, `visible_for_levels`, `override_class_name`, `override_class_file`) VALUES
-('bx_accounts_administration', 'Sql', 'SELECT `ta`.*, `tp`.`status` AS `status` FROM `sys_accounts` AS `ta` LEFT JOIN `sys_profiles` AS `tp` ON `ta`.`id`=`tp`.`account_id` AND `tp`.`type`=''system'' WHERE 1 ', 'sys_accounts', 'id', 'logged', 'status', '', 20, NULL, 'start', '', 'name,email,ip,phone', '', 'like', 'email_confirmed,logged', '', 192, 'BxAccntGridAdministration', 'modules/boonex/accounts/classes/BxAccntGridAdministration.php');
-
-INSERT INTO `sys_grid_fields` (`object`, `name`, `title`, `width`, `translatable`, `chars_limit`, `params`, `order`) VALUES
-('bx_accounts_administration', 'checkbox', '_sys_select', '2%', 0, '', '', 1),
-('bx_accounts_administration', 'switcher', '_bx_accnt_grid_column_title_adm_active', '6%', 0, '', '', 2),
-('bx_accounts_administration', 'name', '_bx_accnt_grid_column_title_adm_name', '22%', 0, '22', '', 3),
-('bx_accounts_administration', 'email', '_bx_accnt_grid_column_title_adm_email', '22%', 0, '22', '', 4),
-('bx_accounts_administration', 'is_confirmed', '_bx_accnt_grid_column_title_adm_is_confirmed', '5%', 0, '', '', 5),
-('bx_accounts_administration', 'profiles', '_bx_accnt_grid_column_title_adm_profiles', '22%', 0, '22', '', 5),
-('bx_accounts_administration', 'logged', '_bx_accnt_grid_column_title_adm_logged', '15%', 0, '15', '', 7),
-('bx_accounts_administration', 'actions', '', '6%', 0, '', '', 8);
-
-INSERT INTO `sys_grid_actions` (`object`, `type`, `name`, `title`, `icon`, `icon_only`, `confirm`, `order`) VALUES
-('bx_accounts_administration', 'bulk', 'activate', '_bx_accnt_grid_action_title_adm_activate', '', 0, 0, 1),
-('bx_accounts_administration', 'bulk', 'suspend', '_bx_accnt_grid_action_title_adm_suspend', '', 0, 0, 2),
-('bx_accounts_administration', 'bulk', 'resend_cemail', '_bx_accnt_grid_action_title_adm_resend_cemail', '', 0, 0, 3),
-('bx_accounts_administration', 'bulk', 'confirm', '_bx_accnt_grid_action_title_adm_confirm', '', 0, 0, 4),
-('bx_accounts_administration', 'bulk', 'delete', '_bx_accnt_grid_action_title_adm_delete', '', 0, 1, 5),
-('bx_accounts_administration', 'bulk', 'delete_with_content', '_bx_accnt_grid_action_title_adm_delete_with_content', '', 0, 1, 6),
-('bx_accounts_administration', 'single', 'edit_email', '_bx_accnt_grid_action_title_adm_edit_email', '', 0, 0, 0),
-('bx_accounts_administration', 'single', 'reset_password', '_bx_accnt_grid_action_title_adm_reset_password', '', 0, 0, 0),
-('bx_accounts_administration', 'single', 'unlock_account', '_bx_accnt_grid_action_title_adm_unlock_account', '', 0, 0, 0),
-('bx_accounts_administration', 'single', 'settings', '_bx_accnt_grid_action_title_adm_more_actions', 'cog', 1, 0, 2);

+ 0 - 133
modules/boonex/accounts/updates/10.0.0_11.0.0/source/js/manage_tools.js

@@ -1,133 +0,0 @@
-/**
- * Copyright (c) UNA, Inc - https://una.io
- * MIT License - https://opensource.org/licenses/MIT
- *
- * @defgroup    Accounts Accounts
- * @ingroup     UnaModules
- *
- * @{
- */
-
-function BxAccntManageTools(oOptions) {
-    this._iSearchTimeoutId = false;
-	this._sActionsUrl = oOptions.sActionUrl;    
-	this._sObjNameGrid = oOptions.sObjNameGrid;
-    this._sObjName = oOptions.sObjName == undefined ? 'oBxAccntManageTools' : oOptions.sObjName;
-
-    this._sAnimationEffect = oOptions.sAnimationEffect == undefined ? 'fade' : oOptions.sAnimationEffect;
-    this._iAnimationSpeed = oOptions.iAnimationSpeed == undefined ? 'slow' : oOptions.iAnimationSpeed;
-    this._sParamsDivider = oOptions.sParamsDivider == undefined ? '#-#' : oOptions.sParamsDivider;
-
-    this._aHtmlIds = oOptions.aHtmlIds == undefined ? {} : oOptions.aHtmlIds;
-    this._oRequestParams = oOptions.oRequestParams == undefined ? {} : oOptions.oRequestParams;
-}
-
-BxAccntManageTools.prototype.onChangeFilter = function(oFilter) {
-    var $this = this;
-	var oFilter1 = $('#bx-grid-filter1-' + this._sObjNameGrid);
-	var sValueFilter1 = oFilter1.length > 0 ? oFilter1.val() : '';
-
-	var oFilter2 = $('#bx-grid-filter2-' + this._sObjNameGrid);
-	var sValueFilter2 = oFilter2.length > 0 ? oFilter2.val() : '';
-
-	var oSearch = $('#bx-grid-search-' + this._sObjNameGrid);
-	var sValueSearch = oSearch.length > 0 ? oSearch.val() : '';
-	if(sValueSearch == _t('_sys_grid_search'))
-		sValueSearch = '';
-
-    clearTimeout($this._iSearchTimeoutId);
-    $this._iSearchTimeoutId = setTimeout(function () {
-        glGrids[$this._sObjNameGrid].setFilter(sValueFilter1 + $this._sParamsDivider + sValueFilter2 + $this._sParamsDivider + sValueSearch, true); //TODO ANT
-    }, 500);
-};
-
-BxAccntManageTools.prototype.onClickSettings = function(sMenuObject, oButton) {
-	if($(oButton).hasClass('bx-btn-disabled'))
-		return false;
-
-	bx_menu_popup(sMenuObject, oButton, {}, {
-		content_id: $(oButton).attr('bx_grid_action_data')
-	});
-};
-
-BxAccntManageTools.prototype.onClickEditEmail = function(iContentId, oLink) {
-	$('.bx-popup-applied:visible').dolPopupHide();
-
-	var oGrid = glGrids[this._sObjNameGrid];
-	var oData = oGrid._checkAppend(oLink, oGrid._getActionDataForReload());
-	oGrid.actionWithId(iContentId, 'edit_email', oData, '', false, 0);
-};
-
-BxAccntManageTools.prototype.onClickResendCemail = function(iContentId, oLink) {
-	$('.bx-popup-applied:visible').dolPopupHide();
-
-	var oGrid = glGrids[this._sObjNameGrid];
-	var oData = oGrid._checkAppend(oLink, oGrid._getActionDataForReload());
-	oGrid.actionWithId(iContentId, 'resend_cemail', oData, '', false, 0);
-};
-
-BxAccntManageTools.prototype.onClickConfirm = function (iContentId, oLink) {
-    $('.bx-popup-applied:visible').dolPopupHide();
-
-    var oGrid = glGrids[this._sObjNameGrid];
-    var oData = oGrid._checkAppend(oLink, oGrid._getActionDataForReload());
-    oGrid.actionWithId(iContentId, 'confirm', oData, '', false, 0);
-};
-
-BxAccntManageTools.prototype.onClickResetPassword = function(iContentId, oLink) {
-	$('.bx-popup-applied:visible').dolPopupHide();
-
-	var oGrid = glGrids[this._sObjNameGrid];
-	var oData = oGrid._checkAppend(oLink, oGrid._getActionDataForReload());
-	oGrid.actionWithId(iContentId, 'reset_password', oData, '', false, 0);
-};
-
-BxAccntManageTools.prototype.onClickUnlockAccount = function (iContentId, oLink) {
-    $('.bx-popup-applied:visible').dolPopupHide();
-
-    var oGrid = glGrids[this._sObjNameGrid];
-    var oData = oGrid._checkAppend(oLink, oGrid._getActionDataForReload());
-    oGrid.actionWithId(iContentId, 'unlock_account', oData, '', false, 0);
-};
-
-BxAccntManageTools.prototype.onClickDelete = function(iContentId, oLink) {
-	$('.bx-popup-applied:visible').dolPopupHide();
-
-	var oGrid = glGrids[this._sObjNameGrid];
-	var oData = oGrid._checkAppend(oLink, {});
-	oGrid.actionWithId(iContentId, 'delete', oData, '', false, 1);
-};
-
-BxAccntManageTools.prototype.onClickDeleteWithContent = function(iContentId, oLink) {
-	$('.bx-popup-applied:visible').dolPopupHide();
-
-	var oGrid = glGrids[this._sObjNameGrid];
-	var oData = oGrid._checkAppend(oLink, {});
-	oGrid.actionWithId(iContentId, 'delete_with_content', oData, '', false, 1);
-};
-
-BxAccntManageTools.prototype.onClickMakeOperator = function(iContentId, oLink) {
-	$('.bx-popup-applied:visible').dolPopupHide({
-		onHide: function(oPopup) {
-			$(oPopup).remove();
-		} 
-	});
-
-	var oGrid = glGrids[this._sObjNameGrid];
-	var oData = oGrid._checkAppend(oLink, oGrid._getActionDataForReload());
-    oGrid.actionWithId(iContentId, 'make_operator', oData, '', false, 0);
-};
-
-BxAccntManageTools.prototype.onClickUnmakeOperator = function(iContentId, oLink) {
-	$('.bx-popup-applied:visible').dolPopupHide({
-		onHide: function(oPopup) {
-			$(oPopup).remove();
-		} 
-	});
-
-	var oGrid = glGrids[this._sObjNameGrid];
-	var oData = oGrid._checkAppend(oLink, oGrid._getActionDataForReload());
-	oGrid.actionWithId(iContentId, 'unmake_operator', oData, '', false, 0);
-};
-
-/** @} */

+ 0 - 51
modules/boonex/accounts/updates/11.0.0_11.0.1/install/config.php

@@ -1,51 +0,0 @@
-<?php
-/**
- * Copyright (c) UNA, Inc - https://una.io
- * MIT License - https://opensource.org/licenses/MIT
- */
-
-$aConfig = array(
-    /**
-     * Main Section.
-     */
-    'title' => 'Accounts Manager',
-    'version_from' => '11.0.0',
-    'version_to' => '11.0.1',
-    'vendor' => 'BoonEx',
-
-    'compatible_with' => array(
-        '11.0.0-RC1'
-    ),
-
-    /**
-     * 'home_dir' and 'home_uri' - should be unique. Don't use spaces in 'home_uri' and the other special chars.
-     */
-    'home_dir' => 'boonex/accounts/updates/update_11.0.0_11.0.1/',
-    'home_uri' => 'accounts_update_1100_1101',
-
-    'module_dir' => 'boonex/accounts/',
-    'module_uri' => 'accounts',
-
-    'db_prefix' => 'bx_accnt_',
-    'class_prefix' => 'BxAccnt',
-
-    /**
-     * Installation/Uninstallation Section.
-     */
-    'install' => array(
-        'execute_sql' => 1,
-        'update_files' => 1,
-        'update_languages' => 1,
-        'clear_db_cache' => 1,
-    ),
-
-    /**
-     * Category for language keys.
-     */
-    'language_category' => 'Accounts',
-
-    /**
-     * Files Section
-     */
-    'delete_files' => array(),
-);

+ 0 - 13
modules/boonex/accounts/updates/11.0.0_11.0.1/install/installer.php

@@ -1,13 +0,0 @@
-<?php
-/**
- * Copyright (c) UNA, Inc - https://una.io
- * MIT License - https://opensource.org/licenses/MIT
- */
-
-class BxAccntUpdater extends BxDolStudioUpdater
-{
-    function __construct($aConfig)
-    {
-        parent::__construct($aConfig);
-    }
-}

+ 0 - 7
modules/boonex/accounts/updates/11.0.0_11.0.1/install/langs/en.xml

@@ -1,7 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<resources name="en" flag="gb" title="English">
-	<string_add name="_bx_accounts_form_display_account_create_popup"><![CDATA[Create new Account]]></string_add>
-	<string_add name="_bx_accnt_grid_action_title_adm_more_add"><![CDATA[Add new]]></string_add>
-	<string_add name="_bx_accnt_form_login_input_caption_system_email_confirmed"><![CDATA[Email confirmed]]></string_add>
-    <string_add name="_bx_accnt_form_account_input_email_confirmed"><![CDATA[Email confirmed]]></string_add>
-</resources>

+ 0 - 7
modules/boonex/accounts/updates/11.0.0_11.0.1/install/sql/enable.sql

@@ -1,7 +0,0 @@
-SET @sName = 'bx_accounts';
-
-
--- GRIDS
-DELETE FROM `sys_grid_actions` WHERE `object`='bx_accounts_administration' AND `name`='add';
-INSERT INTO `sys_grid_actions` (`object`, `type`, `name`, `title`, `icon`, `icon_only`, `confirm`, `order`) VALUES
-('bx_accounts_administration', 'independent', 'add', '_bx_accnt_grid_action_title_adm_more_add', 'plus', 0, 0, 0);

+ 0 - 32
modules/boonex/accounts/updates/11.0.0_11.0.1/install/sql/install.sql

@@ -1,32 +0,0 @@
-SET @sName = 'bx_accounts';
-
-
--- FORMS
-DELETE FROM `sys_form_displays` WHERE `display_name`='bx_accounts_account_create';
-INSERT INTO `sys_form_displays` (`display_name`, `module`, `object`, `title`, `view_mode`) VALUES
-('bx_accounts_account_create', @sName, 'bx_accounts_account', '_sys_form_display_account_create', 0);
-
-DELETE FROM `sys_form_inputs` WHERE `object`='bx_accounts_account' AND `name` IN ('name', 'password', 'controls', 'do_cancel', 'email_confirmed');
-INSERT INTO `sys_form_inputs` (`object`, `module`, `name`, `value`, `values`, `checked`, `type`, `caption_system`, `caption`, `info`, `required`, `collapsed`, `html`, `attrs`, `attrs_tr`, `attrs_wrapper`, `checker_func`, `checker_params`, `checker_error`, `db_pass`, `db_params`, `editable`, `deletable`) VALUES
-('bx_accounts_account', @sName, 'name', '', '', 0, 'text', '_sys_form_login_input_caption_system_name', '_sys_form_account_input_name', '', 1, 0, 0, '', '', '', 'Avail', '', '_sys_form_account_input_name_error', 'Xss', '', 1, 0),
-('bx_accounts_account', @sName, 'password', '', '', 0, 'password', '_sys_form_login_input_caption_system_password', '_sys_form_account_input_password', '', 1, 0, 0, '', '', '', 'Preg', 'a:1:{s:4:"preg";s:38:"~^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d).{8,}~";}', '_sys_form_account_input_password_error', '', '', 0, 0),
-('bx_accounts_account', @sName, 'controls', '', 'do_submit,do_cancel', 0, 'input_set', '', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 0, 0),
-('bx_accounts_account', @sName, 'do_cancel', '_adm_btn_cancel_submit', '', 0, 'button', '_adm_btn_cancel_submit', '', '', 0, 0, 0, 'a:2:{s:7:"onclick";s:45:"$(''.bx-popup-applied:visible'').dolPopupHide()";s:5:"class";s:22:"bx-def-margin-sec-left";}', '', '', '', '', '', '', '', 0, 0),
-('bx_accounts_account', @sName, 'email_confirmed', '1', '', 1, 'switcher', '_bx_accnt_form_login_input_caption_system_email_confirmed', '_bx_accnt_form_account_input_email_confirmed', '', 0, 0, 0, '', '', '', '', '', '', 'Int', '', 0, 0);
-
-UPDATE `sys_form_display_inputs` SET `order`='5' WHERE `display_name`='bx_accounts_account_settings_email' AND `input_name`='do_submit';
-
-DELETE FROM `sys_form_display_inputs` WHERE `display_name`='bx_accounts_account_settings_email' AND `input_name` IN ('controls', 'do_cancel');
-INSERT INTO `sys_form_display_inputs` (`display_name`, `input_name`, `visible_for_levels`, `active`, `order`) VALUES
-('bx_accounts_account_settings_email', 'controls', 2147483647, 1, 4),
-('bx_accounts_account_settings_email', 'do_cancel', 2147483647, 1, 6);
-
-DELETE FROM `sys_form_display_inputs` WHERE `display_name`='bx_accounts_account_create';
-INSERT INTO `sys_form_display_inputs` (`display_name`, `input_name`, `visible_for_levels`, `active`, `order`) VALUES
-('bx_accounts_account_create', 'name', 2147483647, 1, 1),
-('bx_accounts_account_create', 'email', 2147483647, 1, 2),
-('bx_accounts_account_create', 'password', 2147483647, 1, 3),
-('bx_accounts_account_create', 'email_confirmed', 2147483647, 1, 4),
-('bx_accounts_account_create', 'controls', 2147483647, 1, 5),
-('bx_accounts_account_create', 'do_submit', 2147483647, 1, 6),
-('bx_accounts_account_create', 'do_cancel', 2147483647, 1, 7);

+ 0 - 96
modules/boonex/accounts/updates/11.0.0_11.0.1/source/classes/BxAccntConfig.php

@@ -1,96 +0,0 @@
-<?php defined('BX_DOL') or die('hack attempt');
-/**
- * Copyright (c) UNA, Inc - https://una.io
- * MIT License - https://opensource.org/licenses/MIT
- *
- * @defgroup    Accounts Accounts
- * @ingroup     UnaModules
- *
- * @{
- */
-
-class BxAccntConfig extends BxBaseModGeneralConfig
-{
-    protected $_oDb;
-    protected $_aHtmlIds;
-
-    /**
-     * Constructor
-     */
-    public function __construct($aModule)
-    {
-        parent::__construct($aModule);
-
-        $this->CNF = array (
-        	// page URIs
-        	'URL_MANAGE_ADMINISTRATION' => 'page.php?i=accounts-administration',
-
-	        // objects
-	        'OBJECT_FORM_ACCOUNT' => 'bx_accounts_account',
-            'OBJECT_FORM_ACCOUNT_DISPLAY_SETTINGS_EMAIL' => 'bx_accounts_account_settings_email',
-            'OBJECT_FORM_ACCOUNT_DISPLAY_CREATE' => 'bx_accounts_account_create',
-	        'OBJECT_MENU_MANAGE_TOOLS' => 'bx_accounts_menu_manage_tools', //manage menu in content administration tools
-        	'OBJECT_GRID_ADMINISTRATION' => 'bx_accounts_administration',
-        	'OBJECT_GRID_MODERATION' => 'bx_accounts_moderation',
-
-        	// some language keys
-            'T' => array (
-        		'grid_action_err_delete' => '_bx_accnt_grid_action_err_delete',
-        		'grid_action_err_perform' => '_bx_accnt_grid_action_err_perform',
-            	'filter_item_active' => '_bx_accnt_grid_filter_item_title_adm_active',
-                'filter_item_operators' => '_bx_accnt_grid_filter_item_title_adm_operators',
-            	'filter_item_pending' => '_bx_accnt_grid_filter_item_title_adm_pending',
-            	'filter_item_suspended' => '_bx_accnt_grid_filter_item_title_adm_suspended',
-                'filter_item_unconfirmed' => '_bx_accnt_grid_filter_item_title_adm_unconfirmed',
-                'filter_item_locked' => '_bx_accnt_grid_filter_item_title_adm_locked',
-            	'filter_item_select_one_filter1' => '_bx_accnt_grid_filter_item_title_adm_select_one_filter1',
-                'filter_item_select_one_filter2' => '_bx_accnt_grid_filter_item_title_adm_select_one_filter2',
-        	)
-        );
-
-        $this->_aObjects = array(
-        	'alert' => $this->_sName,
-        );
-
-        $this->_aJsClasses = array(
-        	'main' => 'BxAccntMain',
-        	'manage_tools' => 'BxAccntManageTools'
-        );
-
-        $this->_aJsObjects = array(
-        	'main' => 'oBxAccntMain',
-        	'manage_tools' => 'oBxAccntManageTools'
-        );
-
-        $this->_aGridObjects = array(
-        	'moderation' => $this->CNF['OBJECT_GRID_MODERATION'],
-        	'administration' => $this->CNF['OBJECT_GRID_ADMINISTRATION'],
-        	
-        );
-
-        $sHtmlPrefix = str_replace('_', '-', $this->_sName);
-        $this->_aHtmlIds = array(
-        	'profile' => $sHtmlPrefix . '-profile-',
-        	'profile_more_popup' => $sHtmlPrefix . '-profile-more-popup-',
-
-        	'password_text' => $sHtmlPrefix . '-txt-password',
-            'password_button' => $sHtmlPrefix . '-btn-copy',
-        	'password_popup' => $sHtmlPrefix . '-password-popup',
-        );
-    }
-
-    public function init(&$oDb)
-    {
-        $this->_oDb = &$oDb;
-    }
-
-	public function getHtmlIds($sKey = '')
-    {
-        if(empty($sKey))
-            return $this->_aHtmlIds;
-
-        return isset($this->_aHtmlIds[$sKey]) ? $this->_aHtmlIds[$sKey] : '';
-    }
-}
-
-/** @} */

+ 0 - 511
modules/boonex/accounts/updates/11.0.0_11.0.1/source/classes/BxAccntGridAdministration.php

@@ -1,511 +0,0 @@
-<?php defined('BX_DOL') or die('hack attempt');
-/**
- * Copyright (c) UNA, Inc - https://una.io
- * MIT License - https://opensource.org/licenses/MIT
- *
- * @defgroup    Accounts Accounts
- * @ingroup     UnaModules
- * 
- * @{
- */
-
-class BxAccntGridAdministration extends BxBaseModProfileGridAdministration
-{
-    protected $_sFilter2Name;
-	protected $_sFilter2Value;
-	protected $_aFilter2Values;
-    
-    public function __construct ($aOptions, $oTemplate = false)
-    {
-    	$this->MODULE = 'bx_accounts';
-        parent::__construct ($aOptions, $oTemplate);
-
-        $CNF = &$this->_oModule->_oConfig->CNF;
-        $this->_aFilter1Values = array_merge($this->_aFilter1Values, array(
-            'unconfirmed' => $CNF['T']['filter_item_unconfirmed'],
-            'locked' => $CNF['T']['filter_item_locked'],
-        ));
-
-        $this->_sFilter2Name = 'filter2';
-        $this->_aFilter2Values = array(
-            'operators' => $CNF['T']['filter_item_operators']
-        );
-
-        $sFilter2 = bx_get($this->_sFilter2Name);
-        if(!empty($sFilter2)) {
-            $this->_sFilter2Value = bx_process_input($sFilter2);
-            $this->_aQueryAppend[$this->_sFilter2Name] = $this->_sFilter2Value;
-        }
-    }
-
-    protected function _getDataSql($sFilter, $sOrderField, $sOrderDir, $iStart, $iPerPage)
-    {
-        if(strpos($sFilter, $this->_sParamsDivider) !== false)
-            list($this->_sFilter1Value, $this->_sFilter2Value, $sFilter) = explode($this->_sParamsDivider, $sFilter);
-
-    	if(!empty($this->_sFilter1Value))
-            switch($this->_sFilter1Value) {
-                case 'unconfirmed':
-                    $sCnfnType = getParam('sys_account_confirmation_type');
-                    switch($sCnfnType) {
-                        case 'email':
-                            $this->_aOptions['source'] .= " AND `ta`.`email_confirmed`='0'";
-                            break;
-                        case 'phone':
-                            $this->_aOptions['source'] .= " AND `ta`.`phone_confirmed`='0'";
-                            break;
-                        case 'email_and_phone':
-                            $this->_aOptions['source'] .= " AND (`ta`.`email_confirmed`='0' OR `ta`.`phone_confirmed`='0')";
-                            break;
-                    }
-                    break;
-
-                case 'locked':
-                    $this->_aOptions['source'] .= " AND `ta`.`locked` = 1";
-                    break;
-
-                default:
-        	    $this->_aOptions['source'] .= $this->_oModule->_oDb->prepareAsString(" AND `tp`.`status`=?", $this->_sFilter1Value);
-            }
-
-        if(!empty($this->_sFilter2Value))
-        	$this->_aOptions['source'] .= $this->_oModule->_oDb->prepareAsString(" AND `ta`.`role` & " . BX_DOL_ROLE_ADMIN ." = " . BX_DOL_ROLE_ADMIN);
-
-        return parent::_getDataSqlInner($sFilter, $sOrderField, $sOrderDir, $iStart, $iPerPage);
-    }
-    
-    protected function _getFilterControls()
-    {
-        parent::_getFilterControls();
-
-        return  $this->_getFilterSelectOne($this->_sFilter1Name, $this->_sFilter1Value, $this->_aFilter1Values) . $this->_getFilterSelectOne($this->_sFilter2Name, $this->_sFilter2Value, $this->_aFilter2Values) . $this->_getSearchInput();
-    }
-    
-    public function getCode($isDisplayHeader = true)
-    {
-        return $this->_oModule->_oTemplate->getJsCode('main', array(
-        	'aHtmlIds' => $this->_oModule->_oConfig->getHtmlIds()
-        )) . parent::getCode($isDisplayHeader);
-    }
-
-    public function performActionActivate()
-    {
-    	$this->_performActionEnable(true);
-    }
-
-	public function performActionSuspend()
-    {
-    	$this->_performActionEnable(false);
-    }
-
-    public function performActionEditEmail()
-    {
-        $CNF = &$this->_oModule->_oConfig->CNF;
-
-        $aIds = bx_get('ids');
-        if(!$aIds || !is_array($aIds)) {
-            $iId = (int)bx_get('id');
-            if(!$iId)
-                return echoJson(array());
-
-            $aIds = array($iId);
-        }
-
-        $iId = $aIds[0];
-        $oAccount = BxDolAccount::getInstance($iId);
-        if(!$oAccount)
-            return echoJson(array());
-
-        $aAccount = $oAccount->getInfo();
-        $sAction = 'edit_email';
-
-        $oForm = BxDolForm::getObjectInstance($CNF['OBJECT_FORM_ACCOUNT'], $CNF['OBJECT_FORM_ACCOUNT_DISPLAY_SETTINGS_EMAIL']);
-        $oForm->aFormAttrs['action'] = BX_DOL_URL_ROOT . 'grid.php?o=' . $this->_sObject . '&a=' . $sAction . '&id=' . $iId;
-        $oForm->initChecker($aAccount);
-
-        if($oForm->isSubmittedAndValid()) {
-            $sEmail = $oForm->getCleanValue('email');
-            if(strcmp($aAccount['email'], $sEmail) !== 0 && BxDolAccountQuery::getInstance()->getIdByEmail($sEmail))
-                return echoJson(array('msg' => _t('_sys_form_account_input_email_uniq_error_loggedin')));
-
-            if($oForm->update($aAccount['id'])) {
-                bx_alert('account', 'edited', $aAccount['id'], BxDolAccount::getInstance()->id(), array('display' => $CNF['OBJECT_FORM_ACCOUNT_DISPLAY_SETTINGS_EMAIL']));
-
-                $aRes = array('grid' => $this->getCode(false), 'blink' => $iId);
-                
-                $oAccount->doAudit($iId, '_sys_audit_action_account_email_changed', array('old_email' => $oAccount->getEmail(), 'new_email' => $sEmail));
-            }
-            else
-                $aRes = array('msg' => _t('_sys_txt_error_account_update'));
-
-            echoJson($aRes);
-        }
-        else {
-            $sContent = BxTemplStudioFunctions::getInstance()->popupBox('bx-account-edit-email-popup', _t('_bx_accounts_form_display_account_settings_email_popup'), $this->_oModule->_oTemplate->parseHtmlByName('edit_email.html', array(
-                'form_id' => $oForm->id,
-                'form' => $oForm->getCode(true),
-                'object' => $this->_sObject,
-                'action' => $sAction
-            )));
-
-            echoJson(array('popup' => array('html' => $sContent, 'options' => array('closeOnOuterClick' => false))));
-        }
-    }
-    
-    public function performActionAdd()
-    {
-      
-        $CNF = &$this->_oModule->_oConfig->CNF;
-        $sAction = 'add';
-        $oForm = BxDolForm::getObjectInstance($CNF['OBJECT_FORM_ACCOUNT'], $CNF['OBJECT_FORM_ACCOUNT_DISPLAY_CREATE']);
-        $oForm->aFormAttrs['action'] = BX_DOL_URL_ROOT . 'grid.php?o=' . $this->_sObject . '&a=' . $sAction;
-        $oForm->initChecker();
-
-        if($oForm->isSubmittedAndValid()) {
-           
-            $iAccountId = $oForm->insert();
-            
-            if (!$iAccountId) {
-                $aRes = array('msg' => _t('_sys_txt_error_account_insert'));
-            }
-            else{
-                $aRes = array('grid' => $this->getCode(false), 'blink' => $iAccountId);
-                
-                $oBxTemplAccountForms = new BxTemplAccountForms();
-                
-                $iProfileId = $oBxTemplAccountForms->onAccountCreated($iAccountId, $oForm->isSetPendingApproval(), BX_PROFILE_ACTION_MANUAL, false);
-
-                // perform action
-                BxDolAccount::isAllowedCreate ($iProfileId, true);
-                
-                // check
-                $aModulesProfile = array(); 
-                $aModules = BxDolModuleQuery::getInstance()->getModulesBy(array('type' => 'modules', 'active' => 1));
-                foreach($aModules as $aModule) {
-                    $oModule = BxDolModule::getInstance($aModule['name']);
-                    if($oModule instanceof iBxDolProfileService && BxDolService::call($aModule['name'], 'act_as_profile') === true)
-                        $aModulesProfile[] = $aModule;
-                }
-
-                $sDefaultProfileType = getParam('sys_account_default_profile_type');
-                if(count($aModulesProfile) == 1)
-                    $sProfileModule = $aModulesProfile[0]['name'];
-                else if(!empty($sDefaultProfileType)) 
-                    $sProfileModule = $sDefaultProfileType;
-
-                if (getParam('sys_account_auto_profile_creation') && !empty($sProfileModule)) {
-                    $oAccount = BxDolAccount::getInstance($iAccountId);
-                    $aProfileInfo = BxDolService::call($sProfileModule, 'prepare_fields', array(array(
-                        'author' => $iProfileId,
-                        'name' => $oAccount->getDisplayName(),
-                    )));
-                    
-                    $a = BxDolService::call($sProfileModule, 'entity_add', array($iProfileId, $aProfileInfo));
-                    if (isset($a['content']['profile_id']) && (int)$a['content']['profile_id'] > 0){
-                        BxDolAcl::getInstance()->setMembership((int)$a['content']['profile_id'], MEMBERSHIP_ID_STANDARD);
-                    }
-                    echoJson($aRes);
-                }
-            }
-        }
-        else {
-            $sContent = BxTemplStudioFunctions::getInstance()->popupBox('bx-account-edit-email-popup', _t('_bx_accounts_form_display_account_create_popup'), $this->_oModule->_oTemplate->parseHtmlByName('create.html', array(
-                'form_id' => $oForm->id,
-                'form' => $oForm->getCode(true),
-                'object' => $this->_sObject,
-                'action' => $sAction
-            )));
-
-            echoJson(array('popup' => array('html' => $sContent, 'options' => array('closeOnOuterClick' => false))));
-        }
-    }
-    
-    public function performActionConfirm()
-    {
-        $CNF = &$this->_oModule->_oConfig->CNF;
-
-    	$aIds = bx_get('ids');
-        if(!$aIds || !is_array($aIds)) {
-            echoJson(array());
-            return;
-        }
-
-        $oAccount = BxDolAccount::getInstance();
-
-        $iAffected = 0;
-        $aIdsAffected = array();
-        foreach($aIds as $iId){
-            if (BxDolAccount::isNeedConfirmEmail()){
-			    if($oAccount->updateEmailConfirmed(true, true, $iId)) {
-				    $aIdsAffected[] = $iId;
-        		    $iAffected++;  
-			    }
-            }
-            if (BxDolAccount::isNeedConfirmPhone()){
-			    if($oAccount->updatePhoneConfirmed(true, $iId)) {
-				    $aIdsAffected[] = $iId;
-        		    $iAffected++;  
-			    }
-            }
-        }
-		echoJson($iAffected ? array('grid' => $this->getCode(false), 'blink' => $aIdsAffected) : array('msg' => _t($CNF['T']['grid_action_err_perform'])));
-    }
-    
-    public function performActionResendCemail()
-    {
-    	$CNF = &$this->_oModule->_oConfig->CNF;
-
-    	$aIds = bx_get('ids');
-        if(!$aIds || !is_array($aIds)) {
-            echoJson(array());
-            return;
-        }
-
-        $oAccount = BxDolAccount::getInstance();
-
-        $iAffected = 0;
-        $aIdsAffected = array();
-        foreach($aIds as $iId)
-			if($oAccount->sendConfirmationEmail($iId)) {
-				$aIdsAffected[] = $iId;
-        		$iAffected++;  
-			}
-
-		echoJson($iAffected ? array('grid' => $this->getCode(false), 'blink' => $aIdsAffected) : array('msg' => _t($CNF['T']['grid_action_err_perform'])));
-    }
-
-    public function performActionResetPassword()
-    {
-    	$aIds = bx_get('ids');
-        if(!$aIds || !is_array($aIds)) {
-            echoJson(array());
-            return;
-        }
-
-        $iId = $aIds[0];
-        $oAccount = BxDolAccount::getInstance($iId);
-        if(!$oAccount)
-            return echoJson(array());
-
-        $sPwd = genRndPwd();
-        $sSalt = genRndSalt();
-        $sPasswordHash = encryptUserPwd($sPwd, $sSalt);
-
-        $aRes = array();
-        if((int)BxDolAccountQuery::getInstance()->updatePassword($sPasswordHash, $sSalt, $iId) > 0) {
-            bx_alert('account', 'edited', $iId, BxDolAccount::getInstance()->id(), array('action' => 'reset_password'));
-
-            $sPopupId = $this->_oModule->_oConfig->getHtmlIds('password_popup');
-            $sPopupTitle = _t('_bx_accounts_form_display_account_settings_password_popup');
-            $sPopupContent = $this->_oModule->_oTemplate->parseHtmlByName('reset_password.html', array(
-                'js_object' => $this->_oModule->_oConfig->getJsObject('main'),
-                'html_id_text' => $this->_oModule->_oConfig->getHtmlIds('password_text'),
-                'html_id_button' => $this->_oModule->_oConfig->getHtmlIds('password_button'),
-                'password' => $sPwd,
-            ));
-
-            $aRes = array('popup' => BxTemplStudioFunctions::getInstance()->popupBox($sPopupId, $sPopupTitle, $sPopupContent));
-            
-            $oAccount->doAudit($iId, '_sys_audit_action_account_reset_password');
-        }
-        else 
-            $aRes = array('msg' => _t('_bx_accnt_grid_action_err_perform'));
-
-        return echoJson($aRes);
-    }
-    
-    public function performActionUnlockAccount()
-    {
-    	$aIds = bx_get('ids');
-        if(!$aIds || !is_array($aIds)) {
-            echoJson(array());
-            return;
-        }
-		$oAccountQuery = BxDolAccountQuery::getInstance();
-		foreach($aIds as $iId){
-			$oAccount = BxDolAccount::getInstance($iId);
-			if(!$oAccount)
-				continue;
-			if ($oAccount->isLocked()){
-				$oAccountQuery->unlockAccount($iId);
-			}
-            
-            $oAccount->doAudit($iId, '_sys_audit_action_account_unlock');
-		}
-		$aRes = array('grid' => $this->getCode(false), 'blink' => $aIds);
-        return echoJson($aRes);
-    }
-
-	public function performActionMakeOperator()
-    {
-    	$this->_performActionChangeRole(3);
-    }
-
-	public function performActionUnmakeOperator()
-    {
-    	$this->_performActionChangeRole(1);
-    }
-
-	protected function _performActionChangeRole($iRole)
-    {
-    	$CNF = &$this->_oModule->_oConfig->CNF;
-
-    	$aIds = bx_get('ids');
-        if(!$aIds || !is_array($aIds)) {
-            echoJson(array());
-            return;
-        }
-
-        $iAffected = 0;
-        $aIdsAffected = array();
-        foreach($aIds as $iId)
-			if($this->_oModule->_oDb->updateAccount(array('role' => $iRole), array('id' => $iId))) {
-				$aIdsAffected[] = $iId;
-        		$iAffected++;
-                
-                $oAccount = BxDolAccount::getInstance($iId);
-                $oAccount->doAudit($iId, '_sys_audit_action_account_change_role_to_' . $iRole);
-			}
-
-		echoJson($iAffected ? array('grid' => $this->getCode(false), 'blink' => $aIdsAffected) : array('msg' => _t($CNF['T']['grid_action_err_perform'])));
-    }
-
-	protected function _performActionEnable($isChecked)
-    {
-    	$CNF = &$this->_oModule->_oConfig->CNF;
-
-    	$aIds = bx_get('ids');
-        if(!$aIds || !is_array($aIds)) {
-            echoJson(array());
-            return;
-        }
-        $iAffected = 0;
-        $aIdsAffected = array();
-        foreach($aIds as $iId)
-        	if($this->_enable($iId, $isChecked)) {
-        		$aIdsAffected[] = $iId;
-        		$iAffected++;
-                
-                $oAccount = BxDolAccount::getInstance($iId);
-                $oAccount->doAudit($iId, '_sys_audit_action_account_' . $isChecked ? 'activated' : 'suspended');
-        	}
-
-        echoJson($iAffected ? array('grid' => $this->getCode(false), 'blink' => $aIdsAffected) : array('msg' => _t($CNF['T']['grid_action_err_perform'])));
-    }
-
-    protected function _enable($mixedId, $isChecked)
-    {
-    	$oProfile = BxDolProfile::getInstanceAccountProfile($mixedId);
-    	if(!$oProfile)
-    	    return false;
-
-        $iAction = BX_PROFILE_ACTION_MANUAL;
-        $sMethod = $isChecked ? 'activate' : 'suspend';
-        if(!$oProfile->$sMethod($iAction, 0 ,false))
-            return false;
-
-        sendMailTemplate('t_ChangeStatusAccount' . ucfirst($sMethod), $oProfile->getAccountObject()->id(), $oProfile->id(), array(), BX_EMAIL_SYSTEM);
-        
-        $aProfiles = $oProfile->getAccountObject()->getProfiles();
-        foreach($aProfiles as $aProfile){
-            BxDolProfile::getInstance($aProfile['id'])->$sMethod($iAction, 0 ,false);
-        }
-        
-    	return true;
-    }
-
-    //--- Layout methods ---//
-    protected function _getActionEditEmail($sType, $sKey, $a, $isSmall = false, $isDisabled = false, $aRow = array())
-    {
-        return '';
-    }
-    
-    protected function _getCellEmailConfirmed($mixedValue, $sKey, $aField, $aRow)
-    {
-    	$mixedValue = (int)$mixedValue == 1 ? '_Yes' : '_No';
-        return parent::_getCellDefault(_t($mixedValue), $sKey, $aField, $aRow);
-    }
-
-    protected function _getActionResetPassword($sType, $sKey, $a, $isSmall = false, $isDisabled = false, $aRow = array())
-    {
-        return '';
-    }
-    
-    protected function _getActionUnlockAccount($sType, $sKey, $a, $isSmall = false, $isDisabled = false, $aRow = array())
-    {
-        return '';
-    }
-
-    protected function _getCellName($mixedValue, $sKey, $aField, $aRow)
-    {
-        $oAccount = BxDolAccount::getInstance($aRow['id']);
-        if ($oAccount)
-            $s = ($aRow['locked'] == 1 ? $this->_oTemplate->parseIcon("lock col-red1") . ' ' : '') . $oAccount->getDisplayName();
-        return parent::_getCellDefault ($s, $sKey, $aField, $aRow);
-    }
-    
-	protected function _getCellProfiles($mixedValue, $sKey, $aField, $aRow)
-    {
-        $s = $this->_oModule->_oTemplate->getProfilesByAccount($aRow);
-
-        return parent::_getCellDefault ($s, $sKey, $aField, $aRow);
-    }
-
-    protected function _getCellLogged($mixedValue, $sKey, $aField, $aRow)
-    {
-        $mixedValue = !empty($mixedValue) ? bx_time_js($mixedValue) : _t('_sys_not_available');
-
-        return parent::_getCellDefault($mixedValue, $sKey, $aField, $aRow);
-    }    
-    
-    protected function _getCellIsConfirmed($mixedValue, $sKey, $aField, $aRow)
-    {
-        $oAccount = BxDolAccount::getInstance($aRow['id']);
-        $s = "";
-        if ($oAccount)
-            $s = $oAccount->getCurrentConfirmationStatusValue();
-        return parent::_getCellDefault(_t('_bx_accnt_grid_confirmation_status_' . $s), $sKey, $aField, $aRow);
-    }
-
-    protected function _isCheckboxDisabled($aRow)
-    {
-        return false;
-    }
-
-	protected function _getContentInfo($iId)
-    {
-    	return BxDolAccountQuery::getInstance()->getInfoById($iId);
-    }
-
-	protected function _doDelete($iId, $aParams = array())
-    {
-    	return BxDolAccount::getInstance($iId)->delete(isset($aParams['with_content']) && $aParams['with_content'] === true);
-    }
-    
-    
-
-    protected function _addJsCss()
-    {
-        parent::_addJsCss();
-        
-        $this->_oTemplate->addJs(array(
-            'main.css'
-        ));
-
-        $this->_oTemplate->addJs(array(
-        	'jquery.form.min.js',
-            'clipboard.min.js',
-            'main.js'
-        ));
-    }
-
-    protected function _isVisibleGrid($a)
-    {
-        if(isAdmin())
-            return true;
-        
-        return parent::_isVisibleGrid($a);
-    }
-}
-
-/** @} */

+ 0 - 71
modules/boonex/accounts/updates/11.0.0_11.0.1/source/install/config.php

@@ -1,71 +0,0 @@
-<?php
-/**
- * Copyright (c) UNA, Inc - https://una.io
- * MIT License - https://opensource.org/licenses/MIT
- *
- * @defgroup    Accounts Accounts
- * @ingroup     UnaModules
- *
- * @{
- */
-
-$aConfig = array(
-    /**
-     * Main Section.
-     */
-    'type' => BX_DOL_MODULE_TYPE_MODULE,
-    'name' => 'bx_accounts',
-    'title' => 'Accounts Manager',
-    'note' => 'Accounts Manager module.',
-    'version' => '11.0.1',
-    'vendor' => 'BoonEx',
-    'help_url' => 'http://feed.una.io/?section={module_name}',
-
-    'compatible_with' => array(
-        '11.0.0-RC1'
-    ),
-
-    /**
-     * 'home_dir' and 'home_uri' - should be unique. Don't use spaces in 'home_uri' and the other special chars.
-     */
-    'home_dir' => 'boonex/accounts/',
-    'home_uri' => 'accounts',
-
-    'db_prefix' => 'bx_accnt_',
-    'class_prefix' => 'BxAccnt',
-
-    /**
-     * Category for language keys.
-     */
-    'language_category' => 'Accounts',
-
-    /**
-     * Installation/Uninstallation Section.
-     */
-    'install' => array(
-        'execute_sql' => 1,
-        'update_languages' => 1,
-        'clear_db_cache' => 1,
-    ),
-    'uninstall' => array (
-        'execute_sql' => 1,
-        'update_languages' => 1,
-        'clear_db_cache' => 1,
-    ),
-    'enable' => array(
-        'execute_sql' => 1,
-        'clear_db_cache' => 1,
-    ),
-    'disable' => array (
-        'execute_sql' => 1,
-        'clear_db_cache' => 1,
-    ),
-
-    /**
-     * Dependencies Section
-     */
-    'dependencies' => array(),
-
-);
-
-/** @} */

+ 0 - 87
modules/boonex/accounts/updates/11.0.0_11.0.1/source/install/langs/en.xml

@@ -1,87 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<resources name="en" flag="gb" title="English">
-    <string name="_bx_accnt"><![CDATA[Accounts]]></string>
-    <string name="_bx_accounts"><![CDATA[Accounts]]></string>
-
-    <string name="_bx_accounts_form_display_account_settings_email_popup"><![CDATA[Edit Email]]></string>
-    <string name="_bx_accounts_form_display_account_create_popup"><![CDATA[Create new Account]]></string>
-    <string name="_bx_accounts_form_display_account_settings_password_popup"><![CDATA[Reset Password]]></string>
-
-    <string name="_bx_accnt_page_title_sys_manage_administration"><![CDATA[Manage All Accounts]]></string>
-    <string name="_bx_accnt_page_title_manage"><![CDATA[Manage Accounts]]></string>
-    <string name="_bx_accnt_page_title_browse"><![CDATA[Accounts]]></string>
-
-    <string name="_bx_accnt_page_block_title_system_manage_administration"><![CDATA[Manage All Accounts]]></string>
-    <string name="_bx_accnt_page_block_title_manage"><![CDATA[Manage Accounts]]></string>
-
-    <string name="_bx_accnt_menu_set_title_manage_tools"><![CDATA[Manage Tools Submenu]]></string>
-    <string name="_bx_accnt_menu_title_manage_tools"><![CDATA[Manage Tools Submenu]]></string>
-    <string name="_bx_accnt_menu_item_title_system_resend_cemail"><![CDATA[Resend Confirmation]]></string>
-    <string name="_bx_accnt_menu_item_title_resend_cemail"><![CDATA[Resend Confirmation]]></string>
-    <string name="_bx_accnt_menu_item_title_system_confirm"><![CDATA[Confirm]]></string>
-    <string name="_bx_accnt_menu_item_title_confirm"><![CDATA[Confirm]]></string>
-
-  <string name="_bx_accnt_menu_item_title_system_edit_email"><![CDATA[Edit Email]]></string>
-    <string name="_bx_accnt_menu_item_title_edit_email"><![CDATA[Edit Email]]></string>
-    <string name="_bx_accnt_menu_item_title_system_reset_password"><![CDATA[Reset Password]]></string>
-    <string name="_bx_accnt_menu_item_title_reset_password"><![CDATA[Reset Password]]></string>
-    <string name="_bx_accnt_menu_item_title_system_unlock_account"><![CDATA[Unlock]]></string>
-    <string name="_bx_accnt_menu_item_title_unlock_account"><![CDATA[Unlock]]></string>
-    <string name="_bx_accnt_menu_item_title_system_delete"><![CDATA[Delete]]></string>
-    <string name="_bx_accnt_menu_item_title_delete"><![CDATA[Delete]]></string>
-    <string name="_bx_accnt_menu_item_title_system_delete_with_content"><![CDATA[Delete With Content]]></string>
-    <string name="_bx_accnt_menu_item_title_delete_with_content"><![CDATA[Delete With Content]]></string>
-    <string name="_bx_accnt_menu_item_title_system_make_operator"><![CDATA[Make Operator]]></string>
-    <string name="_bx_accnt_menu_item_title_make_operator"><![CDATA[Make Operator]]></string>
-    <string name="_bx_accnt_menu_item_title_system_unmake_operator"><![CDATA[Unmake Operator]]></string>
-    <string name="_bx_accnt_menu_item_title_unmake_operator"><![CDATA[Unmake Operator]]></string>
-    <string name="_bx_accnt_menu_item_title_system_admt_accounts"><![CDATA[Accounts]]></string>
-    <string name="_bx_accnt_menu_item_title_admt_accounts"><![CDATA[Accounts]]></string>
-    <string name="_bx_accnt_menu_item_title_manage"><![CDATA[Manage]]></string>
-    <string name="_bx_accnt_menu_dashboard_manage_tools_addon_counter1_caption"><![CDATA[unconfirmed]]></string>
-
-    <string name="_bx_accnt_acl_action_edit_any_account"><![CDATA[Edit Any Account]]></string>
-
-    <string name="_bx_accnt_grid_filter_item_title_adm_select_one_filter1"><![CDATA[All Statuses]]></string>
-    <string name="_bx_accnt_grid_filter_item_title_adm_select_one_filter2"><![CDATA[All]]></string>
-    <string name="_bx_accnt_grid_filter_item_title_adm_active"><![CDATA[Active]]></string>
-    <string name="_bx_accnt_grid_filter_item_title_adm_operators"><![CDATA[Operators]]></string>
-    <string name="_bx_accnt_grid_filter_item_title_adm_pending"><![CDATA[Pending]]></string>
-    <string name="_bx_accnt_grid_filter_item_title_adm_suspended"><![CDATA[Suspended]]></string>    
-    <string name="_bx_accnt_grid_filter_item_title_adm_unconfirmed"><![CDATA[Unconfirmed]]></string>
-    <string name="_bx_accnt_grid_filter_item_title_adm_locked"><![CDATA[Locked]]></string>
-    <string name="_bx_accnt_grid_column_title_adm_active"><![CDATA[Active]]></string>
-    <string name="_bx_accnt_grid_column_title_adm_name"><![CDATA[Name]]></string>
-    <string name="_bx_accnt_grid_column_title_adm_email"><![CDATA[Email]]></string>
-    <string name="_bx_accnt_grid_column_title_adm_ip"><![CDATA[IP]]></string>
-
-    <string name="_bx_accnt_grid_column_title_adm_is_confirmed"><![CDATA[Confirmed]]></string>
-    <string name="_bx_accnt_grid_column_title_adm_profiles"><![CDATA[Profiles]]></string>
-    <string name="_bx_accnt_grid_column_title_adm_logged"><![CDATA[Last Logged]]></string>
-    <string name="_bx_accnt_grid_action_title_adm_activate"><![CDATA[Activate]]></string>
-    <string name="_bx_accnt_grid_action_title_adm_suspend"><![CDATA[Suspend]]></string>
-    <string name="_bx_accnt_grid_action_title_adm_confirm"><![CDATA[Confirm]]></string>
-    <string name="_bx_accnt_grid_action_title_adm_edit_email"><![CDATA[Edit Email]]></string>
-    <string name="_bx_accnt_grid_action_title_adm_resend_cemail"><![CDATA[Resend Confirmation]]></string>
-    <string name="_bx_accnt_grid_action_title_adm_reset_password"><![CDATA[Reset Password]]></string>
-    <string name="_bx_accnt_grid_action_title_adm_unlock_account"><![CDATA[Unlock]]></string>
-    <string name="_bx_accnt_grid_action_title_adm_delete"><![CDATA[Delete]]></string>
-    <string name="_bx_accnt_grid_action_title_adm_delete_with_content"><![CDATA[Delete With Content]]></string>
-    <string name="_bx_accnt_grid_action_title_adm_more_actions"><![CDATA[More Actions]]></string>
-    <string name="_bx_accnt_grid_action_title_adm_more_add"><![CDATA[Add new]]></string>
-    <string name="_bx_accnt_grid_action_err_delete"><![CDATA[Cannot delete the selected account(s).]]></string>
-    <string name="_bx_accnt_grid_action_err_perform"><![CDATA[Cannot perform the action for selected account(s).]]></string>
-    <string name="_bx_accnt_grid_action_unlock_successed"><![CDATA[Successfully unlocked]]></string>
-    <string name="_bx_accnt_grid_action_unlock_error"><![CDATA[Account is not blocked]]></string>
-    <string name="_bx_accnt_grid_confirmation_status_none"><![CDATA[No]]></string>
-    <string name="_bx_accnt_grid_confirmation_status_email"><![CDATA[Email]]></string>
-    <string name="_bx_accnt_grid_confirmation_status_phone"><![CDATA[Phone]]></string>
-    <string name="_bx_accnt_grid_confirmation_status_email_and_phone"><![CDATA[All]]></string>
-
-    <string name="_bx_accnt_form_login_input_caption_system_email_confirmed"><![CDATA[Email confirmed]]></string>
-    <string name="_bx_accnt_form_account_input_email_confirmed"><![CDATA[Email confirmed]]></string>
- 
-    <string name="_bx_accnt_txt_more"><![CDATA[{0} more]]></string>
-    <string name="_bx_accnt_txt_see_more"><![CDATA[See more]]></string>
-    <string name="_bx_accnt_txt_copy_to_clipboard"><![CDATA[Copy to Clipboard]]></string>
-</resources>

+ 0 - 83
modules/boonex/accounts/updates/11.0.0_11.0.1/source/install/sql/enable.sql

@@ -1,83 +0,0 @@
-SET @sName = 'bx_accounts';
-
-
--- PAGE: module administration
-INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `uri`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
-('bx_accounts_administration', '_bx_accnt_page_title_sys_manage_administration', '_bx_accnt_page_title_manage', @sName, 5, 192, 1, 'accounts-administration', 'page.php?i=accounts-administration', '', '', '', 0, 1, 0, '', '');
-
-INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES 
-('bx_accounts_administration', 1, @sName, '_bx_accnt_page_block_title_system_manage_administration', '_bx_accnt_page_block_title_manage', 11, 192, 'service', 'a:3:{s:6:\"module\";s:11:\"bx_accounts\";s:6:\"method\";s:12:\"manage_tools\";s:6:\"params\";a:1:{i:0;s:14:\"administration\";}}', 0, 1, 0);
-
-
--- MENU: manage tools submenu
-INSERT INTO `sys_objects_menu`(`object`, `title`, `set_name`, `module`, `template_id`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES 
-('bx_accounts_menu_manage_tools', '_bx_accnt_menu_title_manage_tools', 'bx_accounts_menu_manage_tools', @sName, 6, 0, 1, 'BxAccntMenuManageTools', 'modules/boonex/accounts/classes/BxAccntMenuManageTools.php');
-
-INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES 
-('bx_accounts_menu_manage_tools', @sName, '_bx_accnt_menu_set_title_manage_tools', 0);
-
-INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
-('bx_accounts_menu_manage_tools', @sName, 'edit-email', '_bx_accnt_menu_item_title_system_edit_email', '_bx_accnt_menu_item_title_edit_email', 'javascript:void(0)', 'javascript:{js_object}.onClickEditEmail({content_id}, this);', '_self', 'at', '', 192, 1, 0, 1),
-('bx_accounts_menu_manage_tools', @sName, 'resend-cemail', '_bx_accnt_menu_item_title_system_resend_cemail', '_bx_accnt_menu_item_title_resend_cemail', 'javascript:void(0)', 'javascript:{js_object}.onClickResendCemail({content_id}, this);', '_self', 'far envelope', '', 192, 1, 0, 2),
-('bx_accounts_menu_manage_tools', @sName, 'confirm', '_bx_accnt_menu_item_title_system_confirm', '_bx_accnt_menu_item_title_confirm', 'javascript:void(0)', 'javascript:{js_object}.onClickConfirm({content_id}, this);', '_self', 'fas check', '', 192, 1, 0, 3),
-('bx_accounts_menu_manage_tools', @sName, 'reset-password', '_bx_accnt_menu_item_title_system_reset_password', '_bx_accnt_menu_item_title_reset_password', 'javascript:void(0)', 'javascript:{js_object}.onClickResetPassword({content_id}, this);', '_self', 'eraser', '', 192, 1, 0, 4),
-('bx_accounts_menu_manage_tools', @sName, 'unlock-account', '_bx_accnt_menu_item_title_system_unlock_account', '_bx_accnt_menu_item_title_unlock_account', 'javascript:void(0)', 'javascript:{js_object}.onClickUnlockAccount({content_id}, this);', '_self', 'unlock', '', 192, 1, 0, 5),
-('bx_accounts_menu_manage_tools', @sName, 'delete', '_bx_accnt_menu_item_title_system_delete', '_bx_accnt_menu_item_title_delete', 'javascript:void(0)', 'javascript:{js_object}.onClickDelete({content_id}, this);', '_self', 'far trash-alt', '', 192, 1, 0, 6),
-('bx_accounts_menu_manage_tools', @sName, 'delete-with-content', '_bx_accnt_menu_item_title_system_delete_with_content', '_bx_accnt_menu_item_title_delete_with_content', 'javascript:void(0)', 'javascript:{js_object}.onClickDeleteWithContent({content_id}, this);', '_self', 'far trash-alt', '', 192, 1, 0, 7),
-('bx_accounts_menu_manage_tools', @sName, 'make-operator', '_bx_accnt_menu_item_title_system_make_operator', '_bx_accnt_menu_item_title_make_operator', 'javascript:void(0)', 'javascript:{js_object}.onClickMakeOperator({content_id}, this);', '_self', 'wrench', '', 192, 1, 0, 8),
-('bx_accounts_menu_manage_tools', @sName, 'unmake-operator', '_bx_accnt_menu_item_title_system_unmake_operator', '_bx_accnt_menu_item_title_unmake_operator', 'javascript:void(0)', 'javascript:{js_object}.onClickUnmakeOperator({content_id}, this);', '_self', 'wrench', '', 192, 1, 0, 9);
-
--- MENU: dashboard manage tools
-SET @iManageMenuOrder = (SELECT IFNULL(MAX(`order`), 0) FROM `sys_menu_items` WHERE `set_name`='sys_account_dashboard_manage_tools' LIMIT 1);
-INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `addon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
-('sys_account_dashboard_manage_tools', @sName, 'accounts-administration', '_bx_accnt_menu_item_title_system_admt_accounts', '_bx_accnt_menu_item_title_admt_accounts', 'page.php?i=accounts-administration', '', '_self', 'at', 'a:2:{s:6:"module";s:11:"bx_accounts";s:6:"method";s:27:"get_menu_addon_manage_tools";}', '', 192, 1, 0, @iManageMenuOrder + 1);
-
-
--- ACL
-INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
-(@sName, 'edit any entry', NULL, '_bx_accnt_acl_action_edit_any_account', '', 1, 3);
-SET @iIdActionProfileEditAny = LAST_INSERT_ID();
-
-SET @iUnauthenticated = 1;
-SET @iAccount = 2;
-SET @iStandard = 3;
-SET @iUnconfirmed = 4;
-SET @iPending = 5;
-SET @iSuspended = 6;
-SET @iModerator = 7;
-SET @iAdministrator = 8;
-SET @iPremium = 9;
-
-INSERT INTO `sys_acl_matrix` (`IDLevel`, `IDAction`) VALUES
-
--- edit any entry 
-(@iModerator, @iIdActionProfileEditAny),
-(@iAdministrator, @iIdActionProfileEditAny);
-
-
--- GRIDS: administration
-INSERT INTO `sys_objects_grid` (`object`, `source_type`, `source`, `table`, `field_id`, `field_order`, `field_active`, `paginate_url`, `paginate_per_page`, `paginate_simple`, `paginate_get_start`, `paginate_get_per_page`, `filter_fields`, `filter_fields_translatable`, `filter_mode`, `sorting_fields`, `sorting_fields_translatable`, `visible_for_levels`, `override_class_name`, `override_class_file`) VALUES
-('bx_accounts_administration', 'Sql', 'SELECT `ta`.*, `tp`.`status` AS `status` FROM `sys_accounts` AS `ta` LEFT JOIN `sys_profiles` AS `tp` ON `ta`.`id`=`tp`.`account_id` AND `tp`.`type`=''system'' WHERE 1 ', 'sys_accounts', 'id', 'logged', 'status', '', 20, NULL, 'start', '', 'name,email,ip,phone', '', 'like', 'email_confirmed,logged', '', 192, 'BxAccntGridAdministration', 'modules/boonex/accounts/classes/BxAccntGridAdministration.php');
-
-INSERT INTO `sys_grid_fields` (`object`, `name`, `title`, `width`, `translatable`, `chars_limit`, `params`, `order`) VALUES
-('bx_accounts_administration', 'checkbox', '_sys_select', '2%', 0, '', '', 1),
-('bx_accounts_administration', 'switcher', '_bx_accnt_grid_column_title_adm_active', '6%', 0, '', '', 2),
-('bx_accounts_administration', 'name', '_bx_accnt_grid_column_title_adm_name', '22%', 0, '22', '', 3),
-('bx_accounts_administration', 'email', '_bx_accnt_grid_column_title_adm_email', '22%', 0, '22', '', 4),
-('bx_accounts_administration', 'is_confirmed', '_bx_accnt_grid_column_title_adm_is_confirmed', '5%', 0, '', '', 5),
-('bx_accounts_administration', 'profiles', '_bx_accnt_grid_column_title_adm_profiles', '22%', 0, '22', '', 5),
-('bx_accounts_administration', 'logged', '_bx_accnt_grid_column_title_adm_logged', '15%', 0, '15', '', 7),
-('bx_accounts_administration', 'actions', '', '6%', 0, '', '', 8);
-
-INSERT INTO `sys_grid_actions` (`object`, `type`, `name`, `title`, `icon`, `icon_only`, `confirm`, `order`) VALUES
-('bx_accounts_administration', 'bulk', 'activate', '_bx_accnt_grid_action_title_adm_activate', '', 0, 0, 1),
-('bx_accounts_administration', 'bulk', 'suspend', '_bx_accnt_grid_action_title_adm_suspend', '', 0, 0, 2),
-('bx_accounts_administration', 'bulk', 'resend_cemail', '_bx_accnt_grid_action_title_adm_resend_cemail', '', 0, 0, 3),
-('bx_accounts_administration', 'bulk', 'confirm', '_bx_accnt_grid_action_title_adm_confirm', '', 0, 0, 4),
-('bx_accounts_administration', 'bulk', 'delete', '_bx_accnt_grid_action_title_adm_delete', '', 0, 1, 5),
-('bx_accounts_administration', 'bulk', 'delete_with_content', '_bx_accnt_grid_action_title_adm_delete_with_content', '', 0, 1, 6),
-('bx_accounts_administration', 'single', 'edit_email', '_bx_accnt_grid_action_title_adm_edit_email', '', 0, 0, 0),
-('bx_accounts_administration', 'single', 'reset_password', '_bx_accnt_grid_action_title_adm_reset_password', '', 0, 0, 0),
-('bx_accounts_administration', 'single', 'unlock_account', '_bx_accnt_grid_action_title_adm_unlock_account', '', 0, 0, 0),
-('bx_accounts_administration', 'single', 'settings', '_bx_accnt_grid_action_title_adm_more_actions', 'cog', 1, 0, 2),
-('bx_accounts_administration', 'independent', 'add', '_bx_accnt_grid_action_title_adm_more_add', 'plus', 0, 0, 0);

+ 0 - 51
modules/boonex/accounts/updates/11.0.0_11.0.1/source/install/sql/install.sql

@@ -1,51 +0,0 @@
-SET @sName = 'bx_accounts';
-
-
--- FORMS
-INSERT INTO `sys_objects_form` (`object`, `module`, `title`, `action`, `form_attrs`, `submit_name`, `table`, `key`, `uri`, `uri_title`, `params`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES
-('bx_accounts_account', @sName, '_sys_form_account', '', '', 'do_submit', 'sys_accounts', 'id', '', '', 'a:1:{s:14:"checker_helper";s:31:"BxAccntFormAccountCheckerHelper";}', 0, 1, 'BxAccntFormAccount', 'modules/boonex/accounts/classes/BxAccntFormAccount.php');
-
-INSERT INTO `sys_form_displays` (`display_name`, `module`, `object`, `title`, `view_mode`) VALUES
-('bx_accounts_account_settings_email', @sName, 'bx_accounts_account', '_sys_form_display_account_settings_email', 0),
-('bx_accounts_account_create', @sName, 'bx_accounts_account', '_sys_form_display_account_create', 0);
-
-INSERT INTO `sys_form_inputs` (`object`, `module`, `name`, `value`, `values`, `checked`, `type`, `caption_system`, `caption`, `info`, `required`, `collapsed`, `html`, `attrs`, `attrs_tr`, `attrs_wrapper`, `checker_func`, `checker_params`, `checker_error`, `db_pass`, `db_params`, `editable`, `deletable`) VALUES
-('bx_accounts_account', @sName, 'email', '', '', 0, 'text', '_sys_form_login_input_caption_system_email', '_sys_form_account_input_email', '', 1, 0, 0, '', '', '', 'Email', '', '_sys_form_account_input_email_error', 'Xss', '', 0, 0),
-('bx_accounts_account', @sName, 'receive_updates', '1', '', 1, 'switcher', '_sys_form_login_input_caption_system_receive_updates', '_sys_form_account_input_receive_updates', '', 0, 0, 0, '', '', '', '', '', '', 'Int', '', 0, 0),
-('bx_accounts_account', @sName, 'receive_news', '1', '', 1, 'switcher', '_sys_form_login_input_caption_system_receive_news', '_sys_form_account_input_receive_news', '', 0, 0, 0, '', '', '', '', '', '', 'Int', '', 0, 0),
-('bx_accounts_account', @sName, 'do_submit', '_sys_form_account_input_submit', '', 0, 'submit', '_sys_form_login_input_caption_system_do_submit', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 0, 0),
-('bx_accounts_account', @sName, 'name', '', '', 0, 'text', '_sys_form_login_input_caption_system_name', '_sys_form_account_input_name', '', 1, 0, 0, '', '', '', 'Avail', '', '_sys_form_account_input_name_error', 'Xss', '', 1, 0),
-('bx_accounts_account', @sName, 'password', '', '', 0, 'password', '_sys_form_login_input_caption_system_password', '_sys_form_account_input_password', '', 1, 0, 0, '', '', '', 'Preg', 'a:1:{s:4:"preg";s:38:"~^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d).{8,}~";}', '_sys_form_account_input_password_error', '', '', 0, 0),
-('bx_accounts_account', @sName, 'controls', '', 'do_submit,do_cancel', 0, 'input_set', '', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 0, 0),
-('bx_accounts_account', @sName, 'do_cancel', '_adm_btn_cancel_submit', '', 0, 'button', '_adm_btn_cancel_submit', '', '', 0, 0, 0, 'a:2:{s:7:"onclick";s:45:"$(''.bx-popup-applied:visible'').dolPopupHide()";s:5:"class";s:22:"bx-def-margin-sec-left";}', '', '', '', '', '', '', '', 0, 0),
-('bx_accounts_account', @sName, 'email_confirmed', '1', '', 1, 'switcher', '_bx_accnt_form_login_input_caption_system_email_confirmed', '_bx_accnt_form_account_input_email_confirmed', '', 0, 0, 0, '', '', '', '', '', '', 'Int', '', 0, 0);
-
-
-INSERT INTO `sys_form_display_inputs` (`display_name`, `input_name`, `visible_for_levels`, `active`, `order`) VALUES
-('bx_accounts_account_settings_email', 'email', 2147483647, 1, 1),
-('bx_accounts_account_settings_email', 'receive_updates', 2147483647, 1, 2),
-('bx_accounts_account_settings_email', 'receive_news', 2147483647, 1, 3),
-('bx_accounts_account_settings_email', 'controls', 2147483647, 1, 4),
-('bx_accounts_account_settings_email', 'do_submit', 2147483647, 1, 5),
-('bx_accounts_account_settings_email', 'do_cancel', 2147483647, 1, 6),
-
-('bx_accounts_account_create', 'name', 2147483647, 1, 1),
-('bx_accounts_account_create', 'email', 2147483647, 1, 2),
-('bx_accounts_account_create', 'password', 2147483647, 1, 3),
-('bx_accounts_account_create', 'email_confirmed', 2147483647, 1, 4),
-('bx_accounts_account_create', 'controls', 2147483647, 1, 5),
-('bx_accounts_account_create', 'do_submit', 2147483647, 1, 6),
-('bx_accounts_account_create', 'do_cancel', 2147483647, 1, 7);
-
-
--- STUDIO PAGE & WIDGET
-INSERT INTO `sys_std_pages`(`index`, `name`, `header`, `caption`, `icon`) VALUES
-(3, @sName, '_bx_accnt', '_bx_accnt', 'bx_accounts@modules/boonex/accounts/|std-icon.svg');
-SET @iPageId = LAST_INSERT_ID();
-
-SET @iParentPageId = (SELECT `id` FROM `sys_std_pages` WHERE `name` = 'home');
-SET @iParentPageOrder = (SELECT MAX(`order`) FROM `sys_std_pages_widgets` WHERE `page_id` = @iParentPageId);
-INSERT INTO `sys_std_widgets` (`page_id`, `module`, `url`, `click`, `icon`, `caption`, `cnt_notices`, `cnt_actions`) VALUES
-(@iPageId, @sName, '{url_studio}module.php?name=bx_accounts', '', 'bx_accounts@modules/boonex/accounts/|std-icon.svg', '_bx_accnt', '', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:11:"get_actions";s:6:"params";a:0:{}s:5:"class";s:18:"TemplStudioModules";}');
-INSERT INTO `sys_std_pages_widgets` (`page_id`, `widget_id`, `order`) VALUES
-(@iParentPageId, LAST_INSERT_ID(), IF(ISNULL(@iParentPageOrder), 1, @iParentPageOrder + 1));

+ 0 - 19
modules/boonex/accounts/updates/11.0.0_11.0.1/source/template/create.html

@@ -1,19 +0,0 @@
-<div class="bx-accnt-create bx-def-color-bg-block">
-    <div class="bx-accnt-create-cnt">
-        __form__
-        <script type="text/javascript">
-            $(document).ready(function () {
-                $("#__form_id__").ajaxForm({ 
-                    dataType: "json",
-                    beforeSubmit: function (formData, jqForm, options) {
-                        bx_loading($("#__form_id__"), true);
-                    },
-                    success: function (data) {
-                        $(".bx-popup-applied:visible").dolPopupHide();
-                        glGrids.__object__.processJson(data, '__action__');
-                    }
-                });
-            });
-        </script>
-    </div>
-</div>

+ 0 - 51
modules/boonex/accounts/updates/11.0.1_11.0.2/install/config.php

@@ -1,51 +0,0 @@
-<?php
-/**
- * Copyright (c) UNA, Inc - https://una.io
- * MIT License - https://opensource.org/licenses/MIT
- */
-
-$aConfig = array(
-    /**
-     * Main Section.
-     */
-    'title' => 'Accounts Manager',
-    'version_from' => '11.0.1',
-    'version_to' => '11.0.2',
-    'vendor' => 'BoonEx',
-
-    'compatible_with' => array(
-        '11.0.1'
-    ),
-
-    /**
-     * 'home_dir' and 'home_uri' - should be unique. Don't use spaces in 'home_uri' and the other special chars.
-     */
-    'home_dir' => 'boonex/accounts/updates/update_11.0.1_11.0.2/',
-    'home_uri' => 'accounts_update_1101_1102',
-
-    'module_dir' => 'boonex/accounts/',
-    'module_uri' => 'accounts',
-
-    'db_prefix' => 'bx_accnt_',
-    'class_prefix' => 'BxAccnt',
-
-    /**
-     * Installation/Uninstallation Section.
-     */
-    'install' => array(
-        'execute_sql' => 1,
-        'update_files' => 1,
-        'update_languages' => 1,
-        'clear_db_cache' => 1,
-    ),
-
-    /**
-     * Category for language keys.
-     */
-    'language_category' => 'Accounts',
-
-    /**
-     * Files Section
-     */
-    'delete_files' => array(),
-);

+ 0 - 13
modules/boonex/accounts/updates/11.0.1_11.0.2/install/installer.php

@@ -1,13 +0,0 @@
-<?php
-/**
- * Copyright (c) UNA, Inc - https://una.io
- * MIT License - https://opensource.org/licenses/MIT
- */
-
-class BxAccntUpdater extends BxDolStudioUpdater
-{
-    function __construct($aConfig)
-    {
-        parent::__construct($aConfig);
-    }
-}

+ 0 - 4
modules/boonex/accounts/updates/11.0.1_11.0.2/install/langs/en.xml

@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<resources name="en" flag="gb" title="English">
-	<string_add name="_bx_accnt_grid_column_title_adm_added"><![CDATA[Created]]></string_add>
-</resources>

+ 0 - 13
modules/boonex/accounts/updates/11.0.1_11.0.2/install/sql/enable.sql

@@ -1,13 +0,0 @@
-SET @sName = 'bx_accounts';
-
-
--- GRIDS
-UPDATE `sys_objects_grid` SET `sorting_fields`='email_confirmed,logged,added' WHERE `object`='bx_accounts_administration';
-
-DELETE FROM `sys_grid_fields` WHERE `object`='bx_accounts_administration' AND `name`='added';
-INSERT INTO `sys_grid_fields` (`object`, `name`, `title`, `width`, `translatable`, `chars_limit`, `params`, `order`) VALUES
-('bx_accounts_administration', 'added', '_bx_accnt_grid_column_title_adm_added', '10%', 0, '15', '', 8);
-
-UPDATE `sys_grid_fields` SET `width`='17%', `order`='6' WHERE `object`='bx_accounts_administration' AND `name`='profiles';
-UPDATE `sys_grid_fields` SET `width`='10%' WHERE `object`='bx_accounts_administration' AND `name`='logged';
-UPDATE `sys_grid_fields` SET `order`='9' WHERE `object`='bx_accounts_administration' AND `name`='actions';

+ 0 - 517
modules/boonex/accounts/updates/11.0.1_11.0.2/source/classes/BxAccntGridAdministration.php

@@ -1,517 +0,0 @@
-<?php defined('BX_DOL') or die('hack attempt');
-/**
- * Copyright (c) UNA, Inc - https://una.io
- * MIT License - https://opensource.org/licenses/MIT
- *
- * @defgroup    Accounts Accounts
- * @ingroup     UnaModules
- * 
- * @{
- */
-
-class BxAccntGridAdministration extends BxBaseModProfileGridAdministration
-{
-    protected $_sFilter2Name;
-	protected $_sFilter2Value;
-	protected $_aFilter2Values;
-    
-    public function __construct ($aOptions, $oTemplate = false)
-    {
-    	$this->MODULE = 'bx_accounts';
-        parent::__construct ($aOptions, $oTemplate);
-
-        $CNF = &$this->_oModule->_oConfig->CNF;
-        $this->_aFilter1Values = array_merge($this->_aFilter1Values, array(
-            'unconfirmed' => $CNF['T']['filter_item_unconfirmed'],
-            'locked' => $CNF['T']['filter_item_locked'],
-        ));
-
-        $this->_sFilter2Name = 'filter2';
-        $this->_aFilter2Values = array(
-            'operators' => $CNF['T']['filter_item_operators']
-        );
-
-        $sFilter2 = bx_get($this->_sFilter2Name);
-        if(!empty($sFilter2)) {
-            $this->_sFilter2Value = bx_process_input($sFilter2);
-            $this->_aQueryAppend[$this->_sFilter2Name] = $this->_sFilter2Value;
-        }
-    }
-
-    protected function _getDataSql($sFilter, $sOrderField, $sOrderDir, $iStart, $iPerPage)
-    {
-        if(strpos($sFilter, $this->_sParamsDivider) !== false)
-            list($this->_sFilter1Value, $this->_sFilter2Value, $sFilter) = explode($this->_sParamsDivider, $sFilter);
-
-    	if(!empty($this->_sFilter1Value))
-            switch($this->_sFilter1Value) {
-                case 'unconfirmed':
-                    $sCnfnType = getParam('sys_account_confirmation_type');
-                    switch($sCnfnType) {
-                        case 'email':
-                            $this->_aOptions['source'] .= " AND `ta`.`email_confirmed`='0'";
-                            break;
-                        case 'phone':
-                            $this->_aOptions['source'] .= " AND `ta`.`phone_confirmed`='0'";
-                            break;
-                        case 'email_and_phone':
-                            $this->_aOptions['source'] .= " AND (`ta`.`email_confirmed`='0' OR `ta`.`phone_confirmed`='0')";
-                            break;
-                    }
-                    break;
-
-                case 'locked':
-                    $this->_aOptions['source'] .= " AND `ta`.`locked` = 1";
-                    break;
-
-                default:
-        	    $this->_aOptions['source'] .= $this->_oModule->_oDb->prepareAsString(" AND `tp`.`status`=?", $this->_sFilter1Value);
-            }
-
-        if(!empty($this->_sFilter2Value))
-        	$this->_aOptions['source'] .= $this->_oModule->_oDb->prepareAsString(" AND `ta`.`role` & " . BX_DOL_ROLE_ADMIN ." = " . BX_DOL_ROLE_ADMIN);
-
-        return parent::_getDataSqlInner($sFilter, $sOrderField, $sOrderDir, $iStart, $iPerPage);
-    }
-    
-    protected function _getFilterControls()
-    {
-        parent::_getFilterControls();
-
-        return  $this->_getFilterSelectOne($this->_sFilter1Name, $this->_sFilter1Value, $this->_aFilter1Values) . $this->_getFilterSelectOne($this->_sFilter2Name, $this->_sFilter2Value, $this->_aFilter2Values) . $this->_getSearchInput();
-    }
-    
-    public function getCode($isDisplayHeader = true)
-    {
-        return $this->_oModule->_oTemplate->getJsCode('main', array(
-        	'aHtmlIds' => $this->_oModule->_oConfig->getHtmlIds()
-        )) . parent::getCode($isDisplayHeader);
-    }
-
-    public function performActionActivate()
-    {
-    	$this->_performActionEnable(true);
-    }
-
-	public function performActionSuspend()
-    {
-    	$this->_performActionEnable(false);
-    }
-
-    public function performActionEditEmail()
-    {
-        $CNF = &$this->_oModule->_oConfig->CNF;
-
-        $aIds = bx_get('ids');
-        if(!$aIds || !is_array($aIds)) {
-            $iId = (int)bx_get('id');
-            if(!$iId)
-                return echoJson(array());
-
-            $aIds = array($iId);
-        }
-
-        $iId = $aIds[0];
-        $oAccount = BxDolAccount::getInstance($iId);
-        if(!$oAccount)
-            return echoJson(array());
-
-        $aAccount = $oAccount->getInfo();
-        $sAction = 'edit_email';
-
-        $oForm = BxDolForm::getObjectInstance($CNF['OBJECT_FORM_ACCOUNT'], $CNF['OBJECT_FORM_ACCOUNT_DISPLAY_SETTINGS_EMAIL']);
-        $oForm->aFormAttrs['action'] = BX_DOL_URL_ROOT . 'grid.php?o=' . $this->_sObject . '&a=' . $sAction . '&id=' . $iId;
-        $oForm->initChecker($aAccount);
-
-        if($oForm->isSubmittedAndValid()) {
-            $sEmail = $oForm->getCleanValue('email');
-            if(strcmp($aAccount['email'], $sEmail) !== 0 && BxDolAccountQuery::getInstance()->getIdByEmail($sEmail))
-                return echoJson(array('msg' => _t('_sys_form_account_input_email_uniq_error_loggedin')));
-
-            if($oForm->update($aAccount['id'])) {
-                bx_alert('account', 'edited', $aAccount['id'], BxDolAccount::getInstance()->id(), array('display' => $CNF['OBJECT_FORM_ACCOUNT_DISPLAY_SETTINGS_EMAIL']));
-
-                $aRes = array('grid' => $this->getCode(false), 'blink' => $iId);
-                
-                $oAccount->doAudit($iId, '_sys_audit_action_account_email_changed', array('old_email' => $oAccount->getEmail(), 'new_email' => $sEmail));
-            }
-            else
-                $aRes = array('msg' => _t('_sys_txt_error_account_update'));
-
-            echoJson($aRes);
-        }
-        else {
-            $sContent = BxTemplStudioFunctions::getInstance()->popupBox('bx-account-edit-email-popup', _t('_bx_accounts_form_display_account_settings_email_popup'), $this->_oModule->_oTemplate->parseHtmlByName('edit_email.html', array(
-                'form_id' => $oForm->id,
-                'form' => $oForm->getCode(true),
-                'object' => $this->_sObject,
-                'action' => $sAction
-            )));
-
-            echoJson(array('popup' => array('html' => $sContent, 'options' => array('closeOnOuterClick' => false))));
-        }
-    }
-    
-    public function performActionAdd()
-    {
-      
-        $CNF = &$this->_oModule->_oConfig->CNF;
-        $sAction = 'add';
-        $oForm = BxDolForm::getObjectInstance($CNF['OBJECT_FORM_ACCOUNT'], $CNF['OBJECT_FORM_ACCOUNT_DISPLAY_CREATE']);
-        $oForm->aFormAttrs['action'] = BX_DOL_URL_ROOT . 'grid.php?o=' . $this->_sObject . '&a=' . $sAction;
-        $oForm->initChecker();
-
-        if($oForm->isSubmittedAndValid()) {
-           
-            $iAccountId = $oForm->insert();
-            
-            if (!$iAccountId) {
-                $aRes = array('msg' => _t('_sys_txt_error_account_insert'));
-            }
-            else{
-                $aRes = array('grid' => $this->getCode(false), 'blink' => $iAccountId);
-                
-                $oBxTemplAccountForms = new BxTemplAccountForms();
-                
-                $iProfileId = $oBxTemplAccountForms->onAccountCreated($iAccountId, $oForm->isSetPendingApproval(), BX_PROFILE_ACTION_MANUAL, false);
-
-                // perform action
-                BxDolAccount::isAllowedCreate ($iProfileId, true);
-                
-                // check
-                $aModulesProfile = array(); 
-                $aModules = BxDolModuleQuery::getInstance()->getModulesBy(array('type' => 'modules', 'active' => 1));
-                foreach($aModules as $aModule) {
-                    $oModule = BxDolModule::getInstance($aModule['name']);
-                    if($oModule instanceof iBxDolProfileService && BxDolService::call($aModule['name'], 'act_as_profile') === true)
-                        $aModulesProfile[] = $aModule;
-                }
-
-                $sDefaultProfileType = getParam('sys_account_default_profile_type');
-                if(count($aModulesProfile) == 1)
-                    $sProfileModule = $aModulesProfile[0]['name'];
-                else if(!empty($sDefaultProfileType)) 
-                    $sProfileModule = $sDefaultProfileType;
-
-                if (getParam('sys_account_auto_profile_creation') && !empty($sProfileModule)) {
-                    $oAccount = BxDolAccount::getInstance($iAccountId);
-                    $aProfileInfo = BxDolService::call($sProfileModule, 'prepare_fields', array(array(
-                        'author' => $iProfileId,
-                        'name' => $oAccount->getDisplayName(),
-                    )));
-                    $a = BxDolService::call($sProfileModule, 'entity_add', array($iProfileId, $aProfileInfo));
-                    if (isset($a['content']['profile_id']) && (int)$a['content']['profile_id'] > 0){
-                        BxDolAcl::getInstance()->setMembership((int)$a['content']['profile_id'], MEMBERSHIP_ID_STANDARD);
-                    }
-                    echoJson($aRes);
-                }
-            }
-        }
-        else {
-            $sContent = BxTemplStudioFunctions::getInstance()->popupBox('bx-account-edit-email-popup', _t('_bx_accounts_form_display_account_create_popup'), $this->_oModule->_oTemplate->parseHtmlByName('create.html', array(
-                'form_id' => $oForm->id,
-                'form' => $oForm->getCode(true),
-                'object' => $this->_sObject,
-                'action' => $sAction
-            )));
-
-            echoJson(array('popup' => array('html' => $sContent, 'options' => array('closeOnOuterClick' => false))));
-        }
-    }
-    
-    public function performActionConfirm()
-    {
-        $CNF = &$this->_oModule->_oConfig->CNF;
-
-    	$aIds = bx_get('ids');
-        if(!$aIds || !is_array($aIds)) {
-            echoJson(array());
-            return;
-        }
-
-        $oAccount = BxDolAccount::getInstance();
-
-        $iAffected = 0;
-        $aIdsAffected = array();
-        foreach($aIds as $iId){
-            if (BxDolAccount::isNeedConfirmEmail()){
-			    if($oAccount->updateEmailConfirmed(true, true, $iId)) {
-				    $aIdsAffected[] = $iId;
-        		    $iAffected++;  
-			    }
-            }
-            if (BxDolAccount::isNeedConfirmPhone()){
-			    if($oAccount->updatePhoneConfirmed(true, $iId)) {
-				    $aIdsAffected[] = $iId;
-        		    $iAffected++;  
-			    }
-            }
-        }
-		echoJson($iAffected ? array('grid' => $this->getCode(false), 'blink' => $aIdsAffected) : array('msg' => _t($CNF['T']['grid_action_err_perform'])));
-    }
-    
-    public function performActionResendCemail()
-    {
-    	$CNF = &$this->_oModule->_oConfig->CNF;
-
-    	$aIds = bx_get('ids');
-        if(!$aIds || !is_array($aIds)) {
-            echoJson(array());
-            return;
-        }
-
-        $oAccount = BxDolAccount::getInstance();
-
-        $iAffected = 0;
-        $aIdsAffected = array();
-        foreach($aIds as $iId)
-			if($oAccount->sendConfirmationEmail($iId)) {
-				$aIdsAffected[] = $iId;
-        		$iAffected++;  
-			}
-
-		echoJson($iAffected ? array('grid' => $this->getCode(false), 'blink' => $aIdsAffected) : array('msg' => _t($CNF['T']['grid_action_err_perform'])));
-    }
-
-    public function performActionResetPassword()
-    {
-    	$aIds = bx_get('ids');
-        if(!$aIds || !is_array($aIds)) {
-            echoJson(array());
-            return;
-        }
-
-        $iId = $aIds[0];
-        $oAccount = BxDolAccount::getInstance($iId);
-        if(!$oAccount)
-            return echoJson(array());
-
-        $sPwd = genRndPwd();
-        $sSalt = genRndSalt();
-        $sPasswordHash = encryptUserPwd($sPwd, $sSalt);
-
-        $aRes = array();
-        if((int)BxDolAccountQuery::getInstance()->updatePassword($sPasswordHash, $sSalt, $iId) > 0) {
-            bx_alert('account', 'edited', $iId, BxDolAccount::getInstance()->id(), array('action' => 'reset_password'));
-
-            $sPopupId = $this->_oModule->_oConfig->getHtmlIds('password_popup');
-            $sPopupTitle = _t('_bx_accounts_form_display_account_settings_password_popup');
-            $sPopupContent = $this->_oModule->_oTemplate->parseHtmlByName('reset_password.html', array(
-                'js_object' => $this->_oModule->_oConfig->getJsObject('main'),
-                'html_id_text' => $this->_oModule->_oConfig->getHtmlIds('password_text'),
-                'html_id_button' => $this->_oModule->_oConfig->getHtmlIds('password_button'),
-                'password' => $sPwd,
-            ));
-
-            $aRes = array('popup' => BxTemplStudioFunctions::getInstance()->popupBox($sPopupId, $sPopupTitle, $sPopupContent));
-            
-            $oAccount->doAudit($iId, '_sys_audit_action_account_reset_password');
-        }
-        else 
-            $aRes = array('msg' => _t('_bx_accnt_grid_action_err_perform'));
-
-        return echoJson($aRes);
-    }
-    
-    public function performActionUnlockAccount()
-    {
-    	$aIds = bx_get('ids');
-        if(!$aIds || !is_array($aIds)) {
-            echoJson(array());
-            return;
-        }
-		$oAccountQuery = BxDolAccountQuery::getInstance();
-		foreach($aIds as $iId){
-			$oAccount = BxDolAccount::getInstance($iId);
-			if(!$oAccount)
-				continue;
-			if ($oAccount->isLocked()){
-				$oAccountQuery->unlockAccount($iId);
-			}
-            
-            $oAccount->doAudit($iId, '_sys_audit_action_account_unlock');
-		}
-		$aRes = array('grid' => $this->getCode(false), 'blink' => $aIds);
-        return echoJson($aRes);
-    }
-
-	public function performActionMakeOperator()
-    {
-    	$this->_performActionChangeRole(3);
-    }
-
-	public function performActionUnmakeOperator()
-    {
-    	$this->_performActionChangeRole(1);
-    }
-
-	protected function _performActionChangeRole($iRole)
-    {
-    	$CNF = &$this->_oModule->_oConfig->CNF;
-
-    	$aIds = bx_get('ids');
-        if(!$aIds || !is_array($aIds)) {
-            echoJson(array());
-            return;
-        }
-
-        $iAffected = 0;
-        $aIdsAffected = array();
-        foreach($aIds as $iId)
-			if($this->_oModule->_oDb->updateAccount(array('role' => $iRole), array('id' => $iId))) {
-				$aIdsAffected[] = $iId;
-        		$iAffected++;
-                
-                $oAccount = BxDolAccount::getInstance($iId);
-                $oAccount->doAudit($iId, '_sys_audit_action_account_change_role_to_' . $iRole);
-			}
-
-		echoJson($iAffected ? array('grid' => $this->getCode(false), 'blink' => $aIdsAffected) : array('msg' => _t($CNF['T']['grid_action_err_perform'])));
-    }
-
-	protected function _performActionEnable($isChecked)
-    {
-    	$CNF = &$this->_oModule->_oConfig->CNF;
-
-    	$aIds = bx_get('ids');
-        if(!$aIds || !is_array($aIds)) {
-            echoJson(array());
-            return;
-        }
-        $iAffected = 0;
-        $aIdsAffected = array();
-        foreach($aIds as $iId)
-        	if($this->_enable($iId, $isChecked)) {
-        		$aIdsAffected[] = $iId;
-        		$iAffected++;
-                
-                $oAccount = BxDolAccount::getInstance($iId);
-                $oAccount->doAudit($iId, '_sys_audit_action_account_' . $isChecked ? 'activated' : 'suspended');
-        	}
-
-        echoJson($iAffected ? array('grid' => $this->getCode(false), 'blink' => $aIdsAffected) : array('msg' => _t($CNF['T']['grid_action_err_perform'])));
-    }
-
-    protected function _enable($mixedId, $isChecked)
-    {
-    	$oProfile = BxDolProfile::getInstanceAccountProfile($mixedId);
-    	if(!$oProfile)
-    	    return false;
-
-        $iAction = BX_PROFILE_ACTION_MANUAL;
-        $sMethod = $isChecked ? 'activate' : 'suspend';
-        if(!$oProfile->$sMethod($iAction, 0 ,false))
-            return false;
-
-        sendMailTemplate('t_ChangeStatusAccount' . ucfirst($sMethod), $oProfile->getAccountObject()->id(), $oProfile->id(), array(), BX_EMAIL_SYSTEM);
-        
-        $aProfiles = $oProfile->getAccountObject()->getProfiles();
-        foreach($aProfiles as $aProfile){
-            BxDolProfile::getInstance($aProfile['id'])->$sMethod($iAction, 0 ,false);
-        }
-        
-    	return true;
-    }
-
-    //--- Layout methods ---//
-    protected function _getActionEditEmail($sType, $sKey, $a, $isSmall = false, $isDisabled = false, $aRow = array())
-    {
-        return '';
-    }
-    
-    protected function _getCellEmailConfirmed($mixedValue, $sKey, $aField, $aRow)
-    {
-    	$mixedValue = (int)$mixedValue == 1 ? '_Yes' : '_No';
-        return parent::_getCellDefault(_t($mixedValue), $sKey, $aField, $aRow);
-    }
-
-    protected function _getActionResetPassword($sType, $sKey, $a, $isSmall = false, $isDisabled = false, $aRow = array())
-    {
-        return '';
-    }
-    
-    protected function _getActionUnlockAccount($sType, $sKey, $a, $isSmall = false, $isDisabled = false, $aRow = array())
-    {
-        return '';
-    }
-
-    protected function _getCellName($mixedValue, $sKey, $aField, $aRow)
-    {
-        $oAccount = BxDolAccount::getInstance($aRow['id']);
-        if ($oAccount)
-            $s = ($aRow['locked'] == 1 ? $this->_oTemplate->parseIcon("lock col-red1") . ' ' : '') . $oAccount->getDisplayName();
-        return parent::_getCellDefault ($s, $sKey, $aField, $aRow);
-    }
-    
-	protected function _getCellProfiles($mixedValue, $sKey, $aField, $aRow)
-    {
-        $s = $this->_oModule->_oTemplate->getProfilesByAccount($aRow);
-
-        return parent::_getCellDefault ($s, $sKey, $aField, $aRow);
-    }
-
-    protected function _getCellLogged($mixedValue, $sKey, $aField, $aRow)
-    {
-        $mixedValue = !empty($mixedValue) ? bx_time_js($mixedValue) : _t('_sys_not_available');
-
-        return parent::_getCellDefault($mixedValue, $sKey, $aField, $aRow);
-    } 
-    
-    protected function _getCellAdded($mixedValue, $sKey, $aField, $aRow)
-    {
-        $mixedValue = !empty($mixedValue) ? bx_time_js($mixedValue) : _t('_sys_not_available');
-
-        return parent::_getCellDefault($mixedValue, $sKey, $aField, $aRow);
-    } 
-    
-    protected function _getCellIsConfirmed($mixedValue, $sKey, $aField, $aRow)
-    {
-        $oAccount = BxDolAccount::getInstance($aRow['id']);
-        $s = "";
-        if ($oAccount)
-            $s = $oAccount->getCurrentConfirmationStatusValue();
-        return parent::_getCellDefault(_t('_bx_accnt_grid_confirmation_status_' . $s), $sKey, $aField, $aRow);
-    }
-
-    protected function _isCheckboxDisabled($aRow)
-    {
-        return false;
-    }
-
-	protected function _getContentInfo($iId)
-    {
-    	return BxDolAccountQuery::getInstance()->getInfoById($iId);
-    }
-
-	protected function _doDelete($iId, $aParams = array())
-    {
-    	return BxDolAccount::getInstance($iId)->delete(isset($aParams['with_content']) && $aParams['with_content'] === true);
-    }
-    
-    
-
-    protected function _addJsCss()
-    {
-        parent::_addJsCss();
-        
-        $this->_oTemplate->addJs(array(
-            'main.css'
-        ));
-
-        $this->_oTemplate->addJs(array(
-        	'jquery.form.min.js',
-            'clipboard.min.js',
-            'main.js'
-        ));
-    }
-
-    protected function _isVisibleGrid($a)
-    {
-        if(isAdmin())
-            return true;
-        
-        return parent::_isVisibleGrid($a);
-    }
-}
-
-/** @} */

+ 0 - 71
modules/boonex/accounts/updates/11.0.1_11.0.2/source/install/config.php

@@ -1,71 +0,0 @@
-<?php
-/**
- * Copyright (c) UNA, Inc - https://una.io
- * MIT License - https://opensource.org/licenses/MIT
- *
- * @defgroup    Accounts Accounts
- * @ingroup     UnaModules
- *
- * @{
- */
-
-$aConfig = array(
-    /**
-     * Main Section.
-     */
-    'type' => BX_DOL_MODULE_TYPE_MODULE,
-    'name' => 'bx_accounts',
-    'title' => 'Accounts Manager',
-    'note' => 'Accounts Manager module.',
-    'version' => '11.0.2',
-    'vendor' => 'BoonEx',
-    'help_url' => 'http://feed.una.io/?section={module_name}',
-
-    'compatible_with' => array(
-        '11.0.1'
-    ),
-
-    /**
-     * 'home_dir' and 'home_uri' - should be unique. Don't use spaces in 'home_uri' and the other special chars.
-     */
-    'home_dir' => 'boonex/accounts/',
-    'home_uri' => 'accounts',
-
-    'db_prefix' => 'bx_accnt_',
-    'class_prefix' => 'BxAccnt',
-
-    /**
-     * Category for language keys.
-     */
-    'language_category' => 'Accounts',
-
-    /**
-     * Installation/Uninstallation Section.
-     */
-    'install' => array(
-        'execute_sql' => 1,
-        'update_languages' => 1,
-        'clear_db_cache' => 1,
-    ),
-    'uninstall' => array (
-        'execute_sql' => 1,
-        'update_languages' => 1,
-        'clear_db_cache' => 1,
-    ),
-    'enable' => array(
-        'execute_sql' => 1,
-        'clear_db_cache' => 1,
-    ),
-    'disable' => array (
-        'execute_sql' => 1,
-        'clear_db_cache' => 1,
-    ),
-
-    /**
-     * Dependencies Section
-     */
-    'dependencies' => array(),
-
-);
-
-/** @} */

+ 0 - 88
modules/boonex/accounts/updates/11.0.1_11.0.2/source/install/langs/en.xml

@@ -1,88 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<resources name="en" flag="gb" title="English">
-    <string name="_bx_accnt"><![CDATA[Accounts]]></string>
-    <string name="_bx_accounts"><![CDATA[Accounts]]></string>
-
-    <string name="_bx_accounts_form_display_account_settings_email_popup"><![CDATA[Edit Email]]></string>
-    <string name="_bx_accounts_form_display_account_create_popup"><![CDATA[Create new Account]]></string>
-    <string name="_bx_accounts_form_display_account_settings_password_popup"><![CDATA[Reset Password]]></string>
-
-    <string name="_bx_accnt_page_title_sys_manage_administration"><![CDATA[Manage All Accounts]]></string>
-    <string name="_bx_accnt_page_title_manage"><![CDATA[Manage Accounts]]></string>
-    <string name="_bx_accnt_page_title_browse"><![CDATA[Accounts]]></string>
-
-    <string name="_bx_accnt_page_block_title_system_manage_administration"><![CDATA[Manage All Accounts]]></string>
-    <string name="_bx_accnt_page_block_title_manage"><![CDATA[Manage Accounts]]></string>
-
-    <string name="_bx_accnt_menu_set_title_manage_tools"><![CDATA[Manage Tools Submenu]]></string>
-    <string name="_bx_accnt_menu_title_manage_tools"><![CDATA[Manage Tools Submenu]]></string>
-    <string name="_bx_accnt_menu_item_title_system_resend_cemail"><![CDATA[Resend Confirmation]]></string>
-    <string name="_bx_accnt_menu_item_title_resend_cemail"><![CDATA[Resend Confirmation]]></string>
-    <string name="_bx_accnt_menu_item_title_system_confirm"><![CDATA[Confirm]]></string>
-    <string name="_bx_accnt_menu_item_title_confirm"><![CDATA[Confirm]]></string>
-
-  <string name="_bx_accnt_menu_item_title_system_edit_email"><![CDATA[Edit Email]]></string>
-    <string name="_bx_accnt_menu_item_title_edit_email"><![CDATA[Edit Email]]></string>
-    <string name="_bx_accnt_menu_item_title_system_reset_password"><![CDATA[Reset Password]]></string>
-    <string name="_bx_accnt_menu_item_title_reset_password"><![CDATA[Reset Password]]></string>
-    <string name="_bx_accnt_menu_item_title_system_unlock_account"><![CDATA[Unlock]]></string>
-    <string name="_bx_accnt_menu_item_title_unlock_account"><![CDATA[Unlock]]></string>
-    <string name="_bx_accnt_menu_item_title_system_delete"><![CDATA[Delete]]></string>
-    <string name="_bx_accnt_menu_item_title_delete"><![CDATA[Delete]]></string>
-    <string name="_bx_accnt_menu_item_title_system_delete_with_content"><![CDATA[Delete With Content]]></string>
-    <string name="_bx_accnt_menu_item_title_delete_with_content"><![CDATA[Delete With Content]]></string>
-    <string name="_bx_accnt_menu_item_title_system_make_operator"><![CDATA[Make Operator]]></string>
-    <string name="_bx_accnt_menu_item_title_make_operator"><![CDATA[Make Operator]]></string>
-    <string name="_bx_accnt_menu_item_title_system_unmake_operator"><![CDATA[Unmake Operator]]></string>
-    <string name="_bx_accnt_menu_item_title_unmake_operator"><![CDATA[Unmake Operator]]></string>
-    <string name="_bx_accnt_menu_item_title_system_admt_accounts"><![CDATA[Accounts]]></string>
-    <string name="_bx_accnt_menu_item_title_admt_accounts"><![CDATA[Accounts]]></string>
-    <string name="_bx_accnt_menu_item_title_manage"><![CDATA[Manage]]></string>
-    <string name="_bx_accnt_menu_dashboard_manage_tools_addon_counter1_caption"><![CDATA[unconfirmed]]></string>
-
-    <string name="_bx_accnt_acl_action_edit_any_account"><![CDATA[Edit Any Account]]></string>
-
-    <string name="_bx_accnt_grid_filter_item_title_adm_select_one_filter1"><![CDATA[All Statuses]]></string>
-    <string name="_bx_accnt_grid_filter_item_title_adm_select_one_filter2"><![CDATA[All]]></string>
-    <string name="_bx_accnt_grid_filter_item_title_adm_active"><![CDATA[Active]]></string>
-    <string name="_bx_accnt_grid_filter_item_title_adm_operators"><![CDATA[Operators]]></string>
-    <string name="_bx_accnt_grid_filter_item_title_adm_pending"><![CDATA[Pending]]></string>
-    <string name="_bx_accnt_grid_filter_item_title_adm_suspended"><![CDATA[Suspended]]></string>    
-    <string name="_bx_accnt_grid_filter_item_title_adm_unconfirmed"><![CDATA[Unconfirmed]]></string>
-    <string name="_bx_accnt_grid_filter_item_title_adm_locked"><![CDATA[Locked]]></string>
-    <string name="_bx_accnt_grid_column_title_adm_active"><![CDATA[Active]]></string>
-    <string name="_bx_accnt_grid_column_title_adm_name"><![CDATA[Name]]></string>
-    <string name="_bx_accnt_grid_column_title_adm_email"><![CDATA[Email]]></string>
-    <string name="_bx_accnt_grid_column_title_adm_ip"><![CDATA[IP]]></string>
-
-    <string name="_bx_accnt_grid_column_title_adm_is_confirmed"><![CDATA[Confirmed]]></string>
-    <string name="_bx_accnt_grid_column_title_adm_profiles"><![CDATA[Profiles]]></string>
-    <string name="_bx_accnt_grid_column_title_adm_logged"><![CDATA[Last Logged]]></string>
-    <string name="_bx_accnt_grid_column_title_adm_added"><![CDATA[Created]]></string>
-    <string name="_bx_accnt_grid_action_title_adm_activate"><![CDATA[Activate]]></string>
-    <string name="_bx_accnt_grid_action_title_adm_suspend"><![CDATA[Suspend]]></string>
-    <string name="_bx_accnt_grid_action_title_adm_confirm"><![CDATA[Confirm]]></string>
-    <string name="_bx_accnt_grid_action_title_adm_edit_email"><![CDATA[Edit Email]]></string>
-    <string name="_bx_accnt_grid_action_title_adm_resend_cemail"><![CDATA[Resend Confirmation]]></string>
-    <string name="_bx_accnt_grid_action_title_adm_reset_password"><![CDATA[Reset Password]]></string>
-    <string name="_bx_accnt_grid_action_title_adm_unlock_account"><![CDATA[Unlock]]></string>
-    <string name="_bx_accnt_grid_action_title_adm_delete"><![CDATA[Delete]]></string>
-    <string name="_bx_accnt_grid_action_title_adm_delete_with_content"><![CDATA[Delete With Content]]></string>
-    <string name="_bx_accnt_grid_action_title_adm_more_actions"><![CDATA[More Actions]]></string>
-    <string name="_bx_accnt_grid_action_title_adm_more_add"><![CDATA[Add new]]></string>
-    <string name="_bx_accnt_grid_action_err_delete"><![CDATA[Cannot delete the selected account(s).]]></string>
-    <string name="_bx_accnt_grid_action_err_perform"><![CDATA[Cannot perform the action for selected account(s).]]></string>
-    <string name="_bx_accnt_grid_action_unlock_successed"><![CDATA[Successfully unlocked]]></string>
-    <string name="_bx_accnt_grid_action_unlock_error"><![CDATA[Account is not blocked]]></string>
-    <string name="_bx_accnt_grid_confirmation_status_none"><![CDATA[No]]></string>
-    <string name="_bx_accnt_grid_confirmation_status_email"><![CDATA[Email]]></string>
-    <string name="_bx_accnt_grid_confirmation_status_phone"><![CDATA[Phone]]></string>
-    <string name="_bx_accnt_grid_confirmation_status_email_and_phone"><![CDATA[All]]></string>
-
-    <string name="_bx_accnt_form_login_input_caption_system_email_confirmed"><![CDATA[Email confirmed]]></string>
-    <string name="_bx_accnt_form_account_input_email_confirmed"><![CDATA[Email confirmed]]></string>
- 
-    <string name="_bx_accnt_txt_more"><![CDATA[{0} more]]></string>
-    <string name="_bx_accnt_txt_see_more"><![CDATA[See more]]></string>
-    <string name="_bx_accnt_txt_copy_to_clipboard"><![CDATA[Copy to Clipboard]]></string>
-</resources>

+ 0 - 84
modules/boonex/accounts/updates/11.0.1_11.0.2/source/install/sql/enable.sql

@@ -1,84 +0,0 @@
-SET @sName = 'bx_accounts';
-
-
--- PAGE: module administration
-INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `uri`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
-('bx_accounts_administration', '_bx_accnt_page_title_sys_manage_administration', '_bx_accnt_page_title_manage', @sName, 5, 192, 1, 'accounts-administration', 'page.php?i=accounts-administration', '', '', '', 0, 1, 0, '', '');
-
-INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES 
-('bx_accounts_administration', 1, @sName, '_bx_accnt_page_block_title_system_manage_administration', '_bx_accnt_page_block_title_manage', 11, 192, 'service', 'a:3:{s:6:\"module\";s:11:\"bx_accounts\";s:6:\"method\";s:12:\"manage_tools\";s:6:\"params\";a:1:{i:0;s:14:\"administration\";}}', 0, 1, 0);
-
-
--- MENU: manage tools submenu
-INSERT INTO `sys_objects_menu`(`object`, `title`, `set_name`, `module`, `template_id`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES 
-('bx_accounts_menu_manage_tools', '_bx_accnt_menu_title_manage_tools', 'bx_accounts_menu_manage_tools', @sName, 6, 0, 1, 'BxAccntMenuManageTools', 'modules/boonex/accounts/classes/BxAccntMenuManageTools.php');
-
-INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES 
-('bx_accounts_menu_manage_tools', @sName, '_bx_accnt_menu_set_title_manage_tools', 0);
-
-INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
-('bx_accounts_menu_manage_tools', @sName, 'edit-email', '_bx_accnt_menu_item_title_system_edit_email', '_bx_accnt_menu_item_title_edit_email', 'javascript:void(0)', 'javascript:{js_object}.onClickEditEmail({content_id}, this);', '_self', 'at', '', 192, 1, 0, 1),
-('bx_accounts_menu_manage_tools', @sName, 'resend-cemail', '_bx_accnt_menu_item_title_system_resend_cemail', '_bx_accnt_menu_item_title_resend_cemail', 'javascript:void(0)', 'javascript:{js_object}.onClickResendCemail({content_id}, this);', '_self', 'far envelope', '', 192, 1, 0, 2),
-('bx_accounts_menu_manage_tools', @sName, 'confirm', '_bx_accnt_menu_item_title_system_confirm', '_bx_accnt_menu_item_title_confirm', 'javascript:void(0)', 'javascript:{js_object}.onClickConfirm({content_id}, this);', '_self', 'fas check', '', 192, 1, 0, 3),
-('bx_accounts_menu_manage_tools', @sName, 'reset-password', '_bx_accnt_menu_item_title_system_reset_password', '_bx_accnt_menu_item_title_reset_password', 'javascript:void(0)', 'javascript:{js_object}.onClickResetPassword({content_id}, this);', '_self', 'eraser', '', 192, 1, 0, 4),
-('bx_accounts_menu_manage_tools', @sName, 'unlock-account', '_bx_accnt_menu_item_title_system_unlock_account', '_bx_accnt_menu_item_title_unlock_account', 'javascript:void(0)', 'javascript:{js_object}.onClickUnlockAccount({content_id}, this);', '_self', 'unlock', '', 192, 1, 0, 5),
-('bx_accounts_menu_manage_tools', @sName, 'delete', '_bx_accnt_menu_item_title_system_delete', '_bx_accnt_menu_item_title_delete', 'javascript:void(0)', 'javascript:{js_object}.onClickDelete({content_id}, this);', '_self', 'far trash-alt', '', 192, 1, 0, 6),
-('bx_accounts_menu_manage_tools', @sName, 'delete-with-content', '_bx_accnt_menu_item_title_system_delete_with_content', '_bx_accnt_menu_item_title_delete_with_content', 'javascript:void(0)', 'javascript:{js_object}.onClickDeleteWithContent({content_id}, this);', '_self', 'far trash-alt', '', 192, 1, 0, 7),
-('bx_accounts_menu_manage_tools', @sName, 'make-operator', '_bx_accnt_menu_item_title_system_make_operator', '_bx_accnt_menu_item_title_make_operator', 'javascript:void(0)', 'javascript:{js_object}.onClickMakeOperator({content_id}, this);', '_self', 'wrench', '', 192, 1, 0, 8),
-('bx_accounts_menu_manage_tools', @sName, 'unmake-operator', '_bx_accnt_menu_item_title_system_unmake_operator', '_bx_accnt_menu_item_title_unmake_operator', 'javascript:void(0)', 'javascript:{js_object}.onClickUnmakeOperator({content_id}, this);', '_self', 'wrench', '', 192, 1, 0, 9);
-
--- MENU: dashboard manage tools
-SET @iManageMenuOrder = (SELECT IFNULL(MAX(`order`), 0) FROM `sys_menu_items` WHERE `set_name`='sys_account_dashboard_manage_tools' LIMIT 1);
-INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `addon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
-('sys_account_dashboard_manage_tools', @sName, 'accounts-administration', '_bx_accnt_menu_item_title_system_admt_accounts', '_bx_accnt_menu_item_title_admt_accounts', 'page.php?i=accounts-administration', '', '_self', 'at', 'a:2:{s:6:"module";s:11:"bx_accounts";s:6:"method";s:27:"get_menu_addon_manage_tools";}', '', 192, 1, 0, @iManageMenuOrder + 1);
-
-
--- ACL
-INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
-(@sName, 'edit any entry', NULL, '_bx_accnt_acl_action_edit_any_account', '', 1, 3);
-SET @iIdActionProfileEditAny = LAST_INSERT_ID();
-
-SET @iUnauthenticated = 1;
-SET @iAccount = 2;
-SET @iStandard = 3;
-SET @iUnconfirmed = 4;
-SET @iPending = 5;
-SET @iSuspended = 6;
-SET @iModerator = 7;
-SET @iAdministrator = 8;
-SET @iPremium = 9;
-
-INSERT INTO `sys_acl_matrix` (`IDLevel`, `IDAction`) VALUES
-
--- edit any entry 
-(@iModerator, @iIdActionProfileEditAny),
-(@iAdministrator, @iIdActionProfileEditAny);
-
-
--- GRIDS: administration
-INSERT INTO `sys_objects_grid` (`object`, `source_type`, `source`, `table`, `field_id`, `field_order`, `field_active`, `paginate_url`, `paginate_per_page`, `paginate_simple`, `paginate_get_start`, `paginate_get_per_page`, `filter_fields`, `filter_fields_translatable`, `filter_mode`, `sorting_fields`, `sorting_fields_translatable`, `visible_for_levels`, `override_class_name`, `override_class_file`) VALUES
-('bx_accounts_administration', 'Sql', 'SELECT `ta`.*, `tp`.`status` AS `status` FROM `sys_accounts` AS `ta` LEFT JOIN `sys_profiles` AS `tp` ON `ta`.`id`=`tp`.`account_id` AND `tp`.`type`=''system'' WHERE 1 ', 'sys_accounts', 'id', 'logged', 'status', '', 20, NULL, 'start', '', 'name,email,ip,phone', '', 'like', 'email_confirmed,logged,added', '', 192, 'BxAccntGridAdministration', 'modules/boonex/accounts/classes/BxAccntGridAdministration.php');
-
-INSERT INTO `sys_grid_fields` (`object`, `name`, `title`, `width`, `translatable`, `chars_limit`, `params`, `order`) VALUES
-('bx_accounts_administration', 'checkbox', '_sys_select', '2%', 0, '', '', 1),
-('bx_accounts_administration', 'switcher', '_bx_accnt_grid_column_title_adm_active', '6%', 0, '', '', 2),
-('bx_accounts_administration', 'name', '_bx_accnt_grid_column_title_adm_name', '22%', 0, '22', '', 3),
-('bx_accounts_administration', 'email', '_bx_accnt_grid_column_title_adm_email', '22%', 0, '22', '', 4),
-('bx_accounts_administration', 'is_confirmed', '_bx_accnt_grid_column_title_adm_is_confirmed', '5%', 0, '', '', 5),
-('bx_accounts_administration', 'profiles', '_bx_accnt_grid_column_title_adm_profiles', '17%', 0, '22', '', 6),
-('bx_accounts_administration', 'logged', '_bx_accnt_grid_column_title_adm_logged', '10%', 0, '15', '', 7),
-('bx_accounts_administration', 'added', '_bx_accnt_grid_column_title_adm_added', '10%', 0, '15', '', 8),
-('bx_accounts_administration', 'actions', '', '6%', 0, '', '', 9);
-
-INSERT INTO `sys_grid_actions` (`object`, `type`, `name`, `title`, `icon`, `icon_only`, `confirm`, `order`) VALUES
-('bx_accounts_administration', 'bulk', 'activate', '_bx_accnt_grid_action_title_adm_activate', '', 0, 0, 1),
-('bx_accounts_administration', 'bulk', 'suspend', '_bx_accnt_grid_action_title_adm_suspend', '', 0, 0, 2),
-('bx_accounts_administration', 'bulk', 'resend_cemail', '_bx_accnt_grid_action_title_adm_resend_cemail', '', 0, 0, 3),
-('bx_accounts_administration', 'bulk', 'confirm', '_bx_accnt_grid_action_title_adm_confirm', '', 0, 0, 4),
-('bx_accounts_administration', 'bulk', 'delete', '_bx_accnt_grid_action_title_adm_delete', '', 0, 1, 5),
-('bx_accounts_administration', 'bulk', 'delete_with_content', '_bx_accnt_grid_action_title_adm_delete_with_content', '', 0, 1, 6),
-('bx_accounts_administration', 'single', 'edit_email', '_bx_accnt_grid_action_title_adm_edit_email', '', 0, 0, 0),
-('bx_accounts_administration', 'single', 'reset_password', '_bx_accnt_grid_action_title_adm_reset_password', '', 0, 0, 0),
-('bx_accounts_administration', 'single', 'unlock_account', '_bx_accnt_grid_action_title_adm_unlock_account', '', 0, 0, 0),
-('bx_accounts_administration', 'single', 'settings', '_bx_accnt_grid_action_title_adm_more_actions', 'cog', 1, 0, 2),
-('bx_accounts_administration', 'independent', 'add', '_bx_accnt_grid_action_title_adm_more_add', 'plus', 0, 0, 0);

+ 0 - 51
modules/boonex/accounts/updates/11.0.2_11.0.3/install/config.php

@@ -1,51 +0,0 @@
-<?php
-/**
- * Copyright (c) UNA, Inc - https://una.io
- * MIT License - https://opensource.org/licenses/MIT
- */
-
-$aConfig = array(
-    /**
-     * Main Section.
-     */
-    'title' => 'Accounts Manager',
-    'version_from' => '11.0.2',
-    'version_to' => '11.0.3',
-    'vendor' => 'BoonEx',
-
-    'compatible_with' => array(
-        '11.0.3'
-    ),
-
-    /**
-     * 'home_dir' and 'home_uri' - should be unique. Don't use spaces in 'home_uri' and the other special chars.
-     */
-    'home_dir' => 'boonex/accounts/updates/update_11.0.2_11.0.3/',
-    'home_uri' => 'accounts_update_1102_1103',
-
-    'module_dir' => 'boonex/accounts/',
-    'module_uri' => 'accounts',
-
-    'db_prefix' => 'bx_accnt_',
-    'class_prefix' => 'BxAccnt',
-
-    /**
-     * Installation/Uninstallation Section.
-     */
-    'install' => array(
-        'execute_sql' => 0,
-        'update_files' => 1,
-        'update_languages' => 0,
-        'clear_db_cache' => 0,
-    ),
-
-    /**
-     * Category for language keys.
-     */
-    'language_category' => 'Accounts',
-
-    /**
-     * Files Section
-     */
-    'delete_files' => array(),
-);

+ 0 - 13
modules/boonex/accounts/updates/11.0.2_11.0.3/install/installer.php

@@ -1,13 +0,0 @@
-<?php
-/**
- * Copyright (c) UNA, Inc - https://una.io
- * MIT License - https://opensource.org/licenses/MIT
- */
-
-class BxAccntUpdater extends BxDolStudioUpdater
-{
-    function __construct($aConfig)
-    {
-        parent::__construct($aConfig);
-    }
-}

+ 0 - 509
modules/boonex/accounts/updates/11.0.2_11.0.3/source/classes/BxAccntGridAdministration.php

@@ -1,509 +0,0 @@
-<?php defined('BX_DOL') or die('hack attempt');
-/**
- * Copyright (c) UNA, Inc - https://una.io
- * MIT License - https://opensource.org/licenses/MIT
- *
- * @defgroup    Accounts Accounts
- * @ingroup     UnaModules
- * 
- * @{
- */
-
-class BxAccntGridAdministration extends BxBaseModProfileGridAdministration
-{
-    protected $_sFilter2Name;
-	protected $_sFilter2Value;
-	protected $_aFilter2Values;
-    
-    public function __construct ($aOptions, $oTemplate = false)
-    {
-    	$this->MODULE = 'bx_accounts';
-        parent::__construct ($aOptions, $oTemplate);
-
-        $CNF = &$this->_oModule->_oConfig->CNF;
-        $this->_aFilter1Values = array_merge($this->_aFilter1Values, array(
-            'unconfirmed' => $CNF['T']['filter_item_unconfirmed'],
-            'locked' => $CNF['T']['filter_item_locked'],
-        ));
-
-        $this->_sFilter2Name = 'filter2';
-        $this->_aFilter2Values = array(
-            'operators' => $CNF['T']['filter_item_operators']
-        );
-
-        $sFilter2 = bx_get($this->_sFilter2Name);
-        if(!empty($sFilter2)) {
-            $this->_sFilter2Value = bx_process_input($sFilter2);
-            $this->_aQueryAppend[$this->_sFilter2Name] = $this->_sFilter2Value;
-        }
-    }
-
-    protected function _getDataSql($sFilter, $sOrderField, $sOrderDir, $iStart, $iPerPage)
-    {
-        if(strpos($sFilter, $this->_sParamsDivider) !== false)
-            list($this->_sFilter1Value, $this->_sFilter2Value, $sFilter) = explode($this->_sParamsDivider, $sFilter);
-
-    	if(!empty($this->_sFilter1Value))
-            switch($this->_sFilter1Value) {
-                case 'unconfirmed':
-                    $sCnfnType = getParam('sys_account_confirmation_type');
-                    switch($sCnfnType) {
-                        case 'email':
-                            $this->_aOptions['source'] .= " AND `ta`.`email_confirmed`='0'";
-                            break;
-                        case 'phone':
-                            $this->_aOptions['source'] .= " AND `ta`.`phone_confirmed`='0'";
-                            break;
-                        case 'email_and_phone':
-                            $this->_aOptions['source'] .= " AND (`ta`.`email_confirmed`='0' OR `ta`.`phone_confirmed`='0')";
-                            break;
-                    }
-                    break;
-
-                case 'locked':
-                    $this->_aOptions['source'] .= " AND `ta`.`locked` = 1";
-                    break;
-
-                default:
-        	    $this->_aOptions['source'] .= $this->_oModule->_oDb->prepareAsString(" AND `tp`.`status`=?", $this->_sFilter1Value);
-            }
-
-        if(!empty($this->_sFilter2Value))
-        	$this->_aOptions['source'] .= $this->_oModule->_oDb->prepareAsString(" AND `ta`.`role` & " . BX_DOL_ROLE_ADMIN ." = " . BX_DOL_ROLE_ADMIN);
-
-        return parent::_getDataSqlInner($sFilter, $sOrderField, $sOrderDir, $iStart, $iPerPage);
-    }
-    
-    protected function _getFilterControls()
-    {
-        parent::_getFilterControls();
-
-        return  $this->_getFilterSelectOne($this->_sFilter1Name, $this->_sFilter1Value, $this->_aFilter1Values) . $this->_getFilterSelectOne($this->_sFilter2Name, $this->_sFilter2Value, $this->_aFilter2Values) . $this->_getSearchInput();
-    }
-    
-    public function getCode($isDisplayHeader = true)
-    {
-        return $this->_oModule->_oTemplate->getJsCode('main', array(
-        	'aHtmlIds' => $this->_oModule->_oConfig->getHtmlIds()
-        )) . parent::getCode($isDisplayHeader);
-    }
-
-    public function performActionActivate()
-    {
-    	$this->_performActionEnable(true);
-    }
-
-	public function performActionSuspend()
-    {
-    	$this->_performActionEnable(false);
-    }
-
-    public function performActionEditEmail()
-    {
-        $CNF = &$this->_oModule->_oConfig->CNF;
-
-        $aIds = bx_get('ids');
-        if(!$aIds || !is_array($aIds)) {
-            $iId = (int)bx_get('id');
-            if(!$iId)
-                return echoJson(array());
-
-            $aIds = array($iId);
-        }
-
-        $iId = $aIds[0];
-        $oAccount = BxDolAccount::getInstance($iId);
-        if(!$oAccount)
-            return echoJson(array());
-
-        $aAccount = $oAccount->getInfo();
-        $sAction = 'edit_email';
-
-        $oForm = BxDolForm::getObjectInstance($CNF['OBJECT_FORM_ACCOUNT'], $CNF['OBJECT_FORM_ACCOUNT_DISPLAY_SETTINGS_EMAIL']);
-        $oForm->aFormAttrs['action'] = BX_DOL_URL_ROOT . 'grid.php?o=' . $this->_sObject . '&a=' . $sAction . '&id=' . $iId;
-        $oForm->initChecker($aAccount);
-
-        if($oForm->isSubmittedAndValid()) {
-            $sEmail = $oForm->getCleanValue('email');
-            if(strcmp($aAccount['email'], $sEmail) !== 0 && BxDolAccountQuery::getInstance()->getIdByEmail($sEmail))
-                return echoJson(array('msg' => _t('_sys_form_account_input_email_uniq_error_loggedin')));
-
-            if($oForm->update($aAccount['id'])) {
-                bx_alert('account', 'edited', $aAccount['id'], BxDolAccount::getInstance()->id(), array('display' => $CNF['OBJECT_FORM_ACCOUNT_DISPLAY_SETTINGS_EMAIL']));
-
-                $aRes = array('grid' => $this->getCode(false), 'blink' => $iId);
-                
-                $oAccount->doAudit($iId, '_sys_audit_action_account_email_changed', array('old_email' => $oAccount->getEmail(), 'new_email' => $sEmail));
-            }
-            else
-                $aRes = array('msg' => _t('_sys_txt_error_account_update'));
-
-            echoJson($aRes);
-        }
-        else {
-            $sContent = BxTemplStudioFunctions::getInstance()->popupBox('bx-account-edit-email-popup', _t('_bx_accounts_form_display_account_settings_email_popup'), $this->_oModule->_oTemplate->parseHtmlByName('edit_email.html', array(
-                'form_id' => $oForm->id,
-                'form' => $oForm->getCode(true),
-                'object' => $this->_sObject,
-                'action' => $sAction
-            )));
-
-            echoJson(array('popup' => array('html' => $sContent, 'options' => array('closeOnOuterClick' => false))));
-        }
-    }
-    
-    public function performActionAdd()
-    {
-      
-        $CNF = &$this->_oModule->_oConfig->CNF;
-        $sAction = 'add';
-        $oForm = BxDolForm::getObjectInstance($CNF['OBJECT_FORM_ACCOUNT'], $CNF['OBJECT_FORM_ACCOUNT_DISPLAY_CREATE']);
-        $oForm->aFormAttrs['action'] = BX_DOL_URL_ROOT . 'grid.php?o=' . $this->_sObject . '&a=' . $sAction;
-        $oForm->initChecker();
-
-        if($oForm->isSubmittedAndValid()) {
-           
-            $iAccountId = $oForm->insert();
-            
-            if (!$iAccountId) {
-                $aRes = array('msg' => _t('_sys_txt_error_account_insert'));
-            }
-            else{
-                $aRes = array('grid' => $this->getCode(false), 'blink' => $iAccountId);
-                
-                $oBxTemplAccountForms = new BxTemplAccountForms();
-                
-                $iProfileId = $oBxTemplAccountForms->onAccountCreated($iAccountId, $oForm->isSetPendingApproval(), BX_PROFILE_ACTION_MANUAL, false);
-
-                // perform action
-                BxDolAccount::isAllowedCreate ($iProfileId, true);
-                
-                // check
-                $aModulesProfile = array(); 
-                $aModules = BxDolModuleQuery::getInstance()->getModulesBy(array('type' => 'modules', 'active' => 1));
-                foreach($aModules as $aModule) {
-                    $oModule = BxDolModule::getInstance($aModule['name']);
-                    if($oModule instanceof iBxDolProfileService && BxDolService::call($aModule['name'], 'act_as_profile') === true)
-                        $aModulesProfile[] = $aModule;
-                }
-
-                $sDefaultProfileType = getParam('sys_account_default_profile_type');
-                if(count($aModulesProfile) == 1)
-                    $sProfileModule = $aModulesProfile[0]['name'];
-                else if(!empty($sDefaultProfileType)) 
-                    $sProfileModule = $sDefaultProfileType;
-
-                if (getParam('sys_account_auto_profile_creation') && !empty($sProfileModule)) {
-                    $oAccount = BxDolAccount::getInstance($iAccountId);
-                    $aProfileInfo = BxDolService::call($sProfileModule, 'prepare_fields', array(array(
-                        'author' => $iProfileId,
-                        'name' => $oAccount->getDisplayName(),
-                    )));
-                    $a = BxDolService::call($sProfileModule, 'entity_add', array($iProfileId, $aProfileInfo));
-                    if (isset($a['content']['profile_id']) && (int)$a['content']['profile_id'] > 0){
-                        BxDolAcl::getInstance()->setMembership((int)$a['content']['profile_id'], MEMBERSHIP_ID_STANDARD);
-                    }
-                    echoJson($aRes);
-                }
-            }
-        }
-        else {
-            $sContent = BxTemplStudioFunctions::getInstance()->popupBox('bx-account-edit-email-popup', _t('_bx_accounts_form_display_account_create_popup'), $this->_oModule->_oTemplate->parseHtmlByName('create.html', array(
-                'form_id' => $oForm->id,
-                'form' => $oForm->getCode(true),
-                'object' => $this->_sObject,
-                'action' => $sAction
-            )));
-
-            echoJson(array('popup' => array('html' => $sContent, 'options' => array('closeOnOuterClick' => false))));
-        }
-    }
-    
-    public function performActionConfirm()
-    {
-        $CNF = &$this->_oModule->_oConfig->CNF;
-
-    	$aIds = bx_get('ids');
-        if(!$aIds || !is_array($aIds)) {
-            echoJson(array());
-            return;
-        }
-
-        $oAccount = BxDolAccount::getInstance();
-
-        $iAffected = 0;
-        $aIdsAffected = array();
-        foreach($aIds as $iId){
-            if (BxDolAccount::isNeedConfirmEmail()){
-			    if($oAccount->updateEmailConfirmed(true, true, $iId)) {
-				    $aIdsAffected[] = $iId;
-        		    $iAffected++;  
-			    }
-            }
-            if (BxDolAccount::isNeedConfirmPhone()){
-			    if($oAccount->updatePhoneConfirmed(true, $iId)) {
-				    $aIdsAffected[] = $iId;
-        		    $iAffected++;  
-			    }
-            }
-        }
-		echoJson($iAffected ? array('grid' => $this->getCode(false), 'blink' => $aIdsAffected) : array('msg' => _t($CNF['T']['grid_action_err_perform'])));
-    }
-    
-    public function performActionResendCemail()
-    {
-    	$CNF = &$this->_oModule->_oConfig->CNF;
-
-    	$aIds = bx_get('ids');
-        if(!$aIds || !is_array($aIds)) {
-            echoJson(array());
-            return;
-        }
-
-        $oAccount = BxDolAccount::getInstance();
-
-        $iAffected = 0;
-        $aIdsAffected = array();
-        foreach($aIds as $iId)
-			if($oAccount->sendConfirmationEmail($iId)) {
-				$aIdsAffected[] = $iId;
-        		$iAffected++;  
-			}
-
-		echoJson($iAffected ? array('grid' => $this->getCode(false), 'blink' => $aIdsAffected) : array('msg' => _t($CNF['T']['grid_action_err_perform'])));
-    }
-
-    public function performActionResetPassword()
-    {
-    	$aIds = bx_get('ids');
-        if(!$aIds || !is_array($aIds)) {
-            echoJson(array());
-            return;
-        }
-
-        $iId = $aIds[0];
-        $oAccount = BxDolAccount::getInstance($iId);
-        if(!$oAccount)
-            return echoJson(array());
-
-        $aRes = array();
-        if (BxDolAccount::getInstance()->updatePassword(genRndPwd(), $iId)){
-            $sPopupId = $this->_oModule->_oConfig->getHtmlIds('password_popup');
-            $sPopupTitle = _t('_bx_accounts_form_display_account_settings_password_popup');
-            $sPopupContent = $this->_oModule->_oTemplate->parseHtmlByName('reset_password.html', array(
-                'js_object' => $this->_oModule->_oConfig->getJsObject('main'),
-                'html_id_text' => $this->_oModule->_oConfig->getHtmlIds('password_text'),
-                'html_id_button' => $this->_oModule->_oConfig->getHtmlIds('password_button'),
-                'password' => $sPwd,
-            ));
-
-            $aRes = array('popup' => BxTemplStudioFunctions::getInstance()->popupBox($sPopupId, $sPopupTitle, $sPopupContent));
-        }
-        else 
-            $aRes = array('msg' => _t('_bx_accnt_grid_action_err_perform'));
-
-        return echoJson($aRes);
-    }
-    
-    public function performActionUnlockAccount()
-    {
-    	$aIds = bx_get('ids');
-        if(!$aIds || !is_array($aIds)) {
-            echoJson(array());
-            return;
-        }
-		$oAccountQuery = BxDolAccountQuery::getInstance();
-		foreach($aIds as $iId){
-			$oAccount = BxDolAccount::getInstance($iId);
-			if(!$oAccount)
-				continue;
-			if ($oAccount->isLocked()){
-				$oAccountQuery->unlockAccount($iId);
-			}
-            
-            $oAccount->doAudit($iId, '_sys_audit_action_account_unlock');
-		}
-		$aRes = array('grid' => $this->getCode(false), 'blink' => $aIds);
-        return echoJson($aRes);
-    }
-
-	public function performActionMakeOperator()
-    {
-    	$this->_performActionChangeRole(3);
-    }
-
-	public function performActionUnmakeOperator()
-    {
-    	$this->_performActionChangeRole(1);
-    }
-
-	protected function _performActionChangeRole($iRole)
-    {
-    	$CNF = &$this->_oModule->_oConfig->CNF;
-
-    	$aIds = bx_get('ids');
-        if(!$aIds || !is_array($aIds)) {
-            echoJson(array());
-            return;
-        }
-
-        $iAffected = 0;
-        $aIdsAffected = array();
-        foreach($aIds as $iId)
-			if($this->_oModule->_oDb->updateAccount(array('role' => $iRole), array('id' => $iId))) {
-				$aIdsAffected[] = $iId;
-        		$iAffected++;
-                
-                $oAccount = BxDolAccount::getInstance($iId);
-                $oAccount->doAudit($iId, '_sys_audit_action_account_change_role_to_' . $iRole);
-			}
-
-		echoJson($iAffected ? array('grid' => $this->getCode(false), 'blink' => $aIdsAffected) : array('msg' => _t($CNF['T']['grid_action_err_perform'])));
-    }
-
-	protected function _performActionEnable($isChecked)
-    {
-    	$CNF = &$this->_oModule->_oConfig->CNF;
-
-    	$aIds = bx_get('ids');
-        if(!$aIds || !is_array($aIds)) {
-            echoJson(array());
-            return;
-        }
-        $iAffected = 0;
-        $aIdsAffected = array();
-        foreach($aIds as $iId)
-        	if($this->_enable($iId, $isChecked)) {
-        		$aIdsAffected[] = $iId;
-        		$iAffected++;
-                
-                $oAccount = BxDolAccount::getInstance($iId);
-                $oAccount->doAudit($iId, '_sys_audit_action_account_' . $isChecked ? 'activated' : 'suspended');
-        	}
-
-        echoJson($iAffected ? array('grid' => $this->getCode(false), 'blink' => $aIdsAffected) : array('msg' => _t($CNF['T']['grid_action_err_perform'])));
-    }
-
-    protected function _enable($mixedId, $isChecked)
-    {
-    	$oProfile = BxDolProfile::getInstanceAccountProfile($mixedId);
-    	if(!$oProfile)
-    	    return false;
-
-        $iAction = BX_PROFILE_ACTION_MANUAL;
-        $sMethod = $isChecked ? 'activate' : 'suspend';
-        if(!$oProfile->$sMethod($iAction, 0 ,false))
-            return false;
-
-        sendMailTemplate('t_ChangeStatusAccount' . ucfirst($sMethod), $oProfile->getAccountObject()->id(), $oProfile->id(), array(), BX_EMAIL_SYSTEM);
-        
-        $aProfiles = $oProfile->getAccountObject()->getProfiles();
-        foreach($aProfiles as $aProfile){
-            BxDolProfile::getInstance($aProfile['id'])->$sMethod($iAction, 0 ,false);
-        }
-        
-    	return true;
-    }
-
-    //--- Layout methods ---//
-    protected function _getActionEditEmail($sType, $sKey, $a, $isSmall = false, $isDisabled = false, $aRow = array())
-    {
-        return '';
-    }
-    
-    protected function _getCellEmailConfirmed($mixedValue, $sKey, $aField, $aRow)
-    {
-    	$mixedValue = (int)$mixedValue == 1 ? '_Yes' : '_No';
-        return parent::_getCellDefault(_t($mixedValue), $sKey, $aField, $aRow);
-    }
-
-    protected function _getActionResetPassword($sType, $sKey, $a, $isSmall = false, $isDisabled = false, $aRow = array())
-    {
-        return '';
-    }
-    
-    protected function _getActionUnlockAccount($sType, $sKey, $a, $isSmall = false, $isDisabled = false, $aRow = array())
-    {
-        return '';
-    }
-
-    protected function _getCellName($mixedValue, $sKey, $aField, $aRow)
-    {
-        $oAccount = BxDolAccount::getInstance($aRow['id']);
-        if ($oAccount)
-            $s = ($aRow['locked'] == 1 ? $this->_oTemplate->parseIcon("lock col-red1") . ' ' : '') . $oAccount->getDisplayName();
-        return parent::_getCellDefault ($s, $sKey, $aField, $aRow);
-    }
-    
-	protected function _getCellProfiles($mixedValue, $sKey, $aField, $aRow)
-    {
-        $s = $this->_oModule->_oTemplate->getProfilesByAccount($aRow);
-
-        return parent::_getCellDefault ($s, $sKey, $aField, $aRow);
-    }
-
-    protected function _getCellLogged($mixedValue, $sKey, $aField, $aRow)
-    {
-        $mixedValue = !empty($mixedValue) ? bx_time_js($mixedValue) : _t('_sys_not_available');
-
-        return parent::_getCellDefault($mixedValue, $sKey, $aField, $aRow);
-    } 
-    
-    protected function _getCellAdded($mixedValue, $sKey, $aField, $aRow)
-    {
-        $mixedValue = !empty($mixedValue) ? bx_time_js($mixedValue) : _t('_sys_not_available');
-
-        return parent::_getCellDefault($mixedValue, $sKey, $aField, $aRow);
-    } 
-    
-    protected function _getCellIsConfirmed($mixedValue, $sKey, $aField, $aRow)
-    {
-        $oAccount = BxDolAccount::getInstance($aRow['id']);
-        $s = "";
-        if ($oAccount)
-            $s = $oAccount->getCurrentConfirmationStatusValue();
-        return parent::_getCellDefault(_t('_bx_accnt_grid_confirmation_status_' . $s), $sKey, $aField, $aRow);
-    }
-
-    protected function _isCheckboxDisabled($aRow)
-    {
-        return false;
-    }
-
-	protected function _getContentInfo($iId)
-    {
-    	return BxDolAccountQuery::getInstance()->getInfoById($iId);
-    }
-
-	protected function _doDelete($iId, $aParams = array())
-    {
-    	return BxDolAccount::getInstance($iId)->delete(isset($aParams['with_content']) && $aParams['with_content'] === true);
-    }
-    
-    
-
-    protected function _addJsCss()
-    {
-        parent::_addJsCss();
-        
-        $this->_oTemplate->addJs(array(
-            'main.css'
-        ));
-
-        $this->_oTemplate->addJs(array(
-        	'jquery.form.min.js',
-            'clipboard.min.js',
-            'main.js'
-        ));
-    }
-
-    protected function _isVisibleGrid($a)
-    {
-        if(isAdmin())
-            return true;
-        
-        return parent::_isVisibleGrid($a);
-    }
-}
-
-/** @} */

+ 0 - 71
modules/boonex/accounts/updates/11.0.2_11.0.3/source/install/config.php

@@ -1,71 +0,0 @@
-<?php
-/**
- * Copyright (c) UNA, Inc - https://una.io
- * MIT License - https://opensource.org/licenses/MIT
- *
- * @defgroup    Accounts Accounts
- * @ingroup     UnaModules
- *
- * @{
- */
-
-$aConfig = array(
-    /**
-     * Main Section.
-     */
-    'type' => BX_DOL_MODULE_TYPE_MODULE,
-    'name' => 'bx_accounts',
-    'title' => 'Accounts Manager',
-    'note' => 'Accounts Manager module.',
-    'version' => '11.0.3',
-    'vendor' => 'BoonEx',
-    'help_url' => 'http://feed.una.io/?section={module_name}',
-
-    'compatible_with' => array(
-        '11.0.3'
-    ),
-
-    /**
-     * 'home_dir' and 'home_uri' - should be unique. Don't use spaces in 'home_uri' and the other special chars.
-     */
-    'home_dir' => 'boonex/accounts/',
-    'home_uri' => 'accounts',
-
-    'db_prefix' => 'bx_accnt_',
-    'class_prefix' => 'BxAccnt',
-
-    /**
-     * Category for language keys.
-     */
-    'language_category' => 'Accounts',
-
-    /**
-     * Installation/Uninstallation Section.
-     */
-    'install' => array(
-        'execute_sql' => 1,
-        'update_languages' => 1,
-        'clear_db_cache' => 1,
-    ),
-    'uninstall' => array (
-        'execute_sql' => 1,
-        'update_languages' => 1,
-        'clear_db_cache' => 1,
-    ),
-    'enable' => array(
-        'execute_sql' => 1,
-        'clear_db_cache' => 1,
-    ),
-    'disable' => array (
-        'execute_sql' => 1,
-        'clear_db_cache' => 1,
-    ),
-
-    /**
-     * Dependencies Section
-     */
-    'dependencies' => array(),
-
-);
-
-/** @} */

+ 0 - 51
modules/boonex/accounts/updates/11.0.3_11.0.4/install/config.php

@@ -1,51 +0,0 @@
-<?php
-/**
- * Copyright (c) UNA, Inc - https://una.io
- * MIT License - https://opensource.org/licenses/MIT
- */
-
-$aConfig = array(
-    /**
-     * Main Section.
-     */
-    'title' => 'Accounts Manager',
-    'version_from' => '11.0.3',
-    'version_to' => '11.0.4',
-    'vendor' => 'BoonEx',
-
-    'compatible_with' => array(
-        '11.0.4'
-    ),
-
-    /**
-     * 'home_dir' and 'home_uri' - should be unique. Don't use spaces in 'home_uri' and the other special chars.
-     */
-    'home_dir' => 'boonex/accounts/updates/update_11.0.3_11.0.4/',
-    'home_uri' => 'accounts_update_1103_1104',
-
-    'module_dir' => 'boonex/accounts/',
-    'module_uri' => 'accounts',
-
-    'db_prefix' => 'bx_accnt_',
-    'class_prefix' => 'BxAccnt',
-
-    /**
-     * Installation/Uninstallation Section.
-     */
-    'install' => array(
-        'execute_sql' => 0,
-        'update_files' => 1,
-        'update_languages' => 0,
-        'clear_db_cache' => 0,
-    ),
-
-    /**
-     * Category for language keys.
-     */
-    'language_category' => 'Accounts',
-
-    /**
-     * Files Section
-     */
-    'delete_files' => array(),
-);

+ 0 - 13
modules/boonex/accounts/updates/11.0.3_11.0.4/install/installer.php

@@ -1,13 +0,0 @@
-<?php
-/**
- * Copyright (c) UNA, Inc - https://una.io
- * MIT License - https://opensource.org/licenses/MIT
- */
-
-class BxAccntUpdater extends BxDolStudioUpdater
-{
-    function __construct($aConfig)
-    {
-        parent::__construct($aConfig);
-    }
-}

+ 0 - 510
modules/boonex/accounts/updates/11.0.3_11.0.4/source/classes/BxAccntGridAdministration.php

@@ -1,510 +0,0 @@
-<?php defined('BX_DOL') or die('hack attempt');
-/**
- * Copyright (c) UNA, Inc - https://una.io
- * MIT License - https://opensource.org/licenses/MIT
- *
- * @defgroup    Accounts Accounts
- * @ingroup     UnaModules
- * 
- * @{
- */
-
-class BxAccntGridAdministration extends BxBaseModProfileGridAdministration
-{
-    protected $_sFilter2Name;
-	protected $_sFilter2Value;
-	protected $_aFilter2Values;
-    
-    public function __construct ($aOptions, $oTemplate = false)
-    {
-    	$this->MODULE = 'bx_accounts';
-        parent::__construct ($aOptions, $oTemplate);
-
-        $CNF = &$this->_oModule->_oConfig->CNF;
-        $this->_aFilter1Values = array_merge($this->_aFilter1Values, array(
-            'unconfirmed' => $CNF['T']['filter_item_unconfirmed'],
-            'locked' => $CNF['T']['filter_item_locked'],
-        ));
-
-        $this->_sFilter2Name = 'filter2';
-        $this->_aFilter2Values = array(
-            'operators' => $CNF['T']['filter_item_operators']
-        );
-
-        $sFilter2 = bx_get($this->_sFilter2Name);
-        if(!empty($sFilter2)) {
-            $this->_sFilter2Value = bx_process_input($sFilter2);
-            $this->_aQueryAppend[$this->_sFilter2Name] = $this->_sFilter2Value;
-        }
-    }
-
-    protected function _getDataSql($sFilter, $sOrderField, $sOrderDir, $iStart, $iPerPage)
-    {
-        if(strpos($sFilter, $this->_sParamsDivider) !== false)
-            list($this->_sFilter1Value, $this->_sFilter2Value, $sFilter) = explode($this->_sParamsDivider, $sFilter);
-
-    	if(!empty($this->_sFilter1Value))
-            switch($this->_sFilter1Value) {
-                case 'unconfirmed':
-                    $sCnfnType = getParam('sys_account_confirmation_type');
-                    switch($sCnfnType) {
-                        case 'email':
-                            $this->_aOptions['source'] .= " AND `ta`.`email_confirmed`='0'";
-                            break;
-                        case 'phone':
-                            $this->_aOptions['source'] .= " AND `ta`.`phone_confirmed`='0'";
-                            break;
-                        case 'email_and_phone':
-                            $this->_aOptions['source'] .= " AND (`ta`.`email_confirmed`='0' OR `ta`.`phone_confirmed`='0')";
-                            break;
-                    }
-                    break;
-
-                case 'locked':
-                    $this->_aOptions['source'] .= " AND `ta`.`locked` = 1";
-                    break;
-
-                default:
-        	    $this->_aOptions['source'] .= $this->_oModule->_oDb->prepareAsString(" AND `tp`.`status`=?", $this->_sFilter1Value);
-            }
-
-        if(!empty($this->_sFilter2Value))
-        	$this->_aOptions['source'] .= $this->_oModule->_oDb->prepareAsString(" AND `ta`.`role` & " . BX_DOL_ROLE_ADMIN ." = " . BX_DOL_ROLE_ADMIN);
-
-        return parent::_getDataSqlInner($sFilter, $sOrderField, $sOrderDir, $iStart, $iPerPage);
-    }
-    
-    protected function _getFilterControls()
-    {
-        parent::_getFilterControls();
-
-        return  $this->_getFilterSelectOne($this->_sFilter1Name, $this->_sFilter1Value, $this->_aFilter1Values) . $this->_getFilterSelectOne($this->_sFilter2Name, $this->_sFilter2Value, $this->_aFilter2Values) . $this->_getSearchInput();
-    }
-    
-    public function getCode($isDisplayHeader = true)
-    {
-        return $this->_oModule->_oTemplate->getJsCode('main', array(
-        	'aHtmlIds' => $this->_oModule->_oConfig->getHtmlIds()
-        )) . parent::getCode($isDisplayHeader);
-    }
-
-    public function performActionActivate()
-    {
-    	$this->_performActionEnable(true);
-    }
-
-	public function performActionSuspend()
-    {
-    	$this->_performActionEnable(false);
-    }
-
-    public function performActionEditEmail()
-    {
-        $CNF = &$this->_oModule->_oConfig->CNF;
-
-        $aIds = bx_get('ids');
-        if(!$aIds || !is_array($aIds)) {
-            $iId = (int)bx_get('id');
-            if(!$iId)
-                return echoJson(array());
-
-            $aIds = array($iId);
-        }
-
-        $iId = $aIds[0];
-        $oAccount = BxDolAccount::getInstance($iId);
-        if(!$oAccount)
-            return echoJson(array());
-
-        $aAccount = $oAccount->getInfo();
-        $sAction = 'edit_email';
-
-        $oForm = BxDolForm::getObjectInstance($CNF['OBJECT_FORM_ACCOUNT'], $CNF['OBJECT_FORM_ACCOUNT_DISPLAY_SETTINGS_EMAIL']);
-        $oForm->aFormAttrs['action'] = BX_DOL_URL_ROOT . 'grid.php?o=' . $this->_sObject . '&a=' . $sAction . '&id=' . $iId;
-        $oForm->initChecker($aAccount);
-
-        if($oForm->isSubmittedAndValid()) {
-            $sEmail = $oForm->getCleanValue('email');
-            if(strcmp($aAccount['email'], $sEmail) !== 0 && BxDolAccountQuery::getInstance()->getIdByEmail($sEmail))
-                return echoJson(array('msg' => _t('_sys_form_account_input_email_uniq_error_loggedin')));
-
-            if($oForm->update($aAccount['id'])) {
-                bx_alert('account', 'edited', $aAccount['id'], BxDolAccount::getInstance()->id(), array('display' => $CNF['OBJECT_FORM_ACCOUNT_DISPLAY_SETTINGS_EMAIL']));
-
-                $aRes = array('grid' => $this->getCode(false), 'blink' => $iId);
-                
-                $oAccount->doAudit($iId, '_sys_audit_action_account_email_changed', array('old_email' => $oAccount->getEmail(), 'new_email' => $sEmail));
-            }
-            else
-                $aRes = array('msg' => _t('_sys_txt_error_account_update'));
-
-            echoJson($aRes);
-        }
-        else {
-            $sContent = BxTemplStudioFunctions::getInstance()->popupBox('bx-account-edit-email-popup', _t('_bx_accounts_form_display_account_settings_email_popup'), $this->_oModule->_oTemplate->parseHtmlByName('edit_email.html', array(
-                'form_id' => $oForm->id,
-                'form' => $oForm->getCode(true),
-                'object' => $this->_sObject,
-                'action' => $sAction
-            )));
-
-            echoJson(array('popup' => array('html' => $sContent, 'options' => array('closeOnOuterClick' => false))));
-        }
-    }
-    
-    public function performActionAdd()
-    {
-      
-        $CNF = &$this->_oModule->_oConfig->CNF;
-        $sAction = 'add';
-        $oForm = BxDolForm::getObjectInstance($CNF['OBJECT_FORM_ACCOUNT'], $CNF['OBJECT_FORM_ACCOUNT_DISPLAY_CREATE']);
-        $oForm->aFormAttrs['action'] = BX_DOL_URL_ROOT . 'grid.php?o=' . $this->_sObject . '&a=' . $sAction;
-        $oForm->initChecker();
-
-        if($oForm->isSubmittedAndValid()) {
-           
-            $iAccountId = $oForm->insert();
-            
-            if (!$iAccountId) {
-                $aRes = array('msg' => _t('_sys_txt_error_account_insert'));
-            }
-            else{
-                $aRes = array('grid' => $this->getCode(false), 'blink' => $iAccountId);
-                
-                $oBxTemplAccountForms = new BxTemplAccountForms();
-                
-                $iProfileId = $oBxTemplAccountForms->onAccountCreated($iAccountId, $oForm->isSetPendingApproval(), BX_PROFILE_ACTION_MANUAL, false);
-
-                // perform action
-                BxDolAccount::isAllowedCreate ($iProfileId, true);
-                
-                // check
-                $aModulesProfile = array(); 
-                $aModules = BxDolModuleQuery::getInstance()->getModulesBy(array('type' => 'modules', 'active' => 1));
-                foreach($aModules as $aModule) {
-                    $oModule = BxDolModule::getInstance($aModule['name']);
-                    if($oModule instanceof iBxDolProfileService && BxDolService::call($aModule['name'], 'act_as_profile') === true)
-                        $aModulesProfile[] = $aModule;
-                }
-
-                $sDefaultProfileType = getParam('sys_account_default_profile_type');
-                if(count($aModulesProfile) == 1)
-                    $sProfileModule = $aModulesProfile[0]['name'];
-                else if(!empty($sDefaultProfileType)) 
-                    $sProfileModule = $sDefaultProfileType;
-
-                if (getParam('sys_account_auto_profile_creation') && !empty($sProfileModule)) {
-                    $oAccount = BxDolAccount::getInstance($iAccountId);
-                    $aProfileInfo = BxDolService::call($sProfileModule, 'prepare_fields', array(array(
-                        'author' => $iProfileId,
-                        'name' => $oAccount->getDisplayName(),
-                    )));
-                    $a = BxDolService::call($sProfileModule, 'entity_add', array($iProfileId, $aProfileInfo));
-                    if (isset($a['content']['profile_id']) && (int)$a['content']['profile_id'] > 0){
-                        BxDolAcl::getInstance()->setMembership((int)$a['content']['profile_id'], MEMBERSHIP_ID_STANDARD);
-                    }
-                    echoJson($aRes);
-                }
-            }
-        }
-        else {
-            $sContent = BxTemplStudioFunctions::getInstance()->popupBox('bx-account-edit-email-popup', _t('_bx_accounts_form_display_account_create_popup'), $this->_oModule->_oTemplate->parseHtmlByName('create.html', array(
-                'form_id' => $oForm->id,
-                'form' => $oForm->getCode(true),
-                'object' => $this->_sObject,
-                'action' => $sAction
-            )));
-
-            echoJson(array('popup' => array('html' => $sContent, 'options' => array('closeOnOuterClick' => false))));
-        }
-    }
-    
-    public function performActionConfirm()
-    {
-        $CNF = &$this->_oModule->_oConfig->CNF;
-
-    	$aIds = bx_get('ids');
-        if(!$aIds || !is_array($aIds)) {
-            echoJson(array());
-            return;
-        }
-
-        $oAccount = BxDolAccount::getInstance();
-
-        $iAffected = 0;
-        $aIdsAffected = array();
-        foreach($aIds as $iId){
-            if (BxDolAccount::isNeedConfirmEmail()){
-			    if($oAccount->updateEmailConfirmed(true, true, $iId)) {
-				    $aIdsAffected[] = $iId;
-        		    $iAffected++;  
-			    }
-            }
-            if (BxDolAccount::isNeedConfirmPhone()){
-			    if($oAccount->updatePhoneConfirmed(true, $iId)) {
-				    $aIdsAffected[] = $iId;
-        		    $iAffected++;  
-			    }
-            }
-        }
-		echoJson($iAffected ? array('grid' => $this->getCode(false), 'blink' => $aIdsAffected) : array('msg' => _t($CNF['T']['grid_action_err_perform'])));
-    }
-    
-    public function performActionResendCemail()
-    {
-    	$CNF = &$this->_oModule->_oConfig->CNF;
-
-    	$aIds = bx_get('ids');
-        if(!$aIds || !is_array($aIds)) {
-            echoJson(array());
-            return;
-        }
-
-        $oAccount = BxDolAccount::getInstance();
-
-        $iAffected = 0;
-        $aIdsAffected = array();
-        foreach($aIds as $iId)
-			if($oAccount->sendConfirmationEmail($iId)) {
-				$aIdsAffected[] = $iId;
-        		$iAffected++;  
-			}
-
-		echoJson($iAffected ? array('grid' => $this->getCode(false), 'blink' => $aIdsAffected) : array('msg' => _t($CNF['T']['grid_action_err_perform'])));
-    }
-
-    public function performActionResetPassword()
-    {
-    	$aIds = bx_get('ids');
-        if(!$aIds || !is_array($aIds)) {
-            echoJson(array());
-            return;
-        }
-
-        $iId = $aIds[0];
-        $oAccount = BxDolAccount::getInstance($iId);
-        if(!$oAccount)
-            return echoJson(array());
-
-        $aRes = array();
-        $sPwd = genRndPwd();
-        if (BxDolAccount::getInstance()->updatePassword($sPwd, $iId)){
-            $sPopupId = $this->_oModule->_oConfig->getHtmlIds('password_popup');
-            $sPopupTitle = _t('_bx_accounts_form_display_account_settings_password_popup');
-            $sPopupContent = $this->_oModule->_oTemplate->parseHtmlByName('reset_password.html', array(
-                'js_object' => $this->_oModule->_oConfig->getJsObject('main'),
-                'html_id_text' => $this->_oModule->_oConfig->getHtmlIds('password_text'),
-                'html_id_button' => $this->_oModule->_oConfig->getHtmlIds('password_button'),
-                'password' => $sPwd,
-            ));
-
-            $aRes = array('popup' => BxTemplStudioFunctions::getInstance()->popupBox($sPopupId, $sPopupTitle, $sPopupContent));
-        }
-        else 
-            $aRes = array('msg' => _t('_bx_accnt_grid_action_err_perform'));
-
-        return echoJson($aRes);
-    }
-    
-    public function performActionUnlockAccount()
-    {
-    	$aIds = bx_get('ids');
-        if(!$aIds || !is_array($aIds)) {
-            echoJson(array());
-            return;
-        }
-		$oAccountQuery = BxDolAccountQuery::getInstance();
-		foreach($aIds as $iId){
-			$oAccount = BxDolAccount::getInstance($iId);
-			if(!$oAccount)
-				continue;
-			if ($oAccount->isLocked()){
-				$oAccountQuery->unlockAccount($iId);
-			}
-            
-            $oAccount->doAudit($iId, '_sys_audit_action_account_unlock');
-		}
-		$aRes = array('grid' => $this->getCode(false), 'blink' => $aIds);
-        return echoJson($aRes);
-    }
-
-	public function performActionMakeOperator()
-    {
-    	$this->_performActionChangeRole(3);
-    }
-
-	public function performActionUnmakeOperator()
-    {
-    	$this->_performActionChangeRole(1);
-    }
-
-	protected function _performActionChangeRole($iRole)
-    {
-    	$CNF = &$this->_oModule->_oConfig->CNF;
-
-    	$aIds = bx_get('ids');
-        if(!$aIds || !is_array($aIds)) {
-            echoJson(array());
-            return;
-        }
-
-        $iAffected = 0;
-        $aIdsAffected = array();
-        foreach($aIds as $iId)
-			if($this->_oModule->_oDb->updateAccount(array('role' => $iRole), array('id' => $iId))) {
-				$aIdsAffected[] = $iId;
-        		$iAffected++;
-                
-                $oAccount = BxDolAccount::getInstance($iId);
-                $oAccount->doAudit($iId, '_sys_audit_action_account_change_role_to_' . $iRole);
-			}
-
-		echoJson($iAffected ? array('grid' => $this->getCode(false), 'blink' => $aIdsAffected) : array('msg' => _t($CNF['T']['grid_action_err_perform'])));
-    }
-
-	protected function _performActionEnable($isChecked)
-    {
-    	$CNF = &$this->_oModule->_oConfig->CNF;
-
-    	$aIds = bx_get('ids');
-        if(!$aIds || !is_array($aIds)) {
-            echoJson(array());
-            return;
-        }
-        $iAffected = 0;
-        $aIdsAffected = array();
-        foreach($aIds as $iId)
-        	if($this->_enable($iId, $isChecked)) {
-        		$aIdsAffected[] = $iId;
-        		$iAffected++;
-                
-                $oAccount = BxDolAccount::getInstance($iId);
-                $oAccount->doAudit($iId, '_sys_audit_action_account_' . $isChecked ? 'activated' : 'suspended');
-        	}
-
-        echoJson($iAffected ? array('grid' => $this->getCode(false), 'blink' => $aIdsAffected) : array('msg' => _t($CNF['T']['grid_action_err_perform'])));
-    }
-
-    protected function _enable($mixedId, $isChecked)
-    {
-    	$oProfile = BxDolProfile::getInstanceAccountProfile($mixedId);
-    	if(!$oProfile)
-    	    return false;
-
-        $iAction = BX_PROFILE_ACTION_MANUAL;
-        $sMethod = $isChecked ? 'activate' : 'suspend';
-        if(!$oProfile->$sMethod($iAction, 0 ,false))
-            return false;
-
-        sendMailTemplate('t_ChangeStatusAccount' . ucfirst($sMethod), $oProfile->getAccountObject()->id(), $oProfile->id(), array(), BX_EMAIL_SYSTEM);
-        
-        $aProfiles = $oProfile->getAccountObject()->getProfiles();
-        foreach($aProfiles as $aProfile){
-            BxDolProfile::getInstance($aProfile['id'])->$sMethod($iAction, 0 ,false);
-        }
-        
-    	return true;
-    }
-
-    //--- Layout methods ---//
-    protected function _getActionEditEmail($sType, $sKey, $a, $isSmall = false, $isDisabled = false, $aRow = array())
-    {
-        return '';
-    }
-    
-    protected function _getCellEmailConfirmed($mixedValue, $sKey, $aField, $aRow)
-    {
-    	$mixedValue = (int)$mixedValue == 1 ? '_Yes' : '_No';
-        return parent::_getCellDefault(_t($mixedValue), $sKey, $aField, $aRow);
-    }
-
-    protected function _getActionResetPassword($sType, $sKey, $a, $isSmall = false, $isDisabled = false, $aRow = array())
-    {
-        return '';
-    }
-    
-    protected function _getActionUnlockAccount($sType, $sKey, $a, $isSmall = false, $isDisabled = false, $aRow = array())
-    {
-        return '';
-    }
-
-    protected function _getCellName($mixedValue, $sKey, $aField, $aRow)
-    {
-        $oAccount = BxDolAccount::getInstance($aRow['id']);
-        if ($oAccount)
-            $s = ($aRow['locked'] == 1 ? $this->_oTemplate->parseIcon("lock col-red1") . ' ' : '') . $oAccount->getDisplayName();
-        return parent::_getCellDefault ($s, $sKey, $aField, $aRow);
-    }
-    
-	protected function _getCellProfiles($mixedValue, $sKey, $aField, $aRow)
-    {
-        $s = $this->_oModule->_oTemplate->getProfilesByAccount($aRow);
-
-        return parent::_getCellDefault ($s, $sKey, $aField, $aRow);
-    }
-
-    protected function _getCellLogged($mixedValue, $sKey, $aField, $aRow)
-    {
-        $mixedValue = !empty($mixedValue) ? bx_time_js($mixedValue) : _t('_sys_not_available');
-
-        return parent::_getCellDefault($mixedValue, $sKey, $aField, $aRow);
-    } 
-    
-    protected function _getCellAdded($mixedValue, $sKey, $aField, $aRow)
-    {
-        $mixedValue = !empty($mixedValue) ? bx_time_js($mixedValue) : _t('_sys_not_available');
-
-        return parent::_getCellDefault($mixedValue, $sKey, $aField, $aRow);
-    } 
-    
-    protected function _getCellIsConfirmed($mixedValue, $sKey, $aField, $aRow)
-    {
-        $oAccount = BxDolAccount::getInstance($aRow['id']);
-        $s = "";
-        if ($oAccount)
-            $s = $oAccount->getCurrentConfirmationStatusValue();
-        return parent::_getCellDefault(_t('_bx_accnt_grid_confirmation_status_' . $s), $sKey, $aField, $aRow);
-    }
-
-    protected function _isCheckboxDisabled($aRow)
-    {
-        return false;
-    }
-
-	protected function _getContentInfo($iId)
-    {
-    	return BxDolAccountQuery::getInstance()->getInfoById($iId);
-    }
-
-	protected function _doDelete($iId, $aParams = array())
-    {
-    	return BxDolAccount::getInstance($iId)->delete(isset($aParams['with_content']) && $aParams['with_content'] === true);
-    }
-    
-    
-
-    protected function _addJsCss()
-    {
-        parent::_addJsCss();
-        
-        $this->_oTemplate->addJs(array(
-            'main.css'
-        ));
-
-        $this->_oTemplate->addJs(array(
-        	'jquery.form.min.js',
-            'clipboard.min.js',
-            'main.js'
-        ));
-    }
-
-    protected function _isVisibleGrid($a)
-    {
-        if(isAdmin())
-            return true;
-        
-        return parent::_isVisibleGrid($a);
-    }
-}
-
-/** @} */

+ 0 - 71
modules/boonex/accounts/updates/11.0.3_11.0.4/source/install/config.php

@@ -1,71 +0,0 @@
-<?php
-/**
- * Copyright (c) UNA, Inc - https://una.io
- * MIT License - https://opensource.org/licenses/MIT
- *
- * @defgroup    Accounts Accounts
- * @ingroup     UnaModules
- *
- * @{
- */
-
-$aConfig = array(
-    /**
-     * Main Section.
-     */
-    'type' => BX_DOL_MODULE_TYPE_MODULE,
-    'name' => 'bx_accounts',
-    'title' => 'Accounts Manager',
-    'note' => 'Accounts Manager module.',
-    'version' => '11.0.4',
-    'vendor' => 'BoonEx',
-    'help_url' => 'http://feed.una.io/?section={module_name}',
-
-    'compatible_with' => array(
-        '11.0.4'
-    ),
-
-    /**
-     * 'home_dir' and 'home_uri' - should be unique. Don't use spaces in 'home_uri' and the other special chars.
-     */
-    'home_dir' => 'boonex/accounts/',
-    'home_uri' => 'accounts',
-
-    'db_prefix' => 'bx_accnt_',
-    'class_prefix' => 'BxAccnt',
-
-    /**
-     * Category for language keys.
-     */
-    'language_category' => 'Accounts',
-
-    /**
-     * Installation/Uninstallation Section.
-     */
-    'install' => array(
-        'execute_sql' => 1,
-        'update_languages' => 1,
-        'clear_db_cache' => 1,
-    ),
-    'uninstall' => array (
-        'execute_sql' => 1,
-        'update_languages' => 1,
-        'clear_db_cache' => 1,
-    ),
-    'enable' => array(
-        'execute_sql' => 1,
-        'clear_db_cache' => 1,
-    ),
-    'disable' => array (
-        'execute_sql' => 1,
-        'clear_db_cache' => 1,
-    ),
-
-    /**
-     * Dependencies Section
-     */
-    'dependencies' => array(),
-
-);
-
-/** @} */

+ 0 - 51
modules/boonex/accounts/updates/11.0.4_12.0.0/install/config.php

@@ -1,51 +0,0 @@
-<?php
-/**
- * Copyright (c) UNA, Inc - https://una.io
- * MIT License - https://opensource.org/licenses/MIT
- */
-
-$aConfig = array(
-    /**
-     * Main Section.
-     */
-    'title' => 'Accounts Manager',
-    'version_from' => '11.0.4',
-    'version_to' => '12.0.0',
-    'vendor' => 'BoonEx',
-
-    'compatible_with' => array(
-        '12.0.0-B1'
-    ),
-
-    /**
-     * 'home_dir' and 'home_uri' - should be unique. Don't use spaces in 'home_uri' and the other special chars.
-     */
-    'home_dir' => 'boonex/accounts/updates/update_11.0.4_12.0.0/',
-    'home_uri' => 'accounts_update_1104_1200',
-
-    'module_dir' => 'boonex/accounts/',
-    'module_uri' => 'accounts',
-
-    'db_prefix' => 'bx_accnt_',
-    'class_prefix' => 'BxAccnt',
-
-    /**
-     * Installation/Uninstallation Section.
-     */
-    'install' => array(
-        'execute_sql' => 1,
-        'update_files' => 1,
-        'update_languages' => 1,
-        'clear_db_cache' => 1,
-    ),
-
-    /**
-     * Category for language keys.
-     */
-    'language_category' => 'Accounts',
-
-    /**
-     * Files Section
-     */
-    'delete_files' => array(),
-);

+ 0 - 13
modules/boonex/accounts/updates/11.0.4_12.0.0/install/installer.php

@@ -1,13 +0,0 @@
-<?php
-/**
- * Copyright (c) UNA, Inc - https://una.io
- * MIT License - https://opensource.org/licenses/MIT
- */
-
-class BxAccntUpdater extends BxDolStudioUpdater
-{
-    function __construct($aConfig)
-    {
-        parent::__construct($aConfig);
-    }
-}

+ 0 - 8
modules/boonex/accounts/updates/11.0.4_12.0.0/install/langs/en.xml

@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<resources name="en" flag="gb" title="English">
-	<string_add name="_bx_accnt_menu_item_title_system_resend_remail"><![CDATA[Resend Reset Password]]></string_add>
-    <string_add name="_bx_accnt_menu_item_title_resend_remail"><![CDATA[Resend Reset Password]]></string_add>
-	<string_add name="_bx_accnt_menu_item_title_system_set_operator_role"><![CDATA[Set Operator Role]]></string_add>
-    <string_add name="_bx_accnt_menu_item_title_set_operator_role"><![CDATA[Set Operator Role]]></string_add>
-	<string_add name="_bx_accnt_grid_action_title_adm_resend_remail"><![CDATA[Resend Reset Password]]></string_add>
-</resources>

+ 0 - 19
modules/boonex/accounts/updates/11.0.4_12.0.0/install/sql/enable.sql

@@ -1,19 +0,0 @@
-SET @sName = 'bx_accounts';
-
-
--- MENUS
-DELETE FROM `sys_menu_items` WHERE `set_name`='bx_accounts_menu_manage_tools' AND `name` IN ('resend-remail', 'set-operator-role');
-INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `addon`, `markers`, `submenu_object`, `visible_for_levels`, `visibility_custom`, `active`, `copyable`, `order`) VALUES 
-('bx_accounts_menu_manage_tools', @sName, 'resend-remail', '_bx_accnt_menu_item_title_system_resend_remail', '_bx_accnt_menu_item_title_resend_remail', 'javascript:void(0)', 'javascript:{js_object}.onClickResendRemail({content_id}, this);', '_self', 'eraser', '', '', '', 192, '', 1, 0, 5),
-('bx_accounts_menu_manage_tools', @sName, 'set-operator-role', '_bx_accnt_menu_item_title_system_set_operator_role', '_bx_accnt_menu_item_title_set_operator_role', 'javascript:void(0)', 'javascript:{js_object}.onClickSetOperatorRole({content_id}, this);', '_self', 'wrench', '', '', '', 192, '', 1, 0, 11);
-
-UPDATE `sys_menu_items` SET `active`='0' WHERE `set_name`='bx_accounts_menu_manage_tools' AND `name` IN ('make-operator', 'unmake-operator');
-
-
--- GRIDS
-UPDATE `sys_objects_grid` SET `show_total_count`='1' WHERE `object`='bx_accounts_administration';
-
-DELETE FROM `sys_grid_actions` WHERE `object`='bx_accounts_administration' AND `type` IN ('bulk', 'single') AND `name`='resend_remail';
-INSERT INTO `sys_grid_actions` (`object`, `type`, `name`, `title`, `icon`, `icon_only`, `confirm`, `order`) VALUES
-('bx_accounts_administration', 'bulk', 'resend_remail', '_bx_accnt_grid_action_title_adm_resend_remail', '', 0, 0, 4),
-('bx_accounts_administration', 'single', 'resend_remail', '_bx_accnt_grid_action_title_adm_resend_remail', '', 0, 0, 0);

+ 0 - 6
modules/boonex/accounts/updates/11.0.4_12.0.0/install/sql/install.sql

@@ -1,6 +0,0 @@
-SET @sName = 'bx_accounts';
-
-
--- STUDIO PAGE & WIDGET
-SET @iPageId = (SELECT `id` FROM `sys_std_pages` WHERE `name`=@sName LIMIT 1);
-UPDATE `sys_std_widgets` SET `type`='users' WHERE `page_id`=@iPageId;

+ 0 - 582
modules/boonex/accounts/updates/11.0.4_12.0.0/source/classes/BxAccntGridAdministration.php

@@ -1,582 +0,0 @@
-<?php defined('BX_DOL') or die('hack attempt');
-/**
- * Copyright (c) UNA, Inc - https://una.io
- * MIT License - https://opensource.org/licenses/MIT
- *
- * @defgroup    Accounts Accounts
- * @ingroup     UnaModules
- * 
- * @{
- */
-
-class BxAccntGridAdministration extends BxBaseModProfileGridAdministration
-{
-    protected $_sFilter2Name;
-	protected $_sFilter2Value;
-	protected $_aFilter2Values;
-    
-    public function __construct ($aOptions, $oTemplate = false)
-    {
-    	$this->MODULE = 'bx_accounts';
-        parent::__construct ($aOptions, $oTemplate);
-
-        $CNF = &$this->_oModule->_oConfig->CNF;
-        $this->_aFilter1Values = array_merge($this->_aFilter1Values, array(
-            'unconfirmed' => $CNF['T']['filter_item_unconfirmed'],
-            'locked' => $CNF['T']['filter_item_locked'],
-        ));
-
-        $this->_sFilter2Name = 'filter2';
-        $this->_aFilter2Values = array(
-            'operators' => $CNF['T']['filter_item_operators']
-        );
-
-        $sFilter2 = bx_get($this->_sFilter2Name);
-        if(!empty($sFilter2)) {
-            $this->_sFilter2Value = bx_process_input($sFilter2);
-            $this->_aQueryAppend[$this->_sFilter2Name] = $this->_sFilter2Value;
-        }
-    }
-
-    protected function _getDataSql($sFilter, $sOrderField, $sOrderDir, $iStart, $iPerPage)
-    {
-        if(strpos($sFilter, $this->_sParamsDivider) !== false)
-            list($this->_sFilter1Value, $this->_sFilter2Value, $sFilter) = explode($this->_sParamsDivider, $sFilter);
-
-    	if(!empty($this->_sFilter1Value))
-            switch($this->_sFilter1Value) {
-                case 'unconfirmed':
-                    $sCnfnType = getParam('sys_account_confirmation_type');
-                    switch($sCnfnType) {
-                        case 'email':
-                            $this->_aOptions['source'] .= " AND `ta`.`email_confirmed`='0'";
-                            break;
-                        case 'phone':
-                            $this->_aOptions['source'] .= " AND `ta`.`phone_confirmed`='0'";
-                            break;
-                        case 'email_and_phone':
-                            $this->_aOptions['source'] .= " AND (`ta`.`email_confirmed`='0' OR `ta`.`phone_confirmed`='0')";
-                            break;
-                    }
-                    break;
-
-                case 'locked':
-                    $this->_aOptions['source'] .= " AND `ta`.`locked` = 1";
-                    break;
-
-                default:
-        	    $this->_aOptions['source'] .= $this->_oModule->_oDb->prepareAsString(" AND `tp`.`status`=?", $this->_sFilter1Value);
-            }
-
-        if(!empty($this->_sFilter2Value))
-        	$this->_aOptions['source'] .= $this->_oModule->_oDb->prepareAsString(" AND `ta`.`role` & " . BX_DOL_ROLE_ADMIN ." = " . BX_DOL_ROLE_ADMIN);
-
-        return parent::_getDataSqlInner($sFilter, $sOrderField, $sOrderDir, $iStart, $iPerPage);
-    }
-    
-    protected function _getFilterControls()
-    {
-        parent::_getFilterControls();
-
-        return  $this->_getFilterSelectOne($this->_sFilter1Name, $this->_sFilter1Value, $this->_aFilter1Values) . $this->_getFilterSelectOne($this->_sFilter2Name, $this->_sFilter2Value, $this->_aFilter2Values) . $this->_getSearchInput();
-    }
-    
-    public function getCode($isDisplayHeader = true)
-    {
-        return $this->_oModule->_oTemplate->getJsCode('main', array(
-        	'aHtmlIds' => $this->_oModule->_oConfig->getHtmlIds()
-        )) . parent::getCode($isDisplayHeader);
-    }
-
-    public function performActionActivate()
-    {
-    	$this->_performActionEnable(true);
-    }
-
-	public function performActionSuspend()
-    {
-    	$this->_performActionEnable(false);
-    }
-
-    public function performActionEditEmail()
-    {
-        $CNF = &$this->_oModule->_oConfig->CNF;
-
-        $aIds = bx_get('ids');
-        if(!$aIds || !is_array($aIds)) {
-            $iId = (int)bx_get('id');
-            if(!$iId)
-                return echoJson(array());
-
-            $aIds = array($iId);
-        }
-
-        $iId = $aIds[0];
-        $oAccount = BxDolAccount::getInstance($iId);
-        if(!$oAccount)
-            return echoJson(array());
-
-        $aAccount = $oAccount->getInfo();
-        $sAction = 'edit_email';
-
-        $oForm = BxDolForm::getObjectInstance($CNF['OBJECT_FORM_ACCOUNT'], $CNF['OBJECT_FORM_ACCOUNT_DISPLAY_SETTINGS_EMAIL']);
-        $oForm->aFormAttrs['action'] = BX_DOL_URL_ROOT . 'grid.php?o=' . $this->_sObject . '&a=' . $sAction . '&id=' . $iId;
-        $oForm->initChecker($aAccount);
-
-        if($oForm->isSubmittedAndValid()) {
-            $sEmail = $oForm->getCleanValue('email');
-            if(strcmp($aAccount['email'], $sEmail) !== 0 && BxDolAccountQuery::getInstance()->getIdByEmail($sEmail))
-                return echoJson(array('msg' => _t('_sys_form_account_input_email_uniq_error_loggedin')));
-
-            if($oForm->update($aAccount['id'])) {
-                bx_alert('account', 'edited', $aAccount['id'], BxDolAccount::getInstance()->id(), array('display' => $CNF['OBJECT_FORM_ACCOUNT_DISPLAY_SETTINGS_EMAIL']));
-
-                $aRes = array('grid' => $this->getCode(false), 'blink' => $iId);
-                
-                $oAccount->doAudit($iId, '_sys_audit_action_account_email_changed', array('old_email' => $oAccount->getEmail(), 'new_email' => $sEmail));
-            }
-            else
-                $aRes = array('msg' => _t('_sys_txt_error_account_update'));
-
-            echoJson($aRes);
-        }
-        else {
-            $sContent = BxTemplStudioFunctions::getInstance()->popupBox('bx-account-edit-email-popup', _t('_bx_accounts_form_display_account_settings_email_popup'), $this->_oModule->_oTemplate->parseHtmlByName('edit_email.html', array(
-                'form_id' => $oForm->id,
-                'form' => $oForm->getCode(true),
-                'object' => $this->_sObject,
-                'action' => $sAction
-            )));
-
-            echoJson(array('popup' => array('html' => $sContent, 'options' => array('closeOnOuterClick' => false))));
-        }
-    }
-    
-    public function performActionAdd()
-    {
-      
-        $CNF = &$this->_oModule->_oConfig->CNF;
-        $sAction = 'add';
-        $oForm = BxDolForm::getObjectInstance($CNF['OBJECT_FORM_ACCOUNT'], $CNF['OBJECT_FORM_ACCOUNT_DISPLAY_CREATE']);
-        $oForm->aFormAttrs['action'] = BX_DOL_URL_ROOT . 'grid.php?o=' . $this->_sObject . '&a=' . $sAction;
-        $oForm->initChecker();
-
-        if($oForm->isSubmittedAndValid()) {
-           
-            $iAccountId = $oForm->insert();
-            
-            if (!$iAccountId) {
-                $aRes = array('msg' => _t('_sys_txt_error_account_insert'));
-            }
-            else{
-                $aRes = array('grid' => $this->getCode(false), 'blink' => $iAccountId);
-                
-                $oBxTemplAccountForms = new BxTemplAccountForms();
-                
-                $iProfileId = $oBxTemplAccountForms->onAccountCreated($iAccountId, $oForm->isSetPendingApproval(), BX_PROFILE_ACTION_MANUAL, false);
-
-                // perform action
-                BxDolAccount::isAllowedCreate ($iProfileId, true);
-                
-                // check
-                $aModulesProfile = array(); 
-                $aModules = BxDolModuleQuery::getInstance()->getModulesBy(array('type' => 'modules', 'active' => 1));
-                foreach($aModules as $aModule) {
-                    $oModule = BxDolModule::getInstance($aModule['name']);
-                    if($oModule instanceof iBxDolProfileService && BxDolService::call($aModule['name'], 'act_as_profile') === true)
-                        $aModulesProfile[] = $aModule;
-                }
-
-                $sDefaultProfileType = getParam('sys_account_default_profile_type');
-                if(count($aModulesProfile) == 1)
-                    $sProfileModule = $aModulesProfile[0]['name'];
-                else if(!empty($sDefaultProfileType)) 
-                    $sProfileModule = $sDefaultProfileType;
-
-                if (getParam('sys_account_auto_profile_creation') && !empty($sProfileModule)) {
-                    $oAccount = BxDolAccount::getInstance($iAccountId);
-                    $aProfileInfo = BxDolService::call($sProfileModule, 'prepare_fields', array(array(
-                        'author' => $iProfileId,
-                        'name' => $oAccount->getDisplayName(),
-                    )));
-                    $a = BxDolService::call($sProfileModule, 'entity_add', array($iProfileId, $aProfileInfo));
-                    if (isset($a['content']['profile_id']) && (int)$a['content']['profile_id'] > 0){
-                        BxDolAcl::getInstance()->setMembership((int)$a['content']['profile_id'], MEMBERSHIP_ID_STANDARD);
-                    }
-                    echoJson($aRes);
-                }
-            }
-        }
-        else {
-            $sContent = BxTemplStudioFunctions::getInstance()->popupBox('bx-account-edit-email-popup', _t('_bx_accounts_form_display_account_create_popup'), $this->_oModule->_oTemplate->parseHtmlByName('create.html', array(
-                'form_id' => $oForm->id,
-                'form' => $oForm->getCode(true),
-                'object' => $this->_sObject,
-                'action' => $sAction
-            )));
-
-            echoJson(array('popup' => array('html' => $sContent, 'options' => array('closeOnOuterClick' => false))));
-        }
-    }
-    
-    public function performActionConfirm()
-    {
-        $CNF = &$this->_oModule->_oConfig->CNF;
-
-    	$aIds = bx_get('ids');
-        if(!$aIds || !is_array($aIds))
-            return echoJson(array());
-
-        $oAccount = BxDolAccount::getInstance();
-
-        $iAffected = 0;
-        $aIdsAffected = array();
-        foreach($aIds as $iId){
-            if (BxDolAccount::isNeedConfirmEmail()) {
-                if($oAccount->updateEmailConfirmed(true, true, $iId)) {
-                    $aIdsAffected[] = $iId;
-                    $iAffected++;  
-                }
-            }
-
-            if (BxDolAccount::isNeedConfirmPhone()){
-                if($oAccount->updatePhoneConfirmed(true, $iId)) {
-                    $aIdsAffected[] = $iId;
-                    $iAffected++;  
-                }
-            }
-        }
-		echoJson($iAffected ? array('grid' => $this->getCode(false), 'blink' => $aIdsAffected) : array('msg' => _t($CNF['T']['grid_action_err_perform'])));
-    }
-    
-    public function performActionResendCemail()
-    {
-        $CNF = &$this->_oModule->_oConfig->CNF;
-
-        $aIds = bx_get('ids');
-        if(!$aIds || !is_array($aIds))
-            return echoJson(array());
-
-        $oAccount = BxDolAccount::getInstance();
-
-        $iAffected = 0;
-        $aIdsAffected = array();
-        foreach($aIds as $iId)
-            if($oAccount->sendConfirmationEmail($iId)) {
-                $aIdsAffected[] = $iId;
-                $iAffected++;  
-            }
-
-        echoJson($iAffected ? array('grid' => $this->getCode(false), 'blink' => $aIdsAffected) : array('msg' => _t($CNF['T']['grid_action_err_perform'])));
-    }
-
-    public function performActionResetPassword()
-    {
-    	$aIds = bx_get('ids');
-        if(!$aIds || !is_array($aIds))
-            return echoJson(array());
-
-        $iId = $aIds[0];
-        $oAccount = BxDolAccount::getInstance($iId);
-        if(!$oAccount)
-            return echoJson(array());
-
-        $aRes = array();
-        $sPwd = genRndPwd();
-        if (BxDolAccount::getInstance()->updatePassword($sPwd, $iId)){
-            $sPopupId = $this->_oModule->_oConfig->getHtmlIds('password_popup');
-            $sPopupTitle = _t('_bx_accounts_form_display_account_settings_password_popup');
-            $sPopupContent = $this->_oModule->_oTemplate->parseHtmlByName('reset_password.html', array(
-                'js_object' => $this->_oModule->_oConfig->getJsObject('main'),
-                'html_id_text' => $this->_oModule->_oConfig->getHtmlIds('password_text'),
-                'html_id_button' => $this->_oModule->_oConfig->getHtmlIds('password_button'),
-                'password' => $sPwd,
-            ));
-
-            $aRes = array('popup' => BxTemplStudioFunctions::getInstance()->popupBox($sPopupId, $sPopupTitle, $sPopupContent));
-        }
-        else 
-            $aRes = array('msg' => _t('_bx_accnt_grid_action_err_perform'));
-
-        return echoJson($aRes);
-    }
-
-    public function performActionResendRemail()
-    {
-        $CNF = &$this->_oModule->_oConfig->CNF;
-
-        $aIds = bx_get('ids');
-        if(!$aIds || !is_array($aIds))
-            return echoJson(array());
-
-        $oAccount = BxDolAccount::getInstance();
-
-        $iAffected = 0;
-        $aIdsAffected = array();
-        foreach($aIds as $iId)
-            if($oAccount->sendResetPasswordEmail($iId)) {
-                $aIdsAffected[] = $iId;
-                $iAffected++;  
-            }
-
-        echoJson($iAffected ? array('grid' => $this->getCode(false), 'blink' => $aIdsAffected) : array('msg' => _t($CNF['T']['grid_action_err_perform'])));
-    }
-
-    public function performActionUnlockAccount()
-    {
-    	$aIds = bx_get('ids');
-        if(!$aIds || !is_array($aIds)) {
-            echoJson(array());
-            return;
-        }
-
-        $oAccountQuery = BxDolAccountQuery::getInstance();
-        foreach($aIds as $iId) {
-            $oAccount = BxDolAccount::getInstance($iId);
-            if(!$oAccount)
-                continue;
-
-            if ($oAccount->isLocked()){
-                $oAccountQuery->unlockAccount($iId);
-            }
-            
-            $oAccount->doAudit($iId, '_sys_audit_action_account_unlock');
-        }
-
-        return echoJson(array('grid' => $this->getCode(false), 'blink' => $aIds));
-    }
-
-    public function performActionSetOperatorRole()
-    {
-    	$aIds = bx_get('ids');
-        if(!$aIds || !is_array($aIds))
-            return echoJson(array());
-        
-        $oUtils = BxDolStudioRolesUtils::getInstance();
-
-        $aRoles = $oUtils->getRoles();
-        if(empty($aRoles) || !is_array($aRoles))
-            return echoJson(array('msg' => _t('_sys_txt_error_occured')));
-
-        $iId = (int)array_shift($aIds);
-
-        $sPopupName = str_replace('_', '-', $this->MODULE) . '-set-role-popup';
-        $sPopupContent = $this->_oModule->_oTemplate->getPopupSetRole($aRoles, $iId, $oUtils->getRole($iId));
-
-        return echoJson(array('popup' => array(
-            'html' => BxTemplFunctions::getInstance()->transBox($sPopupName, $sPopupContent),
-            'options' => array(
-                'closeOnOuterClick' => true,
-                'removeOnClose' => true
-            )
-        )));
-    }
-
-    public function performActionSetOperatorRoleSubmit()
-    {
-        $aIds = bx_get('ids');
-        if(!$aIds || !is_array($aIds))
-            return echoJson(array());
-
-        $iId = (int)array_shift($aIds);
-        if(!$iId)
-            return echoJson(array('msg' => _t('_sys_txt_error_occured')));
-
-        if(!BxDolStudioRolesUtils::getInstance()->setRole($iId, bx_process_input(bx_get('role'), BX_DATA_INT)))
-            return echoJson(array('msg' => _t('_error occured')));
-
-        echoJson(array('grid' => $this->getCode(false), 'blink' => $iId));
-    }
-
-    public function performActionMakeOperator()
-    {
-    	$this->_performActionChangeRole(3);
-    }
-
-    public function performActionUnmakeOperator()
-    {
-    	$this->_performActionChangeRole(1);
-    }
-
-    protected function _performActionChangeRole($iRole)
-    {
-        $CNF = &$this->_oModule->_oConfig->CNF;
-
-        $aIds = bx_get('ids');
-        if(!$aIds || !is_array($aIds))
-            return echoJson(array());
-
-        $oAccount = BxDolAccount::getInstance();
-        $oUtils = BxDolStudioRolesUtils::getInstance();
-
-        $iAffected = 0;
-        $aIdsAffected = array();
-        foreach($aIds as $iId) {
-            if(!$this->_oModule->_oDb->updateAccount(array('role' => $iRole), array('id' => $iId))) 
-                continue;
-
-            $oUtils->setRole($iId, $iRole == 3 ? BX_DOL_STUDIO_ROLE_OPERATOR : 0);
-
-            $oAccount->doAudit($iId, '_sys_audit_action_account_change_role_to_' . $iRole);
-
-            $aIdsAffected[] = $iId;
-            $iAffected++;
-        }
-
-        echoJson($iAffected ? array('grid' => $this->getCode(false), 'blink' => $aIdsAffected) : array('msg' => _t($CNF['T']['grid_action_err_perform'])));
-    }
-
-    protected function _performActionEnable($isChecked)
-    {
-    	$CNF = &$this->_oModule->_oConfig->CNF;
-
-    	$aIds = bx_get('ids');
-        if(!$aIds || !is_array($aIds)) {
-            echoJson(array());
-            return;
-        }
-        $iAffected = 0;
-        $aIdsAffected = array();
-        foreach($aIds as $iId)
-        	if($this->_enable($iId, $isChecked)) {
-        		$aIdsAffected[] = $iId;
-        		$iAffected++;
-                
-                $oAccount = BxDolAccount::getInstance($iId);
-                $oAccount->doAudit($iId, '_sys_audit_action_account_' . $isChecked ? 'activated' : 'suspended');
-        	}
-
-        echoJson($iAffected ? array('grid' => $this->getCode(false), 'blink' => $aIdsAffected) : array('msg' => _t($CNF['T']['grid_action_err_perform'])));
-    }
-
-    protected function _enable($mixedId, $isChecked)
-    {
-    	$oProfile = BxDolProfile::getInstanceAccountProfile($mixedId);
-    	if(!$oProfile)
-    	    return false;
-
-        $iAction = BX_PROFILE_ACTION_MANUAL;
-        $sMethod = $isChecked ? 'activate' : 'suspend';
-        if(!$oProfile->$sMethod($iAction, 0 ,false))
-            return false;
-
-        sendMailTemplate('t_ChangeStatusAccount' . ucfirst($sMethod), $oProfile->getAccountObject()->id(), $oProfile->id(), array(), BX_EMAIL_SYSTEM);
-        
-        $aProfiles = $oProfile->getAccountObject()->getProfiles();
-        foreach($aProfiles as $aProfile){
-            BxDolProfile::getInstance($aProfile['id'])->$sMethod($iAction, 0 ,false);
-        }
-        
-    	return true;
-    }
-
-    //--- Layout methods ---//
-    protected function _getActionEditEmail($sType, $sKey, $a, $isSmall = false, $isDisabled = false, $aRow = array())
-    {
-        return '';
-    }
-    
-    protected function _getCellEmailConfirmed($mixedValue, $sKey, $aField, $aRow)
-    {
-    	$mixedValue = (int)$mixedValue == 1 ? '_Yes' : '_No';
-        return parent::_getCellDefault(_t($mixedValue), $sKey, $aField, $aRow);
-    }
-
-    protected function _getActionResetPassword($sType, $sKey, $a, $isSmall = false, $isDisabled = false, $aRow = array())
-    {
-        return '';
-    }
-
-    protected function _getActionResendRemail($sType, $sKey, $a, $isSmall = false, $isDisabled = false, $aRow = array())
-    {
-        if($sType == 'single')
-            return '';
-
-        return parent::_getActionDefault ($sType, $sKey, $a, $isSmall, $isDisabled, $aRow);
-    }
-
-    protected function _getActionUnlockAccount($sType, $sKey, $a, $isSmall = false, $isDisabled = false, $aRow = array())
-    {
-        return '';
-    }
-
-    protected function _getCellName($mixedValue, $sKey, $aField, $aRow)
-    {
-        $oAccount = BxDolAccount::getInstance($aRow['id']);
-        if ($oAccount)
-            $s = ($aRow['locked'] == 1 ? $this->_oTemplate->parseIcon("lock col-red1") . ' ' : '') . $oAccount->getDisplayName();
-        return parent::_getCellDefault ($s, $sKey, $aField, $aRow);
-    }
-    
-	protected function _getCellProfiles($mixedValue, $sKey, $aField, $aRow)
-    {
-        $s = $this->_oModule->_oTemplate->getProfilesByAccount($aRow);
-
-        return parent::_getCellDefault ($s, $sKey, $aField, $aRow);
-    }
-
-    protected function _getCellLogged($mixedValue, $sKey, $aField, $aRow)
-    {
-        $mixedValue = !empty($mixedValue) ? bx_time_js($mixedValue) : _t('_sys_not_available');
-
-        return parent::_getCellDefault($mixedValue, $sKey, $aField, $aRow);
-    } 
-    
-    protected function _getCellAdded($mixedValue, $sKey, $aField, $aRow)
-    {
-        $mixedValue = !empty($mixedValue) ? bx_time_js($mixedValue) : _t('_sys_not_available');
-
-        return parent::_getCellDefault($mixedValue, $sKey, $aField, $aRow);
-    } 
-    
-    protected function _getCellIsConfirmed($mixedValue, $sKey, $aField, $aRow)
-    {
-        $oAccount = BxDolAccount::getInstance($aRow['id']);
-        $s = "";
-        if ($oAccount)
-            $s = $oAccount->getCurrentConfirmationStatusValue();
-        return parent::_getCellDefault(_t('_bx_accnt_grid_confirmation_status_' . $s), $sKey, $aField, $aRow);
-    }
-
-    protected function _isCheckboxDisabled($aRow)
-    {
-        return false;
-    }
-
-	protected function _getContentInfo($iId)
-    {
-    	return BxDolAccountQuery::getInstance()->getInfoById($iId);
-    }
-
-	protected function _doDelete($iId, $aParams = array())
-    {
-    	return BxDolAccount::getInstance($iId)->delete(isset($aParams['with_content']) && $aParams['with_content'] === true);
-    }
-    
-    
-
-    protected function _addJsCss()
-    {
-        parent::_addJsCss();
-        
-        $this->_oTemplate->addJs(array(
-            'main.css'
-        ));
-
-        $this->_oTemplate->addJs(array(
-        	'jquery.form.min.js',
-            'clipboard.min.js',
-            'main.js'
-        ));
-    }
-
-    protected function _isVisibleGrid($a)
-    {
-        if(isAdmin())
-            return true;
-        
-        return parent::_isVisibleGrid($a);
-    }
-}
-
-/** @} */

+ 0 - 68
modules/boonex/accounts/updates/11.0.4_12.0.0/source/classes/BxAccntMenuManageTools.php

@@ -1,68 +0,0 @@
-<?php defined('BX_DOL') or die('hack attempt');
-/**
- * Copyright (c) UNA, Inc - https://una.io
- * MIT License - https://opensource.org/licenses/MIT
- *
- * @defgroup    Accounts Accounts
- * @ingroup     UnaModules
- *
- * @{
- */
-
-/**
- * 'Manage tools' menu.
- */
-class BxAccntMenuManageTools extends BxBaseModGeneralMenuManageTools
-{
-
-    public function __construct($aObject, $oTemplate = false)
-    {
-        $this->MODULE = 'bx_accounts';
-        parent::__construct($aObject, $oTemplate);
-    }
-
-    /**
-     * Check if menu items is visible.
-     * @param $a menu item array
-     * @return boolean
-     */
-    protected function _isVisible ($a)
-    {
-        if(!parent::_isVisible($a))
-            return false;
-
-        $aDataEntry = BxDolAccountQuery::getInstance()->getInfoById($this->_iContentId);
-        if(empty($aDataEntry) || !is_array($aDataEntry))
-        	return false;
-
-        $sCheckFuncName = '';
-        switch ($a['name']) {
-            case 'delete':
-            case 'delete-with-content':
-                $sCheckFuncName = 'checkAllowedDelete';
-                break;
-            case 'set-operator-role':
-                $sCheckFuncName = 'checkAllowedSetOperatorRole';
-            	break;
-            case 'make-operator':
-            	$sCheckFuncName = 'checkAllowedMakeOperator';
-            	break;
-            case 'unmake-operator':
-            	$sCheckFuncName = 'checkAllowedUnmakeOperator';
-            	break;
-            case 'unlock-account':
-            	$sCheckFuncName = 'checkAllowedUnlockAccount';
-            	break;
-            case 'confirm':
-            	$sCheckFuncName = 'checkAllowedConfirm';
-            	break;
-        }
-
-        if(!$sCheckFuncName || !method_exists($this->_oModule, $sCheckFuncName))
-            return true;
-
-        return $this->_oModule->{$sCheckFuncName}($aDataEntry) === CHECK_ACTION_RESULT_ALLOWED;
-    }
-}
-
-/** @} */

+ 0 - 131
modules/boonex/accounts/updates/11.0.4_12.0.0/source/classes/BxAccntModule.php

@@ -1,131 +0,0 @@
-<?php defined('BX_DOL') or die('hack attempt');
-/**
- * Copyright (c) UNA, Inc - https://una.io
- * MIT License - https://opensource.org/licenses/MIT
- *
- * @defgroup    Accounts Accounts
- * @ingroup     UnaModules
- *
- * @{
- */
-
-class BxAccntModule extends BxBaseModGeneralModule
-{
-    /**
-     * Constructor
-     */
-    function __construct($aModule)
-    {
-        parent::__construct($aModule);
-
-        $this->_oConfig->init($this->_oDb);
-    }
-
-    public function serviceGetSafeServices()
-    {
-        return array ();
-    }
-
-    /**
-     * @page service Service Calls
-     * @section bx_accounts Accounts
-     * @subsection bx_accounts-other Other
-     * @subsubsection bx_accounts-get_menu_addon_manage_tools get_menu_addon_manage_tools
-     * 
-     * @code bx_srv('bx_accounts', 'get_menu_addon_manage_tools', [...]); @endcode
-     * 
-     * Get number of 'unconfirmed' accounts for User End -> Dasboard page -> Manage block.
-     *
-     * @return integer number of 'unconfirmed' accounts
-     * 
-     * @see BxAccntModule::serviceGetMenuAddonManageTools
-     */
-    /** 
-     * @ref bx_accounts-get_menu_addon_manage_tools "get_menu_addon_manage_tools"
-     */
-	public function serviceGetMenuAddonManageTools()
-	{
-		bx_import('SearchResult', $this->_aModule);
-        $sClass = $this->_aModule['class_prefix'] . 'SearchResult';
-        $o = new $sClass();
-        $o->unsetPaginate();
-        $iNumTotal = $o->getNum();
-        
-        $o->fillFilters(array(
-			'unconfirmed' => 1
-        ));
-      
-        return array('counter1_value' => $o->getNum(),'counter3_value' => $iNumTotal, 'counter1_caption' => _t('_bx_accnt_menu_dashboard_manage_tools_addon_counter1_caption'));
-	}
-    
-    public function checkAllowedConfirm(&$aDataEntry, $isPerformAction = false)
-    {
-    	$bAdmin = isAdmin();
-    	if(!$bAdmin || BxDolAccount::getInstance($aDataEntry['id'])->isConfirmed())
-    		return _t('_sys_txt_access_denied');
-
-    	return CHECK_ACTION_RESULT_ALLOWED;
-    }
-
-    public function checkAllowedDelete(&$aDataEntry, $isPerformAction = false)
-    {
-    	if(isAdmin() && (int)$aDataEntry['id'] == getLoggedId())
-    		return _t('_sys_txt_access_denied');
-
-        // check ACL
-        $aCheck = checkActionModule($this->_iProfileId, 'delete account', 'system', $isPerformAction);
-        if($aCheck[CHECK_ACTION_RESULT] != CHECK_ACTION_RESULT_ALLOWED)
-            return $aCheck[CHECK_ACTION_MESSAGE];
-
-        return CHECK_ACTION_RESULT_ALLOWED;
-    }
-
-    public function checkAllowedSetOperatorRole(&$aDataEntry, $isPerformAction = false)
-    {
-    	$bAdmin = isAdmin();
-        $iAccountId = getLoggedId();
-    	if(!$bAdmin || !BxDolStudioRolesUtils::getInstance()->isActionAllowed(BX_SRA_MANAGE_ROLES, $iAccountId) || (int)$aDataEntry['id'] == $iAccountId)
-            return _t('_sys_txt_access_denied');
-
-    	return CHECK_ACTION_RESULT_ALLOWED;
-    }
-
-    public function checkAllowedMakeOperator(&$aDataEntry, $isPerformAction = false)
-    {
-    	$bAdmin = isAdmin();
-        $iAccountId = getLoggedId();
-    	if(!$bAdmin || !BxDolStudioRolesUtils::getInstance()->isActionAllowed(BX_SRA_MANAGE_ROLES, $iAccountId) || (int)$aDataEntry['id'] == $iAccountId || (int)$aDataEntry['role'] == 3)
-            return _t('_sys_txt_access_denied');
-
-    	return CHECK_ACTION_RESULT_ALLOWED;
-    }
-
-    public function checkAllowedUnmakeOperator(&$aDataEntry, $isPerformAction = false)
-    {
-    	$bAdmin = isAdmin();
-        $iAccountId = getLoggedId();
-    	if(!$bAdmin || !BxDolStudioRolesUtils::getInstance()->isActionAllowed(BX_SRA_MANAGE_ROLES, $iAccountId) || (int)$aDataEntry['id'] == $iAccountId || (int)$aDataEntry['role'] != 3)
-            return _t('_sys_txt_access_denied');
-
-    	return CHECK_ACTION_RESULT_ALLOWED;
-    }
-    
-    public function checkAllowedUnlockAccount(&$aDataEntry, $isPerformAction = false)
-    {
-    	if((int)$aDataEntry['locked'] != 1)
-    		return _t('_sys_txt_access_denied');
-
-    	return CHECK_ACTION_RESULT_ALLOWED;
-    }
-    
-    public function isAllowDeleteOrDisable($iActorProfileId, $iTargetProfileId)
-    {
-        if (BxDolAcl::getInstance()->isMemberLevelInSet(array(MEMBERSHIP_ID_MODERATOR), $iActorProfileId) && BxDolAcl::getInstance()->isMemberLevelInSet(array(MEMBERSHIP_ID_MODERATOR, MEMBERSHIP_ID_ADMINISTRATOR), $iTargetProfileId))
-            return false;
-        
-        return true;    
-    }
-    
-}
-
-/** @} */

+ 0 - 49
modules/boonex/accounts/updates/11.0.4_12.0.0/source/classes/BxAccntStudioPage.php

@@ -1,49 +0,0 @@
-<?php defined('BX_DOL') or die('hack attempt');
-/**
- * Copyright (c) UNA, Inc - https://una.io
- * MIT License - https://opensource.org/licenses/MIT
- *
- * @defgroup    Accounts Accounts
- * @ingroup     UnaModules
- *
- * @{
- */
-
-define('BX_DOL_STUDIO_MOD_TYPE_MANAGE', 'manage');
-
-class BxAccntStudioPage extends BxTemplStudioModule
-{
-    protected $_sModule;
-    protected $_oModule;
-
-    function __construct($sModule, $mixedPageName, $sPage = "")
-    {
-        $this->sPageDefault = BX_DOL_STUDIO_MOD_TYPE_MANAGE;
-
-        $this->_sModule = 'bx_accounts';
-    	$this->_oModule = BxDolModule::getInstance($this->_sModule);
-
-        parent::__construct($sModule, $mixedPageName, $sPage);
-
-        $this->aMenuItems = array(
-            array('name' => BX_DOL_STUDIO_MOD_TYPE_MANAGE, 'icon' => 'wrench', 'title' => '_bx_accnt_menu_item_title_manage')
-        );
-    }
-
-    protected function getManage()
-    {
-        $sType = 'administration';
-
-        $sGrid = $this->_oModule->_oConfig->getGridObject($sType);
-        $oGrid = BxDolGrid::getObjectInstance($sGrid, BxDolStudioTemplate::getInstance());
-        if(!$oGrid)
-            return '';
-
-        $this->_oModule->_oTemplate->addStudioCss(array('manage_tools.css', 'main.css'));
-        $this->_oModule->_oTemplate->addStudioJs(array('manage_tools.js', 'main.js'));
-        $this->_oModule->_oTemplate->addStudioJsTranslation(array('_sys_grid_search'));
-        return $this->_oModule->_oTemplate->getJsCode('manage_tools', array('sObjNameGrid' => $sGrid)) . $oGrid->getCode();
-    }
-}
-
-/** @} */

+ 0 - 110
modules/boonex/accounts/updates/11.0.4_12.0.0/source/classes/BxAccntTemplate.php

@@ -1,110 +0,0 @@
-<?php defined('BX_DOL') or die('hack attempt');
-/**
- * Copyright (c) UNA, Inc - https://una.io
- * MIT License - https://opensource.org/licenses/MIT
- *
- * @defgroup    Accounts Accounts
- * @ingroup     UnaModules
- *
- * @{
- */
-
-class BxAccntTemplate extends BxBaseModGeneralTemplate
-{
-    function __construct(&$oConfig, &$oDb)
-    {
-    	$this->MODULE = 'bx_accounts';
-        parent::__construct($oConfig, $oDb);
-    }
-
-    public function getProfilesByAccount($aContentInfo, $iMaxVisible = 2)
-    {
-        $aProfiles = BxDolAccount::getInstance($aContentInfo['id'])->getProfiles();
-        $iProfiles = count($aProfiles);
-
-        $aTmplVars = array (
-        	'class_cnt' => '',
-            'bx_repeat:profiles' => array(),
-            'bx_if:profiles_more' => array(
-                'condition' => $iProfiles > $iMaxVisible,
-                'content' => array(
-        			'html_id' => $this->_oConfig->getHtmlIds('profile_more_popup') . $aContentInfo['id'],
-                    'more' => _t('_bx_accnt_txt_more', $iProfiles - $iMaxVisible),
-        			'more_attr' => bx_html_attribute(_t('_bx_accnt_txt_see_more')),
-                    'popup' => '',
-                ),
-            ),
-        );
-
-        $aTmplVarsPopup = array (
-        	'class_cnt' => ' bx-def-padding',
-            'bx_repeat:profiles' => array(),
-            'bx_if:profiles_more' => array(
-                'condition' => false,
-                'content' => array(),
-            ),
-        );
-
-        $i = 0;
-        foreach ($aProfiles as $iProfileId => $aProfile) {
-            $oProfile = BxDolProfile::getInstance($iProfileId);
-            if(!$oProfile)
-				continue;
-
-			$sName = $oProfile->getDisplayName();
-            $aTmplVarsProfile = array (
-            	'html_id' => $this->_oConfig->getHtmlIds('profile') . $aProfile['id'],
-                'id' => $oProfile->id(),
-                'url' => $oProfile->getUrl(),
-                'name' => $sName,
-                'name_attr' =>  bx_html_attribute($sName)
-            );
-
-            if($i < $iMaxVisible)
-				$aTmplVars['bx_repeat:profiles'][] = $aTmplVarsProfile;
-            if($i >= $iMaxVisible)
-                $aTmplVarsPopup['bx_repeat:profiles'][] = $aTmplVarsProfile;
-
-            ++$i;
-        }
-
-        if($aTmplVarsPopup['bx_repeat:profiles']) {
-            $aTmplVars['bx_if:profiles_more']['content']['popup'] = BxTemplFunctions::getInstance()->transBox('', $this->parseHtmlByName('profiles.html', $aTmplVarsPopup));
-        }
-
-        return $this->parseHtmlByName('profiles.html', $aTmplVars);
-    }
-
-    public function getPopupSetRole($aRoles, $iAccountId, $iAccountRole)
-    {
-        $sJsObject = $this->_oConfig->getJsObject('manage_tools');
-        $sHtmlIdPrefix = str_replace('_', '-', $this->_oConfig->getName()) . '-role';
-
-        $aRoles = array_merge(array(array('id' => 0, 'title' => '_None')), $aRoles);
-
-        $aTmplVarsRoles = array();
-        foreach($aRoles as $aRole) {
-            $iRole = (int)$aRole['id'];
-
-            if($iRole == BX_DOL_STUDIO_ROLE_MASTER)
-                continue;
-
-            $aTmplVarsRoles[] = array(
-                'id' => $sHtmlIdPrefix . '-' . $iRole, 
-                'value' => $iRole,
-                'onclick' => $sJsObject . '.onClickSetOperatorRoleSubmit(this, ' . $iAccountId . ', ' . $iRole . ')',
-                'title' => _t($aRole['title']), 
-                'bx_if:show_checked' => array(
-                    'condition' => $iRole != 0 && $iAccountRole & (1 << ($iRole - 1)),
-                    'content' => array()
-                )
-            );
-        }
-
-        return $this->parseHtmlByName('set_role_popup.html', array(
-            'bx_repeat:roles' => $aTmplVarsRoles
-        ));
-    }
-}
-
-/** @} */

+ 0 - 71
modules/boonex/accounts/updates/11.0.4_12.0.0/source/install/config.php

@@ -1,71 +0,0 @@
-<?php
-/**
- * Copyright (c) UNA, Inc - https://una.io
- * MIT License - https://opensource.org/licenses/MIT
- *
- * @defgroup    Accounts Accounts
- * @ingroup     UnaModules
- *
- * @{
- */
-
-$aConfig = array(
-    /**
-     * Main Section.
-     */
-    'type' => BX_DOL_MODULE_TYPE_MODULE,
-    'name' => 'bx_accounts',
-    'title' => 'Accounts Manager',
-    'note' => 'Accounts Manager module.',
-    'version' => '12.0.0',
-    'vendor' => 'BoonEx',
-    'help_url' => 'http://feed.una.io/?section={module_name}',
-
-    'compatible_with' => array(
-        '12.0.0-B1'
-    ),
-
-    /**
-     * 'home_dir' and 'home_uri' - should be unique. Don't use spaces in 'home_uri' and the other special chars.
-     */
-    'home_dir' => 'boonex/accounts/',
-    'home_uri' => 'accounts',
-
-    'db_prefix' => 'bx_accnt_',
-    'class_prefix' => 'BxAccnt',
-
-    /**
-     * Category for language keys.
-     */
-    'language_category' => 'Accounts',
-
-    /**
-     * Installation/Uninstallation Section.
-     */
-    'install' => array(
-        'execute_sql' => 1,
-        'update_languages' => 1,
-        'clear_db_cache' => 1,
-    ),
-    'uninstall' => array (
-        'execute_sql' => 1,
-        'update_languages' => 1,
-        'clear_db_cache' => 1,
-    ),
-    'enable' => array(
-        'execute_sql' => 1,
-        'clear_db_cache' => 1,
-    ),
-    'disable' => array (
-        'execute_sql' => 1,
-        'clear_db_cache' => 1,
-    ),
-
-    /**
-     * Dependencies Section
-     */
-    'dependencies' => array(),
-
-);
-
-/** @} */

+ 0 - 92
modules/boonex/accounts/updates/11.0.4_12.0.0/source/install/langs/en.xml

@@ -1,92 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<resources name="en" flag="gb" title="English">
-    <string name="_bx_accnt"><![CDATA[Accounts]]></string>
-    <string name="_bx_accounts"><![CDATA[Accounts]]></string>
-
-    <string name="_bx_accounts_form_display_account_settings_email_popup"><![CDATA[Edit Email]]></string>
-    <string name="_bx_accounts_form_display_account_create_popup"><![CDATA[Create new Account]]></string>
-    <string name="_bx_accounts_form_display_account_settings_password_popup"><![CDATA[Reset Password]]></string>
-
-    <string name="_bx_accnt_page_title_sys_manage_administration"><![CDATA[Manage All Accounts]]></string>
-    <string name="_bx_accnt_page_title_manage"><![CDATA[Manage Accounts]]></string>
-    <string name="_bx_accnt_page_title_browse"><![CDATA[Accounts]]></string>
-
-    <string name="_bx_accnt_page_block_title_system_manage_administration"><![CDATA[Manage All Accounts]]></string>
-    <string name="_bx_accnt_page_block_title_manage"><![CDATA[Manage Accounts]]></string>
-
-    <string name="_bx_accnt_menu_set_title_manage_tools"><![CDATA[Manage Tools Submenu]]></string>
-    <string name="_bx_accnt_menu_title_manage_tools"><![CDATA[Manage Tools Submenu]]></string>
-    <string name="_bx_accnt_menu_item_title_system_resend_cemail"><![CDATA[Resend Confirmation]]></string>
-    <string name="_bx_accnt_menu_item_title_resend_cemail"><![CDATA[Resend Confirmation]]></string>
-    <string name="_bx_accnt_menu_item_title_system_confirm"><![CDATA[Confirm]]></string>
-    <string name="_bx_accnt_menu_item_title_confirm"><![CDATA[Confirm]]></string>
-    <string name="_bx_accnt_menu_item_title_system_edit_email"><![CDATA[Edit Email]]></string>
-    <string name="_bx_accnt_menu_item_title_edit_email"><![CDATA[Edit Email]]></string>
-    <string name="_bx_accnt_menu_item_title_system_reset_password"><![CDATA[Reset Password]]></string>
-    <string name="_bx_accnt_menu_item_title_reset_password"><![CDATA[Reset Password]]></string>
-    <string name="_bx_accnt_menu_item_title_system_resend_remail"><![CDATA[Resend Reset Password]]></string>
-    <string name="_bx_accnt_menu_item_title_resend_remail"><![CDATA[Resend Reset Password]]></string>
-    <string name="_bx_accnt_menu_item_title_system_unlock_account"><![CDATA[Unlock]]></string>
-    <string name="_bx_accnt_menu_item_title_unlock_account"><![CDATA[Unlock]]></string>
-    <string name="_bx_accnt_menu_item_title_system_delete"><![CDATA[Delete]]></string>
-    <string name="_bx_accnt_menu_item_title_delete"><![CDATA[Delete]]></string>
-    <string name="_bx_accnt_menu_item_title_system_delete_with_content"><![CDATA[Delete With Content]]></string>
-    <string name="_bx_accnt_menu_item_title_delete_with_content"><![CDATA[Delete With Content]]></string>
-    <string name="_bx_accnt_menu_item_title_system_make_operator"><![CDATA[Make Operator]]></string>
-    <string name="_bx_accnt_menu_item_title_make_operator"><![CDATA[Make Operator]]></string>
-    <string name="_bx_accnt_menu_item_title_system_unmake_operator"><![CDATA[Unmake Operator]]></string>
-    <string name="_bx_accnt_menu_item_title_unmake_operator"><![CDATA[Unmake Operator]]></string>
-    <string name="_bx_accnt_menu_item_title_system_set_operator_role"><![CDATA[Set Operator Role]]></string>
-    <string name="_bx_accnt_menu_item_title_set_operator_role"><![CDATA[Set Operator Role]]></string>
-    <string name="_bx_accnt_menu_item_title_system_admt_accounts"><![CDATA[Accounts]]></string>
-    <string name="_bx_accnt_menu_item_title_admt_accounts"><![CDATA[Accounts]]></string>
-    <string name="_bx_accnt_menu_item_title_manage"><![CDATA[Manage]]></string>
-    <string name="_bx_accnt_menu_dashboard_manage_tools_addon_counter1_caption"><![CDATA[unconfirmed]]></string>
-
-    <string name="_bx_accnt_acl_action_edit_any_account"><![CDATA[Edit Any Account]]></string>
-
-    <string name="_bx_accnt_grid_filter_item_title_adm_select_one_filter1"><![CDATA[All Statuses]]></string>
-    <string name="_bx_accnt_grid_filter_item_title_adm_select_one_filter2"><![CDATA[All]]></string>
-    <string name="_bx_accnt_grid_filter_item_title_adm_active"><![CDATA[Active]]></string>
-    <string name="_bx_accnt_grid_filter_item_title_adm_operators"><![CDATA[Operators]]></string>
-    <string name="_bx_accnt_grid_filter_item_title_adm_pending"><![CDATA[Pending]]></string>
-    <string name="_bx_accnt_grid_filter_item_title_adm_suspended"><![CDATA[Suspended]]></string>    
-    <string name="_bx_accnt_grid_filter_item_title_adm_unconfirmed"><![CDATA[Unconfirmed]]></string>
-    <string name="_bx_accnt_grid_filter_item_title_adm_locked"><![CDATA[Locked]]></string>
-    <string name="_bx_accnt_grid_column_title_adm_active"><![CDATA[Active]]></string>
-    <string name="_bx_accnt_grid_column_title_adm_name"><![CDATA[Name]]></string>
-    <string name="_bx_accnt_grid_column_title_adm_email"><![CDATA[Email]]></string>
-    <string name="_bx_accnt_grid_column_title_adm_ip"><![CDATA[IP]]></string>
-
-    <string name="_bx_accnt_grid_column_title_adm_is_confirmed"><![CDATA[Confirmed]]></string>
-    <string name="_bx_accnt_grid_column_title_adm_profiles"><![CDATA[Profiles]]></string>
-    <string name="_bx_accnt_grid_column_title_adm_logged"><![CDATA[Last Logged]]></string>
-    <string name="_bx_accnt_grid_column_title_adm_added"><![CDATA[Created]]></string>
-    <string name="_bx_accnt_grid_action_title_adm_activate"><![CDATA[Activate]]></string>
-    <string name="_bx_accnt_grid_action_title_adm_suspend"><![CDATA[Suspend]]></string>
-    <string name="_bx_accnt_grid_action_title_adm_confirm"><![CDATA[Confirm]]></string>
-    <string name="_bx_accnt_grid_action_title_adm_edit_email"><![CDATA[Edit Email]]></string>
-    <string name="_bx_accnt_grid_action_title_adm_resend_cemail"><![CDATA[Resend Confirmation]]></string>
-    <string name="_bx_accnt_grid_action_title_adm_resend_remail"><![CDATA[Resend Reset Password]]></string>
-    <string name="_bx_accnt_grid_action_title_adm_reset_password"><![CDATA[Reset Password]]></string>
-    <string name="_bx_accnt_grid_action_title_adm_unlock_account"><![CDATA[Unlock]]></string>
-    <string name="_bx_accnt_grid_action_title_adm_delete"><![CDATA[Delete]]></string>
-    <string name="_bx_accnt_grid_action_title_adm_delete_with_content"><![CDATA[Delete With Content]]></string>
-    <string name="_bx_accnt_grid_action_title_adm_more_actions"><![CDATA[More Actions]]></string>
-    <string name="_bx_accnt_grid_action_title_adm_more_add"><![CDATA[Add new]]></string>
-    <string name="_bx_accnt_grid_action_err_delete"><![CDATA[Cannot delete the selected account(s).]]></string>
-    <string name="_bx_accnt_grid_action_err_perform"><![CDATA[Cannot perform the action for selected account(s).]]></string>
-    <string name="_bx_accnt_grid_action_unlock_successed"><![CDATA[Successfully unlocked]]></string>
-    <string name="_bx_accnt_grid_action_unlock_error"><![CDATA[Account is not blocked]]></string>
-    <string name="_bx_accnt_grid_confirmation_status_none"><![CDATA[No]]></string>
-    <string name="_bx_accnt_grid_confirmation_status_email"><![CDATA[Email]]></string>
-    <string name="_bx_accnt_grid_confirmation_status_phone"><![CDATA[Phone]]></string>
-    <string name="_bx_accnt_grid_confirmation_status_email_and_phone"><![CDATA[All]]></string>
-
-    <string name="_bx_accnt_form_login_input_caption_system_email_confirmed"><![CDATA[Email confirmed]]></string>
-    <string name="_bx_accnt_form_account_input_email_confirmed"><![CDATA[Email confirmed]]></string>
- 
-    <string name="_bx_accnt_txt_more"><![CDATA[{0} more]]></string>
-    <string name="_bx_accnt_txt_see_more"><![CDATA[See more]]></string>
-    <string name="_bx_accnt_txt_copy_to_clipboard"><![CDATA[Copy to Clipboard]]></string>
-</resources>

+ 0 - 88
modules/boonex/accounts/updates/11.0.4_12.0.0/source/install/sql/enable.sql

@@ -1,88 +0,0 @@
-SET @sName = 'bx_accounts';
-
-
--- PAGE: module administration
-INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `uri`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
-('bx_accounts_administration', '_bx_accnt_page_title_sys_manage_administration', '_bx_accnt_page_title_manage', @sName, 5, 192, 1, 'accounts-administration', 'page.php?i=accounts-administration', '', '', '', 0, 1, 0, '', '');
-
-INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES 
-('bx_accounts_administration', 1, @sName, '_bx_accnt_page_block_title_system_manage_administration', '_bx_accnt_page_block_title_manage', 11, 192, 'service', 'a:3:{s:6:\"module\";s:11:\"bx_accounts\";s:6:\"method\";s:12:\"manage_tools\";s:6:\"params\";a:1:{i:0;s:14:\"administration\";}}', 0, 1, 0);
-
-
--- MENU: manage tools submenu
-INSERT INTO `sys_objects_menu`(`object`, `title`, `set_name`, `module`, `template_id`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES 
-('bx_accounts_menu_manage_tools', '_bx_accnt_menu_title_manage_tools', 'bx_accounts_menu_manage_tools', @sName, 6, 0, 1, 'BxAccntMenuManageTools', 'modules/boonex/accounts/classes/BxAccntMenuManageTools.php');
-
-INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES 
-('bx_accounts_menu_manage_tools', @sName, '_bx_accnt_menu_set_title_manage_tools', 0);
-
-INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
-('bx_accounts_menu_manage_tools', @sName, 'edit-email', '_bx_accnt_menu_item_title_system_edit_email', '_bx_accnt_menu_item_title_edit_email', 'javascript:void(0)', 'javascript:{js_object}.onClickEditEmail({content_id}, this);', '_self', 'at', '', 192, 1, 0, 1),
-('bx_accounts_menu_manage_tools', @sName, 'resend-cemail', '_bx_accnt_menu_item_title_system_resend_cemail', '_bx_accnt_menu_item_title_resend_cemail', 'javascript:void(0)', 'javascript:{js_object}.onClickResendCemail({content_id}, this);', '_self', 'far envelope', '', 192, 1, 0, 2),
-('bx_accounts_menu_manage_tools', @sName, 'confirm', '_bx_accnt_menu_item_title_system_confirm', '_bx_accnt_menu_item_title_confirm', 'javascript:void(0)', 'javascript:{js_object}.onClickConfirm({content_id}, this);', '_self', 'fas check', '', 192, 1, 0, 3),
-('bx_accounts_menu_manage_tools', @sName, 'reset-password', '_bx_accnt_menu_item_title_system_reset_password', '_bx_accnt_menu_item_title_reset_password', 'javascript:void(0)', 'javascript:{js_object}.onClickResetPassword({content_id}, this);', '_self', 'eraser', '', 192, 1, 0, 4),
-('bx_accounts_menu_manage_tools', @sName, 'resend-remail', '_bx_accnt_menu_item_title_system_resend_remail', '_bx_accnt_menu_item_title_resend_remail', 'javascript:void(0)', 'javascript:{js_object}.onClickResendRemail({content_id}, this);', '_self', 'eraser', '', 192, 1, 0, 5),
-('bx_accounts_menu_manage_tools', @sName, 'unlock-account', '_bx_accnt_menu_item_title_system_unlock_account', '_bx_accnt_menu_item_title_unlock_account', 'javascript:void(0)', 'javascript:{js_object}.onClickUnlockAccount({content_id}, this);', '_self', 'unlock', '', 192, 1, 0, 6),
-('bx_accounts_menu_manage_tools', @sName, 'delete', '_bx_accnt_menu_item_title_system_delete', '_bx_accnt_menu_item_title_delete', 'javascript:void(0)', 'javascript:{js_object}.onClickDelete({content_id}, this);', '_self', 'far trash-alt', '', 192, 1, 0, 7),
-('bx_accounts_menu_manage_tools', @sName, 'delete-with-content', '_bx_accnt_menu_item_title_system_delete_with_content', '_bx_accnt_menu_item_title_delete_with_content', 'javascript:void(0)', 'javascript:{js_object}.onClickDeleteWithContent({content_id}, this);', '_self', 'far trash-alt', '', 192, 1, 0, 8),
-('bx_accounts_menu_manage_tools', @sName, 'make-operator', '_bx_accnt_menu_item_title_system_make_operator', '_bx_accnt_menu_item_title_make_operator', 'javascript:void(0)', 'javascript:{js_object}.onClickMakeOperator({content_id}, this);', '_self', 'wrench', '', 192, 0, 0, 9),
-('bx_accounts_menu_manage_tools', @sName, 'unmake-operator', '_bx_accnt_menu_item_title_system_unmake_operator', '_bx_accnt_menu_item_title_unmake_operator', 'javascript:void(0)', 'javascript:{js_object}.onClickUnmakeOperator({content_id}, this);', '_self', 'wrench', '', 192, 0, 0, 10),
-('bx_accounts_menu_manage_tools', @sName, 'set-operator-role', '_bx_accnt_menu_item_title_system_set_operator_role', '_bx_accnt_menu_item_title_set_operator_role', 'javascript:void(0)', 'javascript:{js_object}.onClickSetOperatorRole({content_id}, this);', '_self', 'wrench', '', 192, 1, 0, 11);
-
--- MENU: dashboard manage tools
-SET @iManageMenuOrder = (SELECT IFNULL(MAX(`order`), 0) FROM `sys_menu_items` WHERE `set_name`='sys_account_dashboard_manage_tools' LIMIT 1);
-INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `addon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
-('sys_account_dashboard_manage_tools', @sName, 'accounts-administration', '_bx_accnt_menu_item_title_system_admt_accounts', '_bx_accnt_menu_item_title_admt_accounts', 'page.php?i=accounts-administration', '', '_self', 'at', 'a:2:{s:6:"module";s:11:"bx_accounts";s:6:"method";s:27:"get_menu_addon_manage_tools";}', '', 192, 1, 0, @iManageMenuOrder + 1);
-
-
--- ACL
-INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
-(@sName, 'edit any entry', NULL, '_bx_accnt_acl_action_edit_any_account', '', 1, 3);
-SET @iIdActionProfileEditAny = LAST_INSERT_ID();
-
-SET @iUnauthenticated = 1;
-SET @iAccount = 2;
-SET @iStandard = 3;
-SET @iUnconfirmed = 4;
-SET @iPending = 5;
-SET @iSuspended = 6;
-SET @iModerator = 7;
-SET @iAdministrator = 8;
-SET @iPremium = 9;
-
-INSERT INTO `sys_acl_matrix` (`IDLevel`, `IDAction`) VALUES
-
--- edit any entry 
-(@iModerator, @iIdActionProfileEditAny),
-(@iAdministrator, @iIdActionProfileEditAny);
-
-
--- GRIDS: administration
-INSERT INTO `sys_objects_grid` (`object`, `source_type`, `source`, `table`, `field_id`, `field_order`, `field_active`, `paginate_url`, `paginate_per_page`, `paginate_simple`, `paginate_get_start`, `paginate_get_per_page`, `filter_fields`, `filter_fields_translatable`, `filter_mode`, `sorting_fields`, `sorting_fields_translatable`, `visible_for_levels`, `show_total_count`, `override_class_name`, `override_class_file`) VALUES
-('bx_accounts_administration', 'Sql', 'SELECT `ta`.*, `tp`.`status` AS `status` FROM `sys_accounts` AS `ta` LEFT JOIN `sys_profiles` AS `tp` ON `ta`.`id`=`tp`.`account_id` AND `tp`.`type`=''system'' WHERE 1 ', 'sys_accounts', 'id', 'logged', 'status', '', 20, NULL, 'start', '', 'name,email,ip,phone', '', 'like', 'email_confirmed,logged,added', '', 192, 1, 'BxAccntGridAdministration', 'modules/boonex/accounts/classes/BxAccntGridAdministration.php');
-
-INSERT INTO `sys_grid_fields` (`object`, `name`, `title`, `width`, `translatable`, `chars_limit`, `params`, `order`) VALUES
-('bx_accounts_administration', 'checkbox', '_sys_select', '2%', 0, '', '', 1),
-('bx_accounts_administration', 'switcher', '_bx_accnt_grid_column_title_adm_active', '6%', 0, '', '', 2),
-('bx_accounts_administration', 'name', '_bx_accnt_grid_column_title_adm_name', '22%', 0, '22', '', 3),
-('bx_accounts_administration', 'email', '_bx_accnt_grid_column_title_adm_email', '22%', 0, '22', '', 4),
-('bx_accounts_administration', 'is_confirmed', '_bx_accnt_grid_column_title_adm_is_confirmed', '5%', 0, '', '', 5),
-('bx_accounts_administration', 'profiles', '_bx_accnt_grid_column_title_adm_profiles', '17%', 0, '22', '', 6),
-('bx_accounts_administration', 'logged', '_bx_accnt_grid_column_title_adm_logged', '10%', 0, '15', '', 7),
-('bx_accounts_administration', 'added', '_bx_accnt_grid_column_title_adm_added', '10%', 0, '15', '', 8),
-('bx_accounts_administration', 'actions', '', '6%', 0, '', '', 9);
-
-INSERT INTO `sys_grid_actions` (`object`, `type`, `name`, `title`, `icon`, `icon_only`, `confirm`, `order`) VALUES
-('bx_accounts_administration', 'bulk', 'activate', '_bx_accnt_grid_action_title_adm_activate', '', 0, 0, 1),
-('bx_accounts_administration', 'bulk', 'suspend', '_bx_accnt_grid_action_title_adm_suspend', '', 0, 0, 2),
-('bx_accounts_administration', 'bulk', 'resend_cemail', '_bx_accnt_grid_action_title_adm_resend_cemail', '', 0, 0, 3),
-('bx_accounts_administration', 'bulk', 'resend_remail', '_bx_accnt_grid_action_title_adm_resend_remail', '', 0, 0, 4),
-('bx_accounts_administration', 'bulk', 'confirm', '_bx_accnt_grid_action_title_adm_confirm', '', 0, 0, 5),
-('bx_accounts_administration', 'bulk', 'delete', '_bx_accnt_grid_action_title_adm_delete', '', 0, 1, 6),
-('bx_accounts_administration', 'bulk', 'delete_with_content', '_bx_accnt_grid_action_title_adm_delete_with_content', '', 0, 1, 7),
-('bx_accounts_administration', 'single', 'edit_email', '_bx_accnt_grid_action_title_adm_edit_email', '', 0, 0, 0),
-('bx_accounts_administration', 'single', 'reset_password', '_bx_accnt_grid_action_title_adm_reset_password', '', 0, 0, 0),
-('bx_accounts_administration', 'single', 'resend_remail', '_bx_accnt_grid_action_title_adm_resend_remail', '', 0, 0, 0),
-('bx_accounts_administration', 'single', 'unlock_account', '_bx_accnt_grid_action_title_adm_unlock_account', '', 0, 0, 0),
-('bx_accounts_administration', 'single', 'settings', '_bx_accnt_grid_action_title_adm_more_actions', 'cog', 1, 0, 2),
-('bx_accounts_administration', 'independent', 'add', '_bx_accnt_grid_action_title_adm_more_add', 'plus', 0, 0, 0);

+ 0 - 51
modules/boonex/accounts/updates/11.0.4_12.0.0/source/install/sql/install.sql

@@ -1,51 +0,0 @@
-SET @sName = 'bx_accounts';
-
-
--- FORMS
-INSERT INTO `sys_objects_form` (`object`, `module`, `title`, `action`, `form_attrs`, `submit_name`, `table`, `key`, `uri`, `uri_title`, `params`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES
-('bx_accounts_account', @sName, '_sys_form_account', '', '', 'do_submit', 'sys_accounts', 'id', '', '', 'a:1:{s:14:"checker_helper";s:31:"BxAccntFormAccountCheckerHelper";}', 0, 1, 'BxAccntFormAccount', 'modules/boonex/accounts/classes/BxAccntFormAccount.php');
-
-INSERT INTO `sys_form_displays` (`display_name`, `module`, `object`, `title`, `view_mode`) VALUES
-('bx_accounts_account_settings_email', @sName, 'bx_accounts_account', '_sys_form_display_account_settings_email', 0),
-('bx_accounts_account_create', @sName, 'bx_accounts_account', '_sys_form_display_account_create', 0);
-
-INSERT INTO `sys_form_inputs` (`object`, `module`, `name`, `value`, `values`, `checked`, `type`, `caption_system`, `caption`, `info`, `required`, `collapsed`, `html`, `attrs`, `attrs_tr`, `attrs_wrapper`, `checker_func`, `checker_params`, `checker_error`, `db_pass`, `db_params`, `editable`, `deletable`) VALUES
-('bx_accounts_account', @sName, 'email', '', '', 0, 'text', '_sys_form_login_input_caption_system_email', '_sys_form_account_input_email', '', 1, 0, 0, '', '', '', 'Email', '', '_sys_form_account_input_email_error', 'Xss', '', 0, 0),
-('bx_accounts_account', @sName, 'receive_updates', '1', '', 1, 'switcher', '_sys_form_login_input_caption_system_receive_updates', '_sys_form_account_input_receive_updates', '', 0, 0, 0, '', '', '', '', '', '', 'Int', '', 0, 0),
-('bx_accounts_account', @sName, 'receive_news', '1', '', 1, 'switcher', '_sys_form_login_input_caption_system_receive_news', '_sys_form_account_input_receive_news', '', 0, 0, 0, '', '', '', '', '', '', 'Int', '', 0, 0),
-('bx_accounts_account', @sName, 'do_submit', '_sys_form_account_input_submit', '', 0, 'submit', '_sys_form_login_input_caption_system_do_submit', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 0, 0),
-('bx_accounts_account', @sName, 'name', '', '', 0, 'text', '_sys_form_login_input_caption_system_name', '_sys_form_account_input_name', '', 1, 0, 0, '', '', '', 'Avail', '', '_sys_form_account_input_name_error', 'Xss', '', 1, 0),
-('bx_accounts_account', @sName, 'password', '', '', 0, 'password', '_sys_form_login_input_caption_system_password', '_sys_form_account_input_password', '', 1, 0, 0, '', '', '', 'Preg', 'a:1:{s:4:"preg";s:38:"~^(?=.*[a-z])(?=.*[A-Z])(?=.*\\d).{8,}~";}', '_sys_form_account_input_password_error', '', '', 0, 0),
-('bx_accounts_account', @sName, 'controls', '', 'do_submit,do_cancel', 0, 'input_set', '', '', '', 0, 0, 0, '', '', '', '', '', '', '', '', 0, 0),
-('bx_accounts_account', @sName, 'do_cancel', '_adm_btn_cancel_submit', '', 0, 'button', '_adm_btn_cancel_submit', '', '', 0, 0, 0, 'a:2:{s:7:"onclick";s:45:"$(''.bx-popup-applied:visible'').dolPopupHide()";s:5:"class";s:22:"bx-def-margin-sec-left";}', '', '', '', '', '', '', '', 0, 0),
-('bx_accounts_account', @sName, 'email_confirmed', '1', '', 1, 'switcher', '_bx_accnt_form_login_input_caption_system_email_confirmed', '_bx_accnt_form_account_input_email_confirmed', '', 0, 0, 0, '', '', '', '', '', '', 'Int', '', 0, 0);
-
-
-INSERT INTO `sys_form_display_inputs` (`display_name`, `input_name`, `visible_for_levels`, `active`, `order`) VALUES
-('bx_accounts_account_settings_email', 'email', 2147483647, 1, 1),
-('bx_accounts_account_settings_email', 'receive_updates', 2147483647, 1, 2),
-('bx_accounts_account_settings_email', 'receive_news', 2147483647, 1, 3),
-('bx_accounts_account_settings_email', 'controls', 2147483647, 1, 4),
-('bx_accounts_account_settings_email', 'do_submit', 2147483647, 1, 5),
-('bx_accounts_account_settings_email', 'do_cancel', 2147483647, 1, 6),
-
-('bx_accounts_account_create', 'name', 2147483647, 1, 1),
-('bx_accounts_account_create', 'email', 2147483647, 1, 2),
-('bx_accounts_account_create', 'password', 2147483647, 1, 3),
-('bx_accounts_account_create', 'email_confirmed', 2147483647, 1, 4),
-('bx_accounts_account_create', 'controls', 2147483647, 1, 5),
-('bx_accounts_account_create', 'do_submit', 2147483647, 1, 6),
-('bx_accounts_account_create', 'do_cancel', 2147483647, 1, 7);
-
-
--- STUDIO PAGE & WIDGET
-INSERT INTO `sys_std_pages`(`index`, `name`, `header`, `caption`, `icon`) VALUES
-(3, @sName, '_bx_accnt', '_bx_accnt', 'bx_accounts@modules/boonex/accounts/|std-icon.svg');
-SET @iPageId = LAST_INSERT_ID();
-
-SET @iParentPageId = (SELECT `id` FROM `sys_std_pages` WHERE `name` = 'home');
-SET @iParentPageOrder = (SELECT MAX(`order`) FROM `sys_std_pages_widgets` WHERE `page_id` = @iParentPageId);
-INSERT INTO `sys_std_widgets` (`page_id`, `module`, `type`, `url`, `click`, `icon`, `caption`, `cnt_notices`, `cnt_actions`) VALUES
-(@iPageId, @sName, 'users', '{url_studio}module.php?name=bx_accounts', '', 'bx_accounts@modules/boonex/accounts/|std-icon.svg', '_bx_accnt', '', 'a:4:{s:6:"module";s:6:"system";s:6:"method";s:11:"get_actions";s:6:"params";a:0:{}s:5:"class";s:18:"TemplStudioModules";}');
-INSERT INTO `sys_std_pages_widgets` (`page_id`, `widget_id`, `order`) VALUES
-(@iParentPageId, LAST_INSERT_ID(), IF(ISNULL(@iParentPageOrder), 1, @iParentPageOrder + 1));

+ 0 - 14
modules/boonex/accounts/updates/11.0.4_12.0.0/source/install/sql/uninstall.sql

@@ -1,14 +0,0 @@
-SET @sName = 'bx_accounts';
-
-
--- FORMS
-DELETE FROM `sys_form_display_inputs` WHERE `display_name` IN  (SELECT `display_name` FROM `sys_form_displays` WHERE `module` = @sName);
-DELETE FROM `sys_form_inputs` WHERE `module` = @sName;
-DELETE FROM `sys_form_displays` WHERE `module` = @sName;
-DELETE FROM `sys_objects_form` WHERE `module` = @sName;
-
-
--- STUDIO PAGE & WIDGET
-DELETE FROM `tp`, `tw`, `twb`, `tpw` 
-USING `sys_std_pages` AS `tp` LEFT JOIN `sys_std_widgets` AS `tw` ON `tp`.`id` = `tw`.`page_id` LEFT JOIN `sys_std_widgets_bookmarks` AS `twb` ON `tw`.`id` = `twb`.`widget_id` LEFT JOIN `sys_std_pages_widgets` AS `tpw` ON `tw`.`id` = `tpw`.`widget_id`
-WHERE  `tp`.`name` = @sName;

+ 0 - 26
modules/boonex/accounts/updates/11.0.4_12.0.0/source/js/main.js

@@ -1,26 +0,0 @@
-function BxAccntMain(oOptions) {
-	this._sActionsUri = oOptions.sActionUri;
-    this._sActionsUrl = oOptions.sActionUrl;
-    this._sObjName = oOptions.sObjName == undefined ? 'oAccntMain' : oOptions.sObjName;
-    this._aHtmlIds = oOptions.aHtmlIds == undefined ? {} : oOptions.aHtmlIds;
-    this._oRequestParams = oOptions.oRequestParams == undefined ? {} : oOptions.oRequestParams;
-}
-
-BxAccntMain.prototype.copyToClipboard = function(oElement) {
-    var $this = this;
-
-    oClipboard = new ClipboardJS('#' + this._aHtmlIds['password_button'], {
-	    target: function(oTrigger) {
-	        return $('#' + $this._aHtmlIds['password_text']).get(0);
-	    }
-	});
-	oClipboard.on('success', function(oObject) {
-		$this.hidePopup();
-	});
-};
-
-BxAccntMain.prototype.hidePopup = function() {
-	$('.bx-popup-applied:visible').dolPopupHide({onHide: function() {
-		$(this).remove();
-	}});	
-};

+ 0 - 167
modules/boonex/accounts/updates/11.0.4_12.0.0/source/js/manage_tools.js

@@ -1,167 +0,0 @@
-/**
- * Copyright (c) UNA, Inc - https://una.io
- * MIT License - https://opensource.org/licenses/MIT
- *
- * @defgroup    Accounts Accounts
- * @ingroup     UnaModules
- *
- * @{
- */
-
-function BxAccntManageTools(oOptions) {
-    this._iSearchTimeoutId = false;
-    this._sActionsUrl = oOptions.sActionUrl;    
-    this._sObjNameGrid = oOptions.sObjNameGrid;
-    this._sObjName = oOptions.sObjName == undefined ? 'oBxAccntManageTools' : oOptions.sObjName;
-
-    this._sAnimationEffect = oOptions.sAnimationEffect == undefined ? 'fade' : oOptions.sAnimationEffect;
-    this._iAnimationSpeed = oOptions.iAnimationSpeed == undefined ? 'slow' : oOptions.iAnimationSpeed;
-    this._sParamsDivider = oOptions.sParamsDivider == undefined ? '#-#' : oOptions.sParamsDivider;
-
-    this._aHtmlIds = oOptions.aHtmlIds == undefined ? {} : oOptions.aHtmlIds;
-    this._oRequestParams = oOptions.oRequestParams == undefined ? {} : oOptions.oRequestParams;
-}
-
-BxAccntManageTools.prototype.onChangeFilter = function(oFilter) {
-    var $this = this;
-    var oFilter1 = $('#bx-grid-filter1-' + this._sObjNameGrid);
-    var sValueFilter1 = oFilter1.length > 0 ? oFilter1.val() : '';
-
-    var oFilter2 = $('#bx-grid-filter2-' + this._sObjNameGrid);
-    var sValueFilter2 = oFilter2.length > 0 ? oFilter2.val() : '';
-
-    var oSearch = $('#bx-grid-search-' + this._sObjNameGrid);
-    var sValueSearch = oSearch.length > 0 ? oSearch.val() : '';
-    if(sValueSearch == _t('_sys_grid_search'))
-        sValueSearch = '';
-
-    clearTimeout($this._iSearchTimeoutId);
-    $this._iSearchTimeoutId = setTimeout(function () {
-        glGrids[$this._sObjNameGrid].setFilter(sValueFilter1 + $this._sParamsDivider + sValueFilter2 + $this._sParamsDivider + sValueSearch, true); //TODO ANT
-    }, 500);
-};
-
-BxAccntManageTools.prototype.onClickSettings = function(sMenuObject, oButton) {
-    if($(oButton).hasClass('bx-btn-disabled'))
-        return false;
-
-    bx_menu_popup(sMenuObject, oButton, {}, {
-        content_id: $(oButton).attr('bx_grid_action_data')
-    });
-};
-
-BxAccntManageTools.prototype.onClickEditEmail = function(iContentId, oLink) {
-    $('.bx-popup-applied:visible').dolPopupHide();
-
-    var oGrid = glGrids[this._sObjNameGrid];
-    var oData = oGrid._checkAppend(oLink, oGrid._getActionDataForReload());
-    oGrid.actionWithId(iContentId, 'edit_email', oData, '', false, 0);
-};
-
-BxAccntManageTools.prototype.onClickResendCemail = function(iContentId, oLink) {
-    $('.bx-popup-applied:visible').dolPopupHide();
-
-    var oGrid = glGrids[this._sObjNameGrid];
-    var oData = oGrid._checkAppend(oLink, oGrid._getActionDataForReload());
-    oGrid.actionWithId(iContentId, 'resend_cemail', oData, '', false, 0);
-};
-
-BxAccntManageTools.prototype.onClickConfirm = function (iContentId, oLink) {
-    $('.bx-popup-applied:visible').dolPopupHide();
-
-    var oGrid = glGrids[this._sObjNameGrid];
-    var oData = oGrid._checkAppend(oLink, oGrid._getActionDataForReload());
-    oGrid.actionWithId(iContentId, 'confirm', oData, '', false, 0);
-};
-
-BxAccntManageTools.prototype.onClickResetPassword = function(iContentId, oLink) {
-    $('.bx-popup-applied:visible').dolPopupHide();
-
-    var oGrid = glGrids[this._sObjNameGrid];
-    var oData = oGrid._checkAppend(oLink, oGrid._getActionDataForReload());
-    oGrid.actionWithId(iContentId, 'reset_password', oData, '', false, 0);
-};
-
-BxAccntManageTools.prototype.onClickResendRemail = function(iContentId, oLink) {
-    $('.bx-popup-applied:visible').dolPopupHide();
-
-    var oGrid = glGrids[this._sObjNameGrid];
-    var oData = oGrid._checkAppend(oLink, oGrid._getActionDataForReload());
-    oGrid.actionWithId(iContentId, 'resend_remail', oData, '', false, 0);
-};
-
-BxAccntManageTools.prototype.onClickUnlockAccount = function (iContentId, oLink) {
-    $('.bx-popup-applied:visible').dolPopupHide();
-
-    var oGrid = glGrids[this._sObjNameGrid];
-    var oData = oGrid._checkAppend(oLink, oGrid._getActionDataForReload());
-    oGrid.actionWithId(iContentId, 'unlock_account', oData, '', false, 0);
-};
-
-BxAccntManageTools.prototype.onClickDelete = function(iContentId, oLink) {
-    $('.bx-popup-applied:visible').dolPopupHide();
-
-    var oGrid = glGrids[this._sObjNameGrid];
-    var oData = oGrid._checkAppend(oLink, {});
-    oGrid.actionWithId(iContentId, 'delete', oData, '', false, 1);
-};
-
-BxAccntManageTools.prototype.onClickDeleteWithContent = function(iContentId, oLink) {
-    $('.bx-popup-applied:visible').dolPopupHide();
-
-    var oGrid = glGrids[this._sObjNameGrid];
-    var oData = oGrid._checkAppend(oLink, {});
-    oGrid.actionWithId(iContentId, 'delete_with_content', oData, '', false, 1);
-};
-
-BxAccntManageTools.prototype.onClickSetOperatorRole = function(iContentId, oLink) {
-    $('.bx-popup-applied:visible').dolPopupHide({
-        onHide: function(oPopup) {
-            $(oPopup).remove();
-        } 
-    });
-
-    var oGrid = glGrids[this._sObjNameGrid];
-    var oData = oGrid._checkAppend(oLink, oGrid._getActionDataForReload());
-    oGrid.actionWithId(iContentId, 'set_operator_role', oData, '', false, 0);
-};
-
-BxAccntManageTools.prototype.onClickSetOperatorRoleSubmit = function(oElement, iAccountId, iRole) {
-    if(!glGrids[this._sObjNameGrid])
-        return;
-
-    var oSiblings = $(oElement).parents('.bx-accnt-sr-role:first').siblings();
-    if(iRole == 0)
-        oSiblings.find('input:checked').removeAttr('checked');
-    else
-        oSiblings.find("input[value = '0']:checked").removeAttr('checked');
-
-    var sRoles = $(oElement).parents('.bx-accnt-sr-roles:first').find('input:checked').serialize();
-    glGrids[this._sObjNameGrid].actionWithId(iAccountId, 'set_operator_role_submit', {}, sRoles, false, false);
-};
-
-BxAccntManageTools.prototype.onClickMakeOperator = function(iContentId, oLink) {
-    $('.bx-popup-applied:visible').dolPopupHide({
-        onHide: function(oPopup) {
-            $(oPopup).remove();
-        } 
-    });
-
-    var oGrid = glGrids[this._sObjNameGrid];
-    var oData = oGrid._checkAppend(oLink, oGrid._getActionDataForReload());
-    oGrid.actionWithId(iContentId, 'make_operator', oData, '', false, 0);
-};
-
-BxAccntManageTools.prototype.onClickUnmakeOperator = function(iContentId, oLink) {
-    $('.bx-popup-applied:visible').dolPopupHide({
-        onHide: function(oPopup) {
-            $(oPopup).remove();
-        } 
-    });
-
-    var oGrid = glGrids[this._sObjNameGrid];
-    var oData = oGrid._checkAppend(oLink, oGrid._getActionDataForReload());
-    oGrid.actionWithId(iContentId, 'unmake_operator', oData, '', false, 0);
-};
-
-/** @} */

+ 0 - 19
modules/boonex/accounts/updates/11.0.4_12.0.0/source/template/create.html

@@ -1,19 +0,0 @@
-<div class="bx-accnt-create bx-def-color-bg-block">
-    <div class="bx-accnt-create-cnt">
-        __form__
-        <script language="javascript">
-            $(document).ready(function () {
-                $("#__form_id__").ajaxForm({ 
-                    dataType: "json",
-                    beforeSubmit: function (formData, jqForm, options) {
-                        bx_loading($("#__form_id__"), true);
-                    },
-                    success: function (data) {
-                        $(".bx-popup-applied:visible").dolPopupHide();
-                        glGrids.__object__.processJson(data, '__action__');
-                    }
-                });
-            });
-        </script>
-    </div>
-</div>

+ 0 - 19
modules/boonex/accounts/updates/11.0.4_12.0.0/source/template/css/manage_tools.css

@@ -1,19 +0,0 @@
-@import url(../../../../base/general/template/css/manage_tools.css);
-
-/*--- Set Role popup ---*/
-.bx-accnt-sr-role-cnt {
-    display: -webkit-flex;
-    display: flex;
-    -webkit-align-items: center;
-    align-items: center;
-}
-.bx-accnt-sr-role-cnt > * {
-    display: inline-block;
-}
-.bx-accnt-sr-role-cnt > input {
-    margin: 0;
-}
-.bx-accnt-sr-done .bx-btn {
-    display: inline-block;
-    float: none;
-}

+ 0 - 19
modules/boonex/accounts/updates/11.0.4_12.0.0/source/template/edit_email.html

@@ -1,19 +0,0 @@
-<div class="bx-accnt-edit-email bx-def-color-bg-block">
-    <div class="bx-accnt-edit-email-cnt">
-        __form__
-        <script language="javascript">
-            $(document).ready(function () {
-                $("#__form_id__").ajaxForm({ 
-                    dataType: "json",
-                    beforeSubmit: function (formData, jqForm, options) {
-                        bx_loading($("#__form_id__"), true);
-                    },
-                    success: function (data) {
-                        $(".bx-popup-applied:visible").dolPopupHide();
-                        glGrids.__object__.processJson(data, '__action__');
-                    }
-                });
-            });
-        </script>
-    </div>
-</div>

+ 0 - 15
modules/boonex/accounts/updates/11.0.4_12.0.0/source/template/set_role_popup.html

@@ -1,15 +0,0 @@
-<div class="bx-accnt-set-role">
-    <div class="bx-accnt-sr-roles">
-        <bx_repeat:roles>
-            <div class="bx-accnt-sr-role bx-def-round-corners bx-def-color-bg-hl-hover">
-                <div class="bx-accnt-sr-role-cnt bx-def-padding-leftright bx-def-padding-sec-topbottom">
-                    <input type="checkbox" id="__id__" name="role[]" value="__value__" onclick="__onclick__"<bx_if:show_checked> checked="checked"</bx_if:show_checked> />
-                    <label class="bx-def-margin-sec-left" for="__id__">__title__</label>
-                </div>
-            </div>
-        </bx_repeat:roles>
-    </div>
-    <div class="bx-accnt-sr-done bx-def-margin-sec-topbottom bx-def-font-align-center">
-        <a class="bx-btn" href="javascript:void(0)" onclick="javascript:$('.bx-popup-applied:visible').dolPopupHide();"><bx_text:_sys_done /></a>
-    </div>
-</div>

+ 0 - 51
modules/boonex/accounts/updates/12.0.0_12.0.1/install/config.php

@@ -1,51 +0,0 @@
-<?php
-/**
- * Copyright (c) UNA, Inc - https://una.io
- * MIT License - https://opensource.org/licenses/MIT
- */
-
-$aConfig = array(
-    /**
-     * Main Section.
-     */
-    'title' => 'Accounts Manager',
-    'version_from' => '12.0.0',
-    'version_to' => '12.0.1',
-    'vendor' => 'BoonEx',
-
-    'compatible_with' => array(
-        '12.0.0-B2'
-    ),
-
-    /**
-     * 'home_dir' and 'home_uri' - should be unique. Don't use spaces in 'home_uri' and the other special chars.
-     */
-    'home_dir' => 'boonex/accounts/updates/update_12.0.0_12.0.1/',
-    'home_uri' => 'accounts_update_1200_1201',
-
-    'module_dir' => 'boonex/accounts/',
-    'module_uri' => 'accounts',
-
-    'db_prefix' => 'bx_accnt_',
-    'class_prefix' => 'BxAccnt',
-
-    /**
-     * Installation/Uninstallation Section.
-     */
-    'install' => array(
-        'execute_sql' => 0,
-        'update_files' => 1,
-        'update_languages' => 1,
-        'clear_db_cache' => 0,
-    ),
-
-    /**
-     * Category for language keys.
-     */
-    'language_category' => 'Accounts',
-
-    /**
-     * Files Section
-     */
-    'delete_files' => array(),
-);

+ 0 - 13
modules/boonex/accounts/updates/12.0.0_12.0.1/install/installer.php

@@ -1,13 +0,0 @@
-<?php
-/**
- * Copyright (c) UNA, Inc - https://una.io
- * MIT License - https://opensource.org/licenses/MIT
- */
-
-class BxAccntUpdater extends BxDolStudioUpdater
-{
-    function __construct($aConfig)
-    {
-        parent::__construct($aConfig);
-    }
-}

+ 0 - 4
modules/boonex/accounts/updates/12.0.0_12.0.1/install/langs/en.xml

@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<resources name="en" flag="gb" title="English">
-	<string_add name="_bx_accnt_grid_filter_item_title_adm_without_profile"><![CDATA[Without profile]]></string_add>
-</resources>

+ 0 - 97
modules/boonex/accounts/updates/12.0.0_12.0.1/source/classes/BxAccntConfig.php

@@ -1,97 +0,0 @@
-<?php defined('BX_DOL') or die('hack attempt');
-/**
- * Copyright (c) UNA, Inc - https://una.io
- * MIT License - https://opensource.org/licenses/MIT
- *
- * @defgroup    Accounts Accounts
- * @ingroup     UnaModules
- *
- * @{
- */
-
-class BxAccntConfig extends BxBaseModGeneralConfig
-{
-    protected $_oDb;
-    protected $_aHtmlIds;
-
-    /**
-     * Constructor
-     */
-    public function __construct($aModule)
-    {
-        parent::__construct($aModule);
-
-        $this->CNF = array (
-        	// page URIs
-        	'URL_MANAGE_ADMINISTRATION' => 'page.php?i=accounts-administration',
-
-	        // objects
-	        'OBJECT_FORM_ACCOUNT' => 'bx_accounts_account',
-            'OBJECT_FORM_ACCOUNT_DISPLAY_SETTINGS_EMAIL' => 'bx_accounts_account_settings_email',
-            'OBJECT_FORM_ACCOUNT_DISPLAY_CREATE' => 'bx_accounts_account_create',
-	        'OBJECT_MENU_MANAGE_TOOLS' => 'bx_accounts_menu_manage_tools', //manage menu in content administration tools
-        	'OBJECT_GRID_ADMINISTRATION' => 'bx_accounts_administration',
-        	'OBJECT_GRID_MODERATION' => 'bx_accounts_moderation',
-
-        	// some language keys
-            'T' => array (
-        		'grid_action_err_delete' => '_bx_accnt_grid_action_err_delete',
-        		'grid_action_err_perform' => '_bx_accnt_grid_action_err_perform',
-            	'filter_item_active' => '_bx_accnt_grid_filter_item_title_adm_active',
-                'filter_item_operators' => '_bx_accnt_grid_filter_item_title_adm_operators',
-            	'filter_item_pending' => '_bx_accnt_grid_filter_item_title_adm_pending',
-            	'filter_item_suspended' => '_bx_accnt_grid_filter_item_title_adm_suspended',
-                'filter_item_unconfirmed' => '_bx_accnt_grid_filter_item_title_adm_unconfirmed',
-                'filter_item_locked' => '_bx_accnt_grid_filter_item_title_adm_locked',
-                'filter_item_without_profile' => '_bx_accnt_grid_filter_item_title_adm_without_profile',
-            	'filter_item_select_one_filter1' => '_bx_accnt_grid_filter_item_title_adm_select_one_filter1',
-                'filter_item_select_one_filter2' => '_bx_accnt_grid_filter_item_title_adm_select_one_filter2',
-        	)
-        );
-
-        $this->_aObjects = array(
-        	'alert' => $this->_sName,
-        );
-
-        $this->_aJsClasses = array(
-        	'main' => 'BxAccntMain',
-        	'manage_tools' => 'BxAccntManageTools'
-        );
-
-        $this->_aJsObjects = array(
-        	'main' => 'oBxAccntMain',
-        	'manage_tools' => 'oBxAccntManageTools'
-        );
-
-        $this->_aGridObjects = array(
-        	'moderation' => $this->CNF['OBJECT_GRID_MODERATION'],
-        	'administration' => $this->CNF['OBJECT_GRID_ADMINISTRATION'],
-        	
-        );
-
-        $sHtmlPrefix = str_replace('_', '-', $this->_sName);
-        $this->_aHtmlIds = array(
-        	'profile' => $sHtmlPrefix . '-profile-',
-        	'profile_more_popup' => $sHtmlPrefix . '-profile-more-popup-',
-
-        	'password_text' => $sHtmlPrefix . '-txt-password',
-            'password_button' => $sHtmlPrefix . '-btn-copy',
-        	'password_popup' => $sHtmlPrefix . '-password-popup',
-        );
-    }
-
-    public function init(&$oDb)
-    {
-        $this->_oDb = &$oDb;
-    }
-
-	public function getHtmlIds($sKey = '')
-    {
-        if(empty($sKey))
-            return $this->_aHtmlIds;
-
-        return isset($this->_aHtmlIds[$sKey]) ? $this->_aHtmlIds[$sKey] : '';
-    }
-}
-
-/** @} */

+ 0 - 587
modules/boonex/accounts/updates/12.0.0_12.0.1/source/classes/BxAccntGridAdministration.php

@@ -1,587 +0,0 @@
-<?php defined('BX_DOL') or die('hack attempt');
-/**
- * Copyright (c) UNA, Inc - https://una.io
- * MIT License - https://opensource.org/licenses/MIT
- *
- * @defgroup    Accounts Accounts
- * @ingroup     UnaModules
- * 
- * @{
- */
-
-class BxAccntGridAdministration extends BxBaseModProfileGridAdministration
-{
-    protected $_sFilter2Name;
-	protected $_sFilter2Value;
-	protected $_aFilter2Values;
-    
-    public function __construct ($aOptions, $oTemplate = false)
-    {
-    	$this->MODULE = 'bx_accounts';
-        parent::__construct ($aOptions, $oTemplate);
-
-        $CNF = &$this->_oModule->_oConfig->CNF;
-        $this->_aFilter1Values = array_merge($this->_aFilter1Values, array(
-            'unconfirmed' => $CNF['T']['filter_item_unconfirmed'],
-            'locked' => $CNF['T']['filter_item_locked'],
-            'without_profile' => $CNF['T']['filter_item_without_profile'],
-        ));
-
-        $this->_sFilter2Name = 'filter2';
-        $this->_aFilter2Values = array(
-            'operators' => $CNF['T']['filter_item_operators']
-        );
-
-        $sFilter2 = bx_get($this->_sFilter2Name);
-        if(!empty($sFilter2)) {
-            $this->_sFilter2Value = bx_process_input($sFilter2);
-            $this->_aQueryAppend[$this->_sFilter2Name] = $this->_sFilter2Value;
-        }
-    }
-
-    protected function _getDataSql($sFilter, $sOrderField, $sOrderDir, $iStart, $iPerPage)
-    {
-        if(strpos($sFilter, $this->_sParamsDivider) !== false)
-            list($this->_sFilter1Value, $this->_sFilter2Value, $sFilter) = explode($this->_sParamsDivider, $sFilter);
-
-    	if(!empty($this->_sFilter1Value))
-            switch($this->_sFilter1Value) {
-                case 'unconfirmed':
-                    $sCnfnType = getParam('sys_account_confirmation_type');
-                    switch($sCnfnType) {
-                        case 'email':
-                            $this->_aOptions['source'] .= " AND `ta`.`email_confirmed`='0'";
-                            break;
-                        case 'phone':
-                            $this->_aOptions['source'] .= " AND `ta`.`phone_confirmed`='0'";
-                            break;
-                        case 'email_and_phone':
-                            $this->_aOptions['source'] .= " AND (`ta`.`email_confirmed`='0' OR `ta`.`phone_confirmed`='0')";
-                            break;
-                    }
-                    break;
-
-                case 'locked':
-                    $this->_aOptions['source'] .= " AND `ta`.`locked` = 1";
-                    break;
-                
-                case 'without_profile':
-                    $this->_aOptions['source'] .= " AND `ta`.`id` NOT IN (SELECT `account_id` FROM `sys_profiles` WHERE `type` <> 'system')";
-                    break;
-
-                default:
-        	        $this->_aOptions['source'] .= $this->_oModule->_oDb->prepareAsString(" AND `tp`.`status`=?", $this->_sFilter1Value);
-            }
-
-        if(!empty($this->_sFilter2Value))
-        	$this->_aOptions['source'] .= $this->_oModule->_oDb->prepareAsString(" AND `ta`.`role` & " . BX_DOL_ROLE_ADMIN ." = " . BX_DOL_ROLE_ADMIN);
-
-        return parent::_getDataSqlInner($sFilter, $sOrderField, $sOrderDir, $iStart, $iPerPage);
-    }
-    
-    protected function _getFilterControls()
-    {
-        parent::_getFilterControls();
-
-        return  $this->_getFilterSelectOne($this->_sFilter1Name, $this->_sFilter1Value, $this->_aFilter1Values) . $this->_getFilterSelectOne($this->_sFilter2Name, $this->_sFilter2Value, $this->_aFilter2Values) . $this->_getSearchInput();
-    }
-    
-    public function getCode($isDisplayHeader = true)
-    {
-        return $this->_oModule->_oTemplate->getJsCode('main', array(
-        	'aHtmlIds' => $this->_oModule->_oConfig->getHtmlIds()
-        )) . parent::getCode($isDisplayHeader);
-    }
-
-    public function performActionActivate()
-    {
-    	$this->_performActionEnable(true);
-    }
-
-	public function performActionSuspend()
-    {
-    	$this->_performActionEnable(false);
-    }
-
-    public function performActionEditEmail()
-    {
-        $CNF = &$this->_oModule->_oConfig->CNF;
-
-        $aIds = bx_get('ids');
-        if(!$aIds || !is_array($aIds)) {
-            $iId = (int)bx_get('id');
-            if(!$iId)
-                return echoJson(array());
-
-            $aIds = array($iId);
-        }
-
-        $iId = $aIds[0];
-        $oAccount = BxDolAccount::getInstance($iId);
-        if(!$oAccount)
-            return echoJson(array());
-
-        $aAccount = $oAccount->getInfo();
-        $sAction = 'edit_email';
-
-        $oForm = BxDolForm::getObjectInstance($CNF['OBJECT_FORM_ACCOUNT'], $CNF['OBJECT_FORM_ACCOUNT_DISPLAY_SETTINGS_EMAIL']);
-        $oForm->aFormAttrs['action'] = BX_DOL_URL_ROOT . 'grid.php?o=' . $this->_sObject . '&a=' . $sAction . '&id=' . $iId;
-        $oForm->initChecker($aAccount);
-
-        if($oForm->isSubmittedAndValid()) {
-            $sEmail = $oForm->getCleanValue('email');
-            if(strcmp($aAccount['email'], $sEmail) !== 0 && BxDolAccountQuery::getInstance()->getIdByEmail($sEmail))
-                return echoJson(array('msg' => _t('_sys_form_account_input_email_uniq_error_loggedin')));
-
-            if($oForm->update($aAccount['id'])) {
-                bx_alert('account', 'edited', $aAccount['id'], BxDolAccount::getInstance()->id(), array('display' => $CNF['OBJECT_FORM_ACCOUNT_DISPLAY_SETTINGS_EMAIL']));
-
-                $aRes = array('grid' => $this->getCode(false), 'blink' => $iId);
-                
-                $oAccount->doAudit($iId, '_sys_audit_action_account_email_changed', array('old_email' => $oAccount->getEmail(), 'new_email' => $sEmail));
-            }
-            else
-                $aRes = array('msg' => _t('_sys_txt_error_account_update'));
-
-            echoJson($aRes);
-        }
-        else {
-            $sContent = BxTemplStudioFunctions::getInstance()->popupBox('bx-account-edit-email-popup', _t('_bx_accounts_form_display_account_settings_email_popup'), $this->_oModule->_oTemplate->parseHtmlByName('edit_email.html', array(
-                'form_id' => $oForm->id,
-                'form' => $oForm->getCode(true),
-                'object' => $this->_sObject,
-                'action' => $sAction
-            )));
-
-            echoJson(array('popup' => array('html' => $sContent, 'options' => array('closeOnOuterClick' => false))));
-        }
-    }
-    
-    public function performActionAdd()
-    {
-      
-        $CNF = &$this->_oModule->_oConfig->CNF;
-        $sAction = 'add';
-        $oForm = BxDolForm::getObjectInstance($CNF['OBJECT_FORM_ACCOUNT'], $CNF['OBJECT_FORM_ACCOUNT_DISPLAY_CREATE']);
-        $oForm->aFormAttrs['action'] = BX_DOL_URL_ROOT . 'grid.php?o=' . $this->_sObject . '&a=' . $sAction;
-        $oForm->initChecker();
-
-        if($oForm->isSubmittedAndValid()) {
-           
-            $iAccountId = $oForm->insert();
-            
-            if (!$iAccountId) {
-                $aRes = array('msg' => _t('_sys_txt_error_account_insert'));
-            }
-            else{
-                $aRes = array('grid' => $this->getCode(false), 'blink' => $iAccountId);
-                
-                $oBxTemplAccountForms = new BxTemplAccountForms();
-                
-                $iProfileId = $oBxTemplAccountForms->onAccountCreated($iAccountId, $oForm->isSetPendingApproval(), BX_PROFILE_ACTION_MANUAL, false);
-
-                // perform action
-                BxDolAccount::isAllowedCreate ($iProfileId, true);
-                
-                // check
-                $aModulesProfile = array(); 
-                $aModules = BxDolModuleQuery::getInstance()->getModulesBy(array('type' => 'modules', 'active' => 1));
-                foreach($aModules as $aModule) {
-                    $oModule = BxDolModule::getInstance($aModule['name']);
-                    if($oModule instanceof iBxDolProfileService && BxDolService::call($aModule['name'], 'act_as_profile') === true)
-                        $aModulesProfile[] = $aModule;
-                }
-
-                $sDefaultProfileType = getParam('sys_account_default_profile_type');
-                if(count($aModulesProfile) == 1)
-                    $sProfileModule = $aModulesProfile[0]['name'];
-                else if(!empty($sDefaultProfileType)) 
-                    $sProfileModule = $sDefaultProfileType;
-
-                if (getParam('sys_account_auto_profile_creation') && !empty($sProfileModule)) {
-                    $oAccount = BxDolAccount::getInstance($iAccountId);
-                    $aProfileInfo = BxDolService::call($sProfileModule, 'prepare_fields', array(array(
-                        'author' => $iProfileId,
-                        'name' => $oAccount->getDisplayName(),
-                    )));
-                    $a = BxDolService::call($sProfileModule, 'entity_add', array($iProfileId, $aProfileInfo));
-                    if (isset($a['content']['profile_id']) && (int)$a['content']['profile_id'] > 0){
-                        BxDolAcl::getInstance()->setMembership((int)$a['content']['profile_id'], MEMBERSHIP_ID_STANDARD);
-                    }
-                    echoJson($aRes);
-                }
-            }
-        }
-        else {
-            $sContent = BxTemplStudioFunctions::getInstance()->popupBox('bx-account-edit-email-popup', _t('_bx_accounts_form_display_account_create_popup'), $this->_oModule->_oTemplate->parseHtmlByName('create.html', array(
-                'form_id' => $oForm->id,
-                'form' => $oForm->getCode(true),
-                'object' => $this->_sObject,
-                'action' => $sAction
-            )));
-
-            echoJson(array('popup' => array('html' => $sContent, 'options' => array('closeOnOuterClick' => false))));
-        }
-    }
-    
-    public function performActionConfirm()
-    {
-        $CNF = &$this->_oModule->_oConfig->CNF;
-
-    	$aIds = bx_get('ids');
-        if(!$aIds || !is_array($aIds))
-            return echoJson(array());
-
-        $oAccount = BxDolAccount::getInstance();
-
-        $iAffected = 0;
-        $aIdsAffected = array();
-        foreach($aIds as $iId){
-            if (BxDolAccount::isNeedConfirmEmail()) {
-                if($oAccount->updateEmailConfirmed(true, true, $iId)) {
-                    $aIdsAffected[] = $iId;
-                    $iAffected++;  
-                }
-            }
-
-            if (BxDolAccount::isNeedConfirmPhone()){
-                if($oAccount->updatePhoneConfirmed(true, $iId)) {
-                    $aIdsAffected[] = $iId;
-                    $iAffected++;  
-                }
-            }
-        }
-		echoJson($iAffected ? array('grid' => $this->getCode(false), 'blink' => $aIdsAffected) : array('msg' => _t($CNF['T']['grid_action_err_perform'])));
-    }
-    
-    public function performActionResendCemail()
-    {
-        $CNF = &$this->_oModule->_oConfig->CNF;
-
-        $aIds = bx_get('ids');
-        if(!$aIds || !is_array($aIds))
-            return echoJson(array());
-
-        $oAccount = BxDolAccount::getInstance();
-
-        $iAffected = 0;
-        $aIdsAffected = array();
-        foreach($aIds as $iId)
-            if($oAccount->sendConfirmationEmail($iId)) {
-                $aIdsAffected[] = $iId;
-                $iAffected++;  
-            }
-
-        echoJson($iAffected ? array('grid' => $this->getCode(false), 'blink' => $aIdsAffected) : array('msg' => _t($CNF['T']['grid_action_err_perform'])));
-    }
-
-    public function performActionResetPassword()
-    {
-    	$aIds = bx_get('ids');
-        if(!$aIds || !is_array($aIds))
-            return echoJson(array());
-
-        $iId = $aIds[0];
-        $oAccount = BxDolAccount::getInstance($iId);
-        if(!$oAccount)
-            return echoJson(array());
-
-        $aRes = array();
-        $sPwd = genRndPwd();
-        if (BxDolAccount::getInstance()->updatePassword($sPwd, $iId)){
-            $sPopupId = $this->_oModule->_oConfig->getHtmlIds('password_popup');
-            $sPopupTitle = _t('_bx_accounts_form_display_account_settings_password_popup');
-            $sPopupContent = $this->_oModule->_oTemplate->parseHtmlByName('reset_password.html', array(
-                'js_object' => $this->_oModule->_oConfig->getJsObject('main'),
-                'html_id_text' => $this->_oModule->_oConfig->getHtmlIds('password_text'),
-                'html_id_button' => $this->_oModule->_oConfig->getHtmlIds('password_button'),
-                'password' => $sPwd,
-            ));
-
-            $aRes = array('popup' => BxTemplStudioFunctions::getInstance()->popupBox($sPopupId, $sPopupTitle, $sPopupContent));
-        }
-        else 
-            $aRes = array('msg' => _t('_bx_accnt_grid_action_err_perform'));
-
-        return echoJson($aRes);
-    }
-
-    public function performActionResendRemail()
-    {
-        $CNF = &$this->_oModule->_oConfig->CNF;
-
-        $aIds = bx_get('ids');
-        if(!$aIds || !is_array($aIds))
-            return echoJson(array());
-
-        $oAccount = BxDolAccount::getInstance();
-
-        $iAffected = 0;
-        $aIdsAffected = array();
-        foreach($aIds as $iId)
-            if($oAccount->sendResetPasswordEmail($iId)) {
-                $aIdsAffected[] = $iId;
-                $iAffected++;  
-            }
-
-        echoJson($iAffected ? array('grid' => $this->getCode(false), 'blink' => $aIdsAffected) : array('msg' => _t($CNF['T']['grid_action_err_perform'])));
-    }
-
-    public function performActionUnlockAccount()
-    {
-    	$aIds = bx_get('ids');
-        if(!$aIds || !is_array($aIds)) {
-            echoJson(array());
-            return;
-        }
-
-        $oAccountQuery = BxDolAccountQuery::getInstance();
-        foreach($aIds as $iId) {
-            $oAccount = BxDolAccount::getInstance($iId);
-            if(!$oAccount)
-                continue;
-
-            if ($oAccount->isLocked()){
-                $oAccountQuery->unlockAccount($iId);
-            }
-            
-            $oAccount->doAudit($iId, '_sys_audit_action_account_unlock');
-        }
-
-        return echoJson(array('grid' => $this->getCode(false), 'blink' => $aIds));
-    }
-
-    public function performActionSetOperatorRole()
-    {
-    	$aIds = bx_get('ids');
-        if(!$aIds || !is_array($aIds))
-            return echoJson(array());
-        
-        $oUtils = BxDolStudioRolesUtils::getInstance();
-
-        $aRoles = $oUtils->getRoles();
-        if(empty($aRoles) || !is_array($aRoles))
-            return echoJson(array('msg' => _t('_sys_txt_error_occured')));
-
-        $iId = (int)array_shift($aIds);
-
-        $sPopupName = str_replace('_', '-', $this->MODULE) . '-set-role-popup';
-        $sPopupContent = $this->_oModule->_oTemplate->getPopupSetRole($aRoles, $iId, $oUtils->getRole($iId));
-
-        return echoJson(array('popup' => array(
-            'html' => BxTemplFunctions::getInstance()->transBox($sPopupName, $sPopupContent),
-            'options' => array(
-                'closeOnOuterClick' => true,
-                'removeOnClose' => true
-            )
-        )));
-    }
-
-    public function performActionSetOperatorRoleSubmit()
-    {
-        $aIds = bx_get('ids');
-        if(!$aIds || !is_array($aIds))
-            return echoJson(array());
-
-        $iId = (int)array_shift($aIds);
-        if(!$iId)
-            return echoJson(array('msg' => _t('_sys_txt_error_occured')));
-
-        if(!BxDolStudioRolesUtils::getInstance()->setRole($iId, bx_process_input(bx_get('role'), BX_DATA_INT)))
-            return echoJson(array('msg' => _t('_error occured')));
-
-        echoJson(array('grid' => $this->getCode(false), 'blink' => $iId));
-    }
-
-    public function performActionMakeOperator()
-    {
-    	$this->_performActionChangeRole(3);
-    }
-
-    public function performActionUnmakeOperator()
-    {
-    	$this->_performActionChangeRole(1);
-    }
-
-    protected function _performActionChangeRole($iRole)
-    {
-        $CNF = &$this->_oModule->_oConfig->CNF;
-
-        $aIds = bx_get('ids');
-        if(!$aIds || !is_array($aIds))
-            return echoJson(array());
-
-        $oAccount = BxDolAccount::getInstance();
-        $oUtils = BxDolStudioRolesUtils::getInstance();
-
-        $iAffected = 0;
-        $aIdsAffected = array();
-        foreach($aIds as $iId) {
-            if(!$this->_oModule->_oDb->updateAccount(array('role' => $iRole), array('id' => $iId))) 
-                continue;
-
-            $oUtils->setRole($iId, $iRole == 3 ? BX_DOL_STUDIO_ROLE_OPERATOR : 0);
-
-            $oAccount->doAudit($iId, '_sys_audit_action_account_change_role_to_' . $iRole);
-
-            $aIdsAffected[] = $iId;
-            $iAffected++;
-        }
-
-        echoJson($iAffected ? array('grid' => $this->getCode(false), 'blink' => $aIdsAffected) : array('msg' => _t($CNF['T']['grid_action_err_perform'])));
-    }
-
-    protected function _performActionEnable($isChecked)
-    {
-    	$CNF = &$this->_oModule->_oConfig->CNF;
-
-    	$aIds = bx_get('ids');
-        if(!$aIds || !is_array($aIds)) {
-            echoJson(array());
-            return;
-        }
-        $iAffected = 0;
-        $aIdsAffected = array();
-        foreach($aIds as $iId)
-        	if($this->_enable($iId, $isChecked)) {
-        		$aIdsAffected[] = $iId;
-        		$iAffected++;
-                
-                $oAccount = BxDolAccount::getInstance($iId);
-                $oAccount->doAudit($iId, '_sys_audit_action_account_' . $isChecked ? 'activated' : 'suspended');
-        	}
-
-        echoJson($iAffected ? array('grid' => $this->getCode(false), 'blink' => $aIdsAffected) : array('msg' => _t($CNF['T']['grid_action_err_perform'])));
-    }
-
-    protected function _enable($mixedId, $isChecked)
-    {
-    	$oProfile = BxDolProfile::getInstanceAccountProfile($mixedId);
-    	if(!$oProfile)
-    	    return false;
-
-        $iAction = BX_PROFILE_ACTION_MANUAL;
-        $sMethod = $isChecked ? 'activate' : 'suspend';
-        if(!$oProfile->$sMethod($iAction, 0 ,false))
-            return false;
-
-        sendMailTemplate('t_ChangeStatusAccount' . ucfirst($sMethod), $oProfile->getAccountObject()->id(), $oProfile->id(), array(), BX_EMAIL_SYSTEM);
-        
-        $aProfiles = $oProfile->getAccountObject()->getProfiles();
-        foreach($aProfiles as $aProfile){
-            BxDolProfile::getInstance($aProfile['id'])->$sMethod($iAction, 0 ,false);
-        }
-        
-    	return true;
-    }
-
-    //--- Layout methods ---//
-    protected function _getActionEditEmail($sType, $sKey, $a, $isSmall = false, $isDisabled = false, $aRow = array())
-    {
-        return '';
-    }
-    
-    protected function _getCellEmailConfirmed($mixedValue, $sKey, $aField, $aRow)
-    {
-    	$mixedValue = (int)$mixedValue == 1 ? '_Yes' : '_No';
-        return parent::_getCellDefault(_t($mixedValue), $sKey, $aField, $aRow);
-    }
-
-    protected function _getActionResetPassword($sType, $sKey, $a, $isSmall = false, $isDisabled = false, $aRow = array())
-    {
-        return '';
-    }
-
-    protected function _getActionResendRemail($sType, $sKey, $a, $isSmall = false, $isDisabled = false, $aRow = array())
-    {
-        if($sType == 'single')
-            return '';
-
-        return parent::_getActionDefault ($sType, $sKey, $a, $isSmall, $isDisabled, $aRow);
-    }
-
-    protected function _getActionUnlockAccount($sType, $sKey, $a, $isSmall = false, $isDisabled = false, $aRow = array())
-    {
-        return '';
-    }
-
-    protected function _getCellName($mixedValue, $sKey, $aField, $aRow)
-    {
-        $oAccount = BxDolAccount::getInstance($aRow['id']);
-        if ($oAccount)
-            $s = ($aRow['locked'] == 1 ? $this->_oTemplate->parseIcon("lock col-red1") . ' ' : '') . $oAccount->getDisplayName();
-        return parent::_getCellDefault ($s, $sKey, $aField, $aRow);
-    }
-    
-	protected function _getCellProfiles($mixedValue, $sKey, $aField, $aRow)
-    {
-        $s = $this->_oModule->_oTemplate->getProfilesByAccount($aRow);
-
-        return parent::_getCellDefault ($s, $sKey, $aField, $aRow);
-    }
-
-    protected function _getCellLogged($mixedValue, $sKey, $aField, $aRow)
-    {
-        $mixedValue = !empty($mixedValue) ? bx_time_js($mixedValue) : _t('_sys_not_available');
-
-        return parent::_getCellDefault($mixedValue, $sKey, $aField, $aRow);
-    } 
-    
-    protected function _getCellAdded($mixedValue, $sKey, $aField, $aRow)
-    {
-        $mixedValue = !empty($mixedValue) ? bx_time_js($mixedValue) : _t('_sys_not_available');
-
-        return parent::_getCellDefault($mixedValue, $sKey, $aField, $aRow);
-    } 
-    
-    protected function _getCellIsConfirmed($mixedValue, $sKey, $aField, $aRow)
-    {
-        $oAccount = BxDolAccount::getInstance($aRow['id']);
-        $s = "";
-        if ($oAccount)
-            $s = $oAccount->getCurrentConfirmationStatusValue();
-        return parent::_getCellDefault(_t('_bx_accnt_grid_confirmation_status_' . $s), $sKey, $aField, $aRow);
-    }
-
-    protected function _isCheckboxDisabled($aRow)
-    {
-        return false;
-    }
-
-	protected function _getContentInfo($iId)
-    {
-    	return BxDolAccountQuery::getInstance()->getInfoById($iId);
-    }
-
-	protected function _doDelete($iId, $aParams = array())
-    {
-    	return BxDolAccount::getInstance($iId)->delete(isset($aParams['with_content']) && $aParams['with_content'] === true);
-    }
-    
-    
-
-    protected function _addJsCss()
-    {
-        parent::_addJsCss();
-        
-        $this->_oTemplate->addJs(array(
-            'main.css'
-        ));
-
-        $this->_oTemplate->addJs(array(
-        	'jquery.form.min.js',
-            'clipboard.min.js',
-            'main.js'
-        ));
-    }
-
-    protected function _isVisibleGrid($a)
-    {
-        if(isAdmin())
-            return true;
-        
-        return parent::_isVisibleGrid($a);
-    }
-}
-
-/** @} */

+ 0 - 71
modules/boonex/accounts/updates/12.0.0_12.0.1/source/install/config.php

@@ -1,71 +0,0 @@
-<?php
-/**
- * Copyright (c) UNA, Inc - https://una.io
- * MIT License - https://opensource.org/licenses/MIT
- *
- * @defgroup    Accounts Accounts
- * @ingroup     UnaModules
- *
- * @{
- */
-
-$aConfig = array(
-    /**
-     * Main Section.
-     */
-    'type' => BX_DOL_MODULE_TYPE_MODULE,
-    'name' => 'bx_accounts',
-    'title' => 'Accounts Manager',
-    'note' => 'Accounts Manager module.',
-    'version' => '12.0.1',
-    'vendor' => 'BoonEx',
-    'help_url' => 'http://feed.una.io/?section={module_name}',
-
-    'compatible_with' => array(
-        '12.0.0-B2'
-    ),
-
-    /**
-     * 'home_dir' and 'home_uri' - should be unique. Don't use spaces in 'home_uri' and the other special chars.
-     */
-    'home_dir' => 'boonex/accounts/',
-    'home_uri' => 'accounts',
-
-    'db_prefix' => 'bx_accnt_',
-    'class_prefix' => 'BxAccnt',
-
-    /**
-     * Category for language keys.
-     */
-    'language_category' => 'Accounts',
-
-    /**
-     * Installation/Uninstallation Section.
-     */
-    'install' => array(
-        'execute_sql' => 1,
-        'update_languages' => 1,
-        'clear_db_cache' => 1,
-    ),
-    'uninstall' => array (
-        'execute_sql' => 1,
-        'update_languages' => 1,
-        'clear_db_cache' => 1,
-    ),
-    'enable' => array(
-        'execute_sql' => 1,
-        'clear_db_cache' => 1,
-    ),
-    'disable' => array (
-        'execute_sql' => 1,
-        'clear_db_cache' => 1,
-    ),
-
-    /**
-     * Dependencies Section
-     */
-    'dependencies' => array(),
-
-);
-
-/** @} */

+ 0 - 93
modules/boonex/accounts/updates/12.0.0_12.0.1/source/install/langs/en.xml

@@ -1,93 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<resources name="en" flag="gb" title="English">
-    <string name="_bx_accnt"><![CDATA[Accounts]]></string>
-    <string name="_bx_accounts"><![CDATA[Accounts]]></string>
-
-    <string name="_bx_accounts_form_display_account_settings_email_popup"><![CDATA[Edit Email]]></string>
-    <string name="_bx_accounts_form_display_account_create_popup"><![CDATA[Create new Account]]></string>
-    <string name="_bx_accounts_form_display_account_settings_password_popup"><![CDATA[Reset Password]]></string>
-
-    <string name="_bx_accnt_page_title_sys_manage_administration"><![CDATA[Manage All Accounts]]></string>
-    <string name="_bx_accnt_page_title_manage"><![CDATA[Manage Accounts]]></string>
-    <string name="_bx_accnt_page_title_browse"><![CDATA[Accounts]]></string>
-
-    <string name="_bx_accnt_page_block_title_system_manage_administration"><![CDATA[Manage All Accounts]]></string>
-    <string name="_bx_accnt_page_block_title_manage"><![CDATA[Manage Accounts]]></string>
-
-    <string name="_bx_accnt_menu_set_title_manage_tools"><![CDATA[Manage Tools Submenu]]></string>
-    <string name="_bx_accnt_menu_title_manage_tools"><![CDATA[Manage Tools Submenu]]></string>
-    <string name="_bx_accnt_menu_item_title_system_resend_cemail"><![CDATA[Resend Confirmation]]></string>
-    <string name="_bx_accnt_menu_item_title_resend_cemail"><![CDATA[Resend Confirmation]]></string>
-    <string name="_bx_accnt_menu_item_title_system_confirm"><![CDATA[Confirm]]></string>
-    <string name="_bx_accnt_menu_item_title_confirm"><![CDATA[Confirm]]></string>
-    <string name="_bx_accnt_menu_item_title_system_edit_email"><![CDATA[Edit Email]]></string>
-    <string name="_bx_accnt_menu_item_title_edit_email"><![CDATA[Edit Email]]></string>
-    <string name="_bx_accnt_menu_item_title_system_reset_password"><![CDATA[Reset Password]]></string>
-    <string name="_bx_accnt_menu_item_title_reset_password"><![CDATA[Reset Password]]></string>
-    <string name="_bx_accnt_menu_item_title_system_resend_remail"><![CDATA[Resend Reset Password]]></string>
-    <string name="_bx_accnt_menu_item_title_resend_remail"><![CDATA[Resend Reset Password]]></string>
-    <string name="_bx_accnt_menu_item_title_system_unlock_account"><![CDATA[Unlock]]></string>
-    <string name="_bx_accnt_menu_item_title_unlock_account"><![CDATA[Unlock]]></string>
-    <string name="_bx_accnt_menu_item_title_system_delete"><![CDATA[Delete]]></string>
-    <string name="_bx_accnt_menu_item_title_delete"><![CDATA[Delete]]></string>
-    <string name="_bx_accnt_menu_item_title_system_delete_with_content"><![CDATA[Delete With Content]]></string>
-    <string name="_bx_accnt_menu_item_title_delete_with_content"><![CDATA[Delete With Content]]></string>
-    <string name="_bx_accnt_menu_item_title_system_make_operator"><![CDATA[Make Operator]]></string>
-    <string name="_bx_accnt_menu_item_title_make_operator"><![CDATA[Make Operator]]></string>
-    <string name="_bx_accnt_menu_item_title_system_unmake_operator"><![CDATA[Unmake Operator]]></string>
-    <string name="_bx_accnt_menu_item_title_unmake_operator"><![CDATA[Unmake Operator]]></string>
-    <string name="_bx_accnt_menu_item_title_system_set_operator_role"><![CDATA[Set Operator Role]]></string>
-    <string name="_bx_accnt_menu_item_title_set_operator_role"><![CDATA[Set Operator Role]]></string>
-    <string name="_bx_accnt_menu_item_title_system_admt_accounts"><![CDATA[Accounts]]></string>
-    <string name="_bx_accnt_menu_item_title_admt_accounts"><![CDATA[Accounts]]></string>
-    <string name="_bx_accnt_menu_item_title_manage"><![CDATA[Manage]]></string>
-    <string name="_bx_accnt_menu_dashboard_manage_tools_addon_counter1_caption"><![CDATA[unconfirmed]]></string>
-
-    <string name="_bx_accnt_acl_action_edit_any_account"><![CDATA[Edit Any Account]]></string>
-
-    <string name="_bx_accnt_grid_filter_item_title_adm_select_one_filter1"><![CDATA[All Statuses]]></string>
-    <string name="_bx_accnt_grid_filter_item_title_adm_select_one_filter2"><![CDATA[All]]></string>
-    <string name="_bx_accnt_grid_filter_item_title_adm_active"><![CDATA[Active]]></string>
-    <string name="_bx_accnt_grid_filter_item_title_adm_operators"><![CDATA[Operators]]></string>
-    <string name="_bx_accnt_grid_filter_item_title_adm_pending"><![CDATA[Pending]]></string>
-    <string name="_bx_accnt_grid_filter_item_title_adm_suspended"><![CDATA[Suspended]]></string>    
-    <string name="_bx_accnt_grid_filter_item_title_adm_unconfirmed"><![CDATA[Unconfirmed]]></string>
-    <string name="_bx_accnt_grid_filter_item_title_adm_locked"><![CDATA[Locked]]></string>
-    <string name="_bx_accnt_grid_filter_item_title_adm_without_profile"><![CDATA[Without profile]]></string>
-    <string name="_bx_accnt_grid_column_title_adm_active"><![CDATA[Active]]></string>
-    <string name="_bx_accnt_grid_column_title_adm_name"><![CDATA[Name]]></string>
-    <string name="_bx_accnt_grid_column_title_adm_email"><![CDATA[Email]]></string>
-    <string name="_bx_accnt_grid_column_title_adm_ip"><![CDATA[IP]]></string>
-
-    <string name="_bx_accnt_grid_column_title_adm_is_confirmed"><![CDATA[Confirmed]]></string>
-    <string name="_bx_accnt_grid_column_title_adm_profiles"><![CDATA[Profiles]]></string>
-    <string name="_bx_accnt_grid_column_title_adm_logged"><![CDATA[Last Logged]]></string>
-    <string name="_bx_accnt_grid_column_title_adm_added"><![CDATA[Created]]></string>
-    <string name="_bx_accnt_grid_action_title_adm_activate"><![CDATA[Activate]]></string>
-    <string name="_bx_accnt_grid_action_title_adm_suspend"><![CDATA[Suspend]]></string>
-    <string name="_bx_accnt_grid_action_title_adm_confirm"><![CDATA[Confirm]]></string>
-    <string name="_bx_accnt_grid_action_title_adm_edit_email"><![CDATA[Edit Email]]></string>
-    <string name="_bx_accnt_grid_action_title_adm_resend_cemail"><![CDATA[Resend Confirmation]]></string>
-    <string name="_bx_accnt_grid_action_title_adm_resend_remail"><![CDATA[Resend Reset Password]]></string>
-    <string name="_bx_accnt_grid_action_title_adm_reset_password"><![CDATA[Reset Password]]></string>
-    <string name="_bx_accnt_grid_action_title_adm_unlock_account"><![CDATA[Unlock]]></string>
-    <string name="_bx_accnt_grid_action_title_adm_delete"><![CDATA[Delete]]></string>
-    <string name="_bx_accnt_grid_action_title_adm_delete_with_content"><![CDATA[Delete With Content]]></string>
-    <string name="_bx_accnt_grid_action_title_adm_more_actions"><![CDATA[More Actions]]></string>
-    <string name="_bx_accnt_grid_action_title_adm_more_add"><![CDATA[Add new]]></string>
-    <string name="_bx_accnt_grid_action_err_delete"><![CDATA[Cannot delete the selected account(s).]]></string>
-    <string name="_bx_accnt_grid_action_err_perform"><![CDATA[Cannot perform the action for selected account(s).]]></string>
-    <string name="_bx_accnt_grid_action_unlock_successed"><![CDATA[Successfully unlocked]]></string>
-    <string name="_bx_accnt_grid_action_unlock_error"><![CDATA[Account is not blocked]]></string>
-    <string name="_bx_accnt_grid_confirmation_status_none"><![CDATA[No]]></string>
-    <string name="_bx_accnt_grid_confirmation_status_email"><![CDATA[Email]]></string>
-    <string name="_bx_accnt_grid_confirmation_status_phone"><![CDATA[Phone]]></string>
-    <string name="_bx_accnt_grid_confirmation_status_email_and_phone"><![CDATA[All]]></string>
-
-    <string name="_bx_accnt_form_login_input_caption_system_email_confirmed"><![CDATA[Email confirmed]]></string>
-    <string name="_bx_accnt_form_account_input_email_confirmed"><![CDATA[Email confirmed]]></string>
- 
-    <string name="_bx_accnt_txt_more"><![CDATA[{0} more]]></string>
-    <string name="_bx_accnt_txt_see_more"><![CDATA[See more]]></string>
-    <string name="_bx_accnt_txt_copy_to_clipboard"><![CDATA[Copy to Clipboard]]></string>
-</resources>

+ 0 - 51
modules/boonex/accounts/updates/12.0.1_12.0.2/install/config.php

@@ -1,51 +0,0 @@
-<?php
-/**
- * Copyright (c) UNA, Inc - https://una.io
- * MIT License - https://opensource.org/licenses/MIT
- */
-
-$aConfig = array(
-    /**
-     * Main Section.
-     */
-    'title' => 'Accounts Manager',
-    'version_from' => '12.0.1',
-    'version_to' => '12.0.2',
-    'vendor' => 'BoonEx',
-
-    'compatible_with' => array(
-        '12.0.0-RC1'
-    ),
-
-    /**
-     * 'home_dir' and 'home_uri' - should be unique. Don't use spaces in 'home_uri' and the other special chars.
-     */
-    'home_dir' => 'boonex/accounts/updates/update_12.0.1_12.0.2/',
-    'home_uri' => 'accounts_update_1201_1202',
-
-    'module_dir' => 'boonex/accounts/',
-    'module_uri' => 'accounts',
-
-    'db_prefix' => 'bx_accnt_',
-    'class_prefix' => 'BxAccnt',
-
-    /**
-     * Installation/Uninstallation Section.
-     */
-    'install' => array(
-        'execute_sql' => 0,
-        'update_files' => 1,
-        'update_languages' => 0,
-        'clear_db_cache' => 0,
-    ),
-
-    /**
-     * Category for language keys.
-     */
-    'language_category' => 'Accounts',
-
-    /**
-     * Files Section
-     */
-    'delete_files' => array(),
-);

+ 0 - 13
modules/boonex/accounts/updates/12.0.1_12.0.2/install/installer.php

@@ -1,13 +0,0 @@
-<?php
-/**
- * Copyright (c) UNA, Inc - https://una.io
- * MIT License - https://opensource.org/licenses/MIT
- */
-
-class BxAccntUpdater extends BxDolStudioUpdater
-{
-    function __construct($aConfig)
-    {
-        parent::__construct($aConfig);
-    }
-}

+ 0 - 589
modules/boonex/accounts/updates/12.0.1_12.0.2/source/classes/BxAccntGridAdministration.php

@@ -1,589 +0,0 @@
-<?php defined('BX_DOL') or die('hack attempt');
-/**
- * Copyright (c) UNA, Inc - https://una.io
- * MIT License - https://opensource.org/licenses/MIT
- *
- * @defgroup    Accounts Accounts
- * @ingroup     UnaModules
- * 
- * @{
- */
-
-class BxAccntGridAdministration extends BxBaseModProfileGridAdministration
-{
-    protected $_sFilter2Name;
-	protected $_sFilter2Value;
-	protected $_aFilter2Values;
-    
-    public function __construct ($aOptions, $oTemplate = false)
-    {
-    	$this->MODULE = 'bx_accounts';
-        parent::__construct ($aOptions, $oTemplate);
-
-        $CNF = &$this->_oModule->_oConfig->CNF;
-        $this->_aFilter1Values = array_merge($this->_aFilter1Values, array(
-            'unconfirmed' => $CNF['T']['filter_item_unconfirmed'],
-            'locked' => $CNF['T']['filter_item_locked'],
-            'without_profile' => $CNF['T']['filter_item_without_profile'],
-        ));
-
-        $this->_sFilter2Name = 'filter2';
-        $this->_aFilter2Values = array(
-            'operators' => $CNF['T']['filter_item_operators']
-        );
-
-        $sFilter2 = bx_get($this->_sFilter2Name);
-        if(!empty($sFilter2)) {
-            $this->_sFilter2Value = bx_process_input($sFilter2);
-            $this->_aQueryAppend[$this->_sFilter2Name] = $this->_sFilter2Value;
-        }
-    }
-
-    protected function _getDataSql($sFilter, $sOrderField, $sOrderDir, $iStart, $iPerPage)
-    {
-        if(strpos($sFilter, $this->_sParamsDivider) !== false)
-            list($this->_sFilter1Value, $this->_sFilter2Value, $sFilter) = explode($this->_sParamsDivider, $sFilter);
-
-    	if(!empty($this->_sFilter1Value))
-            switch($this->_sFilter1Value) {
-                case 'unconfirmed':
-                    $sCnfnType = getParam('sys_account_confirmation_type');
-                    switch($sCnfnType) {
-                        case 'email':
-                            $this->_aOptions['source'] .= " AND `ta`.`email_confirmed`='0'";
-                            break;
-                        case 'phone':
-                            $this->_aOptions['source'] .= " AND `ta`.`phone_confirmed`='0'";
-                            break;
-                        case 'email_and_phone':
-                            $this->_aOptions['source'] .= " AND (`ta`.`email_confirmed`='0' OR `ta`.`phone_confirmed`='0')";
-                            break;
-                    }
-                    break;
-
-                case 'locked':
-                    $this->_aOptions['source'] .= " AND `ta`.`locked` = 1";
-                    break;
-                
-                case 'without_profile':
-                    $this->_aOptions['source'] .= " AND `ta`.`id` NOT IN (SELECT `account_id` FROM `sys_profiles` WHERE `type` <> 'system')";
-                    break;
-
-                default:
-        	        $this->_aOptions['source'] .= $this->_oModule->_oDb->prepareAsString(" AND `tp`.`status`=?", $this->_sFilter1Value);
-            }
-
-        if(!empty($this->_sFilter2Value))
-        	$this->_aOptions['source'] .= $this->_oModule->_oDb->prepareAsString(" AND `ta`.`role` & " . BX_DOL_ROLE_ADMIN ." = " . BX_DOL_ROLE_ADMIN);
-
-        $this->_aOptions['source'] .= " AND `ta`.`email` <> '' ";
-        
-        return parent::_getDataSqlInner($sFilter, $sOrderField, $sOrderDir, $iStart, $iPerPage);
-    }
-    
-    protected function _getFilterControls()
-    {
-        parent::_getFilterControls();
-
-        return  $this->_getFilterSelectOne($this->_sFilter1Name, $this->_sFilter1Value, $this->_aFilter1Values) . $this->_getFilterSelectOne($this->_sFilter2Name, $this->_sFilter2Value, $this->_aFilter2Values) . $this->_getSearchInput();
-    }
-    
-    public function getCode($isDisplayHeader = true)
-    {
-        return $this->_oModule->_oTemplate->getJsCode('main', array(
-        	'aHtmlIds' => $this->_oModule->_oConfig->getHtmlIds()
-        )) . parent::getCode($isDisplayHeader);
-    }
-
-    public function performActionActivate()
-    {
-    	$this->_performActionEnable(true);
-    }
-
-	public function performActionSuspend()
-    {
-    	$this->_performActionEnable(false);
-    }
-
-    public function performActionEditEmail()
-    {
-        $CNF = &$this->_oModule->_oConfig->CNF;
-
-        $aIds = bx_get('ids');
-        if(!$aIds || !is_array($aIds)) {
-            $iId = (int)bx_get('id');
-            if(!$iId)
-                return echoJson(array());
-
-            $aIds = array($iId);
-        }
-
-        $iId = $aIds[0];
-        $oAccount = BxDolAccount::getInstance($iId);
-        if(!$oAccount)
-            return echoJson(array());
-
-        $aAccount = $oAccount->getInfo();
-        $sAction = 'edit_email';
-
-        $oForm = BxDolForm::getObjectInstance($CNF['OBJECT_FORM_ACCOUNT'], $CNF['OBJECT_FORM_ACCOUNT_DISPLAY_SETTINGS_EMAIL']);
-        $oForm->aFormAttrs['action'] = BX_DOL_URL_ROOT . 'grid.php?o=' . $this->_sObject . '&a=' . $sAction . '&id=' . $iId;
-        $oForm->initChecker($aAccount);
-
-        if($oForm->isSubmittedAndValid()) {
-            $sEmail = $oForm->getCleanValue('email');
-            if(strcmp($aAccount['email'], $sEmail) !== 0 && BxDolAccountQuery::getInstance()->getIdByEmail($sEmail))
-                return echoJson(array('msg' => _t('_sys_form_account_input_email_uniq_error_loggedin')));
-
-            if($oForm->update($aAccount['id'])) {
-                bx_alert('account', 'edited', $aAccount['id'], BxDolAccount::getInstance()->id(), array('display' => $CNF['OBJECT_FORM_ACCOUNT_DISPLAY_SETTINGS_EMAIL']));
-
-                $aRes = array('grid' => $this->getCode(false), 'blink' => $iId);
-                
-                $oAccount->doAudit($iId, '_sys_audit_action_account_email_changed', array('old_email' => $oAccount->getEmail(), 'new_email' => $sEmail));
-            }
-            else
-                $aRes = array('msg' => _t('_sys_txt_error_account_update'));
-
-            echoJson($aRes);
-        }
-        else {
-            $sContent = BxTemplStudioFunctions::getInstance()->popupBox('bx-account-edit-email-popup', _t('_bx_accounts_form_display_account_settings_email_popup'), $this->_oModule->_oTemplate->parseHtmlByName('edit_email.html', array(
-                'form_id' => $oForm->id,
-                'form' => $oForm->getCode(true),
-                'object' => $this->_sObject,
-                'action' => $sAction
-            )));
-
-            echoJson(array('popup' => array('html' => $sContent, 'options' => array('closeOnOuterClick' => false))));
-        }
-    }
-    
-    public function performActionAdd()
-    {
-      
-        $CNF = &$this->_oModule->_oConfig->CNF;
-        $sAction = 'add';
-        $oForm = BxDolForm::getObjectInstance($CNF['OBJECT_FORM_ACCOUNT'], $CNF['OBJECT_FORM_ACCOUNT_DISPLAY_CREATE']);
-        $oForm->aFormAttrs['action'] = BX_DOL_URL_ROOT . 'grid.php?o=' . $this->_sObject . '&a=' . $sAction;
-        $oForm->initChecker();
-
-        if($oForm->isSubmittedAndValid()) {
-           
-            $iAccountId = $oForm->insert();
-            
-            if (!$iAccountId) {
-                $aRes = array('msg' => _t('_sys_txt_error_account_insert'));
-            }
-            else{
-                $aRes = array('grid' => $this->getCode(false), 'blink' => $iAccountId);
-                
-                $oBxTemplAccountForms = new BxTemplAccountForms();
-                
-                $iProfileId = $oBxTemplAccountForms->onAccountCreated($iAccountId, $oForm->isSetPendingApproval(), BX_PROFILE_ACTION_MANUAL, false);
-
-                // perform action
-                BxDolAccount::isAllowedCreate ($iProfileId, true);
-                
-                // check
-                $aModulesProfile = array(); 
-                $aModules = BxDolModuleQuery::getInstance()->getModulesBy(array('type' => 'modules', 'active' => 1));
-                foreach($aModules as $aModule) {
-                    $oModule = BxDolModule::getInstance($aModule['name']);
-                    if($oModule instanceof iBxDolProfileService && BxDolService::call($aModule['name'], 'act_as_profile') === true)
-                        $aModulesProfile[] = $aModule;
-                }
-
-                $sDefaultProfileType = getParam('sys_account_default_profile_type');
-                if(count($aModulesProfile) == 1)
-                    $sProfileModule = $aModulesProfile[0]['name'];
-                else if(!empty($sDefaultProfileType)) 
-                    $sProfileModule = $sDefaultProfileType;
-
-                if (getParam('sys_account_auto_profile_creation') && !empty($sProfileModule)) {
-                    $oAccount = BxDolAccount::getInstance($iAccountId);
-                    $aProfileInfo = BxDolService::call($sProfileModule, 'prepare_fields', array(array(
-                        'author' => $iProfileId,
-                        'name' => $oAccount->getDisplayName(),
-                    )));
-                    $a = BxDolService::call($sProfileModule, 'entity_add', array($iProfileId, $aProfileInfo));
-                    if (isset($a['content']['profile_id']) && (int)$a['content']['profile_id'] > 0){
-                        BxDolAcl::getInstance()->setMembership((int)$a['content']['profile_id'], MEMBERSHIP_ID_STANDARD);
-                    }
-                    echoJson($aRes);
-                }
-            }
-        }
-        else {
-            $sContent = BxTemplStudioFunctions::getInstance()->popupBox('bx-account-edit-email-popup', _t('_bx_accounts_form_display_account_create_popup'), $this->_oModule->_oTemplate->parseHtmlByName('create.html', array(
-                'form_id' => $oForm->id,
-                'form' => $oForm->getCode(true),
-                'object' => $this->_sObject,
-                'action' => $sAction
-            )));
-
-            echoJson(array('popup' => array('html' => $sContent, 'options' => array('closeOnOuterClick' => false))));
-        }
-    }
-    
-    public function performActionConfirm()
-    {
-        $CNF = &$this->_oModule->_oConfig->CNF;
-
-    	$aIds = bx_get('ids');
-        if(!$aIds || !is_array($aIds))
-            return echoJson(array());
-
-        $oAccount = BxDolAccount::getInstance();
-
-        $iAffected = 0;
-        $aIdsAffected = array();
-        foreach($aIds as $iId){
-            if (BxDolAccount::isNeedConfirmEmail()) {
-                if($oAccount->updateEmailConfirmed(true, true, $iId)) {
-                    $aIdsAffected[] = $iId;
-                    $iAffected++;  
-                }
-            }
-
-            if (BxDolAccount::isNeedConfirmPhone()){
-                if($oAccount->updatePhoneConfirmed(true, $iId)) {
-                    $aIdsAffected[] = $iId;
-                    $iAffected++;  
-                }
-            }
-        }
-		echoJson($iAffected ? array('grid' => $this->getCode(false), 'blink' => $aIdsAffected) : array('msg' => _t($CNF['T']['grid_action_err_perform'])));
-    }
-    
-    public function performActionResendCemail()
-    {
-        $CNF = &$this->_oModule->_oConfig->CNF;
-
-        $aIds = bx_get('ids');
-        if(!$aIds || !is_array($aIds))
-            return echoJson(array());
-
-        $oAccount = BxDolAccount::getInstance();
-
-        $iAffected = 0;
-        $aIdsAffected = array();
-        foreach($aIds as $iId)
-            if($oAccount->sendConfirmationEmail($iId)) {
-                $aIdsAffected[] = $iId;
-                $iAffected++;  
-            }
-
-        echoJson($iAffected ? array('grid' => $this->getCode(false), 'blink' => $aIdsAffected) : array('msg' => _t($CNF['T']['grid_action_err_perform'])));
-    }
-
-    public function performActionResetPassword()
-    {
-    	$aIds = bx_get('ids');
-        if(!$aIds || !is_array($aIds))
-            return echoJson(array());
-
-        $iId = $aIds[0];
-        $oAccount = BxDolAccount::getInstance($iId);
-        if(!$oAccount)
-            return echoJson(array());
-
-        $aRes = array();
-        $sPwd = genRndPwd();
-        if (BxDolAccount::getInstance()->updatePassword($sPwd, $iId)){
-            $sPopupId = $this->_oModule->_oConfig->getHtmlIds('password_popup');
-            $sPopupTitle = _t('_bx_accounts_form_display_account_settings_password_popup');
-            $sPopupContent = $this->_oModule->_oTemplate->parseHtmlByName('reset_password.html', array(
-                'js_object' => $this->_oModule->_oConfig->getJsObject('main'),
-                'html_id_text' => $this->_oModule->_oConfig->getHtmlIds('password_text'),
-                'html_id_button' => $this->_oModule->_oConfig->getHtmlIds('password_button'),
-                'password' => $sPwd,
-            ));
-
-            $aRes = array('popup' => BxTemplStudioFunctions::getInstance()->popupBox($sPopupId, $sPopupTitle, $sPopupContent));
-        }
-        else 
-            $aRes = array('msg' => _t('_bx_accnt_grid_action_err_perform'));
-
-        return echoJson($aRes);
-    }
-
-    public function performActionResendRemail()
-    {
-        $CNF = &$this->_oModule->_oConfig->CNF;
-
-        $aIds = bx_get('ids');
-        if(!$aIds || !is_array($aIds))
-            return echoJson(array());
-
-        $oAccount = BxDolAccount::getInstance();
-
-        $iAffected = 0;
-        $aIdsAffected = array();
-        foreach($aIds as $iId)
-            if($oAccount->sendResetPasswordEmail($iId)) {
-                $aIdsAffected[] = $iId;
-                $iAffected++;  
-            }
-
-        echoJson($iAffected ? array('grid' => $this->getCode(false), 'blink' => $aIdsAffected) : array('msg' => _t($CNF['T']['grid_action_err_perform'])));
-    }
-
-    public function performActionUnlockAccount()
-    {
-    	$aIds = bx_get('ids');
-        if(!$aIds || !is_array($aIds)) {
-            echoJson(array());
-            return;
-        }
-
-        $oAccountQuery = BxDolAccountQuery::getInstance();
-        foreach($aIds as $iId) {
-            $oAccount = BxDolAccount::getInstance($iId);
-            if(!$oAccount)
-                continue;
-
-            if ($oAccount->isLocked()){
-                $oAccountQuery->unlockAccount($iId);
-            }
-            
-            $oAccount->doAudit($iId, '_sys_audit_action_account_unlock');
-        }
-
-        return echoJson(array('grid' => $this->getCode(false), 'blink' => $aIds));
-    }
-
-    public function performActionSetOperatorRole()
-    {
-    	$aIds = bx_get('ids');
-        if(!$aIds || !is_array($aIds))
-            return echoJson(array());
-        
-        $oUtils = BxDolStudioRolesUtils::getInstance();
-
-        $aRoles = $oUtils->getRoles();
-        if(empty($aRoles) || !is_array($aRoles))
-            return echoJson(array('msg' => _t('_sys_txt_error_occured')));
-
-        $iId = (int)array_shift($aIds);
-
-        $sPopupName = str_replace('_', '-', $this->MODULE) . '-set-role-popup';
-        $sPopupContent = $this->_oModule->_oTemplate->getPopupSetRole($aRoles, $iId, $oUtils->getRole($iId));
-
-        return echoJson(array('popup' => array(
-            'html' => BxTemplFunctions::getInstance()->transBox($sPopupName, $sPopupContent),
-            'options' => array(
-                'closeOnOuterClick' => true,
-                'removeOnClose' => true
-            )
-        )));
-    }
-
-    public function performActionSetOperatorRoleSubmit()
-    {
-        $aIds = bx_get('ids');
-        if(!$aIds || !is_array($aIds))
-            return echoJson(array());
-
-        $iId = (int)array_shift($aIds);
-        if(!$iId)
-            return echoJson(array('msg' => _t('_sys_txt_error_occured')));
-
-        if(!BxDolStudioRolesUtils::getInstance()->setRole($iId, bx_process_input(bx_get('role'), BX_DATA_INT)))
-            return echoJson(array('msg' => _t('_error occured')));
-
-        echoJson(array('grid' => $this->getCode(false), 'blink' => $iId));
-    }
-
-    public function performActionMakeOperator()
-    {
-    	$this->_performActionChangeRole(3);
-    }
-
-    public function performActionUnmakeOperator()
-    {
-    	$this->_performActionChangeRole(1);
-    }
-
-    protected function _performActionChangeRole($iRole)
-    {
-        $CNF = &$this->_oModule->_oConfig->CNF;
-
-        $aIds = bx_get('ids');
-        if(!$aIds || !is_array($aIds))
-            return echoJson(array());
-
-        $oAccount = BxDolAccount::getInstance();
-        $oUtils = BxDolStudioRolesUtils::getInstance();
-
-        $iAffected = 0;
-        $aIdsAffected = array();
-        foreach($aIds as $iId) {
-            if(!$this->_oModule->_oDb->updateAccount(array('role' => $iRole), array('id' => $iId))) 
-                continue;
-
-            $oUtils->setRole($iId, $iRole == 3 ? BX_DOL_STUDIO_ROLE_OPERATOR : 0);
-
-            $oAccount->doAudit($iId, '_sys_audit_action_account_change_role_to_' . $iRole);
-
-            $aIdsAffected[] = $iId;
-            $iAffected++;
-        }
-
-        echoJson($iAffected ? array('grid' => $this->getCode(false), 'blink' => $aIdsAffected) : array('msg' => _t($CNF['T']['grid_action_err_perform'])));
-    }
-
-    protected function _performActionEnable($isChecked)
-    {
-    	$CNF = &$this->_oModule->_oConfig->CNF;
-
-    	$aIds = bx_get('ids');
-        if(!$aIds || !is_array($aIds)) {
-            echoJson(array());
-            return;
-        }
-        $iAffected = 0;
-        $aIdsAffected = array();
-        foreach($aIds as $iId)
-        	if($this->_enable($iId, $isChecked)) {
-        		$aIdsAffected[] = $iId;
-        		$iAffected++;
-                
-                $oAccount = BxDolAccount::getInstance($iId);
-                $oAccount->doAudit($iId, '_sys_audit_action_account_' . $isChecked ? 'activated' : 'suspended');
-        	}
-
-        echoJson($iAffected ? array('grid' => $this->getCode(false), 'blink' => $aIdsAffected) : array('msg' => _t($CNF['T']['grid_action_err_perform'])));
-    }
-
-    protected function _enable($mixedId, $isChecked)
-    {
-    	$oProfile = BxDolProfile::getInstanceAccountProfile($mixedId);
-    	if(!$oProfile)
-    	    return false;
-
-        $iAction = BX_PROFILE_ACTION_MANUAL;
-        $sMethod = $isChecked ? 'activate' : 'suspend';
-        if(!$oProfile->$sMethod($iAction, 0 ,false))
-            return false;
-
-        sendMailTemplate('t_ChangeStatusAccount' . ucfirst($sMethod), $oProfile->getAccountObject()->id(), $oProfile->id(), array(), BX_EMAIL_SYSTEM);
-        
-        $aProfiles = $oProfile->getAccountObject()->getProfiles();
-        foreach($aProfiles as $aProfile){
-            BxDolProfile::getInstance($aProfile['id'])->$sMethod($iAction, 0 ,false);
-        }
-        
-    	return true;
-    }
-
-    //--- Layout methods ---//
-    protected function _getActionEditEmail($sType, $sKey, $a, $isSmall = false, $isDisabled = false, $aRow = array())
-    {
-        return '';
-    }
-    
-    protected function _getCellEmailConfirmed($mixedValue, $sKey, $aField, $aRow)
-    {
-    	$mixedValue = (int)$mixedValue == 1 ? '_Yes' : '_No';
-        return parent::_getCellDefault(_t($mixedValue), $sKey, $aField, $aRow);
-    }
-
-    protected function _getActionResetPassword($sType, $sKey, $a, $isSmall = false, $isDisabled = false, $aRow = array())
-    {
-        return '';
-    }
-
-    protected function _getActionResendRemail($sType, $sKey, $a, $isSmall = false, $isDisabled = false, $aRow = array())
-    {
-        if($sType == 'single')
-            return '';
-
-        return parent::_getActionDefault ($sType, $sKey, $a, $isSmall, $isDisabled, $aRow);
-    }
-
-    protected function _getActionUnlockAccount($sType, $sKey, $a, $isSmall = false, $isDisabled = false, $aRow = array())
-    {
-        return '';
-    }
-
-    protected function _getCellName($mixedValue, $sKey, $aField, $aRow)
-    {
-        $oAccount = BxDolAccount::getInstance($aRow['id']);
-        if ($oAccount)
-            $s = ($aRow['locked'] == 1 ? $this->_oTemplate->parseIcon("lock col-red1") . ' ' : '') . $oAccount->getDisplayName();
-        return parent::_getCellDefault ($s, $sKey, $aField, $aRow);
-    }
-    
-	protected function _getCellProfiles($mixedValue, $sKey, $aField, $aRow)
-    {
-        $s = $this->_oModule->_oTemplate->getProfilesByAccount($aRow);
-
-        return parent::_getCellDefault ($s, $sKey, $aField, $aRow);
-    }
-
-    protected function _getCellLogged($mixedValue, $sKey, $aField, $aRow)
-    {
-        $mixedValue = !empty($mixedValue) ? bx_time_js($mixedValue) : _t('_sys_not_available');
-
-        return parent::_getCellDefault($mixedValue, $sKey, $aField, $aRow);
-    } 
-    
-    protected function _getCellAdded($mixedValue, $sKey, $aField, $aRow)
-    {
-        $mixedValue = !empty($mixedValue) ? bx_time_js($mixedValue) : _t('_sys_not_available');
-
-        return parent::_getCellDefault($mixedValue, $sKey, $aField, $aRow);
-    } 
-    
-    protected function _getCellIsConfirmed($mixedValue, $sKey, $aField, $aRow)
-    {
-        $oAccount = BxDolAccount::getInstance($aRow['id']);
-        $s = "";
-        if ($oAccount)
-            $s = $oAccount->getCurrentConfirmationStatusValue();
-        return parent::_getCellDefault(_t('_bx_accnt_grid_confirmation_status_' . $s), $sKey, $aField, $aRow);
-    }
-
-    protected function _isCheckboxDisabled($aRow)
-    {
-        return false;
-    }
-
-	protected function _getContentInfo($iId)
-    {
-    	return BxDolAccountQuery::getInstance()->getInfoById($iId);
-    }
-
-	protected function _doDelete($iId, $aParams = array())
-    {
-    	return BxDolAccount::getInstance($iId)->delete(isset($aParams['with_content']) && $aParams['with_content'] === true);
-    }
-    
-    
-
-    protected function _addJsCss()
-    {
-        parent::_addJsCss();
-        
-        $this->_oTemplate->addJs(array(
-            'main.css'
-        ));
-
-        $this->_oTemplate->addJs(array(
-        	'jquery.form.min.js',
-            'clipboard.min.js',
-            'main.js'
-        ));
-    }
-
-    protected function _isVisibleGrid($a)
-    {
-        if(isAdmin())
-            return true;
-        
-        return parent::_isVisibleGrid($a);
-    }
-}
-
-/** @} */

+ 0 - 71
modules/boonex/accounts/updates/12.0.1_12.0.2/source/install/config.php

@@ -1,71 +0,0 @@
-<?php
-/**
- * Copyright (c) UNA, Inc - https://una.io
- * MIT License - https://opensource.org/licenses/MIT
- *
- * @defgroup    Accounts Accounts
- * @ingroup     UnaModules
- *
- * @{
- */
-
-$aConfig = array(
-    /**
-     * Main Section.
-     */
-    'type' => BX_DOL_MODULE_TYPE_MODULE,
-    'name' => 'bx_accounts',
-    'title' => 'Accounts Manager',
-    'note' => 'Accounts Manager module.',
-    'version' => '12.0.2',
-    'vendor' => 'BoonEx',
-    'help_url' => 'http://feed.una.io/?section={module_name}',
-
-    'compatible_with' => array(
-        '12.0.0-RC1'
-    ),
-
-    /**
-     * 'home_dir' and 'home_uri' - should be unique. Don't use spaces in 'home_uri' and the other special chars.
-     */
-    'home_dir' => 'boonex/accounts/',
-    'home_uri' => 'accounts',
-
-    'db_prefix' => 'bx_accnt_',
-    'class_prefix' => 'BxAccnt',
-
-    /**
-     * Category for language keys.
-     */
-    'language_category' => 'Accounts',
-
-    /**
-     * Installation/Uninstallation Section.
-     */
-    'install' => array(
-        'execute_sql' => 1,
-        'update_languages' => 1,
-        'clear_db_cache' => 1,
-    ),
-    'uninstall' => array (
-        'execute_sql' => 1,
-        'update_languages' => 1,
-        'clear_db_cache' => 1,
-    ),
-    'enable' => array(
-        'execute_sql' => 1,
-        'clear_db_cache' => 1,
-    ),
-    'disable' => array (
-        'execute_sql' => 1,
-        'clear_db_cache' => 1,
-    ),
-
-    /**
-     * Dependencies Section
-     */
-    'dependencies' => array(),
-
-);
-
-/** @} */

+ 0 - 51
modules/boonex/accounts/updates/12.0.2_12.0.3/install/config.php

@@ -1,51 +0,0 @@
-<?php
-/**
- * Copyright (c) UNA, Inc - https://una.io
- * MIT License - https://opensource.org/licenses/MIT
- */
-
-$aConfig = array(
-    /**
-     * Main Section.
-     */
-    'title' => 'Accounts Manager',
-    'version_from' => '12.0.2',
-    'version_to' => '12.0.3',
-    'vendor' => 'BoonEx',
-
-    'compatible_with' => array(
-        '12.0.1'
-    ),
-
-    /**
-     * 'home_dir' and 'home_uri' - should be unique. Don't use spaces in 'home_uri' and the other special chars.
-     */
-    'home_dir' => 'boonex/accounts/updates/update_12.0.2_12.0.3/',
-    'home_uri' => 'accounts_update_1202_1203',
-
-    'module_dir' => 'boonex/accounts/',
-    'module_uri' => 'accounts',
-
-    'db_prefix' => 'bx_accnt_',
-    'class_prefix' => 'BxAccnt',
-
-    /**
-     * Installation/Uninstallation Section.
-     */
-    'install' => array(
-        'execute_sql' => 1,
-        'update_files' => 1,
-        'update_languages' => 1,
-        'clear_db_cache' => 1,
-    ),
-
-    /**
-     * Category for language keys.
-     */
-    'language_category' => 'Accounts',
-
-    /**
-     * Files Section
-     */
-    'delete_files' => array(),
-);

+ 0 - 13
modules/boonex/accounts/updates/12.0.2_12.0.3/install/installer.php

@@ -1,13 +0,0 @@
-<?php
-/**
- * Copyright (c) UNA, Inc - https://una.io
- * MIT License - https://opensource.org/licenses/MIT
- */
-
-class BxAccntUpdater extends BxDolStudioUpdater
-{
-    function __construct($aConfig)
-    {
-        parent::__construct($aConfig);
-    }
-}

+ 0 - 4
modules/boonex/accounts/updates/12.0.2_12.0.3/install/langs/en.xml

@@ -1,4 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<resources name="en" flag="gb" title="English">
-	<string_add name="_bx_accnt_txt_not_operator"><![CDATA[Not an Operator]]></string_add>
-</resources>

+ 0 - 7
modules/boonex/accounts/updates/12.0.2_12.0.3/install/sql/enable.sql

@@ -1,7 +0,0 @@
-SET @sName = 'bx_accounts';
-
-
--- GRIDS:
-UPDATE `sys_grid_fields` SET `width`='16%', `chars_limit`='16' WHERE `object`='bx_accounts_administration' AND `name`='name';
-UPDATE `sys_grid_fields` SET `chars_limit`='16' WHERE `object`='bx_accounts_administration' AND `name`='email';
-UPDATE `sys_grid_fields` SET `width`='23%', `chars_limit`='0' WHERE `object`='bx_accounts_administration' AND `name`='profiles';

+ 0 - 100
modules/boonex/accounts/updates/12.0.2_12.0.3/source/classes/BxAccntConfig.php

@@ -1,100 +0,0 @@
-<?php defined('BX_DOL') or die('hack attempt');
-/**
- * Copyright (c) UNA, Inc - https://una.io
- * MIT License - https://opensource.org/licenses/MIT
- *
- * @defgroup    Accounts Accounts
- * @ingroup     UnaModules
- *
- * @{
- */
-
-class BxAccntConfig extends BxBaseModGeneralConfig
-{
-    protected $_oDb;
-    protected $_aHtmlIds;
-
-    /**
-     * Constructor
-     */
-    public function __construct($aModule)
-    {
-        parent::__construct($aModule);
-
-        $this->CNF = array (
-            // some params
-            'PARAM_PROFILE_NAME_LENGTH_MAX' => 10,
-
-            // page URIs
-            'URL_MANAGE_ADMINISTRATION' => 'page.php?i=accounts-administration',
-
-            // objects
-            'OBJECT_FORM_ACCOUNT' => 'bx_accounts_account',
-            'OBJECT_FORM_ACCOUNT_DISPLAY_SETTINGS_EMAIL' => 'bx_accounts_account_settings_email',
-            'OBJECT_FORM_ACCOUNT_DISPLAY_CREATE' => 'bx_accounts_account_create',
-            'OBJECT_MENU_MANAGE_TOOLS' => 'bx_accounts_menu_manage_tools', //manage menu in content administration tools
-            'OBJECT_GRID_ADMINISTRATION' => 'bx_accounts_administration',
-            'OBJECT_GRID_MODERATION' => 'bx_accounts_moderation',
-
-                // some language keys
-            'T' => array (
-                'grid_action_err_delete' => '_bx_accnt_grid_action_err_delete',
-                'grid_action_err_perform' => '_bx_accnt_grid_action_err_perform',
-                'filter_item_active' => '_bx_accnt_grid_filter_item_title_adm_active',
-                'filter_item_operators' => '_bx_accnt_grid_filter_item_title_adm_operators',
-                'filter_item_pending' => '_bx_accnt_grid_filter_item_title_adm_pending',
-                'filter_item_suspended' => '_bx_accnt_grid_filter_item_title_adm_suspended',
-                'filter_item_unconfirmed' => '_bx_accnt_grid_filter_item_title_adm_unconfirmed',
-                'filter_item_locked' => '_bx_accnt_grid_filter_item_title_adm_locked',
-                'filter_item_without_profile' => '_bx_accnt_grid_filter_item_title_adm_without_profile',
-                'filter_item_select_one_filter1' => '_bx_accnt_grid_filter_item_title_adm_select_one_filter1',
-                'filter_item_select_one_filter2' => '_bx_accnt_grid_filter_item_title_adm_select_one_filter2',
-            )
-        );
-
-        $this->_aObjects = array(
-            'alert' => $this->_sName,
-        );
-
-        $this->_aJsClasses = array(
-            'main' => 'BxAccntMain',
-            'manage_tools' => 'BxAccntManageTools'
-        );
-
-        $this->_aJsObjects = array(
-            'main' => 'oBxAccntMain',
-            'manage_tools' => 'oBxAccntManageTools'
-        );
-
-        $this->_aGridObjects = array(
-            'moderation' => $this->CNF['OBJECT_GRID_MODERATION'],
-            'administration' => $this->CNF['OBJECT_GRID_ADMINISTRATION'],
-
-        );
-
-        $sHtmlPrefix = str_replace('_', '-', $this->_sName);
-        $this->_aHtmlIds = array(
-            'profile' => $sHtmlPrefix . '-profile-',
-            'profile_more_popup' => $sHtmlPrefix . '-profile-more-popup-',
-
-            'password_text' => $sHtmlPrefix . '-txt-password',
-            'password_button' => $sHtmlPrefix . '-btn-copy',
-            'password_popup' => $sHtmlPrefix . '-password-popup',
-        );
-    }
-
-    public function init(&$oDb)
-    {
-        $this->_oDb = &$oDb;
-    }
-
-    public function getHtmlIds($sKey = '')
-    {
-        if(empty($sKey))
-            return $this->_aHtmlIds;
-
-        return isset($this->_aHtmlIds[$sKey]) ? $this->_aHtmlIds[$sKey] : '';
-    }
-}
-
-/** @} */

+ 0 - 119
modules/boonex/accounts/updates/12.0.2_12.0.3/source/classes/BxAccntTemplate.php

@@ -1,119 +0,0 @@
-<?php defined('BX_DOL') or die('hack attempt');
-/**
- * Copyright (c) UNA, Inc - https://una.io
- * MIT License - https://opensource.org/licenses/MIT
- *
- * @defgroup    Accounts Accounts
- * @ingroup     UnaModules
- *
- * @{
- */
-
-class BxAccntTemplate extends BxBaseModGeneralTemplate
-{
-    function __construct(&$oConfig, &$oDb)
-    {
-    	$this->MODULE = 'bx_accounts';
-        parent::__construct($oConfig, $oDb);
-    }
-
-    public function getProfilesByAccount($aContentInfo, $iMaxVisible = 2)
-    {
-        $CNF = &$this->_oConfig->CNF;
-
-        $aProfiles = BxDolAccount::getInstance($aContentInfo['id'])->getProfiles();
-        $iProfiles = count($aProfiles);
-
-        $aTmplVars = array (
-            'class_cnt' => '',
-            'bx_repeat:profiles' => array(),
-            'bx_if:profiles_more' => array(
-                'condition' => $iProfiles > $iMaxVisible,
-                'content' => array(
-                    'html_id' => $this->_oConfig->getHtmlIds('profile_more_popup') . $aContentInfo['id'],
-                    'more' => _t('_bx_accnt_txt_more', $iProfiles - $iMaxVisible),
-                    'more_attr' => bx_html_attribute(_t('_bx_accnt_txt_see_more')),
-                    'popup' => '',
-                ),
-            ),
-        );
-
-        $aTmplVarsPopup = array (
-            'class_cnt' => ' bx-def-padding',
-            'bx_repeat:profiles' => array(),
-            'bx_if:profiles_more' => array(
-                'condition' => false,
-                'content' => array(),
-            ),
-        );
-
-        $i = 0;
-        foreach ($aProfiles as $iProfileId => $aProfile) {
-            $oProfile = BxDolProfile::getInstance($iProfileId);
-            if(!$oProfile)
-                continue;
-
-            $sName = $oProfile->getDisplayName();
-            $aTmplVarsProfile = array (
-            	'html_id' => $this->_oConfig->getHtmlIds('profile') . $aProfile['id'],
-                'id' => $oProfile->id(),
-                'url' => $oProfile->getUrl(),
-                'name' => strmaxtextlen($sName, $CNF['PARAM_PROFILE_NAME_LENGTH_MAX'], '...'),
-                'name_attr' =>  bx_html_attribute($sName)
-            );
-
-            if($i < $iMaxVisible)
-				$aTmplVars['bx_repeat:profiles'][] = $aTmplVarsProfile;
-            if($i >= $iMaxVisible)
-                $aTmplVarsPopup['bx_repeat:profiles'][] = $aTmplVarsProfile;
-
-            ++$i;
-        }
-
-        if($aTmplVarsPopup['bx_repeat:profiles']) {
-            $aTmplVars['bx_if:profiles_more']['content']['popup'] = BxTemplFunctions::getInstance()->transBox('', $this->parseHtmlByName('profiles.html', $aTmplVarsPopup));
-        }
-
-        return $this->parseHtmlByName('profiles.html', $aTmplVars);
-    }
-
-    public function getPopupSetRole($aRoles, $iAccountId, $iAccountRole)
-    {
-        $sJsObject = $this->_oConfig->getJsObject('manage_tools');
-        $sHtmlIdPrefix = str_replace('_', '-', $this->_oConfig->getName()) . '-role';
-        $sMaskOnClick = '%s.onClickSetOperatorRoleSubmit(this, %d, %d)';
-
-        $aRoles = array_merge(array(array('id' => 0, 'title' => '_bx_accnt_txt_not_operator')), $aRoles);
-
-        $aTmplVarsRoles = array();
-        foreach($aRoles as $aRole) {
-            $iRole = (int)$aRole['id'];
-            $bRole = $iRole != 0;
-
-            if($iRole == BX_DOL_STUDIO_ROLE_MASTER)
-                continue;
-
-            $aTmplVarsRoles[] = array(
-                'id' => $sHtmlIdPrefix . '-' . $iRole, 
-                'type' => !$bRole ? 'radio' : 'checkbox',
-                'value' => $iRole,
-                'onclick' => sprintf($sMaskOnClick, $sJsObject, $iAccountId, $iRole),
-                'title' => _t($aRole['title']), 
-                'bx_if:show_checked' => array(
-                    'condition' => ($bRole && $iAccountRole & (1 << ($iRole - 1))) || (!$bRole && $iAccountRole == 0),
-                    'content' => array()
-                ),
-                'bx_if:show_divider' => array(
-                    'condition' => !$bRole,
-                    'content' => array()
-                )
-            );
-        }
-
-        return $this->parseHtmlByName('set_role_popup.html', array(
-            'bx_repeat:roles' => $aTmplVarsRoles
-        ));
-    }
-}
-
-/** @} */

+ 0 - 71
modules/boonex/accounts/updates/12.0.2_12.0.3/source/install/config.php

@@ -1,71 +0,0 @@
-<?php
-/**
- * Copyright (c) UNA, Inc - https://una.io
- * MIT License - https://opensource.org/licenses/MIT
- *
- * @defgroup    Accounts Accounts
- * @ingroup     UnaModules
- *
- * @{
- */
-
-$aConfig = array(
-    /**
-     * Main Section.
-     */
-    'type' => BX_DOL_MODULE_TYPE_MODULE,
-    'name' => 'bx_accounts',
-    'title' => 'Accounts Manager',
-    'note' => 'Accounts Manager module.',
-    'version' => '12.0.3',
-    'vendor' => 'BoonEx',
-    'help_url' => 'http://feed.una.io/?section={module_name}',
-
-    'compatible_with' => array(
-        '12.0.1'
-    ),
-
-    /**
-     * 'home_dir' and 'home_uri' - should be unique. Don't use spaces in 'home_uri' and the other special chars.
-     */
-    'home_dir' => 'boonex/accounts/',
-    'home_uri' => 'accounts',
-
-    'db_prefix' => 'bx_accnt_',
-    'class_prefix' => 'BxAccnt',
-
-    /**
-     * Category for language keys.
-     */
-    'language_category' => 'Accounts',
-
-    /**
-     * Installation/Uninstallation Section.
-     */
-    'install' => array(
-        'execute_sql' => 1,
-        'update_languages' => 1,
-        'clear_db_cache' => 1,
-    ),
-    'uninstall' => array (
-        'execute_sql' => 1,
-        'update_languages' => 1,
-        'clear_db_cache' => 1,
-    ),
-    'enable' => array(
-        'execute_sql' => 1,
-        'clear_db_cache' => 1,
-    ),
-    'disable' => array (
-        'execute_sql' => 1,
-        'clear_db_cache' => 1,
-    ),
-
-    /**
-     * Dependencies Section
-     */
-    'dependencies' => array(),
-
-);
-
-/** @} */

+ 0 - 94
modules/boonex/accounts/updates/12.0.2_12.0.3/source/install/langs/en.xml

@@ -1,94 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<resources name="en" flag="gb" title="English">
-    <string name="_bx_accnt"><![CDATA[Accounts]]></string>
-    <string name="_bx_accounts"><![CDATA[Accounts]]></string>
-
-    <string name="_bx_accounts_form_display_account_settings_email_popup"><![CDATA[Edit Email]]></string>
-    <string name="_bx_accounts_form_display_account_create_popup"><![CDATA[Create new Account]]></string>
-    <string name="_bx_accounts_form_display_account_settings_password_popup"><![CDATA[Reset Password]]></string>
-
-    <string name="_bx_accnt_page_title_sys_manage_administration"><![CDATA[Manage All Accounts]]></string>
-    <string name="_bx_accnt_page_title_manage"><![CDATA[Manage Accounts]]></string>
-    <string name="_bx_accnt_page_title_browse"><![CDATA[Accounts]]></string>
-
-    <string name="_bx_accnt_page_block_title_system_manage_administration"><![CDATA[Manage All Accounts]]></string>
-    <string name="_bx_accnt_page_block_title_manage"><![CDATA[Manage Accounts]]></string>
-
-    <string name="_bx_accnt_menu_set_title_manage_tools"><![CDATA[Manage Tools Submenu]]></string>
-    <string name="_bx_accnt_menu_title_manage_tools"><![CDATA[Manage Tools Submenu]]></string>
-    <string name="_bx_accnt_menu_item_title_system_resend_cemail"><![CDATA[Resend Confirmation]]></string>
-    <string name="_bx_accnt_menu_item_title_resend_cemail"><![CDATA[Resend Confirmation]]></string>
-    <string name="_bx_accnt_menu_item_title_system_confirm"><![CDATA[Confirm]]></string>
-    <string name="_bx_accnt_menu_item_title_confirm"><![CDATA[Confirm]]></string>
-    <string name="_bx_accnt_menu_item_title_system_edit_email"><![CDATA[Edit Email]]></string>
-    <string name="_bx_accnt_menu_item_title_edit_email"><![CDATA[Edit Email]]></string>
-    <string name="_bx_accnt_menu_item_title_system_reset_password"><![CDATA[Reset Password]]></string>
-    <string name="_bx_accnt_menu_item_title_reset_password"><![CDATA[Reset Password]]></string>
-    <string name="_bx_accnt_menu_item_title_system_resend_remail"><![CDATA[Resend Reset Password]]></string>
-    <string name="_bx_accnt_menu_item_title_resend_remail"><![CDATA[Resend Reset Password]]></string>
-    <string name="_bx_accnt_menu_item_title_system_unlock_account"><![CDATA[Unlock]]></string>
-    <string name="_bx_accnt_menu_item_title_unlock_account"><![CDATA[Unlock]]></string>
-    <string name="_bx_accnt_menu_item_title_system_delete"><![CDATA[Delete]]></string>
-    <string name="_bx_accnt_menu_item_title_delete"><![CDATA[Delete]]></string>
-    <string name="_bx_accnt_menu_item_title_system_delete_with_content"><![CDATA[Delete With Content]]></string>
-    <string name="_bx_accnt_menu_item_title_delete_with_content"><![CDATA[Delete With Content]]></string>
-    <string name="_bx_accnt_menu_item_title_system_make_operator"><![CDATA[Make Operator]]></string>
-    <string name="_bx_accnt_menu_item_title_make_operator"><![CDATA[Make Operator]]></string>
-    <string name="_bx_accnt_menu_item_title_system_unmake_operator"><![CDATA[Unmake Operator]]></string>
-    <string name="_bx_accnt_menu_item_title_unmake_operator"><![CDATA[Unmake Operator]]></string>
-    <string name="_bx_accnt_menu_item_title_system_set_operator_role"><![CDATA[Set Operator Role]]></string>
-    <string name="_bx_accnt_menu_item_title_set_operator_role"><![CDATA[Set Operator Role]]></string>
-    <string name="_bx_accnt_menu_item_title_system_admt_accounts"><![CDATA[Accounts]]></string>
-    <string name="_bx_accnt_menu_item_title_admt_accounts"><![CDATA[Accounts]]></string>
-    <string name="_bx_accnt_menu_item_title_manage"><![CDATA[Manage]]></string>
-    <string name="_bx_accnt_menu_dashboard_manage_tools_addon_counter1_caption"><![CDATA[unconfirmed]]></string>
-
-    <string name="_bx_accnt_acl_action_edit_any_account"><![CDATA[Edit Any Account]]></string>
-
-    <string name="_bx_accnt_grid_filter_item_title_adm_select_one_filter1"><![CDATA[All Statuses]]></string>
-    <string name="_bx_accnt_grid_filter_item_title_adm_select_one_filter2"><![CDATA[All]]></string>
-    <string name="_bx_accnt_grid_filter_item_title_adm_active"><![CDATA[Active]]></string>
-    <string name="_bx_accnt_grid_filter_item_title_adm_operators"><![CDATA[Operators]]></string>
-    <string name="_bx_accnt_grid_filter_item_title_adm_pending"><![CDATA[Pending]]></string>
-    <string name="_bx_accnt_grid_filter_item_title_adm_suspended"><![CDATA[Suspended]]></string>    
-    <string name="_bx_accnt_grid_filter_item_title_adm_unconfirmed"><![CDATA[Unconfirmed]]></string>
-    <string name="_bx_accnt_grid_filter_item_title_adm_locked"><![CDATA[Locked]]></string>
-    <string name="_bx_accnt_grid_filter_item_title_adm_without_profile"><![CDATA[Without profile]]></string>
-    <string name="_bx_accnt_grid_column_title_adm_active"><![CDATA[Active]]></string>
-    <string name="_bx_accnt_grid_column_title_adm_name"><![CDATA[Name]]></string>
-    <string name="_bx_accnt_grid_column_title_adm_email"><![CDATA[Email]]></string>
-    <string name="_bx_accnt_grid_column_title_adm_ip"><![CDATA[IP]]></string>
-
-    <string name="_bx_accnt_grid_column_title_adm_is_confirmed"><![CDATA[Confirmed]]></string>
-    <string name="_bx_accnt_grid_column_title_adm_profiles"><![CDATA[Profiles]]></string>
-    <string name="_bx_accnt_grid_column_title_adm_logged"><![CDATA[Last Logged]]></string>
-    <string name="_bx_accnt_grid_column_title_adm_added"><![CDATA[Created]]></string>
-    <string name="_bx_accnt_grid_action_title_adm_activate"><![CDATA[Activate]]></string>
-    <string name="_bx_accnt_grid_action_title_adm_suspend"><![CDATA[Suspend]]></string>
-    <string name="_bx_accnt_grid_action_title_adm_confirm"><![CDATA[Confirm]]></string>
-    <string name="_bx_accnt_grid_action_title_adm_edit_email"><![CDATA[Edit Email]]></string>
-    <string name="_bx_accnt_grid_action_title_adm_resend_cemail"><![CDATA[Resend Confirmation]]></string>
-    <string name="_bx_accnt_grid_action_title_adm_resend_remail"><![CDATA[Resend Reset Password]]></string>
-    <string name="_bx_accnt_grid_action_title_adm_reset_password"><![CDATA[Reset Password]]></string>
-    <string name="_bx_accnt_grid_action_title_adm_unlock_account"><![CDATA[Unlock]]></string>
-    <string name="_bx_accnt_grid_action_title_adm_delete"><![CDATA[Delete]]></string>
-    <string name="_bx_accnt_grid_action_title_adm_delete_with_content"><![CDATA[Delete With Content]]></string>
-    <string name="_bx_accnt_grid_action_title_adm_more_actions"><![CDATA[More Actions]]></string>
-    <string name="_bx_accnt_grid_action_title_adm_more_add"><![CDATA[Add new]]></string>
-    <string name="_bx_accnt_grid_action_err_delete"><![CDATA[Cannot delete the selected account(s).]]></string>
-    <string name="_bx_accnt_grid_action_err_perform"><![CDATA[Cannot perform the action for selected account(s).]]></string>
-    <string name="_bx_accnt_grid_action_unlock_successed"><![CDATA[Successfully unlocked]]></string>
-    <string name="_bx_accnt_grid_action_unlock_error"><![CDATA[Account is not blocked]]></string>
-    <string name="_bx_accnt_grid_confirmation_status_none"><![CDATA[No]]></string>
-    <string name="_bx_accnt_grid_confirmation_status_email"><![CDATA[Email]]></string>
-    <string name="_bx_accnt_grid_confirmation_status_phone"><![CDATA[Phone]]></string>
-    <string name="_bx_accnt_grid_confirmation_status_email_and_phone"><![CDATA[All]]></string>
-
-    <string name="_bx_accnt_form_login_input_caption_system_email_confirmed"><![CDATA[Email confirmed]]></string>
-    <string name="_bx_accnt_form_account_input_email_confirmed"><![CDATA[Email confirmed]]></string>
- 
-    <string name="_bx_accnt_txt_more"><![CDATA[{0} more]]></string>
-    <string name="_bx_accnt_txt_see_more"><![CDATA[See more]]></string>
-    <string name="_bx_accnt_txt_copy_to_clipboard"><![CDATA[Copy to Clipboard]]></string>
-    <string name="_bx_accnt_txt_not_operator"><![CDATA[Not an Operator]]></string>
-</resources>

+ 0 - 88
modules/boonex/accounts/updates/12.0.2_12.0.3/source/install/sql/enable.sql

@@ -1,88 +0,0 @@
-SET @sName = 'bx_accounts';
-
-
--- PAGE: module administration
-INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `uri`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
-('bx_accounts_administration', '_bx_accnt_page_title_sys_manage_administration', '_bx_accnt_page_title_manage', @sName, 5, 192, 1, 'accounts-administration', 'page.php?i=accounts-administration', '', '', '', 0, 1, 0, '', '');
-
-INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES 
-('bx_accounts_administration', 1, @sName, '_bx_accnt_page_block_title_system_manage_administration', '_bx_accnt_page_block_title_manage', 11, 192, 'service', 'a:3:{s:6:\"module\";s:11:\"bx_accounts\";s:6:\"method\";s:12:\"manage_tools\";s:6:\"params\";a:1:{i:0;s:14:\"administration\";}}', 0, 1, 0);
-
-
--- MENU: manage tools submenu
-INSERT INTO `sys_objects_menu`(`object`, `title`, `set_name`, `module`, `template_id`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES 
-('bx_accounts_menu_manage_tools', '_bx_accnt_menu_title_manage_tools', 'bx_accounts_menu_manage_tools', @sName, 6, 0, 1, 'BxAccntMenuManageTools', 'modules/boonex/accounts/classes/BxAccntMenuManageTools.php');
-
-INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES 
-('bx_accounts_menu_manage_tools', @sName, '_bx_accnt_menu_set_title_manage_tools', 0);
-
-INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
-('bx_accounts_menu_manage_tools', @sName, 'edit-email', '_bx_accnt_menu_item_title_system_edit_email', '_bx_accnt_menu_item_title_edit_email', 'javascript:void(0)', 'javascript:{js_object}.onClickEditEmail({content_id}, this);', '_self', 'at', '', 192, 1, 0, 1),
-('bx_accounts_menu_manage_tools', @sName, 'resend-cemail', '_bx_accnt_menu_item_title_system_resend_cemail', '_bx_accnt_menu_item_title_resend_cemail', 'javascript:void(0)', 'javascript:{js_object}.onClickResendCemail({content_id}, this);', '_self', 'far envelope', '', 192, 1, 0, 2),
-('bx_accounts_menu_manage_tools', @sName, 'confirm', '_bx_accnt_menu_item_title_system_confirm', '_bx_accnt_menu_item_title_confirm', 'javascript:void(0)', 'javascript:{js_object}.onClickConfirm({content_id}, this);', '_self', 'fas check', '', 192, 1, 0, 3),
-('bx_accounts_menu_manage_tools', @sName, 'reset-password', '_bx_accnt_menu_item_title_system_reset_password', '_bx_accnt_menu_item_title_reset_password', 'javascript:void(0)', 'javascript:{js_object}.onClickResetPassword({content_id}, this);', '_self', 'eraser', '', 192, 1, 0, 4),
-('bx_accounts_menu_manage_tools', @sName, 'resend-remail', '_bx_accnt_menu_item_title_system_resend_remail', '_bx_accnt_menu_item_title_resend_remail', 'javascript:void(0)', 'javascript:{js_object}.onClickResendRemail({content_id}, this);', '_self', 'eraser', '', 192, 1, 0, 5),
-('bx_accounts_menu_manage_tools', @sName, 'unlock-account', '_bx_accnt_menu_item_title_system_unlock_account', '_bx_accnt_menu_item_title_unlock_account', 'javascript:void(0)', 'javascript:{js_object}.onClickUnlockAccount({content_id}, this);', '_self', 'unlock', '', 192, 1, 0, 6),
-('bx_accounts_menu_manage_tools', @sName, 'delete', '_bx_accnt_menu_item_title_system_delete', '_bx_accnt_menu_item_title_delete', 'javascript:void(0)', 'javascript:{js_object}.onClickDelete({content_id}, this);', '_self', 'far trash-alt', '', 192, 1, 0, 7),
-('bx_accounts_menu_manage_tools', @sName, 'delete-with-content', '_bx_accnt_menu_item_title_system_delete_with_content', '_bx_accnt_menu_item_title_delete_with_content', 'javascript:void(0)', 'javascript:{js_object}.onClickDeleteWithContent({content_id}, this);', '_self', 'far trash-alt', '', 192, 1, 0, 8),
-('bx_accounts_menu_manage_tools', @sName, 'make-operator', '_bx_accnt_menu_item_title_system_make_operator', '_bx_accnt_menu_item_title_make_operator', 'javascript:void(0)', 'javascript:{js_object}.onClickMakeOperator({content_id}, this);', '_self', 'wrench', '', 192, 0, 0, 9),
-('bx_accounts_menu_manage_tools', @sName, 'unmake-operator', '_bx_accnt_menu_item_title_system_unmake_operator', '_bx_accnt_menu_item_title_unmake_operator', 'javascript:void(0)', 'javascript:{js_object}.onClickUnmakeOperator({content_id}, this);', '_self', 'wrench', '', 192, 0, 0, 10),
-('bx_accounts_menu_manage_tools', @sName, 'set-operator-role', '_bx_accnt_menu_item_title_system_set_operator_role', '_bx_accnt_menu_item_title_set_operator_role', 'javascript:void(0)', 'javascript:{js_object}.onClickSetOperatorRole({content_id}, this);', '_self', 'wrench', '', 192, 1, 0, 11);
-
--- MENU: dashboard manage tools
-SET @iManageMenuOrder = (SELECT IFNULL(MAX(`order`), 0) FROM `sys_menu_items` WHERE `set_name`='sys_account_dashboard_manage_tools' LIMIT 1);
-INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `addon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
-('sys_account_dashboard_manage_tools', @sName, 'accounts-administration', '_bx_accnt_menu_item_title_system_admt_accounts', '_bx_accnt_menu_item_title_admt_accounts', 'page.php?i=accounts-administration', '', '_self', 'at', 'a:2:{s:6:"module";s:11:"bx_accounts";s:6:"method";s:27:"get_menu_addon_manage_tools";}', '', 192, 1, 0, @iManageMenuOrder + 1);
-
-
--- ACL
-INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
-(@sName, 'edit any entry', NULL, '_bx_accnt_acl_action_edit_any_account', '', 1, 3);
-SET @iIdActionProfileEditAny = LAST_INSERT_ID();
-
-SET @iUnauthenticated = 1;
-SET @iAccount = 2;
-SET @iStandard = 3;
-SET @iUnconfirmed = 4;
-SET @iPending = 5;
-SET @iSuspended = 6;
-SET @iModerator = 7;
-SET @iAdministrator = 8;
-SET @iPremium = 9;
-
-INSERT INTO `sys_acl_matrix` (`IDLevel`, `IDAction`) VALUES
-
--- edit any entry 
-(@iModerator, @iIdActionProfileEditAny),
-(@iAdministrator, @iIdActionProfileEditAny);
-
-
--- GRIDS: administration
-INSERT INTO `sys_objects_grid` (`object`, `source_type`, `source`, `table`, `field_id`, `field_order`, `field_active`, `paginate_url`, `paginate_per_page`, `paginate_simple`, `paginate_get_start`, `paginate_get_per_page`, `filter_fields`, `filter_fields_translatable`, `filter_mode`, `sorting_fields`, `sorting_fields_translatable`, `visible_for_levels`, `show_total_count`, `override_class_name`, `override_class_file`) VALUES
-('bx_accounts_administration', 'Sql', 'SELECT `ta`.*, `tp`.`status` AS `status` FROM `sys_accounts` AS `ta` LEFT JOIN `sys_profiles` AS `tp` ON `ta`.`id`=`tp`.`account_id` AND `tp`.`type`=''system'' WHERE 1 ', 'sys_accounts', 'id', 'logged', 'status', '', 20, NULL, 'start', '', 'name,email,ip,phone', '', 'like', 'email_confirmed,logged,added', '', 192, 1, 'BxAccntGridAdministration', 'modules/boonex/accounts/classes/BxAccntGridAdministration.php');
-
-INSERT INTO `sys_grid_fields` (`object`, `name`, `title`, `width`, `translatable`, `chars_limit`, `params`, `order`) VALUES
-('bx_accounts_administration', 'checkbox', '_sys_select', '2%', 0, '', '', 1),
-('bx_accounts_administration', 'switcher', '_bx_accnt_grid_column_title_adm_active', '6%', 0, '', '', 2),
-('bx_accounts_administration', 'name', '_bx_accnt_grid_column_title_adm_name', '16%', 0, '16', '', 3),
-('bx_accounts_administration', 'email', '_bx_accnt_grid_column_title_adm_email', '22%', 0, '16', '', 4),
-('bx_accounts_administration', 'is_confirmed', '_bx_accnt_grid_column_title_adm_is_confirmed', '5%', 0, '', '', 5),
-('bx_accounts_administration', 'profiles', '_bx_accnt_grid_column_title_adm_profiles', '23%', 0, '', '', 6),
-('bx_accounts_administration', 'logged', '_bx_accnt_grid_column_title_adm_logged', '10%', 0, '15', '', 7),
-('bx_accounts_administration', 'added', '_bx_accnt_grid_column_title_adm_added', '10%', 0, '15', '', 8),
-('bx_accounts_administration', 'actions', '', '6%', 0, '', '', 9);
-
-INSERT INTO `sys_grid_actions` (`object`, `type`, `name`, `title`, `icon`, `icon_only`, `confirm`, `order`) VALUES
-('bx_accounts_administration', 'bulk', 'activate', '_bx_accnt_grid_action_title_adm_activate', '', 0, 0, 1),
-('bx_accounts_administration', 'bulk', 'suspend', '_bx_accnt_grid_action_title_adm_suspend', '', 0, 0, 2),
-('bx_accounts_administration', 'bulk', 'resend_cemail', '_bx_accnt_grid_action_title_adm_resend_cemail', '', 0, 0, 3),
-('bx_accounts_administration', 'bulk', 'resend_remail', '_bx_accnt_grid_action_title_adm_resend_remail', '', 0, 0, 4),
-('bx_accounts_administration', 'bulk', 'confirm', '_bx_accnt_grid_action_title_adm_confirm', '', 0, 0, 5),
-('bx_accounts_administration', 'bulk', 'delete', '_bx_accnt_grid_action_title_adm_delete', '', 0, 1, 6),
-('bx_accounts_administration', 'bulk', 'delete_with_content', '_bx_accnt_grid_action_title_adm_delete_with_content', '', 0, 1, 7),
-('bx_accounts_administration', 'single', 'edit_email', '_bx_accnt_grid_action_title_adm_edit_email', '', 0, 0, 0),
-('bx_accounts_administration', 'single', 'reset_password', '_bx_accnt_grid_action_title_adm_reset_password', '', 0, 0, 0),
-('bx_accounts_administration', 'single', 'resend_remail', '_bx_accnt_grid_action_title_adm_resend_remail', '', 0, 0, 0),
-('bx_accounts_administration', 'single', 'unlock_account', '_bx_accnt_grid_action_title_adm_unlock_account', '', 0, 0, 0),
-('bx_accounts_administration', 'single', 'settings', '_bx_accnt_grid_action_title_adm_more_actions', 'cog', 1, 0, 2),
-('bx_accounts_administration', 'independent', 'add', '_bx_accnt_grid_action_title_adm_more_add', 'plus', 0, 0, 0);

+ 0 - 18
modules/boonex/accounts/updates/12.0.2_12.0.3/source/template/set_role_popup.html

@@ -1,18 +0,0 @@
-<div class="bx-accnt-set-role">
-    <div class="bx-accnt-sr-roles">
-        <bx_repeat:roles>
-            <div class="bx-accnt-sr-role bx-accnt-sr-role-__value__ bx-def-round-corners bx-def-color-bg-hl-hover">
-                <div class="bx-accnt-sr-role-cnt bx-def-padding-leftright bx-def-padding-sec-topbottom">
-                    <input type="__type__" id="__id__" name="role[]" value="__value__" onclick="__onclick__"<bx_if:show_checked> checked="checked"</bx_if:show_checked> />
-                    <label class="bx-def-margin-sec-left" for="__id__">__title__</label>
-                </div>
-            </div>
-            <bx_if:show_divider>
-                <div class="bx-def-hr"></div>
-            </bx_if:show_divider>
-        </bx_repeat:roles>
-    </div>
-    <div class="bx-accnt-sr-done bx-def-margin-sec-topbottom bx-def-font-align-center">
-        <a class="bx-btn" href="javascript:void(0)" onclick="javascript:$('.bx-popup-applied:visible').dolPopupHide();"><bx_text:_sys_done /></a>
-    </div>
-</div>

+ 0 - 51
modules/boonex/accounts/updates/12.0.3_12.0.4/install/config.php

@@ -1,51 +0,0 @@
-<?php
-/**
- * Copyright (c) UNA, Inc - https://una.io
- * MIT License - https://opensource.org/licenses/MIT
- */
-
-$aConfig = array(
-    /**
-     * Main Section.
-     */
-    'title' => 'Accounts Manager',
-    'version_from' => '12.0.3',
-    'version_to' => '12.0.4',
-    'vendor' => 'BoonEx',
-
-    'compatible_with' => array(
-        '12.1.0-B1'
-    ),
-
-    /**
-     * 'home_dir' and 'home_uri' - should be unique. Don't use spaces in 'home_uri' and the other special chars.
-     */
-    'home_dir' => 'boonex/accounts/updates/update_12.0.3_12.0.4/',
-    'home_uri' => 'accounts_update_1203_1204',
-
-    'module_dir' => 'boonex/accounts/',
-    'module_uri' => 'accounts',
-
-    'db_prefix' => 'bx_accnt_',
-    'class_prefix' => 'BxAccnt',
-
-    /**
-     * Installation/Uninstallation Section.
-     */
-    'install' => array(
-        'execute_sql' => 1,
-        'update_files' => 1,
-        'update_languages' => 1,
-        'clear_db_cache' => 1,
-    ),
-
-    /**
-     * Category for language keys.
-     */
-    'language_category' => 'Accounts',
-
-    /**
-     * Files Section
-     */
-    'delete_files' => array(),
-);

+ 0 - 13
modules/boonex/accounts/updates/12.0.3_12.0.4/install/installer.php

@@ -1,13 +0,0 @@
-<?php
-/**
- * Copyright (c) UNA, Inc - https://una.io
- * MIT License - https://opensource.org/licenses/MIT
- */
-
-class BxAccntUpdater extends BxDolStudioUpdater
-{
-    function __construct($aConfig)
-    {
-        parent::__construct($aConfig);
-    }
-}

+ 0 - 18
modules/boonex/accounts/updates/12.0.3_12.0.4/install/langs/en.xml

@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<resources name="en" flag="gb" title="English">
-	<string_add name="_bx_accounts_option_export_to"><![CDATA[Export to]]></string_add>
-    <string_add name="_bx_accounts_option_export_fields"><![CDATA[Export fields]]></string_add>
-	<string_add name="_bx_accnt_grid_action_title_adm_export"><![CDATA[Export]]></string_add>
-	<string_add name="_bx_accnt_txt_export_to_csv"><![CDATA[CSV]]></string_add>
-    <string_add name="_bx_accnt_txt_export_to_xml"><![CDATA[XML]]></string_add>
-    <string_add name="_bx_accnt_txt_field_name"><![CDATA[Name]]></string_add>
-    <string_add name="_bx_accnt_txt_field_email"><![CDATA[Email]]></string_add>
-    <string_add name="_bx_accnt_txt_field_email_confirmed"><![CDATA[Email Confirmed]]></string_add>
-    <string_add name="_bx_accnt_txt_field_phone"><![CDATA[Phone]]></string_add>
-    <string_add name="_bx_accnt_txt_field_receive_updates"><![CDATA[Receive Updates]]></string_add>
-    <string_add name="_bx_accnt_txt_field_receive_news"><![CDATA[Receive News]]></string_add>
-    <string_add name="_bx_accnt_txt_field_added"><![CDATA[Added]]></string_add>
-    <string_add name="_bx_accnt_txt_field_changed"><![CDATA[Changed]]></string_add>
-    <string_add name="_bx_accnt_txt_field_logged"><![CDATA[Logged]]></string_add>
-    <string_add name="_bx_accnt_txt_field_ip"><![CDATA[IP]]></string_add>
-</resources>

+ 0 - 26
modules/boonex/accounts/updates/12.0.3_12.0.4/install/sql/enable.sql

@@ -1,26 +0,0 @@
-SET @sName = 'bx_accounts';
-
-
--- SETTINGS
-DELETE FROM `sys_options_types` WHERE `name`=@sName;
-SET @iTypeOrder = (SELECT MAX(`order`) FROM `sys_options_types` WHERE `group` = 'modules');
-INSERT INTO `sys_options_types`(`group`, `name`, `caption`, `icon`, `order`) VALUES 
-('modules', @sName, '_bx_accounts', 'bx_accounts@modules/boonex/accounts/|std-icon.svg', IF(ISNULL(@iTypeOrder), 1, @iTypeOrder + 1));
-SET @iTypeId = LAST_INSERT_ID();
-
-DELETE FROM `sys_options_categories` WHERE `name`=@sName;
-INSERT INTO `sys_options_categories` (`type_id`, `name`, `caption`, `order`)
-VALUES (@iTypeId, @sName, '_bx_accounts', 1);
-SET @iCategId = LAST_INSERT_ID();
-
-DELETE FROM `sys_options` WHERE `name` IN ('bx_accounts_export_to', 'bx_accounts_export_fields');
-INSERT INTO `sys_options` (`name`, `value`, `category_id`, `caption`, `type`, `check`, `check_params`, `check_error`, `extra`, `order`) VALUES
-('bx_accounts_export_to', 'csv', @iCategId, '_bx_accounts_option_export_to', 'select', '', '', '', 'a:2:{s:6:"module";s:11:"bx_accounts";s:6:"method";s:21:"get_options_export_to";}', 10),
-('bx_accounts_export_fields', 'name,email', @iCategId, '_bx_accounts_option_export_fields', 'list', '', '', '', 'a:2:{s:6:"module";s:11:"bx_accounts";s:6:"method";s:25:"get_options_export_fields";}', 20);
-
-
--- GRIDS
-DELETE FROM `sys_grid_actions` WHERE `object`='bx_accounts_administration' AND `name`='export' AND `type` IN ('bulk', 'independent');
-INSERT INTO `sys_grid_actions` (`object`, `type`, `name`, `title`, `icon`, `icon_only`, `confirm`, `order`) VALUES
-('bx_accounts_administration', 'bulk', 'export', '_bx_accnt_grid_action_title_adm_export', '', 0, 0, 8),
-('bx_accounts_administration', 'independent', 'export', '_bx_accnt_grid_action_title_adm_export', 'download', 0, 0, 1);

+ 0 - 103
modules/boonex/accounts/updates/12.0.3_12.0.4/source/classes/BxAccntConfig.php

@@ -1,103 +0,0 @@
-<?php defined('BX_DOL') or die('hack attempt');
-/**
- * Copyright (c) UNA, Inc - https://una.io
- * MIT License - https://opensource.org/licenses/MIT
- *
- * @defgroup    Accounts Accounts
- * @ingroup     UnaModules
- *
- * @{
- */
-
-class BxAccntConfig extends BxBaseModGeneralConfig
-{
-    protected $_oDb;
-    protected $_aHtmlIds;
-
-    /**
-     * Constructor
-     */
-    public function __construct($aModule)
-    {
-        parent::__construct($aModule);
-
-        $this->CNF = array (
-            // some params
-            'PARAM_PROFILE_NAME_LENGTH_MAX' => 10,
-            'PARAM_EXPORT_TO' => 'bx_accounts_export_to',
-            'PARAM_EXPORT_FIELDS' => 'bx_accounts_export_fields',
-
-            // page URIs
-            'URL_MANAGE_ADMINISTRATION' => 'page.php?i=accounts-administration',
-
-            // objects
-            'OBJECT_STORAGE_FILES' => 'sys_files',
-            'OBJECT_FORM_ACCOUNT' => 'bx_accounts_account',
-            'OBJECT_FORM_ACCOUNT_DISPLAY_SETTINGS_EMAIL' => 'bx_accounts_account_settings_email',
-            'OBJECT_FORM_ACCOUNT_DISPLAY_CREATE' => 'bx_accounts_account_create',
-            'OBJECT_MENU_MANAGE_TOOLS' => 'bx_accounts_menu_manage_tools', //manage menu in content administration tools
-            'OBJECT_GRID_ADMINISTRATION' => 'bx_accounts_administration',
-            'OBJECT_GRID_MODERATION' => 'bx_accounts_moderation',
-
-                // some language keys
-            'T' => array (
-                'grid_action_err_delete' => '_bx_accnt_grid_action_err_delete',
-                'grid_action_err_perform' => '_bx_accnt_grid_action_err_perform',
-                'filter_item_active' => '_bx_accnt_grid_filter_item_title_adm_active',
-                'filter_item_operators' => '_bx_accnt_grid_filter_item_title_adm_operators',
-                'filter_item_pending' => '_bx_accnt_grid_filter_item_title_adm_pending',
-                'filter_item_suspended' => '_bx_accnt_grid_filter_item_title_adm_suspended',
-                'filter_item_unconfirmed' => '_bx_accnt_grid_filter_item_title_adm_unconfirmed',
-                'filter_item_locked' => '_bx_accnt_grid_filter_item_title_adm_locked',
-                'filter_item_without_profile' => '_bx_accnt_grid_filter_item_title_adm_without_profile',
-                'filter_item_select_one_filter1' => '_bx_accnt_grid_filter_item_title_adm_select_one_filter1',
-                'filter_item_select_one_filter2' => '_bx_accnt_grid_filter_item_title_adm_select_one_filter2',
-            )
-        );
-
-        $this->_aObjects = array(
-            'alert' => $this->_sName,
-        );
-
-        $this->_aJsClasses = array(
-            'main' => 'BxAccntMain',
-            'manage_tools' => 'BxAccntManageTools'
-        );
-
-        $this->_aJsObjects = array(
-            'main' => 'oBxAccntMain',
-            'manage_tools' => 'oBxAccntManageTools'
-        );
-
-        $this->_aGridObjects = array(
-            'moderation' => $this->CNF['OBJECT_GRID_MODERATION'],
-            'administration' => $this->CNF['OBJECT_GRID_ADMINISTRATION'],
-
-        );
-
-        $sHtmlPrefix = str_replace('_', '-', $this->_sName);
-        $this->_aHtmlIds = array(
-            'profile' => $sHtmlPrefix . '-profile-',
-            'profile_more_popup' => $sHtmlPrefix . '-profile-more-popup-',
-
-            'password_text' => $sHtmlPrefix . '-txt-password',
-            'password_button' => $sHtmlPrefix . '-btn-copy',
-            'password_popup' => $sHtmlPrefix . '-password-popup',
-        );
-    }
-
-    public function init(&$oDb)
-    {
-        $this->_oDb = &$oDb;
-    }
-
-    public function getHtmlIds($sKey = '')
-    {
-        if(empty($sKey))
-            return $this->_aHtmlIds;
-
-        return isset($this->_aHtmlIds[$sKey]) ? $this->_aHtmlIds[$sKey] : '';
-    }
-}
-
-/** @} */

+ 0 - 35
modules/boonex/accounts/updates/12.0.3_12.0.4/source/classes/BxAccntDb.php

@@ -1,35 +0,0 @@
-<?php defined('BX_DOL') or die('hack attempt');
-/**
- * Copyright (c) UNA, Inc - https://una.io
- * MIT License - https://opensource.org/licenses/MIT
- *
- * @defgroup    Accounts Accounts
- * @ingroup     UnaModules
- *
- * @{
- */
-
-class BxAccntDb extends BxBaseModGeneralDb
-{
-    function __construct(&$oConfig)
-    {
-        parent::__construct($oConfig);
-    }
-
-    public function getAccountFields()
-    {
-        return $this->getFields('sys_accounts');
-    }
-
-    public function getAccountIds()
-    {
-    	return $this->getColumn("SELECT `id` FROM `sys_accounts` WHERE 1", "id");
-    }
-
-    public function updateAccount($aSet, $aWhere)
-    {
-    	return (int)$this->query("UPDATE `sys_accounts` SET " . $this->arrayToSQL($aSet) . " WHERE " . $this->arrayToSQL($aWhere, ' AND ')) > 0;
-    }
-}
-
-/** @} */

+ 0 - 731
modules/boonex/accounts/updates/12.0.3_12.0.4/source/classes/BxAccntGridAdministration.php

@@ -1,731 +0,0 @@
-<?php defined('BX_DOL') or die('hack attempt');
-/**
- * Copyright (c) UNA, Inc - https://una.io
- * MIT License - https://opensource.org/licenses/MIT
- *
- * @defgroup    Accounts Accounts
- * @ingroup     UnaModules
- * 
- * @{
- */
-
-class BxAccntGridAdministration extends BxBaseModProfileGridAdministration
-{
-    protected $_sFilter2Name;
-	protected $_sFilter2Value;
-	protected $_aFilter2Values;
-    
-    public function __construct ($aOptions, $oTemplate = false)
-    {
-    	$this->MODULE = 'bx_accounts';
-        parent::__construct ($aOptions, $oTemplate);
-
-        $CNF = &$this->_oModule->_oConfig->CNF;
-        $this->_aFilter1Values = array_merge($this->_aFilter1Values, array(
-            'unconfirmed' => $CNF['T']['filter_item_unconfirmed'],
-            'locked' => $CNF['T']['filter_item_locked'],
-            'without_profile' => $CNF['T']['filter_item_without_profile'],
-        ));
-
-        $this->_sFilter2Name = 'filter2';
-        $this->_aFilter2Values = array(
-            'operators' => $CNF['T']['filter_item_operators']
-        );
-
-        $sFilter2 = bx_get($this->_sFilter2Name);
-        if(!empty($sFilter2)) {
-            $this->_sFilter2Value = bx_process_input($sFilter2);
-            $this->_aQueryAppend[$this->_sFilter2Name] = $this->_sFilter2Value;
-        }
-    }
-
-    protected function _getDataSql($sFilter, $sOrderField, $sOrderDir, $iStart, $iPerPage)
-    {
-        if(strpos($sFilter, $this->_sParamsDivider) !== false)
-            list($this->_sFilter1Value, $this->_sFilter2Value, $sFilter) = explode($this->_sParamsDivider, $sFilter);
-
-    	if(!empty($this->_sFilter1Value))
-            switch($this->_sFilter1Value) {
-                case 'unconfirmed':
-                    $sCnfnType = getParam('sys_account_confirmation_type');
-                    switch($sCnfnType) {
-                        case 'email':
-                            $this->_aOptions['source'] .= " AND `ta`.`email_confirmed`='0'";
-                            break;
-                        case 'phone':
-                            $this->_aOptions['source'] .= " AND `ta`.`phone_confirmed`='0'";
-                            break;
-                        case 'email_and_phone':
-                            $this->_aOptions['source'] .= " AND (`ta`.`email_confirmed`='0' OR `ta`.`phone_confirmed`='0')";
-                            break;
-                    }
-                    break;
-
-                case 'locked':
-                    $this->_aOptions['source'] .= " AND `ta`.`locked` = 1";
-                    break;
-                
-                case 'without_profile':
-                    $this->_aOptions['source'] .= " AND `ta`.`id` NOT IN (SELECT `account_id` FROM `sys_profiles` WHERE `type` <> 'system')";
-                    break;
-
-                default:
-        	        $this->_aOptions['source'] .= $this->_oModule->_oDb->prepareAsString(" AND `tp`.`status`=?", $this->_sFilter1Value);
-            }
-
-        if(!empty($this->_sFilter2Value))
-        	$this->_aOptions['source'] .= $this->_oModule->_oDb->prepareAsString(" AND `ta`.`role` & " . BX_DOL_ROLE_ADMIN ." = " . BX_DOL_ROLE_ADMIN);
-
-        $this->_aOptions['source'] .= " AND `ta`.`email` <> '' ";
-        
-        return parent::_getDataSqlInner($sFilter, $sOrderField, $sOrderDir, $iStart, $iPerPage);
-    }
-    
-    protected function _getFilterControls()
-    {
-        parent::_getFilterControls();
-
-        return  $this->_getFilterSelectOne($this->_sFilter1Name, $this->_sFilter1Value, $this->_aFilter1Values) . $this->_getFilterSelectOne($this->_sFilter2Name, $this->_sFilter2Value, $this->_aFilter2Values) . $this->_getSearchInput();
-    }
-    
-    public function getCode($isDisplayHeader = true)
-    {
-        return $this->_oModule->_oTemplate->getJsCode('main', array(
-        	'aHtmlIds' => $this->_oModule->_oConfig->getHtmlIds()
-        )) . parent::getCode($isDisplayHeader);
-    }
-
-    public function performActionActivate()
-    {
-    	$this->_performActionEnable(true);
-    }
-
-	public function performActionSuspend()
-    {
-    	$this->_performActionEnable(false);
-    }
-
-    public function performActionEditEmail()
-    {
-        $CNF = &$this->_oModule->_oConfig->CNF;
-
-        $aIds = bx_get('ids');
-        if(!$aIds || !is_array($aIds)) {
-            $iId = (int)bx_get('id');
-            if(!$iId)
-                return echoJson(array());
-
-            $aIds = array($iId);
-        }
-
-        $iId = $aIds[0];
-        $oAccount = BxDolAccount::getInstance($iId);
-        if(!$oAccount)
-            return echoJson(array());
-
-        $aAccount = $oAccount->getInfo();
-        $sAction = 'edit_email';
-
-        $oForm = BxDolForm::getObjectInstance($CNF['OBJECT_FORM_ACCOUNT'], $CNF['OBJECT_FORM_ACCOUNT_DISPLAY_SETTINGS_EMAIL']);
-        $oForm->aFormAttrs['action'] = BX_DOL_URL_ROOT . 'grid.php?o=' . $this->_sObject . '&a=' . $sAction . '&id=' . $iId;
-        $oForm->initChecker($aAccount);
-
-        if($oForm->isSubmittedAndValid()) {
-            $sEmail = $oForm->getCleanValue('email');
-            if(strcmp($aAccount['email'], $sEmail) !== 0 && BxDolAccountQuery::getInstance()->getIdByEmail($sEmail))
-                return echoJson(array('msg' => _t('_sys_form_account_input_email_uniq_error_loggedin')));
-
-            if($oForm->update($aAccount['id'])) {
-                bx_alert('account', 'edited', $aAccount['id'], BxDolAccount::getInstance()->id(), array('display' => $CNF['OBJECT_FORM_ACCOUNT_DISPLAY_SETTINGS_EMAIL']));
-
-                $aRes = array('grid' => $this->getCode(false), 'blink' => $iId);
-                
-                $oAccount->doAudit($iId, '_sys_audit_action_account_email_changed', array('old_email' => $oAccount->getEmail(), 'new_email' => $sEmail));
-            }
-            else
-                $aRes = array('msg' => _t('_sys_txt_error_account_update'));
-
-            echoJson($aRes);
-        }
-        else {
-            $sContent = BxTemplStudioFunctions::getInstance()->popupBox('bx-account-edit-email-popup', _t('_bx_accounts_form_display_account_settings_email_popup'), $this->_oModule->_oTemplate->parseHtmlByName('edit_email.html', array(
-                'form_id' => $oForm->id,
-                'form' => $oForm->getCode(true),
-                'object' => $this->_sObject,
-                'action' => $sAction
-            )));
-
-            echoJson(array('popup' => array('html' => $sContent, 'options' => array('closeOnOuterClick' => false))));
-        }
-    }
-    
-    public function performActionAdd()
-    {
-      
-        $CNF = &$this->_oModule->_oConfig->CNF;
-        $sAction = 'add';
-        $oForm = BxDolForm::getObjectInstance($CNF['OBJECT_FORM_ACCOUNT'], $CNF['OBJECT_FORM_ACCOUNT_DISPLAY_CREATE']);
-        $oForm->aFormAttrs['action'] = BX_DOL_URL_ROOT . 'grid.php?o=' . $this->_sObject . '&a=' . $sAction;
-        $oForm->initChecker();
-
-        if($oForm->isSubmittedAndValid()) {
-           
-            $iAccountId = $oForm->insert();
-            
-            if (!$iAccountId) {
-                $aRes = array('msg' => _t('_sys_txt_error_account_insert'));
-            }
-            else{
-                $aRes = array('grid' => $this->getCode(false), 'blink' => $iAccountId);
-                
-                $oBxTemplAccountForms = new BxTemplAccountForms();
-                
-                $iProfileId = $oBxTemplAccountForms->onAccountCreated($iAccountId, $oForm->isSetPendingApproval(), BX_PROFILE_ACTION_MANUAL, false);
-
-                // perform action
-                BxDolAccount::isAllowedCreate ($iProfileId, true);
-                
-                // check
-                $aModulesProfile = array(); 
-                $aModules = BxDolModuleQuery::getInstance()->getModulesBy(array('type' => 'modules', 'active' => 1));
-                foreach($aModules as $aModule) {
-                    $oModule = BxDolModule::getInstance($aModule['name']);
-                    if($oModule instanceof iBxDolProfileService && BxDolService::call($aModule['name'], 'act_as_profile') === true)
-                        $aModulesProfile[] = $aModule;
-                }
-
-                $sDefaultProfileType = getParam('sys_account_default_profile_type');
-                if(count($aModulesProfile) == 1)
-                    $sProfileModule = $aModulesProfile[0]['name'];
-                else if(!empty($sDefaultProfileType)) 
-                    $sProfileModule = $sDefaultProfileType;
-
-                if (getParam('sys_account_auto_profile_creation') && !empty($sProfileModule)) {
-                    $oAccount = BxDolAccount::getInstance($iAccountId);
-                    $aProfileInfo = BxDolService::call($sProfileModule, 'prepare_fields', array(array(
-                        'author' => $iProfileId,
-                        'name' => $oAccount->getDisplayName(),
-                    )));
-                    $a = BxDolService::call($sProfileModule, 'entity_add', array($iProfileId, $aProfileInfo));
-                    if (isset($a['content']['profile_id']) && (int)$a['content']['profile_id'] > 0){
-                        BxDolAcl::getInstance()->setMembership((int)$a['content']['profile_id'], MEMBERSHIP_ID_STANDARD);
-                    }
-                    echoJson($aRes);
-                }
-            }
-        }
-        else {
-            $sContent = BxTemplStudioFunctions::getInstance()->popupBox('bx-account-edit-email-popup', _t('_bx_accounts_form_display_account_create_popup'), $this->_oModule->_oTemplate->parseHtmlByName('create.html', array(
-                'form_id' => $oForm->id,
-                'form' => $oForm->getCode(true),
-                'object' => $this->_sObject,
-                'action' => $sAction
-            )));
-
-            echoJson(array('popup' => array('html' => $sContent, 'options' => array('closeOnOuterClick' => false))));
-        }
-    }
-
-    public function performActionExport()
-    {
-        $CNF = &$this->_oModule->_oConfig->CNF;
-
-        $aFields = explode(',', getParam($CNF['PARAM_EXPORT_FIELDS']));
-        if(empty($aFields) || !is_array($aFields))
-            return echoJson(array());
-
-        
-        $aTitles = $aConverters = array();
-        foreach($aFields as $sField) {
-            $aTitles[$sField] = _t('_bx_accnt_txt_field_' . $sField);
-            
-            $sConverter = '_exportFieldConverter' . bx_gen_method_name($sField);
-            if(method_exists($this, $sConverter))
-                $aConverters[$sField] = $sConverter;
-        }
-
-        $sMethod = '_exportTo' . bx_gen_method_name(getParam($CNF['PARAM_EXPORT_TO']));
-        if(!method_exists($this, $sMethod))
-            return echoJson(array());
-
-        $aIds = bx_get('ids');
-        if(!$aIds || !is_array($aIds))
-            $aIds = $this->_oModule->_oDb->getAccountIds();
-
-        if(($aFile = $this->$sMethod($aIds, $aFields, $aTitles, $aConverters)) === false)
-            return echoJson(array());
-
-        list($sFilePath, $sFileUrl) = $aFile;
-
-        $oStorage = BxDolStorage::getObjectInstance($CNF['OBJECT_STORAGE_FILES']);
-        if($oStorage && ($iFileId = $oStorage->storeFileFromPath($sFilePath, true, bx_get_logged_profile_id())) !== false) {
-            $sFileUrl = $oStorage->getFileUrlById($iFileId);
-
-            @unlink($sFilePath);
-        }
-
-        return echoJson(array('redirect' => $sFileUrl));
-    }
-    
-    public function performActionConfirm()
-    {
-        $CNF = &$this->_oModule->_oConfig->CNF;
-
-    	$aIds = bx_get('ids');
-        if(!$aIds || !is_array($aIds))
-            return echoJson(array());
-
-        $oAccount = BxDolAccount::getInstance();
-
-        $iAffected = 0;
-        $aIdsAffected = array();
-        foreach($aIds as $iId){
-            if (BxDolAccount::isNeedConfirmEmail()) {
-                if($oAccount->updateEmailConfirmed(true, true, $iId)) {
-                    $aIdsAffected[] = $iId;
-                    $iAffected++;  
-                }
-            }
-
-            if (BxDolAccount::isNeedConfirmPhone()){
-                if($oAccount->updatePhoneConfirmed(true, $iId)) {
-                    $aIdsAffected[] = $iId;
-                    $iAffected++;  
-                }
-            }
-        }
-		echoJson($iAffected ? array('grid' => $this->getCode(false), 'blink' => $aIdsAffected) : array('msg' => _t($CNF['T']['grid_action_err_perform'])));
-    }
-    
-    public function performActionResendCemail()
-    {
-        $CNF = &$this->_oModule->_oConfig->CNF;
-
-        $aIds = bx_get('ids');
-        if(!$aIds || !is_array($aIds))
-            return echoJson(array());
-
-        $oAccount = BxDolAccount::getInstance();
-
-        $iAffected = 0;
-        $aIdsAffected = array();
-        foreach($aIds as $iId)
-            if($oAccount->sendConfirmationEmail($iId)) {
-                $aIdsAffected[] = $iId;
-                $iAffected++;  
-            }
-
-        echoJson($iAffected ? array('grid' => $this->getCode(false), 'blink' => $aIdsAffected) : array('msg' => _t($CNF['T']['grid_action_err_perform'])));
-    }
-
-    public function performActionResetPassword()
-    {
-    	$aIds = bx_get('ids');
-        if(!$aIds || !is_array($aIds))
-            return echoJson(array());
-
-        $iId = $aIds[0];
-        $oAccount = BxDolAccount::getInstance($iId);
-        if(!$oAccount)
-            return echoJson(array());
-
-        $aRes = array();
-        $sPwd = genRndPwd();
-        if (BxDolAccount::getInstance()->updatePassword($sPwd, $iId)){
-            $sPopupId = $this->_oModule->_oConfig->getHtmlIds('password_popup');
-            $sPopupTitle = _t('_bx_accounts_form_display_account_settings_password_popup');
-            $sPopupContent = $this->_oModule->_oTemplate->parseHtmlByName('reset_password.html', array(
-                'js_object' => $this->_oModule->_oConfig->getJsObject('main'),
-                'html_id_text' => $this->_oModule->_oConfig->getHtmlIds('password_text'),
-                'html_id_button' => $this->_oModule->_oConfig->getHtmlIds('password_button'),
-                'password' => $sPwd,
-            ));
-
-            $aRes = array('popup' => BxTemplStudioFunctions::getInstance()->popupBox($sPopupId, $sPopupTitle, $sPopupContent));
-        }
-        else 
-            $aRes = array('msg' => _t('_bx_accnt_grid_action_err_perform'));
-
-        return echoJson($aRes);
-    }
-
-    public function performActionResendRemail()
-    {
-        $CNF = &$this->_oModule->_oConfig->CNF;
-
-        $aIds = bx_get('ids');
-        if(!$aIds || !is_array($aIds))
-            return echoJson(array());
-
-        $oAccount = BxDolAccount::getInstance();
-
-        $iAffected = 0;
-        $aIdsAffected = array();
-        foreach($aIds as $iId)
-            if($oAccount->sendResetPasswordEmail($iId)) {
-                $aIdsAffected[] = $iId;
-                $iAffected++;  
-            }
-
-        echoJson($iAffected ? array('grid' => $this->getCode(false), 'blink' => $aIdsAffected) : array('msg' => _t($CNF['T']['grid_action_err_perform'])));
-    }
-
-    public function performActionUnlockAccount()
-    {
-    	$aIds = bx_get('ids');
-        if(!$aIds || !is_array($aIds)) {
-            echoJson(array());
-            return;
-        }
-
-        $oAccountQuery = BxDolAccountQuery::getInstance();
-        foreach($aIds as $iId) {
-            $oAccount = BxDolAccount::getInstance($iId);
-            if(!$oAccount)
-                continue;
-
-            if ($oAccount->isLocked()){
-                $oAccountQuery->unlockAccount($iId);
-            }
-            
-            $oAccount->doAudit($iId, '_sys_audit_action_account_unlock');
-        }
-
-        return echoJson(array('grid' => $this->getCode(false), 'blink' => $aIds));
-    }
-
-    public function performActionSetOperatorRole()
-    {
-    	$aIds = bx_get('ids');
-        if(!$aIds || !is_array($aIds))
-            return echoJson(array());
-        
-        $oUtils = BxDolStudioRolesUtils::getInstance();
-
-        $aRoles = $oUtils->getRoles();
-        if(empty($aRoles) || !is_array($aRoles))
-            return echoJson(array('msg' => _t('_sys_txt_error_occured')));
-
-        $iId = (int)array_shift($aIds);
-
-        $sPopupName = str_replace('_', '-', $this->MODULE) . '-set-role-popup';
-        $sPopupContent = $this->_oModule->_oTemplate->getPopupSetRole($aRoles, $iId, $oUtils->getRole($iId));
-
-        return echoJson(array('popup' => array(
-            'html' => BxTemplFunctions::getInstance()->transBox($sPopupName, $sPopupContent),
-            'options' => array(
-                'closeOnOuterClick' => true,
-                'removeOnClose' => true
-            )
-        )));
-    }
-
-    public function performActionSetOperatorRoleSubmit()
-    {
-        $aIds = bx_get('ids');
-        if(!$aIds || !is_array($aIds))
-            return echoJson(array());
-
-        $iId = (int)array_shift($aIds);
-        if(!$iId)
-            return echoJson(array('msg' => _t('_sys_txt_error_occured')));
-
-        if(!BxDolStudioRolesUtils::getInstance()->setRole($iId, bx_process_input(bx_get('role'), BX_DATA_INT)))
-            return echoJson(array('msg' => _t('_error occured')));
-
-        echoJson(array('grid' => $this->getCode(false), 'blink' => $iId));
-    }
-
-    public function performActionMakeOperator()
-    {
-    	$this->_performActionChangeRole(3);
-    }
-
-    public function performActionUnmakeOperator()
-    {
-    	$this->_performActionChangeRole(1);
-    }
-
-    protected function _performActionChangeRole($iRole)
-    {
-        $CNF = &$this->_oModule->_oConfig->CNF;
-
-        $aIds = bx_get('ids');
-        if(!$aIds || !is_array($aIds))
-            return echoJson(array());
-
-        $oAccount = BxDolAccount::getInstance();
-        $oUtils = BxDolStudioRolesUtils::getInstance();
-
-        $iAffected = 0;
-        $aIdsAffected = array();
-        foreach($aIds as $iId) {
-            if(!$this->_oModule->_oDb->updateAccount(array('role' => $iRole), array('id' => $iId))) 
-                continue;
-
-            $oUtils->setRole($iId, $iRole == 3 ? BX_DOL_STUDIO_ROLE_OPERATOR : 0);
-
-            $oAccount->doAudit($iId, '_sys_audit_action_account_change_role_to_' . $iRole);
-
-            $aIdsAffected[] = $iId;
-            $iAffected++;
-        }
-
-        echoJson($iAffected ? array('grid' => $this->getCode(false), 'blink' => $aIdsAffected) : array('msg' => _t($CNF['T']['grid_action_err_perform'])));
-    }
-
-    protected function _performActionEnable($isChecked)
-    {
-    	$CNF = &$this->_oModule->_oConfig->CNF;
-
-    	$aIds = bx_get('ids');
-        if(!$aIds || !is_array($aIds)) {
-            echoJson(array());
-            return;
-        }
-        $iAffected = 0;
-        $aIdsAffected = array();
-        foreach($aIds as $iId)
-        	if($this->_enable($iId, $isChecked)) {
-        		$aIdsAffected[] = $iId;
-        		$iAffected++;
-                
-                $oAccount = BxDolAccount::getInstance($iId);
-                $oAccount->doAudit($iId, '_sys_audit_action_account_' . $isChecked ? 'activated' : 'suspended');
-        	}
-
-        echoJson($iAffected ? array('grid' => $this->getCode(false), 'blink' => $aIdsAffected) : array('msg' => _t($CNF['T']['grid_action_err_perform'])));
-    }
-
-    protected function _enable($mixedId, $isChecked)
-    {
-    	$oProfile = BxDolProfile::getInstanceAccountProfile($mixedId);
-    	if(!$oProfile)
-    	    return false;
-
-        $iAction = BX_PROFILE_ACTION_MANUAL;
-        $sMethod = $isChecked ? 'activate' : 'suspend';
-        if(!$oProfile->$sMethod($iAction, 0 ,false))
-            return false;
-
-        sendMailTemplate('t_ChangeStatusAccount' . ucfirst($sMethod), $oProfile->getAccountObject()->id(), $oProfile->id(), array(), BX_EMAIL_SYSTEM);
-        
-        $aProfiles = $oProfile->getAccountObject()->getProfiles();
-        foreach($aProfiles as $aProfile){
-            BxDolProfile::getInstance($aProfile['id'])->$sMethod($iAction, 0 ,false);
-        }
-        
-    	return true;
-    }
-
-    //--- Layout methods ---//
-    protected function _getActionEditEmail($sType, $sKey, $a, $isSmall = false, $isDisabled = false, $aRow = array())
-    {
-        return '';
-    }
-    
-    protected function _getCellEmailConfirmed($mixedValue, $sKey, $aField, $aRow)
-    {
-    	$mixedValue = (int)$mixedValue == 1 ? '_Yes' : '_No';
-        return parent::_getCellDefault(_t($mixedValue), $sKey, $aField, $aRow);
-    }
-
-    protected function _getActionResetPassword($sType, $sKey, $a, $isSmall = false, $isDisabled = false, $aRow = array())
-    {
-        return '';
-    }
-
-    protected function _getActionResendRemail($sType, $sKey, $a, $isSmall = false, $isDisabled = false, $aRow = array())
-    {
-        if($sType == 'single')
-            return '';
-
-        return parent::_getActionDefault ($sType, $sKey, $a, $isSmall, $isDisabled, $aRow);
-    }
-
-    protected function _getActionUnlockAccount($sType, $sKey, $a, $isSmall = false, $isDisabled = false, $aRow = array())
-    {
-        return '';
-    }
-
-    protected function _getCellName($mixedValue, $sKey, $aField, $aRow)
-    {
-        $oAccount = BxDolAccount::getInstance($aRow['id']);
-        if ($oAccount)
-            $s = ($aRow['locked'] == 1 ? $this->_oTemplate->parseIcon("lock col-red1") . ' ' : '') . $oAccount->getDisplayName();
-        return parent::_getCellDefault ($s, $sKey, $aField, $aRow);
-    }
-    
-	protected function _getCellProfiles($mixedValue, $sKey, $aField, $aRow)
-    {
-        $s = $this->_oModule->_oTemplate->getProfilesByAccount($aRow);
-
-        return parent::_getCellDefault ($s, $sKey, $aField, $aRow);
-    }
-
-    protected function _getCellLogged($mixedValue, $sKey, $aField, $aRow)
-    {
-        $mixedValue = !empty($mixedValue) ? bx_time_js($mixedValue) : _t('_sys_not_available');
-
-        return parent::_getCellDefault($mixedValue, $sKey, $aField, $aRow);
-    } 
-    
-    protected function _getCellAdded($mixedValue, $sKey, $aField, $aRow)
-    {
-        $mixedValue = !empty($mixedValue) ? bx_time_js($mixedValue) : _t('_sys_not_available');
-
-        return parent::_getCellDefault($mixedValue, $sKey, $aField, $aRow);
-    } 
-    
-    protected function _getCellIsConfirmed($mixedValue, $sKey, $aField, $aRow)
-    {
-        $oAccount = BxDolAccount::getInstance($aRow['id']);
-        $s = "";
-        if ($oAccount)
-            $s = $oAccount->getCurrentConfirmationStatusValue();
-        return parent::_getCellDefault(_t('_bx_accnt_grid_confirmation_status_' . $s), $sKey, $aField, $aRow);
-    }
-
-    protected function _isCheckboxDisabled($aRow)
-    {
-        return false;
-    }
-
-	protected function _getContentInfo($iId)
-    {
-    	return BxDolAccountQuery::getInstance()->getInfoById($iId);
-    }
-
-	protected function _doDelete($iId, $aParams = array())
-    {
-    	return BxDolAccount::getInstance($iId)->delete(isset($aParams['with_content']) && $aParams['with_content'] === true);
-    }
-    
-    
-
-    protected function _addJsCss()
-    {
-        parent::_addJsCss();
-        
-        $this->_oTemplate->addJs(array(
-            'main.css'
-        ));
-
-        $this->_oTemplate->addJs(array(
-        	'jquery.form.min.js',
-            'clipboard.min.js',
-            'main.js'
-        ));
-    }
-
-    protected function _isVisibleGrid($a)
-    {
-        if(isAdmin())
-            return true;
-        
-        return parent::_isVisibleGrid($a);
-    }
-
-    protected function _exportToCsv($aIds, $aFields, $aTitles, $aConverters)
-    {
-        $sFileDiv = ';';
-        $sFileName = 'accounts-' . date('Y.m.d') . '.csv';
-        $sFilePath = BX_DIRECTORY_PATH_TMP . $sFileName;
-        $oFileHandler = fopen($sFilePath, 'w');
-        if(!$oFileHandler)
-            return false;
-
-        fputcsv($oFileHandler, $aTitles, $sFileDiv);
-
-        $aFieldsFlip = array_flip($aFields);
-        $oAccountQuery = BxDolAccountQuery::getInstance();
-
-        foreach($aIds as $iId) {
-            $aAccount = $oAccountQuery->getInfoById($iId);
-            if(empty($aAccount) || !is_array($aAccount))
-                continue;
-            
-            $aConvert = array_intersect_key($aConverters, $aAccount);
-            foreach($aConvert as $sField => $sMethod)
-                $aAccount[$sField] = $this->$sMethod($aAccount[$sField]);
-
-            fputcsv($oFileHandler, array_intersect_key($aAccount, $aFieldsFlip), $sFileDiv);
-        }
-
-        fclose($oFileHandler);
-
-        return array($sFilePath, BX_DOL_URL_ROOT . 'tmp/' . $sFileName);
-    }
-
-    protected function _exportToXml($aIds, $aFields, $aTitles, $aConverters)
-    {
-        $sFileName = 'accounts-' . date('Y.m.d') . '.xml';
-        $sFilePath = BX_DIRECTORY_PATH_TMP . $sFileName;
-        $oFileHandler = fopen($sFilePath, 'w');
-        if(!$oFileHandler)
-            return false;
-
-        $aFieldsFlip = array_flip($aFields);
-        $oAccountQuery = BxDolAccountQuery::getInstance();
-
-        $oXML = xmlwriter_open_memory();
-        xmlwriter_set_indent($oXML, 1);
-        xmlwriter_set_indent_string($oXML, '  ');
-        
-        xmlwriter_start_document($oXML, '1.0', 'UTF-8');
-        xmlwriter_start_element($oXML, 'accounts');
-
-        foreach($aIds as $iId) {
-            $aAccount = $oAccountQuery->getInfoById($iId);
-            if(empty($aAccount) || !is_array($aAccount))
-                continue;
-
-            $aConvert = array_intersect_key($aConverters, $aAccount);
-            foreach($aConvert as $sField => $sMethod)
-                $aAccount[$sField] = $this->$sMethod($aAccount[$sField]);
-
-            xmlwriter_start_element($oXML, 'account');
-            $aAccountFields = array_intersect_key($aAccount, $aFieldsFlip);
-            foreach($aAccountFields as $sAccountField => $sAccountValue) {
-                xmlwriter_start_element($oXML, $sAccountField);
-                xmlwriter_write_cdata($oXML, $sAccountValue);
-                xmlwriter_end_element($oXML);
-            }
-            xmlwriter_end_element($oXML);
-        }
-
-        xmlwriter_end_document($oXML);
-
-        fwrite($oFileHandler, xmlwriter_output_memory($oXML));
-        fclose($oFileHandler);
-
-        return array($sFilePath, BX_DOL_URL_ROOT . 'tmp/' . $sFileName);
-    }
-
-    protected function _exportFieldConverterAdded($mixedValue)
-    {
-        return $this->__exportFieldConverterDate($mixedValue);
-    }
-
-    protected function _exportFieldConverterChanged($mixedValue)
-    {
-        return $this->__exportFieldConverterDate($mixedValue);
-    }
-
-    protected function _exportFieldConverterLogged($mixedValue)
-    {
-        return $this->__exportFieldConverterDateTime($mixedValue);
-    }
-
-    protected function __exportFieldConverterDate($mixedValue)
-    {
-        return date('Y.m.d', $mixedValue);
-    }
-
-    protected function __exportFieldConverterDateTime($mixedValue)
-    {
-        return date('Y.m.d H:i', $mixedValue);
-    }
-}
-
-/** @} */

+ 0 - 160
modules/boonex/accounts/updates/12.0.3_12.0.4/source/classes/BxAccntModule.php

@@ -1,160 +0,0 @@
-<?php defined('BX_DOL') or die('hack attempt');
-/**
- * Copyright (c) UNA, Inc - https://una.io
- * MIT License - https://opensource.org/licenses/MIT
- *
- * @defgroup    Accounts Accounts
- * @ingroup     UnaModules
- *
- * @{
- */
-
-class BxAccntModule extends BxBaseModGeneralModule
-{
-    /**
-     * Constructor
-     */
-    function __construct($aModule)
-    {
-        parent::__construct($aModule);
-
-        $this->_oConfig->init($this->_oDb);
-    }
-
-    public function serviceGetSafeServices()
-    {
-        return array ();
-    }
-
-    public function serviceGetOptionsExportTo()
-    {
-        return array(
-            'csv' => _t('_bx_accnt_txt_export_to_csv'),
-            'xml' => _t('_bx_accnt_txt_export_to_xml'),
-        );
-    }
-
-    public function serviceGetOptionsExportFields()
-    {
-        $aResult = array();
-
-        $aFields = $this->_oDb->getAccountFields();
-        if(empty($aFields['original']) || !is_array($aFields['original']))
-            return $aResult;
-
-        foreach($aFields['original'] as $sField) {
-            $sLangKey = '_bx_accnt_txt_field_' . $sField;
-            $sLangString = _t($sLangKey);
-            if(strcmp($sLangKey, $sLangString) == 0)
-                continue;
-
-            $aResult[] = array('key' => $sField, 'value' => $sLangString);
-        }
-
-        return $aResult;
-    }
-
-    /**
-     * @page service Service Calls
-     * @section bx_accounts Accounts
-     * @subsection bx_accounts-other Other
-     * @subsubsection bx_accounts-get_menu_addon_manage_tools get_menu_addon_manage_tools
-     * 
-     * @code bx_srv('bx_accounts', 'get_menu_addon_manage_tools', [...]); @endcode
-     * 
-     * Get number of 'unconfirmed' accounts for User End -> Dasboard page -> Manage block.
-     *
-     * @return integer number of 'unconfirmed' accounts
-     * 
-     * @see BxAccntModule::serviceGetMenuAddonManageTools
-     */
-    /** 
-     * @ref bx_accounts-get_menu_addon_manage_tools "get_menu_addon_manage_tools"
-     */
-    public function serviceGetMenuAddonManageTools()
-    {
-        bx_import('SearchResult', $this->_aModule);
-        $sClass = $this->_aModule['class_prefix'] . 'SearchResult';
-        $o = new $sClass();
-        $o->unsetPaginate();
-        $iNumTotal = $o->getNum();
-        
-        $o->fillFilters(array(
-            'unconfirmed' => 1,
-            'non_robot' => 'Robot'
-        ));
-      
-        return array('counter1_value' => $o->getNum(),'counter3_value' => $iNumTotal, 'counter1_caption' => _t('_bx_accnt_menu_dashboard_manage_tools_addon_counter1_caption'));
-    }
-    
-    public function checkAllowedConfirm(&$aDataEntry, $isPerformAction = false)
-    {
-    	$bAdmin = isAdmin();
-    	if(!$bAdmin || BxDolAccount::getInstance($aDataEntry['id'])->isConfirmed())
-    		return _t('_sys_txt_access_denied');
-
-    	return CHECK_ACTION_RESULT_ALLOWED;
-    }
-
-    public function checkAllowedDelete(&$aDataEntry, $isPerformAction = false)
-    {
-    	if(isAdmin() && (int)$aDataEntry['id'] == getLoggedId())
-    		return _t('_sys_txt_access_denied');
-
-        // check ACL
-        $aCheck = checkActionModule($this->_iProfileId, 'delete account', 'system', $isPerformAction);
-        if($aCheck[CHECK_ACTION_RESULT] != CHECK_ACTION_RESULT_ALLOWED)
-            return $aCheck[CHECK_ACTION_MESSAGE];
-
-        return CHECK_ACTION_RESULT_ALLOWED;
-    }
-
-    public function checkAllowedSetOperatorRole(&$aDataEntry, $isPerformAction = false)
-    {
-    	$bAdmin = isAdmin();
-        $iAccountId = getLoggedId();
-    	if(!$bAdmin || !BxDolStudioRolesUtils::getInstance()->isActionAllowed(BX_SRA_MANAGE_ROLES, $iAccountId) || (int)$aDataEntry['id'] == $iAccountId)
-            return _t('_sys_txt_access_denied');
-
-    	return CHECK_ACTION_RESULT_ALLOWED;
-    }
-
-    public function checkAllowedMakeOperator(&$aDataEntry, $isPerformAction = false)
-    {
-    	$bAdmin = isAdmin();
-        $iAccountId = getLoggedId();
-    	if(!$bAdmin || !BxDolStudioRolesUtils::getInstance()->isActionAllowed(BX_SRA_MANAGE_ROLES, $iAccountId) || (int)$aDataEntry['id'] == $iAccountId || (int)$aDataEntry['role'] == 3)
-            return _t('_sys_txt_access_denied');
-
-    	return CHECK_ACTION_RESULT_ALLOWED;
-    }
-
-    public function checkAllowedUnmakeOperator(&$aDataEntry, $isPerformAction = false)
-    {
-    	$bAdmin = isAdmin();
-        $iAccountId = getLoggedId();
-    	if(!$bAdmin || !BxDolStudioRolesUtils::getInstance()->isActionAllowed(BX_SRA_MANAGE_ROLES, $iAccountId) || (int)$aDataEntry['id'] == $iAccountId || (int)$aDataEntry['role'] != 3)
-            return _t('_sys_txt_access_denied');
-
-    	return CHECK_ACTION_RESULT_ALLOWED;
-    }
-    
-    public function checkAllowedUnlockAccount(&$aDataEntry, $isPerformAction = false)
-    {
-    	if((int)$aDataEntry['locked'] != 1)
-    		return _t('_sys_txt_access_denied');
-
-    	return CHECK_ACTION_RESULT_ALLOWED;
-    }
-    
-    public function isAllowDeleteOrDisable($iActorProfileId, $iTargetProfileId)
-    {
-        if (BxDolAcl::getInstance()->isMemberLevelInSet(array(MEMBERSHIP_ID_MODERATOR), $iActorProfileId) && BxDolAcl::getInstance()->isMemberLevelInSet(array(MEMBERSHIP_ID_MODERATOR, MEMBERSHIP_ID_ADMINISTRATOR), $iTargetProfileId))
-            return false;
-        
-        return true;    
-    }
-    
-}
-
-/** @} */

+ 0 - 88
modules/boonex/accounts/updates/12.0.3_12.0.4/source/classes/BxAccntSearchResult.php

@@ -1,88 +0,0 @@
-<?php defined('BX_DOL') or die('hack attempt');
-/**
- * Copyright (c) UNA, Inc - https://una.io
- * MIT License - https://opensource.org/licenses/MIT
- *
- * @defgroup    Accounts Accounts
- * @ingroup     UnaModules
- *
- * @{
- */
-
-class BxAccntSearchResult extends BxBaseModGeneralSearchResult
-{
-    function __construct($sMode = '', $aParams = false)
-    {
-        parent::__construct($sMode, $aParams);
-
-        $aConfirmed = array();
-        $aUnConfirmed = array();
-        $sCnfnType = getParam('sys_account_confirmation_type');
-        switch($sCnfnType) {
-            case 'email':
-                $aConfirmed = array('value' => '', 'field' => 'email_confirmed', 'operator' => '=');
-                $aUnConfirmed = array('value' => '', 'field' => 'email_confirmed', 'operator' => '<>');
-                break;
-            case 'phone':
-                $aConfirmed = array('value' => '', 'field' => 'phone_confirmed', 'operator' => '=');
-                $aUnConfirmed = array('value' => '', 'field' => 'phone_confirmed', 'operator' => '<>');
-                break;
-            case 'email_and_phone':
-                $aConfirmed = array('value' => '', 'field' => 'phone_confirmed` * `email_confirmed', 'operator' => '=');
-                $aUnConfirmed = array('value' => '', 'field' => 'phone_confirmed` * `email_confirmed', 'operator' => '<>');
-                break;
-        }
-        
-        $this->aCurrent =  array(
-            'name' => 'bx_accounts',
-            'module_name' => 'bx_accounts',
-            'object_metatags' => '',
-            'title' => _t('_bx_accnt_page_title_browse'),
-            'table' => 'sys_accounts',
-            'tableSearch' => 'sys_accounts',
-            'ownFields' => array(),
-            'searchFields' => array('name', 'email'),
-            'restriction' => array(
-                'confirmed' => $aConfirmed,
-        		'unconfirmed' => $aUnConfirmed,
-                'non_robot' => array('value' => '', 'field' => 'name', 'operator' => '<>'),
-            ),
-            'join' => array (),
-            'paginate' => array('perPage' => 20, 'start' => 0),
-            'sorting' => 'none',
-            'rss' => array(
-                'title' => '',
-                'link' => '',
-                'image' => '',
-                'profile' => 0,
-                'fields' => array (
-                    'Guid' => 'link',
-                    'Link' => 'link',
-                    'Title' => 'fullname',
-                    'DateTimeUTS' => 'added',
-                    'Desc' => 'fullname',
-                    'Picture' => 'picture',
-                ),
-            ),
-            'ident' => 'id'
-        );
-
-        $this->sFilterName = 'bx_accounts_filter';
-        $this->oModule = $this->getMain();
-
-        switch ($sMode) {
-            case '': // search results
-                $this->sBrowseUrl = BX_DOL_SEARCH_KEYWORD_PAGE;
-                $this->aCurrent['title'] = _t('_bx_accnt');
-                unset($this->aCurrent['paginate']['perPage'], $this->aCurrent['rss']);
-                break;
-
-            default:
-                $this->isError = true;
-        }
-
-        parent::__construct();
-    }
-}
-
-/** @} */

+ 0 - 45
modules/boonex/accounts/updates/12.0.3_12.0.4/source/classes/BxAccntStudioPage.php

@@ -1,45 +0,0 @@
-<?php defined('BX_DOL') or die('hack attempt');
-/**
- * Copyright (c) UNA, Inc - https://una.io
- * MIT License - https://opensource.org/licenses/MIT
- *
- * @defgroup    Accounts Accounts
- * @ingroup     UnaModules
- *
- * @{
- */
-
-define('BX_DOL_STUDIO_MOD_TYPE_MANAGE', 'manage');
-
-class BxAccntStudioPage extends BxTemplStudioModule
-{
-    protected $_sModule;
-    protected $_oModule;
-
-    function __construct($sModule, $mixedPageName, $sPage = "")
-    {
-        $this->_sModule = 'bx_accounts';
-    	$this->_oModule = BxDolModule::getInstance($this->_sModule);
-
-        parent::__construct($sModule, $mixedPageName, $sPage);
-
-        $this->aMenuItems[BX_DOL_STUDIO_MOD_TYPE_MANAGE] = array('name' => BX_DOL_STUDIO_MOD_TYPE_MANAGE, 'icon' => 'wrench', 'title' => '_bx_accnt_menu_item_title_manage');
-    }
-
-    protected function getManage()
-    {
-        $sType = 'administration';
-
-        $sGrid = $this->_oModule->_oConfig->getGridObject($sType);
-        $oGrid = BxDolGrid::getObjectInstance($sGrid, BxDolStudioTemplate::getInstance());
-        if(!$oGrid)
-            return '';
-
-        $this->_oModule->_oTemplate->addStudioCss(array('manage_tools.css', 'main.css'));
-        $this->_oModule->_oTemplate->addStudioJs(array('manage_tools.js', 'main.js'));
-        $this->_oModule->_oTemplate->addStudioJsTranslation(array('_sys_grid_search'));
-        return $this->_oModule->_oTemplate->getJsCode('manage_tools', array('sObjNameGrid' => $sGrid)) . $oGrid->getCode();
-    }
-}
-
-/** @} */

+ 0 - 71
modules/boonex/accounts/updates/12.0.3_12.0.4/source/install/config.php

@@ -1,71 +0,0 @@
-<?php
-/**
- * Copyright (c) UNA, Inc - https://una.io
- * MIT License - https://opensource.org/licenses/MIT
- *
- * @defgroup    Accounts Accounts
- * @ingroup     UnaModules
- *
- * @{
- */
-
-$aConfig = array(
-    /**
-     * Main Section.
-     */
-    'type' => BX_DOL_MODULE_TYPE_MODULE,
-    'name' => 'bx_accounts',
-    'title' => 'Accounts Manager',
-    'note' => 'Accounts Manager module.',
-    'version' => '12.0.4',
-    'vendor' => 'BoonEx',
-    'help_url' => 'http://feed.una.io/?section={module_name}',
-
-    'compatible_with' => array(
-        '12.1.0-B1'
-    ),
-
-    /**
-     * 'home_dir' and 'home_uri' - should be unique. Don't use spaces in 'home_uri' and the other special chars.
-     */
-    'home_dir' => 'boonex/accounts/',
-    'home_uri' => 'accounts',
-
-    'db_prefix' => 'bx_accnt_',
-    'class_prefix' => 'BxAccnt',
-
-    /**
-     * Category for language keys.
-     */
-    'language_category' => 'Accounts',
-
-    /**
-     * Installation/Uninstallation Section.
-     */
-    'install' => array(
-        'execute_sql' => 1,
-        'update_languages' => 1,
-        'clear_db_cache' => 1,
-    ),
-    'uninstall' => array (
-        'execute_sql' => 1,
-        'update_languages' => 1,
-        'clear_db_cache' => 1,
-    ),
-    'enable' => array(
-        'execute_sql' => 1,
-        'clear_db_cache' => 1,
-    ),
-    'disable' => array (
-        'execute_sql' => 1,
-        'clear_db_cache' => 1,
-    ),
-
-    /**
-     * Dependencies Section
-     */
-    'dependencies' => array(),
-
-);
-
-/** @} */

+ 0 - 110
modules/boonex/accounts/updates/12.0.3_12.0.4/source/install/langs/en.xml

@@ -1,110 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<resources name="en" flag="gb" title="English">
-    <string name="_bx_accnt"><![CDATA[Accounts]]></string>
-    <string name="_bx_accounts"><![CDATA[Accounts]]></string>
-
-    <string name="_bx_accounts_option_export_to"><![CDATA[Export to]]></string>
-    <string name="_bx_accounts_option_export_fields"><![CDATA[Export fields]]></string>
-
-    <string name="_bx_accounts_form_display_account_settings_email_popup"><![CDATA[Edit Email]]></string>
-    <string name="_bx_accounts_form_display_account_create_popup"><![CDATA[Create new Account]]></string>
-    <string name="_bx_accounts_form_display_account_settings_password_popup"><![CDATA[Reset Password]]></string>
-
-    <string name="_bx_accnt_page_title_sys_manage_administration"><![CDATA[Manage All Accounts]]></string>
-    <string name="_bx_accnt_page_title_manage"><![CDATA[Manage Accounts]]></string>
-    <string name="_bx_accnt_page_title_browse"><![CDATA[Accounts]]></string>
-
-    <string name="_bx_accnt_page_block_title_system_manage_administration"><![CDATA[Manage All Accounts]]></string>
-    <string name="_bx_accnt_page_block_title_manage"><![CDATA[Manage Accounts]]></string>
-
-    <string name="_bx_accnt_menu_set_title_manage_tools"><![CDATA[Manage Tools Submenu]]></string>
-    <string name="_bx_accnt_menu_title_manage_tools"><![CDATA[Manage Tools Submenu]]></string>
-    <string name="_bx_accnt_menu_item_title_system_resend_cemail"><![CDATA[Resend Confirmation]]></string>
-    <string name="_bx_accnt_menu_item_title_resend_cemail"><![CDATA[Resend Confirmation]]></string>
-    <string name="_bx_accnt_menu_item_title_system_confirm"><![CDATA[Confirm]]></string>
-    <string name="_bx_accnt_menu_item_title_confirm"><![CDATA[Confirm]]></string>
-    <string name="_bx_accnt_menu_item_title_system_edit_email"><![CDATA[Edit Email]]></string>
-    <string name="_bx_accnt_menu_item_title_edit_email"><![CDATA[Edit Email]]></string>
-    <string name="_bx_accnt_menu_item_title_system_reset_password"><![CDATA[Reset Password]]></string>
-    <string name="_bx_accnt_menu_item_title_reset_password"><![CDATA[Reset Password]]></string>
-    <string name="_bx_accnt_menu_item_title_system_resend_remail"><![CDATA[Resend Reset Password]]></string>
-    <string name="_bx_accnt_menu_item_title_resend_remail"><![CDATA[Resend Reset Password]]></string>
-    <string name="_bx_accnt_menu_item_title_system_unlock_account"><![CDATA[Unlock]]></string>
-    <string name="_bx_accnt_menu_item_title_unlock_account"><![CDATA[Unlock]]></string>
-    <string name="_bx_accnt_menu_item_title_system_delete"><![CDATA[Delete]]></string>
-    <string name="_bx_accnt_menu_item_title_delete"><![CDATA[Delete]]></string>
-    <string name="_bx_accnt_menu_item_title_system_delete_with_content"><![CDATA[Delete With Content]]></string>
-    <string name="_bx_accnt_menu_item_title_delete_with_content"><![CDATA[Delete With Content]]></string>
-    <string name="_bx_accnt_menu_item_title_system_make_operator"><![CDATA[Make Operator]]></string>
-    <string name="_bx_accnt_menu_item_title_make_operator"><![CDATA[Make Operator]]></string>
-    <string name="_bx_accnt_menu_item_title_system_unmake_operator"><![CDATA[Unmake Operator]]></string>
-    <string name="_bx_accnt_menu_item_title_unmake_operator"><![CDATA[Unmake Operator]]></string>
-    <string name="_bx_accnt_menu_item_title_system_set_operator_role"><![CDATA[Set Operator Role]]></string>
-    <string name="_bx_accnt_menu_item_title_set_operator_role"><![CDATA[Set Operator Role]]></string>
-    <string name="_bx_accnt_menu_item_title_system_admt_accounts"><![CDATA[Accounts]]></string>
-    <string name="_bx_accnt_menu_item_title_admt_accounts"><![CDATA[Accounts]]></string>
-    <string name="_bx_accnt_menu_item_title_manage"><![CDATA[Manage]]></string>
-    <string name="_bx_accnt_menu_dashboard_manage_tools_addon_counter1_caption"><![CDATA[unconfirmed]]></string>
-
-    <string name="_bx_accnt_acl_action_edit_any_account"><![CDATA[Edit Any Account]]></string>
-
-    <string name="_bx_accnt_grid_filter_item_title_adm_select_one_filter1"><![CDATA[All Statuses]]></string>
-    <string name="_bx_accnt_grid_filter_item_title_adm_select_one_filter2"><![CDATA[All]]></string>
-    <string name="_bx_accnt_grid_filter_item_title_adm_active"><![CDATA[Active]]></string>
-    <string name="_bx_accnt_grid_filter_item_title_adm_operators"><![CDATA[Operators]]></string>
-    <string name="_bx_accnt_grid_filter_item_title_adm_pending"><![CDATA[Pending]]></string>
-    <string name="_bx_accnt_grid_filter_item_title_adm_suspended"><![CDATA[Suspended]]></string>    
-    <string name="_bx_accnt_grid_filter_item_title_adm_unconfirmed"><![CDATA[Unconfirmed]]></string>
-    <string name="_bx_accnt_grid_filter_item_title_adm_locked"><![CDATA[Locked]]></string>
-    <string name="_bx_accnt_grid_filter_item_title_adm_without_profile"><![CDATA[Without profile]]></string>
-    <string name="_bx_accnt_grid_column_title_adm_active"><![CDATA[Active]]></string>
-    <string name="_bx_accnt_grid_column_title_adm_name"><![CDATA[Name]]></string>
-    <string name="_bx_accnt_grid_column_title_adm_email"><![CDATA[Email]]></string>
-    <string name="_bx_accnt_grid_column_title_adm_ip"><![CDATA[IP]]></string>
-
-    <string name="_bx_accnt_grid_column_title_adm_is_confirmed"><![CDATA[Confirmed]]></string>
-    <string name="_bx_accnt_grid_column_title_adm_profiles"><![CDATA[Profiles]]></string>
-    <string name="_bx_accnt_grid_column_title_adm_logged"><![CDATA[Last Logged]]></string>
-    <string name="_bx_accnt_grid_column_title_adm_added"><![CDATA[Created]]></string>
-    <string name="_bx_accnt_grid_action_title_adm_activate"><![CDATA[Activate]]></string>
-    <string name="_bx_accnt_grid_action_title_adm_suspend"><![CDATA[Suspend]]></string>
-    <string name="_bx_accnt_grid_action_title_adm_confirm"><![CDATA[Confirm]]></string>
-    <string name="_bx_accnt_grid_action_title_adm_edit_email"><![CDATA[Edit Email]]></string>
-    <string name="_bx_accnt_grid_action_title_adm_export"><![CDATA[Export]]></string>
-    <string name="_bx_accnt_grid_action_title_adm_resend_cemail"><![CDATA[Resend Confirmation]]></string>
-    <string name="_bx_accnt_grid_action_title_adm_resend_remail"><![CDATA[Resend Reset Password]]></string>
-    <string name="_bx_accnt_grid_action_title_adm_reset_password"><![CDATA[Reset Password]]></string>
-    <string name="_bx_accnt_grid_action_title_adm_unlock_account"><![CDATA[Unlock]]></string>
-    <string name="_bx_accnt_grid_action_title_adm_delete"><![CDATA[Delete]]></string>
-    <string name="_bx_accnt_grid_action_title_adm_delete_with_content"><![CDATA[Delete With Content]]></string>
-    <string name="_bx_accnt_grid_action_title_adm_more_actions"><![CDATA[More Actions]]></string>
-    <string name="_bx_accnt_grid_action_title_adm_more_add"><![CDATA[Add new]]></string>
-    <string name="_bx_accnt_grid_action_err_delete"><![CDATA[Cannot delete the selected account(s).]]></string>
-    <string name="_bx_accnt_grid_action_err_perform"><![CDATA[Cannot perform the action for selected account(s).]]></string>
-    <string name="_bx_accnt_grid_action_unlock_successed"><![CDATA[Successfully unlocked]]></string>
-    <string name="_bx_accnt_grid_action_unlock_error"><![CDATA[Account is not blocked]]></string>
-    <string name="_bx_accnt_grid_confirmation_status_none"><![CDATA[No]]></string>
-    <string name="_bx_accnt_grid_confirmation_status_email"><![CDATA[Email]]></string>
-    <string name="_bx_accnt_grid_confirmation_status_phone"><![CDATA[Phone]]></string>
-    <string name="_bx_accnt_grid_confirmation_status_email_and_phone"><![CDATA[All]]></string>
-
-    <string name="_bx_accnt_form_login_input_caption_system_email_confirmed"><![CDATA[Email confirmed]]></string>
-    <string name="_bx_accnt_form_account_input_email_confirmed"><![CDATA[Email confirmed]]></string>
- 
-    <string name="_bx_accnt_txt_more"><![CDATA[{0} more]]></string>
-    <string name="_bx_accnt_txt_see_more"><![CDATA[See more]]></string>
-    <string name="_bx_accnt_txt_copy_to_clipboard"><![CDATA[Copy to Clipboard]]></string>
-    <string name="_bx_accnt_txt_not_operator"><![CDATA[Not an Operator]]></string>
-    <string name="_bx_accnt_txt_export_to_csv"><![CDATA[CSV]]></string>
-    <string name="_bx_accnt_txt_export_to_xml"><![CDATA[XML]]></string>
-    <string name="_bx_accnt_txt_field_name"><![CDATA[Name]]></string>
-    <string name="_bx_accnt_txt_field_email"><![CDATA[Email]]></string>
-    <string name="_bx_accnt_txt_field_email_confirmed"><![CDATA[Email Confirmed]]></string>
-    <string name="_bx_accnt_txt_field_phone"><![CDATA[Phone]]></string>
-    <string name="_bx_accnt_txt_field_receive_updates"><![CDATA[Receive Updates]]></string>
-    <string name="_bx_accnt_txt_field_receive_news"><![CDATA[Receive News]]></string>
-    <string name="_bx_accnt_txt_field_added"><![CDATA[Added]]></string>
-    <string name="_bx_accnt_txt_field_changed"><![CDATA[Changed]]></string>
-    <string name="_bx_accnt_txt_field_logged"><![CDATA[Logged]]></string>
-    <string name="_bx_accnt_txt_field_ip"><![CDATA[IP]]></string>
-</resources>

+ 0 - 31
modules/boonex/accounts/updates/12.0.3_12.0.4/source/install/sql/disable.sql

@@ -1,31 +0,0 @@
-SET @sName = 'bx_accounts';
-
-
--- SETTINGS
-SET @iTypeId = (SELECT `ID` FROM `sys_options_types` WHERE `name` = @sName LIMIT 1);
-SET @iCategId = (SELECT `ID` FROM `sys_options_categories` WHERE `type_id` = @iTypeId LIMIT 1);
-DELETE FROM `sys_options` WHERE `category_id` = @iCategId;
-DELETE FROM `sys_options_categories` WHERE `type_id` = @iTypeId;
-DELETE FROM `sys_options_types` WHERE `id` = @iTypeId;
-
-
--- PAGES
-DELETE FROM `sys_objects_page` WHERE `module` = @sName;
-DELETE FROM `sys_pages_blocks` WHERE `module` = @sName;
-
-
--- MENU
-DELETE FROM `sys_objects_menu` WHERE `module` = @sName;
-DELETE FROM `sys_menu_sets` WHERE `module` = @sName;
-DELETE FROM `sys_menu_items` WHERE `module` = @sName OR `set_name` IN('bx_accounts_menu_manage_tools');
-
-
--- ACL
-DELETE `sys_acl_actions`, `sys_acl_matrix` FROM `sys_acl_actions`, `sys_acl_matrix` WHERE `sys_acl_matrix`.`IDAction` = `sys_acl_actions`.`ID` AND `sys_acl_actions`.`Module` = @sName;
-DELETE FROM `sys_acl_actions` WHERE `Module` = @sName;
-
-
--- GRIDS
-DELETE FROM `sys_objects_grid` WHERE `object` IN ('bx_accounts_administration');
-DELETE FROM `sys_grid_fields` WHERE `object` IN ('bx_accounts_administration');
-DELETE FROM `sys_grid_actions` WHERE `object` IN ('bx_accounts_administration');

+ 0 - 105
modules/boonex/accounts/updates/12.0.3_12.0.4/source/install/sql/enable.sql

@@ -1,105 +0,0 @@
-SET @sName = 'bx_accounts';
-
-
--- SETTINGS
-SET @iTypeOrder = (SELECT MAX(`order`) FROM `sys_options_types` WHERE `group` = 'modules');
-INSERT INTO `sys_options_types`(`group`, `name`, `caption`, `icon`, `order`) VALUES 
-('modules', @sName, '_bx_accounts', 'bx_accounts@modules/boonex/accounts/|std-icon.svg', IF(ISNULL(@iTypeOrder), 1, @iTypeOrder + 1));
-SET @iTypeId = LAST_INSERT_ID();
-
-INSERT INTO `sys_options_categories` (`type_id`, `name`, `caption`, `order`)
-VALUES (@iTypeId, @sName, '_bx_accounts', 1);
-SET @iCategId = LAST_INSERT_ID();
-
-INSERT INTO `sys_options` (`name`, `value`, `category_id`, `caption`, `type`, `check`, `check_error`, `extra`, `order`) VALUES
-('bx_accounts_export_to', 'csv', @iCategId, '_bx_accounts_option_export_to', 'select', '', '', 'a:2:{s:6:"module";s:11:"bx_accounts";s:6:"method";s:21:"get_options_export_to";}', 10),
-('bx_accounts_export_fields', 'name,email', @iCategId, '_bx_accounts_option_export_fields', 'list', '', '', 'a:2:{s:6:"module";s:11:"bx_accounts";s:6:"method";s:25:"get_options_export_fields";}', 20);
-
-
--- PAGE: module administration
-INSERT INTO `sys_objects_page`(`object`, `title_system`, `title`, `module`, `layout_id`, `visible_for_levels`, `visible_for_levels_editable`, `uri`, `url`, `meta_description`, `meta_keywords`, `meta_robots`, `cache_lifetime`, `cache_editable`, `deletable`, `override_class_name`, `override_class_file`) VALUES 
-('bx_accounts_administration', '_bx_accnt_page_title_sys_manage_administration', '_bx_accnt_page_title_manage', @sName, 5, 192, 1, 'accounts-administration', 'page.php?i=accounts-administration', '', '', '', 0, 1, 0, '', '');
-
-INSERT INTO `sys_pages_blocks`(`object`, `cell_id`, `module`, `title_system`, `title`, `designbox_id`, `visible_for_levels`, `type`, `content`, `deletable`, `copyable`, `order`) VALUES 
-('bx_accounts_administration', 1, @sName, '_bx_accnt_page_block_title_system_manage_administration', '_bx_accnt_page_block_title_manage', 11, 192, 'service', 'a:3:{s:6:\"module\";s:11:\"bx_accounts\";s:6:\"method\";s:12:\"manage_tools\";s:6:\"params\";a:1:{i:0;s:14:\"administration\";}}', 0, 1, 0);
-
-
--- MENU: manage tools submenu
-INSERT INTO `sys_objects_menu`(`object`, `title`, `set_name`, `module`, `template_id`, `deletable`, `active`, `override_class_name`, `override_class_file`) VALUES 
-('bx_accounts_menu_manage_tools', '_bx_accnt_menu_title_manage_tools', 'bx_accounts_menu_manage_tools', @sName, 6, 0, 1, 'BxAccntMenuManageTools', 'modules/boonex/accounts/classes/BxAccntMenuManageTools.php');
-
-INSERT INTO `sys_menu_sets`(`set_name`, `module`, `title`, `deletable`) VALUES 
-('bx_accounts_menu_manage_tools', @sName, '_bx_accnt_menu_set_title_manage_tools', 0);
-
-INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
-('bx_accounts_menu_manage_tools', @sName, 'edit-email', '_bx_accnt_menu_item_title_system_edit_email', '_bx_accnt_menu_item_title_edit_email', 'javascript:void(0)', 'javascript:{js_object}.onClickEditEmail({content_id}, this);', '_self', 'at', '', 192, 1, 0, 1),
-('bx_accounts_menu_manage_tools', @sName, 'resend-cemail', '_bx_accnt_menu_item_title_system_resend_cemail', '_bx_accnt_menu_item_title_resend_cemail', 'javascript:void(0)', 'javascript:{js_object}.onClickResendCemail({content_id}, this);', '_self', 'far envelope', '', 192, 1, 0, 2),
-('bx_accounts_menu_manage_tools', @sName, 'confirm', '_bx_accnt_menu_item_title_system_confirm', '_bx_accnt_menu_item_title_confirm', 'javascript:void(0)', 'javascript:{js_object}.onClickConfirm({content_id}, this);', '_self', 'fas check', '', 192, 1, 0, 3),
-('bx_accounts_menu_manage_tools', @sName, 'reset-password', '_bx_accnt_menu_item_title_system_reset_password', '_bx_accnt_menu_item_title_reset_password', 'javascript:void(0)', 'javascript:{js_object}.onClickResetPassword({content_id}, this);', '_self', 'eraser', '', 192, 1, 0, 4),
-('bx_accounts_menu_manage_tools', @sName, 'resend-remail', '_bx_accnt_menu_item_title_system_resend_remail', '_bx_accnt_menu_item_title_resend_remail', 'javascript:void(0)', 'javascript:{js_object}.onClickResendRemail({content_id}, this);', '_self', 'eraser', '', 192, 1, 0, 5),
-('bx_accounts_menu_manage_tools', @sName, 'unlock-account', '_bx_accnt_menu_item_title_system_unlock_account', '_bx_accnt_menu_item_title_unlock_account', 'javascript:void(0)', 'javascript:{js_object}.onClickUnlockAccount({content_id}, this);', '_self', 'unlock', '', 192, 1, 0, 6),
-('bx_accounts_menu_manage_tools', @sName, 'delete', '_bx_accnt_menu_item_title_system_delete', '_bx_accnt_menu_item_title_delete', 'javascript:void(0)', 'javascript:{js_object}.onClickDelete({content_id}, this);', '_self', 'far trash-alt', '', 192, 1, 0, 7),
-('bx_accounts_menu_manage_tools', @sName, 'delete-with-content', '_bx_accnt_menu_item_title_system_delete_with_content', '_bx_accnt_menu_item_title_delete_with_content', 'javascript:void(0)', 'javascript:{js_object}.onClickDeleteWithContent({content_id}, this);', '_self', 'far trash-alt', '', 192, 1, 0, 8),
-('bx_accounts_menu_manage_tools', @sName, 'make-operator', '_bx_accnt_menu_item_title_system_make_operator', '_bx_accnt_menu_item_title_make_operator', 'javascript:void(0)', 'javascript:{js_object}.onClickMakeOperator({content_id}, this);', '_self', 'wrench', '', 192, 0, 0, 9),
-('bx_accounts_menu_manage_tools', @sName, 'unmake-operator', '_bx_accnt_menu_item_title_system_unmake_operator', '_bx_accnt_menu_item_title_unmake_operator', 'javascript:void(0)', 'javascript:{js_object}.onClickUnmakeOperator({content_id}, this);', '_self', 'wrench', '', 192, 0, 0, 10),
-('bx_accounts_menu_manage_tools', @sName, 'set-operator-role', '_bx_accnt_menu_item_title_system_set_operator_role', '_bx_accnt_menu_item_title_set_operator_role', 'javascript:void(0)', 'javascript:{js_object}.onClickSetOperatorRole({content_id}, this);', '_self', 'wrench', '', 192, 1, 0, 11);
-
--- MENU: dashboard manage tools
-SET @iManageMenuOrder = (SELECT IFNULL(MAX(`order`), 0) FROM `sys_menu_items` WHERE `set_name`='sys_account_dashboard_manage_tools' LIMIT 1);
-INSERT INTO `sys_menu_items`(`set_name`, `module`, `name`, `title_system`, `title`, `link`, `onclick`, `target`, `icon`, `addon`, `submenu_object`, `visible_for_levels`, `active`, `copyable`, `order`) VALUES 
-('sys_account_dashboard_manage_tools', @sName, 'accounts-administration', '_bx_accnt_menu_item_title_system_admt_accounts', '_bx_accnt_menu_item_title_admt_accounts', 'page.php?i=accounts-administration', '', '_self', 'at', 'a:2:{s:6:"module";s:11:"bx_accounts";s:6:"method";s:27:"get_menu_addon_manage_tools";}', '', 192, 1, 0, @iManageMenuOrder + 1);
-
-
--- ACL
-INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
-(@sName, 'edit any entry', NULL, '_bx_accnt_acl_action_edit_any_account', '', 1, 3);
-SET @iIdActionProfileEditAny = LAST_INSERT_ID();
-
-SET @iUnauthenticated = 1;
-SET @iAccount = 2;
-SET @iStandard = 3;
-SET @iUnconfirmed = 4;
-SET @iPending = 5;
-SET @iSuspended = 6;
-SET @iModerator = 7;
-SET @iAdministrator = 8;
-SET @iPremium = 9;
-
-INSERT INTO `sys_acl_matrix` (`IDLevel`, `IDAction`) VALUES
-
--- edit any entry 
-(@iModerator, @iIdActionProfileEditAny),
-(@iAdministrator, @iIdActionProfileEditAny);
-
-
--- GRIDS: administration
-INSERT INTO `sys_objects_grid` (`object`, `source_type`, `source`, `table`, `field_id`, `field_order`, `field_active`, `paginate_url`, `paginate_per_page`, `paginate_simple`, `paginate_get_start`, `paginate_get_per_page`, `filter_fields`, `filter_fields_translatable`, `filter_mode`, `sorting_fields`, `sorting_fields_translatable`, `visible_for_levels`, `show_total_count`, `override_class_name`, `override_class_file`) VALUES
-('bx_accounts_administration', 'Sql', 'SELECT `ta`.*, `tp`.`status` AS `status` FROM `sys_accounts` AS `ta` LEFT JOIN `sys_profiles` AS `tp` ON `ta`.`id`=`tp`.`account_id` AND `tp`.`type`=''system'' WHERE 1 ', 'sys_accounts', 'id', 'logged', 'status', '', 20, NULL, 'start', '', 'name,email,ip,phone', '', 'like', 'email_confirmed,logged,added', '', 192, 1, 'BxAccntGridAdministration', 'modules/boonex/accounts/classes/BxAccntGridAdministration.php');
-
-INSERT INTO `sys_grid_fields` (`object`, `name`, `title`, `width`, `translatable`, `chars_limit`, `params`, `order`) VALUES
-('bx_accounts_administration', 'checkbox', '_sys_select', '2%', 0, '', '', 1),
-('bx_accounts_administration', 'switcher', '_bx_accnt_grid_column_title_adm_active', '6%', 0, '', '', 2),
-('bx_accounts_administration', 'name', '_bx_accnt_grid_column_title_adm_name', '16%', 0, '16', '', 3),
-('bx_accounts_administration', 'email', '_bx_accnt_grid_column_title_adm_email', '22%', 0, '16', '', 4),
-('bx_accounts_administration', 'is_confirmed', '_bx_accnt_grid_column_title_adm_is_confirmed', '5%', 0, '', '', 5),
-('bx_accounts_administration', 'profiles', '_bx_accnt_grid_column_title_adm_profiles', '23%', 0, '', '', 6),
-('bx_accounts_administration', 'logged', '_bx_accnt_grid_column_title_adm_logged', '10%', 0, '15', '', 7),
-('bx_accounts_administration', 'added', '_bx_accnt_grid_column_title_adm_added', '10%', 0, '15', '', 8),
-('bx_accounts_administration', 'actions', '', '6%', 0, '', '', 9);
-
-INSERT INTO `sys_grid_actions` (`object`, `type`, `name`, `title`, `icon`, `icon_only`, `confirm`, `order`) VALUES
-('bx_accounts_administration', 'bulk', 'activate', '_bx_accnt_grid_action_title_adm_activate', '', 0, 0, 1),
-('bx_accounts_administration', 'bulk', 'suspend', '_bx_accnt_grid_action_title_adm_suspend', '', 0, 0, 2),
-('bx_accounts_administration', 'bulk', 'resend_cemail', '_bx_accnt_grid_action_title_adm_resend_cemail', '', 0, 0, 3),
-('bx_accounts_administration', 'bulk', 'resend_remail', '_bx_accnt_grid_action_title_adm_resend_remail', '', 0, 0, 4),
-('bx_accounts_administration', 'bulk', 'confirm', '_bx_accnt_grid_action_title_adm_confirm', '', 0, 0, 5),
-('bx_accounts_administration', 'bulk', 'delete', '_bx_accnt_grid_action_title_adm_delete', '', 0, 1, 6),
-('bx_accounts_administration', 'bulk', 'delete_with_content', '_bx_accnt_grid_action_title_adm_delete_with_content', '', 0, 1, 7),
-('bx_accounts_administration', 'bulk', 'export', '_bx_accnt_grid_action_title_adm_export', '', 0, 0, 8),
-('bx_accounts_administration', 'single', 'edit_email', '_bx_accnt_grid_action_title_adm_edit_email', '', 0, 0, 0),
-('bx_accounts_administration', 'single', 'reset_password', '_bx_accnt_grid_action_title_adm_reset_password', '', 0, 0, 0),
-('bx_accounts_administration', 'single', 'resend_remail', '_bx_accnt_grid_action_title_adm_resend_remail', '', 0, 0, 0),
-('bx_accounts_administration', 'single', 'unlock_account', '_bx_accnt_grid_action_title_adm_unlock_account', '', 0, 0, 0),
-('bx_accounts_administration', 'single', 'settings', '_bx_accnt_grid_action_title_adm_more_actions', 'cog', 1, 0, 2),
-('bx_accounts_administration', 'independent', 'add', '_bx_accnt_grid_action_title_adm_more_add', 'plus', 0, 0, 0),
-('bx_accounts_administration', 'independent', 'export', '_bx_accnt_grid_action_title_adm_export', 'download', 0, 0, 1);

+ 0 - 53
modules/boonex/accounts/updates/8.0.0_8.0.1/install/config.php

@@ -1,53 +0,0 @@
-<?php
-/**
- * Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
- * CC-BY License - http://creativecommons.org/licenses/by/3.0/
- */
-
-$aConfig = array(
-    /**
-     * Main Section.
-     */
-    'title' => 'Accounts Manager',
-    'version_from' => '8.0.0',
-	'version_to' => '8.0.1',
-    'vendor' => 'BoonEx',
-
-	'compatible_with' => array(
-        '8.0.0.A11'
-    ),
-
-    /**
-     * 'home_dir' and 'home_uri' - should be unique. Don't use spaces in 'home_uri' and the other special chars.
-     */
-    'home_dir' => 'boonex/accounts/updates/update_8.0.0_8.0.1/',
-	'home_uri' => 'accounts_update_800_801',
-
-	'module_dir' => 'boonex/accounts/',
-	'module_uri' => 'accounts',
-
-    'db_prefix' => 'bx_accnt_',
-    'class_prefix' => 'BxAccnt',
-
-    /**
-     * Installation/Uninstallation Section.
-     */
-    'install' => array(
-		'execute_sql' => 1,
-        'update_files' => 1,
-        'update_languages' => 1,
-		'clear_db_cache' => 1,
-    ),
-
-	/**
-     * Category for language keys.
-     */
-    'language_category' => 'Accounts',
-
-	/**
-     * Files Section
-     */
-    'delete_files' => array(
-		'classes/BxAccntGridModeration.php'
-	),
-);

+ 0 - 13
modules/boonex/accounts/updates/8.0.0_8.0.1/install/installer.php

@@ -1,13 +0,0 @@
-<?php
-/**
- * Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
- * CC-BY License - http://creativecommons.org/licenses/by/3.0/
- */
-
-class BxAccntUpdater extends BxDolStudioUpdater
-{
-    function __construct($aConfig)
-	{
-        parent::__construct($aConfig);
-    }
-}

+ 0 - 8
modules/boonex/accounts/updates/8.0.0_8.0.1/install/langs/en.xml

@@ -1,8 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<resources name="en" flag="gb" title="English">
-	<string_add name="_bx_accnt_page_title_sys_manage_administration"><![CDATA[Manage All Accounts]]></string_add>
-	<string_add name="_bx_accnt_page_block_title_system_manage_administration"><![CDATA[Manage All Accounts]]></string_add>
-	<string_add name="_bx_accnt_acl_action_edit_any_account"><![CDATA[Edit Any Account]]></string_add>
-
-	<string_del name="_bx_accnt_page_title_sys_manage" />
-</resources>

+ 0 - 50
modules/boonex/accounts/updates/8.0.0_8.0.1/install/sql/enable.sql

@@ -1,50 +0,0 @@
-SET @sName = 'bx_accounts';
-
--- PAGES
-DELETE FROM `sys_objects_page` WHERE `object`='bx_accounts_moderation';
-DELETE FROM `sys_pages_blocks` WHERE `object`='bx_accounts_moderation';
-
-UPDATE `sys_objects_page` SET `title_system`='_bx_accnt_page_title_sys_manage_administration', `visible_for_levels`='192' WHERE `object`='bx_accounts_administration';
-UPDATE `sys_pages_blocks` SET `title_system`='_bx_accnt_page_block_title_system_manage_administration', `visible_for_levels`='192' WHERE `object`='bx_accounts_administration' AND `title`='_bx_accnt_page_block_title_manage';
-
-
--- MENUS
-UPDATE `sys_menu_items` SET `visible_for_levels`='192' WHERE `set_name`='bx_accounts_menu_manage_tools' AND `name` IN ('delete', 'delete-with-content');
-
-DELETE FROM `sys_menu_items` WHERE `set_name`='sys_account_dashboard_manage_tools' AND `name`='accounts-moderation';
-UPDATE `sys_menu_items` SET `visible_for_levels`='192' WHERE `set_name`='sys_account_dashboard_manage_tools' AND `name`='accounts-administration';
-
-
--- ACL
-DELETE `sys_acl_actions`, `sys_acl_matrix` FROM `sys_acl_actions`, `sys_acl_matrix` WHERE `sys_acl_matrix`.`IDAction` = `sys_acl_actions`.`ID` AND `sys_acl_actions`.`Module` = @sName;
-DELETE FROM `sys_acl_actions` WHERE `Module` = @sName;
-
-INSERT INTO `sys_acl_actions` (`Module`, `Name`, `AdditionalParamName`, `Title`, `Desc`, `Countable`, `DisabledForLevels`) VALUES
-(@sName, 'edit any entry', NULL, '_bx_accnt_acl_action_edit_any_account', '', 1, 3);
-SET @iIdActionProfileEditAny = LAST_INSERT_ID();
-
-SET @iUnauthenticated = 1;
-SET @iAccount = 2;
-SET @iStandard = 3;
-SET @iUnconfirmed = 4;
-SET @iPending = 5;
-SET @iSuspended = 6;
-SET @iModerator = 7;
-SET @iAdministrator = 8;
-SET @iPremium = 9;
-
-INSERT INTO `sys_acl_matrix` (`IDLevel`, `IDAction`) VALUES
-
--- edit any entry 
-(@iModerator, @iIdActionProfileEditAny),
-(@iAdministrator, @iIdActionProfileEditAny);
-
-
--- GRIDS
-DELETE FROM `sys_objects_grid` WHERE `object`='bx_accounts_moderation';
-DELETE FROM `sys_grid_fields` WHERE `object`='bx_accounts_moderation';
-DELETE FROM `sys_grid_actions` WHERE `object`='bx_accounts_moderation';
-
-UPDATE `sys_objects_grid` SET `field_order`='logged' WHERE `object`='bx_accounts_administration';
-
-UPDATE `sys_grid_actions` SET `order`='1' WHERE `object`='bx_accounts_administration' AND `type`='single' AND `name`='settings';

+ 0 - 85
modules/boonex/accounts/updates/8.0.0_8.0.1/source/classes/BxAccntConfig.php

@@ -1,85 +0,0 @@
-<?php defined('BX_DOL') or die('hack attempt');
-/**
- * Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
- * CC-BY License - http://creativecommons.org/licenses/by/3.0/
- *
- * @defgroup    Accounts Accounts
- * @ingroup     DolphinModules
- *
- * @{
- */
-
-class BxAccntConfig extends BxBaseModGeneralConfig
-{
-    protected $_oDb;
-    protected $_aHtmlIds;
-
-    /**
-     * Constructor
-     */
-    public function __construct($aModule)
-    {
-        parent::__construct($aModule);
-
-        $this->CNF = array (
-        	// page URIs
-        	'URL_MANAGE_COMMON' => 'page.php?i=accounts-manage',
-        	'URL_MANAGE_MODERATION' => 'page.php?i=accounts-moderation',
-        	'URL_MANAGE_ADMINISTRATION' => 'page.php?i=accounts-administration',
-
-	        // objects
-	        'OBJECT_MENU_MANAGE_TOOLS' => 'bx_accounts_menu_manage_tools', //manage menu in content administration tools
-        	'OBJECT_GRID_ADMINISTRATION' => 'bx_accounts_administration',
-        	'OBJECT_GRID_MODERATION' => 'bx_accounts_moderation',
-
-        	// some language keys
-            'T' => array (
-        		'grid_action_err_delete' => '_bx_accnt_grid_action_err_delete',
-        		'grid_action_err_perform' => '_bx_accnt_grid_action_err_perform',
-            	'filter_item_active' => '_bx_accnt_grid_filter_item_title_adm_active',
-            	'filter_item_pending' => '_bx_accnt_grid_filter_item_title_adm_pending',
-            	'filter_item_suspended' => '_bx_accnt_grid_filter_item_title_adm_suspended',
-            	'filter_item_select_one_filter1' => '_bx_accnt_grid_filter_item_title_adm_select_one_filter1',
-        	)
-        );
-
-        $this->_aObjects = array(
-        	'alert' => $this->_sName,
-        );
-
-        $this->_aJsClass = array(
-        	'manage_tools' => 'BxAccntManageTools'
-        );
-
-        $this->_aJsObjects = array(
-        	'manage_tools' => 'oBxAccntManageTools'
-        );
-
-        $this->_aGridObjects = array(
-        	'moderation' => $this->CNF['OBJECT_GRID_MODERATION'],
-        	'administration' => $this->CNF['OBJECT_GRID_ADMINISTRATION'],
-        	
-        );
-
-        $sHtmlPrefix = str_replace('_', '-', $this->_sName);
-        $this->_aHtmlIds = array(
-        	'profile' => $sHtmlPrefix . '-profile-',
-        	'profile_more_popup' => $sHtmlPrefix . '-profile-more-popup-',
-        );
-    }
-
-    public function init(&$oDb)
-    {
-        $this->_oDb = &$oDb;
-    }
-
-	public function getHtmlIds($sKey = '')
-    {
-        if(empty($sKey))
-            return $this->_aHtmlIds;
-
-        return isset($this->_aHtmlIds[$sKey]) ? $this->_aHtmlIds[$sKey] : '';
-    }
-}
-
-/** @} */

Некоторые файлы не были показаны из-за большого количества измененных файлов