国内流行的内容管理系统(CMS)多端全媒体解决方案 https://www.dedebiz.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
1020B

  1. <?php
  2. if(!defined('DEDEINC'))
  3. {
  4. exit("Request Error!");
  5. }
  6. /**
  7. * 投票标签
  8. *
  9. * @version $Id: vote.lib.php 1 9:29 2010年7月6日Z tianya $
  10. * @package DedeCMS.Taglib
  11. * @copyright Copyright (c) 2020, DedeBIZ.COM
  12. * @license https://www.dedebiz.com/license
  13. * @link https://www.dedebiz.com
  14. */
  15. require_once(DEDEINC.'/dedevote.class.php');
  16. function lib_vote(&$ctag,&$refObj)
  17. {
  18. global $dsql;
  19. $attlist="id|0,lineheight|24,tablewidth|100%,titlebgcolor|#EDEDE2,titlebackgroup|,tablebg|#FFFFFF";
  20. FillAttsDefault($ctag->CAttribute->Items,$attlist);
  21. extract($ctag->CAttribute->Items, EXTR_SKIP);
  22. if(empty($id)) $id=0;
  23. if($id==0)
  24. {
  25. $row = $dsql->GetOne("SELECT aid FROM `#@__vote` ORDER BY aid DESC LIMIT 0,1");
  26. if(!isset($row['aid'])) return '';
  27. else $id=$row['aid'];
  28. }
  29. $vt = new DedeVote($id);
  30. return $vt->GetVoteForm($lineheight,$tablewidth,$titlebgcolor,$titlebackgroup,$tablebg);
  31. }