コード例 #1
0
<?php

require 'include_elevforeningen_login.php';
$contact = $auth->getContact($_SESSION['contact_id']);
if (!empty($_GET['order_id']) and is_numeric($_GET['order_id'])) {
    $debtor_client = new IntrafacePublic_Debtor_XMLRPC_Client($credentials, false);
    $debtor = $debtor_client->getDebtor($_GET['order_id']);
    $_SESSION['order_id'] = $debtor['id'];
    $_SESSION['amount'] = $debtor['total'];
}
if ($_SESSION['amount'] > 0) {
    $kr = number_format($_SESSION['amount'], 0, ',', '.') . ' kroner';
    $onlinebetaling = '<dt>Betal med Dankort</dt>
        <dd>Du betaler med <span class="dankort">Dankort</span>. <a href="https://vih.dk/elevforeningen/login/onlinebetaling.php">Betal online &rarr;</a>.</dd>
';
} else {
    $kr = 'pengene';
    $onlinebetaling = '';
}
$tpl = new Template(PATH_TEMPLATE_KUNDELOGIN);
$tpl->set('title', 'Betaling');
$tpl->set('description', '');
$tpl->set('keywords', '');
$tpl->set('content_main', '
    <h1>Betaling</h1>
    <dl>
        ' . $onlinebetaling . '
    </dl>
');
/*
<dt>Betaling med kontooverførsel</dt>
コード例 #2
0
<?php

/**
 * Der kan ikke være spærring på denne fil, for det kan IE ikke håndtere
 * over en sikker server.
 * @todo This could probably be changed now
 */
if (empty($_GET['id']) or !is_numeric($_GET['id'])) {
    trigger_error('Du kan kun Ã¥bne denne side, når der er et id', E_USER_ERROR);
    exit;
}
require 'include_elevforeningen_login.php';
$debtor_client = new IntrafacePublic_Debtor_XMLRPC_Client($credentials, false);
$pdf = $debtor_client->pdf($_GET['id']);
//$pdf = $debtor_client->get($_GET['id']);
//$pdf = $debtor_client->getList('order', $contact_array['id']);
header('Content-type: application/pdf');
header("Content-Length: " . strlen(ltrim($pdf)));
header("Content-Disposition: inline; filename=kvittering.pdf");
echo ltrim($pdf);
コード例 #3
0
<?php

require 'include_elevforeningen_login.php';
$contact_array = $auth->getContact($_SESSION['contact_id']);
$debtor_client = new IntrafacePublic_Debtor_XMLRPC_Client($credentials, false);
$orders = $debtor_client->getDebtorList('order', $contact_array['id']);
$invoices = $debtor_client->getDebtorList('invoice', $contact_array['id']);
//$debtors = array_merge($orders, $invoices);
/*
if (count($debtors) > 0) {
    // Fremstiller en liste af koloner
    foreach ($debtors as $key => $row) {
       $date[$key]  = $row['this_date'];
    //   $edition[$key] = $row['edition'];
    }

    // Sorterer 'volume' data faldende og 'edition' stigende
    // Tilf�jer $data som den sidste parameter s� sorteringen sker direkte
    // i det array.
    array_multisort($date, SORT_DESC, $debtors);
}
*/
//$debtors = array_merge($orders, $invoices);
//print_r($orders);
/*
$contact = new ContactClient(array('private_key' => $private_key), true);
$contact_array = $contact->factory('code', $_GET['password']);
$contact_array = $contact->factory('email', '*****@*****.**');
*/
/*
if (!empty($contact_array['id']) AND $contact_array['id'] > 0) {