コード例 #1
0
ファイル: details.php プロジェクト: dadigo/simpleinvoices
#get custom field labels
$customFieldLabel = getCustomFieldLabels();
$invoices = getCustomerInvoices($customer_id);
//$start = (isset($_POST['start'])) ? $_POST['start'] : "0" ;
$dir = "DESC";
$sort = "id";
$rp = isset($_POST['rp']) ? $_POST['rp'] : "25";
$having = 'money_owed';
$page = isset($_POST['page']) ? $_POST['page'] : "1";
//$sql = "SELECT * FROM ".TB_PREFIX."invoices LIMIT $start, $limit";
$invoice_owing = new invoice();
$invoice_owing->sort = $sort;
$invoice_owing->having_and = "real";
$invoice_owing->query = $_REQUEST['query'];
$invoice_owing->qtype = $_REQUEST['qtype'];
$large_dataset = getDefaultLargeDataset();
if ($large_dataset == $LANG['enabled']) {
    $sth = $invoice_owing->select_all('large_count', $dir, $rp, $page, $having);
} else {
    $sth = $invoice_owing->select_all('', $dir, $rp, $page, $having);
}
$invoices_owing = $sth->fetchAll(PDO::FETCH_ASSOC);
//$customFieldLabel = getCustomFieldLabels("biller");
$smarty->assign("stuff", $stuff);
$smarty->assign('customer', $customer);
$smarty->assign('invoices', $invoices);
$smarty->assign('invoices_owing', $invoices_owing);
$smarty->assign('customFieldLabel', $customFieldLabel);
$smarty->assign('pageActive', 'customer');
$subPageActive = $_GET['action'] == "view" ? "customer_view" : "customer_edit";
$smarty->assign('subPageActive', $subPageActive);
コード例 #2
0
ファイル: manage.php プロジェクト: dadigo/simpleinvoices
<?php

//stop the direct browsing to this file - let index.php handle which files get displayed
checkLogin();
//gets the long language name out of the short name
$lang = getDefaultLanguage();
$languages = getLanguageList();
foreach ($languages as $language) {
    if ($language->shortname == $lang) {
        $lang = $language->name;
        break;
    }
}
$smarty->assign("defaults", getSystemDefaults());
$smarty->assign("defaultBiller", getDefaultBiller());
$smarty->assign("defaultCustomer", getDefaultCustomer());
$smarty->assign("defaultTax", getDefaultTax());
$smarty->assign("defaultPreference", getDefaultPreference());
$smarty->assign("defaultPaymentType", getDefaultPaymentType());
$smarty->assign("defaultDelete", getDefaultDelete());
$smarty->assign("defaultLogging", getDefaultLogging());
$smarty->assign("defaultInventory", getDefaultInventory());
$smarty->assign("defaultProductAttributes", getDefaultProductAttributes());
$smarty->assign("defaultLargeDataset", getDefaultLargeDataset());
$smarty->assign("defaultLanguage", $lang);
$smarty->assign('pageActive', 'system_default');
$smarty->assign('active_tab', '#setting');