当前位置: 首页>>代码示例>>PHP>>正文


PHP getaddEventPopupTime函数代码示例

本文整理汇总了PHP中getaddEventPopupTime函数的典型用法代码示例。如果您正苦于以下问题:PHP getaddEventPopupTime函数的具体用法?PHP getaddEventPopupTime怎么用?PHP getaddEventPopupTime使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了getaddEventPopupTime函数的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getRequestedToData

function getRequestedToData()
{
    $mail_data = array();
    $mail_data['user_id'] = $_REQUEST["task_assigned_user_id"];
    $mail_data['subject'] = $_REQUEST['task_subject'];
    $mail_data['status'] = $_REQUEST['activity_mode'] == 'Task' ? $_REQUEST['taskstatus'] : $_REQUEST['eventstatus'];
    $mail_data['activity_mode'] = $_REQUEST['activity_mode'];
    $mail_data['taskpriority'] = $_REQUEST['taskpriority'];
    $mail_data['relatedto'] = $_REQUEST['task_parent_name'];
    $mail_data['contact_name'] = $_REQUEST['task_contact_name'];
    $mail_data['description'] = $_REQUEST['task_description'];
    $mail_data['assign_type'] = $_REQUEST['task_assigntype'];
    $mail_data['group_name'] = getGroupName($_REQUEST['task_assigned_group_id']);
    $mail_data['mode'] = $_REQUEST['task_mode'];
    $startTime = $_REQUEST['task_time_start'];
    $date = new DateTimeField($_REQUEST['task_date_start'] . " " . $startTime);
    $endTime = $_REQUEST['task_time_end'];
    $endDate = new DateTimeField($_REQUEST['task_due_date'] . " " . $startTime);
    $startTime = $date->getDisplayTime();
    $endTime = $endDate->getDisplayTime();
    $value = getaddEventPopupTime($startTime, $endTime, '24');
    $start_hour = $value['starthour'] . ':' . $value['startmin'] . '' . $value['startfmt'];
    $mail_data['st_date_time'] = $date->getDisplayDateTimeValue();
    $mail_data['end_date_time'] = $endDate->getDisplayDate();
    return $mail_data;
}
开发者ID:casati-dolibarr,项目名称:corebos,代码行数:26,代码来源:SaveTodo.php

示例2: array_values

     $cbactivitytype = $focus->column_fields['activitytype'];
     $cbdate = $focus->column_fields["date_start"];
     $cbtime = $focus->column_fields["time_start"];
 } else {
     // For non-calendar records.
     $cbsubject = array_values(getEntityName($cbmodule, $cbrecord));
     $cbsubject = $cbsubject[0];
     $cbactivitytype = getTranslatedString($cbmodule, $cbmodule);
     $cbdate = $adb->query_result($result, $index, 'date_start');
     $cbtime = $adb->query_result($result, $index, 'time_start');
 }
 if ($cbtime != '') {
     $date = new DateTimeField($cbdate . ' ' . $cbtime);
     $cbtime = $date->getDisplayTime();
     $cbdate = $date->getDisplayDate();
     $cbtimeArr = getaddEventPopupTime($cbtime, '', 'am/pm');
     $cbtime = $cbtimeArr['starthour'] . ':' . $cbtimeArr['startmin'] . '' . $cbtimeArr['startfmt'];
 }
 if ($cbactivitytype == 'Task') {
     $cbstatus = $focus->column_fields["taskstatus"];
 } else {
     $cbstatus = $focus->column_fields["eventstatus"];
 }
 $cbstatus = getTranslatedString($cbstatus, $currentModule);
 $actType = $adb->query_result($adb->pquery('select activitytype from vtiger_activity where activityid=?', array($cbrecord)), 0, 'activitytype');
 $smarty->assign("activityimage", $actType);
 $cbactivitytype = getTranslatedString($cbactivitytype, $currentModule);
 // Appending recordid we can get unique callback dom id for that record.
 $popupid = "ActivityReminder_{$cbrecord}";
 if ($cbdate <= date('Y-m-d')) {
     if ($cbdate == date('Y-m-d') && $cbtime > date('H:i')) {
开发者ID:mslokhat,项目名称:corebos,代码行数:31,代码来源:ActivityReminderCallbackAjax.php

示例3: list

            if (isset($field['secid'])) {
                $finaldata[$field['fldname'] . 'secid'] = $field['secid'];
            }
        }
    }
}
//Start
//To set user selected hour format
if ($current_user->hour_format == '') {
    $format = 'am/pm';
} else {
    $format = $current_user->hour_format;
}
list($stdate, $sttime) = explode(' ', $finaldata['date_start']);
list($enddate, $endtime) = explode(' ', $finaldata['due_date']);
$time_arr = getaddEventPopupTime($sttime, $endtime, $format);
$data = array();
$data['starthr'] = $time_arr['starthour'];
$data['startmin'] = $time_arr['startmin'];
$data['startfmt'] = $time_arr['startfmt'];
$data['endhr'] = $time_arr['endhour'];
$data['endmin'] = $time_arr['endmin'];
$data['endfmt'] = $time_arr['endfmt'];
$data['record'] = $focus->id;
if (isset($finaldata['sendnotification']) && $finaldata['sendnotification'] == strtolower($c_mod_strings['LBL_YES'])) {
    $data['sendnotification'] = $c_mod_strings['LBL_YES'];
} else {
    $data['sendnotification'] = $c_mod_strings['LBL_NO'];
}
$data['subject'] = $finaldata['subject'];
$data['date_start'] = $stdate;
开发者ID:casati-dolibarr,项目名称:corebos,代码行数:31,代码来源:EventDetailView.php

