:: masseuse_schedule
<<set $here = 'masseuse_schedule'>>
<<set $ARGS = $location_var[$here]>>
<<if $location_var[$here][0] == 'schedule_reset'>>
	<<set $i = 1>>
	<<if getvar("$masseuse['shifts_required']") == 5>>
		<<warn 'JUMP MARKER ENCOUNTERED: :loop_masseuse_sched_part'>>
		<<if $masseuse[$i + '_shift_1'] != 1>>
			<<setinit $masseuse[$i + '_shift_1'] = 0>>
			<<setinit $masseuse[$i + '_shift_1_taken'] = rand(0,2)>>
		<</if>>
		<<if $masseuse[$i + '_shift_2'] != 1>>
			<<setinit $masseuse[$i + '_shift_2'] = 0>>
			<<setinit $masseuse[$i + '_shift_2_taken'] = rand(0,2)>>
		<</if>>
		<<if $masseuse[$i + '_shift_3'] != 1>>
			<<setinit $masseuse[$i + '_shift_3'] = 0>>
			<<setinit $masseuse[$i + '_shift_3_taken'] = rand(-1,2)>>
		<</if>>
		<<set $i += 1>>
		<<if getvar("$i") < 8>>
			<<warn 'JUMP COMMAND ENCOUNTERED: jump loop_masseuse_sched_part'>>

		<</if>>
	<<elseif getvar("$masseuse['shifts_required']") == 10>>
		<<warn 'JUMP MARKER ENCOUNTERED: :loop_masseuse_sched_full'>>
		<<if $masseuse[$i + '_shift_1'] != 1>>
			<<setinit $masseuse[$i + '_shift_1'] = 0>>
			<<setinit $masseuse[$i + '_shift_1_taken'] = rand(-3,2)>>
		<</if>>
		<<if $masseuse[$i + '_shift_2'] != 1>>
			<<setinit $masseuse[$i + '_shift_2'] = 0>>
			<<setinit $masseuse[$i + '_shift_2_taken'] = rand(-3,2)>>
		<</if>>
		<<if $masseuse[$i + '_shift_3'] != 1>>
			<<setinit $masseuse[$i + '_shift_3'] = 0>>
			<<setinit $masseuse[$i + '_shift_3_taken'] = rand(-3,2)>>
		<</if>>
		<<set $i += 1>>
		<<if getvar("$i") < 8>>
			<<warn 'JUMP COMMAND ENCOUNTERED: jump loop_masseuse_sched_full'>>

		<</if>>
	<</if>>
