$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";
$htmlt=$dbcon->Execute("select header2 from template where id =1 ") or DIE($dbcon->ErrorMsg()); $htmltemplate = $htmlt->Fields("header2"); $htmltemplate = str_replace("Header Image", $websitename, $htmltemplate); $htmltemplate = str_replace("navigation", $fnav, $htmltemplate); $sql = "update template set header2 = '$htmltemplate' where id=1 "; $updateit=$dbcon->Execute($sql) or DIE($dbcon->ErrorMsg()); ampredirect("articlelist.php"); } //declare form objects $rec_id = & new Input('hidden', 'MM_recordId', $_GET[id]); //build form $html = "<h2>AMP SETUP WIZARD</h2>"; $html .= $buildform->start_table('wizard'); $html .= $buildform->add_header('Site Information'); $html .= addfield('websitename','Web Site Name','text'); $html .= addfield('basepath','Website URL','text'); $html .= addfield('metadescription','Meta Description','textarea'); $html .= addfield('emfrom','System email sent from this address:','text'); $html .= addfield('emfaq','System Adminsitrators Email Address','text'); $html .= $buildform->add_header('Top Level Sections'); $html .= addfield('section1','Section Name','text'); $html .= addfield('desc_section1','Intro Text','textarea'); $html .= addfield('section2','Section Name','text'); $html .= addfield('desc_section2','Intro Text','textarea'); $html .= addfield('section3','Section Name','text'); $html .= addfield('desc_section3','Intro Text','textarea');