urban Posted May 2, 2008 Share Posted May 2, 2008 Hi i am creating a parking website which users will register and put there parking spot available on the site. What i need is a calender which will allow users to place the dates that they have the parking free. Then when people search the site it will tell them when that parking space is free. I have been search for such a script but cannot find one. I would be great full if anybody knows of a script i can modify or can give me some guidance on scripting one thanks. Link to comment https://forums.phpfreaks.com/topic/103858-php-calender/ Share on other sites More sharing options...
ionik Posted May 2, 2008 Share Posted May 2, 2008 try going to http://www.phpclasses.org Link to comment https://forums.phpfreaks.com/topic/103858-php-calender/#findComment-531631 Share on other sites More sharing options...
litebearer Posted May 2, 2008 Share Posted May 2, 2008 Here is a rough idea of how you might accomplish your goal: ############################################# Database Tables Used users id, username, password, spaceholder, spacenumber Spaceholder is either 0 or 1 0 indicates does NOT control a parking space 1 indicates DOES control a parking space Spacenumber is the number of the controlled parking space parkspaces id, date, spacenumber, available, who_reserved Date is the actual date that a parking space is or is not available Spacenumber is the same as in the users table Available is either 0 or 1 0 indicates the space is NOT available 1 indicates the space IS available Who_reserved is id number of the person who reserved the space ########## To reserve a space 1. Have user login 2. Have user select a month from drop list 3. Get all available spaces for the selected month (group the spaces by date) 4. Display a calendar where each day contains a drop list of the spaces available. 5. Update the database 6. Return to step 3. ############### To make a space available 1. Have space holder login 2. Have user select a month from a drop list 3. Get all space status for selected month 4. Display a calendar where each day is a link - the link will pass the space#, date and current status. 5. Update the database reversing the passed status to its opposite 6. Return to step 3. ########### Some things to consider: 1. Might want to only have the table schedule a max of two to three months. At the end of each month, delete all records from the previous month and create records for the new month. 2. Populate the new month with data for each parking space - Populate the field named AVAILABLE with 0 Populate the field named WHO_RESERVED with the id number of the person who controls the space 3. A space can only be changed from 0 to 1 IF the id number in the WHO_RESERVED field is the same as the id number of the person who controls the parking space. 4. Only users who control a parking space can access the 'make available' script ##################################### Hope this is of some help Lite... Link to comment https://forums.phpfreaks.com/topic/103858-php-calender/#findComment-531792 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.