first commit

This commit is contained in:
2026-02-08 21:16:11 +01:00
commit e17b7026fd
8881 changed files with 1160453 additions and 0 deletions

View File

@@ -0,0 +1,484 @@
/*!
* Bootstrap-select v1.13.18 (https://developer.snapappointments.com/bootstrap-select)
*
* Copyright 2012-2020 SnapAppointments, LLC
* Licensed under MIT (https://github.com/snapappointments/bootstrap-select/blob/master/LICENSE)
*/
@-webkit-keyframes bs-notify-fadeOut {
0% {
opacity: .9
}
100% {
opacity: 0
}
}
@-o-keyframes bs-notify-fadeOut {
0% {
opacity: .9
}
100% {
opacity: 0
}
}
@keyframes bs-notify-fadeOut {
0% {
opacity: .9
}
100% {
opacity: 0
}
}
.bootstrap-select > select.bs-select-hidden, select.bs-select-hidden, select.selectpicker {
display: none !important;
width: 100% !important
}
.bootstrap-select {
width: 220px \0;
vertical-align: middle
}
.bootstrap-select > .dropdown-toggle {
position: relative;
width: 290px;
text-align: right;
white-space: nowrap;
display: -webkit-inline-box;
display: -webkit-inline-flex;
display: -ms-inline-flexbox;
display: inline-flex;
-webkit-box-align: center;
-webkit-align-items: center;
-ms-flex-align: center;
align-items: center;
-webkit-box-pack: justify;
-webkit-justify-content: space-between;
-ms-flex-pack: justify;
justify-content: space-between
}
.bootstrap-select > .dropdown-toggle:after {
margin-top: -1px
}
.bootstrap-select > .dropdown-toggle.bs-placeholder, .bootstrap-select > .dropdown-toggle.bs-placeholder:active, .bootstrap-select > .dropdown-toggle.bs-placeholder:focus, .bootstrap-select > .dropdown-toggle.bs-placeholder:hover {
color: #999
}
.bootstrap-select > .dropdown-toggle.bs-placeholder.btn-danger, .bootstrap-select > .dropdown-toggle.bs-placeholder.btn-danger:active, .bootstrap-select > .dropdown-toggle.bs-placeholder.btn-danger:focus, .bootstrap-select > .dropdown-toggle.bs-placeholder.btn-danger:hover, .bootstrap-select > .dropdown-toggle.bs-placeholder.btn-dark, .bootstrap-select > .dropdown-toggle.bs-placeholder.btn-dark:active, .bootstrap-select > .dropdown-toggle.bs-placeholder.btn-dark:focus, .bootstrap-select > .dropdown-toggle.bs-placeholder.btn-dark:hover, .bootstrap-select > .dropdown-toggle.bs-placeholder.btn-info, .bootstrap-select > .dropdown-toggle.bs-placeholder.btn-info:active, .bootstrap-select > .dropdown-toggle.bs-placeholder.btn-info:focus, .bootstrap-select > .dropdown-toggle.bs-placeholder.btn-info:hover, .bootstrap-select > .dropdown-toggle.bs-placeholder.btn-primary, .bootstrap-select > .dropdown-toggle.bs-placeholder.btn-primary:active, .bootstrap-select > .dropdown-toggle.bs-placeholder.btn-primary:focus, .bootstrap-select > .dropdown-toggle.bs-placeholder.btn-primary:hover, .bootstrap-select > .dropdown-toggle.bs-placeholder.btn-secondary, .bootstrap-select > .dropdown-toggle.bs-placeholder.btn-secondary:active, .bootstrap-select > .dropdown-toggle.bs-placeholder.btn-secondary:focus, .bootstrap-select > .dropdown-toggle.bs-placeholder.btn-secondary:hover, .bootstrap-select > .dropdown-toggle.bs-placeholder.btn-success, .bootstrap-select > .dropdown-toggle.bs-placeholder.btn-success:active, .bootstrap-select > .dropdown-toggle.bs-placeholder.btn-success:focus, .bootstrap-select > .dropdown-toggle.bs-placeholder.btn-success:hover {
color: rgba(255, 255, 255, .5)
}
.bootstrap-select > select {
position: absolute !important;
bottom: 0;
left: 50%;
display: block !important;
width: .5px !important;
height: 100% !important;
padding: 0 !important;
opacity: 0 !important;
border: none;
z-index: 0 !important
}
.bootstrap-select > select.mobile-device {
top: 0;
left: 0;
display: block !important;
width: 100% !important;
z-index: 2 !important
}
.bootstrap-select.is-invalid .dropdown-toggle, .error .bootstrap-select .dropdown-toggle, .has-error .bootstrap-select .dropdown-toggle, .was-validated .bootstrap-select select:invalid + .dropdown-toggle {
border-color: #b94a48
}
.bootstrap-select.is-valid .dropdown-toggle, .was-validated .bootstrap-select select:valid + .dropdown-toggle {
border-color: #28a745
}
.bootstrap-select.fit-width {
width: auto !important
}
.bootstrap-select:not([class*=col-]):not([class*=form-control]):not(.input-group-btn) {
width: 220px
}
.bootstrap-select .dropdown-toggle:focus, .bootstrap-select > select.mobile-device:focus + .dropdown-toggle {
outline: thin dotted #333 !important;
outline: 5px auto -webkit-focus-ring-color !important;
outline-offset: -2px
}
.bootstrap-select.form-control {
margin-bottom: 0;
padding: 0;
border: none;
height: auto
}
:not(.input-group) > .bootstrap-select.form-control:not([class*=col-]) {
width: 100%
}
.bootstrap-select.form-control.input-group-btn {
float: none;
z-index: auto
}
.form-inline .bootstrap-select, .form-inline .bootstrap-select.form-control:not([class*=col-]) {
width: auto
}
.bootstrap-select:not(.input-group-btn), .bootstrap-select[class*=col-] {
float: none;
display: inline-block;
margin-left: 0
}
.bootstrap-select.dropdown-menu-right, .bootstrap-select[class*=col-].dropdown-menu-right, .row .bootstrap-select[class*=col-].dropdown-menu-right {
float: right
}
.form-group .bootstrap-select, .form-horizontal .bootstrap-select, .form-inline .bootstrap-select {
margin-bottom: 0
}
.form-group-lg .bootstrap-select.form-control, .form-group-sm .bootstrap-select.form-control {
padding: 0
}
.form-group-lg .bootstrap-select.form-control .dropdown-toggle, .form-group-sm .bootstrap-select.form-control .dropdown-toggle {
height: 100%;
font-size: inherit;
line-height: inherit;
border-radius: inherit
}
.bootstrap-select.form-control-lg .dropdown-toggle, .bootstrap-select.form-control-sm .dropdown-toggle {
font-size: inherit;
line-height: inherit;
border-radius: inherit
}
.bootstrap-select.form-control-sm .dropdown-toggle {
padding: .25rem .5rem
}
.bootstrap-select.form-control-lg .dropdown-toggle {
padding: .5rem 1rem
}
.form-inline .bootstrap-select .form-control {
width: 100%
}
.bootstrap-select.disabled, .bootstrap-select > .disabled {
cursor: not-allowed
}
.bootstrap-select.disabled:focus, .bootstrap-select > .disabled:focus {
outline: 0 !important
}
.bootstrap-select.bs-container {
position: absolute;
top: 0;
left: 0;
height: 0 !important;
padding: 0 !important
}
.bootstrap-select.bs-container .dropdown-menu {
z-index: 1060
}
.bootstrap-select .dropdown-toggle .filter-option {
position: static;
top: 0;
left: 0;
float: left;
height: 100%;
width: 100%;
text-align: left;
overflow: hidden;
-webkit-box-flex: 0;
-webkit-flex: 0 1 auto;
-ms-flex: 0 1 auto;
flex: 0 1 auto
}
.bs3.bootstrap-select .dropdown-toggle .filter-option {
padding-right: inherit
}
.input-group .bs3-has-addon.bootstrap-select .dropdown-toggle .filter-option {
position: absolute;
padding-top: inherit;
padding-bottom: inherit;
padding-left: inherit;
float: none
}
.input-group .bs3-has-addon.bootstrap-select .dropdown-toggle .filter-option .filter-option-inner {
padding-right: inherit
}
.bootstrap-select .dropdown-toggle .filter-option-inner-inner {
overflow: hidden
}
.bootstrap-select .dropdown-toggle .filter-expand {
width: 0 !important;
float: left;
opacity: 0 !important;
overflow: hidden
}
.bootstrap-select .dropdown-toggle .caret {
position: absolute;
top: 50%;
right: 12px;
margin-top: -2px;
vertical-align: middle
}
.input-group .bootstrap-select.form-control .dropdown-toggle {
border-radius: inherit
}
.bootstrap-select[class*=col-] .dropdown-toggle {
width: 100%
}
.bootstrap-select .dropdown-menu {
min-width: 100%;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box
}
.bootstrap-select .dropdown-menu > .inner:focus {
outline: 0 !important
}
.bootstrap-select .dropdown-menu.inner {
position: static;
float: none;
border: 0;
padding: 0;
margin: 0;
border-radius: 0;
-webkit-box-shadow: none;
box-shadow: none
}
.bootstrap-select .dropdown-menu li {
position: relative
}
.bootstrap-select .dropdown-menu li.active small {
color: rgba(255, 255, 255, .5) !important
}
.bootstrap-select .dropdown-menu li.disabled a {
cursor: not-allowed
}
.bootstrap-select .dropdown-menu li a {
cursor: pointer;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none
}
.bootstrap-select .dropdown-menu li a.opt {
position: relative;
padding-left: 2.25em
}
.bootstrap-select .dropdown-menu li a span.check-mark {
display: none
}
.bootstrap-select .dropdown-menu li a span.text {
display: inline-block
}
.bootstrap-select .dropdown-menu li small {
padding-left: .5em
}
.bootstrap-select .dropdown-menu .notify {
position: absolute;
bottom: 5px;
width: 96%;
margin: 0 2%;
min-height: 26px;
padding: 3px 5px;
background: #f5f5f5;
border: 1px solid #e3e3e3;
-webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, .05);
box-shadow: inset 0 1px 1px rgba(0, 0, 0, .05);
pointer-events: none;
opacity: .9;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box
}
.bootstrap-select .dropdown-menu .notify.fadeOut {
-webkit-animation: .3s linear 750ms forwards bs-notify-fadeOut;
-o-animation: .3s linear 750ms forwards bs-notify-fadeOut;
animation: .3s linear 750ms forwards bs-notify-fadeOut
}
.bootstrap-select .no-results {
padding: 3px;
background: #f5f5f5;
margin: 0 5px;
white-space: nowrap
}
.bootstrap-select.fit-width .dropdown-toggle .filter-option {
position: static;
display: inline;
padding: 0
}
.bootstrap-select.fit-width .dropdown-toggle .filter-option-inner, .bootstrap-select.fit-width .dropdown-toggle .filter-option-inner-inner {
display: inline
}
.bootstrap-select.fit-width .dropdown-toggle .bs-caret:before {
content: '\00a0'
}
.bootstrap-select.fit-width .dropdown-toggle .caret {
position: static;
top: auto;
margin-top: -1px
}
.bootstrap-select.show-tick .dropdown-menu .selected span.check-mark {
position: absolute;
display: inline-block;
right: 15px;
top: 5px
}
.bootstrap-select.show-tick .dropdown-menu li a span.text {
margin-right: 34px
}
.bootstrap-select .bs-ok-default:after {
content: '';
display: block;
width: .5em;
height: 1em;
border-style: solid;
border-width: 0 .26em .26em 0;
-webkit-transform-style: preserve-3d;
transform-style: preserve-3d;
-webkit-transform: rotate(45deg);
-ms-transform: rotate(45deg);
-o-transform: rotate(45deg);
transform: rotate(45deg)
}
.bootstrap-select.show-menu-arrow.open > .dropdown-toggle, .bootstrap-select.show-menu-arrow.show > .dropdown-toggle {
z-index: 1061
}
.bootstrap-select.show-menu-arrow .dropdown-toggle .filter-option:before {
content: '';
border-left: 7px solid transparent;
border-right: 7px solid transparent;
border-bottom: 7px solid rgba(204, 204, 204, .2);
position: absolute;
bottom: -4px;
left: 9px;
display: none
}
.bootstrap-select.show-menu-arrow .dropdown-toggle .filter-option:after {
content: '';
border-left: 6px solid transparent;
border-right: 6px solid transparent;
border-bottom: 6px solid #fff;
position: absolute;
bottom: -4px;
left: 10px;
display: none
}
.bootstrap-select.show-menu-arrow.dropup .dropdown-toggle .filter-option:before {
bottom: auto;
top: -4px;
border-top: 7px solid rgba(204, 204, 204, .2);
border-bottom: 0
}
.bootstrap-select.show-menu-arrow.dropup .dropdown-toggle .filter-option:after {
bottom: auto;
top: -4px;
border-top: 6px solid #fff;
border-bottom: 0
}
.bootstrap-select.show-menu-arrow.pull-right .dropdown-toggle .filter-option:before {
right: 12px;
left: auto
}
.bootstrap-select.show-menu-arrow.pull-right .dropdown-toggle .filter-option:after {
right: 13px;
left: auto
}
.bootstrap-select.show-menu-arrow.open > .dropdown-toggle .filter-option:after, .bootstrap-select.show-menu-arrow.open > .dropdown-toggle .filter-option:before, .bootstrap-select.show-menu-arrow.show > .dropdown-toggle .filter-option:after, .bootstrap-select.show-menu-arrow.show > .dropdown-toggle .filter-option:before {
display: block
}
.bs-actionsbox, .bs-donebutton, .bs-searchbox {
padding: 4px 8px
}
.bs-actionsbox {
width: 100%;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box
}
.bs-actionsbox .btn-group button {
width: 50%
}
.bs-donebutton {
float: left;
width: 100%;
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box
}
.bs-donebutton .btn-group button {
width: 100%
}
.bs-searchbox + .bs-actionsbox {
padding: 0 8px 4px
}
.bs-searchbox .form-control {
margin-bottom: 0;
width: 100%;
float: none
}

