/** * Returns HTML containing all video details. * @param integer $cid Content ID of the video. * @return string JSON String */ function getVideoHtml($cid) { $v=new video($cid); $tagarray=$v->getTags(); $c=count($tagarray); $tags=""; for($i=0;$i<$c;$i++) $tags.="<li><a href='search.php?tag=".$tagarray[$i]."'>".$tagarray[$i]."</a></li>"; $video= "<span class='videoTitle'>".$v->getTitle()."</span> <!-- Begin VideoJS --> <div class='video-js-box'> <video cid='".$v->getContentId()."' poster='".$v->getPoster()."' class='video-js' controls preload height=325 width=550> <source src='".$v->getCompletePath()."' type='video/ogg; codecs=\"theora, vorbis\"' /> </video> </div> <!-- End VideoJS --> <!-- video bar --> <div class='videoBar'> <img src='pics/vidbar/watch.png' class='VideoBarButton' /><span class='videoBarElement' id='playCount'>Views:".$v->getViewCount()."</span> <span id='likes' defStatus='1' ></span> <img src='pics/vidbar/download.png' title='Download' class='VideoBarButton' style='float:right;' id='downloadButton' /> </div> <!-- /video bar --> <img src='pics/vidbar/tag.png' title='tags' style='margin-left:6px;'/> <ul class='tags'>".$tags."</ul> <div class='VideoDesc'>".$v->getDesc()."</div>"; $v->addViewCount(); return $video; }
/** * Returns JSON string containing all video details. * @param integer $cid Content ID of the video. * @param integer $uid User ID of the user who requests the video. * @return string JSON String */ function getVideoJson($cid, $uid) { $v = new video($cid); $v->fetchSeries(); $json = array("cid" => $v->getContentId(), "title" => $v->getTitle(), "desc" => $v->getDesc(), "tags" => $v->getTags(), "timestamp" => $v->getTimestamp(), "viewcount" => $v->getViewCount(), "status" => $v->getStatus(), "path" => $v->getCompletePath(), "poster" => $v->getPoster(), "likestatus" => user::checkLike($uid, $cid), "sid" => $v->getSeriesId(), "sname" => $v->getSeriesName(), "order" => $v->getOrder(), "uid" => $v->getUserId(), "uname" => user::getFullNameS($v->getUserId())); $v->addViewCount(); return json_encode($json); }
?> "); $('input[name="titol"]').val("<?php echo htmlspecialchars(utf8_encode($v->getTitol())); ?> "); $('textarea#descripcio').html("<?php echo htmlspecialchars(utf8_encode($v->getDescripcio())); ?> "); $('input[name="data"]').val("<?php echo utf8_encode($v->getData()); ?> "); $('input[name="tags"]').val("<?php echo utf8_encode($v->getTags()); ?> "); $('input[name="autor"]').val("<?php echo utf8_encode($v->getAutor()); ?> "); $('input[name="autorvideo"]').val("<?php echo utf8_encode($v->getAutorVideo()); ?> "); $('select[name="ref1"]').val("<?php echo utf8_encode($v->referit1()); ?> "); $('input[name="lat"]').val("<?php
" data-lang="<?php echo $_COOKIE['idioma']; ?> ">Twittear </a> <script> twttr.widgets.load(); </script> </div> <script type="text/javascript">window.___gcfg = {lang: '<?php echo $_COOKIE['idioma']; ?> '};(function() {var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;po.src = 'https://apis.google.com/js/platform.js';var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);})();</script> <h5><small>Tags</small> <?php $tags = explode(',', $v->getTags()); for ($i = 0; $i < count($tags); $i++) { ?> <a href="#" class="tag"><span class="label label-default"><?php echo utf8_encode($tags[$i]); ?> </span></a> <?php } ?> </h5> </div> <div class="col-sm-6"> <div id="mapa" class="col-sm-12"></div> <div class="row"> <div class="col-sm-12">