- Timestamp:
- 2006/12/11 22:40:09 (20 years ago)
- Location:
- temp/test-xoops.ec-cube.net/html/modules/xoopspoll
- Files:
-
- 3 edited
-
class/xoopspolloption.php (modified) (1 diff)
-
class/xoopspollrenderer.php (modified) (1 diff)
-
pollregist.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
temp/test-xoops.ec-cube.net/html/modules/xoopspoll/class/xoopspolloption.php
r722 r727 120 120 121 121 // public static 122 function &getAllCommentByOptionId($option_id) 123 { 124 $db =& Database::getInstance(); 125 $ret = array(); 126 $sql = "SELECT u.uid, u.uname, l.rating_id, l.comment FROM ".$db->prefix("xoopspoll_log")." l, ". $db->prefix("users") ." u WHERE l.user_id = u.uid AND l.option_id=".intval($option_id)." ORDER BY time 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 &getOptionByOptionId($option_id) 123 138 { -
temp/test-xoops.ec-cube.net/html/modules/xoopspoll/class/xoopspollrenderer.php
r725 r727 161 161 $tpl->assign('option_list', $options_arr); 162 162 } 163 164 function assignComment(&$tpl, $option_id) 165 { 166 $arrComment =& XoopsPollOption::getAllCommentByOptionId($option_id); 167 $tpl->assign('arrComment', $arrComment); 168 } 169 163 170 } 164 171 ?> -
temp/test-xoops.ec-cube.net/html/modules/xoopspoll/pollregist.php
r726 r727 45 45 $renderer = new XoopsPollRenderer(); 46 46 $renderer->assignOptions($xoopsTpl, $option_id); 47 $renderer->assignComment($xoopsTpl, $option_id); 47 48 48 49 $xoopsTpl->assign('arrStatus', $arrStatus);
Note: See TracChangeset
for help on using the changeset viewer.