View File

@@ -0,0 +1 @@
<html><body></body></html>

View File

@@ -0,0 +1 @@
<html><body></body></html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

View File

@@ -0,0 +1,4 @@
<?xml version="1.0"?>
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" id="Capa_1" x="0px" y="0px" width="512px" height="512px" viewBox="0 0 485.213 485.212" style="enable-background:new 0 0 485.213 485.212;" xml:space="preserve"><g><g>
<path d="M242.607,0C108.629,0,0.001,108.628,0.001,242.606c0,133.976,108.628,242.606,242.606,242.606 c133.978,0,242.604-108.631,242.604-242.606C485.212,108.628,376.585,0,242.607,0z M370.719,353.989l-19.425,19.429 c-3.468,3.463-13.623,5.624-13.949,5.624c-61.452,0.536-120.621-23.602-164.095-67.08c-43.593-43.618-67.759-102.998-67.11-164.657 c0-0.028,2.224-9.892,5.689-13.324l19.424-19.427c7.108-7.141,20.762-10.368,30.327-7.168l4.086,1.363 c9.537,3.197,19.55,13.742,22.185,23.457l9.771,35.862c2.635,9.743-0.919,23.604-8.025,30.712l-12.97,12.972 c12.734,47.142,49.723,84.138,96.873,96.903l12.965-12.975c7.141-7.141,20.997-10.692,30.719-8.061l35.857,9.806 c9.717,2.67,20.26,12.62,23.456,22.154l1.363,4.145C381.028,333.262,377.826,346.913,370.719,353.989z" data-original="#000000" class="active-path" data-old_color="#000000" fill="#263746"/>
</g></g> </svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@@ -0,0 +1 @@
<html><body></body></html>

View File

