本文整理汇总了PHP中Check::TranslateDayweek方法的典型用法代码示例。如果您正苦于以下问题:PHP Check::TranslateDayweek方法的具体用法?PHP Check::TranslateDayweek怎么用?PHP Check::TranslateDayweek使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Check
的用法示例。
在下文中一共展示了Check::TranslateDayweek方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
<div class="row">
<div class="col-lg-12 col-md-12">
<p class="h4 bold"><?php
echo $Grupos;
?>
</p>
<p>Grupo(s)</p>
</div>
</div>
</div>
<div class="dashboard_footer red"></div>
<div class="clearfix"></div>
</article>
<article class="col-lg-3">
<?php
$read->ExeRead(DB_PSICO_GRUPOS, "WHERE grupo_status = 1 AND grupo_semana LIKE '%' :s '%'", "s=" . Check::TranslateDayweek(date('D')));
?>
<header class="dashboard_header blue">
<h1 class="h5"><i class="fa fa-lg fa-arrow-up"></i>SESSÕES EM GRUPO DE HOJE</h1>
</header>
<div class="dashboard_content">
<div class="row">
<div class="col-lg-12 col-md-12 small">
<?php
if ($read->getResult()) {
?>
<table class="table table-condensed table-hover">
<thead>
<tr class="bg-info">
<th>Nome: </th>
<th>-</th>
示例2: foreach
<th data-column-id="data">Data:</th>
<th data-column-id="chamada">Chamada Realizada:</th>
<th data-column-id="links" data-formatter="commands" data-sortable="false">-</th>
</tr>
</thead>
<tbody>
<?php
$readTurma->ExeRead(DB_AULAS, "WHERE curso_id = :id AND turma_id = :idt ORDER BY data ASC", "id={$cursoId}&idt={$turmaId}");
if ($readTurma->getResult()) {
foreach ($readTurma->getResult() as $tur) {
extract($tur);
$chamada_status = $chamada_status ? 'Sim' : 'Não';
?>
<tr>
<td><span><?php
echo Check::TranslateDayweek(date('D', strtotime($data)));
?>
</span></td>
<td><span><?php
echo date('d/m/Y', strtotime($data));
?>
</span></td>
<td><span><?php
echo $chamada_status;
?>
</span></td>
<td>
<?php
echo $cursoId . ',' . $turmaId . ',' . $id;
?>
</td>
示例3: UpdateClasses
private function UpdateClasses()
{
$readClass = new Read();
$createClass = new Create();
$deleteClass = new Delete();
$initialTime = strtotime($this->Data['turma_data_inicio']);
$finalTime = strtotime($this->Data['turma_data_termino']);
$timeClass = $finalTime - $initialTime;
$totalDaysClass = (int) floor($timeClass / (60 * 60 * 24));
$Class = ['curso_id' => $this->Data['curso_id'], 'turma_id' => $this->TurmaId, 'chamada_status' => '0', 'create_date' => date('Y-m-d H:i:s'), 'created_by' => $this->UserId];
for ($i = 0; $i <= $totalDaysClass; $i++) {
$dayClass = date('Y-m-d', strtotime($this->Data['turma_data_inicio'] . ' + ' . $i . ' days'));
$weekday = date('D', strtotime($dayClass));
$readClass->FullRead("SELECT data FROM " . DB_AULAS . " WHERE data = :data", "data=" . $dayClass);
if ($readClass->getResult()) {
if (strpos($this->Data['turma_semana'], Check::TranslateDayweek($weekday)) === false) {
$deleteClass->ExeDelete(DB_AULAS, "WHERE data = :data", "data=" . $dayClass);
}
} else {
if (strpos($this->Data['turma_semana'], Check::TranslateDayweek($weekday)) !== false) {
$Class['data'] = date('Y-m-d', strtotime($this->Data['turma_data_inicio'] . ' + ' . $i . ' days'));
$createClass->ExeCreate(DB_AULAS, $Class);
}
}
}
}
示例4: SomaHoras
private function SomaHoras()
{
$numDays = cal_days_in_month(CAL_GREGORIAN, $this->Mes, $this->Ano);
$daysClass = 0;
list($horaInicio, $minInicio) = explode(":", $this->DataHeader['turma_hora_inicio']);
list($horaFinal, $minFinal) = explode(":", $this->DataHeader['turma_hora_termino']);
$totalMinutesPerClass = $horaFinal * 60 + $minFinal - ($horaInicio * 60 + $minInicio);
for ($i = 0; $i < $numDays; $i++) {
$dayClass = date('Y-m-d', strtotime($this->Ano . '-' . $this->Mes . '-01' . ' + ' . $i . ' days'));
$weekday = date('D', strtotime($dayClass));
if (strpos($this->DataHeader['turma_semana'], Check::TranslateDayweek($weekday)) !== false) {
$daysClass++;
}
}
$totalMinutes = $totalMinutesPerClass * $daysClass;
$totalHoras = floor($totalMinutes / 60);
$totalMinutes -= $totalHoras * 60;
return sprintf("%02d", $totalHoras) . "h" . sprintf("%02d", $totalMinutes) . "m";
}