當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Section::get_all_by_schoolid方法代碼示例

本文整理匯總了PHP中Section::get_all_by_schoolid方法的典型用法代碼示例。如果您正苦於以下問題:PHP Section::get_all_by_schoolid方法的具體用法?PHP Section::get_all_by_schoolid怎麽用?PHP Section::get_all_by_schoolid使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Section的用法示例。


在下文中一共展示了Section::get_all_by_schoolid方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: foreach

              </div>
              <div class="tab-pane" id="batches" class="row-fixed">
                <?php 
$batches = Batch::get_all_by_schoolid($school->id);
if (count($batches) > 0) {
    foreach ($batches as $batch) {
        echo '<ul">';
        echo '  <li><a href="batch.php?id=' . $batch->id . '">' . $batch->get_batchyear() . '</a></li>';
        echo '</ul>';
    }
}
?>
              </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">';
開發者ID:NemOry,項目名稱:Skoolyf,代碼行數:31,代碼來源:school.php

示例2: foreach

                            </li>';
    }
} else {
    echo '<li class="disabled"><a href="#">no batches yet</a></li>';
}
?>
                      </ul>
                    </li>
                    <li class="dropdown-submenu">
                      <a tabindex="-1" href="sections.php?schoolid=<?php 
echo CSNTRID;
?>
">Sections</a>
                      <ul class="dropdown-menu">
                        <?php 
$objects = Section::get_all_by_schoolid(CSNTRID);
if (count($objects) > 0) {
    foreach ($objects as $theobject) {
        echo '
                             <li class="dropdown-submenu">
                              <a tabindex="-1" href="section.php?id=' . $theobject->id . '">' . $theobject->name . '</a>
                              <ul class="dropdown-menu">
                            ';
        echo '<li><a href="section.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) || BatchUser::amIAdmin($session->user_id, $theobject->batchid) || SectionUser::amIAdmin($session->user_id, $theobject->id) || $user->is_super_admin()) {
                echo '<li><a href="updatesection.php?id=' . $theobject->id . '"><i class="icon-large icon-pencil"></i> Edit</a></li>';
            }
        }
        echo '
                              </ul>
開發者ID:NemOry,項目名稱:Skoolyf,代碼行數:31,代碼來源:header.php


注:本文中的Section::get_all_by_schoolid方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。