* @package AgileBill * @version 1.4.93 */ # create the main block function dev_block_main($VAR) { $ret = '
{translate module='.$VAR['module'].'} menu {/translate}
{translate module='.$VAR['module'].'}help_file{/translate}
'; return $ret; } ####################################################### ## create the add block ### ####################################################### function dev_block_add($VAR) { # define the field types: $field_type['text_small'] = ''; $field_type['text_medium'] =''; $field_type['text_large'] = ''; $field_type['menu'] = '{ $list->menu("", "' . $VAR['module'] . '_%%field%%", "%%table%%", "name", $VAR.' . $VAR['module'] . '_%%field%%, "form_menu") }'; $field_type['account_menu'] = '{ $list->popup("' . $VAR['module'] . '_add", "' . $VAR['module'] . '_%%field%%", $VAR.' . $VAR['module'] . '_%%field%%, "account_admin", "account", "first_name,middle_name,last_name", "form_field", "") }'; $field_type['date'] = '{ $list->calender_add("' . $VAR['module'] . '_%%field%%", $VAR.' . $VAR['module'] . '_%%field%%, "form_field") }'; $field_type['date_time'] = '{$list->date_time("")} '; $field_type['date_now'] = '{$list->date_time("")} '; $field_type['bool'] = '{ $list->bool("' . $VAR['module'] . '_%%field%%", $VAR.' . $VAR['module'] . '_%%field%%, "form_menu") }'; $ret = ' {if $form_validation} { $block->display("core:alert_fields") } {/if}
{$COOKIE_FORM}
{translate module=' . $VAR['module'] . '}title_add{/translate}
'; #loop through the fields for($i=0; $i < count($VAR["f"]); $i++) { $field = $VAR["f"]["$i"]; $type = $VAR["field"]["$field"]["field_type"]; $this_content = eregi_replace('%%field%%', $field, $field_type["$type"]); if($type == 'menu') $this_content = eregi_replace('%%table%%', $VAR["field"]["$field"]["asso_table"], $this_content); if(isset($VAR["field"]["$field"]["page_add"]["include"])) { $ret .= ' '; } } $ret .= '
{translate module=' . $VAR['module'] . '} field_' . $field . ' {/translate} ' . $this_content . '
'; return $ret; } ####################################################### ## GENERATE THE INSTALL DATA (SQL) ### ####################################################### function dev_install_xml_data($module,$module_id) { $rt = ' '; # open the backup file: $xml = ''; $xml .= $rt . '' . $rt; # generate the sql select statement: $db = &DB(); $dba = &DB(); $sql = 'SELECT * FROM '.AGILE_DB_PREFIX.''.$module.' WHERE site_id = '. $dba->qstr(DEFAULT_SITE) . ' ORDER BY id'; $resulta = $dba->Execute($sql); # check the results if($resulta != false && $resulta->RecordCount() > 0) { # get the export data: $resultarr = $resulta->GetArray(); # loop through each field for ($ii=0; $ii' . $rt; while (list ($field,$value) = each ($resultarr[$ii])) { if($value != '' && !is_integer($field)) { if( ereg('<', $value) || ereg('>', $value) || ereg('&', $value) || ereg('\'', $value) || ereg('"', $value) ) { $value = ereg_replace('&', '&', $value); $data = ' <'.$field.'>'; $xml .= $data . '' . $rt; } else { $data = ' <'.$field.'>' . $value . ''; $xml .= $data . '' . $rt; } } } $xml .= ' ' . $rt; } #################################################################### # backup the autoincrement count: #################################################################### $idmodule = $module . '_id'; $sql = 'SELECT id FROM '.AGILE_DB_PREFIX.''.$idmodule; $resulti = $db->Execute($sql); if($resulti!=false && @$resulti->RecordCount() != 0) { # get the export data: $resultarr = $resulti->GetArray(); # loop through each field for ($ii=0; $ii' . $rt; while (list ($field,$value) = each ($resultarr[$ii])) { if($value != '' && gettype($field) != 'integer') { $data = ' <'.$field.'>' . htmlspecialchars($value,0,"ISO8859-1") . ''; $xml .= $data . '' . $rt; } } $xml .= ' ' . $rt; } } } else { return false; } $xml .= ''; return $xml; } ####################################################### ## GENERATE THE INSTALL XML ### ####################################################### function dev_install_xml_gen($module,$module_id) { # get the module parent $db = &DB(); $sql = "SELECT * FROM ".AGILE_DB_PREFIX."module WHERE site_id = ".$db->qstr(DEFAULT_SITE)." AND id = ".$db->qstr($module_id); $mr = $db->Execute($sql); if( $mr->fields["parent_id"] == "" || $mr->fields["parent_id"] == "0" || $mr->fields["parent_id"] == $module_id ) { $parent = $module; } else { $db = &DB(); $sql = "SELECT * FROM ".AGILE_DB_PREFIX."module WHERE site_id = ".$db->qstr(DEFAULT_SITE)." AND id = ".$db->qstr($mr->fields["parent_id"]); $mrp = $db->Execute($sql); $parent = $mrp->fields["name"]; } # get the current settings: $t = "\t"; $n = "\n"; $C_xml = new CORE_xml; $inst = $C_xml->xml_to_array(PATH_MODULES . '' . $module . '/' . $module . '_install.xml'); # Get any dependancy $dependancy = @$inst['install']['module_properties']['dependancy']; # Get any sub_modules $sub_modules = @$inst['install']['module_properties']['sub_modules']; ################################################################# # regenerate the install file: $xml = "{$n}"; $install_xml = "". $n . "{$t}".$n . "{$t}{$t}{$module}".$n . "{$t}{$t}{$parent}".$n . "{$t}{$t}fields["notes"]}]]>{$n}"; if(!empty($mr->fields["menu_display"])) $install_xml .= "{$t}{$t}1{$n}"; if(!empty($dependancy)) $install_xml .= "{$t}{$t}{$dependancy}{$n}"; if(!empty($sub_modules)) $install_xml .= "{$t}{$t}{$sub_modules}{$n}"; $install_xml .= "{$t}" . $n . "{$t}" . $n . "{$t}{$t}" . $n; # loop through the methods $db = &DB(); $sql = "SELECT * FROM ".AGILE_DB_PREFIX."module_method WHERE site_id = ".$db->qstr(DEFAULT_SITE)." AND module_id = ".$db->qstr($module_id); $result=$db->Execute($sql); while(!$result->EOF) { $method = $result->fields['name']; $display = $result->fields['menu_display']; $notes = $result->fields['notes']; $page = trim(ereg_replace('&', '&', $result->fields['page'] ) ); $install_xml .= "{$t}{$t}{$t}<{$method}>".$n. "{$t}{$t}{$t}{$t}{$method}". $n; if(!empty($notes)) $install_xml .= "{$t}{$t}{$t}{$t}" . $n; if(!empty($page)) $install_xml .= "{$t}{$t}{$t}{$t}" . $n; if(!empty($display)) $install_xml .= "{$t}{$t}{$t}{$t}1" . $n; $install_xml .= "{$t}{$t}{$t}" . $n; $result->MoveNext(); } $install_xml .= "{$t}{$t}".$n. "{$t}".$n. ""; return $install_xml; } ####################################################### ## create the view block ### ####################################################### function dev_block_view($VAR) { # define the field types: $field_type['text_small'] = ''; $field_type['text_medium'] = ''; $field_type['text_large'] = ''; $field_type['menu'] = '{ $list->menu("", "' . $VAR['module'] . '_%%field%%", "%%table%%", "name", $'.$VAR['module'].'.%%field%%, "form_menu") }'; $field_type['account_menu'] = '{ $list->popup("' . $VAR['module'] . '_view", "' . $VAR['module'] . '_%%field%%", $'.$VAR['module'].'.%%field%%, "account_admin", "account", "first_name,middle_name,last_name", "form_field", $' . $VAR['module'] .'.id) }'; $field_type['date'] = '{ $list->calender_view("' . $VAR['module'] . '_%%field%%", $'.$VAR['module'].'.%%field%%, "form_field", $' . $VAR['module'] .'.id) }'; $field_type['date_time'] = '{ $list->calender_view("' . $VAR['module'] . '_%%field%%", $'.$VAR['module'].'.%%field%%, "form_field", $' . $VAR['module'] .'.id) }'; $field_type['date_now'] = '{$list->date_time("")} '; $field_type['bool'] = '{ $list->bool("' . $VAR['module'] . '_%%field%%", $'.$VAR['module'].'.%%field%%, "form_menu") }'; $ret = ' { $method->exe("' . $VAR["module"] . '","view") } { if ($method->result == FALSE) } { $block->display("core:method_error") } {else} {literal} {/literal} {foreach from=$' . $VAR["module"] . ' item=' . $VAR["module"] . '} {if $form_validation} { $block->display("core:alert_fields") } {/if}
{$COOKIE_FORM}
{translate module=' . $VAR['module'] . '}title_view{/translate}
'; #loop through the fields for($i=0; $i < count($VAR["f"]); $i++) { $field = $VAR["f"]["$i"]; $type = $VAR["field"]["$field"]["field_type"]; $this_content = eregi_replace('%%field%%', $field, $field_type["$type"]); if($type == 'menu') $this_content = eregi_replace('%%table%%', $VAR["field"]["$field"]["asso_table"], $this_content); if(isset($VAR["field"]["$field"]["page_view"]["include"])) { # is field changeable if(!isset($VAR["field"]["$field"]["page_view"]["type"])) { $this_content = $VAR['module'] . '.' . $field; if($type == 'bool') { $this_content = '{if $' . $this_content . ' == "1"}{translate}true{/translate}{else}{translate}false{/translate}{/if}'; } else if ($type == 'date') { $this_content = '{$list->date($' . $this_content . ')}'; } else if ($type == 'date_time' || 'date_now') { $this_content = '{$list->date_time($' . $this_content . ')}'; } else { $this_content = '{$' . $this_content .'}'; } } $ret .= ' '; } } $ret .= '
{translate module=' . $VAR['module'] . '} field_' . $field . ' {/translate} ' . $this_content . '
{/foreach} {/if} '; return $ret; } ####################################################### ## create the search_form block ### ####################################################### function dev_block_search_form($VAR) { # define the field types: $field_type['text_small'] = '   {translate}search_partial{/translate}'; $field_type['text_medium'] = '   {translate}search_partial{/translate}'; $field_type['text_large'] = '   {translate}search_partial{/translate}'; $field_type['menu'] = '{ $list->menu("", "' . $VAR['module'] . '_%%field%%", "%%table%%", "name", "all", "form_menu") }'; $field_type['account_menu'] = '{ $list->popup("' . $VAR['module'] . '_search", "' . $VAR['module'] . '_%%field%%", $VAR.' . $VAR['module'] . '_%%field%%, "account_admin", "account", "first_name,middle_name,last_name", "form_field", "") }'; $field_type['date'] = '{ $list->calender_search("' . $VAR['module'] . '_%%field%%", $VAR.' . $VAR['module'] . '_%%field%%, "form_field", "") }'; $field_type['date_time'] = '{ $list->calender_search("' . $VAR['module'] . '_%%field%%", $VAR.' . $VAR['module'] . '_%%field%%, "form_field", "") }'; $field_type['date_now'] = '{ $list->calender_search("' . $VAR['module'] . '_%%field%%", $VAR.' . $VAR['module'] . '_%%field%%, "form_field", "") }'; $field_type['bool'] = '{ $list->bool("' . $VAR['module'] . '_%%field%%", "all", "form_menu") }'; $ret = ' { $method->exe("' . $VAR["module"] . '","search_form") } { if ($method->result == FALSE) } { $block->display("core:method_error") } {else}
{$COOKIE_FORM}
{translate module=' . $VAR['module'] . '}title_search{/translate}
'; #loop through the fields for($i=0; $i < count($VAR["f"]); $i++) { $field = $VAR["f"]["$i"]; $type = $VAR["field"]["$field"]["field_type"]; $this_content = eregi_replace('%%field%%', $field, $field_type["$type"]); if($type == 'menu') $this_content = eregi_replace('%%table%%', $VAR["field"]["$field"]["asso_table"], $this_content); if(isset($VAR["field"]["$field"]["page_search_form"]["include"])) { $ret .= ' '; } } $ret .= '
{translate module=' . $VAR['module'] . '} field_' . $field . ' {/translate} ' . $this_content . '
{translate}search_results_per{/translate}
{translate}search_order_by{/translate}
{ $block->display("core:saved_searches") } { $block->display("core:recent_searches") } {/if} '; return $ret; } ####################################################### ## create the search_show block ### ####################################################### function dev_block_search_show($VAR) { $ret = ' {$method->exe("' . $VAR["module"] . '","search_show")} {if ($method->result == FALSE)} {$block->display("core:method_error")} {else} {if $results == 1} {translate results=$results}search_result_count{/translate} {else} {translate results=$results}search_results_count{/translate} {/if}
{literal} {/literal}
'; $total = 0; #count the fields for($i=0; $i < count($VAR["f"]); $i++) { $field = $VAR["f"]["$i"]; if(isset($VAR["field"]["$field"]["page_search_show"]["include"])) { $total++; } } @$width = 95 / $total; #loop through the fields for($i=0; $i < count($VAR["f"]); $i++) { $field = $VAR["f"]["$i"]; $type = $VAR["field"]["$field"]["field_type"]; $this_content = '$record.' . $field; if(isset($VAR["field"]["$field"]["page_search_show"]["include"])) { $ret.= ' '; } } $ret.= ' {foreach from=$' . $VAR["module"] . ' item=record} '; #loop through the fields for($i=0; $i < count($VAR["f"]); $i++) { $field = $VAR["f"]["$i"]; $type = $VAR["field"]["$field"]["field_type"]; $this_content = '$record.' . $field; if(isset($VAR["field"]["$field"]["page_search_show"]["include"])) { if($type == 'bool') { $this_content = '{if ' . $this_content . ' == "1"}{translate}true{/translate}{else}{translate}false{/translate}{/if}'; } else if ($type == 'date') { $this_content = '{$list->date(' . $this_content . ')}'; } else if ($type == 'date_time' || $type == 'date_now') { $this_content = '{$list->date_time(' . $this_content . ')}'; } else { $this_content = '{' . $this_content .'}'; } $ret .= ' '; } } $ret .= ' {literal} {/literal} {/foreach}
  {literal} {/literal}
 ' . $this_content . '
{if $VAR._print != TRUE}

