JSON/PHP Dynamic Feed to fill calendar events

IN PROGRESS
Bids
5
Avg Bid (USD)
$62
Project Budget (USD)
$30 - $60

Project Description:
The attached zip file is the javascript calendar I am implementing into a page in my site.

It needs to use the json method as described at: http://arshaw.com/fullcalendar/

The calendar javascript on the main PHP page (main.php) needs to be:

<script type='text/javascript'>

$(document).ready(function() {

$('#calendar').fullCalendar({
header: {
left: 'prev,next today',
center: 'title',
right: 'month,agendaWeek,agendaDay'
},
editable: false,

events: "json-events.php",

eventDrop: function(event, delta) {
alert(event.title + ' was moved ' + delta + ' days\n' +
'(should probably update your database)');
},

loading: function(bool) {
if (bool) $('#loading').show();
else $('#loading').hide();
}

});

});

</script>
javascript call function for the html is:

<body>
<div id='loading' style='display:none'>loading...</div>
<div id='calendar'></div>
<body>


The text that I have so far is: (json-events.php)
<?php
$con = mysql_connect('localhost', 'root', 'pass');
if (!$con)
{
die('Could not connect: ' . mysql_error());
}

mysql_select_db("database", $con);

$sql="SELECT * FROM approviderbooked WHERE comp_id = 'zstone'";

$result = mysql_query($sql);

do {

$classname = $row['class_name'];
$time = $row['b_from'];
sscanf($time, "%d :%d", $hour, $min );//start time
$timee = $row['b_to'];
sscanf($timee, "%d :%d ", $houre, $mine );//end time

$bookday = $row['book_day'];
sscanf($bookday, "%d/%d/%d", $month, $day, $year );//start date
$bookdaye = $row['book_day'];
sscanf($bookdaye, "%d/%d/%d", $month, $day, $yeare );//end date



echo json_encode(array(

array(
'title' => $classname,
'start' => "$year-$month-$day $hour:$min:00Z",
'end' => "$year-$month-$day $houre:$mine:00Z",
'allDay' => false
)
));
} while ($row = mysql_fetch_assoc($result));
mysql_close($con);
?>


create table data for sql>>>>

-- --------------------------------------------------------

--
-- Table structure for table `approviderbooked`
--

CREATE TABLE `approviderbooked` (
`b_hour_id` int(10) NOT NULL auto_increment,
`comp_id` varchar(25) NOT NULL,
`j_id` int(10) NOT NULL,
`class_name` varchar(25) NOT NULL,
`s_id` int(10) NOT NULL,
`book_day` varchar(10) NOT NULL,
`p_job_duration` decimal(3,2) NOT NULL,
`b_from` time NOT NULL,
`b_to` time NOT NULL,
`b_class_count` varchar(3) NOT NULL,
`b_class_avail` varchar(1) NOT NULL default '1',
`p_id` int(10) NOT NULL,
PRIMARY KEY (`b_hour_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=10003 ;

--
-- Dumping data for table `approviderbooked`
--

INSERT INTO `approviderbooked` VALUES (10000, 'zstone', 1, 'Hatha Yoga', 1, '11/11/2011', 1.00, '16:30:00', '17:30:00', '1', '1', 10);
INSERT INTO `approviderbooked` VALUES (10001, 'zstone', 1, 'Ashtonga Yoga', 1, '11/11/2011', 0.50, '16:00:00', '16:30:00', '10', '1', 16);
INSERT INTO `approviderbooked` VALUES (10002, 'zstone', 2, 'Tai Chi', 2, '11/12/2011', 1.00, '17:00:00', '18:00:00', '3', '1', 10);

<<<<>>>>>>>

current json output is

[{"title":null,"start":"-- ::00Z","end":"-- ::00Z","allDay":false}][{"title":"Hatha Yoga","start":"2011-11-11 16:30:00Z","end":"2011-11-11 17:30:00Z","allDay":false}][{"title":"Ashtonga Yoga","start":"2011-11-11 16:0:00Z","end":"2011-11-11 16:30:00Z","allDay":false}][{"title":"Tai Chi","start":"2011-11-12 17:0:00Z","end":"2011-11-12 18:0:00Z","allDay":false}]

output needs to be (notice the times $min that are 00 changed to 0 in the above - also ][ is , between outer []

[{"title":null,"start":"-- ::00Z","end":"-- ::00Z","allDay":false},{"title":"Hatha Yoga","start":"2011-11-11 16:30:00Z","end":"2011-11-11 17:30:00Z","allDay":false},{"title":"Ashtonga Yoga","start":"2011-11-11 16:00:00Z","end":"2011-11-11 16:30:00Z","allDay":false},{"title":"Tai Chi","start":"2011-11-12 17:00:00Z","end":"2011-11-12 18:00:00Z","allDay":false}]

or another option using the json / feed method

Skills required:
AJAX, Javascript, PHP
Additional Files: fullcalendar-1.5.2.zip
About the employer:
Verified
Public Clarification Board
Bids are hidden by the project creator. Log in as the employer to view bids or to bid on this project.
You will not be able to bid on this project if you are not qualified in one of the job categories. To see your qualifications click here.


$ 100
in 3 days
Hire garygoog
$ 50
in 10 days
Hire RossKim
$ 60
in 3 days
$ 50
in 1 days
Hire effecter
$ 50
in 1 days