@@ -0,0 +1,172 @@
/*!
* Bootstrap v3.4.1 (https://getbootstrap.com/)
* Copyright 2011-2019 Twitter, Inc.
* Licensed under the MIT license
*/
if (typeof jQuery === 'undefined') {
throw new Error('Bootstrap\'s JavaScript requires jQuery')
}
+function ($) {
'use strict';
var version = $.fn.jquery.split(' ')[0].split('.')
if ((version[0] < 2 && version[1] < 9) || (version[0] == 1 && version[1] == 9 && version[2] < 1) || (version[0] > 3)) {
throw new Error('Bootstrap\'s JavaScript requires jQuery version 1.9.1 or higher, but lower than version 4')
}
}(jQuery);
/* ========================================================================
* Bootstrap: tab.js v3.4.1
* https://getbootstrap.com/docs/3.4/javascript/#tabs
* ========================================================================
* Copyright 2011-2019 Twitter, Inc.
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
* ======================================================================== */
+function ($) {
'use strict';
// TAB CLASS DEFINITION
// ====================
var Tab = function (element)
{
// jscs:disable requireDollarBeforejQueryAssignment
this.element = $(element)
// jscs:enable requireDollarBeforejQueryAssignment
}
Tab.VERSION = '3.4.1'
Tab.TRANSITION_DURATION = 150
Tab.prototype.show = function () {
var $this = this.element
var $ul = $this.closest('ul:not(.dropdown-menu)')
var selector = $this.data('target')
if (!selector) {
selector = $this.attr('href')
selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
}
if ($this.parent('li').hasClass('active')) return
var $previous = $ul.find('.active:last a')
var hideEvent = $.Event('hide.bs.tab', {
relatedTarget: $this[0]
})
var showEvent = $.Event('show.bs.tab', {
relatedTarget: $previous[0]
})
$previous.trigger(hideEvent)
$this.trigger(showEvent)
if (showEvent.isDefaultPrevented() || hideEvent.isDefaultPrevented()) return
var $target = $(document).find(selector)
this.activate($this.closest('li'), $ul)
this.activate($target, $target.parent(), function () {
$previous.trigger({
type: 'hidden.bs.tab',
relatedTarget: $this[0]
})
$this.trigger({
type: 'shown.bs.tab',
relatedTarget: $previous[0]
})
})
}
Tab.prototype.activate = function (element, container, callback) {
var $active = container.find('> .active')
var transition = callback
&& $.support.transition
&& ($active.length && $active.hasClass('fade') || !!container.find('> .fade').length)
function next() {
$active
.removeClass('active')
.find('> .dropdown-menu > .active')
.removeClass('active')
.end()
.find('[data-toggle="tab"]')
.attr('aria-expanded', false)
element
.addClass('active')
.find('[data-toggle="tab"]')
.attr('aria-expanded', true)
if (transition) {
element[0].offsetWidth // reflow for transition
element.addClass('in')
} else {
element.removeClass('fade')
}
if (element.parent('.dropdown-menu').length) {
element
.closest('li.dropdown')
.addClass('active')
.end()
.find('[data-toggle="tab"]')
.attr('aria-expanded', true)
}
callback && callback()
}
$active.length && transition ?
$active
.one('bsTransitionEnd', next)
.emulateTransitionEnd(Tab.TRANSITION_DURATION) :
next()
$active.removeClass('in')
}
// TAB PLUGIN DEFINITION
// =====================
function Plugin(option) {
return this.each(function () {
var $this = $(this)
var data = $this.data('bs.tab')
if (!data) $this.data('bs.tab', (data = new Tab(this)))
if (typeof option == 'string') data[option]()
})
}
var old = $.fn.tab
$.fn.tab = Plugin
$.fn.tab.Constructor = Tab
// TAB NO CONFLICT
// ===============
$.fn.tab.noConflict = function () {
$.fn.tab = old
return this
}
// TAB DATA-API
// ============
var clickHandler = function (e) {
e.preventDefault()
Plugin.call($(this), 'show')
}
$(document)
.on('click.bs.tab.data-api', '[data-toggle="tab"]', clickHandler)
.on('click.bs.tab.data-api', '[data-toggle="pill"]', clickHandler)
}(jQuery);

View File

@@ -0,0 +1 @@
<html><body></body></html>

View File

@@ -0,0 +1,19 @@
function moCancelForm() {
jQuery('#cancel_form').submit();
}
function mo_login_page() {
jQuery('#customer_login_form').submit();
}
function showmodal(){
jQuery('#myModal').css("display","block");
}
function hidemodal(){
jQuery('#myModal').css("display","none");
}
function add_css_tab(element) {
jQuery(".mo_nav_tab_active ").removeClass("mo_nav_tab_active").removeClass("active");
jQuery(element).addClass("mo_nav_tab_active");
}

View File

@@ -0,0 +1,29 @@
<?php
/**
* @package Joomla.Administrator
* @subpackage com_miniorange_importexportusers
*
* @copyright Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
/**
* General Controller of miniorange import export users component
*
* @package Joomla.Administrator
* @subpackage com_miniorange_importexportusers
* @since 0.0.7
*/
class MiniorangeimportexportusersController extends JControllerLegacy
{
/**
* The default view for the display method.
*
* @var string
* @since 12.2
*/
protected $default_view = 'accountsetup';
}

View File

