예제 #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' );
예제 #2
0
<?php

require_once 'AMP/BaseDB.php';
require_once 'AMP/System/Config/Form.php';
require_once 'AMP/System/Page/Display.php';
$config_form = new AMP_System_Config_Form('public');
$config_form->Build();
$config_form->applyDefaults();
$display = AMP_System_Page_Display::instance($config_form);
$flash = AMP_System_Flash::instance();
$display->add($flash, AMP_CONTENT_DISPLAY_KEY_FLASH);
$display->add($config_form);
print $display->execute();
예제 #3
0
<?php

require_once 'AMP/System/Base.php';
require_once 'AMP/System/Page/Menu.inc.php';
require_once 'AMP/System/Page/Display.php';
$id = isset($_GET['id']) && $_GET['id'] ? $_GET['id'] : 'home';
$menu = new AMP_System_Page_Menu($id);
$display = new AMP_System_Page_Display(AMP_Registry::instance());
$display->add($menu);
print $display->execute();
예제 #4
0
 function _send_preview_link_to_bottom()
 {
     //lower preview link
     $page = AMP_System_Page_Display::instance();
     $page->setDisplayOrder(array(AMP_CONTENT_DISPLAY_KEY_FLASH, AMP_CONTENT_DISPLAY_KEY_INTRO, AMP_CONTENT_DISPLAY_KEY_BUFFER, 'form', 'preview_link'));
 }