"#C0C0C0","Background color" => "#808080","Body text color" => "#000000","Caption color" => "#FFFFFF","Width" => "200","Height" => "-1",);
$hint_for_invis=TRUE;
$noevents_msg='';
$location_label='Location';
$cal_size="small";
$def_view_param=1;
if($def_view_param==2) { $def_view=3; }
elseif ($def_view_param==3) { $def_view=6; }
elseif ($def_view_param==4) { $def_view=12; }
else { $def_view=1;}
$em_enabled=FALSE; //event manager
$em_show_participants= FALSE;
$rss_settings=array("Title" => "Type title here...","Description" => "Type description here...","Language" => "en-us","Copyright" => "","Managing editor" => "","Webmaster" => "","Category" => "","Category domain" => "","Cloud domain" => "","Cloud port" => "","Cloud path" => "","Cloud reg proc" => "","Cloud protocol" => "","TTL" => "","Rating" => "","Skip hours" => "","Skip days" => "","Text input title" => "","Text input description" => "","Text input name" => "","Text input link" => "","Image" => ""); // RSS settings
$max_items_in_rss=0;
$max_lines_in_rss_desc=0;
$hide_expired_in_rss=true;
$include_date_in_rss_desc=false;
$page_charset='iso-8859-1'; $utf_fl=(strpos(strtolower($page_charset),'utf')!==false? true: false);
$month_name=$f_month_names; $day_name=$f_day_names;
$db_fields='"Id","Short_description","Category","Details","Start_date","End_date","Location"'.$f_lf; //%%HIDDEN,%%DLINE,%%USER-Loc; %%TEMPLATE1%%-Decs
$db_fields_recur= '"Id","Short_description","Category","Details","Start_date","End_date","Location","recurType","repeatEvery","repeatPeriod","stopAfter"'.$f_lf;
$db_fields_reg='"Event_id","User","Timestamp","Notes"'.$f_lf;
$css_event=array('customstyle'=>'event','border-style'=>'BS_EVENT','border-color'=>'BC_EVENT','height'=>'EVENTS_HEIGHT');
$css_calendar=array('customstyle'=>'calendar','border-style'=>'BS_CAL','border-color'=>'BC_CAL');
$css_day1=array('customstyle'=>'day1 '.$cal_size,'color'=>'FC_DAY1','background-color'=>'BC_DAY1','font-size'=>'FS_'.strtoupper($cal_size));
$css_day2=array('customstyle'=>'day2 '.$cal_size,'color'=>'FC_DAY2','font-size'=>'FS_'.strtoupper($cal_size));
$css_day3=array('customstyle'=>'day3 '.$cal_size,'color'=>'FC_DAY3','background-color'=>'BC_DAY3','font-size'=>'FS_'.strtoupper($cal_size));
$css_currday=array('customstyle'=>'currday '.$cal_size,'color'=>'FC_CURRDAY');
$css_currdayempty=array('customstyle'=>'currdayempty '.$cal_size, 'color'=>'FC_CURRDAY','background-color'=>'BC_CURRDAY');
$css_calh1=array('customstyle'=>'calh1 '.$cal_size,'color'=>'FC_CALH1','background-color'=>'BC_CALH1','border-style'=>'BORST_CALH1', 'border-color'=>'BORCOL_CALH1','font-size'=>'FS_'.strtoupper($cal_size));
$css_calh2=array('customstyle'=>'calh2 '.$cal_size,'color'=>'FC_CALH2','background-color'=>'BC_CALH2','border-style'=>'BORST_CALH2', 'border-color'=>'BORCOL_CALH2','font-size'=>'FS_'.strtoupper($cal_size));
$css_desc=array('customstyle'=>'desc','color'=>'FC_DESC','background-color'=>'BC_DESC','font-size'=>'FS_DESC');
$css_date=array('customstyle'=>'date','color'=>'FC_DATE','font-size'=>'FS_DATE');
$css_details=array('customstyle'=>'details','color'=>'FC_DETAILS','background-color'=>'BC_DETAILS','font-size'=>'FS_DETAILS');
$css_calurl=array('customstyle'=>'calurl '.$cal_size.'url','color'=>'FC_CURRDAYURL');
$css_currdayurl=array('customstyle'=>'currdayurl','color'=>'FC_CURRDAY');
$cal_css='";
$days_in_month_array=array(1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31);
$years_array=array(); $j=0;
for ($i=2000; $i<=2015; $i++) { $years_array[$j]=$i; $j++; }
$ampm_array=array('AM','PM');
$hours12_array=array('NA','1','2','3','4','5','6','7','8','9','10','11','12');
$hours_array=array('NA','1','2','3','4','5','6','7','8','9','10','11','12','13','14','15','16','17','18','19','20','21','22','23','0');
$min_array=array('00','05','10','15','20','25','30','35','40','45','50','55');
$period_list=array('This Week','This Month','This Quarter','This Year','Next Week','Next 7 Days','Next 30 Days','Next Month','Next Quarter','Next Year','All Events');
$repeatPeriod_list=array('0'=>'Year','1'=>'Month','2'=>'Week');
$lang_l=array('add event'=>'add event','edit event'=>'edit event','short description'=>'short description','category'=>'category', 'details'=>'details','location'=>'location','start date'=>'start date','end date'=>'end date', 'start time'=>'start time','end time'=>'end time', 'once'=>'once','repeat every'=>'repeat every','week'=>'week','month'=>'month', 'year'=>'year','submit'=>'save','cancel'=>'cancel','delete'=>'delete', 'delete MSG'=>'Are you sure you want to delete this event?','go'=>'go','no events'=>'no events','logout'=>'logout','login'=>'login','back to ca'=>'CENTRAL ADMIN','login admin'=>'calendar administrator login','change username'=>'change username&password','username'=>'username','password'=>'password', 'repeat password'=>'repeat password','short description field is required'=>'"Short Description" field is required','start date should not exceed end date'=>'"Start date" should not exceed "End date"','start year should match end year'=>'"Start year" should match "End year"','start year&month should match end year&month'=>'"Start year&month" should match "End year&month"','start date should match end date'=>'"Start date" should match "End date"','fill in both fields'=>'please, fill in both fields','incorrect username/password'=>'incorrect username/password','can contain only'=>'username can contain only A-Z, a-z, _ and 0-9','password and repeated password'=>'password and repeated password don\'t match','your password should be'=>'your password should be at least five symbols','it is recommended'=>'it is recommended to change your username&password','hidden info'=>'hidden info','save as template'=>'save as template','settings saved'=>'settings saved','language'=>'language','hide past'=>'hide past events','show past'=>'show past events',
'deadline err msg'=>'"Deadline" is after "Start Date", please check dates and try again!','status'=>'status','expired'=>'expired','open'=>'open', 'closed'=>'closed for registration','register'=>'register','unregister'=>'unregister', 'events list'=>'events list','em'=>'event manager','my account'=>'my account','settings'=>'settings','change password'=>'change password','edit profile'=>'edit profile','edit'=>'edit', 'deadline'=>'deadline','mailing'=>'mailing','author'=>'author','total attendee'=>'total participants','my registration'=>'my registration', 'notes'=>'notes','type notes'=>'Type your notes here','click here'=>'click here to see all participants','unregister MSG'=>'Are you sure you want to unregister user','cancel MSG'=>'Are you sure you want to cancel your registration for','mail type'=>'mail type','mail subject'=>'mail subject', 'message'=>'message','users'=>'users','send to'=>'send to','subscribed for'=>'Users subscribed for','registered for'=>'Users REGISTERED for this event','all users'=>'all users','admin only'=>'administrator only','users list'=>'users list','selected'=>'selected','file attachment'=>'file attachment','send'=>'send','notification'=>'notification','success registered MSG'=>'You have successfully registered.','success edit MSG'=>'Your registration info was edited successfully.','success cancel MSG'=>'Your registration was cancelled successfully.','dear'=>'dear','cancel my registration'=>'cancel my registration','registration date'=>'registration date','logged as admin MSG'=>'You are logged as Administrator. Log as different user for registration, edit or cancelation.','already registered'=>'You have ALREADY REGISTERED for this event.','details follow'=>'Your registration details follow','register event MSG'=>'If you want to register to the following event, please use the SUBMIT button at the bottom to confirm.','edit registration MSG'=>'If you want to edit or cancel your registration, press=If you want to edit or cancel your registration, press','cant register MSG1'=>"You can't register for this event.",'cant register MSG2'=>"You can't register for event with status CLOSED for registration.",'cant edit MSG'=>'Registration edit is not allowed for EXPIRED events.','cant cancel MSG'=>'Registration cancelation is not allowed for EXPIRED events.','cant edit/cancel MSG'=>'Registration edit/cancelation is not allowed for EXPIRED events.','to edit MSG'=>'If you want to change your notes, edit content of Notes box and then press EDIT button to apply.','to cancel MSG'=>'If you want to cancel your registration, use CANCEL MY REGISTRATION button.','not recommended MSG'=>'It is not recommended to edit/cancel registration after its deadline.','to register MSG'=>'To register for this event, press','none users'=>'NONE users were selected for registration.','users regsitered MSG'=>'User(s) successfully registered.','users unregsitered MSG'=>'User unregistered successfully.','mail sent MSG'=>'Mail was sent successfully.','explanations'=>'Use %short_description%, %category%, %details, %location%,'.$f_br.'%date%, %time% and %deadline% for event info.'.$f_br.'Use %username%, %name%, %sirname%, %email% for user info.','public rss'=>'public RSS in protected Calendar','manage categories'=>'manage categories','name'=>'name','invisible'=>'invisible in events table','mark'=>'mark','mark msg'=>'mark days in calendar with','add category'=>'add new category','cat err msg'=>'You have to set both Name and Color for the category.','del category msg'=>'Are you sure you want to delete this category?');
$available_lang_sets=array('CS'=>'Czech','NL'=>'Dutch','EN'=>'English','FR'=>'French','DE'=>'German','HE'=>'Hebrew','NO'=>'Norwegian','PT'=>'Portuguese','RU'=>'Russian','SL'=>'Slovenian', 'ES'=>'Spanish');
$page_lang=f_read_tagged_data($cal_settings_fname, 'language');
if($page_lang!='' && $page_lang!='EZG') $lang_set=strtoupper($page_lang);
elseif(isset($_REQUEST['lang'])) $lang_set=strtoupper($_REQUEST['lang']);
else $lang_set='EN';
$lg_=($lang_set=='EN'?'':'lang='.$lang_set);
$lang_set_results=f_read_lang_set($lang_set_fname, $page_lang, 'calendar', $period_list);
if(isset($lang_set_results['day_name'])) $day_name=$lang_set_results['day_name'];
if(isset($lang_set_results['month_name'])) $month_name=$lang_set_results['month_name'];
if(isset($lang_set_results['period_list'])) $period_list=$lang_set_results['period_list'];
if(isset($lang_set_results['repeatPeriod_list'])) $repeatPeriod_list=$lang_set_results['repeatPeriod_list'];
if(isset($lang_set_results['lang_l'])) $lang_l=$lang_set_results['lang_l'];
$admin_emails='your@email.com';
$admin_emails=(get_magic_quotes_gpc()? stripslashes($admin_emails): $admin_emails);
$admin_emails_array=split("[;]", $admin_emails);
$admin_email=$admin_emails_array[0];
if($f_sendmail_from!='') { ini_set('sendmail_from', $f_sendmail_from); }
$mails_list=array('EA'=>'Event Announcement','ECA'=>'Event Change Announcement','ER'=>'Event Reminder','AG'=>'Agenda','RConf'=>'Registration Confirmation','RCancel'=>'Registration Cancelation','RChange'=>'Registration Change','GE'=>'Generic');
$RConf_subject="Registration Confirmation for %short_description%";
$RConf_message="Dear %name% %sirname%,".$f_br.$f_br."This e-mail confirms your registration for the following event:".$f_br."Event Name: %short_description%".$f_br."Category: %category%".$f_br."Details: %details%".$f_br."Location: %location%".$f_br."Date(s): %date%".$f_br."Time: %time%".$f_br.$f_br."Your registration info:".$f_br."Date: %register_date%".$f_br."Notes: %notes%".$f_br.$f_br."For further information contact:".$f_br.$admin_email;
$RCancel_subject="Registration Cancelation for %short_description%";
$RCancel_message="Dear %name% %sirname%,".$f_br.$f_br."This e-mail confirms your cancelation for the following event:".$f_br."Event Name: %short_description%".$f_br."Category: %category%".$f_br."Details: %details%".$f_br."Location: %location%".$f_br."Date(s): %date%".$f_br."Time: %time%".$f_br.$f_br."Your registration info:".$f_br."Date: %register_date%".$f_br."Notes: %notes%".$f_br.$f_br."For further information contact:".$f_br.$admin_email;
$RChange_subject="Registration Change for %short_description%";
$RChange_message="Dear %name% %sirname%,".$f_br.$f_br."This e-mail confirms your registration change for the following event:".$f_br."Event Name: %short_description%".$f_br."Category: %category%".$f_br."Details: %details%".$f_br."Location: %location%".$f_br."Date(s): %date%".$f_br."Time: %time%".$f_br.$f_br."Your registration info:".$f_br."Date: %register_date%".$f_br."Notes: %notes%".$f_br.$f_br."For further information contact:".$f_br.$admin_email;
$EA_subject="Announcement for %short_description%";
$EA_message="Dear %name% %sirname%,".$f_br.$f_br."You have requested to be informed for '%category%' events. ".$f_br."This e-mail is to announce the following event:".$f_br."Event Name: %short_description%".$f_br."Category: %category%".$f_br."Details: %details%".$f_br."Location: %location%".$f_br."Date(s): %date%".$f_br."Time: %time%".$f_br.$f_br."If you want to register for this event, visit our site at %calendarurl%.".$f_br."Deadline for registration: %deadline%".$f_br.$f_br."For further information contact:".$f_br.$admin_email;
$ECA_subject="Event Change Announcement for %short_description%";
$ECA_message="Dear %name% %sirname%,".$f_br.$f_br."You have requested to be informed for '%category%'. ".$f_br."This e-mail is to announce change for the following event:".$f_br."Event Name: %short_description%".$f_br."Category: %category%".$f_br."Details: %details%".$f_br."Location: %location%".$f_br."Date(s): %date%".$f_br."Time: %time%".$f_br.$f_br."If you want to register for this event, visit our site at %calendarurl%.".$f_br."Deadline for registration: %deadline%".$f_br.$f_br."'
.'function moveleft() {'
.'l = document.getElementById("users_list"); r = document.getElementById("selected_list");'
.'var j=0; '
.'if(l.options.length>0) { j=l.options.length; } '
.'for(i=0; i0) { j=r.options.length; } '
.'for(i=0; i';
$js_innova= <<
MSG;
$innova_def= <<
var oEdit1=new InnovaEditor("oEdit1");
oEdit1.width="100%";oEdit1.height="200px";
oEdit1.tabs=[["tabHome","",["gEdit","gFont","gPage","gPara","gLinks"]]];
oEdit1.groups=[["gEdit","",["Undo","Redo","Line","BRK","Cut","Copy","Paste"]],
["gFont","",["FontName","FontSize","BRK","Bold","Italic","Underline","Strikethrough","ForeColor","BackColor"]],
["gPage","",["Numbering","Bullets","BRK","Indent","Outdent"]],
["gPara","",["Paragraph","BRK","JustifyLeft","JustifyCenter","JustifyRight","JustifyFull"]],
["gLinks","",["Hyperlink","Image","Characters","BRK","Table","ClearAll"]]];
oEdit1.arrStyle=[["BODY",false,"","font: 11px Verdana, Geneva, Arial, Helvetica, sans-serif;color:#000000;background: #FFFFFF;"],["a",false,"","font: 11px Verdana, Geneva, Arial, Helvetica, sans-serif;color:#ff8000;margin:0px;"],["p",false,"","text-indent:0px;padding:0px;margin:0px;"],["h1",false,"","font: bold 19px Verdana, Geneva, Arial, Helvetica, sans-serif;color:#000000;margin:0px;"],["h2",false,"","font: bold 16px Verdana, Geneva, Arial, Helvetica, sans-serif;color:#000000;margin:0px;"],["h3",false,"","font: bold 15px Verdana, Geneva, Arial, Helvetica, sans-serif;color:#000000;margin:0px;"],["h4",false,"","font: bold 12px Verdana, Geneva, Arial, Helvetica, sans-serif;color:#000000;margin:0px;"],["h5",false,"","font: bold 11px Verdana, Geneva, Arial, Helvetica, sans-serif;color:#000000;margin:0px;"],["h6",false,"","font: 11px Verdana, Geneva, Arial, Helvetica, sans-serif;color:#000000;margin:0px;"],["h6",false,"","font: 11px Verdana, Geneva, Arial, Helvetica, sans-serif;color:#000000;margin:0px;"]];
oEdit1.cmdAssetManager="modalDialogShow('../assetmanager/assetmanager.php?lang=english&root=../documents/',640,465)";
oEdit1.customColors=["#ff4500","#ffa500","#808000","#4682b4","#1e90ff","#9400d3","#ff1493","#a9a9a9"];
oEdit1.mode="HTMLBody";
oEdit1.REPLACE("htmlarea");
MSG;
$read_access=false;
$browse_with_events=true;
$admin_actions=array('addevent','index','mng_settings','setmailing','editevent','delevent','saveevent','mailing','mng_categories','del_category',
'edit_category','add_category');
$tzone_offset=f_read_tagged_data($cal_settings_fname, 'tzoneoffset');
function show_calendar($action_id,$ms='') // Calendar User Mode
{
global $page_id,$cal_template_fname,$db_fname,$doc_dir,$s_path,$rel_path,$category_id,$category_name,$month_name,$def_view,$cal_css,
$date_params,$lang_l,$lg_,$f_js_end,$f_js_st;
if(in_array($action_id,array("show","showcal","showevents","showcaljs","showeventsjs"))) $flag="user";
else $flag='admin';
$current_date=my_mktime();
$nav_bar_mon=date('n',$current_date); settype($nav_bar_mon,'integer');
$nav_bar_year=date('Y',$current_date); settype($nav_bar_year,'integer');
if(!in_array($action_id,array("showcal","showevents","showcaljs","showeventsjs")))
{
$data=f_read_file($cal_template_fname);
$date_params=f_GFS($data,'%DATEFORMAT(',')%');
$data=str_replace('%DATEFORMAT('.$date_params.')%','',$data);
}
if(isset($_GET['view'])) $view_type=$_GET['view'];
elseif(isset($_POST['view_type'])) $view_type=$_POST['view_type'];
else $view_type=$def_view;
settype($view_type, 'integer');
// set of month/week flag
$month_mode=(isset($_GET['mode']) && $_GET['mode']=='month');
$week_mode=(isset($_GET['mode']) && $_GET['mode']=='week');
if(isset($_GET['mode'])) $mode=$_GET['mode'];
else $mode=null;
$range_or_period='period'; $range_msg=''; $selected_period=0;
if(isset($_POST['period']) || isset($_GET['period'])) $period=(isset($_POST['period'])?$_POST['period']:$_GET['period']);
if(isset($period) && ($period==0 || $period==4)) $week_mode=true;
if(isset($period) && ($period==1 || $period==7)) $month_mode=true;
if(isset($period) && $period==7) $nav_bar_mon=$nav_bar_mon+1;
if(isset($period) && $period==2)
{
if(in_array($nav_bar_mon, array(3,6,9,12))) $nav_bar_mon-=1;
elseif(in_array($nav_bar_mon, array(1,4,7,10))) $nav_bar_mon+=1; $view_type=3;
}
if(isset($period) && $period==8)
{
if(in_array($nav_bar_mon,array(3,6,9,12))) $nav_bar_mon-=1;
elseif(in_array($nav_bar_mon,array(1,4,7,10))) $nav_bar_mon+=1;
$nav_bar_mon=$nav_bar_mon+3;
if($nav_bar_mon>12) $nav_bar_mon-=12;
$view_type=3;
}
if(isset($period) && $period==3) $view_type=12;
if(isset($period) && $period==9) {$nav_bar_year=$nav_bar_year+1;$view_type=12;}
if(isset($_POST['range_or_period']) && $_POST['range_or_period']=='range')
{ $range_or_period='range'; $view_type=$def_view; $month_mode=false; $week_mode=false; settype($view_type, 'integer');}
// check for month/year selector
if(isset($_GET['mon'])) // on "<<" or ">>" press
{
$nav_bar_mon=$_GET['mon'];
$nav_bar_year=$_GET['year'];
}
elseif(isset($_GET['selected_mon'])) // on 'GO' button press - month/year selection
{
$selected_month=$_GET['selected_mon'];
$selected_mon=array_search($selected_month, $month_name);
$nav_bar_mon=$selected_mon+1;
$nav_bar_year=$_GET['selected_year'];
}
elseif(isset($_GET['event_id'])) // search events - needed in EZG search
{
$event_id=$_GET['event_id'];
$res_record=db_get_specific_event($db_fname,$event_id);
$nav_bar_mon=date('n',$res_record['Start_date']);
$nav_bar_year=date('Y',$res_record['Start_date']);
}
if($nav_bar_year<1950) $nav_bar_year=1950;
elseif($nav_bar_year>2050) $nav_bar_year=2050;
// view type
if($view_type==1 || $month_mode || $week_mode) //1-month view
{
$months=array($nav_bar_mon);
$years=array($nav_bar_year);
}
elseif($view_type==3) //3-months view
{
if($nav_bar_mon==1)
{
$months=array(12,1,2);
$years=array($nav_bar_year-1,$nav_bar_year,$nav_bar_year);
}
elseif($nav_bar_mon==12)
{
$months=array(11,12,1);
$years=array($nav_bar_year,$nav_bar_year,$nav_bar_year+1);
}
else
{
$months=array($nav_bar_mon-1,$nav_bar_mon,$nav_bar_mon +1);
$years=array($nav_bar_year,$nav_bar_year,$nav_bar_year);
}
}
elseif($view_type==6) //6 months view
{
if($nav_bar_mon<=6) $months=range(1,6);
else $months=range(7,12);
$years=array($nav_bar_year,$nav_bar_year,$nav_bar_year,$nav_bar_year,$nav_bar_year,$nav_bar_year);
}
elseif($view_type==12) //12 months view
{
$months=range(1,12);
$years=array($nav_bar_year,$nav_bar_year,$nav_bar_year,$nav_bar_year,$nav_bar_year,$nav_bar_year,$nav_bar_year,$nav_bar_year,$nav_bar_year, $nav_bar_year,$nav_bar_year,$nav_bar_year);
}
// range & period selection
if(!isset($_POST['range_or_period']) && !isset($_GET['period']))
{
$fdayperiod_ts=mktime(0,0,0,$months[0],1,$years[0]);
$ldayperiod_ts=mktime(23,59,59,$months[count($months)-1],days_in_month($months[count($months)-1], $years[count($years)-1]),$years[count($years)-1]);
}
else
{
$t=define_range_period($range_or_period,$nav_bar_mon,$current_date);
$fdayperiod_ts=$t[0];
$ldayperiod_ts=$t[1];
$selected_period=$period;
if(isset($period) && ($period==0 || $period==4))
{ $week_mode_st_day=date('j',$fdayperiod_ts);
if($period==0 && $week_mode_st_day>date('j',my_mktime())) $nav_bar_mon -=1;
}
if($range_or_period=='range' && $fdayperiod_ts>$ldayperiod_ts)
{
$fdayperiod_ts=mktime(0,0,0,$months[0],1,$years[0]);
$ldayperiod_ts=mktime(23,59,59,$months[count($months)-1],days_in_month($months[count($months)-1], $years[count($years)-1]),$years[count($years)-1]);
$range_msg='Start date CAN NOT be > end date';
}
}
if(isset($_GET['startday'])) { $week_mode_st_day=$_GET['startday']; }
// calendar build
$events_records=db_get_events_raw($fdayperiod_ts,$ldayperiod_ts,$flag);
if(isset($events_records[0]['Category']))
{
$category_id_temp=array(); foreach($category_id as $k=>$v) $category_id_temp[]="$v";
if(in_array($events_records[0]['Category'],$category_name) || !in_array($events_records[0]['Category'],$category_id_temp) || (!isset($events_records[0]['Location']))) { category_conversion(); }
$events_records=db_get_events_raw($fdayperiod_ts,$ldayperiod_ts,$flag);
}
$cal_html=($ms!=''?''.$ms.'
':'').'';
for($i=0; $i';
if($view_type==1 || ($view_type==3 && $i==1) || $month_mode || $week_mode)
{
if($week_mode) $cal_html.=build_week($events_records,$action_id,$nav_bar_mon,$nav_bar_year,$flag,$week_mode_st_day);
else $cal_html.=build_calendar($events_records,$months[$i],$years[$i],$flag,$action_id,$view_type,true,$month_mode);
}
else { $cal_html.=build_calendar($events_records,$months[$i],$years[$i],$flag,$action_id,$view_type); }
$cal_html.='';
if($view_type==12 && ($i==2 || $i==5 || $i==8)) {$cal_html.='
'; if($i!=8) $cal_html.='';}
if($view_type==6 && ($i==2 || $i==5)) {$cal_html.='
'; if($i!=5) $cal_html.='';}
if($view_type==3 && $i==2) $cal_html.='
';
if($view_type==1 || $month_mode || $week_mode) $cal_html.='';
}
$cal_html.='
';
if(!in_array($action_id,array("showcal","showevents","showcaljs","showeventsjs")))
{
$data=preg_replace('()','%CALENDAR_OBJECT%',$data);
$data=preg_replace('()','%CALENDAR_EVENTS%',$data);
$data=f_obj_div_replacing('%CALENDAR_OBJECT%',$data);
$data=f_obj_div_replacing('%CALENDAR_RANGE_SELECTION%',$data);
$data=f_obj_div_replacing('%CALENDAR_SELECTION%',$data);
$data=f_obj_div_replacing('%CALENDAR_EVENTS%',$data);
$data=f_obj_div_replacing('%CALENDAR_EVENTS_INVISIBLE%',$data);
if(strpos($data,'