示例4: constructTodoListView

/**
 * Function creates HTML to display Todos ListView
 * @param array  $todo_list     - collection of strings(Todo Information)
 * @param array  $cal           - collection of objects and strings 
 * return string $list_view     - html tags in string format
 */
function constructTodoListView($todo_list, $cal, $subtab, $navigation_array = '')
{
    global $mod_strings, $cal_log, $adb, $theme;
    $cal_log->debug("Entering constructTodoListView() method...");
    global $current_user, $app_strings;
    $date_format = $current_user->date_format;
    $format = $cal['calendar']->hour_format;
    $hour_startat = timeString(array('hour' => date('H:i'), 'minute' => 0), '24');
    $hour_endat = timeString(array('hour' => date('H:i', time() + 60 * 60), 'minute' => 0), '24');
    $time_arr = getaddEventPopupTime($hour_startat, $hour_endat, $format);
    $temp_ts = $cal['calendar']->date_time->ts;
    //to get date in user selected date format
    $temp_date = $date_format == 'dd-mm-yyyy' ? date('d-m-Y', $temp_ts) : ($date_format == 'mm-dd-yyyy' ? date('m-d-Y', $temp_ts) : ($date_format == 'yyyy-mm-dd' ? date('Y-m-d', $temp_ts) : ''));
    if ($cal['calendar']->day_start_hour != 23) {
        $endtemp_date = $temp_date;
    } else {
        $endtemp_ts = $temp_ts + 1 * 24 * 60 * 60;
        $endtemp_date = $date_format == 'dd-mm-yyyy' ? date('d-m-Y', $endtemp_ts) : ($date_format == 'mm-dd-yyyy' ? date('m-d-Y', $endtemp_ts) : ($date_format == 'yyyy-mm-dd' ? date('Y-m-d', $endtemp_ts) : ''));
    }
    $list_view = "";
    //labels of listview header
    if ($cal['view'] == 'day') {
        $colspan = 9;
        $header = array('0' => '#', '1' => $mod_strings['LBL_TIME'], '2' => $mod_strings['LBL_LIST_DUE_DATE'], '3' => $mod_strings['LBL_TODO']);
        $header_width = array('0' => '5%', '1' => '10%', '2' => '10%', '3' => '38%');
        /*if(getFieldVisibilityPermission('Calendar',$current_user->id,'parent_id') == '0')
        		{
        			array_push($header,$mod_strings['LBL_RELATEDTO']);
        			array_push($header_width,'15%');
        		}
        		if(getFieldVisibilityPermission('Calendar',$current_user->id,'contact_id') == '0')
        		{
        			array_push($header,$mod_strings['LBL_CONTACT_NAME']);
        			array_push($header_width,'15%');
        		}*/
        if (getFieldVisibilityPermission('Calendar', $current_user->id, 'taskstatus') == '0') {
            array_push($header, $mod_strings['LBL_STATUS']);
            array_push($header_width, '10%');
        }
        if (isPermitted("Calendar", "EditView") == "yes" || isPermitted("Calendar", "Delete") == "yes") {
            array_push($header, $mod_strings['LBL_ACTION']);
            array_push($header_width, '10%');
        }
        array_push($header, $mod_strings['LBL_ASSINGEDTO']);
        array_push($header_width, '15%');
    } else {
        $colspan = 10;
        $header = array('0' => '#', '1' => $mod_strings['LBL_TIME'], '2' => $mod_strings['LBL_START_DATE'], '3' => $mod_strings['LBL_DUE_DATE'], '4' => $mod_strings['LBL_TODO']);
        $header_width = array('0' => '5%', '1' => '10%', '2' => '10%', '3' => '10%', '4' => '28%');
        /*if(getFieldVisibilityPermission('Calendar',$current_user->id,'parent_id') == '0')
        		{
        			array_push($header,$mod_strings['LBL_RELATEDTO']);
        			array_push($header_width,'15%');
        		}
        		if(getFieldVisibilityPermission('Calendar',$current_user->id,'contact_id') == '0')
        		{
        			array_push($header,$mod_strings['LBL_CONTACT_NAME']);
        			array_push($header_width,'15%');
        		}*/
        if (getFieldVisibilityPermission('Calendar', $current_user->id, 'taskstatus') == '0') {
            array_push($header, $mod_strings['LBL_STATUS']);
            array_push($header_width, '10%');
        }
        if (isPermitted("Calendar", "EditView") == "yes" || isPermitted("Calendar", "Delete") == "yes") {
            array_push($header, $mod_strings['LBL_ACTION']);
        }
        array_push($header, $mod_strings['LBL_ASSINGEDTO']);
        array_push($header_width, '15%');
    }
    if ($current_user->column_fields['is_admin'] == 'on') {
        $Res = $adb->pquery("select * from vtiger_activitytype", array());
    } else {
        $roleid = $current_user->roleid;
        $subrole = getRoleSubordinates($roleid);
        if (count($subrole) > 0) {
            $roleids = $subrole;
            array_push($roleids, $roleid);
        } else {
            $roleids = $roleid;
        }
        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($roleid));
        }
    }
    $eventlist = '';
    for ($i = 0; $i < $adb->num_rows($Res); $i++) {
        $eventlist .= $adb->query_result($Res, $i, 'activitytype') . ";";
    }
    $list_view .= "<table align='center' border='0' cellpadding='5' cellspacing='0' width='98%'>\n\t\t\t<tr><td colspan='3'>&nbsp;</td></tr>";
    //checking permission for Create/Edit Operation
    if (isPermitted("Calendar", "EditView") == "yes") {
        $list_view .= "<tr>\n\t\t\t\t<td class='calAddButton' onMouseOver='fnAddEvent(this,\"addEventDropDown\",\"" . $temp_date . "\",\"" . $endtemp_date . "\",\"" . $time_arr['starthour'] . "\",\"" . $time_arr['startmin'] . "\",\"" . $time_arr['startfmt'] . "\",\"" . $time_arr['endhour'] . "\",\"" . $time_arr['endmin'] . "\",\"" . $time_arr['endfmt'] . "\",\"\",\"" . $subtab . "\",\"" . $eventlist . "\");'style='border: 1px solid #666666;cursor:pointer;height:30px' align='center' width='10%'>\n                                        " . $mod_strings['LBL_ADD'] . "\n                                        <img src='" . vtiger_imageurl('menuDnArrow.gif', $theme) . "' style='padding-left: 5px;' border='0'>                                                                                                                         </td>";
//.........这里部分代码省略.........
开发者ID:p6,项目名称:VF,代码行数:101,代码来源:calendarLayout.php

示例5: DateTime

     $user_date_start = DateTimeField::convertToUserFormat($startdatetime->format('Y-m-d'));
     if (!$is_full_day_event) {
         $user_time_start = $startdatetime->format('H:i');
     } else {
         $user_time_start = "00:00";
     }
     $enddatetime = new DateTime($When[0]->getEndTime());
     $enddatetime->setTimeZone($c_time_zone);
     $user_date_end = DateTimeField::convertToUserFormat($enddatetime->format('Y-m-d'));
     if (!$is_full_day_event) {
         $user_time_end = $enddatetime->format('H:i');
     } else {
         $user_time_end = "00:00";
     }
 }
 $time_arr = getaddEventPopupTime($user_time_start, $user_time_end, $format);
 if ($typeid == 'task') {
     $typename = 'todo';
 } else {
     $typename = getActTypeForCalendar($typeid, false);
 }
 if ($add_into_vtiger) {
     echo "<span style='font-size:12px'>" . $app_strings['LBL_ACTION'] . ": ";
     echo "<a href=\"javascript:insertIntoCRM('" . $userid . "','" . $eventid . "','" . $typename . "','" . $event->id->text . "','" . $user_date_start . "','" . $user_date_end . "','" . $time_arr['starthour'] . "','" . $time_arr['startmin'] . "','" . $time_arr['startfmt'] . "','" . $time_arr['endhour'] . "','" . $time_arr['endmin'] . "','" . $time_arr['endfmt'] . "')\">" . $mod_strings["LBL_INSERT_INTO_CRM"] . "</a>";
     echo "</span>";
 }
 echo "<div style='float:right'><img src='modules/Calendar4You/images/sync_icon_small2.png'></div>";
 if ($add_into_vtiger) {
     echo "<hr>";
 }
 echo "<div id='google_info_" . $eventid . "_title' style='font-size:12px'>" . $event->title->text . "</div>";
