Beispiel #1
0
             $do->edit($post);
             dmsg('修改成功', $forward);
         } else {
             msg($do->errmsg);
         }
     } else {
         extract($do->get_one());
         $addtime = timetodate($addtime);
         $fromtime = $fromtime ? timetodate($fromtime, 3) : '';
         $totime = $totime ? timetodate($totime, 3) : '';
         $menuid = 1;
         include tpl('vote_edit', $module);
     }
     break;
 case 'update':
     $do->update();
     dmsg('更新成功', $forward);
     break;
 case 'html':
     $all = isset($all) && $all ? 1 : 0;
     $one = isset($one) && $one ? 1 : 0;
     if (!isset($num)) {
         $num = 50;
     }
     if (!isset($fid)) {
         $r = $db->get_one("SELECT min(itemid) AS fid FROM {$DT_PRE}vote");
         $fid = $r['fid'] ? $r['fid'] : 0;
     }
     isset($sid) or $sid = $fid;
     if (!isset($tid)) {
         $r = $db->get_one("SELECT max(itemid) AS tid FROM {$DT_PRE}vote");