Example #1
0
    lcm_page_start(_T('title_expense_new'), '', '', 'expenses');
}
/* TODO
show_context_start();
show_context_case_title($case, 'followups');
show_context_case_involving($case);
*/
show_context_end();
// Show the errors (if any)
echo show_all_errors();
echo '<form action="upd_exp.php" method="post">' . "\n";
$id_expense = _request('expense', 0);
$id_comment = _request('c', 0);
$status = _request('new_exp_status');
if ($status || $id_comment || _request('edit_comment')) {
    $obj_exp = new LcmExpenseInfoUI($id_expense);
    $obj_exp->printGeneral(false);
    // with minimal UI (no edit button)
    show_page_subtitle(_T('expenses_subtitle_comment'), 'expenses_comment');
    $obj_comment = new LcmExpenseCommentInfoUI($id_expense, $id_comment);
    $obj_comment->printEdit();
} else {
    $obj_exp = new LcmExpenseInfoUI(_request('expense', 0));
    $obj_exp->printEdit();
}
echo '<button name="submit" type="submit" value="submit" class="simple_form_btn">' . _T('button_validate') . "</button>\n";
echo "</form>\n";
lcm_page_end();
// Clear the errors, in case user jumps to other 'edit' page
$_SESSION['errors'] = array();
$_SESSION['form_data'] = array();
Example #2
0
	This program is distributed in the hope that it will be useful, but
	WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
	or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
	for more details.

	You should have received a copy of the GNU General Public License along
	with this program; if not, write to the Free Software Foundation, Inc.,
	59 Temple Place, Suite 330, Boston, MA  02111-1307, USA

	$Id: exp_det.php,v 1.4 2006/04/04 23:33:49 mlutfy Exp $
*/
include 'inc/inc.php';
include_lcm('inc_obj_exp');
$expense = intval(_request('expense'));
if (!($expense > 0)) {
    die("Missing id expense.");
}
lcm_page_start(_T('title_expense_view') . ' ' . _request('expense'), '', '', 'expenses_intro');
//
// Show general information
//
echo '<fieldset class="info_box">';
$obj_expense = new LcmExpenseInfoUI($expense);
$obj_expense->printGeneral();
$obj_exp_ac = new LcmExpenseAccess(0, 0, $obj_expense);
$obj_expense->printComments();
echo "</fieldset>\n";
// Clear session info
$_SESSION['form_data'] = array();
$_SESSION['errors'] = array();
lcm_page_end();