[L]Interchange Help:[/L] [scratch help_title]

[if-mm !logged_in] [bounce page="__UI_BASE__/login"] [/if-mm] [comment] There are 3 special help keys: home, faq, and 404. They have editable database entries like any other, but the keys get special handling here. One special token can be used in the helptext: ~~HELP_TOPICS~~. It's replaced with an HTML list of links to all help topics except the three listed above and whatever the current topic is. [/comment] [tmpn fontface]Verdana, Arial, Helvetica, sans-serif[/tmpn] [calcn] my $topic = $CGI->{topic}; # This is a grievous hack made necessary by Apache mod_rewrite, which # re-urlencodes query strings on a rewrite. $topic =~ s/\%([0-9a-f]{2})/chr(hex($1))/aieg; # Scrub user-supplied help topic once for whole page to prevent XSS (CVE-2020-12685) $topic =~ s/[^\w.]//ag; $Scratch->{help_orig} = $topic; $Tag->tmpn(help_key => $topic); return; [/calcn] [if !scratch help_key] [tmpn help_key]home[/tmpn] [/if] [if type=data term="@_UI_HELP_TABLE_@::code::[scratch help_key]" op=eq compare=""] [tmpn help_key]404[/tmpn] [/if] [tmp help_title] [either] [data table=@_UI_HELP_TABLE_@ field=title key="[scratch help_key]"] [or] [scratch help_key] [/either] [/tmp] [tmp help_text] [either] [data table=@_UI_HELP_TABLE_@ field=helptext key="[scratch help_key]"] [or]

[L]No help text has been entered yet for the key[/L] '[scratch help_key]'.

[L]Perhaps one of these topics will be helpful:[/L]

~~HELP_TOPICS~~ [/either] [/tmp] [calc] if ($CGI->{help_search}) { $Scratch->{help_text} =~ s/~~HELP_TOPICS~~//; } else { $Scratch->{help_text} =~ m/~~HELP_TOPICS~~/ and $CGI->{do_index} = 1; } $Scratch->{help_text} =~ s{(area({ href => '@@MV_PAGE@@', form => "topic=$2" }) . '"'}gies; return; [/calc] @_UI_STD_INIT_@

[form-session-id]
[if scratch help_key ne 'home'] [page href="@@MV_PAGE@@" form="topic=home"]Home [/if] [if scratch help_key ne 'faq'] [page href="@@MV_PAGE@@" form="topic=faq"]FAQ [/if] [if scratch help_orig] [page href=admin/flex_editor form=" mv_data_table=ichelp item_id=[scratch help_orig] display_class=type5 ui_return_to=admin/help ui_return_to=topic=[scratch help_orig] "]edit this help topic ([scratch help_orig]) [/if] | [L]Back[/L] [L]Close[/L]

[if cgi help_search] [loop search=" fi=ichelp.txt st=text se=[cgi name=help_search filter=oneline keep=1] rf=code,title ml=10 " form="help_search=1" more=1]

[list]
1. [page href="@@MV_PAGE@@" form="topic=[loop-code]"][loop-param title] [/list]

[no-match] No help found for [cgi name=help_search filter="oneline entities" keep=1]. [/no-match] [more-list] [more] [/more-list] [/loop] [/if] [if cgi do_index] [tmp help_topics]

[search-region more=1 form="topic=[scratch help_key]" search=" fi=@_UI_HELP_TABLE_@ ml=20 sp=@@MV_PAGE@@ rf=code,title tf=title co=1 ne=1 sf=code se=faq ne=1 sf=code se=404 ne=1 sf=code se=home ne=1 sf=code se=[scratch help_key] "] [search-list]
- [page href="@@MV_PAGE@@" form="topic=[item-code]"][item-param title] [/search-list]

[more-list]More help topics: [more][/more-list] [/search-region] [/tmp] [calc] $Scratch->{help_text} =~ s/~~HELP_TOPICS~~/$Scratch->{help_topics}/g; return; [/calc] [/if]

## [scratch help_title]

[scratch help_text]

Interchange © [time]%Y[/time] Interchange Development Group close this window