开发者ID:mslokhat,项目名称:corebos,代码行数:31,代码来源:EventGoogleInfo.php

示例6: getActivityMailInfo

function getActivityMailInfo($return_id, $status, $activity_type)
{
    $mail_data = array();
    global $adb;
    $qry = "select * from vtiger_activity where activityid=?";
    $ary_res = $adb->pquery($qry, array($return_id));
    $send_notification = $adb->query_result($ary_res, 0, "sendnotification");
    $subject = $adb->query_result($ary_res, 0, "subject");
    $priority = $adb->query_result($ary_res, 0, "priority");
    $st_date = $adb->query_result($ary_res, 0, "date_start");
    $st_time = $adb->query_result($ary_res, 0, "time_start");
    $end_date = $adb->query_result($ary_res, 0, "due_date");
    $end_time = $adb->query_result($ary_res, 0, "time_end");
    $location = $adb->query_result($ary_res, 0, "location");
    if (!empty($st_time)) {
        $date = new DateTimeField($st_date . ' ' . $st_time);
        $st_date = $date->getDisplayDate();
        $st_time = $date->getDisplayTime();
    }
    if (!empty($end_time)) {
        $date = new DateTimeField($end_date . ' ' . $end_time);
        $end_date = $date->getDisplayDate();
        $end_time = $date->getDisplayTime();
    }
    $owner_qry = "select smownerid from vtiger_crmentity where crmid=?";
    $res = $adb->pquery($owner_qry, array($return_id));
    $owner_id = $adb->query_result($res, 0, "smownerid");
    $usr_res = $adb->pquery("select count(*) as count from vtiger_users where id=?", array($owner_id));
    if ($adb->query_result($usr_res, 0, 'count') > 0) {
        $assignType = "U";
        $usr_id = $owner_id;
    } else {
        $assignType = "T";
        $group_qry = "select groupname from vtiger_groups where groupid=?";
        $grp_res = $adb->pquery($group_qry, array($owner_id));
        $grp_name = $adb->query_result($grp_res, 0, "groupname");
    }
    $desc_qry = "select description from vtiger_crmentity where crmid=?";
    $des_res = $adb->pquery($desc_qry, array($return_id));
    $description = $adb->query_result($des_res, 0, "description");
    $rel_qry = "select case vtiger_crmentity.setype when 'Leads' then vtiger_leaddetails.lastname when 'Accounts' then vtiger_account.accountname when 'Potentials' then vtiger_potential.potentialname when 'Quotes' then vtiger_quotes.subject when 'PurchaseOrder' then vtiger_purchaseorder.subject when 'SalesOrder' then vtiger_salesorder.subject when 'Invoice' then vtiger_invoice.subject when 'Campaigns' then vtiger_campaign.campaignname when 'HelpDesk' then vtiger_troubletickets.title  end as relname from vtiger_seactivityrel inner join vtiger_crmentity on vtiger_crmentity.crmid=vtiger_seactivityrel.crmid left join vtiger_leaddetails on vtiger_leaddetails.leadid = vtiger_seactivityrel.crmid  left join vtiger_account on vtiger_account.accountid=vtiger_seactivityrel.crmid left join vtiger_potential on vtiger_potential.potentialid=vtiger_seactivityrel.crmid left join vtiger_quotes on vtiger_quotes.quoteid= vtiger_seactivityrel.crmid left join vtiger_purchaseorder on vtiger_purchaseorder.purchaseorderid = vtiger_seactivityrel.crmid  left join vtiger_salesorder on vtiger_salesorder.salesorderid = vtiger_seactivityrel.crmid left join vtiger_invoice on vtiger_invoice.invoiceid = vtiger_seactivityrel.crmid  left join vtiger_campaign on vtiger_campaign.campaignid = vtiger_seactivityrel.crmid left join vtiger_troubletickets on vtiger_troubletickets.ticketid = vtiger_seactivityrel.crmid where vtiger_seactivityrel.activityid=?";
    $rel_res = $adb->pquery($rel_qry, array($return_id));
    $rel_name = $adb->query_result($rel_res, 0, "relname");
    $relatedContacts = getActivityRelatedContacts($return_id);
    $mail_data['mode'] = "edit";
    $mail_data['activity_mode'] = $activity_type;
    $mail_data['sendnotification'] = $send_notification;
    $mail_data['user_id'] = $usr_id;
    $mail_data['subject'] = $subject;
    $mail_data['status'] = $status;
    $mail_data['taskpriority'] = $priority;
    $mail_data['relatedto'] = $rel_name;
    $mail_data['contact_name'] = implode(',', $relatedContacts);
    $mail_data['description'] = $description;
    $mail_data['assign_type'] = $assignType;
    $mail_data['group_name'] = $grp_name;
    $value = getaddEventPopupTime($st_time, $end_time, '24');
    $start_hour = $value['starthour'] . ':' . $value['startmin'] . '' . $value['startfmt'];
    if ($activity_type != 'Task') {
        $end_hour = $value['endhour'] . ':' . $value['endmin'] . '' . $value['endfmt'];
    }
    $date = new DateTimeField($st_date . " " . $start_hour);
    $endDate = new DateTimeField($end_date . " " . $end_hour);
    $mail_data['st_date_time'] = $date->getDBInsertDateTimeValue();
    $mail_data['end_date_time'] = $endDate->getDBInsertDateValue() . ' ' . $endDate->getDBInsertTimeValue();
    $mail_data['location'] = $location;
    return $mail_data;
}
开发者ID:mslokhat,项目名称:corebos,代码行数:68,代码来源:CalendarCommon.php

