Art 2013 Calendar

Posts | 2014 Calendar

mysql_select_db(“carrboro_eventCals”);$q_month = date(“m”,mktime(0,0,0,date(“m”),1,date(“Y”)));
$q_year = date(“Y”);
$q_day = date(“j”);

$query = “select eventID,name,description,DATE_FORMAT(date, ‘%c/%e’) AS formattedDate,DATE_FORMAT(date,’%m/%d/%Y’) as GregDate,link,time,date,
eventType,
DATE_FORMAT(date,’%M’) as month from events
where date_format(date, ‘%Y’) = ‘$q_year’ and eventType = 2
order by date”;

$result = mysql_query($query);
$num_results = mysql_num_rows($result);

for ($i=0;$i < $num_results; $i++)
{
$row = mysql_fetch_array($result);

//These 3 lines to display day of week
$blah = explode(“/”,$row["GregDate"]);
$blah = GregorianToJD($blah[0],$blah[1],$blah[2]);
$disp_day = jddayofweek($blah, 1);
$today = getDate();

//Even or Odd
if (intval($i / 2) == ($i / 2)) {
echo ”

“;
} else {
echo ”

“;
}echo ” “;
//echo ““;
echo ”

“;
echo $row["month"];
echo “

“;
if (strlen($row['link']) > 5) {
echo ” echo”" _mce_href=”".stripslashes($row["link"]);<br ></a> echo”">”;
echo stripslashes($row["name"]).”";
} else {
echo stripslashes($row["name"]);
}
echo “

“;

echo “”;
echo stripslashes($row["description"]);
echo ”

“;
}
?>