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


PHP Assets::media方法代碼示例

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


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

示例1: date

    ?>
</td>
									<td class="center"><?php 
    echo $item->media_title;
    ?>
</td>
									<td class="center"><?php 
    echo $item->media_description;
    ?>
</td>
									<td class="center">
									<?php 
    if ($item->category_title == 'image') {
        echo Assets::image($item->media_file, '', 'width: 200px');
    } else {
        if (Assets::media($item->media_file) == true) {
            echo "<a href='" . ROOT_DIR . $item->media_file . "' target='_blank'>View in Browser</a>";
        } else {
            echo 'File does not exist';
        }
    }
    ?>
									</td>
									<td class="center"><?php 
    echo date("d/m/Y", $item->media_created);
    ?>
</td>
									<td class="center">

										<span class="label 
										<?php 
開發者ID:Oluwafemikorede,項目名稱:gbedu,代碼行數:31,代碼來源:album.add_item.php

示例2: date

</td>
									<td class="center"><?php 
    echo $item->song_title;
    ?>
</td>
									<td class="center"><?php 
    echo $item->song_description;
    ?>
</td>
									<td class="center"><?php 
    echo Assets::image($item->song_image, '', 'width: 100px');
    ?>
</td>
									<td class="center">
									<?php 
    if (Assets::media($item->song_file) == true) {
        echo "<a href='" . ROOT_DIR . $item->song_file . "' target='_blank'>View in Browser</a>";
    } else {
        echo 'File does not exist';
    }
    ?>
									</td>
									<td class="center"><?php 
    echo $item->song_duration;
    ?>
</td>
									<td class="center"><?php 
    echo date("d/m/Y", $item->song_created);
    ?>
</td>
									<td class="center">
開發者ID:Oluwafemikorede,項目名稱:gbedu,代碼行數:31,代碼來源:song.allitems.php

示例3:

							<div class="control-group">
							  <label class="control-label" for="date01">Title</label>
							  <div class="controls">
								<input type="text" name="title" class="input-xlarge" id="date01" value="<?php 
echo $song->song_title;
?>
" placeholder="Add Song Title">
							  </div>
							</div>

							<div class="control-group">
								<label class="control-label">Upload Mp3</label>
								<div class="controls">
								  <input type="file" name="mp3">
								  <?php 
if (Assets::media($song->song_file) == true) {
    echo "<a href='" . ROOT_DIR . $song->song_file . "' target='_blank'>View in Browser</a>";
} else {
    echo 'File does not exist';
}
?>
								</div>
							  </div>


							  <div class="control-group">
								<label class="control-label">Song Cover</label>
								<div class="controls">
								  <input type="file" name="image">
								  <?php 
echo Assets::image($song->song_image, '', 'width: 100px');
開發者ID:Oluwafemikorede,項目名稱:gbedu,代碼行數:31,代碼來源:song.edit.php

示例4:

							  </div>
							</div>



							<div class="control-group">
								<label class="control-label">File Upload</label>
								<div class="controls">
								  <input type="file" name="image">
								</div>
								<div class="controls">
									<?php 
if ($media->category_title == 'image') {
    echo Assets::image($media->media_file, '', 'width: 200px');
} else {
    if (Assets::media($media->media_file) == true) {
        echo "<a href='" . ROOT_DIR . $media->media_file . "' target='_blank'>View in Browser</a>";
    } else {
        echo 'File does not exist';
    }
}
?>
								</div>
							  </div>

							   
							<div class="control-group hidden-phone">
							  <label class="control-label" for="textarea2">Description</label>
							  <div class="controls">
								<textarea class="cleditor" name="description" id="textarea2" rows="3"><?php 
echo $media->media_description;
開發者ID:Oluwafemikorede,項目名稱:gbedu,代碼行數:31,代碼來源:album.edit_item.php


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