示例7: getInviteUserMailData

 public function getInviteUserMailData()
 {
     $adb = PearDatabase::getInstance();
     $return_id = $this->getId();
     $cont_qry = "select * from vtiger_cntactivityrel where activityid=?";
     $cont_res = $adb->pquery($cont_qry, array($return_id));
     $noofrows = $adb->num_rows($cont_res);
     $cont_id = array();
     if ($noofrows > 0) {
         for ($i = 0; $i < $noofrows; $i++) {
             $cont_id[] = $adb->query_result($cont_res, $i, "contactid");
         }
     }
     $cont_name = '';
     foreach ($cont_id as $key => $id) {
         if ($id != '') {
             $contact_name = Vtiger_Util_Helper::getRecordName($id);
             $cont_name .= $contact_name . ', ';
         }
     }
     $parentId = $this->get('parent_id');
     $parentName = '';
     if ($parentId != '') {
         $parentName = Vtiger_Util_Helper::getRecordName($parentId);
     }
     $cont_name = trim($cont_name, ', ');
     $mail_data = array();
     $mail_data['user_id'] = $this->get('assigned_user_id');
     $mail_data['subject'] = $this->get('subject');
     $moduleName = $this->getModuleName();
     $mail_data['status'] = $moduleName == 'Calendar' ? $this->get('taskstatus') : $this->get('eventstatus');
     $mail_data['activity_mode'] = $moduleName == 'Calendar' ? 'Task' : 'Events';
     $mail_data['taskpriority'] = $this->get('taskpriority');
     $mail_data['relatedto'] = $parentName;
     $mail_data['contact_name'] = $cont_name;
     $mail_data['description'] = $this->get('description');
     $mail_data['assign_type'] = $this->get('assigntype');
     $mail_data['group_name'] = getGroupName($this->get('assigned_user_id'));
     $mail_data['mode'] = $this->get('mode');
     //TODO : remove dependency on request;
     $value = getaddEventPopupTime($_REQUEST['time_start'], $_REQUEST['time_end'], '24');
     $start_hour = $value['starthour'] . ':' . $value['startmin'] . '' . $value['startfmt'];
     if ($_REQUEST['activity_mode'] != 'Task') {
         $end_hour = $value['endhour'] . ':' . $value['endmin'] . '' . $value['endfmt'];
     }
     $startDate = new DateTimeField($_REQUEST['date_start'] . " " . $start_hour);
     $endDate = new DateTimeField($_REQUEST['due_date'] . " " . $end_hour);
     $mail_data['st_date_time'] = $startDate->getDBInsertDateTimeValue();
     $mail_data['end_date_time'] = $endDate->getDBInsertDateTimeValue();
     $mail_data['location'] = $this->get('location');
     return $mail_data;
 }
