コード例 #1
0
ファイル: acumulus.php プロジェクト: 0100Dev/WHMCS-Acumulus
function acumulus_output($vars)
{
    if (isset($_GET['sync'])) {
        if (acumulus_sync($vars)) {
            return;
        }
    }
    ?>
    <h2>Openstaande facturen (van creditors)</h2>
    <table id="sortabletbl2" class="datatable" width="100%" border="0" cellspacing="1" cellpadding="3">
        <tr>
            <th width="20">
                <input type="checkbox" onclick="$('#sortabletbl2 .checkall').attr('checked',this.checked);">
            </th>
            <th width="150">Datum</th>
            <th>Contact</th>
            <th width="200">Rekening</th>
            <th width="200">Bedrag</th>
            <th width="150">&nbsp;</th>
        </tr>
        <tr>
            <?php 
    function invoice($entry)
    {
        ?>
        <tr>
            <td><input type="checkbox" name="selectedRequests[]" value="<?php 
        echo $entry['entryid'];
        ?>
"
                       class="checkall"></td>
            <td><?php 
        echo $entry['issuedate'];
        ?>
</td>
            <td><?php 
        echo $entry['contactid'];
        ?>
 - <?php 
        echo $entry['contactname'];
        ?>
</td>
            <td><?php 
        echo $entry['accountnumber'];
        ?>
</td>
            <td><?php 
        echo $entry['amount'];
        ?>
</td>
            <td>
                <a href="https://www.sielsystems.nl/acumulus/editboeking.php?boeking_ID=<?php 
        echo $entry['entryid'];
        ?>
"
                   onclick="javascript:void window.open('https://www.sielsystems.nl/acumulus/editboeking.php?boeking_ID=<?php 
        echo $entry['entryid'];
        ?>
','boeking wijzigen','width=820,height=700,toolbar=0,menubar=0,location=0,status=1,scrollbars=1,resizable=1,left=0,top=0');return false;">Bekijk</a>
            </td>
        </tr>
        <?php 
    }
    $api = new api($vars['code'], $vars['username'], $vars['password']);
    $api->setCategory('reports')->setAction('report_unpaid_creditors');
    $api->execute();
    $response = $api->getResponse();
    if ($api->hasErrors()) {
        ?>
            <td colspan="6" align="middle">
                <strong>Error(s) on API</strong><br/>
                <?php 
        foreach ($api->getErrors() as $error) {
            echo $error['code'] . ' | ' . $error['message'] . '<br/>';
        }
        ?>
            </td>
            <?php 
    } else {
        if (isset($response['unpaidcreditorinvoices']['entry'][0])) {
            foreach ($response['unpaidcreditorinvoices']['entry'] as $entry) {
                invoice($entry);
            }
        } else {
            if (isset($response['unpaidcreditorinvoices']['entry'])) {
                invoice($response['unpaidcreditorinvoices']['entry']);
            } else {
                ?>
                    <td colspan="6" align="middle">
                        Geen openstaande facturen
                    </td>
                    <?php 
            }
        }
    }
    ?>
        </tr>
    </table><br/><br/>

    <h1>Acumulus - Tools</h1>

    <?php 
    if (isset($_POST['sync_vat'])) {
        acumulus_sync_vat($vars);
    }
    ?>

    <form action="" method="POST">
        <input type="submit" name="sync_vat" value="Synchroniseer VAT"/>
    </form>

    <?php 
    if (!isset($vars['hide_sync']) || empty($vars['hide_sync'])) {
        ?>
        <h2>Synchroniseer reeds betaalde facturen</h2>
        <form action="" method="POST">
            Van <input type="text" name="sync_start" size="15" value="" class="datepick"> &nbsp;&nbsp; tot <input
                type="text" name="sync_end" size="15" value="" class="datepick">.<br/>
            <input type="submit" name="start_sync" value="Synchroniseer"/> (Er zal een popup open, sluit deze niet!)
        </form>
        <?php 
    }
}
コード例 #2
0
    $key = strtolower($_REQUEST["key"]);
    switch ($key) {
        case "stock_out":
            $OUTPUT = stock_out();
            break;
        case "stock_update":
            $OUTPUT = stock_update();
            break;
        case "print":
            $OUTPUT = print_slip();
            break;
        case "dispatch_out":
            $OUTPUT = dispatch_out();
            break;
        case "invoice":
            $OUTPUT = invoice();
            break;
        case "quote":
            $OUTPUT = fromQuote();
            break;
    }
} else {
    $OUTPUT = stock_out();
}
$OUTPUT .= mkQuickLinks(ql(SELF . "?key=stock_out", "Create Picking Slip"), ql(SELF . "?key=dispatch_out", "Picking Slip Dispatch"), ql("stock-add.php", "Add Stock"));
require "template.php";
function stock_out($error = "")
{
    extract($_REQUEST);
    if (!isset($slip_id)) {
        $sql = "INSERT INTO cubit.pick_slips (user_id) VALUES ('" . USER_ID . "')";
コード例 #3
0
ファイル: check.php プロジェクト: pendi/nadi_watch
<?php

$act = $_GET['act'];
include "koneksi.php";
require_once "Mail/Mail/Mail.php";
require_once "Mail/Mail/mime.php";
$invoice = invoice();
if (!isset($_SESSION['transaksi'])) {
    $idt = date("YmdHis");
    $_SESSION['transaksi'] = $idt;
}
$idt = $_SESSION['transaksi'];
if (isset($_GET['id'])) {
    $id = $_GET['id'];
} else {
    $id = "";
}
if ($act == "footer") {
    if (isset($_SESSION['user'])) {
        echo "<script>window.location = 'index.php?list=4&act=admin';</script>";
    } else {
        echo "<script>window.location = 'index.php?list=5&head=admin';</script>";
    }
} elseif ($act == "admin") {
    if (!isset($_SESSION['user'])) {
        echo "<script>window.alert('Anda Harus Login Dulu');</script>";
        echo "<script>window.location = 'index.php?list=5&head=admin';</script>";
    } else {
        if ($_SESSION['user']['level'] == "super admin") {
            echo "<script>window.location = 'index.php?list=6&head=admin';</script>";
        } elseif ($_SESSION['user']['level'] == "admin") {