コード例 #1
0
function alloc_process($_POST)
{
    extract($_POST);
    if (isset($back)) {
        return printSupp($_POST);
    }
}
コード例 #2
0
#http://www.accounting-123.com/a.php?a=153/GPLv3
#
#
#
#
#
#
#
#
#
#
#
require "../settings.php";
require "../libs/ext.lib.php";
# show current stock
$OUTPUT = printSupp();
require "../template.php";
# show stock
function printSupp()
{
    # Set up table to display in
    $printSupp = "<h3>Creditors Age Analysis</h3>\n    <table border=0 cellpadding='" . TMPL_tblCellPadding . "' cellspacing='" . TMPL_tblCellSpacing . "'>\n    <tr><th>Acc no.</th><th>Suppliers</th><th>Current</th><th>30 days</th><th>60 days</th><th>90 days</th><th>120 days</th><th>Total Outstanding</th></tr>";
    # connect to database
    db_connect();
    # Query server
    $i = 0;
    $sql = "SELECT * FROM suppliers ORDER BY supname ASC";
    $suppRslt = db_exec($sql) or errDie("Unable to retrieve Suppliers from database.");
    if (pg_numrows($suppRslt) < 1) {
        return "<li>There are no Suppliers in Cubit.";
    }
コード例 #3
0
#
#
#
#
#
#
#
require "settings.php";
require "libs/ext.lib.php";
require_lib("validate");
if (isset($_GET['addcontact'])) {
    $OUTPUT = AddContact();
    $OUTPUT .= printSupp($_GET);
} else {
    # show current stock
    $OUTPUT = printSupp($_GET);
}
require "template.php";
# show stock
function printSupp($_GET)
{
    # get vars
    foreach ($_GET as $key => $value) {
        ${$key} = $value;
    }
    if (isset($filter) && !isset($all)) {
        $sqlfilter = " AND lower({$filter}) LIKE lower('%{$fval}%')";
        $show = true;
    } else {
        $show = false;
        $filter = "";