Đang Thực Hiện

127706 One part of a project

This project is super-urgent now. My deadline is Tuesday, Apr. 3. If you are interested in the project but can't make that deadline, please state when you could have it completed (if you are unsure of exactly how many days you'd need, add 1-2 days on to your estimate so that you are bidding on the "outside" of your time frame.)

The overall project is a clone of an online appointment system. I won't post demo page links on this page because it will be spidered. I can give links to sample pages for Step 1 which you can use to see the process in action, if you PMB asking for it.

I will only accept bids from people with a glowing history of professionalism. I need this done right, and done right now.

The project you are bidding on is the public-end of the overall project. It is where a random user will arrive to book an appointment with a particular company. The scope of your work will involve everything below, so read thoroughly.

Step 1:

Prerequisites: Before hitting step one, $_REQUEST['cid'] must be defined, else, redirect to the site home page. $_REQUEST['cid'] is the client_id. (NOTE: client_id refers to the business entity who has their scheduling managed via this tool, NOT a customer of that business who wants to schedule an appointment.)

Optional: $_REQUEST['tid'] might also be defined, if it is, skip to step 2. $_REQUEST['tid'] is the appointment type id, and selecting the tid is the whole point of step 1.

In step 1, the user chooses a service type.

The Schedules and AppointmentTypes tables have some fields that will determine what is available on this page.

- AppointmentTypes.is_public (tinyint(1)) - if 0, don't show

There are other is_public fields that do the same, but under non-global circumstances.

- Schedules.is_public (tinyint(1))

- TimeSlots.is_public (tinyint(1))

The AppointmentTypes and Schedules tables are related via a 4-table link.

- AppointmentTypes - the services performed by the company which can be scheduled.

- Schedules - think of these as separate concurrent calendars

- TimeSlots - Parts of the day during which specific AppointmentTypes can be scheduled. TimeSlots consist of:

- is_public (tinyint(1))

- day_of_week (tinyint(4)) numeric 0-6 for Sun-Sat

- start_time (time)

- end_time (time)

- schedule_id

- mins_interval (tinyint(4))

- SlotAllowedTypes, defining which AppointmentTypes are allowed in each TimeSlot.

So...

Schedules.schedule_id = TimeSlots.schedule_id

SlotAllowedTypes.slot_id = TimeSlots.slot_id

SlotAllowedTypes.type_id = AppointmentTypes.type_id

.... That is how you get the configuration of what can be scheduled

when.

So... if an AppointmentType is allowed in two concurrent Schedules with overlapping TimeSlots, and one Schedule has is_public=0 and the other is_public=1, then that AppointmentType will still show up for the TimeSlots allowed in the latter Schedule... as long as those TimeSlots in the Schedules.is_public=1 entity are also TimeSlots.is_public=1.

Step 1b:

This is an interstitial step that only appears if an option is set in the database. The table ScheduleConfig has these relevant fields:

- client_id

- config_users

If the {ScheduleConfig.client_id = $cid} entry has

{config_users='Obvious'}, there will be an interstitial page to choose a specific schedule (from those public schedules having public time slots with $tid as an allowed type).

Otherwise, there are two other ways to determine the schedule_id, discussed where appropriate in step 2 below.

Step 2:

Prerequisite: cid and tid (client_id and type_id)

Optional: sid (schedule_id)

On this step, customers choose the date and time of the appointment.

The customer will have the ability to browse months and choose dates. Each time the presently selected date changes, the script will need to determine which time slots have available appointments, and display a button for each. The buttons should be divided up, as with the sample link above, by "Morning", "Around Noon", "Afternoon."

If ScheduleConfig.config_users = 'Free', then a drop-down menu will appear in the upper-left showing the possible schedules for this appointment type. "All Schedules" is chosen by default. Choosing a schedule will set the $_REQUEST['sid'] and limit the choices below to that schedule.

Here are the factors in determining the available appointment times for a given date:

- Unless a schedule_id has been chosen, this page will use all time slots for all schedules where the type_id is allowed, and is_public=1 (and the slot_id is_public=1, and the schedule_id is_public=1).

- The Schedules table has these relevant fields:

- start_date (date)

- end_date (date)

- is_public (tinyint(1))

- client_id (integer)

- The TimeSlots table has these relevant fields:

- schedule_id (integer)

- start_time (time)

- end_time (time)

- mins_interval (tinyint(4)) (see below)

- day_of_week (tinyint(4)) 0=Sun, 6=Sat

- The AppointmentTypes table has these relevant fields:

- duration (smallint) (number of minutes)

- max_attendees (smallint)

- The TimeOff table has these relevant fields:

- schedule_id

- from_datetime (timestamp)

- to_datetime (timestamp)

- The Appointments table contains these relevant fields:

- client_id (integer)

- type_id (integer)

- schedule_id (integer)

- start_datetime (timestamp)

- duration (tinyint(4))

So, here is the breakdown:

If a schedule is public...

1. And the selected date is not within a TimeOff entry...

2. And the schedule is active

(Schedules.start_date and Schedules.end_date) during selected date...

3. Get all the timeslots for the selected day_of_week on that schedule.

For each timeslot on any schedule allowed/loaded above...

1. Start with the time span start_time to start_time+duration

2. Find all appointments overlapping that time slot on that schedule

3. Subtract the number of overlapping appointments from the

AppointmentType's max_attendees

4. If result of that calculation is greater than 0, there is an availability for that time slot.

