<?php

// 本日の日付を6時間プラスして換算
$today=date("Ymd", mktime(date("H") - SC_stamp));
$year = substr($today,0,4);
$mon = substr($today,4,2);
$day = substr($today,6,2);

//出勤マーク(0=出勤終,1=出勤中,2=出勤前,3=要TEL)
$scmark=array("　","☆","　","　");

//設定
$QSS="schedule";
require(plug_dir."plug-script-set.php");//csv読込
$ARRAY_NKIN=array_merge($SC_set['adbox']['schedule'][kintai],$ARRAY_kintai);

#---------------------------------------------#
#                      ポータルトップ
#---------------------------------------------#

//メッセージ1
$print_temp="";
$print_temp.="<h8>本日の出勤</h8>";

$SCH=array();
foreach($MEMLOG as $value){
	$Schedule=schedule($value['schedule_m'],$value['schweek_m'],$today);
	if($ARRAY_NKIN[$Schedule[1]]){
		$FLAG=today_sort($Schedule[0]);
		$SCH[]=array($FLAG[0],$FLAG[1],$Schedule[0],$value['name_m'],$value['gid_m']);
	}
}
asort($SCH);

$st="text-align:left;font-size:16px;";
$print_temp.="<div id='wrap'>";
$print_temp.="<div id='mainImages' class='mainImageInit' align=center><ul>";
$print_temp.="<li id='mainImage".$i."'><div style='$st'>";
$i=1;$flag=0;$flagb=0;
foreach($SCH as $k => $v){
	if($flagb) $print_temp.="</div></li><li id='mainImage".$i."' style='width:100%;'><div style='$st'>";$flagb=0;
	$print_temp.=$scmark[$v[0]]."<a href='?ss=schedule&plug=list&GID=".$v[4]."'>".$v[2]."　".$v[3]."</a><br>";
	if(!($i%5)) $flagb=1;
	++$i;$flag=1;
}
$print_temp.="</div></li></ul></div></div>";

if($flag){
	$PRINT.="<script type='text/javascript'>$(function(){ $('#mainImages ul li').flickSlide({target:'#mainImages>ul'}); });</script>\n";
	$PRINT.=$print_temp;
}
?>