Esempio n. 1
0
 public function createGatewayLink($request)
 {
     $var['post_url'] = "https://www.alertpay.com/PayProcess.aspx";
     if ($this->settings['testmode']) {
         $var['ap_test'] = '1';
     }
     if (is_array($request->int_var['amount'])) {
         $var['ap_purchasetype'] = 'Subscription';
         if (isset($request->int_var['amount']['amount1'])) {
             $var['ap_trialamount'] = $request->int_var['amount']['amount1'];
             $put = $this->convertPeriodUnit($request->int_var['amount']['unit1'], $request->int_var['amount']['period1']);
             $var['ap_trialtimeunit'] = $put['unit'];
             $var['ap_trialperiodlength'] = $put['period'];
         }
         $var['ap_amount'] = $request->int_var['amount']['amount3'];
         $puf = $this->convertPeriodUnit($request->int_var['amount']['unit3'], $request->int_var['amount']['period3']);
         $var['ap_timeunit'] = $puf['unit'];
         $var['ap_periodlength'] = $puf['period'];
     } else {
         $var['ap_purchasetype'] = 'Item';
         $var['ap_amount'] = $request->int_var['amount'];
     }
     $var['ap_merchant'] = $this->settings['merchant'];
     $var['ap_itemname'] = $request->invoice->invoice_number;
     $var['ap_currency'] = $this->settings['currency'];
     $var['ap_returnurl'] = AECToolbox::deadsureURL("index.php?option=com_acctexp&task=thanks");
     $var['ap_description'] = AECToolbox::rewriteEngineRQ($this->settings['item_name'], $request);
     $var['ap_cancelurl'] = AECToolbox::deadsureURL("index.php?option=com_acctexp&task=cancel");
     $var['apc_1'] = $request->metaUser->cmsUser->id;
     $var['apc_2'] = AECToolbox::rewriteEngineRQ($this->settings['item_name'], $request);
     $var['apc_3'] = $request->int_var['usage'];
     return $var;
 }
Esempio n. 2
0
 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;
 }
Esempio n. 3
0
 public function createGatewayLink($request)
 {
     $var['post_url'] = 'https://www.skrill.com/app/payment.pl';
     $var['pay_to_email'] = $this->settings['pay_to_email'];
     $var['recipient_description'] = $this->settings['recipient_description'];
     $var['logo_url'] = $this->settings['logo_url'];
     $var['transaction_id'] = $request->invoice->invoice_number;
     $var['return_url'] = $request->int_var['return_url'];
     $var['cancel_url'] = AECToolbox::deadsureURL('index.php?option=com_acctexp&task=cancel');
     $var['status_url'] = AECToolbox::deadsureURL('index.php?option=com_acctexp&task=skrillnotification');
     $var['language'] = $this->settings['language'];
     if (empty($this->settings['payment_methods'])) {
         $var['payment_methods'] = "";
     } else {
         $var['payment_methods'] = implode(',', $this->settings['payment_methods']);
     }
     $var['hide_login'] = $this->settings['hide_login'];
     $var['pay_from_email'] = $request->metaUser->cmsUser->email;
     if (is_array($request->int_var['amount'])) {
         $puf = $this->convertPeriodUnit($request->int_var['amount']['unit3'], $request->int_var['amount']['period3']);
         $var['rec_amount'] = $request->int_var['amount'];
         $var['rec_period'] = $puf['period'];
         $var['rec_cycle'] = $puf['unit'];
     } else {
         $var['amount'] = $request->int_var['amount'];
     }
     $var['detail1_description'] = AECToolbox::rewriteEngineRQ($this->settings['item_name'], $request);
     $var['detail1_text'] = $request->metaUser->cmsUser->id;
     $var['currency'] = $this->settings['currency'];
     $var['confirmation_note'] = $this->settings['confirmation_note'];
     return $var;
 }
Esempio n. 4
0
 public function createGatewayLink($request)
 {
     //URL returned by eWay
     $return_url = AECToolbox::deadsureURL("index.php?option=com_acctexp&task=ewaynotification");
     //Genere un identifiant unique pour la transaction
     $my_trxn_number = uniqid("eway_");
     $order_total = $request->int_var['amount'] * 100;
     $var = array("post_url" => "https://www.eWAY.com.au/gateway/payment.asp", "ewayCustomerID" => $this->settings['custId'], "ewayTotalAmount" => $order_total, "ewayCustomerFirstName" => $request->metaUser->cmsUser->username, "ewayCustomerLastName" => $request->metaUser->cmsUser->name, "ewayCustomerInvoiceDescription" => AECToolbox::rewriteEngineRQ($this->settings['item_name'], $request), "ewayCustomerInvoiceRef" => $request->invoice->invoice_number, "ewayOption1" => $request->metaUser->cmsUser->id, "ewayOption2" => $request->invoice->invoice_number, "eWAYTrxnNumber" => $my_trxn_number, "eWAYAutoRedirect" => $this->settings['autoRedirect'], "eWAYSiteTitle" => $this->settings['SiteTitle'], "eWAYURL" => $return_url);
     return $var;
 }
Esempio n. 5
0
 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;
 }
