コード例 #1
0
ファイル: worship.php プロジェクト: xiayuz/XiaoLongBao
 private function generate_verses($ranges)
 {
     $xml = Bible::getVerses($ranges);
     $quoted_verses = '';
     foreach ($xml->range as $range) {
         // get range title
         $title = $range->result;
         $title = Bible::convertEngRangesToCh($title);
         $quoted_verses .= " <br><b>" . $title . "</b><br><br>";
         // get verses in this range
         foreach ($range->item as $item) {
             $verses = " <b>" . $item->verse . "</b> " . $item->text;
             $quoted_verses .= " <p>" . $verses . "</p> ";
         }
     }
     return $quoted_verses;
 }
コード例 #2
0
ファイル: video.php プロジェクト: xiayuz/XiaoLongBao
<div class="container">
  <div class="well well-half">
    <div class="row">
      <div class="col-lg-4">
        <h3>經文 <?php 
echo Bible::convertEngRangesToCh($video['scripture'], false);
?>
</h3>
      </div>
      <div class="col-lg-8">
        <h3><?php 
echo $video['title'];
?>
</h3>
      </div>
    </div>
    <div class="row">
      <div class="col-lg-4">
        <div id="scroll_panel">
          <?php 
echo $verses;
?>
        </div>
      </div>
      <div class="col-lg-8">
        <a href="<?php 
echo base_url();
?>
/videos/<?php 
echo $video['file_name'];
?>
コード例 #3
0
ファイル: worship.php プロジェクト: xiayuz/XiaoLongBao
?>
			</h2>
		</div>

		<table class="table table-striped table-hover">
			<thead><th>時間</th><th>信息</th><th>經文</th><th>講員</th><th>下載</th><th>收聽</th><th>錄像</th></thead>
			<tbody>
			<?php 
foreach ($videos as $key => $video) {
    $video_url = site_url() . '/worship/video/' . $video['id'];
    $audio_url = site_url() . '/worship/audio/' . $video['id'];
    $download_url = site_url() . '/worship/direct_download/' . $video['audio_name'];
    printf("<tr id='sundaymessage-%s'>", $video['id']);
    printf("<td>%s</td>", $video['date']);
    printf("<td>%s</td>", $video['title']);
    printf("<td>%s</td>", Bible::convertEngRangesToCh($video['scripture']));
    printf("<td>%s</td>", $video['speaker']);
    printf("<td><a href=\"%s\">", $download_url);
    printf("&nbsp;&nbsp;<span class=\"glyphicon glyphicon-volume-up\"></span></a></td>");
    printf("<td><a href=\"%s\">", $audio_url);
    printf("&nbsp;&nbsp;<span class=\"glyphicon glyphicon-headphones\"></span></a></td>");
    printf("<td><a href=\"%s\">", $video_url);
    printf("&nbsp;&nbsp;<span class=\"glyphicon glyphicon-facetime-video\"></span></a></td>");
    // update/delete buttons
    if (Access::hasPrivilege(Access::PRI_UPDATE_WORSHIP)) {
        $url = site_url() . '/worship/updateSundayMessage/' . $video['id'];
        printf('<td><span class="pull-right"><a href="%s" class="btn btn-info btn-xs" role="button">更改</a>', $url);
        $delete_url = site_url() . '/worship/deleteSundayMessage/' . $video['id'];
        # Delete button
        printf('&nbsp;&nbsp;<button class="btn btn-danger btn-xs" data-toggle="modal" data-target="#%s" data-id="%s">刪除</button></span></td>', $video['id'], $video['id']);
        # Delete modal