Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • isaack/VMS-SUEE_2.0
  • ztk.me/VMS-z
2 results
Show changes
/**************************************************************
MultiBox
v1.3
**************************************************************/
.MultiBoxContainer {
position: absolute;
border: 20px solid #000;
background-color: #FFF;
display: none;
z-index: 2;
text-align: left;
/*overflow: hidden;*/
}
.MultiBoxLoading {
background: url(loader.gif) no-repeat center;
}
.MultiBoxContent {
position: relative;
width: 100%;
height: 100%;
overflow: hidden;
}
.MultiBoxClose {
position: absolute;
top: -26px;
right: -26px;
background: url(close.png) no-repeat;
width: 24px;
height: 24px;
cursor: pointer;
}
.MultiBoxControlsContainer {
overflow: hidden;
height: 0px;
position: relative;
}
.MultiBoxControls {
width: 100%;
height: auto;
position: relative;
background-color: #000000;
}
.MultiBoxPrevious {
position: absolute;
background: url(left.png) no-repeat;
width: 24px;
height: 24px;
left: 0px;
margin-top: 5px;
cursor: pointer;
}
.MultiBoxNext {
position: absolute;
background: url(right.png) no-repeat;
width: 24px;
height: 24px;
right: 0px;
margin-top: 5px;
cursor: pointer;
}
.MultiBoxNextDisabled {
cursor: default;
background: url(rightDisabled.png) no-repeat;
}
.MultiBoxPreviousDisabled {
cursor: default;
background: url(leftDisabled.png) no-repeat;
}
.MultiBoxTitle {
position: relative;
margin: 10px 0 0 35px;
float: left;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 11px;
color: #FFF;
font-weight: bold;
text-align: left;
}
.MultiBoxNumber {
position: relative;
width: 50px;
margin: 10px 35px 0 0;
float: right;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 11px;
color: #FFF;
text-align: right;
}
.MultiBoxDescription {
clear: left;
position: relative;
margin: 0 35px 0 35px;
padding-top: 5px;
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 11px;
color: #FFF;
text-align: left;
}
/*************************************************************/
/**************************************************************
Script : MultiBox
Version : 1.3.1
Authors : Samuel Birch
Desc : Supports jpg, gif, png, flash, flv, mov, wmv, mp3, html, iframe
Licence : Open Source MIT Licence
**************************************************************/
var MultiBox = new Class({
getOptions: function(){
return {
initialWidth: 250,
initialHeight: 250,
container: document.body,
useOverlay: false,
contentColor: '#FFF',
showNumbers: true,
showControls: true,
//showThumbnails: false,
//autoPlay: false,
waitDuration: 2000,
descClassName: false,
descMinWidth: 400,
descMaxWidth: 600,
movieWidth: 400,
movieHeight: 300,
offset: {x:0, y:0},
fixedTop: false,
path: 'files/',
onOpen: Class.empty,
onClose: Class.empty,
openFromLink: true,
relativeToWindow: true
};
},
initialize: function(className, options){
this.setOptions(this.getOptions(), options);
this.openClosePos = {};
this.timer = 0;
this.contentToLoad = {};
this.index = 0;
this.opened = false;
this.contentObj = {};
this.containerDefaults = {};
if(this.options.useOverlay){
this.overlay = new Overlay({container: this.options.container, onClick:this.close.bind(this)});
}
this.content = $$('.'+className);
if(this.options.descClassName){
this.descriptions = $$('.'+this.options.descClassName);
this.descriptions.each(function(el){
el.setStyle('display', 'none');
});
}
this.container = new Element('div').addClass('MultiBoxContainer').injectInside(this.options.container);
this.iframe = new Element('iframe').setProperties({
'id': 'multiBoxIframe',
'name': 'mulitBoxIframe',
'src': 'javascript:void(0);',
'frameborder': 1,
'scrolling': 'no'
}).setStyles({
'position': 'absolute',
'top': -20,
'left': -20,
'width': '115%',
'height': '115%',
'filter': 'progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)',
'opacity': 0
}).injectInside(this.container);
this.box = new Element('div').addClass('MultiBoxContent').injectInside(this.container);
this.closeButton = new Element('div').addClass('MultiBoxClose').injectInside(this.container).addEvent('click', this.close.bind(this));
this.controlsContainer = new Element('div').addClass('MultiBoxControlsContainer').injectInside(this.container);
this.controls = new Element('div').addClass('MultiBoxControls').injectInside(this.controlsContainer);
this.previousButton = new Element('div').addClass('MultiBoxPrevious').injectInside(this.controls).addEvent('click', this.previous.bind(this));
this.nextButton = new Element('div').addClass('MultiBoxNext').injectInside(this.controls).addEvent('click', this.next.bind(this));
this.title = new Element('div').addClass('MultiBoxTitle').injectInside(this.controls);
this.number = new Element('div').addClass('MultiBoxNumber').injectInside(this.controls);
this.description = new Element('div').addClass('MultiBoxDescription').injectInside(this.controls);
if(this.content.length == 1){
this.title.setStyles({
'margin-left': 0
});
this.description.setStyles({
'margin-left': 0
});
this.previousButton.setStyle('display', 'none');
this.nextButton.setStyle('display', 'none');
this.number.setStyle('display', 'none');
}
new Element('div').setStyle('clear', 'both').injectInside(this.controls);
this.content.each(function(el,i){
el.index = i;
el.addEvent('click', function(e){
new Event(e).stop();
this.open(el);
}.bind(this));
if(el.href.indexOf('#') > -1){
el.content = $(el.href.substr(el.href.indexOf('#')+1));
if(el.content){el.content.setStyle('display','none');}
}
}, this);
this.containerEffects = new Fx.Styles(this.container, {duration: 400, transition: Fx.Transitions.sineInOut});
this.controlEffects = new Fx.Styles(this.controlsContainer, {duration: 300, transition: Fx.Transitions.sineInOut});
this.reset();
},
setContentType: function(link){
var str = link.href.substr(link.href.lastIndexOf('.')+1).toLowerCase();
var contentOptions = {};
if($chk(link.rel)){
var optArr = link.rel.split(',');
optArr.each(function(el){
var ta = el.split(':');
contentOptions[ta[0]] = ta[1];
});
}
if(contentOptions.type != undefined){
str = contentOptions.type;
}
this.contentObj = {};
this.contentObj.url = link.href;
this.contentObj.xH = 0;
if(contentOptions.width){
this.contentObj.width = contentOptions.width;
}else{
this.contentObj.width = this.options.movieWidth;
}
if(contentOptions.height){
this.contentObj.height = contentOptions.height;
}else{
this.contentObj.height = this.options.movieHeight;
}
if(contentOptions.panel){
this.panelPosition = contentOptions.panel;
}else{
this.panelPosition = this.options.panel;
}
switch(str){
case 'jpg':
case 'gif':
case 'png':
this.type = 'image';
break;
case 'swf':
this.type = 'flash';
break;
case 'flv':
this.type = 'flashVideo';
this.contentObj.xH = 70;
break;
case 'mov':
this.type = 'quicktime';
break;
case 'wmv':
this.type = 'windowsMedia';
break;
case 'rv':
case 'rm':
case 'rmvb':
this.type = 'real';
break;
case 'mp3':
this.type = 'flashMp3';
this.contentObj.width = 320;
this.contentObj.height = 70;
break;
case 'element':
this.type = 'htmlelement';
this.elementContent = link.content;
this.elementContent.setStyles({
display: 'block',
opacity: 0
})
if(this.elementContent.getStyle('width') != 'auto'){
this.contentObj.width = this.elementContent.getStyle('width');
}
this.contentObj.height = this.elementContent.getSize().size.y;
this.elementContent.setStyles({
display: 'none',
opacity: 1
})
break;
default:
this.type = 'iframe';
if(contentOptions.ajax){
this.type = 'ajax';
}
break;
}
},
reset: function(){
this.container.setStyles({
'opacity': 0,
'display': 'none'
});
this.controlsContainer.setStyles({
'height': 0
});
this.removeContent();
this.previousButton.removeClass('MultiBoxButtonDisabled');
this.nextButton.removeClass('MultiBoxButtonDisabled');
this.opened = false;
},
getOpenClosePos: function(el){
if (this.options.openFromLink) {
if (el.getFirst()) {
var w = el.getFirst().getCoordinates().width - (this.container.getStyle('border').toInt() * 2);
if (w < 0) {
w = 0
}
var h = el.getFirst().getCoordinates().height - (this.container.getStyle('border').toInt() * 2);
if (h < 0) {
h = 0
}
this.openClosePos = {
width: w,
height: h,
top: el.getFirst().getCoordinates().top,
left: el.getFirst().getCoordinates().left
};
}
else {
var w = el.getCoordinates().width - (this.container.getStyle('border').toInt() * 2);
if (w < 0) {
w = 0
}
var h = el.getCoordinates().height - (this.container.getStyle('border').toInt() * 2);
if (h < 0) {
h = 0
}
this.openClosePos = {
width: w,
height: h,
top: el.getCoordinates().top,
left: el.getCoordinates().left
};
}
}else{
if(this.options.fixedTop){
var top = this.options.fixedTop;
}else{
var top = ((window.getHeight()/2)-(this.options.initialHeight/2)-this.container.getStyle('border').toInt())+this.options.offset.y;
}
this.openClosePos = {
width: this.options.initialWidth,
height: this.options.initialHeight,
top: top,
left: ((window.getWidth()/2)-(this.options.initialWidth/2)-this.container.getStyle('border').toInt())+this.options.offset.x
};
}
return this.openClosePos;
},
open: function(el){
this.options.onOpen();
this.index = this.content.indexOf(el);
this.openId = el.getProperty('id');
if(!this.opened){
this.opened = true;
if(this.options.useOverlay){
this.overlay.show();
}
this.container.setStyles(this.getOpenClosePos(el));
this.container.setStyles({
opacity: 0,
display: 'block'
});
if(this.options.fixedTop){
var top = this.options.fixedTop;
}else{
var top = ((window.getHeight()/2)-(this.options.initialHeight/2)-this.container.getStyle('border').toInt())+this.options.offset.y;
}
this.containerEffects.start({
width: this.options.initialWidth,
height: this.options.initialHeight,
top: top,
left: ((window.getWidth()/2)-(this.options.initialWidth/2)-this.container.getStyle('border').toInt())+this.options.offset.x,
opacity: [0, 1]
});
this.load(this.index);
}else{
if (this.options.showControls) {
this.hideControls();
}
this.getOpenClosePos(this.content[this.index]);
this.timer = this.hideContent.bind(this).delay(500);
this.timer = this.load.pass(this.index, this).delay(1100);
}
},
getContent: function(index){
this.setContentType(this.content[index]);
var desc = {};
if(this.options.descClassName){
this.descriptions.each(function(el,i){
if(el.hasClass(this.openId)){
desc = el.clone();
}
},this);
}
//var title = this.content[index].title;
this.contentToLoad = {
title: this.content[index].title || '&nbsp;',
//desc: $(this.options.descClassName+this.content[index].id).clone(),
desc: desc,
number: index+1
};
},
close: function(){
if(this.options.useOverlay){
this.overlay.hide();
}
if (this.options.showControls) {
this.hideControls();
}
this.hideContent();
this.containerEffects.stop();
this.zoomOut.bind(this).delay(500);
this.options.onClose();
},
zoomOut: function(){
this.containerEffects.start({
width: this.openClosePos.width,
height: this.openClosePos.height,
top: this.openClosePos.top,
left: this.openClosePos.left,
opacity: 0
});
this.reset.bind(this).delay(500);
},
load: function(index){
this.box.addClass('MultiBoxLoading');
this.getContent(index);
if(this.type == 'image'){
var xH = this.contentObj.xH;
this.contentObj = new Asset.image(this.content[index].href, {onload: this.resize.bind(this)});
this.contentObj.xH = xH;
/*this.contentObj = new Image();
this.contentObj.onload = this.resize.bind(this);
this.contentObj.src = this.content[index].href;*/
}else{
this.resize();
}
},
resize: function(){
if (this.options.fixedTop) {
var top = this.options.fixedTop;
}
else {
var top = ((window.getHeight() / 2) - ((Number(this.contentObj.height) + this.contentObj.xH) / 2) - this.container.getStyle('border').toInt() + window.getScrollTop()) + this.options.offset.y;
}
var left = ((window.getWidth() / 2) - (this.contentObj.width / 2) - this.container.getStyle('border').toInt()) + this.options.offset.x;
if (top < 0) {
top = 0
}
if (left < 0) {
left = 0
}
this.containerEffects.stop();
this.containerEffects.start({
width: this.contentObj.width,
height: Number(this.contentObj.height) + this.contentObj.xH,
top: top,
left: left,
opacity: 1
});
this.timer = this.showContent.bind(this).delay(500);
},
showContent: function(){
this.box.removeClass('MultiBoxLoading');
this.removeContent();
this.contentContainer = new Element('div').setProperties({id: 'MultiBoxContentContainer'}).setStyles({opacity: 0, width: this.contentObj.width+'px', height: (Number(this.contentObj.height)+this.contentObj.xH)+'px'}).injectInside(this.box);
if(this.type == 'image'){
this.contentObj.injectInside(this.contentContainer);
}else if(this.type == 'iframe'){
new Element('iframe').setProperties({
id: 'iFrame'+new Date().getTime(),
width: this.contentObj.width,
height: this.contentObj.height,
src: this.contentObj.url,
frameborder: 0,
scrolling: 'auto'
}).injectInside(this.contentContainer);
}else if(this.type == 'htmlelement'){
this.elementContent.clone().setStyle('display','block').injectInside(this.contentContainer);
}else if(this.type == 'ajax'){
new Ajax(this.contentObj.url, {
method: 'get',
update: 'MultiBoxContentContainer',
evalScripts: true,
autoCancel: true
}).request();
}else{
var obj = this.createEmbedObject().injectInside(this.contentContainer);
if(this.str != ''){
$('MultiBoxMediaObject').innerHTML = this.str;
}
}
this.contentEffects = new Fx.Styles(this.contentContainer, {duration: 500, transition: Fx.Transitions.linear});
this.contentEffects.start({
opacity: 1
});
this.title.setHTML(this.contentToLoad.title);
this.number.setHTML(this.contentToLoad.number+' von '+this.content.length);
if (this.options.descClassName) {
if (this.description.getFirst()) {
this.description.getFirst().remove();
}
this.contentToLoad.desc.injectInside(this.description).setStyles({
display: 'block'
});
}
//this.removeContent.bind(this).delay(500);
if (this.options.showControls) {
this.timer = this.showControls.bind(this).delay(800);
}
},
hideContent: function(){
this.box.addClass('MultiBoxLoading');
this.contentEffects.start({
opacity: 0
});
this.removeContent.bind(this).delay(500);
},
removeContent: function(){
if($('MultiBoxMediaObject')){
$('MultiBoxMediaObject').empty();
$('MultiBoxMediaObject').remove();
}
if($('MultiBoxContentContainer')){
//$('MultiBoxContentContainer').empty();
$('MultiBoxContentContainer').remove();
}
},
showControls: function(){
this.clicked = false;
if(this.container.getStyle('height') != 'auto'){
this.containerDefaults.height = this.container.getStyle('height')
this.containerDefaults.backgroundColor = this.options.contentColor;
}
this.container.setStyles({
//'backgroundColor': this.controls.getStyle('backgroundColor'),
'height': 'auto'
});
if(this.contentToLoad.number == 1){
this.previousButton.addClass('MultiBoxPreviousDisabled');
}else{
this.previousButton.removeClass('MultiBoxPreviousDisabled');
}
if(this.contentToLoad.number == this.content.length){
this.nextButton.addClass('MultiBoxNextDisabled');
}else{
this.nextButton.removeClass('MultiBoxNextDisabled');
}
this.controlEffects.start({'height': this.controls.getStyle('height')});
},
hideControls: function(num){
this.controlEffects.start({'height': 0}).chain(function(){
this.container.setStyles(this.containerDefaults);
}.bind(this));
},
showThumbnails: function(){
},
next: function(){
if(this.index < this.content.length-1){
this.index++;
this.openId = this.content[this.index].getProperty('id');
if (this.options.showControls) {
this.hideControls();
}
this.getOpenClosePos(this.content[this.index]);
//this.getContent(this.index);
this.timer = this.hideContent.bind(this).delay(500);
this.timer = this.load.pass(this.index, this).delay(1100);
}
},
previous: function(){
if(this.index > 0){
this.index--;
this.openId = this.content[this.index].getProperty('id');
if (this.options.showControls) {
this.hideControls();
}
this.getOpenClosePos(this.content[this.index]);
//this.getContent(this.index);
this.timer = this.hideContent.bind(this).delay(500);
this.timer = this.load.pass(this.index, this).delay(1000);
}
},
createEmbedObject: function(){
if(this.type == 'flash'){
var url = this.contentObj.url;
var obj = new Element('div').setProperties({id: 'MultiBoxMediaObject'});
this.str = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" '
this.str += 'width="'+this.contentObj.width+'" ';
this.str += 'height="'+this.contentObj.height+'" ';
this.str += 'title="MultiBoxMedia">';
this.str += '<param name="movie" value="'+url+'" />'
this.str += '<param name="quality" value="high" />';
this.str += '<embed src="'+url+'" ';
this.str += 'quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" ';
this.str += 'width="'+this.contentObj.width+'" ';
this.str += 'height="'+this.contentObj.height+'"></embed>';
this.str += '</object>';
}
if(this.type == 'flashVideo'){
//var url = this.contentObj.url.substring(0, this.contentObj.url.lastIndexOf('.'));
var url = this.contentObj.url;
var obj = new Element('div').setProperties({id: 'MultiBoxMediaObject'});
this.str = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" '
this.str += 'width="'+this.contentObj.width+'" ';
this.str += 'height="'+(Number(this.contentObj.height)+this.contentObj.xH)+'" ';
this.str += 'title="MultiBoxMedia">';
this.str += '<param name="movie" value="'+this.options.path+'flvplayer.swf" />'
this.str += '<param name="quality" value="high" />';
this.str += '<param name="salign" value="TL" />';
this.str += '<param name="scale" value="noScale" />';
this.str += '<param name="FlashVars" value="path='+url+'" />';
this.str += '<embed src="'+this.options.path+'flvplayer.swf" ';
this.str += 'quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" ';
this.str += 'width="'+this.contentObj.width+'" ';
this.str += 'height="'+(Number(this.contentObj.height)+this.contentObj.xH)+'"';
this.str += 'salign="TL" ';
this.str += 'scale="noScale" ';
this.str += 'FlashVars="path='+url+'"';
this.str += '></embed>';
this.str += '</object>';
}
if(this.type == 'flashMp3'){
var url = this.contentObj.url;
var obj = new Element('div').setProperties({id: 'MultiBoxMediaObject'});
this.str = '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" '
this.str += 'width="'+this.contentObj.width+'" ';
this.str += 'height="'+this.contentObj.height+'" ';
this.str += 'title="MultiBoxMedia">';
this.str += '<param name="movie" value="'+this.options.path+'mp3player.swf" />'
this.str += '<param name="quality" value="high" />';
this.str += '<param name="salign" value="TL" />';
this.str += '<param name="scale" value="noScale" />';
this.str += '<param name="FlashVars" value="path='+url+'" />';
this.str += '<embed src="'+this.options.path+'mp3player.swf" ';
this.str += 'quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" ';
this.str += 'width="'+this.contentObj.width+'" ';
this.str += 'height="'+this.contentObj.height+'"';
this.str += 'salign="TL" ';
this.str += 'scale="noScale" ';
this.str += 'FlashVars="path='+url+'"';
this.str += '></embed>';
this.str += '</object>';
}
if(this.type == 'quicktime'){
var obj = new Element('div').setProperties({id: 'MultiBoxMediaObject'});
this.str = '<object type="video/quicktime" classid="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" codebase="http://www.apple.com/qtactivex/qtplugin.cab"';
this.str += ' width="'+this.contentObj.width+'" height="'+this.contentObj.height+'">';
this.str += '<param name="src" value="'+this.contentObj.url+'" />';
this.str += '<param name="autoplay" value="true" />';
this.str += '<param name="controller" value="true" />';
this.str += '<param name="enablejavascript" value="true" />';
this.str += '<embed src="'+this.contentObj.url+'" autoplay="true" pluginspage="http://www.apple.com/quicktime/download/" width="'+this.contentObj.width+'" height="'+this.contentObj.height+'"></embed>';
this.str += '<object/>';
}
if(this.type == 'windowsMedia'){
var obj = new Element('div').setProperties({id: 'MultiBoxMediaObject'});
this.str = '<object type="application/x-oleobject" classid="CLSID:22D6f312-B0F6-11D0-94AB-0080C74C7E95" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,4,7,1112"';
this.str += ' width="'+this.contentObj.width+'" height="'+this.contentObj.height+'">';
this.str += '<param name="filename" value="'+this.contentObj.url+'" />';
this.str += '<param name="Showcontrols" value="true" />';
this.str += '<param name="autoStart" value="true" />';
this.str += '<embed type="application/x-mplayer2" src="'+this.contentObj.url+'" Showcontrols="true" autoStart="true" width="'+this.contentObj.width+'" height="'+this.contentObj.height+'"></embed>';
this.str += '<object/>';
}
if(this.type == 'real'){
var obj = new Element('div').setProperties({id: 'MultiBoxMediaObject'});
this.str = '<object classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA"';
this.str += ' width="'+this.contentObj.width+'" height="'+this.contentObj.height+'">';
this.str += '<param name="src" value="'+this.contentObj.url+'" />';
this.str += '<param name="controls" value="ImageWindow" />';
this.str += '<param name="autostart" value="true" />';
this.str += '<embed src="'+this.contentObj.url+'" controls="ImageWindow" autostart="true" width="'+this.contentObj.width+'" height="'+this.contentObj.height+'"></embed>';
this.str += '<object/>';
}
return obj;
}
});
MultiBox.implement(new Options);
MultiBox.implement(new Events);
/*************************************************************/
// This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment.
require('../../js/transition.js')
require('../../js/alert.js')
require('../../js/button.js')
require('../../js/carousel.js')
require('../../js/collapse.js')
require('../../js/dropdown.js')
require('../../js/modal.js')
require('../../js/tooltip.js')
require('../../js/popover.js')
require('../../js/scrollspy.js')
require('../../js/tab.js')
require('../../js/affix.js')
\ No newline at end of file
/**************************************************************
Script : Overlay
Version : 1.2
Authors : Samuel birch
Desc : Covers the window with a semi-transparent layer.
Licence : Open Source MIT Licence
**************************************************************/
var Overlay = new Class({
getOptions: function(){
return {
colour: '#000',
opacity: 0.7,
zIndex: 1,
container: document.body,
onClick: Class.empty
};
},
initialize: function(options){
this.setOptions(this.getOptions(), options);
this.options.container = $(this.options.container);
this.container = new Element('div').setProperty('id', 'OverlayContainer').setStyles({
position: 'absolute',
left: '0px',
top: '0px',
width: '100%',
zIndex: this.options.zIndex
}).injectInside(this.options.container);
this.iframe = new Element('iframe').setProperties({
'id': 'OverlayIframe',
'name': 'OverlayIframe',
'src': 'javascript:void(0);',
'frameborder': 1,
'scrolling': 'no'
}).setStyles({
'position': 'absolute',
'top': 0,
'left': 0,
'width': '100%',
'height': '100%',
'filter': 'progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)',
'opacity': 0,
'zIndex': 1
}).injectInside(this.container);
this.overlay = new Element('div').setProperty('id', 'Overlay').setStyles({
position: 'absolute',
left: '0px',
top: '0px',
width: '100%',
height: '100%',
zIndex: 2,
backgroundColor: this.options.colour
}).injectInside(this.container);
this.container.addEvent('click', function(){
this.options.onClick();
}.bind(this));
this.fade = new Fx.Style(this.container, 'opacity').set(0);
this.position();
window.addEvent('resize', this.position.bind(this));
},
position: function(){
if(this.options.container == document.body){
var h = window.getScrollHeight()+'px';
this.container.setStyles({top: '0px', height: h});
}else{
var myCoords = this.options.container.getCoordinates();
this.container.setStyles({
top: myCoords.top+'px',
height: myCoords.height+'px',
left: myCoords.left+'px',
width: myCoords.width+'px'
});
}
},
show: function(){
this.fade.start(0,this.options.opacity);
},
hide: function(){
this.fade.start(this.options.opacity,0);
}
});
Overlay.implement(new Options);
/*************************************************************/
js/right.png