开发者ID:cannking,项目名称:vtigercrm-debug,代码行数:52,代码来源:Record.php

示例8: getRequestData

function getRequestData($return_id)
{
    global $adb;
    $cont_qry = "select * from vtiger_cntactivityrel where activityid=?";
    $cont_res = $adb->pquery($cont_qry, array($return_id));
    $noofrows = $adb->num_rows($cont_res);
    $cont_id = array();
    if ($noofrows > 0) {
        for ($i = 0; $i < $noofrows; $i++) {
            $cont_id[] = $adb->query_result($cont_res, $i, "contactid");
        }
    }
    $cont_name = '';
    foreach ($cont_id as $key => $id) {
        if ($id != '') {
            $displayValueArray = getEntityName('Contacts', $id);
            if (!empty($displayValueArray)) {
                foreach ($displayValueArray as $key => $field_value) {
                    $contact_name = $field_value;
                }
            }
            $cont_name .= $contact_name . ', ';
        }
    }
    $cont_name = trim($cont_name, ', ');
    $mail_data = array();
    $mail_data['user_id'] = $_REQUEST['assigned_user_id'];
    $mail_data['subject'] = $_REQUEST['subject'];
    $mail_data['status'] = $_REQUEST['activity_mode'] == 'Task' ? $_REQUEST['taskstatus'] : $_REQUEST['eventstatus'];
    $mail_data['activity_mode'] = $_REQUEST['activity_mode'];
    $mail_data['taskpriority'] = $_REQUEST['taskpriority'];
    $mail_data['relatedto'] = $_REQUEST['parent_name'];
    $mail_data['contact_name'] = $cont_name;
    $mail_data['description'] = $_REQUEST['description'];
    $mail_data['assign_type'] = $_REQUEST['assigntype'];
    $mail_data['group_name'] = getGroupName($_REQUEST['assigned_group_id']);
    $mail_data['mode'] = $_REQUEST['mode'];
    $value = getaddEventPopupTime($_REQUEST['time_start'], $_REQUEST['time_end'], '24');
    $start_hour = $value['starthour'] . ':' . $value['startmin'] . '' . $value['startfmt'];
    if ($_REQUEST['activity_mode'] != 'Task') {
        $end_hour = $value['endhour'] . ':' . $value['endmin'] . '' . $value['endfmt'];
    }
    $startDate = new DateTimeField($_REQUEST['date_start'] . " " . $start_hour);
    $endDate = new DateTimeField($_REQUEST['due_date'] . " " . $end_hour);
    $mail_data['st_date_time'] = $startDate->getDBInsertDateTimeValue();
    $mail_data['end_date_time'] = $endDate->getDBInsertDateTimeValue();
    $mail_data['location'] = vtlib_purify($_REQUEST['location']);
    return $mail_data;
}
开发者ID:mslokhat,项目名称:corebos,代码行数:49,代码来源:Save.php