@@ -0,0 +1,698 @@
<?php
/**
* @package Joomla.Administrator
* @subpackage com_miniorange_importexportusers
*
* @copyright Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
/**
* AccountSetup Controller
*
* @package Joomla.Administrator
* @subpackage com_miniorange_importexportusers
* @since 0.0.9
*/
defined('_JEXEC') or die('Restricted access');
class MiniorangeImportExportUsersControllerAccountsetup extends JControllerForm
{
function __construct()
{
$this->view_list = 'accountsetup';
parent::__construct();
}
function saveOTP()
{
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$tab = JFactory::getApplication()->input->post->getArray()['otp'];
$fields = array(
$db->quoteName('enable_otp') . ' = ' . $db->quote(isset($tab) ? $tab : 0));
$conditions = array($db->quoteName('id') . ' = 1');
$query->update($db->quoteName('#__miniorange_importexport_customer_details'))->set($fields)->where($conditions);
$db->setQuery($query);
$result = $db->execute();
$this->setRedirect('index.php?option=com_miniorange_importexportusers&tab=configuration', 'Your configuration has been saved successfully.');
}
function customerLoginForm()
{
$db = JFactory::getDbo();
$query = $db->getQuery(true);
// Fields to update.
$fields = array(
$db->quoteName('login_status') . ' = ' . $db->quote(1),
$db->quoteName('password') . ' = ' . $db->quote(''),
$db->quoteName('email_count') . ' = ' . $db->quote(0),
$db->quoteName('sms_count') . ' = ' . $db->quote(0),
);
// Conditions for which records should be updated.
$conditions = array(
$db->quoteName('id') . ' = 1'
);
$query->update($db->quoteName('#__miniorange_importexport_customer_details'))->set($fields)->where($conditions);
$db->setQuery($query);
$db->execute();
$this->setRedirect('index.php?option=com_miniorange_importexportusers&view=accountsetup&tab-panel=account');
}
function verifyCustomer()
{
$post = JFactory::getApplication()->input->post->getArray();
$email = '';
$password = '';
if (MoImportExportUtility::check_empty_or_null($post['email']) || MoImportExportUtility::check_empty_or_null($post['password'])) {
JFactory::getApplication()->enqueueMessage(4711, 'All the fields are required. Please enter valid entries.');
return;
} else {
$email = $post['email'];
$password = $post['password'];
}
$customer = new MoImportExportCustomer();
$content = $customer->get_customer_key($email, $password);
$customerKey = json_decode($content, true);
if (strcasecmp($customerKey['apiKey'], 'CURL_ERROR') == 0) {
$this->setRedirect('index.php?option=com_miniorange_importexportusers&view=accountsetup', $customerKey['token'], 'error');
} else if (json_last_error() == JSON_ERROR_NONE) {
if (isset($customerKey['id']) && isset($customerKey['apiKey']) && !empty($customerKey['id']) && !empty($customerKey['apiKey'])) {
$this->save_customer_configurations($email, $customerKey['id'], $customerKey['apiKey'], $customerKey['token'], $customerKey['phone']);
$this->setRedirect('index.php?option=com_miniorange_importexportusers&view=accountsetup&tab-panel=license_page', 'Your account has been retrieved successfully. Now you can upgrade your plan.');
} else {
$this->setRedirect('index.php?option=com_miniorange_importexportusers&view=accountsetup', 'There was an error in fetching your details. Please try again.', 'error');
}
} else {
$this->setRedirect('index.php?option=com_miniorange_importexportusers&view=accountsetup&tab-panel=account', 'Invalid username or password. Please try again.', 'error');
}
}
function save_customer_configurations($email, $id, $apiKey, $token, $phone)
{
$db = JFactory::getDbo();
$query = $db->getQuery(true);
// Fields to update.
$fields = array(
$db->quoteName('email') . ' = ' . $db->quote($email),
$db->quoteName('customer_key') . ' = ' . $db->quote($id),
$db->quoteName('api_key') . ' = ' . $db->quote($apiKey),
$db->quoteName('customer_token') . ' = ' . $db->quote($token),
$db->quoteName('admin_phone') . ' = ' . $db->quote($phone),
$db->quoteName('login_status') . ' = ' . $db->quote(0),
$db->quoteName('registration_status') . ' = ' . $db->quote('SUCCESS'),
$db->quoteName('password') . ' = ' . $db->quote(''),
$db->quoteName('email_count') . ' = ' . $db->quote(0),
$db->quoteName('sms_count') . ' = ' . $db->quote(0),
);
// Conditions for which records should be updated.
$conditions = array(
$db->quoteName('id') . ' = 1'
);
$query->update($db->quoteName('#__miniorange_importexport_customer_details'))->set($fields)->where($conditions);
$db->setQuery($query);
$result = $db->execute();
}
function ResetAccount()
{
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$fields = array(
$db->quoteName('email') . ' = ' . $db->quote(''),
$db->quoteName('password') . ' = ' . $db->quote(''),
$db->quoteName('customer_key') . ' = ' . $db->quote(''),
$db->quoteName('admin_phone') . ' = ' . $db->quote(''),
$db->quoteName('customer_token') . ' = ' . $db->quote(''),
$db->quoteName('api_key') . ' = ' . $db->quote(''),
$db->quoteName('registration_status') . ' = ' . $db->quote(''),
$db->quoteName('login_status') . ' = ' . $db->quote(0),
$db->quoteName('transaction_id') . ' = ' . $db->quote(''),
$db->quoteName('email_count') . ' = ' . $db->quote(0),
$db->quoteName('sms_count') . ' = ' . $db->quote(0),
);
// Conditions for which records should be updated.
$conditions = array(
$db->quoteName('id') . ' = 1'
);
$query->update($db->quoteName('#__miniorange_importexport_customer_details'))->set($fields)->where($conditions);
$db->setQuery($query);
$db->execute();
$this->setRedirect('index.php?option=com_miniorange_importexportusers&view=accountsetup&tab-panel=account');
}
function exportUsers()
{
$post = JFactory::getApplication()->input->post->getArray();
if (count($post) == 0) {
$this->setRedirect('index.php?option=com_miniorange_importexportusers&view=accountsetup&tab-panel=exportsettings');
return;
}
$enable_export_users = isset($post['enable_export_users']) ? $post['enable_export_users'] : 0;
MoImportExportUtility::updateDBValue('#__miniorange_exportusers', 'enable_export_users', $enable_export_users);
$message = 'Export Users configuration has been saved successfully.';
$this->setRedirect('index.php?option=com_miniorange_importexportusers&view=accountsetup&tab-panel=exportsettings', $message);
$user_data = MoImportExportUtility::readUsersTableData();
if(isset($post['export_groups']) && $post['export_groups'] == 'Export Groups')
{
MoImportExportUtility::exportUserGroups();
}
$this->download_file($user_data);
}
function download_file($user_data)
{
MoImportExportUtility::downloadCSVFile($user_data);
}
function registerCustomer()
{
//validate and sanitize
$email = '';
$phone = '';
$password = '';
$confirmPassword = '';
$password = (JFactory::getApplication()->input->post->getArray()["password"]);
$confirmPassword = (JFactory::getApplication()->input->post->getArray()["confirmPassword"]);
$email = (JFactory::getApplication()->input->post->getArray()["email"]);
if (MoImportExportUtility::check_empty_or_null($email) || MoImportExportUtility::check_empty_or_null($password) || MoImportExportUtility::check_empty_or_null($confirmPassword)) {
$this->setRedirect('index.php?option=com_miniorange_importexportusers&view=accountsetup&tab-panel=account', 'All the fields are required. Please enter valid entries.', 'error');
return;
} else if (strlen($password) < 6 || strlen($confirmPassword) < 6) { //check password is of minimum length 6
$this->setRedirect('index.php?option=com_miniorange_importexportusers&view=accountsetup&tab-panel=account', 'Choose a password with minimum length 6.', 'error');
return;
} else {
$email = JFactory::getApplication()->input->post->getArray()["email"];
$email = strtolower($email);
$phone = JFactory::getApplication()->input->post->getArray()["phone"];
$password = JFactory::getApplication()->input->post->getArray()["password"];
$confirmPassword = JFactory::getApplication()->input->post->getArray()["confirmPassword"];
}
if (strcmp($password, $confirmPassword) == 0) {
$db = JFactory::getDbo();
$query = $db->getQuery(true);
// Fields to update.
$fields = array(
$db->quoteName('email') . ' = ' . $db->quote($email),
$db->quoteName('admin_phone') . ' = ' . $db->quote($phone),
$db->quoteName('password') . ' = ' . $db->quote($password),
);
// Conditions for which records should be updated.
$conditions = array(
$db->quoteName('id') . ' = 1'
);
$query->update($db->quoteName('#__miniorange_importexport_customer_details'))->set($fields)->where($conditions);
$db->setQuery($query);
$result = $db->execute();
$customer = new MoImportExportCustomer();
$content = json_decode($customer->check_customer($email), true);
if (strcasecmp($content['status'], 'CUSTOMER_NOT_FOUND') == 0) {
$auth_type = 'EMAIL';
$content = json_decode($customer->send_otp_token($auth_type, $email), true);
if (strcasecmp($content['status'], 'SUCCESS') == 0) {
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$fields = array(
$db->quoteName('email_count') . ' = ' . $db->quote(1),
$db->quoteName('transaction_id') . ' = ' . $db->quote($content['txId']),
$db->quoteName('login_status') . ' = ' . $db->quote(0),
$db->quoteName('registration_status') . ' = ' . $db->quote('MO_OTP_DELIVERED_SUCCESS')
);
// Conditions for which records should be updated.
$conditions = array(
$db->quoteName('id') . ' = 1'
);
$query->update($db->quoteName('#__miniorange_importexport_customer_details'))->set($fields)->where($conditions);
$db->setQuery($query);
$result = $db->execute();
$this->setRedirect('index.php?option=com_miniorange_importexportusers&view=accountsetup&tab-panel=account', 'A One Time Passcode has been sent <b>( 1 )</b> to <b>' . $email . '</b>. Please enter the OTP below to verify your email. ');
} else {
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$fields = array(
$db->quoteName('login_status') . ' = ' . $db->quote(0),
$db->quoteName('registration_status') . ' = ' . $db->quote('MO_OTP_DELIVERED_FAILURE')
);
// Conditions for which records should be updated.
$conditions = array(
$db->quoteName('id') . ' = 1'
);
$query->update($db->quoteName('#__miniorange_importexport_customer_details'))->set($fields)->where($conditions);
$db->setQuery($query);
$result = $db->execute();
$this->setRedirect('index.php?option=com_miniorange_importexportusers&view=accountsetup&tab-panel=account', 'There was an error in sending email. Please click on Resend OTP to try again. ', 'error');
}
} else if (strcasecmp($content['status'], 'CURL_ERROR') == 0) {
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$fields = array(
$db->quoteName('login_status') . ' = ' . $db->quote(0),
$db->quoteName('registration_status') . ' = ' . $db->quote('MO_OTP_DELIVERED_FAILURE')
);
// Conditions for which records should be updated.
$conditions = array(
$db->quoteName('id') . ' = 1'
);
$query->update($db->quoteName('#__miniorange_importexport_customer_details'))->set($fields)->where($conditions);
$db->setQuery($query);
$result = $db->execute();
$this->setRedirect('index.php?option=com_miniorange_importexportusers&view=accountsetup', $content['statusMessage'], 'error');
} else {
$content = $customer->get_customer_key($email, $password);
$customerKey = json_decode($content, true);
if (json_last_error() == JSON_ERROR_NONE) {
$this->save_customer_configurations($email, $customerKey['id'], $customerKey['apiKey'], $customerKey['token'], $customerKey['phone']);
$this->setRedirect('index.php?option=com_miniorange_importexportusers&view=accountsetup&tab-panel=account', 'Your account has been retrieved successfully, now you can <strong>upgrade</strong> to licensed version.');
} else {
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$fields = array(
$db->quoteName('login_status') . ' = ' . $db->quote(1),
$db->quoteName('registration_status') . ' = ' . $db->quote(0)
);
// Conditions for which records should be updated.
$conditions = array(
$db->quoteName('id') . ' = 1'
);
$query->update($db->quoteName('#__miniorange_importexport_customer_details'))->set($fields)->where($conditions);
$db->setQuery($query);
$result = $db->execute();
$this->setRedirect('index.php?option=com_miniorange_importexportusers&view=accountsetup&tab-panel=account', 'You already have an account with miniOrange. Please enter a valid password. ', 'error');
}
}
} else {
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$fields = array(
$db->quoteName('login_status') . ' = ' . $db->quote(0)
);
// Conditions for which records should be updated.
$conditions = array(
$db->quoteName('id') . ' = 1'
);
$query->update($db->quoteName('#__miniorange_importexport_customer_details'))->set($fields)->where($conditions);
$db->setQuery($query);
$result = $db->execute();
$this->setRedirect('index.php?option=com_miniorange_importexportusers&view=accountsetup&tab-panel=account', 'Password and Confirm password do not match.', 'error');
}
}
function validateOtp()
{
$otp_token = JFactory::getApplication()->input->post->getArray()["otp_token"];
//validation and sanitization
//$otp_token = '';
if (MoImportExportUtility::check_empty_or_null($otp_token)) {
$this->setRedirect('index.php?option=com_miniorange_importexportusers&view=accountsetup&tab-panel=account', 'Please enter a valid OTP.', 'error');
return;
}
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$query->select('transaction_id');
$query->from($db->quoteName('#__miniorange_importexport_customer_details'));
$query->where($db->quoteName('id') . " = 1");
$db->setQuery($query);
$transaction_id = $db->loadResult();
$customer = new MoImportExportCustomer();
$content = json_decode($customer->validate_otp_token($transaction_id, $otp_token), true);
if (strcasecmp($content['status'], 'SUCCESS') == 0) {
$customerKey = json_decode($customer->create_customer(), true);
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$fields = array(
$db->quoteName('email_count') . ' = ' . $db->quote(0),
$db->quoteName('sms_count') . ' = ' . $db->quote(0)
);
// Conditions for which records should be updated.
$conditions = array(
$db->quoteName('id') . ' = 1'
);
$query->update($db->quoteName('#__miniorange_importexport_customer_details'))->set($fields)->where($conditions);
$db->setQuery($query);
$result = $db->execute();
if (strcasecmp($customerKey['status'], 'CUSTOMER_USERNAME_ALREADY_EXISTS') == 0) { //admin already exists in miniOrange
if (json_last_error() == JSON_ERROR_NONE) {
$this->save_customer_configurations($customerKey['email'], $customerKey['id'], $customerKey['apiKey'], $customerKey['token'], $customerKey['phone']);
$this->setRedirect('index.php?option=com_miniorange_importexportusers&view=accountsetup&tab-panel=account', 'Your account has been retrieved successfully, now you can <strong>upgrade</strong> to licensed version.');
} else {
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$fields = array(
$db->quoteName('login_status') . ' = ' . $db->quote(1),
$db->quoteName('password') . ' = ' . $db->quote(''),
);
// Conditions for which records should be updated.
$conditions = array(
$db->quoteName('id') . ' = 1'
);
$query->update($db->quoteName('#__miniorange_importexport_customer_details'))->set($fields)->where($conditions);
$db->setQuery($query);
$result = $db->execute();
$this->setRedirect('index.php?option=com_miniorange_importexportusers&view=accountsetup&tab-panel=account', 'You already have an account with miniOrange. Please enter a valid password.', 'error');
}
} else if (strcasecmp($customerKey['status'], 'SUCCESS') == 0) {
//registration successful
$this->save_customer_configurations($customerKey['email'], $customerKey['id'], $customerKey['apiKey'], $customerKey['token'], $customerKey['phone']);
$this->setRedirect('index.php?option=com_miniorange_importexportusers&view=accountsetup&tab-panel=license_page', 'Your account has been created successfully.');
} else if (strcmp($customerKey['message'], 'Email is not enterprise email.') == 0) {
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$fields = array(
$db->quoteName('registration_status') . ' = ' . $db->quote(''),
$db->quoteName('email') . ' = ' . $db->quote(''),
$db->quoteName('password') . ' = ' . $db->quote(''),
$db->quoteName('transaction_id') . ' = ' . $db->quote(''),
);
// Conditions for which records should be updated.
$conditions = array(
$db->quoteName('id') . ' = 1'
);
$query->update($db->quoteName('#__miniorange_importexport_customer_details'))->set($fields)->where($conditions);
$db->setQuery($query);
$result = $db->execute();
$this->setRedirect('index.php?option=com_miniorange_importexportusers&view=accountsetup&tab-panel=account', 'There was an error creating an account for you. You may have entered an invalid Email-Id. <br><b>(We discourage the use of disposable emails)</b><br>
Please try again with a valid email.', 'error');
}
//update_option('mo_usync_local_password', '');
} else if (strcasecmp($content['status'], 'CURL_ERROR') == 0) {
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$fields = array(
$db->quoteName('registration_status') . ' = ' . $db->quote('MO_OTP_VALIDATION_FAILURE')
);
// Conditions for which records should be updated.
$conditions = array(
$db->quoteName('id') . ' = 1'
);
$query->update($db->quoteName('#__miniorange_importexport_customer_details'))->set($fields)->where($conditions);
$db->setQuery($query);
$result = $db->execute();
$this->setRedirect('index.php?option=com_miniorange_importexportusers&view=accountsetup&tab-panel=account', $content['statusMessage'], 'error');
} else {
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$fields = array(
$db->quoteName('registration_status') . ' = ' . $db->quote('MO_OTP_VALIDATION_FAILURE')
);
// Conditions for which records should be updated.
$conditions = array(
$db->quoteName('id') . ' = 1'
);
$query->update($db->quoteName('#__miniorange_importexport_customer_details'))->set($fields)->where($conditions);
$db->setQuery($query);
$result = $db->execute();
$this->setRedirect('index.php?option=com_miniorange_importexportusers&view=accountsetup&tab-panel=account', 'Invalid one time passcode. Please enter a valid OTP.', 'error');
}
}
function resendOtp()
{
$customer = new MoImportExportCustomer();
$auth_type = 'EMAIL';
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$query->select('email');
$query->from($db->quoteName('#__miniorange_importexport_customer_details'));
$query->where($db->quoteName('id') . " = 1");
$db->setQuery($query);
$email = $db->loadResult();
$content = json_decode($customer->send_otp_token($auth_type, $email), true);
if (strcasecmp($content['status'], 'SUCCESS') == 0) {
$customer_details = MoImportExportUtility::getCustomerDetails();
$email_count = $customer_details['email_count'];
$admin_email = $customer_details['email'];
if ($email_count != '' && $email_count >= 1) {
$email_count = $email_count + 1;
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$fields = array(
$db->quoteName('email_count') . ' = ' . $db->quote($email_count),
$db->quoteName('transaction_id') . ' = ' . $db->quote($content['txId']),
$db->quoteName('registration_status') . ' = ' . $db->quote('MO_OTP_DELIVERED_SUCCESS')
);
// Conditions for which records should be updated.
$conditions = array(
$db->quoteName('id') . ' = 1'
);
$query->update($db->quoteName('#__miniorange_importexport_customer_details'))->set($fields)->where($conditions);
$db->setQuery($query);
$result = $db->execute();
$this->setRedirect('index.php?option=com_miniorange_importexportusers&view=accountsetup&tab-panel=account', 'Another One Time Passcode has been sent <b>( ' . $email_count . ' )</b> to <b>' . ($admin_email) . '</b>. Please enter the OTP below to verify your email.');
} else {
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$fields = array(
$db->quoteName('email_count') . ' = ' . $db->quote(1),
$db->quoteName('transaction_id') . ' = ' . $db->quote($content['txId']),
$db->quoteName('registration_status') . ' = ' . $db->quote('MO_OTP_DELIVERED_SUCCESS')
);
// Conditions for which records should be updated.
$conditions = array(
$db->quoteName('id') . ' = 1'
);
$query->update($db->quoteName('#__miniorange_importexport_customer_details'))->set($fields)->where($conditions);
$db->setQuery($query);
$result = $db->execute();
$this->setRedirect('index.php?option=com_miniorange_importexportusers&view=accountsetup&tab-panel=account', 'An OTP has been sent to <b>' . ($admin_email) . '</b>. Please enter the OTP below to verify your email.');
}
} else if (strcasecmp($content['status'], 'CURL_ERROR') == 0) {
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$fields = array(
$db->quoteName('registration_status') . ' = ' . $db->quote('MO_OTP_DELIVERED_FAILURE')
);
// Conditions for which records should be updated.
$conditions = array(
$db->quoteName('id') . ' = 1'
);
$query->update($db->quoteName('#__miniorange_importexport_customer_details'))->set($fields)->where($conditions);
$db->setQuery($query);
$result = $db->execute();
$this->setRedirect('index.php?option=com_miniorange_importexportusers&view=accountsetup', $content['statusMessage'], 'error');
} else {
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$fields = array(
$db->quoteName('registration_status') . ' = ' . $db->quote('MO_OTP_DELIVERED_FAILURE')
);
// Conditions for which records should be updated.
$conditions = array(
$db->quoteName('id') . ' = 1'
);
$query->update($db->quoteName('#__miniorange_importexport_customer_details'))->set($fields)->where($conditions);
$db->setQuery($query);
$result = $db->execute();
$this->setRedirect('index.php?option=com_miniorange_importexportusers&view=accountsetup', 'There was an error in sending email. Please click on Resend OTP to try again.', 'error');
}
}
function cancelform()
{
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$fields = array(
$db->quoteName('email') . ' = ' . $db->quote(''),
$db->quoteName('registration_status') . ' = ' . $db->quote(''),
$db->quoteName('login_status') . ' = ' . $db->quote(0),
$db->quoteName('email_count') . ' = ' . $db->quote(0),
$db->quoteName('sms_count') . ' = ' . $db->quote(0),
);
// Conditions for which records should be updated.
$conditions = array(
$db->quoteName('id') . ' = 1'
);
$query->update($db->quoteName('#__miniorange_importexport_customer_details'))->set($fields)->where($conditions);
$db->setQuery($query);
$result = $db->execute();
$this->setRedirect('index.php?option=com_miniorange_importexportusers&view=accountsetup&tab-panel=account');
}
function phoneVerification()
{
$phone = JFactory::getApplication()->input->post->getArray()['phone_number'];
$phone = str_replace(' ', '', $phone);
$pattern = "/[\+][0-9]{1,3}[0-9]{10}/";
if (preg_match($pattern, $phone, $matches, PREG_OFFSET_CAPTURE)) {
$auth_type = 'SMS';
$customer = new MoImportExportCustomer();
$send_otp_response = json_decode($customer->send_otp_token($auth_type, $phone));
if ($send_otp_response->status == 'SUCCESS') {
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$query->select('sms_count');
$query->from($db->quoteName('#__miniorange_importexport_customer_details'));
$query->where($db->quoteName('id') . " = 1");
$db->setQuery($query);
$sms_count = $db->loadResult();
if ($sms_count != '' && $sms_count >= 1) {
$sms_count = $sms_count + 1;
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$fields = array(
$db->quoteName('sms_count') . ' = ' . $db->quote($sms_count),
$db->quoteName('transaction_id') . ' = ' . $db->quote($send_otp_response->txId)
);
// Conditions for which records should be updated.
$conditions = array(
$db->quoteName('id') . ' = 1'
);
$query->update($db->quoteName('#__miniorange_importexport_customer_details'))->set($fields)->where($conditions);
$db->setQuery($query);
$result = $db->execute();
$this->setRedirect('index.php?option=com_miniorange_importexportusers&view=accountsetup&tab-panel=account', 'Another One Time Passcode has been sent <b>(' . $sms_count . ')</b> for verification to ' . $phone);
} else {
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$fields = array(
$db->quoteName('sms_count') . ' = ' . $db->quote(1),
$db->quoteName('transaction_id') . ' = ' . $db->quote($send_otp_response->txId)
);
// Conditions for which records should be updated.
$conditions = array(
$db->quoteName('id') . ' = 1'
);
$query->update($db->quoteName('#__miniorange_importexport_customer_details'))->set($fields)->where($conditions);
$db->setQuery($query);
$result = $db->execute();
$this->setRedirect('index.php?option=com_miniorange_importexportusers&view=accountsetup&tab-panel=account', 'A One Time Passcode has been sent ( <b>1</b> ) for verification to ' . $phone);
}
} else {
$this->setRedirect('index.php?option=com_miniorange_importexportusers&view=accountsetup&tab-panel=account', 'An error occurred while sending OTP to phone. Please try again.');
}
} else {
$this->setRedirect('index.php?option=com_miniorange_importexportusers&view=accountsetup&tab-panel=account', 'Please enter the phone number in the following format: <b>+##country code## ##phone number##', 'error');
}
}
function contactUs()
{
$post = JFactory::getApplication()->input->post->getArray();
if (count($post) == 0) {
$this->setRedirect('index.php?option=com_miniorange_importexportusers&view=accountsetup');
return;
}
$query_email = isset($post['query_email']) ? $post['query_email'] : '';
$query = isset($post['query_support']) ? $post['query_support'] : '';
$phone = isset($post['query_phone']) ? $post['query_phone'] : '';
if (MoImportExportUtility::check_empty_or_null($query_email) || MoImportExportUtility::check_empty_or_null($query)) {
$this->setRedirect('index.php?option=com_miniorange_importexportusers&view=accountsetup', 'Please submit your query with email.', 'error');
return;
} else {
$contact_us = new MoImportExportCustomer();
$submited = json_decode($contact_us->submit_contact_us($query_email, $phone, $query), true);
if (json_last_error() == JSON_ERROR_NONE) {
if (is_array($submited) && array_key_exists('status', $submited) && $submited['status'] == 'ERROR') {
$this->setRedirect('index.php?option=com_miniorange_importexportusers&view=accountsetup', $submited['message'], 'error');
} else {
if ($submited == false) {
$this->setRedirect('index.php?option=com_miniorange_importexportusers&view=accountsetup', 'Your query could not be submitted. Please try again.', 'error');
} else {
$this->setRedirect('index.php?option=com_miniorange_importexportusers&view=accountsetup', 'Thanks for getting in touch! We will get back to you shortly.');
}
}
}
}
}
}

View File

@@ -0,0 +1,334 @@
<?php
/** Copyright (C) 2015 miniOrange
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>
* @package miniOrange importexportusers
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
*/
/**
* This library is miniOrange Authentication Service.
* Contains Request Calls to Customer service.
**/
defined('_JEXEC') or die('Restricted access');
class MoImportExportCustomer
{
public $email;
public $phone;
public $customerKey;
public $transactionId;
/*
** Initial values are hardcoded to support the miniOrange framework to generate OTP for email.
** We need the default value for creating the OTP the first time,
** As we don't have the Default keys available before registering the user to our server.
** This default values are only required for sending an One Time Passcode at the user provided email address.
*/
//auth
private $defaultCustomerKey = "16555";
private $defaultApiKey = "fFd2XcvTGDemZvbw1bcUesNJWEqKbbUq";
function create_customer()
{
if (!MoImportExportUtility::is_curl_installed()) {
return json_encode(array("apiKey"=>'CURL_ERROR','token'=>'<a href="http://php.net/manual/en/curl.installation.php">PHP cURL extension</a> is not installed or disabled.'));
}
$hostname = MoImportExportUtility::getHostname();
$url = $hostname . '/moas/rest/customer/add';
$ch = curl_init($url);
$current_user = JFactory::getUser();
$customer_details = MoImportExportUtility::getCustomerDetails();
$this->email = $customer_details['email'];
$this->phone = $customer_details['admin_phone'];
$password = $customer_details['password'];
$fields = array(
'companyName' => $_SERVER['SERVER_NAME'],
'areaOfInterest' => 'Joomla Import Export Users',
'firstname' => $current_user->name,
'lastname' => '',
'email' => $this->email,
'phone' => $this->phone,
'password' => $password
);
$field_string = json_encode($fields);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_ENCODING, "");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_AUTOREFERER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); # required for https urls
curl_setopt($ch, CURLOPT_MAXREDIRS, 10);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'Content-Type: application/json',
'charset: UTF - 8',
'Authorization: Basic'
));
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $field_string);
$content = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Request Error:' . curl_error($ch);
exit();
}
curl_close($ch);
return $content;
}
function get_customer_key($email, $password)
{
if (!MoImportExportUtility::is_curl_installed()) {
return json_encode(array("apiKey" => 'CURL_ERROR', 'token' => '<a href="http://php.net/manual/en/curl.installation.php">PHP cURL extension</a> is not installed or disabled.'));
}
$hostname = MoImportExportUtility::getHostname();
$url = $hostname . "/moas/rest/customer/key";
$ch = curl_init($url);
$fields = array(
'email' => $email,
'password' => $password
);
$field_string = json_encode($fields);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_ENCODING, "");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_AUTOREFERER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); # required for https urls
curl_setopt($ch, CURLOPT_MAXREDIRS, 10);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
'Content-Type: application/json',
'charset: UTF - 8',
'Authorization: Basic'
));
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $field_string);
$content = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Request Error:' . curl_error($ch);
exit();
}
curl_close($ch);
return $content;
}
function submit_contact_us($q_email, $q_phone, $query)
{
if (!MoImportExportUtility::is_curl_installed()) {
return json_encode(array("status" => 'CURL_ERROR', 'statusMessage' => '<a href="http://php.net/manual/en/curl.installation.php">PHP cURL extension</a> is not installed or disabled.'));
}
$hostname = MoImportExportUtility::getHostname();
$url = $hostname . "/moas/rest/customer/contact-us";
$ch = curl_init($url);
$current_user = JFactory::getUser();
$subject = "Joomla Import Export Users";
$query = '[Joomla Import Export Users]: ' . $query;
$fields = array(
'firstName' => $current_user->username,
'lastName' => '',
'company' => $_SERVER['SERVER_NAME'],
'email' => $q_email,
'ccEmail' => 'joomlasupport@xecurify.com',
'phone' => $q_phone,
'subject' => $subject,
'query' => $query
);
$field_string = json_encode($fields);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_ENCODING, "");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_AUTOREFERER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); # required for https urls
curl_setopt($ch, CURLOPT_MAXREDIRS, 10);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json', 'charset: UTF-8', 'Authorization: Basic'));
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $field_string);
$content = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Request Error:' . curl_error($ch);
return false;
}
curl_close($ch);
return true;
}
function send_otp_token($auth_type, $emailOrPhone)
{
if (!MoImportExportUtility::is_curl_installed()) {
return json_encode(array("status" => 'CURL_ERROR', 'statusMessage' => '<a href="http://php.net/manual/en/curl.installation.php">PHP cURL extension</a> is not installed or disabled.'));
}
$hostname = MoImportExportUtility::getHostname();
$url = $hostname . '/moas/api/auth/challenge';
$ch = curl_init($url);
$customerKey = $this->defaultCustomerKey;
$apiKey = $this->defaultApiKey;
/* Current time in milliseconds since midnight, January 1, 1970 UTC. */
$currentTimeInMillis = round(microtime(true) * 1000);
/* Creating the Hash using SHA-512 algorithm */
$stringToHash = $customerKey . number_format($currentTimeInMillis, 0, '', '') . $apiKey;
$hashValue = hash("sha512", $stringToHash);
$customerKeyHeader = "Customer-Key: " . $customerKey;
$timestampHeader = "Timestamp: " . number_format($currentTimeInMillis, 0, '', '');
$authorizationHeader = "Authorization: " . $hashValue;
if ($auth_type == "EMAIL") {
$fields = array(
'customerKey' => $this->defaultCustomerKey,
'email' => $emailOrPhone,
'authType' => $auth_type,
'transactionName' => 'Joomla Import Export Users'
);
} else {
$fields = array(
'customerKey' => $this->defaultCustomerKey,
'phone' => $emailOrPhone,
'authType' => $auth_type,
'transactionName' => 'Joomla Import Export Users'
);
}
$field_string = json_encode($fields);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_ENCODING, "");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_AUTOREFERER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); # required for https urls
curl_setopt($ch, CURLOPT_MAXREDIRS, 10);
curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-Type: application/json", $customerKeyHeader,
$timestampHeader, $authorizationHeader));
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $field_string);
$content = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Request Error:' . curl_error($ch);
exit();
}
curl_close($ch);
return $content;
}
function validate_otp_token($transactionId, $otpToken)
{
if (!MoImportExportUtility::is_curl_installed()) {
return json_encode(array("status" => 'CURL_ERROR', 'statusMessage' => '<a href="http://php.net/manual/en/curl.installation.php">PHP cURL extension</a> is not installed or disabled.'));
}
$hostname = MoImportExportUtility::getHostname();
$url = $hostname . '/moas/api/auth/validate';
$ch = curl_init($url);
$customerKey = $this->defaultCustomerKey;
$apiKey = $this->defaultApiKey;
/* Current time in milliseconds since midnight, January 1, 1970 UTC. */
$currentTimeInMillis = round(microtime(true) * 1000);
/* Creating the Hash using SHA-512 algorithm */
$stringToHash = $customerKey . number_format($currentTimeInMillis, 0, '', '') . $apiKey;
$hashValue = hash("sha512", $stringToHash);
$customerKeyHeader = "Customer-Key: " . $customerKey;
$timestampHeader = "Timestamp: " . number_format($currentTimeInMillis, 0, '', '');
$authorizationHeader = "Authorization: " . $hashValue;
$fields = '';
//*check for otp over sms/email
$fields = array(
'txId' => $transactionId,
'token' => $otpToken,
);
$field_string = json_encode($fields);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_ENCODING, "");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_AUTOREFERER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); # required for https urls
curl_setopt($ch, CURLOPT_MAXREDIRS, 10);
curl_setopt($ch, CURLOPT_HTTPHEADER, array("Content-Type: application/json", $customerKeyHeader,
$timestampHeader, $authorizationHeader));
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $field_string);
$content = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Request Error:' . curl_error($ch);
exit();
}
curl_close($ch);
return $content;
}
function check_customer($email)
{
if (!MoImportExportUtility::is_curl_installed()) {
return json_encode(array("status" => 'CURL_ERROR', 'statusMessage' => '<a href="http://php.net/manual/en/curl.installation.php">PHP cURL extension</a> is not installed or disabled.'));
}
$hostname = MoImportExportUtility::getHostname();
$url = $hostname . "/moas/rest/customer/check-if-exists";
$ch = curl_init($url);
$fields = array(
'email' => $email,
);
$field_string = json_encode($fields);
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
curl_setopt($ch, CURLOPT_ENCODING, "");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_AUTOREFERER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); # required for https urls
curl_setopt($ch, CURLOPT_MAXREDIRS, 10);
curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-Type: application/json', 'charset: UTF - 8', 'Authorization: Basic'));
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $field_string);
$content = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Request Error:' . curl_error($ch);
exit();
}
curl_close($ch);
return $content;
}
} ?>

