本文整理汇总了PHP中Club::get_all_by_schoolid方法的典型用法代码示例。如果您正苦于以下问题:PHP Club::get_all_by_schoolid方法的具体用法?PHP Club::get_all_by_schoolid怎么用?PHP Club::get_all_by_schoolid使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Club
的用法示例。
在下文中一共展示了Club::get_all_by_schoolid方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: foreach
</div>
<div class="tab-pane" id="sections">
<?php
$sections = Section::get_all_by_schoolid($school->id);
if (count($sections) > 0) {
foreach ($sections as $section) {
echo '<ul">';
echo ' <li><a href="section.php?id=' . $section->id . '">' . $section->name . '</a></li>';
echo '</ul>';
}
}
?>
</div>
<div class="tab-pane" id="clubs">
<?php
$clubs = Club::get_all_by_schoolid($school->id);
if (count($clubs) > 0) {
foreach ($clubs as $club) {
echo '<ul">';
echo ' <li><a href="club.php?id=' . $club->id . '">' . $club->name . '</a></li>';
echo '</ul>';
}
}
?>
</div>
<div class="tab-pane" id="groups">
<?php
$groups = Group::get_all_by_schoolid($school->id);
if (count($groups) > 0) {
foreach ($groups as $group) {
echo '<ul">';
示例2: foreach
</li>';
}
} else {
echo '<li class="disabled"><a href="#">no sections yet</a></li>';
}
?>
</ul>
</li>
<li class="dropdown-submenu">
<a tabindex="-1" href="clubs.php?schoolid=<?php
echo CSNTRID;
?>
">Clubs</a>
<ul class="dropdown-menu">
<?php
$objects = Club::get_all_by_schoolid(CSNTRID);
if (count($objects) > 0) {
foreach ($objects as $theobject) {
echo '
<li class="dropdown-submenu">
<a tabindex="-1" href="club.php?id=' . $theobject->id . '">' . $theobject->name . '</a>
<ul class="dropdown-menu">
';
echo '<li><a href="club.php?id=' . $theobject->id . '"><i class="icon-large icon-play"></i> View</a></li>';
if ($session->is_logged_in()) {
if (SchoolUser::amIAdmin($session->user_id, $theobject->schoolid) || ClubUser::amIAdmin($session->user_id, $theobject->id) || $user->is_super_admin()) {
echo '<li><a href="updateclub.php?id=' . $theobject->id . '"><i class="icon-large icon-pencil"></i> Edit</a></li>';
}
}
echo '
</ul>