if (isset($_GET['id'])) {
     // Check to see if an id was passed in get.  If so, retrieve that section from
     // the database, and perform an edit on it.
     $section = $db->selectObject('section', 'id=' . intval($_GET['id']));
     $check_id = $section->id;
 } else {
     if (isset($_GET['parent'])) {
         // The isset check is merely a precaution.  This action should
         // ALWAYS be invoked with a parent or id value in the GET.
         $section->parent = intval($_GET['parent']);
         $check_id = $section->parent;
         //$section->parent = $db->selectObject('section','parent='.intval($_GET['parent']));
     }
 }
 if (exponent_permissions_check('manage', exponent_core_makeLocation('NavigationModule', '', $check_id))) {
     $form = section::form($section);
     $form->meta('module', 'NavigationModule');
     $form->meta('action', 'save_contentpage');
     // Create a template for the form output, to allow the themer to optionally
     // change the form titles and captions, and to aide in translation.
     $template = new template('NavigationModule', '_form_editContentPage');
     // Assign the concentional 'is_edit' flag to let the view show different text to the
     // use in case of a create and an edit operation.
     $template->assign('is_edit', isset($section->id));
     // Assign the form/s rendered HTML to the template, using the customary
     // name of 'form_html'
     $template->assign('form_html', $form->toHTML());
     $template->output();
 } else {
     // User does not have permission to manage sections.  Throw a 403
     echo SITE_403_HTML;