Esempio n. 6
0
                continue;
            }
        }
    }
    if ($found) {
        if (!empty($pp->info['actions']) && $activeortrial) {
            $actions = $pp->getActions($invoice, $tempsubscription);
            foreach ($actions as $action) {
                $actionsarray[] = array('task' => 'planaction', 'add' => 'action=' . $action['action'] . '&subscr=' . $tempsubscription->id, 'insert' => $action['insert'], 'text' => $action['action'], 'class' => 'btn btn-info');
            }
        }
    }
    if (!empty($actionsarray)) {
        foreach ($actionsarray as $aid => $a) {
            if (is_array($a)) {
                $link = AECToolbox::deadsureURL(sprintf($invoiceactionlink, $a['task'], $a['add']), !empty($tmpl->cfg['ssl_profile']));
                $insert = '';
                if (!empty($a['insert'])) {
                    $insert = $a['insert'];
                }
                $actionsarray[$aid] = '<a href="' . $link . '"' . $insert . ' class="' . $a['class'] . '">' . $a['text'] . '</a>';
            }
        }
        $actions = '<div class="btn-group">' . implode($actionsarray) . '</div>';
    } else {
        $actions = ' - - - ';
    }
    $invoices[$invoiceid]['actions'] = $actions;
}
// Get Custom Processor Tabs
foreach ($pps as $pp) {
Esempio n. 7
0
 public function createGatewayLink($request)
 {
     if ($this->settings['testmode']) {
         $var['post_url'] = 'https://www.sandbox.paypal.com/cgi-bin/webscr';
     } else {
         $var['post_url'] = 'https://www.paypal.com/cgi-bin/webscr';
     }
     $var['cmd'] = '_xclick-subscriptions';
     $var['src'] = "1";
     $var['sra'] = "1";
     if (isset($request->int_var['amount']['amount1'])) {
         $var['a1'] = $request->int_var['amount']['amount1'];
         $var['p1'] = $request->int_var['amount']['period1'];
         $var['t1'] = $request->int_var['amount']['unit1'];
     }
     if (isset($request->int_var['amount']['amount2'])) {
         $var['a2'] = $request->int_var['amount']['amount2'];
         $var['p2'] = $request->int_var['amount']['period2'];
         $var['t2'] = $request->int_var['amount']['unit2'];
     }
     $var['a3'] = $request->int_var['amount']['amount3'];
     $var['p3'] = $request->int_var['amount']['period3'];
     $var['t3'] = $request->int_var['amount']['unit3'];
     $var['business'] = $this->settings['business'];
     $var['invoice'] = $request->invoice->invoice_number;
     $var['cancel_return'] = AECToolbox::deadsureURL('index.php?option=com_acctexp&amp;task=cancel');
     if (strpos($this->settings['altipnurl'], 'http://') === 0) {
         $var['notify_url'] = $this->settings['altipnurl'] . 'index.php?option=com_acctexp&amp;task=paypal_subscriptionnotification';
     } else {
         $var['notify_url'] = AECToolbox::deadsureURL('index.php?option=com_acctexp&amp;task=paypal_subscriptionnotification');
     }
     $var['item_number'] = AECToolbox::rewriteEngineRQ($this->settings['item_number'], $request);
     $var['item_name'] = AECToolbox::rewriteEngineRQ($this->settings['item_name'], $request);
     $var['no_shipping'] = $this->settings['no_shipping'];
     $var['no_note'] = '1';
     $var['rm'] = '2';
     $var['return'] = $request->int_var['return_url'];
     $var['currency_code'] = $this->settings['currency'];
     $var['lc'] = $this->settings['lc'];
     if (!empty($this->settings['srt'])) {
         $var['srt'] = $this->settings['srt'];
     }
     // Customizations
     $customizations = array('cbt', 'cn', 'cpp_header_image', 'cpp_headerback_color', 'cpp_headerborder_color', 'cpp_payflow_color', 'image_url', 'page_style');
     foreach ($customizations as $cust) {
         if (!empty($this->settings[$cust])) {
             $var[$cust] = $this->settings[$cust];
         }
     }
     if (isset($this->settings['cs'])) {
         if ($this->settings['cs'] != 0) {
             $var['cs'] = $this->settings['cs'];
         }
     }
     return $var;
 }
Esempio n. 8
0
 public function createGatewayLink($request)
 {
     if ($this->settings['testmode']) {
         $sub = 'idealtest';
     } else {
         $sub = 'ideal';
     }
     if ($this->settings['bank'] == 'ing') {
         $var['post_url'] = "https://" . $sub . ".secure-ing.com/ideal/mpiPayInitIng.do";
     } else {
         $var['post_url'] = "https://" . $sub . ".rabobank.nl/ideal/mpiPayInitRabo.do";
     }
     $var['merchantID'] = $this->settings['merchantid'];
     $var['subID'] = $this->settings['subid'];
     $var['purchaseID'] = (int) $request->invoice->id;
     if ($this->settings['testmode']) {
         $var['post_url'] = "https://" . $sub . ".rabobank.nl/ideal/mpiPayInitRabo.do";
         $var['amount'] = max(1, min(7, (int) $this->settings['testmodestage'])) . '00';
     } else {
         $var['amount'] = (int) ($request->int_var['amount'] * 100);
     }
     $var['currency'] = $this->settings['currency'];
     $var['language'] = strtolower($this->settings['language']);
     $var['description'] = substr($this->settings['description'], 0, 32);
     $var['itemNumber1'] = $request->metaUser->userid;
     $var['itemDescription1'] = substr($this->settings['description'], 0, 32);
     $var['itemQuantity1'] = 1;
     $var['itemPrice1'] = $var['amount'];
     $var['paymentType'] = 'ideal';
     $var['validUntil'] = date('Y-m-d\\TG:i:s\\Z', strtotime('+1 hour'));
     $shastring = $this->settings['key'] . $var['merchantID'] . $var['subID'] . $var['amount'] . $var['purchaseID'] . $var['paymentType'] . $var['validUntil'] . $var['itemNumber1'] . $var['itemDescription1'] . $var['itemQuantity1'] . $var['itemPrice1'];
     $shastring = html_entity_decode($shastring);
     $shastring = str_replace(array("\t", "\n", "\r", " "), '', $shastring);
     $var['hash'] = sha1($shastring);
     $var['urlSuccess'] = AECToolbox::deadsureURL('index.php?option=com_acctexp&amp;task=ideal_basicnotification');
     $var['urlCancel'] = AECToolbox::deadsureURL('index.php?option=com_acctexp&amp;task=cancel');
     $var['urlError'] = AECToolbox::deadsureURL('index.php?option=com_acctexp&amp;task=cancel');
     $var['urlService'] = AECToolbox::deadsureURL('index.php');
     return $var;
 }
Esempio n. 9
0
 public function url($params, $profile = false)
 {
     if (empty($params['option'])) {
         $params = array_merge(array('option' => 'com_acctexp'), $params);
     }
     $params[xJ::token()] = '1';
     $p = array();
     foreach ($params as $k => $v) {
         $p[] = $k . '=' . $v;
     }
     if ($profile) {
         $secure = $this->cfg['ssl_profile'];
     } else {
         $secure = $this->cfg['ssl_signup'];
     }
     return AECToolbox::deadsureURL('index.php?' . implode("&", $p), $secure);
 }
Esempio n. 10
0
 public function getWorkingData($InvoiceFactory)
 {
     $int_var = array();
     // Defaults
     $int_var['params'] = array();
     $int_var['invoice'] = $this->invoice_number;
     $int_var['usage'] = $this->usage;
     $int_var['amount'] = $this->amount;
     if (isset($InvoiceFactory->recurring)) {
         $int_var['recurring'] = $InvoiceFactory->recurring;
     } else {
         $int_var['recurring'] = 0;
     }
     if (is_array($this->params)) {
         $int_var['params'] = $this->params;
         // Filter non-processor params
         $nonproc = array('pending_reason', 'deactivated');
         foreach ($nonproc as $param) {
             if (isset($int_var['params'][$param])) {
                 unset($int_var['params'][$param]);
             }
         }
     }
     $int_var['objUsage'] = $this->getObjUsage();
     $urladd = '';
     $doublecheck = false;
     if (!empty($int_var['objUsage'])) {
         if (!is_a($int_var['objUsage'], 'SubscriptionPlan')) {
             if (!empty($InvoiceFactory->items->itemlist)) {
                 if (count($InvoiceFactory->items->itemlist) === 1) {
                     $int_var['objUsage'] = $InvoiceFactory->cart[0]['obj'];
                     $doublecheck = true;
                 }
             }
         }
         if (is_a($int_var['objUsage'], 'SubscriptionPlan')) {
             if (is_object($InvoiceFactory->pp)) {
                 $int_var['planparams'] = $int_var['objUsage']->getProcessorParameters($InvoiceFactory->pp);
                 if (isset($int_var['params']['userselect_recurring'])) {
                     $int_var['recurring'] = $InvoiceFactory->pp->is_recurring($int_var['params']['userselect_recurring'], true);
                 } else {
                     $int_var['recurring'] = $InvoiceFactory->pp->is_recurring();
                 }
             } else {
                 $int_var['planparams'] = array();
                 $int_var['recurring'] = false;
             }
             if (!empty($InvoiceFactory->items->itemlist)) {
                 $itemlist = array_keys($InvoiceFactory->items->itemlist);
                 $max = array_pop($itemlist);
                 $terms = $InvoiceFactory->items->itemlist[$max]['terms'];
             } else {
                 $terms = $int_var['objUsage']->getTermsForUser($int_var['recurring'], $InvoiceFactory->metaUser);
             }
             $int_var['amount'] = $terms->getOldAmount($int_var['recurring']);
             if (!empty($int_var['objUsage']->params['customthanks']) || !empty($int_var['objUsage']->params['customtext_thanks'])) {
                 $urladd = '&amp;u=' . $this->usage;
             }
         } else {
             if (!empty($InvoiceFactory->cart) && !empty($InvoiceFactory->cartobject)) {
                 $int_var['objUsage'] = $InvoiceFactory->cartobject;
             }
             if (is_object($InvoiceFactory->items->grand_total)) {
                 $int_var['amount'] = $InvoiceFactory->items->grand_total->renderCost();
             } else {
                 $int_var['amount'] = $InvoiceFactory->items->grand_total;
             }
         }
         if ($doublecheck) {
             if ($InvoiceFactory->cart[0]['quantity'] > 1) {
                 if (is_array($int_var['amount'])) {
                     foreach ($int_var['amount'] as $k => $v) {
                         if (strpos($k, 'amount') !== false) {
                             $int_var['amount'][$k] = AECToolbox::correctAmount($v * $InvoiceFactory->cart[0]['quantity']);
                         }
                     }
                 } else {
                     $int_var['amount'] = AECToolbox::correctAmount($int_var['amount'] * $InvoiceFactory->cart[0]['quantity']);
                 }
             }
         } else {
             if (is_array($int_var['amount'])) {
                 foreach ($int_var['amount'] as $k => $v) {
                     if (strpos($k, 'amount') !== false) {
                         $int_var['amount'][$k] = AECToolbox::correctAmount($v);
                     }
                 }
             } else {
                 $int_var['amount'] = AECToolbox::correctAmount($int_var['amount']);
             }
         }
     } else {
         $int_var['amount'] = $this->amount;
     }
     if (is_object($InvoiceFactory->metaUser)) {
         $renew = $InvoiceFactory->metaUser->is_renewing();
     } else {
         $renew = 0;
     }
     $int_var['return_url'] = AECToolbox::deadsureURL('index.php?option=com_acctexp&task=thanks&amp;renew=' . $renew . $urladd);
     return $int_var;
 }
 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);
 }
