Changeset 771 for temp/test-xoops.ec-cube.net
- Timestamp:
- 2006/12/12 23:44:38 (20 years ago)
- Location:
- temp/test-xoops.ec-cube.net/html/modules/xoopspoll
- Files:
-
- 3 edited
-
pollrating.php (modified) (4 diffs)
-
pollresults.php (modified) (2 diffs)
-
xoops_version.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
temp/test-xoops.ec-cube.net/html/modules/xoopspoll/pollrating.php
r765 r771 33 33 include_once XOOPS_ROOT_PATH."/modules/xoopspoll/class/xoopspollrenderer.php"; 34 34 35 $poll_id = $_GET['poll_id']; 35 36 $option_id = $_GET['option_id']; 36 37 if(empty($option_id)) $option_id = $_POST['option_id']; … … 39 40 $option_id = (!empty($option_id)) ? intval($option_id) : 0; 40 41 if (empty($option_id)) { 41 redirect_header("pollresults.php?poll_id=". POLL_ID,0);42 redirect_header("pollresults.php?poll_id=".$poll_id,0); 42 43 exit(); 43 44 } 45 46 switch($_POST['mode']) { 47 case 'rating': 48 $poll_id = $_POST['poll_id']; 49 $poll = new XoopsPoll($poll_id); 50 if ( $xoopsUser ) { 51 $uid = $xoopsUser->getVar("uid"); 52 } else { 53 $uid = 0; 54 } 55 $poll->vote($option_id, xoops_getenv('REMOTE_ADDR'), $uid, $_POST['rating_id'], $_POST['comment']); 56 $poll->updateCount(); 57 redirect_header(XOOPS_URL."/modules/xoopspoll/pollresults.php?poll_id=".$poll_id, 1, $msg); 58 exit(); 59 break; 60 default: 61 break; 62 } 63 64 44 65 $xoopsOption['template_main'] = 'xoopspoll_rating.html'; 45 66 include XOOPS_ROOT_PATH."/header.php"; … … 47 68 $dummy = ""; 48 69 $renderer = new XoopsPollRenderer($dummy); 70 49 71 $renderer->assignOption($xoopsTpl, $option_id); 50 72 $renderer->assignComment($xoopsTpl, $option_id); … … 53 75 $xoopsTpl->assign('arrCat', $arrCategory); 54 76 $xoopsTpl->assign('arrRating', $arrRating); 77 $xoopsTpl->assign('poll_id', $poll_id); 55 78 56 79 include XOOPS_ROOT_PATH.'/include/comment_view.php'; -
temp/test-xoops.ec-cube.net/html/modules/xoopspoll/pollresults.php
r765 r771 37 37 $poll_id = (!empty($poll_id)) ? intval($poll_id) : 0; 38 38 if (empty($poll_id)) { 39 redirect_header("pollresults.php?poll_id=". POLL_ID,0);39 redirect_header("pollresults.php?poll_id=".$poll_id,0); 40 40 exit(); 41 41 } … … 50 50 $xoopsTpl->assign('arrStatus', $arrStatus); 51 51 $xoopsTpl->assign('arrCat', $arrCategory); 52 $xoopsTpl->assign('poll_id', $poll_id); 52 53 53 54 include XOOPS_ROOT_PATH.'/include/comment_view.php'; -
temp/test-xoops.ec-cube.net/html/modules/xoopspoll/xoops_version.php
r757 r771 60 60 $modversion['templates'][4]['file'] = 'xoopspoll_rating.html'; 61 61 $modversion['templates'][4]['description'] = ''; 62 $modversion['templates'][5]['file'] = 'xoopspoll_new.html'; 63 $modversion['templates'][5]['description'] = ''; 62 64 63 65 //Blocks
Note: See TracChangeset
for help on using the changeset viewer.
