templatebox(lang('tagtemplate'), 'mtagnew[template]', empty($mtag['template']) ? '' : $mtag['template'], 10, 110); trbasic(lang('arr_pre'), 'mtagnew[setting][val]', empty($mtag['setting']['val']) ? 'v' : $mtag['setting']['val'], 'text', lang('agarr_pre')); trbasic(lang('list_result'), 'mtagnew[setting][limits]', empty($mtag['setting']['limits']) ? '10' : $mtag['setting']['limits']); $arr = array('archives' => lang('archive'), 'members' => lang('member'), 'farchives' => lang('freeinfo'), 'catalogs' => lang('catalog'), 'coclass' => lang('coclass'), 'offers' => lang('offer'), 'replys' => lang('reply'), 'comments' => lang('comment'), 'mcfields' => lang('mcomment'), 'mrfields' => lang('mreply')); echo "<tr class=\"txt\"><td class=\"txt txtright fB borderright\">" . lang('vote_type') . "</td>\n"; echo "<td class=\"txtL\">\n"; echo "<input class=\"radio\" type=\"radio\" name=\"mtagnew[setting][type]\" value=\"\" onclick=\"\$id('vote_type1').style.display = '';\$id('vote_type2').style.display = 'none';\"" . (empty($mtag['setting']['type']) ? ' checked' : '') . ">" . lang('freevote') . "\n"; $i = 1; foreach ($arr as $k => $v) { echo "<input class=\"radio\" type=\"radio\" name=\"mtagnew[setting][type]\" value=\"{$k}\" onclick=\"\$id('vote_type1').style.display = 'none';\$id('vote_type2').style.display = '';\"" . (@$mtag['setting']['type'] == $k ? ' checked' : '') . ">{$v}\n"; echo $i % 6 ? '' : '<br>'; $i++; } echo "</td></tr>\n"; echo "<tbody id=\"vote_type1\" style=\"display:" . (empty($mtag['setting']['type']) ? '' : 'none') . "\">"; $sourcearr = array('0' => lang('nolimit_coclass')) + vcaidsarr(); trbasic(lang('vote_coclass_limited'), 'mtagnew[setting][vsource]', makeoption($sourcearr, empty($mtag['setting']['vsource']) ? '0' : $mtag['setting']['vsource']), 'select'); trbasic(lang('vote_id_limited'), 'mtagnew[setting][vids]', empty($mtag['setting']['vids']) ? '' : $mtag['setting']['vids']); echo "</tbody>"; echo "<tbody id=\"vote_type2\" style=\"display:" . (!empty($mtag['setting']['type']) ? '' : 'none') . "\">"; trbasic(lang('soucerid'), 'mtagnew[setting][id]', isset($mtag['setting']['id']) ? $mtag['setting']['id'] : '', 'text'); trbasic(lang('soucefname'), 'mtagnew[setting][fname]', isset($mtag['setting']['fname']) ? $mtag['setting']['fname'] : '', 'text'); echo "</tbody>"; trbasic(lang('tagjspick'), 'mtagnew[setting][js]', empty($mtag['setting']['js']) ? 0 : $mtag['setting']['js'], 'radio'); tabfooter(); } else { $mtagnew['setting']['fname'] = trim($mtagnew['setting']['fname']); if (empty($mtagnew['template'])) { if (!submitcheck('bmtagcode')) { amessage('input_tag_tpl', M_REFERER); } else {
url_nav(lang('voteadmin'), $urlsarr, 'admin'); !vcaidsarr() && amessage('pleaddvotcoc'); if (!($vote = $db->fetch_one("SELECT * FROM {$tblprefix}votes WHERE vid=" . $vid))) { amessage('poivotenoe', "?entry=votes&action=votesedit"); } $voptions = array(); $query = $db->query("SELECT * FROM {$tblprefix}voptions WHERE vid=" . $vid . " ORDER BY vieworder,vopid"); while ($voption = $db->fetch_array($query)) { $voptions[$voption['vopid']] = $voption; } $forward = empty($forward) ? M_REFERER : $forward; $forwardstr = '&forward=' . urlencode($forward); if (!submitcheck('bvotedetail') && !submitcheck('bvoptionadd')) { tabheader(lang('editvote'), 'votedetail', "?entry=votes&action=votedetail&vid={$vid}{$forwardstr}"); trbasic(lang('votetitle'), 'votenew[subject]', $vote['subject']); trbasic(lang('votecoc'), 'votenew[caid]', makeoption(vcaidsarr(), $vote['caid']), 'select'); trbasic(lang('voteexpl'), 'votenew[content]', $vote['content'], 'textarea'); trbasic(lang('voteenddate'), 'votenew[enddate]', !empty($vote['enddate']) ? date('Y-n-j', $vote['enddate']) : '', 'calendar'); trbasic(lang('weathermsel'), 'votenew[ismulti]', $vote['ismulti'], 'radio'); trbasic(lang('fornouservote'), 'votenew[onlyuser]', $vote['onlyuser'], 'radio'); trbasic(lang('cannotrepevote'), 'votenew[norepeat]', $vote['norepeat'], 'radio'); trbasic(lang('reptimintmin'), 'votenew[timelimit]', $vote['timelimit']); tabfooter(); tabheader(lang('voteoption'), '', '', 4); trcategory(array("<input class=\"checkbox\" type=\"checkbox\" name=\"chkall\" class=\"category\" onclick=\"checkall(this.form, 'delete', 'chkall')\">" . lang('del'), lang('optiontitle'), lang('votenum'), lang('order'))); foreach ($voptions as $vopid => $voption) { echo "<tr class=\"txt\"><td class=\"txtC w50\"><input class=\"checkbox\" type=\"checkbox\" name=\"delete[{$vopid}]\" value=\"{$vopid}\">\n" . "<td class=\"txtL\"><input type=\"text\" name=\"voptionsnew[{$vopid}][title]\" value=\"{$voption['title']}\" size=\"40\"></td>\n" . "<td class=\"txtC w150\"><input type=\"text\" name=\"voptionsnew[{$vopid}][votenum]\" value=\"{$voption['votenum']}\" size=\"10\"></td>\n" . "<td class=\"txtC w50\"><input type=\"text\" name=\"voptionsnew[{$vopid}][vieworder]\" value=\"{$voption['vieworder']}\" size=\"3\"></td></tr>\n"; } tabfooter('bvotedetail'); tabheader(lang('addvoteopt'), 'voptionadd', "?entry=votes&action=votedetail&vid={$vid}{$forwardstr}"); trbasic(lang('optiontitle'), 'voptionadd[title]');