- Timestamp:
- 2006/12/11 19:55:10 (20 years ago)
- Location:
- temp/test-xoops.ec-cube.net/html/modules/xoopspoll/class
- Files:
-
- 2 edited
-
xoopspolloption.php (modified) (1 diff)
-
xoopspollrenderer.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
temp/test-xoops.ec-cube.net/html/modules/xoopspoll/class/xoopspolloption.php
r678 r692 120 120 121 121 // public static 122 function &getAllOption() 123 { 124 $db =& Database::getInstance(); 125 $ret = array(); 126 $sql = "SELECT * FROM ".$db->prefix("xoopspoll_option") . " ORDER BY option_count DESC"; 127 $result = $db->query($sql); 128 while ( $myrow = $db->fetchArray($result) ) { 129 $ret[] = new XoopsPollOption($myrow); 130 } 131 //echo $sql; 132 return $ret; 133 } 134 135 136 // public static 122 137 function deleteByPollId($poll_id) 123 138 { -
temp/test-xoops.ec-cube.net/html/modules/xoopspoll/class/xoopspollrenderer.php
r691 r692 149 149 $tpl->assign('poll', array('question' => $this->poll->getVar("question"),'end_text' => $end_text,'totalVotes' => sprintf(_PL_TOTALVOTES, $total), 'totalVoters' => sprintf(_PL_TOTALVOTERS, $this->poll->getVar("voters")),'vote' => $vote, 'options' => $options)); 150 150 } 151 152 153 function assignOptions(&$tpl) 154 { 155 $options_arr =& XoopsPollOption::getAllOption(); 156 print_R($options_arr); 157 $i = 0; 158 $tpl->assign('poll', $options_arr); 159 } 151 160 } 152 161 ?>
Note: See TracChangeset
for help on using the changeset viewer.
