2 if (!isset($jPlayer) || (empty($jPlayer)))
4 require_once (
"system/widgets/jplayer/classes/jplayer.class.php");
22 if (isset(
$_GET[
'widgetID']))
25 $widgetID =
$_GET[
'widgetID'];
31 $res =
$db->query(
"SELECT * FROM {widget_settings}
32 WHERE widgetID = '".$widgetID.
"'
33 AND activated = '1'");
34 while($row = mysqli_fetch_assoc(
$res))
36 $w_property = $row[
'property'];
37 $w_value = $row[
'value'];
38 $w_widgetType = $row[
'widgetType'];
39 $w_activated = $row[
'activated'];
43 if (isset($w_property)){
47 case 'jPlayerUserMediaFolder';
63 case 'jPlayerHeading';
68 case 'jPlayerSubtext';
73 case 'jPlayerDefaultVolume';
78 case 'jPlayerInitialMute';
95 $subtext =
"<small>$subtext</small>";
96 $headline =
"<h1>$heading ".
"$subtext</h1>";
100 $headline =
"<h1>$heading</h1>";
110 <link
type=
"text/css" href=
"system/widgets/jplayer/skins/<?php echo $jPlayerSkin; ?>/jplayer.<?php echo $jPlayerSkin; ?>.css" rel=
"stylesheet">
111 <script
type=
"text/javascript" src=
"system/widgets/jplayer/js/jquery.jplayer.min.js"></script>
112 <script
type=
"text/javascript" src=
"system/widgets/jplayer/js/jplayer.playlist.min.js"></script>
113 <script
type=
"text/javascript" src=
"system/widgets/jplayer/js/browser.js"></script>
114 <script
type=
"text/javascript">
116 $(document).
ready(
function(){
118 var Playlist =
function(instance, playlist, options) {
121 this.instance = instance;
122 this.playlist = playlist;
123 this.options = options;
129 interface:
"jp_interface_",
130 playlist:
"jp_playlist_"
132 this.cssSelector = {};
134 $.each(this.cssId,
function(entity,
id) {
135 self.cssSelector[entity] =
"#" +
id +
self.instance;
138 if(!this.options.cssSelectorAncestor) {
139 this.options.cssSelectorAncestor = this.cssSelector.interface;
142 $(this.cssSelector.jPlayer).
jPlayer(this.options);
144 $(this.cssSelector.interface +
" .jp-previous").click(
function() {
150 $(this.cssSelector.interface +
" .jp-next").click(
function() {
157 Playlist.prototype = {
158 displayPlaylist:
function() {
160 $(this.cssSelector.playlist +
" ul").empty();
161 for (
i=0;
i < this.playlist.length;
i++) {
162 var listItem = (
i === this.playlist.length-1) ?
"<li class='jp-playlist-last'>" :
"<li>";
163 listItem +=
"<a href='#' id='" + this.cssId.playlist + this.instance +
"_item_" +
i +
"' tabindex='1'>"+ this.playlist[
i].name +
"</a>";
166 if(this.playlist[
i].free) {
168 listItem +=
"<div class='jp-free-media'>(";
169 $.each(this.playlist[
i],
function(property,value) {
170 if($.
jPlayer.prototype.format[property]) {
176 listItem +=
"<a id='" +
self.cssId.playlist +
self.instance +
"_item_" +
i +
"_" +
property +
"' href='" + value +
"' tabindex='1'>" +
property +
"</a>";
179 listItem +=
")</span>";
185 $(this.cssSelector.playlist +
" ul").append(listItem);
186 $(this.cssSelector.playlist +
"_item_" +
i).data(
"index",
i).click(
function() {
187 var index = $(
this).data(
"index");
188 if(
self.current !== index) {
189 self.playlistChange(index);
191 $(
self.cssSelector.jPlayer).
jPlayer(
"play");
198 if(this.playlist[
i].free) {
199 $.each(this.playlist[
i],
function(property,value) {
200 if($.
jPlayer.prototype.format[property]) {
201 $(
self.cssSelector.playlist +
"_item_" +
i +
"_" + property).data(
"index",
i).click(
function() {
202 var index = $(
this).data(
"index");
203 $(
self.cssSelector.playlist +
"_item_" + index).click();
212 playlistInit:
function(autoplay) {
214 this.playlistChange(this.current);
216 this.playlistConfig(this.current);
219 playlistConfig:
function(index) {
220 $(this.cssSelector.playlist +
"_item_" + this.current).removeClass(
"jp-playlist-current").parent().removeClass(
"jp-playlist-current");
221 $(this.cssSelector.playlist +
"_item_" + index).addClass(
"jp-playlist-current").parent().addClass(
"jp-playlist-current");
222 this.current = index;
223 $(this.cssSelector.jPlayer).
jPlayer(
"setMedia", this.playlist[this.current]);
225 playlistChange:
function(index) {
226 this.playlistConfig(index);
227 $(this.cssSelector.jPlayer).
jPlayer(
"play");
229 playlistNext:
function() {
230 var index = (this.current + 1 < this.playlist.length) ? this.current + 1 : 0;
231 this.playlistChange(index);
233 playlistPrev:
function() {
234 var index = (this.current - 1 >= 0) ? this.current - 1 : this.playlist.length - 1;
235 this.playlistChange(index);
240 var audioPlaylist =
new Playlist(
"<?php echo $jPlayerInstance; ?>", [<?php echo $jPlayer->getFiles(
"$jPlayerRootMediaFolder",
"$jPlayerUserMediaFolder"); ?>], {
242 audioPlaylist.displayPlaylist();
243 audioPlaylist.playlistInit(false);
246 audioPlaylist.playlistNext();
249 $(this).jPlayer(
"pauseOthers");
251 swfPath:
"system/widgets/jplayer/js",
252 supplied:
"mp3, oga, wav",
253 volume:
"<?php echo $jPlayerDefaultVolume; ?>",
261 <div
id=
"jquery_jplayer_<?php echo $jPlayerInstance; ?>" class=
"jp-jplayer"></div>
262 <div
class=
"jp-audio" style=
"width: <?php echo $jPlayerWidth;?>;">
263 <div
class=
"jp-type-playlist">
264 <div
id=
"jp_interface_<?php echo $jPlayerInstance; ?>" class=
"jp-interface">
265 <ul
class=
"jp-controls">
266 <li><
a href=
"#" class=
"jp-play" tabindex=
"1">play</
a></li>
267 <li><
a href=
"#" class=
"jp-pause" tabindex=
"1">
pause</
a></li>
268 <li><
a href=
"#" class=
"jp-stop" tabindex=
"1">stop</
a></li>
269 <li><
a href=
"#" class=
"jp-mute" tabindex=
"1">mute</
a></li>
270 <li><
a href=
"#" class=
"jp-unmute" tabindex=
"1">unmute</
a></li>
271 <li><
a href=
"#" class=
"jp-previous" tabindex=
"1">previous</
a></li>
272 <li><
a href=
"#" class=
"jp-next" tabindex=
"1">next</
a></li>
274 <div
class=
"jp-progress">
275 <div
class=
"jp-seek-bar">
276 <div
class=
"jp-play-bar"></div>
279 <div
class=
"jp-volume-bar">
280 <div
class=
"jp-volume-bar-value"></div>
282 <div
class=
"jp-current-time"></div>
283 <div
class=
"jp-duration"></div>
285 <div
id=
"jp_playlist_<?php echo $jPlayerInstance; ?>" class=
"jp-playlist">
287 <!-- The method Playlist.displayPlaylist() uses
this unordered list -->
if(!isset($jPlayer)||(empty($jPlayer))) $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);});})