コード例 #1
0
ファイル: invoice.php プロジェクト: dadigo/simpleinvoices
checkLogin();
$billers = getActiveBillers();
$customers = getActiveCustomers();
$taxes = getActiveTaxes();
$products = getActiveProducts();
$preferences = getActivePreferences();
$defaults = getSystemDefaults();
if ($billers == null or $customers == null or $taxes == null or $products == null or $preferences == null) {
    $first_run_wizard = true;
    $smarty->assign("first_run_wizard", $first_run_wizard);
}
$defaults['biller'] = isset($_GET['biller']) ? $_GET['biller'] : $defaults['biller'];
$defaults['customer'] = isset($_GET['customer']) ? $_GET['customer'] : $defaults['customer'];
$defaults['preference'] = isset($_GET['preference']) ? $_GET['preference'] : $defaults['preference'];
$defaultTax = getDefaultTax();
$defaultPreference = getDefaultPreference();
if (!empty($_GET['line_items'])) {
    $dynamic_line_items = $_GET['line_items'];
} else {
    $dynamic_line_items = $defaults['line_items'];
}
for ($i = 1; $i <= 4; $i++) {
    $show_custom_field[$i] = show_custom_field("invoice_cf{$i}", '', "write", '', "details_screen", '', '', '');
}
$sql = "SELECT CONCAT(a.id, '-', v.id) as id\n\t\t\t , CONCAT(a.name, '-',v.value) AS display \n\t\tFROM " . TB_PREFIX . "products_attributes a \n\t\t\tLEFT JOIN " . TB_PREFIX . "products_values v \n\t\t\t\tON (a.id = v.attribute_id);";
$sth = dbQuery($sql);
$matrix = $sth->fetchAll();
$smarty->assign("matrix", $matrix);
$smarty->assign("billers", $billers);
$smarty->assign("customers", $customers);
$smarty->assign("taxes", $taxes);
コード例 #2
0
ファイル: manage.php プロジェクト: alachaum/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("defaultLanguage", $lang);
$smarty->assign('pageActive', 'system_default');
$smarty->assign('active_tab', '#setting');