} $eventlist = ''; $eventlists_array = ''; for ($i = 0; $i < $adb->num_rows($Res); $i++) { $actname = $adb->query_result($Res, $i, 'activitytype'); $eventlist .= html_entity_decode($actname, ENT_QUOTES, $default_charset) . ";"; $eventlists_array .= '"' . html_entity_decode(html_entity_decode($actname, ENT_QUOTES, $default_charset), ENT_QUOTES, $default_charset) . '",'; } $add_javascript = "onMouseOver='fnAddITSEvent(this,\"addEventDropDown\",\"" . $temp_date . "\",\"" . $temp_date . "\",\"" . $time_arr['starthour'] . "\",\"" . $time_arr['startmin'] . "\",\"" . $time_arr['startfmt'] . "\",\"" . $time_arr['endhour'] . "\",\"" . $time_arr['endmin'] . "\",\"" . $time_arr['endfmt'] . "\",\"" . $viewBox . "\",\"" . $subtab . "\",\"" . $eventlist . "\");'"; $smarty->assign('ADD_ONMOUSEOVER', $add_javascript); $smarty->assign('EVENTLIST', trim($eventlists_array, ",")); $timeModules = getAllModulesWithDateTimeFields(); $timeModluleDetails = array(); $timeModules_array = ''; foreach ($timeModules as $tmid => $tmmod) { $timeModluleDetails[$tmmod] = getModuleCalendarFields($tmmod); $timeModules_array .= '"' . html_entity_decode($tmmod, ENT_QUOTES, $default_charset) . '",'; } $smarty->assign('TIMEMODULEARRAY', trim($timeModules_array, ",")); $smarty->assign('TIMEMODULEDETAILS', json_encode($timeModluleDetails)); } //Sunday=0, Monday=1, Tuesday=2, etc. $smarty->assign('FISRTDAY', $Calendar_Settings["number_dayoftheweek"]); if ($Calendar_Settings["hour_format"] == "24") { $is_24 = true; } else { $is_24 = false; } $smarty->assign('IS_24', $is_24); include_once 'modules/Calendar4You/class/color_converter.class.php'; include_once 'modules/Calendar4You/class/color_harmony.class.php';
$allDay = false; } elseif ($activitytypeid == "invite") { $activitytype = $activitytypeid; $invites = true; $allDay = false; } else { $activitytype = $activitytypeid; } if (in_array($activitytypeid, $tasklabel)) { require_once 'modules/' . $activitytypeid . '/' . $activitytypeid . '.php'; $Module_Status_Fields = getModuleStatusFields($activitytypeid); $modact = new $activitytypeid(); $subject = $modact->list_link_field; $tablename = $modact->table_name; $queryGenerator = new QueryGenerator($activitytypeid, $current_user); $stfields = getModuleCalendarFields($activitytypeid); $queryFields = array('id', $subject, $stfields['start'], 'assigned_user_id'); // we force the users module with assigned_user_id if ($stfields['start'] != $stfields['end']) { $queryFields[] = $stfields['end']; } if (!empty($stfields['stime'])) { $queryFields[] = $stfields['stime']; } if (!empty($stfields['etime'])) { $queryFields[] = $stfields['etime']; } if (isset($stfields['subject'])) { $descflds = explode(',', $stfields['subject']); foreach ($descflds as $dfld) { $queryFields[] = $dfld;