コード例 #1
0
<?php

require '../private/config.php';
require '../private/restricted.php';
require '../class/Customer.php';
$customer = new CyanideSystems\OrderSystem\Customer($_SESSION['customer_id']);
if ($customer->newCustomer($_POST['email'], $_POST['firstname'], $_POST['lastname'], $_POST['company'], $_POST['address1'], $_POST['address2'], $_POST['town'], $_POST['county'], $_POST['postcode'], $_POST['phone'], $_POST['notes'])) {
    echo '<p>Registration successful.</p>';
} else {
    echo '<p>There was an error in registering your details.</p>';
}
コード例 #2
0
<?php

require 'private/config.php';
require 'private/restricted.php';
require 'class/Customer.php';
$order = new CyanideSystems\OrderSystem\Customer($_SESSION['customer_id']);
// createProforma returns the proforma_id
if ($created = $order->createProforma($_POST)) {
    header('Location: view_proforma.php?p=' . $created);
} else {
    header('Location: order_form.php');
}
コード例 #3
0
<?php

require 'private/config.php';
require 'private/restricted.php';
require 'class/Customer.php';
$orders = new CyanideSystems\OrderSystem\Customer($_SESSION['customer_id']);
$invoices = $orders->getInvoices();
require 'template/header.php';
?>

	<main role="main">

		<section>

			<h2>Invoices</h2>
			<p>Listed below is a list of invoices which have been paid.</p>

			<table>
				<thead>
					<tr>
						<th>Invoice ID</th><th>Invoice Date</th><th>Customer ID</th><th>View Invoice</th>
					</tr>
				</thead>
				<tbody>
					<?php 
foreach ($invoices as $invoice) {
    ?>
					<tr>
						<td><?php 
    echo $invoice->invoice_id;
    ?>
コード例 #4
0
<?php

require 'private/config.php';
require 'private/restricted.php';
require 'class/Customer.php';
$products = new CyanideSystems\OrderSystem\Customer($_SESSION['customer_id']);
include 'template/header.php';
?>

	<main role="main">

		<section>

			<h2>Order Form</h2>

			<form name="order_form" action="create_proforma.php" method="post">
				<table>
					<thead>
						<tr>
							<th>SKU</th><th>Name</th><th>Price (Ex. VAT)</th><th>VAT Rate</th><th>Quantity</th>
						</tr>
					</thead>
					<tbody>
						<?php 
foreach ($products->getProducts() as $product) {
    ?>
						<tr>
							<td><?php 
    echo $product->sku;
    ?>
</td><td><?php 
コード例 #5
0
<?php

require 'private/config.php';
require 'private/restricted.php';
if (!isset($_GET['p'])) {
    header('Location: proformas.php');
}
$proforma_id = (int) $_GET['p'];
require 'class/Customer.php';
$orders = new CyanideSystems\OrderSystem\Customer($_SESSION['customer_id']);
$orders->cancelProforma($proforma_id);
header('Location: proformas.php');
コード例 #6
0
<?php

require 'private/config.php';
require 'private/restricted.php';
if (!isset($_GET['i'])) {
    header('Location: paid_invoices.php');
}
$invoice_id = (int) $_GET['i'];
require 'class/Customer.php';
$order = new CyanideSystems\OrderSystem\Customer($_SESSION['customer_id']);
$invoice = $order->getInvoiceMain($invoice_id);
$invoice_lines = $order->getInvoiceLines($invoice_id);
?>
<!doctype html>
<html lang="en-GB">
	<head>
		<meta charset="utf-8" />
		<title>invoice ID: <?php 
echo $invoice->invoice_id;
?>
</title>
		<link rel="stylesheet" href="template/assets/css/invoice.min.css" />
	</head>
	<body>
		<p class="return"><a href="invoices.php" target="_blank">[Return to Invoices]</a></p>
		<section class="page-break">
			<br />
			<header>
				<h1>invoice</h1>
				<address>
					<p>Polyverse Ltd. (T/A: Bluebelles)</p>
コード例 #7
0
<?php

require 'private/config.php';
require 'private/restricted.php';
require 'class/Customer.php';
$orders = new CyanideSystems\OrderSystem\Customer($_SESSION['customer_id']);
$unpaid_proformas = $orders->getProformas();
foreach ($unpaid_proformas as $proforma) {
    echo '<a href="view_proforma.php?p=' . $proforma->proforma_id . '">View</a>';
    echo $proforma->date;
    echo '<a href="cancel_proforma.php?p=' . $proforma->proforma_id . '">Cancel Proforma</a>';
}
コード例 #8
0
<?php

require 'private/config.php';
require 'private/restricted.php';
if (!isset($_GET['p'])) {
    header('Location: proformas.php');
}
$proforma_id = (int) $_GET['p'];
require 'class/Customer.php';
$order = new CyanideSystems\OrderSystem\Customer($_SESSION['customer_id']);
$proforma = $order->getProformaMain($proforma_id);
$proforma_lines = $order->getProformaLines($proforma_id);
?>
<!doctype html>
<html lang="en-GB">
	<head>
		<meta charset="utf-8" />
		<title>Proforma ID: <?php 
echo $proforma->proforma_id;
?>
</title>
		<link rel="stylesheet" href="template/assets/css/invoice.min.css" />
	</head>
	<body>
		<p class="return"><a href="proformas.php" target="_blank">[Return to Proformas]</a></p>
		<section class="page-break">
			<br />
			<header>
				<h1>Proforma</h1>
				<address>
					<p>Polyverse Ltd. (T/A: Bluebelles)</p>