log in
id; $targetdate = $params->get('targetdate'); $exacttime = $params->get('exacttime'); $mytime = $params->get('mytime'); $topmsg = ''.$params->get('topmsg').''; $bottommsg = ''.$params->get('bottommsg').''; $finishmsg = $params->get('finishmsg'); $thewidth = $params->get('thewidth'); $corner = $params->get('corner'); $fontsize = $params->get('fontsize'); $fontcolor = $params->get('fontcolor'); $bordercolor = $params->get('bordercolor'); $bordersize = $params->get('bordersize'); $boxshadow = $params->get('boxshadow'); $boxshadowcolor = $params->get('boxshadowcolor'); $bgcolor = $params->get('bgcolor'); $bgimg = $params->get('bgimg'); $bgrandom = $params->get('bgrandom'); //Insert another module $modinsert = JModuleHelper::getModule( $params->get('modinsert') ); //Enable or disable random background images if($bgrandom == 1) { //Read background images folder to output random images if ($handle = opendir($abspath.'bg')) { $dir_array = array(); while (false !== ($file = readdir($handle))) { if($file != "." && $file != ".." && $file != "index.html"){ $dir_array[] = $file; } } $bgimgs = $dir_array[rand(0,count($dir_array)-1)]; closedir($handle); } }else { //If random background is disabled, show the single selected background image $bgimgs = $bgimg; } //Add clientside scripts $document = JFactory::getDocument(); //Add The style sheet and append style variables $document->addStyleSheet($mpath.'countdowncss.php?xctw='.$thewidth.'&xbgc='.$bgcolor.'&xbr='.$corner.'&xfs='.$fontsize.'&xfc='.$fontcolor.'&xbdc='.$bordercolor.'&xbds='.$bordersize.'&xbsh='.$boxshadow.'&xbshc='.$boxshadowcolor.'&xbgi='.$bgimgs.'&xid='.$module->id); //Insert the javascript function $document->addScript($mpath.'countdown.js'); if(!empty($finishmsg)) {$finishmsg;} else {$finishmsg = JText::_('MOD_CMSE_COUNTDOWN_FINISHMSG');} $document->addScriptDeclaration(' var cd'.$MID.' = new countdown("cd'.$MID.'"); cd'.$MID.'.Div = "counter'.$MID.'"; cd'.$MID.'.TargetDate = "'.$targetdate .' '. $exacttime.'"; cd'.$MID.'.DisplayFormat = "'.$topmsg.'
%%D%%
Dni
%%H%%
Godzin
%%M%%
Minut
%%S%%
Sekund
'.$bottommsg.'"; cd'.$MID.'.FinishMessage = "'.$finishmsg.'"; '); //Load the template file require( JModuleHelper::getLayoutPath( 'mod_cmse_countdown', $params->get('layout', 'default') ) );