crobinson42
05-08-2010, 07:08 PM
I am trying to build a php site to build a weekly schedule for my employee's and i'm running out of ways to do it.
I have these tables:
-employee
-location
-shift
each table has an 'id' so i can call on employee's and location's with an $id variable.
I am thinking I will make a page to add 'shifts' and that page will insert the 'employee' and the 'location' into a row on the 'shift' table with the date and time.
Where I could use some help/idea's is creating the page to view a calendar, then be able click on a week(goes to new page) and view the scheduled shifts.
I'm not sure how to do a few things this would require:
1)call on date's appropriate to the month/year/day of week
2)only put shifts in the column that match the date at the top of the column
here's what i'm thinking for a format:
<table border="1" cellpadding="0">
<tr>
<td width="75"> </td>
<td >11MAY10</td>
<td >12MAY10</td>
<td >13MAY10</td>
<td >14MAY10</td>
<td >15MAY10</td>
<td >16MAY10</td>
<td >16MAY10</td>
</tr>
<tr>
<td><strong>location</strong></td>
<td><p><strong>shift:<br />
-</strong>employee<br />
-time
</p>
<p><strong>shift:<br />
-</strong>employee<br />
-time </p></td>
<td><strong>shift:<br />
-</strong>employee<br />
-time </td>
<td><strong>shift:<br />
-</strong>employee<br />
-time </td>
<td><p><strong>shift:<br />
-</strong>employee<br />
-time </p>
<p><strong>shift:<br />
-</strong>employee<br />
-time </p></td>
<td><strong>shift:<br />
-</strong>employee<br />
-time </td>
<td><strong>shift:<br />
-</strong>employee<br />
-time </td>
<td><p><strong>shift:<br />
-</strong>employee<br />
-time </p>
<p><strong>shift:<br />
-</strong>employee<br />
-time </p></td>
</tr>
</table>[/COLOR]
I have these tables:
-employee
-location
-shift
each table has an 'id' so i can call on employee's and location's with an $id variable.
I am thinking I will make a page to add 'shifts' and that page will insert the 'employee' and the 'location' into a row on the 'shift' table with the date and time.
Where I could use some help/idea's is creating the page to view a calendar, then be able click on a week(goes to new page) and view the scheduled shifts.
I'm not sure how to do a few things this would require:
1)call on date's appropriate to the month/year/day of week
2)only put shifts in the column that match the date at the top of the column
here's what i'm thinking for a format:
<table border="1" cellpadding="0">
<tr>
<td width="75"> </td>
<td >11MAY10</td>
<td >12MAY10</td>
<td >13MAY10</td>
<td >14MAY10</td>
<td >15MAY10</td>
<td >16MAY10</td>
<td >16MAY10</td>
</tr>
<tr>
<td><strong>location</strong></td>
<td><p><strong>shift:<br />
-</strong>employee<br />
-time
</p>
<p><strong>shift:<br />
-</strong>employee<br />
-time </p></td>
<td><strong>shift:<br />
-</strong>employee<br />
-time </td>
<td><strong>shift:<br />
-</strong>employee<br />
-time </td>
<td><p><strong>shift:<br />
-</strong>employee<br />
-time </p>
<p><strong>shift:<br />
-</strong>employee<br />
-time </p></td>
<td><strong>shift:<br />
-</strong>employee<br />
-time </td>
<td><strong>shift:<br />
-</strong>employee<br />
-time </td>
<td><p><strong>shift:<br />
-</strong>employee<br />
-time </p>
<p><strong>shift:<br />
-</strong>employee<br />
-time </p></td>
</tr>
</table>[/COLOR]