Beispiel #1
0
 function _outputLinkedList($list_class, $header)
 {
     if (!($modid = $this->getIdValue())) {
         return false;
     }
     $dbcon =& AMP_Registry::getDbcon();
     $list = new $list_class($dbcon, array('modid' => $modid));
     //$list->setTool( $modid );
     $list->suppress('sort_links');
     $list->suppress('messages');
     $list->suppress('toolbar');
     $list->drop_column('select');
     if (!($list_html = $list->execute())) {
         return false;
     }
     require_once 'AMP/System/Page/Display.inc.php';
     return AMPSystem_Page_Display::makeHeader($header) . $list_html;
 }
Beispiel #2
0
<?php

require_once 'AMP/System/Base.php';
require_once 'AMP/System/Page/Display.inc.php';
require_once 'AMP/System/Scaffold/Factory.inc.php';
$engine =& new AMPScaffold_Factory($dbcon);
$form =& $engine->buildForm();
$form_values = $form->getValues();
$result_message = "";
if ($form->submitted()) {
    $engine->setScaffoldItem($form_values['new_scaffold']);
    $engine->setDataTable($form_values['sourcetable']);
    $engine->setScaffoldItemType($form_values['new_itype']);
    $engine->setNameField($form_values['new_namefield']);
    $engine->execute();
    if (!($message = $engine->getErrors())) {
        ampredirect('/system/' . $engine->getControllerPage());
    } else {
        $result_message = "<span class='page_error'>{$message}</div>";
    }
}
include "header.php";
echo AMPSystem_Page_Display::pagetitle('New Scaffold', 'Add');
echo $result_message;
echo $form->output();
include "footer.php";