protected function getFieldId(umiObjectType $v726e8e4809d4c1b28a6549d86436a124, $v46b9e6004c49d9cc040029c197cab278) { foreach ($v726e8e4809d4c1b28a6549d86436a124->getAllFields() as $v06e3d36fa30cea095545139854ad1fb9) { if ($v06e3d36fa30cea095545139854ad1fb9->getTitle() == $v46b9e6004c49d9cc040029c197cab278) { return $v06e3d36fa30cea095545139854ad1fb9->getId(); } if ($this->getFieldAlias($v46b9e6004c49d9cc040029c197cab278)) { if ($this->getFieldAlias($v06e3d36fa30cea095545139854ad1fb9->getTitle()) == $this->getFieldAlias($v46b9e6004c49d9cc040029c197cab278)) { return $v06e3d36fa30cea095545139854ad1fb9->getId(); } } } return false; }
public function addType($v6be379826b20cc58475f636e33f4606b, $vb068931cc450442b63f5b3d276ea4297, $v1945c9a2a5e2ba6133f1db6757a35fcb = false, $vfd2a8ab94cb104d2f8e25a402c260ae4 = false) { $this->disableCache(); $v6be379826b20cc58475f636e33f4606b = (int) $v6be379826b20cc58475f636e33f4606b; $vac5c74b64b4b8352ef2f181affb5ac2a = "INSERT INTO cms3_object_types (parent_id) VALUES('{$v6be379826b20cc58475f636e33f4606b}')"; $result = l_mysql_query($vac5c74b64b4b8352ef2f181affb5ac2a); if ($v56bd7107802ebe56c6918992f0608ec6 = l_mysql_error()) { throw new coreException($v56bd7107802ebe56c6918992f0608ec6); } $v94757cae63fd3e398c0811a976dd6bbe = l_mysql_insert_id(); if (!$vfd2a8ab94cb104d2f8e25a402c260ae4) { $vac5c74b64b4b8352ef2f181affb5ac2a = "SELECT * FROM cms3_object_field_groups WHERE type_id = '{$v6be379826b20cc58475f636e33f4606b}'"; $result = l_mysql_query($vac5c74b64b4b8352ef2f181affb5ac2a); if ($v56bd7107802ebe56c6918992f0608ec6 = l_mysql_error()) { throw new coreException($v56bd7107802ebe56c6918992f0608ec6); } while ($vf1965a857bc285d26fe22023aa5ab50d = mysql_fetch_assoc($result)) { $vac5c74b64b4b8352ef2f181affb5ac2a = "INSERT INTO cms3_object_field_groups (name, title, type_id, is_active, is_visible, ord, is_locked) VALUES ('" . l_mysql_real_escape_string($vf1965a857bc285d26fe22023aa5ab50d['name']) . "', '" . l_mysql_real_escape_string($vf1965a857bc285d26fe22023aa5ab50d['title']) . "', '{$v94757cae63fd3e398c0811a976dd6bbe}', '{$vf1965a857bc285d26fe22023aa5ab50d['is_active']}', '{$vf1965a857bc285d26fe22023aa5ab50d['is_visible']}', '{$vf1965a857bc285d26fe22023aa5ab50d['ord']}', '{$vf1965a857bc285d26fe22023aa5ab50d['is_locked']}')"; l_mysql_query($vac5c74b64b4b8352ef2f181affb5ac2a); if ($v56bd7107802ebe56c6918992f0608ec6 = l_mysql_error()) { throw new coreException($v56bd7107802ebe56c6918992f0608ec6); } $v159ce805831f9f42598564e0fbd06f83 = $vf1965a857bc285d26fe22023aa5ab50d['id']; $v5f2444d49c5d43b9cf7a3d7174b983f1 = l_mysql_insert_id(); $vac5c74b64b4b8352ef2f181affb5ac2a = "INSERT INTO cms3_fields_controller SELECT ord, field_id, '{$v5f2444d49c5d43b9cf7a3d7174b983f1}' FROM cms3_fields_controller WHERE group_id = '{$v159ce805831f9f42598564e0fbd06f83}'"; l_mysql_query($vac5c74b64b4b8352ef2f181affb5ac2a); if ($v56bd7107802ebe56c6918992f0608ec6 = l_mysql_error()) { throw new coreException($v56bd7107802ebe56c6918992f0608ec6); } } } $vee085e556579b9a69e64e3eddc559b89 = false; if ($v6be379826b20cc58475f636e33f4606b) { $v328a21868fce2b3f8569db40f1aa8a89 = $this->getType($v6be379826b20cc58475f636e33f4606b); if ($v328a21868fce2b3f8569db40f1aa8a89) { $vee085e556579b9a69e64e3eddc559b89 = $v328a21868fce2b3f8569db40f1aa8a89->getHierarchyTypeId(); } } $v599dcce2998a6b40b1e38e8c6006cb0a = new umiObjectType($v94757cae63fd3e398c0811a976dd6bbe); $v599dcce2998a6b40b1e38e8c6006cb0a->setName($vb068931cc450442b63f5b3d276ea4297); $v599dcce2998a6b40b1e38e8c6006cb0a->setIsLocked($v1945c9a2a5e2ba6133f1db6757a35fcb); if ($vee085e556579b9a69e64e3eddc559b89) { $v599dcce2998a6b40b1e38e8c6006cb0a->setHierarchyTypeId($vee085e556579b9a69e64e3eddc559b89); } $v599dcce2998a6b40b1e38e8c6006cb0a->commit(); $this->types[$v94757cae63fd3e398c0811a976dd6bbe] = $v599dcce2998a6b40b1e38e8c6006cb0a; umiBranch::saveBranchedTablesRelations(); return $v94757cae63fd3e398c0811a976dd6bbe; }
protected function importTypeRelation(umiField $v06e3d36fa30cea095545139854ad1fb9, DOMElement $vcaf9b6b99962bf5c2264824231d7a40c, umiObjectType $v599dcce2998a6b40b1e38e8c6006cb0a) { $v8328b28850bcb3400e7349ac3d5602c6 = $vcaf9b6b99962bf5c2264824231d7a40c->getElementsByTagName('guide'); $vd535f8615f1de2e299e22535183a9d22 = $v8328b28850bcb3400e7349ac3d5602c6->length ? $v8328b28850bcb3400e7349ac3d5602c6->item(0)->getAttribute('id') : false; $v051369818a8073bba5feeb0e957eb308 = $this->relations->getNewTypeIdRelation($this->source_id, $vd535f8615f1de2e299e22535183a9d22); if (!$v051369818a8073bba5feeb0e957eb308) { return false; } if ($v06e3d36fa30cea095545139854ad1fb9->getGuideId() != $v051369818a8073bba5feeb0e957eb308) { $v06e3d36fa30cea095545139854ad1fb9->setGuideId($v051369818a8073bba5feeb0e957eb308); $this->updated_relations++; $this->writeLog($this->getLabel('label-relation') . ': ' . $this->getLabel('label-datatype') . " (" . $v599dcce2998a6b40b1e38e8c6006cb0a->getName() . ") - " . $this->getLabel('label-field') . " (" . $v06e3d36fa30cea095545139854ad1fb9->getName() . ") - " . $this->getLabel('label-guide') . " ({$v051369818a8073bba5feeb0e957eb308}) " . $this->getLabel('label-has-been-updated-f')); $v06e3d36fa30cea095545139854ad1fb9->commit(); } return true; }
/** * @desc */ private static function applyTimeRange($selection, umiObjectType $type) { $stringFrom = getRequest('from_date'); $stringTo = getRequest('to_date'); if (strlen($stringFrom) && strlen($stringTo)) { $arrayFrom = explode('-', $stringFrom); $arrayTo = explode('-', $stringTo); $timeFrom = mktime(0, 0, 0, $arrayFrom[1], $arrayFrom[2], $arrayFrom[0]); $timeTo = mktime(23, 59, 59, $arrayTo[1], $arrayTo[2], $arrayTo[0]); if ($selection instanceof umiSelection) { $selection->addPropertyFilterBetween($type->getFieldId('publish_time'), $timeFrom, $timeTo); } elseif ($selection instanceof selector) { $selection->where('publish_time')->between($timeFrom, $timeTo); } } else { if (strlen($stringFrom) && !strlen($stringTo)) { $arrayFrom = explode('-', $stringFrom); $timeFrom = mktime(0, 0, 0, $arrayFrom[1], $arrayFrom[2], $arrayFrom[0]); if ($selection instanceof umiSelection) { $selection->addPropertyFilterMore($type->getFieldId('publish_time'), $timeFrom); } elseif ($selection instanceof selector) { $selection->where('publish_time')->more($timeFrom); } } else { if (strlen($stringTo)) { $arrayTo = explode('-', $stringTo); $timeTo = mktime(23, 59, 59, $arrayTo[1], $arrayTo[2], $arrayTo[0]); if ($selection instanceof umiSelection) { $selection->addPropertyFilterLess($type->getFieldId('publish_time'), $timeTo); } elseif ($selection instanceof selector) { $selection->where('publish_time')->less($timeTo); } } } } }