저는 취업 면접을 위해 PHP mysql 응용 프로그램을 만들고 있습니다. 동일한 색상 열에 날짜별로 정렬 된 부트 스트랩 패널이있는 관리자 파일러를 갖고 싶습니다.부트 스트랩 패널을 PHP로 날짜순으로 정렬
I 받기 홈페이지 Panal 또는없이
$db = connectPDO();
$query = ("SELECT razgovori.*, djelatnik.ime, djelatnik.prezime
FROM razgovori INNER JOIN djelatnik
ON djelatnik.id = razgovori.insert_by
ORDER BY datum_raz ASC");
$stmt = $db->prepare($query);
$stmt->execute();
$count = $stmt->rowCount();
$row = $stmt->fetch(PDO::FETCH_ASSOC);
$date = strtotime($row['datum_raz']);
$twoDaysAgoStart = strtotime('-2 day 00:00:00');
$yesterdayEnd = strtotime('yesterday 23:59:59');
$todayStart = strtotime('today 00:00:00');
$todayEnd = strtotime('today 23:59:59');
$tomorrowStart = strtotime('tomorrow 00:00:00');
$twoDaysAheadEnd = strtotime('+2 day 23:59:59');
<div class="container">
<div class="row">
<?php while ($row = $stmt->fetch(PDO::FETCH_ASSOC)): ?>
<?php $date = strtotime($row['datum_raz']); ?>
<?php if ($twoDaysAgoStart < $date && $yesterdayEnd > $date): ?>
<!--Panel info if past time Job interviews-->
<div class="col-md-4 pull-left">
<div class="panel panel-info">
<div class="panel-heading"><h3 class="panel-title"><?php echo
datumVrijemeSQLuHR($row['datum_raz']); ?></h3></div>
<div class="panel-body">
<div class="col-md-9">
<h5><a href="editRazgovori.php?id=<?php echo $row['id']; ?>"><?php
echo $row['rime'].' '.$row['rprezime']; ?></a></h5>
<?php echo $row['kontakt_br']; ?>
</div>
<div class="col-md-3">
<span class="label label-default pull-right"></h5><?php echo
$row['ime'].' '.$row['prezime']; ?></span>
</div>
</div>
</div>
</div>
<!--//Panel-->
</tr>
<tr>
<!--Panel primary if Job interview is today-->
<?php elseif ($todayStart <= $date && $todayEnd >= $date): ?>
<div class="col-md-4">
<div class="panel panel-primary">
<div class="panel-heading"><h3 class="panel-title"><?php echo
datumVrijemeSQLuHR($row['datum_raz']); ?></h3></div>
<div class="panel-body">
<div class="col-md-9">
<h5><a href="editRazgovori.php?id=<?php echo $row['id']; ?>"><?php echo
$row['rime'].' '.$row['rprezime']; ?></a></h5>
<?php echo $row['kontakt_br']; ?>
</div>
<div class="col-md-3">
<span class="label label-default pull-right"></h5><?php echo
$row['ime'].' '.$row['prezime']; ?></span>
</div>
</div>
</div>
</div>
</tr>
<tr>
<!--Panel warning if Job interview is tomorrow-->
<?php elseif ($tomorrowStart <= $date && $twoDaysAheadEnd >= $date): ?>
<div class="col-md-4 pull-right">
<div class="panel panel-warning">
<div class="panel-heading"><h3 class="panel-title"><?php echo
datumVrijemeSQLuHR($row['datum_raz']); ?></h3></div>
<div class="panel-body">
<div class="col-md-9">
<h5><a href="editRazgovori.php?id=<?php echo $row['id']; ?>"><?php
echo $row['rime'].' '.$row['rprezime']; ?></a></h5>
<?php echo $row['kontakt_br']; ?>
</div>
<div class="col-md-3">
<span class="label label-default pull-right"></h5><?php echo
$row['ime'].' '.$row['prezime']; ?></span>
</div>
</div>
</div>
</div>
<?php endif; ?>
<?php endwhile; ?>
</div><!--/row-->
</div><!--/container-->
I want to have sorted like this : 유래 빨간색 메시지가 지속적으로 자세한 내용은 나 한테 물어 enter image description here
때문에, 난 내 모든 PHP 코드를 넣을 수 없습니다
주문을 변경하려 했습니까? –
Hi Vedran, ive 님이 답변을 추가했습니다. 이것이 도움이 되었다면 알려주십시오. –