View File

@@ -0,0 +1,299 @@
<?php
/** Copyright (C) 2015 miniOrange
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>
* @package miniOrange Import Export Users
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
*/
/**
* This class contains all the utility functions
**/
defined('_JEXEC') or die('Restricted access');
class MoImportExportUtility
{
public static function getJoomlaCmsVersion()
{
$jVersion = new JVersion;
return($jVersion->getShortVersion());
}
public static function GetPluginVersion()
{
$db = JFactory::getDbo();
$dbQuery = $db->getQuery(true)
->select('manifest_cache')
->from($db->quoteName('#__extensions'))
->where($db->quoteName('element') . " = " . $db->quote('com_miniorange_importexportusers'));
$db->setQuery($dbQuery);
$manifest = json_decode($db->loadResult());
return($manifest->version);
}
public static function exportUserGroups()
{
$user_groups = MoImportExportUtility::readUserGroupsTable();
self::parseDataAndDownloadCSV($user_groups);
}
public static function downloadCSVFile($user_data)
{
$reports = '';
$user_count = count($user_data);
if (is_array($user_data)) {
foreach ($user_data[0] as $key => $value) {
$reports .= $key . ',';
}
$reports .= 'group' . ',';
$reports .= "\n";
for ($i = 0; $i < $user_count; $i++) {
if (is_array($user_data)) {
foreach ($user_data[$i] as $key => $value) {
// if param contains comma then replace it by semicolan otherwise it will print in new column for all comma seperated value
if($key == 'params'){
$value = str_replace(',', ';', $value);
}
$reports .= $value . ',';
// get list of assigned group id's for particular user by using user id of that user
$user_id = $user_data[$i]['id'];
jimport('joomla.access.access');
$groups = JAccess::getGroupsByUser($user_id, false);
}
// if user contains multiple groups
$group_value = '';
if(is_array($groups)){
$group_name = array();
foreach ($groups as $group){
$group_name[] = self::getGroupNameByID($group);
}
$group_value = implode(';', $group_name);
$reports .= $group_value . ',';
}
else{
$reports .= $group_value . ',';
}
}
$reports .= "\n";
}
header('Content-Type: application/csv');
header('Content-Disposition: attachment; filename="reports.csv"');
print_r($reports);
exit();
}
header('Content-Type: application/csv');
header('Content-Disposition: attachment; filename="reports.csv"');
print_r($reports);
exit();
}
public static function readUserGroupsTable()
{
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__usergroups'));
$db->setQuery($query);
return $db->loadAssocList();
}
public static function parseDataAndDownloadCSV($user_groups)
{
$reports = '';
$user_count = count($user_groups);
if (is_array($user_groups)) {
foreach ($user_groups[0] as $key => $value) {
$reports .= $key . ',';
}
$reports .= "\n";
for ($i_itr = 0; $i_itr < $user_count; $i_itr++) {
if (is_array($user_groups)) {
foreach ($user_groups[$i_itr] as $key => $value) {
$reports .= $value . ',';
// This code will require later. Dont delete this
// get list of assigned group id's for particular user by using user id of that user
/*$i_user_id = $user_groups[$i_itr]['id'];
jimport('joomla.access.access');
$groups = JAccess::getGroupsByUser($i_user_id, false);*/
}
}
$reports .= "\n";
}
header('Content-Type: application/csv');
header('Content-Disposition: attachment; filename="reports.csv"');
print_r($reports);
exit();
}
header('Content-Type: application/csv');
header('Content-Disposition: attachment; filename="reports.csv"');
print_r($reports);
exit();
}
public static function getAllGroups()
{
$all_groups = MoImportExportUtility::loadGroups();
$groups = array();
foreach ($all_groups as $key => $value) {
array_push($groups, $value['title']);
}
return $groups;
}
public static function is_customer_registered()
{
$result = self::getCustomerDetails();
$email = $result['email'];
$customerKey = $result['customer_key'];
$status = $result['registration_status'];
if ($email && $customerKey && is_numeric(trim($customerKey)) && $status == 'SUCCESS') {
return 1;
} else {
return 0;
}
}
public static function isBlank( $value )
{
if( ! isset( $value ) || empty( $value ) ) return TRUE;
return FALSE;
}
public static function getCustomerDetails()
{
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__miniorange_importexport_customer_details'));
$query->where($db->quoteName('id') . " = 1");
$db->setQuery($query);
return $db->loadAssoc();
}
public static function check_empty_or_null($value)
{
if (!isset($value) || empty($value)) {
return true;
}
return false;
}
public static function is_curl_installed()
{
if (in_array('curl', get_loaded_extensions())) {
return 1;
} else
return 0;
}
public static function getCustomerToken()
{
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$query->select('customer_token');
$query->from($db->quoteName('#__miniorange_importexport_customer_details'));
$query->where($db->quoteName('id') . " = 1");
$db->setQuery($query);
return $db->loadResult();
}
public static function is_extension_installed($name)
{
if (in_array($name, get_loaded_extensions())) {
return true;
} else {
return false;
}
}
public static function getHostname()
{
return 'https://login.xecurify.com';
}
public static function updateDBValue($table_name, $column_name, $export_format)
{
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$fields = array(
$db->quoteName($column_name) . ' = ' . $db->quote($export_format),
);
$conditions = array(
$db->quoteName('id') . ' = 1'
);
$query->update($db->quoteName($table_name))->set($fields)->where($conditions);
$db->setQuery($query);
$db->execute();
}
public static function readUsersTableData()
{
$db = JFactory::getDbo();
$query = $db->getQuery(true);
$query->select('*');
$query->from($db->quoteName('#__users'));
$db->setQuery($query);
return $db->loadAssocList();
}
public static function loadGroups(){
$db = JFactory::getDbo();
$db->setQuery($db->getQuery(true)
->select('*')
->from("#__usergroups")
);
return $db->loadAssocList();
}
public static function loadUserGroups($user_id){
$db = JFactory::getDbo();
$db->setQuery($db->getQuery(true)
->select('group_id')
->from("#__user_usergroup_map")
->where($db->quoteName('user_id'). ' = ' . $db->quote($user_id))
);
return $db->loadAssocList();
}
public static function getGroupNameByID($group_id)
{
$db = JFactory::getDbo();
$db->setQuery($db->getQuery(true)
->select('title')
->from("#__usergroups")
->where($db->quoteName('id'). ' = ' . $db->quote($group_id))
);
$result = $db->loadAssoc();
return $result['title'];
}
}
?>

