EOD; } else { page_write($vars['refer'], $postdata); $title = $_title_updated; } $vars['page'] = $vars['refer']; return array('msg'=>$title, 'body'=>$body); } function plugin_vote_convert() { global $vars, $digest; global $_vote_plugin_choice, $_vote_plugin_votes; static $number = array(); $page = isset($vars['page']) ? $vars['page'] : ''; // Vote-box-id in the page if (! isset($number[$page])) $number[$page] = 0; // Init $vote_no = $number[$page]++; if (! func_num_args()) return '#vote(): No arguments
' . "\n"; if (PKWK_READONLY) { $_script = ''; $_submit = 'hidden'; } else { $_script = get_base_uri(); $_submit = 'submit'; } $args = func_get_args(); $s_page = htmlsc($page); $s_digest = htmlsc($digest); $body = << EOD; $tdcnt = 0; $matches = array(); foreach($args as $arg) { $cnt = 0; if (preg_match('/^(.+)\[(\d+)\]$/', $arg, $matches)) { $arg = $matches[1]; $cnt = $matches[2]; } $e_arg = encode($arg); $link = make_link($arg); $cls = ($tdcnt++ % 2) ? 'vote_td1' : 'vote_td2'; $body .= << EOD; } $body .= << EOD; return $body; }
$_vote_plugin_choice $_vote_plugin_votes
$link $cnt