Пример #1
0
    $MM_fieldsStr = "name|value|description|value|publish|value";
    $MM_columnsStr = "name|',none,''|description|',none,''|publish|',none,''";
    //|$delim,$altVal,$emptyVal|  |',none,''|
    require "../Connections/insetstuff.php";
    require "../Connections/dataactions.php";
    ob_end_flush();
}
if (isset($_GET['id'])) {
    $R__MMColParam = $_GET['id'];
} else {
    $R__MMColParam = "8000000";
}
$R = $dbcon->Execute("SELECT * FROM {$table} WHERE id = {$R__MMColParam}") or die($dbcon->ErrorMsg());
$rec_id =& new Input('hidden', 'MM_recordId', $_GET['id']);
//build form
$html = $buildform->start_table('name');
$html .= $buildform->add_header('Add/Edit ' . $listtitle, 'banner');
$html .= addfield('name', 'List Name', 'text', $R->Fields("name"));
$html .= addfield('description', 'List Description', 'textarea', $R->Fields("description"));
$html .= addfield('publish', 'Publish', 'checkbox', $R->Fields("publish"), '1');
$html .= $buildform->add_content($buildform->add_btn() . ' ' . $buildform->del_btn() . $rec_id->fetch());
$html .= $buildform->end_table();
$form =& new Form();
$form->set_contents($html);
include "header.php";
if ($_GET['action'] == "list") {
    listpage($listtitle, $listsql, $fieldsarray, $filename, $orderby, $sort, $extra);
} else {
    echo $form->fetch();
}
include "footer.php";