示例#1
0
} elseif (!$sub && $uid) {
    // Fetch the user data for $uid if there is no submitted data
    // and the user is authenticated.
    $udm->getUser($uid);
}
/* Now Output the Form.

   Any necessary changes to the form should have been registered
   before now, including any error messages, notices, or
   complete form overhauls. This can happen either within the
   $udm object, or from print() or echo() statements.

   By default, the form will include AMP's base template code,
   and any database-backed intro text to the appropriate module.

*/
$mod_id = $udm->modTemplateID;
//require_once( 'header.php' );
require_once 'AMP/Content/Buffer.php';
require_once 'AMP/System/Page/Display.php';
$page_output = "<h2>Add/Edit " . $udm->name . "</h2>" . "<font color = \"red\">" . $udm->outputErrors() . "</font>" . $udm->output();
$display = new AMP_Content_Buffer();
$display->add($page_output);
$flash = AMP_System_Flash::instance();
$fake_controller = $flash;
$complete_page =& AMP_System_Page_Display::instance($fake_controller);
$complete_page->add($flash, AMP_CONTENT_DISPLAY_KEY_FLASH);
$complete_page->add($display);
print $complete_page->execute();
// Append the footer and clean up.
//require_once( 'footer.php' );