SCHEDULE-スケジュール-
}
if( $name != null ){
$array_one = array();
foreach( $array as $idx => $value ){
if( $value['therapist_name'] == $name ){
$array_one = $value;
}
}
return $array_one;
}else{
return $array;
}
}
function dispTodayInfo(){
$calendar_data=getTherapistSchedule();
$today=date('Y-m-d',strtotime(" -5hours "));
if( isset($calendar_data[$today]) ){
return $calendar_data[$today];
}else{
return '';
}
}
function dispWeekInfo($op = 'now'){
$calendar_data=getTherapistSchedule();
list($start_date, $end_date) = getWeekRange('2019-12-16');
$today=date('Y-m-d',strtotime("-5hours"));
$the_date=$today;
$html = '';
$input_html = '';
$weeks_name = array('sun','mon', 'tue', 'wed', 'thu', 'fri', 'sat', );
$weeks_name_jp = array("日", "月", "火", "水", "木", "金", "土");
$weeks_class = array('sun','', '', '', '', '', 'sat');
$idx = date('w', strtotime("-5hours"));
for($i=$idx; $i<$idx+7; $i++){
$checked = '';
if( $the_date == $today ) $checked = ' checked="checked"';
$input_html .= '
';
$html .= '
';
$html .= isset( $calendar_data[$the_date] ) ? $calendar_data[$the_date] : "";
$html .= '
';
$the_date = getNextDay($the_date);
}
$html = $input_html.$html;
return $html;
}
function getNextDay($date){
return date('Y-m-d', strtotime( $date . '+1 day'));
}
function getWeekRange($date) {
$start_date = "";
$end_date = "";
$t = strtotime($date);
if ( date('w', $t) == 1 ) {
;
} else {
$t = strtotime("last monday", $t);
}
$start_date = date("Y-m-d", $t);
$t = strtotime("next sunday", $t);
$end_date = date("Y-m-d", $t);
return array($start_date,$end_date);
}
function dispTherapistInfo($w=null, $name=null){
if($w === null) $w = date('w');
$info_arr = getTherapistInfo($w, $name);
if( $info_arr == array() ){
return '△(未確定)';
}
$weeks = '';
foreach($info_arr as $value){
$weeks .= '
';
$weeks .= '';
$weeks .= '';
$weeks .= '';
if( strpos($value['class'], 'c_luxury') !== false ){
$weeks .= '
';
}
if( strpos($value['class'], 'c_gold') !== false ){
$weeks .= '
EXPERT
';
}else if( strpos($value['class'], 'c_platinum') !== false ){
$weeks .= '
PLATINUM
';
}else if( strpos($value['class'], 'c_ultra') !== false ){
$weeks .= '
ULTRA
';
}
$weeks .= '
'.$value['therapist_name'].'
';
$weeks .= '
'.$value['therapist_id'].'
';
$weeks .= '
'.$value['title'].'
';
$weeks .= '
'.$value['copy'].'
';
$weeks .= '
'.$value['time'].'
';
$weeks .= ''.$value['erea'].'';
$weeks .= '
';
$weeks .= '';
if($value['twitter']!=""){
$tmp= 'https://twitter.com/'.$value['twitter'];
$weeks .= '';
}
$weeks .= '';
}
return $weeks;
}
function dispWeekOnePerson($name=null){
$calendar_data=getTherapistSchedule($name);
$today=date('Y-m-d',strtotime("-5hours"));
$the_date=$today;
$html = '';
$weeks_name = array('sun','mon', 'tue', 'wed', 'thu', 'fri', 'sat');
$weeks_name_jp = array("日", "月", "火", "水", "木", "金", "土");
$weeks_class = array('sun','', '', '', '', '', 'sat');
$idx = date('w', strtotime("-5hours"));
$html .= '
';
for($i=$idx; $i<$idx+7; $i++){
$html .= '';
$html .= '' . date("n/j", strtotime($the_date)) . '(' . $weeks_name_jp[$i%7] . ') | ';
$html .= '';
if($calendar_data[$the_date]['time']!=""){
$html .= ' '.$calendar_data[$the_date]['time'].' WEB予約';
}else{
$html .= 'お休み';
}
$html .= ' | ';
$html .= '
';
$the_date = getNextDay($the_date);
}
$html .= '
';
return $html;
}
?>
12/8(日) | お休み |
---|
12/9(月) | お休み |
---|
12/10(火) | お休み |
---|
12/11(水) | 12:00-24:00 |
---|
12/12(木) | お休み |
---|
12/13(金) | お休み |
---|
12/14(土) | 15:00-24:00 |
---|
12/15(日) | 12:00-21:00 |
---|
12/16(月) | 15:00-24:00 |
---|
12/17(火) | お休み |
---|
12/18(水) | お休み |
---|
12/19(木) | お休み |
---|
12/20(金) | お休み |
---|
12/21(土) | お休み |
---|