VERSION 1.1 RELEASED!
Changes: Added (by popular demand) Event deletion!
Ok… I have finally got this script working!
I have not done it like a tutorial because it is just too big, so here are a load of screen shots, There is a link to a fully functional demo and zip at the bottom!
A little setup information:
1. Copy the entire calendar into whatever directory you want.
2. Create your database and import the ‘databaseSQL.sql’ file into it, this will create the default data for running it.
3. Alter the ‘databaseConnection.php’ file to show your connection details.That should be it..
NOTE:By default the username and password are both ‘admin‘ (without the quotes), i suggest you change your password in the control panel.
If you have any problems i will be happy to help, just post your query as a comment to this page.
Screen Shots
Default View

View Events

View Events 2

Login

Control Panel

Add Event

Add Event 2

Downloads

This is a really good piece of code!
hi jamie,
I have found your code(MySQL Calendar v1.1 ZIP) in your site, it is interesting and I want to use it in my website. But i have met the same problem like what Ditch and Mike had.
Notice: Undefined index: nodstrumCalendarV2 in C:\wamp\www\rpc.php on line 92
could you give me some help? thanks in advance!
Hey Guys,
First off, after reading every comment here, it’s really nice to see everyone helping one another out. Not just Jamie. Kudos all! I’m loving this calendar and am very eager to implement it properly. However I’m having (seemingly simple) login issue.
My site is hosted on GoDaddy and have created a database there. In the databaseConnection.php I have my database name, user and password to connect to that database. Using phpAdmin I’ve created another user with the default “admin” and the same password.
Since doing that, there isn’t any errors, except I can’t login. I just keep getting “Your username or password was incorrect”.
Any help or guidance would be greatly appreciated. Thanks in advance.
bluehaus,
When setting up a new user in the database using phpMyAdmin you need to set the password using sha1 encryption (one of the choices in the “Function” pull-down), this will encrypt the text you enter in phpMyAdmin to the correct format for the calendar to compare against.
Hey there, nice calender really nice but i have a problem. hope someone can help me. i want to have it like this. a user comes to the calender and can enter an event WITHOUT logging in. that he only can do if theres not already an event placed. the login is still needed but just to delete or change events. but what i need is the funcionality to add events without logging in. is that somehow possible ?? can someone help me plz ?? i would be very thankful
greetings
Calender works fine execpt for when I try and add an event. When I add an event nothing happens.
Another issue is migrating the calendar to a server with a different timezone. It completely messes up the calendar.
Hi Jamie,
First thanks for the great calendar, its working nicely. I do have a question, how can I make it so that dates are “not selectable”? I have tried identifying the dates that I want to be “not selectable” by first running this code, it changes the color on all the dates older then $today:
if($finalDate $pastColor???
Thanks for everything, and GREAT CALENDAR!!!
Mark
Hi Jamie, part2 since first was cut off
if($finalDate $pastColor???
Thanks again, part2
Mark
Hi Jamie,
Thnx for the calendar, it’s great!
Maybe stupid question, but does the year 2010 come in automatically with Ajax internal Calendar?
Cheers,
Cor
Hi Jamie,
The calendar was really great, and it suits everything that i am looking for. But when I tried to run it, i got an error about the $action
NOTICE: Undefined index: action in C:\wamp\www\mysqlCalendar_1_2\index.php on line 4
Jamie, great calendar, its real hard to find a calendar out there like this one. I need something on the fly to implement into a site and i was lucky enough to find yours.
To everyone That has not figured it out yet, in order to change the number of years, so it doesn’t end in 2009, just go into rcp.php and look at line 67. Were it says $yEnd=($yStart + 4)
just add 10 or however years you want it to show
Guys i am getting this error :
http://www.health.uottawa.ca/kbond/Calendar/index.php#
i am trying to implement it on my account under Ottawa university.
why is that ?
I use your calendar to post menus for our local Senior Center. All works well but I do have a question: I would like to upload, say, a month or 2 of menus into the database using a text file or Excel file instead of manually entering data into each day. I cannot, for the life of me, figure out the time stamp numbers. Is there a way for me to create and upload such a file?
i am getting undefined variable tTop in rpc.php on line 172.
After removing this variable, calendar shows well but when the drop down is used i get another undefined variable error ‘today’ missing in rpc.php
Can you please lighten me up?
Does ANYONE know how I could upload an entire month’s events into MySQL? Can’t seem to get the date code(s) right.
For thoses who have a cookie issue…
try this
if(isset($_COOKIE['nodstrumCalendarV2']))
instead of
if($_COOKIE['nodstrumCalendarV2'])
in rpc.php
AND
to delete the cookie in the index.php, try
case ‘logout’:
setcookie(‘nodstrumCalendarV2′,”, time()-3600000);
Pour ceux qui ont des problème de cookie
Essayer ceci
if(isset($_COOKIE['nodstrumCalendarV2']))
a la place de
if($_COOKIE['nodstrumCalendarV2'])
dans rpc.php
ET
Pour effacer le cookie dans index.php
case ‘logout’:
setcookie(‘nodstrumCalendarV2′,”, time()-3600000);
Hello,
I will continue to use this wonderful calendar in my site, but the year 2010 not appears and i can’t use it.
Can help me?
Thank you very much
Hi Jamie! Its working… thanks… I translated for portuguese – BRAZIL, because I’m from Brazil… if u want the rpc translated, send me an e-mail beuleal@hotmail.com.
I did a diferente painel control, because i put in my web system.
I’m here for help, anything send me a e-mail…
———————————————————-
Raffaele Talamona: open the document rpc.php and search 2006, and replace to 2010. I changed too.
It’s working! Thanks a lot!
Thank you so, so much for building this! This is exactly what I’m looking for! I’ve looked far and wide for months on end and then boom I found your Gem! I do have a question though Can HTML and images be put in the Add Event section? That will really top things of if this can be done. Thanks again!
“Create your database and import the ‘databaseSQL.sql’ file into it, this will create the default data for running it.”
I set up a database on GoDaddy but am confused about importing this. Has anyone used GoDaddy for the database. Any help is appreciated Thanks!
I imported the database and changed the connection settings, but I can’t get the calendar to even come up. I keep getting this Message…
Could not get settings.
YOUR CALENDAR ROX!!!
I could change everything to spanish, played with the events, with the colors..everything!!!
and it took like 20minutes =)
take care and thxxxx
[...] MySQL Calendar [...]
[...] many of the tutorial sites there are hardly any Calendar systems. Therefore, he has developed a Calendar System using MySQL and Script.aculo.us. There are 3 main parts, the Javascript, the HTML and the PHP script. You can change the date with [...]
Hi Jamie,
I’ve read through all the previous posts and it seem like I’m stymied by the common problems of the index.php code wanting the ‘action’ variable to be set and the multiple undefined variable erros in rpc.php. I pretty sure the rpc errors are because the code flow never gets called due to the logic.
So my main question is:
Is index.php the start page or did you expect it to be called from another HTML Form with the ‘posted’ variable ‘action’ populated in the Post?
I’m running a local WampServer v2 server on Windows 7 with PHP 5.3.0 and Apache 2.2.11. Any settings beyond defaults that need to be set in the PHP .ini ?
Regards,
-Mike
awesome stuff
thanks for the great info
Hello Jamie, this script is helpful for managing a bed and breakfast rooms. I have to change it again for my needs. Thanks
Gianni
Hi,
first thanks for the calendar. I have installed it, but have some trouble. Hope you can help me to solve this.
1. I have in the dropdown year field 2006-2009 field and no 2010.
2. I set up an event as admin and log out… than reload the page as visitor and there are no event listed in the calendar. If I relog as admin, I can see the events but the date fields of the events have the same color as the no event fields.
3. I have checked the MYSQL database, the added event are there and the changes too but it seems that the calendar won’t communicate with the database in visitor modus. I checked the database connections, username, password and so on, everything looks fine.
Please help me to figure out what went wrong. Thank you very much.
Best regards,
matto
Hello Matto
for point 1
open rpc.php
Find this line
$monthMaker = mktime(0, 0, 0, $monthNumber, 1, 2006);
Replace 2006 with 2010.
Looking after
$yStart = 2006;
$yEnd = ($yStart + 4);
and Replace
$yStart = 2010;
$yEnd = ($yStart + 4);
if you just want to write the 2010 calendar:
$yStart = 2010;
$yEnd = ($yStart + 1);
Excuse the translation
greetings
Gianni
Molto Gracias Gianni!
The rest of the problem has been solved, just needed to drop down the year field and select the current year again. Then was the registered event there.
hi jamie,
it’s works..thanks dude!!!
Excellent application thank you very much!
From Temuco, Chile (the Earthquake country).
Good job
Thanks for this amazing script, everything is runing smooth except that I can’t get rid of this message!!
Notice: Undefined index: action in D:\wamp\www\ChurchWeb\cp\calendar\index.php on line 4
any sugerences?
thanks again
Hi! I can´t add an event? and change de colours?
The page show me this:
Day Colour:
Weekend Colour:
Today Colour:
Event Colour:
Iterator 1 Colour:
Iterator 2 Colour:
…
the page show me the code, not de colours
Thanks a lot for your application. It´s simple and efficient…that´s what I love.
Hi,
does anyone have a working copy of this calender?? The version I have just downloaded has many errors when I tested the script.
I get the following errors, soory the list is long!
Notice: Undefined index: action in C:\wamp\www\testwok\mysqlCalendar_1_2\index.php on line 4
JanuaryFebruaryMarchAprilMayJuneJulyAugustSeptemberOctoberNovemberDecember 2006200720082009
Notice: Undefined index: nodstrumCalendarV2 in C:\wamp\www\testwok\mysqlCalendar_1_2\rpc.php on line 89
Login
MonTueWedThurFriSatSun
Notice: Undefined index: nodstrumCalendarV2 in C:\wamp\www\testwok\mysqlCalendar_1_2\rpc.php on line 143
Notice: Undefined variable: tTop in C:\wamp\www\testwok\mysqlCalendar_1_2\rpc.php on line 172
1
Notice: Undefined index: nodstrumCalendarV2 in C:\wamp\www\testwok\mysqlCalendar_1_2\rpc.php on line 143
Notice: Undefined variable: tTop in C:\wamp\www\testwok\mysqlCalendar_1_2\rpc.php on line 172
2
Notice: Undefined index: nodstrumCalendarV2 in C:\wamp\www\testwok\mysqlCalendar_1_2\rpc.php on line 143
Notice: Undefined variable: tTop in C:\wamp\www\testwok\mysqlCalendar_1_2\rpc.php on line 172
3
Notice: Undefined index: nodstrumCalendarV2 in C:\wamp\www\testwok\mysqlCalendar_1_2\rpc.php on line 143
Notice: Undefined variable: tTop in C:\wamp\www\testwok\mysqlCalendar_1_2\rpc.php on line 172
4
Notice: Undefined index: nodstrumCalendarV2 in C:\wamp\www\testwok\mysqlCalendar_1_2\rpc.php on line 143
Notice: Undefined variable: tTop in C:\wamp\www\testwok\mysqlCalendar_1_2\rpc.php on line 172
5
Notice: Undefined index: nodstrumCalendarV2 in C:\wamp\www\testwok\mysqlCalendar_1_2\rpc.php on line 143
Notice: Undefined variable: tTop in C:\wamp\www\testwok\mysqlCalendar_1_2\rpc.php on line 172
6
Notice: Undefined index: nodstrumCalendarV2 in C:\wamp\www\testwok\mysqlCalendar_1_2\rpc.php on line 143
Notice: Undefined variable: tTop in C:\wamp\www\testwok\mysqlCalendar_1_2\rpc.php on line 172
7
Notice: Undefined index: nodstrumCalendarV2 in C:\wamp\www\testwok\mysqlCalendar_1_2\rpc.php on line 143
Notice: Undefined variable: tTop in C:\wamp\www\testwok\mysqlCalendar_1_2\rpc.php on line 172
8
Notice: Undefined index: nodstrumCalendarV2 in C:\wamp\www\testwok\mysqlCalendar_1_2\rpc.php on line 143
Notice: Undefined variable: tTop in C:\wamp\www\testwok\mysqlCalendar_1_2\rpc.php on line 172
9
Notice: Undefined index: nodstrumCalendarV2 in C:\wamp\www\testwok\mysqlCalendar_1_2\rpc.php on line 143
Notice: Undefined variable: tTop in C:\wamp\www\testwok\mysqlCalendar_1_2\rpc.php on line 172
10
Notice: Undefined index: nodstrumCalendarV2 in C:\wamp\www\testwok\mysqlCalendar_1_2\rpc.php on line 143
Notice: Undefined variable: tTop in C:\wamp\www\testwok\mysqlCalendar_1_2\rpc.php on line 172
11
Notice: Undefined index: nodstrumCalendarV2 in C:\wamp\www\testwok\mysqlCalendar_1_2\rpc.php on line 143
Notice: Undefined variable: tTop in C:\wamp\www\testwok\mysqlCalendar_1_2\rpc.php on line 172
12
Notice: Undefined index: nodstrumCalendarV2 in C:\wamp\www\testwok\mysqlCalendar_1_2\rpc.php on line 143
Notice: Undefined variable: tTop in C:\wamp\www\testwok\mysqlCalendar_1_2\rpc.php on line 172
13
Notice: Undefined index: nodstrumCalendarV2 in C:\wamp\www\testwok\mysqlCalendar_1_2\rpc.php on line 143
Notice: Undefined variable: tTop in C:\wamp\www\testwok\mysqlCalendar_1_2\rpc.php on line 172
14
Notice: Undefined index: nodstrumCalendarV2 in C:\wamp\www\testwok\mysqlCalendar_1_2\rpc.php on line 143
Notice: Undefined variable: tTop in C:\wamp\www\testwok\mysqlCalendar_1_2\rpc.php on line 172
15
Notice: Undefined index: nodstrumCalendarV2 in C:\wamp\www\testwok\mysqlCalendar_1_2\rpc.php on line 143
Notice: Undefined variable: tTop in C:\wamp\www\testwok\mysqlCalendar_1_2\rpc.php on line 172
16
Notice: Undefined index: nodstrumCalendarV2 in C:\wamp\www\testwok\mysqlCalendar_1_2\rpc.php on line 143
Notice: Undefined variable: tTop in C:\wamp\www\testwok\mysqlCalendar_1_2\rpc.php on line 172
17
Notice: Undefined index: nodstrumCalendarV2 in C:\wamp\www\testwok\mysqlCalendar_1_2\rpc.php on line 143
Notice: Undefined variable: tTop in C:\wamp\www\testwok\mysqlCalendar_1_2\rpc.php on line 172
18
Notice: Undefined index: nodstrumCalendarV2 in C:\wamp\www\testwok\mysqlCalendar_1_2\rpc.php on line 143
Notice: Undefined variable: tTop in C:\wamp\www\testwok\mysqlCalendar_1_2\rpc.php on line 172
19
Notice: Undefined index: nodstrumCalendarV2 in C:\wamp\www\testwok\mysqlCalendar_1_2\rpc.php on line 143
Notice: Undefined variable: tTop in C:\wamp\www\testwok\mysqlCalendar_1_2\rpc.php on line 172
20
Notice: Undefined index: nodstrumCalendarV2 in C:\wamp\www\testwok\mysqlCalendar_1_2\rpc.php on line 143
Notice: Undefined variable: tTop in C:\wamp\www\testwok\mysqlCalendar_1_2\rpc.php on line 172
21
Notice: Undefined index: nodstrumCalendarV2 in C:\wamp\www\testwok\mysqlCalendar_1_2\rpc.php on line 143
Notice: Undefined variable: tTop in C:\wamp\www\testwok\mysqlCalendar_1_2\rpc.php on line 172
22
Notice: Undefined index: nodstrumCalendarV2 in C:\wamp\www\testwok\mysqlCalendar_1_2\rpc.php on line 143
Notice: Undefined variable: tTop in C:\wamp\www\testwok\mysqlCalendar_1_2\rpc.php on line 172
23
Notice: Undefined index: nodstrumCalendarV2 in C:\wamp\www\testwok\mysqlCalendar_1_2\rpc.php on line 143
Notice: Undefined variable: tTop in C:\wamp\www\testwok\mysqlCalendar_1_2\rpc.php on line 172
24
Notice: Undefined index: nodstrumCalendarV2 in C:\wamp\www\testwok\mysqlCalendar_1_2\rpc.php on line 143
Notice: Undefined variable: tTop in C:\wamp\www\testwok\mysqlCalendar_1_2\rpc.php on line 172
25
Notice: Undefined index: nodstrumCalendarV2 in C:\wamp\www\testwok\mysqlCalendar_1_2\rpc.php on line 143
Notice: Undefined variable: tTop in C:\wamp\www\testwok\mysqlCalendar_1_2\rpc.php on line 172
26
Notice: Undefined index: nodstrumCalendarV2 in C:\wamp\www\testwok\mysqlCalendar_1_2\rpc.php on line 143
Notice: Undefined variable: tTop in C:\wamp\www\testwok\mysqlCalendar_1_2\rpc.php on line 172
27
Notice: Undefined index: nodstrumCalendarV2 in C:\wamp\www\testwok\mysqlCalendar_1_2\rpc.php on line 143
Notice: Undefined variable: tTop in C:\wamp\www\testwok\mysqlCalendar_1_2\rpc.php on line 172
28
Notice: Undefined index: nodstrumCalendarV2 in C:\wamp\www\testwok\mysqlCalendar_1_2\rpc.php on line 143
Notice: Undefined variable: tTop in C:\wamp\www\testwok\mysqlCalendar_1_2\rpc.php on line 172
29
Notice: Undefined index: nodstrumCalendarV2 in C:\wamp\www\testwok\mysqlCalendar_1_2\rpc.php on line 143
Notice: Undefined variable: tTop in C:\wamp\www\testwok\mysqlCalendar_1_2\rpc.php on line 172
30
Notice: Undefined index: nodstrumCalendarV2 in C:\wamp\www\testwok\mysqlCalendar_1_2\rpc.php on line 143
Notice: Undefined variable: tTop in C:\wamp\www\testwok\mysqlCalendar_1_2\rpc.php on line 172
well it is not the easy way tutorial (at least for me ) but i can’t deny the professional touch
The demo and download links don’t work. They take you to a 404 page not found error.
Does anyone have a working copy of this download.
Thanks
@ Qaysar : this is not a download this is a hand made work you can do it by following the tutorial
@ android
I believe at the top of site it states “There is a link to a fully functional demo and zip at the bottom!”
Where can I find the code for this calender?
Thanks for your help
@ Android Open your eyes and look
. The link is just between the screenshots of the application and the first comment. It is headed Download Links.
For the good year
replace
$yStart = 2006;
$yEnd = ($yStart + 4);
by
$yStart = date(‘Y’);
$yEnd = ($yStart + 4);
You you could make changes to the webpage subject MySQL Calendar – html tutorials | css tutorials | php tutorials | Nodstrum Blog to something more suited for your subject you create. I loved the post withal.
@Dge-06
The only problem with your solution is that it will only show the current year + 4, anything in the past will be unavailable.
An alternative fix would be this:
Replace
$yStart = 2006;
$yEnd = ($yStart + 4);
with
$curYear = date(‘Y’); !Current year
$yStart = 2006; !First year of calendar
$yEnd = ($curYear + 4); !4 years from current year
How do I change the size of the calendar and font size? I have a club with older members using it and they find the font too small
Tnx
Wayne
Hello there…
I want to know,
how can I add / upload images in the calendar?
Any ideas… because i don’t get it with the two pages, is it a $_POST or a $_FILES… for the upload of the image….
line 243 of rpc.php
case ‘addEvent’:
$day = $_POST['d'];
$month = $_POST['m'];
$year = $_POST['y'];
$body = $_POST['body'];
$img = $_POST['img'];
$file = $_POST['img'];
$link = $_POST['link'];
$timeStamp = mktime(0,0,0, $month, $day, $year);
$bodyF = addslashes(trim($body));
$uploads_dir = ‘http://mysite.com/mysqlcal/images’;
foreach ($_FILES['img']['error'] as $key => $error) {
if ($error == UPLOAD_ERR_OK) {
$tmp_name = $_FILES['img']['tmp_name'][$key];
$name = $_FILES['img']["name"][$key];
move_uploaded_file($tmp_name, $uploads_dir.’/’.$name);
}
}
move_uploaded_file($img ,$structure.’/’.$img );
$addEvent = mysql_query(“INSERT INTO event (body, timestamp, img, link) VALUES (‘$body’, ‘$timeStamp’, ‘$img’, ‘$link’)”, $conn);
break;
Can u help me