当前位置: 首页>>代码示例>>PHP>>正文


PHP Batch::get_all_by_schoolid方法代码示例

本文整理汇总了PHP中Batch::get_all_by_schoolid方法的典型用法代码示例。如果您正苦于以下问题:PHP Batch::get_all_by_schoolid方法的具体用法?PHP Batch::get_all_by_schoolid怎么用?PHP Batch::get_all_by_schoolid使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Batch的用法示例。


在下文中一共展示了Batch::get_all_by_schoolid方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: foreach

echo $school->history;
?>
              </div>
              <div class="tab-pane" id="visionmission">
                <?php 
echo $school->visionmission;
?>
              </div>
              <div class="tab-pane" id="corevalues">
                <?php 
echo $school->corevalues;
?>
              </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">';
开发者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="batchs.php?schoolid=<?php 
echo CSNTRID;
?>
">Batchs</a>
                      <ul class="dropdown-menu">
                        <?php 
$objects = Batch::get_all_by_schoolid(CSNTRID);
if (count($objects) > 0) {
    foreach ($objects as $theobject) {
        echo '
                             <li class="dropdown-submenu">
                              <a tabindex="-1" href="batch.php?id=' . $theobject->id . '">' . $theobject->get_batchyear() . '</a>
                              <ul class="dropdown-menu">
                            ';
        echo '<li><a href="batch.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->id) || $user->is_super_admin()) {
                echo '<li><a href="updatebatch.php?id=' . $theobject->id . '"><i class="icon-large icon-pencil"></i> Edit</a></li>';
            }
        }
        echo '
                              </ul>
开发者ID:NemOry,项目名称:Skoolyf,代码行数:31,代码来源:header.php


注:本文中的Batch::get_all_by_schoolid方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。