本文整理汇总了PHP中Vtiger_Time_UIType::getDBTimeFromUserValue方法的典型用法代码示例。如果您正苦于以下问题:PHP Vtiger_Time_UIType::getDBTimeFromUserValue方法的具体用法?PHP Vtiger_Time_UIType::getDBTimeFromUserValue怎么用?PHP Vtiger_Time_UIType::getDBTimeFromUserValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Vtiger_Time_UIType
的用法示例。
在下文中一共展示了Vtiger_Time_UIType::getDBTimeFromUserValue方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: insertIntoEntityTable
//.........这里部分代码省略.........
$sql = "select {$columname} from {$table_name} where " . $this->tab_name_index[$table_name] . "=?";
$res = $adb->pquery($sql, array($this->id));
$pick_val = $adb->query_result($res, 0, $columname);
$fldvalue = $pick_val;
} else {
$fldvalue = $this->column_fields[$fieldname];
}
} elseif ($uitype == 33) {
if (is_array($this->column_fields[$fieldname])) {
$field_list = implode(' |##| ', $this->column_fields[$fieldname]);
} else {
$field_list = $this->column_fields[$fieldname];
}
if ($field_list == '') {
$fldvalue = NULL;
} else {
$fldvalue = $field_list;
}
} elseif (in_array($uitype, [303, 304])) {
if (is_array($this->column_fields[$fieldname])) {
$field_list = implode(',', $this->column_fields[$fieldname]);
} else {
$field_list = $this->column_fields[$fieldname];
}
$fldvalue = $field_list;
} elseif ($uitype == 5 || $uitype == 6 || $uitype == 23) {
//Added to avoid function call getDBInsertDateValue in ajax save
if (isset($current_user->date_format) && !$ajaxSave) {
$fldvalue = getValidDBInsertDateValue($this->column_fields[$fieldname]);
} else {
$fldvalue = $this->column_fields[$fieldname];
}
} elseif ($uitype == 14) {
$fldvalue = Vtiger_Time_UIType::getDBTimeFromUserValue($this->column_fields[$fieldname]);
} elseif ($uitype == 7) {
//strip out the spaces and commas in numbers if given ie., in amounts there may be ,
$fldvalue = str_replace(",", "", $this->column_fields[$fieldname]);
//trim($this->column_fields[$fieldname],",");
} elseif ($uitype == 26) {
if (empty($this->column_fields[$fieldname])) {
$fldvalue = 1;
//the documents will stored in default folder
} else {
$fldvalue = $this->column_fields[$fieldname];
}
} elseif ($uitype == 28) {
if ($this->column_fields[$fieldname] == null) {
$fileQuery = $adb->pquery("SELECT filename from vtiger_notes WHERE notesid = ?", array($this->id));
$fldvalue = null;
if (isset($fileQuery)) {
$rowCount = $adb->num_rows($fileQuery);
if ($rowCount > 0) {
$fldvalue = decode_html($adb->query_result($fileQuery, 0, 'filename'));
}
}
} else {
$fldvalue = decode_html($this->column_fields[$fieldname]);
}
} elseif ($uitype == 8) {
$this->column_fields[$fieldname] = rtrim($this->column_fields[$fieldname], ',');
$ids = explode(',', $this->column_fields[$fieldname]);
$json = new Zend_Json();
$fldvalue = $json->encode($ids);
} elseif ($uitype == 12) {
// Bulk Sae Mode: Consider the FROM email address as specified, if not lookup
$fldvalue = $this->column_fields[$fieldname];