View Full Version : big ugly confused question.. PLEASE HELP!

11-05-2006, 12:41 AM
I've never worked at all with databases, and I'm more of a graphic designer than a programmer. I'd really appreciate being pointed in the right direction.


Making a website for some friends with an art gallery. Click here (http://moscarda.com/lwa.gif) for a rough idea of how we want to lay it out.

Basically I need a calendar where different dates will be linked to pages with the event that takes place that day. Those pages will load in an iframe.

Here's where it gets tricky. I need to build an upload form of some sort, for the client, where they will enter in events: a date, a title, a description, and images. Then the form will update the calandar, creating the link, and dropping the event info into some kind of template that will load in the iframe.

The calendar should allow visitors to the website to browse backwards and forwards to past and upcoming events. And I guess there will also need to be some kind of edit form so the client can go back and add/change/subtract content from a given event.


Thank you in advance.

11-05-2006, 01:10 AM
you even started on this? got code? or looking for Paid Work (http://www.codingforums.com/forumdisplay.php?f=36)
this isnt some 5 minute job, some one will probably want paying for coding all this

11-05-2006, 02:05 AM
hey, im not asking someone to code a whole website for me. i just thought perhaps there were some scripts out there i could get started with or modify. just looking to be pointed in the right direction. if the job proves too difficult for me, sure i'd be into paying someone to help out. thoughts?

11-05-2006, 03:44 AM
There are tons of gallery scrips - not sure if there is one correlated with a calendar though. The concept is *simple* - although that term is relative to one's knowledge. You should probably be able to find a free calendar script on any script site, and then it's just finding the code where it makes the date cell, and then searching through your database for any events/whatever that correspond with that date.

Not an ideal solution, but one a "do-it-yourselfer" might find useful. Best way would be to have a script know what month is being looked at, pull all events/whatever from the database relative to that month, order by day, and then include them in the correct day cell (<td>). This way you're only making 1 "educated" call to the database, storing the results in an array, and then using a pointer to step through it by day.

$year = !isset($_GET['year']) || !is_numeric($_GET['year']) ? date('Y') : $_GET['year'];
$month = !isset($_GET['month']) || !is_numeric($_GET['month']) || $_GET['month'] < 1 || $_GET['month'] > 12 ? date('m') : $_GET['month'];

$qr = mysql_query('select name from events where date BETWEEN "'.date('Y-m-\1 00:00:00',strtotime($year.'-'.$month)).'" AND "'.date('Y-m-t 23:59:59',strtotime($year.'-'.$month)).'" order by date');

$events = array();
while($rs = mysql_fetch_assoc($qr))
$day = date('j',strtotime($rs['date']));
$events[$day][] = $rs;

** calendar building code here **

The above might just confuse you, but at the end, you're left with an array with somethign similar to: array(1 => array(event 1 stuff,event 2 stuff,...)) where the 1 in 1 => represents the first day of the month.

Yea, probably just more confusing and odds are that code would need to be cleaned up a little bit. It also makes a few assumptions about your database :) ... anyway, chalk it up to me being bored and over helping/assuming.

11-05-2006, 03:59 AM
If you search on hotscripts.com for "event calender" within the PHP category, there are a number of results that at least by the description do most of what you want.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum