Ejemplo n.º 1
0
					<option value="?plot_type=products"<?php 
echo $plot_type == 'products' ? " selected" : "";
?>
><?php 
echo l10n('cart_plot_productscount', 'Products count');
?>
</option>
				</select>
			</div>
<?php 
if (isset($imSettings['ecommerce']) && isset($imSettings['ecommerce']['database'])) {
    $dbconf = getDbData($imSettings['ecommerce']['database']['id']);
    $prefix = $imSettings['ecommerce']['database']['table'];
    $pagination_length = 15;
    $pagination_start = isset($_GET['page']) ? $_GET['page'] * $pagination_length : 0;
    $ecommerce = new ImCart();
    // Clean the temp files
    $ecommerce->deleteTemporaryFiles("../");
    if ($ecommerce->setDatabaseConnection($dbconf['host'], $dbconf['user'], $dbconf['password'], $dbconf['database'], $prefix)) {
        // Connection check
        // Build the plot data
        $json = "";
        $colors = array("rgb(250,164,58)", "rgb(96,189,104)", "rgb(77,77,77)", "rgb(93,165,218)", "rgb(241,124,176)", "rgb(222,207,63)", "rgb(178,118,178)", "rgb(178,145,47)", "rgb(241,88,84)");
        $bgcolors = array("rgba(250,164,58,0.2)", "rgba(96,189,104,0.2)", "rgba(77,77,77,0.2)", "rgba(93,165,218,0.2)", "rgba(241,124,176,0.2)", "rgba(222,207,63,0.2)", "rgba(178,118,178,0.2)", "rgba(178,145,47,0.2)", "rgba(241,88,84,0.2)");
        switch ($plot_type) {
            /**
             * -------------------
             * Non Cumulative Plot
             * -------------------
             */
            case "noncumulative":
Ejemplo n.º 2
0
function cnumber_format($number)
{
    global $imSettings;
    return number_format($number, 2) . $imSettings['ecommerce']['database']['currency'];
}
?>
<div id="imAdminPage" style="width: 80%;">
	<div id="imBody">
		<div class="imContent">
<?php 
if (isset($imSettings['ecommerce']) && isset($imSettings['ecommerce']['database'])) {
    $dbconf = getDbData($imSettings['ecommerce']['database']['id']);
    $prefix = $imSettings['ecommerce']['database']['table'];
    $pagination_length = 15;
    $pagination_start = isset($_GET['page']) ? $_GET['page'] * $pagination_length : 0;
    $ecommerce = new ImCart();
    if ($ecommerce->setDatabaseConnection($dbconf['host'], $dbconf['user'], $dbconf['password'], $dbconf['database'], $prefix)) {
        if (isset($_GET['delete'])) {
            $ecommerce->deleteOrderFromDb($_GET['delete']);
        }
        if (!isset($_GET['id'])) {
            /*
            			|-----------------------------
            			|	Show the summary table
            			|-----------------------------
            */
            $result = $ecommerce->getOrders($pagination_start, $pagination_length, @$_GET['search']);
            ?>
			<form action="orders.php" method="get" style="margin: 5px; float: right;">
				<input name="search" id="search" type="text" style="padding: 5px;" value="<?php 
            echo @$_GET['search'];
Ejemplo n.º 3
0
echo l10n('cart_availability', 'Availability');
?>
</a>
				<a class="button darkblue" href="orders-charts.php"><?php 
echo l10n('cart_order_charts', 'Charts');
?>
</a>
			</div>
		</div>
<?php 
if (isset($imSettings['ecommerce']) && isset($imSettings['ecommerce']['database'])) {
    $dbconf = getDbData($imSettings['ecommerce']['database']['id']);
    $prefix = $imSettings['ecommerce']['database']['table'];
    $pagination_length = 15;
    $pagination_start = isset($_GET['page']) ? $_GET['page'] * $pagination_length : 0;
    $ecommerce = new ImCart();
    // Clean the temp files
    $ecommerce->deleteTemporaryFiles("../");
    if ($ecommerce->setDatabaseConnection($dbconf['host'], $dbconf['user'], $dbconf['password'], $dbconf['database'], $prefix)) {
        // Connection check
        if (isset($_GET['delete'])) {
            $ecommerce->deleteOrderFromDb($_GET['delete']);
        }
        if (isset($_GET['waiting'])) {
            $ecommerce->moveOrderToWaiting($_GET['waiting']);
        }
        if (isset($_GET['inbox'])) {
            $ecommerce->moveOrderToInbox($_GET['inbox']);
        }
        if (isset($_GET['evade'])) {
            $ecommerce->evadeOrder($_GET['evade']);
Ejemplo n.º 4
0
?>
</a>
				<a class="button darkblue" href="orders-charts.php"><?php 
echo l10n('cart_order_charts', 'Charts');
?>
</a>
			</div>
		</div>
<?php 
if (isset($imSettings['ecommerce']) && isset($imSettings['ecommerce']['database'])) {
    // Global check
    $dbconf = getDbData($imSettings['ecommerce']['database']['id']);
    $prefix = $imSettings['ecommerce']['database']['table'];
    $pagination_length = 15;
    $pagination_start = isset($_GET['page']) ? $_GET['page'] * $pagination_length : 0;
    $ecommerce = new ImCart();
    // Clean the temp files
    $ecommerce->deleteTemporaryFiles("../");
    if ($ecommerce->setDatabaseConnection($dbconf['host'], $dbconf['user'], $dbconf['password'], $dbconf['database'], $prefix)) {
        // ecommerce connection
        /*
        		|-----------------------------
        		|	Show the  table
        		|-----------------------------
        */
        $results = $ecommerce->getDynamicProductsAvailabilityTable(0, 0);
        if (count($results)) {
            // Available data
            foreach ($results as $category => $data) {
                ?>
	<div class="store-product-category"><?php 
Ejemplo n.º 5
0
<?php

require_once "header.php";
?>
<div class="main-container">
	<div class="sub-container">
<?php 
if (isset($imSettings['ecommerce']) && isset($imSettings['ecommerce']['database'])) {
    $dbconf = getDbData($imSettings['ecommerce']['database']['id']);
    $prefix = $imSettings['ecommerce']['database']['table'];
    $pagination_length = 15;
    $pagination_start = isset($_GET['page']) ? $_GET['page'] * $pagination_length : 0;
    $ecommerce = new ImCart();
    // Clean the temp files
    $ecommerce->deleteTemporaryFiles("../");
    if ($ecommerce->setDatabaseConnection($dbconf['host'], $dbconf['user'], $dbconf['password'], $dbconf['database'], $prefix)) {
        if (isset($_GET['id'])) {
            if (isset($_GET['evade'])) {
                $ecommerce->evadeOrder($_GET['id']);
                header('Location: order.php?id=' . $_GET['id']);
                exit;
            }
            if (isset($_GET['exportcsv'])) {
                ob_end_clean();
                // Clear the output buffer
                $zip = $ecommerce->zipOrder($_GET['id'], "../");
                if (false !== $zip) {
                    header('Content-Description: File Transfer');
                    header('Content-Type: application/octet-stream');
                    header('Content-Disposition: attachment; filename=' . substr(basename($zip), 0, strlen(basename($zip)) - 4) . ".zip");
                    header('Expires: 0');