コード例 #1
0
ファイル: videos.php プロジェクト: JamesWuChina/hhvip-ci
 public function play($username = NULL, $title = NULL)
 {
     //video player page
     if (!$this->ion_auth->username_check($username) || !$this->uri->segment('3')) {
         redirect('videos', 'refresh');
     }
     $user = $this->User_model->get_user_info($username);
     $existsWhere = array('video_url' => $this->uri->segment('3'), 'user_id' => $user->id);
     $videoExists = $this->Video_model->get_videos($existsWhere);
     if (!empty($videoExists)) {
         $video = $videoExists[0];
         $this->data['video'] = $video;
     } else {
         $this->session->set_flashdata('videoError', '<div class="alert alert=error" style="color:red;font-weight:bold;text-align:center">The video you were looking for does not exist. Try one of the videos below.</div>');
         redirect('videos', 'refresh');
     }
     $creator = !empty($user->twitter_handle) ? '@' . $user->twitter_handle : '@hiphopvip1';
     $this->data['meta_name'] = array('description' => htmlspecialchars('Watch ' . $video->video_title, ENT_QUOTES), 'twitter:card' => 'summary_large_image', 'twitter:domain' => base_url(), 'twitter:site' => '@hiphopvip1', 'twitter:title' => htmlspecialchars($video->video_title, ENT_QUOTES), 'twitter:description' => htmlspecialchars($video->video_description, ENT_QUOTES), 'twitter:image:src' => video_img($video->username, $video->video_img), 'twitter:creator' => $creator);
     $this->data['meta_prop'] = array('og:title' => htmlspecialchars('Watch ' . $video->video_title, ENT_QUOTES), 'og:url' => base_url('videos/' . $user->username . '/' . $video->video_url), 'og:image' => video_img($video->username, $video->video_img), 'og:site_name' => 'hiphopVIP', 'og:description' => htmlspecialchars($video->video_description, ENT_QUOTES));
     $this->_render('videos/play', $this->data);
 }
コード例 #2
0
ファイル: play.php プロジェクト: JamesWuChina/hhvip-ci
                    <?php 
if ($this->ion_auth->is_admin()) {
    ?>
                    <span class="pull-right"><a href="<?php 
    echo base_url('videos/edit/' . $video->id);
    ?>
" class="btn btn-warning">Edit</a> <a href="<?php 
    echo base_url('videos/delete/' . $video->id);
    ?>
" class="btn btn-danger">Delete</a></span>
                        
                    <?php 
}
?>
                    <div class="pull-left" style="padding:8px;"><img src="<?php 
echo video_img($video->username, $video->video_img, 150);
?>
" width="64px" height="64px"></div>
                        <h1 class="page-song-title bebas" style="padding-top:5px"><?php 
echo htmlspecialchars($video->video_title, ENT_QUOTES);
?>
</h1>
                    </header>
					<article class="entry style-single type-post">
						<div class="entry-content">

<?php 
if ($video->status !== 'published') {
    ?>
<h1 class="page-song-title" style="text-align:center">Video Pending Approval. Currently Being Reviewed.</h1>
<?php 
コード例 #3
0
ファイル: pop.php プロジェクト: philum/cms
function popvideo($d)
{
    list($d, $t) = explode('§', $d);
    $p = video_providers($d);
    list($w, $h) = explode('/', $t);
    if (is_numeric($w)) {
        return video_players($d, $p, $w, $h, '');
    }
    $j = 'pagup_video___' . ajx($d) . '___autosize';
    $url = video_url($d, $p, $t) . ' ';
    $im = video_img($d, $p);
    if ($im && !$t) {
        $bt = lj('', $j, image($im, '120', '90', ''));
    }
    $open = lj('', $j, pictxt('play', '')) . ' ';
    if ($bt) {
        return divc('', $bt . ' ' . btn('small', $url));
    } else {
        return btn('popbt', $open . $url);
    }
}
コード例 #4
0
ファイル: index.php プロジェクト: JamesWuChina/hhvip-ci
					<article class="entry style-single type-post">
						<div class="entry-content">
						<div class="row">

						<?php $counter = 0; ?>
						<?php foreach ($videos as $key => $video): ?>
							<?php 
							$link = base_url('videos/'.$video->username.'/'.$video->video_url);							$title = htmlspecialchars($video->video_title, ENT_QUOTES);
							$description = htmlspecialchars($video->video_description, ENT_QUOTES);
							 ?>

		<div class="col-sm-6">
           	<a href="<?php echo $link; ?>" class="videoBig" title="<?php echo $title; ?>">
		          <div class="play-button"></div>
		          <div class="caption"><h1><?php echo $title; ?></h1></div>
                <img src="<?php echo video_img($video->username, $video->video_img, 300); ?>" alt="<?php echo $title; ?>">
            <div style="margin-top:-20px;margin-bottom:15px"><?php echo $title; ?></div>
                
            </a>
        </div>
        <?php if(++$counter % 2 === 0) {
                  echo "</div><div class='row'>";
             } 

             ?>
						<?php endforeach ?>

							</div>
						</div>
        <div id="pagination" class="row container" style="text-align:center">
            <?php echo $pagination; ?>