View File

@@ -0,0 +1 @@
<html><body bgcolor="#FFFFFF"></body></html>

View File

@@ -0,0 +1,34 @@
<?php
/**
* @package Joomla.Administrator
* @subpackage com_miniorange_importexportusers
*
* @copyright Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
require_once JPATH_COMPONENT . '/helpers/mo_customer_setup.php';
require_once JPATH_COMPONENT . '/helpers/mo_importexport_utility.php';
// Access check.
if (!JFactory::getUser()->authorise('core.manage', 'com_miniorange_importexportusers'))
{
throw new Exception(JText::_('JERROR_ALERTNOAUTHOR'));
}
// Include dependancies
jimport('joomla.application.component.controller');
JLoader::registerPrefix('miniorange_pagerestriction', JPATH_COMPONENT_ADMINISTRATOR);
// Get an instance of the controller prefixed by JoomlaImportExport
$controller = JControllerLegacy::getInstance('MiniorangeImportExportUsers');
// Perform the Request task
$controller->execute(JFactory::getApplication()->input->get('task'));
// Redirect if set by the controller
$controller->redirect();

View File

@@ -0,0 +1,67 @@
<?xml version="1.0" encoding="utf-8"?>
<extension type="component" version="3.0" method="upgrade">
<name>COM_MINIORANGE_IMPORTEXPORTUSERS</name>
<creationDate>May 2022</creationDate>
<author>miniOrange Security Software Pvt. Ltd.</author>
<authorEmail>info@xecurify.com</authorEmail>
<authorUrl>http://miniorange.com</authorUrl>
<copyright>Copyright Info</copyright>
<license>GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html</license>
<version>2.9</version>
<description></description>
<install> <!-- Runs on install -->
<sql>
<file driver="mysql" charset="utf8">sql/install.mysql.utf8.sql</file>
</sql>
</install>
<uninstall> <!-- Runs on uninstall -->
<sql>
<file driver="mysql" charset="utf8">sql/uninstall.mysql.utf8.sql</file>
</sql>
</uninstall>
<update>
<schemas>
<schemapath type="mysql">sql/updates/mysql</schemapath>
</schemas>
</update>
<administration>
<!-- Administration Menu Section -->
<menu link="option=com_miniorange_importexportusers&amp;view=accountsetup" view="accountsetup" alt="Joomla Import Export Users">COM_MINIORANGE_PAGE_PLUGIN_TITLE</menu>
<submenu>
<menu link="option=com_miniorange_importexportusers&amp;view=accountsetup&amp;tab-panel=overview">COM_MINIORANGE_OVERVIEW_USERS</menu>
<menu link="option=com_miniorange_importexportusers&amp;view=accountsetup&amp;tab-panel=exportsettings">COM_MINIORANGE_EXPORT_USERS</menu>
<menu link="option=com_miniorange_importexportusers&amp;view=accountsetup&amp;tab-panel=importsettings">COM_MINIORANGE_IMPORT_USERS</menu>
<menu link="option=com_miniorange_importexportusers&amp;view=accountsetup&amp;tab-panel=cronimport">COM_MINIORANGE_CRON_IMPORT</menu>
<menu link="option=com_miniorange_importexportusers&amp;view=accountsetup&amp;tab-panel=license_page">COM_MINIORANGE_IMPORT_UPGRADE</menu>
<menu link="option=com_miniorange_importexportusers&amp;view=accountsetup&amp;tab-panel=account">COM_MINIORANGE_PAGE_ACCOUNT_SETUP</menu>
</submenu>
<files folder="admin">
<!-- Admin Main File Copy Section -->
<filename>index.html</filename>
<filename>miniorange_importexportusers.php</filename>
<filename>controller.php</filename>
<!-- helper files section -->
<folder>assets</folder>
<!-- helper files section -->
<folder>helpers</folder>
<!-- SQL files section -->
<folder>sql</folder>
<!-- models files section -->
<folder>models</folder>
<!-- views files section -->
<folder>views</folder>
<!-- controllers files section -->
<folder>controllers</folder>
</files>
<languages folder="admin/language">
<language tag="en-GB">en-GB/en-GB.com_miniorange_importexportusers.ini</language>
<language tag="en-GB">en-GB/en-GB.com_miniorange_importexportusers.sys.ini</language>
</languages>
</administration>
<updateservers>
<server type="extension" priority="1" name="ImportExportUsers">http://miniorange.com/joomla_importexportusers_update.xml</server>
</updateservers>
</extension>

View File

@@ -0,0 +1,52 @@
<?php
/**
* @package Joomla.Administrator
* @subpackage com_miniorange_importexportusers
*
* @copyright Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
/**
* AccountSetup Model
*
* @since 0.0.1
*/
class miniorangeimportexportusersModelAccountSetup extends JModelAdmin
{
/**
* Method to get the record form.
*
* @param array $data Data for the form.
* @param boolean $loadData True if the form is to load its own data (default case), false if not.
*
* @return mixed A JForm object on success, false on failure
*
* @since 1.6
*/
public function getForm($data = array(), $loadData = true)
{
// Get the form.
$form = $this->loadForm(
'com_miniorange_importexportusers.accountsetup',
'accountsetup',
array(
'control' => 'jform',
'load_data' => $loadData
)
);
if (empty($form))
{
return false;
}
return $form;
}
}

