Beispiel #1
0
                </div>
            </div>
            <?php 
} else {
    $userdata = getFullInvoiceData($_GET['id']);
    ?>
		        <div class="container">
	                <div class="row">
	                    <div class="twelve columns">
		                    <div class="element" id="invoice--options">
			                    <h5>Details factuur: <i><?php 
    echo $_GET['id'];
    ?>
</i></h5>
			                    <p>Een rij factuur opties</p>
		                    </div>
		                    <div class="element" id="invoice"> 
				                <?php 
    echo showInvoice($_GET['id']);
    ?>
							</div>
	                    </div>
	                </div>
		        </div>
		    <?php 
}
?>
        </div>
    </div>
 <?php 
require 'footer.php';
Beispiel #2
0
        if (updateMemberPublish($_SESSION['loginID'])) {
            $msg[] = 'Information de publication mise à jour.';
        } else {
            $err[] = 'Erreur pour la mise à jour des informations de publication.';
        }
    }
}
// end update
// we should ask login or show the member information?
if (!isset($_SESSION['loginID'])) {
    $document_title = 'Connexion Membre';
    include '../header.php';
    showErr($err);
    showMsg($msg);
    showLoginForm();
    include '../footer.php';
} else {
    $document_title = 'Fiche Membre';
    include '../header.php';
    showErr($err);
    showMsg($msg);
    showMemberInfo($_SESSION['loginID']);
    showMemberChangePassword();
    showInvoice($_SESSION['loginID']);
    showMemberPublish($_SESSION['loginID']);
    echo '<div class="command">
      <p><a href="?action=logoff">Se déconnecter</a></p>
      <p><a href="mailto:membership@facil.qc.ca">Contacter Facil</a></p>
    </div>';
    include '../footer.php';
}
Beispiel #3
0
                    <div class="four columns original-width">
                        <p>&nbsp;</p>
                    </div>
                    <div class="eight columns">
                        <div class="element">
                            <h1>Mijn Facturen</h1>

                            <p>Selecteer hier rechts een factuur om deze te bekijken<!-- , te downloaden of opnieuw per e-mail te versturen-->.</p>
                        </div>
                        
                        <?php 
if (isset($_GET['no'])) {
    $invoice = showInvoice($_GET['no']);
    $invoiceData = getFullInvoiceData($_GET['no']);
} else {
    $invoice = showInvoice();
    $invoiceData = getFullInvoiceData();
}
if ($invoiceData['invoice_recipient'] == $_SESSION['user_num']) {
    echo $invoice;
    ?>
							
                        
					</div>
					<?php 
} else {
    ?>
							<div class="element">
								<h1>Error!</h1>
								<p>403 no access. Selecteer links een van de facturen.</p>
							</div>
Beispiel #4
0
function createInvoice($data)
{
    global $dbh;
    $userdata = getUserData($data['userid']);
    $recipient = $data['userid'];
    $address = json_encode(array($userdata[15], $userdata[14], $userdata[9], "{$userdata[10]} {$userdata[11]}", $userdata[12]));
    $products = json_encode($data['products']);
    $subTotal = 0;
    $invoicedate = date("Y-m-d H:i:s", strtotime($data['invoice_date']));
    $invoiceduedate = date("Y-m-d H:i:s", strtotime('+14 days', strtotime($data['invoice_date'])));
    foreach ($data['products'] as $product) {
        $subTotal += $product[2] * $product[1];
    }
    $tax = 0.21 * $subTotal;
    $grandTotal = $subTotal + $tax;
    $sth = $dbh->prepare("\n\tINSERT INTO invoice_invoices (invoice_recipient, invoice_date, invoice_products, invoice_status, invoice_subtotal, invoice_tax, invoice_total, invoice_duedate, invoice_adress, invoice_number, invoice_ordernum) VALUES (:invoice_recipient, :invoice_date, :invoice_products, '0', :invoice_subtotal, :invoice_tax, :invoice_total, :invoice_duedate, :invoice_adress, :invoice_number, :invoice_ordernum);");
    $sth->bindParam(':invoice_recipient', $recipient, PDO::PARAM_STR);
    $sth->bindParam(':invoice_products', $products, PDO::PARAM_STR);
    $sth->bindParam(':invoice_subtotal', $subTotal, PDO::PARAM_INT);
    $sth->bindParam(':invoice_tax', $tax, PDO::PARAM_INT);
    $sth->bindParam(':invoice_total', $grandTotal, PDO::PARAM_INT);
    $sth->bindParam(':invoice_adress', $address, PDO::PARAM_STR);
    $sth->bindParam(':invoice_date', $invoicedate, PDO::PARAM_STR);
    $sth->bindParam(':invoice_duedate', $invoiceduedate, PDO::PARAM_STR);
    $sth->bindParam(':invoice_number', $data['invoice_number'], PDO::PARAM_INT);
    $sth->bindParam(':invoice_ordernum', $data['order_number'], PDO::PARAM_INT);
    $sth->execute();
    sendMail($userdata['user_email'], "Uw Factuur van D3 Creative Agency", "Beste {$userdata[14]},<br/><br/><div>In je account <strong>{$userdata['user_login']}</strong> is een nieuwe factuur voor je aangemaakt met factuurnummer {$data['invoice_number']}. We hebben de factuur ook onderaan dit bericht toegevoegd.<br/><br/>Je hebt aangegeven gebruik te willen maken van overboeking. Let er op dat de factuur op tijd word betaald op om pauzering van je diensten te voorkomen.<br/><br/>Voor eventuele vragen kan je ons altijd bereiken via <a href=\"mailto:sem@thisisd3.com\">sem@thisisd3.com</a> of via de knop 'Contact' in je <a href=\"http://cp.thisisd3.com/contact/\">controlepaneel</a>.<br/></div><p>Met vriendelijke groet,<br/><br />D3 - Creative Agency<br /></p><br><br><hr><br><br>" . showInvoice($data['invoice_number']));
    global $invoiceCreateOk;
    $invoiceCreateOk = "Factuur is toegevoegd! En ge-e-mailed naar <i>{$userdata['user_email']}</i>";
}