2 if (!isset($jPlayerVideo) || (empty($jPlayerVideo)))
4 require_once (
"system/widgets/jplayer_video/classes/jplayer_video.class.php");
6 $jPlayerVideo = new \YAWK\WIDGETS\JPLAYER\VIDEO\jPlayerVideo();
24 if (isset(
$_GET[
'widgetID']))
27 $widgetID =
$_GET[
'widgetID'];
33 $res =
$db->query(
"SELECT * FROM {widget_settings}
34 WHERE widgetID = '".$widgetID.
"'
35 AND activated = '1'");
36 while($row = mysqli_fetch_assoc(
$res))
38 $w_property = $row[
'property'];
39 $w_value = $row[
'value'];
40 $w_widgetType = $row[
'widgetType'];
41 $w_activated = $row[
'activated'];
45 if (isset($w_property)){
49 case 'jPlayerVideoUserMediaFolder';
54 case 'jPlayerVideoWidth';
59 case 'jPlayerVideoSkin';
65 case 'jPlayerVideoHeading';
70 case 'jPlayerVideoSubtext';
75 case 'jPlayerVideoDefaultVolume';
80 case 'jPlayerVideoInitialMute';
85 case 'jPlayerVideoPoster';
90 case 'jPlayerVideoDownload';
107 $subtext =
"<small>$subtext</small>";
108 $headline =
"<h1>$heading ".
"$subtext</h1>";
112 $headline =
"<h1>$heading</h1>";
122 <link
type=
"text/css" href=
"system/widgets/jplayer/skins/<?php echo $jPlayerSkin; ?>/jplayer.<?php echo $jPlayerSkin; ?>.css" rel=
"stylesheet">
123 <script
type=
"text/javascript" src=
"system/widgets/jplayer/js/jquery.jplayer.min.js"></script>
124 <script
type=
"text/javascript" src=
"system/widgets/jplayer/js/jplayer.playlist.min.js"></script>
125 <script
type=
"text/javascript" src=
"system/widgets/jplayer/js/browser.js"></script>
126 <script
type=
"text/javascript">
128 $(document).
ready(
function(){
130 var Playlist =
function(instance, playlist, options) {
133 this.instance = instance;
134 this.playlist = playlist;
135 this.options = options;
141 interface:
"jp_interface_",
142 playlist:
"jp_playlist_"
144 this.cssSelector = {};
146 $.each(this.cssId,
function(entity,
id) {
147 self.cssSelector[entity] =
"#" +
id +
self.instance;
150 if(!this.options.cssSelectorAncestor) {
151 this.options.cssSelectorAncestor = this.cssSelector.interface;
154 $(this.cssSelector.jPlayer).
jPlayer(this.options);
156 $(this.cssSelector.interface +
" .jp-previous").click(
function() {
162 $(this.cssSelector.interface +
" .jp-next").click(
function() {
169 Playlist.prototype = {
170 displayPlaylist:
function() {
172 $(this.cssSelector.playlist +
" ul").empty();
173 for (
i=0;
i < this.playlist.length;
i++) {
174 var listItem = (
i === this.playlist.length-1) ?
"<li class='jp-playlist-last'>" :
"<li>";
175 listItem +=
"<a href='#' id='" + this.cssId.playlist + this.instance +
"_item_" +
i +
"' tabindex='1'>"+ this.playlist[
i].name +
"</a>";
178 if(this.playlist[
i].free) {
180 listItem +=
"<div class='jp-free-media'>(";
181 $.each(this.playlist[
i],
function(property,value) {
182 if($.
jPlayer.prototype.format[property]) {
188 listItem +=
"<a id='" +
self.cssId.playlist +
self.instance +
"_item_" +
i +
"_" +
property +
"' href='" + value +
"' tabindex='1'>" +
property +
"</a>";
191 listItem +=
")</span>";
197 $(this.cssSelector.playlist +
" ul").append(listItem);
198 $(this.cssSelector.playlist +
"_item_" +
i).data(
"index",
i).click(
function() {
199 var index = $(
this).data(
"index");
200 if(
self.current !== index) {
201 self.playlistChange(index);
203 $(
self.cssSelector.jPlayer).
jPlayer(
"play");
210 if(this.playlist[
i].free) {
211 $.each(this.playlist[
i],
function(property,value) {
212 if($.
jPlayer.prototype.format[property]) {
213 $(
self.cssSelector.playlist +
"_item_" +
i +
"_" + property).data(
"index",
i).click(
function() {
214 var index = $(
this).data(
"index");
215 $(
self.cssSelector.playlist +
"_item_" + index).click();
224 playlistInit:
function(autoplay) {
226 this.playlistChange(this.current);
228 this.playlistConfig(this.current);
231 playlistConfig:
function(index) {
232 $(this.cssSelector.playlist +
"_item_" + this.current).removeClass(
"jp-playlist-current").parent().removeClass(
"jp-playlist-current");
233 $(this.cssSelector.playlist +
"_item_" + index).addClass(
"jp-playlist-current").parent().addClass(
"jp-playlist-current");
234 this.current = index;
235 $(this.cssSelector.jPlayer).
jPlayer(
"setMedia", this.playlist[this.current]);
237 playlistChange:
function(index) {
238 this.playlistConfig(index);
239 $(this.cssSelector.jPlayer).
jPlayer(
"play");
241 playlistNext:
function() {
242 var index = (this.current + 1 < this.playlist.length) ? this.current + 1 : 0;
243 this.playlistChange(index);
245 playlistPrev:
function() {
246 var index = (this.current - 1 >= 0) ? this.current - 1 : this.playlist.length - 1;
247 this.playlistChange(index);
252 var videoPlaylist =
new Playlist(
"<?php echo $jPlayerInstance; ?>",
257 videoPlaylist.displayPlaylist();
258 videoPlaylist.playlistInit(false);
261 videoPlaylist.playlistNext();
264 $(this).jPlayer(
"pauseOthers");
267 supplied:
"ogv, m4v, mp4, mpg, flv",
268 volume:
"<?php echo $jPlayerDefaultVolume; ?>",
275 <div
class=
"jp-video jp-video-270p">
276 <div
class=
"jp-type-playlist">
277 <div
id=
"jquery_jplayer_<?php echo $jPlayerInstance; ?>" class=
"jp-jplayer"></div>
278 <div
id=
"jp_interface_<?php echo $jPlayerInstance; ?>" class=
"jp-interface">
279 <div
class=
"jp-video-play"></div>
280 <ul
class=
"jp-controls">
281 <li><
a href=
"#" class=
"jp-play" tabindex=
"1">play</
a></li>
282 <li><
a href=
"#" class=
"jp-pause" tabindex=
"1">
pause</
a></li>
283 <li><
a href=
"#" class=
"jp-stop" tabindex=
"1">stop</
a></li>
284 <li><
a href=
"#" class=
"jp-mute" tabindex=
"1">mute</
a></li>
285 <li><
a href=
"#" class=
"jp-unmute" tabindex=
"1">unmute</
a></li>
286 <li><
a href=
"#" class=
"jp-previous" tabindex=
"1">previous</
a></li>
287 <li><
a href=
"#" class=
"jp-next" tabindex=
"1">next</
a></li>
289 <div
class=
"jp-progress">
290 <div
class=
"jp-seek-bar">
291 <div
class=
"jp-play-bar"></div>
294 <div
class=
"jp-volume-bar">
295 <div
class=
"jp-volume-bar-value"></div>
297 <div
class=
"jp-current-time"></div>
298 <div
class=
"jp-duration"></div>
300 <div
id=
"jp_playlist_<?php echo $jPlayerInstance; ?>" class=
"jp-playlist">
302 <!-- The method Playlist.displayPlaylist() uses
this unordered list -->
if(!isset($jPlayerVideo)||(empty($jPlayerVideo))) $jPlayerRootMediaFolder
document ready(function() { $('a[data-confirm]').click(function(ev) { modal='#dataConfirmModal';var href=$(this).attr('href');var title=$(this).attr('title');var icon=$(this).attr('data-icon');if(!icon) { icon='fa fa-trash-o';} if(!$(modal).length) { $('body').append('< div id="dataConfirmModal" class="modal fade" role="dialog" aria-labelledby="dataConfirmLabel" aria-hidden="true">< div class="modal-dialog">< div class="modal-content">< div class="modal-header">< button type="button" class="close" data-dismiss="modal" aria-hidden="true">< i class="fa fa-times"></i ></button >< br >< div class="col-md-1">< h3 class="modal-title">< i class="'+icon+'"></i ></h3 ></div >< div class="col-md-11">< h3 class="modal-title" id="dataConfirmLabel">'+title+'</h3 ></div ></h3 ></div >< div class="modal-body"></div >< div class="modal-footer">< button type="button" class="btn btn-default" data-dismiss="modal" aria-hidden="true">Abbrechen</button >< a type="button" class="btn btn-danger" id="dataConfirmOK">< i class="'+icon+'"></i > L öschen</a ></div ></div ></div ></div >');} $(modal).find('.modal-body').text($(this).attr('data-confirm'));$('#dataConfirmOK').attr('href', href);$(modal).modal({show:true});return false;});$('#terminateUser').click(function() { var terminate=window.confirm("ACHTUNG!\nDas wird Deinen Account permanent deaktivieren.\n"+"Bist Du Dir sicher, dass Du das tun willst?");if(terminate===true) { var terminateUser=window.confirm("Bist Du Dir wirklich ganz sicher?\n"+"Diese Aktion kann nicht rueckgaengig gemacht werden.");if(terminateUser===true) { $.get('system/templates/YaWK-bootstrap3/js/terminate-user.php', function(data) { if(data==="true") { setTimeout("window.location='logout.html'", 0);} else { alert("Fehler: "+data);} });} } });function dismissNotifications() { $.ajax({ url:'js/dismiss-notifications.php', type:'POST', success:function(data) { if(!data) { alert('Something went wrong!');return false;} } });$("#bell-label").fadeOut();$('#notification-header').html('You have 0 notifications');$('#notification-menu').fadeOut();} $("#dismiss").click(function() { dismissNotifications();});function disableButtons(delay) { $('#loginButton').removeClass().addClass('btn btn-success disabled').attr('id', 'LOGIN_FORBIDDEN');$('#resetPasswordButton').removeClass().addClass('btn btn-danger disabled');setTimeout(function() { $('#LOGIN_FORBIDDEN').attr('id', 'loginButton').removeClass().addClass('btn btn-success');$('#resetPasswordButton').removeClass().addClass('btn btn-danger');}, delay);} $("#loginButton").click(function(){ if($('#loginButton').length > 0) { if($('#loginButton').hasClass('btn') &&$('#loginButton').hasClass('btn-success') &&$('#loginButton').hasClass('disabled')) { } else { $("#loginForm").submit();disableButtons(10000);} } else if($('#LOGIN_FORBIDDEN').length > 0) { if($('#LOGIN_FORBIDDEN').hasClass('btn') &&$('#LOGIN_FORBIDDEN').hasClass('btn-success') &&$('#LOGIN_FORBIDDEN').hasClass('disabled')) { } else { } } });$("#blockedBtn").hover(function() { $("#blockedBtn").hide();$("#askBtn").fadeIn(820);});})