5. If there are already availabilities found on that time range using another TimeSlot for the same schedule_id, then, the URL for this button will use the first slot_id in the array.

6. If there are already availabilities found on that time range using another TimeSlot for a different schedule_id, and a schedule_id was not selected in the $_REQUEST['sid'], then the URL for this button will use the first schedule_id in the array.

Now, to make things a tiny bit trickier ...

1. If a time slot has availabilities from start_time to start_time+X...

2. And the mins_interval for that slot_id is Y...

3. And the duration for the type_id is Z...

Then here is how buttons should be generated:

Button 1: From start_time to start_time+Z

Button 2: From start_time+Y to start_time+Y+Z

Button 3: From start_time+(Yx2) to start_time+(Yx2)+Z

In other words, the start-time will always be based on the

TimeSlots.mins_interval field, and the end time will always be [url removed, login to view] minutes after the button's start time.

You can see that at work at the sample link for Step 2.

RECURRANCE:

If AppointmentTypes.recur_for IN ('Client','Both') then there will be a recurrence menu as shown in the blue box on the sample link. Recurrance is always optional if available.

Recurrance capabilities are limited by the following fields:

- AppointmentTypes.recur_maxdates is the maximum number of appointments that can be set at once.

- AppointmentTypes.min_wait is the minimum number of days between recurrances.

- AppointmentTypes.max_wait is the maximum number of days between recurrances.

When recurring appointments are entered, you will use the

Appointments.next_id field to create a linked list within the database. The next_id is an Appointments.appointment_id for the next recurring appointment.

Step 3:

Prerequisites: A date, a start_time, an AppointmentTypes.type_id, and a

Schedules.schedule_id.

Optional: Recurrance info.

The purpose of step 3 is to enter personal data or log in as a registered customer.

If the customer has already registered, their email address and password are used to login. The password will be saved and compared using the MySQL PASSWORD() string function. If they log in using that method, then the apptclient_id they logged in with must match the client_id that the appointment is being scheduled for ($_REQUEST['cid'] from step 1)

If they have not registered before, then the registration form will be shown. The fields to be shown are configured by the business customer. For each possible field (including up to 6 custom fields) there are two MySQL fields... {fieldname}_shown and {fieldname}_required which are both tinyint(1). (The custom fields also have custom_{n}_label). This form is configured in the AppointmentTypes table for each type_id.

If the email address field is shown and required, then the system automatically creates a password for each new registration and emails it to the customer. This becomes their login in the future.

If [url removed, login to view] (tinyint(1)) = 1, then only existing clients can schedule this type of appointment. Anyone trying to proceed past step 3 without logging in (or failing to log in) will see the message configured in AppointmentTypes.restrict_msg.

Otherwise, if this is a new user, their information is written to the AppointmentClients table. Their appointment information is written to the Appointments table.

If AppointmentTypes.requires_confirmation = 1, then

[url removed, login to view] will = 0. Otherwise, [url removed, login to view] = 1.

All other Appointments fields are self explanatory:

- appointment_id (primary key integer, auto_increment)

- apptclient_id (integer)

- client_id (integer)

- type_id (integer)

- schedule_id (integer)

- start_datetime (timestamp)

- duration (tinyint(4))

- recurring (tinyint(1))

- next_id (integer)

- confirmed (tinyint(1))

- canceled (tinyint(1))

- comments (BLOB)

Email notices will be sent to anyone monitoring the schedule that the appointment was added to:

ScheduleMonitors

- user_id

- schedule_id

ClientUsers

- user_id

- email

If used, these two messages will be shown to the customer after their appointment is in the system:

AppointmentTypes

- thankyou_msg (BLOB)

- confirm_embed_html (BLOB)

In addition, a stock "Thank you for registering an appointment with {[url removed, login to view] WHERE client_id=$cid}." will also be shown.

OTHER CONDITIONS

If a customer tries to enter an appointment which has become unavailable since they clicked the date/time button on Step 2, they will see a message to that effect and be taken back to step 2.

If a customer attempts to set invalid recurrence settings, they will be shown a message to that effect and returned to step 2, with all their other choices intact and indicated via the UI (date selected, cid and tid selected, optionally sid selected)

If a customer attempts to schedule a restricted appointment and fills out the customer contact info form, they will see the message {AppointmentTypes.restrict_msg WHERE appttype_id = $tid}. However, their form values should be emailed to the users who monitor the schedule that their appointment would have been added to:

ScheduleMonitors

- user_id

- schedule_id

ClientUsers

- user_id

- email

If a field that is required in the customer signup form (step 3) is not filled in, or does not contain valid formats (I have an email regexp if you need it), the will be returned to step 3 and shown which fields need corrected.

Additional information:

You must use two classes that I have been using for database abstraction and HTML templating. This is so that the database calls and template functionality can be kept to a uniform standard of flexibility. All HTML should be in templates using the template class.

They are super-duper-easy to use and are BSD licensed, so you can keep

'em.

Kỹ năng: Bất kì công việc gì, MySQL, PHP

Xem thêm: work home scheduling appointments, work home free start, work home database, need start online business, professionalism, data entry involve, data entry consist, ways work home online, ways work home, ways start book, things work home, thank note sample, thank registering, templates menu free, system one services, string match, site templates left menu, site templates free html, sent one, scope online business, sample thank note, sample bids, regexp info, project scheduling template, project messages

Về Bên Thuê:
( 1 nhận xét ) Fall City, United States

Mã Dự Án: #1873874