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


PHP Resource::get_link方法代码示例

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


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

示例1: foreach




  <!--- Resourses viewing -->
 <div role="tabpanel" class="tab-pane active" id="Resources">
<br>
<?php 
$course_code = $_GET['course'];
$course_id = Course::get_id($course_code);
$resources_ids = Stuff::get_Resources_Ids($course_id);
if (!is_null($resources_ids)) {
    $i = 0;
    foreach ($resources_ids as $resources_id) {
        if (Resource::get_type($resources_id) == "slides" || Resource::get_type($resources_id) == "book" || Resource::get_type($resources_id) == "sheet") {
            $i++;
            $filePDF = Resource::get_link($resources_id);
            $fileName = Resource::get_name($resources_id);
            $fileDisc = Resource::get_description($resources_id);
            echo '<div class="col-md-4">';
            echo '<div class="responsive-video">';
            echo '<iframe src = "../assets/js/ViewerJS/#' . $filePDF . '" width=\'400\' height=\'300\' allowfullscreen webkitallowfullscreen></iframe>';
            echo '</div>';
            echo '<h3>' . $fileName . '</h3>';
            echo '<p>' . $fileDisc . '</p>';
            echo '</div>';
        }
    }
    if ($i == 0) {
        echo '<div class="alert alert-info" role="alert">Sorry No Resources Yet</div>';
    }
} else {
开发者ID:SarcasticGeek,项目名称:College_Portal,代码行数:28,代码来源:resources.php

示例2: foreach

    </div>
  </div>

  <!--- Resourses viewing -->
  <div role="tabpanel" class="tab-pane" id="tuts">
<br>
<?php 
$course_code = $_GET['course'];
$course_id = Course::get_id($course_code);
$resources_ids = Stuff::get_Resources_Ids($course_id);
if (!is_null($resources_ids)) {
    $i = 0;
    foreach ($resources_ids as $resources_id) {
        if (Resource::get_type($resources_id) == "video") {
            $i++;
            $youtubeID = Resource::get_link($resources_id);
            $fileName = Resource::get_name($resources_id);
            $fileDisc = Resource::get_description($resources_id);
            echo '<div class="col-md-4">';
            echo '<div class="responsive-video">';
            echo '<iframe width="420" height="315"
           src="http://www.youtube.com/embed/' . $youtubeID . '">
           </iframe>';
            echo '</div>';
            echo '<h3>' . $fileName . '</h3>';
            echo '<p>' . $fileDisc . '</p>';
            echo '</div>';
        }
    }
    if ($i == 0) {
        echo '<div class="alert alert-info" role="alert">Sorry No Tutorials Yet</div>';
开发者ID:SarcasticGeek,项目名称:College_Portal,代码行数:31,代码来源:tutorials.php

示例3:

<?php

include 'resource.php';
include 'deliverable.php';
echo Resource::get_link(1);
echo Deliverable::get_type(1);
开发者ID:SarcasticGeek,项目名称:College_Portal,代码行数:6,代码来源:resourceController.php


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