View File

@@ -0,0 +1 @@
<html><body bgcolor="#FFFFFF"></body></html>

View File

@@ -0,0 +1 @@
<html><body bgcolor="#FFFFFF"></body></html>

View File

@@ -0,0 +1,29 @@
CREATE TABLE IF NOT EXISTS `#__miniorange_importexport_customer_details` (
`id` int(11) UNSIGNED NOT NULL,
`email` VARCHAR(255) NOT NULL,
`password` VARCHAR(255) NOT NULL,
`admin_phone` VARCHAR(255) NOT NULL,
`customer_key` VARCHAR(255) NOT NULL,
`customer_token` VARCHAR(255) NOT NULL,
`api_key` VARCHAR(255) NOT NULL,
`status` VARCHAR(255) NOT NULL,
`login_status` tinyint(1) DEFAULT 0,
`importexport_keys` VARCHAR(255) NOT NULL,
`registration_status` VARCHAR(255) NOT NULL,
`transaction_id` VARCHAR(255) NOT NULL,
`email_count` int(11),
`sms_count` int(11),
PRIMARY KEY (`id`)
) DEFAULT COLLATE=utf8_general_ci;
CREATE TABLE IF NOT EXISTS `#__miniorange_exportusers` (
`id` int(11) UNSIGNED NOT NULL,
`enable_export_users` tinyint(1) DEFAULT 0,
PRIMARY KEY (`id`)
) DEFAULT COLLATE=utf8_general_ci;
INSERT IGNORE INTO `#__miniorange_importexport_customer_details`(`id`,`login_status`) values (1,0);
INSERT IGNORE INTO `#__miniorange_exportusers`(`id`) values (1) ;

