示例#1
0
     dmsg('删除成功', $forward);
     break;
 case 'level':
     $itemid or msg('请选择票选');
     $level = intval($level);
     $do->level($itemid, $level);
     dmsg('级别设置成功', $forward);
     break;
 case 'record':
     $pollid = isset($pollid) ? intval($pollid) : 0;
     $pollid or msg();
     $menus = array(array('选项管理', '?moduleid=' . $moduleid . '&file=' . $file . '&pollid=' . $pollid . '&action=item'), array('投票记录', '?moduleid=' . $moduleid . '&file=' . $file . '&pollid=' . $pollid . '&action=record'), array('统计报表', '?moduleid=' . $moduleid . '&file=' . $file . '&pollid=' . $pollid . '&action=stats'));
     $do->itemid = $pollid;
     $P = $do->get_one();
     $P or msg('票选不存在');
     $I = $do->item_all("pollid={$pollid}");
     $sfields = array('按条件', '会员', 'IP');
     $dfields = array('username', 'username', 'ip');
     isset($fields) && isset($dfields[$fields]) or $fields = 0;
     $fields_select = dselect($sfields, 'fields', '', $fields);
     $condition = "pollid={$pollid}";
     if ($itemid) {
         $condition .= " AND itemid={$itemid}";
     }
     if ($keyword) {
         $condition .= " AND {$dfields[$fields]} LIKE '%{$keyword}%'";
     }
     $lists = $do->get_list_record($condition);
     include tpl('poll_record', $module);
     break;
 case 'stats':