本文整理汇总了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 {
示例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>';
示例3:
<?php
include 'resource.php';
include 'deliverable.php';
echo Resource::get_link(1);
echo Deliverable::get_type(1);