Location: PHPKode > projects > Web Task Manager with Email/SMS Voting > Calendar/cal_vote.php

include ('cal_header.inc.php');
include ("cal_utils.php") ;


//list all events that have not been voted on with href to event for voting
//options : list all, list for group, list for date range,
//view trends

 $query = "select user_id from calendar_users where username = '".$_SESSION["login"]."'";
 $result = mysql_query($query);
 $rows = mysql_num_rows($result);
 $row = mysql_fetch_object($result);
 $currdate = date("Ymd");

echo "<h2>Events coming up that have not been voted for:</h2>";
$query = "SELECT id, title, calendar_events.description, day, month, year
FROM calendar_events
INNER JOIN groups ON cat = groupid
IN (

SELECT eventid
FROM vote
WHERE userid =".$userid."
AND cat
IN (

SELECT groupid
FROM groupusers
WHERE userid =".$userid.") AND (concat( year, MONTH , DAY ) >= '".$currdate."') order by year, month, day";

$result = mysql_query($query);
$month = 0;
	while ($row = mysql_fetch_object($result))
		if($month <> $row->month)
			echo "<br>";
		$month = $row->month;

		echo "<br><li>".$row->day."/".$row->month."/".$row->year." - <a href=cal_popup.php?op=view&amp;id=".$row->id."&amp;uname=".$_SESSION["login"].">".$row->title."</a>";

echo "</p>";

include ('cal_functions.inc.php');
include ('cal_footer.inc.php');

Return current item: Web Task Manager with Email/SMS Voting