<</if>>
<<if $location_var[$here][0] == 'start'>>
	<<act 'Finish scheduling'>>
		<<gt 'salon' 'start'>>
	<</act>>
	<<if getvar("$masseuse['schedule_update']") == 0>>
		<<setinit $masseuse['schedule_update'] = $time.daystart>> <<gs 'masseuse_schedule' 'schedule_reset'>>

	<</if>>
	<Table border=1><TR><TH>Sunday</TH> <TH>Monday</TH> <TH>Tuesday</TH> <TH>Wednesday</TH> <TH>Thursday</TH> <TH>Friday</TH> <TH>Saturday</TH></TR>
	<!-- !! ---------------------------------------------- 09:00 Shifts ----------------------------------------------------------------------------------->
	<!-- !! First Sunday Shift-->
	<!-- FAILED TO CONVERT
		*P '<tr><td>'
	-----
		 * ERROR: FAILED TO CONVERT LITERAL: """P '<tr><td>'"""

	-->
	<<warn "CONVERSION ERROR 9a0904a366774fa6489568f51093cda6">>
	<<if getvar("$masseuse['7_shift_1']") == 0 and getvar("$masseuse['7_shift_1_taken']") < 2 and no ($time.weekday == 7 and $time.hour > 8 and $time.hour < 13)>>
		<<link " 09:00-13:00 shift">><<set $masseuse['7_shift_1'] = 1>> <<gt 'masseuse_schedule' 'start'>><</link>>
	<<elseif getvar("$masseuse['7_shift_1_taken']") == 2 or ($time.weekday == 7 and $time.hour > 8 and $time.hour < 13)>>
		<p>09:00-13:00 shift</p>
		<i>not available</i>
	<<elseif getvar("$masseuse['7_shift_1']") == 2>>
		<p>09:00-13:00 shift</p>
		<i>already worked</i>
	<<else>>
		<p>09:00-13:00 shift</p>
		<<link " Cancel Shift">><<set $masseuse['7_shift_1'] = 0>> <<gt 'masseuse_schedule' 'start'>><</link>>
	<</if>>
	</td><td>
	<!-- !! First Monday Shift-->
	<<if getvar("$masseuse['1_shift_1']") == 0 and getvar("$masseuse['1_shift_1_taken']") < 2 and no ($time.weekday == 1 and $time.hour > 8 and $time.hour < 13)>>
		<<link " 09:00-13:00 shift">><<set $masseuse['1_shift_1'] = 1>> <<gt 'masseuse_schedule' 'start'>><</link>>
	<<elseif getvar("$masseuse['1_shift_1_taken']") == 2 or ($time.weekday == 1 and $time.hour > 8 and $time.hour < 13)>>
		<p>09:00-13:00 shift</p>
		<i>not available</i>
	<<elseif getvar("$masseuse['1_shift_1']") == 2>>
		<p>09:00-13:00 shift</p>
		<i>already worked</i>
	<<else>>
		<p>09:00-13:00 shift</p>
		<<link " Cancel Shift">><<set $masseuse['1_shift_1'] = 0>> <<gt 'masseuse_schedule' 'start'>><</link>>
	<</if>>
	</td><td>
	<!-- !! First Tuesday Shift-->
	<<if getvar("$masseuse['2_shift_1']") == 0 and getvar("$masseuse['2_shift_1_taken']") < 2 and no ($time.weekday == 2 and $time.hour > 8 and $time.hour < 13)>>
		<<link " 09:00-13:00 shift">><<set $masseuse['2_shift_1'] = 1>> <<gt 'masseuse_schedule' 'start'>><</link>>
	<<elseif getvar("$masseuse['2_shift_1_taken']") == 2 or ($time.weekday == 2 and $time.hour > 8 and $time.hour < 13)>>
		<p>09:00-13:00 shift</p>
		<i>not available</i>
	<<elseif getvar("$masseuse['2_shift_1']") == 2>>
		<p>09:00-13:00 shift</p>
		<i>already worked</i>
	<<else>>
		<p>09:00-13:00 shift</p>
		<<link " Cancel Shift">><<set $masseuse['2_shift_1'] = 0>> <<gt 'masseuse_schedule' 'start'>><</link>>
	<</if>>
	</td><td>
	<!-- !! First Wednesday Shift-->
	<<if getvar("$masseuse['3_shift_1']") == 0 and getvar("$masseuse['3_shift_1_taken']") < 2 and no ($time.weekday == 3 and $time.hour > 8 and $time.hour < 13)>>
		<<link " 09:00-13:00 shift">><<set $masseuse['3_shift_1'] = 1>> <<gt 'masseuse_schedule' 'start'>><</link>>
	<<elseif getvar("$masseuse['3_shift_1_taken']") == 2 or ($time.weekday == 3 and $time.hour > 8 and $time.hour < 13)>>
		<p>09:00-13:00 shift</p>
		<i>not available</i>
	<<elseif getvar("$masseuse['3_shift_1']") == 2>>
		<p>09:00-13:00 shift</p>
		<i>already worked</i>
	<<else>>
		<p>09:00-13:00 shift</p>
		<<link " Cancel Shift">><<set $masseuse['3_shift_1'] = 0>> <<gt 'masseuse_schedule' 'start'>><</link>>
	<</if>>
	</td><td>
	<!-- !! First Thursday Shift-->
	<<if getvar("$masseuse['4_shift_1']") == 0 and getvar("$masseuse['4_shift_1_taken']") < 2 and no ($time.weekday == 4 and $time.hour > 8 and $time.hour < 13)>>
		<<link " 09:00-13:00 shift">><<set $masseuse['4_shift_1'] = 1>> <<gt 'masseuse_schedule' 'start'>><</link>>
	<<elseif getvar("$masseuse['4_shift_1_taken']") == 2 or ($time.weekday == 4 and $time.hour > 8 and $time.hour < 13)>>
		<p>09:00-13:00 shift</p>
		<i>not available</i>
	<<elseif getvar("$masseuse['4_shift_1']") == 2>>
		<p>09:00-13:00 shift</p>
		<i>already worked</i>
	<<else>>
		<p>09:00-13:00 shift</p>
		<<link " Cancel Shift">><<set $masseuse['4_shift_1'] = 0>> <<gt 'masseuse_schedule' 'start'>><</link>>
	<</if>>
	</td><td>
	<!-- !! First Friday Shift-->
	<<if getvar("$masseuse['5_shift_1']") == 0 and getvar("$masseuse['5_shift_1_taken']") < 2 and no ($time.weekday == 5 and $time.hour > 8 and $time.hour < 13)>>
		<<link " 09:00-13:00 shift">><<set $masseuse['5_shift_1'] = 1>> <<gt 'masseuse_schedule' 'start'>><</link>>
	<<elseif getvar("$masseuse['5_shift_1_taken']") == 2 or ($time.weekday == 5 and $time.hour > 8 and $time.hour < 13)>>
		<p>09:00-13:00 shift</p>
		<i>not available</i>
	<<elseif getvar("$masseuse['5_shift_1']") == 2>>
		<p>09:00-13:00 shift</p>
		<i>already worked</i>
	<<else>>
		<p>09:00-13:00 shift</p>
		<<link " Cancel Shift">><<set $masseuse['5_shift_1'] = 0>> <<gt 'masseuse_schedule' 'start'>><</link>>
	<</if>>
	</td><td>
	<!-- !! First Saturday Shift-->
	<<if getvar("$masseuse['6_shift_1']") == 0 and getvar("$masseuse['6_shift_1_taken']") < 2 and no ($time.weekday == 6 and $time.hour > 8 and $time.hour < 13)>>
		<<link " 09:00-13:00 shift">><<set $masseuse['6_shift_1'] = 1>> <<gt 'masseuse_schedule' 'start'>><</link>>
	<<elseif getvar("$masseuse['6_shift_1_taken']") == 2 or ($time.weekday == 6 and $time.hour > 8 and $time.hour < 13)>>
		<p>09:00-13:00 shift</p>
		<i>not available</i>
	<<elseif getvar("$masseuse['6_shift_1']") == 2>>
		<p>09:00-13:00 shift</p>
		<i>already worked</i>
	<<else>>
		<p>09:00-13:00 shift</p>
		<<link " Cancel Shift">><<set $masseuse['6_shift_1'] = 0>> <<gt 'masseuse_schedule' 'start'>><</link>>
	<</if>>
	</td></tr>
	<!-- !! ---------------------------------------------- 13:00 Shifts ----------------------------------------------------------------------------------->
	<!-- !! Second Sunday Shift-->
	<!-- FAILED TO CONVERT
		*P '<tr><td>'
	-----
		 * ERROR: FAILED TO CONVERT LITERAL: """P '<tr><td>'"""

	-->
	<<warn "CONVERSION ERROR 9a0904a366774fa6489568f51093cda6">>
	<<if getvar("$masseuse['7_shift_2']") == 0 and getvar("$masseuse['7_shift_2_taken']") < 2 and no ($time.weekday == 7 and $time.hour > 12 and $time.hour < 17)>>
		<<link " 13:00-17:00 shift">><<set $masseuse['7_shift_2'] = 1>> <<gt 'masseuse_schedule' 'start'>><</link>>
	<<elseif getvar("$masseuse['7_shift_2_taken']") == 2 or ($time.weekday == 7 and $time.hour > 12 and $time.hour < 17)>>
		<p>13:00-17:00 shift</p>
		<i>not available</i>
	<<elseif getvar("$masseuse['7_shift_2']") == 2>>
		<p>13:00-17:00 shift</p>
		<i>already worked</i>
	<<else>>
		<p>13:00-17:00 shift</p>
		<<link " Cancel Shift">><<set $masseuse['7_shift_2'] = 0>> <<gt 'masseuse_schedule' 'start'>><</link>>
	<</if>>
	</td><td>
	<!-- !! Second Monday Shift-->
	<<if getvar("$masseuse['1_shift_2']") == 0 and getvar("$masseuse['1_shift_2_taken']") < 2 and no ($time.weekday == 1 and $time.hour > 12 and $time.hour < 17)>>
		<<link " 13:00-17:00 shift">><<set $masseuse['1_shift_2'] = 1>> <<gt 'masseuse_schedule' 'start'>><</link>>
	<<elseif getvar("$masseuse['1_shift_2_taken']") == 2 or ($time.weekday == 1 and $time.hour > 12 and $time.hour < 17)>>
		<p>13:00-17:00 shift</p>
		<i>not available</i>
	<<elseif getvar("$masseuse['1_shift_2']") == 2>>
		<p>13:00-17:00 shift</p>
		<i>already worked</i>
	<<else>>
		<p>13:00-17:00 shift</p>
		<<link " Cancel Shift">><<set $masseuse['1_shift_2'] = 0>> <<gt 'masseuse_schedule' 'start'>><</link>>
	<</if>>
	</td><td>
	<!-- !! Second Tuesday Shift-->
	<<if getvar("$masseuse['2_shift_2']") == 0 and getvar("$masseuse['2_shift_2_taken']") < 2 and no ($time.weekday == 2 and $time.hour > 12 and $time.hour < 17)>>
		<<link " 13:00-17:00 shift">><<set $masseuse['2_shift_2'] = 1>> <<gt 'masseuse_schedule' 'start'>><</link>>
	<<elseif getvar("$masseuse['2_shift_2_taken']") == 2 or ($time.weekday == 2 and $time.hour > 12 and $time.hour < 17)>>
		<p>13:00-17:00 shift</p>
		<i>not available</i>
	<<elseif getvar("$masseuse['2_shift_2']") == 2>>
		<p>13:00-17:00 shift</p>
		<i>already worked</i>
	<<else>>
		<p>13:00-17:00 shift</p>
		<<link " Cancel Shift">><<set $masseuse['2_shift_2'] = 0>> <<gt 'masseuse_schedule' 'start'>><</link>>
	<</if>>
	</td><td>
	<!-- !! Second Wednesday Shift-->
	<<if getvar("$masseuse['3_shift_2']") == 0 and getvar("$masseuse['3_shift_2_taken']") < 2 and no ($time.weekday == 3 and $time.hour > 12 and $time.hour < 17)>>
		<<link " 13:00-17:00 shift">><<set $masseuse['3_shift_2'] = 1>> <<gt 'masseuse_schedule' 'start'>><</link>>
	<<elseif getvar("$masseuse['3_shift_2_taken']") == 2 or ($time.weekday == 3 and $time.hour > 12 and $time.hour < 17)>>
		<p>13:00-17:00 shift</p>
		<i>not available</i>
	<<elseif getvar("$masseuse['3_shift_2']") == 2>>
		<p>13:00-17:00 shift</p>
		<i>already worked</i>
	<<else>>
		<p>13:00-17:00 shift</p>
		<<link " Cancel Shift">><<set $masseuse['3_shift_2'] = 0>> <<gt 'masseuse_schedule' 'start'>><</link>>
	<</if>>
	</td><td>
	<!-- !! Second Thursday Shift-->
	<<if getvar("$masseuse['4_shift_2']") == 0 and getvar("$masseuse['4_shift_2_taken']") < 2 and no ($time.weekday == 4 and $time.hour > 12 and $time.hour < 17)>>
		<<link " 13:00-17:00 shift">><<set $masseuse['4_shift_2'] = 1>> <<gt 'masseuse_schedule' 'start'>><</link>>
	<<elseif getvar("$masseuse['4_shift_2_taken']") == 2 or ($time.weekday == 4 and $time.hour > 12 and $time.hour < 17)>>
		<p>13:00-17:00 shift</p>
		<i>not available</i>
	<<elseif getvar("$masseuse['4_shift_2']") == 2>>
		<p>13:00-17:00 shift</p>
		<i>already worked</i>
	<<else>>
		<p>13:00-17:00 shift</p>
		<<link " Cancel Shift">><<set $masseuse['4_shift_2'] = 0>> <<gt 'masseuse_schedule' 'start'>><</link>>
	<</if>>
	</td><td>
	<!-- !! Second Friday Shift-->
	<<if getvar("$masseuse['5_shift_2']") == 0 and getvar("$masseuse['5_shift_2_taken']") < 2 and no ($time.weekday == 5 and $time.hour > 12 and $time.hour < 17)>>
		<<link " 13:00-17:00 shift">><<set $masseuse['5_shift_2'] = 1>> <<gt 'masseuse_schedule' 'start'>><</link>>
	<<elseif getvar("$masseuse['5_shift_2_taken']") == 2 or ($time.weekday == 5 and $time.hour > 12 and $time.hour < 17)>>
		<p>13:00-17:00 shift</p>
		<i>not available</i>
	<<elseif getvar("$masseuse['5_shift_2']") == 2>>
		<p>13:00-17:00 shift</p>
		<i>already worked</i>
	<<else>>
		<p>13:00-17:00 shift</p>
		<<link " Cancel Shift">><<set $masseuse['5_shift_2'] = 0>> <<gt 'masseuse_schedule' 'start'>><</link>>
	<</if>>
	</td><td>
	<!-- !! Second Saturday Shift-->
	<<if getvar("$masseuse['6_shift_2']") == 0 and getvar("$masseuse['6_shift_2_taken']") < 2 and no ($time.weekday == 6 and $time.hour > 12 and $time.hour < 17)>>
		<<link " 13:00-17:00 shift">><<set $masseuse['6_shift_2'] = 1>> <<gt 'masseuse_schedule' 'start'>><</link>>
	<<elseif getvar("$masseuse['6_shift_2_taken']") == 2 or ($time.weekday == 6 and $time.hour > 12 and $time.hour < 17)>>
		<p>13:00-17:00 shift</p>
		<i>not available</i>
	<<elseif getvar("$masseuse['6_shift_2']") == 2>>
		<p>13:00-17:00 shift</p>
		<i>already worked</i>
	<<else>>
		<p>13:00-17:00 shift</p>
		<<link " Cancel Shift">><<set $masseuse['6_shift_2'] = 0>> <<gt 'masseuse_schedule' 'start'>><</link>>
	<</if>>
	</td></tr>
	<!-- !! ---------------------------------------------- 17:00 Shifts ----------------------------------------------------------------------------------->
	<!-- !! Third Sunday Shift-->
	<!-- FAILED TO CONVERT
		*P '<tr><td>'
	-----
		 * ERROR: FAILED TO CONVERT LITERAL: """P '<tr><td>'"""

	-->
	<<warn "CONVERSION ERROR 9a0904a366774fa6489568f51093cda6">>
	<<if getvar("$masseuse['7_shift_3']") == 0 and getvar("$masseuse['7_shift_3_taken']") < 2 and no ($time.weekday == 7 and $time.hour > 16 and $time.hour < 21)>>
		<<link " 17:00-21:00 shift">><<set $masseuse['7_shift_3'] = 1>> <<gt 'masseuse_schedule' 'start'>><</link>>
	<<elseif getvar("$masseuse['7_shift_3_taken']") == 2 or ($time.weekday == 7 and $time.hour > 16 and $time.hour < 21)>>
		<p>17:00-21:00 shift</p>
		<i>not available</i>
	<<elseif getvar("$masseuse['7_shift_3']") == 2>>
		<p>17:00-21:00 shift</p>
		<i>already worked</i>
	<<else>>
		<p>17:00-21:00 shift</p>
		<<link " Cancel Shift">><<set $masseuse['7_shift_3'] = 0>> <<gt 'masseuse_schedule' 'start'>><</link>>
	<</if>>
	</td><td>
	<!-- !! Third Monday Shift-->
	<<if getvar("$masseuse['1_shift_3']") == 0 and getvar("$masseuse['1_shift_3_taken']") < 2 and no ($time.weekday == 1 and $time.hour > 16 and $time.hour < 21)>>
		<<link " 17:00-21:00 shift">><<set $masseuse['1_shift_3'] = 1>> <<gt 'masseuse_schedule' 'start'>><</link>>
	<<elseif getvar("$masseuse['1_shift_3_taken']") == 2 or ($time.weekday == 1 and $time.hour > 16 and $time.hour < 21)>>
		<p>17:00-21:00 shift</p>
		<i>not available</i>
	<<elseif getvar("$masseuse['1_shift_3']") == 2>>
		<p>17:00-21:00 shift</p>
		<i>already worked</i>
	<<else>>
		<p>17:00-21:00 shift</p>
		<<link " Cancel Shift">><<set $masseuse['1_shift_3'] = 0>> <<gt 'masseuse_schedule' 'start'>><</link>>
	<</if>>
	</td><td>
	<!-- !! Third Tuesday Shift-->
	<<if getvar("$masseuse['2_shift_3']") == 0 and getvar("$masseuse['2_shift_3_taken']") < 2 and no ($time.weekday == 2 and $time.hour > 16 and $time.hour < 21)>>
		<<link " 17:00-21:00 shift">><<set $masseuse['2_shift_3'] = 1>> <<gt 'masseuse_schedule' 'start'>><</link>>
	<<elseif getvar("$masseuse['2_shift_3_taken']") == 2 or ($time.weekday == 2 and $time.hour > 16 and $time.hour < 21)>>
		<p>17:00-21:00 shift</p>
		<i>not available</i>
	<<elseif getvar("$masseuse['2_shift_3']") == 2>>
		<p>17:00-21:00 shift</p>
		<i>already worked</i>
	<<else>>
		<p>17:00-21:00 shift</p>
		<<link " Cancel Shift">><<set $masseuse['2_shift_3'] = 0>> <<gt 'masseuse_schedule' 'start'>><</link>>
	<</if>>
	</td><td>
	<!-- !! Third Wednesday Shift-->
	<<if getvar("$masseuse['3_shift_3']") == 0 and getvar("$masseuse['3_shift_3_taken']") < 2 and no ($time.weekday == 3 and $time.hour > 16 and $time.hour < 21)>>
		<<link " 17:00-21:00 shift">><<set $masseuse['3_shift_3'] = 1>> <<gt 'masseuse_schedule' 'start'>><</link>>
	<<elseif getvar("$masseuse['3_shift_3_taken']") == 2 or ($time.weekday == 3 and $time.hour > 16 and $time.hour < 21)>>
		<p>17:00-21:00 shift</p>
		<i>not available</i>
	<<elseif getvar("$masseuse['3_shift_3']") == 2>>
		<p>17:00-21:00 shift</p>
		<i>already worked</i>
	<<else>>
		<p>17:00-21:00 shift</p>
		<<link " Cancel Shift">><<set $masseuse['3_shift_3'] = 0>> <<gt 'masseuse_schedule' 'start'>><</link>>
	<</if>>
	</td><td>
	<!-- !! Third Thursday Shift-->
	<<if getvar("$masseuse['4_shift_3']") == 0 and getvar("$masseuse['4_shift_3_taken']") < 2 and no ($time.weekday == 4 and $time.hour > 16 and $time.hour < 21)>>
		<<link " 17:00-21:00 shift">><<set $masseuse['4_shift_3'] = 1>> <<gt 'masseuse_schedule' 'start'>><</link>>
	<<elseif getvar("$masseuse['4_shift_3_taken']") == 2 or ($time.weekday == 4 and $time.hour > 16 and $time.hour < 21)>>
		<p>17:00-21:00 shift</p>
		<i>not available</i>
	<<elseif getvar("$masseuse['4_shift_3']") == 2>>
		<p>17:00-21:00 shift</p>
		<i>already worked</i>
	<<else>>
		<p>17:00-21:00 shift</p>
		<<link " Cancel Shift">><<set $masseuse['4_shift_3'] = 0>> <<gt 'masseuse_schedule' 'start'>><</link>>
	<</if>>
	</td><td>
	<!-- !! Third Friday Shift-->
	<<if getvar("$masseuse['5_shift_3']") == 0 and getvar("$masseuse['5_shift_3_taken']") < 2 and no ($time.weekday == 5 and $time.hour > 16 and $time.hour < 21)>>
		<<link " 17:00-21:00 shift">><<set $masseuse['5_shift_3'] = 1>> <<gt 'masseuse_schedule' 'start'>><</link>>
	<<elseif getvar("$masseuse['5_shift_3_taken']") == 2 or ($time.weekday == 5 and $time.hour > 16 and $time.hour < 21)>>
		<p>17:00-21:00 shift</p>
		<i>not available</i>
	<<elseif getvar("$masseuse['5_shift_3']") == 2>>
		<p>17:00-21:00 shift</p>
		<i>already worked</i>
	<<else>>
		<p>17:00-21:00 shift</p>
		<<link " Cancel Shift">><<set $masseuse['5_shift_3'] = 0>> <<gt 'masseuse_schedule' 'start'>><</link>>
	<</if>>
	</td><td>
	<!-- !! Third Saturday Shift-->
	<<if getvar("$masseuse['6_shift_3']") == 0 and getvar("$masseuse['6_shift_3_taken']") < 2 and no ($time.weekday == 6 and $time.hour > 16 and $time.hour < 21)>>
		<<link " 17:00-21:00 shift">><<set $masseuse['6_shift_3'] = 1>> <<gt 'masseuse_schedule' 'start'>><</link>>
	<<elseif getvar("$masseuse['6_shift_3_taken']") == 2 or ($time.weekday == 6 and $time.hour > 16 and $time.hour < 21)>>
		<p>17:00-21:00 shift</p>
		<i>not available</i>
	<<elseif getvar("$masseuse['6_shift_3']") == 2>>
		<p>17:00-21:00 shift</p>
		<i>already worked</i>
	<<else>>
		<p>17:00-21:00 shift</p>
		<<link " Cancel Shift">><<set $masseuse['6_shift_3'] = 0>> <<gt 'masseuse_schedule' 'start'>><</link>>
	<</if>>
	</td></tr>
<</if>>