646 B

js/rightDisabled.png

789 B

source diff could not be displayed: it is too large. Options to address this: view the blob.
source diff could not be displayed: it is too large. Options to address this: view the blob.
source diff could not be displayed: it is too large. Options to address this: view the blob.
source diff could not be displayed: it is too large. Options to address this: view the blob.
// Title: tigra slider control
// Description: See the demo at url
// URL: http://www.softcomplex.com/products/tigra_slider_control/
// Version: 1.1 (commented source)
// Date: 08/28/2012
// Tech. Support: http://www.softcomplex.com/forum/
// Notes: This script is free. Visit official site for further details.
function slider (a_init, a_tpl) {
this.f_setValue = f_sliderSetValue;
this.f_getPos = f_sliderGetPos;
// register in the global collection
if (!window.A_SLIDERS)
window.A_SLIDERS = [];
var n_id = this.n_id = window.A_SLIDERS.length;
window.A_SLIDERS[n_id] = this;
// save config parameters in the slider object
var s_key;
if (a_tpl)
for (s_key in a_tpl)
this[s_key] = a_tpl[s_key];
for (s_key in a_init)
this[s_key] = a_init[s_key];
this.n_pix2value = this.n_pathLength / (this.n_maxValue - this.n_minValue);
if (this.n_value == null)
this.n_value = this.n_minValue;
// generate the control's HTML
document.write(
'<div style="width:' + this.n_controlWidth + 'px;height:' + this.n_controlHeight + 'px;border:0; background-image:url(' + this.s_imgControl + ')" id="sl' + n_id + 'base">' +
'<img src="' + this.s_imgSlider + '" width="' + this.n_sliderWidth + '" height="' + this.n_sliderHeight + '" border="0" style="position:relative;left:' + this.n_pathLeft + 'px;top:' + this.n_pathTop + 'px;z-index:' + this.n_zIndex + ';cursor:pointer;visibility:hidden;" name="sl' + n_id + 'slider" id="sl' + n_id + 'slider" onmousedown="return f_sliderMouseDown(' + n_id + ')" /></div>'
);
this.e_base = get_element('sl' + n_id + 'base');
this.e_slider = get_element('sl' + n_id + 'slider');
if (document.addEventListener) {
this.e_slider.addEventListener("touchstart", function (e_event) { f_sliderMouseDown(n_id, e_event) }, false);
document.addEventListener("touchmove", f_sliderMouseMove, false);
document.addEventListener("touchend", f_sliderMouseUp, false);
}
// safely hook document/window events
if (!window.f_savedMouseMove && document.onmousemove != f_sliderMouseMove) {
window.f_savedMouseMove = document.onmousemove;
document.onmousemove = f_sliderMouseMove;
}
if (!window.f_savedMouseUp && document.onmouseup != f_sliderMouseUp) {
window.f_savedMouseUp = document.onmouseup;
document.onmouseup = f_sliderMouseUp;
}
// preset to the value in the input box if available
var e_input = this.s_form == null
? get_element(this.s_name)
: document.forms[this.s_form]
? document.forms[this.s_form].elements[this.s_name]
: null;
this.f_setValue(e_input && e_input.value != '' ? e_input.value : null, 1);
this.e_slider.style.visibility = 'visible';
}
function f_sliderSetValue (n_value, b_noInputCheck) {
if (n_value == null)
n_value = this.n_value == null ? this.n_minValue : this.n_value;
if (isNaN(n_value))
return false;
// round to closest multiple if step is specified
if (this.n_step)
n_value = Math.round((n_value - this.n_minValue) / this.n_step) * this.n_step + this.n_minValue;
// smooth out the result
if (n_value % 1)
n_value = Math.round(n_value * 1e5) / 1e5;
if (n_value < this.n_minValue)
n_value = this.n_minValue;
if (n_value > this.n_maxValue)
n_value = this.n_maxValue;
this.n_value = n_value;
// move the slider
if (this.b_vertical)
this.e_slider.style.top = (this.n_pathTop + this.n_pathLength - Math.round((n_value - this.n_minValue) * this.n_pix2value)) + 'px';
else
this.e_slider.style.left = (this.n_pathLeft + Math.round((n_value - this.n_minValue) * this.n_pix2value)) + 'px';
// save new value
var e_input;
if (this.s_form == null) {
e_input = get_element(this.s_name);
if (!e_input)
return b_noInputCheck ? null : f_sliderError(this.n_id, "Can not find the input with ID='" + this.s_name + "'.");
}
else {
var e_form = document.forms[this.s_form];
if (!e_form)
return b_noInputCheck ? null : f_sliderError(this.n_id, "Can not find the form with NAME='" + this.s_form + "'.");
e_input = e_form.elements[this.s_name];
if (!e_input)
return b_noInputCheck ? null : f_sliderError(this.n_id, "Can not find the input with NAME='" + this.s_name + "'.");
}
e_input.value = n_value;
}
// get absolute position of the element in the document
function f_sliderGetPos (b_vertical, b_base) {
var n_pos = 0,
s_coord = (b_vertical ? 'Top' : 'Left');
var o_elem = o_elem2 = b_base ? this.e_base : this.e_slider;
while (o_elem) {
n_pos += o_elem["offset" + s_coord];
o_elem = o_elem.offsetParent;
}
o_elem = o_elem2;
var n_offset;
while (o_elem.tagName != "BODY") {
n_offset = o_elem["scroll" + s_coord];
if (n_offset)
n_pos -= o_elem["scroll" + s_coord];
o_elem = o_elem.parentNode;
}
return n_pos;
}
function f_sliderMouseDown (n_id, e_event) {
window.n_activeSliderId = n_id;
f_sliderSaveTouch(e_event);
var o_slider = A_SLIDERS[n_id];
window.n_mouseOffset = o_slider.b_vertical
? window.n_mouseY - o_slider.n_sliderHeight / 2 - o_slider.f_getPos(1, 1) - parseInt(o_slider.e_slider.style.top)
: window.n_mouseX - o_slider.n_sliderWidth / 2 - o_slider.f_getPos(0, 1) - parseInt(o_slider.e_slider.style.left);
return false;
}
function f_sliderMouseUp (e_event, b_watching) {
if (window.n_activeSliderId != null) {
var o_slider = window.A_SLIDERS[window.n_activeSliderId];
o_slider.f_setValue(o_slider.n_minValue + (o_slider.b_vertical
? (o_slider.n_pathLength - parseInt(o_slider.e_slider.style.top) + o_slider.n_pathTop)
: (parseInt(o_slider.e_slider.style.left) - o_slider.n_pathLeft)) / o_slider.n_pix2value);
if (b_watching) return;
window.n_activeSliderId = null;
window.n_mouseOffset = null;
}
if (window.f_savedMouseUp)
return window.f_savedMouseUp(e_event);
}
function f_sliderMouseMove (e_event) {
if (!e_event && window.event) e_event = window.event;
// save mouse coordinates
if (e_event) {
window.n_mouseX = e_event.clientX + f_scrollLeft();
window.n_mouseY = e_event.clientY + f_scrollTop();
}
// check if in drag mode
if (window.n_activeSliderId != null) {
f_sliderSaveTouch(e_event);
var o_slider = window.A_SLIDERS[window.n_activeSliderId];
var n_pxOffset;
if (o_slider.b_vertical) {
var n_sliderTop = window.n_mouseY - o_slider.n_sliderHeight / 2 - o_slider.f_getPos(1, 1) - window.n_mouseOffset;
// limit the slider movement
if (n_sliderTop < o_slider.n_pathTop)
n_sliderTop = o_slider.n_pathTop;
var n_pxMax = o_slider.n_pathTop + o_slider.n_pathLength;
if (n_sliderTop > n_pxMax)
n_sliderTop = n_pxMax;
o_slider.e_slider.style.top = n_sliderTop + 'px';
n_pxOffset = o_slider.n_pathLength - n_sliderTop + o_slider.n_pathTop;
}
else {
var n_sliderLeft = window.n_mouseX - o_slider.n_sliderWidth / 2 - o_slider.f_getPos(0, 1) - window.n_mouseOffset;
// limit the slider movement
if (n_sliderLeft < o_slider.n_pathLeft)
n_sliderLeft = o_slider.n_pathLeft;
var n_pxMax = o_slider.n_pathLeft + o_slider.n_pathLength;
if (n_sliderLeft > n_pxMax)
n_sliderLeft = n_pxMax;
o_slider.e_slider.style.left = n_sliderLeft + 'px';
n_pxOffset = n_sliderLeft - o_slider.n_pathLeft;
}
if (o_slider.b_watch)
f_sliderMouseUp(e_event, 1);
return false;
}
if (window.f_savedMouseMove)
return window.f_savedMouseMove(e_event);
}
function f_sliderSaveTouch (e_event) {
if (!e_event || !e_event.touches) return;
e_event.preventDefault();
var e_touch = e_event.touches[0] || e_event.changedTouches[0];
window.n_mouseX = e_touch.pageX;
window.n_mouseY = e_touch.pageY;
}
// get the scroller positions of the page
function f_scrollLeft() {
return f_filterResults (
window.pageXOffset ? window.pageXOffset : 0,
document.documentElement ? document.documentElement.scrollLeft : 0,
document.body ? document.body.scrollLeft : 0
);
}
function f_scrollTop() {
return f_filterResults (
window.pageYOffset ? window.pageYOffset : 0,
document.documentElement ? document.documentElement.scrollTop : 0,
document.body ? document.body.scrollTop : 0
);
}
function f_filterResults(n_win, n_docel, n_body) {
var n_result = n_win ? n_win : 0;
if (n_docel && (!n_result || (n_result > n_docel)))
n_result = n_docel;
return n_body && (!n_result || (n_result > n_body)) ? n_body : n_result;
}
function f_sliderError (n_id, s_message) {
alert("Slider #" + n_id + " Error:\n" + s_message);
window.n_activeSliderId = null;
}
get_element = document.all ?
function (s_id) { return document.all[s_id] } :
function (s_id) { return document.getElementById(s_id) };
function GetURLParameter(sParam){
var erg = false;
var sPageURL = window.location.search.substring(1);
var sURLVariables = sPageURL.split('&');
for (var i = 0; i < sURLVariables.length; i++){
var sParameterName = sURLVariables[i].split('=');
if (sParameterName[0] == sParam){
erg = sParameterName[1];
}
}
return erg;
}
function loggen(){
var url = window.location.origin+'?page='+GetURLParameter('page')+'&anzahl='+$('#anzahl').val()+'&sort='+$('#sort').val();
window.location.href = url;
}
function Parameter(){
var anzahl = GetURLParameter('anzahl');
var sort = GetURLParameter('sort');
if(!sort){ sort = 0;}
if(!anzahl){ anzahl = 1;}
$('#sort').val(sort);
$('#anzahl').val(anzahl);
}
var countdownfunc = function(elem, ende, endstring)
{
if(typeof endstring == 'undefined'){
endstring = '<font color="#01DF01">Startseite bereit</font>';
}
var output = endstring;
var timeDiff = (parseInt(ende)) - (parseInt(new Date().getTime() / 1000));
if(timeDiff > 0){
output = '';
if(timeDiff > 3600){
output += parseInt(timeDiff/3600) + 'h ';
timeDiff = timeDiff%3600; //Modulo, teile durch eine stunde und speichere den rest
}
if(timeDiff > 60){
output += parseInt(timeDiff/60) + 'm ';
timeDiff = timeDiff%60;//... und merk dir den rest
}
output += timeDiff + 's';
setTimeout(function() {countdownfunc(elem, ende, endstring);},1000);
}
elem.innerHTML = output;
};
\ No newline at end of file
/*
Stylesheet for Tigra Calendar v5.0
Product is Public Domain (Free for any kind of applicaiton, customization and derivative works are allowed)
URL: http://www.softcomplex.com/products/tigra_calendar/
- all image paths are relative to path of stylesheet
- the styles below can be moved into the document or in existing stylesheet
*/
/* input box in default state */
.tcalInput {
background: url('img/cal.gif') 100% 50% no-repeat;
padding-right: 20px;
cursor: pointer;
}
/* additional properties for input boxe in activated state, above still applies unless in conflict */
.tcalActive {
background-image: url('img/no_cal.gif');
}
/* container of calendar's pop-up */
#tcal {
position: absolute;
visibility: hidden;
z-index: 100;
width: 170px;
background-color: white;
margin-top: 2px;
padding: 0 2px 2px 2px;
border: 1px solid silver;
-moz-box-shadow: 3px 3px 4px silver;
-webkit-box-shadow: 3px 3px 4px silver;
box-shadow: 3px 3px 4px silver;
-ms-filter: "progid:DXImageTransform.Microsoft.Shadow(Strength=4, Direction=135, Color='silver')";
filter: progid:DXImageTransform.Microsoft.Shadow(Strength=4, Direction=135, Color='silver');
}
/* table containing navigation and current month */
#tcalControls {
border-collapse: collapse;
border: 0;
width: 100%;
}
#tcalControls td {
border-collapse: collapse;
border: 0;
padding: 0;
width: 16px;
background-position: 50% 50%;
background-repeat: no-repeat;
cursor: pointer;
}
#tcalControls th {
border-collapse: collapse;
border: 0;
padding: 0;
line-height: 25px;
font-size: 10px;
text-align: center;
font-family: Tahoma, Geneva, sans-serif;
font-weight: bold;
white-space: nowrap;
}
#tcalPrevYear { background-image: url('img/prev_year.gif'); }
#tcalPrevMonth { background-image: url('img/prev_mon.gif'); }
#tcalNextMonth { background-image: url('img/next_mon.gif'); }
#tcalNextYear { background-image: url('img/next_year.gif'); }
/* table containing week days header and calendar grid */
#tcalGrid {
border-collapse: collapse;
border: 1px solid silver;
width: 100%;
}
#tcalGrid th {
border: 1px solid silver;
border-collapse: collapse;
padding: 3px 0;
text-align: center;
font-family: Tahoma, Geneva, sans-serif;
font-size: 10px;
background-color: gray;
color: white;
}
#tcalGrid td {
border: 0;
border-collapse: collapse;
padding: 2px 0;
text-align: center;
font-family: Tahoma, Geneva, sans-serif;
width: 14%;
font-size: 11px;
cursor: pointer;
}
#tcalGrid td.tcalOtherMonth { color: silver; }
#tcalGrid td.tcalWeekend { background-color: #ACD6F5; }
#tcalGrid td.tcalToday { border: 1px solid red; }
#tcalGrid td.tcalSelected { background-color: #FFB3BE; }
// Tigra Calendar v5.2 (11/20/2011)
// http://www.softcomplex.com/products/tigra_calendar/
// License: Public Domain... You're welcome.
// default settins - this structure can be moved in separate file in multilangual applications
var A_TCALCONF = {
'cssprefix' : 'tcal',
'months' : ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'],
'weekdays' : ['Su', 'Mo', 'Tu', 'We', 'Th', 'Fr', 'Sa'],
'longwdays' : ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday'],
'yearscroll' : true, // show year scroller
'weekstart' : 0, // first day of week: 0-Su or 1-Mo
'prevyear' : 'Previous Year',
'nextyear' : 'Next Year',
'prevmonth' : 'Previous Month',
'nextmonth' : 'Next Month',
'format' : 'm/d/Y' // 'd-m-Y', Y-m-d', 'l, F jS Y'
};
var A_TCALTOKENS = [
// A full numeric representation of a year, 4 digits
{'t': 'Y', 'r': '19\\d{2}|20\\d{2}', 'p': function (d_date, n_value) { d_date.setFullYear(Number(n_value)); return d_date; }, 'g': function (d_date) { var n_year = d_date.getFullYear(); return n_year; }},
// Numeric representation of a month, with leading zeros
{'t': 'm', 'r': '0?[1-9]|1[0-2]', 'p': function (d_date, n_value) { d_date.setMonth(Number(n_value) - 1); return d_date; }, 'g': function (d_date) { var n_month = d_date.getMonth() + 1; return (n_month < 10 ? '0' : '') + n_month }},
// A full textual representation of a month, such as January or March
{'t': 'F', 'r': A_TCALCONF.months.join('|'), 'p': function (d_date, s_value) { for (var m = 0; m < 12; m++) if (A_TCALCONF.months[m] == s_value) { d_date.setMonth(m); return d_date; }}, 'g': function (d_date) { return A_TCALCONF.months[d_date.getMonth()]; }},
// Day of the month, 2 digits with leading zeros
{'t': 'd', 'r': '0?[1-9]|[12][0-9]|3[01]', 'p': function (d_date, n_value) { d_date.setDate(Number(n_value)); if (d_date.getDate() != n_value) d_date.setDate(0); return d_date }, 'g': function (d_date) { var n_date = d_date.getDate(); return (n_date < 10 ? '0' : '') + n_date; }},
// Day of the month without leading zeros
{'t': 'j', 'r': '0?[1-9]|[12][0-9]|3[01]', 'p': function (d_date, n_value) { d_date.setDate(Number(n_value)); if (d_date.getDate() != n_value) d_date.setDate(0); return d_date }, 'g': function (d_date) { var n_date = d_date.getDate(); return n_date; }},
// A full textual representation of the day of the week
{'t': 'l', 'r': A_TCALCONF.longwdays.join('|'), 'p': function (d_date, s_value) { return d_date }, 'g': function (d_date) { return A_TCALCONF.longwdays[d_date.getDay()]; }},
// English ordinal suffix for the day of the month, 2 characters
{'t': 'S', 'r': 'st|nd|rd|th', 'p': function (d_date, s_value) { return d_date }, 'g': function (d_date) { n_date = d_date.getDate(); if (n_date % 10 == 1 && n_date != 11) return 'st'; if (n_date % 10 == 2 && n_date != 12) return 'nd'; if (n_date % 10 == 3 && n_date != 13) return 'rd'; return 'th'; }}
];
function f_tcalGetHTML (d_date) {
var e_input = f_tcalGetInputs(true);
if (!e_input) return;
var s_pfx = A_TCALCONF.cssprefix,
s_format = A_TCALCONF.format;
// today from config or client date
var d_today = f_tcalParseDate(A_TCALCONF.today, A_TCALCONF.format);
if (!d_today)
d_today = f_tcalResetTime(new Date());
// selected date from input or config or today
var d_selected = f_tcalParseDate(e_input.value, s_format);
if (!d_selected)
d_selected = f_tcalParseDate(A_TCALCONF.selected, A_TCALCONF.format);
if (!d_selected)
d_selected = new Date(d_today);
// show calendar for passed or selected date
d_date = d_date ? f_tcalResetTime(d_date) : new Date(d_selected);
var d_firstDay = new Date(d_date);
d_firstDay.setDate(1);
d_firstDay.setDate(1 - (7 + d_firstDay.getDay() - A_TCALCONF.weekstart) % 7);
var a_class, s_html = '<table id="' + s_pfx + 'Controls"><tbody><tr>'
+ (A_TCALCONF.yearscroll ? '<td id="' + s_pfx + 'PrevYear" ' + f_tcalRelDate(d_date, -1, 'y') + ' title="' + A_TCALCONF.prevyear + '"></td>' : '')
+ '<td id="' + s_pfx + 'PrevMonth"' + f_tcalRelDate(d_date, -1) + ' title="' + A_TCALCONF.prevmonth + '"></td><th>'
+ A_TCALCONF.months[d_date.getMonth()] + ' ' + d_date.getFullYear()
+ '</th><td id="' + s_pfx + 'NextMonth"' + f_tcalRelDate(d_date, 1) + ' title="' + A_TCALCONF.nextmonth + '"></td>'
+ (A_TCALCONF.yearscroll ? '<td id="' + s_pfx + 'NextYear"' + f_tcalRelDate(d_date, 1, 'y') + ' title="' + A_TCALCONF.nextyear + '"></td>' : '')
+ '</tr></tbody></table><table id="' + s_pfx + 'Grid"><tbody><tr>';
// print weekdays titles
for (var i = 0; i < 7; i++)
s_html += '<th>' + A_TCALCONF.weekdays[(A_TCALCONF.weekstart + i) % 7] + '</th>';
s_html += '</tr>' ;
// print calendar table
var n_date, n_month, d_current = new Date(d_firstDay);
while (d_current.getMonth() == d_date.getMonth() ||
d_current.getMonth() == d_firstDay.getMonth()) {
s_html +='<tr>';
for (var n_wday = 0; n_wday < 7; n_wday++) {
a_class = [];
n_date = d_current.getDate();
n_month = d_current.getMonth();
if (d_current.getMonth() != d_date.getMonth())
a_class[a_class.length] = s_pfx + 'OtherMonth';
if (d_current.getDay() == 0 || d_current.getDay() == 6)
a_class[a_class.length] = s_pfx + 'Weekend';
if (d_current.valueOf() == d_today.valueOf())
a_class[a_class.length] = s_pfx + 'Today';
if (d_current.valueOf() == d_selected.valueOf())
a_class[a_class.length] = s_pfx + 'Selected';
s_html += '<td' + f_tcalRelDate(d_current) + (a_class.length ? ' class="' + a_class.join(' ') + '">' : '>') + n_date + '</td>';
d_current.setDate(++n_date);
}
s_html +='</tr>';
}
s_html +='</tbody></table>';
return s_html;
}
function f_tcalRelDate (d_date, d_diff, s_units) {
var s_units = (s_units == 'y' ? 'FullYear' : 'Month');
var d_result = new Date(d_date);
if (d_diff) {
d_result['set' + s_units](d_date['get' + s_units]() + d_diff);
if (d_result.getDate() != d_date.getDate())
d_result.setDate(0);
}
return ' onclick="f_tcalUpdate(' + d_result.valueOf() + (d_diff ? ',1' : '') + ')"';
}
function f_tcalResetTime (d_date) {
d_date.setMilliseconds(0);
d_date.setSeconds(0);
d_date.setMinutes(0);
d_date.setHours(12);
return d_date;
}
// closes calendar and returns all inputs to default state
function f_tcalCancel () {
var s_pfx = A_TCALCONF.cssprefix;
var e_cal = document.getElementById(s_pfx);
if (e_cal)
e_cal.style.visibility = '';
var a_inputs = f_tcalGetInputs();
for (var n = 0; n < a_inputs.length; n++)
f_tcalRemoveClass(a_inputs[n], s_pfx + 'Active');
}
function f_tcalUpdate (n_date, b_keepOpen) {
var e_input = f_tcalGetInputs(true);
if (!e_input) return;
d_date = new Date(n_date);
var s_pfx = A_TCALCONF.cssprefix;
if (b_keepOpen) {
var e_cal = document.getElementById(s_pfx);
if (!e_cal || e_cal.style.visibility != 'visible') return;
e_cal.innerHTML = f_tcalGetHTML(d_date, e_input);
}
else {
e_input.value = f_tcalGenerateDate(d_date, A_TCALCONF.format);
f_tcalCancel();
}
}
function f_tcalOnClick () {
// see if already opened
var s_pfx = A_TCALCONF.cssprefix;
var s_activeClass = s_pfx + 'Active';
var b_close = f_tcalHasClass(this, s_activeClass);
// close all clalendars
f_tcalCancel();
if (b_close) return;
// get position of input
f_tcalAddClass(this, s_activeClass);
var n_left = f_getPosition (this, 'Left'),
n_top = f_getPosition (this, 'Top') + this.offsetHeight;
var e_cal = document.getElementById(s_pfx);
if (!e_cal) {
e_cal = document.createElement('div');
e_cal.onselectstart = function () { return false };
e_cal.id = s_pfx;
document.getElementsByTagName("body").item(0).appendChild(e_cal);
}
e_cal.innerHTML = f_tcalGetHTML(null);
e_cal.style.top = n_top + 'px';
e_cal.style.left = (n_left + this.offsetWidth - e_cal.offsetWidth) + 'px';
e_cal.style.visibility = 'visible';
}
function f_tcalParseDate (s_date, s_format) {
if (!s_date) return;
var s_char, s_regexp = '^', a_tokens = {}, a_options, n_token = 0;
for (var n = 0; n < s_format.length; n++) {
s_char = s_format.charAt(n);
if (A_TCALTOKENS_IDX[s_char]) {
a_tokens[s_char] = ++n_token;
s_regexp += '(' + A_TCALTOKENS_IDX[s_char]['r'] + ')';
}
else if (s_char == ' ')
s_regexp += '\\s';
else
s_regexp += (s_char.match(/[\w\d]/) ? '' : '\\') + s_char;
}
var r_date = new RegExp(s_regexp + '$');
if (!s_date.match(r_date)) return;
var s_val, d_date = f_tcalResetTime(new Date());
d_date.setDate(1);
for (n = 0; n < A_TCALTOKENS.length; n++) {
s_char = A_TCALTOKENS[n]['t'];
if (!a_tokens[s_char])
continue;
s_val = RegExp['$' + a_tokens[s_char]];
d_date = A_TCALTOKENS[n]['p'](d_date, s_val);
}
return d_date;
}
function f_tcalGenerateDate (d_date, s_format) {
var s_char, s_date = '';
for (var n = 0; n < s_format.length; n++) {
s_char = s_format.charAt(n);
s_date += A_TCALTOKENS_IDX[s_char] ? A_TCALTOKENS_IDX[s_char]['g'](d_date) : s_char;
}
return s_date;
}
function f_tcalGetInputs (b_active) {
var a_inputs = document.getElementsByTagName('input'),
e_input, s_rel, a_result = [];
for (n = 0; n < a_inputs.length; n++) {
e_input = a_inputs[n];
if (!e_input.type || e_input.type != 'text')
continue;
if (!f_tcalHasClass(e_input, 'tcal'))
continue;
if (b_active && f_tcalHasClass(e_input, A_TCALCONF.cssprefix + 'Active'))
return e_input;
a_result[a_result.length] = e_input;
}
return b_active ? null : a_result;
}
function f_tcalHasClass (e_elem, s_class) {
var s_classes = e_elem.className;
if (!s_classes)
return false;
var a_classes = s_classes.split(' ');
for (var n = 0; n < a_classes.length; n++)
if (a_classes[n] == s_class)
return true;
return false;
}
function f_tcalAddClass (e_elem, s_class) {
if (f_tcalHasClass (e_elem, s_class))
return;
var s_classes = e_elem.className;
e_elem.className = (s_classes ? s_classes + ' ' : '') + s_class;
}
function f_tcalRemoveClass (e_elem, s_class) {
var s_classes = e_elem.className;
if (!s_classes || s_classes.indexOf(s_class) == -1)
return false;
var a_classes = s_classes.split(' '),
a_newClasses = [];
for (var n = 0; n < a_classes.length; n++) {
if (a_classes[n] == s_class)
continue;
a_newClasses[a_newClasses.length] = a_classes[n];
}
e_elem.className = a_newClasses.join(' ');
return true;
}
function f_getPosition (e_elemRef, s_coord) {
var n_pos = 0, n_offset,
e_elem = e_elemRef;
while (e_elem) {
n_offset = e_elem["offset" + s_coord];
n_pos += n_offset;
e_elem = e_elem.offsetParent;
}
e_elem = e_elemRef;
while (e_elem != document.body) {
n_offset = e_elem["scroll" + s_coord];
if (n_offset && e_elem.style.overflow == 'scroll')
n_pos -= n_offset;
e_elem = e_elem.parentNode;
}
return n_pos;
}
function f_tcalInit () {
if (!document.getElementsByTagName)
return;
var e_input, a_inputs = f_tcalGetInputs();
for (var n = 0; n < a_inputs.length; n++) {
e_input = a_inputs[n];
e_input.onclick = f_tcalOnClick;
f_tcalAddClass(e_input, A_TCALCONF.cssprefix + 'Input');
}
window.A_TCALTOKENS_IDX = {};
for (n = 0; n < A_TCALTOKENS.length; n++)
A_TCALTOKENS_IDX[A_TCALTOKENS[n]['t']] = A_TCALTOKENS[n];
}
function f_tcalAddOnload (f_func) {
if (document.addEventListener) {
window.addEventListener('load', f_func, false);
}
else if (window.attachEvent) {
window.attachEvent('onload', f_func);
}
else {
var f_onLoad = window.onload;
if (typeof window.onload != 'function') {
window.onload = f_func;
}
else {
window.onload = function() {
f_onLoad();
f_func();
}
}
}
}
f_tcalAddOnload (f_tcalInit);
var A_TPL = {
'b_vertical' : false,
'b_watch': true,
'n_controlWidth': 120,
'n_controlHeight': 16,
'n_sliderWidth': 16,
'n_sliderHeight': 15,
'n_pathLeft' : 1,
'n_pathTop' : 1,
'n_pathLength' : 103,
's_imgControl': 'js/img/blueh_bg.gif',
's_imgSlider': 'js/img/blueh_sl.gif',
'n_zIndex': 1
}
var A_INIT1 = {
's_form' : 0,
's_name': 'sliderValue1',
'n_minValue' : 0,
'n_maxValue' : 50,
'n_value' : 1,
'n_step' : 1
}
new slider(A_INIT1, A_TPL);
\ No newline at end of file
var A_TPL = {
'b_vertical' : false,
'b_watch': true,
'n_controlWidth': 120,
'n_controlHeight': 16,
'n_sliderWidth': 16,
'n_sliderHeight': 15,
'n_pathLeft' : 1,
'n_pathTop' : 1,
'n_pathLength' : 103,
's_imgControl': 'js/img/blueh_bg.gif',
's_imgSlider': 'js/img/blueh_sl.gif',
'n_zIndex': 1
}
var A_INIT1 = {
's_form' : 0,
's_name': 'sliderValue2',
'n_minValue' : 0,
'n_maxValue' : 50,
'n_value' : 1,
'n_step' : 1
}
new slider(A_INIT1, A_TPL);
\ No newline at end of file
<?php
require_once( 'db_config.php');
require_once( 'class/db.class.php');
require_once( 'var.php');
$grundconfig = $datenbank->get_row("SELECT * FROM ". PREFIX . CONFIG ." ",true);
require_once( 'session.lib.php');
require_once( 'lang/lang.'. $_SESSION['lang'] .'.php');
require_once ( 'functions.lib.php');
require_once ( 'run.inc.php');
require_once ( 'layout.lib.php');
require_once ( 'extras.lib.php');
require_once ( 'extra/mail.php');
ReloadDelete();
if (!isset($_GET['page']) || empty ($_GET['page'])) $_GET['page'] = '/intern/startseite';
if (!file_exists('page' . $_GET['page'] . '.php')) $_GET['page'] = '/error/keine_seite';
if ($_GET['page'] == '/intern/startseite') require_once ( 'texte/alt_startseitenpopup.txt');
if ($_GET['page'] == '/betteln') require_once ( 'texte/alt_bettelseitenpopup.txt');
LoadLanguageFile();
CheckLogin();
$CountDownTime = 0;
$start_reload = "SELECT * FROM ". PREFIX . RELOAD ." WHERE uid = '".$datenbank->escape($_SESSION['uid']) ."' and tan = 'startseitenaufruf' and bis >= '". time() ."'";
if ($datenbank->num_rows($start_reload) != 0) {
$start = $datenbank->get_row($start_reload,true);
$CountDownTime = $start->bis;
}
?>
\ No newline at end of file
<?php
require("datenbank.inc.php");
require_once("class/chat.class.php");
$id = intval( $_GET['lastTimeID'] );
$jsonData = chatClass::getRestChatLines($id);
//db_query("INSERT INTO json (text) VALUES ('". $jsonData ."')");
print $jsonData;
?>
\ No newline at end of file
<?php
require_once($_SERVER['DOCUMENT_ROOT']."/lib/db_config.php");
require_once($_SERVER['DOCUMENT_ROOT'].'/lib/functions.lib.php');
$datenbank = Classloader('db');
$grundconfig = $datenbank->get_row("SELECT * FROM ". PREFIX . CONFIG ." ",true);
require_once($_SERVER['DOCUMENT_ROOT'].'/lib/session.lib.php');
require_once($_SERVER['DOCUMENT_ROOT'].'/lib/class/chat.class.php');
$id = intval( $_GET['lastTimeID'] );
$Class = Classloader('chat');
print $Class->getRestChatLines($id);
?>
<?php
class ANMELDEN{
protected $uid;
protected $ak;
protected $werber;
private $db;
private $error = 0;
private $meldung;
private $post = array();
private $config;
private $session;
public function __construct(){
global $datenbank,$grundconfig,$_SESSION;
$this->db = $datenbank;
$this->config = $grundconfig;
$this->session = $_SESSION;
}
private function make_array($post){
foreach($post AS $key => $value){
if($key != '' && $value != ''){
$this->post[$key] = $this->db->escape($value);
}
}
}
function anmelden_los(){
global $_POST;
$this->make_array($_POST);
$this->pruef();
if($this->error == 0){
$this->konto();
$this->email();
$this->user();
$this->werber();
$this->nickpage();
if($this->grundconfig->reg_free == 1){
$this->aktivierung();
$this->ak_senden();
}
if($this->error == 0){
return true;
}else{
return false;
}
}
meldung($this->error,$this->meldung);
}
function ak_senden(){
$betreff = "Ihre Anmeldung auf ". $this->config->seitenname;
$email_message = 'Hallo ' . $this->post['nickname'] . ',
Du hast Dich soeben erfolgreich bei ' . $this->config->seitenname . ' angemeldet.
Bitte aktiviere jetzt Deinen Account, klicke dazu bitte auf den
Aktivierungslink: ' . $this->config->domain . '/?page=/intern/aktivieren&ak=' . $this->ak . '
----------------------------------------------------------
Kontonummer: ' . $this->uid . '
Passwort: Ihnen bekannt*
----------------------------------------------------------
Nach der Aktivierung kannst Du dich sofort einloggen und bei
uns teilnehmen.
Mit freundlichen Grüßen
Das ' . $this->config->seitenname . ' Team
';
$Class = Classloader('mail');
$Class->senden($_POST['emailadresse'],$betreff,$email_message);
}
function aktivierung(){
$this->ak = md5($this->uid . time() );
$insert = array(
"uid" => $this->uid,
"ak" => $this->ak
);
$this->db->insert(PREFIX . AKT , $insert);
}
function nickpage(){
$insert = array(
"uid" => $this->uid
);
$this->db->insert(PREFIX . NICKP, $insert);
}
function werber(){
$insert = array(
"uid" => $this->uid,
"werber" => $this->session['werber'],
"umsatz" => 0,
"zuordnungszeit" => time()
);
$this->db->insert(PREFIX . WERBER , $insert);
}
function user(){
$insert = array(
"uid" => $this->uid,
"nickname" => $this->post['nickname'],
"vorname" => $this->post['vorname'],
"nachname" => $this->post['nachname'],
"angemeldet_seit" => time(),
"bdate" => $this->bdate($this->post['bdate'])
);
$this->db->insert(PREFIX . USER , $insert);
}
function konto(){
$pw = pw_erstellen($this->post['password1']);
$this->db->insert(PREFIX . KONTO, array("passwort" => $pw, "status" => 0));
$this->uid = $this->db->lastid();
}
function email(){
$insert = array(
"uid" => $this->uid,
"emailadresse" => $this->post['emailadresse'],
"freigabe_fuer" => $this->post['newsletter']
);
$this->db->insert(PREFIX . EMAIL , $insert);
}
function bdate($date){
$explode = explode(".",$date,100);
$bdate = strtotime($date.'T 00:00:00');
return $bdate;
}
function pruef(){
if(empty($this->post['nachname'])){ $this->error = 1; $this->meldung .= ANMELDEN_NAME_FALSE;}
if(empty($this->post['bdate'])){ $this->error = 1; $this->meldung .= ANMELDEN_GEB_FALSE;}
if(empty($this->post['vorname'])){ $this->error = 1; $this->meldung .= ANMELDEN_VORNAME_FALSE;}
$this->mailadresse($this->post['emailadresse']);
$this->nickname($this->post['nickname']);
$this->pass($this->post['password1'],$_POST['password2']);
if($this->post['agb'] != "ja"){ $this->error = 1; $this->meldung .= ANEMLDEN_AGB_FALSE; }
}
function mail_denied($mail){
$denied = explode(';', $this->config->denied_domains);
if($this->config->ip_erlaubt != ''){
$ip_denied = explode(',', $this->config->ip_erlaubt);
if(!in_array(geoIP($ip),$ip_denied)){
$this->error = 1;
$this->meldung .= ANMELDEN_IP_FALSE;}
}
foreach ($denied AS $nr => $emaildomain){
if (($nr < (count ($denied) - 2) || strlen ($emaildomain) >= 5) && strpos ($mail, $emaildomain) !== false){
$this->error = 1;
$this->meldung .= ANMELDEN_MAIL_ANBIETER_FALSE;
}
}
}
function mailadresse($mail){
if(!filter_var( $mail, FILTER_VALIDATE_EMAIL )) { $this->error = 1; $this->meldung .= ANMELDEN_EMAIL_FALSE;}
$select = $this->db->num_rows("SELECT * FROM ". PREFIX . EMAIL ." WHERE emailadresse = '$mail' ");
if($select == true){
$this->error = 1;
$this->meldung .= ANMELDEN_MAIL_EXIST;
}
$this->mail_denied($mail);
}
function pass($pass1,$pass2){
if(empty($pass1)){ $this->error = 1; $this->meldung .= ANMELDEN_PASS1_FALSE;}
if(empty($pass2)){ $this->error = 1; $this->meldung .= ANMELDEN_PASS2_FALSE;}
if($pass1 != $pass2){ $this->error = 1; $this->meldung .= ANMELDEN_PASS_KONTROLLE_FALSE;}
if(strlen($pass1) < 8){ $this->error = 1; $this->meldung .= ANMELDEN_PASS_SHORT; }
}
function nickname($nick){
if(empty($nick)){$this->error = 1; $this->meldung = ANMELDEN_NICKNAME_FALSE;}
$select = $this->db->exists(PREFIX . USER , 'nickname', array("nickname" => $nick));
if($select == true){
$this->error = 1;
$this->meldung .= ANMLEDEN_NICKNAME_EXIST;
}
}
}
?>