| Server IP : 180.180.241.3 / Your IP : 216.73.216.35 Web Server : Microsoft-IIS/7.5 System : Windows NT NETWORK-NHRC 6.1 build 7601 (Windows Server 2008 R2 Standard Edition Service Pack 1) i586 User : IUSR ( 0) PHP Version : 5.3.28 Disable Function : NONE MySQL : ON | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/AppServ/www/news/components/com_spidercalendar/views/spidercalendarbig/tmpl/ |
Upload File : |
<?php
/**
* @package Spider Calendar
* @author Web-Dorado
* @copyright (C) 2011 Web-Dorado. All rights reserved.
* @license GNU/GPLv3 http://www.gnu.org/licenses/gpl-3.0.html
**/
defined('_JEXEC') or die('Restricted access');
$theme_id =JRequest::getVar('theme_id');
$theme =& JTable::getInstance('spidercalendar_theme', 'Table');
// load the row from the db table
$theme->load( $theme_id);
function week_number($x)
{
if($x==1)
return JText::_('FIRST');
if($x==8)
return JText::_('SECOND');
if($x==15)
return JText::_('THIRD');
if($x==22)
return JText::_('FOURTH');
if($x=='last')
return JText::_('LAST');
}
function week_convert($x)
{
if($x=='Mon')
return JText::_('MONDAY');
if($x=='Tue')
return JText::_('TUESDAY');
if($x=='Wed')
return JText::_('WEDNESDAY');
if($x=='Thu')
return JText::_('THURSDAY');
if($x=='Fri')
return JText::_('FRIDAY');
if($x=='Sat')
return JText::_('SATURDAY');
if($x=='Sun')
return JText::_('SUNDAY');
}
function do_nothing()
{
return false;
}
$id=JRequest::getVar( "module_id");
$session =& JFactory::getSession();
$title_color='#'.$theme->title_color;
$title_size=$theme->title_font_size;
$title_font=$theme->title_font;
$title_style=$theme->title_style;
$date_color='#'.$theme->date_color;
$date_size=$theme->date_size;
$date_font=$theme->date_font;
$date_style=$theme->date_style;
$next_prev_event_bgcolor='#'.$theme->next_prev_event_bgcolor;
$next_prev_event_arrowcolor='#'.$theme->next_prev_event_arrowcolor;
$show_event_bgcolor='#'.$theme->show_event_bgcolor;
$popup_width = $theme->popup_width;
$popup_height = $theme->popup_height;
$date_format=$theme->date_format;
$show_repeat=$theme->show_repeat;
$date_format_array=explode('/',$date_format);
for($i=0;$i<count($date_format_array);$i++)
{
if($date_format_array[$i]=='w')
$date_format_array[$i]='l';
if($date_format_array[$i]=='m')
$date_format_array[$i]='F';
if($date_format_array[$i]=='y')
$date_format_array[$i]='Y';
}
$like_button=$session->get( 'like_button'.$id);
$row=$this->row;
$option=$this->option;
$activedate=explode('-',JRequest::getVar( "date",date("Y-m-d")));
$activedatetimestamp = mktime(0, 0, 0, $activedate[1], $activedate[2], $activedate[0]);
$activedatestr='';
for($i=0;$i<count($date_format_array);$i++)
{
$activedatestr.=JText::_(date("".$date_format_array[$i]."",$activedatetimestamp)).' ';
}
//$activedatestr=JText::_(date("".$date_format_array[0]."",$activedatetimestamp)).' '.JText::_(date("".$date_format_array[1]."",$activedatetimestamp)).' '.JText::_(date("".$date_format_array[2]."",$activedatetimestamp)).' '.JText::_(date("".$date_format_array[3]."",$activedatetimestamp));
$date = JRequest::getVar( "date",date("Y-m-d"));
$day = substr($date,8);
$calendar_id =JRequest::getVar('calendar_id',0);
//$ev_ids =$session->get('ev_ids');
$ev_ids_inline=JRequest::getVar('ev_ids');
$ev_id = explode(',',$ev_ids_inline);
$document = JFactory::getDocument();
$cmpnt_js_path = JURI::root(true).'/administrator/components/com_spidercalendar/elements';
if (!JFactory::getApplication()->get('jquery')) {
JFactory::getApplication()->set('jquery', true);
$document->addScript($cmpnt_js_path.'/jquery.js');
}
$eventID=JRequest::getVar('eventID');
?>
<script>
function next(day_events,ev_id,theme_id,calendar_id,date,day,ev_ids)
{
var p=0;
for (var key in day_events)
{ p=p+1;
if(day_events[key]==ev_id && day_events[parseInt(key) +1])
{
window.location='index.php?option=com_spidercalendar&view=spidercalendarbig&theme_id='+theme_id+'&calendar_id='+calendar_id+'&eventID='+day_events[parseInt(key) +1]+'&date='+date+'&day='+day+'&ev_ids='+ev_ids+'&tmpl=component'
}
}
}
function change()
{
jQuery('#dayevent').ready(function() {
jQuery('#dayevent').animate({
opacity: 1,
marginLeft: "0in",
}, 1000, function() {
});
});
}
window.onload=change();
function prev(array1,ev_id,theme_id,calendar_id,date,day,ev_ids)
{
var day_events = array1;
for (var key in day_events)
{
if(day_events[key]==ev_id && day_events[parseInt(key) -1] )
{
window.location='index.php?option=com_spidercalendar&view=spidercalendarbig&theme_id='+theme_id+'&calendar_id='+calendar_id+'&eventID='+day_events[parseInt(key) -1]+'&date='+date+'&ev_ids='+ev_ids+'&day='+day+'&tmpl=component'
}
}
}
document.onkeydown = function(evt) {
evt = evt || window.event;
if (evt.keyCode == 27) {
window.parent.document.getElementById('sbox-window').close();
}
};
</script>
<?php
?>
<style>
#dayevent
{
opacity:0;
}
#previous , #next
{
width:5%;
height:<?php echo $popup_height - 6 ?>px;
cursor:pointer;
}
.arrow
{
font-size:50px;
color:<?php echo $next_prev_event_arrowcolor ?>;
text-decoration:none;
}
</style>
<table style="height:<?php echo $popup_height ?>px;width:100%;background-color:<?php echo $show_event_bgcolor ?>; border-spacing:0" align="center">
<tr>
<td id="previous" onclick="prev([<?php echo $ev_ids_inline ?>],<?php echo $eventID ?>,<?php echo $theme_id ?>,<?php echo $calendar_id ?>,'<?php echo $date; ?>',<?php echo $day ?>,'<?php echo $ev_ids_inline ?>')" style="<?php if(count($ev_id)==1 or $eventID==$ev_id[0] ) echo 'display:none' ?>;text-align:center" onmouseover="document.getElementById('previous').style.backgroundColor='<?php echo $next_prev_event_bgcolor ?>'" onmouseout="document.getElementById('previous').style.backgroundColor=''" >
<span class="arrow" ><</span>
</td>
<td style="vertical-align:top; width:90%;text-align:left;">
<?php
echo '<div id="dayevent" style="padding:0px 0px 0px 7px ;line-height:30px; padding-top:0px;">';
if($date_style=="bold" or $date_style=="bold/italic" )
$date_font_weight="font-weight:bold";
else
$date_font_weight="font-weight:normal";
if($date_style=="italic" or $date_style=="bold/italic" )
$date_font_style="font-style:italic";
else
$date_font_style="";
echo '<div style="color:'.$date_color.';font-size:'.$date_size.'px; font-family:'.$date_font.'; '.$date_font_weight.'; '.$date_font_style.' ">'.$activedatestr.'</div>';
if($title_style=="bold" or $title_style=="bold/italic" )
$font_weight="font-weight:bold";
else
$font_weight="font-weight:normal";
if($title_style=="italic" or $title_style=="bold/italic" )
$font_style="font-style:italic";
else
$font_style="";
$weekdays=explode(',',$row->week);
$date_format1='d/m/y';
if($row->repeat=='1')
$repeat='';
else
$repeat=$row->repeat;
if($row->text_for_date!='')
{
if($row->date_end and $row->date_end!='0000-00-00')
echo '<div style="color:'.$date_color.';font-size:'.$date_size.'px; font-family:'.$date_font.'; '.$date_font_weight.'; '.$date_font_style.' ">'.JText::_('DATE').':'.str_replace("d",substr($row->date,8,2),str_replace("m",substr($row->date,5,2),str_replace("y",substr($row->date,0,4),$date_format1))).' - '.str_replace("d",substr($row->date_end,8,2),str_replace("m",substr($row->date_end,5,2),str_replace("y",substr($row->date_end,0,4),$date_format1))).' '.$row->time.'</div>';
else
echo '<div style="color:'.$date_color.';font-size:'.$date_size.'px; font-family:'.$date_font.'; '.$font_weight.'; '.$font_style.' ">'.$row->time.'</div>';
if($show_repeat==1)
{
if($row->repeat_method=='daily')
echo '<div style="color:'.$date_color.';font-size:'.$date_size.'px; font-family:'.$date_font.'; '.$date_font_weight.'; '.$date_font_style.' ">'.JText::_('REPEAT_EVERY').' ' .$repeat.' '.JText::_('DAY').'</div>';
if($row->repeat_method=='weekly')
{
echo '<div style="color:'.$date_color.';font-size:'.$date_size.'px; font-family:'.$date_font.'; '.$date_font_weight.'; '.$date_font_style.' ">'.JText::_('REPEAT_EVERY').' ' .$repeat.' '.JText::_('WEEK').' : ';
for ($i=0;$i<count($weekdays);$i++)
{
if($weekdays[$i]!=''){
if($i!=count($weekdays)-2)
echo week_convert($weekdays[$i]).',';
else
echo week_convert($weekdays[$i]);
}
}
echo '</div>';
}
if($row->repeat_method=='monthly' and $row->month_type==1)
echo '<div style="color:'.$date_color.';font-size:'.$date_size.'px; font-family:'.$date_font.'; '.$date_font_weight.'; '.$date_font_style.' ">'.JText::_('REPEAT_EVERY').' ' .$repeat.' '.JText::_('MONTH').' '.$row->month.'</div>';
if($row->repeat_method=='monthly' and $row->month_type==2)
echo '<div style="color:'.$date_color.';font-size:'.$date_size.'px; font-family:'.$date_font.'; '.$date_font_weight.'; '.$date_font_style.' ">'.JText::_('REPEAT_EVERY').' '.$repeat.' '.JText::_('MONTH').' '.week_number($row->monthly_list).' '.week_convert($row->month_week).'</div>';
if($row->repeat_method=='yearly' and $row->month_type==1)
echo '<div style="color:'.$date_color.';font-size:'.$date_size.'px; font-family:'.$date_font.'; '.$date_font_weight.'; '.$date_font_style.' ">'.JText::_('REPEAT_EVERY').' ' .$repeat.' '.JText::_('YEAR').' '.date('F',mktime(0,0,0,$row->year_month + 1,0,0)).' '.JText::_('ON_THE').' '.$row->month.'</div>';
if($row->repeat_method=='yearly' and $row->month_type==2)
echo '<div style="color:'.$date_color.';font-size:'.$date_size.'px; font-family:'.$date_font.'; '.$date_font_weight.'; '.$date_font_style.' ">'.JText::_('REPEAT_EVERY').' ' .$repeat.' '.JText::_('YEAR').' '.date('F',mktime(0,0,0,$row->year_month + 1,0,0)).' '.JText::_('ON_THE').' '.week_number($row->monthly_list).' '.week_convert($row->month_week).'</div>';
if($row->repeat_method=='no_repeat')
echo '<div style="color:'.$date_color.';font-size:'.$date_size.'px; font-family:'.$date_font.'; '.$date_font_weight.'; '.$date_font_style.' ">'.JText::_('NO_REPEAT').'</div>';
}
echo '<div style="color:'.$title_color.';font-size:'.$title_size.'px; font-family:'.$title_font.'; '.$font_weight.'; '.$font_style.' ">'.$row->title.'</div>';
echo '<div style="line-height:20px">'.$row->text_for_date.'</div>';
$session->set('daytitle',$row->title);
if($session->get('daytitle')!=$row->title)
continue;
}
else
{
echo '<div style="color:'.$title_color.';font-size:'.$title_size.'px; font-family:'.$title_font.'; '.$font_weight.'; '.$font_style.' ">'.$row->title.'</div>';
echo '<h1 style="text-align:center">There Is No Text For This Event</h1>';
}
echo '</div>';
?>
<div style="width:98%;text-align:right; display:<?php if(count($ev_id)==1) echo 'none'; ?>"><a style="color:<?php echo $title_color?>;font-size:15px; font-family:<?php echo $title_font?>; <?php echo $font_weight?>; <?php echo $font_style?>" href="<?php echo JRoute::_('index.php?option=com_spidercalendar&view=spidercalendarbig_seemore&theme_id='.$theme_id.'&ev_ids='.$ev_ids_inline.'&calendar_id='.$calendar_id.'&date='.$date).'&tmpl=component' ?>"><?php echo JText::_("BACK_TO_EVENT_LIST"); ?></a></div>
</td>
<td id="next" onclick="next([<?php echo $ev_ids_inline ?>],<?php echo $eventID ?>,<?php echo $theme_id ?>,<?php echo $calendar_id ?>,'<?php echo $date ?>',<?php echo $day ?>,'<?php echo $ev_ids_inline ?>')" style="<?php if(count($ev_id)==1 or $eventID==end($ev_id)) echo 'display:none' ?>;text-align:center" onmouseover="document.getElementById('next').style.backgroundColor='<?php echo $next_prev_event_bgcolor ?>'" onmouseout="document.getElementById('next').style.backgroundColor=''" >
<span class="arrow" >></span>
</td>
</tr>
</table>
<?php
////////////////
$str = $_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI'];
if($like_button==1)
echo '<iframe src="http://www.facebook.com/plugins/like.php?href=http%3A%2F%2F'.urlencode($str).'"
scrolling="no" frameborder="0"
style="border:none; width:450px; height:80px"></iframe>';
else
echo '';
?>