本文整理汇总了PHP中Schedule::getAllSchedules方法的典型用法代码示例。如果您正苦于以下问题:PHP Schedule::getAllSchedules方法的具体用法?PHP Schedule::getAllSchedules怎么用?PHP Schedule::getAllSchedules使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Schedule
的用法示例。
在下文中一共展示了Schedule::getAllSchedules方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: foreach
</div>
<div style="text-align:right;width:28%;display:inline-block;vertical-align:top;">
<button style="width:15em;background:#43D14C;" onclick="$('#hl').get(0).click();"> <div><img src="img/icons/glyphicons_free/glyphicons/png/glyphicons-191-circle-plus.png" width="13" height="13" /><font face="Calibri" color="black" size="4"> Create new schedule </font></div></button>
</div>
<div class="datagrid">
<table>
<thead>
<tr><th>Academic Year</th><th>Semester Start Date</th><th>Semester End Date</th><th><center>Actions</center></th></tr>
</thead>
<tbody>
<?php
$schedule = Schedule::getAllSchedules();
if (count($schedule) > 0) {
foreach ($schedule as $key => $value) {
$sid = $value->getScheduleId();
echo "<tr>";
echo "<td><a href='schedule_manager2.php?sid={$sid}' >" . $value->getAcademicYear() . " ---- Semester " . $value->getSemesterNo() . "</a></td>";
echo "<td>" . $value->getScheduleStartDate() . "</td>";
echo "<td>" . $value->getScheduleEndDate() . "</td>";
echo "<td><div style='text-align:center;'><button style='width:10em;''> <div><img src='img/icons/glyphicons_free/glyphicons/png/glyphicons-151-edit.png' width='13' height='13' /><font face='Calibri' color='black' size='4'> Edit </font></div></button> <button id='{$sid}' onclick='deleteSchedule(this.id)' style='width:10em;'> <div><img src='img/icons/glyphicons_free/glyphicons/png/glyphicons-17-bin.png' width='13' height='15' /><font face='Calibri' color='black' size='4'> Delete </font></div></button><div></td>";
echo "</tr>";
}
}
?>
</tbody>
示例2: viewSchedules
public function viewSchedules()
{
$schedules = Schedule::getAllSchedules();
require_once 'views/schedule_view.php';
}