Esempio n. 12
0
    /**
     * @param aecHTML $aecHTML
     * @param ItemGroup $row
     */
    static function editItemGroup($aecHTML, $row)
    {
        HTML_myCommon::startCommon('aec-wrap-squary', 'aec-wrap-inner-light');
        HTML_myCommon::startForm();
        HTML_myCommon::getHeader('AEC_HEAD_ITEMGROUP_INFO', 'itemgroups', $row->id ? $row->name : JText::_('AEC_CMN_NEW'), false, 'edit', 'ItemGroup');
        ?>
<div class="col-sm-12"><?php 
        $tabs = new bsPaneTabs();
        $tabs->startTabs();
        $tabs->newTab('group', JText::_('ITEMGROUP_DETAIL_TITLE'));
        $tabs->newTab('restrictions', JText::_('ITEMGROUP_RESTRICTIONS_TITLE'));
        $tabs->newTab('mis', JText::_('AEC_USER_MICRO_INTEGRATION'));
        $tabs->endTabs();
        $tabs->startPanes();
        $tabs->nextPane('group');
        ?>
		<div class="row">
			<div class="col-sm-4">
				<section class="paper">
					<h4>General</h4>
					<?php 
        echo $aecHTML->createSettingsParticle('active');
        ?>
					<?php 
        echo $aecHTML->createSettingsParticle('visible');
        ?>
					<?php 
        echo $aecHTML->createSettingsParticle('color');
        ?>
					<div style="position:relative;width:100%;">
						<?php 
        echo $aecHTML->createSettingsParticle('name');
        if ($row->id) {
            ?>
							<p><a href="<?php 
            echo str_replace("/administrator/", "/", AECToolbox::deadsureURL('index.php?option=com_acctexp&task=subscribe&group=' . $row->id));
            ?>
" title="<?php 
            echo JText::_('AEC_CGF_LINK_ABO_FRONTEND');
            ?>
" target="_blank"><?php 
            echo JText::_('AEC_CGF_LINK_ABO_FRONTEND');
            ?>
</a></p>
						<?php 
        }
        ?>
					</div>
				</section>
				<section class="paper">
					<h4><?php 
        echo JText::_('ITEMGROUPS_PARENTGROUP_TITLE');
        ?>
</h4>
					<?php 
        if ($row->id > 1) {
            ?>
						<table style="width:100%;" class="table table-striped table-hover table-condensed aec-grouplist">
							<thead>
							<tr>
								<th>Name</th>
								<th></th>
							</tr>
							</thead>
							<tbody>
							<?php 
            if (!empty($aecHTML->customparams->groups)) {
                foreach ($aecHTML->customparams->groups as $id => $group) {
                    HTML_AcctExp::groupRow('group', $group);
                }
            }
            ?>
							</tbody>
							<tfoot>
							<tr>
								<td><?php 
            echo $aecHTML->createSettingsParticle('add_group');
            ?>
</td>
								<td>
									<a class="btn btn-success pull-right" id="addgroup-btn" onClick="addGroup('group','addgroup-btn')"><?php 
            echo aecHTML::Icon('plus');
            ?>
</a>
								</td>
							</tr>
							</tfoot>
						</table>
					<?php 
        } elseif ($row->id == 1) {
            ?>
						<p>This is the Root Group.</p>
					<?php 
        } else {
            ?>
						<p>You can select Parent Groups after you have saved this for the first time.</p>
					<?php 
        }
        ?>
				</section>
			</div>
			<div class="col-sm-8">
				<section class="paper">
					<h4>Details</h4>
					<?php 
        echo $aecHTML->createSettingsParticle('reveal_child_items');
        ?>
					<?php 
        echo $aecHTML->createSettingsParticle('symlink');
        ?>
					<?php 
        echo $aecHTML->createSettingsParticle('symlink_userid');
        ?>
					<?php 
        echo $aecHTML->createSettingsParticle('notauth_redirect');
        ?>
					<?php 
        echo $aecHTML->createSettingsParticle('desc');
        ?>
				</section>
			</div>
		</div>
		<?php 
        $tabs->nextPane('restrictions');
        ?>
		<?php 
        echo aecRestrictionHelper::echoSettings($aecHTML);
        ?>
		<?php 
        $tabs->nextPane('mis');
        ?>
		<div class="row">
			<div class="col-sm-6">
				<section class="paper">
					<h4><?php 
        echo JText::_('Inherited Micro Integrations');
        ?>
</h4>
					<?php 
        if ($row->id > 1) {
            if (!empty($aecHTML->customparams->mi['inherited'])) {
                echo '<p>' . JText::_('These MIs were inherited from groups that this group is in') . '</p>';
                echo '<ul>';
                foreach ($aecHTML->customparams->mi['inherited'] as $id => $mi) {
                    ?>
								<li>
									<p>
										<input type="checkbox" name="inherited_micro_integrations[]" value="<?php 
                    echo $mi->id;
                    ?>
" checked="checked" disabled="disabled" />
										<strong><?php 
                    echo $mi->name;
                    ?>
</strong> (#<?php 
                    echo $mi->id;
                    ?>
)
										(<a href="index.php?option=com_acctexp&amp;task=edit&amp;entity=microintegration&amp;id=<?php 
                    echo $mi->id;
                    ?>
" target="_blank"><?php 
                    echo JText::_('edit');
                    ?>
</a>)
									</p>
									<p><?php 
                    echo $mi->desc;
                    ?>
</p>
								</li>
							<?php 
                }
                echo '</ul>';
            } else {
                echo '<p>' . JText::_('No inherited MIs - A group can inherit MIs from groups that it is in') . '</p>';
            }
        }
        ?>
				</section>
			</div>

			<div class="col-sm-6">
				<section class="paper">
					<h4><?php 
        echo JText::_('Attached Micro Integrations');
        ?>
</h4>
					<?php 
        if (!empty($aecHTML->customparams->mi['attached'])) {
            echo '<table style="margin: 0 auto;">';
            foreach ($aecHTML->customparams->mi['attached'] as $id => $mi) {
                ?>
							<tr>
								<td>
									<h5>
										<strong><?php 
                echo $mi->name;
                ?>
</strong>
										(#<?php 
                echo $mi->id;
                ?>
)
										<?php 
                echo $mi->inherited ? ' (' . JText::_('inherited from group, see above') . '!)' : '';
                ?>
										(<a href="index.php?option=com_acctexp&amp;task=edit&amp;entity=microintegration&amp;id=<?php 
                echo $mi->id;
                ?>
" target="_blank"><?php 
                echo JText::_('edit');
                ?>
</a>)
									</h5>
								</td>
								<td>
									<input type="hidden" name="micro_integrations[]" value="0" />
									<input id="micro_integrations_<?php 
                echo $mi->id;
                ?>
" class="bootstrap-toggle" type="checkbox" name="micro_integrations[]"<?php 
                echo $mi->attached ? ' checked="checked"' : '';
                ?>
 value="<?php 
                echo $mi->id;
                ?>
" data-state="<?php 
                echo $mi->attached ? '1' : '0';
                ?>
"/>
								</td>
							</tr>
							<tr>
								<td colspan="2" style="border-bottom: 1px dashed #999;">
									<p><?php 
                echo $mi->desc;
                ?>
</p>
								</td>
							</tr>
						<?php 
            }
            echo '</table>';
        } else {
            echo '<p>' . JText::_('No MIs to attach') . '<a href="index.php?option=com_acctexp&amp;task=edit&amp;entity=microintegration" target="_blank">(' . JText::_('create one now?') . ')</a></p>';
        }
        ?>
				</section>
			</div>
		</div>
		<?php 
        $tabs->endPanes();
        ?>
		<br />
		<input type="hidden" name="id" value="<?php 
        echo $row->id;
        ?>
" />
		<input type="hidden" name="option" value="com_acctexp" />
		<input type="hidden" name="entity" value="ItemGroup" />
		<input type="hidden" name="task" value="save" />
		</form>

		</div>

		<?php 
        HTML_myCommon::endCommon();
    }
