* @author Open Source Excellence (R) {@link http://www.opensource-excellence.com} * @author Created on 15-Nov-2010 * @license GNU/GPL http://www.gnu.org/copyleft/gpl.html * * * 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/>. * @Copyright Copyright (C) 2010- Open Source Excellence (R) */ defined('_JEXEC') or die("Direct Access Not Allowed"); class oseMscViewMembers extends oseMscView { function display($tpl = null) { $tmpl = JRequest::getVar('tmpl'); if (empty($tmpl)) {
function display($tpl = null) { $tpl = null; $config = oseMscConfig::getConfig('global', 'obj'); $com = OSECPU_PATH_JS . '/com_ose_cpu/extjs'; oseHTML::initScript(); oseHTML::script($com . '/ose/app.msg.js', '1.5'); oseHTML::script($com . '/grid/expander.js', '1.5'); oseHTML::script(OSEMSC_F_URL . '/libraries/init.js', '1.5'); oseHTML::stylesheet(OSEMSC_F_URL . '/assets/css/' . $config->frontend_style . '.css', (JOOMLA16) ? '1.6' : '1.5'); $mainframe = JFactory::getApplication('SITE'); $session = JFactory::getSession(); $user = JFactory::getUser(); if ($user->guest) { $ItemID = JRequest::getInt("Itemid"); $return = base64_encode(str_replace("&", "&", JRoute::_("index.php?option=com_osemsc&view=addons&Itemid=" . $ItemID))); if (JOOMLA16 == true) { $red = str_replace("&", "&", JRoute::_("index.php?option=com_users&view=login&return=" . $return)); } else { $red = str_replace("&", "&", JRoute::_("index.php?option=com_user&view=login&return=" . $return)); } $mainframe->redirect($red, "Please login first."); } $menu = &JSite::getMenu(); $item = $menu->getActive(); $addon_type = ''; if (!empty($item)) { $params = &$menu->getParams($item->id); $addon_type = $params->get('addon_type'); } $model = $this->getModel('addons'); $items = array(); switch ($addon_type) { case 'phoca': $items = $model->getAddonCats($addon_type); $link = 'index.php?option=com_phocadownload&view=category&id='; break; case 'roku': $items = $model->getAddonInfo($addon_type); $link = ''; break; } $params = &$mainframe->getParams(); $page_title = $params->get('page_title'); $document = &JFactory::getDocument(); $document->setTitle($params->get('page_title')); $this->assignRef('page_title', $page_title); $this->assignRef('addon_type', $addon_type); $this->assignRef('items', $items); $this->assignRef('link', $link); $this->prepareDocument(); parent::display($tpl); }
function display($tpl = null) { $config = oseRegistry::call('msc')->getConfig('global', 'obj'); $frontend_style = $config->frontend_style; $config = oseRegistry::call('msc')->getConfig('register', 'obj'); if ($this->isMobile) { // Any mobile device. $this->setLayout('mobile'); JRequest::setvar('tmpl', 'component'); } else { $com = OSECPU_PATH_JS . '/com_ose_cpu/extjs'; oseHTML::initScript(); oseHTML::script($com . '/ose/app.msg.js', '1.5'); oseHTML::script(OSEMSC_F_URL . '/libraries/init.js', '1.5'); oseHTML::stylesheet(OSEMSC_F_URL . '/assets/css/' . $frontend_style . '.css', (JOOMLA16) ? '1.6' : '1.5'); } $this->assignRef('enable_fblogin', $config->enable_fblogin); $this->assignRef('facebookapiid', $config->facebookapiid); $this->prepareDocument(); parent::display($tpl); }
function display($tpl = null) { $tpl = null; $this->set('_layout', 'default'); oseHTML::initCss(); $com = OSECPU_PATH_JS . '/com_ose_cpu/extjs'; oseHTML::initScript(); oseHTML::script($com . '/ose/app.msg.js', '1.5'); oseHTML::script($com . '/grid/expander.js', '1.5'); oseHTML::script(OSEMSC_F_URL . '/libraries/init.js', '1.5'); $config = oseMscConfig::getConfig('global', 'obj'); oseHTML::stylesheet(OSEMSC_F_URL . '/assets/css/' . $config->frontend_style . '.css', (JOOMLA16) ? '1.6' : '1.5'); $user = JFactory::getUser(); $app = JFactory::getApplication('SITE'); $session = JFactory::getSession(); $db = oseDB::instance(); $order_id = JRequest::getInt('order_id'); $payment = oseRegistry::call('payment'); $where = array(); $where[] = "`order_id` = " . $db->quote($order_id); $order = $payment->getOrder($where, 'obj'); $orderInfoParams = oseJson::decode($order->params); $redirectUrl = urldecode($orderInfoParams->returnUrl); $config = oseMscConfig::getConfig('thirdparty', 'obj'); $account = oseObject::getValue($config, 'gag_account'); $standard_type = oseObject::getValue($config, 'gag_domain_mode'); $domain = oseObject::getValue($config, 'gag_domain'); $htmlTrack = oseMscPublic::htmlTrack($account, $standard_type, $domain, $order_id); $code = oseMscPublic::ajaxOrderTrack($account, $order_id); if (empty($code)) { $code = false; } else { $code = implode("", $code); } $document = JFactory::getDocument(); $document->addScriptDeclaration('var redirectUrl = "' . $redirectUrl . '";'); $document->addScriptDeclaration($htmlTrack); $document->addScriptDeclaration($code); $this->assignRef('orderInfo', $order); $this->prepareDocument(); parent::display($tpl); }
function display($tpl = null) { $user = oseMscPublic::getUser(); $mainframe = JFactory::getApplication(); $params = clone ($mainframe->getParams('com_osemsc')); $msc_id = $params->get('msc'); $status = $params->get('status', 'all'); if (empty($msc_id)) { $mainframe->redirect('index.php', 'Please choose a membership to show'); } oseHTML::stylesheet(OSEMSC_F_URL . '/assets/css/msc5backend.css', '1.5'); $com = OSECPU_PATH_JS . '/com_ose_cpu/extjs'; oseHTML::script($com . '/grid/SearchField.js'); $document = JFactory::getDocument(); $document->addScriptDeclaration('var osememlist_msc_id = ' . $msc_id . '; var osememlist_status = \'' . $status . '\';'); $this->prepareDocument(); if (!empty($tpl)) { parent::display($tpl); } else { parent::display(); } }
function display($tpl = null) { $tpl = null; $this->set('_layout', 'default'); oseHTML::initCss(); $com = OSECPU_PATH_JS . '/com_ose_cpu/extjs'; oseHTML::initScript(); oseHTML::script($com . '/ose/app.msg.js', '1.5'); oseHTML::script($com . '/grid/expander.js', '1.5'); oseHTML::script(OSEMSC_F_URL . '/libraries/init.js', '1.5'); $config = oseMscConfig::getConfig('global', 'obj'); oseHTML::stylesheet(OSEMSC_F_URL . '/assets/css/' . $config->frontend_style . '.css', (JOOMLA16) ? '1.6' : '1.5'); $user = JFactory::getUser(); $app = JFactory::getApplication('SITE'); $session = JFactory::getSession(); $db = oseDB::instance(); $token = (isset($_REQUEST['token'])) ? urlencode($_REQUEST['token']) : ""; $payment = oseRegistry::call('payment'); $payment_mode = JRequest::getVar('mode'); $orderID = JRequest::getInt('orderID'); if (empty($orderID) || !is_numeric($orderID)) { echo "Order data is interrupted, payment process is terminated."; } if ($payment_mode == 'm') { $orderInfo = $payment->PaypalAPIPay($orderID, $token); } else { $orderInfo = $payment->PaypalAPICreateProfile($orderID, $token); } $where = array(); $where[] = "`order_id` = " . $db->quote($orderID); $order = $payment->getOrder($where, 'obj'); $orderInfoParams = oseJson::decode($order->params); $redirectUrl = urldecode($orderInfoParams->returnUrl); $document = JFactory::getDocument(); $document->addScriptDeclaration('var redirectUrl = "' . $redirectUrl . '";'); $this->assignRef('orderInfo', $orderInfo); $this->prepareDocument(); parent::display($tpl); }
function display($tpl = null) { $model = $this->getModel('memberships'); $items = $model->getMemberships(); $session = JFactory::getSession(); $osePaymentCurrency = $session->get('osePaymentCurrency', oseRegistry::call('msc')->getConfig('currency', 'obj')->primary_currency); $cards = array(); $com = OSECPU_PATH_JS . '/com_ose_cpu/extjs'; oseHTML::initScript(); oseHTML::script($com . '/ose/app.msg.js', '1.5'); oseHTML::script(OSEMSC_F_URL . '/libraries/init.js', '1.5'); $register_form = oseRegistry::call('msc')->getConfig('register', 'obj')->register_form; $layout = JRequest::getCmd("layout"); if (empty($register_form) || $register_form == 'default') { $layout = (!empty($layout) && ($layout == 'detail' || $layout == 'cartdetail')) ? "cartdetail" : 'cart'; $this->setLayout($layout); $type = 'cart'; } else { $layout = (!empty($layout) && ($layout == 'detail')) ? $layout : 'default'; $this->setLayout($layout); $user = JFactory::getUser(); $tpl = null; $type = 'os'; } if ($layout == 'default' || $layout == 'cart') { $cards = $model->drawMscList($osePaymentCurrency, $items, $type); } else { foreach ($items as $item) { $msc_id = JRequest::getInt('msc_id', oseObject::getValue($item, 'id')); $cards = $model->getMembershipCard($msc_id); break; } } $config = oseMscConfig::getConfig('global', 'obj'); oseHTML::stylesheet(OSEMSC_F_URL . '/assets/css/' . $config->frontend_style . '.css', (JOOMLA16) ? '1.6' : '1.5'); $this->assignRef('cards', $cards); $this->prepareDocument(); parent::display($tpl); }
public function loadMultiSelect() { $com = OSECPU_PATH_JS . '/com_ose_cpu/extjs'; oseHTML::script($com . '/multiselect/MultiSelect.js'); oseHTML::stylesheet($com . '/multiselect/MultiSelect.css'); }
function display($tpl = null) { oseHTML::stylesheet(OSEMSC_B_URL . '/assets/css/msc5.css', '1.5'); oseHTML::initCss(); parent::display($tpl); }
public function loadFileUpload() { $com = OSECPU_PATH_JS . '/com_ose_cpu/extjs'; oseHTML::stylesheet($com . '/fileupload/field.css'); oseHTML::script($com . "/fileupload/field.js"); }
function displayMember($addon_type = 'member') { $db = oseDB::instance(); $com = OSECPU_PATH_JS . '/com_ose_cpu/extjs'; oseHTML::script($com . "/fileupload/field.js", '1.5'); oseHTML::stylesheet($com . '/fileupload/field.css', '1.5'); $result = array(); $result['layout'] = 'member'; $user = JFactory::getUser(); $member = oseRegistry::call('member'); $member->instance($user->id); if ($addon_type == 'member') { $where = array(); $where[] = "type LIKE 'member_%'"; $where[] = '`frontend` = 1'; $where[] = '`frontend_enabled` = 1'; $where[] = '`action` = 1 '; $where = oseDB::implodeWhere($where); $query = " SELECT * FROM `#__osemsc_addon`" . $where . " ORDER BY ordering ASC "; $db->setQuery($query); $objs = oseDB::loadList('obj', 'name'); } else { $objs = oseMscAddon::getAddonList($addon_type, false, null, 'obj', 'name'); } //$objs = oseMscAddon::getAddonList($addon_type,false,null,'obj','name'); $memInfos = $member->getAllOwnedMsc(false, 1, 'obj'); if (count($memInfos) > 0) { $memberships = $member->getMemberOwnedMscInfo(false, 1, 'obj'); $payment = oseRegistry::call('payment'); $order_ids = array(); foreach ($memberships as $membership) { $memParams = oseJson::decode($membership->params); if ($memParams->payment_mode == 'a') { $orderInfo = $payment->getOrder(array("`order_id`=" . $db->Quote($memParams->order_id) . "")); if (oseObject::GetValue($orderInfo, 'order_status') == 'confirmed') { $order_ids[$memParams->order_id] = $db->Quote($memParams->order_id); } } } if (count($order_ids) < 1) { unset($objs['msc_cancel']); unset($objs['creditcardupdate']); } $memAllInfos = $member->getAllOwnedMsc(true, 0, 'obj'); $renew = false; foreach ($memAllInfos as $memAllInfo) { $memParams = oseJson::decode($memAllInfo->params); if ($memParams->payment_mode == 'a') { if ($memAllInfo->status == 0) { $renew = true; } } else { $renew = true; } } if (!$renew) { unset($objs['msc_renew']); } //oseExit($objs['direcotry']); if (isset($objs['directory'])) { oseHTML::script(oseMscConfig::generateGmapScript(), '1.5'); oseHTML::script($com . "/gmap/panel.js", '1.5'); } $result['addons'] = $objs; $result['tpl'] = 'master'; } else { $query = " SELECT * FROM `#__osemsc_member` AS mem" . " WHERE mem.member_id = {$user->id}" . " LIMIT 1"; $db->setQuery($query); $item = oseDB::loadItem(); if (empty($item)) { $result['layout'] = 'default'; if ($addon_type == 'member_user') { $result['addons'] = array('juser' => $objs['juser']); } else { $result['addons'] = array(); } $result['tpl'] = ''; } else { unset($objs['msc']); unset($objs['directory']); unset($objs['company']); unset($objs['licuser']); unset($objs['msc_cancel']); unset($objs['creditcardupdate']); $result['addons'] = $objs; $result['tpl'] = 'expired'; //if($addon_type == 'member_user') oseExit($result); } } return $result; }