コード例 #1
0
ファイル: edit.php プロジェクト: jewelhuq/myitcrm1
<?php

// Load the Expense Functions
require_once 'include.php';
// Load the Translations for this Module
if (!xml2php('expense')) {
    $smarty->assign('error_msg', "Error in language file");
}
// Load PHP Language Translations
$langvals = gateway_xml2php('expense');
// Load expense details
$expense_details = display_expense_info($db, $VAR['expenseID']);
// If details submitted run update values, if not set load edit.tpl and populate values
if (isset($VAR['submit'])) {
    if (!update_expense($db, $VAR)) {
        force_page('expense', 'edit&error_msg=Falied to Update Expense Information&expenseID=' . $VAR['expenseID']);
        exit;
    } else {
        force_page('expense', 'expense_details&expenseID=' . $VAR['expenseID'] . '&page_title=' . $langvals['expense_details_title']);
        exit;
    }
} else {
    $smarty->assign('expense_details', $expense_details);
    $smarty->display('expense' . SEP . 'edit.tpl');
}
コード例 #2
0
ファイル: expense_details.php プロジェクト: jewelhuq/myitcrm1
<?php

// Load the Expense Functions
require_once 'include.php';
// Load the Translations for this Module
if (!xml2php('expense')) {
    $smarty->assign('error_msg', "Error in language file");
}
// Assign the arrays
$smarty->assign('expense_details', display_expense_info($db, $VAR['expenseID']));
$smarty->display('expense' . SEP . 'expense_details.tpl');