function getAttendanceDaysOfWeek() { $listarray = array(); $text = ''; $allvalues = getDaysOfWeek(); $thevalues = $this->getDaysOfWeekArray(); if (isEmptyString($this->getWorkingDays())) { return $text; } if (count($thevalues) > 0) { foreach ($thevalues as $value) { if (!isArrayKeyAnEmptyString($value, $allvalues)) { $listarray[] = $allvalues[$value]; } } } if (count($listarray) > 0) { $text = createHTMLCommaListFromArray($listarray, ', '); } return $text; }
echo ' <h2> ' . $get2["name"] . '</h2> '; ?> <div class="content"> <table border="2" class="simple-little-table" align="center" width="80%" cellspacing="0"> <?php $strSQL = "select monday, tuesday, wednesday, thursday, friday from doctors where id = " . $tmp; $getFlagDays = mysql_query($strSQL); $getFlagDays = mysql_fetch_array($getFlagDays); $cols = 1; echo '<th>' . "Час" . '</th>'; $arr = array(); for ($i = 1; $i < 6; $i++) { if ($getFlagDays[getDaysOfWeek($i)]) { echo '<th>' . convertDays(getDaysOfWeek($i)) . '</th>'; $arr[] = $i; $cols++; } } $strSQL = "select start,finish,duration from doctors where id = " . $tmp; $getTime = mysql_query($strSQL); $getTime = mysql_fetch_array($getTime); $allTime = $getTime["finish"] - $getTime["start"]; $allTime *= 60; $rows = floor($allTime / $getTime["duration"]); $currentTime = floor($getTime["start"] * 60); for ($r = 0; $r < $rows; $r++) { echo "<tr>"; echo "<td>" . floor($currentTime / 60) . "-" . floor($currentTime) % 60 . "</td>"; for ($c = 1; $c < $cols; $c++) {