public function transmitRequestXML($xml, $request) { require_once dirname(__FILE__) . '/lib/cls.wallie.php'; $response = array(); $response['valid'] = false; $report_url = AECToolbox::deadsureURL("index.php?option=com_acctexp&task=mollie_wallienotification"); $return_url = $request->int_var['return_url']; $amount = $request->int_var['amount'] * 100; $mollieWallie = new Mollie_Wallie($this->settings['partner_id']); if ($mollieWallie->createPayment($amount, $report_url, $return_url)) { // ...Request valid transaction id from Mollie and store it... $request->invoice->secondary_ident = $mollieWallie->getTransactionId(); $request->invoice->storeload(); // Redirect to Wallie platform aecRedirect($mollieWallie->getWallieUrl()); } else { // error handling $this->___logError("Mollie_Wallie::createPayment failed", $mollieWallie->getErrorCode(), $mollieWallie->getErrorMessage()); return $response; } return null; }
<?php /** * @version $Id: expired/html.php * @package AEC - Account Control Expiration - Membership Manager * @subpackage Main Frontend * @copyright 2012 Copyright (C) David Deutsch * @author David Deutsch <*****@*****.**> & Team AEC - http://www.valanx.org * @license GNU/GPL v.3 http://www.gnu.org/licenses/gpl.html or, at your option, any later version */ // Dont allow direct linking defined('_JEXEC') or die('Direct Access to this location is not allowed.'); if (empty($metaUser->userid)) { aecRedirect(AECToolbox::deadsureURL('index.php')); } $trial = false; $expired = false; $invoice = false; if ($metaUser->hasSubscription) { // Make sure this really is expired if (!$metaUser->objSubscription->isExpired()) { return getView('access_denied'); } $expired = strtotime($metaUser->objSubscription->expiration); $trial = strcmp($metaUser->objSubscription->status, 'Trial') === 0; if (!$trial) { $params = $metaUser->objSubscription->params; if (isset($params['trialflag'])) { $trial = 1; } }
function export($type, $cmd = null) { $db = JFactory::getDBO(); $cmd_save = strcmp('save', $cmd) === 0; $cmd_apply = strcmp('apply', $cmd) === 0; $cmd_load = strcmp('load', $cmd) === 0; $cmd_export = strcmp('export', $cmd) === 0; $use_original = 0; $system_values = array(); $filter_values = array(); $options_values = array(); $params_values = array(); if ($type == 'sales') { $getpost = array('system' => array('selected_export', 'delete', 'save', 'save_name'), 'filter' => array('date_start', 'date_end', 'method', 'planid', 'groupid', 'status', 'orderby'), 'options' => array('collate', 'breakdown', 'breakdown_custom'), 'params' => array('export_method')); $pf = 8; } else { $getpost = array('system' => array('selected_export', 'delete', 'save', 'save_name'), 'filter' => array('planid', 'groupid', 'status', 'orderby'), 'options' => array('rewrite_rule'), 'params' => array('export_method')); $pf = 5; } $postfields = 0; foreach ($getpost as $name => $array) { $field = $name . '_values'; foreach ($array as $vname) { $vvalue = aecGetParam($vname, ''); if (!empty($vvalue)) { ${$field}[$vname] = $vvalue; $postfields++; } } } if (!empty($params_values['export_method'])) { $is_test = $params_values['export_method'] == 'test'; } else { $is_test = false; } $lists = array(); $pname = ""; if (!empty($system_values['selected_export']) || $cmd_save || $cmd_apply || $is_test) { $row = new aecExport($type == 'sales'); if (isset($system_values['selected_export'])) { $row->load($system_values['selected_export']); $pname = $row->name; } else { $row->load(0); } if (!empty($system_values['delete'])) { // User wants to delete the entry $row->delete(); } elseif (($cmd_save || $cmd_apply) && (!empty($system_values['selected_export']) || !empty($system_values['save_name']))) { // User wants to save an entry if (!empty($system_values['save'])) { // But as a copy of another entry $row->load(0); } $row->saveComplex($system_values['save_name'], $filter_values, $options_values, $params_values); if (!empty($system_values['save'])) { $system_values['selected_export'] = $row->getMax(); } } elseif (($cmd_save || $cmd_apply) && (empty($system_values['selected_export']) && !empty($system_values['save_name']) && $system_values['save']) && !$is_test) { // User wants to save a new entry $row->saveComplex($system_values['save_name'], $filter_values, $options_values, $params_values); } elseif ($cmd_load || count($postfields) && $postfields <= $pf && ($cmd_export || $is_test)) { if ($row->id) { // User wants to load an entry $filter_values = $row->filter; $options_values = $row->options; $params_values = $row->params; $pname = $row->name; $use_original = 1; } } } // Always store the last ten calls, but only if something is happening if ($cmd_save || $cmd_apply || $cmd_export) { $autorow = new aecExport($type == 'sales'); $autorow->load(0); $autorow->saveComplex('Autosave', $filter_values, $options_values, $params_values, true); if (isset($row)) { if ($autorow->filter == $row->filter && $autorow->options == $row->options && $autorow->params == $row->params) { $use_original = 1; } } } $filters = array('planid', 'groupid', 'status'); foreach ($filters as $filter) { if (!isset($filter_values[$filter])) { $filter_values[$filter] = array(); continue; } if (!is_array($filter_values[$filter])) { if (!empty($filter_values[$filter])) { $filter_values[$filter] = array($filter_values[$filter]); } else { $filter_values[$filter] = array(); } } } if ($is_test) { $row->params['export_method'] = 'test'; } // Create Parameters $params[] = array('userinfobox', 5); if ($type == 'members') { $params[] = array('section_paper', 'Compose Export'); $params['params_remap'] = array('subarea_change', 'params'); $params[] = array('div', '<div class="alert alert-info">'); $params[] = array('p', '<p>Take users that fit these criteria:</p>'); $params['groupid'] = array('list', ''); $params['planid'] = array('list', ''); $params['status'] = array('list', ''); $params[] = array('div_end', ''); $params[] = array('div', '<div class="alert alert-warning">'); $params[] = array('p', '<p>Order them like this:</p>'); $params['orderby'] = array('list', ''); $params[] = array('div_end', ''); $params[] = array('div', '<div class="alert alert-success">'); $params[] = array('p', '<p>And use these details for each line of the export:</p>'); $params['rewrite_rule'] = array('inputD', '[[user_id]];[[user_username]];[[subscription_expiration_date]]'); $params[] = array('div_end', ''); $params[] = array('section_end', ''); } else { $monthago = (int) gmdate('U') - 60 * 60 * 24 * 31; $params[] = array('section_paper', 'Compose Export'); $params['params_remap'] = array('subarea_change', 'params'); $params[] = array('div', '<div class="alert alert-info">'); $params[] = array('p', '<p>Collect Sales Data from this range:</p>'); $params['date_start'] = array('list_date', date('Y-m-d', $monthago)); $params['date_end'] = array('list_date', date('Y-m-d')); $params['method'] = array('list', ''); $params['planid'] = array('list', ''); $params['groupid'] = array('list', ''); $params[] = array('div_end', ''); $params[] = array('div', '<div class="alert alert-warning">'); $params[] = array('p', '<p>Collate it like this:</p>'); $params['collate'] = array('list', 'day'); $params[] = array('div_end', ''); $params[] = array('div', '<div class="alert alert-success">'); $params[] = array('p', '<p>Break down the data in each line like so:</p>'); $params['breakdown'] = array('list', 'month'); $params['breakdown_custom'] = array('inputD', ''); $params[] = array('div_end', ''); $params[] = array('section_end', ''); } if ($type == 'members') { $params[] = array('userinfobox', 5); $params[] = array('section_paper'); $rewriteswitches = array('cms', 'user', 'subscription', 'plan', 'invoice'); $params = AECToolbox::rewriteEngineInfo($rewriteswitches, $params); $params[] = array('section_end', ''); $params[] = array('2div_end', ''); } $params[] = array('2div_end', ''); $params[] = array('userinfobox', 5); $params[] = array('section_paper', 'Save or Load Export Presets'); $params[] = array('div', '<div class="form-wide">'); $params['selected_export'] = array('list', ''); $params['delete'] = array('checkbox'); $params['save'] = array('checkbox'); $params['save_name'] = array('inputC', $pname); $params[] = array('div_end', ''); $params[] = array('div', '<div class="right-btns">'); $params[] = array('p', '<a class="btn btn-primary" onclick="javascript: submitbutton(\'loadExport' . $type . '\')" href="#">' . aecHTML::Icon('upload') . ' Load Preset</a>'); $params[] = array('p', '<a class="btn btn-success" onclick="javascript: submitbutton(\'applyExport' . $type . '\')" href="#">' . aecHTML::Icon('download') . ' Save Preset</a>'); $params[] = array('p', '<a class="btn danger" onclick="javascript: submitbutton(\'saveExport' . $type . '\')" href="#">' . aecHTML::Icon('download-alt') . ' Save Preset & Exit</a>'); $params[] = array('div_end', ''); $params[] = array('section_end', ''); $params[] = array('2div_end', ''); $params[] = array('userinfobox', 5); $params[] = array('section_paper', 'Export'); $params['export_method'] = array('list', ''); $params[] = array('p', '<div class="right-btns"><div class="btn-group">'); $params[] = array('p', '<a class="btn btn-info" id="testexport" href="#export-result">' . aecHTML::Icon('eye-open') . ' Test Export</a>'); $params[] = array('p', '<a class="btn btn-success" onclick="javascript: submitbutton(\'exportExport' . $type . '\')" href="#">' . aecHTML::Icon('file') . ' Export Now</a>'); $params[] = array('2div_end', ''); $params[] = array('section_end', ''); $params[] = array('2div_end', ''); $params[] = array('userinfobox', 5); $params[] = array('div', '<div class="aec-settings-container" id="export-result">'); $params[] = array('h4', '<h4>Preview</h4>'); $params[] = array('2div_end', ''); // Create a list of export options // First, only the non-autosaved entries $query = 'SELECT `id`, `name`, `created_date`, `lastused_date`' . ' FROM #__acctexp_export' . ($type == 'sales' ? '_sales' : '') . ' WHERE `system` = \''; $db->setQuery($query . '0\''); $user_exports = $db->loadObjectList(); // Then the autosaved entries $db->setQuery($query . '1\''); $system_exports = $db->loadObjectList(); $entries = count($user_exports) + count($system_exports); $m = 0; if ($entries > 0) { $listitems = array(); $listitems[] = JHTML::_('select.option', 0, " --- Your Exports --- "); $user = false; for ($i = 0; $i < $entries; $i++) { if ($i >= count($user_exports) && $user === false) { $user = $i; $listitems[] = JHTML::_('select.option', 0, " --- Autosaves --- "); } if ($user === false) { if (!empty($user_exports[$i]->name)) { $used_date = $user_exports[$i]->lastused_date == '0000-00-00 00:00:00' ? 'never' : $user_exports[$i]->lastused_date; $listitems[] = JHTML::_('select.option', $user_exports[$i]->id, substr($user_exports[$i]->name, 0, 64) . ' - ' . 'last used: ' . $used_date . ', created: ' . $user_exports[$i]->created_date); } else { $m--; } } else { $ix = $i - $user; $used_date = $system_exports[$ix]->lastused_date == '0000-00-00 00:00:00' ? 'never' : $system_exports[$ix]->lastused_date; $listitems[] = JHTML::_('select.option', $system_exports[$ix]->id, substr($system_exports[$ix]->name, 0, 64) . ' - ' . 'last used: ' . $used_date . ', created: ' . $system_exports[$ix]->created_date); } } } else { $listitems[] = JHTML::_('select.option', 0, " --- No saved Preset available --- "); $listitems[] = JHTML::_('select.option', 0, " --- Your Exports --- ", 'value', 'text', true); $listitems[] = JHTML::_('select.option', 0, " --- Autosaves --- ", 'value', 'text', true); } $lists['selected_export'] = JHTML::_('select.genericlist', $listitems, 'selected_export', 'size="' . max(10, min(20, $entries + $m + 2)) . '" class="col-sm-7"', 'value', 'text', arrayValueDefault($system_values, 'selected_export', '')); // Get list of plans for filter $query = 'SELECT `id`, `name`' . ' FROM #__acctexp_plans' . ' ORDER BY `ordering`'; $db->setQuery($query); $db_plans = $db->loadObjectList(); $lists['planid'] = '<select id="plan-filter-select" class="col-sm-3" name="planid[]" multiple="multiple" size="5">'; foreach ($db_plans as $plan) { $lists['planid'] .= '<option value="' . $plan->id . '"' . (in_array($plan->id, $filter_values['planid']) ? ' selected="selected"' : '') . '>' . $plan->name . '</option>'; } $lists['planid'] .= '</select>'; $grouplist = ItemGroupHandler::getTree(); $lists['groupid'] = '<select id="group-filter-select" class="col-sm-3" name="groupid[]" multiple="multiple" size="5">'; foreach ($grouplist as $glisti) { if (defined('JPATH_MANIFESTS')) { $lists['groupid'] .= '<option value="' . $glisti[0] . '"' . (in_array($glisti[0], $filter_values['groupid']) ? ' selected="selected"' : '') . '>' . str_replace(' ', ' ', $glisti[1]) . '</option>'; } else { $lists['groupid'] .= '<option value="' . $glisti[0] . '"' . (in_array($glisti[0], $filter_values['groupid']) ? ' selected="selected"' : '') . '>' . $glisti[1] . '</option>'; } } $lists['groupid'] .= '</select>'; if ($type == 'members') { $status = array('excluded' => JText::_('AEC_SEL_EXCLUDED'), 'pending' => JText::_('AEC_SEL_PENDING'), 'active' => JText::_('AEC_SEL_ACTIVE'), 'expired' => JText::_('AEC_SEL_EXPIRED'), 'closed' => JText::_('AEC_SEL_CLOSED'), 'cancelled' => JText::_('AEC_SEL_CANCELLED'), 'hold' => JText::_('AEC_SEL_HOLD'), 'notconfig' => JText::_('AEC_SEL_NOT_CONFIGURED')); $lists['status'] = '<select id="status-group-select" name="status[]" multiple="multiple" size="5">'; foreach ($status as $id => $txt) { $lists['status'] .= '<option value="' . $id . '"' . (in_array($id, $filter_values['status']) ? ' selected="selected"' : '') . '>' . $txt . '</option>'; } $lists['status'] .= '</select>'; // Ordering $sel = array(); $sel[] = JHTML::_('select.option', 'expiration ASC', JText::_('EXP_ASC')); $sel[] = JHTML::_('select.option', 'expiration DESC', JText::_('EXP_DESC')); $sel[] = JHTML::_('select.option', 'name ASC', JText::_('NAME_ASC')); $sel[] = JHTML::_('select.option', 'name DESC', JText::_('NAME_DESC')); $sel[] = JHTML::_('select.option', 'username ASC', JText::_('LOGIN_ASC')); $sel[] = JHTML::_('select.option', 'username DESC', JText::_('LOGIN_DESC')); $sel[] = JHTML::_('select.option', 'signup_date ASC', JText::_('SIGNUP_ASC')); $sel[] = JHTML::_('select.option', 'signup_date DESC', JText::_('SIGNUP_DESC')); $sel[] = JHTML::_('select.option', 'lastpay_date ASC', JText::_('LASTPAY_ASC')); $sel[] = JHTML::_('select.option', 'lastpay_date DESC', JText::_('LASTPAY_DESC')); $sel[] = JHTML::_('select.option', 'plan_name ASC', JText::_('PLAN_ASC')); $sel[] = JHTML::_('select.option', 'plan_name DESC', JText::_('PLAN_DESC')); $sel[] = JHTML::_('select.option', 'status ASC', JText::_('STATUS_ASC')); $sel[] = JHTML::_('select.option', 'status DESC', JText::_('STATUS_DESC')); $sel[] = JHTML::_('select.option', 'type ASC', JText::_('TYPE_ASC')); $sel[] = JHTML::_('select.option', 'type DESC', JText::_('TYPE_DESC')); $lists['orderby'] = JHTML::_('select.genericlist', $sel, 'orderby', 'class="inputbox" size="1"', 'value', 'text', arrayValueDefault($filter_values, 'orderby', '')); } else { $collate_selection = array(); $collate_selection[] = JHTML::_('select.option', 'day', JText::_('Day')); $collate_selection[] = JHTML::_('select.option', 'week', JText::_('Week')); $collate_selection[] = JHTML::_('select.option', 'month', JText::_('Month')); $collate_selection[] = JHTML::_('select.option', 'year', JText::_('Year')); $selected_collate = 0; if (!empty($options_values['collate'])) { $selected_collate = $options_values['collate']; } else { $selected_collate = 'day'; } $lists['collate'] = JHTML::_('select.genericlist', $collate_selection, 'collate', 'size="1"', 'value', 'text', $selected_collate); $breakdown_selection = array(); $breakdown_selection[] = JHTML::_('select.option', '0', JText::_('None')); $breakdown_selection[] = JHTML::_('select.option', 'plan', JText::_('Plan')); $breakdown_selection[] = JHTML::_('select.option', 'group', JText::_('Group')); $selected_breakdown = 0; if (!empty($options_values['breakdown'])) { $selected_breakdown = $options_values['breakdown']; } $lists['breakdown'] = JHTML::_('select.genericlist', $breakdown_selection, 'breakdown', 'size="1"', 'value', 'text', $selected_breakdown); $processors = PaymentProcessorHandler::getInstalledObjectList(); $proc_list = array(); $selected_proc = array(); foreach ($processors as $proc) { $pp = new PaymentProcessor(); $pp->loadName($proc->name); $pp->getInfo(); $proc_list[] = JHTML::_('select.option', $pp->id, $pp->info['longname']); if (!empty($filter_values['method'])) { foreach ($filter_values['method'] as $id) { if ($id == $pp->id) { $selected_proc[] = JHTML::_('select.option', $id, $pp->info['longname']); } } } } $lists['method'] = JHTML::_('select.genericlist', $proc_list, 'method[]', 'size="8" multiple="multiple"', 'value', 'text', $selected_proc); } // Export Method $list = xJUtility::getFileArray(JPATH_SITE . '/components/com_acctexp/lib/export', 'php', false, true); $sel = array(); foreach ($list as $ltype) { $ltype = str_replace('.php', '', $ltype); if ($ltype != 'test') { $sel[] = JHTML::_('select.option', $ltype, $ltype); } } if (empty($params_values['export_method'])) { $params_values['export_method'] = 'csv'; } $lists['export_method'] = JHTML::_('select.genericlist', $sel, 'export_method', 'class="inputbox" size="1"', 'value', 'text', $params_values['export_method']); $settings = new aecSettings('export', 'general'); // Repackage the objects as array foreach ($getpost as $name => $array) { $field = $name . '_values'; foreach ($array as $vname) { if (!empty(${$field}->{$name})) { $settingsparams[$name] = ${$field}->{$name}; } else { $settingsparams[$name] = ""; } } } if (empty($params_values['rewrite_rule'])) { //$params_values['rewrite_rule'] = '[[user_id]];[[user_username]];[[subscription_expiration_date]]'; } $settingsparams = array_merge($filter_values, $options_values, $params_values); $settings->fullSettingsArray($params, $settingsparams, $lists); // Call HTML Class $aecHTML = new aecHTML($settings->settings, $settings->lists); if ($cmd_export && !empty($params_values['export_method'])) { if ($use_original) { $row->useExport(); } else { $autorow->useExport(); } } if ($cmd_save) { aecRedirect('index.php?option=com_acctexp&task=showCentral'); } else { HTML_AcctExp::export($type, $aecHTML); } }
* @version $Id: subscriptiondetails/html.php * @package AEC - Account Control Expiration - Membership Manager * @subpackage Main Frontend * @copyright 2012 Copyright (C) David Deutsch * @author David Deutsch <*****@*****.**> & Team AEC - http://www.valanx.org * @license GNU/GPL v.3 http://www.gnu.org/licenses/gpl.html or, at your option, any later version */ // Dont allow direct linking defined('_JEXEC') or die('Direct Access to this location is not allowed.'); if (!$metaUser->userid) { return getView('access_denied'); } $db = JFactory::getDBO(); // Redirect to SSL if the config requires it if (!empty($tmpl->cfg['ssl_profile']) && empty($_SERVER['HTTPS']) && empty($tmpl->cfg['override_reqssl'])) { aecRedirect(AECToolbox::deadsureURL("index.php?option=" . $option . "&task=subscriptiondetails", true, false)); exit; } // Load metaUser and invoice data $invoiceno = aecInvoiceHelper::InvoiceCountbyUserID($metaUser->userid); $properties = array(); $properties['showcheckout'] = false; // Do not let the user in without a subscription or at least an invoice if (!$metaUser->hasSubscription && empty($invoiceno)) { subscribe($option); return; } elseif (!$metaUser->hasSubscription && !empty($invoiceno)) { $properties['showcheckout'] = aecInvoiceHelper::lastUnclearedInvoiceIDbyUserID($metaUser->userid); } // Prepare Main Tabs $tabs = array();
public function customaction_cancel($request) { // Redirect to PayPal aecRedirect('https://www.paypal.com/cgi-bin/webscr?cmd=_subscr-find&alias=' . $this->settings['business']); }
static function registerRedirectJomSocial($plan) { TempTokenHandler::TempTokenFromPlan($plan); aecRedirect('index.php?option=com_community&view=register'); }
public function thanks($renew = false, $free = false) { global $aecConfig; if ($this->userid) { $this->loadMetaUser(); if (isset($this->renew)) { $renew = $this->renew; } else { $renew = $this->metaUser->is_renewing(); } } $url = 'index.php?option=com_acctexp&task=thanks&userid=' . (int) $this->userid . '&free=' . $free . '&renew=' . $renew; if (!empty($this->plan)) { aecRedirect($url . '&usage=' . $this->plan->id); } else { aecRedirect($url); } }
public function checkListProblems() { // If we run into an Authorization problem, or no plans are available, redirect. if (empty($this->list) || is_bool($this->list)) { return aecRedirect(AECToolbox::deadsureURL('index.php', false, true), JText::_('NOPLANS_ERROR')); } elseif (is_array($this->list)) { return true; } if (strpos($this->list, 'option=com_acctexp')) { $this->list .= '&userid=' . $this->metaUser->userid; } return aecRedirect($this->list); }
/** * Return true if the user exists and is not expired, false if user does not exist * Will reroute the user if he is expired * @parameter username * @return bool */ static function VerifyUsername($username) { $heartbeat = new aecHeartbeat(); $heartbeat->frontendping(); $userid = aecUserHelper::UserIDfromUsername($username); $metaUser = new metaUser($userid); if ($metaUser->hasSubscription) { return $metaUser->objSubscription->verifylogin($metaUser->cmsUser->block, $metaUser); } else { global $aecConfig; if ($aecConfig->cfg['require_subscription']) { if ($aecConfig->cfg['entry_plan']) { $payment_plan = new SubscriptionPlan(); $payment_plan->load($aecConfig->cfg['entry_plan']); $metaUser->establishFocus($payment_plan, 'free', false); $metaUser->focusSubscription->applyUsage($payment_plan->id, 'free', 1, 0); return AECToolbox::VerifyUserID($userid); } else { $invoices = aecInvoiceHelper::InvoiceCountbyUserID($metaUser->userid); if ($invoices) { $invoice = aecInvoiceHelper::lastUnclearedInvoiceIDbyUserID($metaUser->userid); if ($invoice) { $metaUser->setTempAuth(); return aecRedirect('index.php?option=com_acctexp&task=pending&userid=' . $userid); } } $metaUser->setTempAuth(); return aecRedirect('index.php?option=com_acctexp&task=subscribe&userid=' . $userid . '&intro=1'); } } } return true; }
public function transmitRequestXML($xml, $request) { require_once dirname(__FILE__) . '/lib/cls.ideal.php'; $response = array(); $response['valid'] = false; $description = substr(AECToolbox::rewriteEngineRQ($this->settings['description'], $request), 0, 29); $report_url = AECToolbox::deadsureURL("index.php?option=com_acctexp&task=mollie_idealnotification"); $return_url = $request->int_var['return_url']; $amount = $request->int_var['amount'] * 100; $mollieIdeal = new iDEAL_Payment($this->settings['partner_id']); if ($this->settings['testmode']) { $mollieIdeal->setTestmode(true); } else { $mollieIdeal->setTestmode(false); } if ($mollieIdeal->createPayment($request->int_var['params']['bank_id'], $amount, $description, $return_url, $report_url)) { // ...Request valid transaction id from Mollie and store it... $request->invoice->secondary_ident = $mollieIdeal->getTransactionId(); $request->invoice->storeload(); // Redirect to issuer bank aecRedirect($mollieIdeal->getBankURL()); } else { // error handling $this->___logError("iDEAL_Payment::createPayment failed", $mollieIdeal->getErrorCode(), $mollieIdeal->getErrorMessage()); return $response; } return null; }
/** * @version $Id: thanks/html.php * @package AEC - Account Control Expiration - Membership Manager * @subpackage Main Frontend * @copyright 2012 Copyright (C) David Deutsch * @author David Deutsch <*****@*****.**> & Team AEC - http://www.valanx.org * @license GNU/GPL v.3 http://www.gnu.org/licenses/gpl.html or, at your option, any later version */ // Dont allow direct linking defined('_JEXEC') or die('Direct Access to this location is not allowed.'); $tmpl->setTitle(JText::_('THANKYOU_TITLE')); if (!empty($plan)) { if (is_object($plan)) { if (!empty($plan->params['customthanks'])) { aecRedirect($plan->params['customthanks']); } } } if ($renew) { $msg = JText::_('SUB_FEPARTICLE_HEAD_RENEW') . '</p><p>' . JText::_('SUB_FEPARTICLE_THANKSRENEW'); if ($free) { $msg .= JText::_('SUB_FEPARTICLE_LOGIN'); } else { $msg .= JText::_('SUB_FEPARTICLE_PROCESSPAY') . JText::_('SUB_FEPARTICLE_MAIL'); } } else { $app = JFactory::getApplication(); $msg = JText::_('SUB_FEPARTICLE_HEAD') . '</p><p>' . JText::_('SUB_FEPARTICLE_THANKS'); $msg .= $free ? JText::_('SUB_FEPARTICLE_PROCESS') : JText::_('SUB_FEPARTICLE_PROCESSPAY'); $msg .= $app->getCfg('useractivation') ? JText::_('SUB_FEPARTICLE_ACTMAIL') : JText::_('SUB_FEPARTICLE_MAIL');
function cancelInvoice($option, $invoice_number, $pending = 0, $userid, $return = null) { $user = JFactory::getUser(); if (empty($user->id)) { if ($userid) { if (AECToolbox::quickVerifyUserID($userid) === true) { // This user is not expired, so he could log in... return getView('access_denied'); } } else { return getView('access_denied'); } } else { $userid = $user->id; } $invoiceid = aecInvoiceHelper::InvoiceIDfromNumber($invoice_number, $userid); // Only allow a user to access existing and own invoices if ($invoiceid) { $objInvoice = new Invoice(); $objInvoice->load($invoiceid); $objInvoice->cancel(); } else { return getView('access_denied'); } if ($pending) { getView('pending'); } else { if (!empty($return)) { aecRedirect(base64_decode($return)); } else { getView('subscriptiondetails', array('sub' => 'invoices')); } } }
/** * @param string|boolean $task */ function aecSelfRedirect($task, $addparams) { $params = array('option=com_acctexp', 'task=' . $task); foreach ($addparams as $k => $v) { $params[] = $k . '=' . $v; } $url = 'index.php?option=com_acctexp&' . implode('&', $params); return aecRedirect(AECToolbox::deadsureURL($url), false, true); }