Improve previous_summary() function.
[capital-apms.git] / html / action.php
blobfbcdb09842b7fb8511fe230b46ce25bc3745dba2
1 <?php
2 require_once('../inc/always.php');
4 require_once('classWidgets.php');
5 require_once('classBrowser.php');
6 require_once('classLinks.php');
8 param_to_global('component', '#^[a-z0-9_+-]+$#', 't');
9 param_to_global('id', '#^[0-9]+$#');
11 require_once('apms_menus.php');
13 $widget = new Widget();
14 $page_elements = array();
16 if ( isset($_POST['submit']) || $widget->IsSubmit() ) {
17 if ( ! @include( "action/process/$component.php" ) ) {
18 $c->messages[] = "action/process/$component not found";
21 if ( ! @require( "action/screen/$component.php" ) ) {
22 $c->messages[] = "action/screen/$component not found";
25 /**
26 * From here we start rendering the page to the user...
28 include('page-header.php');
30 // Page elements could be an array of viewers, browsers or something else
31 // that supports the Render() method...
32 $heading_level = null;
33 foreach( $page_elements AS $k => $page_element ) {
34 echo $page_element->Render($heading_level);
35 $heading_level = 'h2';
38 if (function_exists("post_render_function")) {
39 post_render_function();
42 if ( isset($footers) ) {
43 foreach( $footers AS $k => $footer ) {
44 echo $footer;
48 include('page-footer.php');