'; if(isset($VAR['module_export_bar'])) { $ret .= '
{translate}search_export_image{/translate} {translate}search_print_image{/translate}'; //{translate}search_save_image{/translate} $ret .= ' {translate}search_new_image{/translate} {translate module='  . $VAR[
'; } $ret.= '
{/if} {/if}
'; return $ret; } ####################################################### ## GENERATE THE LANGUAGE PACKS ### ####################################################### function dev_language_xml($VAR) { $xml = ''; $language_xml = $xml . ' ' . $VAR["lang"]["name"] . ' '; # loop through the methods for($i=0; $i < count($VAR["m"]); $i++) { $method = $VAR["m"]["$i"]; $language_xml .= ' '; $title = $VAR["method"]["$method"]["block_name"]; $language_xml .= $title . ''; } $language_xml .=' ' . $VAR["lang"]["menu"] . ''; # loop through the methods for($i=0; $i < count($VAR["m"]); $i++) { $method = $VAR["m"]["$i"]; $language_xml .= ' '; $menu = $VAR["method"]["$method"]["menu_name"]; $language_xml .= $menu . ''; } $language_xml .=' '; # loop through the fields for($i=0; $i < count($VAR["f"]); $i++) { $field = $VAR["f"]["$i"]; $language_xml .=' ' . $VAR["field"]["$field"]["name"] . ''; } $pat_nl = ' '; $language_xml .=' '; return $language_xml; } ####################################################### ## GENERATE THE CONSTRUCT PHP ### ####################################################### function dev_construct_php($VAR) { $construct_php = 'module = "' . $VAR["module"] . '"; # location of the construct XML file: $this->xml_construct = PATH_MODULES . "" . $this->module . "/" . $this->module . "_construct.xml"; # open the construct file for parsing $C_xml = new CORE_xml; $construct = $C_xml->xml_to_array($this->xml_construct); $this->method = $construct["construct"]["method"]; $this->trigger = $construct["construct"]["trigger"]; $this->field = $construct["construct"]["field"]; $this->table = $construct["construct"]["table"]; $this->module = $construct["construct"]["module"]; $this->cache = $construct["construct"]["cache"]; $this->order_by = $construct["construct"]["order_by"]; $this->limit = $construct["construct"]["limit"]; } '; if (isset($VAR["method"]["add"])) { $construct_php .= ' ############################## ## ADD ## ############################## function add($VAR) { $type = "add"; $this->method["$type"] = split(",", $this->method["$type"]); $db = new CORE_database; $db->add($VAR, $this, $type); } ' ; } if (isset($VAR["method"]["view"])) { $construct_php .= ' ############################## ## VIEW ## ############################## function view($VAR) { $type = "view"; $this->method["$type"] = split(",", $this->method["$type"]); $db = new CORE_database; $db->view($VAR, $this, $type); } ' ; } if (isset($VAR["method"]["update"])) { $construct_php .= ' ############################## ## UPDATE ## ############################## function update($VAR) { $type = "update"; $this->method["$type"] = split(",", $this->method["$type"]); $db = new CORE_database; $db->update($VAR, $this, $type); } ' ; } if (isset($VAR["method"]["delete"])) { $construct_php .= ' ############################## ## DELETE ## ############################## function delete($VAR) { $db = new CORE_database; $db->mass_delete($VAR, $this, ""); } ' ; } if (isset($VAR["method"]["search"])) { $construct_php .= ' ############################## ## SEARCH FORM ## ############################## function search_form($VAR) { $type = "search"; $this->method["$type"] = split(",", $this->method["$type"]); $db = new CORE_database; $db->search_form($VAR, $this, $type); } ' ; } if (isset($VAR["method"]["search"])) { $construct_php .= ' ############################## ## SEARCH ## ############################## function search($VAR) { $type = "search"; $this->method["$type"] = split(",", $this->method["$type"]); $db = new CORE_database; $db->search($VAR, $this, $type); } ' ; } if (isset($VAR["method"]["search"])) { $construct_php .= ' ############################## ## SEARCH SHOW ## ############################## function search_show($VAR) { $type = "search"; $this->method["$type"] = split(",", $this->method["$type"]); $db = new CORE_database; $db->search_show($VAR, $this, $type); } ' ; } if (isset($VAR["method"]["search_save"])) { $construct_php .= ' ############################## ## SEARCH SAVE ## ############################## function search_save($VAR) { if ( isset($VAR["search_id"]) && isset($VAR["save_name"]) ) { if ( $VAR["search_id"] != "" && $VAR["save_name"] != "" ) { # create the record include_once(PATH_CORE . "search.inc.php"); $search = new CORE_search; $search->save($VAR["search_id"], $this->table, $VAR["save_name"]); } } } ' ; } if (isset($VAR["method"]["search_export"])) { $construct_php .= ' ############################## ## SEARCH EXPORT ## ############################## function search_export($VAR) { # require the export class require_once (PATH_CORE . "export.inc.php"); # Call the correct export function for inline browser display, download, email, or web save. if($VAR["format"] == "excel") { $type = "export_excel"; $this->method["$type"] = split(",", $this->method["$type"]); $export = new CORE_export; $export->search_excel($VAR, $this, $type); } else if ($VAR["format"] == "pdf") { $type = "export_pdf"; $this->method["$type"] = split(",", $this->method["$type"]); $export = new CORE_export; $export->search_pdf($VAR, $this, $type); } else if ($VAR["format"] == "xml") { $type = "export_xml"; $this->method["$type"] = split(",", $this->method["$type"]); $export = new CORE_export; $export->search_xml($VAR, $this, $type); } else if ($VAR["format"] == "csv") { $type = "export_csv"; $this->method["$type"] = split(",", $this->method["$type"]); $export = new CORE_export; $export->search_csv($VAR, $this, $type); } else if ($VAR["format"] == "tab") { $type = "export_tab"; $this->method["$type"] = split(",", $this->method["$type"]); $export = new CORE_export; $export->search_tab($VAR, $this, $type); } } '; } $construct_php .= ' } ?' . '' . '>'; return $construct_php; } ####################################################### ## GENERATE THE CONSTRUCT XML ### ####################################################### function dev_construct_xml($VAR) { $xml = ''; $construct_xml = $xml . ' ' . $VAR["module"] . ' ' . $VAR["table"] . '
' . $VAR["dependancy"] . ' ' . $VAR["cache"] . ' ' . $VAR["order_by"] . ' ' . $VAR["limit"] . ' '; # loop through the fields for($i=0; $i < count($VAR["f"]); $i++) { $field = $VAR["f"]["$i"]; $construct_xml .= ' <' . $field . '>'; if (isset($VAR["field"]["$field"]["type"])) $construct_xml .= ' '. $VAR["field"]["$field"]["type"] .''; if (isset($VAR["field"]["$field"]["min_len"])) $construct_xml .= ' '. $VAR["field"]["$field"]["min_len"] .''; if (isset($VAR["field"]["$field"]["max_len"])) $construct_xml .= ' '. $VAR["field"]["$field"]["max_len"] .''; if (isset($VAR["field"]["$field"]["def_len"])) $construct_xml .= ' '. $VAR["field"]["$field"]["def_len"] .''; if (isset($VAR["field"]["$field"]["pdf_width"])) $construct_xml .= ' '. $VAR["field"]["$field"]["pdf_width"] .''; if (isset($VAR["field"]["$field"]["default"])) $construct_xml .= ' '. $VAR["field"]["$field"]["default"] .''; if (isset($VAR["field"]["$field"]["asso_table"])) $construct_xml .= ' '. $VAR["field"]["$field"]["asso_table"] .''; if (isset($VAR["field"]["$field"]["asso_field"])) $construct_xml .= ' '. $VAR["field"]["$field"]["asso_field"] .''; if (isset($VAR["field"]["$field"]["validate"])) $construct_xml .= ' '. $VAR["field"]["$field"]["validate"] .''; if (isset($VAR["field"]["$field"]["convert"])) $construct_xml .= ' '. $VAR["field"]["$field"]["convert"] .''; if (isset($VAR["field"]["$field"]["unique"])) $construct_xml .= ' '. $VAR["field"]["$field"]["unique"] .''; if (isset($VAR["field"]["$field"]["index"])) $construct_xml .= ' '. $VAR["field"]["$field"]["index"] .''; $construct_xml .= ' '; } $construct_xml .= ' '; # loop through the methods for($i=0; $i < count($VAR["m"]); $i++) { $method = $VAR["m"]["$i"]; $construct_xml .= ' <' . $method . '>id'; $arr = $VAR["method"]["$method"]; $ii = 0; while (list($key, $value) = each($arr)) { if($value == 1) { if (($ii != 0) && ($key != 'method_display')) { $construct_xml .= ','; $construct_xml .= $key; } } $ii++; } $construct_xml .= ''; } $construct_xml .= ' '; # loop through the methods for($i=0; $i < count($VAR["m"]); $i++) { $method = $VAR["m"]["$i"]; $construct_xml .= ' <' . $method . '>'; $arr = $VAR["method"]["$method"]; $ii = 0; if(isset($VAR["method"]["$method"]["trigger_success"])) if($VAR["method"]["$method"]["trigger_success"] != '') { $construct_xml .= ' ' . $VAR["method"]["$method"]["trigger_success"] . ''; } if(isset($VAR["method"]["$method"]["trigger_failure"])) if($VAR["method"]["$method"]["trigger_failure"] != '') { $construct_xml .= ' ' . $VAR["method"]["$method"]["trigger_failure"] . ''; } $construct_xml .= ' '; } $construct_xml .= '
'; return $construct_xml; } ####################################################### ## GENERATE THE INSTALL XML ### ####################################################### function dev_install_xml($VAR) { $xml = ''; $install_xml = $xml . ' ' . $VAR["module"] . ' ' . $VAR["module_parent"] . ' ' . $VAR["module_notes"] . ' ' . $VAR["module_menu_display"] . ' ' . $VAR["dependancy"] . ' '. $VAR["module_sub_module"] .' '; /* for($i=0; $i < count($VAR["group_type"]); $i++) { if($VAR["group_type"]["$i"] != '') { $install_xml .=' <' . $VAR["group_type"]["$i"] . '>1'; } else { $install_xml .=' <' . $VAR["group_type"]["$i"] . '>0'; } } */ $install_xml .= ' '; # loop through the methods for($i=0; $i < count($VAR["m"]); $i++) { $method = $VAR["m"]["$i"]; if(isset($VAR["method"]["$method"]["method_notes"])) { $notes = $VAR["method"]["$method"]["method_notes"]; } else { $notes = ''; } if(isset($VAR["method"]["$method"]["method_page"])) { $page = $VAR["method"]["$method"]["method_page"]; } else { $page = ''; } if(isset($VAR["method"]["$method"]["method_display"])) { $display = $VAR["method"]["$method"]["method_display"]; } else { $display = ''; } $page = eregi_replace('&','&', $page); $install_xml .= ' <' . $method . '> %%module_id%% ' . $method . ' ' . $notes . ' ' . $page . ' ' . $display . ' '; if($method == 'search') { $install_xml .= ' %%module_id%% search_form Allow users to view the search form %%module_id%% search_show Allow users to view the search results '; } } $install_xml .= ' '; return $install_xml; } ?>