Example #1
0
<?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');
Example #2
0
*
* License:
*	 GPL v2 or above
*
* Website:
* 	http://www.simpleinvoices.org
*/
//stop the direct browsing to this file - let index.php handle which files get displayed
checkLogin();
$billers = getActiveBillers();
$customers = getActiveCustomers();
$taxes = getTaxes();
$products = getActiveProducts();
$preferences = getActivePreferences();
$defaults = getSystemDefaults();
$defaultBiller = getDefaultBiller();
$defaultCustomerID = isset($_GET['customer_id']) ? $_GET['customer_id'] : getDefaultCustomer();
$defaultTax = getDefaultTax();
$defaultPreference = getDefaultPreference();
if (!empty($_GET['get_num_line_items'])) {
    $dynamic_line_items = $_GET['get_num_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, CONCAT(a.name, '-',v.value) as display from " . TB_PREFIX . "products_attributes a, " . TB_PREFIX . "products_values v where a.id = v.attribute_id;";
$sth = dbQuery($sql);
$matrix = $sth->fetchAll();
$smarty->assign("matrix", $matrix);