id,true); $to_email = getUserEmailId('id',$current_user->id); $date_format = parse_calendardate($app_strings['NTC_DATE_FORMAT']); $taskassignedto = getAssignedTo(9); $eventassignedto = getAssignedTo(16); $mysel= vtlib_purify($_REQUEST['view']); $calendar_arr = Array(); $calendar_arr['IMAGE_PATH'] = $image_path; if(empty($mysel)){ if($current_user->activity_view == "This Year"){ $mysel = 'year'; }else if($current_user->activity_view == "This Month"){ $mysel = 'month'; }else if($current_user->activity_view == "This Week"){ $mysel = 'week'; }else{ $mysel = 'day'; } } $date_data = array(); if ( isset($_REQUEST['day'])) { $date_data['day'] = $_REQUEST['day']; } if ( isset($_REQUEST['month'])) { $date_data['month'] = $_REQUEST['month']; } if ( isset($_REQUEST['week'])) { $date_data['week'] = $_REQUEST['week']; } if ( isset($_REQUEST['year'])) { if ($_REQUEST['year'] > 2037 || $_REQUEST['year'] < 1970) { print("".$app_strings['LBL_CAL_LIMIT_MSG'].""); exit; } $date_data['year'] = $_REQUEST['year']; } if(empty($date_data)) { $data_value=date('Y-m-d H:i:s'); preg_match('/(\d{4})-(\d{2})-(\d{2}) (\d{2}):(\d{2}):(\d{2})/',$data_value,$value); $date_data = Array( 'day'=>$value[3], 'month'=>$value[2], 'year'=>$value[1], 'hour'=>$value[4], 'min'=>$value[5], ); } $calendar_arr['calendar'] = new Calendar($mysel,$date_data); $calendar_arr['view'] = $mysel; if($current_user->hour_format == '') $calendar_arr['calendar']->hour_format = 'am/pm'; else $calendar_arr['calendar']->hour_format = $current_user->hour_format; /** Function to construct HTML code for Assigned To field * @param $assignedto -- Assigned To values :: Type array * @param $toggletype -- String to different event and task :: Type string * return $htmlStr -- HTML code in string forat :: Type string */ function getAssignedToHTML($assignedto,$toggletype) { global $app_strings; $userlist = $assignedto[0]; if(isset($assignedto[1]) && $assignedto[1] != null) $grouplist = $assignedto[1]; $htmlStr = ''; $check = 1; foreach($userlist as $key_one=>$arr) { foreach($arr as $sel_value=>$value) { if($value != '') $check=$check*0; else $check=$check*1; } } if($check == 0) { $select_user='checked'; $style_user='display:block'; $style_group='display:none'; } else { $select_group='checked'; $style_user='display:none'; $style_group='display:block'; } if($toggletype == 'task') $htmlStr .= ' '.$app_strings['LBL_USER']; else $htmlStr .= ' '.$app_strings['LBL_USER']; if($grouplist != '') { if($toggletype == 'task') $htmlStr .= ' '.$app_strings['LBL_GROUP']; else $htmlStr .= ' '.$app_strings['LBL_GROUP']; } if($toggletype == 'task') { $htmlStr .= ' '; } else { $htmlStr .= ' '; } $htmlStr .= getUserslist(); $htmlStr .= ' '; if($grouplist != '') { if($toggletype == 'task') { $htmlStr .= ' '; } else { $htmlStr .= ' '; } $htmlStr .= getGroupslist(); $htmlStr .= ' '; } return $htmlStr; } $date = new DateTimeField(null); $endDate = new DateTimeField(date("Y-m-d H:i:s", (time() + (1 * 24 * 60 * 60)))); list($startYear, $startMonth, $startDay) = DateTimeField::convertToDBFormat($date->getDisplayDate()); list($startHour, $startMin) = explode(':', $date->getDisplayTime()); list($startYear, $startMonth, $startDay) = DateTimeField::convertToDBFormat($date->getDisplayDate()); list($startHour, $startMin) = explode(':', $date->getDisplayTime()); ?> * id,'visibility', 'readwrite') == '0') { ?> id,'description', 'readwrite') == '0') { ?> id,'location', 'readwrite') == '0') { ?> id,'eventstatus', 'readwrite') == '0') { ?> * id,'assigned_user_id', 'readwrite') == '0') { ?> id,'eventstatus', 'readwrite') == '0') { ?> id,'assigned_user_id', 'readwrite') == '0') { ?> id,'sendnotification', 'readwrite') == '0') { ?> id,'taskpriority', 'readwrite') == '0') { ?> hour_format,'start');?> hour_format,'end');?> hour_format,'followup_start');?> assign("MODULE",'Calendar'); $smarty->assign("MOD",$mod_strings); $smarty->assign("APP",$app_strings); $theme_path="themes/".$theme."/"; $image_path=$theme_path."images/"; $smarty->assign("IMAGE_PATH", $image_path); if (count($custom_fields_data) > 0){ ?> "; for($i=0; $iassign("maindata",$maindata); $smarty->assign("THEME", $theme); $smarty->display('EditViewUI.tpl'); if (($i+1)%2 == 0) { echo ""; } } if ($i% 2 != 0) { echo ''; } echo ""; ?> id,'reminder_time', 'readwrite') == '0') { ?> id,'recurringtype', 'readwrite') == '0') { ?> $name) { if($id != '') echo "".$name.""; } ?> id,'reminder_time', 'readwrite') == '0') { ?> : id,'recurringtype', 'readwrite') == '0') { ?> : : id,'parent_id', 'readwrite') == '0') { ?> ' class="crmButton small edit" onclick="document.EditView.del_actparent_rel.value=document.EditView.parent_id.value;document.EditView.parent_id.value='';document.EditView.parent_name.value='';"> id,'contact_id', 'readwrite') == '0') { ?> ' class="crmButton small edit" onclick='removeActContacts();'> id,'eventstatus', 'readwrite') == '0') { ?> - - - - - column_fields['is_admin']=='on') $Res = $adb->pquery("select * from vtiger_activitytype",array()); else { $role_id=$current_user->roleid; $subrole = getRoleSubordinates($role_id); if(count($subrole)> 0) { $roleids = $subrole; array_push($roleids, $role_id); } else { $roleids = $role_id; } if (count($roleids) > 1) { $Res=$adb->pquery("select distinct activitytype from vtiger_activitytype inner join vtiger_role2picklist on vtiger_role2picklist.picklistvalueid = vtiger_activitytype.picklist_valueid where roleid in (". generateQuestionMarks($roleids) .") and picklistid in (select picklistid from vtiger_activitytype) order by sortid asc",array($roleids)); } else { $Res=$adb->pquery("select distinct activitytype from vtiger_activitytype inner join vtiger_role2picklist on vtiger_role2picklist.picklistvalueid = vtiger_activitytype.picklist_valueid where roleid = ? and picklistid in (select picklistid from vtiger_activitytype) order by sortid asc",array($role_id)); } } $eventlist=''; for($i=0; $i<$adb->num_rows($Res);$i++) { $eventlist = $adb->query_result($Res,$i,'activitytype'); ?> * id,'description', 'readwrite') == '0') { ?> id,'taskstatus', 'readwrite') == '0') { ?> id,'taskpriority', 'readwrite') == '0') { ?> id,'assigned_user_id', 'readwrite') == '0') { ?> id,'taskstatus', 'readwrite') == '0') { ?> id,'taskpriority', 'readwrite') == '0') { ?> id,'assigned_user_id', 'readwrite') == '0') { ?> hour_format,'start','','','',true); ?> assign("MODULE",'Calendar'); $smarty->assign("MOD",$mod_strings); $smarty->assign("APP",$app_strings); $theme_path="themes/".$theme."/"; $image_path=$theme_path."images/"; $smarty->assign("IMAGE_PATH", $image_path); if (count($custom_fields_data) > 0){ ?> "; for($i=0; $iassign("maindata",$maindata); $smarty->assign("THEME", $theme); $smarty->display('EditViewUI.tpl'); if (($i+1)%2 == 0) { echo ""; } } if ($i% 2 != 0) { echo ''; } echo ""; ?> id,'sendnotification', 'readwrite') == '0') || (getFieldVisibilityPermission('Calendar',$current_user->id,'parent_id', 'readwrite') == '0') || (getFieldVisibilityPermission('Calendar',$current_user->id,'contact_id', 'readwrite') == '0')) { ?> id,'sendnotification', 'readwrite') == '0') { $classval = "dvtUnSelectedCell"; ?> id,'parent_id', 'readwrite') == '0') || (getFieldVisibilityPermission('Calendar',$current_user->id,'contact_id', 'readwrite') == '0')) { ?> id,'sendnotification', 'readwrite') == '0') { ?> id,'parent_id', 'readwrite') == '0') { ?> ' class="crmButton small edit" onclick="document.createTodo.del_actparent_rel.value=document.createTodo.task_parent_id.value;document.createTodo.task_parent_id.value='';document.createTodo.task_parent_name.value='';"> id,'contact_id', 'readwrite') == '0') { ?> "> ' class="crmButton small edit" onclick='document.createTodo.deletecntlist.value=document.createTodo.task_contact_name.value;document.createTodo.task_contact_name.value="";document.createTodo.task_contact_id.value="";'> : onclick=checkgroup(); checked> id,'taskstatus', 'readwrite') == '0') { ?> - - - - -