示例9: save_module

 function save_module($module)
 {
     global $adb;
     //Handling module specific save
     //Insert into seactivity rel
     if (isset($this->column_fields['parent_id']) && $this->column_fields['parent_id'] != '') {
         $this->insertIntoEntityTable("vtiger_seactivityrel", $module);
     } elseif ($this->column_fields['parent_id'] == '' && $insertion_mode == "edit") {
         $this->deleteRelation("vtiger_seactivityrel");
     }
     //Insert into cntactivity rel
     if (isset($this->column_fields['contact_id']) && $this->column_fields['contact_id'] != '') {
         $this->insertIntoEntityTable('vtiger_cntactivityrel', $module);
     } elseif ($this->column_fields['contact_id'] == '' && $insertion_mode == "edit") {
         $this->deleteRelation('vtiger_cntactivityrel');
     }
     if (!empty($this->column_fields['sendnotification'])) {
         $mail_data = array();
         $mail_data['user_id'] = $this->column_fields['assigned_user_id'];
         $mail_data['subject'] = $this->column_fields['subject'];
         $mail_data['status'] = $this->column_fields['activitytype'] == 'Task' ? $this->column_fields['taskstatus'] : $this->column_fields['eventstatus'];
         $mail_data['taskpriority'] = $this->column_fields['taskpriority'];
         $mail_data['contact_name'] = $this->column_fields['contact_id'];
         $mail_data['description'] = $this->column_fields['description'];
         $value = getaddEventPopupTime($this->column_fields['time_start'], $this->column_fields['time_end'], '24');
         $start_hour = $value['starthour'] . ':' . $value['startmin'] . '' . $value['startfmt'];
         $mail_data['st_date_time'] = getDisplayDate($this->column_fields['date_start']) . " " . $start_hour;
         $mail_data['end_date_time'] = getDisplayDate($this->column_fields['due_date']);
         getEventNotification($this->column_fields['activitytype'], $this->column_fields['subject'], $mail_data);
     }
     $recur_type = '';
     if (($recur_type == "--None--" || $recur_type == '') && $this->mode == "edit") {
         $sql = 'delete  from vtiger_recurringevents where activityid=?';
         $adb->pquery($sql, array($this->id));
     }
     //Handling for recurring type
     //Insert into vtiger_recurring event table
     if (isset($this->column_fields['recurringtype']) && $this->column_fields['recurringtype'] != '' && $this->column_fields['recurringtype'] != '--None--') {
         $recur_type = trim($this->column_fields['recurringtype']);
         $recur_data = getrecurringObjValue();
         if (is_object($recur_data)) {
             $this->insertIntoRecurringTable($recur_data);
         }
     }
     //Insert into vtiger_activity_remainder table
     $this->insertIntoReminderTable('vtiger_activity_reminder', $module, "");
     //Handling for invitees
     $selected_users_string = $_REQUEST['inviteesid'];
     $invitees_array = explode(';', $selected_users_string);
     $this->insertIntoInviteeTable($module, $invitees_array);
     //Inserting into sales man activity rel
     $this->insertIntoSmActivityRel($module);
     $this->insertIntoActivityReminderPopup($module);
 }
开发者ID:hardikk,项目名称:HNH,代码行数:54,代码来源:Activity.php


注:本文中的getaddEventPopupTime函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。