Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
branch: master
Fetching contributors…

Cannot retrieve contributors at this time

31 lines (27 sloc) 0.578 kb
<?php
require_once('init.php');
$course = new course($dbpdo,$_POST['id']);
if(logged_in())
{
$user = new user($dbpdo, $course->session('user_id'));
$user->remove_association($user->id, $course->id, 'upvote');
$user->remove_association($user->id, $course->id, 'downvote');
switch($_POST['action'])
{
case 'upvote':
$user->upvote($course->id);
break;
case 'downvote':
$user->downvote($course->id);
break;
default:
break;
}
$user->get_votes();
votebox($course, $user);
}
else
{
votebox($course,false);
}
?>
Jump to Line
Something went wrong with that request. Please try again.