debug("using file modules/Cases/Popup_picker.html"); } else { $log->debug("_REQUEST['html'] is ".$_REQUEST['html']); $form =new XTemplate ('modules/Cases/'.$_REQUEST['html'].'.html'); $log->debug("using file modules/Cases/".$_REQUEST['html'].'.html'); } $form->assign("MOD", $mod_strings); $form->assign("APP", $app_strings); // the form key is required if(!isset($_REQUEST['form'])) die("Missing 'form' parameter"); // This code should always return an answer. // The form name should be made into a parameter and not be hard coded in this file. if($_REQUEST['form'] == 'EditView') { $the_javascript = "\n"; $button = "\n"; $button .= ""; $button .= "
 \n"; $button .= "\n"; $button .= "
\n"; } elseif(isset($_REQUEST['form_submit']) && $_REQUEST['form'] == 'DetailView' && $_REQUEST['form_submit'] == 'true') { $the_javascript = "\n"; $button = "\n"; $button .= ""; $button .= "
 \n"; $button .= "
\n"; } elseif(isset($_REQUEST['form_submit']) && $_REQUEST['form'] == 'ContactDetailView' && $_REQUEST['form_submit'] == 'true') { $the_javascript = "\n"; $button = "\n"; $button .= ""; $button .= "
 \n"; $button .= "
\n"; } elseif ($_REQUEST['form'] == 'TasksEditView') { $the_javascript = "\n"; $button = "\n"; $button .= ""; $button .= "
 \n"; $button .= "\n"; $button .= "
\n"; } $form->assign("SET_RETURN_JS", $the_javascript); $form->assign("THEME", $theme); $form->assign("IMAGE_PATH", $image_path); $form->assign("MODULE_NAME", $currentModule); if (isset($_REQUEST['form_submit'])) $form->assign("FORM_SUBMIT", $_REQUEST['form_submit']); $form->assign("FORM", $_REQUEST['form']); if (isset($_REQUEST['number'])) { $form->assign("NUMBER", $_REQUEST['number']); } if (isset($_REQUEST['name'])) { $form->assign("NAME", $_REQUEST['name']); } if (isset($_REQUEST['account_name'])) { $form->assign("ACCOUNT_NAME", $_REQUEST['account_name']); } insert_popup_header($theme); // Quick search. echo "
"; echo get_form_header($mod_strings['LBL_SEARCH_FORM_TITLE'], "", false); $form->parse("main.SearchHeader"); $form->out("main.SearchHeader"); echo get_form_footer(); $form->parse("main.SearchHeaderEnd"); $form->out("main.SearchHeaderEnd"); // Reset the sections that are already in the page so that they do not print again later. $form->reset("main.SearchHeader"); $form->reset("main.SearchHeaderEnd"); $ListView = new ListView(); $ListView->setXTemplate($form); $ListView->setHeaderTitle($mod_strings['LBL_LIST_FORM_TITLE']); $ListView->setHeaderText($button); $ListView->setQuery($where, "", "name", "CASE"); $ListView->setModStrings($mod_strings); $ListView->processListView($seed_object, "main", "CASE"); ?>