View File

@@ -0,0 +1,4 @@
DROP TABLE IF EXISTS `#__miniorange_importexport_customer_details`;
DROP TABLE IF EXISTS `#__miniorange_exportusers`;

View File

@@ -0,0 +1 @@
# Placeholder file for database changes for version 1.0

View File

@@ -0,0 +1 @@
<html><body bgcolor="#FFFFFF"></body></html>

View File

@@ -0,0 +1 @@
<html><body bgcolor="#FFFFFF"></body></html>

View File

@@ -0,0 +1,52 @@
<?php
/**
* @package Joomla.Administrator
* @subpackage com_miniorange_importexportusers
*
* @copyright Copyright (C) 2005 - 2015 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
/**
* Account Setup View
*
* @since 0.0.1
*/
class miniorangeimportexportusersViewAccountSetup extends JViewLegacy
{
function display($tpl = null)
{
// Get data from the model
$this->lists = $this->get('List');
//$this->pagination = $this->get('Pagination');
// Check for errors.
if (count($errors = $this->get('Errors'))) {
JFactory::getApplication()->enqueueMessage(500, implode('<br />', $errors));
return false;
}
$this->setLayout('accountsetup');
// Set the toolbar
$this->addToolBar();
// Display the template
parent::display($tpl);
}
/**
* Add the page title and toolbar.
*
* @return void
*
* @since 1.6
*/
protected function addToolBar()
{
JToolBarHelper::title(JText::_('COM_MINIORANGE_PAGE_PLUGIN_TITLE'), 'mo_page_logo mo_page_icon');
}
}

View File

@@ -0,0 +1 @@
<html><body bgcolor="#FFFFFF"></body></html>