Hi there, can someone check this code for me, i'm having truble getting it to work, anything you can think of that could make this work would be appriciated! thanks
<?php
ini_set ("display_errors",1)
?>
<?php
if (get_magic_quotes_gpc()) {
function stripslashes_deep($value)
{
$value = is_array($value) ?
array_map('stripslashes_deep', $value) :
stripslashes($value);
return $value;
}
$POST = array_map('stripslashes_deep', $POST);
$GET = array_map('stripslashes_deep', $GET);
$COOKIE = array_map('stripslashes_deep', $COOKIE);
}
?>
<?php
$theevent = date ("t", mktime(0,0,0,$GET['month'],0,$GET['year']));
?>
<?php
require_once("connection.php");
function getmktime(){
list($usec, $sec) = explode(" ",mktime());
return ((float)$usec + (float)$sec);
}
$time_start = getmktime();
if(!isset($GET['year'])){
$GET['year'] = date("Y");
}
if(!isset($GET['month'])){
$GET['month'] = date("n")+1;
}
$month = $GET['month']-1;
$year = $GET['year'];
$query = "SELECT event_id, title, event_day, event_month, event_year, event_time FROM events WHERE event_month='$month' AND event_year='$year' ORDER BY event_id, event_time DESC\n";
$query_result = mysql_query ($query);
while ($info = mysql_fetch_array($query_result))
{
$day = $info['event_day'];
$event_id = $info['event_id'];
$events[$day][] = $info['event_id'];
$event_info[$event_id]['0'] = stripslashes (substr($info['title'],0, 70))."<br />";
//To add the time value to the titles, addthe bottom code
$event_info[$event_id]['1'] = "<strong>".$info["event_time"] ."</strong>";
}
//new code
$query50 = "SELECT * FROM important_dates WHERE month='$month' AND year='$year'";
$query_resultz = mysql_query ($query50);
while ($info = mysql_fetch_array($query_resultz))
{
$day = $info['day'];
$specialevents[$day][] = $info['date_name'];
}
echo "<pre>";
print_r($specialevents);
echo "</pre>";
$todays_date = date("j");
$todays_month = date("n");
$days_in_month = date ("t", mktime(0,0,0,$GET['month'],0,$GET['year']));
$first_day_of_month = date ("w", mktime(0,0,0,$GET['month']-1,1,$GET['year']));
$first_day_of_month = $first_day_of_month + 1;
$count_boxes = 0;
$days_so_far = 0;
IF($GET['month'] == 13){
$next_month = 2;
$next_year = $GET['year'] + 1;
} ELSE {
$next_month = $GET['month'] + 1;
$next_year = $GET['year'];
}
IF($GET['month'] == 2){
$prev_month = 13;
$prev_year = $GET['year'] - 1;
} ELSE {
$prev_month = $GET['month'] - 1;
$prev_year = $GET['year'];
}
?>
<html>
<head>
<title>Events Calendar</title>
<script language="JavaScript" type="text/JavaScript">
function window(page) {
OpenWin = this.open(page, "CtrlWindow", "toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=no,width=550,height=400");
}
function window2(page) {
OpenWin = this.open(page, "CtrlWindow", "toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=no,width=550,height=300");
}
function MM_jumpMenu(targ,selObj,restore){
eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
if (restore) selObj.selectedIndex=0;
}
function MM_openBrWindow(theURL,winName,features) {
window.open(theURL,winName,features);
}
//-->
</script>
</head>