Esempio n. 13
0
				<p><strong><?php 
    echo JText::_('AEC_PROMPT_PASSWORD_WRONG');
    ?>
</strong></p>
			</div>
		<?php 
}
?>
		<div class="well">
			<div id="btn-password">
				<p><?php 
echo JText::_('AEC_PROMPT_PASSWORD');
?>
</p>
				<form action="<?php 
echo AECToolbox::deadsureURL('index.php?option=com_acctexp&task=subscribe', $tmpl->cfg['ssl_signup']);
?>
" method="post">
					<input type="password" size="20" class="inputbox" id="password" name="password"/>
					<?php 
if ($passthrough != false) {
    $pt = unserialize(base64_decode($passthrough));
    if (isset($pt['task'])) {
        echo '<input type="hidden" name="task" value="' . $pt['task'] . '" />';
    }
    if (isset($pt['userid'])) {
        echo '<input type="hidden" name="userid" value="' . $pt['userid'] . '" />';
    }
    ?>
						<input type="hidden" name="aec_passthrough" value="<?php 
    echo $passthrough;
Esempio n. 14
0
<?php

/**
 * @version $Id: backtocart.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.');
?>
<form id="form-backtocart" action="<?php 
echo AECToolbox::deadsureURL('index.php?option=' . $option . '&task=cart', $tmpl->cfg['ssl_signup']);
?>
" method="post">
	<div class="backtocart-button">
		You can always go back to:&nbsp;&nbsp;&nbsp;<button type="submit" class="btn btn-default"><?php 
echo aecHTML::Icon('shopping-cart') . JText::_('AEC_BTN_YOUR_CART');
?>
</button>
	</div>
	<?php 
echo JHTML::_('form.token');
?>
</form>
Esempio n. 15
0
function joomlaregisterForm($option, $useractivation)
{
    global $aecConfig;
    $name = $username = $email = '';
    $values = array('name', 'username', 'email');
    foreach ($values as $n) {
        if (isset($_POST[$n])) {
            ${$n} = $_POST[$n];
        }
    }
    // used for spoof hardening
    if (function_exists('josSpoofValue')) {
        $validate = josSpoofValue();
    } else {
        $validate = '';
    }
    ?>
	<script type="text/javascript">
		/* <![CDATA[ */
		function submitbutton_reg() {
			var form = document.mosForm;
			var r = new RegExp("[\<|\>|\"|\'|\%|\;|\(|\)|\&|\+|\-]", "i");

			// do field validation
			if (form.name.value == "") {
				alert( "<?php 
    echo html_entity_decode(_REGWARN_NAME);
    ?>
" );
			} else if (form.username.value == "") {
				alert( "<?php 
    echo html_entity_decode(_REGWARN_UNAME);
    ?>
" );
			} else if (r.exec(form.username.value) || form.username.value.length < 3) {
				alert( "<?php 
    printf(html_entity_decode(_VALID_AZ09_USER), html_entity_decode(_PROMPT_UNAME), 2);
    ?>
" );
			} else if (form.email.value == "") {
				alert( "<?php 
    echo html_entity_decode(_REGWARN_MAIL);
    ?>
" );
			} else if (form.password.value.length < 6) {
				alert( "<?php 
    echo html_entity_decode(_REGWARN_PASS);
    ?>
" );
			} else if (form.password2.value == "") {
				alert( "<?php 
    echo html_entity_decode(_REGWARN_VPASS1);
    ?>
" );
			} else if ((form.password.value != "") && (form.password.value != form.password2.value)){
				alert( "<?php 
    echo html_entity_decode(_REGWARN_VPASS2);
    ?>
" );
			} else if (r.exec(form.password.value)) {
				alert( "<?php 
    printf(html_entity_decode(_VALID_AZ09), html_entity_decode(_REGISTER_PASS), 6);
    ?>
" );
			} else {
				form.submit();
			}
		}
		/* ]]> */
	</script>
	<form action="<?php 
    echo AECToolbox::deadsureURL('index.php?option=com_acctexp&amp;task=saveRegistration');
    ?>
" method="post" name="mosForm">

	<div class="componentheading">
		<?php 
    echo _REGISTER_TITLE;
    ?>
	</div>

	<table cellpadding="0" cellspacing="0" border="0" width="100%" class="contentpane">
	<tr>
		<td colspan="2"><?php 
    echo _REGISTER_REQUIRED;
    ?>
</td>
	</tr>
	<tr>
		<td width="30%">
			<?php 
    echo _REGISTER_NAME;
    ?>
 *
		</td>
			<td>
				<input type="text" name="name" size="40" value="<?php 
    echo $name;
    ?>
" class="inputbox" maxlength="50" />
			</td>
	</tr>
	<tr>
		<td>
			<?php 
    echo _REGISTER_UNAME;
    ?>
 *
		</td>
		<td>
			<input type="text" name="username" size="40" value="<?php 
    echo $username;
    ?>
" class="inputbox" maxlength="25" />
		</td>
	</tr>
	<tr>
		<td>
			<?php 
    echo _REGISTER_EMAIL;
    ?>
 *
		</td>
		<td>
			<input type="text" name="email" size="40" value="<?php 
    echo $email;
    ?>
" class="inputbox" maxlength="100" />
		</td>
	</tr>
	<tr>
		<td>
			<?php 
    echo _REGISTER_PASS;
    ?>
 *
		</td>
			<td>
				<input class="inputbox" type="password" name="password" size="40" value="" />
			</td>
	</tr>
	<tr>
		<td>
			<?php 
    echo _REGISTER_VPASS;
    ?>
 *
		</td>
		<td>
			<input class="inputbox" type="password" name="password2" size="40" value="" />
		</td>
	</tr>
	<tr>
			<td colspan="2">
			</td>
	</tr>
	<?php 
    if ($aecConfig->cfg['use_recaptcha'] && !empty($aecConfig->cfg['recaptcha_publickey'])) {
        include_once JPATH_SITE . '/components/com_acctexp/lib/recaptcha/recaptchalib.php';
        ?>
		<tr>
			<td></td>
			<td><?php 
        echo recaptcha_get_html($aecConfig->cfg['recaptcha_publickey']);
        ?>
</td>
		</tr>
		<?php 
    }
    ?>
	</table>
	<input type="hidden" name="id" value="0" />
	<input type="hidden" name="gid" value="0" />
	<input type="hidden" name="useractivation" value="<?php 
    echo $useractivation;
    ?>
" />
	<input type="hidden" name="option" value="com_acctexp" />
	<input type="hidden" name="task" value="saveRegistration" />
	<input type="hidden" name="usage" value="<?php 
    echo $_POST['usage'];
    ?>
" />
	<input type="hidden" name="processor" value="<?php 
    echo $_POST['processor'];
    ?>
" />
	<?php 
    if (isset($_POST['recurring'])) {
        ?>
	<input type="hidden" name="recurring" value="<?php 
        echo $_POST['recurring'];
        ?>
" />
	<?php 
    }
    ?>
	<input type="button" value="<?php 
    echo _BUTTON_SEND_REG;
    ?>
" class="button" onClick="submitbutton_reg()" />
	<input type="hidden" name="<?php 
    echo $validate;
    ?>
" value="1" />
	</form>
	<?php 
}
Esempio n. 16
0
 public function redirectToken()
 {
     $app = JFactory::getApplication();
     $app->redirect(AECToolbox::deadsureURL('index.php?option=com_acctexp&task=subscribe&aectoken=1', false, true));
 }
Esempio n. 17
0
 public function createGatewayLink($request)
 {
     if ($this->settings['testmode']) {
         $var['post_url'] = 'https://www.sandbox.paypal.com/cgi-bin/webscr';
     } else {
         $var['post_url'] = 'https://www.paypal.com/cgi-bin/webscr';
     }
     $var['cmd'] = '_xclick';
     if (!empty($this->settings['invoice_tax']) && isset($request->items->tax)) {
         $tax = 0;
         foreach ($request->items->tax as $itax) {
             $tax += $itax['cost'];
         }
         $var['tax'] = AECToolbox::correctAmount($tax);
         $var['amount'] = $request->items->total->cost['amount'];
     } elseif (!empty($this->settings['tax']) && $this->settings['tax'] > 0) {
         $amount = $request->int_var['amount'] / (100 + $this->settings['tax']) * 100;
         $var['tax'] = AECToolbox::correctAmount($request->int_var['amount'] - $amount, 2);
         $var['amount'] = AECToolbox::correctAmount($amount, 2);
     } else {
         $var['amount'] = $request->int_var['amount'];
     }
     $var['business'] = $this->settings['business'];
     $var['invoice'] = $request->invoice->invoice_number;
     $var['cancel_return'] = AECToolbox::deadsureURL('index.php?option=com_acctexp&amp;task=cancel');
     if (strpos($this->settings['altipnurl'], 'http://') === 0) {
         $var['notify_url'] = $this->settings['altipnurl'] . 'index.php?option=com_acctexp&amp;task=paypalnotification';
     } else {
         $var['notify_url'] = AECToolbox::deadsureURL('index.php?option=com_acctexp&amp;task=paypalnotification');
     }
     $var['item_number'] = AECToolbox::rewriteEngineRQ($this->settings['item_number'], $request);
     $var['item_name'] = AECToolbox::rewriteEngineRQ($this->settings['item_name'], $request);
     $var['no_shipping'] = $this->settings['no_shipping'];
     $var['no_note'] = '1';
     $var['rm'] = '2';
     $var['return'] = $request->int_var['return_url'];
     $var['currency_code'] = $this->settings['currency'];
     $var['lc'] = $this->settings['lc'];
     // Customizations
     $customizations = array('cbt', 'cn', 'cpp_header_image', 'cpp_headerback_color', 'cpp_headerborder_color', 'cpp_payflow_color', 'image_url', 'page_style');
     foreach ($customizations as $cust) {
         if (!empty($this->settings[$cust])) {
             $var[$cust] = $this->settings[$cust];
         }
     }
     if (isset($this->settings['cs'])) {
         if ($this->settings['cs'] != 0) {
             $var['cs'] = $this->settings['cs'];
         }
     }
     return $var;
 }
 public function checkoutAction($request, $InvoiceFactory = null)
 {
     global $aecConfig;
     if (method_exists($this, 'checkoutform')) {
         $var = $this->checkoutform($request);
     } else {
         $var = array();
     }
     if (isset($var['aec_alternate_checkout'])) {
         $url = $var['aec_alternate_checkout'];
         unset($var['aec_alternate_checkout']);
     } else {
         $url = AECToolbox::deadsureURL('index.php?option=com_acctexp&task=checkout', $this->requireSSLcheckout());
     }
     if (isset($var['aec_remove_std_vars'])) {
         $stdvars = false;
         unset($var['aec_remove_std_vars']);
     } else {
         $stdvars = true;
     }
     $return = '<form action="' . $url . '" method="post">' . "\n";
     $return .= $this->getParamsHTML($var) . '<br /><br />';
     if ($stdvars) {
         $return .= $this->getStdFormVars($request);
     }
     $return .= '<button type="submit" class="button aec-btn btn btn-primary" id="aec-checkout-btn">' . aecHTML::Icon('shopping-cart') . JText::_('BUTTON_CHECKOUT') . '</button>' . "\n";
     $return .= '</form>' . "\n";
     return $return;
 }
Esempio n. 19
0
 public function createGatewayLink($request)
 {
     $baseurl = AECToolbox::deadsureURL('index.php?option=com_acctexp&amp;task=payernotification', false, true);
     $Auth_url = $baseurl . '&action=authenticate';
     $Settle_url = $baseurl . '&action=settle';
     $Success_url = $request->int_var['return_url'];
     $Shop_url = JURI::root() . "index.php";
     // Explode Name
     $namearray = explode(" ", $request->metaUser->cmsUser->name);
     $firstfirstname = $namearray[0];
     $maxname = count($namearray) - 1;
     $lastname = $namearray[$maxname];
     unset($namearray[$maxname]);
     $firstname = implode(' ', $namearray);
     // Header
     $xml = "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>";
     $xml .= "<payread_post_api_0_2 " . "xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" " . "xsi:noNamespaceSchemaLocation=\"payread_post_api_0_2.xsd\"" . ">";
     // Seller details
     $xml .= "<seller_details>" . "<agent_id>" . htmlspecialchars($this->settings['agentid']) . "</agent_id>" . "</seller_details>";
     // Buyer details
     $xml .= "<buyer_details>" . "<first_name>" . htmlspecialchars($firstname) . "</first_name>" . "<last_name>" . htmlspecialchars($lastname) . "</last_name>" . "<address_line_1>" . htmlspecialchars("AddressLine1") . "</address_line_1>" . "<address_line_2>" . htmlspecialchars("AddressLine2") . "</address_line_2>" . "<postal_code>" . htmlspecialchars("Postalcode") . "</postal_code>" . "<city>" . htmlspecialchars("City") . "</city>" . "<country_code>" . htmlspecialchars("CountryCode") . "</country_code>" . "<phone_home>" . htmlspecialchars("PhoneHome") . "</phone_home>" . "<phone_work>" . htmlspecialchars("PhoneWork") . "</phone_work>" . "<phone_mobile>" . htmlspecialchars("PhoneMobile") . "</phone_mobile>" . "<email>" . $request->metaUser->cmsUser->email . "</email>" . "</buyer_details>";
     // Purchase
     $xml .= "<purchase>" . "<currency>" . $this->settings['currency'] . "</currency>";
     // Add RefId if used
     $xml .= "<reference_id>" . $request->invoice->invoice_number . "</reference_id>";
     // Start the Purchase list
     $xml .= "<purchase_list>";
     $desc = AECToolbox::rewriteEngineRQ($this->settings['item_name'], $request);
     if (!empty($this->settings['invoice_tax'])) {
         foreach ($request->items->tax as $tax) {
             $tax += $tax['cost'];
         }
     } else {
         $tax = $this->settings['tax'];
     }
     $tax = AECToolbox::correctAmount($tax);
     // Purchase list (freeform purchases)
     $xml .= "<freeform_purchase>" . "<line_number>" . htmlspecialchars(1) . "</line_number>" . "<description>" . htmlspecialchars($desc) . "</description>" . "<price_including_vat>" . htmlspecialchars($request->int_var['amount']) . "</price_including_vat>" . "<vat_percentage>" . htmlspecialchars($tax) . "</vat_percentage>" . "<quantity>" . htmlspecialchars(1) . "</quantity>" . "</freeform_purchase>";
     $xml .= "</purchase_list>" . "</purchase>";
     //Processing control
     $xml .= "<processing_control>" . "<success_redirect_url>" . htmlspecialchars($this->mySuccessRedirectUrl) . "</success_redirect_url>" . "<authorize_notification_url>" . htmlspecialchars($this->myAuthorizeNotificationUrl) . "</authorize_notification_url>" . "<settle_notification_url>" . htmlspecialchars($this->mySettleNotificationUrl) . "</settle_notification_url>" . "<redirect_back_to_shop_url>" . htmlspecialchars($this->myRedirectBackToShopUrl) . "</redirect_back_to_shop_url>" . "</processing_control>";
     // Database overrides
     $xml .= "<database_overrides>";
     // Payment methods
     $xml .= "<accepted_payment_methods>";
     $methods = explode(';', $this->settings["payment_method"]);
     foreach ($methods as $method) {
         $xml .= "<payment_method>" . $method . "</payment_method>";
     }
     $xml .= "</accepted_payment_methods>";
     // Debug mode
     $xml .= "<debug_mode>" . $this->settings['debugmode'] . "</debug_mode>";
     // Test mode
     $xml .= "<test_mode>" . $this->settings['testmode'] . "</test_mode>";
     // Language
     $xml .= "<language>" . $this->settings['language'] . "</language>";
     $xml .= "</database_overrides>";
     // Footer
     $xml .= "</payread_post_api_0_2>";
     $var['post_url'] = "https://secure.pay-read.se/PostAPI_V1/InitPayFlow";
     $var['payread_agentid'] = $this->settings['agentid'];
     $var['payread_xml_writer'] = "payread_php_0_2";
     $var['payread_data'] = base64_encode($xml);
     $var['payread_checksum'] = md5($this->settings['key1'] . $xml . $this->settings['key2']);
     return $var;
 }
Esempio n. 20
0
 * @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::_('NOT_ALLOWED_HEADLINE'));
if ($user->id) {
    $registerlink = AECToolbox::deadsureURL('index.php?option=com_acctexp&task=renewsubscription');
    $loggedin = 1;
} else {
    $loggedin = 0;
    if (aecComponentHelper::detect_component('anyCB')) {
        $registerlink = AECToolbox::deadsureURL('index.php?option=com_comprofiler&task=registers');
    } else {
        if (defined('JPATH_MANIFESTS')) {
            $registerlink = AECToolbox::deadsureURL('index.php?option=com_users&view=registration');
        } else {
            $registerlink = AECToolbox::deadsureURL('index.php?option=com_user&view=register');
        }
    }
}
if ($loggedin) {
    $loginlink = JText::_('NOT_ALLOWED_FIRSTPAR_LOGGED') . '&nbsp;' . $tmpl->lnk($registerlink, JText::_('NOT_ALLOWED_REGISTERLINK_LOGGED'), 'btn btn-default');
} else {
    $loginlink = JText::_('NOT_ALLOWED_FIRSTPAR') . '&nbsp;' . $tmpl->lnk($registerlink, JText::_('NOT_ALLOWED_REGISTERLINK'), 'btn btn-default');
}
$tmpl->defaultHeader();
@(include $tmpl->tmpl('access_denied'));
Esempio n. 21
0
 public function index($cmd)
 {
     $path = JPATH_SITE . '/components/com_acctexp/toolbox';
     if (empty($cmd)) {
         $list = array();
         $files = xJUtility::getFileArray($path, 'php', false, true);
         asort($files);
         foreach ($files as $n => $name) {
             $file = $path . '/' . $name;
             include_once $file;
             $class = str_replace('.php', '', $name);
             $tool = new $class();
             if (!method_exists($tool, 'Info')) {
                 continue;
             }
             $info = $tool->Info();
             $info['link'] = AECToolbox::deadsureURL('administrator/index.php?option=com_acctexp&task=index&entity=toolbox&cmd=' . $class);
             $list[] = $info;
         }
         HTML_AcctExp::toolBox('', $list);
     } else {
         $file = $path . '/' . $cmd . '.php';
         include_once $file;
         $tool = new $cmd();
         $info = $tool->Info();
         $return = '';
         if (!method_exists($tool, 'Action')) {
             $return .= '<section class="paper">' . '<p>Tool doesn\'t have an action to carry out!</p>' . '</section>';
         } else {
             $response = '</section><section class="paper"><h4>' . JText::_('Response') . '</h4>' . $tool->Action() . '</section>';
             if (method_exists($tool, 'Settings')) {
                 $tb_settings = $tool->Settings();
                 if (!empty($tb_settings)) {
                     $lists = array();
                     if (isset($tb_settings['lists'])) {
                         $lists = $tb_settings['lists'];
                         unset($tb_settings['lists']);
                     }
                     // Get preset values from POST
                     foreach ($tb_settings as $n => $v) {
                         if (isset($_POST[$n])) {
                             $tb_settings[$n][3] = $_POST[$n];
                         }
                     }
                     $settings = new aecSettings('TOOLBOX', 'E');
                     $settings->fullSettingsArray($tb_settings, array(), $lists);
                     // Call HTML Class
                     $aecHTML = new aecHTML($settings->settings, $settings->lists);
                     foreach ($tb_settings as $n => $v) {
                         $return .= $aecHTML->createSettingsParticle($n);
                     }
                     $return .= '<input type="submit" class="btn btn-primary pull-right"/><br/><br/>';
                 }
             }
             $return .= $response;
         }
         HTML_AcctExp::toolBox($cmd, $return, $info['name']);
     }
 }
Esempio n. 22
0
        echo $bitem['cost_total'];
        ?>
</strong></td>
				</tr>
			<?php 
    }
}
?>
	</table>

	<?php 
if ($button) {
    global $aecConfig;
    ?>
		<form id="form-backtocart" action="<?php 
    echo AECToolbox::deadsureURL('index.php?option=com_acctexp&task=cart', $aecConfig->cfg['ssl_signup']);
    ?>
" method="post">
			<div class="backtocart-button">
				<button type="submit" class="btn"><?php 
    echo aecHTML::Icon('shopping-cart') . JText::_('AEC_BTN_YOUR_CART');
    ?>
</button>
			</div>
			<?php 
    echo JHTML::_('form.token');
    ?>
		</form>
	<?php 
}
?>
Esempio n. 23
0
 */
// Dont allow direct linking
defined('_JEXEC') or die('Direct Access to this location is not allowed.');
if (!empty($metaUser->objSubscription->signup_date)) {
    echo '<p>' . JText::_('MEMBER_SINCE') . '&nbsp;' . $tmpl->date($metaUser->objSubscription->signup_date) . '</p>';
}
if (!empty($properties['showcheckout'])) {
    ?>
	<div class="details-openinvoice">
	<p>
		<?php 
    echo JText::_('PENDING_OPENINVOICE');
    ?>
&nbsp;
		<a href="<?php 
    echo AECToolbox::deadsureURL('index.php?option=' . $option . '&task=repeatPayment&invoice=' . $properties['showcheckout'] . '&userid=' . $metaUser->userid . '&' . xJ::token() . '=1');
    ?>
" title="<?php 
    echo JText::_('GOTO_CHECKOUT');
    ?>
"><?php 
    echo JText::_('GOTO_CHECKOUT');
    ?>
</a>
	</p>
	</div>
<?php 
}
if ($metaUser->hasSubscription) {
    if ($properties['alert']['level'] > 2) {
        $al = ' alert-success';
Esempio n. 24
0
File: btn.php Progetto: Ibrahim1/aec
/**
 * @version $Id: subscriptiondetails.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.');
?>
<div class="well">
	<div id="upgrade-button">
		<form action="<?php 
echo AECToolbox::deadsureURL('index.php?option=com_acctexp&task=renewsubscription', !empty($tmpl->cfg['ssl_signup']));
?>
" method="post">
			<input type="hidden" name="option" value="<?php 
echo $option;
?>
" />
			<input type="hidden" name="task" value="renewsubscription" />
			<input type="hidden" name="userid" value="<?php 
echo $metaUser->cmsUser->id;
?>
" />
			<input type="submit" class="button btn btn-success" value="<?php 
echo JText::_('RENEW_BUTTON_UPGRADE');
?>
" />
Esempio n. 25
0
<?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;
        }
    }
Esempio n. 26
0
/**
 * @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);
}