"); SDV($InputTags['text']['class'], 'inputbox'); SDV($InputTags['password']['class'], 'inputbox'); SDV($InputTags['submit']['class'], 'inputbutton'); SDV($InputTags['reset']['class'], 'inputbutton'); # (:input form:) SDVA($InputTags['form'], array( ':args' => array('action', 'method'), ':html' => "
", 'method' => 'post')); # (:input end:) SDV($InputTags['end'][':html'], '
'); # (:input textarea:) SDVA($InputTags['textarea'], array( ':html' => "")); # (:input image:) SDV($InputTags['image'][':args'], array('name', 'src', 'alt')); Markup('input', 'directives', '/\\(:input\\s+(\\w+)(.*?):\\)/ei', "InputMarkup(\$pagename, '$1', PSS('$2'))"); function InputMarkup($pagename, $type, $args) { global $InputTags, $InputAttrs, $InputValues, $FmtV; if (!@$InputTags[$type]) return "(:input $type $args:)"; $opt = array_merge($InputTags[$type], ParseArgs($args)); $args = @$opt[':args']; if (!$args) $args = array('name', 'value'); while (count(@$opt['']) > 0 && count($args) > 0) $opt[array_shift($args)] = array_shift($opt['']); foreach ((array)@$opt[''] as $a) if (!isset($opt[$a])) $opt[$a] = $a; if (!isset($opt['value']) && isset($InputValues[@$opt['name']])) $opt['value'] = $InputValues[$opt['name']]; $attr = array(); foreach ($InputAttrs as $a) { if (!isset($opt[$a])) continue; $attr[] = "$a='".str_replace("'", ''', $opt[$a])."'"; } $FmtV['$InputFormArgs'] = implode(' ', $attr); $out = FmtPageName($opt[':html'], $pagename); return Keep($out); } ## Form-based authorization prompts (for use with PmWikiAuth) SDVA($InputTags['auth_form'], array( ':html' => "
\$PostVars")); SDV($AuthPromptFmt, array(&$PageStartFmt, 'page:$SiteGroup.AuthForm', "", &$PageEndFmt)); ## The section below handles specialized EditForm pages. ## We don't bother to load it if we're not editing. if ($action != 'edit') return; SDV($PageEditForm, '$SiteGroup.EditForm'); SDV($PageEditFmt, '$EditForm'); if (@$_REQUEST['editform']) { $PageEditForm=$_REQUEST['editform']; $PageEditFmt='$EditForm'; } $Conditions['e_preview'] = '(boolean)$_POST["preview"]'; XLSDV('en', array( 'ak_save' => 's', 'ak_saveedit' => 'u', 'ak_preview' => 'p', 'ak_textedit' => ',', 'e_rows' => '23', 'e_cols' => '60')); # (:e_preview:) displays the preview of formatted text. Markup('e_preview', 'directives', '/^\\(:e_preview:\\)/e', "Keep(\$GLOBALS['FmtV']['\$PreviewText'])"); # If we didn't load guiedit.php, then set (:e_guibuttons:) to # simply be empty. Markup('e_guibuttons', 'directives', '/\\(:e_guibuttons:\\)/', ''); SDVA($InputTags['e_form'], array( ':html' => "")); SDVA($InputTags['e_textarea'], array( ':html' => "", 'name' => 'text', 'id' => 'text', 'accesskey' => XL('ak_textedit'), 'rows' => XL('e_rows'), 'cols' => XL('e_cols'))); SDVA($InputTags['e_author'], array( ':html' => "", 'name' => 'author', 'value' => $Author)); SDVA($InputTags['e_changesummary'], array( ':html' => "", 'name' => 'csum', 'size' => '60', 'maxlength' => '100', 'value' => htmlspecialchars(stripmagic(@$_POST['csum']), ENT_QUOTES))); SDVA($InputTags['e_minorcheckbox'], array( ':html' => "", 'name' => 'diffclass', 'value' => 'minor')); if (@$_POST['diffclass']=='minor') SDV($InputTags['e_minorcheckbox']['checked'], 'checked'); SDVA($InputTags['e_savebutton'], array( ':html' => "", 'name' => 'post', 'value' => ' '.XL('Save').' ', 'accesskey' => XL('ak_save'))); SDVA($InputTags['e_saveeditbutton'], array( ':html' => "", 'name' => 'postedit', 'value' => ' '.XL('Save and edit').' ', 'accesskey' => XL('ak_saveedit'))); SDVA($InputTags['e_savedraftbutton'], array(':html' => '')); SDVA($InputTags['e_previewbutton'], array( ':html' => "", 'name' => 'preview', 'value' => ' '.XL('Preview').' ', 'accesskey' => XL('ak_preview'))); SDVA($InputTags['e_cancelbutton'], array( ':html' => "", 'name' => 'cancel', 'value' => ' '.XL('Cancel').' ' )); SDVA($InputTags['e_resetbutton'], array( ':html' => "", 'value' => ' '.XL('Reset').' '));