query
stringlengths 9
43.3k
| document
stringlengths 17
1.17M
| metadata
dict | negatives
listlengths 0
30
| negative_scores
listlengths 0
30
| document_score
stringlengths 5
10
| document_rank
stringclasses 2
values |
---|---|---|---|---|---|---|
Generated from protobuf field int32 detection_id = 3; | public function setDetectionId($var)
{
GPBUtil::checkInt32($var);
$this->detection_id = $var;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getDetectionId()\n {\n return $this->detection_id;\n }",
"public function getDetectionClass()\n {\n return $this->detection_class;\n }",
"public function getId() {\n\t\treturn (string) $this->photo['id'];\n\t}",
"public function getGamerId()\n {\n $value = $this->get(self::GAMER_ID);\n return $value === null ? (integer)$value : $value;\n }",
"public function getGameId(): int\n {\n return $this->gameId;\n }",
"public function getId()\n\t{\n\t\treturn $this->googleDriveFile->getId();\n\t}",
"public function determineId() {}",
"public function getId()\n {\n return $this->_imageId;\n }",
"public function getId(): int\n {\n $idSplit = explode('.', $this->data['externalidField']);\n return $idSplit[1] ?? $this->data['externalidField'];\n }",
"public function getId() {\r\n\r\n return $this->getGameManager()->getGameId($this);\r\n\r\n }",
"public function getPictureId()\n {\n return $this->pictureId;\n }",
"public function getId(): int\n {\n return (int)substr($this->token, 0, strpos($this->token, ':'));\n }",
"public function getVideoId();",
"public function getPhotoId()\n {\n return $this->photoId;\n }",
"public function setDetectionClass($var)\n {\n GPBUtil::checkString($var, True);\n $this->detection_class = $var;\n\n return $this;\n }",
"public function getTrackingId()\n {\n if (isset($this->data['TrackingId'])) {\n return $this->data['TrackingId'];\n } else {\n return false;\n }\n }",
"public function getId()\n {\n return $this->file->get('id');\n }",
"public function getTrackingId()\n {\n return $this->trackingId;\n }",
"public function getGameId(){\n\t\treturn $this->gameId;\n\t}",
"function getImageId();",
"public function getId()\n {\n switch ($this->type) {\n case VideoInfo::TYPE_YOUTUBE:\n return app(InferYoutubeId::class)($this->info->url);\n case VideoInfo::TYPE_VIMEO:\n return $this->info->video_id;\n }\n return null;\n }",
"public function getId() : int\n {\n return $this->getValue('nb_icontact_prospect_id');\n }",
"public function getMediaId();",
"public function getIdVideoInfo()\n {\n return $this->idVideoInfo;\n }",
"public function getMagicNumber()\n {\n return $this->readOneof(1);\n }",
"public function getId()\n {\n $tmp = (array) $this->getHeaderFieldModel($this->getIdField());\n\n return $this->headers->has($this->getIdField()) ? current($tmp) : $this->id;\n }",
"private function computeId(): void\n {\n /** @noinspection JsonEncodingApiUsageInspection */\n $this->id = md5(\n json_encode(\n [\n $this->simulation->id,\n $this->fn,\n $this->useEndpoints,\n $this->usePerturbation,\n collect($this->findByTags)->map(fn($t) => strtolower($t))->sort()->toArray(),\n $this->searchMode\n ]\n )\n );\n }",
"public function id()\n {\n if (!$this->object->getValue()) {\n return null;\n }\n\n /* @var \\Anomaly\\VideoFieldType\\Matcher\\Contract\\MatcherInterface $matcher */\n $matcher = dispatch_now(new GetMatcher($this->object->getValue()));\n\n return $matcher->id($this->object->getValue());\n }",
"public static function getHolderID();",
"public function getTrackingID()\n {\n return $this->trackingID;\n }"
]
| [
"0.7689458",
"0.5350284",
"0.5243273",
"0.5230687",
"0.5138672",
"0.5099635",
"0.50109506",
"0.49675262",
"0.494784",
"0.49134162",
"0.48817244",
"0.48485684",
"0.48055425",
"0.4771033",
"0.47501564",
"0.47292325",
"0.47213992",
"0.47014728",
"0.4695155",
"0.4649501",
"0.46366188",
"0.45979932",
"0.45795012",
"0.45765346",
"0.4536567",
"0.45358166",
"0.45346543",
"0.4530903",
"0.45189694",
"0.45155185"
]
| 0.7037807 | 1 |
Generated from protobuf field string detection_class = 4; | public function getDetectionClass()
{
return $this->detection_class;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setDetectionClass($var)\n {\n GPBUtil::checkString($var, True);\n $this->detection_class = $var;\n\n return $this;\n }",
"abstract public static function detect();",
"public function getDetectionId()\n {\n return $this->detection_id;\n }",
"public function detector(): Detect;",
"public function getClassification()\n {\n return $this->classification;\n }",
"public static function getVerifiedClass() {\n if ( self::getVerified() ) {\n return 'green';\n }\n return 'red';\n }",
"public function getFamilyClass() {}",
"protected function getCandidateType()\n {\n if (!$this->detectedType) {\n $this->detectedType = $this->detectType();\n }\n\n return $this->detectedType;\n }",
"public function get_class_ID()\n {\n return CGHBVRQQualification::ID;\n }",
"public function getClass(): string\n {\n foreach ($this->resourceRecords as $resourceRecord) {\n if (null !== $resourceRecord->getClass()) {\n return $resourceRecord->getClass();\n }\n }\n\n return Classes::INTERNET;\n }",
"public function setDetectionType($type = null)\n\t\t{\n\t\t\tif ($type === null) {\n\t\t\t\t$type = self::DETECTION_TYPE_MOBILE;\n\t\t\t}\n\n\t\t\tif ($type != self::DETECTION_TYPE_MOBILE && $type != self::DETECTION_TYPE_EXTENDED) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$this->detectionType = $type;\n\t\t}",
"public function setDetectionId($var)\n {\n GPBUtil::checkInt32($var);\n $this->detection_id = $var;\n\n return $this;\n }",
"public function getClassificationName()\n {\n return $this->classification_name;\n }",
"public function getStatusClass() {\n return intval(floor($this->_status / 100));\n }",
"public function getCollectedClass(): string\n {\n return $this->collected_class;\n }",
"public function getMimeBasedClassname() {\n $mime = $this->getData('mediatype');\n return strstr($mime, '/', true);\n }",
"public function getImageClass()\n {\n return $this->image_class;\n }",
"function getActualClass(){\n\t\treturn $this->nmclass;\n\t}",
"public function setClassification($v)\n {\n if ($v !== null) {\n $v = (string) $v;\n }\n\n if ($this->classification !== $v) {\n $this->classification = $v;\n $this->modifiedColumns[BiblioTableMap::COL_CLASSIFICATION] = true;\n }\n\n return $this;\n }",
"public function getClassAnnotations(string $class): array;",
"function tsuiseki_tracking_get_css_class() {\n $css = TSUISEKI_TRACKER_CSS_CLASS;\n if (empty($css)) {\n $css = (string)trim(get_option('tsuiseki_tracking_css_class'));\n }\n return $css;\n}",
"public function getStatusclassAttribute()\n {\n switch ($this->status) {\n case Meeting::$STATUS_NEW:\n return \"fc-new-meeting\";\n case Meeting::$STATUS_ATTENDED:\n return \"fc-attend-meeting\";\n case Meeting::$STATUS_ABSENT:\n return \"fc-absent-meeting\";\n default:\n return \"Unknown Status: \" . $this->status;\n }\n }",
"function get_descriptive_classification( $classification ) {\n switch ( $classification ) {\n case 1: $out = 'LL'; break;\n case 2: $out = 'LS'; break;\n case 3: $out = 'LH'; break;\n case 4: $out = 'LE'; break;\n\t\t\tcase 5: $out = 'OHS'; break;\n\t\t\tcase 6: $out = 'Q'; break;\n\t\t\tcase 7: $out = 'P'; break;\n default: $out = 'Undefined'; break;\n }\n return $out;\n }",
"public function getType( bool $forceDetection = FALSE ): int\n\t{\n\t\tif( self::TYPE_UNKNOWN === $this->type || $forceDetection ){\n\t\t\tif( $this instanceof MessagePartInlineImage )\n\t\t\t\t$this->type\t= static::TYPE_INLINE_IMAGE;\n\t\t\telse if( $this instanceof MessagePartMail )\n\t\t\t\t$this->type\t= static::TYPE_MAIL;\n\t\t\telse if( $this instanceof MessagePartAttachment )\n\t\t\t\t$this->type\t= static::TYPE_ATTACHMENT;\n\t\t\telse if( $this instanceof MessagePartHTML )\n\t\t\t\t$this->type\t= static::TYPE_HTML;\n\t\t\telse if( $this instanceof MessagePartText )\n\t\t\t\t$this->type\t= static::TYPE_TEXT;\n\t\t}\n\t\treturn $this->type;\n\t}",
"abstract function detect(array $http);",
"function GetClass() {\n\t\tswitch($this->type) {\n\t\t\tcase BLOCK_PAGE: return \"page\";\n\t\t\tcase \"T_FUNCTION\": return \"function\";\n\t\t\tcase \"T_CLASS\": return \"class\";\n\t\t\tcase \"T_INTERFACE\": return \"interface\";\n\t\t\tcase \"T_STRING\": return \"define\";\n\t\t\tcase \"T_INCLUDE\": case \"T_INCLUDE_ONCE\": case \"T_REQUIRE\": case \"T_REQUIRE_ONCE\": return \"include\";\n\t\t}\n\t\treturn \"\";\n\t}",
"public function getSource()\n {\n return 'classification';\n }",
"function earthquakeClass(string $value)\n {\n // Class\tMagnitude\n // Great\t8 or more\n // Major\t7 - 7.9\n // Strong\t6 - 6.9\n // Moderate\t5 - 5.9\n // Light\t4 - 4.9\n // Minor\t3 - 3.9\n if ((int)$value >= 8) {\n return 'Great';\n } elseif ((int)$value == 7) {\n return 'Major';\n } elseif ((int)$value == 6) {\n return 'Strong';\n } elseif ((int)$value == 5) {\n return 'Moderate';\n } elseif ((int)$value == 4) {\n return 'Light';\n } elseif ((int)$value == 3) {\n return 'Minor';\n } else {\n return 'Negligible';\n }\n }",
"public function setDetectionType(?Win32LobAppFileSystemDetectionType $value): void {\n $this->getBackingStore()->set('detectionType', $value);\n }",
"public function getFeatureClass ($feature);"
]
| [
"0.76851404",
"0.5568269",
"0.5485261",
"0.5476471",
"0.5427775",
"0.52677506",
"0.5258469",
"0.5161848",
"0.49667016",
"0.4836566",
"0.48180425",
"0.4815602",
"0.47887242",
"0.47630548",
"0.475217",
"0.46893963",
"0.4687226",
"0.46643898",
"0.4662026",
"0.46571922",
"0.4639721",
"0.4627408",
"0.46136686",
"0.460702",
"0.45930332",
"0.45929193",
"0.45650464",
"0.4560051",
"0.4552929",
"0.45513737"
]
| 0.7694972 | 0 |
Generated from protobuf field string detection_class = 4; | public function setDetectionClass($var)
{
GPBUtil::checkString($var, True);
$this->detection_class = $var;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getDetectionClass()\n {\n return $this->detection_class;\n }",
"abstract public static function detect();",
"public function getDetectionId()\n {\n return $this->detection_id;\n }",
"public function detector(): Detect;",
"public function getClassification()\n {\n return $this->classification;\n }",
"public static function getVerifiedClass() {\n if ( self::getVerified() ) {\n return 'green';\n }\n return 'red';\n }",
"public function getFamilyClass() {}",
"protected function getCandidateType()\n {\n if (!$this->detectedType) {\n $this->detectedType = $this->detectType();\n }\n\n return $this->detectedType;\n }",
"public function get_class_ID()\n {\n return CGHBVRQQualification::ID;\n }",
"public function getClass(): string\n {\n foreach ($this->resourceRecords as $resourceRecord) {\n if (null !== $resourceRecord->getClass()) {\n return $resourceRecord->getClass();\n }\n }\n\n return Classes::INTERNET;\n }",
"public function setDetectionType($type = null)\n\t\t{\n\t\t\tif ($type === null) {\n\t\t\t\t$type = self::DETECTION_TYPE_MOBILE;\n\t\t\t}\n\n\t\t\tif ($type != self::DETECTION_TYPE_MOBILE && $type != self::DETECTION_TYPE_EXTENDED) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$this->detectionType = $type;\n\t\t}",
"public function setDetectionId($var)\n {\n GPBUtil::checkInt32($var);\n $this->detection_id = $var;\n\n return $this;\n }",
"public function getClassificationName()\n {\n return $this->classification_name;\n }",
"public function getStatusClass() {\n return intval(floor($this->_status / 100));\n }",
"public function getCollectedClass(): string\n {\n return $this->collected_class;\n }",
"public function getMimeBasedClassname() {\n $mime = $this->getData('mediatype');\n return strstr($mime, '/', true);\n }",
"public function getImageClass()\n {\n return $this->image_class;\n }",
"function getActualClass(){\n\t\treturn $this->nmclass;\n\t}",
"public function setClassification($v)\n {\n if ($v !== null) {\n $v = (string) $v;\n }\n\n if ($this->classification !== $v) {\n $this->classification = $v;\n $this->modifiedColumns[BiblioTableMap::COL_CLASSIFICATION] = true;\n }\n\n return $this;\n }",
"public function getClassAnnotations(string $class): array;",
"function tsuiseki_tracking_get_css_class() {\n $css = TSUISEKI_TRACKER_CSS_CLASS;\n if (empty($css)) {\n $css = (string)trim(get_option('tsuiseki_tracking_css_class'));\n }\n return $css;\n}",
"public function getStatusclassAttribute()\n {\n switch ($this->status) {\n case Meeting::$STATUS_NEW:\n return \"fc-new-meeting\";\n case Meeting::$STATUS_ATTENDED:\n return \"fc-attend-meeting\";\n case Meeting::$STATUS_ABSENT:\n return \"fc-absent-meeting\";\n default:\n return \"Unknown Status: \" . $this->status;\n }\n }",
"function get_descriptive_classification( $classification ) {\n switch ( $classification ) {\n case 1: $out = 'LL'; break;\n case 2: $out = 'LS'; break;\n case 3: $out = 'LH'; break;\n case 4: $out = 'LE'; break;\n\t\t\tcase 5: $out = 'OHS'; break;\n\t\t\tcase 6: $out = 'Q'; break;\n\t\t\tcase 7: $out = 'P'; break;\n default: $out = 'Undefined'; break;\n }\n return $out;\n }",
"public function getType( bool $forceDetection = FALSE ): int\n\t{\n\t\tif( self::TYPE_UNKNOWN === $this->type || $forceDetection ){\n\t\t\tif( $this instanceof MessagePartInlineImage )\n\t\t\t\t$this->type\t= static::TYPE_INLINE_IMAGE;\n\t\t\telse if( $this instanceof MessagePartMail )\n\t\t\t\t$this->type\t= static::TYPE_MAIL;\n\t\t\telse if( $this instanceof MessagePartAttachment )\n\t\t\t\t$this->type\t= static::TYPE_ATTACHMENT;\n\t\t\telse if( $this instanceof MessagePartHTML )\n\t\t\t\t$this->type\t= static::TYPE_HTML;\n\t\t\telse if( $this instanceof MessagePartText )\n\t\t\t\t$this->type\t= static::TYPE_TEXT;\n\t\t}\n\t\treturn $this->type;\n\t}",
"abstract function detect(array $http);",
"function GetClass() {\n\t\tswitch($this->type) {\n\t\t\tcase BLOCK_PAGE: return \"page\";\n\t\t\tcase \"T_FUNCTION\": return \"function\";\n\t\t\tcase \"T_CLASS\": return \"class\";\n\t\t\tcase \"T_INTERFACE\": return \"interface\";\n\t\t\tcase \"T_STRING\": return \"define\";\n\t\t\tcase \"T_INCLUDE\": case \"T_INCLUDE_ONCE\": case \"T_REQUIRE\": case \"T_REQUIRE_ONCE\": return \"include\";\n\t\t}\n\t\treturn \"\";\n\t}",
"public function getSource()\n {\n return 'classification';\n }",
"function earthquakeClass(string $value)\n {\n // Class\tMagnitude\n // Great\t8 or more\n // Major\t7 - 7.9\n // Strong\t6 - 6.9\n // Moderate\t5 - 5.9\n // Light\t4 - 4.9\n // Minor\t3 - 3.9\n if ((int)$value >= 8) {\n return 'Great';\n } elseif ((int)$value == 7) {\n return 'Major';\n } elseif ((int)$value == 6) {\n return 'Strong';\n } elseif ((int)$value == 5) {\n return 'Moderate';\n } elseif ((int)$value == 4) {\n return 'Light';\n } elseif ((int)$value == 3) {\n return 'Minor';\n } else {\n return 'Negligible';\n }\n }",
"public function setDetectionType(?Win32LobAppFileSystemDetectionType $value): void {\n $this->getBackingStore()->set('detectionType', $value);\n }",
"public function getFeatureClass ($feature);"
]
| [
"0.7694972",
"0.5568269",
"0.5485261",
"0.5476471",
"0.5427775",
"0.52677506",
"0.5258469",
"0.5161848",
"0.49667016",
"0.4836566",
"0.48180425",
"0.4815602",
"0.47887242",
"0.47630548",
"0.475217",
"0.46893963",
"0.4687226",
"0.46643898",
"0.4662026",
"0.46571922",
"0.4639721",
"0.4627408",
"0.46136686",
"0.460702",
"0.45930332",
"0.45929193",
"0.45650464",
"0.4560051",
"0.4552929",
"0.45513737"
]
| 0.76851404 | 1 |
Generated from protobuf field repeated .Attribute attributes = 5; | public function setAttributes($var)
{
$arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Attribute::class);
$this->attributes = $arr;
return $this;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function defineAttributes()\n\t{\n\t\treturn array();\n\t}",
"public function attributes()\n {\n return [\n //\n ];\n }",
"public function attributes()\n {\n return [\n //\n ];\n }",
"public function attributes()\n {\n return [\n //\n ];\n }",
"public function attributes()\n {\n return [\n //\n ];\n }",
"public function attributes()\n {\n return [\n //\n ];\n }",
"public function attributes()\n {\n return [\n //\n ];\n }",
"public function attributes()\n {\n return [\n //\n ];\n }",
"public function attributes()\n {\n return [\n //\n ];\n }",
"public function attributes()\n {\n return [\n //\n ];\n }",
"public function defineAttributes()\n {\n return array(\n 'id' => AttributeType::Number,\n 'receiptParagraphOne' => AttributeType::String,\n 'receiptParagraphTwo' => AttributeType::String,\n 'receiptParagraphThree' => AttributeType::String,\n 'notifyEmail' => AttributeType::String\n );\n }",
"public function attributes() : array;",
"protected function defineAttributes()\n {\n return array_merge(parent::defineAttributes(), array(\n 'Amount' => array(AttributeType::Number, 'decimals' => 0),\n 'GrossNet' => AttributeType::String,\n 'Id' => AttributeType::String,\n 'Period' => AttributeType::String,\n 'Type' => AttributeType::String\n ));\n }",
"public function attributes();",
"public function defineAttributes()\n {\n return array(\n 'id' => AttributeType::Number,\n 'receiptBody' => AttributeType::String,\n );\n }",
"protected function defineAttributes()\n\t{\n\t\treturn array_merge(parent::defineAttributes(), array(\n\t\t\t'id' => AttributeType::Number,\n\t\t\t'label' => array(AttributeType::String, 'default' => '', 'required' => true),\n\t\t\t'key' => array(AttributeType::Handle, 'default' => '', 'required' => true),\n\t\t\t'value' => array(AttributeType::String, 'default' => '', 'required' => true),\n\t\t));\n\t}",
"public function getAttributes()\n {\n return [\n Attributes\\IdAttribute::make(),\n Attributes\\TextAttribute::make('name')\n ->setRequired(true)\n ->setUnique(true),\n Attributes\\LongTextAttribute::make('description'),\n Attributes\\TextAttribute::make('filter'),\n Attributes\\EnumAttribute::make('class_name', config('amethyst.data-builder.data.data-builder.attributes.class_name.options')),\n Attributes\\YamlAttribute::make('class_arguments'),\n Attributes\\YamlAttribute::make('mock_data'),\n Attributes\\YamlAttribute::make('input'),\n Attributes\\TextAttribute::make('include'),\n Attributes\\CreatedAtAttribute::make(),\n Attributes\\UpdatedAtAttribute::make(),\n Attributes\\DeletedAtAttribute::make(),\n ];\n }",
"protected function defineAttributes()\n\t{\n\t\treturn array(\n\t\t\t'id' => AttributeType::Number,\n\t\t\t'type' => AttributeType::String,\n\t\t\t'date' => AttributeType::DateTime,\n\t\t\t'context' => AttributeType::String,\n\t\t\t'settings' => AttributeType::Mixed,\n\t\t);\n\t}",
"public function attributes(): array\n {\n return [\n //\n ];\n }",
"public function attributes(): array\n {\n return [\n //\n ];\n }",
"protected function defineAttributes()\n {\n return [\n 'name' => [AttributeType::String, 'required' => true],\n 'handle' => [AttributeType::Handle, 'required' => true],\n 'color' => [AttributeType::Enum,\n 'values' => ['green', 'red'],\n 'required' => true,\n 'default' => 'green'\n ],\n 'sortOrder' => [AttributeType::SortOrder],\n 'isDefault' => [AttributeType::Bool, 'default' => 0]\n ];\n }",
"protected function defineAttributes()\n {\n return array_merge(parent::defineAttributes(), array(\n 'Id' => AttributeType::String,\n 'Section' => AttributeType::String,\n 'SequenceNr' => AttributeType::Number,\n 'Text' => AttributeType::String,\n 'Type' => AttributeType::String,\n ));\n }",
"abstract function attributes(): array;",
"public function attributes()\n {\n return [\n ];\n }",
"public function getCustomAttributes(): array;",
"public function getAttributes()\n {\n return [\n Attributes\\IdAttribute::make(),\n \\Amethyst\\Core\\Attributes\\DataNameAttribute::make('model')\n ->setRequired(true)\n ->setMutable(false),\n Attributes\\TextAttribute::make('name')\n ->setRequired(true)\n ->setValidator(function (EntityContract $entity, $value) {\n return preg_match('/^[a-zA-Z_][a-zA-Z0-9_]*$/', $value);\n }),\n Attributes\\LongTextAttribute::make('description'),\n Attributes\\EnumAttribute::make('schema', array_keys(Config::get('amethyst.attribute-schema.resolvers')))\n ->setRequired(true),\n Attributes\\BooleanAttribute::make('required')\n ->setDefault(function (EntityContract $entity) {\n return false;\n }),\n Attributes\\TextAttribute::make('regex')\n ->setRequired(false)\n ->setValidator(function (EntityContract $entity, $value) {\n try {\n return preg_match($value, null) !== false;\n } catch (\\Throwable $exception) {\n return false;\n }\n }),\n Attributes\\YamlAttribute::make('options')\n ->setValidator(function (EntityContract $entity, $value) {\n $options = (object) Yaml::parse((string) $attributeRaw->options);\n }),\n Attributes\\TextAttribute::make('require')\n ->setFillable(false)\n ->setMutable(false),\n Attributes\\CreatedAtAttribute::make(),\n Attributes\\UpdatedAtAttribute::make(),\n Attributes\\DeletedAtAttribute::make(),\n ];\n }",
"public function getAttributes(): array;",
"public function getAttributes(): array;",
"public function getAttributes(): array;",
"public function getAttributes(): array;"
]
| [
"0.61131626",
"0.60453475",
"0.60453475",
"0.60453475",
"0.60453475",
"0.60453475",
"0.60453475",
"0.60453475",
"0.60453475",
"0.60453475",
"0.6035549",
"0.6022645",
"0.60178375",
"0.60088575",
"0.5990631",
"0.597444",
"0.5972229",
"0.59627765",
"0.59532726",
"0.59532726",
"0.59441674",
"0.59409255",
"0.59319544",
"0.5925857",
"0.5862246",
"0.5806499",
"0.58014905",
"0.58014905",
"0.58014905",
"0.58014905"
]
| 0.6291132 | 0 |
get achievement main category | function achieve_get_main_category()
{
global $sql;
$main_cat = array();
$result = $sql["dbc"]->query("SELECT ID, Name FROM achievement_category WHERE ParentID=-1 and ID<>1 ORDER BY `GroupID` ASC");
while ($main_cat[] = $sql["dbc"]->fetch_assoc($result));
return $main_cat;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function get_category()\n {\n return 'Fun and Games';\n }",
"public function get_category()\n {\n return 'Fun and Games';\n }",
"public function get_category()\n {\n return 'Fun and Games';\n }",
"public function getAchievementCategories() { return $this->AchievementCategories; }",
"function getCategory() {\n // Load categories.\n $categories = userpoints_get_categories();\n return isset($categories[$this->getTid()]) ? $categories[$this->getTid()] : $categories[userpoints_get_default_tid()];\n }",
"public function getCategory() {}",
"function the_category() {\n\tglobal $discussion;\n\treturn $discussion['category'];\n}",
"public function category() {\n\t\treturn $this->get_category();\n\t}",
"public function getCategory()\n {\n\t\treturn self::$categories[ $this->category ];\n }",
"public function getCategory();",
"public function getCategory();",
"public static function getCategory()\n {\n return self::$category;\n }",
"public function category() {\n\t\treturn static::get_thrive_basic_label();\n\t}",
"function category(){\n\t\trequire('quizrooDB.php');\n\t\t$query = sprintf(\"SELECT cat_name FROM q_quiz_cat WHERE cat_id = %d\", GetSQLValueString($this->fk_quiz_cat, \"int\"));\n\t\t$getQuery = mysql_query($query, $quizroo) or die(mysql_error());\n\t\t$row_getQuery = mysql_fetch_assoc($getQuery);\n\t\treturn $row_getQuery['cat_name'];\n\t}",
"function getCategory() \n {\n return $this->instance->getCategory();\n }",
"public function category() {\n\t\treturn static::get_thrive_advanced_label();\n\t}",
"public function getCategory(): string;",
"public function get_category(){\n\t\treturn $this->category;\n\t}",
"public function getCategory()\n {\n return \"Injection Flaws\"; //See category.php for list of all the categories\n }",
"function achieve_get_sub_category()\r\n{\r\n global $sql;\r\n\r\n $sub_cat = array();\r\n $result = $sql[\"dbc\"]->query(\"SELECT ID, ParentID, Name FROM achievement_category WHERE ParentID<>-1 ORDER BY `GroupID` ASC\");\r\n $temp = $sql[\"dbc\"]->fetch_assoc($result);\r\n while ($sub_cat[$temp[\"ParentID\"]][$temp[\"ID\"]] = $temp[\"Name\"])\r\n {\r\n $temp = $sql[\"dbc\"]->fetch_assoc($result);\r\n }\r\n return $sub_cat;\r\n}",
"public function getMainCategoryAttribute()\n {\n $mainCategory = 'Uncategorized';\n\n if (! empty($this->terms)) {\n $taxonomies = array_values($this->terms);\n\n if (! empty($taxonomies[0])) {\n $terms = array_values($taxonomies[0]);\n\n $mainCategory = $terms[0];\n }\n }\n\n return $mainCategory;\n }",
"public function GetCategory()\r\n {\r\n return AppHelper::GetCategory($this->Core);\r\n }",
"public function getCategory()\n {\n }",
"public function getCategory()\n\t{\n\t\treturn $this->data['category'];\n\t}",
"public function get_category()\n {\n return $this->primary_category();\n }",
"public function getCategory()\n {\n return $this->category;\n }",
"public function getCategory()\n {\n return $this->category;\n }",
"function getMainCategory()\n {\n $sql = \"select * from tbl_issue_category where parent_id=0\";\n $query = $this->db->query($sql);\n return $query->result_array();\n }",
"function getCategory()\r\n\t\t{\r\n\t\t\treturn $this->category;\r\n\t\t\t\r\n\t\t}",
"function get_Category()\n {\n try {\n return $this->mCategory;\n }catch(Exception $e){\n $this->error->throwException('303', 'No s`ha pogut retornar la informació', $e);\n }\n }"
]
| [
"0.6870378",
"0.6870378",
"0.6870378",
"0.6811938",
"0.6756315",
"0.66453063",
"0.6571418",
"0.650833",
"0.64865017",
"0.64717835",
"0.64717835",
"0.644416",
"0.6429914",
"0.64065254",
"0.6350811",
"0.6332416",
"0.63123274",
"0.62535274",
"0.62401485",
"0.61982644",
"0.6195076",
"0.61723316",
"0.6163682",
"0.6155348",
"0.61550945",
"0.6149822",
"0.6149822",
"0.61452025",
"0.6136301",
"0.6105971"
]
| 0.7274885 | 0 |
get achievement sub category | function achieve_get_sub_category()
{
global $sql;
$sub_cat = array();
$result = $sql["dbc"]->query("SELECT ID, ParentID, Name FROM achievement_category WHERE ParentID<>-1 ORDER BY `GroupID` ASC");
$temp = $sql["dbc"]->fetch_assoc($result);
while ($sub_cat[$temp["ParentID"]][$temp["ID"]] = $temp["Name"])
{
$temp = $sql["dbc"]->fetch_assoc($result);
}
return $sub_cat;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function achieve_get_main_category()\r\n{\r\n global $sql;\r\n\r\n $main_cat = array();\r\n $result = $sql[\"dbc\"]->query(\"SELECT ID, Name FROM achievement_category WHERE ParentID=-1 and ID<>1 ORDER BY `GroupID` ASC\");\r\n while ($main_cat[] = $sql[\"dbc\"]->fetch_assoc($result));\r\n return $main_cat;\r\n}",
"function getProjectSubCategory($userData)\n\t\t{\n\t\t\t//get sub category from database\n\t\t\techo '<li class=\"pro_cat\"><a>'.$userData['category'].'</a></li>\n\t\t\t\t\t<ul class=\"profile_overview profile_1st_child_nav\">\n\t\t\t\t\t\t<li><i class=\"glyphicon glyphicon-chevron-right profile_ovr_icon\"></i><a>Sub Category 1</a></li>\n\t\t\t\t\t\t<li><i class=\"glyphicon glyphicon-chevron-right profile_ovr_icon\"></i><a>Sub Category 2</a></li>\n\t\t\t\t\t\t<li><i class=\"glyphicon glyphicon-chevron-right profile_ovr_icon\"></i><a>Sub Category 3</a></li>\n\t\t\t\t\t\t<li><i class=\"glyphicon glyphicon-chevron-right profile_ovr_icon\"></i><a>Sub Category 4</a></li>\n\t\t\t\t\t\t<li><i class=\"glyphicon glyphicon-chevron-right profile_ovr_icon\"></i><a>Sub Category 5</a></li>\n\t\t\t\t\t</ul>';\n\t\t}",
"public function getAchievementCategories() { return $this->AchievementCategories; }",
"public function getSub_category(){\n return $this->sub_category;\n }",
"public function getCategory() {}",
"public function getCategory();",
"public function getCategory();",
"public function getMenu(){\n $bigCategory = $this->getBigCategory();\n $medCategory = $this->getMediumCategory();\n foreach($bigCategory as $bigKey => $value){\n foreach($medCategory as $medKey => $val){\n if($val['parentId'] == $value['id']){\n $bigCategory[$bigKey]['subCategory'][] = $val;\n }\n }\n }\n return $bigCategory;\n }",
"public function get_sub_category_list()\n\t{\n\t\t$result = $this->db->from(\"category\")->where(array(\"category_status\" => 1,\"type\"=>2))->orderby(\"category_name\",\"ASC\")->get();\n\t\treturn $result;\n\t}",
"public function get_sub_category($category = \"\")\n\t{ \n\t\t$result = $this->db->from(\"category\")\n\t\t ->where(array(\"main_category_id\" => $category, \"category_status\" => 1,\"type\" => 2))\n\t ->orderby(\"category_name\")->get();\n\t\treturn $result;\n\t}",
"function get_cat_sub($cat_id,$level=0) {\nglobal $table_catcontent, $db;\n$list_info_cat=($level==0)?\"(-1\":\"\";\n$list_info_cat = $list_info_cat.\",\".$cat_id;\n$subcat_num = Check_sub_info($table_catcontent,$db,\" WHERE parent_id = '\".$cat_id.\"'\");\nif ($subcat_num>0) {\n\t$sql_query = \"SELECT * FROM `\" . $table_catcontent . \"` WHERE parent_id='\".$cat_id.\"' ORDER BY priority_order ASC\";\n\t$sql_query = mysql_query($sql_query);\n\twhile($sql_query_rows = mysql_fetch_array($sql_query)) {\n\t\t$list_info_cat = $list_info_cat.get_cat_sub($sql_query_rows['id'],1);\n\t\t}\n\t}\nreturn ($level==0)?$list_info_cat.\")\":$list_info_cat;\n}",
"function get_subcategoria($id){\t\n\t\t$sql=\"SELECT nombre_sub FROM subcategoria WHERE id_sub='$id'\";\n\t\t$consulta=mysql_query($sql) or die(mysql_error());\n\t\t$resultado=mysql_fetch_array($consulta);\n\n\t\treturn $resultado['nombre_sub'];\n\t}",
"public function topSubcategories_get()\n {\n $em = $this->doctrine->em;\n $subcategoriesRepo = $em->getRepository('Entities\\Subcategory');\n\n $subcategories = $subcategoriesRepo->findBy(array(), array('visits' => 'DESC'), 10);\n\n if ($subcategories) {\n $response[\"desc\"] = \"Subcategorias mas visitadas \";\n $response[\"count\"] = count($subcategories);\n $response[\"data\"] = $subcategories;\n } else {\n $response[\"desc\"] = 'No existen subcategorias mas visitadas';\n $response[\"count\"] = 0;\n $response[\"data\"] = array();\n }\n $this->set_response($response, REST_Controller::HTTP_OK);\n }",
"public function get_category()\n {\n return 'Fun and Games';\n }",
"public function get_category()\n {\n return 'Fun and Games';\n }",
"public function get_category()\n {\n return 'Fun and Games';\n }",
"function showSubCategory()\n\t {\n\t\t\n\t\t $prolist=new Actions();\n\t\t $res=$prolist->fetchAll(\"category\");\n\t\t\t\t\t\t\n\t\t $parentdata=mysql_query(\"select * from category where cat_par_id='0'\");\n\t\t while($parent_sub_cat=mysql_fetch_array($parentdata))\n\t\t {\n\t\t\techo '<option value=\"'.$parent_sub_cat['cat_id'].'\"> '.ucfirst($parent_sub_cat['cat_title']).'</option>';\n\t\t \t\t\t\n\t\t\t if(mysql_num_rows(mysql_query(\"select * from category where cat_par_id='\".$parent_sub_cat['cat_id'].\"'\"))>0)\n\t\t\t {\n\t\t\t\tActions::$r++;\n\t\t\t\tActions::viewCategory($parent_sub_cat['cat_id']);\n\t\t\t } \n\t\t\t \n\t\t }\t\t\t\t\t\t\n\t\t \n\t }",
"function get_sub_cat($cat_main, $catrow )\n{\n\tglobal $db;\n\n\tif ($cat_main > 0)\n\t{\n\t\t$sql= \"SELECT * FROM \".CATEGORIES_TABLE.\" WHERE cat_id <> $cat_main AND cat_main=$cat_main\";\n\t\tif( !($result = $db->sql_query($sql)) ) message_die(GENERAL_ERROR, 'Could not query categorie sons '.$sql, '', __LINE__, __FILE__, $sql);\n\t\twhile ( $catw = $db->sql_fetchrow($result) )\n\t\t{\n\t\t\t$i = count($catrow);\n\t\t\t$catrow[$i] = $catw;\n\t\t\tif ($catw['cat_id'] > 0)\n\t\t\t\t$catrow = get_sub_cat($catw['cat_id'],$catrow);\n\t\t}\n\t}\n\treturn $catrow;\n}",
"public function fetch_subcategory() {\n $this->db->where('parent_id!=', '0');\n $r = $this->db->get('category');\n return $r->result_array();\n }",
"public function getSubcategoryId() {\r\n return $this->subcategoryId;\r\n }",
"function getCategory() \n {\n return $this->instance->getCategory();\n }",
"public function getCategory(): string;",
"public function getCategory()\n {\n }",
"public function getSubMenu(){\n\t\t$catalogue = $this->getMenu()->content;\n\t\tforeach($catalogue as $first){\n\t\t\t$noms_sub_menu = $this->GetHTTP(\n\t\t\t\t'https://api.zalando.com/categories', array(\n\t\t\t\t\t'key' => implode(\",\", $first->childKeys),\n\t\t\t\t\t'pageSize' => '20000')\n\t\t\t)->content;\n\t\t\tfor ($i = 0; $i < count($first->childKeys); $i++){\n\t\t\t\t$first->childKeys[$noms_sub_menu[$i]->key] = $first->childKeys[$i];\n\t\t\t\t$first->childKeys[$noms_sub_menu[$i]->key] = $noms_sub_menu[$i]->name;\n\t\t\t\tunset($first->childKeys[$i]);\n\t\t\t}\n\t\t}\n\t\treturn $catalogue;\n\t}",
"public function subcategory()\n\t{\n\t\t$this->db->select('*');\n\t\t$this->db->from($this->pro->prifix.$this->pro->category);\n\t\t$this->db->order_by($this->pro->category.'_id','desc');\n\t\t$this->db->order_by($this->pro->category.'_parent','desc');\n\t\t$this->db->where($this->pro->category.'_status','1');\n\t\t$this->db->where($this->pro->category.'_parent>',0);\n\t\t$rs = $this->db->get();\n\t\t//echo $this->db->last_query();\n\t\treturn $rs->result_array();\n\t\t\n\t}",
"public function get_sub_category(){\r\n $this->datatables->select('s.cat_id,s.sub_cat_id,c.cat_name,s.sub_cat_name');\r\n $this->datatables->join( 'o-cakes_category c', 's.cat_id = c.cat_id', 'left' );\r\n $this->datatables->from('o-cakes_sub_cat s');\r\n $this->datatables->where('s.sub_cat_status',1);\r\n $result = $this->datatables->generate();\r\n echo $result;\r\n }",
"function get_sub_category_info( $sub_cate_id, $sub_cate_status = 0 )\n\t{\n\t\t$criteria = $sub_cate_status == 1 ? \"sub_cate_status = 1 AND \" : \"\";\n\t\t$q = \"SELECT * FROM title_dev_sub_categories WHERE \".$criteria.\" sub_cate_id = \".$sub_cate_id;\n\t\t$r = $this -> db -> getSingleRecord( $q );\n\t\tif( $r )\n\t\t\treturn $r;\n\t\telse\n\t\t\treturn false;\n\t}",
"function getMainCategory()\n {\n $sql = \"select * from tbl_issue_category where parent_id=0\";\n $query = $this->db->query($sql);\n return $query->result_array();\n }",
"public function getSubCategory()\n {\n if (array_key_exists(\"subCategory\", $this->_propDict)) {\n if (is_a($this->_propDict[\"subCategory\"], \"\\Beta\\Microsoft\\Graph\\SecurityNamespace\\Model\\SubCategory\") || is_null($this->_propDict[\"subCategory\"])) {\n return $this->_propDict[\"subCategory\"];\n } else {\n $this->_propDict[\"subCategory\"] = new SubCategory($this->_propDict[\"subCategory\"]);\n return $this->_propDict[\"subCategory\"];\n }\n }\n return null;\n }",
"function getSubCategory($category)\n\t\t{\n\t\t\t//get values of sub category of this category\n\t\t\t$subcatList = $this->manageContent->getValue_where('subcategory', '*', 'categoryId', $category);\n\t\t\tif(!empty($subcatList[0]))\n\t\t\t{\n\t\t\t\tforeach($subcatList as $subcat)\n\t\t\t\t{\n\t\t\t\t\techo '<option value=\"'.$subcat['subCategoryId'].'\">'.$subcat['name'].'</option>';\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\techo '<option>No Subcategory</option>';\n\t\t\t}\n\t\t}"
]
| [
"0.72061515",
"0.6711597",
"0.6661108",
"0.6615862",
"0.65241337",
"0.63100463",
"0.63100463",
"0.627684",
"0.6225231",
"0.6208588",
"0.61809105",
"0.6161485",
"0.6149699",
"0.6127967",
"0.6127967",
"0.6127967",
"0.611247",
"0.6107959",
"0.60363334",
"0.60246027",
"0.60006267",
"0.59847003",
"0.5967757",
"0.5961548",
"0.5951463",
"0.5927971",
"0.59236735",
"0.5910875",
"0.5898361",
"0.58499247"
]
| 0.7583286 | 0 |
get achievement details by its id | function achieve_get_details($id)
{
global $sql;
$result = ($sql["dbc"]->query("SELECT id, name, description, reward, points FROM achievement WHERE id='".$id."' LIMIT 1"));
$details = $sql["dbc"]->fetch_assoc($result);
return $details;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getAchievementById($achievementId)\n {\n $data = $this->db->query(\n 'SELECT id, charactergroupsgroup_id, pos, title, url, hash, description, achievementsmedia_id '.\n 'FROM charactergroupsachievements '.\n 'WHERE id = ?',\n 'i',\n $achievementId\n );\n if(empty($data)) {\n throw new \\nre\\exceptions\\IdNotFoundException($achievementId);\n }\n\n\n return $data[0];\n }",
"public function checkAchievementId($p_achievement_id){\n $stmt = $this->adapter->conn->prepare(\n \"SELECT achievement_id \".\n \"FROM ACHIEVEMENT \".\n \"WHERE achievement_id = ?;\");\n $stmt->bindParam(1,$p_achievement_id);\n $result = $this->adapter->executeFetchPrepared($stmt);\n return $result;\n }",
"public function get($id){\n\t\t$sql = $this->db->prepare(\"SELECT * FROM tracking WHERE id = :id\");\n\t\t$sql->execute();\n\n\t\treturn $sql->fetch(PDO::FETCH_ASSOC);\n\t}",
"public function get( $id ){}",
"public function getAchievementRecordInfo($p_achievement_id, $p_pet_id){\n $stmt = $this->adapter->conn->prepare(\n \"SELECT A.* , B.achievement_name, B.description\". \n \" FROM ACHIEVEMENT_RECORD A join ACHIEVEMENT B on A.achievement_id = B.achievement_id\".\n \" WHERE A.achievement_id = ? and A.pet_id = ?;\");\n\n $stmt->bindParam(1,$p_achievement_id);\n $stmt->bindParam(2,$p_pet_id);\n try{\n $result = $this->adapter->executeFetchPrepared($stmt);\n }catch(PDOException $e){\n return null;\n }\n return $result;\n }",
"public function getById($id){\n return $this->_query->getById(\"id_acta\", $id);\n }",
"public function get( $id );",
"public function get(string $id);",
"public function get($id);",
"public function get($id);",
"public function get($id);",
"public function get($id);",
"public function get($id);",
"public function get($id);",
"public function get($id);",
"public function get($id);",
"public function get($id);",
"public function get($id);",
"public function get($id);",
"public function get($id);",
"public function get($id);",
"public function get($id);",
"public function get($id);",
"public function get($id);",
"public function get($id);",
"public function get($id);",
"public function get($id);",
"public function get($id);",
"public function getById( $id );",
"function getAccessEntry($id);"
]
| [
"0.69263995",
"0.67529386",
"0.64793265",
"0.64174473",
"0.6417173",
"0.6373577",
"0.630916",
"0.62361795",
"0.620923",
"0.620923",
"0.620923",
"0.620923",
"0.620923",
"0.620923",
"0.620923",
"0.620923",
"0.620923",
"0.620923",
"0.620923",
"0.620923",
"0.620923",
"0.620923",
"0.620923",
"0.620923",
"0.620923",
"0.620923",
"0.620923",
"0.620923",
"0.6199412",
"0.6124768"
]
| 0.74833083 | 0 |
get achievement icon if icon not exists in item_icons folder D/L it from web. | function achieve_get_icon($achieveid)
{
global $proxy_cfg, $get_icons_from_web, $item_icons, $sql;
$result = $sql["dbc"]->query("SELECT spellIcon FROM achievement WHERE id='".$achieveid."' LIMIT 1");
if ($result)
$displayid = $sql["dbc"]->result($result, 0);
else
$displayid = 0;
if ($displayid)
{
$result = $sql["dbc"]->query("SELECT Name FROM spellicon WHERE ID='".$displayid."' LIMIT 1");
if($result)
{
$achieve = $sql["dbc"]->result($result, 0);
// this_is_junk: we now extract data unaltered from the DBCs, so the spell icons have paths,
// we remove them.
// The parser reads \ as starting an escape sequence, so we have to
// escape to make \
$temp = explode("\\", $achieve);
// get the last field
$achieve = $temp[count($temp) - 1];
if ($achieve)
{
//if (file_exists(''.$item_icons.'/'.$achieve.'.png'))
//{
//if (filesize(''.$item_icons.'/'.$achieve.'.png') > 349)
//{
return ''.$item_icons.'/'.$achieve.'.png';
//}
//else
//{
// this_is_junk: disabled deletion from DBC data
//$sql["mgr"]->query('DELETE FROM spellicon WHERE id = '.$displayid.'');
//if (file_exists(''.$item_icons.'/'.$achieve.'.png'))
// unlink(''.$item_icons.'/'.$achieve.'.png');
//$achieve = '';
//}
//}
//else
//$achieve = '';
}
else
$achieve = '';
}
else
$achieve = '';
}
else
$achieve = '';
// this_is_junk: yeah, this doesn't work, live with it. :)
/*if($get_icons_from_web)
{
$xmlfilepath='http://www.wowhead.com/?achievement=';
$proxy = $proxy_cfg["addr"];
$port = $proxy_cfg["port"];
if (empty($proxy_cfg["addr"]))
{
$proxy = 'www.wowhead.com';
$xmlfilepath = '?achievement=';
$port = 80;
}
if ($achieve == '')
{
//get the icon name
$fp = @fsockopen($proxy, $port, $errno, $errstr, 0.5);
if ($fp);
else
return 'img/INV/INV_blank_32.gif';
$out = "GET /$xmlfilepath$achieveid HTTP/1.0\r\nHost: www.wowhead.com\r\n";
if (isset($proxy_cfg["user"]))
$out .= "Proxy-Authorization: Basic ". base64_encode ("{$proxy_cfg["user"]}:{$proxy_cfg["pass"]}")."\r\n";
$out .="Connection: Close\r\n\r\n";
$temp = '';
fwrite($fp, $out);
while ($fp && !feof($fp))
$temp .= fgets($fp, 4096);
fclose($fp);
$wowhead_string = $temp;
$temp_string1 = strstr($wowhead_string, 'Icon.create(');
$temp_string2 = substr($temp_string1, 12, 50);
$temp_string3 = strtok($temp_string2, ',');
$temp_string4 = substr($temp_string3, 1, strlen($temp_string3) - 2);
$achieve_icon_name = $temp_string4;
$achieve = $achieve_icon_name;
}
if (file_exists(''.$item_icons.'/'.$achieve.'.jpg'))
{
if (filesize(''.$item_icons.'/'.$achieve.'.jpg') > 349)
{
$sql["mgr"]->query('REPLACE INTO dbc_spellicon (id, name) VALUES (\''.$displayid.'\', \''.$achieve.'\')');
return ''.$item_icons.'/'.$achieve.'.jpg';
}
else
{
$sql["mgr"]->query('DELETE FROM dbc_spellicon WHERE id = '.$displayid.'');
if (file_exists(''.$item_icons.'/'.$achieve.'.jpg'))
unlink(''.$item_icons.'/'.$achieve.'.jpg');
}
}
//get the icon itself
if (empty($proxy_cfg["addr"]))
{
$proxy = 'static.wowhead.com';
$port = 80;
}
$fp = @fsockopen($proxy, $port, $errno, $errstr, 0.5);
if ($fp);
else
return 'img/INV/INV_blank_32.gif';
$iconfilename = strtolower($achieve);
$file = 'http://static.wowhead.com/images/icons/medium/'.$iconfilename.'.jpg';
$out = "GET $file HTTP/1.0\r\nHost: static.wowhead.com\r\n";
if (isset($proxy_cfg["user"]))
$out .= "Proxy-Authorization: Basic ". base64_encode ("{$proxy_cfg["user"]}:{$proxy_cfg["pass"]}")."\r\n";
$out .="Connection: Close\r\n\r\n";
fwrite($fp, $out);
//remove header
while ($fp && !feof($fp))
{
$headerbuffer = fgets($fp, 4096);
if (urlencode($headerbuffer) == '%0D%0A')
break;
}
if (file_exists(''.$item_icons.'/'.$achieve.'.jpg'))
{
if (filesize(''.$item_icons.'/'.$achieve.'.jpg') > 349)
{
$sql["mgr"]->query('REPLACE INTO dbc_spellicon (id, name) VALUES (\''.$displayid.'\', \''.$achieve.'\')');
return ''.$item_icons.'/'.$achieve.'.jpg';
}
else
{
$sql["mgr"]->query('DELETE FROM dbc_spellicon WHERE id = '.$displayid.'');
if (file_exists(''.$item_icons.'/'.$achieve.'.jpg'))
unlink(''.$item_icons.'/'.$achieve.'.jpg');
}
}
$img_file = fopen(''.$item_icons.'/'.$achieve.'.jpg', 'wb');
while (!feof($fp))
fwrite($img_file,fgets($fp, 4096));
fclose($fp);
fclose($img_file);
if (file_exists(''.$item_icons.'/'.$achieve.'.jpg'))
{
if (filesize(''.$item_icons.'/'.$achieve.'.jpg') > 349)
{
$sql["mgr"]->query('REPLACE INTO dbc_spellicon (id, name) VALUES (\''.$displayid.'\', \''.$achieve.'\')');
return ''.$item_icons.'/'.$achieve.'.jpg';
}
else
{
$sql["mgr"]->query('DELETE FROM dbc_spellicon WHERE id = '.$displayid.'');
if (file_exists(''.$item_icons.'/'.$achieve.'.jpg'))
unlink(''.$item_icons.'/'.$achieve.'.jpg');
}
}
else
return 'img/INV/INV_blank_32.gif';
}
else
return 'img/INV/INV_blank_32.gif';*/
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getAchievementIcon($id)\n{\n\tglobal $wowhead_url;\n\t\n\t$data = getXML($wowhead_url . '?achievement=' . $id . '&power');\n\t\n\tif (preg_match('#icon: \\'(.+?)\\'#', $data, $match))\n\t{\n\t\t// icon found\n\t\treturn 'http://static.wowhead.com/images/icons/small/' . strtolower($match[1]) . '.jpg';\t\n\t}\n\telse\n\t{\n\t\treturn false;\t\n\t}\n}",
"public function getIcon() {\n\t\t//regex is used to check if there's a filename within the iconFile string\n\t\treturn preg_replace('/^.*\\/([^\\/]+\\.(gif|png))?$/i', '\\1', $this->iconFile) ? $this->iconFile : '';\n\t}",
"public function getIcon(): ?string\n {\n foreach ($this->items as $item) {\n if (!empty($item->getIcon())) {\n return $item->getIcon();\n }\n }\n\n return null;\n }",
"private function get_icon()\n\t{\n\t\treturn $this->m_icon;\n\t}",
"private function get_icon()\n\t{\n\t\treturn $this->m_icon;\n\t}",
"public function getIcon() {\n if($this->items!==false)\n return @current($this->items)->user->profile_image_url;\n return false;\n }",
"function amap_ma_get_entity_icon($u) {\n if (elgg_instanceof($u, 'user')) {\n $user_icon = amap_ma_get_marker_icon('membersmap');\n if ($user_icon == 'user_icon_tiny.png') {\n $entity_icon = $u->getIconURL('tiny');\n } \n else if ($user_icon == 'user_icon_small.png') {\n $entity_icon = $u->getIconURL('small');\n } \n else {\n $entity_icon = elgg_get_simplecache_url('membersmap/icon/' . amap_ma_get_marker_icon('membersmap'));\n// $entity_icon = elgg_get_site_url() . \"mod/membersmap/graphics/{$user_icon}\";\n }\n } else if (elgg_instanceof($u, 'group')) {\n $entity_icon = elgg_get_simplecache_url('groupsmap/icon/' . amap_ma_get_marker_icon('groupsmap'));\n } else if (elgg_instanceof($u, 'object', 'agora')) {\n $adicon = amap_ma_get_marker_icon('agora');\n if ($adicon == 'ad_image.png') {\n $entity_icon = $u->getIconURL('tiny');\n } else {\n $entity_icon = elgg_get_site_url() . 'mod/agora/graphics/' . amap_ma_get_marker_icon('agora');\n }\n }\n else if (elgg_instanceof($u, 'object', 'lcourt')) {\n $entity_icon = elgg_get_simplecache_url('leaguemanager/icon/icons/stadium.png');\n } \n else if (elgg_instanceof($u, 'object', 'page') || elgg_instanceof($u, 'object', 'page_top')) {\n //$entity_icon = elgg_get_site_url() . 'mod/pagesmap/graphics/' . amap_ma_get_marker_icon('pagesmap');\n $entity_icon = elgg_get_simplecache_url('pagesmap/icon/' . amap_ma_get_marker_icon('pagesmap'));\n }\n else if (elgg_instanceof($u, 'object', 'image')) {\n //$entity_icon = elgg_get_site_url() . 'mod/pagesmap/graphics/' . amap_ma_get_marker_icon('pagesmap');\n $entity_icon = $u->getIconURL('tiny');\n $entity_icon = elgg_get_simplecache_url('photosmap/icon/photography.png');\n }\n \n return $entity_icon;\n}",
"protected function get__icon()\n\t{\n\t\treturn NULL;\n\t}",
"public function get_menu_icon() {\n\n\t\treturn file_get_contents( $this->get_base_path() . '/images/menu-icon.svg' );\n\n\t}",
"public function get_icon() {\n $skillIcons = get_field('listing_skill_icons', 'option');\n $randIcon = array_rand($skillIcons, 1);\n $icon = $skillIcons[$randIcon];\n return $icon;\n }",
"public function getIcon();",
"public function getIcon();",
"private static function _find_icon($name) {\n if ($url = self::$_icon_cache[$name]) {\n return $url;\n }\n\n $filename = 'icon_' . $name . '.png';\n $path = Config::get('theme_path') . '/images/icons/';\n if (!file_exists(Config::get('prefix') . $path . $filename)) {\n $path = '/images/';\n }\n $url = Config::get('web_path') . $path . $filename;\n self::$_icon_cache[$name] = $url;\n\n return $url;\n }",
"public function getIcon() {}",
"public static function getIcon(): string\n {\n }",
"public static function getIcon(): string\n {\n }",
"function get_icon() {\n\t\treturn $this->settings['icon'];\n\t}",
"function plugin_geticon_bad_behavior2 ()\n{\n global $_CONF;\n\n return $_CONF['site_url'] . '/' . BAD_BEHAVIOR_PLUGIN\n . '/images/bad_behavior2.png';\n}",
"public function getIconForResourceWithPngFileReturnsIcon() {}",
"public function getIcon(): string\n {\n return $this->icon ?: static::DEFAULT_ICON;\n }",
"public function icons($item) {\n //\n return keyExtractor($item, \"icon\") ?: \"fa fa-circle-o\";\n }",
"function menus_access_get_icon(ElggEntity $entity) {\n\t$access_id = $entity->access_id;\n\tswitch ($access_id) {\n\t\tcase ACCESS_FRIENDS :\n\t\t\t$icon = 'user';\n\t\t\tbreak;\n\t\tcase ACCESS_PUBLIC :\n\t\tcase ACCESS_LOGGED_IN :\n\t\t\t$icon = 'globe';\n\t\t\tbreak;\n\t\tcase ACCESS_PRIVATE :\n\t\t\t$icon = 'lock';\n\t\t\tbreak;\n\t\tdefault:\n\t\t\t$collection = get_access_collection($access_id);\n\t\t\t$owner = get_entity($collection->owner_guid);\n\t\t\tif ($owner instanceof ElggGroup) {\n\t\t\t\t$icon = 'users';\n\t\t\t} else {\n\t\t\t\t$icon = 'cog';\n\t\t\t}\n\t\t\tbreak;\n\t}\n\n\t$params = ['entity' => $entity];\n\treturn elgg_trigger_plugin_hook('access:icon', $entity->getType(), $params, $icon);\n}",
"function getIconurl($icon_key, $type='small') {\r\n\t\r\n \t\tglobal $CONN, $CONFIG;\r\n\t\t\r\n\t\tif ($type=='small') {\r\n\t\t\r\n\t\t\t$field = 'small_icon';\r\n\t\t\r\n\t\t} else {\r\n\t\t\r\n\t\t\t$field = 'large_icon';\r\n\t\t\r\n\t\t}\r\n\t\t$rs = $CONN->Execute(\"SELECT $field FROM {$CONFIG['DB_PREFIX']}icons WHERE icon_key='$icon_key'\");\r\n \r\n\t\t$icon = $rs->fields[0];\t\t\r\n\t\t\r\n\t\t$rs->Close();\r\n\t\t\r\n\t\tif (is_file($CONFIG['MODULE_FILE_SAVE_PATH'].'/icons/'.$icon)) {\r\n\t\t\r\n\r\n\t\t\t$icon_url = $CONFIG['MODULE_FILE_VIEW_PATH'].'icons/'.$icon;\r\n\t\t\treturn $icon_url;\r\n\t\t\t\t\r\n\t\t\r\n\t\t} else {\r\n\t\t\r\n\t\t\treturn false;\r\n\t\t\r\n\t\t}\r\n\t\t\t\r\n\t}",
"public function getIcon()\n {\n return $this->get(self::_ICON);\n }",
"public function icon(): string;",
"public function getSpriteIconCode() {}",
"public function Icon()\n {\n $ext = strtolower($this->getExtension());\n if (!Director::fileExists(FRAMEWORK_DIR . \"/images/app_icons/{$ext}_32.gif\")) {\n $ext = $this->appCategory();\n }\n\n if (!Director::fileExists(FRAMEWORK_DIR . \"/images/app_icons/{$ext}_32.gif\")) {\n $ext = \"generic\";\n }\n\n return FRAMEWORK_DIR . \"/images/app_icons/{$ext}_32.gif\";\n }",
"public function getIcon()\n {\n return $this->_icon;\n }",
"function get_screen_icon()\n {\n }",
"private function getIconById($id) {\n $icons = array(\n \"tank\", //0\n \"fighter-plane-1\", //1\n \"helicopter\", //2\n \"cannon\", //3\n \"knife\", //4\n \"pistol\", //5\n \"soldier\", //6\n \"ship\", //7\n \"submarine\", //8\n \"bomb\", //9\n \"NULL\" //10 (NULL VALUE)\n );\n return $icons[$id];\n }"
]
| [
"0.7616838",
"0.6804254",
"0.6631242",
"0.66083825",
"0.66083825",
"0.65563077",
"0.6525396",
"0.6508459",
"0.64941746",
"0.64858323",
"0.64612895",
"0.64612895",
"0.64140487",
"0.6406971",
"0.64009464",
"0.64009464",
"0.63777065",
"0.6350124",
"0.6323305",
"0.6322778",
"0.6320581",
"0.63165665",
"0.62686616",
"0.6250237",
"0.6228845",
"0.6184859",
"0.61604095",
"0.6144062",
"0.6140203",
"0.6134978"
]
| 0.7307229 | 1 |
Handle link shortcodes, which can be to either pages or static routes | public static function onShortCode_link(ShortcodeInterface $s): ?string
{
if (!$s->getBbCode()) {
// nothing is specified, just use context URL route and optional index
$url = Context::url();
$route = Context::url()->route();
$action = $s->getParameter('action', 'index');
} else {
// otherwise we have to take a closer look at what was specified
// check if bbcode value looks like it has a filename at the end
$query = trim($s->getBbCode(), '/');
if (preg_match('@\.[a-z0-9]+$@', $query)) {
// route is bbcode value with filename stripped
$route = preg_replace('@[^\\]\.([a-z0-9]+$@', '', $query);
$action = substr($query, strlen($route) + 1);
// still allow action parameter to override URL
$action = $s->getParameter('action', $action);
$url = new URL("/$route/$action");
} else {
// route looks like a clean route with no filename
$route = $query;
$action = $s->getParameter('action', 'index');
$url = new URL("/$route/");
}
}
// keep running list of everything this could refer to
/** array<int,array{url:URL,title:string}> */
$options = [];
// check if there's a static route
if (Router::staticRouteExists($route, $action)) {
$static_url = new URL("/~$route/");
$static_url->setAction($action);
$options[] = [
'url' => $static_url,
'title' => $static_url->name(),
];
}
// search for pages this URL might refer to
foreach (Pages::getAll($route) as $page) {
$page_url = $page->url($action);
$options[] = [
'url' => $page_url,
'title' => $page_url->name(),
];
}
// prepare link title
if (count($options) == 0) {
$title = 'unknown link';
} elseif (count($options) == 1) {
$title = $options[0]['title'];
$url = $options[0]['url'];
} else {
$title = sprintf(
'ambiguous link: %s',
implode(
', ',
array_map(
fn($e) => '"' . $e['title'] . '"',
$options
)
)
);
}
// build link
$link = (new A)
->setAttribute('href', $url)
->setAttribute('title', $title)
->addClassString($s->getParameter('class', ''))
->addChild(new Text($s->getContent() ? $s->getContent() : $title));
if (count($options) > 1) $link->addClass('link--multiple-options');
return $link;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function shorten($link, $customUrl = false);",
"function cd_post_slug_remove_short( $post_link, $post, $leavename ) { \r\n if ( 'cd-short' != $post->post_type || 'publish' != $post->post_status ) {\r\n return $post_link;\r\n }\r\n \r\n $post_link = str_replace( '/' . $post->post_type . '/', '/', $post_link );\r\n \r\n return $post_link;\r\n}",
"function rebrandly_url_shortcode( $atts ) {\n // global $post;\n\n $atts = shortcode_atts(\n array(\n 'id' => get_the_ID(),\n ),\n $atts,\n 'rebrandly_url'\n );\n\n // $_scheme = ( is_ssl() ) ? 'https://' : 'http://'; // Rebrandly domains don't work with HTTPS\n $_scheme = 'http://';\n $_short_url = get_post_meta( $atts['id'], '_rebrandly_link_url', true );\n\n if ( $_short_url != '' ) {\n return $_scheme . $_short_url;\n } else {\n return get_permalink( $atts['id'] );\n }\n}",
"function shortcodeHandler($atts, $content = null) {\r\n\t\textract( shortcode_atts( array(\r\n\t\t\t 'vid' => '0'\r\n\t\t\t,'vtitle' => ''\r\n\t\t\t,'vinline' => 'false'\r\n\t\t\t), $atts ) );\r\n\t\t$vinline = (strtolower($vinline) == 'true');\r\n\t\treturn $this->_getLinkTag($vid, $vtitle, $vinline);\r\n\t}",
"function permalink_link()\n {\n }",
"function my_theme_cpt_shortlinks( $shortlink, $id, $context, $allow_slugs=true ) {\n\t\t/**\n\t\t * If query is the context, we probably shouldn't do anything\n\t\t */\n\t\tif( 'query' == $context )\n\t\t\treturn $shortlink;\n\n\t\t$post = get_post( $id );\n\t\t$post_id = $post->ID;\n\n\t\t/**\n\t\t * If this is a standard post, return the shortlink that was already built\n\t\t */\n\t\tif( 'post' == $post->post_type )\n\t\t\treturn $shortlink;\n\n\t\t/**\n\t\t * Retrieve the array of publicly_queryable, non-built-in post types\n\t\t */\n\t\t$post_types = get_post_types( array( '_builtin' => false, 'publicly_queryable' => true ) );\n\t\tif( in_array( $post->post_type, $post_types ) || 'page' == $post->post_type )\n\t\t\t$shortlink = home_url('?p=' . $post->ID);\n\n\t\treturn $shortlink;\n\t}",
"public function test_can_fetch_link_from_shortlink()\n {\n $this->get(route('shortlink.fetch.link', ['code' => 'AbcXyz']))->assertStatus(200);\n }",
"private function verificaShortUrl() {\n FormataLink::verificaMiniUrl(\"fwk_link_encurtado\");\n }",
"public static function permalinkHandler($segments) {\n\n\t\t$viewtype = array_shift($segments);\n\t\t$referrer_hash = array_shift($segments);\n\t\tif (!preg_match('/^[a-f0-9]{32}$/i', $referrer_hash)) {\n\t\t\t// The hash was moved into URL query parameters\n\t\t\t$guid = $referrer_hash;\n\t\t\t$referrer_hash = get_input('uh');\n\t\t} else {\n\t\t\t$guid = array_shift($segments);\n\t\t\tset_input('uh', $referrer_hash);\n\t\t}\n\n\t\tswitch ($viewtype) {\n\t\t\tcase 'image' :\n\t\t\t\t// BC router\n\t\t\t\t$size = array_shift($segments);\n\t\t\t\t$ia = elgg_set_ignore_access(true);\n\t\t\t\t$entity = get_entity($guid);\n\t\t\t\t$url = $entity->getIconURL($size);\n\t\t\t\telgg_set_ignore_access($ia);\n\t\t\t\tforward($url);\n\t\t\t\treturn;\n\n\t\t\tdefault :\n\n\t\t\t\tswitch ($viewtype) {\n\t\t\t\t\tcase 'json+oembed' :\n\t\t\t\t\tcase 'json oembed' :\n\t\t\t\t\t\t$viewtype = 'json';\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 'xml+oembed' :\n\t\t\t\t\tcase 'xml oembed' :\n\t\t\t\t\t\t$viewtype = 'xml';\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tif (!elgg_is_registered_viewtype($viewtype)) {\n\t\t\t\t\t$viewtype = 'default';\n\t\t\t\t}\n\n\t\t\t\telgg_set_viewtype($viewtype);\n\n\t\t\t\tif (!$guid || !elgg_entity_exists($guid)) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\t$ia = elgg_set_ignore_access();\n\t\t\t\t$entity = get_entity($guid);\n\n\t\t\t\tif (!has_access_to_entity($entity) && !is_discoverable($entity)) {\n\t\t\t\t\telgg_set_ignore_access($ia);\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\n\t\t\t\telgg_register_plugin_hook_handler('head', 'page', function($hook, $type, $return) use ($entity) {\n\t\t\t\t\tif (isset($return['links']['canonical'])) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\n\t\t\t\t\tif (elgg_is_active_plugin('hypeSeo')) {\n\t\t\t\t\t\t$svc = \\hypeJunction\\Seo\\RewriteService::getInstance();\n\t\t\t\t\t\t$data = $svc->getRewriteRulesFromGUID($entity->getURL());\n\t\t\t\t\t\tif (isset($data['sef_path'])) {\n\t\t\t\t\t\t\t$return['links']['canonical'] = [\n\t\t\t\t\t\t\t\t'href' => elgg_normalize_url($data['sef_path']),\n\t\t\t\t\t\t\t\t'rel' => 'canonical',\n\t\t\t\t\t\t\t];\n\t\t\t\t\t\t\treturn $return;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t$return['links']['canonical'] = [\n\t\t\t\t\t\t'href' => $entity->getURL(),\n\t\t\t\t\t\t'rel' => 'canonical',\n\t\t\t\t\t];\n\n\t\t\t\t\treturn $return;\n\t\t\t\t});\n\n\t\t\t\t$forward_url = false;\n\n\t\t\t\t$is_walled = elgg_get_config('walled_garden') && !elgg_is_logged_in();\n\t\t\t\tif (has_access_to_entity($entity) && $viewtype == 'default' && !$is_walled) {\n\t\t\t\t\t$forward_url = $entity->getURL();\n\t\t\t\t}\n\n\t\t\t\t$forward_url = elgg_trigger_plugin_hook('entity:referred', $entity->getType(), array(\n\t\t\t\t\t'entity' => $entity,\n\t\t\t\t\t'user_hash' => $referrer_hash,\n\t\t\t\t\t'referrer' => $_SERVER['HTTP_REFERER'],\n\t\t\t\t\t\t), $forward_url);\n\n\t\t\t\tif ($forward_url) {\n\t\t\t\t\telgg_set_ignore_access($ia);\n\t\t\t\t\tforward($forward_url);\n\t\t\t\t}\n\n\t\t\t\tif (elgg_get_plugin_setting('nocrawl', 'hypeDiscovery')) {\n\t\t\t\t\telgg_set_http_header('X-Robots-Tag: noindex', true);\n\n\t\t\t\t\telgg_register_plugin_hook_handler('head', 'page', function($hook, $type, $return) {\n\t\t\t\t\t\t$return['metas'][] = [\n\t\t\t\t\t\t\t'name' => 'robots',\n\t\t\t\t\t\t\t'content' => 'noindex',\n\t\t\t\t\t\t];\n\n\t\t\t\t\t\treturn $return;\n\t\t\t\t\t});\n\t\t\t\t}\n\n\t\t\t\techo elgg_view_resource('permalink', [\n\t\t\t\t\t'viewtype' => $viewtype,\n\t\t\t\t\t'user_hash' => $referrer_hash,\n\t\t\t\t\t'guid' => $guid,\n\t\t\t\t\t'entity' => $entity,\n\t\t\t\t]);\n\n\t\t\t\telgg_set_ignore_access($ia);\n\t\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}",
"public static function handle_shortcode($arguments, $url, $parser, $shortcode) {\n\t\tif(isset($arguments['type'])) {\n\t\t\t$type = $arguments['type'];\n\t\t\tunset($arguments['type']);\n\t\t} else {\n\t\t\t$type = false;\n\t\t}\n\t\t$oembed = self::get_oembed_from_url($url, $type, $arguments);\n\t\tif($oembed && $oembed->exists()) {\n\t\t\treturn $oembed->forTemplate();\n\t\t} else {\n\t\t\treturn '<a href=\"' . $url . '\">' . $url . '</a>';\n\t\t}\n\t}",
"function ms_slideshare_shortcode_handler( $atts ) {\n extract(shortcode_atts( array(\n 'url' => 'http://www.slideshare.net/',\n ), $atts));\n $pluginurl = plugin_dir_url(__FILE__);\n\n return '<a href=\"'.$url.'\"><img style=\"height: 1em; padding: 0; margin: 0;\" src=\"'.$pluginurl.'/slideshare-32x32.png\" alt=\"link to slideshare\" /></a>';\n}",
"function _wp_link_page($i)\n {\n }",
"public static function linkShortcode($atts = [], $content = '', $tag = ''){\n // normalize attribute keys, lowercase\n $atts = array_change_key_case((array)$atts, CASE_LOWER);\n // override default attributes with user attributes\n $parsed_atts = shortcode_atts([\n 'id' => null,\n 'caption' => 'official_name_1'\n ], $atts, $tag);\n\n // get the ID from shortcode atts\n $id = $parsed_atts['id'];\n if (!$id) return '<a href=\"#\">[incorrect ID]</a>';\n\n // find card in database\n $card = get_post($id);\n // make sure POST is a 'travelcard'\n if (!$card || $card->post_type !== 'travelcard') return '<a href=\"#\">[not found]</a>';\n // retrieve meta for card\n $meta = get_post_meta($card->ID);\n\n // set caption\n $caption = $parsed_atts['caption'];\n if (preg_match('/^official\\_name\\_[0-5]$/', $caption)) {\n $caption = $caption ? $meta[$caption] : null;\n $caption = $caption ? $caption[0] : $card->post_title;\n }\n\n // set url\n $url = $meta['deep_link_2'];\n $url = $url ? $url[0] : '#';\n \n // build HTML\n $url = self::createRedirectUrl($url, $id);\n return '<a href=\"' . $url . '\" class=\"ege-cards-link\">' . $caption . '</a>';\n }",
"function the_shortlink($text = '', $title = '', $before = '', $after = '')\n {\n }",
"function page_path_to_page_link($page)\n{\n require_code('urls2');\n return _page_path_to_page_link($page);\n}",
"function post_link($post){\n if(strcasecmp($post->post_type, 'primary_page') == 0){\n return e($post->post_slug);\n }else{\n return strtolower($post->category_name). '/' . e($post->post_slug);\n }\n}",
"public function shortenLink($code)\n {\n $find = ShortLink::where('code', $code)->first();\n\n $input['click_count'] = $find->click_count + 1;\n\n $find->update($input);\n\n return Redirect::to($find->link);\n }",
"function mr_megaresult_shortcode_handler( $attrs, $content=null) {\n return \"look, a shortcode!\";\n}",
"public function using_mod_rewrite_permalinks()\n {\n }",
"function btn_shortcode( $atts, $content = null ) {\n $a = shortcode_atts( array(\n 'href' => '#'\n ), $atts );\n \n return '<a class=\"button\" href=\"' . esc_attr($a['href']) . '\">' . $content . '</a>';\n}",
"function permalink_anchor($mode = 'id')\n {\n }",
"public function shortenUrlWithNonCustomKeyword()\n {\n $longUrl = 'https://laravel.com';\n\n $this->post(route('createshortlink'), ['long_url' => $longUrl]);\n $url = Url::whereLongUrl($longUrl)->first();\n\n $this->assertFalse($url->is_custom);\n }",
"function wpme_rest_register_shortlinks() {\n\tregister_rest_field(\n\t\tarray(\n\t\t\t'attachment',\n\t\t\t'page',\n\t\t\t'post',\n\t\t),\n\t\t'jetpack_shortlink',\n\t\tarray(\n\t\t\t'get_callback' => 'wpme_rest_get_shortlink',\n\t\t\t'update_callback' => null,\n\t\t\t'schema' => null,\n\t\t)\n\t);\n}",
"function page_link_sc($atts) {\n $output = '';\n \n $atts = shortcode_atts(array(\n 'ids' => '',\n ), $atts );\n \n $ids = array_map('interval', explode(',', $atts['ids']));\n \n if($ids) {\n $output .= '<div class=\"page-link\">';\n \n foreach($ids as $id) {\n $tyle = has_post_thumbnail($id) ? 'style=\"background-image: url(' .wp_get_attachment_image_url(get_post_thumbnail($id), '_page_link'). ');\"' : '';\n \n $output .= '<a href=\"' . get_permalink( $id ) . '\"' . $style . '><span class=\"page-link-title\">' . get_the_title( $id ) . '</span></a>';\n }\n $output .= '</div>';\n }\n \n return $output;\n}",
"function KwWowHead($atts, $content = null) {\r\n extract(shortcode_atts(array( \"name\" => '', \"url\" => '', \"class\" => ''), $atts));\r\n\t\treturn '<a class=\"'.$class.'\" href=\"'.$url.'\">'.$name.'</a>';\r\n}",
"function do_permalink($atts) {\n\textract(shortcode_atts(array(\n\t\t'id' => 1,\n\t\t'text' => \"\" // default value if none supplied\n\t), $atts));\n\n\tif ($text) {\n\t\t$url = get_permalink($id);\n\t\treturn \"<a href='$url'>$text</a>\";\n\t} else {\n\t\treturn get_permalink($id);\n\t}\n}",
"function c4_social_connect($atts,$content=null){\r\n ob_start();\r\n $attr=extract(shortcode_atts(array(\r\n 'href'=>'#',\r\n 'sname'=>'facebook',\r\n 'target'=>'_blank',\r\n 'class'=>''\r\n\r\n\r\n ),$atts));\r\n\r\n return '<a class=\"'.$class.'\" href=\" '.$href.'\"target=\"'.$target.'\">'.$sname.'</a>';\r\n ?>\r\n<?php\r\nreturn ob_get_clean();\r\n}",
"function shq_genestrap_genestrap_link_shortcode( $atts ) {\n\n\t$defaults = [\n\t\t'after' => '',\n\t\t'before' => '',\n\t\t'url' => 'https://serendipityhq.com',\n\t];\n\t$atts = shortcode_atts( $defaults, $atts, 'shq_genestrap_link' );\n\n\t$output = $atts['before'] . '<a href=\"' . esc_url( $atts['url'] ) . '\">Genestrap</a>' . $atts['after'];\n\n\treturn apply_filters( 'genesis_footer_genesis_link_shortcode', $output, $atts );\n\n}",
"function replace_links($content) {\r\n\tpreg_match_all(\"/<a\\s*[^>]*>(.*)<\\/a>/siU\", $content, $matches);\r\n\t//preg_match_all(\"/<a\\s[^>]*>(.*?)(</a>)/siU\", $content, $matches);\t\r\n\t$foundLinks = $matches[0];\r\n\t$wpbar_options = get_option(\"wpbar_options\");\r\n\t\r\n\tforeach ($foundLinks as $theLink) {\r\n\t\t$uri = getAttribute('href',$theLink);\r\n\t\tif($wpbar_options[\"validateURL\"]) {\r\n\t\t\tif(!isWhiteListed(get_domain($uri)) && !isSociable($theLink) && isValidURL($uri)) {\r\n\t\t\t\t$uid = isInDB($uri);\r\n\t\t\t\t$nofollow = is_nofollow($uid) ? \"rel='nofollow'\" : \"\";\r\n\t\t\t\t$content=str_replace(\"href=\\\"\".$uri.\"\\\"\",\"title='Original Link: \".$uri.\"' \".$nofollow.\" href=\\\"\".get_option('home').\"/?\".$uid.\"\\\"\",$content);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif(!isWhiteListed(get_domain($uri)) && !isSociable($theLink)) {\r\n\t\t\t\t$uid = isInDB($uri);\r\n\t\t\t\t$nofollow = is_nofollow($uid) ? \"rel='nofollow'\" : \"\";\r\n\t\t\t\t$content=str_replace(\"href=\\\"\".$uri.\"\\\"\",\"title='Original Link: \".$uri.\"' \".$nofollow.\" href=\\\"\".get_option('home').\"/?\".$uid.\"\\\"\",$content);\r\n\t\t\t}\r\n\t\t}\r\n\t}\t\r\n\treturn $content;\r\n}",
"public function diviroids_permalink($atts)\n {\n extract(shortcode_atts(array( 'slug' => null, 'title' => null, 'target' => null, 'class' => null ), $atts));\n\n $page = get_page_by_path($slug);\n\n $output = sprintf(\n '<a href=\"%1$s\" title=\"%2$s\"%3$s%4$s>%2$s</a>',\n get_permalink($page->ID),\n empty($title) ? get_the_title($page) : $title,\n !empty($target) ? ' target=\"'. $target .'\"' : '',\n !empty($class) ? ' class=\"'. $class .'\"' : ''\n );\n\n return $output;\n }"
]
| [
"0.63869464",
"0.616263",
"0.59983164",
"0.5941541",
"0.58979756",
"0.5891951",
"0.5857824",
"0.5832499",
"0.5766316",
"0.57296956",
"0.56240636",
"0.5621851",
"0.5607566",
"0.55779934",
"0.55398136",
"0.5509105",
"0.55075",
"0.55037385",
"0.5498538",
"0.5463773",
"0.54482055",
"0.54327524",
"0.5418686",
"0.54129696",
"0.54037094",
"0.54021615",
"0.5392769",
"0.53869736",
"0.53786874",
"0.53725207"
]
| 0.6629646 | 0 |
Loads the product from the DB, incuding product variation info | public function load($id) {
global $DB;
parent::load($id);
$productVariations = $DB->get_records(
'local_moodec_variation',
array(
'product_id' => $id,
)
);
if(!!$productVariations) {
foreach ($productVariations as $pv) {
$variationid = (int) $pv->id;
$this->_variations[$variationid] = new MoodecProductVariation($variationid, true);
}
} else {
throw new Exception('Unable to load product variation information using identifier: ' . $id);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function load($product, $productAttribute, $options, $data);",
"public function load()\n {\n $query\n = '\n select\n *\n from\n aca_product\n where\n product_id = \"' . $this->productId . '\"';\n\n $this->db->setQuery($query);\n $productObj = $this->db->loadObject();\n\n if (!empty($productObj)) {\n\n $this->name = $productObj->name;\n $this->description = $productObj->description;\n $this->image = $productObj->image;\n $this->category = $productObj->category;\n $this->price = $productObj->price;\n\n return true;\n }\n return false;\n }",
"protected function _loadProduct(Mage_Catalog_Model_Product $product) {\r\n $product->load ( $product->getId () );\r\n }",
"function load($product_id){\n\t\t$result = $this->db->get_one(\n\t\t\t'product_name, image, description, price',\n\t\t\t'tb_products',\n\t\t\t'product_id = '.$product_id\n\t\t);\n\n\t\tif(count($result)){\n\t\t\t$this->product_id = $product_id;\n\t\t\t$this->product_name = $result['product_name'];\n\t\t\t$this->image = $result['image'];\n\t\t\t$this->description = $result['description'];\n\t\t\t$this->price = $result['price'];\n\t\t}\n\n\t\treturn $result;\n\t}",
"private function load() {\n\n $db = Database::getInstance(); \n\t $con = $db->getConnection();\n \n $query = \"SELECT * FROM Products ORDER by ID DESC\";\n \n if ($result = $con->query($query)) {\n \t/* fetch object array */\n \t while ($prod = $result->fetch_object(\"Product\")) {\n\t\t\t \tarray_push($this->products, $prod);\n \t}\n \t/* free result set */\n \t$result->close();\n }\n\t}",
"public function getVariation()\n {\n return $this->db->get($this->product_variant);\n }",
"public function load($attribute, $product, $valueId);",
"function load_product_info()\n {\n if (self::get_total_number_of_courses() > 0) {\n //cycle through course(s), load productInfo if available\n foreach ($this->courses as $key => $course) {\n $this->courses[$key] = array_merge($course,$this->get_product_info($course['course_id']));\n foreach ($course['modules'] as $module){\n $course['modules'][$module['module_id']]['product_info'] = $this->get_product_info($module['module_id']);\n }\n }\n }\n }",
"public function load_products() {\n\t\t$this->get_products_posts();\n\t\tif ( $this->posts !== null ) {\n\t\t\tforeach ( $this->posts as $ps_post ) {\n\t\t\t\t$this->add( new ShowcaseProduct( $ps_post ) );\n\t\t\t}\n\t\t}\n\t}",
"public function productVendorLoad()\n\t{\n\t\t$product_id = $this->request->input('product_id');\n\t\t$locality_change_val = $this->request->input('locality_change_val');\n\t\t$selectVendorLocationIdQuery = DB::select(\"SELECT vendor_location_id\n\t\t\t\t\t\t\t\t\t\t\t\t\tFROM product_vendor_locations\n\t\t\t\t\t\t\t\t\t\t\t\t\tWHERE product_id = '$product_id'\n\t\t\t\t\t\t\t\t\t\t\t\t\tAND id = '$locality_change_val'\");\n\n\t\t$selectVendorLocationId = $selectVendorLocationIdQuery[0]->vendor_location_id;\n\t\techo '<input type=\"hidden\" id=\"locality_val\" value=\"'.$selectVendorLocationId.'\">';\n\t}",
"public function load($id){\n\t\tglobal $DB;\n\n\t\t$query = sprintf(\n\t\t\t'SELECT \n\t\t\t\tlmp.id, \n\t\t\t\tc.id as course_id,\n\t\t\t\tfullname,\n\t\t\t\tshortname,\n\t\t\t\tis_enabled,\n\t\t\t\tcategory,\n\t\t\t\tsummary,\n\t\t\t\tc.summaryformat as summary_format,\n\t\t\t\ttype,\n\t\t\t\tdescription,\n\t\t\t\ttags,\n\t\t\t\ttimecreated\n\t\t\tFROM {local_moodec_product} lmp, {course} c\n\t\t\tWHERE lmp.course_id = c.id\n\t\t\tAND lmp.id = %d',\n\t\t\t$id\n\t\t);\n\n\t\t// run the query\n\t\t$product = $DB->get_record_sql($query);\n\n\t\t// return the products\n\t\tif (!!$product) {\n\t\t\t$this->_id = (int) $product->id;\n\t\t\t$this->_courseid = (int) $product->course_id;\n\t\t\t$this->_enabled = (bool) $product->is_enabled;\n\t\t\t$this->_fullname = $product->fullname;\n\t\t\t$this->_shortname = $product->shortname;\n\t\t\t$this->_type = $product->type;\n\t\t\t$this->_categoryid = (int) $product->category;\n\t\t\t$this->_summary = $product->summary;\n\t\t\t$this->_summaryFormat = (int) $product->summary_format;\n\t\t\t$this->_description = $product->description;\n\t\t\t$this->_tags = explode(',', $product->tags);\n\t\t} else {\n \tthrow new Exception('Unable to load product using identifier: ' . $id);\n \t\t}\n\t}",
"public function getProductData()\n {\n // use\n //$this->request->getParams(); // all params\n $id= $this->request->getParam('param');\n $product = $this->_product->create()->load($id);\n return $product;\n\n }",
"function LoadProduct($orderid) {\n\t$proids = array();\n\t$factory = \\woo\\mapper\\PersistenceFactory::getFactory(\"orderproduct\",array('id','orderid','proid','number','price','returnnow','modlcharge'));\n\t$finder = new \\woo\\mapper\\DomainObjectAssembler($factory);\n\t$idobj = $factory->getIdentityObject()->field('orderid')->eq($orderid);\n\t$order_pro = $finder->find($idobj);\n\n\t$factory = \\woo\\mapper\\PersistenceFactory::getFactory(\"product\",array('id','classid','length','width','think','unitlen','unitwid','unitthi','unit','sharp','note'));\n\t$finder = new \\woo\\mapper\\DomainObjectAssembler($factory);\n\t$pro = $order_pro->next();\n\t$i = 0;\n\t$data = array();\n\twhile($pro){\n\t\t$data[$i][0] = $i+1;\n\t\t$idobj = $factory->getIdentityObject()->field('id')->eq($pro->getProid());\n\t\t$collection = $finder->find($idobj);\n\t\t$product = $collection->current();\n\t\t$data[$i][1] = $product->getSize();\n\t\t$data[$i][2] = $pro->getNumber();\n\t\t$price = $pro->getPrice()-$pro->getReturnnow();\n\t\t$data[$i][3] = sprintf(\"%.2f\",$price);\n\t\t$data[$i][4] = sprintf(\"%.2f\",$price*$data[$i][2]);\n\t\t$i++;\n\t\t$pro = $order_pro->next();\n\t}\n\treturn $data;\n}",
"public function loadProducts()\n {\n if (!isset($this->mix_id)) {\n return false;\n }\n\n $this->products = array();\n $query = \"SELECT mg.*, sup.*, p.product_id, p.product_nr, p.name, p.paint_chemical, coat.coat_desc as coatDesc \" .\n \"FROM \" . TB_MIXGROUP . \" mg \" .\n \"JOIN \" . TB_PRODUCT . \" p ON p.product_id = mg.product_id \" .\n \"JOIN \" . TB_SUPPLIER . \" sup ON p.supplier_id = sup.supplier_id \" .\n \"JOIN \" . TB_COAT . \" coat ON coat.coat_id = coating_id \" .\n \"WHERE mg.mix_id = {$this->db->sqltext($this->mix_id)}\";\n\n $this->db->query($query);\n if ($this->db->num_rows() == 0) {\n return false;\n }\n\n $productsData = $this->db->fetch_all();\n\n $unittype = new Unittype($this->db);\n //get pfp if exist\n $pfp = $this->getPfp();\n $pfpProduct = array();\n if ($pfp) {\n $pfpProducts = $pfp->getProducts();\n }\n\n foreach ($productsData as $productData) {\n $mixProduct = new MixProduct($this->db);\n foreach ($productData as $property => $value) {\n if (property_exists($mixProduct, $property)) {\n $mixProduct->$property = $productData->$property;\n }\n }\n //\tTODO: add userfriendly records to product properties\n $mixProduct->initializeByID($mixProduct->product_id);\n\n //\tif there is a primary product then this is an pfp-based mix\n if ($mixProduct->is_primary) {\n $this->isPfp = true;\n }\n\n if ($productData->ratio) {\n $mixProduct->ratio_to_save = $productData->ratio;\n }\n\n $mixProduct->unittypeDetails = $unittype->getUnittypeDetails($mixProduct->unit_type);\n $unittypeClass = $unittype->getUnittypeClass($mixProduct->unit_type);\n\n $mixProduct->unittypeDetails['unittypeClass'] = $unittypeClass;\n $mixProduct->initUnittypeList($unittype);\n\n $mixProduct->json = json_encode($mixProduct);\n //get is Ratio \n foreach ($pfpProducts as $pfpProduct) {\n if ($pfpProduct->getProductId() == $productData->product_id) {\n if (!is_null($pfpProduct->getRatioFromOriginal()) && !is_null($pfpProduct->getRatioToOriginal())) {\n $mixProduct->isRange = true;\n $mixProduct->range_ratio = trim($pfpProduct->getRatioFromOriginal()) . '-' . trim($pfpProduct->getRatioToOriginal());\n } else {\n $mixProduct->isRange = false;\n }\n break;\n }\n }\n //\tpush to mix products\n array_push($this->products, $mixProduct);\n }\n\n return $this->products;\n }",
"public function loadStockData(){\n if (JeproshopTools::isLoadedObject($this, 'product_id')){\n // By default, the product quantity correspond to the available quantity to sell in the current shop\n $this->quantity = JeproshopStockAvailableModelStockAvailable::getQuantityAvailableByProduct($this->product_id, 0);\n $this->out_of_stock = JeproshopStockAvailableModelStockAvailable::outOfStock($this->product_id);\n $this->depends_on_stock = JeproshopStockAvailableModelStockAvailable::dependsOnStock($this->product_id);\n if (JeproshopContext::getContext()->shop->getShopContext() == JeproshopShopModelShop::CONTEXT_GROUP && JeproshopContext::getContext()->shop->getContextShopGroup()->share_stock == 1){\n $this->advanced_stock_management = $this->useAdvancedStockManagement();\n }\n }\n }",
"public function loadVariantInformation()\n {\n if ($this->_aVariantList === null) {\n $oProduct = $this->getProduct();\n\n //if we are child and do not have any variants then let's load all parent variants as ours\n if ($oParent = $oProduct->getParentArticle()) {\n $myConfig = $this->getConfig();\n\n $oParent->setNoVariantLoading(false);\n $this->_aVariantList = $oParent->getFullVariants(false);\n\n //lets additionally add parent article if it is sellable\n if (count($this->_aVariantList) && $myConfig->getConfigParam('blVariantParentBuyable')) {\n //#1104S if parent is buyable load select lists too\n $oParent->enablePriceLoad();\n $oParent->aSelectlist = $oParent->getSelectLists();\n $this->_aVariantList = array_merge(array($oParent), $this->_aVariantList->getArray());\n }\n } else {\n //loading full list of variants\n $this->_aVariantList = $oProduct->getFullVariants(false);\n }\n\n // setting link type for variants ..\n foreach ($this->_aVariantList as $oVariant) {\n $this->_processProduct($oVariant);\n }\n\n }\n\n return $this->_aVariantList;\n }",
"public function onVariationAlter(ProductVariationEvent $event) {\n /** @var \\Drupal\\commerce_product\\Entity\\ProductVariationInterface $variation */\n $variation = $event->getProductVariation();\n\n\n }",
"protected function _initProduct()\n {\n Mage::dispatchEvent('review_controller_product_init_before', array('controller_action' => $this));\n\n $productId = (int) $this->getRequest()->getParam('id');\n $product = $this->_loadProduct($productId);\n\n try {\n Mage::dispatchEvent('review_controller_product_init', array('product' => $product));\n Mage::dispatchEvent('review_controller_product_init_after', array(\n 'product' => $product,\n 'controller_action' => $this\n ));\n } catch (Mage_Core_Exception $e) {\n Mage::logException($e);\n return false;\n }\n\n return $product;\n }",
"public function variation()\n {\n return $this->belongsTo(ProductVariation::class);\n }",
"public function load_product_page() {\n\t\t\tif ( ! current_user_can( 'manage_options' ) ) {\n\t\t\t\twp_die( __( 'You do not have sufficient permissions to access this page.' ) );\n\t\t\t}\n\n\t\t\t// Render the settings template\n\t\t\trequire_once( dirname( __FILE__ ) . '/pages/product.php' );\n\t\t\twp_enqueue_script( 'amz-commons', '/wp-content/plugins/amz-affiliate/js/commons.js', 'jquery' );\n\t\t\twp_enqueue_script( 'amz-product', '/wp-content/plugins/amz-affiliate/js/product.js', 'jquery' );\n\n\t\t}",
"function _loadProductAttributesInfo()\n {\n global $zone;\n\n if ($this->_fBaseProductInfo == null)\n {\n $this->_loadBaseProductInfo();\n }\n $display_product_price_including_taxes = modApiFunc('Settings', 'getParamValue', 'TAXES_PARAMS', \"DISPLAY_PRICES_W_INCLUDED_TAXES\");\n\n $a = (int)$this->_fProductID;\n $b = (int)$this->_fBaseProductInfo[0]['p_type_id'];\n $c = $display_product_price_including_taxes == DB_TRUE ? 1 : 0;\n if (isset(self::$_cache_attr[$a][$b][$c])) {\n $this->_fProductAttributesInfo = self::$_cache_attr[$a][$b][$c];\n return;\n }\n\n $params = array('product_id' => (int)$this->_fProductID,\n 'product_type_id' => (int)$this->_fBaseProductInfo[0]['p_type_id']);\n $this->_fProductAttributesInfo = execQuery('SELECT_PRODUCT_ATTRIBUTES_INFO', $params);\n // SalePrice,\n // TaxClass.\n $tax_class_id = NULL;\n foreach ($this->_fProductAttributesInfo as $index => $attribute)\n {\n if ( strtolower($attribute['a_view_tag']) == 'taxclass' )\n {\n $tax_class_id = $attribute['pa_value'];\n break;\n }\n }\n\n $price_including_included_taxes_if_any = NULL;\n foreach ($this->_fProductAttributesInfo as $index => $attribute)\n {\n if ( strtolower($attribute['a_view_tag']) == 'saleprice' )\n {\n if($zone == 'CustomerZone')\n {\n $membership = modApiFunc('Customer_Account','getCurrentSignedCustomerGroupID');\n $attribute['pa_value'] = modApiFunc('Quantity_Discounts','getFixedPrice',$this->_fProductID,1,$attribute['pa_value'],$membership);\n }\n\n $price_including_included_taxes_if_any = $attribute['pa_value'];\n $this->_fProductAttributesInfo['salepriceexcludingtaxes'] = $this->_fProductAttributesInfo[$index];\n $this->_fProductAttributesInfo['salepriceexcludingtaxes']['pa_id'] = NULL;\n $this->_fProductAttributesInfo['salepriceexcludingtaxes']['a_view_tag'] = NULL;\n\n // TaxClass - , .\n if($tax_class_id !== NULL)\n {\n // .\n $price_excluding_taxes = modApiFunc(\"Catalog\", \"computePriceExcludingTaxes\", $attribute['pa_value'], $tax_class_id);\n $this->_fProductAttributesInfo[$index]['pa_value'] = $price_excluding_taxes;\n\n // _ _ 'salepriceexcludingtaxes':\n $this->_fProductAttributesInfo['salepriceexcludingtaxes']['pa_value'] = $price_excluding_taxes;\n }\n\n $this->_fProductAttributesInfo['salepriceincludingtaxes'] = $this->_fProductAttributesInfo[$index];\n $this->_fProductAttributesInfo['salepriceincludingtaxes']['pa_id'] = NULL;\n $this->_fProductAttributesInfo['salepriceincludingtaxes']['a_view_tag'] = NULL;\n\n if($tax_class_id !== NULL)\n {\n // .\n // _c_ 'salepriceexcludingtaxes':\n $price_including_taxes = $price_including_included_taxes_if_any;\n // ,\n // , \" \"\n //modApiFunc(\"Catalog\", \"computePriceIncludingTaxes\", $attribute['pa_value'], $tax_class_id);\n\n $this->_fProductAttributesInfo['salepriceincludingtaxes']['pa_value'] = $price_including_taxes;\n\n if($display_product_price_including_taxes == DB_TRUE)\n {\n $this->_fProductAttributesInfo[$index]['pa_value'] = $price_including_taxes;\n }\n }\n\n break;\n }\n }\n self::$_cache_attr[$a][$b][$c] = $this->_fProductAttributesInfo;\n }",
"function apptivo_ecommerce_product( $id) {\n\t\t\n\t\t$this->id = (int)$id;\t\t\n\t\t$app_item_id = get_post_meta($this->id,'_apptivo_item_id',true); \n\t\t$app_item_uom_id = get_post_meta($this->id,'_apptivo_item_uom_id',true);\n\t\t$app_item_manufactured_id = get_post_meta($this->id,'_apptivo_item_manufactured_id',true); \n\t\t$this->product_custom_fields = get_post_custom( $this->id );\t\t\n\t\t$this->exists = (sizeof($this->product_custom_fields)>0) ? true : false;\n\t\t// Define the data we're going to load: Key => Default value\n\t\t$load_data = array(\n\t\t\t'_apptivo_item_code'\t\t\t=> $this->id,\n\t\t '_apptivo_track_color' => '',\n\t\t '_apptivo_track_size' => '',\t\n\t\t\t'_apptivo_sale_price'\t=> '',\n\t\t\t'_apptivo_regular_price' => '',\t\t\t\n\t\t '_apptivo_item_id' => $awpItemId,//$app_item_id,\n\t\t '_apptivo_item_uom_id' => $awpItem_UOMId,//$_apptivo_item_uom_id\n\t\t\t'_apptivo_item_manufactured_id' => $app_item_manufactured_id\t \n\t\t);\n\t\t\n\t\t// Load the data from the custom fields\n\t\tforeach ($load_data as $key => $default) :\n\t\t\t$this->$key = (isset($this->product_custom_fields[$key][0]) && $this->product_custom_fields[$key][0]!=='') ? $this->product_custom_fields[$key][0] : $default;\n\t\tendforeach;\n\t\t\n\t\t// Load serialised data, unserialise twice to fix WP bug\n\t\tif (isset($this->product_custom_fields['product_attributes'][0])) $this->attributes = maybe_unserialize( maybe_unserialize( $this->product_custom_fields['product_attributes'][0] )); else $this->attributes = array();\t\t\n\t\t\t\t\t\t\n\t\t\n\t}",
"public function loadProduct($value, $productAttr = 'entity_id') {\n\t\treturn Mage::getModel('catalog/product')->load($value, $productAttr);\n\t}",
"function ciniki_merchandise_web_productLoad($ciniki, $tnid, $args) {\n \n $strsql = \"SELECT ciniki_merchandise.id, \"\n . \"ciniki_merchandise.uuid, \"\n . \"ciniki_merchandise.name, \"\n . \"ciniki_merchandise.permalink, \"\n . \"ciniki_merchandise.flags, \"\n . \"ciniki_merchandise.primary_image_id, \"\n . \"'' AS primary_image_caption, \"\n . \"ciniki_merchandise.synopsis, \"\n . \"ciniki_merchandise.description \"\n . \"FROM ciniki_merchandise \"\n . \"WHERE ciniki_merchandise.tnid = '\" . ciniki_core_dbQuote($ciniki, $tnid) . \"' \"\n . \"\";\n if( isset($args['permalink']) && $args['permalink'] != '' ) {\n $strsql .= \"AND ciniki_merchandise.permalink = '\" . ciniki_core_dbQuote($ciniki, $args['permalink']) . \"' \";\n } elseif( isset($args['id']) && $args['id'] > 0 ) {\n $strsql .= \"AND ciniki_merchandise.id = '\" . ciniki_core_dbQuote($ciniki, $args['id']) . \"' \";\n } else {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.merchandise.27', 'msg'=>'No product specified'));\n }\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbHashQuery');\n $rc = ciniki_core_dbHashQuery($ciniki, $strsql, 'ciniki.merchandise', 'product');\n if( $rc['stat'] != 'ok' ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.merchandise.28', 'msg'=>'Product not found', 'err'=>$rc['err']));\n }\n if( !isset($rc['product']) ) {\n return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.merchandise.29', 'msg'=>'Unable to find Product'));\n }\n $product = $rc['product'];\n\n //\n // Get the images\n //\n if( isset($args['images']) && $args['images'] == 'yes' ) {\n $strsql = \"SELECT id, \"\n . \"name AS title, \"\n . \"permalink, \"\n . \"flags, \"\n . \"image_id, \"\n . \"description \"\n . \"FROM ciniki_merchandise_images \"\n . \"WHERE product_id = '\" . ciniki_core_dbQuote($ciniki, $product['id']) . \"' \"\n . \"AND tnid = '\" . ciniki_core_dbQuote($ciniki, $tnid) . \"' \"\n . \"\";\n ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbHashQueryArrayTree');\n $rc = ciniki_core_dbHashQueryArrayTree($ciniki, $strsql, 'ciniki.merchandise', array(\n array('container'=>'images', 'fname'=>'id', 'fields'=>array('id', 'title', 'permalink', 'flags', 'image_id', 'description')),\n ));\n if( $rc['stat'] != 'ok' ) {\n return $rc;\n }\n if( isset($rc['images']) ) {\n $product['images'] = $rc['images'];\n } else {\n $product['images'] = array();\n }\n if( $product['primary_image_id'] > 0 ) {\n $found = 'no';\n foreach($product['images'] as $image) {\n if( $image['image_id'] == $product['primary_image_id'] ) {\n $found = 'yes';\n }\n }\n if( $found == 'no' ) {\n array_unshift($product['images'], array('title'=>'', 'flags'=>1, 'permalink'=>$product['uuid'], 'image_id'=>$product['primary_image_id'], 'description'=>''));\n }\n }\n }\n\n return array('stat'=>'ok', 'product'=>$product);\n}",
"function product( )\n {\n if ( $this->State_ == \"Dirty\" )\n $this->get( $this->ID );\n\n $ret = new eZProduct( $this->ProductID );\n \n return $ret;\n }",
"public function getProduct();",
"public static function loadProductByProId($p_proId)\n {\n $sql = \"select * from products where ProID = $p_proId\";\n $list = DataProviderMain::execQuery($sql);\n if ($row = mysqli_fetch_array($list)) {\n\n //$proId = $row[\"ProID\"];\n //$proId = $p_proId;\n $proName = $row[\"ProName\"];\n $tinyDes = $row[\"TinyDes\"];\n $fullDes = $row[\"FullDes\"];\n $price = $row[\"Price\"];\n $quantity = $row[\"Quantity\"];\n $catId = $row[\"CatID\"];\n $view = $row[\"NView\"];\n $dayAdd = $row[\"DayAdd\"];\n $classify = $row[\"Classify\"];\n\n $p = new Products($p_proId, $proName, $tinyDes, $fullDes, $price, $quantity, $catId, $view, $dayAdd, $classify);\n return $p;\n }\n\n return NULL;\n }",
"protected function getProductLoadId()\n {\n $product = $this->locator->getProduct();\n if (method_exists($product, 'getData')) {\n return $product->getData($this->getProductLinkField());\n }\n }",
"public function product()\n {\n return $this->belongsTo(config('inventory.models.product-variant'), 'product_variant_id');\n }",
"public function getVariantByProduct($id){\n $this->db->select('*');\n $this->db->where('id_product', $id);\n $this->db->from($this->product_variant); \n return $this->db->get();\n }"
]
| [
"0.6955738",
"0.6884401",
"0.68206215",
"0.6680621",
"0.640358",
"0.6381325",
"0.6380651",
"0.63370186",
"0.63091284",
"0.62851",
"0.62492704",
"0.62274253",
"0.6206193",
"0.6196525",
"0.6160851",
"0.6158004",
"0.61410207",
"0.60924953",
"0.604175",
"0.6021404",
"0.5966728",
"0.5960123",
"0.5949161",
"0.5942481",
"0.5937136",
"0.5919644",
"0.590328",
"0.58569473",
"0.58503014",
"0.5835241"
]
| 0.72337687 | 0 |
Obtiene los perfiles asociados a un usuario de base de datos | private function obtenerPerfiles ($idUser = "") {
if ($idUser != "") {
$this->id_usuario = $idUser;
}
if (count($this->perfiles) < 1) {
$query = $this->stringConsulta() . " where a.id_usuario=$this->id_usuario";
$data = $this->bd->ejecutarQuery($query);
if ($data instanceof \Countable and count($data) > 1) {
throw new Exception("No se han obtenido los perfiles del usuario", 1);
}
while ($perfil = $this->bd->obtenerArrayAsociativo($data)) {
$this->perfiles[$perfil['clave_perfil']] = $perfil['clave_perfil'];
}
}
else {
$this->perfiles[] = 'UsuarioPublico';
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function getPerfiles($idUser){\n\t\t/*\n\t\tDeben obtenerse de control_perfil_usuario los id de perfiles a los que pertenece el \n\t\tusuario para poder desplegarlos en el formulario de edición de datos\n\t\t*/\n\t\t$array=array();\n\t\t$oPerfilUsuario=new Perfil_usuario($this->oDBM);\n\t\t$arrayPerfilUsuario=$oPerfilUsuario->getPerfilesUsuario($idUser);\n\t\t\n\t\tforeach ($arrayPerfilUsuario as $item){\n\t\t\t$array[]=$item['id_perfil'];\n\t\t}\n\t\treturn $array;\n\t\t\n\t}",
"public function GetAllPerfiles()\n {\n \t$perfiles = Perfil::all();\n \treturn $perfiles;\n }",
"function asociarPerfiles ($perfiles) {\n\n $insert = \"insert into s_usuarios_perfiles (id_usuario_perfil, id_usuario, id_perfil) values \";\n $i = 0;\n foreach ($perfiles as $key => $idPerfil) {\n\n if ($i > 0)\n $insert .= \",\";\n\n $insert .= \"(null,$this->id_usuario,$idPerfil)\";\n $i++;\n }\n\n $delete = \"delete from s_usuarios_perfiles where id_usuario=$this->id_usuario;\";\n\n $this->bd->ejecutarQuery($delete . $insert, 2);\n\n return ['ejecutado' => 1];\n }",
"public function getPerfiles()\n {\n $dql = \"SELECT p.id, p.perPerfil, p.perEstado\n FROM sgiiBundle:TblPerfil p\n WHERE p.perEstado = 1\";\n $query = $this->em->createQuery($dql);\n return $query->getResult();\n }",
"public function getPerfilesArray()\n {\n $perfiles = $this->getPerfiles();\n $ArrayPer = Array();\n if ($perfiles) {\n foreach ($perfiles as $per){\n $ArrayPer[$per['id']] = $per['perPerfil'];\n }\n }\n return $ArrayPer;\n }",
"private function getAllProfils() {\n\t\tif (isset($this->profils)) {\n\t\t\treturn $this->profils;\n\t\t}\n\t\t$this->profils = array();\n\t\t$query = \"SELECT p.*, date_format(u.last_login, '%Y-%m-%d') as last_login\n\t\t\tFROM \".DB_PREFIX.\"profil p, \".DB_PREFIX.\"user u\n\t\t\tWHERE u.braldahim_id = p.idBraldun\n\t\t\tORDER BY idBraldun ASC;\";\n\t\t$res = mysql_query($query, $this->db);\n\t\twhile ($row = mysql_fetch_assoc($res)) {\n\t\t\t$this->profils[] = $row;\n\t\t}\n\t\tmysql_free_result($res);\n\t}",
"public function lCargartablaPerfiles() {\n $oDLaboratorio = new DLaboratorio();\n $rs = $oDLaboratorio->dCargartablaPerfiles();\n foreach ($rs as $key => $value) {\n array_push($rs[$key], \"../../../../fastmedical_front/imagen/icono/smile9.gif ^ Seleccionar\");\n }\n return $rs;\n }",
"private function iniciar_perfil(){\n\t\t// if(!isset($_SESSION['id_user'])){\n\t\t// \theader('location : index.php');\n\t\t// }\n\n\t\trequire_once 'inc/clases/procesos/fechas.class.php';\n\t\trequire_once 'inc/clases/perfil/usuarios.class.php';\t\t\t//clase usuarios\n\t\t$this->Modulos = new Modulos();\t\n\t\t$this->Usuario = new Usuarios();\t\t\t\n\t}",
"public function get_rol_usuario(){\n\t\t$rol_user=$_SESSION[\"sesion_perfil\"];\n\t\t$sql=mysqli_query(Conecta::conx(),\"SELECT PERFIL FROM perfiles WHERE ID_PERFIL='$rol_user'\") or die('Error en la consulta del perfil de usuario:' . $sql . mysqli_errno(Conecta::conx()));\n\t\tif($reg=mysqli_fetch_assoc($sql)){\n\t\t\t$this->perfil[]=$reg;\n\t\t}\n\t\treturn $this->perfil;\n\t\t\n\t}",
"function perfiles($acceso){\n\t$acceso->objeto->ejecutarSql(sql(\"modulo ORDER BY nombremodulo\"));\t\n\treturn seguridadPerfil($acceso);\n}",
"public function list_owned_files() {\n $stmt = $this->pdo->prepare('select filename from file where user_id = :id');\n $stmt->bindValue(':id', $this->id);\n $stmt->execute();\n $res = $stmt->fetchAll();\n $result = array();\n foreach ($res as $f) {\n array_push($result, $f['filename']);\n }\n return $result;\n }",
"private function iniciar_perfil_mda(){\n\t\trequire_once 'inc/clases/procesos/fechas.class.php';\n\t\trequire_once 'inc/clases/procesos/sql_anuncios.class.php';\n\t\trequire_once 'inc/clases/mda/show_master.class.php';\n\t\trequire_once 'inc/clases/mda/pedidos.class.php';\n\t\trequire_once 'inc/clases/config/perfil_config.class.php';\n\n\t\t$this->Modulos = new Modulos();\n\t}",
"public function Perfil(){\n $pvd = new alumno();\n\n //Se obtienen los datos del alumno.\n if(isset($_REQUEST['persona_id'])){\n $pvd = $this->model->Obtener($_REQUEST['persona_id']);\n }\n\n //Llamado de las vistas.\n require_once '../Vista/Alumno/perfil-alumno.php';\n\t}",
"private function usrprfget() {\n $q = \"SELECT * FROM ass_usuario_has_mzt_perfiles WHERE mzt_usuario_usr_id = $this->id ORDER BY mzt_perfiles_prf_id ASC\";\n $con = mysql_query($q, $this->conexion) or die(mysql_error() . \"***ERROR: \" . $q);\n $arrassigned = array();\n $arravailable = array();\n while ($obj = mysql_fetch_object($con)) {\n $arrassigned[] = array('id' => $obj->mzt_perfiles_prf_id);\n }\n //se consultan los perfiles disponibles\n $q = \"SELECT * FROM ass_perfiles ORDER BY prf_nombre ASC\";\n $con = mysql_query($q, $this->conexion) or die(mysql_error() . \"***ERROR: \" . $q);\n while ($obj = mysql_fetch_object($con)) {\n $arravailable[] = array(\n 'id' => ($obj->prf_id),\n 'nombre' => ($obj->prf_nombre),\n 'descripcion' => ($obj->prf_descripcion));\n }\n\n $arrjson = array('output' => array('valid' => true, 'available' => $arravailable, 'assigned' => $arrassigned));\n $this->response = ($arrjson);\n }",
"public function Perfil(){\n $pvd = new tutoria();\n\n //Se obtienen los datos del tutoria.\n if(isset($_REQUEST['persona_id'])){\n $pvd = $this->model->Obtener($_REQUEST['persona_id']);\n }\n\n //Llamado de las vistas.\n require_once '../Vista/Tutoria/perfil-tutoria.php';\n\t}",
"public function getUserFiles()\n {\n $user_files = Helper::getUserFiles();\n return $user_files;\n }",
"public function configurar()\n {\n //\n $count = Perfiles::select()->get()->count();\n if ($count == 0) {\n $permisos = Funcionalidades::select()->get();\n Perfiles::create(['nombre' => 'Super Su','usuario'=>1]);\n foreach ($permisos as $value) {\n Permisos::create(['id_perfil' => 1, 'id_funcionalidad' => $value->id]);\n }\n User::create(['name' => 'Admin', 'email' => 'Admin', 'password' => 'Admin', 'id_perfil' => 1,'usuario'=>1]);\n }\n }",
"function getPermisos($idUser){\n\t\t$sql=\"\n\t\tSELECT DISTINCT\n\t\tcontrol_objeto.clave as 'objeto',\n\t\tcontrol_permiso.tipo as 'tipo'\n\t\tFROM\n\t\tcontrol_perfil_usuario\n\t\tINNER JOIN control_perfil_permiso ON control_perfil_usuario.id_perfil=control_perfil_permiso.id_perfil\n\t\tINNER JOIN control_permiso ON control_perfil_permiso.id_permiso=control_permiso.id_permiso\n\t\tINNER JOIN control_objeto ON control_permiso.id_objeto=control_objeto.id_objeto\n\t\tWHERE control_perfil_usuario.id_usuario=$idUser\";\n\t\treturn $this->toArray($sql);\n\t}",
"public function permisos()\n {\n\n $conectar = parent::conexion();\n\n $sql = \"select * from permisos;\";\n\n $sql = $conectar->prepare($sql);\n $sql->execute();\n return $resultado = $sql->fetchAll();\n }",
"public function getPerfils()\n {\n return $this->hasMany(Perfil::className(), ['modulo_cod_fk' => 'modulo_cod_pk']);\n }",
"function loadPerfil(){\n\t\t$r = $this->dper->getPerfilById($this->id);\n\t\tif($r != -1){\n\t\t\t$this->nombre = $r[\"nombre\"];\n\t\t}else{\n\t\t\t$this->nombre = \"\";\n\t\t}\n\t}",
"function opcion__compilar_perfiles()\n {\n $param = $this->get_parametros();\n $id = isset($param[\"-p\"]) ? $param[\"-p\"] : $this->get_id_proyecto_actual(true);\n\n try {\n $proyecto = $this->get_proyecto($id);\n $path = $proyecto->get_dir_generales_compilados();\n if (!\\file_exists($path) || !\\is_writable($path)) {\n $this->consola->error('ATENCION!!: Considere ejecutar el comando compilar para abarcar todos los metadatos'. PHP_EOL);\n throw new toba_error('No existe o no es accesible la carpeta de metadatos compilados!!'. PHP_EOL);\n }\n toba_manejador_archivos::crear_arbol_directorios($path);\n $proyecto->compilar_metadatos_generales_grupos_acceso(true);\n } catch ( toba_error $e ) {\n\t\t$this->consola->error( \"PROYECTO $id: Ha ocurrido un error durante la compilacion:\\n\".$e->getMessage());\n exit(-1);\n }\n }",
"public static function getAll_files() {\n $db = DBInit::getInstance();\n\n $statement = $db->prepare(\"SELECT id, file_name, uploaded, user FROM files\");\n $statement->execute();\n\n return $statement->fetchAll();\n }",
"public function perfil() {\n require_once 'views/usuarios/perfil.php';\n }",
"function getPerfiles () {\n\n $this->obtenerPerfiles();\n\n return $this->perfiles;\n }",
"function perfil (){\n \t $dato=$_SESSION['Usuarios'];\n\t\t $datos = Usuario::mostrar($dato);\n \t require \"app/Views/Perfil.php\";\n }",
"function loadPerfilOpciones(){\n\t\t$r = $this->dper->loadPerfilOpciones($this->id);\n\t\t$opc = null;\n\t\twhile($row = mysql_fetch_array($r)){\n\t\t\tif($row['per_id'] == $this->id) $indicador = 1; else $indicador = 0;\n\t\t\t$opc[count($opc)]=array('id'=>$row['opc_id'],\n\t\t\t\t\t \t'nombre'=>$row['opc_nombre'],\n\t\t\t\t\t\t'nivel'=>$row['opn_id'],\n \t\t\t\t\t\t'indicador'=>$indicador,\n \t\t\t\t\t\t'acceso'=>$row['pxo_nivel']);\n\t\t}\n\t\treturn $opc;\n\t}",
"function perfil($acceso){\n\t$cad=opcion('',\"Selecciones...\");\n\t$acceso->objeto->ejecutarSql(sql(\"perfil\"));\n\twhile ($row=row($acceso))\n\t{\n\t\t$cad=$cad.opcion(trim($row[\"codigoperfil\"]),trim($row[\"nombreperfil\"]));\t\t\n\t}\t\t\t\t\t\t\t\t\n\treturn $cad;\t\n}",
"function actualizarPerfilesUsuario($arrayPerfil,$idUsuario){\n\t\t/* Debe tomar los perfiles que se marcaron como pertenecientes en un formulario\n\t\ty actualizar en la tabla control_perfil_usuario\n\t\tLo ideal es eliminar primero todos los perfiles, y volver a escribirlos\n\t\t*/\n\t\t\n\t\t$oPerfilUsu=new Perfil_usuario($this->oDBM);\n\t\t$okDelete=$oPerfilUsu->deleteUsuario($idUsuario);\n\t\tforeach ($arrayPerfil as $item){\n\t\t\t$okInsert=$oPerfilUsu->insertUsuario($idUsuario,$item);\n\t\t}\n\t\treturn true;\n\t}",
"function cargar_informacion_reducida()\n\t{\n\t\t// Cabecera del proyecto\n\t\t$this->manejador_interface->mensaje('Cargando datos globales', false);\n\t\t$archivo = $this->get_dir_tablas() . '/apex_proyecto.sql';\n\t\t$this->db->ejecutar_archivo( $archivo );\n\t\t$this->manejador_interface->mensaje('.OK');\n\t\t// Grupos de acceso y permisos\n\t\t$this->cargar_perfiles();\n\t}"
]
| [
"0.6968639",
"0.68458104",
"0.66054463",
"0.64045686",
"0.62305546",
"0.6122248",
"0.60863817",
"0.6086165",
"0.60755014",
"0.60463136",
"0.5945213",
"0.5937028",
"0.59190816",
"0.5898024",
"0.58893895",
"0.5883103",
"0.5865218",
"0.58140594",
"0.58000606",
"0.57975334",
"0.5788889",
"0.5775118",
"0.57741874",
"0.5773045",
"0.5730238",
"0.57277143",
"0.5674877",
"0.5673979",
"0.56621313",
"0.56614316"
]
| 0.6981998 | 0 |
Registra la sesion del usuario | function registrarSesion () {
if (!empty($this->id_usuario)) {
$this->salvar(['ultima_session' => 'current_timestamp',
'activo' => 1
]);
Helpers\Sesion::sessionLogin();
}
else return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function register(): void\n {\n $user = User::factory()->create();\n $this->actingAs($user);\n }",
"public function register () : void\n {\n $this->getHttpReferer();\n\n // if the user is already logged in,\n // redirection to the previous page\n if ($this->session->exist(\"auth\")) {\n $url = $this->router->url(\"admin\");\n Url::redirect(301, $url);\n }\n\n $errors = []; // form errors\n $flash = null; // flash message\n\n $tableUser = new UserTable($this->connection);\n $tableRole = new RoleTable($this->connection);\n\n // form validator\n $validator = new RegisterValidator(\"en\", $_POST, $tableUser);\n\n // check that the form is valid and add the new user\n if ($validator->isSubmit()) {\n if ($validator->isValid()) {\n $role = $tableRole->find([\"name\" => \"author\"]);\n\n $user = new User();\n $user\n ->setUsername($_POST[\"username\"])\n ->setPassword($_POST[\"password\"])\n ->setSlug(str_replace(\" \", \"-\", $_POST[\"username\"]))\n ->setRole($role);\n\n $tableUser->createUser($user, $role);\n\n $this->session->setFlash(\"Congratulations {$user->getUsername()}, you are now registered\", \"success\", \"mt-5\");\n $this->session\n ->write(\"auth\", $user->getId())\n ->write(\"role\", $user->getRole());\n\n // set the token csrf\n if (!$this->session->exist(\"token\")) {\n $csrf = new Csrf($this->session);\n $csrf->setSessionToken(175, 658, 5);\n }\n\n $url = $this->router->url(\"admin\") . \"?user=1&create=1\";\n Url::redirect(301, $url);\n } else {\n $errors = $validator->getErrors();\n $errors[\"form\"] = true;\n }\n }\n\n // form\n $form = new RegisterForm($_POST, $errors);\n\n // url of the current page\n $url = $this->router->url(\"register\");\n\n // flash message\n if (array_key_exists(\"form\", $errors)) {\n $this->session->setFlash(\"The form contains errors\", \"danger\", \"mt-5\");\n $flash = $this->session->generateFlash();\n }\n\n $title = App::getInstance()\n ->setTitle(\"Register\")\n ->getTitle();\n\n $this->render(\"security.auth.register\", $this->router, $this->session, compact(\"form\", \"url\", \"title\", \"flash\"));\n }",
"public function register() {\n\t\tif ($this -> Auth -> loggedIn()) {\n\t\t\t$this -> Session -> setFlash('You are already registered.');\n\t\t\t$this -> redirect($this -> referer());\n\t\t}\n\t\tif ($this -> request -> is('post')) {\n\t\t\t$this -> User -> create();\n\t\t\t$data = $this -> request -> data;\n\t\t\t$data['User']['public_key'] = uniqid();\n\t\t\t$data['User']['role'] = \"user\";\n\t\t\t$data['User']['api_key'] = md5(microtime().rand());\n\t\t\tif ($this -> User -> save($data)) {\n\t\t\t\t$this -> Session -> setFlash(__('You have succesfully registered. Now you can login.'));\n\t\t\t\t$this -> redirect('/users/login');\n\t\t\t} else {\n\t\t\t\t$this -> Session -> setFlash(__('The user could not be saved. Please, try again.'));\n\t\t\t}\n\t\t}\n\n\t\t$this -> set('title_for_layout', 'User Registration');\n\t}",
"private function _registerSession(Users $user)\n {\n $this->session->set(\n 'auth',\n [\n 'id' => $user->id,\n 'name' => $user->username,\n ]\n );\n }",
"private function _registerSession(Users $user)\n {\n $this->session->set('auth', array(\n 'id' => $user->id_usr,\n 'name' => $user->first_usr,\n 'level' => $user->level_usr_lvl,\n ));\n }",
"public function register()\n {\n $user = new UserManager;\n $request = new Request;\n $errorMessage = '';\n $method = $request->getMethode();\n if ($method == \"POST\") {\n $mailUser = $request->getPost('mail');\n $password = $request->getPost('mdp');\n $checkPassword = $request->getPost('cmdp');\n $userName = $request->getPost('userName');\n $userData = array();\n $userData['mail'] = $mailUser;\n $userData['pass'] = $password;\n $userData['userName'] = $userName;\n $userData['role'] = 'user';\n $mailUsed = $user->checkMail($mailUser);\n $userNameUsed = $user->checkUserName($userName);\n\n //if true register user on session \n if (!$mailUsed) {\n if (!$userNameUsed) {\n if ($password == $checkPassword) {\n if (filter_var($mailUser, FILTER_VALIDATE_EMAIL)) {\n $errorMessage = 'Vous êtes connecté avec succés ';\n $request->newSession(\"user\", $userData);\n $hashPassword = hash(\"sha256\", $password);\n $user->newUser($userName, $mailUser, $hashPassword);\n } else {\n $errorMessage = 'Le format de l\\'email est incorrect ';\n }\n } else {\n $errorMessage = 'Les mots de passe ne sont pas identique ';\n }\n } else {\n $errorMessage = 'Le nom d\\'utilisateur entré n\\'est pas disponible ';\n }\n } else {\n $errorMessage = 'Cette email est déja utilisé';\n }\n return $this->render('user/register.html.twig', ['errorMessage' => $errorMessage]);\n }\n return $this->render('user/register.html.twig', ['errorMessage' => $errorMessage]);\n }",
"public function registra_sesion()\r\n {\r\n $datos_usuario = array(\r\n 'nom_usuario' => $this->session->userdata('nom_usuario'),\r\n 'id_perfil' => $this->session->userdata('id_perfil')\r\n );\r\n // $insert_id = $this->db->insert_id();\r\n // $IdSesion = $this->db->insert_id();\r\n $this->db->insert('sesiones',$datos_usuario);\r\n // $this->db->insert(userdata($IdSesion));\r\n }",
"private static function register() {\n if ( !self::validatePost() ) {\n return;\n }\n\n if ( !self::validEmail($_POST['email']) ) {\n self::setError('E-Mail Adresse ist nicht gültig!<br>');\n return;\n }\n \n $_POST['email'] = strtolower($_POST['email']);\n \n $password = Helper::hash($_POST['password'].$_POST['email']);\n \n $verified = md5($_POST['email'].$password.microtime(true));\n \n $result = Database::createUser($_POST['email'],$password,$verified);\n \n if ( $result === false || !is_numeric($result) ) {\n return;\n }\n \n $_SESSION['user']['id'] = $result;\n $_SESSION['user']['email'] = $_POST['email'];\n $_SESSION['user']['verified'] = $verified;\n $_SESSION['loggedin'] = true;\n self::$loggedin = true;\n \n self::registerMail($verified);\n }",
"private function _registerSession(Pessoa $user) {\r\n $this->session->set('auth', array(\r\n 'codpes' => $user->codpes,\r\n 'nompes' => $user->nompes\r\n ));\r\n }",
"public function registrar_usuario($usuario, $clave, $email, $pintor) {\n /*Creamos la instancia del objeto. ya estamos conectados*/\n $bd = Db::getInstance();\n $sql = \"INSERT INTO login (usuario, clave, email, pintor) VALUES (:usuario, :clave, :email, :pintor)\";\n $stmt = $bd->prepare($sql);\n $stmt->execute([\":usuario\" => $usuario, \":clave\" => $clave, \":email\" => $email, \":pintor\" => $pintor]);\n }",
"private function _registerSession(Users $user)\n {\n $this->session->set('auth', array(\n 'id' => $user->getId(),\n 'email' => $user->email,\n 'admin' => $user->isAdmin(),\n 'data' => array(\n 'name' => $user->name,\n 'status' => $user->status,\n )\n ));\n\n $user->last_login = date('y-m-d H:i:s');\n if ($user->save() == false) {\n $this->flash->error(\"Could not save time.\");\n\n }\n\n $this->session->admin = $user->isAdmin();\n\n $this->session->curator = ($user->isAdmin() || $user->status > 1);\n }",
"public function register_user()\n {\n \n return true;\n \n }",
"public function registerAdminAction()\n {\n if($this->passwordFieldCheck($this->httpParameters['password'],$this->httpParameters['passwordCheck'],\n '/auth/first-time'))\n {\n try\n {\n //Instantiates a User\n $admin = new User([\n 'username' => $this->httpParameters['username'],\n 'email' => $this->httpParameters['email'],\n 'password' => $this->httpParameters['password'],\n 'role' => User::ROLE_ADMIN\n ]);\n\n //Inserts admin in database\n $this->manager->insertUser($admin);\n\n //Sets to the user the last id registered\n $admin->setId($this->manager->lastId());\n\n //Sets the $_SESSION user\n $_SESSION['user'] = $admin;\n\n $this->response->redirect('/admin',HttpResponse::ADMIN_REGISTERED);\n }\n catch(EntityAttributeException $e)\n {\n //Redirects to same page in case of typing error\n $this->response->redirect('/auth/first-time',$e->getMessage());\n }\n }\n }",
"public function agregarUsuario(){\n \n }",
"function registrar(){\n\n\t\t\t\n\t\t$sql = \"INSERT INTO USUARIOS (\n\t\t\tlogin,\n\t\t\tpassword,\n\t\t\tnombre,\n\t\t\tapellidos,\n\t\t\temail,\n\t\t\tDNI,\n\t\t\ttelefono,\n\t\t\tFechaNacimiento,\n\t\t\tfotopersonal,\n\t\t\tsexo\n\t\t\t) \n\t\t\t\tVALUES (\n\t\t\t\t\t'\".$this->login.\"',\n\t\t\t\t\t'\".$this->password.\"',\n\t\t\t\t\t'\".$this->nombre.\"',\n\t\t\t\t\t'\".$this->apellidos.\"',\n\t\t\t\t\t'\".$this->email.\"',\n\t\t\t\t\t'\".$this->DNI.\"',\n\t\t\t\t\t'\".$this->telefono.\"',\n\t\t\t\t\t'\".$this->FechaNacimiento.\"',\n\t\t\t\t\t'\".$this->fotopersonal.\"',\n\t\t\t\t\t'\".$this->sexo.\"'\n\n\t\t\t\t\t)\";\n\t\t\t\t\t\t\t\t\n\t\tif (!$this->mysqli->query($sql)) { //Si la sentencia sql no devuelve información\n\t\t\treturn 'Error de gestor de base de datos';\n\t\t}\n\t\telse{\n\t\t\treturn 'Inserción realizada con éxito'; //si es correcta\n\t\t}\t\t\n\t}",
"public function register()\n {\n // //获取登录者信息\n // $user = session('email');\n // var_dump($user);die;\n // $user_id = DB::table('users')->where('email','=',$user)->select('id')->first();\n // $day_ling = strtotime(date(\"Y-m-d\"),time());\n // $day_twofour = $day_ling+60*60*24;\n // $this->app->singleton(News_Nums::class, function ($app) {\n // $nums = DB::table('news')->where([['created_at','>',$day_ling],['created_at','<',$day_twofour],['user_id','=',$user_id]])->pluck('data_id');\n // $nums = count(json_decode(json_encode($nums),true));\n // if($nums>0)\n // {\n // return view('Admin.common._header',['nums'=>$nums]);\n // }\n // return view('Admin.common._header',['nums'=>0]);\n // });\n // var_dump(session('email'));die;\n }",
"public function registerUser()\n {\n $sql = \"INSERT INTO user (username, password, email, firstname, lastname, address, date_of_birth, id_role)\n VALUES (\\\"\" . $this->getUsername().\"\\\", \\\"\" . $this->getPassword().\"\\\", \\\"\" . $this->getEmail().\"\\\",\\\"\" . $this->getFirstname().\"\\\", \\\"\" . $this->getLastname().\"\\\", \\\"\" . $this->getAddress().\"\\\", \\\"\" . $this->getDateOfBirth().\"\\\", \\\"\" . $this->getIdRole().\"\\\")\";\n $result = mysqli_query($this->_connection, $sql);\n if (!$result) {\n print \"Error: \" . $result . \"<br>\" . mysqli_error($this->_connection);\n } else {\n print \"erfolg\";\n\n }\n }",
"public function autentificacion($username,$password){\n $userService = new UsuariosServiceImp();\n //objeto de tipo usuario\n $usuario = new Usuarios();\n //llamdo al metodo definido en la capa de servicio\n $usuario = $userService->buscarPorUsernamePassword($username,$password);\n if ( is_object($usuario)){\n /*\n variable de sesion mediante variables locales\n \n $_SESSION['nombre'] = $usuario->getNombre();\n $_SESSION['correo'] = $usuario->getEmail();\n $_SESSION['id'] = $usuario->getId();\n */\n /* variable de sesion mediante un arreglo asociado\n */\n $_SESSION['miSesion'] = array();\n $_SESSION['miSesion']['nombre'] = $usuario->getNombre();\n $_SESSION['miSesion']['correo'] = $usuario->getEmail();\n $_SESSION['miSesion']['id'] = $usuario->getId();\n \n //echo \"<br>El usuario es valido\";\n header(\"location:../view/productos.class.php\");\n }else{\n //echo \"<br>Este usuario no esta registrado en la base de datos\";\n header(\"location:../view/formLogin.html\");\n }\n }",
"public function register()\n\t{\n\t\t// validamos que existan los campos\n\t\t$errors = $this->validate( $_POST, [\n\t\t\t'name|nombre' => 'required',\n\t\t\t'username|usuario' => 'required|unique:users',\n\t\t] );\n\n\t\tif( $errors )\n\t\t{\n\t\t\techo $this->errors();\n\t\t\treturn;\n\t\t}\n\t\t// validamos que sea una peticion por post\n\t\t$this->__post();\n\t\t// validamos si existe o le definimos un valor\n\t\t$_POST['password'] = isset( $_POST['password'] ) ? $_POST['password'] : '';\n\t\t$_POST['nameE'] = isset( $_POST['nameE'] ) ? $_POST['nameE'] : '';\n\t\t// realizamos la peticion al modelo de cerrar sesion\n\t\t$login = $this->auth->register( $_POST['name'], $_POST['username'], $_POST['password'], $_POST['nameE'], $_POST['role'] );\n\t\t// explotamos el resultado\n\t\t$login = explode(\"|\", $login);\n\t\t// validamos si se logueo o no\n\t\tif( $login[0] != 'logueado' )\n\t\t{\n\t\t\t// agregamos a las variables de error la respuesta del servidor\n\t\t\tarray_push($this->errors, $login[0]);\n\t\t\t// agregamos los errores obtenidos desde la peticion hecha al model\n\t\t\techo $this->errors();\n\t\t\treturn;\n\t\t}\n\t\telse{\n\t\t\t// retornamos a la vista de acceso cuando se satisfatorio el logueo\n\t\t\techo \"true|\".$login[1];\n\t\t}\n\t}",
"public function register() {\n\t\tif ($this->Session->check('Auth.User')) {\n\t\t\t$this->redirect('/');\n\t\t}\n\t\t\n\t\tif ($this->request->is('post')) {\n\t\t\t$this->User->create();\n\t\t\t$data = $this->request->data;\n\t\t\tif ($this->User->save($data)) {\n\t\t\t\t$this->Session->setFlash(\"User has been created.\", 'default', array(), 'register');\n\t\t\t\t$this->redirect('/login');\n\t\t\t} else {\n\t\t\t\t$this->Session->setFlash(\"This user couldn't created. Please try again.\");\n\t\t\t}\n\t\t} else\n\t\t\t$this->Session->delete('Message.register');\n\t}",
"public function storeSessionTokenInRegistry() {}",
"public function userregisterAction(Request $request)\n {\n // 1) build the form\n $usuario = new Usuarios();\n $form = $this->createForm(UsuariosType::class, $usuario);\n \n // 2) handle the submit (will only happen on POST)\n $form->handleRequest($request);\n if ($form->isSubmitted() && $form->isValid()) {\n \n // 3) Encode the password (you could also do this via Doctrine listener)\n $password = $this->get('security.password_encoder')->encodePassword($usuario, $usuario->getPlainPassword());\n $usuario->setPassword($password);\n \n // 4) save the User!\n $roles = [\"ROLE_ADMIN\"];\n $usuario->setRoles($roles);\n $DB = $this->getDoctrine()->getManager();\n $DB->persist($usuario);\n $DB->flush();\n \n // ... do any other work - like sending them an email, etc\n // maybe set a \"flash\" success message for the user\n \n return $this->redirectToRoute('usersexamen');\n }\n \n return $this->render('restauranteBundle:examen:userregister.html.twig',array('form' => $form->createView()));\n }",
"public function register (){\n $msg=\"\";\n if (isset($_POST[\"register\"])) {\n if ($this->isValidInput($_POST)){\n $firstName = $_POST[\"firstName\"];\n $lastName = $_POST[\"lastName\"];\n $email = $_POST[\"email\"];\n $password = password_hash(trim($_POST[\"password\"]), PASSWORD_BCRYPT);\n $age = $_POST[\"age\"];\n $isAdmin = null;\n //if user is not empty - the email from input already exists\n $user = UserDao::getByEmail($email);\n if($user != null){\n $msg .= \"Вече съществува потребител с този email\";\n $this->triggerError($msg, 'register.tpl');\n }\n else {\n $newUser = new User(null, $firstName,$lastName,$email,$password,$age,$isAdmin);\n UserDao::addUser($newUser);\n $_SESSION[\"user\"] = $newUser;\n header(\"Location: \".BASE_PATH);\n }\n }\n else {\n $msg .= \"Въведени са невалидни данни\";\n $this->triggerError($msg, 'register.tpl');\n }\n }\n else {\n $GLOBALS[\"smarty\"]->assign('isLoggedIn', isset($_SESSION[\"user\"]));\n $GLOBALS[\"smarty\"]->assign('msg', $msg);\n $GLOBALS[\"smarty\"]->display('register.tpl');\n }\n }",
"public function register_with_tyk() {\n\t\ttry {\n\t\t\t$tyk = new Tyk_API();\n\t\t\t$user_id = $tyk->post('/portal/developers', array(\n\t\t\t\t'email' => $this->user->user_email,\n\t\t\t\t));\n\t\t\t$this->set_tyk_id($user_id);\n\t\t}\n\t\tcatch (Exception $e) {\n\t\t\ttrigger_error(sprintf('Could not register user for API: %s', $e->getMessage()), E_USER_WARNING);\n\t\t}\n\t}",
"function registerUser()\n\t{\n\t\t$userName = $_POST['userName'];\n\n\t\t# Verify that the user doesn't exist in the database\n\t\t$result = verifyUser($userName);\n\n\t\tif ($result['status'] == 'COMPLETE')\n\t\t{\n\t\t\t$email = $_POST['email'];\n\t\t\t$userFirstName = $_POST['userFirstName'];\n\t\t\t$userLastName = $_POST['userLastName'];\n\n\t\t\t$userPassword = encryptPassword();\n\n\t\t\t# Make the insertion of the new user to the Database\n\t\t\t$result = registerNewUser($userFirstName, $userLastName, $userName, $email, $userPassword);\n\n\t\t\t# Verify that the insertion was successful\n\t\t\tif ($result['status'] == 'COMPLETE')\n\t\t\t{\n\t\t\t\t# Starting the session\n\t\t\t\tstartSession($userFirstName, $userLastName, $userName);\n\t\t\t\techo json_encode($result);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t# Something went wrong while inserting the new user\n\t\t\t\tdie(json_encode($result));\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t# Username already exists\n\t\t\tdie(json_encode($result));\n\t\t}\n\t}",
"public function addUsuario($usuario){\n $_SESSION[\"usuario\"]=$usuario;\n $this->usuario=$usuario;\n }",
"public function registrarUsuario()\n {\n $datos = array();\n\n //guardamos los datos del formulario en un array \n foreach ($_POST as $clave => $valor) {\n $datos[$clave] = $valor;\n }\n\n //añadimos una clave por defecto y generamos el ciu\n $datos['clave'] = hash('sha512', \"12345678\");\n $datos['ciu'] = self::generarCiu($datos['nombre'], $datos['apellidos'], $datos['fecha_nacimiento']);\n\n //insertamos los datos y mostramos un error en funcion de si ha habido error o no\n echo $this->Usuarios_model->registrarUsuario($datos) ? 1 : 0;\n }",
"public function register()\n {\n $name = $this->loginEntry->input('uname');\n $email = $this->loginEntry->input('email');\n $password = $this->commonFunction->generateHash($this->loginEntry->input('pass'));\n $this->userDetail->makeEntry($name, $email, $password);\n \n $info = $this->userDetail->getDetail($email, $password);\n \n $this->commonFunction->setSession($info->id, $info->user_name);\n \n return redirect('/dashboard');\n }",
"public function salvar(){\n \n\t\t/*\n\t\t\tReceber dados vindos do formulario.\n\t\t*/\n\n\t\t$login = $this->post(\"login\");\n\t\t$senha = $this->post(\"senha\");\n\t\t$senha = md5($senha);\n\t\t$tipo = 2;\n\n\t\t/*\n\t\t\tInserindo dados na tabela usuário.\n\t\t*/\n\t\t$campos = \"(login,senha,tipo)\";\t\t\n\t\t$valores = \"('\".$login.\"','\".$senha.\"','\".$tipo.\"')\";\t\t\n\t\t$tabela = \"usuarios\";\n\t\t\n\t\t$this->insert( $tabela, $campos, $valores );\t\n\t\t\n\t}",
"public function register(Request $request)\n {\n\n\n\n $this->validator($request->all())->validate();\n\n event(new Registered($user = $this->create($request->all())));\n\n\n /*pegar email */\n\n $getID = DB::table('login')\n ->where('email', '=', $request->email)\n ->where('cpf', '=', $request->cpf)\n// ->orderBy('quantity', 'asc')\n ->first();\n\n\n// return $getID->id;\n\n// return $request->simulacao_id\n//\n//porrag;\n\n\n try{\n //Find the user object from model if it exists\n $simulacao= Simulacao::findOrFail($request->simulacao_id);\n\n //$request contain your post data sent from your edit from\n //$user is an object which contains the column names of your table\n\n //Set user object attributes\n $simulacao->user_id = $getID->id;\n\n\n // Save/update user.\n // This will will update your the row in ur db.\n $simulacao->save();\n\n return view('api.ativacao', ['name' => $request->email, 'params' => $request->all()]);\n }\n catch(ModelNotFoundException $err){\n //Show error page\n }\n\n\n\n\n return redirect()->intended('index');\n// return redirect()->back()->withInput();\n // pegar o id do usuario e inserir na table simulacao_id\n\n /**///simulacao_id e editar\n\n\n }"
]
| [
"0.6576822",
"0.6534289",
"0.64748466",
"0.6435742",
"0.64080954",
"0.6390943",
"0.6385458",
"0.6348849",
"0.63176566",
"0.6269694",
"0.62469727",
"0.6242618",
"0.6229436",
"0.6209444",
"0.62056667",
"0.61699224",
"0.6160058",
"0.6127496",
"0.6113927",
"0.6113444",
"0.6065418",
"0.60641575",
"0.60440266",
"0.6037227",
"0.60240674",
"0.60193014",
"0.5990741",
"0.59809804",
"0.5971792",
"0.5968508"
]
| 0.7339701 | 0 |
Registra los perfiles asociados a un usuario | function asociarPerfiles ($perfiles) {
$insert = "insert into s_usuarios_perfiles (id_usuario_perfil, id_usuario, id_perfil) values ";
$i = 0;
foreach ($perfiles as $key => $idPerfil) {
if ($i > 0)
$insert .= ",";
$insert .= "(null,$this->id_usuario,$idPerfil)";
$i++;
}
$delete = "delete from s_usuarios_perfiles where id_usuario=$this->id_usuario;";
$this->bd->ejecutarQuery($delete . $insert, 2);
return ['ejecutado' => 1];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function addPerfilAction() {\n $perfil= new Perfiles();\n $perfil->setIdperfilUsuario(\"Sec\");\n $perfil->setNombrePerfil(\"Secretaria\");\n $perfil->setDescripcionPerfil(\"Perfil Agregado desde UsuariosController\");\n \n $em=$this->getDoctrine()->getEntityManager();\n $em->persist($perfil);\n $flush=$em->flush();\n \n if($flush!=null){echo \"El perfil no se ha creado correctamente\";}\n else{echo \"Perfil Creado\";}\n \n die();\n }",
"public function store(CreateUserRequest $request)\n {\n $data = $request->except('_token');\n\n $usuario = User::create($data);\n\n foreach ($data['perfiles'] as $perfil)\n {\n $usuario->perfiles()->attach($perfil);\n }\n\n return redirect()->route('usuarios.index')\n ->with('info','el usuario fue creado correctamente :)');\n }",
"private function iniciar_perfil(){\n\t\t// if(!isset($_SESSION['id_user'])){\n\t\t// \theader('location : index.php');\n\t\t// }\n\n\t\trequire_once 'inc/clases/procesos/fechas.class.php';\n\t\trequire_once 'inc/clases/perfil/usuarios.class.php';\t\t\t//clase usuarios\n\t\t$this->Modulos = new Modulos();\t\n\t\t$this->Usuario = new Usuarios();\t\t\t\n\t}",
"function opcion__compilar_perfiles()\n {\n $param = $this->get_parametros();\n $id = isset($param[\"-p\"]) ? $param[\"-p\"] : $this->get_id_proyecto_actual(true);\n\n try {\n $proyecto = $this->get_proyecto($id);\n $path = $proyecto->get_dir_generales_compilados();\n if (!\\file_exists($path) || !\\is_writable($path)) {\n $this->consola->error('ATENCION!!: Considere ejecutar el comando compilar para abarcar todos los metadatos'. PHP_EOL);\n throw new toba_error('No existe o no es accesible la carpeta de metadatos compilados!!'. PHP_EOL);\n }\n toba_manejador_archivos::crear_arbol_directorios($path);\n $proyecto->compilar_metadatos_generales_grupos_acceso(true);\n } catch ( toba_error $e ) {\n\t\t$this->consola->error( \"PROYECTO $id: Ha ocurrido un error durante la compilacion:\\n\".$e->getMessage());\n exit(-1);\n }\n }",
"public function writeUsers()\n {\n \t// delete old keys\n \texec('rm ' . $this->getGitLocalRepositoryPath() . DIRECTORY_SEPARATOR . self::GITOLITE_KEY_DIR . '*.pub');\n \t\n foreach ($this->getUsers() as $user) {\n $this->writeFile(\n $this->getGitLocalRepositoryPath() . DIRECTORY_SEPARATOR .\n self::GITOLITE_KEY_DIR .\n $user->renderKeyFileName(),\n $user->getFirstKey()\n );\n }\n }",
"public function registrar_usuario($nombre, $apellido, $cedula, $telefono, $email, $direccion, $cargo, $usuario, $password1, $password2, $estado, $permisos)\n {\n $conectar = parent::conexion();\n parent::set_names();\n $sql = \"insert into usuarios \n values(null,?,?,?,?,?,?,?,?,?,?,now(),?);\";\n $sql = $conectar->prepare($sql);\n $sql->bindValue(1, $_POST[\"nombre\"]);\n $sql->bindValue(2, $_POST[\"apellido\"]);\n $sql->bindValue(3, $_POST[\"cedula\"]);\n $sql->bindValue(4, $_POST[\"telefono\"]);\n $sql->bindValue(5, $_POST[\"email\"]);\n $sql->bindValue(6, $_POST[\"direccion\"]);\n $sql->bindValue(7, $_POST[\"cargo\"]);\n $sql->bindValue(8, $_POST[\"usuario\"]);\n $sql->bindValue(9, $_POST[\"password1\"]);\n $sql->bindValue(10, $_POST[\"password2\"]);\n $sql->bindValue(11, $_POST[\"estado\"]);\n $sql->execute();\n //obtenemos el valor del id del usuario\n $id_usuario = $conectar->lastInsertId();\n //insertamos los permisos\n //almacena todos los checkbox que han sido marcados\n //este es un array tiene un name=permiso[]\n $permisos = $_POST[\"permiso\"];\n // print_r($_POST);\n $num_elementos = 0;\n while ($num_elementos < count($permisos)) {\n $sql_detalle = \"insert into usuario_permiso\n values(null,?,?)\";\n $sql_detalle = $conectar->prepare($sql_detalle);\n $sql_detalle->bindValue(1, $id_usuario);\n $sql_detalle->bindValue(2, $permisos[$num_elementos]);\n $sql_detalle->execute();\n //recorremos los permisos con este contador\n $num_elementos = $num_elementos + 1;\n }\n }",
"private function obtenerPerfiles ($idUser = \"\") {\n\n if ($idUser != \"\") {\n $this->id_usuario = $idUser;\n }\n\n if (count($this->perfiles) < 1) {\n $query = $this->stringConsulta() . \" where a.id_usuario=$this->id_usuario\";\n $data = $this->bd->ejecutarQuery($query);\n\n if ($data instanceof \\Countable and count($data) > 1) {\n throw new Exception(\"No se han obtenido los perfiles del usuario\", 1);\n }\n\n while ($perfil = $this->bd->obtenerArrayAsociativo($data)) {\n $this->perfiles[$perfil['clave_perfil']] = $perfil['clave_perfil'];\n }\n\n }\n else {\n $this->perfiles[] = 'UsuarioPublico';\n }\n\n }",
"protected function register_files()\r\n\t\t{\r\n\t\t\t// register paths\r\n\t\t\t$this->paths[ self::ROOT_INDEX ] = $this->local;\r\n\t\t\t$this->register_ini( $this->paths[ self::ROOT_INDEX ] . self::REGISTRY_FILE );\r\n\t\t\t\t\r\n\t\t\tforeach( $this->path_follow as $index => $p )\r\n\t\t\t{\r\n\t\t\t\t// put together local path names\r\n\t\t\t\t$this->paths[ $index ] = $this->local . $p . DIRECTORY_SEPARATOR;\r\n\t\t\t\t\r\n\t\t\t\t// look for registries to assign id's to\r\n\t\t\t\t$this->register_ini( $this->paths[ $index ] . self::REGISTRY_FILE, $p, $p, $index );\r\n\t\t\t}\r\n\t\t}",
"public function addFiles($idPremit,$files){\n // dd($idPremit);\n foreach ($files as $key => $value) {\n $f = new GdussFiles;\n $f->permit_id = $idPremit;\n $f->type = $key;\n $destinationPath = public_path('uploads/gduss');\n $file = $files[$key];\n $extension = $file->getClientOriginalExtension();\n $fileName = uniqid().'.'. new carbon .'.'.$extension;\n $file->move($destinationPath, $fileName);\n $f->file = $fileName;\n $f->save();\n }\n return ;\n }",
"function actualizarPerfilesUsuario($arrayPerfil,$idUsuario){\n\t\t/* Debe tomar los perfiles que se marcaron como pertenecientes en un formulario\n\t\ty actualizar en la tabla control_perfil_usuario\n\t\tLo ideal es eliminar primero todos los perfiles, y volver a escribirlos\n\t\t*/\n\t\t\n\t\t$oPerfilUsu=new Perfil_usuario($this->oDBM);\n\t\t$okDelete=$oPerfilUsu->deleteUsuario($idUsuario);\n\t\tforeach ($arrayPerfil as $item){\n\t\t\t$okInsert=$oPerfilUsu->insertUsuario($idUsuario,$item);\n\t\t}\n\t\treturn true;\n\t}",
"public function configurar()\n {\n //\n $count = Perfiles::select()->get()->count();\n if ($count == 0) {\n $permisos = Funcionalidades::select()->get();\n Perfiles::create(['nombre' => 'Super Su','usuario'=>1]);\n foreach ($permisos as $value) {\n Permisos::create(['id_perfil' => 1, 'id_funcionalidad' => $value->id]);\n }\n User::create(['name' => 'Admin', 'email' => 'Admin', 'password' => 'Admin', 'id_perfil' => 1,'usuario'=>1]);\n }\n }",
"function add_user(array $user){\n $json = file_get_contents(FILE_USERS);\n $user['id']= uniqid();\n // 2 convertir contenu en tableau\n $arrayuser = json_decode($json, true);\n // 3 ajouter new user\n $arrayuser[] = $user;\n // convertir le tableau en json\n $json =json_encode($arrayuser);\n file_put_contents(FILE_USERS, $json); \n}",
"function cot_pfs_upload($userid, $folderid='')\n{\n\tglobal $db, $cfg, $sys, $cot_extensions, $gd_supported, $maxfile, $maxtotal, $db_pfs, $db_pfs_folders, $L, $err_msg;\n\n\tif($folderid==='') $folderid = cot_import('folderid','P','INT');\n\t$ndesc = cot_import('ndesc','P','ARR');\n\t$npath = cot_pfs_folderpath($folderid);\n\n\t/* === Hook === */\n\tforeach (cot_getextplugins('pfs.upload.first') as $pl)\n\t{\n\t\tinclude $pl;\n\t}\n\t/* ===== */\n\n\tcot_die($npath===FALSE);\n\n\tfor ($ii = 0; $ii < $cfg['pfs']['pfsmaxuploads']; $ii++)\n\t{\n\t\t$disp_errors = '';\n\t\t$u_tmp_name = $_FILES['userfile']['tmp_name'][$ii];\n\t\t$u_type = $_FILES['userfile']['type'][$ii];\n\t\t$u_name = $_FILES['userfile']['name'][$ii];\n\t\t$u_size = $_FILES['userfile']['size'][$ii];\n\t\t$u_name = str_replace(\"\\'\",'',$u_name );\n\t\t$u_name = trim(str_replace(\"\\\"\",'',$u_name ));\n\n\t\tif (!empty($u_name))\n\t\t{\n\t\t\t$disp_errors .= $u_name . ' : ';\n\t\t\t$u_name = mb_strtolower($u_name);\n\t\t\t$dotpos = mb_strrpos($u_name,\".\")+1;\n\t\t\t$f_extension = mb_substr($u_name, $dotpos);\n\t\t\t$f_extension_ok = 0;\n\t\t\t$desc = $ndesc[$ii];\n\n\t\t\tif($cfg['pfs']['pfstimename'])\n\t\t\t{\n\t\t\t\t$u_name = time().'_'.$u_name;\n\t\t\t}\n\t\t\tif(!$cfg['pfs']['pfsuserfolder'])\n\t\t\t{\n\t\t\t\t$u_name = $usr['id'].'_'.$u_name;\n\t\t\t}\n\n\t\t\t$u_newname = cot_safename($u_name, true);\n\t\t\t$u_sqlname = $db->prep($u_newname);\n\n\t\t\tif ($f_extension!='php' && $f_extension!='php3' && $f_extension!='php4' && $f_extension!='php5')\n\t\t\t{\n\t\t\t\tforeach ($cot_extensions as $k => $line)\n\t\t\t\t{\n\t\t\t\t\tif (mb_strtolower($f_extension) == $line[0])\n\t\t\t\t\t{\n\t\t\t\t\t\t$f_extension_ok = 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (is_uploaded_file($u_tmp_name) && $u_size>0 && $u_size<$maxfile && $f_extension_ok\n\t\t\t\t&& ($pfs_totalsize+$u_size)<$maxtotal)\n\t\t\t{\n\t\t\t\t$fcheck = cot_file_check($u_tmp_name, $u_name, $f_extension);\n\t\t\t\tif($fcheck == 1)\n\t\t\t\t{\n\t\t\t\t\t$pfs_dir_user = cot_pfs_path($userid);\n\t\t\t\t\t$thumbs_dir_user = cot_pfs_thumbpath($userid);\n\t\t\t\t\tif (!file_exists($pfs_dir_user.$npath.$u_newname))\n\t\t\t\t\t{\n\t\t\t\t\t\t$is_moved = true;\n\n\t\t\t\t\t\tif ($cfg['pfs']['pfsuserfolder'])\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (!is_dir($pfs_dir_user))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$is_moved &= mkdir($pfs_dir_user, $cfg['dir_perms']);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (!is_dir($thumbs_dir_user))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$is_moved &= mkdir($thumbs_dir_user, $cfg['dir_perms']);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t$is_moved &= move_uploaded_file($u_tmp_name, $pfs_dir_user.$npath.$u_newname);\n\t\t\t\t\t\t$is_moved &= chmod($pfs_dir_user.$npath.$u_newname, $cfg['file_perms']);\n\n\t\t\t\t\t\t$u_size = filesize($pfs_dir_user.$npath.$u_newname);\n\n\t\t\t\t\t\tif ($is_moved && (int)$u_size > 0)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t/* === Hook === */\n\t\t\t\t\t\t\tforeach (cot_getextplugins('pfs.upload.moved') as $pl)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tinclude $pl;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t/* ===== */\n\t\t\t\t\t\t\t$db->insert($db_pfs, array(\n\t\t\t\t\t\t\t\t'pfs_userid' => (int)$userid,\n\t\t\t\t\t\t\t\t'pfs_date' => (int)$sys['now'],\n\t\t\t\t\t\t\t\t'pfs_file' => $u_sqlname,\n\t\t\t\t\t\t\t\t'pfs_extension' => $f_extension,\n\t\t\t\t\t\t\t\t'pfs_folderid' => (int)$folderid,\n\t\t\t\t\t\t\t\t'pfs_desc' => $desc,\n\t\t\t\t\t\t\t\t'pfs_size' => (int)$u_size,\n\t\t\t\t\t\t\t\t'pfs_count' => 0\n\t\t\t\t\t\t\t\t));\n\n\t\t\t\t\t\t\t$db->update($db_pfs_folders, array('pff_updated' => $sys['now']), 'pff_id=\"'.$folderid.'\"');\n\n\t\t\t\t\t\t\t$disp_errors .= $L['Yes'];\n\t\t\t\t\t\t\t$pfs_totalsize += $u_size;\n\n\t\t\t\t\t\t\t/* === Hook === */\n\t\t\t\t\t\t\tforeach (cot_getextplugins('pfs.upload.done') as $pl) {\n\t\t\t\t\t\t\t\tinclude $pl;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t/* ===== */\n\n\t\t\t\t\t\t\tif (\n in_array($f_extension, $gd_supported)\n && Cot::$cfg['pfs']['th_amode']!='Disabled'\n\t\t\t\t\t\t\t\t&& file_exists($pfs_dir_user.$u_newname)\n ) {\n\t\t\t\t\t\t\t\t@unlink($thumbs_dir_user.$npath.$u_newname);\n\t\t\t\t\t\t\t\t$th_colortext = Cot::$cfg['pfs']['th_colortext'];\n\t\t\t\t\t\t\t\t$th_colorbg = Cot::$cfg['pfs']['th_colortext'];\n\t\t\t\t\t\t\t\tcot_imageresize(\n $pfs_dir_user . $npath . $u_newname,\n\t\t\t\t\t\t\t\t\t$cfg['pfs']['thumbs_dir_user'] . $npath . $u_newname,\n Cot::$cfg['pfs']['th_x'],\n Cot:: $cfg['pfs']['th_y'],\n '',\n $th_colorbg,\n Cot::$cfg['pfs']['th_jpeg_quality'],\n true\n );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t@unlink($pfs_dir_user.$npath.$u_newname);\n\t\t\t\t\t\t\t$disp_errors .= $L['pfs_filenotmoved'];\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$disp_errors .= $L['pfs_fileexists'];\n\t\t\t\t\t}\n\t\t\t\t} elseif($fcheck == 2) {\n\t\t\t\t\t$disp_errors .= sprintf($L['pfs_filemimemissing'], $f_extension);\n\t\t\t\t} else {\n\t\t\t\t\t$disp_errors .= sprintf($L['pfs_filenotvalid'], $f_extension);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$disp_errors .= $L['pfs_filetoobigorext'];\n\t\t\t}\n\n\t\t\t$err_msg[] = $disp_errors;\n\t\t}\n\t}\n\treturn $folderid;\n}",
"public function actualizarusuario($imagenperfil,$datosuser,$id){\n // NOTE: obtener los usuarios en usuarios.json, transformandolos en un array\n $usuarios = $this->buscarUsuarios();\n // NOTE: recorrer array de todos los usuarios y sobreescribir el registro que corresponda al usuario a editar\n if (!empty($usuarios)) {\n // NOTE: vacio el archivo usuarios.json para poder insertar las modificaciones sin duplicar al usuario\n file_put_contents('usuarios.json', '');\n foreach ($usuarios as $usuario) {\n // NOTE: si encuentro al usuario guardo las modificaciones\n if (strtolower($id) == strtolower($usuario['id'])) {\n $usuario['nombre'] = $datosuser['nombre'];\n $usuario['apellido'] = $datosuser['apellido'];\n $usuario['email'] = $datosuser['email'];\n if ($usuario['password'] != $datosuser['password']) {\n $usuario['password'] = password_hash($datosuser['password'],PASSWORD_DEFAULT);\n }\n if ($imagenperfil['imgperfil']['error'] === UPLOAD_ERR_OK) {\n $ext = strtolower(pathinfo($imagenperfil['imgperfil']['name'], PATHINFO_EXTENSION));\n $hasta = '/images/profileImg/'.'perf'.$id.'.'.$ext;\n $usuario['srcImagenperfil'] = $hasta;\n }\n $userjson = json_encode($usuario);\n file_put_contents('usuarios.json', $userjson . PHP_EOL, FILE_APPEND);\n $this->subirImgPerfil($imagenperfil,$id);\n }else {\n // NOTE: si no encuentro al usuario guardo a los demas sin cambios\n $userjson = json_encode($usuario);\n file_put_contents('usuarios.json', $userjson . PHP_EOL, FILE_APPEND);\n }\n }\n }\n // NOTE: volver a convertir a json y guardar archivo usuarios.json\n //$userjson = json_encode($usuarios);\n //file_put_contents('usuarios2.json', $userjson . PHP_EOL, FILE_APPEND);\n //subirImgPerfil($imagenperfil,$id);\n\n\n }",
"function register_user_options_pages(){\n \n $settings = apply_filters('acfe/options_page/prepare_register', acfe_get_settings($this->settings));\n \n if(empty($settings))\n return;\n \n foreach($settings as $name => $args){\n \n // Bail early\n if(empty($name) || acf_get_options_page($name))\n continue;\n \n // Filters\n $args = apply_filters(\"acfe/options_page/register\", $args, $name);\n $args = apply_filters(\"acfe/options_page/register/name={$name}\", $args, $name);\n \n if($args === false)\n continue;\n \n // Register\n acf_add_options_page($args);\n \n }\n \n }",
"function ins_permisos($DBcon, $idusuario, $tipousuario)\n {\n\n $query = $this->set_profile($tipousuario,$idusuario);\n\n $stmt = $DBcon->prepare($query);\n\n // check for successfull registration\n if ( $stmt->execute() ) {\n $response['status'] = 'success';\n $response['message'] = ' Registro exitoso, Gracias!';\n\n } else {\n $response['status'] = 'error'; // could not register\n $response['message'] = ' No se pudo registrar, intente nuevamente más tarde';\n }\n\n return $response;\n }",
"function getPerfiles($idUser){\n\t\t/*\n\t\tDeben obtenerse de control_perfil_usuario los id de perfiles a los que pertenece el \n\t\tusuario para poder desplegarlos en el formulario de edición de datos\n\t\t*/\n\t\t$array=array();\n\t\t$oPerfilUsuario=new Perfil_usuario($this->oDBM);\n\t\t$arrayPerfilUsuario=$oPerfilUsuario->getPerfilesUsuario($idUser);\n\t\t\n\t\tforeach ($arrayPerfilUsuario as $item){\n\t\t\t$array[]=$item['id_perfil'];\n\t\t}\n\t\treturn $array;\n\t\t\n\t}",
"public function addUsers($image_profil, $nom, $prenom, $pseudo, $email, $age, $mot_de_passe, $numero_rue, $rue, $ville, $code_postal)\n\t{\n\t\t$query = 'INSERT INTO users (image_profil, nom, prenom, pseudo, email, age, mot_de_passe, numero_rue, rue, ville, code_postal) VALUES (:image_profil, :nom, :prenom, :pseudo, :email, :age, :mot_de_passe, :numero_rue, :rue, :ville, :code_postal);';\n\t\t$table = array(\n\t\t\t\t'image_profil' => $image_profil,\n\t\t\t\t'nom' => $nom,\n\t\t\t\t'prenom' => $prenom,\n\t\t\t\t'pseudo' => $pseudo,\n\t\t\t\t'email' => $email,\n\t\t\t\t'age' => $age,\n\t\t\t\t'mot_de_passe' => $mot_de_passe,\n\t\t\t\t'numero_rue' => $numero_rue,\n\t\t\t\t'rue' => $rue,\n\t\t\t\t'ville' => $ville,\n\t\t\t\t'code_postal' => $code_postal\n\t\t\t);\n\t\t$this->db->execute($query, $table);\n\t}",
"function new_user($username, $password){\n $new_user = array(\n 'username' => $username,\n 'password' => $password\n );\n array_push($GLOBALS['users_array'], $new_user);\n //print_r(json_encode($GLOBALS['users_array']));\n file_put_contents($GLOBALS['users_file_path'], json_encode($GLOBALS['users_array']));\n}",
"function afterInsert($registro, $id)\n {\n $perfiles = $this->m_usuarios_perfiles->getRegistros();\n \n foreach ($perfiles as $row_perfil) \n {\n $registro = array(\n 'id_perfil' => $row_perfil->id_perfil,\n 'id_menu' => $id,\n 'ver' => 1,\n 'editar' => 1,\n );\n \n $this->m_usuarios_permisos->insert($registro);\n }\n }",
"public function store(Request $request)\n {\n //\n $permisos = [];\n if (!empty($request['permisos'])) {\n $permisos = explode(\",\", $request['permisos']);\n }\n try {\n $perfil = Perfiles::create($request->all());\n foreach ($permisos as $value) {\n Permisos::create(['id_perfil' => $perfil->id, 'id_funcionalidad' => $value]);\n }\n Session::flash('message-success', 'Perfil ' . $request['nombre'] . ' creado correctamente');\n } catch (Exception $e) {\n Session::flash('message-error', 'Error al crear perfil' . $request['nombre']);\n }\n\n return $this->retorno(\"perfiles\");\n }",
"function register_file($dst_id, $hash, $extension, $ofn, $owner_id)\n {\n global $result;\n $con = open_db();\n\n // Extension should be inserted into the database as lowercase\n $extension = strtolower($extension);\n \n $query = \"SELECT upload_delay FROM tdrz_users WHERE id=?\";\n $stmt = $con->prepare($query);\n $stmt->bind_param(\"i\", $owner_id);\n $stmt->bind_result($upload_delay);\n $stmt->execute();\n if(!$stmt->fetch())\n {\n $result[\"error\"] = \"Failed to get upload_delay for user\";\n return false;\n }\n $stmt->close();\n $result[\"upload_delay\"] = $upload_delay;\n \n $query = \"SELECT last_upload FROM tdrz_users WHERE id=?\";\n $stmt = $con->prepare($query);\n $stmt->bind_param(\"i\", $owner_id);\n $stmt->bind_result($last_upload);\n $stmt->execute();\n if(!$stmt->fetch())\n {\n $result[\"error\"] = \"Failed to find last_upload for user\";\n return false;\n }\n $stmt->close();\n $last_upload = strtotime($last_upload);\n\n $delta = time() - $last_upload;\n if($upload_delay > 0 && $delta < $upload_delay)\n {\n $result[\"upload_timeout\"] = ($upload_delay - $delta);\n $result[\"error\"] = \"Please wait \".($result[\"upload_timeout\"]).\" more seconds before uploading again\";\n return false;\n }\n \n // Register the file\n $query = \"INSERT INTO tdrz_files(id, hash, ofn, extension, date, owner) VALUES(?,?,?,?,NOW(),?)\";\n $stmt = $con->prepare($query);\n $stmt->bind_param(\"ssssi\", $dst_id, $hash, $ofn, $extension, $owner_id);\n $stmt->execute();\n $stmt->close();\n \n // Update upload date\n $query = \"UPDATE tdrz_users SET last_upload=NOW() WHERE id=?\";\n $stmt = $con->prepare($query);\n $stmt->bind_param(\"i\", $owner_id);\n $stmt->execute();\n $stmt->close();\n \n return true;\t\n }",
"private function setUsers($ids,$log=false){\n \t$userPermission = $this->getUserPermission();\n \tforeach ($ids as $id)\n \t\tNewDao::getInstance()->insert('user_permissions',array('user_id'=>$id,'permission_id'=>$userPermission),$log);\n }",
"public function store(Request $request){\n $users = json_decode($request->get('users'));\n $partidos = json_decode($request->get('partidos'));\n\n $owner_id = Authorizer::getResourceOwnerId();\n $porra = Porra::find($request->get('id_porra'));\n\n if ($porra->propietario != $owner_id){\n return $this->respuestaError(\"El usuario conectado no puede modificar esta porra, sólo el propietario puede\", 401);\n }\n\n foreach ($users as $user) {\n $usuario = User::find($user->id);\n foreach ($partidos as $partido) {\n if (!$usuario || !$porra){\n return $this->respuestaError(\"Error al crear los pronosticos\");\n }\n $campos['partido_id'] = $partido->id;\n $campos['user_id'] = $user->id;\n $campos['porra_id'] = $request->get('id_porra');\n $campos['cerrado'] = 0;\n $pronostico = Pronostico::create($campos);\n }\n }\n foreach ($partidos as $partido) {\n $campos['partido_id'] = $partido->id;\n $campos['user_id'] = $owner_id;\n $campos['porra_id'] = $request->get('id_porra'); \n $campos['goles_local'] = 0;\n $campos['goles_visitante'] = 0;\n $campos['cerrado'] = 0;\n $pronostico = Pronostico::create($campos);\n }\n return $this->respuestaOK($porra->getPronosticos, 200);\n }",
"public function add_registrations_details($user_id, $registration_json, $files) {\n\n\n //update first all specialization entry to 9\n $registration_array = json_decode($registration_json, true);\n\n $doctor_where = array(\n \"doctor_registration_user_id\" => $user_id,\n \"doctor_registration_status\" => 1\n );\n $update_array = array(\n 'doctor_registration_status' => 9,\n \"doctor_registration_modified_at\" => $this->utc_time_formated\n );\n $this->update(TBL_DOCTOR_REGISTRATIONS, $update_array, $doctor_where);\n\n //upload files\n $upload_path = UPLOAD_REL_PATH . \"/\" . DOCTOR_REGISTRATIONS_FOLDER . \"/\" . $user_id;\n $upload_folder = DOCTOR_REGISTRATIONS_FOLDER . \"/\" . $user_id;\n $file_names = do_upload_multiple2($upload_path, array('photo' => $files['registration_images']), $upload_folder);\n\n $insert_array = array();\n foreach ($registration_array as $key => $value) {\n $insert_array[] = array(\n \"doctor_registration_user_id\" => $user_id,\n \"doctor_registration_council_id\" => $value['reg_councel'],\n \"doctor_council_registration_number\" => $value['reg_detail'],\n \"doctor_registration_year\" => $value['reg_year_temp'],\n \"doctor_registration_image\" => $file_names[$key],\n \"doctor_registration_image_filepath\" => IMAGE_MANIPULATION_URL . DOCTOR_REGISTRATIONS_FOLDER . \"/\" . $user_id . \"/\" . $file_names[$key],\n \"doctor_registration_created_at\" => $this->utc_time_formated\n );\n }\n\n $this->insert_multiple(TBL_DOCTOR_REGISTRATIONS, $insert_array);\n }",
"private function save() {\n global $config;\n\n //Save Config\n file_put_contents($config[\"usersFile\"],json_encode($this->users,JSON_UNESCAPED_SLASHES|JSON_PRETTY_PRINT));\n }",
"private function processInsertUser(){\n\t\t//Comprueba que la variable tipo exista, sino pondra 1 por defecto\n\t\tif(isset($_REQUEST[\"tipo\"]))\n\t\t\t$tipo = $_REQUEST[\"tipo\"];\n\t\telse \n\t\t\t$tipo = 1;\n\n\t\tif($_FILES[\"foto_usuario\"][\"error\"] == 0){\n\t\t\t$randNumber = rand(0, 999999);\n\t\t\t$imgName = $randNumber . $_FILES['foto_usuario']['name'];\n\t\t\t$image_upload = Config::$userDirImage . $imgName;\n\t\t\tif (move_uploaded_file($_FILES['foto_usuario']['tmp_name'], $image_upload)) {\n\t\t\t\t$result = $this->users->insertUser($tipo, $imgName); //Devuelve 1 si inserta user\n\t\t\t\tif($result){\n\t\t\t\t\tif (Seguridad::getTipo() == \"0\"){\n\t\t\t\t\t\tView::redireccion(\"user\", \"userController\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\theader('Location: index.php');\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tunlink($image_upload);\n\t\t\t\t\techo \"Ocurrio un error al insertar el usuario.\";\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\techo \"Ocurrio un error al guardar el archivo.\";\n\t\t\t}\n\t\t} else {\n\t\t\techo \"Ocurrio un error al cargar el archivo.\";\n\t\t}\n\t}",
"public function register()\n {\n add_filter( 'upload_mimes', array( $this, 'add_custom_file_types_supprot' ) );\n\n // add svg support\n add_filter( 'wp_prepare_attachment_for_js', array( $this, 'add_svg_media_thumbnails' ), 10, 3 );\n\n // filter wordpress filetype security check\n add_filter('wp_check_filetype_and_ext', array( $this, 'wp_check_filetype_and_ext' ) , 5, 5);\n\n // Add Custom user fields to ccd_client user role\n add_action( 'show_user_profile', array( $this, 'add_custom_user_fields' ) );\n add_action( 'edit_user_profile', array( $this, 'add_custom_user_fields' ) );\n\n // handle custom user fields update / form post\n add_action( 'personal_options_update', array( $this, 'update_custom_user_fields' ) );\n add_action( 'edit_user_profile_update', array( $this, 'update_custom_user_fields' ) );\n }",
"function createUsers(){\n\n\t\t\n\t\t\n\t\t$this->copyFrom('POST');\n\t\t$this->save(); // execute\n\t}",
"function set_profile($tipo, $idusuario)\n {\n $query = '';\n if($tipo == 'B')\n {\n $query = 'INSERT INTO permisos_usr (idpermiso, idusuario, cpermis) VALUES\n (1, '.$idusuario.', 1),\n (2, '.$idusuario.', 1),\n (3, '.$idusuario.', 1),\n (4, '.$idusuario.', 1),\n (5, '.$idusuario.', 1),\n (6, '.$idusuario.', 1),\n (7, '.$idusuario.', 0),\n (8, '.$idusuario.', 0),\n (9, '.$idusuario.', 1),\n (10, '.$idusuario.', 0),\n (11, '.$idusuario.', 0),\n (12, '.$idusuario.', 0),\n (13, '.$idusuario.', 1),\n (14, '.$idusuario.', 1),\n (15, '.$idusuario.', 0),\n (16, '.$idusuario.', 1),\n (17, '.$idusuario.', 0),\n (18, '.$idusuario.', 0),\n (19, '.$idusuario.', 0),\n (20, '.$idusuario.', 0),\n (21, '.$idusuario.', 0),\n (22, '.$idusuario.', 0),\n (23, '.$idusuario.', 0),\n (24, '.$idusuario.', 1),\n (25, '.$idusuario.', 0),\n (26, '.$idusuario.', 0),\n (27, '.$idusuario.', 0);';\n }\n\n if($tipo == 'C')\n {\n $query = 'INSERT INTO permisos_usr (idpermiso, idusuario, cpermis) VALUES\n (1, '.$idusuario.', 1),\n (2, '.$idusuario.', 1),\n (3, '.$idusuario.', 1),\n (4, '.$idusuario.', 1),\n (5, '.$idusuario.', 1),\n (6, '.$idusuario.', 0),\n (7, '.$idusuario.', 1),\n (8, '.$idusuario.', 1),\n (9, '.$idusuario.', 1),\n (10, '.$idusuario.', 1),\n (11, '.$idusuario.', 0),\n (12, '.$idusuario.', 1),\n (13, '.$idusuario.', 0),\n (14, '.$idusuario.', 0),\n (15, '.$idusuario.', 1),\n (16, '.$idusuario.', 1),\n (17, '.$idusuario.', 1),\n (18, '.$idusuario.', 1),\n (19, '.$idusuario.', 0),\n (20, '.$idusuario.', 0),\n (21, '.$idusuario.', 0),\n (22, '.$idusuario.', 0),\n (23, '.$idusuario.', 0),\n (24, '.$idusuario.', 0),\n (25, '.$idusuario.', 1),\n (26, '.$idusuario.', 0),\n (27, '.$idusuario.', 0);';\n }\n\n if($tipo == 'E')\n {\n $query = 'INSERT INTO permisos_usr (idpermiso, idusuario, cpermis) VALUES\n (1, '.$idusuario.', 1),\n (2, '.$idusuario.', 1),\n (3, '.$idusuario.', 1),\n (4, '.$idusuario.', 1),\n (5, '.$idusuario.', 1),\n (6, '.$idusuario.', 1),\n (7, '.$idusuario.', 1),\n (8, '.$idusuario.', 0),\n (9, '.$idusuario.', 1),\n (10, '.$idusuario.', 1),\n (11, '.$idusuario.', 1),\n (12, '.$idusuario.', 1),\n (13, '.$idusuario.', 0),\n (14, '.$idusuario.', 0),\n (15, '.$idusuario.', 0),\n (16, '.$idusuario.', 1),\n (17, '.$idusuario.', 1),\n (18, '.$idusuario.', 1),\n (19, '.$idusuario.', 1),\n (20, '.$idusuario.', 1),\n (21, '.$idusuario.', 1),\n (22, '.$idusuario.', 1),\n (23, '.$idusuario.', 1),\n (24, '.$idusuario.', 0),\n (25, '.$idusuario.', 0),\n (26, '.$idusuario.', 0),\n (27, '.$idusuario.', 0);';\n }\n\n return $query;\n }"
]
| [
"0.6224378",
"0.59013027",
"0.581284",
"0.5777077",
"0.5769535",
"0.57361114",
"0.5701051",
"0.5693234",
"0.56805843",
"0.56518084",
"0.5603112",
"0.5370323",
"0.5357536",
"0.5356267",
"0.5354409",
"0.5332031",
"0.5331295",
"0.5326001",
"0.53057986",
"0.52602893",
"0.52591676",
"0.52314097",
"0.5223487",
"0.52163213",
"0.52111304",
"0.51980513",
"0.51973426",
"0.5191787",
"0.5189277",
"0.51782906"
]
| 0.61545753 | 1 |
Verifica el codigo de activacion creado en el registro de un usuario | function validarCodigoActivacion ($codigo) {
$data = $this->select()->filtro(['validacion' => $codigo])->fila();
if ($this->bd->totalRegistros > 0) {
$this->establecerAtributos($data);
$this->activo = 1;
$this->validacion = 1;
$this->id_estatus = 1;
if ($this->salvar()->ejecutado()) {
return true;
}
else {
return false;
}
}
else {
return false;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function verificarActivacion($codActivacion){\n $this-> Conexion -> abrir();\n $this -> Conexion -> ejecutar($this -> ClienteDAO -> verificarActivacion($codActivacion));\n if($this -> Conexion -> numFilas()){\n $this -> Conexion -> ejecutar( $this -> ClienteDAO -> activacion());\n $this -> Conexion -> cerrar();\n return true;\n }else{\n $this -> Conexion -> cerrar();\n return false;\n }\n }",
"public function userCadConfirm($codConfirmacao=''){\n \n\n \n if($codConfirmacao==''){//se em branco retorna NULL (erro)\n \n \n return null;\n \n }else{//caso codigo informado procede com a conferencia e a ativacao\n \n \n \n $sql = new Sql();\n $ativacao = $sql->select('SELECT * FROM usuarios \n WHERE cod_ativacao_usuario = :cod_ativacao_usuario',\n array(':cod_ativacao_usuario'=>$codConfirmacao)); \n \n if(count($ativacao)==0){\n \n \n return null;//caso nada encontrado retorna NULL (deve pode ser um codigo invalido)\n \n }elseif(count($ativacao)>0){//caso codigo de confirmacao for OK entao ativa o cadastro\n \n \n //obtem o id do usuario\n $id_usuario = $ativacao[0]['id_usuario'];\n \n \n //verifica se existe a necessidade de ativacao\n if($ativacao[0]['status_usuario']==1){//cadastro JA ATIVO basta notificar\n \n return true;//retorna true confirmando que o cadastro esta atualizado \n \n }elseif($ativacao[0]['status_usuario']==0){//CASO INATIVO ENTÃO PROCEDE COM A ATIVACAO\n \n //atualiza o cadastro do usuario ativando ele\n $res = $sql->query('UPDATE usuarios SET status_usuario = 1\n WHERE id_usuario = :id_usuario',\n array(':id_usuario'=>$id_usuario));\n \n if($res>0){//se o numero de linhas afetadas for maior que ZERO\n \n return true;//retorna true confirmando que o cadastro esta atualizado\n \n }else{\n return false;//caso nada encontrado retorna FALSE (pode ter ocorrido erro na atualizacao)\n\n }\n }\n } \n }\n }",
"public function activarUsuario() {\n\t\t$this->id_status = self::STATUS_ACTIVED;\n\t\treturn $this->save () ? $this : null;\n\t}",
"public function validacion(){\n\t\t$this->inicializa();\n\t\t$client=Cliente::find(1);\n\t\t$id=$client->transaccion.\"\";\n\t\t// si en la transaccion aparece el id del cliente que esta en la base de datos entonces la transaccion le pertenece\n\t\t// y por tanto es valida\n\t\t$transaction = $this->pasarela->transaction()->find(\"{$id}\");\n\t\t\n\t\tif($client->token==$transaction->customer['id'])\n\t\t\treturn true;\n\t\treturn false;\n\t\t//return response()->json($transaction);\n\t}",
"public function inactivarCodigoContable($conn, $conexion)\r\n {\r\n $idCodigo = $_SESSION['idCodigo'];\r\n\r\n \r\n $tableName = 'codigos_contables';\r\n \r\n $arregloCondition = ['id_codigo' => $idCodigo];\r\n \r\n $arregloDatos['inactivo'] = 1;\r\n\r\n\r\n \r\n\r\n $conexion = new ConexionController();\r\n\r\n $conn = $conexion->initConectar('db');\r\n \r\n $conn->open();\r\n\r\n \r\n\r\n if ($conexion->modificarRegistro($conn, $tableName, $arregloDatos, $arregloCondition)){\r\n\r\n \r\n\r\n return true;\r\n \r\n }\r\n\r\n }",
"public function activar($id, $codigo)\n {\n //si no exite el id o codigo entonces muetra un error de cuenta inexistente\n //y renderiza a la vista activar registro\n if(!$this->filtrarInt($id) || !$this->filtrarInt($codigo)){\n $this->_view->assign('_error', 'Esta cuenta no existe');\n $this->_view->renderizar('activar', 'registro');\n exit; \n }\n //guarda una fila con la consuta de conseguir usuario\n $row = $this->_registro->getUsuario(\n $this->filtrarInt($id),\n $this->filtrarInt($codigo)\n );\n //si no existe la fila entonces se produce un error de cuenta inexistente\n if(!$row){\n $this->_view->assign('_error', 'Esta cuenta no existe');\n $this->_view->renderizar('activar', 'registro');\n exit;\n }\n //si el estado del usuario ya esta activado ser produce un error de cuenta ya activada\n //muestra la vista activar registro.\n if($row['estado'] == 1){\n $this->_view->assign('_error', 'Esta cuenta ya ha sido activada');\n $this->_view->renderizar('activar', 'registro');\n exit;\n }\n //Cambia el estado del usuario a activado\n $this->_registro->activarUsuario(\n $this->filtrarInt($id),\n $this->filtrarInt($codigo)\n );\n //consigue nuevamente información del usuario y lo guarda en una fila\n $row = $this->_registro->getUsuario(\n $this->filtrarInt($id),\n $this->filtrarInt($codigo)\n );\n //si el estado sigue siendo igual a 0 entonces se produce un erro de activación pendiente\n if($row['estado'] == 0){\n $this->_view->assign('_error', 'Error al activar la cuenta, por favor intente mas tarde');\n $this->_view->renderizar('activar', 'registro');\n exit;\n }\n //En otros casos se muestra activación realizada con exito y se muetra vista activar registro.\n $this->_view->assign('_mensaje', 'Su cuenta ha sido activada');\n $this->_view->renderizar('activar', 'registro');\n }",
"public function isRegistered() {\n //1ero. es un registro completo o 2do es un\n //registro incompleto.\n if (is_file(\"/etc/elastix.key\")) { \n if($this->columnExists(\"has_account\")) {\n $result = $this->_DB->getFirstRowQuery(\"select has_account from register;\", true);\n if (is_array($result) && count($result)>0){\n return ($result['has_account']==\"yes\")?\"yes-all\":\"yes-inc\";\n }\n else return \"yes-inc\";\n }\n else {\n //intento crear la columna \n if(!$this->addColumnTableRegister(\"has_account char(3) default 'no'\")) {\n $this->errMsg = \"The column 'has_account' does not exist and could not be created\";\n return \"yes-inc\";\n }\n\n //Actualizo el valor de la columna\n //con la info desde webservice\n $dataWebService = $this->getDataServerRegistration();\n if(!(is_array($dataWebService) && count($dataWebService)>0)) // no se puedo conectar al webservice\n return \"yes-inc\";\n \n if($this->updateHasAccount(1,$dataWebService['has_account']))\n return ($dataWebService['has_account']==\"yes\")?\"yes-all\":\"yes-inc\";\n else return \"yes-inc\";\n }\n }\n else return \"no\";\n }",
"public function authorize()\n {\n return Auth::user()->data_confirmacao != null;\n }",
"function verificalogin(){\n if(!isset($this->session->datosusu)){\n return true;\n }\n }",
"public function actionInactivarCodigoPresupuestario()\r\n {\r\n\r\n $idCodigo = yii::$app->request->get('value');\r\n $_SESSION['idCodigo'] = $idCodigo; \r\n\r\n $inactivar = self::beginSave(\"inactivar\", 0);\r\n\r\n if($inactivar == true){\r\n return MensajeController::actionMensaje(200);\r\n }else{\r\n return MensajeController::actionMensaje(920);\r\n } \r\n\r\n }",
"public function verificaAppartenenza(){\n \n $sess_user=$this->session->get_userdata('LOGGEDIN');\n $this->utente=$sess_user[\"LOGGEDIN\"][\"userid\"];\n if(isset($sess_user[\"LOGGEDIN\"][\"business\"])){\n \n $this->azienda=$sess_user[\"LOGGEDIN\"][\"business\"];\n \n \n }\n \n \n }",
"protected function Authorized(){\n // usuario\n $url = $this->getUrl();\n if ($url instanceof Url && $this->isWebsiteFree($url->host)){\n return true;\n }\n \n // Autorizar la solicitud atendiendo a la activacion del usuario\n\t\t$uType = $this->getUserType();\n\t\t\n\t\tif ($uType >= USER_CLIENT){ // Ok user is active\n\t\t\t$res = DBHelper::Select('users', '*', \"email='{$this->user}'\");\n\t\t\t//if ((!$res[0]['name'] || !$res[0]['phone']) && $res[0]['expiration'] - time() >= 7 * 24 * 3600){\n\t\t\t//\t$this->url = Url::Parse(\n // \t\t\"http://\".HTTP_HOST.\"/__www/set-user-info.php?user={$this->user}&success_url=\" . urlencode((string)$this->data->url)\n \t//\t);\n\t\t\t//}\n\t\t}elseif(DBHelper::is_user_registered($this->user) > 0){ \n // La activacion del usuario ha expirado. Redirigir a\n // la pagina de recarga\n\t\t\t\n /** @var Url url */\n $url = $this->getUrlFromData();\n if (stripos($url->host, HTTP_HOST) === FALSE){\n\t\t\t $this->url = Url::Parse(ACCOUNT_EXPIRED_URL . \"&user={$this->user}&mobile={$this->data->mobile}&success_url=\". urlencode((string)$this->data->url));\n }\n\t\t}else {\n // Se permite acceso solamente al servidor de Aurora\n return FALSE;\n }\n \n return true;\n\t}",
"function validar_Validado()\n {\n\n $this->resource = 'Actividades';\n\n if ($this->no_vacio($this->validado) === false) {\n $this->code = '70032';\n $this->ok = false;\n $this->construct_response();\n return $this->feedback;\n } else if ($this->es_validado($this->validado) === false) {\n $this->code = '70033';\n $this->ok = false;\n $this->construct_response();\n return $this->feedback;\n }\n }",
"public function authorize()\n {\n $usuario = Auth::User();\n //se ele e master\n if($usuario->tipo_usuario_id!=8){\n return false; \n }\n return true;\n }",
"public function authenticate()\n\t{\n\t\t\n\t\t$username=strtolower($this->username);\n\t\t// aca deber�a agregar la condici�n de activo\n\t\t $user=Usuario::model()->find('LOWER(nombre)=? and estado=1',array($username));\n\t\t if($user===null)\n\t\t\t$this->errorCode=self::ERROR_USERNAME_INVALID;\n\t\t else if(!$user->validatePassword($this->password))\n\t\t\t$this->errorCode=self::ERROR_PASSWORD_INVALID;\n\t\t else\n\t\t {\n\t\t\t$this->_id=$user->id;\n\t\t\t$this->username=$user->nombre; \n //si el estado es 0 le muestro un cartel avisando que debe completar sus datos sino se bloqueará\n /* if($user->estado==0 && !isset($_GET['act']))\n Yii::app()->user->setFlash(\"warning\",\"Debe completar sus datos personales sino su cuenta será deshabilitada.<br>\n \".CHtml::link('Completar',array('site/completarRegistro','act'=>$user->hash_activacion)));*/\n\t\t\t$this->errorCode=self::ERROR_NONE;\n\t\t }\n\treturn $this->errorCode==self::ERROR_NONE;\n\t}",
"public function activar()\n {\n $id = $this->input->post('activar');\n $this->load->model('Usuario_model');\n $this->Usuario_model->activar_cuenta($id);\n $this->listar_usuarios();\n }",
"public function SesionIniciada()\n{\n \n $ConexionCassandra=new ManejadorCassandra();//Conexion con la base de datos \n $ObtenerIp=$ConexionCassandra->ConsultaPorParametro('sesion',array('ip'=>$this->ObtenerIp())); //Busco en la tabla sesion si se encuentra la ip\n $VerificarIp=$ObtenerIp->getAll();\n \n if($VerificarIp!=NULL){\n \n return true; //Retorna true si se encontra el usuario\n }\n else{\n \n return false; //Retorna false si no se encuentra el usuario\n }\n \n }",
"function StatusVerify($usuario, $senha){\n $usuario = ClearString($usuario);\n $senha = CryptPassword($senha);\n $query = \"SELECT userchave FROM membros WHERE usuario=:username AND senha=:senha AND status='1'\";\n try{\n $result = MySQLStart()->prepare($query);\n $result->bindParam(':username', $usuario, PDO::PARAM_STR);\n $result->bindParam(':senha', $senha, PDO::PARAM_STR);\n $result->execute();\n $count = $result->rowCount();\n if($count > 0){\n $sucesso = true;\n }else{\n $sucesso = false;\n }\n }catch (PDOException $erro_bd){\n echo $erro_bd;\n }\n return $sucesso;\n }",
"function verificarenvio($expediente,$usuario){\n \n $parametros=array($expediente);\n $query=$this->db->query(\"select t.cTramiteTipoPersona,e.nExpedienteCodigo from tb_sistram_expediente as e inner join tb_sistram_tramite as t on e.nTramiteId=t.nTramiteId where e.nExpedienteId=?\",$parametros);\n if($query){\n $row=$query->row();\n $tipopersona=$row->cTramiteTipoPersona;\n if($usuario==$tipopersona){\n return true;\n }\n else {\n $this->setExpGenerado($row->nExpedienteCodigo);\n return false;\n }\n \n }\n \n \n }",
"function verificarComprobante($fecha)\n {\n global $db;\n $sql = \" select count(dateReception) as total from almacen_reception\n where tipoTrans = 'A' and tipoComprobante = 'A';\n and dateReception >= '$fecha' \";\n echo $sql;\n $db->SetFetchMode(ADODB_FETCH_ASSOC);\n \t$info = $db->execute($sql);\n if ($info->fields(\"total\") == 0)\n {\n return 1; // positivo, puede registrar\n }\n else if ($info->fields(\"total\") > 0)\n {\n return 0; // existe ajustes, no puede registrar\n }\n }",
"function ValidarServicioEjecutivo($id_servicio,$id_ejecutivo,$codigo){\n\t\t\t\t\t$this->db->where(\"id_servicio\",$id_servicio);\n\t\t\t\t\t$this->db->where(\"f_id_usuario\",$id_ejecutivo);\n\t\t\t\t\t$this->db->where(\"Codigo_activacion\",$codigo);\n\t\t\t\t\t$query = $this->db->get('t_dat_servicios');\n\n\t\t\t\t\treturn($query->num_rows()==1);\n\t\t\t\t}",
"public function CheckActivationCode($code){\n $this->db->where('activation_code',$code);\n $query = $this->db->get('users'); \n if ($query->num_rows() > 0)\n { \n return true;\n }\n else\n { \n return false;\n }\n }",
"function modificarCuentaBancaria(){\n\t\t$this->procedimiento='sigep.ft_cuenta_bancaria_ime';\n\t\t$this->transaccion='SIGEP_CUEN_BAN_MOD';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_cuenta_bancaria','id_cuenta_bancaria','int4');\n\t\t$this->setParametro('id_cuenta_bancaria_boa','id_cuenta_bancaria_boa','int4');\n\t\t$this->setParametro('desc_cuenta','desc_cuenta','varchar');\n\t\t$this->setParametro('moneda','moneda','int4');\n\t\t$this->setParametro('cuenta','cuenta','varchar');\n\t\t$this->setParametro('tipo_cuenta','tipo_cuenta','bpchar');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('estado_cuenta','estado_cuenta','bpchar');\n\t\t$this->setParametro('banco','banco','int4');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}",
"private function existeusuario2($usuario)\n {\n $stmt = $this->con->prepare(\"SELECT id_conductor FROM `descuento` WHERE id_conductor = ?\");\n $stmt->bind_param(\"s\", $usuario);\n $stmt->execute(); \n $stmt->store_result();\n return $stmt->num_rows > 0;\n }",
"function activationVerife($jeton) {\n\t\t$resultat = Bdd::connectBdd()->prepare(SELECT.ALL.JETONMAIL.JETONACTIVATION);\n\t\t$resultat -> bindParam(':jeton', $jeton);\n\t\t$resultat -> execute();\n\t\tif($resultat -> rowCount() === 1) {\n\t\t\t$donnee = $resultat -> fetch(PDO::FETCH_ASSOC);\n\t\t\tActivation::activationAuto($donnee['login']);\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}",
"function modificarCuentaBancaria(){\n\t\t$this->procedimiento='tes.f_cuenta_bancaria_ime';\n\t\t$this->transaccion='TES_CTABAN_MOD';\n\t\t$this->tipo_procedimiento='IME';\n\t\t\t\t\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('id_cuenta_bancaria','id_cuenta_bancaria','int4');\n\t\t$this->setParametro('estado_reg','estado_reg','varchar');\n\t\t$this->setParametro('fecha_baja','fecha_baja','date');\n\t\t$this->setParametro('nro_cuenta','nro_cuenta','varchar');\n\t\t$this->setParametro('fecha_alta','fecha_alta','date');\n\t\t$this->setParametro('id_institucion','id_institucion','int4');\n\t\t$this->setParametro('id_moneda','id_moneda','int4');\n\t\t$this->setParametro('denominacion','denominacion','varchar');\n\t\t$this->setParametro('centro','centro','varchar');\n\t\t\n\t\t$this->setParametro('id_finalidads','id_finalidads','varchar');\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}",
"public function activate() {\r\n \r\n $statement = ConnectionModel::getConnection()->query('Select * From user where id = :id and confirmToken = :confirmToken',\r\n ['id' => $this->_id,\r\n 'confirmToken' => $this->_confirmToken]);\r\n \r\n if($statement) {\r\n \r\n $activate = ConnectionModel::getConnection()->query('Update user set isConfirmed = 1 where id = :id', \r\n ['id' => $this->_id]);\r\n \r\n if($activate) {\r\n \r\n $user = ConnectionModel::getConnection()->query('Select * From user where id = :id', \r\n ['id' => $this->_id]);\r\n \r\n $result = new UserModel('','');\r\n $result->hydrate($user[0]);\r\n \r\n return $result;\r\n \r\n }\r\n \r\n }\r\n \r\n return false;\r\n \r\n}",
"public function estaInscritoActividadEconomica()\r\n\t\t{\r\n\t\t\t$result = false;\r\n\t\t\t$inscripcion = New InscripcionActividadEconomicaSearch($this->_id_contribuyente);\r\n\t\t\t$result = $inscripcion->yaEstaInscritoActividadEconomica();\r\n\t\t\treturn $result;\r\n\t\t}",
"public function getActivate($code) {\n\n\n\t$user = User::where('code' , '=' , $code)->where('active' , '=' ,0);\n\n\tif($user->count()) {\n\t\t$user = $user->first();\n\n\t\t// update user activate \n\t\t$user->active = 1;\n\t\t$user->code = '';\n\t\t if($user->save()) {\n\n\n\t\t \treturn Redirect::to('users/index')->with('yes' , 'account activate done u can now login ');\n\n\n\t\t }\n\t}\n\n\treturn Redirect::to('users/index')->with('yes' , 'we coulnt activate ur account yet pleas try again later ');\n\n}",
"public function hasActivateCode(){\n return $this->_has(10);\n }"
]
| [
"0.70125216",
"0.6680873",
"0.66770405",
"0.65301144",
"0.651596",
"0.64585334",
"0.63454396",
"0.6283189",
"0.6255636",
"0.6255348",
"0.6212573",
"0.6203343",
"0.61870575",
"0.61454344",
"0.61378765",
"0.6103033",
"0.6079236",
"0.6069586",
"0.60378146",
"0.60357666",
"0.6015665",
"0.60117555",
"0.5933655",
"0.5923696",
"0.59229016",
"0.5907242",
"0.5895596",
"0.588711",
"0.58814734",
"0.58656216"
]
| 0.69735533 | 1 |
Write a procedure ShiftLeft3(A, B, C) that performs a left cyclic shift by assigning the initial values of A, B, C to variables C, A, B respectively (A, B, C are input and output realvalued parameters). Using this procedure, perform the left cyclic shift for each of two given triples of real numbers: (A1, B1, C1) and (A2, B2, C2). | function ShiftLeft3(&$A, &$B, &$C){
$var = $C;
$C = $B ;
$B = $A ;
$A = $var;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function bitwiseLeftShift(int $shift);",
"private function getLeftShift()\n {\n if ($this->currentPage < 3) {\n $shift = 3;\n } else {\n $shift = 1;\n }\n return $shift;\n }",
"function shift_left_CD($CorD, $shift_schedule){\n $arr[16][28] = array();\n for($i=0; $i<28; $i++){\n $arr[0][$i] = $CorD[$i];\n }\n $arr[0]=shift_left_rotate($arr[0]);\n\n for($i=1; $i<16; $i++){\n for($j=0; $j<28; $j++){\n $arr[$i][$j]=$arr[$i-1][$j];\n }\n\n if($shift_schedule[$i]==2)\n {\n $arr[$i]=shift_left_rotate($arr[$i]);\n $arr[$i]=shift_left_rotate($arr[$i]);\n }\n else\n {\n $arr[$i]=shift_left_rotate($arr[$i]);\n }\n }\n\n return $arr;\n }",
"public function incrTurnsLeft($increment) {\n $this->setTurnsLeft($this->getTurnsLeft() + $increment);\n }",
"public function rotateLeft();",
"function shift();",
"function left_rotate3($string){\n\t$arr_string = str_split($string);\n\t$tmp_arr = array();\n\t$num = count($arr_string);\n\tfor(;$num > 0; $num--){\n\t\t$tmp_arr[] = array_pop($arr_string);\n\t}\n\t$rotate_string = implode($tmp_arr);\n\treturn $rotate_string;\n}",
"private function leftShift32($number, $steps) {\n\t\t// convert to binary (string)\n\t\t$binary = decbin($number);\n\t\t// left-pad with 0's if necessary\n\t\t$binary = str_pad($binary, 32, \"0\", STR_PAD_LEFT);\n\t\t// left shift manually\n\t\t$binary = $binary.str_repeat(\"0\", $steps);\n\t\t// get the last 32 bits\n\t\t$binary = substr($binary, strlen($binary) - 32);\n\t\t// if it's a positive number return it\n\t\t// otherwise return the 2's complement\n\t\treturn ($binary{0} == \"0\" ? bindec($binary) :\n\t\t-(pow(2, 31) - bindec(substr($binary, 1))));\n\t}",
"function removeSMOC($r1, $r2, $r3)\n{\n\tif($r1 == 11) { $r1++; $r2++; $r3++; }\n\tif($r2 == 11) { $r2++; $r3++; }\n\tif($r3 == 11) $r3++;\n\treturn array($r1, $r2, $r3);\n}",
"public function shift();",
"public function shift();",
"function rotate(array &$items)\r\n{\r\n $itemCount = count($items);\r\n if($itemCount < 3) {\r\n return;\r\n }\r\n $lastIndex = $itemCount - 1;\r\n $factor = (int) ($itemCount % 2 === 0 ? $itemCount / 2 : ($itemCount / 2) + 1);\r\n $topRightIndex = $factor - 1;\r\n $topRightItem = $items[$topRightIndex];\r\n $bottomLeftIndex = $factor;\r\n $bottomLeftItem = $items[$bottomLeftIndex];\r\n for($i = $topRightIndex; $i > 0; $i -= 1) {\r\n $items[$i] = $items[$i - 1];\r\n }\r\n for($i = $bottomLeftIndex; $i < $lastIndex; $i += 1) {\r\n $items[$i] = $items[$i + 1];\r\n }\r\n $items[1] = $bottomLeftItem;\r\n $items[$lastIndex] = $topRightItem;\r\n}",
"function rotate(array &$items)\r\n{\r\n $itemCount = count($items);\r\n if($itemCount < 3) {\r\n return;\r\n }\r\n $lastIndex = $itemCount - 1;\r\n $factor = (int) ($itemCount % 2 === 0 ? $itemCount / 2 : ($itemCount / 2) + 1);\r\n $topRightIndex = $factor - 1;\r\n $topRightItem = $items[$topRightIndex];\r\n $bottomLeftIndex = $factor;\r\n $bottomLeftItem = $items[$bottomLeftIndex];\r\n for($i = $topRightIndex; $i > 0; $i -= 1) {\r\n $items[$i] = $items[$i - 1];\r\n }\r\n for($i = $bottomLeftIndex; $i < $lastIndex; $i += 1) {\r\n $items[$i] = $items[$i + 1];\r\n }\r\n $items[1] = $bottomLeftItem;\r\n $items[$lastIndex] = $topRightItem;\r\n}",
"function rotLeft64($lane, $biShift) \n \t{\t\t\n\t$byShift = floor($biShift/8);\t\t\n\t$lane = substr($lane,-$byShift).substr($lane,0,-$byShift);\t\t\n\t$biShift %= 8;\t\t\n\t$carry = 0;\n\tfor ($i = 0; $i < 8; $i++) \n\t\t{\t\t\n\t\t$temp = ord($lane[$i]) << $biShift;\n\t\t$lane[$i] = chr($temp & 0xff | $carry);\n\t\t$carry = $temp >> 8;\t\t\n\t\t}\t\n\t$lane[0] = chr(ord($lane[0]) | $carry);\t\n\treturn $lane;\t\t\n\t}",
"function isLeft($a, $b, $c) {\n return area2($a, $b, $c) > 0;\n}",
"public static function leftShift32($x, $y) {\n $n = $x << $y;\n if (PHP_INT_MAX != 0x80000000) {\n $n = -(~($n & 0x00000000FFFFFFFF) + 1);\n } return (int)$n;\n }",
"private static function ShiftLeft( int|string|\\GMP $x, int $n ) : \\GMP\n\t{\n\t\treturn gmp_mul( $x, gmp_pow( 2, $n ) );\n\t}",
"function num1BitsThirdSolution($number)\n{\n if ($number <= 0) {\n return 0;\n }\n\n for ($c = 0; $number; $c++) {\n $number &= $number - 1;\n }\n\n return $c;\n}",
"private function getShift()\n {\n $all_pages = self::getPages($this->records, $this->recordsInPage);\n if ($this->currentPage < 3 || $this->currentPage >= $all_pages - 1) {\n $shift = 3;\n } else {\n $shift = 1;\n }\n return $shift;\n }",
"public function triangleCreate($x1, $y1, $x2, $y2, $x3, $y3){\n\n $this->createLine($x1, $y1, $x2, $y2); \n $this->createLine($x2, $y2, $x3, $y3); \n $this->createLine($x1, $y1, $x3, $y3);\n }",
"function add3($par1, $par2, $par3) {\n\t\t\t\t/*echo \"<br>\" . $par1 . \" \" . $par2 . \" = \" . $par3;*/\n\t\t\t\techo \"<br> $par1 $par2 = $par3\";\n\t\t\t}",
"public function translate($shiftX, $shiftY) {}",
"public function translate($shiftX, $shiftY) {}",
"public function translate($shiftX, $shiftY) {}",
"public function shift($position, $shiftAmount) {\n\n }",
"public function shift()\n {\n \n }",
"function shift($steps){\n\t\treturn new Color(\n\t\t\tself::contain($this->a + $steps), \n\t\t\tself::contain($this->b + $steps), \n\t\t\tself::contain($this->c + $steps)\n\t\t);\n\t}",
"function separate_every_three_chars_left_to_right($string){\n\t\t\n\t\t//To get the string length\n\t\t$string_length\t= strlen($string);\n\t\t$string_length++;\n\t\t//The string to return\n\t\t$string_final\t= '';\n\t\t//The position in the loop (incrementing with 3 every time)\n\t\t$string_local_position\t= '0';\n\t\t\n\t\twhile($string_length>0){\n\t\t\t\n\t\t\t$string_final\t.=substr($string, $string_local_position, 3).' ';\n\t\t\t\n\t\t\t$string_local_position\t= $string_local_position +3;\n\t\t\t$string_length \t\t\t= $string_length-3;\n\t\t\t\n\t\t}//End while\n\t\t\n\t\treturn $string_final;\n\t}",
"public function setC3($C3)\r\n {\r\n $this->C3 = $C3;\r\n\r\n return $this;\r\n }",
"public function step_3()\n {\n }"
]
| [
"0.51497823",
"0.49912277",
"0.48430577",
"0.46106917",
"0.45953348",
"0.45932406",
"0.4551648",
"0.45476073",
"0.44131067",
"0.43816963",
"0.43816963",
"0.43797442",
"0.43797442",
"0.43543637",
"0.41905352",
"0.41420537",
"0.41283697",
"0.41007546",
"0.40672085",
"0.4000949",
"0.40003532",
"0.39701355",
"0.39701355",
"0.39701355",
"0.39506078",
"0.39446443",
"0.39426833",
"0.3933278",
"0.39329687",
"0.3912509"
]
| 0.73764396 | 0 |
Registers any custom rule extensions | protected function registerRuleExtensions(RuleExtensionRegistry $ruleExtensionRegistry)
{
$ruleExtensionRegistry->registerRuleExtension(new Forbidden());
$ruleExtensionRegistry->registerRuleExtension(new ExactlyOne());
$ruleExtensionRegistry->registerRuleExtension(new Base64());
$ruleExtensionRegistry->registerRuleExtension(new MaxLength());
$ruleExtensionRegistry->registerRuleExtension(new MinLength());
$ruleExtensionRegistry->registerRuleExtension(new Url());
$ruleExtensionRegistry->registerRuleExtension(new Uuid());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected function registerCustomValidationRules()\n {\n Validator::extend('platform', function ($attribute, $value, $parameters, $validator) {\n return Device::isPlatformValueOrAlias($value);\n });\n }",
"protected static function _registerCoreExtensions()\n {\n self::registerExtension('DublinCore');\n self::registerExtension('Content');\n self::registerExtension('Atom');\n self::registerExtension('Slash');\n self::registerExtension('WellFormedWeb');\n self::registerExtension('Thread');\n self::registerExtension('Podcast');\n }",
"public function addExtension(string $extension);",
"public function add_rule( WP_Autoload_Rule $rule );",
"protected function getExtensions()\r\n {\r\n return array(new ValidatorExtension(Validation::createValidator()));\r\n }",
"protected function addValidatorRules()\n {\n Validator::extend('jwt', function ($attribute, $value, $parameters) {\n return (new ValidJWT(Arr::first($parameters)))->passes($attribute, $value);\n });\n }",
"static protected function setup_extensions()\n\t{\n\t\treturn array('anavaro/eventmedals');\n\t}",
"final public static function register()\n {\n $ruleName = self::getRuleName();\n ValidatorValidator::extend($ruleName, static::class . '@performValidation');\n\n if (method_exists(static::class, 'replacer')) {\n ValidatorValidator::replacer($ruleName, static::class . '@replacer');\n }\n }",
"function registerHooks(): void\n{\n\tregister_activation_hook( __FILE__, __NAMESPACE__ . '\\\\flushRewriteRules' );\n\tregister_deactivation_hook( __FILE__, __NAMESPACE__ . '\\\\flushRewriteRules' );\n\tregister_uninstall_hook( __FILE__, __NAMESPACE__ . '\\\\flushRewriteRules' );\n}",
"protected function registerExtensions()\n {\n $apiResult = Event::fire('editor.extension.register');\n\n if (!is_array($apiResult)) {\n return;\n }\n\n foreach ($apiResult as $extensionClassName) {\n if (!is_string($extensionClassName)) {\n continue;\n }\n\n $this->extensionClassNames[] = $extensionClassName;\n }\n }",
"protected function register_rewrite_rules() {\n\t\tif ( ! empty( $this->rules ) ) {\n\t\t\tforeach ( $this->rules as $value ) {\n\t\t\t\tadd_rewrite_rule( $value['regex'], $value['replace'], $value['type'] );\n\t\t\t}\n\t\t}\n\t}",
"public function extensions();",
"public function extension() {}",
"public function extension();",
"private function setupRules()\n {\n // Validator::extend('rule', 'App\\Support\\Rules\\Rule@validate');\n // Validator::replacer('rule', 'App\\Support\\Rules\\Rule@message');\n }",
"protected function registerExtensions()\n {\n $this->app['extensions'] = $this->app->share(function ($app) {\n return new ExtensionBag($app['files'], $app['extensions.finder'], $app, [], $app['cache']);\n });\n\n $this->app->alias('extensions', 'Cartalyst\\Extensions\\ExtensionBag');\n }",
"private function loadExtensions(){\n\n // CSRF Extension\n $csrfGenerator = new UriSafeTokenGenerator();\n $csrfStorage = new NativeSessionTokenStorage();\n $csrfManager = new CsrfTokenManager($csrfGenerator, $csrfStorage); \n $csrfExtension = new CsrfExtension($csrfManager);\n \n $this->extensions[] = $csrfExtension;\n \n // HttpFoundation Extension\n $httpFoundation = new HttpFoundationExtension();\n $this->extensions[] = $httpFoundation;\n \n //Core\n $core = new CoreExtension();\n $this->extensions[] = $core;\n \n }",
"public function Extensions($extensions){\r\n foreach($extensions as $extension ){\r\n $this->Extension($extension);\r\n }\r\n }",
"public function addExtAddon($addon);",
"protected function customRules()\n {\n return [\n ['company', 'validateExpenseType'],\n ]; // todo\n }",
"function spl_autoload_extensions(?string $file_extensions): string {}",
"public function addCheckExtension($checkExtension) {\n $this->checkExtensions[] = $checkExtension;\n }",
"private function addRules()\n {\n $rules = [\n 'maintenance' => 'maintenance/index',\n 'maintenance/<_a:\\w+>' => 'maintenance/<_a>'\n ];\n $rules = (YII_DEBUG) ? ArrayHelper::merge($rules, [\n '<_m:debug>/<_c:\\w+>/<_a:\\w+>' => '<_m>/<_c>/<_a>',\n ]) : $rules;\n $urlManager = Yii::$app->urlManager;\n $urlManager->addRules($rules);\n }",
"protected function _loadExtensions()\n {\n }",
"protected function registerExtension()\n {\n $this->app->make('view')->addExtension($this->app->make('twig.extension'), 'twig', function () {\n return $this->app->make('twig.engine');\n });\n }",
"public function getMatchableExtensions();",
"abstract public function addRule(ValidationRule$rule);",
"private function addExtension($extension) {\n $extension = trim(strtolower($extension));\n $extension = preg_quote($extension, \"#\");\n\n if ($extension === \"jpg\" || $extension === \"jpeg\")\n $extension = \"jpe?g\";\n\n // don't add duplicates!\n if (!in_array($extension, $this->extensions)) {\n $this->extensions[] = $extension;\n }\n }",
"function allowed_extensions($url) {\n\n\t}",
"public function registerFile($extensions) {\r\n $extensions[] = __FILE__;\r\n return $extensions;\r\n }"
]
| [
"0.62995833",
"0.60734963",
"0.6050026",
"0.59406465",
"0.59124744",
"0.5869441",
"0.58467513",
"0.5838353",
"0.5807829",
"0.5758012",
"0.5725592",
"0.5716446",
"0.5703893",
"0.5678612",
"0.5643395",
"0.56365854",
"0.5612093",
"0.5591013",
"0.5570018",
"0.5503729",
"0.5492288",
"0.5482022",
"0.54457366",
"0.54395944",
"0.5416087",
"0.54118377",
"0.53733474",
"0.5355762",
"0.53509265",
"0.5343615"
]
| 0.6213242 | 1 |
Get read permission checker. | public static function getReadPermissionChecker()
{
return array(__CLASS__, 'onReadPermissionCheck');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function can_read () {\r\n\r\n return $this->permissions[\"R\"] ? true : false;\r\n\r\n }",
"function isReadable() { return $this->flagAccessRead; }",
"public function check_read_permission($post)\n {\n }",
"public function check_read_permission($post)\n {\n }",
"function read()\r\n {\r\n $right = right::get(\"rights\");\r\n if ($right & 1) return(TRUE);\r\n else return(FALSE);\r\n }",
"protected function check_read_permission($post)\n {\n }",
"public function getReadProtected() {\n\t\t$readProtected = FALSE;\n\t\tif ($this->getUsersWithReadAccess()->count() > 0) {\n\t\t\t$readProtected = TRUE;\n\t\t}\n\t\tif ($this->getGroupsWithReadAccess()->count() > 0) {\n\t\t\t$readProtected = TRUE;\n\t\t}\n\n\t\treturn $readProtected;\n\t}",
"public function getReadPreference();",
"public function read(): bool\n {\n return $this->isAllowed(self::READ);\n }",
"public function checkPermissions();",
"protected function check_read_permission($status)\n {\n }",
"abstract public function getPermissions();",
"function CheckAccess($perm = 'Modify Stylesheets') {\n\t\treturn $this->CheckPermission($perm);\n\t}",
"public function getPermission(){\n\t\tif (Yii::$app->getUserOpt->Modul_akses('11')){\n\t\t\treturn Yii::$app->getUserOpt->Modul_akses('11');\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}",
"static function access () {\n onapp_debug(__CLASS__.' :: '.__FUNCTION__);\n $return = onapp_has_permission( array( 'roles' ) );\n onapp_debug( 'return => '.$return );\n return $return;\n }",
"public function & GetPermissions ();",
"static function getPermission($name) {\n return static::getPermissions()->get($name);\n }",
"public function getPermissions() {}",
"public function getPermissions() {}",
"protected function check_read_permission($sidebar)\n {\n }",
"public static function getWritePermissionChecker()\n {\n return array(__CLASS__, 'onWritePermissionCheck');\n }",
"public function getEvaluatePermissions() {}",
"public function validate_read($func_name = '', $classname = '') {\n if(empty($classname)) {\n $classname = $this->getClassName();\n }\n $granted = $this->operationGranted($classname, $this->read, $func_name);\n }",
"public function getPermission()\n {\n return $this->permission;\n }",
"public function getPermissions();",
"public function getPermission()\n {\n return $this->permission ?: null;\n }",
"public function getPermission($permission) {}",
"public function getPermission($permission) {}",
"public function checkAccess() {}",
"public function checkAccess() {}"
]
| [
"0.7392462",
"0.7036591",
"0.66918",
"0.66918",
"0.66576624",
"0.657163",
"0.65252495",
"0.6428532",
"0.6401286",
"0.63801414",
"0.63638514",
"0.62240356",
"0.6202258",
"0.6183938",
"0.6167421",
"0.61546487",
"0.61390316",
"0.6138477",
"0.6138477",
"0.61219746",
"0.61157024",
"0.61123794",
"0.61115503",
"0.6073331",
"0.60648257",
"0.60220087",
"0.60004425",
"0.60004425",
"0.59849584",
"0.59849584"
]
| 0.79322946 | 0 |
Get write permission checker. | public static function getWritePermissionChecker()
{
return array(__CLASS__, 'onWritePermissionCheck');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function can_write () {\r\n\r\n return $this->permissions[\"W\"] ? true : false;\r\n\r\n }",
"public function canWrite(){\n\t\treturn is_writable($this->file);\n\t}",
"public function isWriteable(): bool;",
"public function isWriteable()\n {\n $this->is_writable = null;\n\n if ($this->exists === true) {\n } else {\n return;\n }\n\n if ($this->is_file === true) {\n } else {\n return;\n }\n\n $w = substr($this->temp_files[$this->path]->permissions, 2, 1);\n\n if ($w == 'w') {\n $this->is_writable = true;\n } else {\n $this->is_writable = false;\n }\n\n return;\n }",
"public function getWriteProtected() {\n\t\t$writeProtected = FALSE;\n\t\tif ($this->getUsersWithWriteAccess()->count() > 0) {\n\t\t\t$writeProtected = TRUE;\n\t\t}\n\t\tif ($this->getGroupsWithWriteAccess()->count() > 0) {\n\t\t\t$writeProtected = TRUE;\n\t\t}\n\n\t\treturn $writeProtected;\n\t}",
"function checkWriteAccess() {\r\n\t\tif (!$this->hasWriteAccess()) throw new UserError(_(\"Vous n'avez pas les droits d'écriture sur cette annonce\"));\r\n\t}",
"public static function getModifySettingsPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifySettings()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\n };\n }",
"public function canWriteFiles()\n {\n return is_writable(__FILE__);\n }",
"public static function getReadPermissionChecker()\n {\n return array(__CLASS__, 'onReadPermissionCheck');\n }",
"public function checkPermissions();",
"public function isWritable() {}",
"public function isWritable() {}",
"public function isWritable() {}",
"public function isWritable() {}",
"public function writable()\n\t{\n\t\tif($this->exists()) // file exists check if writable\n\t\t{\n\t\t\treturn parent::writable();\n\t\t}\n\n\t\t// new file, check if directory writable\n\t\treturn $this->__getDir()->writable();\n\t}",
"public function isWritable()\n {\n return $this->writable;\n }",
"protected function checkPermissions () {\n foreach ($this->aSequences as $sType => $aActions) {\n foreach ($aActions as $sAction => $aAction) {\n if (!empty($sAction)) {\n foreach ($aAction as $sIdent => $aFile) {\n if (!$this->isWriteable($aFile)) {\n throw MLException::factory(\n 'update', \n 'File `{#path}` is not writable.', \n 1407759765\n )->setData(array('path' => MLHelper::getFilesystemInstance()->getFullPath($aFile['dst'])));\n }\n }\n }\n }\n }\n return $this;\n }",
"function isWritable() ;",
"public function isWritable() {\n\t\treturn $this->writable;\n\t}",
"public static function getModifyAbusePermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifyAbuses()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\n };\n }",
"function check_writable_perms($list = 'must_write')\n\t{\n\t\t$bad_files = array();\n\t\t\n\t\t$system_dirs = $this->e107->e107_dirs;\n\t\t$system_dirs['MEDIA_DIRECTORY'] = str_replace(\"[hash]/\",\"\", $system_dirs['MEDIA_DIRECTORY']);\n\t\t$system_dirs['SYSTEM_DIRECTORY'] = str_replace(\"[hash]/\",\"\", $system_dirs['SYSTEM_DIRECTORY']);\n\t\t\n\t\t$data['must_write'] = 'e107_config.php|{$MEDIA_DIRECTORY}|{$SYSTEM_DIRECTORY}'; // all-sub folders are created on-the-fly\n\t\t\n\t\t$data['can_write'] = '{$PLUGINS_DIRECTORY}|{$THEMES_DIRECTORY}|{$WEB_DIRECTORY}cache|{$WEB_DIRECTORY}lib';\n\t\tif (!isset($data[$list])) return $bad_files;\n\t\tforeach ($system_dirs as $dir_name => $value)\n\t\t{\n\t\t\t$find[] = \"{\\${$dir_name}}\";\n\t\t\t$replace[] = \"./$value\";\n\t\t}\n\t\t$data[$list] = str_replace($find, $replace, $data[$list]);\n\t\t$files = explode(\"|\", trim($data[$list]));\n\t\tforeach ($files as $file)\n\t\t{\n\t\t\tif(!is_writable($file))\n\t\t\t{\n\t\t\t\t$bad_files[] = str_replace(\"./\", \"\", $file);\n\t\t\t}\n\t\t}\n\t\treturn $bad_files;\n\t}",
"public function getPermission()\n {\n return $this->permission ?: 'everyone';\n }",
"public function checkIsWritable($path);",
"function write()\r\n {\r\n $right = right::get(\"rights\");\r\n if ($right & 2) return(TRUE);\r\n else return(FALSE);\r\n }",
"public function writable()\n {\n return is_writable($this->path);\n }",
"public function getWorkspacePermission() {}",
"public function isWritable()\n {\n return $this->adapter->isWritable($this->path);\n }",
"public static function getModifyAdPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifyAds()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\n };\n }",
"public function getPermission()\n {\n return $this->permission;\n }",
"public function getPermission()\n {\n return $this->permission ?: null;\n }"
]
| [
"0.7644738",
"0.6752038",
"0.6724825",
"0.67009765",
"0.6555009",
"0.6518307",
"0.6468478",
"0.6432084",
"0.6390556",
"0.63715786",
"0.63186526",
"0.63186526",
"0.6317494",
"0.6317494",
"0.63150537",
"0.6287586",
"0.6266522",
"0.6256065",
"0.6205228",
"0.6195523",
"0.61613965",
"0.6158627",
"0.6153562",
"0.61414504",
"0.6131202",
"0.61147374",
"0.6108658",
"0.608939",
"0.6088227",
"0.6077823"
]
| 0.8053417 | 0 |
Get permission checker for viewing Letter. | public static function getViewLetterPermissionChecker()
{
return function (Result $result) {
if (Security\Access::getInstance()->canViewLetters()) {
return;
}
$result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_READ_ACCESS')));
};
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getPermission(){\n\t\tif (Yii::$app->getUserOpt->Modul_akses('11')){\n\t\t\treturn Yii::$app->getUserOpt->Modul_akses('11');\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}",
"public static function getModifyLetterPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifyLetters()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\n };\n }",
"public function permission(): string;",
"public function GetPermissionToSeeAssignments () {\n \treturn \n \t(\n \t\t$this->user_type == $this->user_types[0]\n \t\t|| $this->user_type == $this->user_types[1]\n\t\t\t|| $this->user_type == $this->user_types[2]\n\t\t);\n }",
"public function checkPermissions();",
"static function access(){\n return onapp_has_permission(array('hypervisors', 'hypervisors.read'));\n }",
"public function checkAccess() {}",
"public function checkAccess() {}",
"public function checkAccess() {}",
"public function checkAccess() {}",
"public function checkAccess() {}",
"public function checkAccess() {}",
"public function checkAccess() {}",
"public function checkAccess() {}",
"static function detectPermission()\n {\n if(self::$org && !self::$role)\n return 'org';\n elseif(self::$org && self::$role)\n return 'orgRole';\n elseif(!self::$org && self::$role)\n return 'role';\n elseif(!self::$org && !self::$role && !self::$isGuest)\n return 'user';\n else\n return 'guest';\n }",
"static function access () {\n onapp_debug(__CLASS__.' :: '.__FUNCTION__);\n $return = onapp_has_permission( array( 'roles' ) );\n onapp_debug( 'return => '.$return );\n return $return;\n }",
"function checkAccess() ;",
"public function getPermission()\n {\n return $this->permission ?: 'everyone';\n }",
"static function getPermission()\n {\n return [self::BULLETIN => 'article_createBulletin'];\n }",
"public function checkAccess()\n {\n // need to be modified for security\n }",
"abstract public function permission(): string;",
"public function get_announcement_permissions_check() {\n return current_user_can( 'manage_options' );\n }",
"function getPermissions(&$record){\n $auth =& Dataface_AuthenticationTool::getInstance();\n $user =& $auth->getLoggedInUser();\n if ( $user ) return Dataface_PermissionsTool::ALL();\n return Dataface_PermissionsTool::NO_ACCESS();\n }",
"public function authorize()\n {\n //Get the 'mark' id\n switch ((int) request()->segment(6)) {\n case 0:\n return access()->allow('deactivate-users');\n break;\n\n case 1:\n return access()->allow('reactivate-users');\n break;\n }\n\n return false;\n }",
"public function isAccess();",
"abstract protected function canAccess();",
"public function & GetPermissions ();",
"static function getPermission($name) {\n return static::getPermissions()->get($name);\n }",
"public function authorize()\n {\n return $this->user()->can('view', Assignment::class);\n }",
"public function authorize()\n {\n return auth()->user()->ability('admin', 'create_users');\n }"
]
| [
"0.6293804",
"0.6119971",
"0.60978514",
"0.60493803",
"0.59566474",
"0.59347457",
"0.59149206",
"0.59149206",
"0.59149206",
"0.59145534",
"0.59145534",
"0.5914509",
"0.5914509",
"0.5914509",
"0.5871723",
"0.5846903",
"0.58238155",
"0.57836443",
"0.57720375",
"0.5769872",
"0.57512707",
"0.57458043",
"0.5718322",
"0.5717118",
"0.57054573",
"0.5666532",
"0.56554395",
"0.5639052",
"0.56197625",
"0.56131715"
]
| 0.69067806 | 0 |
Get permission checker for modifying Letter. | public static function getModifyLetterPermissionChecker()
{
return function (Result $result) {
if (Security\Access::getInstance()->canModifyLetters()) {
return;
}
$result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));
};
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function getViewLetterPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canViewLetters()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_READ_ACCESS')));\n };\n }",
"public static function getModifyAbusePermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifyAbuses()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\n };\n }",
"public function permission(): string;",
"public static function getModifyAdPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifyAds()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\n };\n }",
"public function checkPermissions();",
"public function getPermission(){\n\t\tif (Yii::$app->getUserOpt->Modul_akses('11')){\n\t\t\treturn Yii::$app->getUserOpt->Modul_akses('11');\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}",
"abstract public function permission(): string;",
"public function adminPermissionCheck() {\n \tif(Permission::check('ADMIN')) {\n \t\treturn true;\n \t} else {\n \t\treturn false;\n \t}\n }",
"function perm_check($content)\n{\n\t$Feul = new Feul;\n\tif($Feul->checkPerm() == true)\n\t{\n\t\treturn $content;\n\t}\n\telse\n\t{\n\t\treturn $Feul->getData('protectedmessage');\n\t}\n}",
"public function getPermission()\n {\n return $this->permission ?: 'everyone';\n }",
"public static function getModifySettingsPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifySettings()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\n };\n }",
"static function getPermission()\n {\n return [self::BULLETIN => 'article_createBulletin'];\n }",
"protected function isPermissionCorrect() {}",
"public static function getModifyBlacklistPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifyBlacklist()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\n };\n }",
"public function getPermission()\n {\n return $this->permission;\n }",
"private function permissionInstance()\n\t{\n\t\treturn new PermissionMaker();\n\t}",
"public function doesCheckModifyAccessListHookModifyAccessAllowed() {}",
"public function getIsAdministrator() {}",
"public function checkAccess() {}",
"public function checkAccess() {}",
"public function checkAccess() {}",
"public function checkAccess() {}",
"public function checkAccess() {}",
"public function checkAccess() {}",
"public function checkAccess() {}",
"public function checkAccess() {}",
"public static function getModifyRcPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifyRc()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\n };\n }",
"public function checkPermission()\n\t{\n\t\tif ($this->User->isAdmin) {\n\t\t\treturn;\n\t\t}\n\n\t\t// TODO\n\t}",
"function check_permission()\n\t{\n\t\t$CFG = $this->config->item('language_configure');\n\t\tif( ! addPermission( $CFG[\"sector\"][\"add\"] ) )\n\t\t{\n\t\t\t$this->form_validation->set_message('check_permission', _e('access denied'));\n\t\t\treturn false;\t\t\t\t\n\t\t}\n\t}",
"public function get_announcement_permissions_check() {\n return current_user_can( 'manage_options' );\n }"
]
| [
"0.6133229",
"0.61281526",
"0.60791415",
"0.6056289",
"0.60234785",
"0.5973391",
"0.5890391",
"0.5704964",
"0.5696499",
"0.56874144",
"0.5668803",
"0.56526756",
"0.56501627",
"0.56007904",
"0.5599411",
"0.55924153",
"0.5582373",
"0.5548666",
"0.55447257",
"0.55447257",
"0.55447257",
"0.5544152",
"0.5544152",
"0.5544152",
"0.55438167",
"0.55438167",
"0.5543747",
"0.5538904",
"0.55280244",
"0.55245125"
]
| 0.7384962 | 0 |
Get permission checker for modifying Abuse. | public static function getModifyAbusePermissionChecker()
{
return function (Result $result) {
if (Security\Access::getInstance()->canModifyAbuses()) {
return;
}
$result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));
};
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function checkPermissions();",
"public static function uses_permissions(): bool;",
"private function permissionInstance()\n\t{\n\t\treturn new PermissionMaker();\n\t}",
"public static function getModifyAdPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifyAds()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\n };\n }",
"public function getPermission(){\n\t\tif (Yii::$app->getUserOpt->Modul_akses('11')){\n\t\t\treturn Yii::$app->getUserOpt->Modul_akses('11');\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}",
"public function & GetPermissions ();",
"public function permission(): string;",
"public function permissions();",
"public function permissions();",
"public function permissions();",
"public function permissions();",
"public function permissions();",
"static function access () {\n onapp_debug(__CLASS__.' :: '.__FUNCTION__);\n $return = onapp_has_permission( array( 'roles' ) );\n onapp_debug( 'return => '.$return );\n return $return;\n }",
"public static function getModifySettingsPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifySettings()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\n };\n }",
"public function get_announcement_permissions_check() {\n return current_user_can( 'manage_options' );\n }",
"protected function isPermissionCorrect() {}",
"public function checkAccess() {}",
"public function checkAccess() {}",
"public function checkAccess() {}",
"public function checkAccess() {}",
"public function checkAccess() {}",
"public function checkAccess() {}",
"public function checkAccess() {}",
"public function checkAccess() {}",
"public static function getModifyBlacklistPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifyBlacklist()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\n };\n }",
"public function getEvaluatePermissions() {}",
"function acl_permission()\n {\n return app(PermissionRepositoryContract::class);\n }",
"public function getPermissions() {}",
"public function getPermissions() {}",
"public static function check($code)\n {\n //admin_implies_all=false needs to be set due to Simplifys inverted security model:\n //By default Admin users can access everything, so check() would always return true.\n //This way admins can use Simplify perms correctly\n Config::inst()->update('Permission', 'admin_implies_all', false);\n \n $check = Permission::check($code);\n \n //Reset this back - its a static on Permission, so would break normal permissions\n Config::inst()->update('Permission', 'admin_implies_all', true);\n \n return $check;\n }"
]
| [
"0.69026065",
"0.65754366",
"0.64763993",
"0.6440685",
"0.639471",
"0.63770056",
"0.63055724",
"0.63027704",
"0.63027704",
"0.63027704",
"0.63027704",
"0.63027704",
"0.6266197",
"0.62584025",
"0.6225956",
"0.6209819",
"0.62080765",
"0.62080765",
"0.62080765",
"0.62067884",
"0.62067884",
"0.6206716",
"0.6206716",
"0.6206716",
"0.6198071",
"0.6193548",
"0.618315",
"0.6181777",
"0.6181777",
"0.61784947"
]
| 0.70240664 | 0 |
Get permission checker for viewing Segment. | public static function getViewSegmentPermissionChecker()
{
return function (Result $result) {
if (Security\Access::getInstance()->canViewSegments()) {
return;
}
$result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_READ_ACCESS')));
};
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function getSelectSegmentPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canViewSegments()) {\n return;\n }\n if (Security\\Access::getInstance()->canViewLetters()) {\n return;\n }\n if (Security\\Access::getInstance()->canViewAds()) {\n return;\n }\n if (Security\\Access::getInstance()->canViewRc()) {\n return;\n }\n if (Security\\Access::getInstance()->canModifySettings()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_READ_ACCESS')));\n };\n }",
"public function checkPermissions();",
"static function access(){\n return onapp_has_permission(array('hypervisors', 'hypervisors.read'));\n }",
"public function hasAccess($permission);",
"public function permissions();",
"public function permissions();",
"public function permissions();",
"public function permissions();",
"public function permissions();",
"public function & GetPermissions ();",
"public function can($permission);",
"public function getPermission(){\n\t\tif (Yii::$app->getUserOpt->Modul_akses('11')){\n\t\t\treturn Yii::$app->getUserOpt->Modul_akses('11');\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}",
"public function authorize()\n {\n return Auth()->user()->isAbleTo('school_sections-create');\n }",
"public static function getModifySegmentPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifySegments()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\n };\n }",
"static function access () {\n onapp_debug(__CLASS__.' :: '.__FUNCTION__);\n $return = onapp_has_permission( array( 'roles' ) );\n onapp_debug( 'return => '.$return );\n return $return;\n }",
"public function authorize()\n {\n //Get the 'mark' id\n switch ((int) request()->segment(6)) {\n case 0:\n return access()->allow('deactivate-users');\n break;\n\n case 1:\n return access()->allow('reactivate-users');\n break;\n }\n\n return false;\n }",
"public function permission(): string;",
"public function authorize()\n {\n $member = auth()->user()->member;\n return auth()->user()->can('pdg', $member) || auth()->user()->can('manager', $member);\n }",
"public function getPermission($permission) {}",
"public function getPermission($permission) {}",
"public function authorize()\n {\n return access()->allow('edit-school');\n }",
"public function getPermissions() {}",
"public function getPermissions() {}",
"public function getPermission($permission);",
"public function authorize()\n {\n $this->id = $this->route('admin');\n return auth('admin')->check();\n }",
"public function permission($permission);",
"public function getPermissions();",
"public function checkAccess() {}",
"public function checkAccess() {}",
"public function checkAccess() {}"
]
| [
"0.7301632",
"0.6323381",
"0.62603754",
"0.6251687",
"0.6142566",
"0.6142566",
"0.6142566",
"0.6142566",
"0.6142566",
"0.6142205",
"0.61233217",
"0.6098302",
"0.6092688",
"0.60910434",
"0.60897166",
"0.60364956",
"0.60060346",
"0.5959245",
"0.5951448",
"0.5951448",
"0.5950463",
"0.59408754",
"0.59408754",
"0.59340465",
"0.59178245",
"0.59168726",
"0.5916755",
"0.59157807",
"0.59157807",
"0.59157807"
]
| 0.670777 | 1 |
Get permission checker for selecting Segment. | public static function getSelectSegmentPermissionChecker()
{
return function (Result $result) {
if (Security\Access::getInstance()->canViewSegments()) {
return;
}
if (Security\Access::getInstance()->canViewLetters()) {
return;
}
if (Security\Access::getInstance()->canViewAds()) {
return;
}
if (Security\Access::getInstance()->canViewRc()) {
return;
}
if (Security\Access::getInstance()->canModifySettings()) {
return;
}
$result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_READ_ACCESS')));
};
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function getModifySegmentPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifySegments()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\n };\n }",
"public static function getViewSegmentPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canViewSegments()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_READ_ACCESS')));\n };\n }",
"public function getPermission($permission);",
"public function getPermission($permission) {}",
"public function getPermission($permission) {}",
"public function can($permission);",
"public function checkPermissions();",
"public function & GetPermissions ();",
"public function permission($permission);",
"public function authorize()\n {\n return Auth()->user()->isAbleTo('school_sections-create');\n }",
"public function hasAccess($permission);",
"public function permissions();",
"public function permissions();",
"public function permissions();",
"public function permissions();",
"public function permissions();",
"public function authorize()\n {\n //Get the 'mark' id\n switch ((int) request()->segment(6)) {\n case 0:\n return access()->allow('deactivate-users');\n break;\n\n case 1:\n return access()->allow('reactivate-users');\n break;\n }\n\n return false;\n }",
"public function getPermission(){\n\t\tif (Yii::$app->getUserOpt->Modul_akses('11')){\n\t\t\treturn Yii::$app->getUserOpt->Modul_akses('11');\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}",
"public function permission(): string;",
"function CanCreateSegment()\n\t{\n\t\tif ($this->SegmentAdmin()) {\n\t\t\treturn true;\n\t\t}\n\n\t\tif ($this->HasAccess('Segments', 'Create')) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"public function getPermissions();",
"public function getPermissions() {}",
"public function getPermissions() {}",
"protected function getCurrentPermission() {}",
"public function authorize()\n {\n return access()->allow('edit-school');\n }",
"public function authorize()\n {\n return Gate::allows('store', $this->getMarkType());\n }",
"function isAllowedPermission()\n {\n $retObj = array();\n try {\n\n if (isset($_REQUEST['user_id']) && isset($_REQUEST['is_backend']) && isset($_REQUEST['method']))\n {\n $retObj['allowed'] = false;\n\n $params = array(\n 'user_id' => $_REQUEST['user_id'],\n 'is_backend' => $_REQUEST['is_backend'],\n 'method' => $_REQUEST['method']\n );\n\n $aclObj = new AclManager();\n $permissions = $aclObj->getUserPermissions($params);\n\n //c. check if method valid\n foreach($permissions as $permission)\n {\n if($permission['title'] == $params['method']) {\n $retObj['allowed'] = true;\n }\n }\n\n } else {\n\n throw new \\Exception('Unsupported Request: missing critical parameter(s).');\n\n }\n\n } catch (\\Exception $e) {\n\n Api::invalidResponse(\n $e->getMessage(),\n 400,\n Constants::STATUS_INVALID,\n $e,\n true,\n true\n );\n\n }\n\n return Api::apiResponse($retObj, Constants::STATUS_SUCCESSFUL);\n }",
"abstract public function getPermissions();",
"public function authorize()\n {\n $member = auth()->user()->member;\n return auth()->user()->can('pdg', $member) || auth()->user()->can('manager', $member);\n }",
"public function findPermission($permissionName);"
]
| [
"0.60791427",
"0.60461384",
"0.5780635",
"0.5740629",
"0.5740629",
"0.5689016",
"0.5608048",
"0.55742043",
"0.557218",
"0.54922813",
"0.54641026",
"0.5454264",
"0.5454264",
"0.5454264",
"0.5454264",
"0.5454264",
"0.5403058",
"0.5379075",
"0.53535944",
"0.5271953",
"0.5267266",
"0.52542883",
"0.52542883",
"0.52386653",
"0.52375007",
"0.5226764",
"0.5224389",
"0.5217727",
"0.5212695",
"0.5205866"
]
| 0.78514 | 0 |
Get permission checker for modifying Segment. | public static function getModifySegmentPermissionChecker()
{
return function (Result $result) {
if (Security\Access::getInstance()->canModifySegments()) {
return;
}
$result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));
};
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function getSelectSegmentPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canViewSegments()) {\n return;\n }\n if (Security\\Access::getInstance()->canViewLetters()) {\n return;\n }\n if (Security\\Access::getInstance()->canViewAds()) {\n return;\n }\n if (Security\\Access::getInstance()->canViewRc()) {\n return;\n }\n if (Security\\Access::getInstance()->canModifySettings()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_READ_ACCESS')));\n };\n }",
"public static function getModifySettingsPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifySettings()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\n };\n }",
"public function checkPermissions();",
"public static function getModifyAdPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifyAds()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\n };\n }",
"public static function getModifyAbusePermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifyAbuses()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\n };\n }",
"public static function getModifyRecipientsPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifySegments()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\n };\n }",
"protected function isPermissionCorrect() {}",
"public function permissions();",
"public function permissions();",
"public function permissions();",
"public function permissions();",
"public function permissions();",
"public static function getModifyRcPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifyRc()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\n };\n }",
"public function & GetPermissions ();",
"public function permission($permission);",
"public function permission(): string;",
"public static function getModifyBlacklistPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifyBlacklist()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\n };\n }",
"public function can($permission);",
"public static function getViewSegmentPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canViewSegments()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_READ_ACCESS')));\n };\n }",
"public function getPermission($permission) {}",
"public function getPermission($permission) {}",
"public function getPermission($permission);",
"public function hasAccess($permission);",
"public static function uses_permissions(): bool;",
"public function getPermission(){\n\t\tif (Yii::$app->getUserOpt->Modul_akses('11')){\n\t\t\treturn Yii::$app->getUserOpt->Modul_akses('11');\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}",
"public function checkPermission()\n {\n if ($this->User->isAdmin)\n {\n return;\n }\n\n // Set root IDs\n if (!is_array($this->User->calendars) || empty($this->User->calendars))\n {\n $root = [0];\n }\n else\n {\n $root = $this->User->calendars;\n }\n\n $id = strlen(Input::get('id')) ? Input::get('id') : CURRENT_ID;\n\n // Check current action\n switch (Input::get('act'))\n {\n case 'paste':\n // Allow\n break;\n\n case 'create':\n if (!strlen(Input::get('pid')) || !in_array(Input::get('pid'), $root))\n {\n $this->log('Not enough permissions to create promoters in calendar ID \"' . Input::get('pid') . '\"', __METHOD__, TL_ERROR);\n $this->redirect('contao/main.php?act=error');\n }\n break;\n\n case 'cut':\n case 'copy':\n if (!in_array(Input::get('pid'), $root))\n {\n $this->log('Not enough permissions to ' . Input::get('act') . ' promoters ID \"' . $id . '\" to calendar ID \"' . Input::get('pid') . '\"', __METHOD__, TL_ERROR);\n $this->redirect('contao/main.php?act=error');\n }\n // NO BREAK STATEMENT HERE\n\n case 'edit':\n case 'show':\n case 'delete':\n case 'toggle':\n $objPromoter = $this->Database->prepare(\"SELECT pid FROM tl_calendar_promoters WHERE id=?\")->limit(1)->execute($id);\n\n if ($objPromoter->numRows < 1)\n {\n $this->log('Invalid event ID \"' . $id . '\"', __METHOD__, TL_ERROR);\n $this->redirect('contao/main.php?act=error');\n }\n\n if (!in_array($objPromoter->pid, $root))\n {\n $this->log('Not enough permissions to ' . Input::get('act') . ' promoters ID \"' . $id . '\" of calendar ID \"' . $objCalendar->pid . '\"', __METHOD__, TL_ERROR);\n $this->redirect('contao/main.php?act=error');\n }\n break;\n\n case 'select':\n case 'editAll':\n case 'deleteAll':\n case 'overrideAll':\n case 'cutAll':\n case 'copyAll':\n if (!in_array($id, $root))\n {\n $this->log('Not enough permissions to access calendar ID \"' . $id . '\"', __METHOD__, TL_ERROR);\n $this->redirect('contao/main.php?act=error');\n }\n\n $objPromoter = $this->Database->prepare(\"SELECT id FROM tl_calendar_promoters WHERE pid=?\")->execute($id);\n\n if ($objPromoter->numRows < 1)\n {\n $this->log('Invalid calendar ID \"' . $id . '\"', __METHOD__, TL_ERROR);\n $this->redirect('contao/main.php?act=error');\n }\n\n $session = $this->Session->getData();\n $session['CURRENT']['IDS'] = array_intersect($session['CURRENT']['IDS'], $objPromoter->fetchEach('id'));\n $this->Session->setData($session);\n break;\n\n default:\n if (strlen(Input::get('act')))\n {\n $this->log('Invalid command \"' . Input::get('act') . '\"', __METHOD__, TL_ERROR);\n $this->redirect('contao/main.php?act=error');\n }\n elseif (!in_array($id, $root))\n {\n $this->log('Not enough permissions to access calendar ID \"' . $id . '\"', __METHOD__, TL_ERROR);\n $this->redirect('contao/main.php?act=error');\n }\n break;\n }\n }",
"private function permissionInstance()\n\t{\n\t\treturn new PermissionMaker();\n\t}",
"public function authorize()\n {\n return access()->allow('edit-settings');\n }",
"protected function getCurrentPermission() {}",
"public function authorize()\n {\n $hackedRoute = 'admin.media.update';\n if ( ! is_null($this->segment(4))) {\n $hackedRoute = 'admin.media_category.media.update#####' .$this->segment(3);\n }\n return hasPermission($hackedRoute);\n }"
]
| [
"0.69190854",
"0.6452372",
"0.6450016",
"0.6296729",
"0.61881",
"0.615267",
"0.5978442",
"0.5963707",
"0.5963707",
"0.5963707",
"0.5963707",
"0.5963707",
"0.5943561",
"0.5942078",
"0.59220827",
"0.5902732",
"0.58819616",
"0.58792764",
"0.58548754",
"0.580614",
"0.580614",
"0.57858235",
"0.5784576",
"0.5773025",
"0.57536817",
"0.5710154",
"0.56915873",
"0.56804067",
"0.56588537",
"0.56530875"
]
| 0.72991794 | 0 |
Get permission checker for viewing RC. | public static function getViewRcPermissionChecker()
{
return function (Result $result) {
if (Security\Access::getInstance()->canViewRc()) {
return;
}
$result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_READ_ACCESS')));
};
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function checkPermissions();",
"public function getPermission(){\n\t\tif (Yii::$app->getUserOpt->Modul_akses('11')){\n\t\t\treturn Yii::$app->getUserOpt->Modul_akses('11');\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}",
"public function & GetPermissions ();",
"public function permissions();",
"public function permissions();",
"public function permissions();",
"public function permissions();",
"public function permissions();",
"public function getWorkspacePermission() {}",
"static function access () {\n onapp_debug(__CLASS__.' :: '.__FUNCTION__);\n $return = onapp_has_permission( array( 'roles' ) );\n onapp_debug( 'return => '.$return );\n return $return;\n }",
"public function permission(): string;",
"public static function getReadPermissionChecker()\n {\n return array(__CLASS__, 'onReadPermissionCheck');\n }",
"abstract public function getPermissions();",
"public function getPermissions() {}",
"public function getPermissions() {}",
"public static function uses_permissions(): bool;",
"public function getPermissions();",
"public function getEvaluatePermissions() {}",
"function CheckAccess($perm = 'Modify Stylesheets') {\n\t\treturn $this->CheckPermission($perm);\n\t}",
"static function access(){\n return onapp_has_permission(array('hypervisors', 'hypervisors.read'));\n }",
"public static function getModifyRcPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifyRc()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\n };\n }",
"public function getPossiblePermissions();",
"public function checkAccess() {}",
"public function checkAccess() {}",
"public function checkAccess() {}",
"protected function getCurrentPermission() {}",
"public function checkAccess() {}",
"public function checkAccess() {}",
"public function checkAccess() {}",
"public function checkAccess() {}"
]
| [
"0.67443115",
"0.66270953",
"0.65135026",
"0.6484154",
"0.6484154",
"0.6484154",
"0.6484154",
"0.6484154",
"0.63726616",
"0.6342119",
"0.6315979",
"0.6292842",
"0.62815636",
"0.6276726",
"0.6276726",
"0.62648296",
"0.6246302",
"0.6232253",
"0.61533964",
"0.61510795",
"0.6142803",
"0.61358595",
"0.60649747",
"0.60649747",
"0.60649747",
"0.6064796",
"0.6064277",
"0.6064277",
"0.6064108",
"0.6064108"
]
| 0.6644883 | 1 |
Get permission checker for modifying RC. | public static function getModifyRcPermissionChecker()
{
return function (Result $result) {
if (Security\Access::getInstance()->canModifyRc()) {
return;
}
$result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));
};
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function checkPermissions();",
"public static function getModifySettingsPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifySettings()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\n };\n }",
"public static function getModifyAbusePermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifyAbuses()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\n };\n }",
"public function getWorkspacePermission() {}",
"public function getPermission(){\n\t\tif (Yii::$app->getUserOpt->Modul_akses('11')){\n\t\t\treturn Yii::$app->getUserOpt->Modul_akses('11');\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}",
"public function & GetPermissions ();",
"public static function uses_permissions(): bool;",
"public static function getModifyAdPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifyAds()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\n };\n }",
"public function permissions();",
"public function permissions();",
"public function permissions();",
"public function permissions();",
"public function permissions();",
"public static function getReadPermissionChecker()\n {\n return array(__CLASS__, 'onReadPermissionCheck');\n }",
"public function permission(): string;",
"public static function getModifyBlacklistPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifyBlacklist()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\n };\n }",
"private function permissionInstance()\n\t{\n\t\treturn new PermissionMaker();\n\t}",
"public function getEvaluatePermissions() {}",
"function acl_permission()\n {\n return app(PermissionRepositoryContract::class);\n }",
"public function getPermissions() {}",
"public function getPermissions() {}",
"abstract public function getPermissions();",
"function CheckAccess($perm = 'Modify Stylesheets') {\n\t\treturn $this->CheckPermission($perm);\n\t}",
"public static function check($code)\n {\n //admin_implies_all=false needs to be set due to Simplifys inverted security model:\n //By default Admin users can access everything, so check() would always return true.\n //This way admins can use Simplify perms correctly\n Config::inst()->update('Permission', 'admin_implies_all', false);\n \n $check = Permission::check($code);\n \n //Reset this back - its a static on Permission, so would break normal permissions\n Config::inst()->update('Permission', 'admin_implies_all', true);\n \n return $check;\n }",
"public static function getViewRcPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canViewRc()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_READ_ACCESS')));\n };\n }",
"protected function getCurrentPermission() {}",
"public function checkPermission()\n {\n if ($this->User->isAdmin)\n {\n return;\n }\n\n // Set root IDs\n if (!is_array($this->User->calendars) || empty($this->User->calendars))\n {\n $root = [0];\n }\n else\n {\n $root = $this->User->calendars;\n }\n\n $id = strlen(Input::get('id')) ? Input::get('id') : CURRENT_ID;\n\n // Check current action\n switch (Input::get('act'))\n {\n case 'paste':\n // Allow\n break;\n\n case 'create':\n if (!strlen(Input::get('pid')) || !in_array(Input::get('pid'), $root))\n {\n $this->log('Not enough permissions to create promoters in calendar ID \"' . Input::get('pid') . '\"', __METHOD__, TL_ERROR);\n $this->redirect('contao/main.php?act=error');\n }\n break;\n\n case 'cut':\n case 'copy':\n if (!in_array(Input::get('pid'), $root))\n {\n $this->log('Not enough permissions to ' . Input::get('act') . ' promoters ID \"' . $id . '\" to calendar ID \"' . Input::get('pid') . '\"', __METHOD__, TL_ERROR);\n $this->redirect('contao/main.php?act=error');\n }\n // NO BREAK STATEMENT HERE\n\n case 'edit':\n case 'show':\n case 'delete':\n case 'toggle':\n $objPromoter = $this->Database->prepare(\"SELECT pid FROM tl_calendar_promoters WHERE id=?\")->limit(1)->execute($id);\n\n if ($objPromoter->numRows < 1)\n {\n $this->log('Invalid event ID \"' . $id . '\"', __METHOD__, TL_ERROR);\n $this->redirect('contao/main.php?act=error');\n }\n\n if (!in_array($objPromoter->pid, $root))\n {\n $this->log('Not enough permissions to ' . Input::get('act') . ' promoters ID \"' . $id . '\" of calendar ID \"' . $objCalendar->pid . '\"', __METHOD__, TL_ERROR);\n $this->redirect('contao/main.php?act=error');\n }\n break;\n\n case 'select':\n case 'editAll':\n case 'deleteAll':\n case 'overrideAll':\n case 'cutAll':\n case 'copyAll':\n if (!in_array($id, $root))\n {\n $this->log('Not enough permissions to access calendar ID \"' . $id . '\"', __METHOD__, TL_ERROR);\n $this->redirect('contao/main.php?act=error');\n }\n\n $objPromoter = $this->Database->prepare(\"SELECT id FROM tl_calendar_promoters WHERE pid=?\")->execute($id);\n\n if ($objPromoter->numRows < 1)\n {\n $this->log('Invalid calendar ID \"' . $id . '\"', __METHOD__, TL_ERROR);\n $this->redirect('contao/main.php?act=error');\n }\n\n $session = $this->Session->getData();\n $session['CURRENT']['IDS'] = array_intersect($session['CURRENT']['IDS'], $objPromoter->fetchEach('id'));\n $this->Session->setData($session);\n break;\n\n default:\n if (strlen(Input::get('act')))\n {\n $this->log('Invalid command \"' . Input::get('act') . '\"', __METHOD__, TL_ERROR);\n $this->redirect('contao/main.php?act=error');\n }\n elseif (!in_array($id, $root))\n {\n $this->log('Not enough permissions to access calendar ID \"' . $id . '\"', __METHOD__, TL_ERROR);\n $this->redirect('contao/main.php?act=error');\n }\n break;\n }\n }",
"public static function getModifyLetterPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifyLetters()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\n };\n }",
"public function getPermissions();",
"static function access () {\n onapp_debug(__CLASS__.' :: '.__FUNCTION__);\n $return = onapp_has_permission( array( 'roles' ) );\n onapp_debug( 'return => '.$return );\n return $return;\n }"
]
| [
"0.6704651",
"0.65782005",
"0.63510907",
"0.6344431",
"0.6317396",
"0.6310521",
"0.62894964",
"0.62569547",
"0.62562865",
"0.62562865",
"0.62562865",
"0.62562865",
"0.62562865",
"0.6221094",
"0.6184906",
"0.6177133",
"0.61091477",
"0.610039",
"0.6084153",
"0.6059748",
"0.6059748",
"0.6056447",
"0.60117084",
"0.6007241",
"0.5954784",
"0.5920679",
"0.5918445",
"0.59132063",
"0.59099764",
"0.59090877"
]
| 0.7098316 | 0 |
Get permission checker for viewing ad. | public static function getViewAdPermissionChecker()
{
return function (Result $result) {
if (Security\Access::getInstance()->canViewAds()) {
return;
}
$result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_READ_ACCESS')));
};
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function checkPermissions();",
"public function get_announcement_permissions_check() {\n return current_user_can( 'manage_options' );\n }",
"public function checkAccess() {}",
"public function checkAccess() {}",
"public function checkAccess() {}",
"public function checkAccess() {}",
"public function checkAccess() {}",
"public function check_access() {\n\n\t\tif (isset($this->current_entity_allowed)) {\n\t\t\treturn apply_filters('minerva_restrict_access_allowed', $this->current_entity_allowed);\n\t\t}\n\n\t\t$this->current_entity_allowed = MKB_Options::option('restrict_on') ?\n\t\t\t(bool) $this->check_entity_access($this->get_current_entity()) :\n\t\t\ttrue; // always allowed if restriction is off\n\n\t\treturn apply_filters('minerva_restrict_access_allowed', $this->current_entity_allowed);\n\t}",
"public function checkAccess() {}",
"public function checkAccess() {}",
"public function checkAccess() {}",
"static function access(){\n return onapp_has_permission(array('hypervisors', 'hypervisors.read'));\n }",
"public function authorize()\n {\n $member = auth()->user()->member;\n return auth()->user()->can('pdg', $member) || auth()->user()->can('manager', $member);\n }",
"public function isAccess();",
"static function access () {\n onapp_debug(__CLASS__.' :: '.__FUNCTION__);\n $return = onapp_has_permission( array( 'roles' ) );\n onapp_debug( 'return => '.$return );\n return $return;\n }",
"public function hasAccess($permission);",
"public function getPermission(){\n\t\tif (Yii::$app->getUserOpt->Modul_akses('11')){\n\t\t\treturn Yii::$app->getUserOpt->Modul_akses('11');\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}",
"public function authorize()\n {\n return access()->hasPermissions(['view-backend', 'view-referral', 'manage-referral'], true);\n }",
"public function & GetPermissions ();",
"function feed_category_admin_access() {\r\n $arguments = func_get_args();\r\n $allow_public = array_shift($arguments);\r\n $feed_category = array_shift($arguments);\r\n foreach ($arguments as $access) {\r\n if (!user_access($access)) {\r\n return FALSE;\r\n }\r\n }\r\n return feed_category_access($allow_public, $feed_category);\r\n}",
"function checkAccess() ;",
"protected function check_permission()\n {\n return true;\n }",
"public function hasAccess(): bool;",
"public function can($permission);",
"public function authorize()\n {\n return auth()->user()->ability('admin','update_pages');\n }",
"public function checkAccess()\n {\n // need to be modified for security\n }",
"public function permissions();",
"public function permissions();",
"public function permissions();",
"public function permissions();"
]
| [
"0.6467925",
"0.6206585",
"0.61714286",
"0.61714286",
"0.61714286",
"0.6170596",
"0.6170596",
"0.6169882",
"0.61697716",
"0.61697716",
"0.61697716",
"0.616466",
"0.61621225",
"0.61532056",
"0.61513406",
"0.6141661",
"0.61276966",
"0.6061856",
"0.60611343",
"0.6040426",
"0.6005775",
"0.5999906",
"0.59791577",
"0.5975129",
"0.59749985",
"0.597378",
"0.59701735",
"0.59701735",
"0.59701735",
"0.59701735"
]
| 0.67129576 | 0 |
Get permission checker for modifying ad. | public static function getModifyAdPermissionChecker()
{
return function (Result $result) {
if (Security\Access::getInstance()->canModifyAds()) {
return;
}
$result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));
};
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function checkPermissions();",
"public static function getModifyAbusePermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifyAbuses()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\n };\n }",
"public static function getModifySettingsPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifySettings()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\n };\n }",
"public function doesCheckModifyAccessListHookModifyAccessAllowed() {}",
"public static function getModifyBlacklistPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifyBlacklist()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\n };\n }",
"protected function isPermissionCorrect() {}",
"public static function uses_permissions(): bool;",
"public function & GetPermissions ();",
"public function getPermission(){\n\t\tif (Yii::$app->getUserOpt->Modul_akses('11')){\n\t\t\treturn Yii::$app->getUserOpt->Modul_akses('11');\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}",
"public function adminPermissionCheck() {\n \tif(Permission::check('ADMIN')) {\n \t\treturn true;\n \t} else {\n \t\treturn false;\n \t}\n }",
"public function permissions();",
"public function permissions();",
"public function permissions();",
"public function permissions();",
"public function permissions();",
"private function permissionInstance()\n\t{\n\t\treturn new PermissionMaker();\n\t}",
"public function get_announcement_permissions_check() {\n return current_user_can( 'manage_options' );\n }",
"function CheckAccess($perm = 'Modify Stylesheets') {\n\t\treturn $this->CheckPermission($perm);\n\t}",
"protected function _hasModPermission(){\n global $auth;\n return $auth->acl_get('m_inttree');\n }",
"public function permission(): string;",
"public function getEvaluatePermissions() {}",
"public function checkPermissions() {\r\n\t\treturn $this->modx->hasPermission('edit_document');\r\n\t}",
"public static function getModifyRcPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifyRc()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\n };\n }",
"function hook_permission_check($data) {\n\t\treturn false;\n\t}",
"public function authorize()\n {\n return auth()->user()->ability('admin','update_pages');\n }",
"static function getPermission()\n {\n return [self::BULLETIN => 'article_createBulletin'];\n }",
"public function getPermissions() {}",
"public function getPermissions() {}",
"static function access () {\n onapp_debug(__CLASS__.' :: '.__FUNCTION__);\n $return = onapp_has_permission( array( 'roles' ) );\n onapp_debug( 'return => '.$return );\n return $return;\n }",
"public function getPermission()\n {\n return $this->permission;\n }"
]
| [
"0.6759991",
"0.6660755",
"0.65371853",
"0.62435865",
"0.62106514",
"0.6200163",
"0.6168307",
"0.61410314",
"0.6109556",
"0.6108003",
"0.6106346",
"0.6106346",
"0.6106346",
"0.6106346",
"0.6106346",
"0.60883087",
"0.60842174",
"0.6045964",
"0.60349435",
"0.60338366",
"0.6006741",
"0.60001117",
"0.59953165",
"0.5951202",
"0.59469545",
"0.59381974",
"0.59198344",
"0.59198344",
"0.5919766",
"0.5903174"
]
| 0.7263932 | 0 |
Get permission checker for viewing recipients. | public static function getViewRecipientsPermissionChecker()
{
return function (Result $result) {
if (Security\Access::getInstance()->canViewSegments()) {
return;
}
$result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_READ_ACCESS')));
};
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function getModifyRecipientsPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifySegments()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\n };\n }",
"public function GetPermissionToSeeAssignments () {\n \treturn \n \t(\n \t\t$this->user_type == $this->user_types[0]\n \t\t|| $this->user_type == $this->user_types[1]\n\t\t\t|| $this->user_type == $this->user_types[2]\n\t\t);\n }",
"public function canView()\n {\n return !$this->is_private ||\n ( Auth::user() && ( $this->sender_id === Auth::id() || $this->recipient_id === Auth::id() ) );\n }",
"public function getPermissions();",
"public function & GetPermissions ();",
"public static function getViewBlacklistPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canViewBlacklist()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_READ_ACCESS')));\n };\n }",
"public function authorize()\n {\n return $this->route('address')->userCanView($this->user());\n }",
"public function listRecipients()\n {\n $recipients = $this->recipients;\n if (!count($recipients))\n return null;\n\n $recipients->transform(function ($recipient) {\n if (!$recipient->messagable) return FALSE;\n if (!$recipient->messagable->staff) return FALSE;\n\n return $recipient->messagable->staff;\n });\n\n return $recipients;\n }",
"public function getPermissions() {}",
"public function getPermissions() {}",
"public function checkPermissions();",
"public function can($permission);",
"static protected function checkAccess()\n {\n $cur_user = User::getConnectedUser();\n if (!$cur_user || !$cur_user->canSeeInvitations()) {\n redirectTo('/');\n }\n return $cur_user;\n }",
"public function get_announcement_permissions_check() {\n return current_user_can( 'manage_options' );\n }",
"public function recipients(){\n $user = User::whereHas('roles', function($q){\n $q->where('role_id', 3);\n })->get();\n\n return $user;\n }",
"public function getEvaluatePermissions() {}",
"static function access () {\n onapp_debug(__CLASS__.' :: '.__FUNCTION__);\n $return = onapp_has_permission( array( 'roles' ) );\n onapp_debug( 'return => '.$return );\n return $return;\n }",
"public function hasAccess($permission);",
"public function getPermission($permission);",
"public static function getReadPermissionChecker()\n {\n return array(__CLASS__, 'onReadPermissionCheck');\n }",
"public function getPermission()\n {\n return $this->permission ?: 'everyone';\n }",
"public function getPermission($permission) {}",
"public function getPermission($permission) {}",
"abstract public function getPermissions();",
"public function authorize()\n {\n return auth()->user()->can('edit', $this->subscription);\n }",
"public function getPermissions() {\n\t\treturn $this->addressBookInfo['permissions'];\n\t}",
"public function getUserPermissions(): Collection\n {\n return $this->model->where('name', 'LIKE', 'view_%')->get();\n }",
"function isAuthorized() {\n $roles = $this->Role->calculateCMRoles();\n \n // Construct the permission set for this user, which will also be passed to the view.\n $p = array();\n \n // Determine what operations this user can perform\n \n // Accept an OAuth callback?\n $p['callback'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n // Delete an existing SalesforceSource?\n $p['delete'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n // Edit an existing SalesforceSource?\n $p['edit'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n // View all existing SalesforceSources?\n $p['index'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n // View API limits?\n $p['limits'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n // View an existing SalesforceSource?\n $p['view'] = ($roles['cmadmin'] || $roles['coadmin']);\n \n $this->set('permissions', $p);\n return($p[$this->action]);\n }",
"public static function canDisplayContactsMenu()\n\t{\n\t\treturn PermissionValidator::hasPermission(PermissionConstants::VIEW_CONTACT);\n\t}",
"public function getPermission(){\n\t\tif (Yii::$app->getUserOpt->Modul_akses('11')){\n\t\t\treturn Yii::$app->getUserOpt->Modul_akses('11');\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}"
]
| [
"0.6474706",
"0.61962634",
"0.58606696",
"0.57558185",
"0.5754672",
"0.5747898",
"0.5737334",
"0.5705835",
"0.5655026",
"0.5655026",
"0.56410104",
"0.5619583",
"0.5578729",
"0.5578528",
"0.55465716",
"0.5533397",
"0.5508826",
"0.5493374",
"0.54809177",
"0.5454348",
"0.5453453",
"0.54502124",
"0.54502124",
"0.5432224",
"0.54296273",
"0.54274696",
"0.5421183",
"0.54205513",
"0.5420362",
"0.541257"
]
| 0.69527423 | 0 |
Get permission checker for modifying recipients. | public static function getModifyRecipientsPermissionChecker()
{
return function (Result $result) {
if (Security\Access::getInstance()->canModifySegments()) {
return;
}
$result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));
};
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function getModifySettingsPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifySettings()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\n };\n }",
"public static function getModifyAbusePermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifyAbuses()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\n };\n }",
"public static function getModifyBlacklistPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifyBlacklist()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\n };\n }",
"public static function getModifyAdPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifyAds()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\n };\n }",
"public static function getModifyRcPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifyRc()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\n };\n }",
"public static function getModifyLetterPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifyLetters()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\n };\n }",
"public function checkPermissions();",
"public static function getViewRecipientsPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canViewSegments()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_READ_ACCESS')));\n };\n }",
"public static function getWritePermissionChecker()\n {\n return array(__CLASS__, 'onWritePermissionCheck');\n }",
"public static function getModifySegmentPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifySegments()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\n };\n }",
"public function & GetPermissions ();",
"public static function getReadPermissionChecker()\n {\n return array(__CLASS__, 'onReadPermissionCheck');\n }",
"protected function getTranslatorPermissions() {\n return array_filter([$this->getTranslatePermission(), 'create content translations', 'update content translations', 'delete content translations']);\n }",
"public function can($permission);",
"public function GetPermissionToSeeAssignments () {\n \treturn \n \t(\n \t\t$this->user_type == $this->user_types[0]\n \t\t|| $this->user_type == $this->user_types[1]\n\t\t\t|| $this->user_type == $this->user_types[2]\n\t\t);\n }",
"private function permissionInstance()\n\t{\n\t\treturn new PermissionMaker();\n\t}",
"public function authorize(): bool\n {\n return $this->user()->can('update_contact');\n }",
"public function checkPermissions() {\r\n\t\treturn $this->modx->hasPermission('edit_document');\r\n\t}",
"public function get_announcement_permissions_check() {\n return current_user_can( 'manage_options' );\n }",
"public function getEvaluatePermissions() {}",
"public function getPermissions() {}",
"public function getPermissions() {}",
"public function getPermissions();",
"public function getPermission($permission);",
"public function validator()\n {\n\n return PermissionValidator::class;\n }",
"public function getPermission()\n {\n return $this->permission ?: 'everyone';\n }",
"public function getPermission($permission) {}",
"public function getPermission($permission) {}",
"public function checkPermission()\n {\n if ($this->User->isAdmin)\n {\n return;\n }\n\n // Set root IDs\n if (!is_array($this->User->calendars) || empty($this->User->calendars))\n {\n $root = [0];\n }\n else\n {\n $root = $this->User->calendars;\n }\n\n $id = strlen(Input::get('id')) ? Input::get('id') : CURRENT_ID;\n\n // Check current action\n switch (Input::get('act'))\n {\n case 'paste':\n // Allow\n break;\n\n case 'create':\n if (!strlen(Input::get('pid')) || !in_array(Input::get('pid'), $root))\n {\n $this->log('Not enough permissions to create promoters in calendar ID \"' . Input::get('pid') . '\"', __METHOD__, TL_ERROR);\n $this->redirect('contao/main.php?act=error');\n }\n break;\n\n case 'cut':\n case 'copy':\n if (!in_array(Input::get('pid'), $root))\n {\n $this->log('Not enough permissions to ' . Input::get('act') . ' promoters ID \"' . $id . '\" to calendar ID \"' . Input::get('pid') . '\"', __METHOD__, TL_ERROR);\n $this->redirect('contao/main.php?act=error');\n }\n // NO BREAK STATEMENT HERE\n\n case 'edit':\n case 'show':\n case 'delete':\n case 'toggle':\n $objPromoter = $this->Database->prepare(\"SELECT pid FROM tl_calendar_promoters WHERE id=?\")->limit(1)->execute($id);\n\n if ($objPromoter->numRows < 1)\n {\n $this->log('Invalid event ID \"' . $id . '\"', __METHOD__, TL_ERROR);\n $this->redirect('contao/main.php?act=error');\n }\n\n if (!in_array($objPromoter->pid, $root))\n {\n $this->log('Not enough permissions to ' . Input::get('act') . ' promoters ID \"' . $id . '\" of calendar ID \"' . $objCalendar->pid . '\"', __METHOD__, TL_ERROR);\n $this->redirect('contao/main.php?act=error');\n }\n break;\n\n case 'select':\n case 'editAll':\n case 'deleteAll':\n case 'overrideAll':\n case 'cutAll':\n case 'copyAll':\n if (!in_array($id, $root))\n {\n $this->log('Not enough permissions to access calendar ID \"' . $id . '\"', __METHOD__, TL_ERROR);\n $this->redirect('contao/main.php?act=error');\n }\n\n $objPromoter = $this->Database->prepare(\"SELECT id FROM tl_calendar_promoters WHERE pid=?\")->execute($id);\n\n if ($objPromoter->numRows < 1)\n {\n $this->log('Invalid calendar ID \"' . $id . '\"', __METHOD__, TL_ERROR);\n $this->redirect('contao/main.php?act=error');\n }\n\n $session = $this->Session->getData();\n $session['CURRENT']['IDS'] = array_intersect($session['CURRENT']['IDS'], $objPromoter->fetchEach('id'));\n $this->Session->setData($session);\n break;\n\n default:\n if (strlen(Input::get('act')))\n {\n $this->log('Invalid command \"' . Input::get('act') . '\"', __METHOD__, TL_ERROR);\n $this->redirect('contao/main.php?act=error');\n }\n elseif (!in_array($id, $root))\n {\n $this->log('Not enough permissions to access calendar ID \"' . $id . '\"', __METHOD__, TL_ERROR);\n $this->redirect('contao/main.php?act=error');\n }\n break;\n }\n }",
"public function getPermission()\n {\n return $this->permission;\n }"
]
| [
"0.6416856",
"0.6386573",
"0.63151634",
"0.6233498",
"0.6038729",
"0.58068275",
"0.57921255",
"0.57638216",
"0.5547894",
"0.5500841",
"0.5479608",
"0.5475386",
"0.54669327",
"0.5465107",
"0.5405045",
"0.5393103",
"0.53840935",
"0.5377553",
"0.53530544",
"0.5327288",
"0.5321574",
"0.5321574",
"0.5298263",
"0.52948993",
"0.52897125",
"0.52793723",
"0.5268869",
"0.5268869",
"0.52644366",
"0.5248684"
]
| 0.74266493 | 0 |
Get permission checker for modifying settings. | public static function getModifySettingsPermissionChecker()
{
return function (Result $result) {
if (Security\Access::getInstance()->canModifySettings()) {
return;
}
$result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));
};
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function getSettingsPermissions() {\n $settings_permissions_read_only = TRUE;\n // http://en.wikipedia.org/wiki/File_system_permissions.\n $writes = array('2', '3', '6', '7');\n $settings_file = './' . DrupalKernel::findSitePath(\\Drupal::request(), TRUE) . '/settings.php';\n $permissions = Unicode::substr(sprintf('%o', fileperms($settings_file)), -4);\n\n foreach ($writes as $bit) {\n if (strpos($permissions, $bit)) {\n $settings_permissions_read_only = FALSE;\n break;\n }\n }\n\n return $settings_permissions_read_only;\n }",
"public function checkPermissions();",
"public function authorize()\n {\n return access()->allow('edit-settings');\n }",
"public static function uses_permissions(): bool;",
"public static function getModifyAbusePermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifyAbuses()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\n };\n }",
"private function permissionInstance()\n\t{\n\t\treturn new PermissionMaker();\n\t}",
"public static function getWritePermissionChecker()\n {\n return array(__CLASS__, 'onWritePermissionCheck');\n }",
"public function & GetPermissions ();",
"public function getWorkspacePermission() {}",
"public static function getModifyAdPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifyAds()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\n };\n }",
"public function permissions();",
"public function permissions();",
"public function permissions();",
"public function permissions();",
"public function permissions();",
"public function getPermission(){\n\t\tif (Yii::$app->getUserOpt->Modul_akses('11')){\n\t\t\treturn Yii::$app->getUserOpt->Modul_akses('11');\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}",
"public function permission()\n {\n if ( ! auth()->guard('admin')->user()->can('access permission ' . $this->table)) {\n return redirect()->route('admin.setting.index')->with('alert-danger', __($this->noPermission));\n }\n $view = [\n 'back' => route('admin.setting.index'),\n 'title' => __('Permission Settings'),\n 'breadcrumbs' => [\n route('admin.setting.index') => __('Setting'),\n route('admin.setting.permission.index') => __('Permission'),\n null => __('Edit')\n ],\n 'subtitle' => __('All About Permission Settings'),\n 'description' => __('You can adjust all permission settings here'),\n 'navs' => $this->settings,\n 'setting' => $this->settings->where('slug', 'permission')->first(),\n 'roles' => Role::orderBy('name', 'asc')->pluck('name', 'id')->toArray()\n ];\n return view('admin.setting.permission.index', $view);\n }",
"public function getPermissions() {}",
"public function getPermissions() {}",
"public static function getModifyBlacklistPermissionChecker()\n {\n return function (Result $result) {\n if (Security\\Access::getInstance()->canModifyBlacklist()) {\n return;\n }\n\n $result->addError(new Error(Loc::getMessage('SENDER_COMMON_AJAX_CHECKER_ERROR_NO_WRITE_ACCESS')));\n };\n }",
"protected function getCurrentPermission() {}",
"public static function getReadPermissionChecker()\n {\n return array(__CLASS__, 'onReadPermissionCheck');\n }",
"public function getPermission()\n {\n return $this->permission ?: 'everyone';\n }",
"public function permission(): string;",
"public function getPermission($permission);",
"public function getPermissionConfig()\n {\n return [\n 'canCreate' => $this->canCreate,\n 'canUpdate' => $this->canUpdate,\n 'canDelete' => $this->canDelete,\n 'canExport' => $this->canExport,\n 'canImport' => $this->canImport,\n 'canBulkEdit' => $this->canBulkEdit,\n 'canBulkCopy' => $this->canBulkCopy,\n 'canBulkDelete' => $this->canBulkDelete,\n 'canEditInNewWindow' => $this->canEditInNewWindow,\n ];\n }",
"public function getPermission($permission) {}",
"public function getPermission($permission) {}",
"public function adminPermissionCheck() {\n \tif(Permission::check('ADMIN')) {\n \t\treturn true;\n \t} else {\n \t\treturn false;\n \t}\n }",
"public static function check($code)\n {\n //admin_implies_all=false needs to be set due to Simplifys inverted security model:\n //By default Admin users can access everything, so check() would always return true.\n //This way admins can use Simplify perms correctly\n Config::inst()->update('Permission', 'admin_implies_all', false);\n \n $check = Permission::check($code);\n \n //Reset this back - its a static on Permission, so would break normal permissions\n Config::inst()->update('Permission', 'admin_implies_all', true);\n \n return $check;\n }"
]
| [
"0.6640244",
"0.65241057",
"0.62436396",
"0.6203463",
"0.61914337",
"0.61419463",
"0.6092144",
"0.609213",
"0.6044892",
"0.6027715",
"0.6024488",
"0.6024488",
"0.6024488",
"0.6024488",
"0.6024488",
"0.6003032",
"0.5994742",
"0.5972926",
"0.5972926",
"0.59399426",
"0.59333557",
"0.59062827",
"0.5878985",
"0.58715904",
"0.58643883",
"0.5864118",
"0.58630866",
"0.58630866",
"0.5852816",
"0.5852164"
]
| 0.73782706 | 0 |
Test case for addPackingPlan Create a packingPlan. | public function testAddPackingPlan()
{
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function createPlan(){\n if(!$this->request->plan_name || !$this->request->plan_description) {\n return false;\n }\n $this->plan = Planes::create([\n 'name' => $this->request->plan_name,\n 'description' => $this->request->plan_description,\n 'price' => $this->request->price,\n 'product_id' => $this->request->product_id,\n 'balance' => $this->request->balance,\n ]);\n $this->plan = new PlanesFormatter($this->plan);\n }",
"public function testAddPackingPlanFile()\n {\n }",
"public function testAddPackingPlanTag()\n {\n }",
"public function testAddPackingPlanAudit()\n {\n }",
"public function testGetPackingPlanById()\n {\n }",
"public function create($plan, array $properties = array());",
"public function testGetDuplicatePackingPlanById()\n {\n }",
"public function testAddPackingPlanFileByURL()\n {\n }",
"public function testDeletePackingPlan()\n {\n }",
"public function testUpdatePackingPlan()\n {\n }",
"public function create_plan($requestData){\n \n // ### Create Plan\n try {\n // Create a new instance of Plan object\n $plan = new Plan();\n if(isset($requestData['plan'])){\n $this->setArrayToMethods($this->checkEmptyObject($requestData['plan']), $plan);\n } \n // # Payment definitions for this billing plan.\n $paymentDefinition = new PaymentDefinition(); \n $paymentDefinition\n ->setAmount(new Currency($requestData['paymentDefinition']['Amount']));\n array_pop($requestData['paymentDefinition']);\n if(!empty($this->checkEmptyObject((array)$paymentDefinition))){\n $this->setArrayToMethods(array_filter($requestData['paymentDefinition']), $paymentDefinition); \n }\n \n // Charge Models\n $chargeModel = new ChargeModel();\n $chargeModel->setAmount(new Currency($requestData['chargeModel']['Amount']));\n array_pop($requestData['chargeModel']);\n if(!empty($this->checkEmptyObject((array)$chargeModel))){\n $this->setArrayToMethods(array_filter($requestData['chargeModel']), $chargeModel); \n $paymentDefinition->setChargeModels(array($chargeModel));\n }\n \n $merchantPreferences = new MerchantPreferences();\n $baseUrl = $requestData['baseUrl'];\n\n $merchantPreferences->setReturnUrl($baseUrl.$requestData['ReturnUrl'])\n ->setCancelUrl($baseUrl.$requestData['CancelUrl']);\n if(!empty($this->checkEmptyObject($requestData['merchant_preferences']['SetupFee']))){\n $merchantPreferences->setSetupFee(new Currency($requestData['merchant_preferences']['SetupFee']));\n }\n array_pop($requestData['merchant_preferences']);\n \n if(isset($requestData['merchant_preferences'])){\n $this->setArrayToMethods($this->checkEmptyObject($requestData['merchant_preferences']), $merchantPreferences);\n }\n if(!empty($this->checkEmptyObject((array)$paymentDefinition))){\n $plan->setPaymentDefinitions(array($paymentDefinition));\n }\n if(!empty($this->checkEmptyObject((array)$merchantPreferences))){\n $plan->setMerchantPreferences($merchantPreferences);\n } \n $requestArray= clone $plan;\n $output = $plan->create($this->_api_context); \n $returnArray['RESULT'] = 'Success';\n $returnArray['PLAN'] = $output->toArray();\n $returnArray['RAWREQUEST']=$requestArray->toJSON();\n $returnArray['RAWRESPONSE']=$output->toJSON();\n return $returnArray; \n } catch (\\PayPal\\Exception\\PayPalConnectionException $ex) {\n return $this->createErrorResponse($ex);\n }\n }",
"public function create($planData)\n {\n \t$planPurchase \t\t\t\t = new PlanPurchase();\n\t\t$planPurchase->user_id \t\t = $this->user->id;\n\t\t$planPurchase->plan_id \t\t = $planData->plan_id;\n\t\t$planPurchase->country_code = $planData->country_code;\n\t\t$planPurchase->gold_price = (float)$this->plan->gold_price;\n\t\t$planPurchase->transaction_id = $planData->transaction_id;\n\t\t$planPurchase->save();\n\n \t/** Add Chest Capacity value in user's table **/\n \t(new ChestService)->setUser($this->user)->expand($this->plan->bucket);\n \t\n /** Deduct User Gold **/\n $goldBalance = (new UserRepository($this->user))->deductGold($this->plan->gold_price);\n\n \t/** return the available skeleton keys **/\n \treturn ['chest_bucket'=> $this->user->buckets['chests'], 'available_gold_balance'=> $goldBalance];\n }",
"public function testGetPackingPlanFiles()\n {\n }",
"public function creating(Plan $plan)//troquei o created por creating\n {\n $plan->url = Str::kebab($plan->name);\n }",
"public function testGetPackingPlanByFilter()\n {\n }",
"public function created(PlanSubscription $planSubscription)\n {\n //\n }",
"public function plan_create( $plan_id, $amount, $name, $interval, $trial_days = FALSE ) {\r\n\t\t$params = array(\r\n\t\t\t'id' => $plan_id,\r\n\t\t\t'amount' => $amount,\r\n\t\t\t'name' => $name,\r\n\t\t\t'currency' => 'usd',\r\n\t\t\t'interval' => $interval\r\n\t\t);\r\n\t\tif( $trial_days )\r\n\t\t\t$params['trial_period_days'] = $trial_days;\r\n\t\t\t\r\n\t\treturn $this->_send_request( 'plans', $params, STRIPE_METHOD_POST );\r\n\t}",
"public function store(StoreStripePlanRequest $request)\n {\n Log::debug(\"STORE PLAN\");\n\n $amount = $request->amount . '00';\n\n $stripeService = new StripeService();\n $stripeService->setStripeKey();\n\n $stripeSubscriptionService = new StripeSubscriptionService();\n $result = $stripeSubscriptionService->createPlan($amount, $request->name, $request->product, $request->interval);\n\n if ($result['message'] == 'Success'){\n\n session()->flash('success', 'Plan created successfully.');\n \n return redirect( route ('plans.index') );\n\n } else {\n\n Log::debug($result['message']);\n\n session()->flash('error', $result['message']);\n \n return redirect()->back();\n\n }\n\n }",
"public function testNewFreeAccountAddValidRecord()\n {\n $this->assertEquals(0, $this->connection->executeFirstCell(\"SELECT COUNT(`id`) AS 'row_count' FROM {$this->insight->getTableName('accounts')}\"));\n $this->insight->accounts->addFree(12345, new FreePlan());\n $this->assertEquals(1, $this->connection->executeFirstCell(\"SELECT COUNT(`id`) AS 'row_count' FROM {$this->insight->getTableName('accounts')}\"));\n\n $row = $this->connection->executeFirstRow(\"SELECT * FROM {$this->insight->getTableName('accounts')} WHERE `id` = ?\", 12345);\n\n $this->assertInternalType('array', $row);\n $this->assertEquals(12345, $row['id']);\n $this->assertEquals(AccountsInterface::FREE, $row['status']);\n $this->assertEquals(FreePlan::class, $row['plan']);\n $this->assertNull($row['billing_period']);\n $this->assertEquals($this->current_timestamp->format('Y-m-d H:i:s'), $row['created_at']);\n $this->assertEquals(date('Y'), $row['cohort_year']);\n $this->assertEquals(date('m'), $row['cohort_month']);\n $this->assertEquals($this->current_timestamp->format('Y-m-d H:i:s'), $row['converted_to_free_at']->format('Y-m-d H:i:s'));\n $this->assertNull($row['canceled_at']);\n $this->assertEquals(0, $row['mrr_value']);\n $this->assertFalse($row['had_trial']);\n }",
"public function create($name, $id)\n {\n return $this->add(new Plan($name, $id));\n }",
"public function savePlan($plan)\n {\n return Stripe\\Plan::create(array(\n \"amount\" => $plan->price,\n \"interval\" => $plan->interval,\n \"name\" => $plan->name,\n \"currency\" => \"usd\",\n 'id' => $plan->level\n ));\n }",
"function TestPlan_create($author_id, $product_id, $default_product_version, $type_id, $name, $creation_date = NULL, $isactive = TRUE) {\n\t$varray = array(\"author_id\" => \"int\", \"product_id\" => \"int\", \"default_product_version\" => \"string\", \"type_id\" => \"int\", \"name\" => \"string\", \"creation_date\" => \"string\", \"isactive\" => \"int\");\n\tforeach($varray as $key => $val) {\n\t\tif (isset(${$key})) {\n\t\t\t$carray[$key] = new xmlrpcval(${$key}, $val);\n\t\t}\n\t}\n\t// Create call\n\t$call = new xmlrpcmsg('TestPlan.create', array(new xmlrpcval($carray, \"struct\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}",
"public function testRunFulfillmentPlan()\n {\n }",
"public function planCreate(array $array);",
"function Add()\n\t{\n\t\t// Check user authorization and permissions\n\t\tAuthenticatedUser()->CheckAuth();\n\t\t// The User needs both Rate Management and Admin Permissions\n\t\tAuthenticatedUser()->PermissionOrDie(PERMISSION_RATE_MANAGEMENT | PERMISSION_ADMIN);\n\n\t\t// Context menu\n\t\t// Nothing to add\n\n\t\t// Breadcrumb menu\n\t\tBreadCrumb()->Employee_Console();\n\t\tBreadCrumb()->AvailablePlans(TRUE);\n\t\tBreadCrumb()->SetCurrentPage(\"Add Rate Plan\");\n\n\t\t// Handle form submittion\n\t\tif (SubmittedForm('AddPlan', 'Commit') || SubmittedForm('AddPlan', 'Save as Draft'))\n\t\t{\n\t\t\t// Validate the plan\n\t\t\t$mixResult = $this->_ValidatePlan();\n\t\t\tif ($mixResult !== TRUE && $mixResult !== FALSE)\n\t\t\t{\n\t\t\t\t// The plan is invalid and an error message has been returned\n\t\t\t\tAjax()->AddCommand(\"Alert\", $mixResult);\n\t\t\t\treturn TRUE;\n\t\t\t}\n\t\t\telseif ($mixResult === FALSE)\n\t\t\t{\n\t\t\t\t// The plan is invalid and no error message was specified, so it is assumed appropraite actions have already taken place\n\t\t\t\treturn TRUE;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// The plan is valid. Save it to the database\n\t\t\t\tTransactionStart();\n\t\t\t\t$mixResult = $this->_SavePlan();\n\t\t\t\tif ($mixResult !== TRUE && $mixResult !== FALSE)\n\t\t\t\t{\n\t\t\t\t\t// Saving the plan failed, and an error message has been returned\n\t\t\t\t\tTransactionRollback();\n\t\t\t\t\tAjax()->AddCommand(\"Alert\", $mixResult);\n\t\t\t\t\treturn TRUE;\n\t\t\t\t}\n\t\t\t\telseif ($mixResult === FALSE)\n\t\t\t\t{\n\t\t\t\t\t// Saving the plan failed, and no error message was specified, so it is assumed appropraite actions have already taken place\n\t\t\t\t\tTransactionRollback();\n\t\t\t\t\treturn TRUE;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// The plan was successfully saved to the database\n\t\t\t\t\tTransactionCommit();\n\n\t\t\t\t\t// If we've saved as a draft, then filter our Plan List to Drafts\n\t\t\t\t\tif (DBO()->Plan->Archived->Value == RATE_STATUS_DRAFT) {\n\t\t\t\t\t\t$_SESSION['AvailablePlansPage']['Filter']['Status']\t= RATE_STATUS_DRAFT;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Set the message appropriate to the action\n\t\t\t\t\t$strSuccessMsg = (DBO()->Plan->Archived->Value == RATE_STATUS_ACTIVE)? \"The plan has been successfully saved\" : \"The plan has been successfully saved as a draft\";\n\t\t\t\t\tAjax()->AddCommand(\"AlertAndRelocate\", Array(\"Alert\" => $strSuccessMsg, \"Location\" => Href()->AvailablePlans().'?RatePlan.Status='.RATE_STATUS_DRAFT));\n\t\t\t\t\treturn TRUE;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// Check if there has been a BaseRatePlan.Id specified, to base the new RatePlan on\n\t\tif (DBO()->BaseRatePlan->Id->Value)\n\t\t{\n\t\t\t// There is, so load it\n\t\t\tDBO()->RatePlan->Id = DBO()->BaseRatePlan->Id->Value;\n\t\t\tif (!DBO()->RatePlan->Load())\n\t\t\t{\n\t\t\t\t// Could not load the RatePlan\n\t\t\t\tDBO()->Error->Message = \"The RatePlan with id: \". DBO()->RatePlan->Id->value .\" could not be found\";\n\t\t\t\t$this->LoadPage('error');\n\t\t\t\treturn FALSE;\n\t\t\t}\n\n\t\t\t// Reset the Id of the RatePlan, because we are creating a new one, not editing an existing one\n\t\t\tDBO()->RatePlan->Id = 0;\n\t\t}\n\t\telseif (DBO()->RatePlan->Id->Value)\n\t\t{\n\t\t\t// We are opening an existing RatePlan for editing\n\t\t\t// Update the Breadcrumb menu\n\t\t\tBreadCrumb()->SetCurrentPage(\"Edit Draft Rate Plan\");\n\n\t\t\t// We want to display an existing RatePlan\n\t\t\tif (!DBO()->RatePlan->Load())\n\t\t\t{\n\t\t\t\t// Could not load the RatePlan\n\t\t\t\tDBO()->Error->Message = \"The RatePlan with id: \". DBO()->RatePlan->Id->value .\" could not be found\";\n\t\t\t\t$this->LoadPage('error');\n\t\t\t\treturn FALSE;\n\t\t\t}\n\n\t\t\t// Make sure the Rate Plan is a draft\n\t\t\tif (DBO()->RatePlan->Archived->Value != RATE_STATUS_DRAFT)\n\t\t\t{\n\t\t\t\t// Can't edit the Rate Plan\n\t\t\t\tDBO()->Error->Message = \"The RatePlan with id: \". DBO()->RatePlan->Id->value .\" and Name \\\"\". DBO()->RatePlan->Name->Value .\"\\\" is not a draft and therefore cannot be edited\";\n\t\t\t\t$this->LoadPage('error');\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// We want to add a new RatePlan\n\t\t\tDBO()->RatePlan->Id = 0;\n\t\t}\n\n\t\t$this->LoadPage('rate_plan_add');\n\n\t\treturn TRUE;\n\n\t}",
"public function run()\n {\n Plan::create([\n \t'name' => 'Free Plan',\n\t\t\t'plan_identifier' => 'free_plan',\n\t\t\t'limit_list' => 3,\n\t\t\t'limit_space' => 1500,\n\t\t\t'price' => 0\n ]); \n }",
"public function run()\n {\n Plan::create([\n 'name' => 'Free Plan',\n 'trial_days' => 7,\n 'max_workspaces' => 1,\n 'max_users' => 5,\n 'max_clients' => 5,\n 'max_projects' => 5,\n 'image' => 'free_plan.png',\n 'status' => 1,\n ]);\n }",
"public function testGetPackingPlanTags()\n {\n }",
"public function actionSetup($plan)\n {\n // Redirect back to billing page if already has a plan active\n $isBillingActive = Yii::$app->user->identity->getBillingDaysLeft();\n if($isBillingActive){\n return $this->redirect(['billing/index']);\n }\n\n // Find the Pricing Option the user wants to setup\n $pricing = \\common\\models\\Pricing::findOne($plan);\n if(!$pricing){\n throw new NotFoundHttpException('The requested page does not exist.');\n }\n\n // Check if is trial\n $isTrial = Yii::$app->user->identity->agent_trial_days > 0? true: false;\n\n // If user is attempting to setup a package which is for less than\n // the number of accounts he has attached, show error and redirect to billing\n $currentAccountCount = count(Yii::$app->ownedAccountManager->ownedAccounts);\n $planLimit = $pricing->pricing_account_quantity;\n if($planLimit < $currentAccountCount){\n Yii::$app->getSession()\n ->setFlash('warning', \"[Selected plan only allows $planLimit accounts. You have $currentAccountCount you administer. ] You may remove an account by clicking the <b>Remove</b> button on its right sidebar.\");\n\n return $this->redirect(['billing/index']);\n }\n\n // Calculate Discount if Available\n $discount = 0;\n if($isTrial){\n // Give 30% discount for trial users\n $discount = ($pricing->pricing_price - round($pricing->pricing_price * 0.7)) * -1;\n }\n\n // Setup new billing model\n $billingModel = new Billing();\n $billingModel->agent_id = Yii::$app->user->identity->agent_id;\n $billingModel->pricing_id = $pricing->pricing_id;\n $billingModel->billing_total = $pricing->pricing_price + $discount; // Store initial billed amount\n $billingModel->billing_email = Yii::$app->user->identity->agent_email;\n $billingModel->billing_name = Yii::$app->user->identity->agent_name;\n $billingModel->billing_currency = \"USD\";\n\n // Handle AJAX Validation\n if (Yii::$app->request->isAjax && $billingModel->load(Yii::$app->request->post())) {\n Yii::$app->response->format = \\yii\\web\\Response::FORMAT_JSON;\n return \\yii\\widgets\\ActiveForm::validate($billingModel);\n }\n\n if($billingModel->load(Yii::$app->request->post())){\n // Token returned from 2CO after creditcard input\n $billingModel->twoco_token = Yii::$app->request->post('token');\n\n // If Token exists and record of bill is saved\n if($billingModel->twoco_token && $billingModel->save()){\n $token = Yii::$app->request->post('token');\n\n // Your sellerId(account number) and privateKey are required to make the Payment API Authorization call.\n Twocheckout::privateKey(Yii::$app->params['2co.privateKey']);\n Twocheckout::sellerId(Yii::$app->params['2co.sellerId']);\n // Your username and password are required to make any Admin API call.\n Twocheckout::username(Yii::$app->params['2co.username']);\n Twocheckout::password(Yii::$app->params['2co.password']);\n // If you want to turn off SSL verification (Please don't do this in your production environment)\n Twocheckout::verifySSL(Yii::$app->params['2co.verifySSL']); // this is set to true by default\n // To use your sandbox account set sandbox to true\n Twocheckout::sandbox(Yii::$app->params['2co.isSandbox']);\n\n\n // Use the token to create a sale\n try {\n $charge = Twocheckout_Charge::auth([\n \"merchantOrderId\" => $billingModel->billing_id,\n \"token\" => $token,\n \"currency\" => $billingModel->billing_currency,\n \"billingAddr\" => [\n // Card holder’s name. (128 characters max)\n \"name\" => $billingModel->billing_name,\n // Card holder’s street address. (64 characters max) Required\n \"addrLine1\" => $billingModel->billing_address_line1,\n // Card holder’s street address line 2. (64 characters max)\n // Required if “country” value is: CHN, JPN, RUS - Optional for all other “country” values.\n \"addrLine2\" => $billingModel->billing_address_line1? $billingModel->billing_address_line1:\"\",\n // Card holder’s city. (64 characters max) Required\n \"city\" => $billingModel->billing_city,\n /**\n * Card holder’s state. (64 characters max) Required if “country” value is ARG, AUS, BGR, CAN, CHN, CYP,\n * EGY, FRA, IND, IDN, ITA, JPN, MYS, MEX, NLD, PAN, PHL, POL, ROU, RUS, SRB, SGP, ZAF, ESP, SWE, THA, TUR,\n * GBR, USA - Optional for all other “country” values.\n */\n \"state\" => $billingModel->billing_state? $billingModel->billing_state:\"\",\n /**\n * Card holder’s zip. (16 characters max) Required if “country” value is ARG, AUS, BGR, CAN, CHN, CYP, EGY, FRA,\n * IND, IDN, ITA, JPN, MYS, MEX, NLD, PAN, PHL, POL, ROU, RUS, SRB, SGP, ZAF, ESP, SWE, THA, TUR, GBR,\n * USA - Optional for all other “country” values.\n */\n \"zipCode\" => $billingModel->billing_zip_code? $billingModel->billing_zip_code:\"\",\n // Card holder’s country. (64 characters max) Required\n \"country\" => $billingModel->country->country_iso_code_3,\n // Card holder’s email. (64 characters max) Required\n \"email\" => $billingModel->billing_email,\n // Card holder’s phone. (16 characters max) Optional\n // \"phoneNumber\" => '555-555-5555'\n ],\n \"lineItems\" => [\n [\n \"type\" => \"product\",\n \"name\" => \"Plugn \".$pricing->pricing_title.\" Plan\",\n \"price\" => $pricing->pricing_price,\n \"tangible\" => \"N\",\n \"productId\" => $pricing->pricing_id,\n \"recurrence\" => \"1 Month\",\n \"duration\" => \"Forever\",\n \"startupFee\" => $discount?$discount:\"\"\n ]\n ]\n ]);\n\n $billingModel->processTwoCheckoutSuccess($charge);\n return $this->redirect(['billing/index']);\n } catch (Twocheckout_Error $e) {\n $billingModel->processTwoCheckoutError($e);\n }\n }\n }\n\n // List of Zip / State Required Countries\n $zipStateCountries = \\common\\models\\Country::find()->select('country_id')\n ->where(['country_zipstate_required' => 1])->asArray()->all();\n\n // List of Addr Line 2 required countries\n $addrCountries = \\common\\models\\Country::find()->select('country_id')\n ->where(['country_addrline2_required' => 1])->asArray()->all();\n\n\n return $this->render('setup', [\n // Form\n 'model' => $billingModel,\n 'zipStateCountries' => json_encode($zipStateCountries),\n 'addrCountries' => json_encode($addrCountries),\n\n // Pricing\n 'pricing' => $pricing,\n 'isTrial' => $isTrial,\n\n // 2 CO\n 'processFormUrl' => Url::to(['billing/process']),\n 'environment' => Yii::$app->params['2co.environment'],\n 'sellerId' => Yii::$app->params['2co.sellerId'],\n 'publishableKey' => Yii::$app->params['2co.publishableKey'],\n ]);\n }",
"public function testDeletePackingPlanTag()\n {\n }"
]
| [
"0.69531554",
"0.6901942",
"0.6676506",
"0.63307506",
"0.6304023",
"0.6225091",
"0.61637425",
"0.6150241",
"0.6102987",
"0.608851",
"0.60822415",
"0.6023581",
"0.59372133",
"0.57835346",
"0.5757038",
"0.57414585",
"0.56579274",
"0.56268644",
"0.55209213",
"0.5484042",
"0.54468936",
"0.5420985",
"0.5390182",
"0.53826416",
"0.53811955",
"0.53775847",
"0.535144",
"0.53404164",
"0.5337725",
"0.5333339"
]
| 0.7591891 | 0 |
Test case for addPackingPlanAudit Add new audit for a packingPlan. | public function testAddPackingPlanAudit()
{
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function testAddPackingPlan()\n {\n }",
"public function addAudit(Audit $audit);",
"public function testAddExternalShipmentAudit()\n {\n }",
"public function test_addExternalShipmentAudit() {\n\n }",
"public function testAddReplenishmentAudit()\n {\n }",
"public function testAddOrderAudit()\n {\n }",
"public function testAddPackingPlanTag()\n {\n }",
"public function test_addReplenishmentProcessAudit() {\n\n }",
"public function testAddPackingPlanFile()\n {\n }",
"public function testAddVendorComplianceSurveyAudit()\n {\n }",
"public function test_addLowStockAudit() {\n\n }",
"public function test_addOrderLineActivityAudit() {\n\n }",
"public function testGetDuplicatePackingPlanById()\n {\n }",
"public function testAddLowStockAudit()\n {\n }",
"public function test_addCartonActivityAudit() {\n\n }",
"public function created(PlanSubscription $planSubscription)\n {\n //\n }",
"public function test_addCustomerAudit() {\n\n }",
"public function test_addBillingCodeTypeAudit() {\n\n }",
"public function testPutAuditWitArgs()\r\n {\r\n $eventId = 1;\r\n $message = 'Installing new Library Activity.';\r\n $args = [\r\n '[solid_name]' => 'Sample_File_Deploy', \r\n '[artifact_id]' => 1\r\n ];\r\n $result = $this->Oddits->putAudit($eventId, $message, $args);\r\n $this->assertTrue($result);\r\n $lastID = $this->Oddits->getInsertID();\r\n $this->Auditargs = TableRegistry::get('Auditargs', ['className' => 'DBModel\\Model\\Table\\AuditargsTable']);\r\n $entity = $this->Auditargs->get($lastID);\r\n $this->assertNotEmpty($entity);\r\n $this->assertInternalType('object', $entity);\r\n $this->assertInstanceOf('DBModel\\Model\\Entity\\Auditarg', $entity);\r\n }",
"public function testGetPackingPlanById()\n {\n }",
"public function testAddItemSubCategoryAudit()\n {\n }",
"public function test_addItemCategoryAudit() {\n\n }",
"public function testUpdatePackingPlan()\n {\n }",
"private function insertPlan($accountId, $planId, $effectiveDate) {\n $stmt = $this->pdo->prepare(\n 'INSERT INTO account_plans(account_id,plan_id,effective_date) '\n . 'VALUES(:account_id,:plan_id,:effective_date)');\n \n return $stmt->execute([\n ':account_id' => $accountId,\n ':plan_id' => $planId,\n ':effective_date' => $effectiveDate,\n ]);\n }",
"public function test_addLegacyLowstockContactAudit() {\n\n }",
"public function testNewPaidAccountCanHaveCustomTimestamp()\n {\n $this->insight->accounts->addPaid(12345, new PlanM(), new Yearly(), new DateTimeValue('2015-12-05'));\n $this->assertEquals(1, $this->connection->executeFirstCell(\"SELECT COUNT(`id`) AS 'row_count' FROM {$this->insight->getTableName('accounts')}\"));\n\n $row = $this->connection->executeFirstRow(\"SELECT * FROM {$this->insight->getTableName('accounts')} WHERE `id` = ?\", 12345);\n\n $this->assertInternalType('array', $row);\n $this->assertEquals(12345, $row['id']);\n $this->assertEquals(AccountsInterface::PAID, $row['status']);\n $this->assertEquals('2015-12-05 00:00:00', $row['created_at']->format('Y-m-d H:i:s'));\n $this->assertEquals(2015, $row['cohort_year']);\n $this->assertEquals(12, $row['cohort_month']);\n $this->assertNull($row['canceled_at']);\n $this->assertEquals(41.583, $row['mrr_value']);\n }",
"public function testNewPaidMonthlyAccountAddValidRecord()\n {\n $this->assertEquals(0, $this->connection->executeFirstCell(\"SELECT COUNT(`id`) AS 'row_count' FROM {$this->insight->getTableName('accounts')}\"));\n $this->insight->accounts->addPaid(12345, new PlanL(), new Monthly());\n $this->assertEquals(1, $this->connection->executeFirstCell(\"SELECT COUNT(`id`) AS 'row_count' FROM {$this->insight->getTableName('accounts')}\"));\n\n $row = $this->connection->executeFirstRow(\"SELECT * FROM {$this->insight->getTableName('accounts')} WHERE `id` = ?\", 12345);\n\n $this->assertInternalType('array', $row);\n $this->assertEquals(12345, $row['id']);\n $this->assertEquals(PlanL::class, $row['plan']);\n $this->assertEquals(Monthly::class, $row['billing_period']);\n $this->assertEquals(AccountsInterface::PAID, $row['status']);\n $this->assertEquals($this->current_timestamp->format('Y-m-d H:i:s'), $row['created_at']);\n $this->assertEquals(date('Y'), $row['cohort_year']);\n $this->assertEquals(date('m'), $row['cohort_month']);\n $this->assertNull($row['canceled_at']);\n $this->assertEquals(99, $row['mrr_value']);\n $this->assertFalse($row['had_trial']);\n }",
"public function testAddPackingPlanFileByURL()\n {\n }",
"public function testUpdatePackingPlanCustomFields()\n {\n }",
"public function testRunFulfillmentPlan()\n {\n }"
]
| [
"0.60553193",
"0.5969876",
"0.5941007",
"0.58760846",
"0.57419807",
"0.5704287",
"0.56345534",
"0.56341517",
"0.5615037",
"0.5517533",
"0.5516703",
"0.54870427",
"0.546986",
"0.5468823",
"0.537823",
"0.53143084",
"0.5251664",
"0.5245915",
"0.5208634",
"0.51976657",
"0.5169436",
"0.51458794",
"0.51247054",
"0.5069311",
"0.5065722",
"0.49830142",
"0.49595138",
"0.48859757",
"0.48745507",
"0.486139"
]
| 0.75321937 | 0 |
Test case for addPackingPlanFile Attach a file to a packingPlan. | public function testAddPackingPlanFile()
{
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function testAddPackingPlanFileByURL()\n {\n }",
"public function addFile($file);",
"public function testGetPackingPlanFiles()\n {\n }",
"public function testAddExternalShipmentFile()\n {\n }",
"public function testAddPackingPlan()\n {\n }",
"function addFile(FileUpload $file)\n\t{\n\t\t$file->move($this->getUniqueFilePath());\n\t\t$this->query('INSERT INTO files (queueID, created, data, name) VALUES (\"' . sqlite_escape_string($this->getQueueID()) . '\",' . time() . ',\\'' . sqlite_escape_string(serialize($file)) . '\\', \\'' . sqlite_escape_string($file->getName()) . '\\')');\n\t}",
"public function addFileTask(string $fileName, $_globals = NULL): void {}",
"public function addFile(\\Models\\File $file) {\n $this->files[] = $file;\n }",
"public function addFile($file) {\n $this->files[$file->getName()] = $file;\n }",
"private function _addFile($file, $params)\n {\n $this->_files[basename($file)] = $this->_element->insertFile(\n basename($file),\n $params['role'],\n $this->_getFileInsertionPoint(basename($file))\n );\n }",
"public function testDeletePackingPlanFile()\n {\n }",
"abstract public function attachFile($filePath, $name = null);",
"public function addFile(File $file)\n {\n $file->setFileset($this);\n $this->files->add($file);\n }",
"public function addFile($file = null){\n $client = Yii::$app->fileService;\n return $client->add(['sid'=>$this->sid,'file'=>$file]);\n }",
"public function add($file) {\n\t\tarray_push($this->files, $file);\n\t}",
"public function add(){\n\t\t\n\t\t// Open or create file\n\t\t$f = fopen($this->file, 'wb');\n\t\tfclose($f);\n\t}",
"private function add_file()\n {\n \t$helperPluginManager = $this->getServiceLocator();\n \t$serviceManager = $helperPluginManager->getServiceLocator();\n \t\n \t$file = $serviceManager->get('PM/Model/Files');\n \t\n \t$result = $file->getFileById($this->pk);\n \tif($result)\n \t{\n \t\tif($result['company_name'] != '' && $result['company_id'] && $result['company_id'] > 0)\n \t\t{\n \t\t\t$company_url = $this->view->url('companies/view', array('company_id' => $result['company_id']));\n \t\t\t$this->add_breadcrumb($company_url, $result['company_name']);\n \t\t}\n \t\t\n \t\tif($result['project_name'] != '' && $result['project_id'] && $result['project_id'] > 0)\n \t\t{ \t\t\n \t\t\t$project_url = $this->view->url('projects/view', array('project_id' => $result['project_id']));\n \t\t\t$this->add_breadcrumb($project_url, $result['project_name']);\n \t\t}\n \t\t\n \t\tif($result['task_name'] != '' && $result['task_id'] && $result['task_id'] > 0)\n \t\t{\n \t\t\t$task_url = $this->view->url('tasks/view', array('task_id' => $result['task_id']));\n \t\t\t$this->add_breadcrumb($task_url, $result['task_name']);\n \t\t}\n \t\t\n \t\t$file_url = $this->view->url('pm', array('module' => 'pm','controller' => 'files','action'=>'view', 'id' => $result['file_id']), null, TRUE);\n \t\t$this->add_breadcrumb($file_url, 'File: '.$result['name'], TRUE); \t\t\n \t}\n }",
"public function addFile($file)\n {\n $this->paths[] = $file;\n }",
"public function addAttachment($file)\n {\n $this->hasAttachment = true;\n $this->attachments[] = $file;\n }",
"function addFile(File $newFile)\r\n\t{\r\n\t\tif( file_exists( $this->path . '/' . $newFile->getName( ) ) )\r\n\t\t{\r\n\t\t\t$this->filesCollection->add( $newFile );\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\ttrigger_error( \"arquivo inexistente! não foi possível adicionar\" );\r\n\t\t}\r\n\t}",
"public function testAddFieldVisualisationFile() {\n $new_field_label = 'Testing visualisation file field';\n $new_field_name = 'testing_vis_file_field';\n $storage_type = 'dvf_file';\n\n $this->addNewFieldToPage($new_field_label, $new_field_name, $storage_type);\n }",
"public function attach_file($file){\n\t \t\t//ERROR CHECKNG , SET OJESCT ATTRIBUTESss\n\t \t\tif(!$file || empty($file) || !is_array($file)){\n\t \t\t\t$this->errors[] = \"No file was uploaded. \";\n\t \t\t\treturn false;\n\t \t\t}elseif($file['error'] != 0){\n\t \t\t\t$this->errors[] = $this->upload->errors[$file['error']];\n\t \t\t\treturn false;\n\t \t\t}else{\n\t \t\t\tif (!isset($this->testimony_id)) \n\t \t\t\t\t$this->setTestimonyid();\n\n\t \t\t\t$this->temp_path = $file['tmp_name'];\n\t \t\t\t$this->passport = str_replace(\"/\", \"_\", $this->testimony_id).\".\".basename($file[\"type\"]);\n\t \t\t\t$this->type = $file['type'];\n\t \t\t\t$this->size = $file['size'];\n\t \t\t\treturn true;\n\t \t\t}\n\t \t}",
"public function testAddExternalShipmentFileByURL()\n {\n }",
"public function addFile($file)\r\n\t{\r\n\t\t$this->frame[Cache::FILES][] = $file;\r\n\t}",
"public function testAddPackingPlanTag()\n {\n }",
"public function addPostFile($name, $file, $content_type = null) {}",
"public function testAddPackingPlanAudit()\n {\n }",
"public function addDesignFile(DesignFile $designFile)\n {\n DesignFileLink::create([\n 'invoice_item_id' => $this->id,\n 'design_file_id' => $designFile->id\n ]);\n if (is_null($this->product_id) || $this->product->productPrint->id != $designFile->product_print_id) {\n $this->_resetProduct(array('productPrint' => $designFile->product_print_id));\n }\n }",
"function addFile($attachment_id, $filename, $filetype, &$blob)\n {\n $attachment_id = Misc::escapeInteger($attachment_id);\n $filesize = strlen($blob);\n $stmt = \"INSERT INTO\n \" . APP_DEFAULT_DB . \".\" . APP_TABLE_PREFIX . \"issue_attachment_file\n (\n iaf_iat_id,\n iaf_filename,\n iaf_filesize,\n iaf_filetype,\n iaf_file\n ) VALUES (\n $attachment_id,\n '\" . Misc::escapeString($filename) . \"',\n '\" . $filesize . \"',\n '\" . Misc::escapeString($filetype) . \"',\n '\" . Misc::escapeString($blob) . \"'\n )\";\n $res = DB_Helper::getInstance()->query($stmt);\n if (PEAR::isError($res)) {\n Error_Handler::logError(array($res->getMessage(), $res->getDebugInfo()), __FILE__, __LINE__);\n return false;\n } else {\n return true;\n }\n }",
"public function addFile( $file ) {\n if( in_array( $file, $this->pending ) === true )\n return $this;\n if( in_array( $file, $this->files ) === true )\n return $this;\n\n array_push( $this->pending, $file );\n\n if( isset( $this->dependencies[$file] ) === true ) {\n foreach( $this->dependencies[$file] as $dependency ) {\n $this->addFile( $dependency );\n }\n }\n\n if( $file[0] != '$' ) { // Don't actually add virtual dependencies.\n $this->files[] = $file;\n }\n\n array_pop( $this->pending );\n return $this;\n }"
]
| [
"0.64937943",
"0.6147898",
"0.5951913",
"0.57769436",
"0.57392806",
"0.5660011",
"0.5600821",
"0.5544153",
"0.55356807",
"0.5426812",
"0.54084337",
"0.54066163",
"0.53932345",
"0.53909034",
"0.5379048",
"0.5373547",
"0.53595406",
"0.53562784",
"0.5340339",
"0.5317471",
"0.5314521",
"0.5314444",
"0.5286771",
"0.5274398",
"0.5260713",
"0.5248816",
"0.52465504",
"0.5235639",
"0.52248824",
"0.51986414"
]
| 0.7034536 | 0 |
Test case for addPackingPlanFileByURL Attach a file to a packingPlan by URL.. | public function testAddPackingPlanFileByURL()
{
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function testAddExternalShipmentFileByURL()\n {\n }",
"public function testAddReplenishmentFileByURL()\n {\n }",
"public function testAddPackingPlanFile()\n {\n }",
"public function testAddLowStockFileByURL()\n {\n }",
"public function testAddVendorComplianceSurveyFileByURL()\n {\n }",
"public function testAddExternalShipmentFile()\n {\n }",
"public function add_file_from_url( $url ) {\r\n\t\t\t$url = ( substr( $url, 0, 4 ) !== 'http' ) ? 'http://' . str_replace( '//', '', $url ) : $url;\r\n\t\t\t\r\n\t\t\t$file = self::FILE_OBJECT_TEMPLATE;\r\n\t\t\t$file['path'] = $url;\r\n\t\t\t$file['origname'] = $url;\r\n\t\t\t$file['name'] = self::strip_to_valid_filename( substr( strrchr( $url, '/' ), 1 ) );\r\n\t\t\t$file['isurl'] = true;\r\n\t\t\t\r\n\t\t\t$this->process_file_add( $file, true );\r\n\t\t}",
"public function testAddOrderFileByURL()\n {\n }",
"public function testAddItemSubCategoryFileByURL()\n {\n }",
"public function testGetPackingPlanFiles()\n {\n }",
"public function addFile($file);",
"function addArtifactAttachedFile($sessionKey,$group_id,$group_artifact_id,$artifact_id,$encoded_data,$description,$filename,$filetype) {\n global $art_field_fact; \n if (session_continue($sessionKey)) {\n $pm = ProjectManager::instance();\n try {\n $grp = $pm->getGroupByIdForSoap($group_id, 'addArtifactAttachedFile');\n } catch (SoapFault $e) {\n return $e;\n }\n\n $at = new ArtifactTracker($grp,$group_artifact_id);\n if (!$at || !is_object($at)) {\n return new SoapFault(get_artifact_type_fault,'Could Not Get ArtifactTracker','addArtifactFile');\n } elseif ($at->isError()) {\n return new SoapFault(get_artifact_type_fault,$at->getErrorMessage(),'addArtifactFile');\n }\n \n $art_field_fact = new ArtifactFieldFactory($at);\n if (!$art_field_fact || !is_object($art_field_fact)) {\n return new SoapFault(get_artifact_field_factory_fault, 'Could Not Get ArtifactFieldFactory','addArtifactFile');\n } elseif ($art_field_fact->isError()) {\n return new SoapFault(get_artifact_field_factory_fault, $art_field_fact->getErrorMessage(),'addArtifactFile');\n }\n\n $a = new Artifact($at,$artifact_id);\n if (!$a || !is_object($a)) {\n return new SoapFault(get_artifact_fault,'Could Not Get Artifact','addArtifactFile');\n } elseif ($a->isError()) {\n return new SoapFault(get_artifact_fault,$a->getErrorMessage(),'addArtifactFile');\n }\n\n $af = new ArtifactFile($a);\n if (!$af || !is_object($af)) {\n return new SoapFault(get_artifact_file_fault,'Could Not Create File Object','addArtifactFile');\n } else if ($af->isError()) {\n return new SoapFault(get_artifact_file_fault,$af->getErrorMessage(),'addArtifactFile');\n }\n\n $bin_data = base64_decode($encoded_data);\n\n $filesize = strlen($bin_data);\n\n $id = $af->create($filename,$filetype,$filesize,$bin_data,$description, $changes);\n\n if (!$id) {\n return new SoapFault(get_artifact_file_fault,$af->getErrorMessage(),'addArtifactFile');\n } else {\n // Send the notification\n if ($changes) {\n $agnf =& new ArtifactGlobalNotificationFactory();\n $addresses = $agnf->getAllAddresses($at->getID(), true);\n $a->mailFollowupWithPermissions($addresses, $changes);\n }\n }\n\n return $id;\n } else {\n return new SoapFault(invalid_session_fault, 'Invalid Session', 'addArtifactFile');\n }\n}",
"private function add_file()\n {\n \t$helperPluginManager = $this->getServiceLocator();\n \t$serviceManager = $helperPluginManager->getServiceLocator();\n \t\n \t$file = $serviceManager->get('PM/Model/Files');\n \t\n \t$result = $file->getFileById($this->pk);\n \tif($result)\n \t{\n \t\tif($result['company_name'] != '' && $result['company_id'] && $result['company_id'] > 0)\n \t\t{\n \t\t\t$company_url = $this->view->url('companies/view', array('company_id' => $result['company_id']));\n \t\t\t$this->add_breadcrumb($company_url, $result['company_name']);\n \t\t}\n \t\t\n \t\tif($result['project_name'] != '' && $result['project_id'] && $result['project_id'] > 0)\n \t\t{ \t\t\n \t\t\t$project_url = $this->view->url('projects/view', array('project_id' => $result['project_id']));\n \t\t\t$this->add_breadcrumb($project_url, $result['project_name']);\n \t\t}\n \t\t\n \t\tif($result['task_name'] != '' && $result['task_id'] && $result['task_id'] > 0)\n \t\t{\n \t\t\t$task_url = $this->view->url('tasks/view', array('task_id' => $result['task_id']));\n \t\t\t$this->add_breadcrumb($task_url, $result['task_name']);\n \t\t}\n \t\t\n \t\t$file_url = $this->view->url('pm', array('module' => 'pm','controller' => 'files','action'=>'view', 'id' => $result['file_id']), null, TRUE);\n \t\t$this->add_breadcrumb($file_url, 'File: '.$result['name'], TRUE); \t\t\n \t}\n }",
"function _drush_patchfile_add_patch($project_name, $patch_url, $file) {\n $output = \"\\nprojects[{$project_name}][patch][] = \\\"{$patch_url}\\\"\\n\";\n $result = file_put_contents($file, $output, FILE_APPEND);\n if ($result !== FALSE) {\n drush_log(dt('Added patch @patch to @project in @file.', array('@patch' => $patch_url, '@project' => $project_name, '@file' => $file)), 'success');\n return TRUE;\n }\n else {\n return drush_set_error('DRUSH_MAKE_FILE_NO_WRITE', dt('Unable to append to file @file.', array('@file' => $file)));\n }\n}",
"function addFile($attachment_id, $filename, $filetype, &$blob)\n {\n $attachment_id = Misc::escapeInteger($attachment_id);\n $filesize = strlen($blob);\n $stmt = \"INSERT INTO\n \" . APP_DEFAULT_DB . \".\" . APP_TABLE_PREFIX . \"issue_attachment_file\n (\n iaf_iat_id,\n iaf_filename,\n iaf_filesize,\n iaf_filetype,\n iaf_file\n ) VALUES (\n $attachment_id,\n '\" . Misc::escapeString($filename) . \"',\n '\" . $filesize . \"',\n '\" . Misc::escapeString($filetype) . \"',\n '\" . Misc::escapeString($blob) . \"'\n )\";\n $res = DB_Helper::getInstance()->query($stmt);\n if (PEAR::isError($res)) {\n Error_Handler::logError(array($res->getMessage(), $res->getDebugInfo()), __FILE__, __LINE__);\n return false;\n } else {\n return true;\n }\n }",
"public function add(){\n\t\t\n\t\t// Open or create file\n\t\t$f = fopen($this->file, 'wb');\n\t\tfclose($f);\n\t}",
"public function testAddPackingPlan()\n {\n }",
"public function addTaskFile($task_id){\n\n $err=\"\";\n $file=\"\";\n // Testons si le fichier n'est pas trop gros\n if ($_FILES['myfile']['error'] == 0){\n if ($_FILES['myfile']['size'] <= MAX_FILE_SIZE)\n {\n // On peut valider le fichier et le stocker définitivement\n if (!is_dir(REPOSITORY_PATH . '/'. $task_id .'/')) {\n mkdir(REPOSITORY_PATH . '/'. $task_id .'/', 0777, true);\n }\n //move file to 'uploads' repository\n $file=REPOSITORY_PATH . '/'. $task_id .'/'. basename($_FILES['myfile']['name']);\n move_uploaded_file($_FILES['myfile']['tmp_name'], $file);\n\n //retrieve the task team id\n $bdd = $this->connectDB();\n $req=$bdd->prepare('SELECT team from task WHERE id= ?');\n $req->execute(array($task_id));\n\n if ($req->rowCount()){\n $row = $req->fetch();\n $team=$row['team'];\n }\n\n //update history\n $history_manager=new historyManager();\n $history_manager->addEvent($team,'attach_file',$task_id);\n\n }else{\n $err=\"fichier trop volumineux\";\n }\n }else{\n $err=\"erreur lors de l'envoi du fichier\";\n }\n\n\n $file_add=array(\n 'error'=>$err,\n 'file'=>$file\n );\n\n return $file_add;\n }",
"function drush_patchfile_patch_add($project_name, $url) {\n $file = drush_get_option('patch-file');\n\n $args = array(\n '@project' => $project_name,\n '@url' => &$url,\n );\n\n $project_directory = drush_patchfile_project_get_directory($project_name);\n if (empty($project_directory)) {\n return drush_set_error('DRUSH_PROJECT_NOT_FOUND', dt(\"The project @project was not found.\", $args));\n }\n\n // Attempt to convert generic URLs to patch-specific URLs.\n $original_url = $url;\n if (_drush_patchfile_is_url($url)) {\n if (!drush_patchfile_process_url($url)) {\n return FALSE;\n }\n }\n\n $patch = $url;\n if (!_drush_patchfile_preprocess_local_file_url($patch, $file)) {\n return FALSE;\n }\n\n // Check to see if this project is already patched with this patch.\n $projects = drush_patchfile_get_patched_projects();\n if (isset($projects[$project_name])) {\n if (in_array($patch, $projects[$project_name]['patch']) || in_array($url, $projects[$project_name]['patch'])) {\n return drush_set_error('DRUSH_PATCH_ALREADY_LISTED', dt(\"The patch @url is already listed as a patch for @project.\", $args));\n }\n }\n\n if (!drush_get_option('no-apply')) {\n if (_drush_patchfile_project_apply_patches($project_name, array($patch), $project_directory) || drush_get_option('force')) {\n _drush_patchfile_add_patch($project_name, $patch['url'], $file);\n }\n else {\n if (drush_confirm(\"Would you still like to add this patch to the patch file?\")) {\n _drush_patchfile_add_patch($project_name, $patch['url'], $file);\n }\n return FALSE;\n }\n }\n else {\n if (_make_download_file($patch['url']) || drush_get_option('force')) {\n _drush_patchfile_add_patch($project_name, $patch['url'], $file);\n }\n else {\n return drush_set_error('DOWNLOAD_ERROR', dt('Unable to download or fetch @url.', $args));\n }\n }\n}",
"public function testInboundDocumentAddAttachment()\n {\n }",
"protected abstract function createUrl($file);",
"public function testGetExternalShipmentFiles()\n {\n }",
"function addFile($path)\n {\n }",
"public function testAddReplenishmentFile()\n {\n }",
"public function testDeletePackingPlanFile()\n {\n }",
"public function testPostFile()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }",
"private function submitFile()\n {\n\n $encoded_url = urlencode($this->getFileUrl());\n\n wp_remote_get(self::GOOGLE_WEBMASTER_TOOLS_URL . $encoded_url);\n wp_remote_get(self::BING_WEBMASTER_TOOLS_URL . $encoded_url);\n\n }",
"function test(){\n\t\t// See http://www.atk14.net/api/en/file_uploads/create_new/\n\n\t\t$adf = new ApiDataFetcher(\"http://www.atk14.net/api/\",array(\n\t\t\t\"logger\" => new Logger()\n\t\t));\n\t\t$data = $adf->postFile(\"file_uploads/create_new\",\"sandokan.jpg\");\n\n\t\t$this->assertEquals(201,$adf->getStatusCode());\n\t\t$this->assertEquals(\"POST\",$adf->getMethod());\n\t\t$this->assertEquals(\"http://www.atk14.net/api/en/file_uploads/create_new/?format=json\",$adf->getUrl());\n\t\t$this->assertEquals(\"sandokan.jpg\",$data[\"filename\"]);\n\t\t$this->assertEquals(\"image/jpeg\",$data[\"mime_type\"]);\n\t\t$this->assertEquals(\"d5d4599e3586064e0524d18e8ee8bce5\",$data[\"md5sum\"]);\n\t}",
"function addAUPPoints($submitted_by, $file_title){\n // $submitted_by = user ID after upload a file\n global $jlistConfig;\n \n if ($jlistConfig['use.alphauserpoints'] && $submitted_by){\n $api_AUP = JPATH_SITE.DS.'components'.DS.'com_alphauserpoints'.DS.'helper.php';\n if (file_exists($api_AUP)){\n require_once ($api_AUP);\n $aupid = AlphaUserPointsHelper::getAnyUserReferreID( $submitted_by );\n if ($aupid){\n $text = JText::_('COM_JDOWNLOADS_BACKEND_SET_AUP_UPLOAD_TEXT');\n $text = sprintf($text,$file_title);\n AlphaUserPointsHelper::newpoints('plgaup_jdownloads_user_upload_published', $aupid, $file_title, $text);\n } \n } \n }\n}",
"function testVerifyFileSubmission()\n {\n $this->deleteLog($this->logfilename);\n //Verify file exists in the database\n $query = $this->db->query(\"SELECT buildid, fileid FROM build2uploadfile\");\n if(count($query) == 0)\n {\n $this->fail('No build2upload records were added to the database');\n return;\n }\n $this->BuildId = $query[0]['buildid'];\n\n $content = $this->connect($this->url.\"/viewFiles.php?buildid=$this->BuildId\");\n if(!$content)\n {\n return;\n }\n \n $this->assertClickable('http://www.kitware.com/company/about.html');\n \n $this->clickLink('CMakeCache.txt');\n if(!$this->checkLog($this->logfilename))\n {\n return;\n }\n\n //Verify symlink and content exist on disk\n $query = $this->db->query(\"SELECT id, sha1sum FROM uploadfile WHERE filename='CMakeCache.txt'\");\n if(count($query) == 0)\n {\n $this->fail('CMakeCache.txt was not added to the uploadfile table');\n return;\n }\n $this->FileId = $query[0]['id'];\n $this->Sha1Sum = $query[0]['sha1sum'];\n\n global $cdashpath;\n global $CDASH_DOWNLOAD_RELATIVE_URL;\n $dirName = $cdashpath.'/'.$CDASH_DOWNLOAD_RELATIVE_URL.'/'.$this->Sha1Sum;\n if(!is_dir($dirName))\n {\n $this->fail(\"Directory $dirName was not created\");\n return;\n }\n if(!file_exists($dirName.'/'.$this->Sha1Sum))\n {\n $this->fail(\"File contents were not written to $dirName/$this->Sha1Sum\");\n return;\n }\n if(!file_exists($dirName.'/CMakeCache.txt'))\n {\n $this->fail(\"File symlink was not written to $dirName/CMakeCache.txt\");\n return;\n }\n $this->pass('Uploaded file exists in database and on disk');\n }"
]
| [
"0.719052",
"0.6704658",
"0.6700121",
"0.6331982",
"0.6223605",
"0.6202839",
"0.6042983",
"0.6011462",
"0.5978323",
"0.5866754",
"0.5808024",
"0.5804502",
"0.573996",
"0.5668431",
"0.56314516",
"0.5616567",
"0.5586306",
"0.55138797",
"0.55037266",
"0.5491123",
"0.54792",
"0.5473093",
"0.5453068",
"0.5424763",
"0.5419783",
"0.5410384",
"0.5367066",
"0.5363042",
"0.5353803",
"0.53100115"
]
| 0.80135447 | 0 |
Test case for addPackingPlanTag Add new tags for a packingPlan.. | public function testAddPackingPlanTag()
{
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function testGetPackingPlanTags()\n {\n }",
"function TestPlan_add_tag($plan_id, $tag_name) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestPlan.add_tag', array(new xmlrpcval($plan_id, \"int\"), new xmlrpcval($tag_name, \"string\")), \"array\");\n\n\t// Do call and return value\n\treturn do_call($call);\n}",
"public function testDeletePackingPlanTag()\n {\n }",
"public function test_addExternalShipmentTag() {\n\n }",
"public function test_addReplenishmentProcessTag() {\n\n }",
"public function testAddPackingPlan()\n {\n }",
"public function testAddExternalShipmentTag()\n {\n }",
"public function test_addLowStockTag() {\n\n }",
"public function testAddReplenishmentTag()\n {\n }",
"public function testAddPackingPlanAudit()\n {\n }",
"public function testAddOrderTag()\n {\n }",
"public function testAddLowStockTag()\n {\n }",
"public function test_addOrderLineActivityTag() {\n\n }",
"public function testAddVendorComplianceSurveyTag()\n {\n }",
"function TestCase_add_tag($case_id, $tag_name) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestCase.add_tag', array(new xmlrpcval($case_id, \"int\"), new xmlrpcval($tag_name, \"string\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}",
"public function testAddPackingPlanFile()\n {\n }",
"public function test_addItemCategoryTag() {\n\n }",
"public function test_addCustomerTag() {\n\n }",
"public function testGetExternalShipmentTags()\n {\n }",
"public function test_createTagRequest() {\n\n }",
"public function test_attachTagRequest() {\n\n }",
"private function addTag()\n {\n $params = array();\n $params['db_link'] = $this->db;\n $params['ticket_id'] = $_REQUEST['ticket_id'];\n \n $data = array();\n $tagTitle = stripslashes(trim($_REQUEST['tag']));\n $tag = Utils::sanitize($tagTitle);\n \n $Tickets = new Tickets($params);\n $Tickets->addTag($tag, $tagTitle);\n \n echo '[{\"isError\":0, \"message\":\"Successfully added tag\"}]';\n exit;\n }",
"public function testPostTag() : void\n {\n $request = [\n 'name' => static::$tagName\n ];\n\n $response = $this->actingAs(static::$user, 'api')\n ->post('/api/tag', $request);\n\n $response->assertStatus(201);\n\n $response->assertJsonStructure([\n 'id',\n 'name'\n ]);\n }",
"public function test_addBillingCodeTypeTag() {\n\n }",
"function TestRun_add_tag($run_id, $tag_name) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestRun.add_tag', array(new xmlrpcval($run_id, \"int\"), new xmlrpcval($tag_name, \"string\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}",
"public function testAddItemSubCategoryTag()\n {\n }",
"public function testGetDuplicatePackingPlanById()\n {\n }",
"public function test_getReplenishmentProcessTags() {\n\n }",
"public function test_addLegacyLowstockContactTag() {\n\n }",
"public function test_addCartonActivityTag() {\n\n }"
]
| [
"0.7443316",
"0.7109381",
"0.69109",
"0.6716628",
"0.6704143",
"0.6696913",
"0.6470231",
"0.6455306",
"0.6453562",
"0.64048386",
"0.63709253",
"0.627634",
"0.6233461",
"0.6232321",
"0.6210739",
"0.6147645",
"0.6126428",
"0.6117921",
"0.61094236",
"0.60676575",
"0.6034293",
"0.60337037",
"0.6030296",
"0.602146",
"0.6005843",
"0.5987125",
"0.5966159",
"0.5866529",
"0.5833577",
"0.582163"
]
| 0.8144903 | 0 |
Test case for deletePackingPlan Delete a packingPlan. | public function testDeletePackingPlan()
{
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function testDeletePackingPlanTag()\n {\n }",
"public function testDeletePackingPlanFile()\n {\n }",
"function delete($id_plan) {\r\n $sql = \"DELETE FROM planes WHERE planes.id_plan ='\" . $id_plan . \"'\";\r\n\r\n $response = getResultSQL($sql);\r\n if (!$response) {\r\n return false;\r\n } else {\r\n return true;\r\n }\r\n }",
"public function delete_plan() {\n if (empty($this->user->admin)) {\n Router::redirect('/');\n die();\n }\n\n # Set up query\n $q = \"DELETE FROM plans\n\t\t\t WHERE plan_id=\".$_POST['plan_id'];\n $plans = DB::instance(DB_NAME)->query($q);\n\n //Return result to jTable\n $jTableResult = array();\n $jTableResult['Result'] = \"OK\";\n print json_encode($jTableResult);\n }",
"public function plan_delete( $plan_id ) {\r\n\t\treturn $this->_send_request( 'plans/'.$plan_id, array(), STRIPE_METHOD_DELETE );\r\n\t}",
"public function deletePlan(Plan $plan){\n $this->open();\n\n $result = $this->query('DELETE FROM '.$this->TABLE_NAME.' WHERE id=:id', array(\n new QueryParam(':id', $plan->id, PDO::PARAM_INT)\n )\n );\n\n $this->close();\n\n return $result;\n }",
"public function deletePlan($plan)\n {\n Stripe\\Plan::retrieve($plan->level)->delete();\n }",
"public function deleted(PlanSubscription $planSubscription)\n {\n //\n }",
"public function delete_plan($planId){\n try {\n $createdPlan = new Plan();\n $createdPlan->setId($planId);\n $result = $createdPlan->delete($this->_api_context);\n $returnArray['RESULT'] = 'Success';\n $returnArray['DELETE_PLAN'] = $result->toArray();\n $returnArray['RAWREQUEST']='{id:'.$planId.'}';\n $returnArray['RAWRESPONSE']=$result->toJSON();\n return $returnArray; \n } catch (\\PayPal\\Exception\\PayPalConnectionException $ex) {\n return $this->createErrorResponse($ex);\n }\n }",
"public function destroy(Plan $plan) {\n \n }",
"public function destroy(Plan $plan)\n {\n //\n }",
"public function Deleteplan() {\n $plan_id = $this->input->post('plan_id');\n $data = array(\n 'plan_id' => $plan_id\n );\n $this->load->view('admin/plan/delete_plan', $data);\n }",
"function TestCase_unlink_plan($case_id, $plan_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestCase.unlink_plan', array(new xmlrpcval($case_id, \"int\"), new xmlrpcval($plan_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}",
"function delete_plan()\n {\n #check user access\n check_user_access($this, 'delete_procurement_plan', 'redirect');\n\n # Get the passed details into the url data array if any\n $urldata = $this->uri->uri_to_assoc(3, array('m', 's'));\n\n # Pick all assigned data\n $data = assign_to_data($urldata);\n\n if(!empty($data['i'])){\n $result = $this->db->query($this->Query_reader->get_query_by_code('deactivate_item', array('item'=>' procurement_plans', 'id'=>decryptValue($data['i'])) ));\n \n #deactivate the entries\n if($result)\n {\n $this->db->where('procurement_plan_id', decryptValue($data['i']));\n $this->db->update('procurement_plan_entries', array('isactive'=>'N'));\n }\n }\n\n if(!empty($result) && $result){\n $this->session->set_userdata('dbid', \"The plan and it's entries have been successfully deleted.\");\n }\n else if(empty($data['msg']))\n {\n $this->session->set_userdata('dbid', \"ERROR: The procurement plan could not be deleted or were not deleted correctly.\");\n }\n\n if(!empty($data['t']) && $data['t'] == 'super'){\n $tstr = \"/t/super\";\n }else{\n $tstr = \"\";\n }\n redirect(base_url().\"procurement/page/m/dbid\".$tstr);\n }",
"function deletePlanModules($conn, $planID){\n\n\t\n\t$sql = \"DELETE FROM plancomponent WHERE PlanId = :planID\";\n\t$sth = $conn->prepare($sql);\n\t\n\t$sth->bindParam(':planID', $planID, PDO::PARAM_INT, 11);\n\t\n\t$sth->execute();\n\t$sth->closeCursor();\n\n}",
"public function deleteFlatplan ($slug, $plan){\n\t\ttry{\n\t\t\t$org = Organization::where('slug', '=', $slug)->firstOrFail();\n\t\t\t$flatplan = Flatplan::where('organization_id', '=', $org->id)->where('slug', '=', $plan)->firstOrFail();\n\t\t}\n\t\tcatch(Exception $e) {\n\t\t\treturn View::make('fourOhFour');\n\t\t}\n\t\ttry{\n\t\t\t$role = Role::where('organization_id', '=', $org->id)->where('user_id', '=', Auth::user()->id)->firstOrFail();\n\t\t}\n\t\tcatch (Exception $e){\n\t\t\treturn Redirect::to('/'.$org->slug)->with('flash_message', 'You do not have permission to edit this organization');\n\t\t}\n\t\tif($role->permissions == 'edit'){\n\t\t\t$pages = Page::where('flatplan_id', '=', $flatplan->id)->get();\n\t\t\tif($pages){\n\t\t\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 0');\n\t\t\t\tforeach ($pages as $page) {\n\t\t\t\t\t$assignments = Assignment::where('page_id', '=', $page->id)->get();\n\t\t\t\t\tif($assignments){\n\t\t\t\t\t\tforeach($assignments as $assignment){\n\t\t\t\t\t\t\t$assignment->delete();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t$page->delete();\n\t\t\t\t}\n\t\t\t\tDB::statement('SET FOREIGN_KEY_CHECKS = 1');\n\t\t\t}\n\t\t\t$flatplan->delete();\n\t\t\treturn Redirect::to('/'.$org->slug)->with('flash_message', 'Flatplan deleted successfully');\n\t\t}\n\t\telse{\n\t\t\treturn Redirect::to('/'.$org->slug.'/'.$flatplan->slug.'/'.$page->page_number)->with('flash_message', 'You do not have permission to delete this flatplan');\n\t\t}\t\n\t}",
"public function eliminar($idplan)\n {\n include_once 'controlador/util/bd_conexion_pdo.php';\n\n $conexion = (new Conexion())->conectarPDO();\n\n $sentencia = $conexion->prepare(\"DELETE FROM plan WHERE idplan = :idplan\");\n $sentencia->bindParam(':idplan', $idplan);\n\n $sentencia->execute();\n\n $sentencia->closeCursor();\n\n $resultado = $sentencia->rowCount();\n\n $sentencia = null;\n $conexion = null;\n\n return $resultado;\n }",
"public function delete()\n {\n //recuperation des informations pour la suppression d'une matière\n $data = $this->request->data;\n $id_planing = (int)$data['id_planing'] ?? null;\n \n if (empty($id_planing)) {\n $this->_return('Veillez spécifier l\\'identifiant du programme à supprimer', false);\n }\n\n if (true === $this->model->exist('id_planing', (int)$data['id_planing'], 'Presences')) {\n $this->_return('impossible de supprimer ce planing car il comporte encore des presences ', false);\n }\n\n try {\n $this->model->remove($id_planing);\n $this->_return('La matière a étè supprimer avec succès', true);\n //code...\n } catch (Exception $e) {\n $this->_exception($e);\n }\n }",
"function deletePlan($conn){\n\n\tsession_start();\n\t\t$planID = $_SESSION['planID'];\n\tsession_write_close();\n\t\n\tdeletePlanModules($conn, $planID);\n\t\n\t$sql = \"DELETE FROM plan WHERE PlanId = :planID\";\n\t$sth = $conn->prepare($sql);\n\t\n\t$sth->bindParam(':planID', $planID, PDO::PARAM_INT, 11);\n\t\n\t$sth->execute();\n\t$sth->closeCursor();\n\t\n\tsession_start();\n\t\tunset($_SESSION['planID']);\n\tsession_write_close();\n\t\n\t$return = ['message' => 'Successfully deleted the report'];\n\treturn $return;\n\n}",
"public function testGetPackingPlanById()\n {\n }",
"public function testCompanyManagementBackupsIdDelete()\n {\n\n }",
"public function destroy(Plancompta $plancompta)\n {\n //\n }",
"public function testDeleteProductUsingDELETE()\n {\n }",
"public function testDeleteReport() {\n $operator = $this->createOperator();\n $patient = $this->createPatient();\n $report = $this->createReport($patient);\n $this->actingAs($operator)->visit(\"dashboard\")->see(\"delete_$report->id\")\n ->press(\"delete_$report->id\")\n ->seePageIs(\"dashboard\")\n ->dontSee($patient->name)\n ->dontSee($report->report_name)\n ->dontSee(\"delete_$report->id\")\n ->dontSee($report->case_number);\n \n $this->deleteReport($report);\n $this->deleteUser($patient);\n $this->deleteUser($operator);\n }",
"public function deleteTest()\n {\n $this->assertEquals(true, $this->object->delete(1));\n }",
"public function testDebtorDelete()\n {\n $oDebtorDAO = new DebtorDAO();\n $oDebtor = $oDebtorDAO->findByCpfCnpj('01234567890');\n\n $this->assertTrue(!is_null($oDebtor->getId()));\n\n $oDebtor->delete();\n\n $oDebtor = $oDebtorDAO->findByCpfCnpj('01234567890');\n $this->assertFalse(!is_null($oDebtor->getId()));\n }",
"public function delete_business_package($post_data) {\n//echo \"<pre>\";print_r($data);exit();\n $this->db->where('id', $post_data['package_id']);\n $this->db->delete('business_programs');\n\n return true;\n }",
"function deleteInspectedBy($conn, $planID){\n\t$sql = \"DELETE FROM inspectedby WHERE PlanId = :planID\";\n\t$sth = $conn->prepare($sql);\n\t\n\t$sth->bindParam(':planID', $planID, PDO::PARAM_INT, 11);\n\t\n\t$sth->execute();\n\t$sth->closeCursor();\n}",
"public function testDeleteExternalShipment()\n {\n }",
"public function test_delete() {\n global $DB;\n\n $startcount = $DB->count_records('course_modules');\n\n // Delete the course module.\n course_delete_module($this->quiz->cmid);\n\n // Now, run the course module deletion adhoc task.\n phpunit_util::run_all_adhoc_tasks();\n\n // Try purging.\n $recyclebin = new \\tool_recyclebin\\course_bin($this->course->id);\n foreach ($recyclebin->get_items() as $item) {\n $recyclebin->delete_item($item);\n }\n\n // Item was deleted, so no course module was restored.\n $this->assertEquals($startcount - 1, $DB->count_records('course_modules'));\n $this->assertEquals(0, count($recyclebin->get_items()));\n }"
]
| [
"0.7143373",
"0.7074826",
"0.68252337",
"0.656634",
"0.6563426",
"0.65526646",
"0.65000063",
"0.6320457",
"0.61559975",
"0.6149151",
"0.6058827",
"0.6050592",
"0.6044464",
"0.60418653",
"0.59389263",
"0.58917886",
"0.5835245",
"0.5801051",
"0.5733828",
"0.5711874",
"0.56990176",
"0.56924707",
"0.56868625",
"0.5674415",
"0.5670732",
"0.56644344",
"0.56614",
"0.5658314",
"0.56303555",
"0.5594683"
]
| 0.7878823 | 0 |
Test case for deletePackingPlanFile Delete a file for a packingPlan.. | public function testDeletePackingPlanFile()
{
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function testDeleteExternalShipmentFile()\n {\n }",
"public function testDeletePackingPlan()\n {\n }",
"public function testDeleteReplenishmentFile()\n {\n }",
"public function testDeleteOrderFile()\n {\n }",
"public function testDeleteFile()\n {\n\n }",
"public function testDeleteFile()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }",
"public function testDeleteVendorComplianceSurveyFile()\n {\n }",
"public function testDeletePackingPlanTag()\n {\n }",
"public function testDeleteLowStockFile()\n {\n }",
"function deleteFile() {\r\n\t\tif (file_exists($this->data[$this->alias]['path'])) {\r\n\t\t\tunlink($this->data[$this->alias]['path']);\r\n\t\t}\r\n\t}",
"public function testDeleteItemSubCategoryFile()\n {\n }",
"public function delete($file) {\n\t}",
"public function deleteFile($adapter)\n {\n }",
"public function testDeleteWhenDepotFileDeleted()\n {\n $services = $this->getApplication()->getServiceManager();\n // Override the service container to set depot_storage_path\n $config = $services->get('config');\n $config['depot_storage']['base_path'] = '//depot/swarm-attachments';\n $services->setService('config', $config);\n $depot = $services->get('depot_storage');\n $services->get('p4_admin')->setService('depot_storage', $depot);\n $attachment = new Attachment($this->p4);\n $attachment->set(\n array(\n 'name' => 'test.txt',\n 'size' => 4,\n 'type' => 'text/plain',\n )\n );\n\n $tempFile = tempnam(DATA_PATH, 'attachtest');\n file_put_contents($tempFile, 'test');\n\n $attachment->save($tempFile);\n\n $attachmentId = $attachment->getId();\n $attachment = Attachment::fetch($attachmentId, $this->p4);\n\n $fileSpec = $attachment->get('depotFile');\n\n // certain conditions might cause $attachment->delete() to fail unexpectedly. Here, we try to simulate one.\n // the call to $depot->delete() that is *inside* $attachment->delete() will fail, but failure\n // should be caught and ignored.\n $depot->delete($fileSpec);\n $attachment->delete();\n\n // then, when an attempt is made to fetch the attachment record, it shouldn't exist.\n // this verifies that the attachment records are deleted cleanly.\n $attachmentRefetch = false;\n try {\n $attachmentRefetch = Attachment::fetch($attachmentId, $this->p4);\n } catch (NotFoundException $e) {\n if ($e->getMessage() != 'Cannot fetch entry. Id does not exist.') {\n throw $e;\n }\n }\n\n $this->assertSame(false, $attachmentRefetch);\n }",
"function Trigger_FileDelete1(&$tNG) {\r\r\n $deleteObj = new tNG_FileDelete($tNG);\r\r\n $deleteObj->setFolder(\"../assets/images/magasins/\");\r\r\n $deleteObj->setDbFieldName(\"photo2\");\r\r\n return $deleteObj->Execute();\r\r\n}",
"function Trigger_FileDelete2(&$tNG) {\r\r\n $deleteObj = new tNG_FileDelete($tNG);\r\r\n $deleteObj->setFolder(\"../assets/images/magasins/\");\r\r\n $deleteObj->setDbFieldName(\"photo3\");\r\r\n return $deleteObj->Execute();\r\r\n}",
"public function testAddPackingPlanFile()\n {\n }",
"protected function deleteProtocolFile() {}",
"abstract function delete_file($filepath);",
"public function testDeleteAttachment()\n {\n }",
"function delete() {\n\t\tif (!forge_check_perm ('tracker', $this->Artifact->ArtifactType->getID(), 'tech')) {\n\t\t\t$this->setPermissionDeniedError();\n\t\t\treturn false;\n\t\t}\n\t\t$res = db_query_params ('DELETE FROM artifact_file WHERE id=$1',\n\t\t\t\t\tarray ($this->getID())) ;\n\t\tif (!$res || db_affected_rows($res) < 1) {\n\t\t\t$this->setError('ArtifactFile: Unable to Delete');\n\t\t\treturn false;\n\t\t} else {\n\t\t\tArtifactStorage::instance()->delete($this->getID())->commit();\n\n\t\t\t$this->Artifact->addHistory('File Deleted',$this->getID().': '.$this->getName());\n\t\t\treturn true;\n\t\t}\n\t}",
"function Trigger_FileDelete(&$tNG) {\r\r\n $deleteObj = new tNG_FileDelete($tNG);\r\r\n $deleteObj->setFolder(\"../assets/images/magasins/\");\r\r\n $deleteObj->setDbFieldName(\"photo1\");\r\r\n return $deleteObj->Execute();\r\r\n}",
"public function testGetPackingPlanFiles()\n {\n }",
"function Trigger_FileDelete(&$tNG) {\n $deleteObj = new tNG_FileDelete($tNG);\n $deleteObj->setFolder(\"../images/quangcao/\");\n $deleteObj->setDbFieldName(\"taptinquangcao\");\n return $deleteObj->Execute();\n}",
"public function delete($filepath);",
"private function delete_file( $param ) {\n global $wpdb;\n $file_id = $param['file_id'];\n\n // unset other params first\n unset( $param['action'] );\n unset( $param['type'] );\n unset( $param['file_id'] );\n\n // add dtupdate to the parameter\n $param['dtupdate'] = $this->dtcreate();\n $param['deleteflg'] = 1;\n $param['file_id'] = (int)$file_id;\n\n $sql = <<<__SQL\nUPDATE\n hc_file\nSET\n dtupdate = %s,\n deleteflg = %d\nWHERE\n ID = %d\n__SQL;\n\n // prepare the sql\n $prepare = $wpdb->prepare( $sql, $param );\n\n try {\n // start the transaction\n $wpdb->query( 'START TRANSACTION' );\n // queue the query\n $res = $wpdb->query( $prepare );\n // commit the query\n $wpdb->query( 'COMMIT' );\n\n // check if unsuccessful insert\n if ( $res === false ) {\n $wpdb->query( 'ROLLBACK' );\n return false;\n }\n\n return true;\n } catch ( \\Exception $e ) {\n return false;\n }\n }",
"function deleteFile($db, $strDetailID = \"\")\n{\n global $words;\n $bolNewData = true;\n if ($strDetailID != \"\") {\n $strSQL = \"SELECT * FROM hrd_training_request \";\n $strSQL .= \"WHERE id = '$strDetailID' \";\n $resDb = $db->execute($strSQL);\n if ($rowDb = $db->fetchrow($resDb)) {\n $strFile = $rowDb['doc'];\n if ($strFile != \"\") {\n if (file_exists(\"trainingdoc/\" . $strFile)) {\n unlink(\"trainingdoc/\" . $strFile);\n }\n $strSQL = \"UPDATE hrd_training_request SET doc = '' WHERE id = '$strDetailID' \";\n $resExec = $db->execute($strSQL);\n //writeLog(ACTIVITY_DELETE, MODULE_PAYROLL,\"file $strDetailID\",0);\n }\n }\n }\n return true;\n}",
"public function file_delete($filename);",
"function filecabinet_delete_file($file_id, $min = 0) {\n // The passed $min parameter is the smallest count value that allows file deletion\n // if the file is not used, delete it (it may still be used in old revisions)\n $count = db_result(db_query(\"SELECT COUNT(afid) FROM {org_documents} WHERE afid = %d\", $file_id));\n if ($count <= $min) {\n $filepath = db_result(db_query(\"SELECT filepath FROM {files} WHERE fid = %d\", $file_id));\n if ($filepath) {\n file_delete($filepath);\n }\n }\n}",
"abstract public function deleteFile(FileData $fileData);"
]
| [
"0.737229",
"0.7365223",
"0.72413445",
"0.71475613",
"0.7139573",
"0.7068676",
"0.6961639",
"0.6852623",
"0.6636421",
"0.64679205",
"0.63812435",
"0.6374441",
"0.6262466",
"0.6213497",
"0.6207218",
"0.61939514",
"0.6192248",
"0.61883134",
"0.61622506",
"0.61516905",
"0.60975873",
"0.6074966",
"0.6064233",
"0.60360914",
"0.60232913",
"0.5998549",
"0.5990916",
"0.5989541",
"0.5939363",
"0.5921322"
]
| 0.84973305 | 0 |
Test case for deletePackingPlanTag Delete a tag for a packingPlan.. | public function testDeletePackingPlanTag()
{
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function testDeleteReplenishmentTag()\n {\n }",
"public function testDeletePackingPlan()\n {\n }",
"public function testDeleteExternalShipmentTag()\n {\n }",
"public function test_deleteReplenishmentProcessTag() {\n\n }",
"public function testDeleteOrderTag()\n {\n }",
"public function test_deleteExternalShipmentTag() {\n\n }",
"public function testDeleteVendorComplianceSurveyTag()\n {\n }",
"public function testDeletePackingPlanFile()\n {\n }",
"public function testDeleteLowStockTag()\n {\n }",
"public function test_deleteBillingCodeTypeTag() {\n\n }",
"function TestPlan_remove_tag($plan_id, $tag_name) {\n\t// Create call\n//\t$call = new xmlrpcmsg('TestPlan.remove_tag', array(new xmlrpcval(array(\"plan_id\" => new xmlrpcval($plan_id, \"int\"), \"tag_name\" => new xmlrpcval($tag_name, \"string\")), \"struct\")));\n\t$call = new xmlrpcmsg('TestPlan.remove_tag', array(new xmlrpcval($plan_id, \"int\"), new xmlrpcval($tag_name, \"string\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}",
"public function test_deleteLowStockTag() {\n\n }",
"public function test_deleteTagRequest() {\n\n }",
"public function test_deleteCustomerTag() {\n\n }",
"public function test_deleteOrderLineActivityTag() {\n\n }",
"public function testDeleteBucketTagging()\n\t{\n\t\t$expectedResult = $this->commonDeleteTestOperations(\"?tagging\");\n\t\t$this->assertThat(\n\t\t\t$this->object->delete->deleteBucketTagging($this->options->get(\"testBucket\")),\n\t\t\t$this->equalTo($expectedResult)\n\t\t);\n\t}",
"public function test_deleteItemCategoryTag() {\n\n }",
"public function test_deleteCartonActivityTag() {\n\n }",
"public function testDeleteItemSubCategoryTag()\n {\n }",
"public function testAddPackingPlanTag()\n {\n }",
"public function testDeleted()\n {\n // Make a tag, then request it's deletion\n $tag = $this->resources->tag();\n $result = $this->writedown->getService('api')->tag()->delete($tag->id);\n\n // Attempt to grab the tag from the database\n $databaseResult = $this->writedown->getService('entityManager')\n ->getRepository('ByRobots\\WriteDown\\Database\\Entities\\Tag')\n ->findOneBy(['id' => $tag->id]);\n\n $this->assertTrue($result['success']);\n $this->assertNull($databaseResult);\n }",
"public function delete_tag($tag);",
"public function test_deleteLegacyLowstockContactTag() {\n\n }",
"public function test_detachTagRequest() {\n\n }",
"public function testDeleteTagAdmin(): void\n {\n // given\n $expectedStatusCode = 200;\n $adminUser = $this->createUser([User::ROLE_USER, User::ROLE_ADMIN]);\n $this->logIn($adminUser);\n\n $expectedTag = new Tag();\n $expectedTag->setName('Test Tag To Delete');\n $tagRepository = self::$container->get(TagRepository::class);\n $tagRepository->save($expectedTag);\n\n // when\n $crawler = $this->httpClient->request('GET', '/tag/'.$expectedTag->getId().'/delete');\n $resultStatusCode = $this->httpClient->getResponse()->getStatusCode();\n $form = $crawler->selectButton('usuń')->form();\n $this->httpClient->submit($form);\n $this->httpClient->followRedirect();\n\n // then\n $this->assertEquals($expectedStatusCode, $resultStatusCode);\n $this->assertStringContainsString('Usuwanie powiodło się', $this->httpClient->getResponse()->getContent());\n }",
"public function testGetPackingPlanTags()\n {\n }",
"function TestCase_remove_tag($case_id, $tag_name) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestCase.remove_tag', array(new xmlrpcval($case_id, \"int\"), new xmlrpcval($tag_name, \"string\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}",
"public function testDeleteProductUsingDELETE()\n {\n }",
"public function testCompanyManagementBackupsIdDelete()\n {\n\n }",
"public function testDeleteInvalidTag() {\n\t\t// Create a tag and then try to delete it without inserting it into mySQL\n\t\t$tag = new Tag(null, $this->VALID_TAG_LABEL);\n\t\t$tag->delete($this->getPDO());\n\t}"
]
| [
"0.75049424",
"0.74548256",
"0.73071057",
"0.72864676",
"0.72135395",
"0.71300733",
"0.71039486",
"0.69620395",
"0.67902803",
"0.6778699",
"0.6758027",
"0.6744535",
"0.665486",
"0.65008515",
"0.64844185",
"0.64660484",
"0.64602417",
"0.6387559",
"0.6356673",
"0.63381916",
"0.63351935",
"0.63177603",
"0.6303695",
"0.6296019",
"0.62928367",
"0.6116152",
"0.6098171",
"0.6037905",
"0.6037369",
"0.5991421"
]
| 0.8673388 | 0 |
Test case for getDuplicatePackingPlanById Get a duplicated a packingPlan by id. | public function testGetDuplicatePackingPlanById()
{
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getPlanById()\n {\n // Arrange\n // Act\n if (! isset($this->plans)) {\n $this->getsAListOfPlans();\n }\n $plans = $this->plans;\n $plan = $plans['data'][0];\n\n $plan = Ezypay::getPlan($plan['id']);\n\n // Assert\n $this->assertNotNull($plan);\n $this->assertEquals($plan['id'], $plan['id']);\n }",
"public function testGetPackingPlanById()\n {\n }",
"abstract public function isDuplicatePIMAddition($id);",
"public function testGetDuplicateExternalShipmentById()\n {\n }",
"protected function callPlanDuplicateRequest($id, $accountid)\n {\n // verify the required parameter 'id' is set\n if ($id === null || (is_array($id) && count($id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $id when calling callPlanDuplicate'\n );\n }\n // verify the required parameter 'accountid' is set\n if ($accountid === null || (is_array($accountid) && count($accountid) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $accountid when calling callPlanDuplicate'\n );\n }\n\n $resourcePath = '/{accountid}/callplan/duplicate/{id}';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($id !== null) {\n $resourcePath = str_replace(\n '{' . 'id' . '}',\n ObjectSerializer::toPathValue($id),\n $resourcePath\n );\n }\n // path params\n if ($accountid !== null) {\n $resourcePath = str_replace(\n '{' . 'accountid' . '}',\n ObjectSerializer::toPathValue($accountid),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json', 'text/json', 'application/xml', 'text/xml']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json', 'text/json', 'application/xml', 'text/xml'],\n []\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n \n if($headers['Content-Type'] === 'application/json') {\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass) {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n // array has no __toString(), so we should encode it manually\n if(is_array($httpBody)) {\n $httpBody = \\GuzzleHttp\\json_encode(ObjectSerializer::sanitizeForSerialization($httpBody));\n }\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public function testGetDuplicateReplenishmentById()\n {\n }",
"public function test_getDuplicateExternalShipmentById() {\n\n }",
"public function duplicate( $id ) {\r\r\n global $wpdb;\r\r\n\r\r\n $this->refresh = true;\r\r\n\r\r\n return $wpdb->query(\r\r\n $wpdb->prepare(\"\r\r\n INSERT INTO \" . wd_asp()->db->table('main') . \"( name, data )\r\r\n SELECT CONCAT(name, ' duplicate'), data FROM \" . wd_asp()->db->table('main') . \"\r\r\n WHERE id=%d;\"\r\r\n , $id)\r\r\n );\r\r\n }",
"public function test_getDuplicateReplenishmentProcessById() {\n\n }",
"public function testDuplicate()\n {\n $this->duplicate(\n [\n 'tabId' => 1,\n ],\n [\n 'tabId' => 1,\n ]\n );\n }",
"public function getPlanById(int $id){\n $this->open();\n\n $result = $this->query('SELECT * FROM '.$this->TABLE_NAME.' WHERE id=:id', array(\n new QueryParam(':id', $id, PDO::PARAM_INT)\n ));\n\n // Close connection\n $this->close();\n\n // Check if is found\n if($result->rowCount() > 0){\n\n // Check result\n while($row = $result->fetch(PDO::FETCH_OBJ)){\n $foundPlan = new Plan(\n $row->id,\n $row->name,\n $row->price,\n $row->detail,\n $row->docsUrl\n );\n\n return $foundPlan;\n }\n\n }\n else{\n // It isn't found so return false\n return false;\n }\n\n }",
"public function planFind($id);",
"public function getPlanById($id)\n {\n try {\n return $this->plan->find($id);\n } catch (\\Exception $e) {\n self::logErr($e->getMessage());\n return false;\n }\n }",
"public function dataProcessingsDuplicateRequest($id, $workspace_id, $tenant_id)\n {\n // verify the required parameter 'id' is set\n if ($id === null || (is_array($id) && count($id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $id when calling dataProcessingsDuplicate'\n );\n }\n // verify the required parameter 'workspace_id' is set\n if ($workspace_id === null || (is_array($workspace_id) && count($workspace_id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $workspace_id when calling dataProcessingsDuplicate'\n );\n }\n // verify the required parameter 'tenant_id' is set\n if ($tenant_id === null || (is_array($tenant_id) && count($tenant_id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $tenant_id when calling dataProcessingsDuplicate'\n );\n }\n\n $resourcePath = '/v1/tenant/{tenantId}/ws/{workspaceId}/DataProcessings/{id}/duplicate';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // path params\n if ($id !== null) {\n $resourcePath = str_replace(\n '{' . 'id' . '}',\n ObjectSerializer::toPathValue($id),\n $resourcePath\n );\n }\n // path params\n if ($workspace_id !== null) {\n $resourcePath = str_replace(\n '{' . 'workspaceId' . '}',\n ObjectSerializer::toPathValue($workspace_id),\n $resourcePath\n );\n }\n // path params\n if ($tenant_id !== null) {\n $resourcePath = str_replace(\n '{' . 'tenantId' . '}',\n ObjectSerializer::toPathValue($tenant_id),\n $resourcePath\n );\n }\n\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n []\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n [],\n []\n );\n }\n\n // for model (json/xml)\n if (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];\n foreach ($formParamValueItems as $formParamValueItem) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValueItem\n ];\n }\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires HTTP basic authentication\n if (!empty($this->config->getUsername()) || !(empty($this->config->getPassword()))) {\n $headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . \":\" . $this->config->getPassword());\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"private function get_product_to_duplicate( $id ) {\r\n $id = absint( $id );\r\n if ( ! $id ){\r\n return false;\r\n }\r\n\r\n global $wpdb;\r\n\r\n $post = $wpdb->get_results( \"SELECT * FROM $wpdb->posts WHERE ID=$id\" );\r\n\r\n if ( isset( $post->post_type ) && $post->post_type == \"revision\" ) {\r\n $id = $post->post_parent;\r\n $post = $wpdb->get_results( \"SELECT * FROM $wpdb->posts WHERE ID=$id\" );\r\n }\r\n return $post[0];\r\n }",
"public function testDuplicateSurvey()\n {\n $year = 2018;\n $currentYear = current_year();\n $origSurvey = Survey::factory()->create(['year' => $year, 'title' => \"$year Survey Title\"]);\n $origGroup = SurveyGroup::factory()->create(['survey_id' => $origSurvey->id]);\n $origQuestion = SurveyQuestion::factory()->create(['survey_id' => $origSurvey->id, 'survey_group_id' => $origGroup->id]);\n\n $response = $this->json('POST', \"survey/{$origSurvey->id}/duplicate\");\n $response->assertStatus(200);\n $newId = $response->json('survey_id');\n\n $this->assertDatabaseHas('survey', ['id' => $newId, 'title' => \"$currentYear Survey Title\"]);\n $this->assertDatabaseHas('survey_group', ['survey_id' => $newId, 'title' => $origGroup->title]);\n $this->assertDatabaseHas('survey_question', ['survey_id' => $newId, 'description' => $origQuestion->description]);\n }",
"public function testDuplicate()\n {\n $this->duplicate(\n [\n 'catalogId' => 1,\n 'catalogInstanceId' => 1,\n 'count' => 1,\n 'status' => 0,\n ],\n [\n 'count' => ['minValue']\n ]\n );\n }",
"public function duplicar($id) \n {\n $qry_terminos = $this->M_politicas->obtener_terminos($id);\n if($qry_terminos->num_rows() > 0)\n {\n $terminos = $qry_terminos->row();\n $this->data['acc'] = DUPLICAR;\n $this->data['politicas'] = $terminos; \n $this->_vista('comun');\n }\n else\n {\n echo false;\n }\n }",
"public function packingFind($id);",
"public function createDuplicate();",
"public function testGetDuplicateLowStockById()\n {\n }",
"public function testDeletePackingPlan()\n {\n }",
"public function testGetDuplicateVendorComplianceSurveyById()\n {\n }",
"function TestPlan_get($plan_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestPlan.get', array(new xmlrpcval($plan_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}",
"public function testGetDuplicateOrderById()\n {\n }",
"function copy_article($newlyPlanId,$plan_id){\n \n {//Plan_Article Block\n \n $queryPlanArticle = \"SELECT * FROM plan_article WHERE status = 1 AND plan_id = '{$plan_id}' \" ;\n $resultPlanArticle = $this->execute_query($queryPlanArticle);\n \n if($this->num_rows($resultPlanArticle)!= 0)\n {\n while($row = $this->fetch_array($resultPlanArticle))\n { \n \n $insertArr = array(\n 'plan_id'=> $newlyPlanId,\n 'article_id' => $row['article_id'], \n 'creation_date' => date('Y-m-d H:i:s',time()), \n 'status'=> $row['status'] \n );\n \n $result = $this->insert('plan_article',$insertArr);\n \n }\n }\n }\n }",
"public function duplicateInvoice($id) {\n\t\ttry{\n\t\t\t$invoiceTbl = $this->_serviceManager->get('Invoice\\Model\\InvoiceTable');\n\t\n\t\t\t$invoiceItems = $invoiceTbl->fetchInvoiceItemsById($id);\n\t\t\t\n\t\t\t$invoiceData = $invoiceTbl->getInvoiceDetailsById($id);\n\t\t\t\n\t\t\t$xml = $this->generateDuplicateXml($invoiceData, $invoiceItems);\n\t\t\t\n\t\t\t$response = $this->_XeroOAuth->request('POST', $this->_XeroOAuth->url('Invoices', 'core'), array(), $xml);\n\t\t\t\n\t\t\tif ($this->_XeroOAuth->response['code'] == 200) {\n\t\t\t\t$invoice = $this->_XeroOAuth->parseResponse($this->_XeroOAuth->response['response'], $this->_XeroOAuth->response['format']);\n\t\t\t\t\n\t\t\t\tif (count($invoice->Invoices[0]) > 0) {\n\t\t\t\t\t$data = (array) $invoiceTbl->getInvoiceById($id);\n\t\t\t\t\tunset($data['id']);\n\t\t\t\t\t$data['invoice_id'] = $invoice->Invoices[0]->Invoice->InvoiceID;\n\t\t\t\t\t$data['invoice_number'] = $invoice->Invoices[0]->Invoice->InvoiceNumber;\n\t\t\t\t\t\n\t\t\t\t\t$invoice_id = $this->saveDuplicateData($data, $invoiceItems);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false; \n\t\t}catch(\\Exception $e){\n\t\t\t\\De\\Log::logApplicationInfo ( \"Caught Exception: \" . urldecode($response['response']) . ' -- File: ' . __FILE__ . ' Line: ' . __LINE__ );\n\t\t}\n }",
"public function testAddPackingPlan()\n {\n }",
"function copy_plan($userId,$planId,$new_name=\"\"){\n if( is_numeric($userId) && is_numeric($planId) ){\n \n if($new_name == \"\" ){\n // Retrive plan from plan table.\n $query = \"select * from plan where plan_id = '{$planId}' \";\n $result = @mysql_query($query);\n $row = @mysql_fetch_array($result);\n $new_name = $row['plan_name'];\n }\n \n // Create array for inserting record.\n $insertArr = array(\n 'plan_name'=> $new_name,\n 'parent_template_id' => NULL,\n 'user_id' => $userId,\n 'patient_id' => NULL,\n 'user_type' => 2,\n 'is_public' => NULL,\n 'creation_date' => $row['creation_date'], \n 'status' => 1\n );\n \n // Insert record.\n $result = $this->insert('plan',$insertArr);\n \n //Get new plan id\n $newlyPlanId = $this->insert_id();\n \n // Copy treatments associated with planId.\n if(is_numeric($newlyPlanId)){\n // copy treatments in the plan.\n $this->copy_plan_treatment($newlyPlanId,$planId);\n // copy articles in the plan.\n $this->copy_article($newlyPlanId,$planId);\n }\n } \n \n }",
"public function find($id)\n {\n foreach ($this->plans as $plan) {\n if ($plan->id === $id) {\n return $plan;\n }\n }\n\n throw new Exception(\"Unable to find plan with ID [{$id}].\");\n }"
]
| [
"0.6362934",
"0.6326791",
"0.5976135",
"0.5921401",
"0.58511144",
"0.58135414",
"0.58023816",
"0.5753263",
"0.56158876",
"0.55545306",
"0.55315685",
"0.54724145",
"0.5409555",
"0.5407465",
"0.5402911",
"0.5362996",
"0.5341648",
"0.52647996",
"0.5260013",
"0.5235977",
"0.5228203",
"0.51953",
"0.51816744",
"0.515188",
"0.51378024",
"0.51264775",
"0.51181394",
"0.50837165",
"0.50355625",
"0.50050676"
]
| 0.7463125 | 0 |
Test case for getPackingPlanByFilter Search packingPlans by filter. | public function testGetPackingPlanByFilter()
{
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function testGetPackingPlanById()\n {\n }",
"public function getsAListOfPlans()\n {\n // Arrange\n // Act\n $plans = Ezypay::getPlans();\n\n // Assert\n //$this->assertEquals(3, sizeof($plans->data)); // Causing issues as there are aditional plans\n $this->assertNotNull($plans);\n\n $this->plans = $plans;\n }",
"public function getPlan();",
"public function testGetExternalShipmentByFilter()\n {\n }",
"public function testAddPackingPlan()\n {\n }",
"public static function get_payment_plan_search_field() {\n\n check_ajax_referer( 'sumo-pp-get-payment-plan-search-field' , 'security' ) ;\n\n wp_send_json( array (\n 'search_field' => _sumo_pp_wc_search_field( array (\n 'class' => 'wc-product-search' ,\n 'action' => '_sumo_pp_json_search_sumo_payment_plans' ,\n 'id' => isset( $_POST[ 'loop' ] ) ? \"selected_{$_POST[ 'col' ]}_payment_plan_{$_POST[ 'rowID' ]}{$_POST[ 'loop' ]}\" : \"selected_{$_POST[ 'col' ]}_payment_plan_{$_POST[ 'rowID' ]}\" ,\n 'name' => isset( $_POST[ 'loop' ] ) ? \"_sumo_pp_selected_plans[{$_POST[ 'loop' ]}][{$_POST[ 'col' ]}][{$_POST[ 'rowID' ]}]\" : \"_sumo_pp_selected_plans[{$_POST[ 'col' ]}][{$_POST[ 'rowID' ]}]\" ,\n 'type' => 'payment_plans' ,\n 'selected' => false ,\n 'multiple' => false ,\n 'placeholder' => __( 'Search for a payment plan…' , _sumo_pp()->text_domain ) ,\n ) , false ) ,\n ) ) ;\n }",
"public function buscar_plans() {\n $pla = $_POST['p'];\n $places = $_POST['pl'];\n $preu_min = $_POST['pmi'];\n $preu_max = $_POST['pma'];\n \n $sql = \"SELECT DISTINCT plans.descrip AS descripcio, serveis.id AS servei_id,\n reserves.idusuari AS reservesidusuari, serveis.preu AS serveipreu, \n serveis_reservats.idreserva AS idreserva, reserves.status AS status \n FROM plans \n LEFT JOIN serveis ON plans.id = serveis.id\n LEFT JOIN serveis_reservats ON serveis.id = serveis_reservats.idservei\n LEFT JOIN reserves ON serveis_reservats.idreserva = reserves.id\n \n WHERE plans.descrip = '\".utf8_decode($pla).\"' AND serveis.nplaces >= \".$places.\" AND serveis.preu >= \".$preu_min.\" \n AND serveis.preu <= \".$preu_max.\";\";\n \n $query=$this->db->prepare($sql);\n $query->execute();\n $res=$query->fetchAll();\n \n return $res;\n }",
"public function planes_listar(){\n\t\t$params = array();\n\t\ttry {\n\t\t\t$flow = $this->send('plans/list', $params, 'GET');\t \t\t\t\n\t\t\treturn $flow;\n\t\t} catch (Exception $e) { return $e->getCode().\" - \".$e->getMessage(); }\n\t}",
"function AvailablePlans()\n\t{\n\t\t// Check user authorization and permissions\n\t\tAuthenticatedUser()->CheckAuth();\n\t\tAuthenticatedUser()->PermissionOrDie(PERMISSION_OPERATOR_VIEW);\n\n\t\t// Context menu\n\t\t// (Nothing to add)\n\n\t\t// DEBUG\n\t\tif (DBO()->RatePlan->Status->Value == RATE_STATUS_DRAFT) {\n\t\t\t//throw new Exception(\"Filtered to Drafts\");\n\t\t}\n\n\t\t// Breadcrumb menu\n\t\tBreadcrumb()->Employee_Console();\n\t\tBreadCrumb()->SetCurrentPage(\"Available Plans\");\n\n\t\tif (!(DBO()->RatePlan->GetLast->IsSet && DBO()->RatePlan->GetLast->Value))\n\t\t{\n\t\t\t// Don't base the plan retrieval on the constraints stored in the session\n\t\t\tunset($_SESSION['AvailablePlansPage']['Filter']);\n\t\t}\n\n\t\t// Update the Session details with the current filter, if one has been specified\n\t\tif (DBO()->RatePlan->ServiceType->IsSet)\n\t\t{\n\t\t\t// A valid ServiceType filter has been specified\n\t\t\ttry {\n\t\t\t\t// A specific ServiceType has been requested\n\t\t\t\t$_SESSION['AvailablePlansPage']['Filter']['ServiceType'] = Service_Type::getForId(DBO()->RatePlan->ServiceType->Value)->id;\n\t\t\t} catch (Exception_ORM_LoadById $oException) {\n\t\t\t\t// Show all services types\n\t\t\t\t$_SESSION['AvailablePlansPage']['Filter']['ServiceType'] = 0;\n\t\t\t}\n\t\t}\n\t\telseif (!isset($_SESSION['AvailablePlansPage']['Filter']['ServiceType']))\n\t\t{\n\t\t\t// A ServiceType filter hasn't been specified, and one isn't currently cached, set it to view all ServiceTypes\n\t\t\t$_SESSION['AvailablePlansPage']['Filter']['ServiceType'] = 0;\n\t\t}\n\n\t\tif (DBO()->RatePlan->CustomerGroup->IsSet)\n\t\t{\n\t\t\tif (array_key_exists(DBO()->RatePlan->CustomerGroup->Value, Customer_Group::getAll()))\n\t\t\t{\n\t\t\t\t// A specific CustomerGroup filter has been specified\n\t\t\t\t$_SESSION['AvailablePlansPage']['Filter']['CustomerGroup'] = DBO()->RatePlan->CustomerGroup->Value;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// Show all CustomerGroups\n\t\t\t\t$_SESSION['AvailablePlansPage']['Filter']['CustomerGroup'] = 0;\n\t\t\t}\n\t\t}\n\t\telseif (!isset($_SESSION['AvailablePlansPage']['Filter']['ServiceType']))\n\t\t{\n\t\t\t// A CustomerGroup filter hasn't been specified, and one isn't currently cached, set it to view all CustomerGroups\n\t\t\t$_SESSION['AvailablePlansPage']['Filter']['CustomerGroup'] = 0;\n\t\t}\n\n\t\tif (DBO()->RatePlan->Status->IsSet)\n\t\t{\n\t\t\t// A valid ServiceType filter has been specified\n\t\t\tif (array_key_exists(DBO()->RatePlan->Status->Value, $GLOBALS['*arrConstant']['RateStatus']))\n\t\t\t{\n\t\t\t\t// A specific RateStatus has been requested\n\t\t\t\t$_SESSION['AvailablePlansPage']['Filter']['Status'] = DBO()->RatePlan->Status->Value;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// Show all RatePlans\n\t\t\t\t$_SESSION['AvailablePlansPage']['Filter']['Status'] = -1;\n\t\t\t}\n\n\t\t}\n\t\telseif (!isset($_SESSION['AvailablePlansPage']['Filter']['Status']))\n\t\t{\n\t\t\t// A Status filter hasn't been specified, and one isn't currently cached, set it to view all Active RatePlans\n\t\t\t$_SESSION['AvailablePlansPage']['Filter']['Status'] = 0;\n\t\t}\n\n\t\t// Retrieve all RatePlans that satisfy the filter conditions\n\t\t$strServiceTypeFilter\t= \"TRUE\";\n\t\t$strCustomerGroupFilter\t= \"TRUE\";\n\t\t$strStatusFilter\t\t= \"TRUE\";\n\t\tif ($_SESSION['AvailablePlansPage']['Filter']['ServiceType'])\n\t\t{\n\t\t\t$strServiceTypeFilter = \"RP.ServiceType = <ServiceType>\";\n\t\t}\n\t\tif ($_SESSION['AvailablePlansPage']['Filter']['CustomerGroup'])\n\t\t{\n\t\t\t$strCustomerGroupFilter = \"RP.customer_group = <CustomerGroup>\";\n\t\t}\n\t\tif (array_key_exists($_SESSION['AvailablePlansPage']['Filter']['Status'], $GLOBALS['*arrConstant']['RateStatus']))\n\t\t{\n\t\t\t$strStatusFilter = \"RP.Archived = <Status>\";\n\t\t}\n\n\t\t$strWhere = \"$strServiceTypeFilter AND $strCustomerGroupFilter AND $strStatusFilter\";\n\t\t$arrWhere = array(\n\t\t\t\t\t\t\t\"ServiceType\"\t=> $_SESSION['AvailablePlansPage']['Filter']['ServiceType'],\n\t\t\t\t\t\t\t\"CustomerGroup\"\t=> $_SESSION['AvailablePlansPage']['Filter']['CustomerGroup'],\n\t\t\t\t\t\t\t\"Status\"\t\t=> $_SESSION['AvailablePlansPage']['Filter']['Status']\n\t\t\t\t\t\t);\n\n\t\t/*$arrColumns = array(\n\t\t\t\t\t\t\t\"Id\"\t\t\t\t\t=> \"RP.Id\",\n\t\t\t\t\t\t\t\"ServiceType\"\t\t\t=> \"RP.ServiceType\",\n\t\t\t\t\t\t\t\"Name\"\t\t\t\t\t=> \"RP.Name\",\n\t\t\t\t\t\t\t\"Description\"\t\t\t=> \"RP.Description\",\n\t\t\t\t\t\t\t\"CarrierFullService\"\t=> \"RP.CarrierFullService\",\n\t\t\t\t\t\t\t\"CarrierPreselection\"\t=> \"RP.CarrierPreselection\",\n\t\t\t\t\t\t\t\"customer_group\"\t\t=> \"RP.customer_group\",\n\t\t\t\t\t\t\t\"Archived\"\t\t\t\t=> \"RP.Archived\",\n\t\t\t\t\t\t\t\"IsDefault\"\t\t\t\t=> \"CASE WHEN drp.Id IS NOT NULL THEN TRUE ELSE FALSE END\",\n\t\t\t\t\t\t\t\"DealerCount\"\t\t\t=> \"COALESCE(DRP.DealerCount, 0)\"\n\t\t\t\t\t\t\t);*/\n\t\t$strColumns\t\t= \"RP.*, CASE WHEN drp.Id IS NOT NULL THEN TRUE ELSE FALSE END AS IsDefault, COALESCE(DRP.DealerCount, 0) AS DealerCount\";\n\t\t$strTables\t\t= \"RatePlan AS RP LEFT JOIN default_rate_plan AS drp ON RP.Id = drp.rate_plan AND RP.customer_group = drp.customer_group AND RP.ServiceType = drp.service_type LEFT OUTER JOIN (SELECT rate_plan_id AS RatePlanId, COUNT(id) AS DealerCount FROM dealer_rate_plan GROUP BY rate_plan_id) AS DRP ON RP.Id = DRP.RatePlanId\";\n\t\t$strOrderBy\t\t= \"ServiceType, Name, customer_group\";\n\t\t$selRatePlans\t= new StatementSelect($strTables, $strColumns, $strWhere, $strOrderBy);\n\t\tif ($selRatePlans->Execute($arrWhere) === FALSE)\n\t\t{\n\t\t\tDBO()->Error->Message = \"Unexpected database error occurred when trying to retrieve RatePlans. Please notify your system administrator\";\n\t\t\t$this->LoadPage('error');\n\t\t\treturn FALSE;\n\t\t}\n\n\t\tDBO()->RatePlans->AsArray = $selRatePlans->FetchAll();\n\n\n\t\t$this->LoadPage('plans_list');\n\n\t\treturn TRUE;\n\t}",
"public static function json_search_sumo_payment_plans() {\n ob_start() ;\n\n $term = ( string ) wc_clean( stripslashes( isset( $_GET[ 'term' ] ) ? $_GET[ 'term' ] : '' ) ) ;\n $exclude = array () ;\n\n if ( isset( $_GET[ 'exclude' ] ) && ! empty( $_GET[ 'exclude' ] ) ) {\n $exclude = array_map( 'intval' , explode( ',' , $_GET[ 'exclude' ] ) ) ;\n }\n\n $args = array (\n 'type' => 'sumo_payment_plans' ,\n 'status' => 'publish' ,\n 'return' => 'posts' ,\n 'order' => 'ASC' ,\n 'orderby' => 'parent title' ,\n 's' => $term ,\n 'exclude' => $exclude ,\n ) ;\n\n $posts = _sumo_pp()->query->get( $args ) ;\n $found_plans = array () ;\n\n if ( ! empty( $posts ) ) {\n foreach ( $posts as $post ) {\n $found_plans[ $post->ID ] = $post->post_title ;\n }\n }\n wp_send_json( $found_plans ) ;\n }",
"public function run()\n {\n $plans =\n array(\n array(\n \"product_id\"=>1,\n \"title\" => \"Basic\",\n \"pricing\" => 6850,\n \"period\" => \"monthly\",\n \"functionality\" => \"Maximum of 5 User accounts;\n 1 Free system admin account;\n 500 SMS notifications in a month;\n A maximum of 500,000 customer records;\n All reports;\",\n \"note\"=>null\n ),\n array(\n \"product_id\"=>1,\n \"title\" => \"Standard\",\n \"pricing\" => 11800,\n \"period\" => \"monthly\",\n \"functionality\" => \"Maximum of 15 User accounts;\n 1 Free system admin account;\n 1000 SMS notifications in a month;\n A maximum of 1,500,000 customer records;\n All reports;\",\n \"note\"=>null\n ),\n array(\n \"product_id\"=>1,\n \"title\" => \"Enterprise\",\n \"pricing\" => 21550,\n \"period\" => \"monthly\",\n \"functionality\" => \"Maximum of 100 User accounts;\n 1 Free system admin account;\n 5000 SMS notifications in a month;\n A maximum of 500,000 customer records;\n Organization with multiple receptions\n All reports;\",\n \"note\" => \"Extra functionality will be charged at 2% of the Basic\"\n ),\n\n /******************module 2*****************/\n\n array(\n \"product_id\"=>2,\n \"title\" => \"Basic\",\n \"pricing\" => 18000,\n \"period\" => \"monthly\",\n \"functionality\" => \"Maximum of 5 User accounts;\n 1 Free system admin account;\n A maximum of 500,000 customer records;\n Free end user android mobile application on 5 devices;\n A maximum of 5 E-Security desk;\n All reports;\",\n \"note\"=>null\n ),\n array(\n \"product_id\"=>2,\n \"title\" => \"Standard\",\n \"pricing\" => 25800,\n \"period\" => \"monthly\",\n \"functionality\" => \"Maximum of 15 User accounts;\n 1 Free system admin account;\n A maximum of 1,500,000 customer records;\n Free end user android mobile application on 15 devices;\n A maximum of 15 E-Security desk;\n All reports;\",\n \"note\"=>null\n ),\n array(\n \"product_id\"=>2,\n \"title\" => \"Enterprise\",\n \"pricing\" => 50550,\n \"period\" => \"monthly\",\n \"functionality\" => \"Maximum of 100 User accounts;\n 1 Free system admin account;\n A maximum of 5,000,000 customer records;\n Free end user android mobile application on 100 devices;\n A maximum of 100 E-Security desk;\n All reports;\",\n \"note\" => \"Extra functionality will be charged at 2% of the Basic\"\n )\n );\n\n DB::table('plans')->delete();\n DB::table('plans')->insert($plans);\n\n }",
"public function test_getExternalShipmentByFilter() {\n\n }",
"public function getBillingPlans(User $user, StandardProduct $product);",
"public function testFilter()\n {\n // so here we just verify that the params are passed correctly internally\n $project_repository = $this->getMockBuilder(ProjectRepository::class)\n ->disableOriginalConstructor()\n ->setMethods(['scopeByDate', 'scopeWithTags', 'scopeWithoutTags',\n 'scopeByField', 'search'])->getMock();\n\n // with tags\n $project_repository->expects($this->once())->method('scopeWithTags')\n ->with($this->equalTo('badabing'));\n $project_repository->filter(['withTags' => 'badabing']);\n\n // without tags\n $project_repository->expects($this->once())->method('scopeWithoutTags')\n ->with($this->equalTo('badabeng'));\n $project_repository->filter(['withoutTags' => 'badabeng']);\n\n // with date\n $project_repository->expects($this->once())->method('scopeByDate')\n ->with($this->equalTo('27.01.2018'));\n $project_repository->filter(['date' => '27.01.2018']);\n\n // with search\n $project_repository->expects($this->once())->method('search')\n ->with($this->equalTo('jahade'));\n $project_repository->filter(['search' => 'jahade']);\n\n // default\n $project_repository->expects($this->once())->method('scopeByField')\n ->with(\n $this->equalTo('budget_price'),\n $this->equalTo('65000')\n );\n $project_repository->filter(['budget_price' => '65000']);\n }",
"public function getAdsPlans()\r\n {\r\n /*$content_type = [];\r\n $objectManager = $this->blockObjectManager();\r\n $customerSession = $objectManager->create('Magento\\Customer\\Model\\Session');\r\n $customerid = $customerSession->getCustomerId();\r\n $model = $objectManager->create('Webkul\\MpAdvertisementManager\\Model\\Block')->getCollection();\r\n $data = $model->addFieldToFilter('seller_id', array('eq'=> $customerid));\r\n foreach ($data as $collections) {\r\n $content_type[] = $collections->getContentType();\r\n }\r\n $dataCollection = $this->_adsHelper->getAdsPlans()->addFieldToFilter('content_type', array('in'=> array_unique($content_type)));*/\r\n return $this->_adsHelper->getAdsPlans();\r\n // return $dataCollection;\r\n }",
"public function getPlansBySearch(string $toSearch){\n $this->open();\n\n $result = $this->query('SELECT * FROM '.$this->TABLE_NAME.' WHERE name LIKE :name', array(\n new QueryParam(':name', '%'.$toSearch.'%'),\n ));\n\n // Close connection\n $this->close();\n\n // Check if is found\n if($result->rowCount() > 0){\n\n $plans = array();\n\n // Check result\n while($row = $result->fetch(PDO::FETCH_OBJ)){\n $foundPlan = new Plan(\n $row->id,\n $row->name,\n $row->price,\n $row->detail,\n $row->docsUrl\n );\n\n array_push($plans, $foundPlan);\n }\n\n return $plans;\n\n }\n else{\n // It isn't found so return false\n return array();\n }\n\n }",
"static function getAllPlans(){\n global $configClass;\n if($configClass['integrate_membership'] == 1){\n $db = JFactory::getDbo();\n $nullDate = $db->quote($db->getNullDate());\n $nowDate = $db->quote(JHtml::_('date', 'now', 'Y-m-d H:i:s', false));\n $query = $db->getQuery(true);\n $query->select('tbl.*')->from('#__osmembership_plans as tbl');\n $query->where('tbl.published = 1')\n ->where('tbl.access IN (' . implode(',', JFactory::getUser()->getAuthorisedViewLevels()) . ')')\n ->where('(tbl.publish_up = ' . $nullDate . ' OR tbl.publish_up <= ' . $nowDate . ')')\n ->where('(tbl.publish_down = ' . $nullDate . ' OR tbl.publish_down >= ' . $nowDate . ')');\n $db->setQuery($query);\n $allPlans = $db->loadObjectList();\n return $allPlans;\n }\n }",
"public function getAllPlans()\n {\n try {\n return $this->plan->all();\n } catch (\\Exception $e) {\n self::logErr($e->getMessage());\n return false;\n }\n }",
"public function testGetPackingPlanFiles()\n {\n }",
"public function planFindByField($field,$condition,$value,$orderBy= 'asc');",
"protected function rawFilter($filter) {\n //Log::debug('query: ',$filter);\n\t\t// Build a query based on filter $filter\n\t\t$query = Pallet::query()\n ->select('Pallet.objectID', 'Pallet.Pallet_ID', 'Pallet.x', 'Pallet.y', 'Pallet.z', 'Pallet.Status')\n ->orderBy('Pallet_ID', 'asc');\n if(isset($filter['Pallet_ID']) && strlen($filter['Pallet_ID']) > 2) {\n $query->where('Pallet_ID', 'like', ltrim($filter['Pallet_ID'],'0') . '%');\n\t\t}\n\t\tif(isset($filter['Pallet_ID.prefix']) && is_array($filter['Pallet_ID.prefix'])) {\n $query->whereRaw(\"substring(Pallet_ID,1,3) in ('\".implode(\"','\", $filter['Pallet_ID.prefix']).\"')\");\n\t\t}\n if(isset($filter['Status']) && is_array($filter['Status'])) {\n $query->whereRaw(\"Status in ('\".implode(\"','\", $filter['Status']).\"')\");\n }\n elseif(isset($filter['Status']) && strlen($filter['Status']) > 3) {\n $query->where('Status', '=', $filter['Status']);\n }\n /*\n * container.parent should generate this sql request\n * select Pallet.* from Pallet join container plt on plt.objectID = Pallet.objectID where plt.parentID = 6213292055;\n */\n if(isset($filter['container.parent']) && strlen($filter['container.parent']) > 3) {\n $query\n ->join('container as plt', 'plt.objectID', '=', 'Pallet.objectID')\n ->where('plt.parentID',$filter['container.parent']);\n }\n /*\n * container.child should generate this sql request\n * select Pallet.* from Pallet join container gc on gc.parentID = Pallet.objectID where gc.objectID = 6226111054;\n */\n if(isset($filter['container.child']) && strlen($filter['container.child']) > 3) {\n $query\n ->join('container as gc', 'gc.parentID', '=', 'Pallet.objectID')\n ->where('gc.objectID',$filter['container.child']);\n }\n return $query;\n }",
"public function testFetchAllPlans()\n {\n $plan = new Plan(\"Test Plan\", 3000, \"weekly\");\n $plan->save();\n\n $plans = Plan::fetchAll();\n $this->assertNotNull($plans);\n $this->assertContainsOnlyInstancesOf(Plan::class, $plans);\n }",
"public function getFormatedPlans()\n {\n $currencySymbol = config('app.currency');\n\n $data = [];\n\n foreach ($this->planRepository->all() as $plan) {\n if (! (float) $plan->monthly_amount) {\n continue;\n }\n\n $data['month'][$plan->id] = [\n 'id' => $plan->id,\n 'name' => $plan->name,\n 'label' => trans('saassubscription::app.admin.checkout.plan-option-label', [\n 'plan' => $plan->name,\n 'amount' => core()->formatPrice($plan->monthly_amount, $currencySymbol)\n ]),\n 'amount' => core()->formatPrice($plan->monthly_amount, $currencySymbol),\n 'total' => core()->formatPrice($plan->monthly_amount, $currencySymbol),\n ];\n\n $data['year'][$plan->id] = [\n 'id' => $plan->id,\n 'name' => $plan->name,\n 'label' => trans('saassubscription::app.admin.checkout.plan-option-label', [\n 'plan' => $plan->name,\n 'amount' => core()->formatPrice($plan->yearly_amount, $currencySymbol)\n ]),\n 'amount' => core()->formatPrice($plan->yearly_amount, $currencySymbol),\n 'total' => core()->formatPrice($plan->yearly_amount * 12, $currencySymbol),\n ];\n }\n\n return $data;\n }",
"public function getPlanById()\n {\n // Arrange\n // Act\n if (! isset($this->plans)) {\n $this->getsAListOfPlans();\n }\n $plans = $this->plans;\n $plan = $plans['data'][0];\n\n $plan = Ezypay::getPlan($plan['id']);\n\n // Assert\n $this->assertNotNull($plan);\n $this->assertEquals($plan['id'], $plan['id']);\n }",
"public function test_getReplenishmentProcessByFilter() {\n\n }",
"public function testGetReplenishmentByFilter()\n {\n }",
"public function test_getFilters()\n {\n /**\n * @var $builder TransactionFilterOptionsBuilder\n */\n $builder = app( TransactionFilterOptionsBuilder::class );\n $viewModel = $builder->GetModel();\n $response = $this->get('/api/transactions/filters');\n $response\n ->assertStatus(200)\n ->assertJson([\n 'types' => [\n [\n 'id' => $viewModel->types[0]->id,\n 'label' => $viewModel->types[0]->label,\n 'key' => $viewModel->types[0]->key\n ]\n ],\n 'categories' => [\n [\n 'id' => $viewModel->categories[0]->id,\n 'label' => $viewModel->categories[0]->label,\n 'key' => $viewModel->categories[0]->key\n ]\n ]\n ]);\n }",
"public function testGetLowStockByFilter()\n {\n }",
"public function testUpdatePackingPlan()\n {\n }",
"public function rawFilter($filter) {\n\t\t$query = InventorySummary::orderBy('Client_SKU', 'asc');\n\t\tif(isset($filter['objectID']) && strlen($filter['objectID']) > 3) {\n\t\t\t$query = $query->where('objectID', 'like', $filter['objectID'] . '%');\n\t\t}\n\t\tif(isset($filter['Client_SKU']) && strlen($filter['Client_SKU']) > 3) {\n\t\t\t$query = $query->where('Client_SKU', 'like', $filter['Client_SKU'] . '%');\n\t\t}\n\t\tif(isset($filter['Description']) && strlen($filter['Description']) > 3) {\n\t\t\t$query = $query->where('Description', 'like', $filter['Description'] . '%');\n\t\t}\n\n /*\n * Pick face quantity choices\n */\n if(isset($filter['pickQty_rb'])) {\n if($filter['pickQty_rb'] == 'zero') {\n $query = $query->where('pickQty', '=', '0');\n } elseif($filter['pickQty_rb'] == 'belowMin') {\n $query = $query->where('pickQty', '<', '3');\n } elseif($filter['pickQty_rb'] == 'aboveMin') {\n $query = $query->where('pickQty', '>', '2');\n }\n }\n\n /*\n * Activity location quantity choices\n */\n if(isset($filter['actQty_rb'])) {\n if($filter['actQty_rb'] == 'zero') {\n $query = $query->where('actQty', '=', '0');\n } elseif($filter['actQty_rb'] == 'aboveZero') {\n $query = $query->where('actQty', '>', '0');\n }\n }\n\n /*\n * Reserve quantity choices\n */\n if(isset($filter['resQty_rb'])) {\n if($filter['resQty_rb'] == 'zero') {\n $query = $query->where('resQty', '=', '0');\n } elseif($filter['resQty_rb'] == 'aboveZero') {\n $query = $query->where('resQty', '>', '0');\n }\n }\n\n /*\n * Replen Priority choices\n */\n if(isset($filter['replenPrty_cb_noReplen'])\n or isset($filter['replenPrty_cb_20orBelow'])\n or isset($filter['replenPrty_cb_40orBelow'])\n or isset($filter['replenPrty_cb_60orBelow'])) {\n $query->where(function ($query) use ($filter) {\n if (isset($filter['replenPrty_cb_noReplen']) && $filter['replenPrty_cb_noReplen'] == 'on') {\n $query->orWhereNull('replenPrty')\n ->orWhere('replenPrty', '=', '0');\n }\n if (isset($filter['replenPrty_cb_20orBelow']) && $filter['replenPrty_cb_20orBelow'] == 'on') {\n $query->orWhereBetween('replenPrty', ['1', '20']);\n }\n if (isset($filter['replenPrty_cb_40orBelow']) && $filter['replenPrty_cb_40orBelow'] == 'on') {\n $query->orWhereBetween('replenPrty', ['21', '40']);\n }\n if (isset($filter['replenPrty_cb_60orBelow']) && $filter['replenPrty_cb_60orBelow'] == 'on') {\n $query->orWhereBetween('replenPrty', ['41', '60']);\n }\n });\n }\n //dd(__METHOD__.\"(\".__LINE__.\")\", compact('filter', 'query'));\n\n\t\tif(isset($filter['created_at']) && strlen($filter['created_at']) > 1) {\n\t\t\t$query = $query->where('created_at', 'like', $filter['created_at'] . '%');\n\t\t}\n\t\tif(isset($filter['updated_at']) && strlen($filter['updated_at']) > 1) {\n\t\t\t$query = $query->where('updated_at', 'like', $filter['updated_at'] . '%');\n\t\t}\n return $query;\n }"
]
| [
"0.58953774",
"0.5631039",
"0.549957",
"0.54921854",
"0.54473865",
"0.5440574",
"0.54392135",
"0.54009104",
"0.53968537",
"0.53416896",
"0.5280663",
"0.5257933",
"0.51928085",
"0.5184721",
"0.5144235",
"0.5115523",
"0.5068483",
"0.5067525",
"0.5060737",
"0.5035444",
"0.50144255",
"0.5010142",
"0.50096077",
"0.50074613",
"0.49787915",
"0.49656874",
"0.49620628",
"0.495757",
"0.49320468",
"0.4917799"
]
| 0.7464687 | 0 |
Test case for getPackingPlanFiles Get the files for a packingPlan.. | public function testGetPackingPlanFiles()
{
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getFiles() {}",
"public function getFiles ();",
"public function testAddPackingPlanFile()\n {\n }",
"public function getFiles();",
"public function getFiles();",
"public function getFiles();",
"private function getTestFileList() {\n\t\treturn [\n\t\t\tself::makeFileInfo('a.txt', 4, 2.3 * \\pow(10, 9)),\n\t\t\tself::makeFileInfo('q.txt', 5, 150),\n\t\t\tself::makeFileInfo('subdir2', 87, 128, true),\n\t\t\tself::makeFileInfo('b.txt', 2.2 * \\pow(10, 9), 800),\n\t\t\tself::makeFileInfo('o.txt', 12, 100),\n\t\t\tself::makeFileInfo('subdir', 88, 125, true),\n\t\t];\n\t}",
"public function testAddPackingPlanFileByURL()\n {\n }",
"public function get_files()\n {\n }",
"abstract protected function getFilesDestination();",
"function _generateFilesList() {\n return array();\n }",
"protected static function _getPackageFiles($sName)\r\n\t{\r\n\t\t$aParams = self::$_aParams[$sName];\r\n\r\n\t\t$sType = $aParams['type'];\r\n\t\t$sBaseFolder = (empty($aParams['folder']) ? $sType : $aParams['folder']) . '/';\r\n\r\n\t\t// Files are listed as array, return them\r\n\t\tif (is_array($aParams['files']))\r\n\t\t{\r\n\t\t\t$aRet = array();\r\n\t\t\tforeach ($aParams['files'] as $sFile)\r\n\t\t\t\t$aRet[] = $sBaseFolder . $sFile;\r\n\t\t\treturn $aRet;\r\n\t\t}\r\n\r\n\t\t// User wants all files to be included\r\n\t\tif ($aParams['files'] == '*')\r\n\t\t{\r\n\t\t\t$sFileType = '.' . $sType;\r\n\t\t\t$iFileTypeLen = strlen($sFileType);\r\n\t\t\t$aAllFiles = array();\r\n\t\t\t$aFiles = scandir(ASAP_DIR_WEB . $sBaseFolder);\r\n\t\t\tforeach ($aFiles as $sFile)\r\n\t\t\t\tif ($sFile != '.' && $sFile != '..' && substr($sFile, -$iFileTypeLen) == $sFileType && strpos($sFile, '.asap_pack.') === false)\r\n\t\t\t\t\t$aAllFiles[] = $sFile;\r\n\t\t\treturn $aAllFiles;\r\n\t\t}\r\n\r\n\t\t// Strange config, thus we return nothing\r\n\t\treturn array();\r\n\t}",
"public function files();",
"public function files();",
"public function files();",
"protected function getFilesInDirCreateTestDirectory() {}",
"public function buildFilesForFilterTest()\n {\n // are used as the test method arguments. If we want to use an array\n // as a test data set, we need to return a nested array\n return array(\n array(\n $this->buildFilesSet1()[0],\n array(\n 'internal' => array(\n 'example/image2',\n ),\n 'external' => array(\n 'example/image1',\n ),\n ),\n ),\n array(\n $this->buildFilesSet2()[0],\n array(\n 'internal' => array(\n 'example/image2',\n 'example/image3',\n 'example/image4',\n ),\n 'external' => array(\n 'example/image1',\n 'example/image5',\n ),\n ),\n ),\n );\n }",
"function get_request_files($surveyid, $requestid)\n\t{\t\n\t\t//get all survey licensed files\n\t\t$files=$this->get_survey_licensed_files($surveyid);\t\t\n\t\t\t\n\t\t//get download options already set\n\t\t$options=$this->get_request_download_options($requestid);\t\t\n\t\t$result=NULL;\t\t\n\t\tif ($files)\n\t\t{\n\t\t\tforeach($files as $file)\n\t\t\t{\n\t\t\t\tif ($options)\n\t\t\t\t{\n\t\t\t\t\tforeach($options as $option)\n\t\t\t\t\t{\n\t\t\t\t\t\tif ($file['resource_id']==$option['fileid'])\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$file['download']=$option;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t$result[]=$file;\n\t\t\t}\n\t\t}\n\t\t\t\n\t\treturn $result;\n\t}",
"public function testGetFiles()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }",
"public function getAllFiles()\n {\n }",
"public function getFiles(): array;",
"public function testGetExternalShipmentFiles()\n {\n }",
"public function getFiles()\n {\n return $this->getConfig('stubs.files');\n }",
"public function getFiles() {\r\n\r\n $files = array();\r\n\r\n $userId= $this->userId;\r\n $trackingId = $this->trackingFormId;\r\n $dir = FILEPATH . $userId. '/' . $trackingId;\r\n\r\n if (is_dir($dir)) {\r\n if ($dh = opendir($dir)) {\r\n while (($file = readdir($dh)) !== false) {\r\n if($file != '.' && $file != '..') {\r\n $size = $this->Size($dir . '/' . $file);\r\n array_push($files, array('name'=>$file,\r\n 'urlfilename'=>urlencode($file),\r\n 'size'=>$size));\r\n }\r\n }\r\n closedir($dh);\r\n }\r\n }\r\n\r\n return $files;\r\n }",
"public function gatherFileData()\n {\n $files = get_included_files();\n\n $fileList = array();\n\n $fileTotals = array(\n \"count\" => count($files),\n \"size\" => 0,\n \"largest\" => 0,\n );\n\n foreach($files as $key => $file) {\n $size = filesize($file);\n\n $fileList[] = array(\n 'name' => str_replace(BASEPATH, '/', $file),\n 'size' => $this->getReadableFileSize($size)\n );\n\n $fileTotals['size'] += $size;\n\n if($size > $fileTotals['largest']) $fileTotals['largest'] = $size;\n }\n\n $fileTotals['size'] = $this->getReadableFileSize($fileTotals['size']);\n $fileTotals['largest'] = $this->getReadableFileSize($fileTotals['largest']);\n\n $this->output['files'] = $fileList;\n $this->output['fileTotals'] = $fileTotals;\n }",
"protected function zipFiles()\n {\n $cacheDir = $this->getCacheDir();\n $zipFile = $cacheDir . '/' . date('Ymd-His');\n $zipCommand = 'zip - ' . implode(' ', $this->folders) . ' | split -b ' . $this->filePartSize . ' - ' . $zipFile;\n\n $this->stdout($zipCommand);\n\n //exec( $zipCommand, $out );\n\n $files = FileHelper::findFiles($cacheDir . '/');\n $uploadedFiles = [];\n\n foreach ($files as $file) {\n $this->dumpFiles[] = $uploadedFiles[] = $file;\n }\n\n return $uploadedFiles;\n }",
"public function testGetPackingPlanByFilter()\n {\n }",
"public function testShouldGetFileInfo() {\n\t\t$this->assertEquals(\n\t\t\t$this->_testFilesId[0],\n\t\t\t$this->_Files->run(['ids' => $this->_testFilesId])[0]['id']\n\t\t);\n\t}",
"protected function getAvailableFiles() {\n\t\t$sql = \"SELECT\tfilename\n\t\t\tFROM\twcf\".WCF_N.'_'.$this->tableName.\"\n\t\t\tWHERE\tpackageID = \".$this->installation->getPackageID();\n\t\t$result = WCF::getDB()->sendQuery($sql);\n\t\t\n\t\t$availableFiles = array();\n\t\twhile ($row = WCF::getDB()->fetchArray($result)) {\n\t\t\t$availableFiles[] = $row['filename'];\n\t\t}\n\t\t\n\t\treturn $availableFiles;\n\t}",
"protected function _getSubsetFile() {}"
]
| [
"0.6358665",
"0.6284666",
"0.6281518",
"0.6195965",
"0.6195965",
"0.6195965",
"0.6157322",
"0.60981625",
"0.59759873",
"0.585842",
"0.5834721",
"0.581556",
"0.5802916",
"0.5802916",
"0.5802916",
"0.580035",
"0.57596576",
"0.5733025",
"0.56986207",
"0.5646056",
"0.56386656",
"0.5619917",
"0.56116676",
"0.55926573",
"0.5583072",
"0.5580719",
"0.55553365",
"0.5543435",
"0.55373055",
"0.55364805"
]
| 0.7125844 | 0 |
Test case for getPackingPlanTags Get the tags for a packingPlan.. | public function testGetPackingPlanTags()
{
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function TestPlan_get_tags($plan_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestPlan.get_tags', array(new xmlrpcval($plan_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}",
"public function testAddPackingPlanTag()\n {\n }",
"public function getTags() {}",
"public function getTags();",
"public function getTags();",
"public function getTags();",
"public function getTags();",
"public function getTags();",
"public function testGetExternalShipmentTags()\n {\n }",
"public function getTags(){\n\t\tif (!is_array($this->_known_tags)){\n\t\t\t$desc = $this->getDescription();\n\t\t}\n\t\treturn $this->_known_tags;\n\t}",
"public function test_getReplenishmentProcessTags() {\n\n }",
"function TestCase_get_tags($case_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestCase.get_tags', array(new xmlrpcval($case_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}",
"public function testGetTags() {\n $this->assertEquals([\n 'example',\n 'template',\n 'templateMissing',\n 'inline',\n 'inlineAllowInline',\n 'inlineAllowBlock',\n 'inlineAllowBoth',\n 'block',\n 'blockAllowInline',\n 'blockAllowBlock',\n 'blockAllowBoth',\n 'attributes',\n 'fooBar',\n 'parent',\n 'parentNoPersist',\n 'parentWhitelist',\n 'parentBlacklist',\n 'whiteChild',\n 'blackChild',\n 'depth',\n 'lineBreaksRemove',\n 'lineBreaksPreserve',\n 'lineBreaksConvert',\n 'pattern',\n 'autoClose',\n 'aliasBase',\n 'aliased'\n ], array_keys($this->object->getTags()));\n }",
"function TestRun_get_tags($run_id) {\n\t// Create call\n\t$call = new xmlrpcmsg('TestRun.get_tags', array(new xmlrpcval($run_id, \"int\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}",
"public function tags();",
"function gtags_group_tags() {\n\techo gtags_get_group_tags();\n}",
"public function getTagList();",
"private function get_tags()\n\t{\n\t\t$this->n_tags = true;\n\t\treturn $this->m_tags;\n\t}",
"private function get_tags()\n\t{\n\t\t$this->n_tags = true;\n\t\treturn $this->m_tags;\n\t}",
"public function getTags() {\n\t\t$tags = array();\n\n\t\ttry {\n\t\t\t/** @var Thrive_Dash_Api_KlickTipp $api */\n\t\t\t$api = $this->get_api();\n\t\t\t$tags = $api->getTags();\n\t\t} catch ( Exception $e ) {\n\n\t\t}\n\n\t\treturn $tags;\n\t}",
"public function getTags():array;",
"protected function getTagsInfo() {\n $smapFilter = '';\n if(!empty($this->filterId)) {\n $smapFilter = ' AND ct.smap_id = ' . $this->filterId;\n }\n $result = $this->dbh->select('SELECT COUNT(ctl.' . $this->bindedBlock->getPK() . ') as frq,ctl.tag_id FROM '\n . $this->dbh->getTagsTablename($this->bindedBlock->getTableName())\n . ' ctl INNER JOIN ' . $this->bindedBlock->getTableName() . ' ct '\n . 'WHERE ctl.' . $this->bindedBlock->getPK() . ' = ct.' . $this->bindedBlock->getPK()\n . $smapFilter\n . ' GROUP BY tag_id');\n return $result;\n }",
"public function testDeletePackingPlanTag()\n {\n }",
"public function testTags()\n\t{\n\t\t$this->call('GET', '/api/tags');\n\t}",
"function tags() {\n\n\t\t$preloader = pb_query_preloader::getInstance();\n\t\t$preloadRow = $preloader->getPreloadArticleTag($this->id);\n\n\t\tif ($preloadRow) {\n\t\t\t$rows = $preloadRow;\n\t\t} else {\n\t\t\tglobal $polarbear_db;\n\t\t\t$sql = \"SELECT tagID FROM \" . POLARBEAR_DB_PREFIX . \"_article_tag_relation WHERE articleID = '$this->id'\";\n\t\t\t$rows = $polarbear_db->get_results($sql);\n\t\t}\n\n\t\t$arrTags = array();\n\t\tif ($rows) {\n\t\t\tforeach ($rows as $row) {\n\t\t\t\t$arrTags[] = polarbear_tag::getInstance($row->tagID);\n\t\t\t}\n\t\t}\n\n\t\tpb_pqp_log_speed(\"article tags()\");\n\n\t\treturn $arrTags;\n\t}",
"public static function get_tags() {\n\t\treturn [\n\t\t\t'{pro}',\n\t\t\t'{contra}',\n\t\t\t'{total}',\n\t\t\t'{pro_percent}',\n\t\t\t'{contra_percent}',\n\t\t\t'{permalink}',\n\t\t\t'{author}',\n\t\t];\n\t}",
"public function getTagsValues() {}",
"public function getTagsValues() {}",
"public function getTagsValues() {}",
"public function getTagsValues() {}"
]
| [
"0.71208864",
"0.6392587",
"0.6225167",
"0.6007116",
"0.6007116",
"0.6007116",
"0.6007116",
"0.6007116",
"0.5823012",
"0.579516",
"0.5794438",
"0.5788409",
"0.5757023",
"0.57225233",
"0.5714984",
"0.56988513",
"0.56901634",
"0.56783414",
"0.56783414",
"0.5649785",
"0.5606331",
"0.55636513",
"0.5497691",
"0.5493588",
"0.5473426",
"0.5449927",
"0.5448237",
"0.5448237",
"0.5448237",
"0.5448237"
]
| 0.73883945 | 0 |
Test case for updatePackingPlan Update a packingPlan. | public function testUpdatePackingPlan()
{
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function testUpdatePackingPlanCustomFields()\n {\n }",
"public function updateListingPackageUsage(&$plan_info)\n {\n global $rlDb, $account_info, $reefless, $lang;\n\n $paid_status = false;\n\n // Existing package mode\n if ($plan_info['Type'] == 'package' && $plan_info['Package_ID']) {\n if ($plan_info['Listings_remains'] > 0) {\n $update = array(\n 'fields' => array(\n 'Listings_remains' => $plan_info['Listings_remains'] - 1,\n ),\n 'where' => array(\n 'ID' => $plan_info['Package_ID'],\n ),\n );\n\n $prefix = ucfirst($this->adType);\n if ($plan_info[$prefix . '_listings'] > 0) {\n $update['fields'][$prefix . '_remains'] = $plan_info[$prefix . '_remains'] - 1;\n }\n\n $rlDb->update($update, 'listing_packages');\n }\n\n // Set paid status\n $paid_status = $lang['purchased_packages'];\n }\n // Newly free package mode\n elseif ($plan_info['Type'] == 'package' && !$plan_info['Package_ID'] && $plan_info['Price'] <= 0) {\n $insert = array(\n 'Account_ID' => $account_info['ID'],\n 'Plan_ID' => $plan_info['ID'],\n 'Listings_remains' => $plan_info['Listing_number'] - 1,\n 'Standard_remains' => $plan_info['Standard_listings'],\n 'Featured_remains' => $plan_info['Featured_listings'],\n 'Type' => 'package',\n 'Date' => 'NOW()',\n 'IP' => $reefless->getClientIpAddress(),\n );\n\n if ($plan_info['Featured'] && $plan_info['Advanced_mode'] && $this->adType == 'standard') {\n $insert['Standard_remains']--;\n }\n\n if ($plan_info['Featured'] && $plan_info['Advanced_mode'] && $this->adType == 'featured') {\n $insert['Featured_remains']--;\n }\n\n $rlDb->insert($insert, 'listing_packages');\n\n // Set paid status\n $paid_status = $lang['package_plan'] . '(' . $lang['free'] . ')';\n }\n // Limited listing mode\n elseif ($plan_info['Type'] == 'listing' && $plan_info['Limit'] > 0) {\n $usage_key = $plan_info['Using'] ? 'Using' : 'Limit';\n $plan_usage_insert = array(\n 'Account_ID' => $account_info['ID'],\n 'Plan_ID' => $plan_info['ID'],\n 'Listings_remains' => $plan_info[$usage_key] - 1,\n 'Type' => 'limited',\n 'Date' => 'NOW()',\n 'IP' => $reefless->getClientIpAddress(),\n );\n\n $rlDb->insert($plan_usage_insert, 'listing_packages');\n }\n\n return $paid_status;\n }",
"public function testDeletePackingPlan()\n {\n }",
"function TestPlan_update($plan_id, $author_id, $product_id = NULL, $default_product_version = NULL, $type_id = NULL, $name = NULL, $creation_date = NULL, $isactive = TRUE) {\n\t$varray = array(\"author_id\" => \"int\", \"product_id\" => \"int\", \"default_product_version\" => \"string\", \"type_id\" => \"int\", \"name\" => \"string\", \"creation_date\" => \"string\", \"isactive\" => \"int\");\n\tforeach($varray as $key => $val) {\n\t\tif (isset(${$key})) {\n\t\t\t$carray[$key] = new xmlrpcval(${$key}, $val);\n\t\t}\n\t}\n\t// Create call\n\t$call = new xmlrpcmsg('TestPlan.update', array(new xmlrpcval($plan_id, \"int\"), new xmlrpcval($carray, \"struct\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}",
"public function testAddPackingPlan()\n {\n }",
"public function testGetPackingPlanById()\n {\n }",
"public function update(Request $request, Plan $plan)\n {\n //\n }",
"public function testGetDuplicatePackingPlanById()\n {\n }",
"public function update_plan($planId,$items,$state){ \n try {\n \n $createdPlan = new Plan();\n $createdPlan->setId($planId);\n\n $patch = new Patch();\n $value = new PayPalModel('{\n \"state\":\"'.$state.'\"\n }');\n $this->setArrayToMethods(array_filter($items), $patch);\n $patch->setValue($value); \n \n $patchRequest = new PatchRequest();\n $patchRequest->addPatch($patch);\n $requestArray = clone $createdPlan;\n $createdPlan->update($patchRequest, $this->_api_context);\n $plan = Plan::get($planId, $this->_api_context);\n \n $returnArray['RESULT'] = 'Success';\n $returnArray['PLAN'] = $plan->toArray();\n $returnArray['RAWREQUEST'] =$requestArray;\n $returnArray['RAWRESPONSE']=$plan->toJSON();\n return $returnArray; \n } catch (\\PayPal\\Exception\\PayPalConnectionException $ex) {\n return $this->createErrorResponse($ex);\n }\n }",
"public function update(UpdateStripePlanRequest $request)\n {\n\n Log::debug(\"UPDATE PLAN\");\n\n $stripeService = new StripeService();\n $stripeService->setStripeKey();\n\n $stripeSubscriptionService = new StripeSubscriptionService();\n $result = $stripeSubscriptionService->createPlan($request->amount, $request->name, $request->product, $request->interval);\n\n if ($result['message'] == 'Success'){\n\n session()->flash('success', 'Plan updated successfully.');\n \n return redirect( route ('plans.index') );\n\n } else {\n\n Log::debug($result['message']);\n\n session()->flash('error', $result['message']);\n\n return redirect()->back();\n\n }\n\n }",
"public function update($id, Request $request)\n {\n $customMessages = [\n 'name' => 'The Plan Name field is required.',\n 'description' => 'The description field is required.',\n ];\n $this->validate($request, [\n 'name' => 'required|unique:plans,name,'.$request->id.',id',\n 'description' => 'required',\n ], $customMessages);\n \n $plan = Plan::findOrFail($id);\n $plan->name = $request->get('name');\n $plan->description = $request->get('description');\n if($request->has('status')) $plan->status = $request->get('status');\n $plan->save();\n $mainmodules = MainModule::all();\n try{\n $datetime = date('Y-m-d H:i:s');\n $has_tally_integration = $request->has('tally');\n DB::beginTransaction();\n $plans_has_modules = DB::table('plan_has_modules')->where('plan_id', $plan->id)->first();\n if($plans_has_modules) DB::table('plan_has_modules')->where('plan_id', $plan->id)->delete();\n\n $insertData = array();\n $clientSettingUpdatedArray = array();\n foreach($mainmodules as $module){\n $field = $module->field;\n $enabled = $request->$field ? 1 : 0;\n $clientSettingUpdatedArray[$field] = $enabled;\n $data = array(\n 'plan_id'=>$plan->id,\n 'module_id'=>$module->id,\n 'enabled'=>$enabled\n ); \n array_push($insertData, $data);\n }\n if(!empty($insertData)) DB::table('plan_has_modules')->insert($insertData);\n $companiesIDs = DB::table('company_plan')->where('plan_id',$plan->id)->pluck('company_id');\n \n if(!empty($companiesIDs)){\n $clientSettings = ClientSetting::whereIn('company_id',$companiesIDs)->get();\n \n foreach($clientSettings as $clientSetting){\n $clientSetting->update($clientSettingUpdatedArray);\n $company_id = $clientSetting->company_id;\n // AssignFullAccessPermission::dispatch($company_id, $clientSetting);\n // $limited_access_assign_permission_name = array('PartyVisit-view', 'PartyVisit-create');\n \n // AssignLimitedAccessPermission::dispatch($company_id, $limited_access_assign_permission_name);\n\n $tallyInt = DB::table('tally_schedule')->where('company_id', $company_id)->first();\n $companyname = Company::find($company_id);\n \n $domain = $companyname ? $companyname->domain : NULL;\n if($domain){\n if (!$has_tally_integration && !empty($tallyInt)) {\n $affected = DB::table('tally_schedule')\n ->where('company_id', $company_id)\n ->update(['updated_at' => $datetime, 'deleted_at' => $datetime]);\n } elseif ($has_tally_integration) {\n if($tallyInt) $affected = DB::table('tally_schedule')->where('company_id', $company_id)->update(['updated_at' => $datetime, 'deleted_at' => NULL]);\n else $affected = DB::table('tally_schedule')->insert([\n 'company_id' => $company_id,\n 'company_name' => $domain,\n 'created_at' => $datetime]);\n }\n }\n }\n }\n DB::commit();\n if(isset($clientSettings)){\n foreach($clientSettings as $clientSetting){\n $fbIDs = DB::table('employees')->where(array(array('company_id', $clientSetting->company_id), array('status', 'Active')))->whereNotNull('firebase_token')->pluck('firebase_token');\n $dataPayload = array(\"data_type\" => \"company_setting\", \"company_setting\" => json_encode($clientSetting), \"action\" => \"update\");\n sendPushNotification_($fbIDs, 12, null, $dataPayload); \n }\n }\n return redirect()->route('app.plan')->with('success', 'Information has been Updated');\n }catch(\\Exception $e){\n DB::rollback();\n dd($e->getMessage());\n Log::error($e->getMessage());\n }\n }",
"public function setProposedPlanUpdate($plan) {\n $this->proposedPlanUpdate = $plan;\n }",
"public function updateListing($plan_info)\n {\n $is_free = false;\n\n // Define is listing is free\n if (\n $plan_info['Price'] <= 0\n || ($plan_info['Price'] > 0\n && (\n (\n $this->planType == 'listing'\n && $plan_info['Package_ID']\n && $plan_info['Listings_remains'] > 0\n )\n || (\n $this->planType == 'account'\n && $plan_info['Listings_remains'] > 0\n )\n )\n )\n ) {\n $is_free = true;\n\n // Redirect to the form if done step was initiated not by script\n if (!$this->listingData['Plan_ID']) {\n $this->redirectToStep('category');\n exit;\n }\n }\n // Checking for paid listing payment status\n elseif (strtotime($this->listingData['Pay_date']) === false) {\n if ($this->singleStep) {\n $this->redirectToStep('category');\n } else {\n $this->redirectToStep($this->listingData['Last_step'], $this->extendUrl());\n }\n exit;\n }\n\n // Change listing status\n $update = array(\n 'fields' => array(\n 'Last_step' => '',\n 'Last_type' => '',\n 'Cron' => '0',\n 'Cron_notified' => '0',\n 'Cron_featured' => '0',\n ),\n 'where' => array(\n 'ID' => $this->listingID,\n ),\n );\n\n if ($is_free) {\n // Define featured status\n if (($plan_info['Featured'] || $plan_info['Featured_listing'])\n && (!$plan_info['Advanced_mode']\n || ($plan_info['Advanced_mode'] && $this->adType == 'featured')\n )\n ) {\n $featured = true;\n }\n\n $update['fields']['Status'] = $GLOBALS['config']['listing_auto_approval'] ? 'active' : 'pending';\n $update['fields']['Pay_date'] = 'NOW()';\n $update['fields']['Featured_ID'] = $featured ? $plan_info['ID'] : 0;\n $update['fields']['Featured_date'] = $featured ? 'NOW()' : 'NULL';\n }\n\n $GLOBALS['rlDb']->update($update, 'listings');\n\n /**\n * @since 4.7.2 - Hook moved after code \"rlDb->update()\"\n * @since 4.6.0 - All parameters\n */\n $GLOBALS['rlHook']->load('afterListingDone', $this, $update, $is_free);\n }",
"public function updated(PlanSubscription $planSubscription)\n {\n\n if($planSubscription->status==\"PENDING\"){\n $planSubscription->is_paid = false;\n $planSubscription->save();\n }\n if($planSubscription->status==\"SUSPENDED\"){\n $planSubscription->is_paid = false;\n $planSubscription->save();\n }\n if($planSubscription->status==\"CANCELLED\"){\n $planSubscription->is_paid = false;\n $planSubscription->cancelled_on = Carbon::now();\n $planSubscription->save();\n }\n if($planSubscription->status==\"CANCELLED_BY_RECEIVER\"){\n $planSubscription->is_paid = false;\n $planSubscription->cancelled_on = Carbon::now();\n $planSubscription->save();\n }\n if($planSubscription->status==\"CANCELLED_BY_SENDER\"){\n $planSubscription->is_paid = false;\n $planSubscription->cancelled_on = Carbon::now();\n $planSubscription->save();\n }\n }",
"public function update(Request $request, VendorSubscriptionPlans $vendorSubscriptionPlan)\n {\n $request->validate(\n [\n 'title' => 'required|max:100',\n 'price' => 'numeric|nullable',\n 'duration' => 'required|numeric',\n 'product_limitation' => 'required|numeric',\n 'description' => 'max:200',\n 'status' => 'required',\n\n ],\n [\n 'product_limitation.required' => 'No. of Product is required',\n 'product_limitation.numeric' => 'No. of Product must be a numeric value',\n ]\n );\n\n $vendorSubscriptionPlan->title = $request->title;\n $vendorSubscriptionPlan->price = $request->price ?? 0;\n $vendorSubscriptionPlan->duration = $request->duration;\n $vendorSubscriptionPlan->product_limitation = $request->product_limitation;\n $vendorSubscriptionPlan->description = $request->description;\n $vendorSubscriptionPlan->status = $request->status;\n\n if ($vendorSubscriptionPlan->save()){\n Session::flash('success','Vendor Subscription Plan Added');\n return redirect()->route('vendor-subscription-plan.index');\n }else{\n Session::flash('error','Vendor Subscription Plan Not Added');\n return redirect()->back()->withInput();\n }\n }",
"public function updating(Plan $plan)//troquei o update por updating\n {\n $plan->url = Str::kebab($plan->name);\n }",
"protected function syncPlan(Plan $plan): void\n {\n $this->info(\n PHP_EOL .\n Carbon::now() .\n ' Sync duration values for plan: ' .\n $plan->name\n );\n\n $bar_by_plan = new ProgressBar($this->output, $plan->num_items);\n $plan = Plan::where('id', $plan->id)->first();\n foreach ($plan->days as $day) {\n $playlist_items = PlaylistItems::where(\n 'playlist_id',\n $day->playlist_id\n )->get();\n\n foreach ($playlist_items as $playlist_item) {\n $playlist_item->calculateDuration()->save();\n $playlist_item->calculateVerses()->save();\n $bar_by_plan->advance();\n }\n }\n $bar_by_plan->finish();\n $this->info('');\n }",
"public function testDeletePackingPlanTag()\n {\n }",
"public function testAddPackingPlanAudit()\n {\n }",
"public function testGetPackingPlanFiles()\n {\n }",
"public function testUpdate()\n {\n\n // $payment = $this->payment\n // ->setEvent($this->eventId)\n // ->acceptCash()\n // ->acceptCheck()\n // ->acceptGoogle()\n // ->acceptInvoice()\n // ->acceptPaypal()\n // ->setCashInstructions($instructions)\n // ->setCheckInstructions($instructions)\n // ->setInvoiceInstructions($instructions)\n // ->setGoogleMerchantId($this->googleMerchantId)\n // ->setGoogleMerchantKey($this->googleMerchantKey)\n // ->setPaypalEmail($this->paypalEmail)\n // ->update();\n\n // $this->assertArrayHasKey('process', $payment);\n // $this->assertArrayHasKey('status', $payment['process']);\n // $this->assertTrue($payment['process']['status'] == 'OK');\n }",
"public function testDeletePackingPlanFile()\n {\n }",
"public function testAddPackingPlanFile()\n {\n }",
"public function update_plan() {\n if (empty($this->user->admin)) {\n Router::redirect('/');\n die();\n }\n\n # Set up query\n $q = \"UPDATE plans SET\n\t\t\t description='\".$_POST['description'].\"', time='\".$_POST['time'].\"', public='\".(!empty($_POST['public'])?1:0).\"'\n\t\t\t WHERE plan_id=\".$_POST['plan_id'];\n $plans = DB::instance(DB_NAME)->query($q);\n\t\t\n\t\t#Adding action to System Log\n $data3 = Array (\n\n \"modified_date\" => Time::now(),\n \"FK_id\" => $_POST['plan_id'],\n \"FK_table\" => 'plans',\n \"login\" => false,\n \"modified_by\" => $this->user->user_id\n );\n DB::instance(DB_NAME)->insert('logs',$data3);\n\n //Return result to jTable\n $jTableResult = array();\n $jTableResult['Result'] = \"OK\";\n print json_encode($jTableResult);\n }",
"public function update(Request $request, $id)\n {\n $this->authorize('update', Plan::class);\n\n $this->validate($request, [\n 'name' => 'required',\n 'price' => 'required',\n 'duration' => 'required',\n ]);\n\n $plan = Plan::findOrFail($id);\n // Generate plan slug from plan name\n $slug = str_replace(' ','-', $request->input('name'));\n $gateway_id = str_replace(' ','_', $request->input('name'));\n $team_enable = !empty($request->input('teams_limit')) ? 1 : 0;\n $teams_limit = !empty($request->input('teams_limit')) ? $request->input('teams_limit') : NULL;\n $price = (float) $request->input('price') * 100;\n \n // Delete the plan on stripe \n $stripe_plan = \\Stripe\\Plan::retrieve($plan->gateway_id);\n $stripe_plan->delete();\n\n $interval=explode(',',$request->duration);\n //Add the Stripe Api key to\n // Recrete a new plan on stripe\n \\Stripe\\Plan::create([\n \"amount\" => $price,\n \"interval\" => $interval[1],\n \"interval_count\"=>$interval[0], \n \"product\" => [\n \"name\" => $request->input('name'),\n ],\n \"currency\" => \"usd\",\n \"id\" => $gateway_id,\n \"trial_period_days\" => $request->input('trial'),\n ]);\n\n $plan->name = $request->input('name');\n $plan->gateway_id = $gateway_id;\n $plan->price = $request->input('price');\n $plan->brand = $request->input('brand');\n $plan->contest = $request->input('contest');\n $plan->duration = $request->input('duration');\n $plan->other_info_1 =$request->input('plan_info_1');\n $plan->other_info_2 = $request->input('plan_info_2');\n //$plan->teams_enabled = $team_enable;\n //$plan->teams_limit = $teams_limit;\n $plan->active =1;\n $plan->slug = $slug;\n //$plan->trial_period_days = $request->input('trial');\n $plan->save();\n\n return redirect()->back()->with(\"status\", \"Your plan has been updated.\");\n }",
"public function update(Request $request, Plan $tariff)\n {\n try {\n $tariff->update([\n 'title' => $request->title,\n 'sub_title' => $request->sub_title,\n 'price' => $request->price,\n 'day' => $request->day,\n 'properties' => ($request->properties?serialize($request->properties):null),\n ]);\n\n return redirect()->route('tariffs.index')->with('flash_message', 'بروزرسانی با موفقیت انجام شد');\n }catch (\\Exception $e){\n return redirect()->back()->with('err_message', 'خطایی رخ داده است، لطفا مجددا تلاش نمایید');\n }\n }",
"public function update(PromoPackRequest $request, PromoPack $promoPack)\n\t{\n\t\tDB::beginTransaction();\n\t\ttry {\n\t\t\t$promoPack->fill($request->fillFormFields());\n\t\t\t$promoPack->save();\n\t\t\t$extra = array_map(function($course){\n\t\t\t\treturn ['course_id'=>$course['id'],'qty'=>$course['quantity']];\n\t\t\t}, $request->input('corsi'));\n\t\t\t$course_ids = array_pluck( $extra, 'course_id');\n\t\t\t$qtys = array_pluck( $extra, 'qty');\n\t\t\tforeach ($course_ids as $key=>$val){\n\t\t\t\t$store[$val] = ['qty'=>$qtys[$key]];\n\t\t\t}\n\t\t\t$promoPack->courses()->sync($store);\n DB::commit();\n\t\t\treturn response([\n\t\t\t\t'status' => 'success',\n\t\t\t\t'msg' => trans('messages.success'),\n\t\t\t\t'redirect'=>route('admin.promo.pack')\n\t\t\t]);\n\t\t} catch (\\Exception $exception) {\n\t\t\tDB::rollback();\n\t\t\tlogger($exception->getMessage());\n\t\t\treturn response([\n\t\t\t\t'status' => 'error',\n\t\t\t\t'msg' => trans('messages.error')\n\t\t\t]);\n\t\t}\n\n\t}",
"public function test_updateExternalShipment() {\n\n }",
"function updatePackage() {\n\n $sql = sprintf(\"UPDATE packages_new SET name = '%s',\n \t\t\t\t\t\t\t\t\t\tprice_per_month = '%s',\n \t\t\t\t\t\t\t\t\t\tprice_per_year = '%s',\n \t\t\t\t\t\t\t\t\t\tis_agency_or_builder = %d\n \t\t\t\t\t\t\t\t\t\tWHERE id = %d\t\n \t\t\t\t\t\t\t\t\t\",\n \t\t\t\t\t\t\t\t\t\t$this->package_name,\n \t\t\t\t\t\t\t\t\t\t$this->price_per_month,\n \t\t\t\t\t\t\t\t\t\t$this->price_per_year,\n \t\t\t\t\t\t\t\t\t\t$this->is_agency_or_builder,\n \t\t\t\t\t\t\t\t\t\t$this->package_id \t\t\t\t\t\t\t\t\t\t\n \t\t\t\t\t\t\t\t\t);\n $this->conn->setsql($sql);\n $this->conn->updateDB();\n\n if($this->conn->error) {\n for(reset($this->conn->error); $key = key($this->conn->error); next($this->conn->error)) {\n $this->Error[\"SQL ERROR ClssCmpnCrt-\".$key] = $this->conn->error[$key];\n }\n return false;\n }\n\n \n \n\n return true;\n }",
"public function testGetPackingPlanByFilter()\n {\n }"
]
| [
"0.7085014",
"0.64787024",
"0.64551836",
"0.63667226",
"0.63057375",
"0.618564",
"0.60914385",
"0.6039051",
"0.5972267",
"0.59612525",
"0.58209085",
"0.58053815",
"0.5709977",
"0.5689258",
"0.5667135",
"0.5660933",
"0.56361514",
"0.5576673",
"0.555598",
"0.5493142",
"0.54791224",
"0.5468587",
"0.54626656",
"0.544143",
"0.5431873",
"0.54231167",
"0.54215956",
"0.5419873",
"0.54113114",
"0.53998524"
]
| 0.8442888 | 0 |
Test case for updatePackingPlanCustomFields Update a packingPlan custom fields. | public function testUpdatePackingPlanCustomFields()
{
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function test_updateReplenishmentProcessCustomFields() {\n\n }",
"public function testUpdateExternalShipmentCustomFields()\n {\n }",
"public function testUpdateReplenishmentCustomFields()\n {\n }",
"public function testUpdateOrderCustomFields()\n {\n }",
"public function test_updateExternalShipmentCustomFields() {\n\n }",
"public function testUpdateVendorComplianceSurveyCustomFields()\n {\n }",
"public function test_updateBillingCodeTypeCustomFields() {\n\n }",
"public function test_updateCustomerCustomFields() {\n\n }",
"public function testUpdatePackingPlan()\n {\n }",
"protected function _updatefields() {}",
"public function testUpdateExtraFields(): void { }",
"public function testCustomFields()\n {\n // create\n $customField = $this->_getCustomField();\n $createdCustomField = $this->_instance->addCustomField($customField);\n $this->_objects[] = $createdCustomField;\n $this->assertEquals($customField->name, $createdCustomField->name);\n $this->assertNotNull($createdCustomField->getId());\n \n // fetch\n $application = Tinebase_Application::getInstance()->getApplicationByName('Tinebase');\n $appCustomFields = $this->_instance->getCustomFieldsForApplication(\n $application->getId()\n );\n $this->assertGreaterThan(0, count($appCustomFields));\n $this->assertEquals($application->getId(), $appCustomFields[0]->application_id);\n\n // check with model name\n $appCustomFieldsWithModelName = $this->_instance->getCustomFieldsForApplication(\n $application->getId(),\n $customField->model\n );\n $this->assertGreaterThan(0, count($appCustomFieldsWithModelName));\n $this->assertEquals($customField->model, $appCustomFieldsWithModelName[0]->model, 'didn\\'t get correct model name');\n \n // check if grants are returned\n $this->_instance->resolveConfigGrants($appCustomFields);\n $accountGrants = $appCustomFields->getFirstRecord()->account_grants;\n sort($accountGrants);\n $this->assertEquals(Tinebase_Model_CustomField_Grant::getAllGrants(), $accountGrants);\n \n // delete\n $this->_instance->deleteCustomField($createdCustomField);\n $this->setExpectedException('Tinebase_Exception_NotFound');\n $this->_instance->getCustomField($createdCustomField->getId());\n $this->_objects = array();\n }",
"function TestPlan_update($plan_id, $author_id, $product_id = NULL, $default_product_version = NULL, $type_id = NULL, $name = NULL, $creation_date = NULL, $isactive = TRUE) {\n\t$varray = array(\"author_id\" => \"int\", \"product_id\" => \"int\", \"default_product_version\" => \"string\", \"type_id\" => \"int\", \"name\" => \"string\", \"creation_date\" => \"string\", \"isactive\" => \"int\");\n\tforeach($varray as $key => $val) {\n\t\tif (isset(${$key})) {\n\t\t\t$carray[$key] = new xmlrpcval(${$key}, $val);\n\t\t}\n\t}\n\t// Create call\n\t$call = new xmlrpcmsg('TestPlan.update', array(new xmlrpcval($plan_id, \"int\"), new xmlrpcval($carray, \"struct\")));\n\n\t// Do call and return value\n\treturn do_call($call);\n}",
"public function applyCustomFields($project) {\n\n //custom fields\n $fields = \\App\\Models\\CustomField::Where('customfields_type', 'projects')->get();\n foreach ($fields as $field) {\n if ($field->customfields_status == 'enabled') {\n switch ($field->customfields_name) {\n case 'project_custom_field_1':\n $project->project_custom_field_1 = request('project_custom_field_1');\n break;\n case 'project_custom_field_2':\n $project->project_custom_field_2 = request('project_custom_field_2');\n break;\n case 'project_custom_field_3':\n $project->project_custom_field_3 = request('project_custom_field_3');\n break;\n case 'project_custom_field_4':\n $project->project_custom_field_4 = request('project_custom_field_4');\n break;\n case 'project_custom_field_5':\n $project->project_custom_field_5 = request('project_custom_field_5');\n break;\n case 'project_custom_field_6':\n $project->project_custom_field_6 = request('project_custom_field_6');\n break;\n case 'project_custom_field_7':\n $project->project_custom_field_7 = request('project_custom_field_7');\n break;\n case 'project_custom_field_8':\n $project->project_custom_field_8 = request('project_custom_field_8');\n break;\n case 'project_custom_field_9':\n $project->project_custom_field_9 = request('project_custom_field_9');\n break;\n case 'project_custom_field_10':\n $project->project_custom_field_10 = request('project_custom_field_10');\n break;\n }\n }\n }\n }",
"public function testFields()\r\n\t{\r\n\t\t$dbh = $this->dbh;\r\n\t\t\r\n\t\t$obj = new CAntObject($dbh, \"customer\", null, $this->user);\r\n\t\t$fdef = array(\r\n\t\t\t'title'=>'unittest_custom', \r\n\t\t\t'type'=>'text', \r\n\t\t\t'subtype'=>'32', \r\n\t\t\t'system'=>false, \r\n\t\t\t'use_when'=>\"owner_id:\".$this->user->id\r\n\t\t);\r\n\t\t$newName = $obj->addField(\"unittest_custom\", $fdef);\r\n\t\tunset($obj);\r\n\r\n\t\t$obj = new CAntObject($dbh, \"customer\", null, $this->user);\r\n\t\t$field = $obj->def->getField('unittest_custom_owner_id_minus1');\r\n\t\t$this->assertNotEquals($field, false);\r\n\t\t$this->assertEquals($field->getUseWhen(), \"owner_id:\".$this->user->id);\r\n\t\t$obj->removeField(\"unittest_custom_owner_id_minus1\");\r\n\t\t$field = $obj->def->getField('unittest_custom_owner_id_minus1');\r\n\t\t$this->assertTrue(empty($field));\r\n\t}",
"function pnAddressBook_admin_updatecustomfields() {\r\n\r\n\t$output = new pnHTML();\r\n\r\n // Security check\r\n if (!pnSecAuthAction(0, 'pnAddressBook::', '::', ACCESS_ADMIN)) {\r\n $output->Text(pnVarPrepHTMLDisplay(_PNADDRESSBOOK_NOAUTH));\r\n $output->Text(pnAddressBook_themetable('end'));\r\n\t\treturn $output->GetOutput();\r\n }\r\n\r\n\tlist($id,$del,$name,$cus_type,$newname,$newtype) = pnVarCleanFromInput('id','del','name','cus_type','newname','newtype');\r\n\tif(is_array($del)) {\r\n $dels = implode(',',$del);\r\n }\r\n\t$modID = $modName = array();\r\n\t$modType = array();\r\n\t$modDel = array();\r\n\t$modDelType = array();\r\n\r\n\tif(isset($id)) {\r\n\t\tforeach($id as $k=>$i) {\r\n \t$found = false;\r\n \tif(count($del)) {\r\n \tforeach($del as $d) {\r\n \tif($i == $d) {\r\n \t$found = true;\r\n\t\t\t\t\t\tarray_push($modDel,$i);\r\n\t\t\t\t\t\tarray_push($modDelType,$cus_type[$k]);\r\n \tbreak;\r\n \t}\r\n \t}\r\n \t}\r\n \tif(!$found) {\r\n \tarray_push($modID,$i);\r\n \tarray_push($modName,$name[$k]);\r\n\t\t\t\tarray_push($modType,$cus_type[$k]);\r\n }\r\n \t}\r\n\t}\r\n\r\n\t$pntable = pnDBGetTables();\r\n\t$cus_table = $pntable['pnaddressbook_customfields'];\r\n\t$cus_column = $pntable['pnaddressbook_customfields_column'];\r\n\t$adr_table = $pntable['pnaddressbook_address'];\r\n\t$adr_column = $pntable['pnaddressbook_address_column'];\r\n\r\n\t$updates = array();\r\n\r\n\tforeach($modID as $k=>$id) {\r\n \tarray_push($updates,\"UPDATE $cus_table\r\n SET $cus_column[name]='\".pnVarPrepForStore($modName[$k]).\"',\r\n\t\t\t\t\t\t\t $cus_column[type]='\".pnVarPrepForStore($modType[$k]).\"'\r\n WHERE $cus_column[nr]=$id\");\r\n\t\tif (($modType[$k] != 'smallint default NULL') && ($modType[$k] != 'tinyint default NULL')) {\r\n\t\t\tarray_push($updates,\"ALTER TABLE $adr_table CHANGE adr_custom_\".$id.\" adr_custom_\".$id.\" \".pnVarPrepForStore($modType[$k]));\r\n\t\t}\r\n\t}\r\n\r\n\t$error = '';\r\n\r\n\tif(pnModAPIFunc(__PNADDRESSBOOK__,'admin','updateCustomfields',array('updates'=>$updates))) {\r\n \tif (empty($error)) { $error .= 'UPDATE '.pnVarPrepHTMLDisplay(_pnAB_SUCCESS); }\r\n\t\telse { $error .= ' - UPDATE '.pnVarPrepHTMLDisplay(_pnAB_SUCCESS); }\r\n\t}\r\n\r\n\tif (count($modDel)) {\r\n\t\t$deletes = array();\r\n\t\tforeach($modDel as $k=>$id) {\r\n\t\t\t\tarray_push($deletes,\"DELETE FROM $cus_table WHERE $cus_column[nr] = $id\");\r\n\t\t\t\tif (($modDelType[$k] != 'smallint default NULL') && ($modDelType[$k] != 'tinyint default NULL')) {\r\n\t\t\t\t\tarray_push($deletes,\"ALTER TABLE $adr_table DROP adr_custom_\".$id);\r\n\t\t\t\t}\r\n\t\t}\r\n \tif(pnModAPIFunc(__PNADDRESSBOOK__,'admin','deleteCustomfields',array('deletes'=>$deletes))) {\r\n \t\tif (empty($error)) { $error .= 'DELETE '.pnVarPrepHTMLDisplay(_pnAB_SUCCESS); }\r\n\t\t\telse { $error .= ' - DELETE '.pnVarPrepHTMLDisplay(_pnAB_SUCCESS); }\r\n \t}\r\n\t}\r\n\tif (isset($newtype) && ($newtype == 'tinyint default NULL')) {\r\n\t\t$newname = '[ ]';\r\n\t}\r\n\tif (isset($newtype) && ($newtype == 'smallint default NULL')) {\r\n\t\t$newname = '[------]';\r\n\t}\r\n\tif( (isset($newname)) && ($newname != '') ) {\r\n\t\tlist($dbconn) = pnDBGetConn();\r\n\t\t$result = $dbconn->Execute(\"SELECT MAX($cus_column[nr]) FROM $cus_table\");\r\n\t\tlist($nextID) = $result->fields;\r\n\t\t$nextID++;\r\n\t\t$result->close;\r\n\t\t$inserts = array();\r\n\t\tarray_push($inserts,\"INSERT INTO $cus_table ($cus_column[nr],$cus_column[name],$cus_column[type],$cus_column[position])\r\n VALUES ($nextID,'\".pnVarPrepForStore($newname).\"','\".pnVarPrepForStore($newtype).\"',9999999999)\");\r\n\t\tif (($newtype != 'smallint default NULL') && ($newtype != 'tinyint default NULL')) {\r\n\t\t\tarray_push($inserts,\"ALTER TABLE $adr_table ADD adr_custom_\".$nextID.\" \".pnVarPrepForStore($newtype));\r\n\t\t}\r\n\r\n if(pnModAPIFunc(__PNADDRESSBOOK__,'admin','addCustomfields',array('inserts'=>$inserts))) {\r\n if (empty($error)) { $error .= 'INSERT '.pnVarPrepHTMLDisplay(_pnAB_SUCCESS); }\r\n\t\t\telse { $error .= ' - INSERT '.pnVarPrepHTMLDisplay(_pnAB_SUCCESS); }\r\n\t\t}\r\n }\r\n\r\n\t$args=array('msg'=>$error);\r\n\r\n\tpnRedirect(pnModURL(__PNADDRESSBOOK__, 'admin', 'customfields',$args));\r\n\treturn true;\r\n}",
"public function testUpdateFieldsWrongType(): void { }",
"public function updateLocationBillingTypeCustomFields($body)\n {\n list($response, $statusCode, $httpHeader) = $this->updateLocationBillingTypeCustomFieldsWithHttpInfo ($body);\n return $response; \n }",
"protected function addOrderCustomFields(): void\n {\n $custom_field_set_id = md5('Viacash custom_field_set');\n\n $this->container->get('custom_field_set.repository')->upsert(\n [\n [\n 'id' => $custom_field_set_id,\n 'name' => 'custom_viacash',\n 'config' => [\n \"label\" => $this->injectFallbackLanguage([\"de-DE\" => \"Viacash\", \"en-GB\" => \"Viacash\"]),\n \"translated\" => true\n ],\n 'active' => true,\n 'global' => false,\n ],\n ],\n Context::createDefaultContext()\n );\n\n $this->container->get('custom_field_set_relation.repository')->upsert(\n [\n [\n 'id' => md5('Viacash custom_field_set_relation'),\n 'customFieldSetId' => $custom_field_set_id,\n 'entityName' => 'order',\n ],\n ],\n Context::createDefaultContext()\n );\n\n $this->container->get('custom_field.repository')->upsert(\n [\n [\n 'id' => md5('custom_viacash_checkout_token'),\n 'customFieldSetId' => $custom_field_set_id,\n 'name' => 'custom_viacash_checkout_token',\n 'type' => 'text',\n 'config' => [\n 'type' => 'text',\n \"label\" => $this->injectFallbackLanguage([\"de-DE\" => \"Barzahlen Checkout-Token\", \"en-GB\" => \"Viacash Checkout-Token\"]),\n \"translated\" => true,\n \"componentName\" => \"sw-field\",\n \"customFieldType\" => \"text\",\n \"customFieldPosition\" => 1\n ],\n 'active' => true,\n ],\n ],\n Context::createDefaultContext()\n );\n\n $this->container->get('custom_field.repository')->upsert(\n [\n [\n 'id' => md5('custom_viacash_slip_id'),\n 'customFieldSetId' => $custom_field_set_id,\n 'name' => 'custom_viacash_slip_id',\n 'type' => 'text',\n 'config' => [\n 'type' => 'text',\n \"label\" => $this->injectFallbackLanguage([\"de-DE\" => \"Barzahlen Slip-ID\", \"en-GB\" => \"Viacash Slip-ID\"]),\n \"translated\" => true,\n \"componentName\" => \"sw-field\",\n \"customFieldType\" => \"text\",\n \"customFieldPosition\" => 2\n ],\n 'active' => true,\n ],\n ],\n Context::createDefaultContext()\n );\n\n $this->container->get('custom_field.repository')->upsert(\n [\n [\n 'id' => md5('custom_viacash_division_id'),\n 'customFieldSetId' => $custom_field_set_id,\n 'name' => 'custom_viacash_division_id',\n 'type' => 'text',\n 'config' => [\n 'type' => 'text',\n \"label\" => $this->injectFallbackLanguage([\"de-DE\" => \"Interne Barzahlen Divisions-Nummer\", \"en-GB\" => \"Internal Viacash division number\"]),\n \"translated\" => true,\n \"componentName\" => \"sw-field\",\n \"customFieldType\" => \"text\",\n \"customFieldPosition\" => 3\n ],\n 'active' => true,\n ],\n ],\n Context::createDefaultContext()\n );\n\n $this->container->get('custom_field.repository')->upsert(\n [\n [\n 'id' => md5('custom_viacash_is_sandboxed'),\n 'customFieldSetId' => $custom_field_set_id,\n 'name' => 'custom_viacash_is_sandboxed',\n 'type' => 'switch',\n 'config' => [\n 'type' => 'switch',\n \"label\" => $this->injectFallbackLanguage([\"de-DE\" => \"Barzahlen Sandbox-Transaktion\", \"en-GB\" => \"Viacash sandboxed transaction\"]),\n \"translated\" => true,\n \"componentName\" => \"sw-field\",\n \"customFieldType\" => \"switch\",\n \"customFieldPosition\" => 4\n ],\n 'active' => true,\n ],\n ],\n Context::createDefaultContext()\n );\n\n $this->container->get('custom_field.repository')->upsert(\n [\n [\n 'id' => md5('custom_viacash_refundable_amount'),\n 'customFieldSetId' => $custom_field_set_id,\n 'name' => 'custom_viacash_refundable_amount',\n 'type' => 'number',\n 'config' => [\n 'type' => 'number',\n \"label\" => $this->injectFallbackLanguage([\n \"de-DE\" => \"Verbleibender per Barzahlen erstattbarer Betrag\",\n \"en-GB\" => \"Remaining amount that can be refunded with Viacash\",\n ]),\n \"translated\" => true,\n \"componentName\" => \"sw-field\",\n \"customFieldType\" => \"number\",\n \"customFieldPosition\" => 5\n ],\n 'active' => true,\n ],\n ],\n Context::createDefaultContext()\n );\n\n $this->container->get('custom_field.repository')->upsert(\n [\n [\n 'id' => md5('custom_viacash_validity_days'),\n 'customFieldSetId' => $custom_field_set_id,\n 'name' => 'custom_viacash_validity_days',\n 'type' => 'number',\n 'config' => [\n 'type' => 'number',\n \"label\" => $this->injectFallbackLanguage([\"de-DE\" => \"Gültigkeitsdauer des Zahlscheins in Tagen\", \"en-GB\" => \"Days of payslip validity.\"]),\n \"translated\" => true,\n \"componentName\" => \"sw-field\",\n \"customFieldType\" => \"number\",\n \"customFieldPosition\" => 5\n ],\n 'active' => true,\n ],\n ],\n Context::createDefaultContext()\n );\n }",
"protected abstract function setFields();",
"function updateCustomFields($dbData, $xmlSAMLAssertion, $settings)\n\t{\n\t\t$customFields = $this->getCustomFields($settings, 'update');\n\n\t\tif (count($customFields) == 0)\n\t\t{\n\t\t\t$GLOBALS['log']->debug(\"No custom fields! So returning 0.\"); // JMH\n\t\t\treturn 0;\n\t\t}\n\t\t\n\t\t$user = new User();\n\t\t$user->retrieve($dbData['id']);\n\t\t$GLOBALS['log']->debug(\"updateCF()... userid={$user->id}\"); // JMH\n\t\t\n\t\t$xmlDoc = new DOMDocument();\n\t\t$xmlDoc->loadXML(base64_decode($xmlSAMLAssertion));\n\t\t$xpath = new DOMXpath($xmlDoc);\n\t\t$GLOBALS['log']->debug(\"Created xpath object.\"); // JMH\n\t\t\n\t\t$customFieldUpdated = false;\n\t\t\n\t\tforeach ($customFields as $field)\n\t\t{\n\t\t\t$GLOBALS['log']->debug(\"Top of fields loop with $field.\"); // JMH\n\t\t\tif (!array_key_exists($field, $dbData))\n\t\t\t{\n\t\t\t\t$GLOBALS['log']->debug(\"$field is not in \\$dbData. \\n\\$dbData=\" . var_export($dbData, TRUE)); // JMH\n\t\t\t\t// custom field not listed in db query results!\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$customFieldValue = $dbData[$field];\n\t\t\t\n\t\t\t$xmlNodes = $xpath->query($settings->saml_settings['update'][$field]);\n\t\t\tif ($xmlNodes === false)\n\t\t\t{\n\t\t\t\t// malformed xpath!\n\t\t\t\t$GLOBALS['log']->debug(\"$field contains bad xpath: \" . $settings->saml_settings['update'][$field]); // JMH\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$GLOBALS['log']->debug(\"updateCF(): 3\"); // JMH\n\t\t\tif ($xmlNodes->length == 0)\n\t\t\t{\n\t\t\t\t// no nodes match xpath!\n\t\t\t\t$GLOBALS['log']->debug(\"$field no nodes match this xpath: \" . $settings->saml_settings['update'][$field]); // JMH\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t$xmlValue = $xmlNodes->item(0)->nodeValue;\n\t\t\t$GLOBALS['log']->debug(\"$field xpath returned $xmlValue\"); // JMH\n\t\t\t\n\t\t\tif ($customFieldValue != $xmlValue)\n\t\t\t{\n\t\t\t\t// need to update our user record.\n\t\t\t\t$customFieldUpdated = true;\n\t\t\t\t$user->$field = $xmlValue;\n\t\t\t\t$GLOBALS['log']->debug(\"db is out of date. setting {$field} to {$xmlValue}\"); // JMH\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ($customFieldUpdated)\n\t\t{\n\t\t\t$GLOBALS['log']->debug(\"updateCustomFields calling user->save() and returning 0\"); // JMH\n\t\t\t$user->save();\n\t\t\treturn 1;\n\t\t}\n\t\t\n\t\t$GLOBALS['log']->debug(\"updateCustomFields found no fields to update. Returning -1\"); // JMH\n\t\treturn -1;\n\t}",
"public function modifyCustomFields(array $documentFields = array())\n {\n # PUT /accounts/{accountId}/envelopes/{envelopeId}/documents/{documentId}/fields\n }",
"protected function updateVendorComplianceSurveyCustomFieldsRequest($body)\n {\n // verify the required parameter 'body' is set\n if ($body === null) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $body when calling updateVendorComplianceSurveyCustomFields'\n );\n }\n\n $resourcePath = '/beta/vendorComplianceSurvey/customFields';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n // this endpoint requires API key authentication\n $apiKey = $this->config->getApiKeyWithPrefix('API-Key');\n if ($apiKey !== null) {\n $headers['API-Key'] = $apiKey;\n }\n\n $defaultHeaders = [];\n if ($this->config->getUserAgent()) {\n $defaultHeaders['User-Agent'] = $this->config->getUserAgent();\n }\n\n $headers = array_merge(\n $defaultHeaders,\n $headerParams,\n $headers\n );\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n return new Request(\n 'PUT',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public function saveCustomFields($fields, $category) {\n // usuwanie dotychczasowych powiazan\n if($this->getPrimaryKey()) {\n $q = Doctrine_Query::create()\n ->delete('ArticleCustomFieldValue acfv')\n ->where('acfv.article_id = ?', $this->getPrimaryKey());\n\n $q->execute();\n }\n\n // pobranie dozwolonych pol na podstawie kategorii\n $q = Doctrine::getTable('ArticleCustomFields2ArtCategories')\n ->createQuery('cf2ac')\n ->leftJoin('cf2ac.ArticleCustomField acf')\n// ->where('artcategory_id = ?', $category);\n ->andWhereIn('artcategory_id', array_keys(Doctrine::getTable('ArtCategories')->find($category)->getAncestorsArrayByIds(true)));\n\n $validFields = $q->execute();\n\n foreach($validFields as $validField) {\n\n foreach($fields as $field => $value) {\n\n if($field == $validField->ArticleCustomField->getName()) {\n $this->setCustomField($field, $value);\n }\n }\n }\n }",
"protected function handleCustomField()\n {\n // If this field is a custom field we'll assume it has it's child fields\n // under the `fields` key. Then we are gonna modify those child fields'\n // attribute `name`, `label` & `conditional_logics` properties using\n // the parent field. The current implementation will modify those\n // properties in a way so that we can use dot notation to access.\n $customFields = Arr::get($this->field, 'fields');\n\n if ($customFields) {\n $parentAttribute = Arr::get($this->field, 'attributes.name');\n\n $parentConditionalLogics = Arr::get($this->field, 'settings.conditional_logics', []);\n\n $isAddressOrNameField = in_array(Arr::get($this->field, 'element'), ['address', 'input_name']);\n\n $isRepeatField = Arr::get($this->field, 'element') === 'input_repeat' || Arr::get($this->field, 'element') == 'repeater_field';\n\n foreach ($customFields as $index => $customField) {\n // If the current field is in fact `address` || `name` field\n // then we have to only keep the enabled child fields\n // by the user from the form editor settings.\n if ($isAddressOrNameField) {\n if (!Arr::get($customField, 'settings.visible', false)) {\n unset($customFields[$index]);\n continue;\n }\n }\n\n // Depending on whether the parent field is a repeat field or not\n // the modified attribute name of the child field will vary.\n if ($isRepeatField) {\n $modifiedAttribute = $parentAttribute.'['.$index.'].*';\n } else {\n $modifiedAttribute = $parentAttribute.'['.Arr::get($customField, 'attributes.name').']';\n }\n\n $modifiedLabel = $parentAttribute.'['.Arr::get($customField, 'settings.label').']';\n\n $customField['attributes']['name'] = $modifiedAttribute;\n\n $customField['settings']['label'] = $modifiedLabel;\n\n // Now, we'll replace the `conditional_logics` property\n $customField['settings']['conditional_logics'] = $parentConditionalLogics;\n\n // Now that this field's properties are handled we can pass\n // it to the extract field method to extract it's data.\n $this->extractField($customField);\n }\n }\n\n return $this;\n }",
"public function updateVendorCustomFields($body)\n {\n list($response, $statusCode, $httpHeader) = $this->updateVendorCustomFieldsWithHttpInfo ($body);\n return $response; \n }",
"public function testUpdate()\n {\n // Test with correct field name\n $this->visit('/cube/1')\n ->type('3', 'x')\n ->type('3', 'y')\n ->type('3', 'z')\n ->type('1', 'value')\n ->press('submit-update')\n ->see('updated successfully');\n\n /*\n * Tests with incorrect fields\n */\n // Field required\n $this->visit('/cube/1')\n ->press('submit-update')\n ->see('is required');\n\n // Field must be integer\n $this->visit('/cube/1')\n ->type('1a', 'x')\n ->press('submit-update')\n ->see('integer');\n\n // Field value very great\n $this->visit('/cube/1')\n ->type('1000000000', 'y')\n ->press('submit-update')\n ->see('greater');\n }",
"function acf_update_field($field, $specific = array())\n{\n}",
"public function testGetChangeField()\n {\n }",
"function test_update_by_field($urabe, $body)\n{\n $values = $body->update_params;\n $column_name = $body->column_name;\n $column_value = $body->column_value;\n if ($body->driver == \"PG\")\n $table_name = $body->schema . \".\" . $body->table_name;\n else\n $table_name = $body->table_name;\n return $urabe->update_by_field($table_name, $values, $column_name, $column_value);\n}"
]
| [
"0.6866356",
"0.681878",
"0.676151",
"0.6522969",
"0.6496353",
"0.6493229",
"0.6392022",
"0.63785917",
"0.62884486",
"0.6207397",
"0.5950137",
"0.5714613",
"0.5666781",
"0.54865575",
"0.5420234",
"0.5369768",
"0.5338579",
"0.53100634",
"0.5309191",
"0.5246068",
"0.5223773",
"0.51483655",
"0.51456976",
"0.5131077",
"0.51106495",
"0.50933504",
"0.5066043",
"0.5022579",
"0.50206983",
"0.50176024"
]
| 0.84104824 | 0 |
Returns an SQL statement that checks for one or multiple storage PIDs | protected function storagePidStatement(\TYPO3\CMS\Extbase\Persistence\QueryInterface $query, $tableName = '') {
// Get allowed storage pids
$storagePids = $query->getQuerySettings()->getStoragePageIds();
// Sanitize them (just to be sure)
$storagePids = array_map('intval', $storagePids);
// Generate SQL
$tableField = ($tableName) ? $tableName . '.pid' : 'pid';
return " AND $tableField IN (" . implode(', ', $storagePids) . ') ';
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"abstract public function getStoragePids();",
"function db_checkCSID($csid) {\n $conn = OpenCon();\n \n //$stmt->bind_param( \"ss\", $table_name, $csid );\n $tables = array( 'admin', 'aio', 'professor', 'student' );\n foreach( $tables as $table_name ) {\n\n $st = \"SELECT * FROM `$table_name` WHERE csid='$csid'\";\n\n $result = $conn->query( $st );\n if( !$result ){\n echo \"Database Error. Please contact admin.\\nError details: \" . $conn->error;\n $result->close();\n break;\n }\n elseif( $result->num_rows > 0 ) {\n $result->close();\n return true;\n\n }\n }\n return false;\n }",
"public function getSystemIds()\r\n{\r\n $query_string = \"SELECT systemid FROM voting_system \";\r\n $query_string .= \"WHERE systemname = :systemname AND systemid != :systemid\";\r\n\r\n return $query_string;\r\n\r\n}",
"private function sql_whereAnd_pidList()\n {\n // Get table and field\n list( $table ) = explode( '.', $this->curr_tableField );\n\n if ( empty( $this->pObj->pidList ) )\n {\n // DRS\n if ( $this->pObj->b_drs_warn )\n {\n $prompt = 'There isn\\'t any pid list for the records of ' . $table . '. Maybe this is an error.';\n t3lib_div::devlog( '[WARN/FILTER+SQL] ' . $prompt, $this->pObj->extKey, 2 );\n }\n // DRS\n return;\n }\n\n $fieldsOfTable = $this->pObj->arr_realTables_arrFields[ $table ];\n if ( !in_array( 'pid', $fieldsOfTable ) )\n {\n // DRS\n if ( $this->pObj->b_drs_warn )\n {\n $prompt = $table . ' shouldn\\'t have any pid field. Maybe this is an error.';\n t3lib_div::devlog( '[WARN/FILTER+SQL] ' . $prompt, $this->pObj->extKey, 2 );\n }\n // DRS\n return;\n }\n\n $andWhere = \" AND \" . $table . \".pid IN (\" . $this->pObj->pidList . \")\";\n\n // RETURN AND WHERE statement\n return $andWhere;\n }",
"function checkIDList($table, $fixedQuery, &$IDList)\n{\n\tglobal $sitePosition;\n\n\t$IDs = array();\n\t$rs = query('Select `ID` from `' . $sitePosition . '.' . $table . '` where ' . ($fixedQuery != '' ? ('(' . $fixedQuery . ') and ') : '') . '`ID` in (' . $IDList . ')', false);\n\twhile(true)\n\t{\n\t\t$rsInfo = fetchRow($rs);\n\t\tif($rsInfo === null) break;\n\t\t$IDs[] = $rsInfo[0];\n\t}\n\tfreeResult($rs);\n\t$IDList = implode(',', $IDs);\n}",
"protected function prepareUniqueStatement() {\n $clauses = [];\n foreach ($this->uniqueColumns as $column) {\n $clauses[] = \"$column = :$column\";\n }\n\n $clauses = implode(' AND ', $clauses);\n\n // Prepare our statement.\n return $this->connection->prepare(\"SELECT 1 FROM {$this->table} WHERE $clauses LIMIT 1\");\n }",
"public function getSystemTypeIds()\r\n{\r\n $query_string = \"SELECT systemtypeid FROM system_type \";\r\n $query_string .= \"WHERE systemtypename = :systemtypename AND systemtypeid != :systemtypeid\";\r\n\r\n return $query_string;\r\n}",
"function radius_sql_exists($name)\n{\n $exists = false;\n global $environments;\n \n if(!array_key_exists($name, $environments)) return $exists;\n\n $id = $environments[$name]['_id'] . \"@miiicasa.com\";\n\n $dbconn = pg_connect(\"host=localhost port=5432 dbname=radius user=postgres\");\n $result = pg_query_params($dbconn, 'SELECT * FROM radcheck WHERE username = $1', array($id));\n if(pg_num_rows($result) > 0) $exists = true;\n \n pg_close($dbconn);\n\n return $exists;\n}",
"function s_m_put_get_condition($ref_id_db_arr, $ref_data){\r\n $where = \"\";\r\n for($i = 0; $i < count($ref_id_db_arr); $i++){\r\n $where .= $ref_id_db_arr[$i] . \"='\" . $ref_data[$i] . \"'' AND \";\r\n }\r\n return substr($where, 0, strlen($where) - 5);\r\n}",
"public function checkDatabase(&$response) {\n//\n//\t\t\tselect id from (select id,parent_id from fs_folders order by parent_id, id) sort, (select @pv := '36') initialisation where find_in_set(parent_id, @pv) > 0 and @pv := concat(@pv, ',', id)\n// \n// )\n// \n// \n// and\n// \n// id not in (\n// \n// select files_folder_id from pr2_projects\n// \n// )\n// \n// and readonly = 1;\";\n\n\t\t\n\t\treturn parent::checkDatabase($response);\n\t}",
"function getUuidArray($db, $tabledefuuid, $ids){\r\n\r\n\tif(!count($ids))\r\n\t\treturn false;\r\n\r\n\t$querystatement = \"\r\n\t\t\tSELECT\r\n\t\t\t\t\t`maintable`\r\n\t\t\tFROM\r\n\t\t\t\t\t`tabledefs`\r\n\t\t\tWHERE\r\n\t\t\t\t\t`uuid` = '\".$tabledefuuid.\"'\";\r\n\r\n\t$queryresult = $db->query($querystatement);\r\n\r\n\t$tablerecord = $db->fetchArray($queryresult);\r\n\r\n\t$whereclause = \"\";\r\n\tforeach($ids as $id)\r\n\t\t$whereclause .= \" OR `id` = '\".(int)$id.\"'\";\r\n\r\n\t$whereclause = substr($whereclause, 4);\r\n\r\n\t$querystatement = \"\r\n\t\t\tSELECT\r\n\t\t\t\t\t`uuid`\r\n\t\t\tFROM\r\n\t\t\t\t\t`\".$tablerecord[\"maintable\"].\"`\r\n\t\t\tWHERE\r\n\t\t\t\t\t\".$whereclause;\r\n\r\n\t$queryresult = $db->query($querystatement);\r\n\r\n\t$thereturn = array();\r\n\tif($db->numRows($queryresult))\r\n\t\twhile($therecord = $db->fetchArray($queryresult))\r\n\t\t\t$thereturn[] = $therecord[\"uuid\"];\r\n\r\n\treturn $thereturn;\r\n\r\n}",
"function limit_script_sql($what=\"all\")\n{\n\t$limit_script_sql = '';\n\tif ($what !== false && $what !== 'all')\n\t{\n\t\t$script_ids = array();\n\t\tforeach(scripts($what, true) as $name)\n\t\t{\n\t\t\t$script_ids[] = label2id($name);\n\t\t}\n\t\t$limit_script_sql = ' AND script IN ('.implode(',', $script_ids).')';\n\t}\n\treturn $limit_script_sql;\n}",
"protected function getStoragePids()\n {\n $query = $this->dayRepository->createQuery();\n return $query->getQuerySettings()->getStoragePageIds();\n }",
"function getStoragePageIds() ;",
"function readByIds($ids){\r\n\r\n\t$ids_arr = str_repeat('?,', count($ids) - 1) . '?';\r\n\r\n\t// query to select products\r\n\t$query = \"SELECT id, name, price FROM \" . $this->table_name . \" WHERE id IN ({$ids_arr}) ORDER BY name\";\r\n\r\n\t// prepare query statement\r\n\t$stmt = $this->conn->prepare($query);\r\n\r\n\t// execute query\r\n\t$stmt->execute($ids);\r\n\r\n\t// return values from database\r\n\treturn $stmt;\r\n}",
"private static function genPrimaryKeyWhereClause() {\n return \"WHERE \" . self::ID_KEY . \"=\" . self::transformForPreparedStatement(self::ID_KEY);\n }",
"function executeBoundSQL($cmdstr, $list) {\n \n global $db_conn, $success;\n $statement = OCIParse($db_conn, $cmdstr);\n \n if (!$statement) {\n echo \"<br>Cannot parse the following command: \" . $cmdstr . \"<br>\";\n $e = OCI_Error($db_conn);\n echo htmlentities($e['message']);\n $success = False;\n }\n \n foreach ($list as $tuple) {\n foreach ($tuple as $bind => $val) {\n //echo $val;\n //echo \"<br>\".$bind.\"<br>\";\n OCIBindByName($statement, $bind, $val);\n unset ($val); //make sure you do not remove this. Otherwise $val will remain in an array object wrapper which will not be recognized by Oracle as a proper datatype\n \n }\n $r = OCIExecute($statement, OCI_DEFAULT);\n if (!$r) {\n echo \"<br>Cannot execute the following command: \" . $cmdstr . \"<br>\";\n $e = OCI_Error($statement); // For OCIExecute errors pass the statement handle\n echo htmlentities($e['message']);\n echo \"<br>\";\n $success = False;\n }\n }\n \n }",
"function executeBoundSQL($cmdstr, $list) {\n \n global $db_conn, $success;\n $statement = OCIParse($db_conn, $cmdstr);\n \n if (!$statement) {\n echo \"<br>Cannot parse the following command: \" . $cmdstr . \"<br>\";\n $e = OCI_Error($db_conn);\n echo htmlentities($e['message']);\n $success = False;\n }\n \n foreach ($list as $tuple) {\n foreach ($tuple as $bind => $val) {\n //echo $val;\n //echo \"<br>\".$bind.\"<br>\";\n OCIBindByName($statement, $bind, $val);\n unset ($val); //make sure you do not remove this. Otherwise $val will remain in an array object wrapper which will not be recognized by Oracle as a proper datatype\n \n }\n $r = OCIExecute($statement, OCI_DEFAULT);\n if (!$r) {\n echo \"<br>Cannot execute the following command: \" . $cmdstr . \"<br>\";\n $e = OCI_Error($statement); // For OCIExecute errors pass the statement handle\n echo htmlentities($e['message']);\n echo \"<br>\";\n $success = False;\n }\n }\n \n }",
"protected function sqlKeyFilter()\n\t{\n\t\treturn \"`id` = @id@\";\n\t}",
"function exists($dsstr)\n{\n\t$args = func_get_args();\n\t$sql = $this->getSelectSql($dsstr, $args);\n\t$this->setLimit(1);\n\t$res = $this->query($sql);\n\treturn $this->drv->numRows($res);\n}",
"function executeBoundSQL($cmdstr, $list) {\n\n\t\t\tglobal $db_conn, $success;\n\t\t\t$statement = OCIParse($db_conn, $cmdstr);\n\n if (!$statement) {\n echo \"<br>Cannot parse the following command: \" . $cmdstr . \"<br>\";\n $e = OCI_Error($db_conn);\n echo htmlentities($e['message']);\n $success = False;\n }\n\n foreach ($list as $tuple) {\n foreach ($tuple as $bind => $val) {\n //echo $val;\n //echo \"<br>\".$bind.\"<br>\";\n OCIBindByName($statement, $bind, $val);\n unset ($val); //make sure you do not remove this. Otherwise $val will remain in an array object wrapper which will not be recognized by Oracle as a proper datatype\n\t\t\t\t}\n\n $r = OCIExecute($statement, OCI_DEFAULT);\n if (!$r) {\n echo \"<br>Cannot execute the following command: \" . $cmdstr . \"<br>\";\n $e = OCI_Error($statement); // For OCIExecute errors, pass the statementhandle\n echo htmlentities($e['message']);\n echo \"<br>\";\n $success = False;\n }\n }\n }",
"function executeBoundSQL($cmdstr, $list) {\r\n\r\n\t\t\tglobal $db_conn, $success;\r\n\t\t\t$statement = OCIParse($db_conn, $cmdstr);\r\n\r\n if (!$statement) {\r\n echo \"<br>Cannot parse the following command: \" . $cmdstr . \"<br>\";\r\n $e = OCI_Error($db_conn);\r\n echo htmlentities($e['message']);\r\n $success = False;\r\n }\r\n\r\n foreach ($list as $tuple) {\r\n foreach ($tuple as $bind => $val) {\r\n //echo $val;\r\n //echo \"<br>\".$bind.\"<br>\";\r\n OCIBindByName($statement, $bind, $val);\r\n unset ($val); //make sure you do not remove this. Otherwise $val will remain in an array object wrapper which will not be recognized by Oracle as a proper datatype\r\n\t\t\t\t}\r\n\r\n $r = OCIExecute($statement, OCI_DEFAULT);\r\n if (!$r) {\r\n echo \"<br>Cannot execute the following command: \" . $cmdstr . \"<br>\";\r\n $e = OCI_Error($statement); // For OCIExecute errors, pass the statementhandle\r\n echo htmlentities($e['message']);\r\n echo \"<br>\";\r\n $success = False;\r\n }\r\n }\r\n }",
"static function isIdGeneratedByStorage(): bool;",
"function executeBoundSQL($cmdstr, $list) {\n global $db_conn, $success;\n $statement = OCIParse($db_conn, $cmdstr);\n \n if (!$statement) {\n echo \"<br>Cannot parse the following command: \" . $cmdstr . \"<br>\";\n $e = OCI_Error($db_conn);\n echo htmlentities($e['message']);\n $success = False;\n }\n \n foreach ($list as $tuple) {\n foreach ($tuple as $bind => $val) {\n //echo $val;\n //echo \"<br>\".$bind.\"<br>\";\n OCIBindByName($statement, $bind, $val);\n unset ($val);\n //make sure you do not remove this. Otherwise $val will remain in an array object wrapper which will not be recognized by Oracle as a proper datatype\n }\n $r = OCIExecute($statement, OCI_DEFAULT);\n if (!$r) {\n echo \"<br>Cannot execute the following command: \" . $cmdstr . \"<br>\";\n $e = OCI_Error($statement); // For OCIExecute errors pass the statementhandle\n echo htmlentities($e['message']);\n echo \"<br>\";\n $success = False;\n }\n\n }\n }",
"protected function getSQLTestForFinalQuery()\r\n {\r\n return Db::fields()->post_id()->inTable(\"table1\")->isNotEqualToInt(EntityIdFromFileName::get($this->file_name));\r\n }",
"function executeBoundSQL($cmdstr, $list) {\n\n\tglobal $db_conn, $success;\n\t$statement = OCIParse($db_conn, $cmdstr);\n\n\tif (!$statement) {\n\t\techo \"<br>Cannot parse the following command: \" . $cmdstr . \"<br>\";\n\t\t$e = OCI_Error($db_conn);\n\t\techo htmlentities($e['message']);\n\t\t$success = False;\n\t}\n\n\tforeach ($list as $tuple) {\n\t\tforeach ($tuple as $bind => $val) {\n\t\t\t//echo $val;\n\t\t\t//echo \"<br>\".$bind.\"<br>\";\n\t\t\tOCIBindByName($statement, $bind, $val);\n\t\t\tunset ($val); //make sure you do not remove this. Otherwise $val will remain in an array object wrapper which will not be recognized by Oracle as a proper datatype\n\n\t\t}\n\t\t$r = OCIExecute($statement, OCI_DEFAULT);\n\t\tif (!$r) {\n\t\t\techo \"<br>Cannot execute the following command: \" . $cmdstr . \"<br>\";\n\t\t\t$e = OCI_Error($statement); // For OCIExecute errors pass the statement handle\n\t\t\techo htmlentities($e['message']);\n\t\t\techo \"<br>\";\n\t\t\t$success = False;\n\t\t}\n\t}\n return $statement;\n\n}",
"public function getStoragePrimaryKey();",
"function executeBoundSQL($cmdstr, $list) {\n\n global $db_conn, $success;\n $statement = OCIParse($db_conn, $cmdstr);\n\n if (!$statement) {\n echo \"<br>Cannot parse the following command: \" . $cmdstr . \"<br>\";\n $e = OCI_Error($db_conn);\n echo htmlentities($e['message']);\n $success = False;\n }\n\n foreach ($list as $tuple) {\n foreach ($tuple as $bind => $val) {\n //echo $val;\n //echo \"<br>\".$bind.\"<br>\";\n OCIBindByName($statement, $bind, $val);\n unset ($val); //make sure you do not remove this. Otherwise $val will remain in an array object wrapper which will not be recognized by Oracle as a proper datatype\n }\n\n $r = OCIExecute($statement, OCI_DEFAULT);\n if (!$r) {\n echo \"<br>Cannot execute the following command: \" . $cmdstr . \"<br>\";\n $e = OCI_Error($statement); // For OCIExecute errors, pass the statementhandle\n echo htmlentities($e['message']);\n echo \"<br>\";\n $success = False;\n }\n }\n }",
"public function getSql() {\n\t\t$this->getActiveValues();\n\t\tif ( !is_array( $this->aActiveValues ) || count( $this->aActiveValues ) <=0 ) {\n\t\t\treturn '1=1';\n\t\t}\n\n\t\t$aInClause = array();\n\n\t\tforeach ( $this->aActiveValues as $sValue ) {\n\t\t\t$aInClause[] = \"'\".$sValue.\"'\";\n\t\t}\n\n\t\t$sInClause = implode( ',', $aInClause );\n\n\t\t$sSql = $sInClause;\n\t\t$sSql = 'page_namespace IN ('.$sInClause.')';\n\t\treturn $sSql;\n\t}",
"public function getStoragePageIds() {}"
]
| [
"0.52852386",
"0.50307095",
"0.4760972",
"0.47188503",
"0.468266",
"0.46733648",
"0.46633515",
"0.46529123",
"0.46493667",
"0.4648606",
"0.46412587",
"0.4600992",
"0.4567939",
"0.45642945",
"0.4555683",
"0.45416847",
"0.45220962",
"0.45220962",
"0.45021865",
"0.44996247",
"0.4495337",
"0.44894654",
"0.44887725",
"0.44862905",
"0.44834292",
"0.44799614",
"0.44747025",
"0.44638819",
"0.44609866",
"0.44595242"
]
| 0.578123 | 0 |
Debug an extbase query result. Before debugging the query you must execute it. ($query>execute()) | public function debugQuery(\TYPO3\CMS\Extbase\Persistence\Generic\QueryResult $queryResult) {
$GLOBALS['TYPO3_DB']->debugOuput = 2;
$GLOBALS['TYPO3_DB']->store_lastBuiltQuery = true;
$queryResult->toArray();
\TYPO3\CMS\Extbase\Utility\DebuggerUtility::var_dump($GLOBALS['TYPO3_DB']->debug_lastBuiltQuery);
$GLOBALS['TYPO3_DB']->store_lastBuiltQuery = false;
$GLOBALS['TYPO3_DB']->explainOutput = false;
$GLOBALS['TYPO3_DB']->debugOuput = false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function queryDebug($resultVar){\n\tif (!$resultVar) {\n\t\t$message = 'Invalid query: ' . mysql_error() . \"\\n\";\n\t\t$message .= 'Whole query: ' . $query;\n\t\tdie($message);\n\t}\n}",
"public function debug(){\r\n $this->db->debugMode(function($args){\r\n echo ($args[\"query\"]);\r\n });\r\n return $this;\r\n }",
"public function debug($row = null)\n\t{\n\t\tif($row) {\n\t\t\t// Dump debugging info for current row\n\t\t}\n\t\t\n\t\techo \"<p>Executed \" . $this->getQueryCount() . \" queries:</p>\";\n\t\techo \"<pre>\\n\";\n\t\tprint_r(self::$queryLog);\n\t\techo \"</pre>\\n\";\n\t}",
"function get_debug_info($query)\n\t{\n\t\t$data = array();\n\t\tif (substr(trim(strtoupper($query)), 0, 6) == 'SELECT') {\n\t\t\tif (!pg_send_query($this->connection, \"EXPLAIN $query\"))\n\t\t\t{\n\t\t\t\t$err = pg_get_result($this->connection);\n\t\t\t\terror(PDNSADMIN_QUERY_ERROR, pg_result_error($err), $query, 0);\n\t\t\t} else {\n\t\t\t\t$result = pg_get_result($this->connection);\n\t\n\t\t\t\tif (false === $this->last)\n\t\t\t\t{\n\t\t\t\t\terror(PDNSADMIN_QUERY_ERROR, pg_result_error($err), $query, 0);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$data = pg_fetch_array($result);\n\t\t}\n\t\treturn $data;\n\t}",
"public function query($query)\n\t\t{\n\t\t\n\t\t\t$result = $this->connection->query($query) or die(\"<b style='color:red;'>Error en la consulta.</b><br /><br />\".$this->connection->error.\"<be>Error:<br>\".$query);\n\t\t\treturn $result;\n\t\t}",
"public function printquery(){\n\t\techo $this->query.\";\";\n\t}",
"function executeQuery($query);",
"function customQuery($query) \t{\n $res = $this->execute($query);\n\t\t return $res;\n\t}",
"function db_log_query($description, $sql, $params, $result = null) {\n\tif (! option('debug')) {\n\t\treturn;\n\t}\n\tif (! isset($GLOBALS['SQL_QUERIES'])) {\n\t\t$GLOBALS['SQL_QUERIES'] = array ();\n\t}\n\t$GLOBALS['SQL_QUERIES'][] = array (\n\t\t\"description\" => $description,\n\t\t\"query\" => $sql,\n\t\t// Ineffective and ugly way for a deep copy\n\t\t\"result\" => unserialize(serialize($result)),\n\t\t\"params\" => $params \n\t);\n}",
"function query($query){\r\n if($this->query = $this->connection->prepare($query)){\r\n $this->query->execute();\r\n //cek kalo error\r\n if ($this->query->errno){\r\n die(\"otak anda error: \". $this->query->error);\r\n }\r\n }else{\r\n die(\"Error execution: \". $this->query->error);\r\n }\r\n }",
"public final function getQueryDebug()\n {\n $sql = $this->buildSqlString();\n\n $out = '\n\t\t<div class=\"debug\">\n\t\t\t<h3>SQL</h3>\n\t\t\t<p>' . $sql . '</p>\n\t\t\t<h3>Params</h3>\n\t\t\t' . $this->debug($this->param) . '\n\t\t\t<h3>Full query</h3>\n\t\t\t' . $this->db->quote($sql, $this->param) . '\n\t\t</div>';\n\n return $out;\n }",
"protected function debug($sql){\n\t\tif($this->debug){\n\t\t\tFlash::notice($sql);\n\t\t}\t\n\t}",
"function query(\\database $dbase){\n //\n //Get the sql string \n $sql=$this->to_str();\n //\n // Execute the $sql on columns to get the $result\n $dbase->query($sql);\n \n }",
"public function query($query)\n {\n // TODO: psr Logger\n $this->_log[] = $query;\n\n if ($this->_debug_mode) {\n return false;\n }\n\n $ret = parent::query($query);\n return $ret;\n }",
"public function query($query = \"NONEE\"){\n\t\t\n\t\tif($update = $query === \"NONEE\")\n\t\t\t$query = $this->query; \t\t\t\t\t\n\t\t\n\t\t$this->query_total++;\n\t\t\n\t\t$query_check = trim($query);\n\t\t\n\t\tif($this->debug){\n\t\t\techo \"<br/><strong style=\\\"color:#E4C100\\\"><DEBUG></strong><br/>\";\n\t\t\techo $this->comment != \"\" ? \"<span style=\\\"color:#D3C26E;font-style:italic\\\">#\".$this->comment.\"</span><br/>\" : \"\";\n\t\t\techo \"<span style=\\\"color:#E4C100\\\">\".$query.\"</span><br/><strong style=\\\"color:#E4C100\\\"></DEBUG></strong><br/>\";\n\t\t}\n\t\t\n\t\t$resultset = $this->showErrors ? mysqli_query($this->connection,$query) : @mysqli_query($this->connection,$query);\n\t\t\n\t\t$proceed_log = $this->log && ( \n\t\t(stripos($query_check,\"INSERT\") === 0 && $this->log_options{0} === '1')\n\t\t||\n\t\t(stripos($query_check,\"DELETE\") === 0 && $this->log_options{1} === '1')\n\t\t||\n\t\t(stripos($query_check,\"UPDATE\") === 0 && $this->log_options{2} === '1')\n\t\t||\n\t\t(stripos($query_check,\"SELECT\") === 0 && $this->log_options{3} === '1'));\n\t\t\n\t\tif(stripos($query_check,\"INSERT\") === 0 || stripos($query_check,\"DELETE\") === 0 || stripos($query_check,\"UPDATE\") === 0)\n\t\t\tif(!$resultset)\n\t\t\t\t$this->transaction = false;\n\t\t\n\t\tif($proceed_log){\n\t\t\t$log_fields = \"query,date,user\";\n\t\t\t$log_values=\"'\".$this->secure($query).\"',NOW(),\".$this->log_user;\n\t\t}\n\t\t\n\t\tif(!$resultset){\n\t\t\tif($this->showErrors){ \n\t\t\t\techo \"<br/><strong style=\\\"color:red\\\"><QERROR></strong><br/>\";\n\t\t\t\techo $this->comment != \"\" ? \"<span style=\\\"color:#E88888;font-style:italic\\\">#\".$this->comment.\"</span><br/>\" : $this->comment.\"nada\";\n\t\t\t\techo \"<span style=\\\"color:red\\\">\".mysqli_error($this->connection).\" at \".$query_check.\"</span><br/><strong style=\\\"color:red\\\"></QERROR></strong><br/>\";\n\t\t\t}\n\t\t\tif($proceed_log){\n\t\t\t\t$log_fields .= \",error\";\n\t\t\t\t$log_values .= \",'\".mysqli_error($this->connection).\"'\";\t\n\t\t\t}\n\t\t}\n\t\t\n\t\tif($proceed_log){\t\t\t\n\t\t\t@mysqli_query($this->connection,\"INSERT INTO \".$this->log_table.\"($log_fields) VALUES($log_values)\");\n\t\t}\n\t\t\n\t\tif(!$resultset && $this->closeOnError) \n\t\t\texit;\n\t\t\n\t\tif($update)\n\t\t\t$this->resultset = $resultset;\n\t\t\n\t\treturn $resultset; \n\t}",
"public function execute($query)\n {\n }",
"public function execute($query);",
"public function execute()\n {\n if (!$this->sessionSet && $this->platform instanceof MySqlPlatform) {\n $this->connection->exec(\"SET @@SESSION.sql_mode = '';\");\n $this->sessionSet = true;\n }\n\n // Take a local copy so that we don't modify the original query and cause issues later\n $query = $this->replacePrefix((string) $this->sql);\n\n if (!($this->sql instanceof \\JDatabaseQuery) && ($this->limit > 0 || $this->offset > 0)) {\n // @TODO\n if ($this->offset > 0) {\n $query .= ' LIMIT ' . $this->offset . ', ' . $this->limit;\n } else {\n $query .= ' LIMIT ' . $this->limit;\n }\n }\n\n $this->prepared = $this->connection->prepare($query);\n\n // Increment the query counter.\n $this->count++;\n\n // Reset the error values.\n $this->errorNum = 0;\n $this->errorMsg = '';\n $memoryBefore = null;\n\n // If debugging is enabled then let's log the query.\n if ($this->debug) {\n // Add the query to the object queue.\n $this->log[] = $query;\n\n \\JLog::add($query, \\JLog::DEBUG, 'databasequery');\n\n $this->timings[] = microtime(true);\n }\n\n // Execute the query.\n $this->executed = false;\n $previous = null;\n\n if ($this->prepared instanceof Statement) {\n // Bind the variables:\n if ($this->sql instanceof JDatabaseQueryPreparable) {\n $bounded = $this->sql->getBounded();\n\n foreach ($bounded as $key => $obj) {\n $this->prepared->bindParam($key, $obj->value, $obj->dataType, $obj->length, $obj->driverOptions);\n }\n }\n\n try {\n $this->executed = $this->prepared->execute();\n } catch (\\Exception $previous) {\n }\n }\n\n if ($this->debug) {\n $this->timings[] = microtime(true);\n\n if (defined('DEBUG_BACKTRACE_IGNORE_ARGS')) {\n $this->callStacks[] = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS);\n } else {\n $this->callStacks[] = debug_backtrace();\n }\n }\n\n // If an error occurred handle it.\n if (!$this->executed) {\n // Get the error number and message before we execute any more queries.\n $errorNum = (int) $this->connection->errorCode();\n $errorMsg = (string) 'SQL: ' . implode(\", \", $this->connection->errorInfo());\n\n // Get the error number and message from before we tried to reconnect.\n $this->errorNum = $errorNum;\n $this->errorMsg = $errorMsg;\n\n // Throw the normal query exception.\n \\JLog::add(\n \\JText::sprintf('JLIB_DATABASE_QUERY_FAILED', $this->errorNum, $this->errorMsg),\n \\JLog::ERROR,\n 'databasequery'\n );\n throw new RuntimeException($this->errorMsg, $this->errorNum, $previous);\n }\n\n return $this->prepared;\n }",
"protected abstract function executeQuery(Result $result);",
"function show_query($query) {\r\n global $debug;\r\n\r\n if($debug)\r\n echo \"<p>Query = $query</p>\" ;\r\n}",
"private function query_debugger($Query) {\n\t\t// Debug queries\n\t\tif($this->debug) {\n\t\t\tstatic $query_cnt = 0;\n\t\t\tstatic $query_dup = 0;\n\t\t\tglobal $queries_debug, $queries_debug_arr;\n\t\t\t\n\t\t\t$queryTime = \"<span class='badge pull-right'>\".$this->Connection->queryTime.\" sec</span>\";\n\t\t\t\t\t\t\n\t\t\t$q = $Query;\n\t\t\t$paterns = '/(SELECT|FROM|ORDER BY|ASC|ASC\\,|DESC|WHERE|AND|\\sOR|JOIN|LEFT JOIN|IN| ON|GROUP BY|GROUP_CONCAT\\(|CONCAT\\(|CONVERT\\(|COUNT\\(|AS|LIMIT|OFFSET)\\s/i';\n\t\t\t$q = preg_replace($paterns, '<span>'.\"$1 \".'</span>', $q);\n\t\t\t$q = str_replace(\"\\r\", \"\", str_replace(\"\\n\", \"<br/>\", $q));\n\t\t\t$q = str_replace(\"<span>\", \"<span style='color:#990099; font-weight:bold;'>\", $q);\n\t\t\t\n\t\t\t$duplicate = '';\n\t\t\tif(in_array($Query, $queries_debug_arr)) {\n\t\t\t\t$query_dup++;\n\t\t\t\t$dup_key = array_search($Query, $queries_debug_arr)+1;\n\t\t\t\t//$q = \"Duplicate ($dup_key) : $q\";\n\t\t\t\t$duplicate = \" <code title='Duplicate'><i class='fa fa-copy'></i> \".$dup_key.\"</code>\";\n\t\t\t} else {\n\t\t\t\t$queries_debug_arr[] = $Query;\n\t\t\t}\n\t\t\t\n\t\t\t$q = \"<div class='trace' style='cursor:pointer;'><b>\".++$query_cnt . $duplicate . \"</b>. \". $q . $queryTime . \"</div>\";\n\t\t\t$q .= \"<div style='display:none;margin:15px 15px 0 15px;border-left: 2px solid #000000;'>\";\n\t\t\t$trace = debug_backtrace(false);\n\t\t\tfor($i=count($trace)-1;$i>=0;$i--) {\n\t\t\t\t$q .= str_repeat(\" \",(count($trace)-$i)*3);\n\t\t\t\t$q .= \"↳\";\n\t\t\t\t$q .= preg_replace(\"/^\\S+public_html\\//\",\"\",$trace[$i]['file']);\n\t\t\t\t$q .= \" : \".$trace[$i]['line'].\" -> \";\n\t\t\t\t$q .= isset($trace[$i]['class'])?$trace[$i]['class'].\"::\":\"\";\n\t\t\t\t$q .= $trace[$i]['function'];\n\t\t\t\tif($trace[$i]['function']=='render' && $trace[$i]['class']=='Twig_Environment') {\n\t\t\t\t\tif($trace[$i]['args']['0']=='mainpage.tpl' && !isset($queries_debug['-1'])) $queries_debug['-1'] = '*******************************Render TPL Start*********************************<br/>';\n\t\t\t\t\t$q .= ' (<b>'.$trace[$i]['args']['0'].'</b>)';\n\t\t\t\t}\n\t\t\t\t$q .= \"<br/>\";\n\t\t\t}\n\t\t\t$q .= \"</div>\";\n\t\t\t$GLOBALS['query_cnt'] = $query_cnt;\n\t\t\t$GLOBALS['query_dup'] = $query_dup;\n\t\t\t$queries_debug[] = $q;\n\t\t}\n\t}",
"function show_query($query) {\n global $debug;\n if($debug)\n echo \"<p>Records have been changed.</p>\" ;\n}",
"private function RunBasicQuery() {\n // Prepare the Query\n $this->stmt = $this->db->prepare($this->sql);\n \n // Run the Query in the Database\n $this->stmt->execute();\n \n // Store the Number Of Rows Returned\n $this->num_rows = $this->stmt->rowCount();\n \n // Work with the results (as an array of objects)\n $this->rs = $this->stmt->fetchAll();\n \n // Free the statement\n $this->stmt->closeCursor(); \n }",
"function print_query($db) {\n\t\techo \"<pre>\";print_r($db->get_compiled_select());echo \"</pre>\";\n\t}",
"public function query()\n\t{\n\t\t\n\t}",
"function show_query($query) {\n global $debug;\n\n if($debug)\n echo \"<p>Query = $query</p>\" ;\n}",
"function set_debug_item($stmt, $result) { }",
"function debugging() {\n\t\t$result = $this->connection->prepare(\"SELECT * FROM admins\");\n\t\t$result->execute();\n\t\treturn $result->fetchAll();\n\t}",
"public function executeQuery() {\r\n\t\t$query = $this->query;\r\n\t\t$query->matching($query->logicalAnd($this->queryConstraints));\r\n//$parser = \\TYPO3\\CMS\\Core\\Utility\\GeneralUtility::makeInstance('TYPO3\\\\CMS\\\\Extbase\\\\Persistence\\\\Generic\\\\Storage\\\\Typo3DbQueryParser'); \r\n//$queryParts = $parser->parseQuery($query); \r\n//\\TYPO3\\CMS\\Core\\Utility\\DebugUtility::debug($queryParts, 'Query Content');\r\n\t\t$queryResult = $query->execute()->toArray();\r\n\t\t$this->setSelectedPageUids($queryResult);\r\n\t\t$this->resetQuery(); \r\n\t\treturn $queryResult;\r\n\t}",
"public function actionDatabaseQueries() {\n echo \"Database Debug Log:\";\n $this->showLog('dbDebug.log');\n }"
]
| [
"0.67332107",
"0.67195904",
"0.66700304",
"0.64472026",
"0.6435239",
"0.6428209",
"0.63536006",
"0.6341092",
"0.63402104",
"0.63164425",
"0.6301908",
"0.63003266",
"0.62771124",
"0.6272097",
"0.6268642",
"0.62641454",
"0.62490714",
"0.62346864",
"0.6230715",
"0.6230699",
"0.62205213",
"0.6205605",
"0.61894596",
"0.6177627",
"0.61590785",
"0.6156448",
"0.6152474",
"0.6132868",
"0.61267906",
"0.6122988"
]
| 0.7498202 | 0 |
Create a in uid query part. $query>in(uid, $uid) not working | public function inUid(\TYPO3\CMS\Extbase\Persistence\QueryInterface $query, $uid) {
$or = [];
foreach($uid as $single) {
$or[] = $query->equals('uid', $single);
}
return $query->logicalAnd($query->logicalOr($or));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static function get_users_in($itemids) {}",
"public function in($column,$val);",
"public function where_emp_in($emp) {\n\t\t$this->db->where_in('ID', $emp);\n\t}",
"public function setUidListConstraint(Tx_Extbase_Persistence_QueryInterface $query) {\n\t\t$idList = (empty($this->uidList)) ? array('0') : $this->uidList;\n\n\t\t$constraint = $query->in('uid', $idList);\n\t\treturn $constraint;\n\t}",
"public function testSelectWithInCondition(): void\n {\n $this->_insert();\n $result = $this->connection->selectQuery('id', 'ordered_uuid_items')\n ->where(\n ['id' => ['48298a29-81c0-4c26-a7fb-413140cf8569', '482b7756-8da0-419a-b21f-27da40cf8569']],\n ['id' => 'ordered_uuid[]']\n )\n ->orderBy('id')\n ->execute()\n ->fetchAll('assoc');\n\n $this->assertCount(2, $result);\n $this->assertSame('419a8da0482b7756b21f27da40cf8569', $result[0]['id']);\n $this->assertSame('419a8da0482b7756b21f27da40cf8569', $result[0]['id']);\n }",
"function _uid_filter ($dn) { return('(uid='.dn2uid($dn).')'); }",
"public function whereIn()\n {\n list($field, $value) = $this->extractQueryToFieldAndValue(func_get_args());\n $this->_conditions[self::WHEREIN][$field] = [self::OPERATORS['in'] => $value];\n return $this;\n }",
"function query() {\n \n $this->ensure_my_table();\n \n if ($this->options['operator'] == 'in') {\n $keys = array_keys($this->value);\n\n $this->query->add_where(0, $this->table_alias.'.id IN ('. implode(',', $keys).')' );\n }\n\n }",
"public function orIn($column,$val);",
"function &getUsers($uids)\n {\n $criteria = new CriteriaCompo();\n $criteria->add(new Criteria('uid', '(' . implode(',', $uids) . ')', 'IN'));\n $criteria->setSort('uid');\n\n $member_handler =& xoops_gethandler('member');\n $users =& $member_handler->getUsers($criteria, true);\n return $users;\n }",
"function get_ids_for_in($sql,$col_name='id') {\n\t$rows = fetchAll($sql);\n\t$ids = array();\n\tforeach($rows AS $row) {\n\t\t$ids[] = $row[$col_name];\n\t}\n\tif (count($ids) == 0) $ids[] = '0';\n\treturn join(',',$ids);\n}",
"function getUserInterests($u)\n{\n $ids = $u['interests'];\n $ids = explode(',', $ids);\n //var_dump($ids);\n $u['interests'] = $ids;\n $_SESSION['usr'] = $u;\n //$sql = \"SELECT name FROM interests WHERE ID IN ($ids)\";\n //$result = mysql_query($sql, $c);\n //var_dump($result);\n}",
"public function findByUid($uid);",
"public function orWhereIn()\n {\n list($field, $value) = $this->extractQueryToFieldAndValue(func_get_args());\n if (!is_array($value)) {\n $value = [$value];\n }\n return $this->addOrWhereStack([$field => [self::OPERATORS['in'] => $value]]); \n }",
"function in($x, $y, $and=null, ...$args)\n {\n $expression = array();\n array_push($expression, $x, _IN, $y, $and, ...$args);\n return $expression;\n }",
"function in($x, $y, $and=null, ...$args)\n {\n $expression = array();\n array_push($expression, $x, _IN, $y, $and, ...$args);\n return $expression;\n }",
"public function whereIn($values);",
"private function addValueInListQuery($key,$value){\n /// \\param[in] $key The key (fieldname)\n /// \\param[in] $value The value(s) of the fieldname\n /// \\return a part of the query or nothing\n global $ORIONDB_DB;\n \n if(($key != \"\") && ($value != \"\")){\n if($this->_queryUnchanged[$this->_numberOfRecursions]){\n $returnQuery = \" WHERE \";\n $this->_queryUnchanged[$this->_numberOfRecursions] = false;\n }\n else {\n $returnQuery = \" AND \"; \n }\n $returnQuery .= $ORIONDB_DB->cleansql($key) . \" in (\" . $ORIONDB_DB->cleansql($value) . \")\";\n return $returnQuery;\n }\n}",
"function query_select_followed_by_user($userId) {\n global $connection;\n\n //escape input\n $userId = mysqli_real_escape_string($connection, $userId);\n\n //prepare queries\n $subquery_select_from_follower = \"SELECT auction_id FROM follower \";\n $subquery_select_from_follower .= \"WHERE user_id='{$userId}'\";\n\n $query = \"SELECT auctionId, title, imageName, description, startingPrice, \";\n $query .= \"expirationDate \";\n $query .= \"FROM auction \";\n $query .= \"WHERE auctionId IN ($subquery_select_from_follower)\";\n\n //forward query to database\n $result = mysqli_query($connection, $query);\n\n //If set is not empty, return a number-indexed array, return 0 otherwise\n if($result)\n $result = mysqli_fetch_all($result, MYSQLI_ASSOC);\n\n return $result;\n}",
"public function whereIn($column, $value)\n {\n }",
"function findOneMatchUid($uid);",
"protected function parse_id() {\n\n\t\tif ( ! empty( $this->args['id'] ) ) {\n\t\t\t$this->args['id__in'] = array( $this->args['id'] );\n\t\t}\n\n\t\treturn $this->parse_in_or_not_in_query( 'id', $this->args['id__in'], $this->args['id__not_in'] );\n\t}",
"static function _IN($field, Array $values){\n $var = \"\";\n /* busca si existe el campo en el modelo en cuestion */\n if(aModels::findFieldModel($field) == 'STRING'){\n foreach ($values as $val){\n # le coloca las comillas simples al valor\n $var .= \"'\".(strip_tags($val)) .\"', \";\n }\n $var = trim($var,', ');\n }else{\n $var = implode(\", \", $values);\n }\n return $field . \" {in} ($var) \";\n }",
"public function in( $collection ) {\n\t\t\t$this->_action = 'IN';\n\t\t\t$this->_value = $collection;\n\t\t\t\n\t\t\treturn $this;\n\t\t}",
"public function users_to_query()\n\t{\n\t\treturn array($this->get_data('from_user_id'));\n\t}",
"public function whereIn(string $field, array $values, array $options = []);",
"public function in(array $values);",
"public function in($question = '');",
"public function __in ( $sField, $mValues )\n {\n /*\n Prepare from parameters.\n */\n if (is_array($mValues))\n {\n /*\n Convert array into string.\n */\n $mValues = implode(', ', $mValues);\n }\n elseif (func_num_args() > 2)\n {\n /*\n Use passed paramaters from the 2nd to last to build the string.\n */\n $aParams = func_get_args();\n array_shift($aParams);\n $mValues = implode(', ', $aParams);\n }\n return \"$sField IN ($mValues)\";\n }",
"function getAllUserIds($filter) {\n\t//SELECT id FROM students\n\t$sql = \"SELECT id FROM users WHERE $filter = 1\";\n\t$userIds = queryColumn($sql);\n\n\treturn $userIds;\n}"
]
| [
"0.6495714",
"0.5879846",
"0.5753212",
"0.5721153",
"0.56351167",
"0.5502334",
"0.5445983",
"0.5370739",
"0.5366118",
"0.5342043",
"0.52690643",
"0.526707",
"0.52370226",
"0.52168655",
"0.5216827",
"0.5216827",
"0.5216826",
"0.5212076",
"0.5195517",
"0.5193435",
"0.51743174",
"0.5170235",
"0.51607287",
"0.51602787",
"0.5159858",
"0.51561",
"0.5123574",
"0.5108626",
"0.50908047",
"0.5066438"
]
| 0.7238444 | 0 |
Edit a student record in the file (green return text) | function edit($id)
{
// a. find the student record in question
$dir = "students/".substr($id,0,2);
$student_arr = file( $dir ."/". $id. ".json");
$previous_student_arr = $student_arr;
$previous_student_arr = json_decode($previous_student_arr[0]);
$student_arr = json_decode($student_arr[0]);
$keep = "";
echo " [".$student_arr->name."] Enter name:";
$keep = fgetc(STDIN);
if($keep!="\n") {
$student_arr->name = trim(fgets(STDIN));
}
echo " [".$student_arr->surname."] Enter surname:";
$keep = fgetc(STDIN);
if($keep!="\n") {
$student_arr->name = trim(fgets(STDIN));
}
echo " [".$student_arr->age."] Enter age:";
$keep = fgetc(STDIN);
if($keep!="\n") {
$student_arr->age = trim(fgets(STDIN));
}
echo " [".$student_arr->curriculum."] Enter curriculum:";
$keep = fgetc(STDIN);
if($keep!="\n") {
$student_arr->curriculum = trim(fgets(STDIN));
}
$dir = "students/".substr($student_arr->student_id,0,2);
print_r($student_arr);
$record = fopen($_SERVER['DOCUMENT_ROOT'] . $dir ."/". $student_arr->student_id . ".json","wb");
fwrite($record,json_encode($student_arr,true));
fclose($record);
print_r($previous_student_arr);
if($previous_student_arr==$student_arr){
echo "\33[34m Editing of student (" .$student_arr->student_id. ") succesful. \33[0m";
} else {
echo "This student didn't change anything.";
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function edit(ReadingRecord $readingRecord)\n {\n //\n }",
"public function edit(Student $student)\n {\n //\n }",
"public function edit(Student $student)\n {\n //\n }",
"public function edit(Student $student)\n {\n //\n }",
"public function edit(Student $student)\n {\n //\n }",
"public function edit(Student $student)\n {\n //\n }",
"public function edit(Student $student)\n {\n //\n }",
"public function edit(Student $student)\n {\n //\n }",
"public function edit(Student $student)\n {\n //\n }",
"public function edit(StudentPoint $student_point)\n {\n //\n }",
"public function edit(Record $record)\n {\n //\n }",
"function fileEdit(){\n\t\t$result = mysql_query(getFile($_GET['file']));\n\t\t$GLOBALS['adminObjectId'] = $_GET['file'];\n\t\tif($row = mysql_fetch_assoc($result)) {\n\t\t\tgetFileGlobals($row);\n\t\t\tfileForm(\"edit\");\n\t\t}\n\t}",
"public function edit(Sample $sample)\n {\n //\n }",
"public function editStudent($surname, $firstname, $othername, $birth_date, $address, $student_id){\n\t\t\t$query = $this->connection()->prepare(\"UPDATE student SET surname='$surname', firstname='$firstname', othername='$othername', birth_date='$birth_date', address='$address' WHERE id='$student_id'\");\n\t\t $query->execute();\n\t\t return true;\n\t\t}",
"public function edit()\n\t{\n\t\t//\n\t}",
"public function edit() {\n\t\t\t\n\t\t}",
"public function edit( )\r\n {\r\n //\r\n }",
"public function editStudent() {\n\n\t\tif ( POST ) {\n\t\t\t$validation = new Validation();\n\t\t\t$validation->name( 'name' )->value( $_POST['name'] )->pattern( 'text' )->required();\n\t\t\t$validation->name( 'guardian_id' )->value( $_POST['guardian_id'] )->pattern( 'int' )->required();\n\t\t\t$validation->name( 'date_of_birth' )->value( $_POST['date_of_birth'] )->pattern( 'text' )->required();\n\t\t\t$validation->name( 'gender' )->value( $_POST['gender'] )->pattern( 'text' )->required();\n\t\t\t$validation->name( 'blood_group' )->value( $_POST['blood_group'] )->pattern( 'text' )->required();\n\t\t\t$validation->name( 'religion' )->value( $_POST['religion'] )->pattern( 'text' )->required();\n\t\t\t$validation->name( 'current_address' )->value( $_POST['current_address'] )->pattern( 'text' )->required();\n\t\t\t$validation->name( 'permanent_address' )->value( $_POST['permanent_address'] )->pattern( 'text' )->required();\n\t\t\t$validation->name( 'extra_curricular_activities' )->value( $_POST['extra_curricular_activities'] )->pattern( 'text' )->required();\n\t\t\t$validation->name( 'remarks' )->value( $_POST['remarks'] )->pattern( 'text' )->required();\n\n\t\t\tif ( $validation->isSuccess() ) {\n\t\t\t\t$student = new Student();\n\t\t\t\t$student->id = trim( $_POST['id'] );\n\t\t\t\t$student->name = trim( $_POST['name'] );\n\t\t\t\t$student->guardian_id = trim( $_POST['guardian_id'] );\n\t\t\t\t$student->date_of_birth = trim( $_POST['date_of_birth'] );\n\t\t\t\t$student->gender = trim( $_POST['gender'] );\n\t\t\t\t$student->blood_group = trim( $_POST['blood_group'] );\n\t\t\t\t$student->religion = trim( $_POST['religion'] );\n\t\t\t\t$student->current_address = trim( $_POST['current_address'] );\n\t\t\t\t$student->permanent_address = trim( $_POST['permanent_address'] );\n\t\t\t\t$student->registration_no = trim( $_POST['registration_no'] );\n\t\t\t\t$student->extra_curricular_activities = trim( $_POST['extra_curricular_activities'] );\n\t\t\t\t$student->remarks = trim( $_POST['remarks'] );\n\t\t\t\t$student->status = trim( $_POST['status'] );\n\t\t\t\t$student->assignment = trim( $_POST['assignment'] );\n\t\t\t\t$new_file = new File();\n\t\t\t\t//attaching file , this method will work as a validation method for future\n\t\t\t\t//returns false if there are no files given\n\t\t\t\tif ( $new_file->attach_file( $_FILES['photo'] ) ) {\n\t\t\t\t\t//New File directory\n\t\t\t\t\t$new_file->upload_dir = 'images/students';\n\t\t\t\t\t// old file information\n\t\t\t\t\t$this->file->upload_dir = 'images/students';\n\t\t\t\t\t$this->file->file_name = $_POST['oldPhoto'];\n\t\t\t\t\t$student->photo = $new_file->file_name;\n\t\t\t\t\tif ( $student->update() ) {\n\t\t\t\t\t\t//Destroy the old file\n\t\t\t\t\t\tif ( $this->file->destroy() ) {\n\t\t\t\t\t\t\t//Save the new File\n\t\t\t\t\t\t\tif ( $new_file->save() ) {\n\t\t\t\t\t\t\t\tredirect( 'students/index' );\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$this->file->destroy();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tdie( 'Could not delete the file' );\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdie( 'Something went Wrong' );\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$student->photo = $_POST['oldPhoto'];\n\t\t\t\t\tif ( $student->update() ) {\n\t\t\t\t\t\tredirect( 'students/index' );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tdie( 'Something went Wrong' );\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t} else {\n\t\t\t\techo $validation->displayErrors();\n\t\t\t}\n\n\t\t}\n\t}",
"public function edit()\n\t{\n\t\t\n\t}",
"public function edit(student_sibling $student_sibling)\n {\n //\n }",
"public function update_student($row)\n\t\t{\n\t\t\t$student = new Student();\n\t\t\t$student->setId($row['id']);\n\t\t\t$student->setFirstName($row['firstName']);\n\t\t\t$student->setLastName($row['lastName']);\n\t\t\t$student->setGender($row['gender']);\n\t\t\t$student->setAge($row['age']);\n\t\t\t$student->setGroup($row['sgroup']);\n\t\t\t$student->setFaculty($row['faculty']);\n\t\t\t$this->conn->update($student);\n\t\t}",
"public function edit($id)\n {\n $data['student']=Student_info::findOrfail($id);\n echo '<pre>';\n print_r($data['student']);\n echo '</pre>';\n // return view('student_info_update',$data);\n\n }",
"public function edit(File $file)\n {\n //\n }",
"public function edit(ResearchMember $researchMember)\n {\n //\n }",
"function testUpdate_Students($link, $student_id) {\n\t\t$student = Student::select($link, $student_id);\n\t\t\n\t\t// set attributes\n $fname \t\t= $student->fname;\n $email \t\t= $student->email;\n $phone \t\t= $student->phone;\n $password \t= $student->password;\n\t\t\n\t\t// perform update operation\n\t\tswitch($student_id % 3) {\n\n\t\t\tcase(0):\n\t\t\t\tStudent::update($link, $student_id, 'Updated Name', $email, $phone, $password);\n\t\t\t\tbreak;\n\t\t\t\n\t\t\tcase(1):\n\t\t\t\tStudent::update($link, $student_id, $fname, $email, '000-000-0000', $password);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase(2):\n\t\t\t\tStudent::update($link, $student_id, $fname, $email, $phone, 'update');\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tdefault:\n\t\t\t\techo \"student id does not exist.\";\n\t\t\t\tbreak;\n\t\t}\n\t}",
"public function checkEditStudent(): void\n {\n if (isset($_GET['edit'])) {\n $student = studentLoader::getStudent($_GET['edit'], $this->pdo);\n $allGroups = groupLoader::getAllAssignedGroups($this->pdo);\n require 'View/studentEdit.php';\n }\n }",
"public function editStudent($id): void\n {\n $student = studentLoader::getStudent($_GET['id']);\n $student->setEmail($_POST['email']);\n $student->setFirstName($_POST['firstName']);\n $student->setLastName($_POST['lastName']);\n $student->setGroup(new group($_POST['className']));\n\n studentLoader::saveStudent($student, $this->pdo);\n require 'View/studentEdit.php';\n }",
"public function edit(Studentadd $studentadd)\n {\n //\n }",
"public function EditRecord($id, $id_field='')\n {\n if (empty($id_field)) {\n $id_field = $this->Index_Name;\n }\n echo $this->EditRecordText($id, $id_field);\n }",
"public function edit(Marriage $marriage)\n {\n //\n }"
]
| [
"0.63576794",
"0.61951625",
"0.61951625",
"0.61951625",
"0.61951625",
"0.61951625",
"0.61951625",
"0.61951625",
"0.61951625",
"0.59537905",
"0.5950145",
"0.59412473",
"0.5887603",
"0.58696836",
"0.5851138",
"0.5836256",
"0.5819414",
"0.5807374",
"0.5786073",
"0.5781609",
"0.5779855",
"0.5772327",
"0.57654756",
"0.5752837",
"0.5750801",
"0.57163167",
"0.5715395",
"0.57153136",
"0.57070065",
"0.5700348"
]
| 0.64862144 | 0 |
Scan & store all students that exist in all the records. Basically get all student ids(filenames) in each folder. | function scan_students()
{
$current_students = [];
$di = new RecursiveDirectoryIterator('students/');
foreach (new RecursiveIteratorIterator($di) as $filename => $file) {
$path_info = pathinfo($filename);
if($path_info['extension']=='json'){
array_push($current_students,$path_info['filename']);
}
}
// echo print_r($current_students);
return $current_students;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function scanFolder()\n {\n return scandir($this->currentPath);\n }",
"function scan_files( ){\n\n // List of all the audio files found in the directory and sub-directories\n $audioFileArray = array();\n\n // List of filenames already handled during the scan. To detect dupe filenames.\n $alreadyhandledFileArray = array();\n\n // Make list of all files in db to remove non existent files\n $DBaudioFileArray = array();\n foreach ( $this->get_list_of_files()->fetchAll() as $row ) {\n $DBaudioFileArray[] = $row['filename'];\n }\n\n // Prepare variables for file urls\n //$base_dir = dirname(dirname(realpath($this->filedirectorypath))); // Absolute path to your installation, ex: /var/www/mywebsite\n $doc_root = preg_replace(\"!{$_SERVER['SCRIPT_NAME']}$!\", '', $_SERVER['SCRIPT_FILENAME']); # ex: /var/www\n $protocol = empty($_SERVER['HTTPS']) ? 'http' : 'https';\n $port = $_SERVER['SERVER_PORT'];\n $disp_port = ($protocol == 'http' && $port == 80 || $protocol == 'https' && $port == 443) ? '' : \":$port\";\n $domain = $_SERVER['SERVER_NAME'];\n // variables for file urls\n\n // Create recursive dir iterator which skips dot folders\n $dir = new RecursiveDirectoryIterator( $this->filedirectorypath , FilesystemIterator::SKIP_DOTS);\n\n // Flatten the recursive iterator, consider only files, no directories\n $it = new RecursiveIteratorIterator($dir);\n\n // Find all the mp3 files\n foreach ($it as $fileinfo) {\n if ($fileinfo->isFile() && !strcmp($fileinfo->getExtension(), \"mp3\")) {\n $audioFileArray[] = $fileinfo;\n\n //Warning: files with same md5key in different folders will not be inserted into the db.\n //print md5_file($fileinfo) . \"<br />\\n\";\n }\n }\n\n foreach ($audioFileArray as $key => $fileinfo) {\n\n $filename = $fileinfo->getFilename();\n\n //For each file found on disk remove entry from list from DB\n // if any left at the end, they are files that no longer are present on the drive.\n //print \"unsetting: \" . $filename . \"<br>\";\n unset($DBaudioFileArray[array_search($filename,$DBaudioFileArray,true)]);\n\n // check file not in db\n if( !$this->is_file_in_db( $filename ) ) {\n\n //decode filename date if named according to our naming scheme\n $date = $this->decode_filename($filename);\n\n // Build file url based on server path\n $filepath = realpath($fileinfo->getRealPath());\n $base_url = preg_replace(\"!^{$doc_root}!\", '', $filepath); # ex: '' or '/mywebsite'\n $full_url = \"$protocol://{$domain}{$disp_port}{$base_url}\"; # Ex: 'http://example.com', 'https://example.com/mywebsite', etc.\n\n //print $filename . \" - \" . $full_url . \"<br />\\n\";\n\n //insert audiofile in db for first time\n $this->insert_new_file_into_db( $filename, $full_url, $fileinfo->getRealPath(), $fileinfo->getSize(), $date );\n\n $alreadyhandledFileArray[$key] = $filename;\n\n } else {\n // if file in alreadyhandled array, then duplicate named files have been found\n // how to check for duplicate file names?\n // if we're here then the name has already ben added to the db (but maybe during a previous run)\n //we still need to look for the file in the alreadyhandledFileArray\n if( in_array($filename, $alreadyhandledFileArray) ){\n // flag file\n $this->flag_file($filename, \"Il y a 2 ou plusieurs fichiers audio avec le même nom dans le dossier audio du serveur ftp. Veuillez changer les noms ou supprimer les doublons.\");\n }\n }\n\n\n }\n\n // If there are files from the database that weren't found in the audio folder,\n // flag them and add a comment stating that the file can no longer be found.\n if( count($DBaudioFileArray) ){\n //print_r($DBaudioFileArray);\n foreach($DBaudioFileArray as $key => $fn){\n $this->flag_file($fn, \"Le fichier en question n'est plus présent dans le dossier audio du serveur ftp. Il faut le supprimer de la base de données.\");\n $this->set_file_not_new($fn);\n }\n }\n\n return true;\n }",
"public function get_students($ids)\n\t\t{\n\t\t\t$students=array();\n\t\t\tforeach ($ids as $row){\n\t\t\t\n\t\t\t\t$students[]=$this->create_student($this->conn->get($row));\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\treturn $students;\n\t\t}",
"function find_by_val($field,$value)\n {\n $arr1=[];\n $found=[];\n $seek = scan_students();\n foreach ($seek as $student => $id) {\n $dir = \"students/\".substr($id,0,2);\n $arr1 = json_decode(file_get_contents($_SERVER['DOCUMENT_ROOT'] . $dir .\"/\". $id. \".json\"),true);\n if($arr1[$field] == $value) { $found = $arr1;}\n }\n if(!empty($found))\n echo print_r($found);\n else\n err(\"Student Not Found.\\00[0m This student doesn't exist.\");\n return $found;\n }",
"public function get_student_list_of_logged_in_parent() {\n\t\t$parent_id = $this->session->userdata('user_id');\n\t\t$parent_data = $this->db->get_where('parents', array('user_id' => $parent_id))->row_array();\n\t\t$checker = array(\n\t\t\t'parent_id' => $parent_data['id'],\n\t\t\t'session' => $this->active_session,\n\t\t\t'school_id' => $this->school_id\n\t\t);\n\t\t$students = $this->db->get_where('students', $checker)->result_array();\n\t\tforeach ($students as $key => $student) {\n\t\t\t$checker = array(\n\t\t\t\t'student_id' => $student['id'],\n\t\t\t\t'session' => $this->active_session,\n\t\t\t\t'school_id' => $this->school_id\n\t\t\t);\n\t\t\t$enrol_data = $this->db->get_where('enrols', $checker)->row_array();\n\n\t\t\t$user_details = $this->db->get_where('users', array('id' => $student['user_id']))->row_array();\n\t\t\t$students[$key]['student_id'] = $student['id'];\n\t\t\t$students[$key]['name'] = $user_details['name'];\n\t\t\t$students[$key]['email'] = $user_details['email'];\n\t\t\t$students[$key]['role'] = $user_details['role'];\n\t\t\t$students[$key]['address'] = $user_details['address'];\n\t\t\t$students[$key]['phone'] = $user_details['phone'];\n\t\t\t$students[$key]['birthday'] = $user_details['birthday'];\n\t\t\t$students[$key]['gender'] = $user_details['gender'];\n\t\t\t$students[$key]['blood_group'] = $user_details['blood_group'];\n\t\t\t$students[$key]['class_id'] = $enrol_data['class_id'];\n\t\t\t$students[$key]['section_id'] = $enrol_data['section_id'];\n\n\t\t\t$class_details = $this->crud_model->get_class_details_by_id($enrol_data['class_id'])->row_array();\n\t\t\t$section_details = $this->crud_model->get_section_details_by_id('section', $enrol_data['section_id'])->row_array();\n\n\t\t\t$students[$key]['class_name'] = $class_details['name'];\n\t\t\t$students[$key]['section_name'] = $section_details['name'];\n\t\t}\n\t\treturn $students;\n\t}",
"public function loadStudents(){\n $data=$this->studentsInRiskForThis();\n $cantidad=count($data);\n $contador=0;\n foreach($data as $fila){\n IF(Talleresdet::firstOrCreateStatic([\n 'talleres_id'=>$this->id,\n 'codalu'=>$fila['codalu'],\n ], Talleresdet::SCENARIO_BATCH ))\n $contador++; \n }\n return ['total'=>$cantidad,'contador'=>$contador];\n }",
"function list_fileid($sid)\r\n {\r\n $this->db->select(\"file_id\");\r\n $this->db->where(\"sid\",$sid);\r\n\t\t$result=$this->db->get(\"data_files\")->result_array();\r\n\t\t\r\n\t\t$output=array();\r\n\t\tforeach($result as $row){\r\n\t\t\t$output[]=$row['file_id'];\r\n\t\t}\r\n\r\n\t\treturn $output;\r\n\t}",
"function get_files($instructor=False, $sources=array('class', 'lab', 'project', 'exam', 'review', 'capstone', 'continued-lab'), $file_path = '.', $access=array(), $virtual=array(), $categories=array(), $secret='really') {\n $results = array();\n $basedir = scandir($file_path);\n foreach ($sources as $i => $l0) {\n if (in_array($l0, $basedir) && is_dir($file_path . '/' . $l0)) {\n $level1 = scandir($file_path . '/' . $l0);\n sort($level1);\n foreach ($level1 as $i => $l1) {\n if (substr($l1, 0, 1) != '.' && is_dir($file_path . '/' . $l0 . '/' . $l1)) {\n // The following code allows the system recursively look through the Directory\n // structure within a class, and the system can now process RELATIVE links\n // that go into those subordinate directories\n $level2 = array();\n try {\n $Iterator = new RecursiveIteratorIterator(\n new RecursiveDirectoryIterator($file_path . '/' . $l0 . '/' . $l1),\n RecursiveIteratorIterator::LEAVES_ONLY,\n RecursiveIteratorIterator::CATCH_GET_CHILD);\n foreach($Iterator as $name => $object) {\n $name = explode(\"/\", $name);\n unset($name[2]);\n unset($name[1]);\n unset($name[0]);\n $name = implode(\"/\", $name);\n $level2[] = $name;\n }\n } catch (Exception $e) {\n // Unable to recurse, so don't bother...\n }\n //$level2 = scandir($file_path . '/' . $l0 . '/' . $l1);\n $results[$l0][$l1] = array();\n sort($level2);\n foreach ($level2 as $i => $l2) {\n $key = sha1($secret.$l0.$l1.$l2);\n if (substr($l2, 0, 1) != '.' && validate_file($instructor, $l2, $file_path . '/' . $l0 . '/' . $l1 . '/' . $l2, $access)[0]) {\n if (is_link($file_path . '/' . $l0 . '/' . $l1 . '/' . $l2)) {\n if (validate_file($instructor, readlink($file_path . '/' . $l0 . '/' . $l1 . '/' . $l2), readlink($file_path . '/' . $l0 . '/' . $l1 . '/' . $l2), $access)[0]) {\n $vf = validate_file($instructor, readlink($file_path . '/' . $l0 . '/' . $l1 . '/' . $l2), readlink($file_path . '/' . $l0 . '/' . $l1 . '/' . $l2), $access);\n $category = categorize_file($instructor, $l2, readlink($file_path . '/' . $l0 . '/' . $l1 . '/' . $l2), $vf[5], $categories);\n $results[$l0][$l1][$l2] = array('actual' => $file_path . '/' . $l0 . '/' . $l1 . '/' . readlink($file_path . '/' . $l0 . '/' . $l1 . '/' . $l2),\n 'visible' => $vf[1],\n 'year' => $vf[2],\n 'month' => $vf[3],\n 'day' => $vf[4],\n 'type' => $category[0],\n 'category' => $category[1],\n 'key' => $key);\n }\n } else {\n $vf = validate_file($instructor, $l2, $file_path . '/' . $l0 . '/' . $l1 . '/' . $l2, $access);\n $category = categorize_file($instructor, $l2, $file_path . '/' . $l0 . '/' . $l1 . '/' . $l2, $vf[5], $categories);\n $results[$l0][$l1][$l2] = array('actual' => $file_path . '/' . $l0 . '/' . $l1 . '/' . $l2,\n 'visible' => $vf[1],\n 'year' => $vf[2],\n 'month' => $vf[3],\n 'day' => $vf[4],\n 'type' => $category[0],\n 'category' => $category[1],\n 'key' => $key);\n }\n }\n }\n }\n }\n }\n }\n # Add Virtual files, format like array('class'=>array(1 => array(array('answers.html', 'homework/answers05.html'))))\n foreach ($virtual as $l0 => $l1array) {\n if (isset($results[$l0])) {\n $classes = array_keys($results[$l0]);\n foreach ($l1array as $day => $l2array) {\n if (isset($classes[$day-1])) {\n foreach ($l2array as $i => $values) {\n $virt_file = $values[0];\n $real_file = $values[1];\n if (validate_file($instructor, $real_file, $real_file, $access)[0]) {\n $key = sha1($secret.$real_file.$virt_file);\n $vf = validate_file($instructor, $real_file, $real_file, $access);\n $category = categorize_file($instructor, $virt_file, $real_file, $vf[5], $categories);\n $results[$l0][$classes[$day-1]][$virt_file] = array('actual' => $real_file,\n 'visible' => $vf[1],\n 'year' => $vf[2],\n 'month' => $vf[3],\n 'day' => $vf[4],\n 'type' => $category[0],\n 'category' => $category[1],\n 'key' => $key);\n }\n }\n }\n }\n }\n }\n #####################################################\n # Verify that the class is not blocked by security...\n $today = getdate();\n foreach ($results as $l0 => $classes) {\n $counter = 1;\n foreach ($classes as $l1 => $data) {\n foreach ($data as $filename => $fdata) {\n if ($fdata['year'] == 1 && $fdata['month'] == 1 && $fdata['day'] == 1) {\n $cate = $fdata['category'];\n if (isset($access[$l0.\"_\".$counter]) && $cate == 'title') {\n $sspec = $l0.\"_\".$counter;\n $results[$l0][$l1][$filename]['month'] = $access[$sspec]['month'];\n $results[$l0][$l1][$filename]['day'] = $access[$sspec]['day'];\n if (($today['mon'] > $access[$sspec]['month']) || ($today['mon'] == $access[$sspec]['month'] && $today['mday'] >= $access[$sspec]['day'])) {\n } else {\n $results[$l0][$l1][$filename]['visible'] = False;\n if (!$instructor) {\n unset($results[$l0][$l1][$filename]);\n }\n }\n } elseif (isset($access[$l0.\"_\".$counter.\"/\".$cate])) {\n $sspec = $l0.\"_\".$counter.\"/\".$cate;\n $results[$l0][$l1][$filename]['month'] = $access[$sspec]['month'];\n $results[$l0][$l1][$filename]['day'] = $access[$sspec]['day'];\n if (($today['mon'] > $access[$sspec]['month']) || ($today['mon'] == $access[$sspec]['month'] && $today['mday'] >= $access[$sspec]['day'])) {\n } else {\n $results[$l0][$l1][$filename]['visible'] = False;\n if (!$instructor) {\n unset($results[$l0][$l1][$filename]);\n }\n }\n } elseif (isset($access[$l0.\"_\".$counter.\"/\".$filename])) {\n $sspec = $l0.\"_\".$counter.\"/\".$filename;\n $results[$l0][$l1][$filename]['month'] = $access[$sspec]['month'];\n $results[$l0][$l1][$filename]['day'] = $access[$sspec]['day'];\n if (($today['mon'] > $access[$sspec]['month']) || ($today['mon'] == $access[$sspec]['month'] && $today['mday'] >= $access[$sspec]['day'])) {\n } else {\n $results[$l0][$l1][$filename]['visible'] = False;\n if (!$instructor) {\n unset($results[$l0][$l1][$filename]);\n }\n }\n } elseif (isset($access[$l0.\"_\".$counter.\"/all\"])) {\n $sspec = $l0.\"_\".$counter.\"/all\";\n $results[$l0][$l1][$filename]['month'] = $access[$sspec]['month'];\n $results[$l0][$l1][$filename]['day'] = $access[$sspec]['day'];\n if (($today['mon'] > $access[$sspec]['month']) || ($today['mon'] == $access[$sspec]['month'] && $today['mday'] >= $access[$sspec]['day'])) {\n } else {\n $results[$l0][$l1][$filename]['visible'] = False;\n if (!$instructor) {\n unset($results[$l0][$l1][$filename]);\n }\n }\n }\n }\n }\n $counter++;\n }\n }\n return $results;\n }",
"function get_smsstudents_by_ids($inputarray = array()) {\n $sql = \"select * from student_records where id in(\" . implode(',', $inputarray) . \")\";\n //log_message('error', 'get_smsstudents_by_ids '.$sql);\t\t\n $res = $this->db->query($sql);\n return $res->result();\n }",
"public function getStudentsForPath($path_id) {\n return $this->get('get_students_for_path', ['path_id' => $path_id]);\n }",
"public function list_shared_files_with() {\n $stmt = $this->pdo->prepare('select filename, name from share s, user u, file f where s.user_id = :id and s.owner_id = u.id and s.file_id = f.id');\n $stmt->bindValue(':id', $this->id);\n $stmt->execute();\n $res = $stmt->fetchAll();\n $result = array();\n foreach ($res as $f) {\n array_push($result, array('filename' => $f['filename'],\n 'username' => $f['name']));\n }\n return $result;\n }",
"public function listDirectoryPicturesAndApplyId() \n {\n if (is_dir($this->picturesFolder)){\n $this->files = scandir($this->picturesFolder);\n } else {\n echo 'No image directory';\n }\n \n $values = array();\n foreach ($this->files as $key => $var) {\n if (($var === '.') || ($var === '..') || (substr($var, -4, 1) !== '.')) {\n unset($this->files[$key]);\n } else {\n $id = $this->generateRandomKey();\n $values[] = array(\n 'id' => $id, \n 'picture' => $this->files[$key], \n 'qrcode' => $id . '-qrcode' . $this->outputFileExtension\n ); \n }\n }\n $this->files = $values;\n return (array) $this->files;\n }",
"public function getGroupFilesFromDatabase() {\n $db = \\Helper::getDB();\n $db->where('g.groupId', $db->escape($this->getId()));\n $db->join('documents d', 'd.id = g.documentId', 'LEFT');\n $db->join('users u', 'u.id = d.ownerId', 'LEFT');\n $results = $db->get('group_documents g', NULL, 'd.*, u.*, d.id AS fileId, u.id AS userId');\n // Process all files and their owners\n foreach($results as $result) {\n $user = new \\Models\\User($result['userId'], $result['username'], $result['email'], $result['firstName'], $result['lastName'], $result['lastLogin']);\n $file = new \\Models\\File($result['fileId'], $result['type'], $result['title'], $user, $result['creationDate'], $result['modificationDate'], $result['file']);\n $this->addFile($file);\n }\n }",
"function rScanDir($scanMe) {\r\n\t\tglobal $path, $tmpPath, $cur_folder, $tags2;\r\n\t\tforeach($scanMe as $folder)\r\n\t\t{\r\n\t\t\tif(is_dir($path.$tmpPath.$folder) && $folder !=\".\" && $folder !=\"..\")\r\n\t\t\t{\r\n\t\t\t\t$cur_folder[] = $tmpPath.$folder;\r\n\t\t\t\techo \"getTagString input:\".$tmpPath.$folder.\"<br/>\";\r\n\t\t\t\t$tags2[] = getTagString($tmpPath.$folder);\r\n\t\t\t\t$tmpPath .= $folder.\"/\";\r\n\t\t\t\trScanDir(scandir($path.$tmpPath));\r\n\t\t\t}\r\n\t\t}\r\n\t\t$tmpPath = substr($tmpPath, 0, strrpos($tmpPath, \"/\"));\r\n\t\t$tmpPath = substr($tmpPath, 0, strrpos($tmpPath, \"/\")+1);\r\n\t}",
"function viewAllAttachedFiles($sessionID, $studentID){\r\n $allFiles = array();\r\n $someFiles = array();\r\n $file = array();\r\n $contacts=$this->getStudentsContacts($studentID);\r\n for($i = 0; $i < sizeof($contacts); $i++){\r\n $contactID = $contacts[$i];\r\n $contact = $this->viewContact('',$contactID);\r\n $contactDate = $contact['DateCreated'];\r\n if(!empty($contactID)){\r\n unset($someFiles);\r\n $someFiles = $this->viewAttachedFiles('',$contactID); \r\n for($j = 0; $j < sizeof($someFiles); $j++){\r\n unset($file);\r\n $file['fileid'] = $someFiles[$j];\r\n $file['contactid'] = $contactID;\r\n $file['name'] = $this->getAttachedFileName($someFiles[$j]);\r\n $file['date'] = $contactDate;\r\n array_push($allFiles,$file);\r\n }\r\n }\r\n }\r\n return($allFiles);\r\n\t}",
"function get_all_by_survey($sid)\r\n {\r\n $this->db->select(\"*\");\r\n $this->db->where(\"sid\",$sid);\r\n return $this->db->get(\"data_files\")->result_array();\r\n }",
"function searchforStudents() {\n $searchId = Input::get('sid');\n\n /* get project title according to the group's id */\n $protitle = DB::table('projects')\n ->where('groupID', $searchId)\n ->Where('status', 'Approved')\n ->pluck('title');\n\n /* get project id according to the group's id */\n $proid = DB::table('projects')\n ->where('title', $protitle)\n ->Where('status', 'Approved')\n ->pluck('id');\n\n /* mail adds. of members in the group */\n $groupmails = DB::table('research_groups')\n ->where('groupID', $searchId)\n ->pluck('mails');\n\n $explodedemails = explode(\"/\", $groupmails);\n $sendids = '';\n $sendnames = '';\n \n foreach ($explodedemails as $mail) {\n $id = (DB::table('students')\n ->where('email', $mail)\n ->pluck('regId'));\n\n $sendids .= $id . '/';\n\n /* get student name according to the student's id */\n $stuname = (DB::table('students')\n ->where('email', $mail)\n ->pluck('name'));\n $sendnames .= $stuname . '/';\n }\n \n $explodedsendids = explode(\"/\", rtrim($sendids, \"/\"));\n $explodedsendnames = explode(\"/\", rtrim($sendnames, \"/\"));\n $los = DB::table('settings')->first();\n \n $data = array(\"title\" => $protitle, \"pid\" => $proid, \"sname\" => $explodedsendnames,\n \"noofstu\" => sizeof($explodedemails), \"ids\" => $explodedsendids,\n \"ledrid\" => $explodedsendids[0], \"los\" => $los);\n return json_encode($data);\n }",
"public function list_shared_files() {\n $stmt = $this->pdo->prepare('select filename, name from share s, user u, file f where s.owner_id = :id and s.user_id = u.id and s.file_id = f.id');\n $stmt->bindValue(':id', $this->id);\n $stmt->execute();\n $res = $stmt->fetchAll();\n $result = array();\n foreach ($res as $f) {\n array_push($result, array('filename' => $f['filename'],\n 'username' => $f['name']));\n }\n return $result;\n }",
"public function student_list()\n {\n $grade = $this->input->post('grade');\n $name = $this->input->post('class');\n\n\n $classId = $this->Class_model->getClassId($grade, $name);\n\n $file = $_FILES['file']['tmp_name'];\n\n\n $handle = fopen($file, \"r\");\n\n\n while (($fileop = fgetcsv($handle, 1000, \",\")) !== false) {\n\n if ($fileop[0] != 'index') {\n\n $index = $fileop[0];\n $fname = $fileop[1];\n $lname = $fileop[2];\n $address = $fileop[3];\n $tele = $fileop[4];\n $data = array(\n 'index' => $index,\n 'fname' => $fname,\n 'lname' => $lname,\n 'address' => $address,\n 'tel' => $tele,\n );\n\n $res = $this->Student_model->insertStudent($data);\n\n if ($res == 1) {\n $data = array(\n 'Student_index' => $index,\n 'Class_id' => $classId\n );\n $res = $this->Student_Class_model->registerStudentsToClass($data);\n\n\n }\n if ($res == 1) {\n echo 'File uploaded successfully';\n }\n\n };\n\n }\n\n }",
"public function fetchAllClassIds ()\r\n {\r\n $member_id = $this->getMember_id(true);\r\n $student_class_obj = new Acad_Model_StudentClass();\r\n $student_class_obj->setMember_id($member_id);\r\n return $student_class_obj->fetchClassIds();\r\n }",
"public function find_students(\n string $keyword,\n string $order_by = 'forename',\n $order_dir = self::ORDER_ASC,\n $page = 0,\n $limit = 50,\n &$total_students_count = null\n ) {\n $order_by = htmlentities($order_by);\n $order_dir = $order_dir == self::ORDER_ASC ? 'ASC' : 'DESC';\n $query_string = \n \"SELECT forename, surname, group_id, exam_results\n FROM students\n WHERE CONCAT(forename, ' ', surname, ' ', group_id, ' ', exam_results)\n LIKE :keyword\n ORDER BY $order_by $order_dir\n LIMIT :limit_start, :limit_end\";\n $query = $this->db->prepare($query_string);\n $query->bindValue(':keyword', \"%{$keyword}%\", \\PDO::PARAM_STR);\n $query->bindValue(':limit_start', $page * $limit, \\PDO::PARAM_INT);\n $query->bindValue(':limit_end', $limit, \\PDO::PARAM_INT);\n $query->execute();\n\n $students = array();\n while ($row = $query->fetch(\\PDO::FETCH_NUM)) {\n $student = new Student;\n $student->forename = $row[0];\n $student->surname = $row[1];\n $student->group_id = $row[2];\n $student->exam_results = $row[3];\n array_push($students, $student);\n }\n\n $query->closeCursor();\n\n if (isset($total_students_count)) {\n if ($page == 0 && count($students) < $limit) {\n $total_students_count = count($students);\n } else {\n $query_string = \n \"SELECT COUNT(*)\n FROM students\n WHERE CONCAT(forename, ' ', surname, ' ', group_id, ' ', exam_results)\n LIKE :keyword\n ORDER BY $order_by $order_dir\";\n $query = $this->db->prepare($query_string);\n $query->bindValue(':keyword', \"%{$keyword}%\", \\PDO::PARAM_STR);\n $query->execute();\n\n $total_students_count = intval($query->fetch(\\PDO::FETCH_NUM)[0]);\n\n $query->closeCursor();\n }\n }\n\n return $students;\n }",
"public static function getStudents() {\n\t\t$idm = PSU::get('idmobject');\n\n\t\t$search = array(\n\t\t\tarray('pa.attribute' => 'els_student'),\n\t\t\tarray('pa.type_id' => '2')\n\t\t);\n\n\t\t$return = 'i.pid,i.psu_id,i.username,i.first_name,i.last_name,l.start_date,l.end_date';\n\n\t\t$students = $idm->getUsersByAttribute( $search, 'AND', $return );\n\n\t\tarray_walk( $students, array('ELS', 'dates2timestamp') );\n\t\tarray_walk( $students, array('ELS', 'load_psuperson') );\n\t\t\n\t\tusort( $students, array('ELS', 'student_sort') );\n\n\t\treturn $students;\n\t}",
"function dropbox_submitted_students($assignment_id)\n{\n /*/\n * SELECT DISTINCT users.id, COUNT(dropbox_content.filebox_id) AS num_content \n * FROM dropbox_content \n * JOIN users \n * ON users.id = dropbox_content.student_id \n * WHERE dropbox_content.assignment_id = $assignment_id\n /*/\n $query = \"SELECT DISTINCT users.id, COUNT(dropbox_content.id) AS num_content FROM dropbox_content JOIN users ON users.id = dropbox_content.student_id WHERE dropbox_content.assignment_id = $assignment_id\";\n $students = good_query_table($query);\n $ret = array();\n foreach($students as $student)\n $ret[$student['id']] = $student['num_content'];\n return $ret;\n}",
"protected function valid_studentids() {\n if ($this->studentids === null) {\n if ($this->studentids = get_users_by_capability($this->context, 'mod/data:viewentry', 'u.id,u.username')) {\n $this->studentids = array_keys($this->studentids);\n $this->studentids = array_diff($this->studentids, $this->valid_teacherids());\n } else {\n $this->studentids = array();\n }\n }\n return $this->studentids;\n }",
"private function importManyFiles()\n {\n $path = storage_path(\"data/*.csv\");\n\n // run 2 loops at a time\n foreach (array_slice(glob($path), 0, 2) as $file) {\n // read the data into an array\n $data = array_map('str_getcsv', file($file));\n\n // loop over the data\n foreach ($data as $row) {\n // insert the record or update if the email already exists\n // User::updateOrCreate(\n // ['email' => $row[6]],\n // ['email' => $row[6]]\n // );\n }\n\n // delete the file\n unlink($file);\n }\n }",
"private function getStudent(){\n\t\t$spathSQLSelect = $this->GLOBALS_INI[\"PATHS\"][\"PATH_HOME\"] . $this->GLOBALS_INI[\"PATHS\"][\"PATH_MODEL\"] . \"select_stagiaire.sql\";\n\n\t\t$this->result[\"liste_stagiaire\"] = $this->obj_bdd->getSelectDatas(\n\t\t\t$spathSQLSelect,\n\t\t\tarray(\n\t\t\t\t'id_session' => $this->id_session\n\t\t\t\t),\n\t\t\t\t0\n\t\t);\n\t\t$spathSQLSelect = $this->GLOBALS_INI[\"PATHS\"][\"PATH_HOME\"] . $this->GLOBALS_INI[\"PATHS\"][\"PATH_MODEL\"] . \"select_stagiaire_techno_carousel.sql\";\n\n\t\t$this->result[\"liste_techno\"] = $this->obj_bdd->getSelectDatas(\n\t\t\t$spathSQLSelect,\n\t\t\tarray(\n\t\t\t\t'id_session' => $this->id_session\n\t\t\t\t),\n\t\t\t\t0\n\t\t);\n\t\t$spathSQLSelect = $this->GLOBALS_INI[\"PATHS\"][\"PATH_HOME\"] . $this->GLOBALS_INI[\"PATHS\"][\"PATH_MODEL\"] . \"select_stagiaire_rs.sql\";\n\n\t\t$this->result[\"liste_rs\"] = $this->obj_bdd->getSelectDatas(\n\t\t\t$spathSQLSelect,\n\t\t\tarray(\n\t\t\t\t'id_session' => $this->id_session\n\t\t\t\t),\n\t\t\t\t0\n\t\t);\n\t\t$spathSQLSelect = $this->GLOBALS_INI[\"PATHS\"][\"PATH_HOME\"] . $this->GLOBALS_INI[\"PATHS\"][\"PATH_MODEL\"] . \"select_stagiaire_doc.sql\";\n\n\t\t$this->result[\"liste_doc\"] = $this->obj_bdd->getSelectDatas(\n\t\t\t$spathSQLSelect,\n\t\t\tarray(\n\t\t\t\t'id_session' => $this->id_session\n\t\t\t\t),\n\t\t\t\t0\n\t\t);\n\t}",
"function get_all_students() {\n global $db;\n $query = 'SELECT * FROM students\n ORDER BY studentID';\n $statement = $db->prepare($query);\n $statement->execute();\n $students = $statement->fetchAll();\n $statement->closeCursor();\n return $students; \n }",
"private function scan_directory($dir, $scan = \"\", &$nb_files = 0, &$nb_errors = 0){\n\t\t//Si c est la ou on etait , alors on reprend\n\t\tif ($dir == $scan or $scan == \"\"){\n\t\t\t$scan = \"\";\n\t\t\tDB::delete(\"delete from movies where directory = ?\",array($dir));\n\t\t\t$files = scandir($dir);\n\t\t\tforeach ($files as $file){\n\t\t\t\tif ($file != \"..\" and $file != \".\"){\n\t\t\t\t\tif (is_dir($dir.\"/\".$file)){\n\t\t\t\t\t\t$this->scan_directory($dir.\"/\".$file, $scan, $nb_files, $nb_errors);\n\t\t\t\t\t}else{\n\t\t\t\t\t\tforeach (config(\"app.MOVIES_FILES\") as $ext){\n\t\t\t\t\t\t\tif (stripos($file,\".\".$ext) !== false){\n\t\t\t\t\t\t\t\t//Analyse du fichier\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t$movie = new Movie();\n\t\t\t\t\t\t\t\t//On rajoute le fichier en base\t\t\t\t\t\n\t\t\t\t\t\t\t\t$movie->directory = $dir;\n\t\t\t\t\t\t\t\t$movie->filename = $file;\n\t\t\t\t\t\t\t\t$movie->status = -1;\n\t\t\t\t\t\t\t\t$movie->save();\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\ttry{\n\t\t\t\t\t\t\t\t\t$movie->name = $this->remove($file);\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t$movie->status = 1;\n\t\t\t\t\t\t\t\t\t$movie->save();\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t$nb_files++;\n\t\t\t\t\t\t\t\t}catch(\\Exception $e){\n\t\t\t\t\t\t\t\t\t//Next...\n\t\t\t\t\t\t\t\t\t$nb_errors++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t$json = [];\n\t\t\t$json[\"updated\"] = date(\"Y-m-d H:i:s\");\n\t\t\t$json[\"nb_files\"] = $nb_files;\n\t\t\t$json[\"nb_errors\"] = $nb_errors;\n\t\t\t$json[\"scan\"] = $scan;\n\t\t\tfile_put_contents(storage_path().\"/scan_movies.txt\",json_encode($json));\n\t\t}else{\n\t\t\t//Sinon, on reparcourt a partir de l'endroit, ou on etait\n\t\t\t$files = scandir($dir);\n\t\t\tforeach ($files as $file){\n\t\t\t\tif ($file != \"..\" and $file != \".\"){\n\t\t\t\t\tif (is_dir($dir.\"/\".$file)){\n\t\t\t\t\t\t$this->scan_directory($dir.\"/\".$file, $scan, $nb_files, $nb_errors);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"function scanFiles($dir){\n $path = __DIR__ . DIRECTORY_SEPARATOR . $dir; /** Nurodomas kelias iki jsons folderio */\n $files = scandir($path); /** Nuskenuoja folderi pagal kelia($path) ir grazina esanciu failu masyva */\n\n return $files;\n}",
"private function directoryScan($dir) {\n\t\t\n\t\t// check for the validity of input / working directory\n\t\t\n\t\tif (!is_dir($dir)) {\n\t\t\tdie(\"'$dir' is not a directory.\".LE);\n\t\t}\n\t\t\n\t\t// listing directory contents\n\t\t\n\t\t$result = [];\n\t\t\n\t\t$root = scandir($dir);\n\t\tforeach($root as $value)\n\t\t{\n\t\t\t// removing dots & output directory\n\t\t\t\n\t\t\tif($value === '.' || $value === '..') {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t// listing only files\n\t\t\t\n\t\t\tif(is_file(\"$dir\".DS.\"$value\")) {\n\t\t\t\t$result[$value]=\"$dir\".DS.\"$value\";\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t// recursive call to self(this method) so we can get files listing recursively\n\t\t\t\n\t\t\tforeach($this->directoryScan(\"$dir\".DS.\"$value\") as $value1)\n\t\t\t{\n\t\t\t\t$result[basename($value1)]=$value1;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $result;\n\t}"
]
| [
"0.57698435",
"0.5550492",
"0.55180883",
"0.5496296",
"0.5408772",
"0.5361843",
"0.5304064",
"0.52624863",
"0.526012",
"0.5188724",
"0.51179993",
"0.511087",
"0.5094498",
"0.50861484",
"0.5077359",
"0.50752896",
"0.50510573",
"0.50421214",
"0.5021373",
"0.50137556",
"0.49985644",
"0.49973005",
"0.49949625",
"0.499082",
"0.49879503",
"0.4977608",
"0.49713218",
"0.49668923",
"0.49609333",
"0.49539343"
]
| 0.6625037 | 0 |
Constructs a new DibsPaytypesEvent. | public function __construct(array $paytypes) {
$this->paytypes = $paytypes;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getEventTypes()\n {\n return new EventTypes(array('order_name' => true));\n }",
"protected function _generateEventLabels()\n {\n if (!self::$_eventList) {\n self::$_eventList = array(\n 'T0000' => Mage::helper('paypal')->__('General: received payment of a type not belonging to the other T00xx categories'),\n 'T0001' => Mage::helper('paypal')->__('Mass Pay Payment'),\n 'T0002' => Mage::helper('paypal')->__('Subscription Payment, either payment sent or payment received'),\n 'T0003' => Mage::helper('paypal')->__('Preapproved Payment (BillUser API), either sent or received'),\n 'T0004' => Mage::helper('paypal')->__('eBay Auction Payment'),\n 'T0005' => Mage::helper('paypal')->__('Direct Payment API'),\n 'T0006' => Mage::helper('paypal')->__('Express Checkout APIs'),\n 'T0007' => Mage::helper('paypal')->__('Website Payments Standard Payment'),\n 'T0008' => Mage::helper('paypal')->__('Postage Payment to either USPS or UPS'),\n 'T0009' => Mage::helper('paypal')->__('Gift Certificate Payment: purchase of Gift Certificate'),\n 'T0010' => Mage::helper('paypal')->__('Auction Payment other than through eBay'),\n 'T0011' => Mage::helper('paypal')->__('Mobile Payment (made via a mobile phone)'),\n 'T0012' => Mage::helper('paypal')->__('Virtual Terminal Payment'),\n 'T0100' => Mage::helper('paypal')->__('General: non-payment fee of a type not belonging to the other T01xx categories'),\n 'T0101' => Mage::helper('paypal')->__('Fee: Web Site Payments Pro Account Monthly'),\n 'T0102' => Mage::helper('paypal')->__('Fee: Foreign ACH Withdrawal'),\n 'T0103' => Mage::helper('paypal')->__('Fee: WorldLink Check Withdrawal'),\n 'T0104' => Mage::helper('paypal')->__('Fee: Mass Pay Request'),\n 'T0200' => Mage::helper('paypal')->__('General Currency Conversion'),\n 'T0201' => Mage::helper('paypal')->__('User-initiated Currency Conversion'),\n 'T0202' => Mage::helper('paypal')->__('Currency Conversion required to cover negative balance'),\n 'T0300' => Mage::helper('paypal')->__('General Funding of PayPal Account '),\n 'T0301' => Mage::helper('paypal')->__('PayPal Balance Manager function of PayPal account'),\n 'T0302' => Mage::helper('paypal')->__('ACH Funding for Funds Recovery from Account Balance'),\n 'T0303' => Mage::helper('paypal')->__('EFT Funding (German banking)'),\n 'T0400' => Mage::helper('paypal')->__('General Withdrawal from PayPal Account'),\n 'T0401' => Mage::helper('paypal')->__('AutoSweep'),\n 'T0500' => Mage::helper('paypal')->__('General: Use of PayPal account for purchasing as well as receiving payments'),\n 'T0501' => Mage::helper('paypal')->__('Virtual PayPal Debit Card Transaction'),\n 'T0502' => Mage::helper('paypal')->__('PayPal Debit Card Withdrawal from ATM'),\n 'T0503' => Mage::helper('paypal')->__('Hidden Virtual PayPal Debit Card Transaction'),\n 'T0504' => Mage::helper('paypal')->__('PayPal Debit Card Cash Advance'),\n 'T0600' => Mage::helper('paypal')->__('General: Withdrawal from PayPal Account'),\n 'T0700' => Mage::helper('paypal')->__('General (Purchase with a credit card)'),\n 'T0701' => Mage::helper('paypal')->__('Negative Balance'),\n 'T0800' => Mage::helper('paypal')->__('General: bonus of a type not belonging to the other T08xx categories'),\n 'T0801' => Mage::helper('paypal')->__('Debit Card Cash Back'),\n 'T0802' => Mage::helper('paypal')->__('Merchant Referral Bonus'),\n 'T0803' => Mage::helper('paypal')->__('Balance Manager Account Bonus'),\n 'T0804' => Mage::helper('paypal')->__('PayPal Buyer Warranty Bonus'),\n 'T0805' => Mage::helper('paypal')->__('PayPal Protection Bonus'),\n 'T0806' => Mage::helper('paypal')->__('Bonus for first ACH Use'),\n 'T0900' => Mage::helper('paypal')->__('General Redemption'),\n 'T0901' => Mage::helper('paypal')->__('Gift Certificate Redemption'),\n 'T0902' => Mage::helper('paypal')->__('Points Incentive Redemption'),\n 'T0903' => Mage::helper('paypal')->__('Coupon Redemption'),\n 'T0904' => Mage::helper('paypal')->__('Reward Voucher Redemption'),\n 'T1000' => Mage::helper('paypal')->__('General. Product no longer supported'),\n 'T1100' => Mage::helper('paypal')->__('General: reversal of a type not belonging to the other T11xx categories'),\n 'T1101' => Mage::helper('paypal')->__('ACH Withdrawal'),\n 'T1102' => Mage::helper('paypal')->__('Debit Card Transaction'),\n 'T1103' => Mage::helper('paypal')->__('Reversal of Points Usage'),\n 'T1104' => Mage::helper('paypal')->__('ACH Deposit (Reversal)'),\n 'T1105' => Mage::helper('paypal')->__('Reversal of General Account Hold'),\n 'T1106' => Mage::helper('paypal')->__('Account-to-Account Payment, initiated by PayPal'),\n 'T1107' => Mage::helper('paypal')->__('Payment Refund initiated by merchant'),\n 'T1108' => Mage::helper('paypal')->__('Fee Reversal'),\n 'T1110' => Mage::helper('paypal')->__('Hold for Dispute Investigation'),\n 'T1111' => Mage::helper('paypal')->__('Reversal of hold for Dispute Investigation'),\n 'T1200' => Mage::helper('paypal')->__('General: adjustment of a type not belonging to the other T12xx categories'),\n 'T1201' => Mage::helper('paypal')->__('Chargeback'),\n 'T1202' => Mage::helper('paypal')->__('Reversal'),\n 'T1203' => Mage::helper('paypal')->__('Charge-off'),\n 'T1204' => Mage::helper('paypal')->__('Incentive'),\n 'T1205' => Mage::helper('paypal')->__('Reimbursement of Chargeback'),\n 'T1300' => Mage::helper('paypal')->__('General (Authorization)'),\n 'T1301' => Mage::helper('paypal')->__('Reauthorization'),\n 'T1302' => Mage::helper('paypal')->__('Void'),\n 'T1400' => Mage::helper('paypal')->__('General (Dividend)'),\n 'T1500' => Mage::helper('paypal')->__('General: temporary hold of a type not belonging to the other T15xx categories'),\n 'T1501' => Mage::helper('paypal')->__('Open Authorization'),\n 'T1502' => Mage::helper('paypal')->__('ACH Deposit (Hold for Dispute or Other Investigation)'),\n 'T1503' => Mage::helper('paypal')->__('Available Balance'),\n 'T1600' => Mage::helper('paypal')->__('Funding'),\n 'T1700' => Mage::helper('paypal')->__('General: Withdrawal to Non-Bank Entity'),\n 'T1701' => Mage::helper('paypal')->__('WorldLink Withdrawal'),\n 'T1800' => Mage::helper('paypal')->__('Buyer Credit Payment'),\n 'T1900' => Mage::helper('paypal')->__('General Adjustment without businessrelated event'),\n 'T2000' => Mage::helper('paypal')->__('General (Funds Transfer from PayPal Account to Another)'),\n 'T2001' => Mage::helper('paypal')->__('Settlement Consolidation'),\n 'T9900' => Mage::helper('paypal')->__('General: event not yet categorized'),\n );\n asort(self::$_eventList);\n }\n }",
"public function __construct(int $type)\n {\n $this->_eventType = $type;\n }",
"function __construct($name, $eventTypeId) {\n $this->name = $name;\n $this->eventTypeId = $eventTypeId;\n }",
"public function __construct(VendorAPI_Blackbox_EventLog $log, $days)\n\t{\n\t\tparent::__construct($log);\n\t\t$this->days = $days;\n\t\t$this->addActionToStack('VERIFY_PAYDATES');\n\t}",
"private function createinstallevent()\n {\n $cat = CategoryUtil::getCategoryByPath('/__SYSTEM__/Modules/PostCalendar/Events');\n\n $eventArray = array(\n 'title' => $this->__('PostCalendar Installed'),\n 'hometext' => ':text:' . $this->__('On this date, the PostCalendar module was installed. Thank you for trying PostCalendar! This event can be safely deleted if you wish.'),\n 'alldayevent' => true,\n 'eventstatus' => PostCalendar_Entity_CalendarEvent::APPROVED,\n 'sharing' => PostCalendar_Entity_CalendarEvent::SHARING_GLOBAL,\n 'website' => 'https://github.com/craigh/PostCalendar/wiki',\n 'categories' => array(\n 'Main' => $cat['id']));\n\n try {\n $event = new PostCalendar_Entity_CalendarEvent();\n $event->setFromArray($eventArray);\n $this->entityManager->persist($event);\n $this->entityManager->flush();\n } catch (Exception $e) {\n return LogUtil::registerError($e->getMessage());\n }\n\n return true;\n }",
"public function __construct()\n {\n $this->notificationTypes = ['TransactionBillWasClosed', 'LoyaltyRewardEarned', 'CustomerRedeemReward', 'CustomerRedeemDeal'];\n }",
"public function __construct()\n {\n $this->types = array(self::TYPE_EMISSION, self::TYPE_TRANSFER);\n }",
"protected function _generateEventLabels()\n {\n if (!self::$_eventList) {\n self::$_eventList = array(\n 'T0000' => Mage::helper('paypalmx')->__('General: Recibir pagos de de tipo no perteneciente a la categoria T00xx'),\n 'T0001' => Mage::helper('paypalmx')->__('Pagos masivos'),\n 'T0002' => Mage::helper('paypalmx')->__('Pagos subscritos, tambien pagos enviados y recibidos'),\n 'T0003' => Mage::helper('paypalmx')->__('Pagos previamente aprovados (BillUser API), ya sean enviados o recividos'),\n 'T0004' => Mage::helper('paypalmx')->__('eBay Auction Payment'),\n 'T0005' => Mage::helper('paypalmx')->__('Pagos Directos del API'),\n 'T0006' => Mage::helper('paypalmx')->__('Express Checkout APIs'),\n 'T0007' => Mage::helper('paypalmx')->__('Pagos regulares de la tienda'),\n 'T0008' => Mage::helper('paypalmx')->__('Pagos de envio ya sea USPS o UPS'),\n 'T0009' => Mage::helper('paypalmx')->__('Pagos de certificados de regalo: compra de un certificado de regalo'),\n 'T0010' => Mage::helper('paypalmx')->__('Auction Payment other than through eBay'),\n 'T0011' => Mage::helper('paypalmx')->__('Pago echos desde un telefono (echos por via telefonica)'),\n 'T0012' => Mage::helper('paypalmx')->__('Pagos por terminal virtual'),\n 'T0100' => Mage::helper('paypalmx')->__('General: sin cuota de pago, no perteneciente a la categoria T01xx'),\n 'T0101' => Mage::helper('paypalmx')->__('Cuota: Web Site Payments Pro Account Monthly'),\n 'T0102' => Mage::helper('paypalmx')->__('Cuota: Retiro foraneo de ACH'),\n 'T0103' => Mage::helper('paypalmx')->__('Cuota: Retiro de WorldLink Check'),\n 'T0104' => Mage::helper('paypalmx')->__('Cuota: solicitud de pagos masivos'),\n 'T0200' => Mage::helper('paypalmx')->__('General de conversion de moneda'),\n 'T0201' => Mage::helper('paypalmx')->__('Conversion de moneda usado por el usuario'),\n 'T0202' => Mage::helper('paypalmx')->__('Conversion de moneda requerido para cubrir el balance negativo'),\n 'T0300' => Mage::helper('paypalmx')->__('Fundacion general de la cuenta PayPal'),\n 'T0301' => Mage::helper('paypalmx')->__('Ayudante del balance PayPal funcion de la cuenta PayPal'),\n 'T0302' => Mage::helper('paypalmx')->__('ACH Fundacion para recuperacion de fondos del balance de la cuenta.'),\n 'T0303' => Mage::helper('paypalmx')->__('Fundacion EFT (Banco aleman)'),\n 'T0400' => Mage::helper('paypalmx')->__('Retiro general de la cuenta de Paypal'),\n 'T0401' => Mage::helper('paypalmx')->__('Limpiado Automático'),\n 'T0500' => Mage::helper('paypalmx')->__('General: Uso de la cuenta Paypal para comprar asi como para recibir pagos'),\n 'T0501' => Mage::helper('paypalmx')->__('Transaccion de Paypal tarjeto de debito virtual'),\n 'T0502' => Mage::helper('paypalmx')->__('Retiros de la tarjeta de debito PayPal del cajero automatico'),\n 'T0503' => Mage::helper('paypalmx')->__('Tranascciones escodndidas de la tarjeta de debito Virtual de PayPal'),\n 'T0504' => Mage::helper('paypalmx')->__('Avanzado Tarjeta de debito de PayPal'),\n 'T0600' => Mage::helper('paypalmx')->__('General: retiro de la cuenta de PayPalt'),\n 'T0700' => Mage::helper('paypalmx')->__('General (Compras con una tarjeta de credito)'),\n 'T0701' => Mage::helper('paypalmx')->__('Balance Negativo'),\n 'T0800' => Mage::helper('paypalmx')->__('General: bonus del tipo no perteneciente a las otras T08xx categories'),\n 'T0801' => Mage::helper('paypalmx')->__('Tarjeta de debito regreso de dinero'),\n 'T0802' => Mage::helper('paypalmx')->__('Bonus a referencias del comerciante'),\n 'T0803' => Mage::helper('paypalmx')->__('Bonus del ayudante'),\n 'T0804' => Mage::helper('paypalmx')->__('Bonus del seguro al comprador PayPal'),\n 'T0805' => Mage::helper('paypalmx')->__('Bonus de proteccion de PayPal'),\n 'T0806' => Mage::helper('paypalmx')->__('Bonus por primer uso de ACH'),\n 'T0900' => Mage::helper('paypalmx')->__('Redención General'),\n 'T0901' => Mage::helper('paypalmx')->__('Certificado de regalo de Redención'),\n 'T0902' => Mage::helper('paypalmx')->__('Points Incentive Redemption'),\n 'T0903' => Mage::helper('paypalmx')->__('Cupon de Redención'),\n 'T0904' => Mage::helper('paypalmx')->__('Reward Voucher Redemption'),\n 'T1000' => Mage::helper('paypalmx')->__('General. Product no longer supported'),\n 'T1100' => Mage::helper('paypalmx')->__('General: reversal of a type not belonging to the other T11xx categories'),\n 'T1101' => Mage::helper('paypalmx')->__('ACH Withdrawal'),\n 'T1102' => Mage::helper('paypalmx')->__('Debit Card Transaction'),\n 'T1103' => Mage::helper('paypalmx')->__('Reversal of Points Usage'),\n 'T1104' => Mage::helper('paypalmx')->__('ACH Deposit (Reversal)'),\n 'T1105' => Mage::helper('paypalmx')->__('Reversal of General Account Hold'),\n 'T1106' => Mage::helper('paypalmx')->__('Account-to-Account Payment, initiated by PayPal'),\n 'T1107' => Mage::helper('paypalmx')->__('Payment Refund initiated by merchant'),\n 'T1108' => Mage::helper('paypalmx')->__('Fee Reversal'),\n 'T1110' => Mage::helper('paypalmx')->__('Hold for Dispute Investigation'),\n 'T1111' => Mage::helper('paypalmx')->__('Reversal of hold for Dispute Investigation'),\n 'T1200' => Mage::helper('paypalmx')->__('General: adjustment of a type not belonging to the other T12xx categories'),\n 'T1201' => Mage::helper('paypalmx')->__('Chargeback'),\n 'T1202' => Mage::helper('paypalmx')->__('Reversal'),\n 'T1203' => Mage::helper('paypalmx')->__('Charge-off'),\n 'T1204' => Mage::helper('paypalmx')->__('Incentive'),\n 'T1205' => Mage::helper('paypalmx')->__('Reimbursement of Chargeback'),\n 'T1300' => Mage::helper('paypalmx')->__('General (Authorization)'),\n 'T1301' => Mage::helper('paypalmx')->__('Reauthorization'),\n 'T1302' => Mage::helper('paypalmx')->__('Void'),\n 'T1400' => Mage::helper('paypalmx')->__('General (Dividend)'),\n 'T1500' => Mage::helper('paypalmx')->__('General: temporary hold of a type not belonging to the other T15xx categories'),\n 'T1501' => Mage::helper('paypalmx')->__('Open Authorization'),\n 'T1502' => Mage::helper('paypalmx')->__('ACH Deposit (Hold for Dispute or Other Investigation)'),\n 'T1503' => Mage::helper('paypalmx')->__('Available Balance'),\n 'T1600' => Mage::helper('paypalmx')->__('Funding'),\n 'T1700' => Mage::helper('paypalmx')->__('General: Withdrawal to Non-Bank Entity'),\n 'T1701' => Mage::helper('paypalmx')->__('WorldLink Withdrawal'),\n 'T1800' => Mage::helper('paypalmx')->__('Buyer Credit Payment'),\n 'T1900' => Mage::helper('paypalmx')->__('General Adjustment without businessrelated event'),\n 'T2000' => Mage::helper('paypalmx')->__('General (Funds Transfer from PayPal Account to Another)'),\n 'T2001' => Mage::helper('paypalmx')->__('Settlement Consolidation'),\n 'T9900' => Mage::helper('paypalmx')->__('General: event not yet categorized'),\n );\n asort(self::$_eventList);\n }\n }",
"public static function createEvent(array $data)\n {\n $event = new \\echolibre\\google_wave\\Model\\Event;\n \n $event->type = $data['type'];\n $event->timestamp = $data['timestamp'];\n $event->modifiedBy = $data['modifiedBy'];\n $event->properties = new \\stdClass();\n \n if (isset($data['properties'])) {\n $event->properties = $data['properties'];\n }\n \n return $event;\n }",
"public static function create_type() {\n\t\tregister_post_type(\n\t\t\tself::TYPE,\n\t\t\tarray(\n\t\t\t\t'labels' => array(\n\t\t\t\t\t'name' => 'Events',\n\t\t\t\t\t'singular_name' => 'Event',\n\t\t\t\t\t'add_new_item' => 'Add new event',\n\t\t\t\t\t'not_found' => 'No events found',\n\t\t\t\t),\n\t\t\t\t'public' => true,\n\t\t\t\t'supports' => array( 'title' ),\n\t\t\t)\n\t\t);\n\t}",
"public function __construct()\n {\n parent::__construct('BaseEvent');\n }",
"public function __construct(ContractTypeRepository $contract_types)\n {\n $this->contract_types = $contract_types;\n }",
"public function __construct(?string $dateDeposit = null, ?string $depositCountry = null, ?string $depositZipCode = null, ?string $objectType = null, ?string $recipientCity = null, ?string $recipientCountry = null, ?string $recipientName = null, ?string $recipientRef = null, ?string $recipientZipCode = null, ?string $shipperCity = null, ?string $shipperRef = null, ?string $shipperZipCode = null, ?\\StructType\\Event $significantEvent = null, ?string $skybillNumber = null)\n {\n $this\n ->setDateDeposit($dateDeposit)\n ->setDepositCountry($depositCountry)\n ->setDepositZipCode($depositZipCode)\n ->setObjectType($objectType)\n ->setRecipientCity($recipientCity)\n ->setRecipientCountry($recipientCountry)\n ->setRecipientName($recipientName)\n ->setRecipientRef($recipientRef)\n ->setRecipientZipCode($recipientZipCode)\n ->setShipperCity($shipperCity)\n ->setShipperRef($shipperRef)\n ->setShipperZipCode($shipperZipCode)\n ->setSignificantEvent($significantEvent)\n ->setSkybillNumber($skybillNumber);\n }",
"function eventclass_payments()\n\t{\n\t\t$this->events[\"BeforeMoveNextList\"]=true;\n\n\t\t$this->events[\"AfterAdd\"]=true;\n\n\t\t$this->events[\"AfterEdit\"]=true;\n\n\n//\tonscreen events\n\n\t}",
"public static function _register()\n {\n self::assignElements([\n 'Type' => ['type' => 'MarkUpMarkDownEventTypeCodeType', 'enum' => true, 'xmlns' => self::XMLNS],\n 'Time' => [],\n 'Reason' => []\n ], parent::NAME);\n\n self::assignAttributes([]);\n }",
"public function postCreatePayPeriod(){\n \n $pay_period = new TimeTrackingPayPeriod();\n $this->postPayPeriod($pay_period);\n \n }",
"public function add_booking_discount( $types ) {\n $types['booking_person'] = __( 'Booking Person Discount (Amount Off Per Person)', 'dokan' );\n\n return $types;\n }",
"public function __construct(BaseEvent $baseEvent)\n {\n $this->baseEvent = $baseEvent;\n }",
"final private static function makeEvent(Sincronizacao $sincronizacao)\n {\n $endpoint = self::getEventEndpoint($sincronizacao->sym_table, $sincronizacao->sym_action);\n\n $dependencies = self::getDependencies($sincronizacao);\n $eventClass = self::getEventClass($endpoint);\n\n return new $eventClass($dependencies['entry'], $dependencies['extra']);\n }",
"function __construct ($strId)\n\t\t{\n\t\t\tparent::__construct ('ServiceStateType');\n\t\t\t\n\t\t\t$strName = 'Unknown';\n\t\t\t\n\t\t\tswitch ($strId)\n\t\t\t{\n\t\t\t\tcase SERVICE_STATE_TYPE_ACT:\n\t\t\t\t\t$strName = 'Australian Capital Territory';\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase SERVICE_STATE_TYPE_NSW:\n\t\t\t\t\t$strName = 'New South Wales';\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase SERVICE_STATE_TYPE_NT:\n\t\t\t\t\t$strName = 'Northern Territory';\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase SERVICE_STATE_TYPE_QLD:\n\t\t\t\t\t$strName = 'Queensland';\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase SERVICE_STATE_TYPE_SA:\n\t\t\t\t\t$strName = 'South Australia';\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase SERVICE_STATE_TYPE_TAS:\n\t\t\t\t\t$strName = 'Tasmania';\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase SERVICE_STATE_TYPE_VIC:\n\t\t\t\t\t$strName = 'Victoria';\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase SERVICE_STATE_TYPE_WA:\n\t\t\t\t\t$strName = 'Western Australia';\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t$this->oblstrType\t\t= $this->Push (new dataString\t('Id',\t\t$strId));\n\t\t\t$this->oblstrName\t\t= $this->Push (new dataString\t('Name',\t$strName));\n\t\t}",
"public function __construct($eventType = null)\n {\n $this\n ->setEventType($eventType);\n }",
"public static function createFromXML(\\SimpleXMLElement $xml)\n {\n $event = new Event();\n\n // loop attributes\n foreach ($xml->attributes() as $attributeName => $value) {\n $method = 'set' . ucfirst($attributeName);\n\n switch ($attributeName) {\n case 'availablefrom':\n $method = 'setAvailableFrom';\n $value = new \\DateTime($value);\n break;\n case 'availableto':\n $method = 'setAvailableTo';\n $value = new \\DateTime($value);\n break;\n case 'creationdate':\n $method = 'setCreationDate';\n $value = new \\DateTime($value);\n break;\n case 'lastupdated':\n $method = 'setLastUpdated';\n $value = new \\DateTime($value);\n break;\n case 'pctcomplete':\n $method = 'setPercentageComplete';\n $value = (int) $value;\n break;\n case 'isparent':\n $method = 'setIsParent';\n $value = ((string) $value == 'true');\n break;\n case 'published':\n case 'private':\n $value = ((string) $value == 'true');\n break;\n default:\n $value = (string) $value;\n }\n\n if (!method_exists($event, $method)) {\n if (UitDatabank::DEBUG) {\n throw new Exception('Unknown attribute: ' . $attributeName);\n }\n } else {\n call_user_func(array($event, $method), $value);\n }\n }\n\n // loop elements\n foreach ($xml as $element) {\n $value = null;\n $elementName = $element->getName();\n $method = 'set' . ucfirst($element->getName());\n\n switch ($elementName) {\n case 'calendar':\n $value = Calendar::createFromXML($element);\n break;\n case 'categories':\n if (isset($element->category)) {\n foreach ($element->category as $category) {\n $event->addCategory(\n Category::createFromXML($category)\n );\n }\n }\n break;\n case 'contactinfo':\n $value = ContactInfo::createFromXML($element);\n break;\n case 'eventdetails':\n if (isset($element->eventdetail)) {\n foreach ($element->eventdetail as $eventDetail) {\n $event->addEventDetail(\n EventDetail::createFromXML($eventDetail)\n );\n }\n }\n break;\n case 'languages':\n if (isset($element->language)) {\n foreach ($element->language as $language) {\n $event->addLanguage(\n Language::createFromXML($language)\n );\n }\n }\n break;\n case 'location':\n $value = Location::createFromXML($element);\n break;\n case 'organiser':\n $value = Organiser::createFromXML($element);\n break;\n case 'agefrom':\n $value = (int) $value;\n break;\n case 'bookingperiod':\n $value = Period::createFromXML($element);\n break;\n default:\n $value = (string) $value;\n break;\n }\n\n if (!method_exists($event, $method)) {\n if (UitDatabank::DEBUG) {\n throw new Exception('Unknown element: ' . $elementName);\n }\n } else {\n if ($value !== null) {\n call_user_func(array($event, $method), $value);\n }\n }\n }\n\n return $event;\n }",
"public function definition()\n {\n $price = $this->faker->randomFloat(8, 0.25, 46743.27); //BTC on 2021.09.14\n $amount = $this->faker->randomNumber(8);\n $timestamp = $this->faker->dateTime()->getTimestamp();\n\n return [\n 'event_type' => 'trade',\n 'event_time' => $timestamp,\n 'symbol' => $this->faker->randomElement(['xrpusd', 'xlmusd', 'btcusd']),\n 'trade_id' => $this->faker->randomNumber(5),\n 'price' => $price,\n 'quantity' => $amount,\n 'buyer_order_id' => $this->faker->randomNumber(5),\n 'seller_order_id' => $this->faker->randomNumber(5),\n 'trade_time' => $timestamp,\n 'buyer_is_the_market_maker' => $this->faker->boolean(),\n 'ignore' => $this->faker->boolean(),\n ];\n }",
"public function __construct($_startDate = NULL,$_endDate = NULL)\r\n\t{\r\n\t\tPayPalWsdlClass::__construct(array('StartDate'=>$_startDate,'EndDate'=>$_endDate));\r\n\t}",
"public function create(array $attributes = [])\n {\n return IncomeTypes::create($attributes);\n }",
"function create_lds_event($indirec, $eventName, $eventABV, $eParent)\n\t{\n\t\t//throw new exception(\"create_lds_event - this function is not implemented\");\n\t}",
"public function __construct(RdtEvent $rdtEvent, RdtInvitation $rdtInvitation)\n {\n $this->rdtEvent = $rdtEvent;\n $this->rdtInvitation = $rdtInvitation;\n }",
"public function __construct($_transactionID,$_status = NULL)\r\n\t{\r\n\t\tPayPalWsdlClass::__construct(array('TransactionID'=>$_transactionID,'Status'=>$_status));\r\n\t}",
"public function __construct()\n {\n parent::__construct(new WalletType);\n }"
]
| [
"0.50240695",
"0.4963597",
"0.49189267",
"0.47831592",
"0.47248018",
"0.46664563",
"0.46566236",
"0.4607767",
"0.4572097",
"0.4561144",
"0.4555454",
"0.45304328",
"0.4503911",
"0.44528607",
"0.44373566",
"0.4425131",
"0.44250995",
"0.44071388",
"0.44009224",
"0.44007167",
"0.43959475",
"0.43933198",
"0.4388852",
"0.43419048",
"0.4332108",
"0.43285668",
"0.43233654",
"0.43130168",
"0.43065038",
"0.43034816"
]
| 0.5629286 | 0 |
handles if given connector hash is valid | public function validateHash(array $args)
{
if (!empty($args['connectorHash'])) {
$cm = $this->getConnectorManager();
$valid = $cm->isHashValid($args['connectorHash']);
if (!$valid) {
// hash is invalid throw api error for 412
throw new DotbApiExceptionInvalidHash(
'EXCEPTION_CONNECTORS_META_OUT_OF_DATE',
null,
null,
0,
'connectors_meta_out_of_date'
);
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function valid_compte_hashValidation($hash){ \n\n\t\t$sql = \"UPDATE utilisateur SET ut_compte_valide = '1' WHERE ut_hash_validation = ?\";\n\t\t$res = $this->executerRequete($sql,array($hash));\n\t\t\treturn ($res->rowCount() == 1); // si 1 alors mise a jour ok\n\n\t\t}",
"public function validateHash($password, $hash);",
"private function hash_validation() { //check hash\n\n\t\t$testMode = getRequest('ik_pw_via');\n\n\t\tif(isset($testMode) && $testMode == 'test_interkassa_test_xts'){\n\t\t\t$secretKey = $this->object->test_key;\n\t\t} else {\n\t\t\t$secretKey = $this->object->secret_key;\n\t\t}\n\n\t\t$data = array();\n\n\t\tforeach ($_REQUEST as $key => $value) {\n if (!preg_match('/ik_/', $key)) continue;\n $data[$key] = $value;\n }\n\n\t\t$ik_sign = $data['ik_sign'];\n\t\t$sign = $this->createSign($data,$secretKey);\n\n\t\t$this->wrlog(\"hash: \".$sign);\n\t\t$this->wrlog(\"ik_sign: \".$ik_sign);\n\t\treturn $sign == $ik_sign ? true : false;\n\t}",
"function verify_hash($hash) // Colorize: green\n { // Colorize: green\n return isset($hash) // Colorize: green\n && // Colorize: green\n is_string($hash) // Colorize: green\n && // Colorize: green\n preg_match(MD5_HASH_REGEXP, $hash); // Colorize: green\n }",
"protected function validateChecksum() {\n\t}",
"public function checkContentHash() {}",
"public function isHash($data)\r\n {\r\n $pattern = '%(?:\\b|:|\\s)([A-Za-z0-9\\\\\\\\.]{13}|[A-Fa-f0-9]{8}|[A-Fa-f0-9]{16}|[A-Fa-f0-9]{32}|[A-Fa-f0-9]{40}|[A-Fa-f0-9]{64}|[a-f0-9]{15}|[a-f0-9]{40}|\\$\\d\\$([^$]*\\$)?[/.A-Za-z0-9]{8,64})(?:\\b|:|\\s)%im';\r\n if (preg_match($pattern, $data, $matches)) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }",
"public function validateHash($hash = null, $log_msg = '')\n\t{\n\t\tif (!$hash)\n\t\t{\n\t\t\t$hash = postval($this->getVarName());\n\t\t}\n\t\t\n\t\t/*if (mb_strlen($hash) > 13)\n\t\t{\n\t\t\tputlog(\"ABUSE\", \"%b%c13BOT-ABUSE:%c%b %u\".login::$user->player->data['up_name'].\"%u sendte hash %u$hash%u til %u{$_SERVER['REQUEST_URI']}%u (har ikke javascript?)\");\n\t\t\t$hash = mb_substr($hash, 0, 13);\n\t\t}*/\n\n\t\t// is this it?\n\t\tif (!$this->isUsed() && $this->checkHash($hash) && $this->setUsed())\n\t\t{\n\t\t\treturn true;\n\t\t}\n\n\t\t// it is either used, belongs to another form object or does not exists\n\t\t// find the form object by the hash (even if it is the same)\n\t\t$obj = static::getByHash($hash, $this->user);\n\t\tif ($obj && $obj->checkDomain($this->domain))\n\t\t{\n\t\t\t$obj->addFailedAttempt($log_msg);\n\t\t}\n\n\t\telse\n\t\t{\n\t\t\t// no object found\n\t\t\t$msg = (!empty($log_msg) ? '; Info: '.$log_msg : '');\n\t\t\tputlog(\"ABUSE2\", \"%c4%bFORMS-ABUSE:%b%c %u\".$this->user->player->data['up_name'].\"%u utførte formdata med ukjent hash!\"\n\t\t\t .\" (Area: %u\".$this->domain.\"%u; Hash: '\".$hash.$msg.\"')\");\n\t\t}\n\n\t\treturn false;\n\t}",
"static public function isValidApikeyHash($hash, $secureSalt)\n {\n global $vbulletin;\n $hash = rawurldecode($hash);\n \n // $randomSalt - random\n // $key = md5( md5($apikey.$secureSalt) . $randomSalt )\n // $hash = \"$key:$randomSalt\"\n \n if (!$hash OR !$secureSalt OR !$vbulletin->options['aitmagentovb_apikey']) return false;\n \n $hashArr = explode(':', $hash);\n if (count($hashArr) == 2)\n {\n $thisKey = $hashArr[0];\n $randomSalt = $hashArr[1];\n $apiKey = $vbulletin->options['aitmagentovb_apikey'];\n $realKey = md5( md5($apiKey . $secureSalt) . $randomSalt);\n if ($realKey == $thisKey)\n {\n $sql = '\n SELECT \n *,\n IF(`validthru` < NOW(), 1, 0) AS is_expired\n FROM `'.TABLE_PREFIX.'aitmagentovb_hash`\n WHERE `hash` = \"'.$hash.'\"\n '; \n // it's safe enough for non-escape usage of $hash here\n $hashRow = $vbulletin->db->query_first($sql);\n if ($hashRow AND $hashRow['hashid']) \n {\n $vbulletin->db->query_write('\n DELETE FROM `'.TABLE_PREFIX.'aitmagentovb_hash` \n WHERE `hashid`='.$hashRow['hashid']\n );\n \n if (!$hashRow['is_expired'] AND 'mage' == $hashRow['created_by'])\n {\n return true;\n }\n }\n }\n }\n \n return false;\n }",
"private function validateHashDigest($username, $stored_hash) {\n $this->debugPrint(\"Validating user's hash...\");\n\n /* Check if we've passed both the values we need */\n if (empty($username))\n callError(\"Internal Error: Username empty.\");\n if (empty($stored_hash))\n callError(\"Internal Error: Hash empty.\");\n\n /* Break apart the Digest response */\n if (!($digest_data = $this->parseDigest($_SERVER['PHP_AUTH_DIGEST']))) {\n $this->debugPrint(\"User passed invalid data.\");\n return false;\n }\n\n $a1 = $this->decrypt($stored_hash);\n\n /* Generate a valid response */\n $a2 = md5($_SERVER['REQUEST_METHOD'] . \":\" . $digest_data['uri']);\n $valid = md5($a1 . \":\" . $digest_data['nonce'] . \":\" . $digest_data['nc'] . \":\" . $digest_data['cnonce'] . \":\" . $digest_data['qop'] . \":\" . $a2);\n\n return $valid == $digest_data['response'];\n }",
"function CheckKey($hash,$name){\n\t\tglobal $secretKey; \n\t\t$checkHash = md5($name.$secretKey);\n\t\tif(strcmp($checkHash,$hash) == 0){\n\t\t\treturn 'pass'; //hash matches\n\t\t}else{\n\t\t\treturn 'fail'; //hash failed\n\t\t}\n\t}",
"function verifyPluginHash( &$pParamHash ){\n\t\tif( empty( $pParamHash['guid'] ) ){\n\t\t\t$this->mErrors['plugin']['guid'] = tra('A value for guid is required.');\n\t\t}\n\n\t\tif( empty( $pParamHash['package_guid'] ) ){\n\t\t\t$this->mErrors['plugin']['package_guid'] = tra('A value for package_guid is required.');\n\t\t}\n\n\t\tif( empty( $pParamHash['handler_file'] ) ){\n\t\t\t$this->mErrors['plugin']['handler_file'] = tra('A value for handler_file is required.');\n\t\t}\n\n\t\tif( count( $this->mErrors )== 0 ){\n\t\t\t$path_type = $this->getPackagePluginSchemaValue( $pParamHash['guid'], 'path_type', $pParamHash['package_guid'] );\n\n\t\t\t$pParamHash['plugin_store']['package_guid'] = $pParamHash['package_guid'];\n\t\t\t$pParamHash['plugin_store']['version'] = !empty( $pParamHash['version'] )?$pParamHash['version']:'0.0.0';\n\t\t\t$pParamHash['plugin_store']['active'] = (isset( $pParamHash['active'] ) && ( $pParamHash['active'] != TRUE || $pParamHash['active'] != 'y') )?'n':'y';\n\t\t $pParamHash['plugin_store']['required'] = (isset( $pParamHash['required'] ) && ( $pParamHash['required'] === TRUE || $pParamHash['required'] == 'y') )?'y':'n';\n\t\t\t$pParamHash['plugin_store']['name'] = !empty( $pParamHash['name'] )?$pParamHash['name']:ucfirst($pParamHash['guid']);\n\t\t\t$pParamHash['plugin_store']['description'] = !empty( $pParamHash['description'] )?$pParamHash['description']:NULL;\n\t\t\t$pParamHash['plugin_store']['path_type'] = !empty( $path_type )?$path_type:'package'; \t\t// if no path_type set we assume it came with the package\n\t\t\t$pParamHash['plugin_store']['handler_file'] = $pParamHash['handler_file'];\n\t\t\t$pParamHash['plugin_store']['pos'] = !empty( $pParamHash['pos'] )?$pParamHash['pos']:'1';\n\t\t}\n\n\t\treturn( count( $this->mErrors )== 0 );\n\t}",
"private function checkHash( $hash )\n {\n // The first 64 characters of the hash is the salt\n $salt = substr($hash, 0, 64);\n \n // create a new hash by append the password to the salt string\n $hashToCheck = $salt . $this->password;\n \n // Hash the password a bunch of times\n for ( $i = 0; $i < 100000; $i ++ ) {\n $hashToCheck = hash('sha256', $hashToCheck);\n }\n \n $hashToCheck = $salt . $hashToCheck;\n \n // check the local hash with the database hash\n if( $hash == $hashToCheck )\n return true;\n \n // return false if no match\n return false;\n }",
"public function compareHash($hash)\n {\n // No Need to Compare Hash, Hashing is Not Required\n if (config('prionapi.auth_method') == 'single') {\n return true;\n }\n\n $serverHash = $this->hash;\n if ($hash != $serverHash) {\n app()->make('error')->code('2010');\n }\n\n return true;\n }",
"static function check($password, $hash) {\n if (starts_with($hash, '$2a$')) {\n $salt = substr($hash, 0, 19);\n }elseif (starts_with($hash, '$6$')) {\n $salt = substr($hash, 0, 19);\n }else{\n throw new Exception('Unknown hash type: '.$hash);\n }\n return crypt($password, $salt) === $hash;\n }",
"function password_is_hash($password)\r\n{\r\n $nfo = password_get_info($password);\r\n return $nfo['algo'] != 0;\r\n}",
"function hashExists($hash);",
"public function validate_hash( $req_id, $json, $die_on_failure = true ) {\r\n\t\tif ( defined( 'WPMUDEV_IS_REMOTE' ) && ! WPMUDEV_IS_REMOTE ) {\r\n\t\t\tif ( $die_on_failure ) {\r\n\t\t\t\twp_send_json_error(\r\n\t\t\t\t\tarray(\r\n\t\t\t\t\t\t'code' => 'remote_disabled',\r\n\t\t\t\t\t\t'message' => 'Remote calls are disabled in wp-config.php'\r\n\t\t\t\t\t)\r\n\t\t\t\t);\r\n\t\t\t} else {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif ( empty( $_SERVER['HTTP_WDP_AUTH'] ) ) {\r\n\t\t\tif ( $die_on_failure ) {\r\n\t\t\t\twp_send_json_error(\r\n\t\t\t\t\tarray( 'code' => 'missing_auth_header', 'message' => 'Missing authentication header' )\r\n\t\t\t\t);\r\n\t\t\t} else {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$hash = $_SERVER['HTTP_WDP_AUTH'];\r\n\t\t$api_key = WPMUDEV_Dashboard::$api->get_key();\r\n\r\n\t\t$hash_string = $req_id . $json;\r\n\r\n\t\t$valid = hash_hmac( 'sha256', $hash_string, $api_key );\r\n\r\n\t\t$is_valid = hash_equals( $valid, $hash ); //Timing attack safe string comparison, PHP <5.6 compat added in WP 3.9.2\r\n\t\tif ( ! $is_valid && $die_on_failure ) {\r\n\t\t\twp_send_json_error(\r\n\t\t\t\tarray( 'code' => 'incorrect_auth', 'message' => 'Incorrect authentication' )\r\n\t\t\t);\r\n\t\t}\r\n\r\n\t\t//check nonce to prevent replay attacks\r\n\t\tlist( $req_id, $timestamp ) = explode( '-', $req_id );\r\n\t\t$nonce = WPMUDEV_Dashboard::$site->get_option( 'hub_nonce' );\r\n\t\tif ( floatval( $timestamp ) > $nonce ) {\r\n\t\t\tWPMUDEV_Dashboard::$site->set_option( 'hub_nonce', floatval( $timestamp ) );\r\n\t\t} else {\r\n\t\t\twp_send_json_error(\r\n\t\t\t\tarray( 'code' => 'nonce_failed', 'message' => 'Nonce check failed' )\r\n\t\t\t);\r\n\t\t}\r\n\r\n\r\n\t\tif ( ! defined( 'WPMUDEV_IS_REMOTE' ) ) {\r\n\t\t\tdefine( 'WPMUDEV_IS_REMOTE', $is_valid );\r\n\t\t}\r\n\r\n\t\treturn $is_valid;\r\n\t}",
"function checkHashBL() {\n\t $isCorrect = false;\t \n\t // If the user exists\n\t if ( checkUserIdDAL($_POST['userId']) )\n\t {\n\t // Create the hash corresponding to the input password with the Blowfish algorithm\n\t $inputHash = hash('sha512',$_POST['password']);\n\t // Get the hash corresponding to the userId from the database\n\t $databaseHash = getHashDAL($_POST['userId']);\n\t\t// If the hash is correct\n\t\t if ( $databaseHash == $inputHash )\n\t\t {\n\t\t\t$isCorrect = true;\n\t\t }\n\t }\n\t return $isCorrect;\n }",
"function testHash()\n {\n $this->assertEqual($this->referenceHash, auth::hashString($this->referenceClear), \"Testing hash consistency.\");\n }",
"function phpbb_check_hash($password, $hash)\n{\n\t$itoa64 = './0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz';\n\tif (strlen($hash) == 34)\n\t{\n\t\treturn (_hash_crypt_private($password, $hash, $itoa64) === $hash) ? true : false;\n\t}\n\n\treturn (md5($password) === $hash) ? true : false;\n}",
"public function checkHash(&$aResponse)\n {\n // checks hash2 and newly generated hash - returns false if both are differed\n if ($aResponse['hash2'] != $this->_generateHash($aResponse))\n return false;\n\n $this->_getDecodeData($aResponse, array( 'auth_code', 'product', 'tariff', 'amount', 'test_mode', 'uniqid' ));\n }",
"public function testUnknownHash()\n {\n $this->setExpectedException(\n function_exists( 'password_hash' )\n ? 'PHPUnit_Framework_Error'\n : 'InvalidArgumentException'\n );\n\n Password::hash( $this->examplePassword, -1 );\n }",
"function verifyHash(string $hash, string $string): bool\n{\n return ($hash == crypt($string, $hash));\n}",
"protected function is_hash_digest_valid() {\r\n\t\t$result = false;\r\n\t\t$data = $this->build_variables_string();\r\n\t\tif ( $data ) {\r\n\t\t\t$hash_digest_received = self::get_post_var( 'HashDigest' );\r\n\t\t\t$hash_digest_calculated = $this->calculate_hash_digest( $data, 'SHA1', get_option( 'paymentsense_preshared_key' ) );\r\n\t\t\t$result = strToUpper( $hash_digest_received ) === strToUpper( $hash_digest_calculated );\r\n\t\t}\r\n\t\treturn $result;\r\n\t}",
"public static function chlogCheckHash($data, $hash) {\n return password_verify($data, $hash);\n }",
"function external_check_password($password, $hash, $user_id = '')\n{\n if (strlen($hash) <= 32) {\n $check = ( $hash == md5($password) );\n if ($check && $user_id) {\n // Rehash using new hash.\n external_set_password($password, $user_id);\n $hash = external_hash_password($password);\n }\n\n return apply_filters('check_password', $check, $password, $hash, $user_id);\n }\n\n // If the stored hash is longer than an MD5, presume the\n // new style phpass portable hash.\n $external_hasher = new PasswordHash(8, FALSE);\n\n $check = $external_hasher->CheckPassword($password, $hash);\n\n return apply_filters('check_password', $check, $password, $hash, $user_id);\n}",
"function validate_password($hashed_password, $cleartext_password) {\n if (!is_string($hashed_password) || !is_string($cleartext_password))\n return false;\n if (config\\HASHING_ALGORITHM == \"crypt\") {\n $salt_end = strrpos($hashed_password, \"$\");\n if ($salt_end === false) {\n // DES, first two charachers is salt.\n $salt = substr($hashed_password, 0, 2);\n } else {\n // Salt before $.\n $salt_end++;\n $salt = substr($hashed_password, 0, $salt_end);\n }\n return crypt($cleartext_password, $salt) == $hashed_password;\n } else if (config\\HASHING_ALGORITHM == \"sha1\") {\n if (strlen($hashed_password) != 80)\n return false;\n $salt = substr($hashed_password, 0, 40);\n $hash = substr($hashed_password, 40);\n return $hash == sha1($salt . $cleartext_password, false);\n } else if (config\\HASHING_ALGORITHM == \"md5\") {\n if (strlen($hashed_password) != 64)\n return false;\n $salt = substr($hashed_password, 0, 32);\n $hash = substr($hashed_password, 32);\n return $hash == sha1($salt . $cleartext_password, false);\n } else\n trigger_error(\"The configured hashing algorithm '\" . config\\HASHING_ALGORITHM . \"' is not supported.\", \\E_USER_ERROR);\n}",
"public function validateHashOrAlert($hash = null, $log_msg = '')\n\t{\n\t\t$res = $this->validateHash($hash, $log_msg);\n\t\tif (!$res)\n\t\t{\n\t\t\t\\ess::$b->page->add_message($this->invalidText, \"error\");\n\t\t}\n\n\t\treturn $res;\n\t}",
"public function checkHash($string, $hash)\n {\n $path = $this->buildPath(static::CHHASH_ENDPOINT);\n\n $data = [ \n 'string' => $string,\n 'hash' => $hash\n ];\n\n $request = $this->performRequest('POST', $path, ['body' => $data]);\n return $request->data->valid;\n }"
]
| [
"0.62204945",
"0.6210698",
"0.6137567",
"0.61097914",
"0.5977902",
"0.59247816",
"0.5880834",
"0.5870791",
"0.5834529",
"0.5796652",
"0.5700268",
"0.5693106",
"0.56841606",
"0.56671655",
"0.5655448",
"0.5638411",
"0.56305283",
"0.56303585",
"0.5620119",
"0.5605997",
"0.5604783",
"0.55909014",
"0.5568672",
"0.55670047",
"0.5554278",
"0.55176693",
"0.55164343",
"0.5507106",
"0.5504457",
"0.54933083"
]
| 0.6839638 | 0 |
Transform the \ContactGroup entity | public function transform(ContactGroup $model)
{
return [
'id' => $model->id,
'org_id' => $model->org_id,
'name' => $model->name,
'description' => $model->description
];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function parseContacts($data, $contactGroup) {\n $contactGroup['contacts'] = [];\n if ($data) {\n $contacts = [];\n foreach($data as $contact) {\n $newContact = [];\n $newContact['accounting_id'] = IndexSanityCheckHelper::indexSanityCheck('ContactID',$contact);\n $newContact['name'] = IndexSanityCheckHelper::indexSanityCheck('Name',$contact);\n array_push($contacts, $newContact);\n }\n $contactGroup['contacts'] = $contacts;\n }\n\n return $contactGroup;\n }",
"public function addContactToGroup($request, $group_id){\n\n $contacts = $request->input('contacts');\n\n if(!empty($contacts)){\n foreach ($contacts as $key => $value) {\n $obj = new ContactGroup();\n $obj->account_id = $this->getAccountId();\n //$obj->extn = $this->extn;\n $obj->group_id = $group_id;\n $obj->contact_id = $value;\n $obj->save();\n }\n $this->updateGroupContactNumber($group_id, count($contacts));\n return $this->processServiceResponse(true, \"Contact Added Successfully!\", $contacts);\n }\n return $this->processServiceResponse(false, \"Contact Added Failed!\", $contacts);\n }",
"private function parseGroups()\n\t{\n\t\t/**\n\t\t * Grupos\n\t\t */\n\t\t$groups = $this->habbo->groups;\n\n\t\t/**\n\t\t * Convertirlos a Entity\n\t\t */\n\t\tforeach( $groups as $group )\n\t\t\t$this->addGroup( new Group( $group ) );\n\t}",
"function acf_translate_field_group( $field_group = array() ) {\n\treturn acf_translate_internal_post_type( $field_group, 'acf-field-group' );\n}",
"public function getContactGroups(){\n $contactGroups = [];\n foreach ($this->data as $contactGroup) {\n $newContactGroup = [];\n $newContactGroup['accounting_id'] = IndexSanityCheckHelper::indexSanityCheck('ContactGroupID', $contactGroup);\n $newContactGroup['name'] = IndexSanityCheckHelper::indexSanityCheck('Name', $contactGroup);\n $newContactGroup['status'] = IndexSanityCheckHelper::indexSanityCheck('Status', $contactGroup);\n if (IndexSanityCheckHelper::indexSanityCheck('Contacts', $contactGroup)) {\n $newContactGroup = $this->parseContacts($contactGroup['Contacts'], $newContactGroup);\n }\n array_push($contactGroups, $newContactGroup);\n }\n\n return $contactGroups;\n }",
"function acf_prepare_field_group_for_export( $field_group = array() ) {\n\treturn acf_prepare_internal_post_type_for_export( $field_group, 'acf-field-group' );\n}",
"public function getContactGroups(){\n $contactGroups = [];\n foreach ($this->data as $contactGroup) {\n $newContactGroup = [];\n $newContactGroup['accounting_id'] = IndexSanityCheckHelper::indexSanityCheck('ContactGroupID', $contactGroup);\n $newContactGroup['name'] = IndexSanityCheckHelper::indexSanityCheck('Name', $contactGroup);\n $newContactGroup['status'] = IndexSanityCheckHelper::indexSanityCheck('Status', $contactGroup);\n array_push($contactGroups, $newContactGroup);\n }\n\n return $contactGroups;\n }",
"function buildGroup($entity) {\n // The the standard group name.\n $group = parent::buildGroup($entity);\n // Add the scheme.\n if ($this->conf['group_by_scheme']) {\n // Get all stream wrappers.\n $stream_wrapper = file_get_stream_wrappers();\n $group .= ' · ' . $stream_wrapper[file_uri_scheme($entity->uri)]['name'];\n }\n return $group;\n }",
"private static function GroupResult2GroupRecord(\\stdClass $group){\n\t\t\tif(isset(\n\t\t\t\t$group->GroupID,\n\t\t\t\t$group->GroupName,\n\t\t\t\t$group->Charter,\n\t\t\t\t$group->GroupPicture,\n\t\t\t\t$group->FounderID,\n\t\t\t\t$group->MembershipFee,\n\t\t\t\t$group->OpenEnrollment,\n\t\t\t\t$group->ShowInList,\n\t\t\t\t$group->AllowPublish,\n\t\t\t\t$group->MaturePublish,\n\t\t\t\t$group->OwnerRoleID\n\t\t\t) === false){\n\t\t\t\tthrow new UnexpectedValueException('Call to API was successful, but required response sub-properties were missing.');\n\t\t\t}\n\t\t\treturn WebUI\\GroupRecord::r(\n\t\t\t\t$group->GroupID,\n\t\t\t\t$group->GroupName,\n\t\t\t\t$group->Charter,\n\t\t\t\t$group->GroupPicture,\n\t\t\t\t$group->FounderID,\n\t\t\t\t$group->MembershipFee,\n\t\t\t\t$group->OpenEnrollment,\n\t\t\t\t$group->ShowInList,\n\t\t\t\t$group->AllowPublish,\n\t\t\t\t$group->MaturePublish,\n\t\t\t\t$group->OwnerRoleID\n\t\t\t);\n\t\t}",
"function acf_prepare_field_group_for_import( $field_group ) {\n\treturn acf_prepare_internal_post_type_for_import( $field_group, 'acf-field-group' );\n}",
"function acf_prepare_field_group_for_export($field_group = array())\n{\n}",
"public function mapToModel($contact);",
"protected function applyGroup(XsdGroup $group)\n {\n // It provides for naming a model group for use by reference in the XML representation of complex type \n // definitions and model groups. The correspondences between the properties of the information item and \n // properties of the component it corresponds to are as follows:\n \n // <group\n // id = ID\n // maxOccurs = (nonNegativeInteger | unbounded) : 1\n // minOccurs = nonNegativeInteger : 1\n // name = NCName\n // ref = QName\n // {any attributes with non-schema namespace . . .}>\n // Content: (annotation?, (all | choice | sequence)?)\n // </group>\n \n // Мать вашу, какому идиоту понадобилось использовать группы???\n throw new Exception('Мать вашу, какому идиоту понадобилось использовать группы???');\n }",
"function acf_prepare_field_group_for_import($field_group)\n{\n}",
"function &_returnGroupFromRow(&$row) {\n\t\t$group = $this->newDataObject();\n\t\t$group->setId($row['group_id']);\n\t\t$group->setAboutDisplayed($row['about_displayed']);\n\t\t$group->setPublishEmail($row['publish_email']);\n\t\t$group->setSequence($row['seq']);\n\t\t$group->setContext($row['context']);\n\t\t$group->setAssocType($row['assoc_type']);\n\t\t$group->setAssocId($row['assoc_id']);\n\t\t$this->getDataObjectSettings('group_settings', 'group_id', $row['group_id'], $group);\n\n\t\tHookRegistry::call('GroupDAO::_returnGroupFromRow', array(&$group, &$row));\n\n\t\treturn $group;\n\t}",
"private function setCustomerGroupValue()\n {\n $value = $this->getData(self::$groupAttributeCode);\n try {\n $group = $this->groupRepository->getById($value);\n $this->setCustomAttribute(self::$groupAttributeCode, $group->getCode());\n } catch (NoSuchEntityException $e) {\n $this->setCustomAttribute(self::$groupAttributeCode, 'N/A');\n }\n }",
"function acf_translate_field_group($field_group = array())\n{\n}",
"public function removeContactGroupAction($id_contact, $id_group) {\n\t\t$this->group->id = $id_group;\n\t\t$this->group->id_contact = $id_contact;\n\t\treturn $this->group->removeContactGroup();\n\t}",
"public function group()\n {\n return $this->hasMany('Antares\\Customfields\\Model\\FieldGroup', 'category_id', 'id');\n }",
"abstract protected function _buildGroupBy( $group );",
"public function Group($field,$group){\n $this->_groups[$field] = array_merge($group,array(\"currentGroup\" => \"?\", \"currentMsg\" => \"\"));\n }",
"function Inscription_Handle_Collaborations_Group($group)\n {\n if (empty($group)) { $group=\"Collaborations\"; }\n \n if (empty($this->ItemDataSGroups[ $group ]))\n {\n $this->ItemDataSGroups[ $group ]=\n $this->ReadPHPArray(\"System/Inscriptions/SGroups.\".$group.\".php\");\n }\n\n return $group;\n }",
"function addToGroup($group)\n {\n $this->_api->doRequest(\"PUT\", \"{$group->getBaseApiPath()}/contacts/{$this->id}\"); \n $this->_group_ids_set[$group->id] = true; \n }",
"public function updateGroupContactNumber($group_id, $num_contacts){\n $updateList = Group::find($group_id);\n if($updateList){\n $updateList->num_contacts = $updateList->num_contacts + $num_contacts;\n $updateList->save();\n }\n }",
"public function postGroup()\n {\n $group = $this->em->newEntity( 'friends\\model\\Group' );\n $loadable = $this->role->applyLoadable( $group );\n $loadable->loadData();\n if( $loadable->validate() )\n {\n $active = $this->role->applyActive( $group );\n $active->save();\n $jump = $this->view->get( 'appUrl' ) . 'group';\n header( 'Location: ' . $jump );\n exit;\n }\n return $this->getGroup();\n }",
"public static function group(Api\\GroupCreate $group)\n {\n $fields = [];\n\n if ($group->getName() != null) {\n $fields['name'] = $group->getName();\n }\n\n if (!empty($group->getMembers())) {\n $fields['members'] = $group->getMembers();\n }\n\n if (!empty($group->getChildGroups())) {\n $fields['child_groups'] = $group->getChildGroups();\n }\n\n if ($group->getAutoUpdate() != null) {\n $fields['auto_update'] = Serialize::_groupAutoUpdateHelper(\n $group->getAutoUpdate()\n );\n }\n\n if (!empty($group->getTags())) {\n $fields['tags'] = $group->getTags();\n }\n\n return Serialize::_toJson($fields);\n }",
"public function groupBy($group=null)\n {\n $group = LambdaUtils::toSelectCallable($group);\n\n $result = new ObjectArray(array());\n if($this instanceof ObjectArray)\n {\n $result = $this->newInstance();\n }\n\n foreach($this as $record)\n {\n $key = call_user_func($group, $record);\n\n $data = array();\n if($this->__converter instanceof IListConverter)\n {\n $data = $this->newConverterInstance();\n }\n $newitemtype = new ArrayList($data);\n\n $result->get($key, $newitemtype, true)->add($record);\n }\n\n return $result;\n }",
"public function meta(): Group;",
"public function format()\n {\n $result = array();\n\n foreach ($this->groups as $group) {\n $result[] = array(\n 'id' => $group->getInternalId(),\n 'external_id' => $group->getExternalId(),\n 'value' => $group->getName(),\n 'label' => $group->getName(),\n );\n }\n\n return $result;\n }",
"public function actionGroup()\n {\n $query = $this->user->getContactGroups();\n\n $dataProvider = new ActiveDataProvider([\n 'query' => $query,\n 'sort'=> [\n 'defaultOrder' => [\n 'name' => SORT_ASC,\n ],\n ],\n ]);\n\n return $this->render('group/index', [\n 'dataProvider' => $dataProvider,\n ]);\n }"
]
| [
"0.60255605",
"0.57956856",
"0.55557865",
"0.55095255",
"0.5487097",
"0.54014796",
"0.5331914",
"0.5316126",
"0.5301569",
"0.52960724",
"0.5271924",
"0.527151",
"0.5235497",
"0.5210859",
"0.519019",
"0.5148069",
"0.5136212",
"0.5135771",
"0.51137406",
"0.5105334",
"0.5102308",
"0.5090085",
"0.5071325",
"0.5021622",
"0.5016676",
"0.5012026",
"0.5009906",
"0.49923745",
"0.49738672",
"0.496437"
]
| 0.66498 | 0 |
Core::getCourier Online Booking delivered() | public function getCourier_list_booking_delivered()
{
$sql = "SELECT a.id, a.order_inv, a.r_name, a.c_driver, a.r_address, a.r_dest, a.r_city, a.r_curren, a.r_costtotal, a.r_description, a.total_insurance, a.total_tax, a.payment_status, a.pay_mode, a.created, a.r_hour, a.status_courier, a.act_status, a.con_status, s.mod_style, s.color FROM add_courier a, styles s WHERE a.status_courier=s.mod_style AND a.username = '".$this->username."' AND a.status_courier='Delivered' ORDER BY a.id ASC";
$row = self::$db->fetch_all($sql);
return ($row) ? $row : 0;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getDeliveredCount()\n {\n return $this->deliveredCount;\n }",
"public function isReadyForIssuing()\n {\n return $this->isFeePaid();\n }",
"public function isRedelivered();",
"public function getDeliveries()\n {\n return $this->deliveries;\n }",
"public function get_booked() {\n return $this->booked;\n }",
"public function isDelivered() {\r\n\r\n\t\tself::errorReset();\r\n\t\t$this->reload();\r\n\t\treturn InputValidator::isEmpty($this->deliveryDate) ? false: true;\r\n\t}",
"public function getTotalDeliveredQuantity()\n {\n return $this->totalDeliveredQuantity;\n }",
"public function getDeliveryOrder();",
"public function getDeliverable()\n {\n return false;\n }",
"public function hasBoothfee(){\n return $this->_has(6);\n }",
"public function getTotalRefunded();",
"public function getTotalOnlineRefunded();",
"public function getTimeDelivery()\n {\n return $this->timeDelivery;\n }",
"public function getDeliveryReport();",
"public function isDeliverable()\n {\n $deliverable = false;\n\n foreach ($this->getItems() as $item) {\n if ($item->Deliverable) {\n $deliverable = true;\n }\n }\n\n return $deliverable;\n }",
"public function getShippingRefunded();",
"public function getCollected(){\n return $this->aCollected;\n }",
"public function getSatoshisReceived();",
"public function getShippingInvoiced();",
"public function IsBookable()\n\t{\treturn $this->details['tqty'] > $this->details['tbooked'];\n\t}",
"public function getSubtotalRefunded();",
"public function getDelivery()\n {\n return $this->delivery;\n }",
"public function isBounced()\n {\n return $this->getBounceTime() > 0;\n }",
"function on_backorder() {\n\t\treturn ($this->_item_availability->available_to_promise <= $this->backorder_quantity);\n\t}",
"protected function payForBooking($args) {\n\n if ($args['ent_appnt_dt'] == '' || $args['ent_date_time'] == '')\n return $this->_getStatusMessage(1, 1);\n\n $this->curr_date_time = urldecode($args['ent_date_time']);\n\n $args['ent_appnt_dt'] = urldecode($args['ent_appnt_dt']);\n\n $returned = $this->_validate_token($args['ent_sess_token'], $args['ent_dev_id'], '2');\n\n if (is_array($returned))\n return $returned;\n\n $getApptDetQry = \"select a.duration,a.distance_in_mts,a.coupon_code,a.tip_amount as tip,a.discount,a.meter_fee as meter,a.parking_fee as parking,a.toll_fee as toll,a.airport_fee as airport,a.status,a.payment_type,a.appt_lat,a.appt_long,a.drop_lat,a.drop_long,a.address_line1,a.address_line2,a.created_dt,a.arrive_dt,a.appointment_dt,a.amount,a.appointment_id,a.last_modified_dt,(select email from master where mas_id = a.mas_id) as master_email from appointment a where a.appointment_dt = '\" . $args['ent_appnt_dt'] . \"' and a.slave_id = '\" . $this->User['entityId'] . \"' and a.status = 9\";\n $apptDet = mysql_fetch_assoc(mysql_query($getApptDetQry, $this->db->conn));\n\n if ($apptDet['status'] == '4')\n return $this->_getStatusMessage(41, 3);\n\n if ($apptDet['status'] == '5')\n return $this->_getStatusMessage(82, 3);\n\n $masData = $this->_getEntityDet($apptDet['master_email'], '1');\n\n\n $transferString = '';\n\n// $message = \"Payment completed for booking dated \" . date('d-m-Y h:i a', strtotime($apptDet['appointment_dt'])) . \" on \" . $this->appName . \"!\";\n\n $tipText = \"\";\n\n if ($apptDet['tip'] > 0)\n $tipText = \" with tip \" . $apptDet['tip'];\n\n $transferAmt = (((float) $apptDet['amount']) * (90 / 100));\n\n if ($apptDet['payment_type'] == '1') {\n\n $message = \"You have received payment via card for booking id \" . $apptDet['appointment_id'] . \" on \" . $tipText . date('d-m-Y h:i a', strtotime($apptDet['appointment_dt'])) . \".\";\n\n $chargeCustomerArr = array('stripe_id' => $this->User['stripe_id'], 'amount' => (int) ((float) $apptDet['amount'] * 100), 'currency' => 'USD', 'description' => 'From ' . $this->User['email']);\n\n $customer = $this->stripe->apiStripe('chargeCard', $chargeCustomerArr);\n\n if ($customer['error'])\n $charge = array('errNum' => 16, 'errFlag' => 1, 'errMsg' => $customer['error']['message'], 'test' => 1);\n\n $gatewayCommision = (float)($apptDet['amount'] * (2.9 / 100)) + 0.3;\n\n $appCommision = (float)(($apptDet['amount']) * (10 / 100));//$apptDet['amount'] - $transferAmt;\n\n $mas = (((float) ($apptDet['amount']) - $appCommision) - $gatewayCommision); //$transferAmt - $appCommision - $gatewayCommision;\n \n $transferString = \", mas_earning = '\" . round($mas, 2) . \"', pg_commission = '\" . $gatewayCommision . \"',app_commission = '\" . $appCommision . \"'\";\n }else if ($apptDet['payment_type'] == '2') {\n\n $appCommision = $apptDet['amount'] - $transferAmt;\n\n $transferString = \", mas_earning = '\" . round($transferAmt, 2) . \"', app_commission = '\" . $appCommision . \"'\";\n\n $message = \"You have received payment via cash for booking id \" . $apptDet['appointment_id'] . \" on \" . $tipText . date('d-m-Y h:i a', strtotime($apptDet['appointment_dt'])) . \".\";\n }\n\n $duration_in_mts = $apptDet['duration']; //round(abs(strtotime($this->curr_date_time) - strtotime($apptDet['arrive_dt'])) / 60, 2);\n// $fare = number_format((float) (($distance_in_mtr / $this->distanceMetersByUnits) * $typeData['price_per_km']), 2, '.', '');\n// $distance_in_mts = $apptDet['distance_in_mts'];\n\n $dis_in_km = (float) ($apptDet['distance_in_mts'] / $this->distanceMetersByUnits);\n\n// $dis_in_miles = (float) ($distance_in_mts / 1609.36);\n\n $speed_in_mts = $dis_in_km / ($duration_in_mts / 60);\n\n $apptDet['invoice_id'] = 'RY' . str_pad($apptDet['appointment_id'], 6, '0', STR_PAD_LEFT);\n\n $apptDet['speed_in_mts'] = $speed_in_mts;\n\n $apptDet['appt_duration'] = $duration_in_mts;\n\n $apptDet['appt_distance'] = round($dis_in_km, 4);\n\n $apptDet['final_amount'] = $apptDet['amount'];\n\n $mail = new sendAMail($this->host);\n $invoMail = $mail->sendInvoice($masData, $this->User, $apptDet);\n\n $updateInvoiceDetailsQry = \"update appointment set payment_status = '1',inv_id = '\" . $apptDet['invoice_id'] . \"'\" . $transferString . \" where appointment_id = '\" . $apptDet['appointment_id'] . \"'\"; //mas_id = '\" . $masData['mas_id'] . \"' and slave_id = '\" . $this->User['entityId'] . \"' and \n mysql_query($updateInvoiceDetailsQry, $this->db->conn);\n\n $aplPushContent = array('alert' => $message, 'nt' => '11', 'n' => $this->User['firstName'] . ' ' . $this->User['last_name'], 'd' => $args['ent_appnt_dt'], 'e' => $this->User['email']);\n $andrPushContent = array(\"payload\" => $message, 'action' => '11', 'sname' => $this->User['firstName'] . ' ' . $this->User['last_name'], 'dt' => $args['ent_appnt_dt'], 'smail' => $this->User['email']);\n\n $this->ios_cert_path = $this->ios_roadyo_pas;\n $this->ios_cert_pwd = $this->ios_pas_pwd;\n $this->androidApiKey = $this->slaveApiKey;\n $push = $this->_sendPush($this->User['entityId'], array($masData['mas_id']), $message, '11', $this->User['email'], $this->curr_date_time, '1', $aplPushContent, $andrPushContent);\n $out = array('push' => $push, 'charge' => $charge, 'tr' => $transfer, 'invoice' => $invoMail, 'qry' => $updateInvoiceDetailsQry . $getApptDetQry);\n return $this->_getStatusMessage(84, $out);\n }",
"public function getCourier_deliveries_list()\n {\n $sql = \"SELECT a.id, a.order_inv, a.c_driver, a.r_address, a.created, a.r_hour, a.status_courier, a.act_status, s.mod_style, s.color FROM consolidate a, styles s WHERE a.status_courier=s.mod_style AND a.c_driver = '\".$this->username.\"' AND a.act_status=1 ORDER BY a.id ASC\";\n $row = self::$db->fetch_all($sql);\n \n return ($row) ? $row : 0;\n }",
"function show_estimated_ship_date_new_subscription_orders_email( $order ) { \n $item = array_pop( $order->get_items() );\n if ( $order->status == 'processing' && $item['name'] != 'Try or Gift' ) {\n echo '<h2>Estimated Shipment Date</h2>';\n echo '<p>Your package ships by: <strong>' . new_orders_next_subscription_ship_date( $order->order_date ) . '</strong>.</p>';\n }\n}",
"public function getDiscountRefunded();",
"public function isInvoiced() {\n\t\treturn true;\n\t}",
"public function getBookingChannel()\n {\n return $this->bookingChannel;\n }"
]
| [
"0.631243",
"0.6241944",
"0.60767645",
"0.5952808",
"0.5925427",
"0.5905212",
"0.5860488",
"0.582135",
"0.5814719",
"0.57733107",
"0.5763579",
"0.5735767",
"0.57323754",
"0.5717282",
"0.57066816",
"0.56492406",
"0.560451",
"0.5557361",
"0.5552874",
"0.5543098",
"0.5499387",
"0.5464533",
"0.54315656",
"0.5429839",
"0.54292786",
"0.54150975",
"0.541483",
"0.5403261",
"0.5381151",
"0.53656995"
]
| 0.7154301 | 0 |
Core::getCourier Online Deliveries list() | public function getCourier_deliveries_list()
{
$sql = "SELECT a.id, a.order_inv, a.c_driver, a.r_address, a.created, a.r_hour, a.status_courier, a.act_status, s.mod_style, s.color FROM consolidate a, styles s WHERE a.status_courier=s.mod_style AND a.c_driver = '".$this->username."' AND a.act_status=1 ORDER BY a.id ASC";
$row = self::$db->fetch_all($sql);
return ($row) ? $row : 0;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getDeliveries()\n {\n return $this->deliveries;\n }",
"function get_export_list(){\n\n\t\t$output = array();\n\n\t\t$query = \"SELECT lead_id FROM leads_pending\n\t\tWHERE sent_fes = 0\n\t\tLIMIT 60000; \";\n\n\t\tif ($result = mysql_query($query, $this->conn)){\n\t\t\twhile($row = mysql_fetch_assoc($result)){\n\t\t\t\t$output[] = $row['lead_id'];\n\t\t\t}\n\t\t}else{\n\t\t\t$this->display(\"Query failed: $query\" . mysql_error($this->conn));\n\t\t}\n\n\t\treturn $output;\n\t}",
"public function all_deliveries() {\n\t\t$delivery=$this->uri->segment(3);\n\t\t//echo $delivery;\n $data['title'] = \"All Deliveries\";\n $data['content_view'] = \"dispatched_listing_v\";\n $data['banner_text'] = \"Dispatched Orders\";\n $data['link'] = \"dispatched_listing_v\";\n\t\t$data['myClass'] = $this;\n $data['order_list']=Kemsa_Order::get_facility_order($delivery);\n $data['quick_link'] = \"dispatched_listing_v\";\n $this -> load -> view(\"template\", $data);\n }",
"function mailchimp_list(){\n\t\t$list = $this->mailchimp->lists(array(), 0, 25);\n\t\tif($list) {\n\t\t\t$this->sci->assign('maindata' , $list['data']);\n\t\t\t$this->sci->assign('total' , $list['total']);\n\t\t}\n\t\t//print_r($list);\n\t\t$this->sci->da('mailchimp_list.htm');\n\t}",
"public function getCourier_list_booking_delivered()\n {\n\t\t $sql = \"SELECT a.id, a.order_inv, a.r_name, a.c_driver, a.r_address, a.r_dest, a.r_city, a.r_curren, a.r_costtotal, a.r_description, a.total_insurance, a.total_tax, a.payment_status, a.pay_mode, a.created, a.r_hour, a.status_courier, a.act_status, a.con_status, s.mod_style, s.color FROM add_courier a, styles s WHERE a.status_courier=s.mod_style AND a.username = '\".$this->username.\"' AND a.status_courier='Delivered' ORDER BY a.id ASC\";\n $row = self::$db->fetch_all($sql);\n \n return ($row) ? $row : 0;\n }",
"public function actionListAvailable()\n\t{\n\t\t$destination = new Destinations();\n\t\t$tour = new Tours();\n\n\t\t$models = $destination->getAvailableDestination();\n\n\t\t$data = array();\n\t\tforeach ($models as $model) {\n\t\t\t$totalTours = count($tour->getTourInDestination($model->id));\n\n\t\t\t$data[] = array('des' => $model, 'totalTours' => $totalTours);\n\t\t}\n\t\theader('Content-Type: application/json');\n\t\theader(\"Access-Control-Allow-Origin: *\");\n header(\"Access-Control-Allow-Methods: GET, POST, PUT, DELETE\");\n echo json_encode($data);\n\t}",
"public static function list_deals() {\n\t\t$msg = '';\n\t\t$query = self::getDeals();\n\t\tinclude 'views/_list_deals.php';\n\t}",
"public function get_all_subscribed4explanations () {\n\n $list = array();\n $result = $this->query( \"SELECT * FROM beamtime_subscriber\" );\n $nrows = mysql_numrows( $result );\n for( $i = 0; $i < $nrows; $i++ ) {\n $row = mysql_fetch_array( $result, MYSQL_ASSOC );\n $row['subscribed_time'] = LusiTime::from64($row['subscribed_time']);\n array_push ( $list, $row );\n }\n return $list;\n }",
"public function ListarDelivery()\n\t{\n\t\tself::SetNames();\n\t\nif($_SESSION[\"acceso\"] == 'repartidor'){\n\n\t$sql = \"SELECT ventas.idventa, ventas.codventa, ventas.codcliente as cliente, ventas.totalpago, ventas.entregado, ventas.delivery, ventas.repartidor, clientes.codcliente, clientes.cedcliente, clientes.nomcliente, clientes.direccliente, usuarios.nombres, GROUP_CONCAT(cantventa, ' | ', producto SEPARATOR '. ') AS detalles FROM ventas INNER JOIN detalleventas ON detalleventas.codventa = ventas.codventa LEFT JOIN clientes ON ventas.codcliente = clientes.codcliente LEFT JOIN usuarios ON ventas.repartidor = usuarios.codigo WHERE ventas.repartidor = '\".$_SESSION[\"codigo\"].\"' AND ventas.entregado = 1 GROUP BY detalleventas.codventa\";\n foreach ($this->dbh->query($sql) as $row)\n\t\t{\n\t\t\t$this->p[] = $row;\n\t\t}\n\t\treturn $this->p;\n\t\t$this->dbh=null;\n\n\t} else {\n\n\t$sql = \"SELECT ventas.idventa, ventas.codventa, ventas.codcliente as cliente, ventas.totalpago, ventas.entregado, ventas.delivery, ventas.repartidor, clientes.codcliente, clientes.cedcliente, clientes.nomcliente, clientes.direccliente, usuarios.nombres, GROUP_CONCAT(cantventa, ' | ', producto SEPARATOR '<br>') AS detalles FROM ventas INNER JOIN detalleventas ON detalleventas.codventa = ventas.codventa LEFT JOIN clientes ON ventas.codcliente = clientes.codcliente LEFT JOIN usuarios ON ventas.repartidor = usuarios.codigo WHERE ventas.delivery = 1 AND ventas.repartidor != 0 AND ventas.entregado = 1 AND ventas.codigo = '\".$_SESSION[\"codigo\"].\"' GROUP BY detalleventas.codventa\";\n foreach ($this->dbh->query($sql) as $row)\n\t\t{\n\t\t\t$this->p[] = $row;\n\t\t}\n\t\treturn $this->p;\n\t\t$this->dbh=null;\n\t}\n}",
"public function saleListCsv()\n {\n return Excel::download(new allInvoiceExport(), 'invoice_lists_'. time() .'.csv');\n }",
"public function list();",
"public function list();",
"public function list();",
"public function getDeliveryList()\n {\n if ($this->_oDelList === null) {\n $this->_oDelList = oxNew('oxDeliveryList');\n $this->_oDelList->getList();\n }\n\n return $this->_oDelList;\n }",
"public static function fetchDueList()\n {\n $aDueList = eZPersistentObject::fetchObjectList( eZStaticExportScheduler::definition(),\n \t null,\n \t array( 'date' => array( '<=', time() ) ),\n \t array( 'date' => 'desc' ) );\n\n\t\t\n\t\treturn $aDueList;\n }",
"function listarCitasDisponibles()\n\t\t{\n\t\t\t$dia = $this->uri->segment(3);\n\t\t\t$mes = $this->uri->segment(4);\n\t\t\t$year = $this->uri->segment(5);\n\t\t\t$diaDeLaSemana = date('N',mktime(0, 0, 0, $mes, $dia, $year));\n\t\t\t\n\t\t\t//Obetenemos los arrays de horarios del dia de la semana concreto\n\t\t\t$diasSemana = $this->PacienteModel->getCalendario();\n\t\t\tforeach ($diasSemana as $value) {\n\t\t\t\tif($diaDeLaSemana == $value->Dia)\n\t\t\t\t{\n\t\t\t\t\t$horaInicio = explode(':', $value->HoraInicio);\n\t\t\t\t\t$horaFin = explode(':', $value->HoraFin);\n\t\t\t\t\t$duracionCita[] = $value->DuracionCita;\n\t\t\t\t\t$unixInicio[] = mktime($horaInicio[0], $horaInicio[1], 0, $mes, $dia, $year);\n\t\t\t\t\t$unixFin[] = mktime($horaFin[0], $horaFin[1], 0, $mes, $dia, $year);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//Comprobamos las citas planificadas para el dia concreto\n\t\t\t$data = $this->PacienteModel->getCitasDisponibles($dia, $mes, $year);\n\t\t\tforeach ($data as $value) {\n\t\t\t\t$aux = explode(\" \", $value->FechaIni);\n\t\t\t\t$aux = $aux[1];\n\t\t\t\t$aux = explode(\":\", $aux);\n\t\t\t\t$hora[] = $aux[0];\n\t\t\t\t$min[] = $aux[1];\n\t\t\t}\n\t\t\t\n\t\t\t//Si no hay ninguna cita se ponen los arrays fuera de rango\n\t\t\tif(!isset($hora) && !isset($min))\n\t\t\t{\n\t\t\t\t$hora[0] = -1;\n\t\t\t\t$min[0] = -1;\n\t\t\t}\n\n\t\t\t//Visualizamos las citas disponibles\n\t\t\techo '<ul class=\"list-group\">';\n\t\t\techo '<li class=\"list-group-item\">'.date('d-m-Y',mktime(0, 0, 0, $mes, $dia, $year)).'</li>';\n\t\t\tfor($j = 0; $j < sizeof($unixInicio); $j++)\n\t\t\t\tfor($i = $unixInicio[$j]; $i < $unixFin[$j]; $i += 60*$duracionCita[$j] )\n\t\t\t\t{\n\t\t\t\t\tif ( (in_array(date('H',$i), $hora) && in_array(date('i',$i), $min) )\n\t\t\t\t\t\t|| time()>$i )\n\t\t\t\t\t\techo '<li class=\"list-group-item\">'.date('H:i',$i).'</li>';\n\t\t\t\t\telse \n\t\t\t\t\t\techo '<li class=\"list-group-item active\">\n\t\t\t\t\t\t\t<a style=\"color: black;\" onclick=\"crearCita(\\''.$this->session->userdata('id').'\\',\n\t\t\t\t\t\t\t\\''.date('Y-m-d H:i:s',$i).'\\',\n\t\t\t\t\t\t\t\\''.date('Y-m-d H:i:s',$i + 60 * $duracionCita[$j]).'\\'\n\t\t\t\t\t\t\t)\">'.date('H:i',$i).'</a></li>';\n\t\t\t\t}\n\t\t\techo '</ul>';\n\t\t}",
"public function getList();",
"public function getList();",
"function getCampaignList() {\n\t\treturn $this->gateway->execCommad('getCampaignList',\"\");\n\t}",
"public function getList()\r\n {\r\n // Le résultat sera un tableau d'instances de Sponsor.\r\n\r\n\t$entrainements = array();\r\n\r\n $q = $this->_db->query(\"SELECT id, jour, heure_debut as heureDebut, heure_fin as heureFin, lieu FROM entrainement\");\r\n //$q->execute();\r\n\r\n while ($donnees = $q->fetch(PDO::FETCH_ASSOC))\r\n {\r\n $entrainements[] = new BoEntrainement($donnees);\r\n }\r\n\r\n return $entrainements;\r\n }",
"public function index()\n {\n $Debtors_listings = Debtors_listings::all();\n return response()->json($Debtors_listings);\n }",
"public function listDemarcaciones()\n {\n $list_demarcaciones = \\common\\models\\autenticacion\\Demarcaciones::find()->all();\n\n return $list_demarcaciones;\n }",
"function get_discounts()\n\t\t{\n\t\t\tglobal $db;\n\t\t\t$query = \" SELECT a.*\n\t\t\t\t\t\t FROM \n\t\t\t\t\t\t \t\".$this -> table_discount.\" AS a\n\t\t\t\t\t\t \tORDER BY ordering \";\n\t\t\t$sql = $db->query($query);\n\t\t\t$list = $db->getObjectList();\n\t\t\treturn $list;\n\t\t}",
"public function fetchList();",
"public function exportParticipantsList(){\n return (new ParticipantsExport())->download('participants.xls');\n }",
"public function newsletterList()\n {\n return $this->ozioma->newsletter->list();\n }",
"public function show(Deliveries $deliveries)\n {\n //\n }",
"public function index()\n {\n $delivers = Internal::paginate(5);\n return view('admin.internal.pendingDelivers' , compact('delivers'));\n }",
"public function demandeListeTous()\n\t{\n\t\t// votre code ici\n\t\treturn Gestion::lister(\"Demande\");//type array\n\t}",
"public static function getTwistyListForFront(){\n\t\t$sql = 'SELECT id_twisty,product_name,ord.id_order,ord.total_paid_tax_incl,od.product_reference,product_ean13,product_quantity,tor.id_order_detail,qte_picked,id_box,is_finished,date_twisty,payment,total_shipping '.\n\t\t'FROM '._DB_PREFIX_.'twisty_orders tor '.\n\t\t'LEFT JOIN '._DB_PREFIX_.'order_detail od ON od.id_order_detail=tor.id_order_detail '.\n\t\t'LEFT JOIN '._DB_PREFIX_.'orders ord ON ord.id_order=od.id_order '.\n\t\t'WHERE ord.id_order in ('.\n\t\t'\tSELECT id_order '.\n\t\t'\tFROM '._DB_PREFIX_.'twisty_orders tor '.\n\t\t'\tLEFT JOIN '._DB_PREFIX_.'order_detail od ON od.id_order_detail=tor.id_order_detail '.\n\t\t'\tGROUP BY id_order '.\n\t\t'\tHAVING count(tor.id_order_detail)=sum(is_valid) and count(tor.id_order_detail)=sum(tor.is_show) '.\n\t\t') '.\n\t\t'ORDER BY id_box,product_ean13';\n\t\tif ($results = Db::getInstance()->ExecuteS($sql))\n\t\t\treturn $results;\n\t}"
]
| [
"0.64258206",
"0.61960334",
"0.6028114",
"0.60102975",
"0.6004807",
"0.5967586",
"0.5927006",
"0.58542305",
"0.579075",
"0.57717305",
"0.57650614",
"0.57650614",
"0.57650614",
"0.57487446",
"0.57463753",
"0.5743755",
"0.5728753",
"0.5728753",
"0.5716643",
"0.571424",
"0.5670721",
"0.5660455",
"0.5649818",
"0.56326205",
"0.5626092",
"0.5609482",
"0.55890745",
"0.55758995",
"0.5554754",
"0.5530144"
]
| 0.6507052 | 0 |
Script adding shipping type attribute for products | public function apply()
{
/** @var EavSetup $eavSetup */
$eavSetup = $this->eavSetupFactory->create(['setup' => $this->moduleDataSetup]);
if (!$eavSetup->getAttribute(Product::ENTITY, 'am_shipping_type')) {
$eavSetup->addAttribute(
Product::ENTITY,
'am_shipping_type',
[
'type' => 'varchar',
'backend' => '',
'frontend' => '',
'label' => 'Shipping Type',
'input' => 'select',
'class' => '',
'source' => '',
'global' => ScopedAttributeInterface::SCOPE_STORE,
'visible' => true,
'required' => false,
'user_defined' => false,
'default' => 0,
'searchable' => false,
'filterable' => false,
'comparable' => false,
'visible_on_front' => false,
'used_in_product_listing' => true,
'unique' => false,
'apply_to' => ''
]
);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function hook_shipping_type() {\n $weight = variable_get('uc_quote_type_weight', array('small_package' => 0));\n\n $types = array();\n $types['small_package'] = array(\n 'id' => 'small_package',\n 'title' => t('Small Packages'),\n 'weight' => $weight['small_package'],\n );\n\n return $types;\n}",
"private function _generateShippingType(){\n $shipping_type = new PagSeguroShippingType();\n $shipping_type->setByType('NOT_SPECIFIED');\n \n return $shipping_type;\n }",
"function custom_template_single_shipping()\n {\n global $product;\n ?>\n <span class=\"shipping-cs-tag\">\n <span>Shipping:</span>\n <span>Free</span>\n </span>\n <?php\n }",
"function get_item_shipping() {\n\t}",
"function setShipping($ship_key)\n {\n return 4.50;\n }",
"function getShipping()\n {\n return array('name'=>'test','cost'=>4.5);\n }",
"private function setShippingOptions() {\n // Reset the settings if this is a recrawl\n if ($this->getSaverData()->isRecrawl()) {\n // Set dimensions and weight\n $this->product->set_weight('');\n $this->product->set_length('');\n $this->product->set_width('');\n $this->product->set_height('');\n\n // Set shipping class\n $this->product->set_shipping_class_id(0);\n }\n\n // No shipping for virtual products.\n if ($this->wcData->isVirtual()) {\n $this->product->set_virtual(true);\n return;\n }\n\n // Not a virtual product.\n $this->product->set_virtual(false);\n\n // Set dimensions and weight\n $this->product->set_weight($this->wcData->getWeight());\n $this->product->set_length($this->wcData->getLength());\n $this->product->set_width($this->wcData->getWidth());\n $this->product->set_height($this->wcData->getHeight());\n\n // Set shipping class\n $this->product->set_shipping_class_id($this->wcData->getShippingClassId());\n }",
"function wdm_add_shipping_method_to_order_email( $order, $is_admin_email ) {\r\n\t\tglobal $wpdb;\r\n\t\t$wpdb->show_errors();\r\n\t\t$table_name = $wpdb->prefix.FOXPOST_TABLE_NAME;\r\n\t\t$fp_datas = $wpdb->get_results(\"SELECT id, terminal_id, status FROM \".$table_name.\" WHERE order_id='\".$order->id.\"'\");\r\n\t\t$apt_id = $fp_datas[0]->terminal_id;\r\n\r\n\t\t$apts = getTerminals();\r\n\t\t$apt_str = 'Ismeretlen';\r\n\t\tforeach($apts as $apt){\r\n\t\t\tif($apt_id == $apt['fp_place_id']){\r\n\t\t\t\t$apt_str = $apt['fp_name'];\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\techo '<p><h4>Választott terminál: <u> ' . $apt_str . '</h4></u></p>';\r\n\t}",
"public function getCartShippingMethod()\n {\n }",
"public function getShippingType()\n {\n return $this->shippingType;\n }",
"public function getShipping();",
"function wc_importer_shopify_expand_data( $data ) {\n\tif ( isset( $data['meta:shopify_requires_shipping'] ) ) {\n\t\t$requires_shipping = wc_string_to_bool( $data['meta:shopify_requires_shipping'] );\n\n\t\tif ( ! $requires_shipping ) {\n\t\t\tif ( isset( $data['type'] ) ) {\n\t\t\t\t$data['type'][] = 'virtual';\n\t\t\t} else {\n\t\t\t\t$data['type'] = array( 'virtual' );\n\t\t\t}\n\t\t}\n\n\t\tunset( $data['meta:shopify_requires_shipping'] );\n\t}\n\treturn $data;\n}",
"public function addNewShippingRow(){\n\t\t$map_id = $this->Generic_model->general_fetch_array_return_row('map_attributes_values', array('attribute_id'=>$this->input->post('newRowAttr'), 'value'=>$this->input->post('newRowValue')))->map_id;\n\t\t$details = array(\n\t\t\t'pid' => $this->uri->segment(4),\n\t\t\t'map_id' => $map_id,\n\t\t\t'cost' => $this->input->post('costRowNew')\n\t\t);\n\t\t$response = $this->Generic_model->general_insert('stock_master', $details);\n\t\tif($response){\n\t\t\t$this->session->set_flashdata('success', 'Product Updated successfully with new variant.');\n\t\t}else{\n\t\t\t$this->session->set_flashdata('failure', 'Oops!! Something went wrong. Try again...');\n\t\t}\n\t\tredirect('admin/product/editProduct/'.$this->uri->segment(4));\n\t}",
"public function getShippingInfo();",
"private function _generateShippingData(){\n \n $shipping = new PagSeguroShipping();\n $shipping->setAddress($this->_generateShippingAddressData());\n $shipping->setType($this->_generateShippingType());\n $shipping->setCost(number_format($this->context->cart->getOrderTotal(true, Cart::ONLY_SHIPPING), 2));\n \n return $shipping;\n }",
"function addShippingToMessage ( ) {\r\n\t\t$methods =& $this->getExtraShipping();\r\n\r\n\t\tif( $methods === false || count($methods) == 0 ) return;\r\n\r\n\t\t$this->glmsg .= '<shipping-methods>';\r\n\r\n\t\t// add the selected method first, because we can't pass a selection index to google.\r\n\t\tif( ($index = $this->getExtraShippingIndex()) >= 0) {\r\n\t\t\t$this->glmsg .= '<flat-rate-shipping name=\"' . htmlspecialchars( $this->getExtraShipping($index), ENT_NOQUOTES) . '\">'\r\n\t\t\t\t\t\t . '<price currency=\"' . $this->getConfig('shopcurrency') . '\">'\r\n\t\t\t\t\t\t . number_format( $this->cart->getShippingHandlingTotal() / 100, 2, '.', '')\r\n\t\t\t\t\t\t . '</price>'\r\n\t\t\t\t\t\t . '</flat-rate-shipping>';\r\n\t\t}\r\n\r\n\tfor( $i = 0; $i < count($methods) ; ++$i ) {\r\n\t\t\tif( $methods[$i]['id'] == $index ) continue;\t\t\t\r\n\t\t\t$this->glmsg .= '<flat-rate-shipping name=\"' . htmlspecialchars( $methods[$i]['description'], ENT_NOQUOTES) . '\">'\r\n\t\t\t\t\t\t . '<price currency=\"' . $this->getConfig('shopcurrency') . '\">'\r\n\t\t\t\t\t\t . number_format( $this->cart->getShippingHandlingTotal( $methods[$i]['id'] ) / 100, 2, '.', '')\r\n\t\t\t\t\t\t . '</price>'\r\n\t\t\t\t\t\t . '</flat-rate-shipping>';\r\n\t\t}\r\n\t\t$this->glmsg .= '</shipping-methods>';\r\n }",
"public function getProductType()\n {\n }",
"function wp_tiered_shipping_init() {\n\n class WC_Tiered_Shipping extends WC_Shipping_Method {\n\n /**\n * __construct() {\n */\n public function __construct() {\n $this->id = 'tiered_shipping';\n $this->title = __( 'Tiered Flat Rate Shipping', $this->id );\n $this->method_title = __( 'Tiered flat rate shipping', $this->id );\n $this->description = __( 'A flat rate shipping method that adjusts depending on the number of products purchased.', $this->id );\n $this->init();\n }\n\n\n /**\n * init()\n *\n * Initialize all settings for this shipping method.\n *\n * @return void\n */\n public function init(): void {\n // Load the settings API\n $this->init_form_fields(); // Overridden below.\n $this->init_settings(); // This is part of the settings API. Loads settings you previously init.\n\n // Save settings.\n add_action( 'woocommerce_update_options_shipping_' . $this->id, [ $this, 'process_admin_options' ] );\n }\n\n\n /**\n * init_form_fields()\n *\n * Initialize settings form fields. This is part of the settings API, but\n * overridden here.\n *\n * @return void\n */\n public function init_form_fields() {\n global $woocommerce;\n\n $this->form_fields = [\n 'enabled' => [\n 'title' => __( 'Enabled/Disabled', $this->id ),\n 'type' => 'checkbox',\n 'label' => 'Enable this shipping method'\n ],\n\n 'usertitle' => [\n 'title' => __( 'Shipping method label', $this->id ),\n 'type' => 'text',\n 'description' => __( 'The label that is visible to the user.', $this->id ),\n 'default' => __( 'Tiered Flat Rate', $this->id )\n ],\n\n 'availability' => [\n 'title' => __( 'Availability', $this->id ),\n 'type' => 'select',\n 'class' => 'wc-enhanced-select availability',\n 'options' => [\n 'all' => 'All allowed countries',\n 'except' => 'All allowed countries, except...',\n 'specific' => 'Specific countries'\n ],\n 'default' => __( 'all', $this->id )\n ],\n\n 'countries' => [\n 'title' => __( 'Countries', $this->id ),\n 'type' => 'multiselect',\n 'class' => 'wc-enhanced-select',\n 'options' => $woocommerce->countries->countries,\n 'default' => __( '', $this->id )\n ],\n\n 'basefee' => [\n 'title' => __( 'Base shipping fee ($)', $this->id ),\n 'type' => 'text',\n 'description' => __( 'Flat shipping fee that is applied automatically to the cart total for any number of items.', $this->id )\n ],\n\n 'tierfee' => [\n 'title' => __( 'Tier shipping fee ($)', $this->id ),\n 'type' => 'text',\n 'description' => __( 'Additional shipping fee added to the base fee if the number of items in the cart exceeds a specified number.', $this->id )\n ],\n\n 'quantity' => [\n 'title' => __( 'Number of items to activate tier shipping fee', $this->id ),\n 'type' => 'text',\n 'description' => __( 'Number of items in the cart needed to activate the additional tier shipping fee.', $this->id )\n ],\n\n 'progressive' => [\n 'title' => __( 'Incremental fee?', $this->id ),\n 'type' => 'checkbox',\n 'label' => __( 'Make the tiered shipping fee incremental' ),\n 'description' => __( 'If this option is checked, the tiered shipping fee will be applied incrementally in multiples of the tier item quantity; otherwise, the tiered shipping fee will be a flat fee if the cart is above the specified quantity.', $this->id )\n ]\n ];\n }\n\n\n /**\n * calculate_shipping()\n *\n * Calculate the shipping rate based on product type and number of items.\n *\n * @param array $package\n */\n public function calculate_shipping( $package = [] ) {\n // First, we need to do some checks to make sure that this shipping method\n // is enabled and this users country is included / allowed. If one of these\n // is not true, just return false.\n // Is this shipping type enabled? If not, do nothing.\n $enabled = $this->get_option( 'enabled' );\n\n if ( $enabled == 'no' ) { return false; }\n if ( ! $this->is_tiered_allowed( $package ) ) { return false; }\n\n\n // If we get to this point, we can add this shipping method to the front\n // end and calculate the shipping rate!\n\n global $woocommerce;\n\n // Get all items from cart.\n $items = $woocommerce->cart->get_cart();\n $cart_total_items = 0;\n\n // Sum non-virtual (i.e. shippable) items\n foreach ( $items as $item ) {\n $product = wc_get_product( $item['product_id'] );\n if ( !$product->is_virtual() ) {\n $cart_total_items += $item['quantity'];\n }\n }\n\n // Set the base shipping fee.\n $shipping = $cart_total_items > 0 ? $this->get_option('basefee') : 0;\n\n // Override base fee with tiered fee if cart items are over the tier quantity.\n if ( $cart_total_items > $this->get_option( 'quantity' ) ) {\n\n // If the tier fee should be progressive, calculate the multiplier and add the tier fee * multiplier.\n if ( $this->get_option( 'progressive' ) == 'yes' ) {\n $multiplier = ceil( $cart_total_items / $this->get_option( 'quantity' ) ) - 1;\n $shipping += $this->get_option( 'tierfee' ) * $multiplier;\n }\n\n // If the tier fee is flat, simply add the tier fee.\n else {\n $shipping += $this->get_option( 'tierfee' );\n }\n }\n\n // Set the shipping rate.\n $rate = [\n 'label' => $this->title,\n 'cost' => $shipping,\n 'calc_tax' => 'per_item'\n ];\n\n $this->add_rate( $rate );\n }\n\n\n /**\n * is_tiered_allowed()\n *\n * Determine if the tiered rate is allowed for this location.\n *\n * @param array $package\n */\n function is_tiered_allowed( $package = [] ) {\n $availability = $this->get_option( 'availability' );\n $user_country = $package['destination']['country'];\n $countries = $this->get_option( 'countries' );\n\n switch ( $availability ) {\n // Plugin availability is set to all countries.\n case 'all':\n return true;\n break;\n\n case 'specific':\n $in_allowed_country = false;\n\n for ( $i=0; $i<sizeof( $countries ); $i++ ) {\n if ( $user_country == $countries[$i] ) {\n $in_allowed_country = true;\n break;\n }\n }\n\n return $in_allowed_country;\n break;\n\n case 'except':\n $in_allowed_country = true;\n\n for ( $i=0; $i<sizeof( $countries ); $i++ ) {\n if ( $user_country == $countries[$i] ) {\n $in_allowed_country = false;\n break;\n }\n }\n\n return $in_allowed_country;\n }\n }\n\n }\n}",
"public function getSellerShipping() {\r\n return Mage::getResourceModel ( 'eav/entity_attribute' )->getIdByCode ( 'catalog_product', 'seller_shipping_option' );\r\n }",
"public function setShippingMethod() {\n\t\t$json = array();\n\t\t$json['status'] = false;\n\t\t\n\t\tif (isset($this->request->post['code'])) {\n\t\t\t$code=$this->request->post['code'];\n\t\t\t$shipping_method=$this->session->data['shipping_methods'][$code]; \n\t\t\tif ($shipping_method) {\n\t\t\t\tunset($this->session->data['shipping_method']);\n\t\t\t\t$this->session->data['shipping_method'] = $shipping_method;\n\t\t\t\t\n\t\t\t\t$json['status'] = true;\n\t\t\t\t$json['delivery'] = $shipping_method['delivery'];\n\n\t\t\t} else {\n\t\t\t\t$json['error'] = 'Неизвестный способ доставки';\n\t\t\t}\n\t\t} else {\n\t\t\t$json['error'] = 'Не указан тип доставки';\n\t\t}\n\t\t$this->response->addHeader('Content-Type: application/json');\n\t\t$this->response->setOutput(json_encode($json));\n\t}",
"public function setShipping($shipping);",
"public function getProductType();",
"public function createConfigProduct($type,$data=[],$attribute_set_id,$sku){\n\n $data['type_id'] = $type;\n $data['attribute_set_id'] = $attribute_set_id;\n $data['sku'] = $sku;\n\n /*foreach($data['additional_attributes']['single_data'] as $item){\n $data['custom_attributes'][] = [ \"attribute_code\" => $item['key'], \"value\" => $item['value'] ];\n }*/\n $data['custom_attributes'] = [];\n $data['custom_attributes'][] = [ \"attribute_code\" => \"description\", \"value\" => $data['description'] ];\n $data['custom_attributes'][] = [ \"attribute_code\" => \"short_description\", \"value\" => $data['short_description'] ];\n array_push( $data['custom_attributes'] , ['attribute_code' => 'category_ids', 'value' => $data['categories']] );\n array_push( $data['custom_attributes'] , ['attribute_code' => 'url_key', 'value' => Inflector::slug($data['name'].' '.$sku)] );\n unset( $data['categories'], $data['website_ids'], $data['description'], $data['short_description'], $data['tax_class_id'], $data['associated_skus'], $data['price'], $data['price_changes'], $data['configurable_attributes'], $data['stock_data'] );\n\n $result = $this->curlRequest(\"/rest/V1/products/\", 1, json_encode([\"product\" => $data]));\n\n return $result;\n \n \n }",
"function jigoshop_upgrade_146() {\n\t\n\tJigoshop_Base::get_options()->add_option( 'jigoshop_show_checkout_shipping_fields', 'yes' );\n\t\n}",
"public function setType(PagSeguroShippingType $type)\n {\n $this->type = $type;\n }",
"public function getShippingMethods();",
"public function getShippingDetails();",
"public function setNoMultiShipping(){\n $emptyCache = false;\n $db = JFactory::getDBO();\n if (JeproshopSettingModelSetting::getValue('allow_multi_shipping')){\n // Upgrading quantities\n $query = \"SELECT sum(\" . $db->quoteName('quantity') . \") AS quantity, product_id, product_attribute_id, count(*) as count FROM \";\n $query .= $db->quoteName('#__jeproshop_cart_product') . \" WHERE \" . $db->quoteName('cart_id') . \" = \" . (int)$this->cart_id . \" AND \" ;\n $query .= $db->quoteName('shop_id') . \" = \" . (int)$this->shop_id . \" GROUP BY product_id, product_attribute_id HAVING count > 1\";\n\n $db->setQuery($query);\n $products = $db->loadObjectList();\n\n foreach ($products as $product){\n $query = \"UPDATE \" . $db->quoteName('#__jeproshop_cart_product') . \" SET \" . $db->quoteName('quantity') . \" = \" . $product->quantity;\n $query .= \"\tWHERE \" . $db->quoteName('cart_id') . \" = \".(int)$this->cart_id . \" AND \" . $db->quoteName('shop_id') . \" = \" . (int)$this->shop_id ;\n $query .= \" AND product_id = \" . $product->product_id . \" AND product_attribute_id = \" . $product->product_attribute_id;\n $db->setQuery($query);\n if ($db->query())\n $emptyCache = true;\n }\n\n // Merging multiple lines\n $query = \"DELETE cart_product_1 FROM \" . $db->quoteName('#__jeproshop_cart_product') . \" AS cart_product_1 INNER JOIN \";\n $query .= $db->quoteName('#__jeproshop_cart_product') . \" AS cart_product_2 ON ((cart_product_1.cart_id = cart_product_2.\";\n $query .= \"cart_id) AND (cart_product_1.product_id = cart_product_2.product_id) AND (cart_product_1.product_attribute_id = \";\n $query .= \"cart_product_2.product_attribute_id) AND (cart_product_1.address_delivery_id <> cart_product_2.address_delivery_id) \";\n $query .= \" AND (cart_product_1.date_add > cart_product_2.date_add) )\";\n $db->setQuery($query);\n $db->query();\n }\n\n // Update delivery address for each product line\n $query = \"UPDATE \" . $db->quoteName('#__jeproshop_cart_product') . \" SET \" . $db->quoteName('address_delivery_id') . \" = ( SELECT \";\n $query .= $db->quoteName('address_delivery_id') . \" FROM \" . $db->quoteName('#__jeproshop_cart') . \" WHERE \" . $db->quoteName('cart_id');\n $query .= \" = \" . (int)$this->cart_id . \" AND \" . $db->quoteName('shop_id') . \" = \" . (int)$this->shop_id . \") WHERE \" . $db->quoteName('cart_id');\n $query .= \" = \" . (int)$this->cart_id . (JeproshopSettingModelSetting::getValue('allow_multi_shipping') ? \" AND \" . $db->quoteName('shop_id') . \" = \" .(int)$this->shop_id : \"\");\n\n $db->setQuery($query);\n\n $cache_id = 'jeproshop_cart_set_no_multi_shipping'.(int)$this->cart_id.'_'.(int)$this->shop_id .((isset($this->address_delivery_id) && $this->address_delivery_id) ? '-'.(int)$this->address_delivery_id : '');\n if (!JeproshopCache::isStored($cache_id)){\n $db->setQuery($query);\n if ($result = (bool)$db->query())\n $emptyCache = true;\n JeproshopCache::store($cache_id, $result);\n }\n\n if (JeproshopCustomization::isFeaturePublished()){\n //Db::getInstance()->execute(\n\t\t\t$query = \" UPDATE \" . $db->quoteName('#__jeproshop_customization') . \" SET \" . $db->quoteName('address_delivery_id') . \" = ( SELECT \";\n $query .= $db->quoteName('address_delivery_id') . \" FROM \" . $db->quoteName('#__jeproshop_cart') . \" WHERE \" . $db->quoteName('cart_id');\n $query .= \" = \" . (int)$this->cart_id . \" ) WHERE \" . $db->quoteName('cart_id') . \" = \" .(int)$this->cart_id;\n\n $db->setQuery($query);\n $db->query();\n }\n if ($emptyCache){\n $this->_products = null;\n }\n }",
"public function setShippingDescription($description);",
"function add_product_fields( $product_id,\n$product ) {\nif ( $product->post_type == 'products' ) {\n// Store data in post meta table if present in post data\nif ( isset( $_POST['product_SKU'] ) &&\n$_POST['product_SKU'] != '' ) {\nupdate_post_meta( $product_id, 'SKU',\n$_POST['product_SKU'] );\n}\n\nif ( isset( $_POST['product_position'] ) &&\n$_POST['product_position'] != '' ) {\nupdate_post_meta( $product_id, 'position',\n$_POST['product_position'] );\n}\n}\n}"
]
| [
"0.6803826",
"0.6436384",
"0.63552606",
"0.6342926",
"0.6214153",
"0.6146409",
"0.5982885",
"0.5975315",
"0.59531474",
"0.59239525",
"0.5897245",
"0.588454",
"0.58802414",
"0.5836447",
"0.5820645",
"0.5786976",
"0.5760866",
"0.5731677",
"0.57273954",
"0.5708754",
"0.568646",
"0.5679216",
"0.5666545",
"0.56637925",
"0.5642141",
"0.56403327",
"0.5620844",
"0.5619059",
"0.5617637",
"0.560377"
]
| 0.7075091 | 0 |
Create PurchaseLabel from JSON string | public static function fromJson($json) {
$value = json_decode($json, true);
return PurchaseLabel::fromString($value);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function Label_isni($jsonString='')\n {\n //--------------------------------------------------------------------\n // I'm basically OK with being quiet on missing JSON property names\n //--------------------------------------------------------------------\n error_reporting( error_reporting() & ~E_NOTICE );\n error_reporting( error_reporting() & ~E_WARNING );\n\n if($json = $this->getJSON($jsonString) )\n { \n $this->label= $json['label'];\n $this->isni= $json['isni'];\n $this->edits_pending= $json['edits_pending'];\n $this->created= $json['created'];\n\n }\n }",
"public function createLabel(Request $request) {\n\n $shipment = $request->input('shipment');\n $provider = new Estafeta('labels');\n\n return $provider->generateLabel($shipment);\n }",
"public function makeLabel($label)\n {\n return $this->client->makeLabel($label);\n }",
"public static function getResponse1013() {\n\n return '{\"indicator\":{\"name\":\"Término de facturación de energía activa del PVPC peaje por defecto\",\"short_name\":\"PVPC T. Defecto\",\"id\":1013,\"composited\":false,\"step_type\":\"linear\",\"disaggregated\":false,\"magnitud\":[{\"name\":\"Precio\",\"id\":23}],\"tiempo\":[{\"name\":\"Hora\",\"id\":4}],\"geos\":[{\"geo_id\":3,\"geo_name\":\"España\"}],\"values_updated_at\":\"2017-03-01T21:01:30.000+01:00\",\"values\":[{\"value\":116.62,\"datetime\":\"2017-03-01T00:00:00.000+01:00\",\"datetime_utc\":\"2017-02-28T23:00:00Z\",\"tz_time\":\"2017-02-28T23:00:00.000Z\",\"geo_id\":3,\"geo_name\":\"España\"},{\"value\":110.32,\"datetime\":\"2017-03-01T01:00:00.000+01:00\",\"datetime_utc\":\"2017-03-01T00:00:00Z\",\"tz_time\":\"2017-03-01T00:00:00.000Z\",\"geo_id\":3,\"geo_name\":\"España\"},{\"value\":108.17,\"datetime\":\"2017-03-01T02:00:00.000+01:00\",\"datetime_utc\":\"2017-03-01T01:00:00Z\",\"tz_time\":\"2017-03-01T01:00:00.000Z\",\"geo_id\":3,\"geo_name\":\"España\"},{\"value\":107.71,\"datetime\":\"2017-03-01T03:00:00.000+01:00\",\"datetime_utc\":\"2017-03-01T02:00:00Z\",\"tz_time\":\"2017-03-01T02:00:00.000Z\",\"geo_id\":3,\"geo_name\":\"España\"},{\"value\":107.73,\"datetime\":\"2017-03-01T04:00:00.000+01:00\",\"datetime_utc\":\"2017-03-01T03:00:00Z\",\"tz_time\":\"2017-03-01T03:00:00.000Z\",\"geo_id\":3,\"geo_name\":\"España\"},{\"value\":108.94,\"datetime\":\"2017-03-01T05:00:00.000+01:00\",\"datetime_utc\":\"2017-03-01T04:00:00Z\",\"tz_time\":\"2017-03-01T04:00:00.000Z\",\"geo_id\":3,\"geo_name\":\"España\"},{\"value\":119.5,\"datetime\":\"2017-03-01T06:00:00.000+01:00\",\"datetime_utc\":\"2017-03-01T05:00:00Z\",\"tz_time\":\"2017-03-01T05:00:00.000Z\",\"geo_id\":3,\"geo_name\":\"España\"},{\"value\":121.41,\"datetime\":\"2017-03-01T07:00:00.000+01:00\",\"datetime_utc\":\"2017-03-01T06:00:00Z\",\"tz_time\":\"2017-03-01T06:00:00.000Z\",\"geo_id\":3,\"geo_name\":\"España\"},{\"value\":119.35,\"datetime\":\"2017-03-01T08:00:00.000+01:00\",\"datetime_utc\":\"2017-03-01T07:00:00Z\",\"tz_time\":\"2017-03-01T07:00:00.000Z\",\"geo_id\":3,\"geo_name\":\"España\"},{\"value\":119.0,\"datetime\":\"2017-03-01T09:00:00.000+01:00\",\"datetime_utc\":\"2017-03-01T08:00:00Z\",\"tz_time\":\"2017-03-01T08:00:00.000Z\",\"geo_id\":3,\"geo_name\":\"España\"},{\"value\":118.97,\"datetime\":\"2017-03-01T10:00:00.000+01:00\",\"datetime_utc\":\"2017-03-01T09:00:00Z\",\"tz_time\":\"2017-03-01T09:00:00.000Z\",\"geo_id\":3,\"geo_name\":\"España\"},{\"value\":117.2,\"datetime\":\"2017-03-01T11:00:00.000+01:00\",\"datetime_utc\":\"2017-03-01T10:00:00Z\",\"tz_time\":\"2017-03-01T10:00:00.000Z\",\"geo_id\":3,\"geo_name\":\"España\"},{\"value\":113.84,\"datetime\":\"2017-03-01T12:00:00.000+01:00\",\"datetime_utc\":\"2017-03-01T11:00:00Z\",\"tz_time\":\"2017-03-01T11:00:00.000Z\",\"geo_id\":3,\"geo_name\":\"España\"},{\"value\":114.1,\"datetime\":\"2017-03-01T13:00:00.000+01:00\",\"datetime_utc\":\"2017-03-01T12:00:00Z\",\"tz_time\":\"2017-03-01T12:00:00.000Z\",\"geo_id\":3,\"geo_name\":\"España\"},{\"value\":113.76,\"datetime\":\"2017-03-01T14:00:00.000+01:00\",\"datetime_utc\":\"2017-03-01T13:00:00Z\",\"tz_time\":\"2017-03-01T13:00:00.000Z\",\"geo_id\":3,\"geo_name\":\"España\"},{\"value\":111.74,\"datetime\":\"2017-03-01T15:00:00.000+01:00\",\"datetime_utc\":\"2017-03-01T14:00:00Z\",\"tz_time\":\"2017-03-01T14:00:00.000Z\",\"geo_id\":3,\"geo_name\":\"España\"},{\"value\":107.47,\"datetime\":\"2017-03-01T16:00:00.000+01:00\",\"datetime_utc\":\"2017-03-01T15:00:00Z\",\"tz_time\":\"2017-03-01T15:00:00.000Z\",\"geo_id\":3,\"geo_name\":\"España\"},{\"value\":110.25,\"datetime\":\"2017-03-01T17:00:00.000+01:00\",\"datetime_utc\":\"2017-03-01T16:00:00Z\",\"tz_time\":\"2017-03-01T16:00:00.000Z\",\"geo_id\":3,\"geo_name\":\"España\"},{\"value\":116.76,\"datetime\":\"2017-03-01T18:00:00.000+01:00\",\"datetime_utc\":\"2017-03-01T17:00:00Z\",\"tz_time\":\"2017-03-01T17:00:00.000Z\",\"geo_id\":3,\"geo_name\":\"España\"},{\"value\":120.51,\"datetime\":\"2017-03-01T19:00:00.000+01:00\",\"datetime_utc\":\"2017-03-01T18:00:00Z\",\"tz_time\":\"2017-03-01T18:00:00.000Z\",\"geo_id\":3,\"geo_name\":\"España\"},{\"value\":121.13,\"datetime\":\"2017-03-01T20:00:00.000+01:00\",\"datetime_utc\":\"2017-03-01T19:00:00Z\",\"tz_time\":\"2017-03-01T19:00:00.000Z\",\"geo_id\":3,\"geo_name\":\"España\"},{\"value\":123.15,\"datetime\":\"2017-03-01T21:00:00.000+01:00\",\"datetime_utc\":\"2017-03-01T20:00:00Z\",\"tz_time\":\"2017-03-01T20:00:00.000Z\",\"geo_id\":3,\"geo_name\":\"España\"},{\"value\":121.9,\"datetime\":\"2017-03-01T22:00:00.000+01:00\",\"datetime_utc\":\"2017-03-01T21:00:00Z\",\"tz_time\":\"2017-03-01T21:00:00.000Z\",\"geo_id\":3,\"geo_name\":\"España\"},{\"value\":120.44,\"datetime\":\"2017-03-01T23:00:00.000+01:00\",\"datetime_utc\":\"2017-03-01T22:00:00Z\",\"tz_time\":\"2017-03-01T22:00:00.000Z\",\"geo_id\":3,\"geo_name\":\"España\"},{\"value\":123.3,\"datetime\":\"2017-03-02T00:00:00.000+01:00\",\"datetime_utc\":\"2017-03-01T23:00:00Z\",\"tz_time\":\"2017-03-01T23:00:00.000Z\",\"geo_id\":3,\"geo_name\":\"España\"}]}}';\n }",
"public function generateLabel(generateLabel $request);",
"public function testCreateLabel()\n {\n $label = Tag::label();\n $this->assertEquals(trim((string) $label), \"<label>\\n</label>\");\n $this->assertEquals($label->getJson(), '[[\"label\",\"\",\"\",[]]]');\n\n $label->setAttribute('title', 'Click me');\n $this->assertEquals(trim((string) $label), \"<label title=\\\"Click me\\\">\\n</label>\");\n $this->assertEquals($label->getJson(), '[[\"label\",\" title=\\\"Click me\\\"\",\"\",[]]]');\n $this->assertEquals($label->getAttribute('title'), 'Click me');\n\n $label = Tag::label();\n $label->setAttributes(['title' => 'Click me']);\n $this->assertEquals(trim((string) $label), \"<label title=\\\"Click me\\\">\\n</label>\");\n $this->assertEquals($label->getAttributes(), ['title' => 'Click me']);\n\n $label->input(['value' => 'test']);\n $this->assertEquals(trim((string) $label), \"<label title=\\\"Click me\\\">\\n <input value=\\\"test\\\"/>\\n</label>\");\n $this->assertEquals($label->getJson(), '[[\"label\",\" title=\\\"Click me\\\"\",\"\",[[\"<input value=\\\"test\\\"\\/>\"]]]]');\n\n $this->assertEquals($label->getJson(['ignore_tags' => 'label']), '[[\"<input value=\\\"test\\\"\\/>\"]]');\n }",
"protected function createLabel(array $data)\n {\n /** @var \\BBSLab\\NovaTranslation\\Models\\Translation $keyTranslation */\n $keyTranslation = Translation::query()\n ->select('translations.translation_id')\n ->join('labels', 'translations.translatable_id', '=', 'labels.id')\n ->where('translations.translatable_type', '=', Label::class)\n ->where('labels.key', '=', $data['key'])\n ->first();\n\n $translationId = ! empty($keyTranslation) ? $keyTranslation->translation_id : (new Label)->freshTranslationId();\n\n /** @var \\BBSLab\\NovaTranslation\\Models\\Label $label */\n $label = Label::withoutEvents(function () use ($data) {\n return Label::query()->create([\n 'type' => $data['type'],\n 'key' => $data['key'],\n 'value' => ! empty($data['value']) ? $data['value'] : '',\n ]);\n });\n\n $label->upsertTranslationEntry($data['locale_id'], $translationId);\n }",
"public function jsonProvider() {\n return '{\n \"data\": {\n \"attributes\": {\n \"object_domain\": \"contact\",\n \"object_id\": \"1\",\n \"due\": \"2019-01-25T07:50:14+00:00\",\n \"urgency\": 1,\n \"description\": \"Need to verify this guy house.\",\n \"items\": [\n \"Visit his house\",\n \"Capture a photo\",\n \"Meet him on the house\"\n ],\n \"task_id\": \"123\"\n }\n }\n }';\n}",
"protected function createCurrencyFromJson($json)\n {\n return json_decode($json, true);\n }",
"function _wp_json_convert_string($input_string)\n {\n }",
"public static function createFromJson($json);",
"public function getSMSLabels()\n {\n $urllink = \"http://api.onehop.co/v1/labels/\";\n $ch = curl_init($urllink);\n curl_setopt($ch, CURLOPT_HEADER, 0);\n curl_setopt($ch, CURLOPT_TIMEOUT, 4);\n curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 5);\n curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1);\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);\n curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);\n curl_setopt($ch, CURLOPT_HTTPHEADER, array(\n 'Accept: ',\n 'apiKey:' . $this->smsAPI\n ));\n $output = Tools::jsonDecode(curl_exec($ch));\n curl_close($ch);\n $labelArr = array();\n $labelInfo = array();\n if ($output && isset($output->labelsList) && $output->labelsList) {\n $output->accountId = '';\n $labelInfo['acountid'] = $output->accountId;\n $labelArr[] = array(\n 'id_option' => '',\n 'name' => 'Select Label'\n );\n foreach ($output->labelsList as $labelVal) {\n $labelArr[] = array(\n 'id_option' => $labelVal,\n 'name' => $labelVal\n );\n }\n } elseif ($output && isset($output->message)) {\n $labelArr[] = array(\n 'id_option' => '',\n 'name' => 'No label available'\n );\n }\n $labelInfo['labellist'] = $labelArr;\n return $labelInfo;\n }",
"public static function createFromJson($json)\n {\n $obj = json_decode($json);\n if ($obj && self::validate($obj)) {\n $product = new Product();\n $product->name = $obj->name;\n $product->description = $obj->description;\n $product->brand_id = $obj->brand;\n $product->barcode = $obj->barcode;\n return $product;\n }\n throw new \\Exception(\"Invalid JSON\");\n }",
"public function purchase_items()\n\t{\n\t\t$products = DB::table('products')->select('id as value', 'product_name as label')->where('category_id', 2)->orderBy('id', 'desc')->get();\n\t\t$str = json_encode($products);\n\t\t$str = preg_replace('/\"([^\"]+)\"\\s*:\\s*/', '$1:', $str);\n\t\techo $str;\n\t}",
"function translate_parse($dataStr)\n\t\t{\n\t\t if($dataStr)\n\t\t {\n\t\t\t $arr = json_decode($dataStr,true); \n\t\t\t\t return $arr['responseData']['translatedText'];\n\t\t }\n\t\t return \"\";\n\t\t}",
"protected function purchaseLabelsRequest($body, $shipment_id)\n {\n // verify the required parameter 'body' is set\n if ($body === null || (is_array($body) && count($body) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $body when calling purchaseLabels'\n );\n }\n // verify the required parameter 'shipment_id' is set\n if ($shipment_id === null || (is_array($shipment_id) && count($shipment_id) === 0)) {\n throw new \\InvalidArgumentException(\n 'Missing the required parameter $shipment_id when calling purchaseLabels'\n );\n }\n\n $resourcePath = '/shipping/v1/shipments/{shipmentId}/purchaseLabels';\n $formParams = [];\n $queryParams = [];\n $headerParams = [];\n $httpBody = '';\n $multipart = false;\n\n\n // path params\n if ($shipment_id !== null) {\n $resourcePath = str_replace(\n '{' . 'shipmentId' . '}',\n ObjectSerializer::toPathValue($shipment_id),\n $resourcePath\n );\n }\n\n // body params\n $_tempBody = null;\n if (isset($body)) {\n $_tempBody = $body;\n }\n\n if ($multipart) {\n $headers = $this->headerSelector->selectHeadersForMultipart(\n ['application/json']\n );\n } else {\n $headers = $this->headerSelector->selectHeaders(\n ['application/json'],\n ['application/json']\n );\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n // $_tempBody is the method argument, if present\n $httpBody = $_tempBody;\n // \\stdClass has no __toString(), so we should encode it manually\n if ($httpBody instanceof \\stdClass && $headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($httpBody);\n }\n } elseif (count($formParams) > 0) {\n if ($multipart) {\n $multipartContents = [];\n foreach ($formParams as $formParamName => $formParamValue) {\n $multipartContents[] = [\n 'name' => $formParamName,\n 'contents' => $formParamValue\n ];\n }\n // for HTTP post (form)\n $httpBody = new MultipartStream($multipartContents);\n\n } elseif ($headers['Content-Type'] === 'application/json') {\n $httpBody = \\GuzzleHttp\\json_encode($formParams);\n\n } else {\n // for HTTP post (form)\n $httpBody = \\GuzzleHttp\\Psr7\\build_query($formParams);\n }\n }\n\n $query = \\GuzzleHttp\\Psr7\\build_query($queryParams);\n\n $sign = new SignatureSellingPartner();\n $headersX = $sign->calculateSignature($this->config->getApiKey(\"accessKey\"),\n $this->config->getApiKey(\"secretKey\"), $this->config->getApiKey(\"region\"),\n $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace(\"https://\", \"\", $this->config->getHost()),\n 'POST', $resourcePath, $query);\n\n $headers = array_merge(\n $headerParams,\n $headers,\n $headersX\n );\n\n return new Request(\n 'POST',\n $this->config->getHost() . $resourcePath . ($query ? \"?{$query}\" : ''),\n $headers,\n $httpBody\n );\n }",
"public function testAddLabel() {\n\n foreach ($this->testCases['Label'] as $key => $testCase) {\n $label = new Label();\n $label->setLabelName($testCase['label_name']);\n $label->setLabelComment($testCase['label_comment']);\n $label->setLabelStatus($testCase['label_status']);\n\n $this->localizationDao = $this->getMock('LocalizationDao');\n $this->localizationDao->expects($this->once())\n ->method('addLabel')\n ->will($this->returnValue($label));\n\n $this->locaizationService->setLocalizationDao($this->localizationDao);\n\n $result = $this->locaizationService->addLabel($testCase['label_name'], $testCase['label_comment']);\n $this->assertTrue($result instanceof Label);\n $this->assertEquals($label, $result);\n }\n }",
"public function addLabel(string $text): LabelerContract;",
"function wpml_pb_shortcode_decode_us_urlencoded_json ( $string, $encoding, $original_string ) {\r\n\t\tif ( $encoding !== 'us_urlencoded_json' ) {\r\n\t\t\treturn $string;\r\n\t\t}\r\n\r\n\t\t$fields_to_translate = array(\r\n\t\t\t'title',\r\n\t\t\t'label',\r\n\t\t\t'description',\r\n\t\t\t'placeholder',\r\n\t\t\t'price',\r\n\t\t\t'substring',\r\n\t\t\t'features',\r\n\t\t\t'btn_text',\r\n\t\t\t'btn_link',\r\n\t\t\t'image',\r\n\t\t\t'link',\r\n\t\t\t'url',\r\n\t\t\t'marker_address',\r\n\t\t\t'marker_text',\r\n\t\t\t'value',\r\n\t\t);\r\n\t\t$rows = json_decode( urldecode( $original_string ), TRUE );\r\n\t\t$result = array();\r\n\t\tforeach ( $rows as $i => $row ) {\r\n\t\t\tforeach ( $row as $key => $value ) {\r\n\t\t\t\tif ( in_array( $key, $fields_to_translate ) ) {\r\n\t\t\t\t\t$result[ $key . '_' . $i ] = array( 'value' => $value, 'translate' => TRUE );\r\n\t\t\t\t} else {\r\n\t\t\t\t\t$result[ $key . '_' . $i ] = array( 'value' => $value, 'translate' => FALSE );\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn $result;\r\n\t}",
"public function run()\n {\n $data = json_decode(\"{\n \\\"countries\\\": [\n {\n \\\"id\\\" : 1,\n \\\"code\\\" : \\\"AD\\\",\n \\\"value\\\" : \\\"Andorra\\\",\n \\\"native\\\" : \\\"Andorra\\\",\n \\\"phone\\\" : \\\"376\\\",\n \\\"continent\\\" : \\\"EU\\\",\n \\\"capital\\\" : \\\"Andorra la Vella\\\",\n \\\"currency\\\" : \\\"EUR\\\",\n \\\"languages\\\" : \\\"ca\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 2,\n \\\"code\\\" : \\\"AE\\\",\n \\\"value\\\" : \\\"United Arab Emirates\\\",\n \\\"native\\\" : \\\"دولة الإمارات العربية المتحدة\\\",\n \\\"phone\\\" : \\\"971\\\",\n \\\"continent\\\" : \\\"AS\\\",\n \\\"capital\\\" : \\\"Abu Dhabi\\\",\n \\\"currency\\\" : \\\"AED\\\",\n \\\"languages\\\" : \\\"ar\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 3,\n \\\"code\\\" : \\\"AF\\\",\n \\\"value\\\" : \\\"Afghanistan\\\",\n \\\"native\\\" : \\\"افغانستان\\\",\n \\\"phone\\\" : \\\"93\\\",\n \\\"continent\\\" : \\\"AS\\\",\n \\\"capital\\\" : \\\"Kabul\\\",\n \\\"currency\\\" : \\\"AFN\\\",\n \\\"languages\\\" : \\\"ps,uz,tk\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 4,\n \\\"code\\\" : \\\"AG\\\",\n \\\"value\\\" : \\\"Antigua and Barbuda\\\",\n \\\"native\\\" : \\\"Antigua and Barbuda\\\",\n \\\"phone\\\" : \\\"1268\\\",\n \\\"continent\\\" : \\\"NA\\\",\n \\\"capital\\\" : \\\"Saint John's\\\",\n \\\"currency\\\" : \\\"XCD\\\",\n \\\"languages\\\" : \\\"en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 5,\n \\\"code\\\" : \\\"AI\\\",\n \\\"value\\\" : \\\"Anguilla\\\",\n \\\"native\\\" : \\\"Anguilla\\\",\n \\\"phone\\\" : \\\"1264\\\",\n \\\"continent\\\" : \\\"NA\\\",\n \\\"capital\\\" : \\\"The Valley\\\",\n \\\"currency\\\" : \\\"XCD\\\",\n \\\"languages\\\" : \\\"en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 6,\n \\\"code\\\" : \\\"AL\\\",\n \\\"value\\\" : \\\"Albania\\\",\n \\\"native\\\" : \\\"Shqipëria\\\",\n \\\"phone\\\" : \\\"355\\\",\n \\\"continent\\\" : \\\"EU\\\",\n \\\"capital\\\" : \\\"Tirana\\\",\n \\\"currency\\\" : \\\"ALL\\\",\n \\\"languages\\\" : \\\"sq\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 7,\n \\\"code\\\" : \\\"AM\\\",\n \\\"value\\\" : \\\"Armenia\\\",\n \\\"native\\\" : \\\"Հայաստան\\\",\n \\\"phone\\\" : \\\"374\\\",\n \\\"continent\\\" : \\\"AS\\\",\n \\\"capital\\\" : \\\"Yerevan\\\",\n \\\"currency\\\" : \\\"AMD\\\",\n \\\"languages\\\" : \\\"hy,ru\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 8,\n \\\"code\\\" : \\\"AO\\\",\n \\\"value\\\" : \\\"Angola\\\",\n \\\"native\\\" : \\\"Angola\\\",\n \\\"phone\\\" : \\\"244\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Luanda\\\",\n \\\"currency\\\" : \\\"AOA\\\",\n \\\"languages\\\" : \\\"pt\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 9,\n \\\"code\\\" : \\\"AQ\\\",\n \\\"value\\\" : \\\"Antarctica\\\",\n \\\"native\\\" : \\\"Antarctica\\\",\n \\\"phone\\\" : \\\"\\\",\n \\\"continent\\\" : \\\"AN\\\",\n \\\"capital\\\" : \\\"\\\",\n \\\"currency\\\" : \\\"\\\",\n \\\"languages\\\" : \\\"\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 10,\n \\\"code\\\" : \\\"AR\\\",\n \\\"value\\\" : \\\"Argentina\\\",\n \\\"native\\\" : \\\"Argentina\\\",\n \\\"phone\\\" : \\\"54\\\",\n \\\"continent\\\" : \\\"SA\\\",\n \\\"capital\\\" : \\\"Buenos Aires\\\",\n \\\"currency\\\" : \\\"ARS\\\",\n \\\"languages\\\" : \\\"es,gn\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 11,\n \\\"code\\\" : \\\"AS\\\",\n \\\"value\\\" : \\\"American Samoa\\\",\n \\\"native\\\" : \\\"American Samoa\\\",\n \\\"phone\\\" : \\\"1684\\\",\n \\\"continent\\\" : \\\"OC\\\",\n \\\"capital\\\" : \\\"Pago Pago\\\",\n \\\"currency\\\" : \\\"USD\\\",\n \\\"languages\\\" : \\\"en,sm\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 12,\n \\\"code\\\" : \\\"AT\\\",\n \\\"value\\\" : \\\"Austria\\\",\n \\\"native\\\" : \\\"Österreich\\\",\n \\\"phone\\\" : \\\"43\\\",\n \\\"continent\\\" : \\\"EU\\\",\n \\\"capital\\\" : \\\"Vienna\\\",\n \\\"currency\\\" : \\\"EUR\\\",\n \\\"languages\\\" : \\\"de\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 13,\n \\\"code\\\" : \\\"AU\\\",\n \\\"value\\\" : \\\"Australia\\\",\n \\\"native\\\" : \\\"Australia\\\",\n \\\"phone\\\" : \\\"61\\\",\n \\\"continent\\\" : \\\"OC\\\",\n \\\"capital\\\" : \\\"Canberra\\\",\n \\\"currency\\\" : \\\"AUD\\\",\n \\\"languages\\\" : \\\"en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 14,\n \\\"code\\\" : \\\"AW\\\",\n \\\"value\\\" : \\\"Aruba\\\",\n \\\"native\\\" : \\\"Aruba\\\",\n \\\"phone\\\" : \\\"297\\\",\n \\\"continent\\\" : \\\"NA\\\",\n \\\"capital\\\" : \\\"Oranjestad\\\",\n \\\"currency\\\" : \\\"AWG\\\",\n \\\"languages\\\" : \\\"nl,pa\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 15,\n \\\"code\\\" : \\\"AX\\\",\n \\\"value\\\" : \\\"Åland\\\",\n \\\"native\\\" : \\\"Åland\\\",\n \\\"phone\\\" : \\\"358\\\",\n \\\"continent\\\" : \\\"EU\\\",\n \\\"capital\\\" : \\\"Mariehamn\\\",\n \\\"currency\\\" : \\\"EUR\\\",\n \\\"languages\\\" : \\\"sv\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 16,\n \\\"code\\\" : \\\"AZ\\\",\n \\\"value\\\" : \\\"Azerbaijan\\\",\n \\\"native\\\" : \\\"Azərbaycan\\\",\n \\\"phone\\\" : \\\"994\\\",\n \\\"continent\\\" : \\\"AS\\\",\n \\\"capital\\\" : \\\"Baku\\\",\n \\\"currency\\\" : \\\"AZN\\\",\n \\\"languages\\\" : \\\"az\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 17,\n \\\"code\\\" : \\\"BA\\\",\n \\\"value\\\" : \\\"Bosnia and Herzegovina\\\",\n \\\"native\\\" : \\\"Bosna i Hercegovina\\\",\n \\\"phone\\\" : \\\"387\\\",\n \\\"continent\\\" : \\\"EU\\\",\n \\\"capital\\\" : \\\"Sarajevo\\\",\n \\\"currency\\\" : \\\"BAM\\\",\n \\\"languages\\\" : \\\"bs,hr,sr\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 18,\n \\\"code\\\" : \\\"BB\\\",\n \\\"value\\\" : \\\"Barbados\\\",\n \\\"native\\\" : \\\"Barbados\\\",\n \\\"phone\\\" : \\\"1246\\\",\n \\\"continent\\\" : \\\"NA\\\",\n \\\"capital\\\" : \\\"Bridgetown\\\",\n \\\"currency\\\" : \\\"BBD\\\",\n \\\"languages\\\" : \\\"en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 19,\n \\\"code\\\" : \\\"BD\\\",\n \\\"value\\\" : \\\"Bangladesh\\\",\n \\\"native\\\" : \\\"Bangladesh\\\",\n \\\"phone\\\" : \\\"880\\\",\n \\\"continent\\\" : \\\"AS\\\",\n \\\"capital\\\" : \\\"Dhaka\\\",\n \\\"currency\\\" : \\\"BDT\\\",\n \\\"languages\\\" : \\\"bn\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 20,\n \\\"code\\\" : \\\"BE\\\",\n \\\"value\\\" : \\\"Belgium\\\",\n \\\"native\\\" : \\\"België\\\",\n \\\"phone\\\" : \\\"32\\\",\n \\\"continent\\\" : \\\"EU\\\",\n \\\"capital\\\" : \\\"Brussels\\\",\n \\\"currency\\\" : \\\"EUR\\\",\n \\\"languages\\\" : \\\"nl,fr,de\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 21,\n \\\"code\\\" : \\\"BF\\\",\n \\\"value\\\" : \\\"Burkina Faso\\\",\n \\\"native\\\" : \\\"Burkina Faso\\\",\n \\\"phone\\\" : \\\"226\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Ouagadougou\\\",\n \\\"currency\\\" : \\\"XOF\\\",\n \\\"languages\\\" : \\\"fr,ff\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 22,\n \\\"code\\\" : \\\"BG\\\",\n \\\"value\\\" : \\\"Bulgaria\\\",\n \\\"native\\\" : \\\"България\\\",\n \\\"phone\\\" : \\\"359\\\",\n \\\"continent\\\" : \\\"EU\\\",\n \\\"capital\\\" : \\\"Sofia\\\",\n \\\"currency\\\" : \\\"BGN\\\",\n \\\"languages\\\" : \\\"bg\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 23,\n \\\"code\\\" : \\\"BH\\\",\n \\\"value\\\" : \\\"Bahrain\\\",\n \\\"native\\\" : \\\"البحرين\\\",\n \\\"phone\\\" : \\\"973\\\",\n \\\"continent\\\" : \\\"AS\\\",\n \\\"capital\\\" : \\\"Manama\\\",\n \\\"currency\\\" : \\\"BHD\\\",\n \\\"languages\\\" : \\\"ar\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 24,\n \\\"code\\\" : \\\"BI\\\",\n \\\"value\\\" : \\\"Burundi\\\",\n \\\"native\\\" : \\\"Burundi\\\",\n \\\"phone\\\" : \\\"257\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Bujumbura\\\",\n \\\"currency\\\" : \\\"BIF\\\",\n \\\"languages\\\" : \\\"fr,rn\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 25,\n \\\"code\\\" : \\\"BJ\\\",\n \\\"value\\\" : \\\"Benin\\\",\n \\\"native\\\" : \\\"Bénin\\\",\n \\\"phone\\\" : \\\"229\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Porto-Novo\\\",\n \\\"currency\\\" : \\\"XOF\\\",\n \\\"languages\\\" : \\\"fr\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 26,\n \\\"code\\\" : \\\"BL\\\",\n \\\"value\\\" : \\\"Saint Barthélemy\\\",\n \\\"native\\\" : \\\"Saint-Barthélemy\\\",\n \\\"phone\\\" : \\\"590\\\",\n \\\"continent\\\" : \\\"NA\\\",\n \\\"capital\\\" : \\\"Gustavia\\\",\n \\\"currency\\\" : \\\"EUR\\\",\n \\\"languages\\\" : \\\"fr\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 27,\n \\\"code\\\" : \\\"BM\\\",\n \\\"value\\\" : \\\"Bermuda\\\",\n \\\"native\\\" : \\\"Bermuda\\\",\n \\\"phone\\\" : \\\"1441\\\",\n \\\"continent\\\" : \\\"NA\\\",\n \\\"capital\\\" : \\\"Hamilton\\\",\n \\\"currency\\\" : \\\"BMD\\\",\n \\\"languages\\\" : \\\"en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 28,\n \\\"code\\\" : \\\"BN\\\",\n \\\"value\\\" : \\\"Brunei\\\",\n \\\"native\\\" : \\\"Negara Brunei Darussalam\\\",\n \\\"phone\\\" : \\\"673\\\",\n \\\"continent\\\" : \\\"AS\\\",\n \\\"capital\\\" : \\\"Bandar Seri Begawan\\\",\n \\\"currency\\\" : \\\"BND\\\",\n \\\"languages\\\" : \\\"ms\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 29,\n \\\"code\\\" : \\\"BO\\\",\n \\\"value\\\" : \\\"Bolivia\\\",\n \\\"native\\\" : \\\"Bolivia\\\",\n \\\"phone\\\" : \\\"591\\\",\n \\\"continent\\\" : \\\"SA\\\",\n \\\"capital\\\" : \\\"Sucre\\\",\n \\\"currency\\\" : \\\"BOB,BOV\\\",\n \\\"languages\\\" : \\\"es,ay,qu\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 30,\n \\\"code\\\" : \\\"BQ\\\",\n \\\"value\\\" : \\\"Bonaire\\\",\n \\\"native\\\" : \\\"Bonaire\\\",\n \\\"phone\\\" : \\\"5997\\\",\n \\\"continent\\\" : \\\"NA\\\",\n \\\"capital\\\" : \\\"Kralendijk\\\",\n \\\"currency\\\" : \\\"USD\\\",\n \\\"languages\\\" : \\\"nl\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 31,\n \\\"code\\\" : \\\"BR\\\",\n \\\"value\\\" : \\\"Brazil\\\",\n \\\"native\\\" : \\\"Brasil\\\",\n \\\"phone\\\" : \\\"55\\\",\n \\\"continent\\\" : \\\"SA\\\",\n \\\"capital\\\" : \\\"Brasília\\\",\n \\\"currency\\\" : \\\"BRL\\\",\n \\\"languages\\\" : \\\"pt\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 32,\n \\\"code\\\" : \\\"BS\\\",\n \\\"value\\\" : \\\"Bahamas\\\",\n \\\"native\\\" : \\\"Bahamas\\\",\n \\\"phone\\\" : \\\"1242\\\",\n \\\"continent\\\" : \\\"NA\\\",\n \\\"capital\\\" : \\\"Nassau\\\",\n \\\"currency\\\" : \\\"BSD\\\",\n \\\"languages\\\" : \\\"en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 33,\n \\\"code\\\" : \\\"BT\\\",\n \\\"value\\\" : \\\"Bhutan\\\",\n \\\"native\\\" : \\\"ʼbrug-yul\\\",\n \\\"phone\\\" : \\\"975\\\",\n \\\"continent\\\" : \\\"AS\\\",\n \\\"capital\\\" : \\\"Thimphu\\\",\n \\\"currency\\\" : \\\"BTN,INR\\\",\n \\\"languages\\\" : \\\"dz\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 34,\n \\\"code\\\" : \\\"BV\\\",\n \\\"value\\\" : \\\"Bouvet Island\\\",\n \\\"native\\\" : \\\"Bouvetøya\\\",\n \\\"phone\\\" : \\\"\\\",\n \\\"continent\\\" : \\\"AN\\\",\n \\\"capital\\\" : \\\"\\\",\n \\\"currency\\\" : \\\"NOK\\\",\n \\\"languages\\\" : \\\"\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 35,\n \\\"code\\\" : \\\"BW\\\",\n \\\"value\\\" : \\\"Botswana\\\",\n \\\"native\\\" : \\\"Botswana\\\",\n \\\"phone\\\" : \\\"267\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Gaborone\\\",\n \\\"currency\\\" : \\\"BWP\\\",\n \\\"languages\\\" : \\\"en,tn\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 36,\n \\\"code\\\" : \\\"BY\\\",\n \\\"value\\\" : \\\"Belarus\\\",\n \\\"native\\\" : \\\"Белару́сь\\\",\n \\\"phone\\\" : \\\"375\\\",\n \\\"continent\\\" : \\\"EU\\\",\n \\\"capital\\\" : \\\"Minsk\\\",\n \\\"currency\\\" : \\\"BYR\\\",\n \\\"languages\\\" : \\\"be,ru\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 37,\n \\\"code\\\" : \\\"BZ\\\",\n \\\"value\\\" : \\\"Belize\\\",\n \\\"native\\\" : \\\"Belize\\\",\n \\\"phone\\\" : \\\"501\\\",\n \\\"continent\\\" : \\\"NA\\\",\n \\\"capital\\\" : \\\"Belmopan\\\",\n \\\"currency\\\" : \\\"BZD\\\",\n \\\"languages\\\" : \\\"en,es\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 38,\n \\\"code\\\" : \\\"CA\\\",\n \\\"value\\\" : \\\"Canada\\\",\n \\\"native\\\" : \\\"Canada\\\",\n \\\"phone\\\" : \\\"1\\\",\n \\\"continent\\\" : \\\"NA\\\",\n \\\"capital\\\" : \\\"Ottawa\\\",\n \\\"currency\\\" : \\\"CAD\\\",\n \\\"languages\\\" : \\\"en,fr\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 39,\n \\\"code\\\" : \\\"CC\\\",\n \\\"value\\\" : \\\"Cocos [Keeling] Islands\\\",\n \\\"native\\\" : \\\"Cocos (Keeling) Islands\\\",\n \\\"phone\\\" : \\\"61\\\",\n \\\"continent\\\" : \\\"AS\\\",\n \\\"capital\\\" : \\\"West Island\\\",\n \\\"currency\\\" : \\\"AUD\\\",\n \\\"languages\\\" : \\\"en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 40,\n \\\"code\\\" : \\\"CD\\\",\n \\\"value\\\" : \\\"Democratic Republic of the Congo\\\",\n \\\"native\\\" : \\\"République démocratique du Congo\\\",\n \\\"phone\\\" : \\\"243\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Kinshasa\\\",\n \\\"currency\\\" : \\\"CDF\\\",\n \\\"languages\\\" : \\\"fr,ln,kg,sw,lu\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 41,\n \\\"code\\\" : \\\"CF\\\",\n \\\"value\\\" : \\\"Central African Republic\\\",\n \\\"native\\\" : \\\"Ködörösêse tî Bêafrîka\\\",\n \\\"phone\\\" : \\\"236\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Bangui\\\",\n \\\"currency\\\" : \\\"XAF\\\",\n \\\"languages\\\" : \\\"fr,sg\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 42,\n \\\"code\\\" : \\\"CG\\\",\n \\\"value\\\" : \\\"Republic of the Congo\\\",\n \\\"native\\\" : \\\"République du Congo\\\",\n \\\"phone\\\" : \\\"242\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Brazzaville\\\",\n \\\"currency\\\" : \\\"XAF\\\",\n \\\"languages\\\" : \\\"fr,ln\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 43,\n \\\"code\\\" : \\\"CH\\\",\n \\\"value\\\" : \\\"Switzerland\\\",\n \\\"native\\\" : \\\"Schweiz\\\",\n \\\"phone\\\" : \\\"41\\\",\n \\\"continent\\\" : \\\"EU\\\",\n \\\"capital\\\" : \\\"Bern\\\",\n \\\"currency\\\" : \\\"CHE,CHF,CHW\\\",\n \\\"languages\\\" : \\\"de,fr,it\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 44,\n \\\"code\\\" : \\\"CI\\\",\n \\\"value\\\" : \\\"Ivory Coast\\\",\n \\\"native\\\" : \\\"Côte d'Ivoire\\\",\n \\\"phone\\\" : \\\"225\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Yamoussoukro\\\",\n \\\"currency\\\" : \\\"XOF\\\",\n \\\"languages\\\" : \\\"fr\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 45,\n \\\"code\\\" : \\\"CK\\\",\n \\\"value\\\" : \\\"Cook Islands\\\",\n \\\"native\\\" : \\\"Cook Islands\\\",\n \\\"phone\\\" : \\\"682\\\",\n \\\"continent\\\" : \\\"OC\\\",\n \\\"capital\\\" : \\\"Avarua\\\",\n \\\"currency\\\" : \\\"NZD\\\",\n \\\"languages\\\" : \\\"en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 46,\n \\\"code\\\" : \\\"CL\\\",\n \\\"value\\\" : \\\"Chile\\\",\n \\\"native\\\" : \\\"Chile\\\",\n \\\"phone\\\" : \\\"56\\\",\n \\\"continent\\\" : \\\"SA\\\",\n \\\"capital\\\" : \\\"Santiago\\\",\n \\\"currency\\\" : \\\"CLF,CLP\\\",\n \\\"languages\\\" : \\\"es\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 47,\n \\\"code\\\" : \\\"CM\\\",\n \\\"value\\\" : \\\"Cameroon\\\",\n \\\"native\\\" : \\\"Cameroon\\\",\n \\\"phone\\\" : \\\"237\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Yaoundé\\\",\n \\\"currency\\\" : \\\"XAF\\\",\n \\\"languages\\\" : \\\"en,fr\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 48,\n \\\"code\\\" : \\\"CN\\\",\n \\\"value\\\" : \\\"China\\\",\n \\\"native\\\" : \\\"中国\\\",\n \\\"phone\\\" : \\\"86\\\",\n \\\"continent\\\" : \\\"AS\\\",\n \\\"capital\\\" : \\\"Beijing\\\",\n \\\"currency\\\" : \\\"CNY\\\",\n \\\"languages\\\" : \\\"zh\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 49,\n \\\"code\\\" : \\\"CO\\\",\n \\\"value\\\" : \\\"Colombia\\\",\n \\\"native\\\" : \\\"Colombia\\\",\n \\\"phone\\\" : \\\"57\\\",\n \\\"continent\\\" : \\\"SA\\\",\n \\\"capital\\\" : \\\"Bogotá\\\",\n \\\"currency\\\" : \\\"COP\\\",\n \\\"languages\\\" : \\\"es\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 50,\n \\\"code\\\" : \\\"CR\\\",\n \\\"value\\\" : \\\"Costa Rica\\\",\n \\\"native\\\" : \\\"Costa Rica\\\",\n \\\"phone\\\" : \\\"506\\\",\n \\\"continent\\\" : \\\"NA\\\",\n \\\"capital\\\" : \\\"San José\\\",\n \\\"currency\\\" : \\\"CRC\\\",\n \\\"languages\\\" : \\\"es\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 51,\n \\\"code\\\" : \\\"CU\\\",\n \\\"value\\\" : \\\"Cuba\\\",\n \\\"native\\\" : \\\"Cuba\\\",\n \\\"phone\\\" : \\\"53\\\",\n \\\"continent\\\" : \\\"NA\\\",\n \\\"capital\\\" : \\\"Havana\\\",\n \\\"currency\\\" : \\\"CUC,CUP\\\",\n \\\"languages\\\" : \\\"es\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 52,\n \\\"code\\\" : \\\"CV\\\",\n \\\"value\\\" : \\\"Cape Verde\\\",\n \\\"native\\\" : \\\"Cabo Verde\\\",\n \\\"phone\\\" : \\\"238\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Praia\\\",\n \\\"currency\\\" : \\\"CVE\\\",\n \\\"languages\\\" : \\\"pt\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 53,\n \\\"code\\\" : \\\"CW\\\",\n \\\"value\\\" : \\\"Curacao\\\",\n \\\"native\\\" : \\\"Curaçao\\\",\n \\\"phone\\\" : \\\"5999\\\",\n \\\"continent\\\" : \\\"NA\\\",\n \\\"capital\\\" : \\\"Willemstad\\\",\n \\\"currency\\\" : \\\"ANG\\\",\n \\\"languages\\\" : \\\"nl,pa,en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 54,\n \\\"code\\\" : \\\"CX\\\",\n \\\"value\\\" : \\\"Christmas Island\\\",\n \\\"native\\\" : \\\"Christmas Island\\\",\n \\\"phone\\\" : \\\"61\\\",\n \\\"continent\\\" : \\\"AS\\\",\n \\\"capital\\\" : \\\"Flying Fish Cove\\\",\n \\\"currency\\\" : \\\"AUD\\\",\n \\\"languages\\\" : \\\"en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 55,\n \\\"code\\\" : \\\"CY\\\",\n \\\"value\\\" : \\\"Cyprus\\\",\n \\\"native\\\" : \\\"Κύπρος\\\",\n \\\"phone\\\" : \\\"357\\\",\n \\\"continent\\\" : \\\"EU\\\",\n \\\"capital\\\" : \\\"Nicosia\\\",\n \\\"currency\\\" : \\\"EUR\\\",\n \\\"languages\\\" : \\\"el,tr,hy\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 56,\n \\\"code\\\" : \\\"CZ\\\",\n \\\"value\\\" : \\\"Czech Republic\\\",\n \\\"native\\\" : \\\"Česká republika\\\",\n \\\"phone\\\" : \\\"420\\\",\n \\\"continent\\\" : \\\"EU\\\",\n \\\"capital\\\" : \\\"Prague\\\",\n \\\"currency\\\" : \\\"CZK\\\",\n \\\"languages\\\" : \\\"cs,sk\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 57,\n \\\"code\\\" : \\\"DE\\\",\n \\\"value\\\" : \\\"Germany\\\",\n \\\"native\\\" : \\\"Deutschland\\\",\n \\\"phone\\\" : \\\"49\\\",\n \\\"continent\\\" : \\\"EU\\\",\n \\\"capital\\\" : \\\"Berlin\\\",\n \\\"currency\\\" : \\\"EUR\\\",\n \\\"languages\\\" : \\\"de\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 58,\n \\\"code\\\" : \\\"DJ\\\",\n \\\"value\\\" : \\\"Djibouti\\\",\n \\\"native\\\" : \\\"Djibouti\\\",\n \\\"phone\\\" : \\\"253\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Djibouti\\\",\n \\\"currency\\\" : \\\"DJF\\\",\n \\\"languages\\\" : \\\"fr,ar\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 59,\n \\\"code\\\" : \\\"DK\\\",\n \\\"value\\\" : \\\"Denmark\\\",\n \\\"native\\\" : \\\"Danmark\\\",\n \\\"phone\\\" : \\\"45\\\",\n \\\"continent\\\" : \\\"EU\\\",\n \\\"capital\\\" : \\\"Copenhagen\\\",\n \\\"currency\\\" : \\\"DKK\\\",\n \\\"languages\\\" : \\\"da\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 60,\n \\\"code\\\" : \\\"DM\\\",\n \\\"value\\\" : \\\"Dominica\\\",\n \\\"native\\\" : \\\"Dominica\\\",\n \\\"phone\\\" : \\\"1767\\\",\n \\\"continent\\\" : \\\"NA\\\",\n \\\"capital\\\" : \\\"Roseau\\\",\n \\\"currency\\\" : \\\"XCD\\\",\n \\\"languages\\\" : \\\"en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 61,\n \\\"code\\\" : \\\"DO\\\",\n \\\"value\\\" : \\\"Dominican Republic\\\",\n \\\"native\\\" : \\\"República Dominicana\\\",\n \\\"phone\\\" : \\\"1809,1829,1849\\\",\n \\\"continent\\\" : \\\"NA\\\",\n \\\"capital\\\" : \\\"Santo Domingo\\\",\n \\\"currency\\\" : \\\"DOP\\\",\n \\\"languages\\\" : \\\"es\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 62,\n \\\"code\\\" : \\\"DZ\\\",\n \\\"value\\\" : \\\"Algeria\\\",\n \\\"native\\\" : \\\"الجزائر\\\",\n \\\"phone\\\" : \\\"213\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Algiers\\\",\n \\\"currency\\\" : \\\"DZD\\\",\n \\\"languages\\\" : \\\"ar\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 63,\n \\\"code\\\" : \\\"EC\\\",\n \\\"value\\\" : \\\"Ecuador\\\",\n \\\"native\\\" : \\\"Ecuador\\\",\n \\\"phone\\\" : \\\"593\\\",\n \\\"continent\\\" : \\\"SA\\\",\n \\\"capital\\\" : \\\"Quito\\\",\n \\\"currency\\\" : \\\"USD\\\",\n \\\"languages\\\" : \\\"es\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 64,\n \\\"code\\\" : \\\"EE\\\",\n \\\"value\\\" : \\\"Estonia\\\",\n \\\"native\\\" : \\\"Eesti\\\",\n \\\"phone\\\" : \\\"372\\\",\n \\\"continent\\\" : \\\"EU\\\",\n \\\"capital\\\" : \\\"Tallinn\\\",\n \\\"currency\\\" : \\\"EUR\\\",\n \\\"languages\\\" : \\\"et\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 65,\n \\\"code\\\" : \\\"EG\\\",\n \\\"value\\\" : \\\"Egypt\\\",\n \\\"native\\\" : \\\"مصر\\\",\n \\\"phone\\\" : \\\"20\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Cairo\\\",\n \\\"currency\\\" : \\\"EGP\\\",\n \\\"languages\\\" : \\\"ar\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 66,\n \\\"code\\\" : \\\"EH\\\",\n \\\"value\\\" : \\\"Western Sahara\\\",\n \\\"native\\\" : \\\"الصحراء الغربية\\\",\n \\\"phone\\\" : \\\"212\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"El Aaiún\\\",\n \\\"currency\\\" : \\\"MAD,DZD,MRO\\\",\n \\\"languages\\\" : \\\"es\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 67,\n \\\"code\\\" : \\\"ER\\\",\n \\\"value\\\" : \\\"Eritrea\\\",\n \\\"native\\\" : \\\"ኤርትራ\\\",\n \\\"phone\\\" : \\\"291\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Asmara\\\",\n \\\"currency\\\" : \\\"ERN\\\",\n \\\"languages\\\" : \\\"ti,ar,en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 68,\n \\\"code\\\" : \\\"ES\\\",\n \\\"value\\\" : \\\"Spain\\\",\n \\\"native\\\" : \\\"España\\\",\n \\\"phone\\\" : \\\"34\\\",\n \\\"continent\\\" : \\\"EU\\\",\n \\\"capital\\\" : \\\"Madrid\\\",\n \\\"currency\\\" : \\\"EUR\\\",\n \\\"languages\\\" : \\\"es,eu,ca,gl,oc\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 69,\n \\\"code\\\" : \\\"ET\\\",\n \\\"value\\\" : \\\"Ethiopia\\\",\n \\\"native\\\" : \\\"ኢትዮጵያ\\\",\n \\\"phone\\\" : \\\"251\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Addis Ababa\\\",\n \\\"currency\\\" : \\\"ETB\\\",\n \\\"languages\\\" : \\\"am\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 70,\n \\\"code\\\" : \\\"FI\\\",\n \\\"value\\\" : \\\"Finland\\\",\n \\\"native\\\" : \\\"Suomi\\\",\n \\\"phone\\\" : \\\"358\\\",\n \\\"continent\\\" : \\\"EU\\\",\n \\\"capital\\\" : \\\"Helsinki\\\",\n \\\"currency\\\" : \\\"EUR\\\",\n \\\"languages\\\" : \\\"fi,sv\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 71,\n \\\"code\\\" : \\\"FJ\\\",\n \\\"value\\\" : \\\"Fiji\\\",\n \\\"native\\\" : \\\"Fiji\\\",\n \\\"phone\\\" : \\\"679\\\",\n \\\"continent\\\" : \\\"OC\\\",\n \\\"capital\\\" : \\\"Suva\\\",\n \\\"currency\\\" : \\\"FJD\\\",\n \\\"languages\\\" : \\\"en,fj,hi,ur\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 72,\n \\\"code\\\" : \\\"FK\\\",\n \\\"value\\\" : \\\"Falkland Islands\\\",\n \\\"native\\\" : \\\"Falkland Islands\\\",\n \\\"phone\\\" : \\\"500\\\",\n \\\"continent\\\" : \\\"SA\\\",\n \\\"capital\\\" : \\\"Stanley\\\",\n \\\"currency\\\" : \\\"FKP\\\",\n \\\"languages\\\" : \\\"en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 73,\n \\\"code\\\" : \\\"FM\\\",\n \\\"value\\\" : \\\"Micronesia\\\",\n \\\"native\\\" : \\\"Micronesia\\\",\n \\\"phone\\\" : \\\"691\\\",\n \\\"continent\\\" : \\\"OC\\\",\n \\\"capital\\\" : \\\"Palikir\\\",\n \\\"currency\\\" : \\\"USD\\\",\n \\\"languages\\\" : \\\"en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 74,\n \\\"code\\\" : \\\"FO\\\",\n \\\"value\\\" : \\\"Faroe Islands\\\",\n \\\"native\\\" : \\\"Føroyar\\\",\n \\\"phone\\\" : \\\"298\\\",\n \\\"continent\\\" : \\\"EU\\\",\n \\\"capital\\\" : \\\"Tórshavn\\\",\n \\\"currency\\\" : \\\"DKK\\\",\n \\\"languages\\\" : \\\"fo\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 75,\n \\\"code\\\" : \\\"FR\\\",\n \\\"value\\\" : \\\"France\\\",\n \\\"native\\\" : \\\"France\\\",\n \\\"phone\\\" : \\\"33\\\",\n \\\"continent\\\" : \\\"EU\\\",\n \\\"capital\\\" : \\\"Paris\\\",\n \\\"currency\\\" : \\\"EUR\\\",\n \\\"languages\\\" : \\\"fr\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 76,\n \\\"code\\\" : \\\"GA\\\",\n \\\"value\\\" : \\\"Gabon\\\",\n \\\"native\\\" : \\\"Gabon\\\",\n \\\"phone\\\" : \\\"241\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Libreville\\\",\n \\\"currency\\\" : \\\"XAF\\\",\n \\\"languages\\\" : \\\"fr\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 77,\n \\\"code\\\" : \\\"GB\\\",\n \\\"value\\\" : \\\"United Kingdom\\\",\n \\\"native\\\" : \\\"United Kingdom\\\",\n \\\"phone\\\" : \\\"44\\\",\n \\\"continent\\\" : \\\"EU\\\",\n \\\"capital\\\" : \\\"London\\\",\n \\\"currency\\\" : \\\"GBP\\\",\n \\\"languages\\\" : \\\"en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 78,\n \\\"code\\\" : \\\"GD\\\",\n \\\"value\\\" : \\\"Grenada\\\",\n \\\"native\\\" : \\\"Grenada\\\",\n \\\"phone\\\" : \\\"1473\\\",\n \\\"continent\\\" : \\\"NA\\\",\n \\\"capital\\\" : \\\"St. George's\\\",\n \\\"currency\\\" : \\\"XCD\\\",\n \\\"languages\\\" : \\\"en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 79,\n \\\"code\\\" : \\\"GE\\\",\n \\\"value\\\" : \\\"Georgia\\\",\n \\\"native\\\" : \\\"საქართველო\\\",\n \\\"phone\\\" : \\\"995\\\",\n \\\"continent\\\" : \\\"AS\\\",\n \\\"capital\\\" : \\\"Tbilisi\\\",\n \\\"currency\\\" : \\\"GEL\\\",\n \\\"languages\\\" : \\\"ka\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 80,\n \\\"code\\\" : \\\"GF\\\",\n \\\"value\\\" : \\\"French Guiana\\\",\n \\\"native\\\" : \\\"Guyane française\\\",\n \\\"phone\\\" : \\\"594\\\",\n \\\"continent\\\" : \\\"SA\\\",\n \\\"capital\\\" : \\\"Cayenne\\\",\n \\\"currency\\\" : \\\"EUR\\\",\n \\\"languages\\\" : \\\"fr\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 81,\n \\\"code\\\" : \\\"GG\\\",\n \\\"value\\\" : \\\"Guernsey\\\",\n \\\"native\\\" : \\\"Guernsey\\\",\n \\\"phone\\\" : \\\"44\\\",\n \\\"continent\\\" : \\\"EU\\\",\n \\\"capital\\\" : \\\"St. Peter Port\\\",\n \\\"currency\\\" : \\\"GBP\\\",\n \\\"languages\\\" : \\\"en,fr\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 82,\n \\\"code\\\" : \\\"GH\\\",\n \\\"value\\\" : \\\"Ghana\\\",\n \\\"native\\\" : \\\"Ghana\\\",\n \\\"phone\\\" : \\\"233\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Accra\\\",\n \\\"currency\\\" : \\\"GHS\\\",\n \\\"languages\\\" : \\\"en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 83,\n \\\"code\\\" : \\\"GI\\\",\n \\\"value\\\" : \\\"Gibraltar\\\",\n \\\"native\\\" : \\\"Gibraltar\\\",\n \\\"phone\\\" : \\\"350\\\",\n \\\"continent\\\" : \\\"EU\\\",\n \\\"capital\\\" : \\\"Gibraltar\\\",\n \\\"currency\\\" : \\\"GIP\\\",\n \\\"languages\\\" : \\\"en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 84,\n \\\"code\\\" : \\\"GL\\\",\n \\\"value\\\" : \\\"Greenland\\\",\n \\\"native\\\" : \\\"Kalaallit Nunaat\\\",\n \\\"phone\\\" : \\\"299\\\",\n \\\"continent\\\" : \\\"NA\\\",\n \\\"capital\\\" : \\\"Nuuk\\\",\n \\\"currency\\\" : \\\"DKK\\\",\n \\\"languages\\\" : \\\"kl\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 85,\n \\\"code\\\" : \\\"GM\\\",\n \\\"value\\\" : \\\"Gambia\\\",\n \\\"native\\\" : \\\"Gambia\\\",\n \\\"phone\\\" : \\\"220\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Banjul\\\",\n \\\"currency\\\" : \\\"GMD\\\",\n \\\"languages\\\" : \\\"en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 86,\n \\\"code\\\" : \\\"GN\\\",\n \\\"value\\\" : \\\"Guinea\\\",\n \\\"native\\\" : \\\"Guinée\\\",\n \\\"phone\\\" : \\\"224\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Conakry\\\",\n \\\"currency\\\" : \\\"GNF\\\",\n \\\"languages\\\" : \\\"fr,ff\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 87,\n \\\"code\\\" : \\\"GP\\\",\n \\\"value\\\" : \\\"Guadeloupe\\\",\n \\\"native\\\" : \\\"Guadeloupe\\\",\n \\\"phone\\\" : \\\"590\\\",\n \\\"continent\\\" : \\\"NA\\\",\n \\\"capital\\\" : \\\"Basse-Terre\\\",\n \\\"currency\\\" : \\\"EUR\\\",\n \\\"languages\\\" : \\\"fr\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 88,\n \\\"code\\\" : \\\"GQ\\\",\n \\\"value\\\" : \\\"Equatorial Guinea\\\",\n \\\"native\\\" : \\\"Guinea Ecuatorial\\\",\n \\\"phone\\\" : \\\"240\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Malabo\\\",\n \\\"currency\\\" : \\\"XAF\\\",\n \\\"languages\\\" : \\\"es,fr\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 89,\n \\\"code\\\" : \\\"GR\\\",\n \\\"value\\\" : \\\"Greece\\\",\n \\\"native\\\" : \\\"Ελλάδα\\\",\n \\\"phone\\\" : \\\"30\\\",\n \\\"continent\\\" : \\\"EU\\\",\n \\\"capital\\\" : \\\"Athens\\\",\n \\\"currency\\\" : \\\"EUR\\\",\n \\\"languages\\\" : \\\"el\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 90,\n \\\"code\\\" : \\\"GS\\\",\n \\\"value\\\" : \\\"South Georgia and the South Sandwich Islands\\\",\n \\\"native\\\" : \\\"South Georgia\\\",\n \\\"phone\\\" : \\\"500\\\",\n \\\"continent\\\" : \\\"AN\\\",\n \\\"capital\\\" : \\\"King Edward Point\\\",\n \\\"currency\\\" : \\\"GBP\\\",\n \\\"languages\\\" : \\\"en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 91,\n \\\"code\\\" : \\\"GT\\\",\n \\\"value\\\" : \\\"Guatemala\\\",\n \\\"native\\\" : \\\"Guatemala\\\",\n \\\"phone\\\" : \\\"502\\\",\n \\\"continent\\\" : \\\"NA\\\",\n \\\"capital\\\" : \\\"Guatemala City\\\",\n \\\"currency\\\" : \\\"GTQ\\\",\n \\\"languages\\\" : \\\"es\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 92,\n \\\"code\\\" : \\\"GU\\\",\n \\\"value\\\" : \\\"Guam\\\",\n \\\"native\\\" : \\\"Guam\\\",\n \\\"phone\\\" : \\\"1671\\\",\n \\\"continent\\\" : \\\"OC\\\",\n \\\"capital\\\" : \\\"Hagåtña\\\",\n \\\"currency\\\" : \\\"USD\\\",\n \\\"languages\\\" : \\\"en,ch,es\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 93,\n \\\"code\\\" : \\\"GW\\\",\n \\\"value\\\" : \\\"Guinea-Bissau\\\",\n \\\"native\\\" : \\\"Guiné-Bissau\\\",\n \\\"phone\\\" : \\\"245\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Bissau\\\",\n \\\"currency\\\" : \\\"XOF\\\",\n \\\"languages\\\" : \\\"pt\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 94,\n \\\"code\\\" : \\\"GY\\\",\n \\\"value\\\" : \\\"Guyana\\\",\n \\\"native\\\" : \\\"Guyana\\\",\n \\\"phone\\\" : \\\"592\\\",\n \\\"continent\\\" : \\\"SA\\\",\n \\\"capital\\\" : \\\"Georgetown\\\",\n \\\"currency\\\" : \\\"GYD\\\",\n \\\"languages\\\" : \\\"en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 95,\n \\\"code\\\" : \\\"HK\\\",\n \\\"value\\\" : \\\"Hong Kong\\\",\n \\\"native\\\" : \\\"香港\\\",\n \\\"phone\\\" : \\\"852\\\",\n \\\"continent\\\" : \\\"AS\\\",\n \\\"capital\\\" : \\\"City of Victoria\\\",\n \\\"currency\\\" : \\\"HKD\\\",\n \\\"languages\\\" : \\\"zh,en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 96,\n \\\"code\\\" : \\\"HM\\\",\n \\\"value\\\" : \\\"Heard Island and McDonald Islands\\\",\n \\\"native\\\" : \\\"Heard Island and McDonald Islands\\\",\n \\\"phone\\\" : \\\"\\\",\n \\\"continent\\\" : \\\"AN\\\",\n \\\"capital\\\" : \\\"\\\",\n \\\"currency\\\" : \\\"AUD\\\",\n \\\"languages\\\" : \\\"en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 97,\n \\\"code\\\" : \\\"HN\\\",\n \\\"value\\\" : \\\"Honduras\\\",\n \\\"native\\\" : \\\"Honduras\\\",\n \\\"phone\\\" : \\\"504\\\",\n \\\"continent\\\" : \\\"NA\\\",\n \\\"capital\\\" : \\\"Tegucigalpa\\\",\n \\\"currency\\\" : \\\"HNL\\\",\n \\\"languages\\\" : \\\"es\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 98,\n \\\"code\\\" : \\\"HR\\\",\n \\\"value\\\" : \\\"Croatia\\\",\n \\\"native\\\" : \\\"Hrvatska\\\",\n \\\"phone\\\" : \\\"385\\\",\n \\\"continent\\\" : \\\"EU\\\",\n \\\"capital\\\" : \\\"Zagreb\\\",\n \\\"currency\\\" : \\\"HRK\\\",\n \\\"languages\\\" : \\\"hr\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 99,\n \\\"code\\\" : \\\"HT\\\",\n \\\"value\\\" : \\\"Haiti\\\",\n \\\"native\\\" : \\\"Haïti\\\",\n \\\"phone\\\" : \\\"509\\\",\n \\\"continent\\\" : \\\"NA\\\",\n \\\"capital\\\" : \\\"Port-au-Prince\\\",\n \\\"currency\\\" : \\\"HTG,USD\\\",\n \\\"languages\\\" : \\\"fr,ht\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 100,\n \\\"code\\\" : \\\"HU\\\",\n \\\"value\\\" : \\\"Hungary\\\",\n \\\"native\\\" : \\\"Magyarország\\\",\n \\\"phone\\\" : \\\"36\\\",\n \\\"continent\\\" : \\\"EU\\\",\n \\\"capital\\\" : \\\"Budapest\\\",\n \\\"currency\\\" : \\\"HUF\\\",\n \\\"languages\\\" : \\\"hu\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 101,\n \\\"code\\\" : \\\"ID\\\",\n \\\"value\\\" : \\\"Indonesia\\\",\n \\\"native\\\" : \\\"Indonesia\\\",\n \\\"phone\\\" : \\\"62\\\",\n \\\"continent\\\" : \\\"AS\\\",\n \\\"capital\\\" : \\\"Jakarta\\\",\n \\\"currency\\\" : \\\"IDR\\\",\n \\\"languages\\\" : \\\"id\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 102,\n \\\"code\\\" : \\\"IE\\\",\n \\\"value\\\" : \\\"Ireland\\\",\n \\\"native\\\" : \\\"Éire\\\",\n \\\"phone\\\" : \\\"353\\\",\n \\\"continent\\\" : \\\"EU\\\",\n \\\"capital\\\" : \\\"Dublin\\\",\n \\\"currency\\\" : \\\"EUR\\\",\n \\\"languages\\\" : \\\"ga,en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 103,\n \\\"code\\\" : \\\"IL\\\",\n \\\"value\\\" : \\\"Israel\\\",\n \\\"native\\\" : \\\"יִשְׂרָאֵל\\\",\n \\\"phone\\\" : \\\"972\\\",\n \\\"continent\\\" : \\\"AS\\\",\n \\\"capital\\\" : \\\"Jerusalem\\\",\n \\\"currency\\\" : \\\"ILS\\\",\n \\\"languages\\\" : \\\"he,ar\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 104,\n \\\"code\\\" : \\\"IM\\\",\n \\\"value\\\" : \\\"Isle of Man\\\",\n \\\"native\\\" : \\\"Isle of Man\\\",\n \\\"phone\\\" : \\\"44\\\",\n \\\"continent\\\" : \\\"EU\\\",\n \\\"capital\\\" : \\\"Douglas\\\",\n \\\"currency\\\" : \\\"GBP\\\",\n \\\"languages\\\" : \\\"en,gv\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 105,\n \\\"code\\\" : \\\"IN\\\",\n \\\"value\\\" : \\\"India\\\",\n \\\"native\\\" : \\\"भारत\\\",\n \\\"phone\\\" : \\\"91\\\",\n \\\"continent\\\" : \\\"AS\\\",\n \\\"capital\\\" : \\\"New Delhi\\\",\n \\\"currency\\\" : \\\"INR\\\",\n \\\"languages\\\" : \\\"hi,en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 106,\n \\\"code\\\" : \\\"IO\\\",\n \\\"value\\\" : \\\"British Indian Ocean Territory\\\",\n \\\"native\\\" : \\\"British Indian Ocean Territory\\\",\n \\\"phone\\\" : \\\"246\\\",\n \\\"continent\\\" : \\\"AS\\\",\n \\\"capital\\\" : \\\"Diego Garcia\\\",\n \\\"currency\\\" : \\\"USD\\\",\n \\\"languages\\\" : \\\"en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 107,\n \\\"code\\\" : \\\"IQ\\\",\n \\\"value\\\" : \\\"Iraq\\\",\n \\\"native\\\" : \\\"العراق\\\",\n \\\"phone\\\" : \\\"964\\\",\n \\\"continent\\\" : \\\"AS\\\",\n \\\"capital\\\" : \\\"Baghdad\\\",\n \\\"currency\\\" : \\\"IQD\\\",\n \\\"languages\\\" : \\\"ar,ku\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 108,\n \\\"code\\\" : \\\"IR\\\",\n \\\"value\\\" : \\\"Iran\\\",\n \\\"native\\\" : \\\"ایران\\\",\n \\\"phone\\\" : \\\"98\\\",\n \\\"continent\\\" : \\\"AS\\\",\n \\\"capital\\\" : \\\"Tehran\\\",\n \\\"currency\\\" : \\\"IRR\\\",\n \\\"languages\\\" : \\\"fa\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 109,\n \\\"code\\\" : \\\"IS\\\",\n \\\"value\\\" : \\\"Iceland\\\",\n \\\"native\\\" : \\\"Ísland\\\",\n \\\"phone\\\" : \\\"354\\\",\n \\\"continent\\\" : \\\"EU\\\",\n \\\"capital\\\" : \\\"Reykjavik\\\",\n \\\"currency\\\" : \\\"ISK\\\",\n \\\"languages\\\" : \\\"is\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 110,\n \\\"code\\\" : \\\"IT\\\",\n \\\"value\\\" : \\\"Italy\\\",\n \\\"native\\\" : \\\"Italia\\\",\n \\\"phone\\\" : \\\"39\\\",\n \\\"continent\\\" : \\\"EU\\\",\n \\\"capital\\\" : \\\"Rome\\\",\n \\\"currency\\\" : \\\"EUR\\\",\n \\\"languages\\\" : \\\"it\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 111,\n \\\"code\\\" : \\\"JE\\\",\n \\\"value\\\" : \\\"Jersey\\\",\n \\\"native\\\" : \\\"Jersey\\\",\n \\\"phone\\\" : \\\"44\\\",\n \\\"continent\\\" : \\\"EU\\\",\n \\\"capital\\\" : \\\"Saint Helier\\\",\n \\\"currency\\\" : \\\"GBP\\\",\n \\\"languages\\\" : \\\"en,fr\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 112,\n \\\"code\\\" : \\\"JM\\\",\n \\\"value\\\" : \\\"Jamaica\\\",\n \\\"native\\\" : \\\"Jamaica\\\",\n \\\"phone\\\" : \\\"1876\\\",\n \\\"continent\\\" : \\\"NA\\\",\n \\\"capital\\\" : \\\"Kingston\\\",\n \\\"currency\\\" : \\\"JMD\\\",\n \\\"languages\\\" : \\\"en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 113,\n \\\"code\\\" : \\\"JO\\\",\n \\\"value\\\" : \\\"Jordan\\\",\n \\\"native\\\" : \\\"الأردن\\\",\n \\\"phone\\\" : \\\"962\\\",\n \\\"continent\\\" : \\\"AS\\\",\n \\\"capital\\\" : \\\"Amman\\\",\n \\\"currency\\\" : \\\"JOD\\\",\n \\\"languages\\\" : \\\"ar\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 114,\n \\\"code\\\" : \\\"JP\\\",\n \\\"value\\\" : \\\"Japan\\\",\n \\\"native\\\" : \\\"日本\\\",\n \\\"phone\\\" : \\\"81\\\",\n \\\"continent\\\" : \\\"AS\\\",\n \\\"capital\\\" : \\\"Tokyo\\\",\n \\\"currency\\\" : \\\"JPY\\\",\n \\\"languages\\\" : \\\"ja\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 115,\n \\\"code\\\" : \\\"KE\\\",\n \\\"value\\\" : \\\"Kenya\\\",\n \\\"native\\\" : \\\"Kenya\\\",\n \\\"phone\\\" : \\\"254\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Nairobi\\\",\n \\\"currency\\\" : \\\"KES\\\",\n \\\"languages\\\" : \\\"en,sw\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 116,\n \\\"code\\\" : \\\"KG\\\",\n \\\"value\\\" : \\\"Kyrgyzstan\\\",\n \\\"native\\\" : \\\"Кыргызстан\\\",\n \\\"phone\\\" : \\\"996\\\",\n \\\"continent\\\" : \\\"AS\\\",\n \\\"capital\\\" : \\\"Bishkek\\\",\n \\\"currency\\\" : \\\"KGS\\\",\n \\\"languages\\\" : \\\"ky,ru\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 117,\n \\\"code\\\" : \\\"KH\\\",\n \\\"value\\\" : \\\"Cambodia\\\",\n \\\"native\\\" : \\\"Kâmpŭchéa\\\",\n \\\"phone\\\" : \\\"855\\\",\n \\\"continent\\\" : \\\"AS\\\",\n \\\"capital\\\" : \\\"Phnom Penh\\\",\n \\\"currency\\\" : \\\"KHR\\\",\n \\\"languages\\\" : \\\"km\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 118,\n \\\"code\\\" : \\\"KI\\\",\n \\\"value\\\" : \\\"Kiribati\\\",\n \\\"native\\\" : \\\"Kiribati\\\",\n \\\"phone\\\" : \\\"686\\\",\n \\\"continent\\\" : \\\"OC\\\",\n \\\"capital\\\" : \\\"South Tarawa\\\",\n \\\"currency\\\" : \\\"AUD\\\",\n \\\"languages\\\" : \\\"en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 119,\n \\\"code\\\" : \\\"KM\\\",\n \\\"value\\\" : \\\"Comoros\\\",\n \\\"native\\\" : \\\"Komori\\\",\n \\\"phone\\\" : \\\"269\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Moroni\\\",\n \\\"currency\\\" : \\\"KMF\\\",\n \\\"languages\\\" : \\\"ar,fr\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 120,\n \\\"code\\\" : \\\"KN\\\",\n \\\"value\\\" : \\\"Saint Kitts and Nevis\\\",\n \\\"native\\\" : \\\"Saint Kitts and Nevis\\\",\n \\\"phone\\\" : \\\"1869\\\",\n \\\"continent\\\" : \\\"NA\\\",\n \\\"capital\\\" : \\\"Basseterre\\\",\n \\\"currency\\\" : \\\"XCD\\\",\n \\\"languages\\\" : \\\"en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 121,\n \\\"code\\\" : \\\"KP\\\",\n \\\"value\\\" : \\\"North Korea\\\",\n \\\"native\\\" : \\\"북한\\\",\n \\\"phone\\\" : \\\"850\\\",\n \\\"continent\\\" : \\\"AS\\\",\n \\\"capital\\\" : \\\"Pyongyang\\\",\n \\\"currency\\\" : \\\"KPW\\\",\n \\\"languages\\\" : \\\"ko\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 122,\n \\\"code\\\" : \\\"KR\\\",\n \\\"value\\\" : \\\"South Korea\\\",\n \\\"native\\\" : \\\"대한민국\\\",\n \\\"phone\\\" : \\\"82\\\",\n \\\"continent\\\" : \\\"AS\\\",\n \\\"capital\\\" : \\\"Seoul\\\",\n \\\"currency\\\" : \\\"KRW\\\",\n \\\"languages\\\" : \\\"ko\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 123,\n \\\"code\\\" : \\\"KW\\\",\n \\\"value\\\" : \\\"Kuwait\\\",\n \\\"native\\\" : \\\"الكويت\\\",\n \\\"phone\\\" : \\\"965\\\",\n \\\"continent\\\" : \\\"AS\\\",\n \\\"capital\\\" : \\\"Kuwait City\\\",\n \\\"currency\\\" : \\\"KWD\\\",\n \\\"languages\\\" : \\\"ar\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 124,\n \\\"code\\\" : \\\"KY\\\",\n \\\"value\\\" : \\\"Cayman Islands\\\",\n \\\"native\\\" : \\\"Cayman Islands\\\",\n \\\"phone\\\" : \\\"1345\\\",\n \\\"continent\\\" : \\\"NA\\\",\n \\\"capital\\\" : \\\"George Town\\\",\n \\\"currency\\\" : \\\"KYD\\\",\n \\\"languages\\\" : \\\"en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 125,\n \\\"code\\\" : \\\"KZ\\\",\n \\\"value\\\" : \\\"Kazakhstan\\\",\n \\\"native\\\" : \\\"Қазақстан\\\",\n \\\"phone\\\" : \\\"76,77\\\",\n \\\"continent\\\" : \\\"AS\\\",\n \\\"capital\\\" : \\\"Astana\\\",\n \\\"currency\\\" : \\\"KZT\\\",\n \\\"languages\\\" : \\\"kk,ru\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 126,\n \\\"code\\\" : \\\"LA\\\",\n \\\"value\\\" : \\\"Laos\\\",\n \\\"native\\\" : \\\"ສປປລາວ\\\",\n \\\"phone\\\" : \\\"856\\\",\n \\\"continent\\\" : \\\"AS\\\",\n \\\"capital\\\" : \\\"Vientiane\\\",\n \\\"currency\\\" : \\\"LAK\\\",\n \\\"languages\\\" : \\\"lo\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 127,\n \\\"code\\\" : \\\"LB\\\",\n \\\"value\\\" : \\\"Lebanon\\\",\n \\\"native\\\" : \\\"لبنان\\\",\n \\\"phone\\\" : \\\"961\\\",\n \\\"continent\\\" : \\\"AS\\\",\n \\\"capital\\\" : \\\"Beirut\\\",\n \\\"currency\\\" : \\\"LBP\\\",\n \\\"languages\\\" : \\\"ar,fr\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 128,\n \\\"code\\\" : \\\"LC\\\",\n \\\"value\\\" : \\\"Saint Lucia\\\",\n \\\"native\\\" : \\\"Saint Lucia\\\",\n \\\"phone\\\" : \\\"1758\\\",\n \\\"continent\\\" : \\\"NA\\\",\n \\\"capital\\\" : \\\"Castries\\\",\n \\\"currency\\\" : \\\"XCD\\\",\n \\\"languages\\\" : \\\"en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 129,\n \\\"code\\\" : \\\"LI\\\",\n \\\"value\\\" : \\\"Liechtenstein\\\",\n \\\"native\\\" : \\\"Liechtenstein\\\",\n \\\"phone\\\" : \\\"423\\\",\n \\\"continent\\\" : \\\"EU\\\",\n \\\"capital\\\" : \\\"Vaduz\\\",\n \\\"currency\\\" : \\\"CHF\\\",\n \\\"languages\\\" : \\\"de\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 130,\n \\\"code\\\" : \\\"LK\\\",\n \\\"value\\\" : \\\"Sri Lanka\\\",\n \\\"native\\\" : \\\"śrī laṃkāva\\\",\n \\\"phone\\\" : \\\"94\\\",\n \\\"continent\\\" : \\\"AS\\\",\n \\\"capital\\\" : \\\"Colombo\\\",\n \\\"currency\\\" : \\\"LKR\\\",\n \\\"languages\\\" : \\\"si,ta\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 131,\n \\\"code\\\" : \\\"LR\\\",\n \\\"value\\\" : \\\"Liberia\\\",\n \\\"native\\\" : \\\"Liberia\\\",\n \\\"phone\\\" : \\\"231\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Monrovia\\\",\n \\\"currency\\\" : \\\"LRD\\\",\n \\\"languages\\\" : \\\"en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 132,\n \\\"code\\\" : \\\"LS\\\",\n \\\"value\\\" : \\\"Lesotho\\\",\n \\\"native\\\" : \\\"Lesotho\\\",\n \\\"phone\\\" : \\\"266\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Maseru\\\",\n \\\"currency\\\" : \\\"LSL,ZAR\\\",\n \\\"languages\\\" : \\\"en,st\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 133,\n \\\"code\\\" : \\\"LT\\\",\n \\\"value\\\" : \\\"Lithuania\\\",\n \\\"native\\\" : \\\"Lietuva\\\",\n \\\"phone\\\" : \\\"370\\\",\n \\\"continent\\\" : \\\"EU\\\",\n \\\"capital\\\" : \\\"Vilnius\\\",\n \\\"currency\\\" : \\\"LTL\\\",\n \\\"languages\\\" : \\\"lt\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 134,\n \\\"code\\\" : \\\"LU\\\",\n \\\"value\\\" : \\\"Luxembourg\\\",\n \\\"native\\\" : \\\"Luxembourg\\\",\n \\\"phone\\\" : \\\"352\\\",\n \\\"continent\\\" : \\\"EU\\\",\n \\\"capital\\\" : \\\"Luxembourg\\\",\n \\\"currency\\\" : \\\"EUR\\\",\n \\\"languages\\\" : \\\"fr,de,lb\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 135,\n \\\"code\\\" : \\\"LV\\\",\n \\\"value\\\" : \\\"Latvia\\\",\n \\\"native\\\" : \\\"Latvija\\\",\n \\\"phone\\\" : \\\"371\\\",\n \\\"continent\\\" : \\\"EU\\\",\n \\\"capital\\\" : \\\"Riga\\\",\n \\\"currency\\\" : \\\"EUR\\\",\n \\\"languages\\\" : \\\"lv\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 136,\n \\\"code\\\" : \\\"LY\\\",\n \\\"value\\\" : \\\"Libya\\\",\n \\\"native\\\" : \\\"ليبيا\\\",\n \\\"phone\\\" : \\\"218\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Tripoli\\\",\n \\\"currency\\\" : \\\"LYD\\\",\n \\\"languages\\\" : \\\"ar\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 137,\n \\\"code\\\" : \\\"MA\\\",\n \\\"value\\\" : \\\"Morocco\\\",\n \\\"native\\\" : \\\"المغرب\\\",\n \\\"phone\\\" : \\\"212\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Rabat\\\",\n \\\"currency\\\" : \\\"MAD\\\",\n \\\"languages\\\" : \\\"ar\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 138,\n \\\"code\\\" : \\\"MC\\\",\n \\\"value\\\" : \\\"Monaco\\\",\n \\\"native\\\" : \\\"Monaco\\\",\n \\\"phone\\\" : \\\"377\\\",\n \\\"continent\\\" : \\\"EU\\\",\n \\\"capital\\\" : \\\"Monaco\\\",\n \\\"currency\\\" : \\\"EUR\\\",\n \\\"languages\\\" : \\\"fr\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 139,\n \\\"code\\\" : \\\"MD\\\",\n \\\"value\\\" : \\\"Moldova\\\",\n \\\"native\\\" : \\\"Moldova\\\",\n \\\"phone\\\" : \\\"373\\\",\n \\\"continent\\\" : \\\"EU\\\",\n \\\"capital\\\" : \\\"Chișinău\\\",\n \\\"currency\\\" : \\\"MDL\\\",\n \\\"languages\\\" : \\\"ro\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 140,\n \\\"code\\\" : \\\"ME\\\",\n \\\"value\\\" : \\\"Montenegro\\\",\n \\\"native\\\" : \\\"Црна Гора\\\",\n \\\"phone\\\" : \\\"382\\\",\n \\\"continent\\\" : \\\"EU\\\",\n \\\"capital\\\" : \\\"Podgorica\\\",\n \\\"currency\\\" : \\\"EUR\\\",\n \\\"languages\\\" : \\\"sr,bs,sq,hr\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 141,\n \\\"code\\\" : \\\"MF\\\",\n \\\"value\\\" : \\\"Saint Martin\\\",\n \\\"native\\\" : \\\"Saint-Martin\\\",\n \\\"phone\\\" : \\\"590\\\",\n \\\"continent\\\" : \\\"NA\\\",\n \\\"capital\\\" : \\\"Marigot\\\",\n \\\"currency\\\" : \\\"EUR\\\",\n \\\"languages\\\" : \\\"en,fr,nl\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 142,\n \\\"code\\\" : \\\"MG\\\",\n \\\"value\\\" : \\\"Madagascar\\\",\n \\\"native\\\" : \\\"Madagasikara\\\",\n \\\"phone\\\" : \\\"261\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Antananarivo\\\",\n \\\"currency\\\" : \\\"MGA\\\",\n \\\"languages\\\" : \\\"fr,mg\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 143,\n \\\"code\\\" : \\\"MH\\\",\n \\\"value\\\" : \\\"Marshall Islands\\\",\n \\\"native\\\" : \\\"M̧ajeļ\\\",\n \\\"phone\\\" : \\\"692\\\",\n \\\"continent\\\" : \\\"OC\\\",\n \\\"capital\\\" : \\\"Majuro\\\",\n \\\"currency\\\" : \\\"USD\\\",\n \\\"languages\\\" : \\\"en,mh\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 144,\n \\\"code\\\" : \\\"MK\\\",\n \\\"value\\\" : \\\"Macedonia\\\",\n \\\"native\\\" : \\\"Македонија\\\",\n \\\"phone\\\" : \\\"389\\\",\n \\\"continent\\\" : \\\"EU\\\",\n \\\"capital\\\" : \\\"Skopje\\\",\n \\\"currency\\\" : \\\"MKD\\\",\n \\\"languages\\\" : \\\"mk\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 145,\n \\\"code\\\" : \\\"ML\\\",\n \\\"value\\\" : \\\"Mali\\\",\n \\\"native\\\" : \\\"Mali\\\",\n \\\"phone\\\" : \\\"223\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Bamako\\\",\n \\\"currency\\\" : \\\"XOF\\\",\n \\\"languages\\\" : \\\"fr\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 146,\n \\\"code\\\" : \\\"MM\\\",\n \\\"value\\\" : \\\"Myanmar [Burma]\\\",\n \\\"native\\\" : \\\"Myanma\\\",\n \\\"phone\\\" : \\\"95\\\",\n \\\"continent\\\" : \\\"AS\\\",\n \\\"capital\\\" : \\\"Naypyidaw\\\",\n \\\"currency\\\" : \\\"MMK\\\",\n \\\"languages\\\" : \\\"my\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 147,\n \\\"code\\\" : \\\"MN\\\",\n \\\"value\\\" : \\\"Mongolia\\\",\n \\\"native\\\" : \\\"Монгол улс\\\",\n \\\"phone\\\" : \\\"976\\\",\n \\\"continent\\\" : \\\"AS\\\",\n \\\"capital\\\" : \\\"Ulan Bator\\\",\n \\\"currency\\\" : \\\"MNT\\\",\n \\\"languages\\\" : \\\"mn\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 148,\n \\\"code\\\" : \\\"MO\\\",\n \\\"value\\\" : \\\"Macao\\\",\n \\\"native\\\" : \\\"澳門\\\",\n \\\"phone\\\" : \\\"853\\\",\n \\\"continent\\\" : \\\"AS\\\",\n \\\"capital\\\" : \\\"\\\",\n \\\"currency\\\" : \\\"MOP\\\",\n \\\"languages\\\" : \\\"zh,pt\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 149,\n \\\"code\\\" : \\\"MP\\\",\n \\\"value\\\" : \\\"Northern Mariana Islands\\\",\n \\\"native\\\" : \\\"Northern Mariana Islands\\\",\n \\\"phone\\\" : \\\"1670\\\",\n \\\"continent\\\" : \\\"OC\\\",\n \\\"capital\\\" : \\\"Saipan\\\",\n \\\"currency\\\" : \\\"USD\\\",\n \\\"languages\\\" : \\\"en,ch\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 150,\n \\\"code\\\" : \\\"MQ\\\",\n \\\"value\\\" : \\\"Martinique\\\",\n \\\"native\\\" : \\\"Martinique\\\",\n \\\"phone\\\" : \\\"596\\\",\n \\\"continent\\\" : \\\"NA\\\",\n \\\"capital\\\" : \\\"Fort-de-France\\\",\n \\\"currency\\\" : \\\"EUR\\\",\n \\\"languages\\\" : \\\"fr\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 151,\n \\\"code\\\" : \\\"MR\\\",\n \\\"value\\\" : \\\"Mauritania\\\",\n \\\"native\\\" : \\\"موريتانيا\\\",\n \\\"phone\\\" : \\\"222\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Nouakchott\\\",\n \\\"currency\\\" : \\\"MRO\\\",\n \\\"languages\\\" : \\\"ar\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 152,\n \\\"code\\\" : \\\"MS\\\",\n \\\"value\\\" : \\\"Montserrat\\\",\n \\\"native\\\" : \\\"Montserrat\\\",\n \\\"phone\\\" : \\\"1664\\\",\n \\\"continent\\\" : \\\"NA\\\",\n \\\"capital\\\" : \\\"Plymouth\\\",\n \\\"currency\\\" : \\\"XCD\\\",\n \\\"languages\\\" : \\\"en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 153,\n \\\"code\\\" : \\\"MT\\\",\n \\\"value\\\" : \\\"Malta\\\",\n \\\"native\\\" : \\\"Malta\\\",\n \\\"phone\\\" : \\\"356\\\",\n \\\"continent\\\" : \\\"EU\\\",\n \\\"capital\\\" : \\\"Valletta\\\",\n \\\"currency\\\" : \\\"EUR\\\",\n \\\"languages\\\" : \\\"mt,en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 154,\n \\\"code\\\" : \\\"MU\\\",\n \\\"value\\\" : \\\"Mauritius\\\",\n \\\"native\\\" : \\\"Maurice\\\",\n \\\"phone\\\" : \\\"230\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Port Louis\\\",\n \\\"currency\\\" : \\\"MUR\\\",\n \\\"languages\\\" : \\\"en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 155,\n \\\"code\\\" : \\\"MV\\\",\n \\\"value\\\" : \\\"Maldives\\\",\n \\\"native\\\" : \\\"Maldives\\\",\n \\\"phone\\\" : \\\"960\\\",\n \\\"continent\\\" : \\\"AS\\\",\n \\\"capital\\\" : \\\"Malé\\\",\n \\\"currency\\\" : \\\"MVR\\\",\n \\\"languages\\\" : \\\"dv\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 156,\n \\\"code\\\" : \\\"MW\\\",\n \\\"value\\\" : \\\"Malawi\\\",\n \\\"native\\\" : \\\"Malawi\\\",\n \\\"phone\\\" : \\\"265\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Lilongwe\\\",\n \\\"currency\\\" : \\\"MWK\\\",\n \\\"languages\\\" : \\\"en,ny\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 157,\n \\\"code\\\" : \\\"MX\\\",\n \\\"value\\\" : \\\"Mexico\\\",\n \\\"native\\\" : \\\"México\\\",\n \\\"phone\\\" : \\\"52\\\",\n \\\"continent\\\" : \\\"NA\\\",\n \\\"capital\\\" : \\\"Mexico City\\\",\n \\\"currency\\\" : \\\"MXN\\\",\n \\\"languages\\\" : \\\"es\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 158,\n \\\"code\\\" : \\\"MY\\\",\n \\\"value\\\" : \\\"Malaysia\\\",\n \\\"native\\\" : \\\"Malaysia\\\",\n \\\"phone\\\" : \\\"60\\\",\n \\\"continent\\\" : \\\"AS\\\",\n \\\"capital\\\" : \\\"Kuala Lumpur\\\",\n \\\"currency\\\" : \\\"MYR\\\",\n \\\"languages\\\" : \\\"\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 159,\n \\\"code\\\" : \\\"MZ\\\",\n \\\"value\\\" : \\\"Mozambique\\\",\n \\\"native\\\" : \\\"Moçambique\\\",\n \\\"phone\\\" : \\\"258\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Maputo\\\",\n \\\"currency\\\" : \\\"MZN\\\",\n \\\"languages\\\" : \\\"pt\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 160,\n \\\"code\\\" : \\\"NA\\\",\n \\\"value\\\" : \\\"Namibia\\\",\n \\\"native\\\" : \\\"Namibia\\\",\n \\\"phone\\\" : \\\"264\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Windhoek\\\",\n \\\"currency\\\" : \\\"NAD,ZAR\\\",\n \\\"languages\\\" : \\\"en,af\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 161,\n \\\"code\\\" : \\\"NC\\\",\n \\\"value\\\" : \\\"New Caledonia\\\",\n \\\"native\\\" : \\\"Nouvelle-Calédonie\\\",\n \\\"phone\\\" : \\\"687\\\",\n \\\"continent\\\" : \\\"OC\\\",\n \\\"capital\\\" : \\\"Nouméa\\\",\n \\\"currency\\\" : \\\"XPF\\\",\n \\\"languages\\\" : \\\"fr\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 162,\n \\\"code\\\" : \\\"NE\\\",\n \\\"value\\\" : \\\"Niger\\\",\n \\\"native\\\" : \\\"Niger\\\",\n \\\"phone\\\" : \\\"227\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Niamey\\\",\n \\\"currency\\\" : \\\"XOF\\\",\n \\\"languages\\\" : \\\"fr\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 163,\n \\\"code\\\" : \\\"NF\\\",\n \\\"value\\\" : \\\"Norfolk Island\\\",\n \\\"native\\\" : \\\"Norfolk Island\\\",\n \\\"phone\\\" : \\\"672\\\",\n \\\"continent\\\" : \\\"OC\\\",\n \\\"capital\\\" : \\\"Kingston\\\",\n \\\"currency\\\" : \\\"AUD\\\",\n \\\"languages\\\" : \\\"en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 164,\n \\\"code\\\" : \\\"NG\\\",\n \\\"value\\\" : \\\"Nigeria\\\",\n \\\"native\\\" : \\\"Nigeria\\\",\n \\\"phone\\\" : \\\"234\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Abuja\\\",\n \\\"currency\\\" : \\\"NGN\\\",\n \\\"languages\\\" : \\\"en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 165,\n \\\"code\\\" : \\\"NI\\\",\n \\\"value\\\" : \\\"Nicaragua\\\",\n \\\"native\\\" : \\\"Nicaragua\\\",\n \\\"phone\\\" : \\\"505\\\",\n \\\"continent\\\" : \\\"NA\\\",\n \\\"capital\\\" : \\\"Managua\\\",\n \\\"currency\\\" : \\\"NIO\\\",\n \\\"languages\\\" : \\\"es\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 166,\n \\\"code\\\" : \\\"NL\\\",\n \\\"value\\\" : \\\"Netherlands\\\",\n \\\"native\\\" : \\\"Nederland\\\",\n \\\"phone\\\" : \\\"31\\\",\n \\\"continent\\\" : \\\"EU\\\",\n \\\"capital\\\" : \\\"Amsterdam\\\",\n \\\"currency\\\" : \\\"EUR\\\",\n \\\"languages\\\" : \\\"nl\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 167,\n \\\"code\\\" : \\\"NO\\\",\n \\\"value\\\" : \\\"Norway\\\",\n \\\"native\\\" : \\\"Norge\\\",\n \\\"phone\\\" : \\\"47\\\",\n \\\"continent\\\" : \\\"EU\\\",\n \\\"capital\\\" : \\\"Oslo\\\",\n \\\"currency\\\" : \\\"NOK\\\",\n \\\"languages\\\" : \\\"no,nb,nn\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 168,\n \\\"code\\\" : \\\"NP\\\",\n \\\"value\\\" : \\\"Nepal\\\",\n \\\"native\\\" : \\\"नपल\\\",\n \\\"phone\\\" : \\\"977\\\",\n \\\"continent\\\" : \\\"AS\\\",\n \\\"capital\\\" : \\\"Kathmandu\\\",\n \\\"currency\\\" : \\\"NPR\\\",\n \\\"languages\\\" : \\\"ne\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 169,\n \\\"code\\\" : \\\"NR\\\",\n \\\"value\\\" : \\\"Nauru\\\",\n \\\"native\\\" : \\\"Nauru\\\",\n \\\"phone\\\" : \\\"674\\\",\n \\\"continent\\\" : \\\"OC\\\",\n \\\"capital\\\" : \\\"Yaren\\\",\n \\\"currency\\\" : \\\"AUD\\\",\n \\\"languages\\\" : \\\"en,na\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 170,\n \\\"code\\\" : \\\"NU\\\",\n \\\"value\\\" : \\\"Niue\\\",\n \\\"native\\\" : \\\"Niuē\\\",\n \\\"phone\\\" : \\\"683\\\",\n \\\"continent\\\" : \\\"OC\\\",\n \\\"capital\\\" : \\\"Alofi\\\",\n \\\"currency\\\" : \\\"NZD\\\",\n \\\"languages\\\" : \\\"en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 171,\n \\\"code\\\" : \\\"NZ\\\",\n \\\"value\\\" : \\\"New Zealand\\\",\n \\\"native\\\" : \\\"New Zealand\\\",\n \\\"phone\\\" : \\\"64\\\",\n \\\"continent\\\" : \\\"OC\\\",\n \\\"capital\\\" : \\\"Wellington\\\",\n \\\"currency\\\" : \\\"NZD\\\",\n \\\"languages\\\" : \\\"en,mi\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 172,\n \\\"code\\\" : \\\"OM\\\",\n \\\"value\\\" : \\\"Oman\\\",\n \\\"native\\\" : \\\"عمان\\\",\n \\\"phone\\\" : \\\"968\\\",\n \\\"continent\\\" : \\\"AS\\\",\n \\\"capital\\\" : \\\"Muscat\\\",\n \\\"currency\\\" : \\\"OMR\\\",\n \\\"languages\\\" : \\\"ar\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 173,\n \\\"code\\\" : \\\"PA\\\",\n \\\"value\\\" : \\\"Panama\\\",\n \\\"native\\\" : \\\"Panamá\\\",\n \\\"phone\\\" : \\\"507\\\",\n \\\"continent\\\" : \\\"NA\\\",\n \\\"capital\\\" : \\\"Panama City\\\",\n \\\"currency\\\" : \\\"PAB,USD\\\",\n \\\"languages\\\" : \\\"es\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 174,\n \\\"code\\\" : \\\"PE\\\",\n \\\"value\\\" : \\\"Peru\\\",\n \\\"native\\\" : \\\"Perú\\\",\n \\\"phone\\\" : \\\"51\\\",\n \\\"continent\\\" : \\\"SA\\\",\n \\\"capital\\\" : \\\"Lima\\\",\n \\\"currency\\\" : \\\"PEN\\\",\n \\\"languages\\\" : \\\"es\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 175,\n \\\"code\\\" : \\\"PF\\\",\n \\\"value\\\" : \\\"French Polynesia\\\",\n \\\"native\\\" : \\\"Polynésie française\\\",\n \\\"phone\\\" : \\\"689\\\",\n \\\"continent\\\" : \\\"OC\\\",\n \\\"capital\\\" : \\\"Papeetē\\\",\n \\\"currency\\\" : \\\"XPF\\\",\n \\\"languages\\\" : \\\"fr\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 176,\n \\\"code\\\" : \\\"PG\\\",\n \\\"value\\\" : \\\"Papua New Guinea\\\",\n \\\"native\\\" : \\\"Papua Niugini\\\",\n \\\"phone\\\" : \\\"675\\\",\n \\\"continent\\\" : \\\"OC\\\",\n \\\"capital\\\" : \\\"Port Moresby\\\",\n \\\"currency\\\" : \\\"PGK\\\",\n \\\"languages\\\" : \\\"en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 177,\n \\\"code\\\" : \\\"PH\\\",\n \\\"value\\\" : \\\"Philippines\\\",\n \\\"native\\\" : \\\"Pilipinas\\\",\n \\\"phone\\\" : \\\"63\\\",\n \\\"continent\\\" : \\\"AS\\\",\n \\\"capital\\\" : \\\"Manila\\\",\n \\\"currency\\\" : \\\"PHP\\\",\n \\\"languages\\\" : \\\"en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 178,\n \\\"code\\\" : \\\"PK\\\",\n \\\"value\\\" : \\\"Pakistan\\\",\n \\\"native\\\" : \\\"Pakistan\\\",\n \\\"phone\\\" : \\\"92\\\",\n \\\"continent\\\" : \\\"AS\\\",\n \\\"capital\\\" : \\\"Islamabad\\\",\n \\\"currency\\\" : \\\"PKR\\\",\n \\\"languages\\\" : \\\"en,ur\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 179,\n \\\"code\\\" : \\\"PL\\\",\n \\\"value\\\" : \\\"Poland\\\",\n \\\"native\\\" : \\\"Polska\\\",\n \\\"phone\\\" : \\\"48\\\",\n \\\"continent\\\" : \\\"EU\\\",\n \\\"capital\\\" : \\\"Warsaw\\\",\n \\\"currency\\\" : \\\"PLN\\\",\n \\\"languages\\\" : \\\"pl\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 180,\n \\\"code\\\" : \\\"PM\\\",\n \\\"value\\\" : \\\"Saint Pierre and Miquelon\\\",\n \\\"native\\\" : \\\"Saint-Pierre-et-Miquelon\\\",\n \\\"phone\\\" : \\\"508\\\",\n \\\"continent\\\" : \\\"NA\\\",\n \\\"capital\\\" : \\\"Saint-Pierre\\\",\n \\\"currency\\\" : \\\"EUR\\\",\n \\\"languages\\\" : \\\"fr\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 181,\n \\\"code\\\" : \\\"PN\\\",\n \\\"value\\\" : \\\"Pitcairn Islands\\\",\n \\\"native\\\" : \\\"Pitcairn Islands\\\",\n \\\"phone\\\" : \\\"64\\\",\n \\\"continent\\\" : \\\"OC\\\",\n \\\"capital\\\" : \\\"Adamstown\\\",\n \\\"currency\\\" : \\\"NZD\\\",\n \\\"languages\\\" : \\\"en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 182,\n \\\"code\\\" : \\\"PR\\\",\n \\\"value\\\" : \\\"Puerto Rico\\\",\n \\\"native\\\" : \\\"Puerto Rico\\\",\n \\\"phone\\\" : \\\"1787,1939\\\",\n \\\"continent\\\" : \\\"NA\\\",\n \\\"capital\\\" : \\\"San Juan\\\",\n \\\"currency\\\" : \\\"USD\\\",\n \\\"languages\\\" : \\\"es,en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 183,\n \\\"code\\\" : \\\"PS\\\",\n \\\"value\\\" : \\\"Palestine\\\",\n \\\"native\\\" : \\\"فلسطين\\\",\n \\\"phone\\\" : \\\"970\\\",\n \\\"continent\\\" : \\\"AS\\\",\n \\\"capital\\\" : \\\"Ramallah\\\",\n \\\"currency\\\" : \\\"ILS\\\",\n \\\"languages\\\" : \\\"ar\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 184,\n \\\"code\\\" : \\\"PT\\\",\n \\\"value\\\" : \\\"Portugal\\\",\n \\\"native\\\" : \\\"Portugal\\\",\n \\\"phone\\\" : \\\"351\\\",\n \\\"continent\\\" : \\\"EU\\\",\n \\\"capital\\\" : \\\"Lisbon\\\",\n \\\"currency\\\" : \\\"EUR\\\",\n \\\"languages\\\" : \\\"pt\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 185,\n \\\"code\\\" : \\\"PW\\\",\n \\\"value\\\" : \\\"Palau\\\",\n \\\"native\\\" : \\\"Palau\\\",\n \\\"phone\\\" : \\\"680\\\",\n \\\"continent\\\" : \\\"OC\\\",\n \\\"capital\\\" : \\\"Ngerulmud\\\",\n \\\"currency\\\" : \\\"USD\\\",\n \\\"languages\\\" : \\\"en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 186,\n \\\"code\\\" : \\\"PY\\\",\n \\\"value\\\" : \\\"Paraguay\\\",\n \\\"native\\\" : \\\"Paraguay\\\",\n \\\"phone\\\" : \\\"595\\\",\n \\\"continent\\\" : \\\"SA\\\",\n \\\"capital\\\" : \\\"Asunción\\\",\n \\\"currency\\\" : \\\"PYG\\\",\n \\\"languages\\\" : \\\"es,gn\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 187,\n \\\"code\\\" : \\\"QA\\\",\n \\\"value\\\" : \\\"Qatar\\\",\n \\\"native\\\" : \\\"قطر\\\",\n \\\"phone\\\" : \\\"974\\\",\n \\\"continent\\\" : \\\"AS\\\",\n \\\"capital\\\" : \\\"Doha\\\",\n \\\"currency\\\" : \\\"QAR\\\",\n \\\"languages\\\" : \\\"ar\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 188,\n \\\"code\\\" : \\\"RE\\\",\n \\\"value\\\" : \\\"Réunion\\\",\n \\\"native\\\" : \\\"La Réunion\\\",\n \\\"phone\\\" : \\\"262\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Saint-Denis\\\",\n \\\"currency\\\" : \\\"EUR\\\",\n \\\"languages\\\" : \\\"fr\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 189,\n \\\"code\\\" : \\\"RO\\\",\n \\\"value\\\" : \\\"Romania\\\",\n \\\"native\\\" : \\\"România\\\",\n \\\"phone\\\" : \\\"40\\\",\n \\\"continent\\\" : \\\"EU\\\",\n \\\"capital\\\" : \\\"Bucharest\\\",\n \\\"currency\\\" : \\\"RON\\\",\n \\\"languages\\\" : \\\"ro\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 190,\n \\\"code\\\" : \\\"RS\\\",\n \\\"value\\\" : \\\"Serbia\\\",\n \\\"native\\\" : \\\"Србија\\\",\n \\\"phone\\\" : \\\"381\\\",\n \\\"continent\\\" : \\\"EU\\\",\n \\\"capital\\\" : \\\"Belgrade\\\",\n \\\"currency\\\" : \\\"RSD\\\",\n \\\"languages\\\" : \\\"sr\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 191,\n \\\"code\\\" : \\\"RU\\\",\n \\\"value\\\" : \\\"Russia\\\",\n \\\"native\\\" : \\\"Россия\\\",\n \\\"phone\\\" : \\\"7\\\",\n \\\"continent\\\" : \\\"EU\\\",\n \\\"capital\\\" : \\\"Moscow\\\",\n \\\"currency\\\" : \\\"RUB\\\",\n \\\"languages\\\" : \\\"ru\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 192,\n \\\"code\\\" : \\\"RW\\\",\n \\\"value\\\" : \\\"Rwanda\\\",\n \\\"native\\\" : \\\"Rwanda\\\",\n \\\"phone\\\" : \\\"250\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Kigali\\\",\n \\\"currency\\\" : \\\"RWF\\\",\n \\\"languages\\\" : \\\"rw,en,fr\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 193,\n \\\"code\\\" : \\\"SA\\\",\n \\\"value\\\" : \\\"Saudi Arabia\\\",\n \\\"native\\\" : \\\"العربية السعودية\\\",\n \\\"phone\\\" : \\\"966\\\",\n \\\"continent\\\" : \\\"AS\\\",\n \\\"capital\\\" : \\\"Riyadh\\\",\n \\\"currency\\\" : \\\"SAR\\\",\n \\\"languages\\\" : \\\"ar\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 194,\n \\\"code\\\" : \\\"SB\\\",\n \\\"value\\\" : \\\"Solomon Islands\\\",\n \\\"native\\\" : \\\"Solomon Islands\\\",\n \\\"phone\\\" : \\\"677\\\",\n \\\"continent\\\" : \\\"OC\\\",\n \\\"capital\\\" : \\\"Honiara\\\",\n \\\"currency\\\" : \\\"SBD\\\",\n \\\"languages\\\" : \\\"en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 195,\n \\\"code\\\" : \\\"SC\\\",\n \\\"value\\\" : \\\"Seychelles\\\",\n \\\"native\\\" : \\\"Seychelles\\\",\n \\\"phone\\\" : \\\"248\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Victoria\\\",\n \\\"currency\\\" : \\\"SCR\\\",\n \\\"languages\\\" : \\\"fr,en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 196,\n \\\"code\\\" : \\\"SD\\\",\n \\\"value\\\" : \\\"Sudan\\\",\n \\\"native\\\" : \\\"السودان\\\",\n \\\"phone\\\" : \\\"249\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Khartoum\\\",\n \\\"currency\\\" : \\\"SDG\\\",\n \\\"languages\\\" : \\\"ar,en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 197,\n \\\"code\\\" : \\\"SE\\\",\n \\\"value\\\" : \\\"Sweden\\\",\n \\\"native\\\" : \\\"Sverige\\\",\n \\\"phone\\\" : \\\"46\\\",\n \\\"continent\\\" : \\\"EU\\\",\n \\\"capital\\\" : \\\"Stockholm\\\",\n \\\"currency\\\" : \\\"SEK\\\",\n \\\"languages\\\" : \\\"sv\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 198,\n \\\"code\\\" : \\\"SG\\\",\n \\\"value\\\" : \\\"Singapore\\\",\n \\\"native\\\" : \\\"Singapore\\\",\n \\\"phone\\\" : \\\"65\\\",\n \\\"continent\\\" : \\\"AS\\\",\n \\\"capital\\\" : \\\"Singapore\\\",\n \\\"currency\\\" : \\\"SGD\\\",\n \\\"languages\\\" : \\\"en,ms,ta,zh\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 199,\n \\\"code\\\" : \\\"SH\\\",\n \\\"value\\\" : \\\"Saint Helena\\\",\n \\\"native\\\" : \\\"Saint Helena\\\",\n \\\"phone\\\" : \\\"290\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Jamestown\\\",\n \\\"currency\\\" : \\\"SHP\\\",\n \\\"languages\\\" : \\\"en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 200,\n \\\"code\\\" : \\\"SI\\\",\n \\\"value\\\" : \\\"Slovenia\\\",\n \\\"native\\\" : \\\"Slovenija\\\",\n \\\"phone\\\" : \\\"386\\\",\n \\\"continent\\\" : \\\"EU\\\",\n \\\"capital\\\" : \\\"Ljubljana\\\",\n \\\"currency\\\" : \\\"EUR\\\",\n \\\"languages\\\" : \\\"sl\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 201,\n \\\"code\\\" : \\\"SJ\\\",\n \\\"value\\\" : \\\"Svalbard and Jan Mayen\\\",\n \\\"native\\\" : \\\"Svalbard og Jan Mayen\\\",\n \\\"phone\\\" : \\\"4779\\\",\n \\\"continent\\\" : \\\"EU\\\",\n \\\"capital\\\" : \\\"Longyearbyen\\\",\n \\\"currency\\\" : \\\"NOK\\\",\n \\\"languages\\\" : \\\"no\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 202,\n \\\"code\\\" : \\\"SK\\\",\n \\\"value\\\" : \\\"Slovakia\\\",\n \\\"native\\\" : \\\"Slovensko\\\",\n \\\"phone\\\" : \\\"421\\\",\n \\\"continent\\\" : \\\"EU\\\",\n \\\"capital\\\" : \\\"Bratislava\\\",\n \\\"currency\\\" : \\\"EUR\\\",\n \\\"languages\\\" : \\\"sk\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 203,\n \\\"code\\\" : \\\"SL\\\",\n \\\"value\\\" : \\\"Sierra Leone\\\",\n \\\"native\\\" : \\\"Sierra Leone\\\",\n \\\"phone\\\" : \\\"232\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Freetown\\\",\n \\\"currency\\\" : \\\"SLL\\\",\n \\\"languages\\\" : \\\"en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 204,\n \\\"code\\\" : \\\"SM\\\",\n \\\"value\\\" : \\\"San Marino\\\",\n \\\"native\\\" : \\\"San Marino\\\",\n \\\"phone\\\" : \\\"378\\\",\n \\\"continent\\\" : \\\"EU\\\",\n \\\"capital\\\" : \\\"City of San Marino\\\",\n \\\"currency\\\" : \\\"EUR\\\",\n \\\"languages\\\" : \\\"it\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 205,\n \\\"code\\\" : \\\"SN\\\",\n \\\"value\\\" : \\\"Senegal\\\",\n \\\"native\\\" : \\\"Sénégal\\\",\n \\\"phone\\\" : \\\"221\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Dakar\\\",\n \\\"currency\\\" : \\\"XOF\\\",\n \\\"languages\\\" : \\\"fr\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 206,\n \\\"code\\\" : \\\"SO\\\",\n \\\"value\\\" : \\\"Somalia\\\",\n \\\"native\\\" : \\\"Soomaaliya\\\",\n \\\"phone\\\" : \\\"252\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Mogadishu\\\",\n \\\"currency\\\" : \\\"SOS\\\",\n \\\"languages\\\" : \\\"so,ar\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 207,\n \\\"code\\\" : \\\"SR\\\",\n \\\"value\\\" : \\\"Suriname\\\",\n \\\"native\\\" : \\\"Suriname\\\",\n \\\"phone\\\" : \\\"597\\\",\n \\\"continent\\\" : \\\"SA\\\",\n \\\"capital\\\" : \\\"Paramaribo\\\",\n \\\"currency\\\" : \\\"SRD\\\",\n \\\"languages\\\" : \\\"nl\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 208,\n \\\"code\\\" : \\\"SS\\\",\n \\\"value\\\" : \\\"South Sudan\\\",\n \\\"native\\\" : \\\"South Sudan\\\",\n \\\"phone\\\" : \\\"211\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Juba\\\",\n \\\"currency\\\" : \\\"SSP\\\",\n \\\"languages\\\" : \\\"en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 209,\n \\\"code\\\" : \\\"ST\\\",\n \\\"value\\\" : \\\"São Tomé and Príncipe\\\",\n \\\"native\\\" : \\\"São Tomé e Príncipe\\\",\n \\\"phone\\\" : \\\"239\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"São Tomé\\\",\n \\\"currency\\\" : \\\"STD\\\",\n \\\"languages\\\" : \\\"pt\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 210,\n \\\"code\\\" : \\\"SV\\\",\n \\\"value\\\" : \\\"El Salvador\\\",\n \\\"native\\\" : \\\"El Salvador\\\",\n \\\"phone\\\" : \\\"503\\\",\n \\\"continent\\\" : \\\"NA\\\",\n \\\"capital\\\" : \\\"San Salvador\\\",\n \\\"currency\\\" : \\\"SVC,USD\\\",\n \\\"languages\\\" : \\\"es\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 211,\n \\\"code\\\" : \\\"SX\\\",\n \\\"value\\\" : \\\"Sint Maarten\\\",\n \\\"native\\\" : \\\"Sint Maarten\\\",\n \\\"phone\\\" : \\\"1721\\\",\n \\\"continent\\\" : \\\"NA\\\",\n \\\"capital\\\" : \\\"Philipsburg\\\",\n \\\"currency\\\" : \\\"ANG\\\",\n \\\"languages\\\" : \\\"nl,en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 212,\n \\\"code\\\" : \\\"SY\\\",\n \\\"value\\\" : \\\"Syria\\\",\n \\\"native\\\" : \\\"سوريا\\\",\n \\\"phone\\\" : \\\"963\\\",\n \\\"continent\\\" : \\\"AS\\\",\n \\\"capital\\\" : \\\"Damascus\\\",\n \\\"currency\\\" : \\\"SYP\\\",\n \\\"languages\\\" : \\\"ar\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 213,\n \\\"code\\\" : \\\"SZ\\\",\n \\\"value\\\" : \\\"Swaziland\\\",\n \\\"native\\\" : \\\"Swaziland\\\",\n \\\"phone\\\" : \\\"268\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Lobamba\\\",\n \\\"currency\\\" : \\\"SZL\\\",\n \\\"languages\\\" : \\\"en,ss\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 214,\n \\\"code\\\" : \\\"TC\\\",\n \\\"value\\\" : \\\"Turks and Caicos Islands\\\",\n \\\"native\\\" : \\\"Turks and Caicos Islands\\\",\n \\\"phone\\\" : \\\"1649\\\",\n \\\"continent\\\" : \\\"NA\\\",\n \\\"capital\\\" : \\\"Cockburn Town\\\",\n \\\"currency\\\" : \\\"USD\\\",\n \\\"languages\\\" : \\\"en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 215,\n \\\"code\\\" : \\\"TD\\\",\n \\\"value\\\" : \\\"Chad\\\",\n \\\"native\\\" : \\\"Tchad\\\",\n \\\"phone\\\" : \\\"235\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"N'Djamena\\\",\n \\\"currency\\\" : \\\"XAF\\\",\n \\\"languages\\\" : \\\"fr,ar\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 216,\n \\\"code\\\" : \\\"TF\\\",\n \\\"value\\\" : \\\"French Southern Territories\\\",\n \\\"native\\\" : \\\"Territoire des Terres australes et antarctiques fr\\\",\n \\\"phone\\\" : \\\"\\\",\n \\\"continent\\\" : \\\"AN\\\",\n \\\"capital\\\" : \\\"Port-aux-Français\\\",\n \\\"currency\\\" : \\\"EUR\\\",\n \\\"languages\\\" : \\\"fr\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 217,\n \\\"code\\\" : \\\"TG\\\",\n \\\"value\\\" : \\\"Togo\\\",\n \\\"native\\\" : \\\"Togo\\\",\n \\\"phone\\\" : \\\"228\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Lomé\\\",\n \\\"currency\\\" : \\\"XOF\\\",\n \\\"languages\\\" : \\\"fr\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 218,\n \\\"code\\\" : \\\"TH\\\",\n \\\"value\\\" : \\\"Thailand\\\",\n \\\"native\\\" : \\\"ประเทศไทย\\\",\n \\\"phone\\\" : \\\"66\\\",\n \\\"continent\\\" : \\\"AS\\\",\n \\\"capital\\\" : \\\"Bangkok\\\",\n \\\"currency\\\" : \\\"THB\\\",\n \\\"languages\\\" : \\\"th\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 219,\n \\\"code\\\" : \\\"TJ\\\",\n \\\"value\\\" : \\\"Tajikistan\\\",\n \\\"native\\\" : \\\"Тоҷикистон\\\",\n \\\"phone\\\" : \\\"992\\\",\n \\\"continent\\\" : \\\"AS\\\",\n \\\"capital\\\" : \\\"Dushanbe\\\",\n \\\"currency\\\" : \\\"TJS\\\",\n \\\"languages\\\" : \\\"tg,ru\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 220,\n \\\"code\\\" : \\\"TK\\\",\n \\\"value\\\" : \\\"Tokelau\\\",\n \\\"native\\\" : \\\"Tokelau\\\",\n \\\"phone\\\" : \\\"690\\\",\n \\\"continent\\\" : \\\"OC\\\",\n \\\"capital\\\" : \\\"Fakaofo\\\",\n \\\"currency\\\" : \\\"NZD\\\",\n \\\"languages\\\" : \\\"en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 221,\n \\\"code\\\" : \\\"TL\\\",\n \\\"value\\\" : \\\"East Timor\\\",\n \\\"native\\\" : \\\"Timor-Leste\\\",\n \\\"phone\\\" : \\\"670\\\",\n \\\"continent\\\" : \\\"OC\\\",\n \\\"capital\\\" : \\\"Dili\\\",\n \\\"currency\\\" : \\\"USD\\\",\n \\\"languages\\\" : \\\"pt\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 222,\n \\\"code\\\" : \\\"TM\\\",\n \\\"value\\\" : \\\"Turkmenistan\\\",\n \\\"native\\\" : \\\"Türkmenistan\\\",\n \\\"phone\\\" : \\\"993\\\",\n \\\"continent\\\" : \\\"AS\\\",\n \\\"capital\\\" : \\\"Ashgabat\\\",\n \\\"currency\\\" : \\\"TMT\\\",\n \\\"languages\\\" : \\\"tk,ru\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 223,\n \\\"code\\\" : \\\"TN\\\",\n \\\"value\\\" : \\\"Tunisia\\\",\n \\\"native\\\" : \\\"تونس\\\",\n \\\"phone\\\" : \\\"216\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Tunis\\\",\n \\\"currency\\\" : \\\"TND\\\",\n \\\"languages\\\" : \\\"ar\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 224,\n \\\"code\\\" : \\\"TO\\\",\n \\\"value\\\" : \\\"Tonga\\\",\n \\\"native\\\" : \\\"Tonga\\\",\n \\\"phone\\\" : \\\"676\\\",\n \\\"continent\\\" : \\\"OC\\\",\n \\\"capital\\\" : \\\"Nuku'alofa\\\",\n \\\"currency\\\" : \\\"TOP\\\",\n \\\"languages\\\" : \\\"en,to\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 225,\n \\\"code\\\" : \\\"TR\\\",\n \\\"value\\\" : \\\"Turkey\\\",\n \\\"native\\\" : \\\"Türkiye\\\",\n \\\"phone\\\" : \\\"90\\\",\n \\\"continent\\\" : \\\"AS\\\",\n \\\"capital\\\" : \\\"Ankara\\\",\n \\\"currency\\\" : \\\"TRY\\\",\n \\\"languages\\\" : \\\"tr\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 226,\n \\\"code\\\" : \\\"TT\\\",\n \\\"value\\\" : \\\"Trinidad and Tobago\\\",\n \\\"native\\\" : \\\"Trinidad and Tobago\\\",\n \\\"phone\\\" : \\\"1868\\\",\n \\\"continent\\\" : \\\"NA\\\",\n \\\"capital\\\" : \\\"Port of Spain\\\",\n \\\"currency\\\" : \\\"TTD\\\",\n \\\"languages\\\" : \\\"en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 227,\n \\\"code\\\" : \\\"TV\\\",\n \\\"value\\\" : \\\"Tuvalu\\\",\n \\\"native\\\" : \\\"Tuvalu\\\",\n \\\"phone\\\" : \\\"688\\\",\n \\\"continent\\\" : \\\"OC\\\",\n \\\"capital\\\" : \\\"Funafuti\\\",\n \\\"currency\\\" : \\\"AUD\\\",\n \\\"languages\\\" : \\\"en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 228,\n \\\"code\\\" : \\\"TW\\\",\n \\\"value\\\" : \\\"Taiwan\\\",\n \\\"native\\\" : \\\"臺灣\\\",\n \\\"phone\\\" : \\\"886\\\",\n \\\"continent\\\" : \\\"AS\\\",\n \\\"capital\\\" : \\\"Taipei\\\",\n \\\"currency\\\" : \\\"TWD\\\",\n \\\"languages\\\" : \\\"zh\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 229,\n \\\"code\\\" : \\\"TZ\\\",\n \\\"value\\\" : \\\"Tanzania\\\",\n \\\"native\\\" : \\\"Tanzania\\\",\n \\\"phone\\\" : \\\"255\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Dodoma\\\",\n \\\"currency\\\" : \\\"TZS\\\",\n \\\"languages\\\" : \\\"sw,en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 230,\n \\\"code\\\" : \\\"UA\\\",\n \\\"value\\\" : \\\"Ukraine\\\",\n \\\"native\\\" : \\\"Україна\\\",\n \\\"phone\\\" : \\\"380\\\",\n \\\"continent\\\" : \\\"EU\\\",\n \\\"capital\\\" : \\\"Kiev\\\",\n \\\"currency\\\" : \\\"UAH\\\",\n \\\"languages\\\" : \\\"uk\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 231,\n \\\"code\\\" : \\\"UG\\\",\n \\\"value\\\" : \\\"Uganda\\\",\n \\\"native\\\" : \\\"Uganda\\\",\n \\\"phone\\\" : \\\"256\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Kampala\\\",\n \\\"currency\\\" : \\\"UGX\\\",\n \\\"languages\\\" : \\\"en,sw\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 232,\n \\\"code\\\" : \\\"UM\\\",\n \\\"value\\\" : \\\"U.S. Minor Outlying Islands\\\",\n \\\"native\\\" : \\\"United States Minor Outlying Islands\\\",\n \\\"phone\\\" : \\\"\\\",\n \\\"continent\\\" : \\\"OC\\\",\n \\\"capital\\\" : \\\"\\\",\n \\\"currency\\\" : \\\"USD\\\",\n \\\"languages\\\" : \\\"en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 233,\n \\\"code\\\" : \\\"US\\\",\n \\\"value\\\" : \\\"United States\\\",\n \\\"native\\\" : \\\"United States\\\",\n \\\"phone\\\" : \\\"1\\\",\n \\\"continent\\\" : \\\"NA\\\",\n \\\"capital\\\" : \\\"Washington D.C.\\\",\n \\\"currency\\\" : \\\"USD,USN,USS\\\",\n \\\"languages\\\" : \\\"en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 234,\n \\\"code\\\" : \\\"UY\\\",\n \\\"value\\\" : \\\"Uruguay\\\",\n \\\"native\\\" : \\\"Uruguay\\\",\n \\\"phone\\\" : \\\"598\\\",\n \\\"continent\\\" : \\\"SA\\\",\n \\\"capital\\\" : \\\"Montevideo\\\",\n \\\"currency\\\" : \\\"UYI,UYU\\\",\n \\\"languages\\\" : \\\"es\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 235,\n \\\"code\\\" : \\\"UZ\\\",\n \\\"value\\\" : \\\"Uzbekistan\\\",\n \\\"native\\\" : \\\"O‘zbekiston\\\",\n \\\"phone\\\" : \\\"998\\\",\n \\\"continent\\\" : \\\"AS\\\",\n \\\"capital\\\" : \\\"Tashkent\\\",\n \\\"currency\\\" : \\\"UZS\\\",\n \\\"languages\\\" : \\\"uz,ru\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 236,\n \\\"code\\\" : \\\"VA\\\",\n \\\"value\\\" : \\\"Vatican City\\\",\n \\\"native\\\" : \\\"Vaticano\\\",\n \\\"phone\\\" : \\\"39066,379\\\",\n \\\"continent\\\" : \\\"EU\\\",\n \\\"capital\\\" : \\\"Vatican City\\\",\n \\\"currency\\\" : \\\"EUR\\\",\n \\\"languages\\\" : \\\"it,la\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 237,\n \\\"code\\\" : \\\"VC\\\",\n \\\"value\\\" : \\\"Saint Vincent and the Grenadines\\\",\n \\\"native\\\" : \\\"Saint Vincent and the Grenadines\\\",\n \\\"phone\\\" : \\\"1784\\\",\n \\\"continent\\\" : \\\"NA\\\",\n \\\"capital\\\" : \\\"Kingstown\\\",\n \\\"currency\\\" : \\\"XCD\\\",\n \\\"languages\\\" : \\\"en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 238,\n \\\"code\\\" : \\\"VE\\\",\n \\\"value\\\" : \\\"Venezuela\\\",\n \\\"native\\\" : \\\"Venezuela\\\",\n \\\"phone\\\" : \\\"58\\\",\n \\\"continent\\\" : \\\"SA\\\",\n \\\"capital\\\" : \\\"Caracas\\\",\n \\\"currency\\\" : \\\"VEF\\\",\n \\\"languages\\\" : \\\"es\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 239,\n \\\"code\\\" : \\\"VG\\\",\n \\\"value\\\" : \\\"British Virgin Islands\\\",\n \\\"native\\\" : \\\"British Virgin Islands\\\",\n \\\"phone\\\" : \\\"1284\\\",\n \\\"continent\\\" : \\\"NA\\\",\n \\\"capital\\\" : \\\"Road Town\\\",\n \\\"currency\\\" : \\\"USD\\\",\n \\\"languages\\\" : \\\"en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 240,\n \\\"code\\\" : \\\"VI\\\",\n \\\"value\\\" : \\\"U.S. Virgin Islands\\\",\n \\\"native\\\" : \\\"United States Virgin Islands\\\",\n \\\"phone\\\" : \\\"1340\\\",\n \\\"continent\\\" : \\\"NA\\\",\n \\\"capital\\\" : \\\"Charlotte Amalie\\\",\n \\\"currency\\\" : \\\"USD\\\",\n \\\"languages\\\" : \\\"en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 241,\n \\\"code\\\" : \\\"VN\\\",\n \\\"value\\\" : \\\"Vietnam\\\",\n \\\"native\\\" : \\\"Việt Nam\\\",\n \\\"phone\\\" : \\\"84\\\",\n \\\"continent\\\" : \\\"AS\\\",\n \\\"capital\\\" : \\\"Hanoi\\\",\n \\\"currency\\\" : \\\"VND\\\",\n \\\"languages\\\" : \\\"vi\\\",\n \\\"active_default\\\" : 1\n },\n {\n \\\"id\\\" : 242,\n \\\"code\\\" : \\\"VU\\\",\n \\\"value\\\" : \\\"Vanuatu\\\",\n \\\"native\\\" : \\\"Vanuatu\\\",\n \\\"phone\\\" : \\\"678\\\",\n \\\"continent\\\" : \\\"OC\\\",\n \\\"capital\\\" : \\\"Port Vila\\\",\n \\\"currency\\\" : \\\"VUV\\\",\n \\\"languages\\\" : \\\"bi,en,fr\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 243,\n \\\"code\\\" : \\\"WF\\\",\n \\\"value\\\" : \\\"Wallis and Futuna\\\",\n \\\"native\\\" : \\\"Wallis et Futuna\\\",\n \\\"phone\\\" : \\\"681\\\",\n \\\"continent\\\" : \\\"OC\\\",\n \\\"capital\\\" : \\\"Mata-Utu\\\",\n \\\"currency\\\" : \\\"XPF\\\",\n \\\"languages\\\" : \\\"fr\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 244,\n \\\"code\\\" : \\\"WS\\\",\n \\\"value\\\" : \\\"Samoa\\\",\n \\\"native\\\" : \\\"Samoa\\\",\n \\\"phone\\\" : \\\"685\\\",\n \\\"continent\\\" : \\\"OC\\\",\n \\\"capital\\\" : \\\"Apia\\\",\n \\\"currency\\\" : \\\"WST\\\",\n \\\"languages\\\" : \\\"sm,en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 245,\n \\\"code\\\" : \\\"XK\\\",\n \\\"value\\\" : \\\"Kosovo\\\",\n \\\"native\\\" : \\\"Republika e Kosovës\\\",\n \\\"phone\\\" : \\\"377,381,386\\\",\n \\\"continent\\\" : \\\"EU\\\",\n \\\"capital\\\" : \\\"Pristina\\\",\n \\\"currency\\\" : \\\"EUR\\\",\n \\\"languages\\\" : \\\"sq,sr\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 246,\n \\\"code\\\" : \\\"YE\\\",\n \\\"value\\\" : \\\"Yemen\\\",\n \\\"native\\\" : \\\"اليَمَن\\\",\n \\\"phone\\\" : \\\"967\\\",\n \\\"continent\\\" : \\\"AS\\\",\n \\\"capital\\\" : \\\"Sana'a\\\",\n \\\"currency\\\" : \\\"YER\\\",\n \\\"languages\\\" : \\\"ar\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 247,\n \\\"code\\\" : \\\"YT\\\",\n \\\"value\\\" : \\\"Mayotte\\\",\n \\\"native\\\" : \\\"Mayotte\\\",\n \\\"phone\\\" : \\\"262\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Mamoudzou\\\",\n \\\"currency\\\" : \\\"EUR\\\",\n \\\"languages\\\" : \\\"fr\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 248,\n \\\"code\\\" : \\\"ZA\\\",\n \\\"value\\\" : \\\"South Africa\\\",\n \\\"native\\\" : \\\"South Africa\\\",\n \\\"phone\\\" : \\\"27\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Pretoria\\\",\n \\\"currency\\\" : \\\"ZAR\\\",\n \\\"languages\\\" : \\\"af,en,nr,st,ss,tn,ts,ve,xh,zu\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 249,\n \\\"code\\\" : \\\"ZM\\\",\n \\\"value\\\" : \\\"Zambia\\\",\n \\\"native\\\" : \\\"Zambia\\\",\n \\\"phone\\\" : \\\"260\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Lusaka\\\",\n \\\"currency\\\" : \\\"ZMK\\\",\n \\\"languages\\\" : \\\"en\\\",\n \\\"active_default\\\" : 0\n },\n {\n \\\"id\\\" : 250,\n \\\"code\\\" : \\\"ZW\\\",\n \\\"value\\\" : \\\"Zimbabwe\\\",\n \\\"native\\\" : \\\"Zimbabwe\\\",\n \\\"phone\\\" : \\\"263\\\",\n \\\"continent\\\" : \\\"AF\\\",\n \\\"capital\\\" : \\\"Harare\\\",\n \\\"currency\\\" : \\\"ZWL\\\",\n \\\"languages\\\" : \\\"en,sn,nd\\\",\n \\\"active_default\\\" : 0\n }\n ]}\n \");\n\n foreach ( $data->countries as $item ){\n \\App\\Models\\Countries::create([\n 'id' => $item->id,\n 'code' => $item->code,\n 'value' => $item->value,\n 'native' => $item->native,\n 'phone' => $item->phone,\n 'continent' => $item->continent,\n 'capital' => $item->capital,\n 'currency' => $item->currency,\n 'languages' => $item->languages,\n 'active_default' => $item->active_default,\n ]);\n }\n }",
"function createNewTrelloLabels($newCustomerData) {\n $name = rawurlencode($newCustomerData);\n\t\t\t$urlT = 'https://api.trello.com/1/labels?name='.$name.'&color=black&idBoard='.$this->boardID.'&key='.$this->trelloKey.'&token='.$this->trelloToken;\n\t\t\t$chT = curl_init();\n\t\t\tcurl_setopt($chT, CURLOPT_URL, $urlT);\n\t\t\tcurl_setopt($chT, CURLOPT_POST, TRUE);\n\t\t\tcurl_setopt($chT, CURLOPT_RETURNTRANSFER, true);\n\t\t\tcurl_exec($chT);\n\t\t\tcurl_close($chT);\n\t\t}",
"public function testLabelCreate()\n {\n $user = factory(User::class)->create();\n //authenticating as the user\n Passport::actingAs($user);\n\n $response = $this->withHeaders([\n 'Content-Type' => 'Application/json',\n ])->json('POST', '/api/makelabel',[\n \n 'label'=>'amansu label',\n ]);\n\n $response->assertStatus(201)->assertJson(['message' => 'Note Created']);\n }",
"static function makeRowLabel($record) {\n global $user;\n // Start with client.\n if ($user->isPluginEnabled('cl'))\n $label = $record['client'];\n\n // Add project.\n if (!empty($label) && !empty($record['project'])) $label .= ' - ';\n $label .= $record['project'];\n\n // Add task.\n if (!empty($label) && !empty($record['task'])) $label .= ' - ';\n $label .= $record['task'];\n\n // Add custom field 1.\n if ($user->isPluginEnabled('cf')) {\n if (!empty($label) && !empty($record['cf_1_value'])) $label .= ' - ';\n $label .= $record['cf_1_value'];\n }\n\n return $label;\n }",
"function getLabels()\n{\n $sql=\"SELECT name FROM tablets.manufacturers\";\n $brands=$GLOBALS['db']->getAllValues($sql);\n $brands=json_encode($brands);\n //print_r($brands);\n $lang=$_SESSION['lang'];\n if($lang==\"en_us\"){\n\n $labels = <<<EOF\n[\n {\"type\":\"range\",\"name\":\"total test result\",\"label\":\"Total test result\",\n \"value\":[{\">=\":0,\"<=\":1.5},{\">\":1.5,\"<=\":2.5},{\">\":2.5,\"<=\":3.5},{\">\":3.5,\"<=\":4.5},{\">\":4.5,\"<=\":5.5}],\n \"option\":[\"very good \",\"good \",\"average\",\"sufficient\",\"poor\"]},\n {\"type\":\"date\",\"name\":\"Publication date\",\"label\":\"Tested date\",\n \"value\":[2016,2015,2014],\n \"option\":[2016,2015,2014]},\n {\"type\":\"string\",\"name\":\"Brand\",\"label\":\"Brands\",\n \"value\":$brands,\n \"option\":$brands},\n {\"type\":\"range\",\"name\":\"Screen image diagonal\",\"label\":\"Screen image diagonal\",\n \"value\":[{\"<\":8},{\">=\":8,\"<=\":10},{\">\":10}],\n<<<<<<< HEAD\n \"option\":[\"< 8\\\"\",\"8 - 10\\\"\",\"> 10\\\"\"]},\n=======\n \"option\":[\"> 8\\\"\",\"8 - 10\\\"\",\"> 10\\\"\"]},\n>>>>>>> 7f3fb6250d696d7e9e5bba2a85f6050a0c02fc75\n {\"type\":\"range\",\"name\":\"Native resolution (height)\",\"label\":\"Native resolution (height)\",\n \"value\":[{\"<\":800},{\">=\":800,\"<=\":1200},{\">\":1200,\"<=\":1500},{\">\":1500,\"<=\":2736}],\n \"option\":[\"< 800 Pixel\",\"800 - 1200 Pixel\",\"1200 - 1500 Pixel\",\"1500 -2736 Pixel\"]},\n {\"type\":\"range\",\"name\":\"Native resolution (width)\",\"label\":\"Native resolution (width)\",\n \"value\":[{\"<\":1300},{\">=\":1300,\"<=\":1900},{\">\":1900,\"<=\":2000},{\">\":2000,\"<=\":2736}],\n \"option\":[\"< 1300 Pixel\",\"1300 - 1900 Pixel\",\"1900 - 2000 Pixel\",\"2000 - 2736 Pixel\"]},\n {\"type\":\"string\",\"name\":\"OS installed\",\"label\":\"OS installed\",\n \"value\":[\"Android\",\"iOS\",\"Windows\"],\n \"option\":[\"Android\",\"iOS\",\"Windows\"]},\n {\"type\":\"string\",\"name\":\"Claimed size of internal storage [Gb]\",\"label\":\"Claimed size of internal storage\",\n \"value\":[4,8,16,32,64,128,256],\n \"option\":[\"4GB\",\"8GB\",\"16GB\",\"32GB\",\"64GB\",\"128GB\",\"256GB\"]},\n {\"type\":\"multi\",\"name\":\"\",\"label\":\"Connection\",\n \"value\":[\"3G\",\"LTE\",\"Bluetooth\",\"GPS\",\"NFC\",\"Phone functionality\"],\n \"option\":[\"3G\",\"LTE\",\"Bluetooth\",\"GPS\",\"NFC\",\"Phone functionality\"]},\n {\"type\":\"multi\",\"name\":\"\",\"label\":\"WLAN\",\n \"value\":[\"Wi-Fi G\",\"Wi-Fi N\",\"Wi-Fi 5GHzN\",\"Wi-Fi AC\"],\n \"option\":[\"Wi-Fi G\",\"Wi-Fi N\",\"Wi-Fi 5GHzN\",\"Wi-Fi AC\"]},\n {\"type\":\"multi\",\"name\":\"\",\"label\":\"USB\",\n \"value\":[\"USB 4.0 [y/n]\",\"USB 3.0 [y/n]\",\"USB 2.0 [y/n]\",\"Mini-USB [y/n]\" ,\"Micro-USB [y/n]\", \"HDMI\"],\n \"option\":[\"USB 4.0\",\"USB 3.0\",\"USB 2.0\",\"Mini-USB\" ,\"Micro-USB\", \"HDMI\"]},\n {\"type\":\"multi\",\"name\":\"\",\"label\":\"SD\",\n \"value\":[\"full SD size\",\"mini-SD\",\"micro-SD\"],\n \"option\":[\"full SD size\",\"mini-SD\",\"micro-SD\"]},\n {\"type\":\"multi\",\"name\":\"\",\"label\":\"Accessories\",\n \"value\":[\"Physical keyboard provided\",\"Stylus supplied\"],\n \"option\":[\"Physical keyboard provided\",\"Stylus supplied\"]},\n {\"type\":\"multi\",\"name\":\"\",\"label\":\"Robustness\",\n \"value\":[\"Manufacturer claims waterproof?\",\"Manufacturer claims water resistant?\"],\n \"option\":[\"Waterproof, stated\",\"Water resistant, stated\"]}\n ]\nEOF;\n\n }else if($lang==\"zh_cn\"){\n $sql=\"select CHN from sdictionary where oriword in( SELECT distinct value FROM mobilephones.results where id_evaluation=100001759)\";\n $brandLabels=$GLOBALS['db']->getAllValues($sql);\n $brandLabels=json_encode($brandLabels);\n $labels = <<<EOF\n [\n {\"type\":\"range\",\"name\":\"total test result\",\"label\":\"总评分\",\n \"value\":[{\">=\":0,\"<=\":1.5},{\">\":1.5,\"<=\":2.5},{\">\":2.5,\"<=\":3.5},{\">\":3.5,\"<=\":4.5},{\">\":4.5,\"<=\":5.5}],\n \"option\":[\"优秀\",\"良好\",\"中等\",\"尚可\",\"差劣\"]},\n {\"type\":\"date\",\"name\":\"Publication date\",\"label\":\"测试时间\",\n \"value\":[2016,2015,2014],\n \"option\":[2016,2015,2014]},\n {\"type\":\"string\",\"name\":\"Brand\",\"label\":\"品牌\",\n \"value\":$brands,\n \"option\":$brandLabels}\n ]\nEOF;\n }\n\n $arr = json_decode($labels, true);\n foreach ($arr as $key => $item) {\n if ($item['type'] == 'string') {\n $index=0;\n foreach ($item['value'] as $value) {\n if($item['name']=='Brand'){\n $sql=\"select count(*)from products where id_manufacturer=(select id_manufacturer from manufacturers where `name`='\".$value.\"')\";\n }else\n $sql=\"select count(*) from results where id_evaluation in(select id_evaluation from evaluations where name='\".$item['name'].\"') and value like'%$value%'\";\n //echo $sql;\n $v = $GLOBALS['db']->getOne($sql);\n //echo $value.\" \".$v.\" \".$index.\"+++\\n\";\n if($v==0){\n array_splice($arr[$key]['option'],$index,1);\n array_splice($arr[$key]['value'],$index,1);\n $index--;\n // print_r($arr[$key]['option']);\n\n }else{\n $arr[$key]['number'][] = $v;\n }\n\n\n $index++;\n }\n } else if($item['type'] == 'range') {\n foreach ($item['value'] as $value) {\n $opts = array_keys($value);\n $len = count($opts);\n if($item['name'] == 'total test result'){//评分数据四舍五入\n if ($len == 1 && $opts[0] != -1) {\n $sql = \"select count(*) from results where format(6-value,1)\" . $opts[0] . $value[$opts[0]];\n } else if ($len == 2 && $opts[0] != -1) {\n $sql = \"select count(*) from results where format(6-value,1)\" . $opts[0] . $value[$opts[0]] . \" and format(6-value,1)\" . $opts[1] . $value[$opts[1]];\n }\n }else{//property数值正常读取\n if ($len == 1 && $opts[0] != -1) {\n $sql = \"select count(*) from results where value\" . $opts[0] . $value[$opts[0]];\n } else if ($len == 2 && $opts[0] != -1) {\n $sql = \"select count(*) from results where value\" . $opts[0] . $value[$opts[0]] . \" and value\" . $opts[1] . $value[$opts[1]];\n }\n }\n\n $sql .= \" and id_evaluation=(select id_evaluation from evaluations where \";\n if ($item['name'] == 'total test result')\n $sql .= \"name='\" . $item['name'] . \"')\";\n else\n $sql .= \"id_evaluation>99999999 and name='\" . $item['name'] . \"')\";\n $v = $GLOBALS['db']->getOne($sql);\n $arr[$key]['number'][] = $v;\n }\n }else if($item['type'] == 'date'){\n foreach ($item['value'] as $value) {\n $sql = \"select count(*) from products where FROM_UNIXTIME(timestamp_created, '%Y' )='\" . $value . \"'\" ;\n //echo $sql;\n $v = $GLOBALS['db']->getOne($sql);\n $arr[$key]['number'][] = $v;\n }\n }else if($item['type'] == 'multi'){\n foreach ($item['value'] as $value) {\n $sql = \"select count(*) from results where value=1\" . \" and id_evaluation=(select id_evaluation from evaluations where id_evaluation>99999999 and name='\" .$value . \"')\";\n //echo $sql;\n $v = $GLOBALS['db']->getOne($sql);\n $arr[$key]['number'][] = $v;\n }\n }\n }\n sortByNumber($arr[2]);\n //print_r($arr);\n return json_encode($arr);\n}",
"public function reverseTransform($string) {\n\t\t\treturn json_decode($string);\n\t\t}",
"public function createLabel($arrLabel){\r\n\t\treturn '<label class=\"'.$arrLabel['class'].'\">'.$arrLabel['message'].'</label>';\t\r\n\t}",
"function FormatLabel(&$format, $newFormat)\n{\n $ret = '';\n \n if (isset($format) && is_array($format)) {\n if( $newFormat )\n {\n if (array_key_exists('format', $format)) {\n $ret = $format['format'];\n }\n if (array_key_exists('args', $format)) {\n foreach( $format['args'] as $index => &$arg )\n {\n $key = $index + 1;\n $key = '$' . $key;\n $type = $arg['type'];\n if( $type == 'url' )\n $value = \"<a rel=\\\"nofollow\\\" href=\\\"{$arg['localized_value']}\\\" target=\\\"_blank\\\">\" . htmlspecialchars(FitText($arg['localized_value'],80)) . '</a>';\n else\n $value = htmlspecialchars($arg['localized_value']);\n $ret = str_replace($key, $value, $ret);\n }\n }\n }\n else\n {\n foreach( $format as &$item )\n {\n $type = $item['type'];\n if( $type == 'url' )\n {\n $ret .= \"<a rel=\\\"nofollow\\\" href=\\\"{$item['value']}\\\" target=\\\"_blank\\\">\" . htmlspecialchars(FitText($item['value'],80)) . '</a>';\n }\n else\n $ret .= htmlspecialchars($item['value']);\n }\n }\n }\n \n return $ret;\n}",
"function convertJson($str){\n $str = str_replace(\"idPersonne\",'\"idPersonne\"',$str);\n $str = str_replace(\"{nom\",'{\"nom\"',$str);\n $str = str_replace(\"prenom\",'\"prenom\"',$str);\n $str = str_replace(\"'\",'\"',$str);\n return $str;\n }",
"public static function parseResult($jsonString)\n\t{\n\t\t$object = json_decode($jsonString);\n\t\t$taxlines = array();\n\t\t$taxsummary = array();\n\t\t$taxaddresses = array();\n\t\t$messages = array();\n\t\t$resultcode= null;\n\t\t$doccode= null;\n\t\t$docdate= null;\n\t\t$timestamp= null;\n\t\t$totalamount= null;\n\t\t$totaldiscount= null;\n\t\t$totalexemption= null;\n\t\t$totaltaxable= null;\n\t\t$totaltax= null;\n\t\t$totaltaxcalculated= null;\n\t\t$taxdate= null;\n\n\t\tif( property_exists($object,\"ResultCode\")) $resultcode = $object->ResultCode; \t\t\n\t\tif( property_exists($object,\"DocCode\")) $doccode = $object->DocCode; \n\t\tif( property_exists($object,\"DocDate\")) $docdate = $object->DocDate;\t\t\t \t\t\t\t\n\t\tif( property_exists($object,\"Timestamp\")) $timestamp = $object->Timestamp;\t\t\t\n\t\tif( property_exists($object,\"TotalAmount\")) $totalamount = $object->TotalAmount;\t\t\n\t\tif( property_exists($object,\"TotalDiscount\")) $totaldiscount = $object->TotalDiscount;\t\n\t\tif( property_exists($object,\"TotalExemption\")) $totalexemption = $object->TotalExemption;\t\n\t\tif( property_exists($object,\"TotalTaxable\")) $totaltaxable = $object->TotalTaxable;\t \n\t\tif( property_exists($object,\"TotalTax\")) $totaltax = $object->TotalTax;\t\t \t\n\t\tif( property_exists($object,\"TotalTaxCalculated\")) $totaltaxcalculated = $object->TotalTaxCalculated;\t\t \n\t\tif( property_exists($object,\"TaxDate\")) $taxdate = $object->TaxDate;\t\t\n\n\t\t\n\t\tif(property_exists($object, \"TaxLines\"))\n\t\t\t$taxlines = TaxLine::parseTaxLines(\"{\\\"TaxLines\\\": \".json_encode($object->TaxLines).\"}\");\n\t\tif(property_exists($object, \"TaxSummary\"))\n\t\t\t$taxsummary = TaxDetail::parseTaxDetails(\"{\\\"TaxDetails\\\": \".json_encode($object->TaxSummary).\"}\");\n\t\tif(property_exists($object, \"TaxAddresses\"))\n\t\t\t$taxaddresses = Address::parseAddress(\"{\\\"TaxAddresses\\\": \".json_encode($object->TaxAddresses).\"}\");\t\n\t\tif(property_exists($object, \"Messages\"))\n\t\t\t$messages = Message::parseMessages(\"{\\\"Messages\\\": \".json_encode($object->Messages).\"}\");\n\t\t\n\t\treturn new self( $resultcode , $messages, $doccode, $docdate, \n\t\t$timestamp, $totalamount, $totaldiscount,\n\t\t$totalexemption, $totaltaxable, $totaltax, $totaltaxcalculated,\n\t\t$taxdate, $taxlines, $taxsummary, $taxaddresses );\t\n\t}",
"public function __construct(string $label)\n {\n parent::__construct();\n $this->setLabel($label);\n $this->setId((string) Uuid::uuid1());\n }"
]
| [
"0.52658886",
"0.5149901",
"0.50144184",
"0.49271137",
"0.47502184",
"0.4749456",
"0.47452065",
"0.47268164",
"0.46878815",
"0.4677468",
"0.46685994",
"0.46589783",
"0.46467033",
"0.46402663",
"0.46071574",
"0.45938554",
"0.45135733",
"0.45074317",
"0.45042673",
"0.4457392",
"0.4456847",
"0.44324988",
"0.44157115",
"0.441175",
"0.4409538",
"0.43988132",
"0.43960255",
"0.43833447",
"0.4359548",
"0.4351261"
]
| 0.78822225 | 0 |
This method will provide all the relevant index scopes for a given index | public function getAll(Index $index): iterable; | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getFromContext(Index $index): IndexScope;",
"public function getFromChannelAndLocaleAndCurrency(\n Index $index,\n string $channelCode = null,\n string $localeCode = null,\n string $currencyCode = null\n ): IndexScope;",
"protected function scopes()\n {\n return [\n 'period' => new FilterPriodScope(),\n 'status' => new FilterStatusScope()\n ];\n }",
"public function getQueryBuilderForIndex(Request $Request, $context = null);",
"public function getScopes();",
"public function getScopes();",
"public function getScopes();",
"public function get($index)\n {\n \n }",
"protected function getAllAvailableIndexConfigurationsOptions() {}",
"public function scopes() {\n return array(\n # Importance\n 'main' =>array('condition'=>'importance='.self::IP_MAIN ),\n 'casual' =>array('condition'=>'importance='.self::IP_CASUAL),\n # Status\n 'new' =>array( 'condition'=>'status='.self::ST_NEW ),\n 'playing' =>array( 'condition'=>'status='.self::ST_OK ),\n 'abandoned'=>array( 'condition'=>'status='.self::ST_ABANDONED),\n );\n }",
"public function setIndex(ProvidesIndexContract $index);",
"private function getIndexersForTable($index, $tablename)\n {\n $ret = [];\n $indexers = tx_mksearch_util_Config::getIndexersForTable($tablename);\n foreach ($indexers as $indexer) {\n if ($this->isIndexerDefined($index, $indexer)) {\n $ret[] = $indexer;\n }\n }\n\n return $ret;\n }",
"public function buildIndex();",
"public function resolve($index, array $dimensions)\n {\n if ($index === 'catalog_product_index_price') {\n $dimensions = $this->filterDimensions($dimensions);\n }\n return $this->indexScopeResolver->resolve($index, $dimensions);\n }",
"protected function getIndex()\n\t{\n\t\tif (!$this->index) {\n\t\t\t$this->index = $this->getClient()->initIndex($this->name);\n\t\t}\n\t\t\n\t\treturn $this->index;\n\t}",
"public function getList($index = '')\n {\n \t// $result = Yii::$app->cache->get($key);\n \t// if (empty($result)) {\n \t// \t$result = $this->object->find()->asArray()->all();\n \t// \tYii::$app->cache->set($key, $result);\n \t// }\n if (empty($index)) {\n $result = $this->object->find()->asArray()->all();\n }else{\n $result = $this->object->find()->indexBy($index)->asArray()->all();\n }\n return $result;\n }",
"protected static function initIndexes()\n {\n static::$indexes = [];\n foreach (static::$indexesConf as $name => &$index) {\n if (!isset($index['type'])) {\n $index['type'] = 'Generic';\n }\n $index['name'] = $name;\n $index['modelClass'] = static::class;\n\n $class = ClassFinder::getNamespace(\\Zer0\\Model\\Indexes\\AbstractIndex::class) . '\\\\' . $index['type'];\n\n static::$indexes[$name] = new $class($index);\n }\n }",
"protected function getIndex()\n\t{ \n /*\n $sm = $this->account->getServiceManager();\n $dbh = $sm->get(\"Db\");\n $this->dbh = $dbh;\n\t\treturn new \\Netric\\EntityQuery\\Index\\Pgsql($this->account, $dbh);\n * \n */\n $this->dbh = $this->account->getServiceManager()->get(\"Db\");\n return new \\Netric\\EntityQuery\\Index\\Pgsql($this->account);\n\t}",
"function get_index_params()\n {\n return array();\n }",
"public function scopes() {\n return array(\n 'withRelated' => array(\n 'with' => array(\n 'quest' => array(\n 'alias' => 'characterQuestsQuest' . self::getScopeCounter(),\n 'scopes' => 'withRelated'\n ),\n ),\n 'order' => $this->getTableAlias(true) . \".`id` DESC\"\n ),\n );\n }",
"public function getIndexList() {\n return self::$indexes;\n }",
"public function index() {\n return $this->handleNotFound(function () {\n $list = [];\n\n foreach ($this->researchService->findAll($this->userId) as $research) {\n $list[] = $this->service->findAll($this->userId, $research->getResearchIndex());\n }\n\n return $list;\n });\n }",
"public function getIndexConfigurations()\n {\n if (null === $this->indexConfigurations) {\n foreach ($this->searchIndexes as $indexName => $indexConfiguration) {\n $this->indexConfigurations[$indexName] = new IndexConfiguration(\n $indexName,\n $indexConfiguration['icon'],\n $this->translator->trans($indexConfiguration['name'], [], 'admin'),\n new Route($indexConfiguration['view']['name'], $indexConfiguration['view']['result_to_view']),\n isset($indexConfiguration['security_context']) ? $indexConfiguration['security_context'] : null,\n isset($indexConfiguration['contexts']) ? $indexConfiguration['contexts'] : []\n );\n }\n }\n\n return $this->indexConfigurations;\n }",
"public function getScopes(): array;",
"public function getScopes(): array;",
"public function getIndex()\n\t{\n\n\t\tself::addArgument('courses', Course::actives());\n\n\t\treturn self::make('index');\n\n\t}",
"public function getIndex()\n {\n return $this->get(self::_INDEX);\n }",
"public function getIndex() {}",
"public function getIndex() {}",
"private function processIndexes()\n {\n foreach ($this->indexes as $index) {\n foreach ($index->columns as $indexColumn) {\n $indexColumnName = $indexColumn['name'];\n if (!array_key_exists(strtolower($indexColumnName), $this->columns)) {\n throw new RuntimeException(\"Key column '$indexColumnName' doesn't exist in table\");\n }\n }\n }\n\n // figure out all sequences of columns covered by non-FK indexes\n foreach ($this->indexes as $index) {\n if ($index->type !== 'FOREIGN KEY') {\n foreach ($index->getCovers() as $cover) {\n $lookup = implode('\\0', $cover);\n $this->covers[$lookup] = true;\n }\n }\n }\n\n $indexes = [];\n $foreigns = [];\n $ibfkCounter = 0;\n\n foreach ($this->indexes as $index) {\n if ($index->type === 'FOREIGN KEY') {\n if ($this->addIndexForForeignKey) {\n // TODO - doesn't correctly deal with indexes like foo(10)\n $lookup = implode('\\0', $index->getColumns());\n if (!array_key_exists($lookup, $this->covers)) {\n $newIndex = new IndexDefinition();\n $newIndex->type = 'KEY';\n $newIndex->columns = $index->columns;\n if (!is_null($index->constraint)) {\n $newIndex->name = $index->constraint;\n } elseif (!is_null($index->name)) {\n $newIndex->name = $index->name;\n }\n $indexes[] = $newIndex;\n }\n }\n\n $foreign = new IndexDefinition();\n if (is_null($index->constraint)) {\n $foreign->constraint = $this->name . '_ibfk_' . ++$ibfkCounter;\n } else {\n $foreign->constraint = $index->constraint;\n }\n $foreign->type = 'FOREIGN KEY';\n $foreign->columns = $index->columns;\n $foreign->reference = $index->reference;\n $foreigns[] = $foreign;\n } else {\n $indexes[] = $index;\n }\n }\n\n // now synthesise names for any unnamed indexes,\n // and collect indexes by type\n $usedName = [];\n $keyTypes = [\n 'PRIMARY KEY',\n 'UNIQUE KEY',\n 'KEY',\n 'FULLTEXT KEY',\n 'FOREIGN KEY',\n ];\n $indexesByType = array_fill_keys($keyTypes, []);\n foreach ($indexes as $index) {\n $name = $index->name;\n if ($index->type === 'PRIMARY KEY') {\n $name = 'PRIMARY';\n } elseif (is_null($name)) {\n $base = $index->columns[0]['name'];\n $name = $base;\n $i = 1;\n while (isset($usedName[$name])) {\n $name = $base . '_' . ++$i;\n }\n $index->name = $name;\n } elseif (array_key_exists(strtolower($name), $usedName)) {\n throw new RuntimeException(\"Duplicate key name '$name'\");\n }\n $index->name = $name;\n $usedName[strtolower($name)] = true;\n\n $indexesByType[$index->type][] = $index;\n }\n\n if (count($indexesByType['PRIMARY KEY']) > 1) {\n throw new RuntimeException(\"Multiple PRIMARY KEYs defined\");\n }\n\n foreach ($indexesByType['PRIMARY KEY'] as $pk) {\n foreach ($pk->columns as $indexColumn) {\n $column = $this->columns[strtolower($indexColumn['name'])];\n if ($column->nullable) {\n $column->nullable = false;\n if (is_null($column->default)) {\n $column->default = $column->getUninitialisedValue();\n }\n }\n }\n }\n\n $this->indexes = [];\n foreach (array_reduce($indexesByType, 'array_merge', []) as $index) {\n $this->indexes[$index->name] = $index;\n }\n foreach ($foreigns as $foreign) {\n $this->foreigns[$foreign->constraint] = $foreign;\n }\n }"
]
| [
"0.7597148",
"0.5817061",
"0.5677836",
"0.5616579",
"0.5549429",
"0.5549429",
"0.5549429",
"0.55404556",
"0.5504399",
"0.5458559",
"0.544613",
"0.5403047",
"0.53921366",
"0.5390148",
"0.5387861",
"0.5372585",
"0.5365177",
"0.53591543",
"0.5348482",
"0.53473",
"0.52692485",
"0.52522796",
"0.52325946",
"0.5226816",
"0.5226816",
"0.51950216",
"0.51833934",
"0.51784074",
"0.51784074",
"0.51772344"
]
| 0.6521152 | 1 |
Returns an index scope from the application context (channel, locale, currency) | public function getFromContext(Index $index): IndexScope; | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getFromChannelAndLocaleAndCurrency(\n Index $index,\n string $channelCode = null,\n string $localeCode = null,\n string $currencyCode = null\n ): IndexScope;",
"#[CustomOpenApi\\Operation(id: 'channelIndex', tags: [Tags::Channel, Tags::V1])]\n #[CustomOpenApi\\Parameters(model: Channel::class)]\n #[CustomOpenApi\\Response(resource: ChannelResource::class, isCollection: true)]\n public function index()\n {\n return CustomQueryBuilder::buildResource(Channel::class, ChannelResource::class, fn($query) => $query->tenanted());\n }",
"public function localeIndex()\n {\n return $this->localeIndex;\n }",
"public function getQueryBuilderForIndex(Request $Request, $context = null);",
"public function getControllerIndex($context = null);",
"public function localeIndex();",
"public function scopes()\n {\n return [\n 'category' => new CategoryScope(),\n ];\n }",
"public function getTemplateIndex($context = null);",
"protected function _scope()\n\t{\n\t\treturn $this->_meta['scope'];\n\t}",
"public function getScope()\n {\n $code = Mage::app()->getRequest()->getParam('store');\n $code_w = Mage::app()->getRequest()->getParam('website');\n if ($code != '') {\n $store_id = Mage::getModel('core/store')->load($code)->getId();\n } else if ($code_w != '') {\n $website_id = Mage::getModel('core/website')->load($code)->getId();\n $store_id = Mage::app()->getWebsite($website_id)->getDefaultStore()->getId();\n } else {\n $store_id = 0;\n }\n\n if ($code == '' && $code_w == '') {\n $data['scope'] = 'default';\n $data['scope_id'] = 0;\n } else if (isset($website_id)) {\n $data['scope'] = 'websites';\n $data['scope_id'] = $website_id;\n } else if (isset($store_id)) {\n $data['scope'] = 'stores';\n $data['scope_id'] = $store_id;\n } else {\n $data['scope'] = 'default';\n $data['scope_id'] = 0;\n }\n\n return $data;\n }",
"public function getScope();",
"public function getScope();",
"protected function scopes()\n {\n return [\n 'period' => new FilterPriodScope(),\n 'status' => new FilterStatusScope()\n ];\n }",
"public function index()\n {\n return ChannelResource::collection(Channel::all());\n }",
"abstract public function getScope();",
"public function scopes() {\n return array(\n # Importance\n 'main' =>array('condition'=>'importance='.self::IP_MAIN ),\n 'casual' =>array('condition'=>'importance='.self::IP_CASUAL),\n # Status\n 'new' =>array( 'condition'=>'status='.self::ST_NEW ),\n 'playing' =>array( 'condition'=>'status='.self::ST_OK ),\n 'abandoned'=>array( 'condition'=>'status='.self::ST_ABANDONED),\n );\n }",
"protected function getIndex()\n\t{ \n /*\n $sm = $this->account->getServiceManager();\n $dbh = $sm->get(\"Db\");\n $this->dbh = $dbh;\n\t\treturn new \\Netric\\EntityQuery\\Index\\Pgsql($this->account, $dbh);\n * \n */\n $this->dbh = $this->account->getServiceManager()->get(\"Db\");\n return new \\Netric\\EntityQuery\\Index\\Pgsql($this->account);\n\t}",
"static function v() {return jucf(function() {\n\t\t/** @var IS $r */\n\t\tif (!($token = ju_request_header('Authorization'))) { /** @var string|null $token */\n\t\t\t$r = ju_my_local() ? ju_store() : ju_error('Please provide a valid token key');\n\t\t}\n\t\telse {\n\t\t\t$sel = ju_db_from('core_config_data', ['scope', 'scope_id']); /** @var Sel $sel */\n\t\t\t$sel->where('? = path', 'justuno_settings/options_interface/token_key');\n\t\t\t$sel->where('? = value', $token);\n\t\t\t$w = function(array $a) {return jutr(jua($a, 'scope'), array_flip([\n\t\t\t\tSS::SCOPE_STORES, SS::SCOPE_WEBSITES, IScopeConfig::SCOPE_TYPE_DEFAULT\n\t\t\t]));};\n\t\t\t/** @var array(string => string) $row */\n\t\t\t$row = ju_first(ju_sort(ju_conn()->fetchAll($sel), function(array $a, array $b) use($w) {return $w($a) - $w($b);}));\n\t\t\tju_assert($row, \"The token «{$token}» is not registered in Magento.\");\n\t\t\t$scope = jua($row, 'scope'); /** @var string $scope */\n\t\t\t$scopeId = jua($row, 'scope_id'); /** @var string $scopeId */\n\t\t\t$r = SS::SCOPE_STORES === $scope ? ju_store($scopeId) : (\n\t\t\t\tIScopeConfig::SCOPE_TYPE_DEFAULT === $scope ? ju_store() :\n\t\t\t\t\tju_store_m()->getWebsite($scopeId)->getDefaultStore()\n\t\t\t);\n\t\t}\n\t\tju_sentry_extra(__CLASS__, 'Store', \"{$r->getCode()} ({$r->getId()})\");\n\t\treturn $r;\n\t});}",
"protected function getIndex()\n\t{\n\t\tif (!$this->index) {\n\t\t\t$this->index = $this->getClient()->initIndex($this->name);\n\t\t}\n\t\t\n\t\treturn $this->index;\n\t}",
"public function getIndex()\n {\n return $this->get(self::_INDEX);\n }",
"public function defaultScope()\n {\n return array(\n 'order' => $this->getTableAlias(false, false) . '.is_sticky DESC, ' . $this->getTableAlias(false, false) . '.created DESC, ' . $this->getTableAlias(false, false) . '.subject',\n );\n }",
"function get_index()\r\n\t{\r\n\r\n\t}",
"private function scope($params)\n {\n if (isset($params['scope'])) {\n return $params['scope'];\n }\n\n return 'global';\n }",
"public function defaultScope()\n {\n return array('order' => 'loanId DESC');\n }",
"public function getIndex() {\n \treturn $this->index;\n }",
"public static function getIndexName(): string\n {\n return Utilities::config('index');\n }",
"public function get($scope);",
"public function index()\n {\n return Currency::all();\n }",
"public function getIndex()\n\t{\n\n\t\tself::addArgument('courses', Course::actives());\n\n\t\treturn self::make('index');\n\n\t}",
"protected function getSessionContext()\n\t{\n\t\t$app = JFactory::getApplication();\n\t\t$package = $app->getUserState('com_fabrik.package', 'fabrik');\n\t\treturn 'com_' . $package . '.list' . $this->model->getRenderContext() . '.plugins.' . $this->onGetFilterKey() . '.';\n\t}"
]
| [
"0.75075257",
"0.6033961",
"0.540871",
"0.5361528",
"0.52263415",
"0.50955284",
"0.508293",
"0.5064449",
"0.50310546",
"0.50261116",
"0.49943587",
"0.49943587",
"0.49889183",
"0.4978954",
"0.49274015",
"0.4917363",
"0.49060947",
"0.48657656",
"0.48547855",
"0.4851444",
"0.4833559",
"0.482323",
"0.48079905",
"0.47928652",
"0.4792095",
"0.47760323",
"0.47701794",
"0.47572145",
"0.4756357",
"0.4725833"
]
| 0.73292917 | 1 |
Activate Apps From DB. | public function activateApp(Request $request)
{
Apps::where('title', 'service')->update( ['active' => $request->get("service_Activate")]);
Apps::where('title', 'project')->update( ['active' => $request->get("project_Activate")]);
Apps::where('title', 'product')->update( ['active' => $request->get("product_Activate")]);
Apps::where('title', 'blog')->update( ['active' => $request->get("blog_Activate")]);
Apps::where('title', 'video')->update( ['active' => $request->get("video_Activate")]);
Apps::where('title', 'photo')->update( ['active' => $request->get("photo_Activate")]);
Apps::where('title', 'slider')->update( ['active' => $request->get("slider_Activate")]);
Apps::where('title', 'team')->update( ['active' => $request->get("team_Activate")]);
Apps::where('title', 'testimonial')->update(['active' => $request->get("testimonial_Activate")]);
Apps::where('title', 'partner')->update( ['active' => $request->get("partner_Activate")]);
Apps::where('title', 'pages')->update( ['active' => $request->get("pages_Activate")]);
Apps::where('title', 'workhours')->update( ['active' => $request->get("workhours_Activate")]);
Apps::where('title', 'contactus')->update( ['active' => $request->get("contactus_Activate")]);
Apps::where('title', 'bookings')->update( ['active' => $request->get("bookings_Activate")]);
Apps::where('title', 'why_us')->update( ['active' => $request->get("why_us_Activate")]);
return redirect()->to('/admin-panel');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function AppActivate ( $app )\n\t {\n\t\t$this -> ShellInstance -> AppActivate ( $app ) ;\n\t }",
"public function activateApp($teamid, $appid)\n {\n $user = Auth::user(); \n $result = UserActiveApp::processUpdates($user->id, $appid);\n\n return redirect()->route('apps.show', ['teamid' => $teamid]);\n }",
"public function apps($app) {\n \n // Check if the current user is admin and if session exists\n $this->check_session($this->user_role, 0);\n \n // Verify if account is confirmed\n $this->_check_unconfirmed_account();\n \n // Prepare the app\n $app = str_replace('-', '_', $app);\n\n // Verify if the app exists\n if ( is_dir( APPPATH . '/apps/collection/' . $app . '/' ) ) {\n \n if ( $app === 'dashboard' ) {\n \n // Get the user's plan\n $user_plan = get_user_option( 'plan' );\n \n // Verify if user has a plan, if no add default plan\n if ( !$user_plan ) {\n $this->plans->change_plan(1, $this->user_id);\n redirect('user/app/' . $app . '/');\n }\n\n // Get plan end\n $plan_end = get_user_option( 'plan_end', $this->user_id );\n\n $expired = 0;\n\n $expires_soon = 0;\n\n if ( $plan_end ) {\n\n if ( strtotime($plan_end) < time() ) {\n\n $expired = 1;\n $this->plans->delete_user_plan($this->user_id);\n\n } elseif ( strtotime($plan_end) < time() + 432000 ) {\n\n $expires_soon = 1;\n\n }\n\n }\n \n } \n \n // Require the Apps class\n $this->load->file( APPPATH . '/apps/main.php' );\n\n // Call the apps class\n $apps = new MidrubApps\\MidrubApps();\n \n // Call the user controller\n $red = $apps->user_init($app);\n \n } else {\n \n show_404();\n \n }\n \n }",
"private function autodiscoverApps()\n {\n $path = APPSDIR;\n\n if (!is_array($path)) {\n $path = (array) $path;\n }\n\n foreach ($path as $apps_dir) {\n\n if (is_dir($apps_dir)) {\n\n if (($dh = opendir($apps_dir)) !== false) {\n\n while (($name = readdir($dh)) !== false) {\n\n if ($name{0} == '.' || $name == 'Core' || is_file($apps_dir . '/' . $name)) {\n continue;\n }\n\n $app = $this->getAppInstance($name);\n }\n\n closedir($dh);\n }\n }\n }\n }",
"public function start_app_backup() {\n \n // Backups the files to update and save update\n (new MidrubBaseAdminCollectionUpdateHelpers\\Apps)->start_backup();\n \n }",
"public function activate() \n {\n global $wpdb;\n\n if ( is_multisite() ) {\n\n $blog_ids = $wpdb->get_col( \"SELECT blog_id FROM $wpdb->blogs\" );\n foreach ( $blog_ids as $blog_id ) {\n switch_to_blog( $blog_id );\n $this->create_table();\n restore_current_blog();\n }\n } else {\n $this->create_table();\n }\n\t}",
"public function setActiveEntry($appId);",
"public function activate(): void\n {\n if ($this->selectedRowsQuery->count() > 0) {\n Role::whereIn('id', $this->selectedKeys())->update(['is_active' => 1]);\n }\n\n $this->resetSelected();\n }",
"private function initApps()\n {\n\n // Run app specfic functions\n\n /* @var $app \\Core\\Amvc\\App\\Abstractapp */\n foreach ($this->apps as $app) {\n\n // Call additional Init() methods in apps\n if (method_exists($app, 'Init')) {\n $app->Init();\n }\n\n switch ($app->getName()) {\n case 'Core':\n\n $config = $this->config->getStorage('Core');\n\n // Create home url\n $type = $this->user->isGuest() ? 'guest' : 'user';\n $route = $config->get('home.' . $type . '.route');\n $params = parse_ini_string($config->get('home.' . $type . '.params'));\n\n $config->set('url.home', $app->url($route, $params));\n\n break;\n }\n }\n }",
"private static function activate($api, $db)\n {\n try {\n $db->get_table_meta(PERCH_DB_PREFIX . self::DB_TABLE);\n } catch (\\PDOException $e) {\n $Queue = new Queue($api);\n $Queue->attempt_install();\n }\n\n\n }",
"public function activate_user() {\n global $database;\n $sql = \"UPDATE user SET is_active = 1 WHERE id = \";\n $sql .= $database->escape_value($this->id);\n $database->query($sql);\n }",
"public static function on_activate() {\n self::create_tables();\n }",
"public function activate()\n {\n Cleeng_Core::load('Cleeng_WpClient');\n Cleeng_Client::checkCompatibility();\n $this->migrate_database();\n //$cleengAdmin = Cleeng_Core::load('Cleeng_Admin');\n //$cleengAdmin->message(\"Cleeng for WordPress installed.\");\n }",
"protected function enableApplicationsPeriod()\n {\n $settings = app('settings');\n $settings->applications_start_at = Carbon::yesterday();\n $settings->applications_end_at = Carbon::tomorrow();\n $settings->min_team_members = 2;\n $settings->max_team_members = 4;\n $settings->save();\n }",
"public function changeActiveStatus($appName, $active);",
"public static function activate() {\n global $wpdb;\n\n $sql = \"CREATE TABLE \" . self::tableName() . \" (\n ID bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,\n user_login varchar(255) NOT NULL,\n user_id bigint(20) UNSIGNED NOT NULL,\n remote_ip varchar(43),\n user_agent text,\n logged_in_at timestamp NOT NULL,\n UNIQUE KEY ID (ID),\n INDEX (logged_in_at)\n );\";\n\n require_once(ABSPATH . 'wp-admin/includes/upgrade.php');\n dbDelta($sql);\n }",
"public function UsersApps()\n {\n \treturn DB::table('apps')\n ->where('users_id',\\Auth::user()->id)\n ->orderBy('updated_at', 'desc')\n ->get();\n }",
"protected function setUpDatabase($app)\n {\n parent::setUpDatabase($app);\n\n $app[Tenant::class]->create(['tenant_name' => 'testTenant', 'app_code' => 'FOOBAR']);\n $app[Tenant::class]->create(['tenant_name' => 'testTenant2', 'app_code' => 'BARFOO']);\n }",
"public function active_user($db,$data) {\n\n $sql=\"UPDATE user SET activate=true where token='$data'\";\n return $db->ejecutar($sql);\n }",
"static function handle_activate()\n\t{\n\t\tself::handle_multi_site( 'activate' );\n\t}",
"public static function activate() {\n\t\t// We're already on the latest schema version.\n\t\tif ( (int) self::$table_version === (int) get_option( self::SCHEMA_VERSION_KEY ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\tself::install_tables();\n\t}",
"public static function activate() {\n\t\t\t\n\t\t\tglobal $wpdb;\n\t\t\t$db_table_name = $wpdb->prefix . 'csms_history_table'; // table name\n\t\t\t$charset_collate = $wpdb->get_charset_collate();\n\t\t\t\n\t\t\t//Check to see if the table exists already, if not, then create it\n\t\t\tif ( $wpdb->get_var( \"show tables like '$db_table_name'\" ) != $db_table_name ) {\n\t\t\t\t$sql = \"CREATE TABLE $db_table_name (\n id int(11) NOT NULL auto_increment,\n user_id varchar(15) NOT NULL,\n post_id varchar(60) NOT NULL,\n date varchar (255)NOT NULL,\n time varchar (255)NOT NULL,\n<<<<<<< HEAD\n current_time_date TIMESTAMP,\n=======\n status varchar(100)NOT NULL,\n>>>>>>> 5a3bcb7608f6ce334109bfb2760bdb2174605eb0\n UNIQUE KEY id (id)\n ) $charset_collate;\";\n\t\t\t\t\n\t\t\t\trequire_once( ABSPATH . 'wp-admin/includes/upgrade.php' );\n\t\t\t\tdbDelta( $sql );\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}",
"function myplugin_activate_dbtables( $tables, $datas ) {\n\n\trequire_once( ABSPATH . 'wp-admin/includes/upgrade.php'); # this runs the WordPress database table upgrade codex.\n\n\tforeach ($tables as $table_name => $sql) {\n\n\t\t$new_installation = $wpdb->get_var(\"show tables like '$table_name'\") != $table_name; #detects if this is a new installation or simply an update.\n\t\tdbDelta($sql);\n\n\t\tif ($new_installation)\n\t\t{\n\t\t\t$wpdb->query( $datas[$table_name] );\n\t\t}\n\t}\n}",
"public function activate();",
"public function activate();",
"public function activate() {\n\t\t// TODO define activation functionality here\n\t}",
"private function activate(){\r\n \r\n //show the current application 'page'\r\n \r\n switch($_GET['wapi']){\r\n case \"demo\":\r\n \r\n $fileArray=array(\"app\".DS.\"display\".DS.\"demo\".DS.\"demo.php\");\r\n \r\n break;\r\n case \"outbox\":\r\n \r\n $fileArray=array(\"app\".DS.\"display\".DS.\"outbox\".DS.\"outbox.php\");\r\n \r\n break;\r\n case \"manage\":\r\n \r\n $fileArray=array(\"app\".DS.\"display\".DS.\"manage\".DS.\"manage.php\");\r\n \r\n break;\r\n }//switch\r\n \r\n //if fileArray is set, create an AmbaView object\r\n if(isset($fileArray)){\r\n \r\n $model=new \\Amba\\Core\\AmbaModel();\r\n \r\n $controller=new \\Amba\\Core\\AmbaController($model);\r\n \r\n $view=new \\Amba\\Core\\AmbaView($controller,$fileArray);\r\n \r\n $view->load();\r\n \r\n }//if\r\n \r\n }",
"public function run()\n {\n $states = config('app_state');\n foreach ($states as $value) {\n AppState::firstOrCreate(['name' => $value['name']], $value);\n }\n }",
"public function activate(){\r\n\t\t$uid = $_GET[\"uid\"];\r\n\t\t$hash = $_GET[\"hash\"];\r\n\r\n\t\tif(User::activateUser($uid, $hash)){\r\n\t\t\techo \"active\";\r\n\t\t\tUser::loginSystem(User::fromUid($uid));\r\n\t\t}\r\n\t\tPage::redirect(\"/index\");\r\n\t}",
"protected function setUpDatabase($app)\n {\n\n }"
]
| [
"0.66192937",
"0.60342765",
"0.5970644",
"0.5957167",
"0.5907916",
"0.59026814",
"0.58523256",
"0.56782097",
"0.5605068",
"0.55934376",
"0.5564146",
"0.5544416",
"0.55189824",
"0.5514357",
"0.5472157",
"0.54548717",
"0.5451909",
"0.5445915",
"0.5413645",
"0.54125524",
"0.54113793",
"0.5409185",
"0.5397616",
"0.53929484",
"0.53929484",
"0.53926873",
"0.53910595",
"0.5389331",
"0.53697044",
"0.536769"
]
| 0.7309194 | 0 |
Get a team by name | public function getTeam($name)
{
if (!is_string($name)) {
throw new InvalidTypeException('Name', 'string', gettype($name));
}
return $this->get(sprintf('teams/%s', $name));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getTeam();",
"public function getTeam() {\n return $this->db->getTeamById($this->teamId);\n }",
"public static function getByID($id){\n\t\treturn DB::table('teams')->where('id', $id)->first();\n\t}",
"public function getTeam($id)\n {\n return $this->_getTeam($id);\n }",
"public function team(string $name = '', $id = null) : Team {\n\t\t$t = new Team($name, $id);\n\t\t$this->teams->insert($t);\n\t\t$t->addGroupResults($this);\n\t\treturn $t;\n\t}",
"public function getTeam($num)\n {\n switch ($num) {\n case 0:\n return $this->team1;\n break;\n case 1:\n return $this->team2;\n break;\n default:\n //throw error\n }\n\n return null;\n }",
"function getTeam()\n\t{\n\t\treturn $this->Info['Team'];\n\t}",
"public function getById($id){\n\t\t$url = WEBSERVICE. \"teams/getById/\" . $id;\n\t\t$this->HTTPRequest->setUrl($url);\n\t\t$this->HTTPRequest->setMethod(\"GET\");\n\t\t$arrayResponse = $this->HTTPRequest->sendHTTPRequest();\n\t\treturn $this->arrayToTeam($arrayResponse, true);\n\t}",
"public function getTeam($index = 0)\n\t{\n\t\treturn $this->_teams[$index];\n\t}",
"function get_team_by_team_id_request($teamID){\n // Require SQL Connection\n require_once(__DIR__ . '/mysql-connect.php');\n $conn = mysqli_connection();\n\n $sql = \"SELECT * FROM teams WHERE TeamID='$teamID' LIMIT 1\";\n $result = mysqli_query($conn, $sql);\n\n mysqli_close($conn);\n return $result;\n }",
"public function getTeam()\n {\n return $this->team;\n }",
"public function getTeams();",
"public function get_name() {\n\t\treturn 'team';\n\t}",
"public function getById(int $id):Team\n {\n return Team::findOrFail($id);\n }",
"function woothemes_get_our_team ( $args = '' ) {\n\tglobal $woothemes_our_team;\n\treturn $woothemes_our_team->get_our_team( $args );\n}",
"public function show(Team $team)\n {\n return $team;\n }",
"public function team();",
"public function getTeam($teamId) {\r\n\t\t/* connect to mysql database */\r\n\t\t$teamCriteria = array(array('name'=>\"ID\", 'func'=>\"=\", 'value'=>$teamId));\r\n\t\t$result = $this->select($this->prefix.TEAM_TABLE, NULL, $teamCriteria);\r\n\t\t\r\n\t\tif($result) {\r\n\t\t\t/* receive data of team from result */\r\n\t\t\t$team = new Team();\r\n\t\t\t$team->setId($result[0]['ID']);\r\n\t\t\t$team->setName($result[0]['uliname']);\r\n\t\t\t\r\n\t\t\t/* return team */\r\n\t\t\treturn $team;\r\n\t\t}\r\n\r\n\t\treturn NULL;\r\n\t}",
"public function getTeam()\n {\n return $this->hasOne(Team::className(), ['id' => 'team_id']);\n }",
"public function getTeam()\n {\n return $this->hasOne(Team::className(), ['ID' => 'TeamID']);\n }",
"public function getTeamAt($offset)\n {\n return $this->get(self::_TEAM, $offset);\n }",
"public function getSelfTeam()\n {\n return $this->get(self::_SELF_TEAM);\n }",
"function get_race_team($idTeam)\n{\n $team_race = get_race_team_db($idTeam);\n return $team_race;\n}",
"public function testGetValidTeamByTeamName() {\n\t\t// count the number of rows and save it for later\n\t\t$numRows = $this->getConnection()->getRowCount(\"team\");\n\n\t\t// create a new Team and insert to into mySQL\n\t\t$team = new Team(null, $this->sport->getSportId(), $this->VALID_TEAMAPIID, $this->VALID_TEAMCITY, $this->VALID_TEAMNAME);\n\t\t$team->insert($this->getPDO());\n\n\t\t// grab the data from mySQL and enforce the fields match our expectations\n\t\t$results = Team::getTeamByTeamName($this->getPDO(), $team->getTeamName());\n\t\t$this->assertEquals($numRows + 1, $this->getConnection()->getRowCount(\"team\"));\n\t\t$this->assertCount(1, $results);\n\t\t$this->assertContainsOnlyInstancesOf(\"Edu\\\\Cnm\\\\Sprots\\\\Team\", $results);\n\n\t\t// grab the result from the array and validate it\n\t\t$pdoTeam = $results[0];\n\t\t$this->assertEquals($pdoTeam->getTeamSportId(), $this->sport->getSportId());\n\t\t$this->assertEquals($pdoTeam->getTeamApiId(), $this->VALID_TEAMAPIID);\n\t\t$this->assertEquals($pdoTeam->getTeamCity(), $this->VALID_TEAMCITY);\n\t\t$this->assertEquals($pdoTeam->getTeamName(), $this->VALID_TEAMNAME);\n\t\t//$this->assertEquals($pdoTeam->getTeamSportId(), $this->VALID_TEAMSPORTID);\n\t}",
"public function get_team($id, $show){\n\t\treturn $this->get_team_mem($id, $show);\n\t}",
"public function getOppoTeam()\n {\n return $this->get(self::_OPPO_TEAM);\n }",
"function get_team_name($team_id) {\n global $db;\n $query = 'SELECT team_id, name AS city, nickname FROM teams\n WHERE team_id = :team_id';\n $statement = $db->prepare($query);\n $statement->bindValue(':team_id', $team_id);\n $statement->execute();\n $team_name = $statement->fetch();\n $statement->closeCursor();\n return $team_name;\n}",
"public function show($id)\n {\n $this->authorize('isAdmin');\n return Ourteam::findOrFail($id);\n\n }",
"public function getTeamNameByID($id){\n $sqlQuery = \"SELECT teamName FROM Teams T\n WHERE T.teamID = :teamID\";\n\n $statement = $this->_dbHandle->prepare($sqlQuery);\n $statement->bindValue(\":teamID\", $id, PDO::PARAM_INT);\n $statement->execute();\n $this->_dbInstance->destruct();\n\n $r = '';\n while ($row = $statement->fetch(PDO::FETCH_ASSOC)){\n $r = $row['teamName'];\n }\n\n return $r;\n }",
"function get_team_info($idTeam)\n{\n $team_info = get_team_info_db($idTeam);\n return $team_info;\n}"
]
| [
"0.778894",
"0.69826925",
"0.6979283",
"0.6946591",
"0.6900469",
"0.6855721",
"0.68554854",
"0.6837608",
"0.6782374",
"0.6681516",
"0.6655595",
"0.6634102",
"0.662447",
"0.66222507",
"0.66196036",
"0.6587913",
"0.65724945",
"0.6550653",
"0.65500575",
"0.65219235",
"0.6477591",
"0.64722544",
"0.64715654",
"0.63954234",
"0.6378486",
"0.6340496",
"0.63355535",
"0.6324166",
"0.63229275",
"0.63174754"
]
| 0.7587281 | 1 |
Update helpers_available table returns helpers if needed | public function updateAvailableHelpers($user_id, $store_id, $tag) {
if($tag == 'users_available_add'){
$combosAlreadyMade = $this->checkHelpersAvailable($user_id, $store_id);
if($combosAlreadyMade == 'Exists'){
return 'Exists';
}
}
if ($tag == 'users_available_add') {
$query = "
INSERT INTO helpers_available (
store_id,
user_id
) VALUES (
:store_id,
:user_id
)
";
} else if ($tag == 'users_available_remove') {
$query = "
DELETE FROM helpers_available
WHERE store_id = :store_id and user_id = :user_id
";
}
else if ($tag == 'users_remove_all') {
$query = "
DELETE FROM helpers_available
WHERE user_id = :user_id
";
}
else if ($tag == 'users_select') {
$query = "
select * FROM helpers_available
WHERE store_id = :store_id
";
}
try
{
$stmt = $this->_db->prepare($query);
if ($tag != 'users_select') {
$stmt->bindValue(':user_id',$user_id);
}
if ($tag != 'users_remove_all') {
$stmt->bindValue(':store_id',$store_id);
}
$stmt->execute();
if ($tag == 'users_select') {
$result = $stmt->fetchAll();
return $result;
}
}
catch(PDOException $ex)
{
$h = $ex->getMessage ();
die($h);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function updateHelperTableUnsub(){\n\n\t\tDB::statement(\"update email_logic_helper elh\n\t\t\t\t\t\tset is_unsubscribed = 1\n\t\t\t\t\t\twhere exists\n\t\t\t\t\t\t(\n\t\t\t\t\t\t Select\n\t\t\t\t\t\t 1\n\t\t\t\t\t\t from\n\t\t\t\t\t\t email_suppression_lists esl\n\t\t\t\t\t\t where\n\t\t\t\t\t\t esl.uid = elh.user_id\n\t\t\t\t\t\t and uid is not null\n\t\t\t\t\t\t )\n\t\t\t\t\t\tand elh.is_unsubscribed = 0\");\n\t}",
"public function FillTable(){\n\n $helpers = Helper::all();\n\n foreach ($helpers as $key=>$helper){\n\n $helper->update(['id'=>$key+1]);\n }\n }",
"public function install()\n\t{\n\t\tif ( $this->db->table_exists('helper') && $this->db->table_exists('helper_categories'))\n\t\t{\n\t\t\t$this->dbforge->drop_table('helper');\n\t\t\t$this->dbforge->drop_table('helper_categories');\n\t\t}\n\n\t\t$tables = [\n\t\t\t'helper'\t=> [\n\t\t\t\t'id'\t\t\t\t=> ['type' => 'INT', 'constraint' => 11, 'auto_increment' => TRUE, 'primary' => TRUE],\n\t\t\t\t'adminId'\t\t\t=> ['type' => 'INT','constraint' => 11],\n\t\t\t\t'slug'\t\t\t\t=> ['type' => 'VARCHAR', 'constraint' => 200, 'key' => TRUE],\n\t\t\t\t'metaTitle'\t\t\t=> ['type' => 'VARCHAR', 'constraint' => 255],\n\t\t\t\t'metaKeyword'\t\t=> ['type' => 'VARCHAR', 'constraint' => 255],\n\t\t\t\t'featured'\t\t\t=> ['type' => 'TINYINT', 'constraint' => 1, 'default' => 0],\n\t\t\t\t'content'\t\t\t=> ['type' => 'TEXT'],\n\t\t\t\t'usefulCount'\t\t=> ['type' => 'INT', 'constraint' => 11, 'default' => 0],\n\t\t\t\t'uselessCount'\t\t=> ['type' => 'INT', 'constraint' => 11, 'default' => 0],\n\t\t\t\t'createOn'\t\t\t=> ['type' => 'INT', 'constraint' => 11]\n\t\t\t],\n\t\t\t'helper_categories' => [\n\t\t\t\t'id'\t\t\t=> ['type' => 'INT', 'constraint' => 11, 'auto_increment' => TRUE, 'primary' => TRUE],\n\t\t\t\t'title'\t\t\t=> ['type' => 'VARCHAR', 'constraint' => 100],\n\t\t\t\t'keywords'\t\t=> ['type' => 'VARCHAR', 'constraint' => 200, 'null' => TRUE],\n\t\t\t\t'description'\t=> ['type' => 'VARCHAR', 'constraint' => 200, 'null' => TRUE],\n\t\t\t\t'faIcon'\t\t=> ['type' => 'VARCHAR', 'constraint' => 50, 'null' => TRUE],\n\t\t\t\t'parent'\t\t=> ['type' => 'INT', 'constraint' => 11, 'default' => 0],\n\t\t\t\t'isDisplay'\t\t=> ['type' => 'TINYINT', 'constraint' => 1, 'default' => 1]\n\t\t\t],\n\t\t];\n\n\t\tif ( ! $this->installTables($tables))\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\n\t\treturn TRUE;\n\t}",
"function wp_should_upgrade_global_tables()\n {\n }",
"public function updateIdehelper()\n {\n \t$this->say('Update barryvdh/laravel-ide-helper');\n \t$this->taskExecStack('Update barryvdh/laravel-ide-helper')\n \t\t\t->stopOnFail()\n \t\t\t->exec('php artisan clear-compiled')\n \t\t\t->exec('php artisan ide-helper:generate')\n \t\t\t->exec('php artisan optimize')\n \t\t\t->run();\n }",
"function setupAutoUpdate() {\n try {\n DB::execute('INSERT INTO ' . TABLE_PREFIX . \"config_options (name, module, value) VALUES ('new_modules_available', 'system', 'b:0;')\");\n DB::execute(\"INSERT INTO \" . TABLE_PREFIX . \"config_options (name, module, value) VALUES ('update_archive_url', 'system', 'N;')\");\n DB::execute('INSERT INTO ' . TABLE_PREFIX . \"config_options (name, module, value) VALUES ('update_download_progress', 'system', 'i:0;')\");\n } catch(Exception $e) {\n return $e->getMessage();\n } // try\n\n return true;\n }",
"public function safeUp()\n {\n $fields = (new Query())\n ->select(['*'])\n ->from([Table::FIELDS])\n ->where(['like', 'context', 'superTableBlockType:'])\n ->andWhere(['type' => MissingField::class])\n ->all();\n\n foreach ($fields as $field) {\n $settings = Json::decode($field['settings']);\n\n if (is_array($settings) && array_key_exists('expectedType', $settings)) {\n $expectedType = $settings['expectedType'];\n $newSettings = $settings['settings'] ?? [];\n\n $this->update(Table::FIELDS, [\n 'type' => $expectedType,\n 'settings' => $newSettings,\n ], [\n 'id' => $field['id']\n ]);\n }\n }\n }",
"function _maybe_update_plugins()\n {\n }",
"private function restore_helpers($helpers) {\n foreach ($helpers as $name => $function) {\n // Restore the helper functions. Must call parent::add here to avoid\n // a recursion problem.\n parent::add($name, $function);\n }\n }",
"function checkInstall() {\r\n\tglobal $wpdb;\r\n\tglobal $table_prefix;\t\t\r\n\t\r\n\t$version = get_option('re_place_version');\r\n\r\n\tif($version == \"\") {\r\n\t\t$sql = <<<SQL\r\n\t\t\tCREATE TABLE `{$table_prefix}re_place` (\r\n\t\t\t `re_id` bigint(20) NOT NULL auto_increment,\r\n\t\t\t `re_active` char(1) NOT NULL default 'Y',\r\n\t\t\t `re_description` varchar(255) NOT NULL default '',\r\n\t\t\t `re_search` mediumtext NOT NULL,\r\n\t\t\t `re_place` mediumtext NOT NULL,\r\n\t\t\t `re_order` int NOT NULL default 0,\r\n\t\t\t `restriction` varchar(32),\r\n\t\t\t `restr_otherwise` mediumtext,\r\n\t\t\t PRIMARY KEY (`re_id`)\r\n\t\t\t) ENGINE=MyISAM ;\r\nSQL;\r\n\t\t$wpdb->query($sql);\r\n\t\tadd_option( 're_place_version', '0.2.1', 're.place version number', 'yes' );\r\n\t\tadd_option( 're_place_listview', 'asis', 're.place list view option', 'yes' );\r\n\t} else {\r\n\t\tswitch ( $version ) {\r\n\t\t\tcase '0.1.1':\r\n\t\t\tcase '0.1.2':\r\n\t\t\t\taddRestrColumns();\r\n\t\t\t\tupdateVersion();\r\n\t\t\t\tadd_option( 're_place_listview', 'asis', 're.place list view option', 'yes' );\r\n\t\t\t\tbreak;\r\n\t\t\tcase '0.1.3':\r\n\t\t\tcase '0.1.4':\r\n\t\t\tcase '0.1.5':\r\n\t\t\t\tupdateVersion();\r\n\t\t\t\tadd_option( 're_place_listview', 'asis', 're.place list view option', 'yes' );\r\n\t\t\t\tbreak;\r\n\t\t\tcase '0.2.0':\r\n\t\t\t\tupdateVersion();\r\n\t\t}\r\n\t}\r\n}",
"function myPear_update26(){\n \n if (myPear_db()->tableExists('zzz_organizations')){\n if (myPear_db()->columnExists('org_nickname','zzz_organizations')){\n myPear_db()->qquery(\"ALTER TABLE `zzz_organizations` CHANGE `org_nickname` `org_code` VARCHAR(32) NULL\",1);\n myPear_db()->reset_cache();\n }\n \n if (!myPear_db()->columnExists('org_name_short','zzz_organizations')){\n myPear_db()->qquery(\"ALTER TABLE `zzz_organizations` ADD `org_name_short` VARCHAR(32) NOT NULL AFTER `org_name`\",1);\n myPear_db()->reset_cache();\n foreach(array('an' => 'AlbaNova',\n\t\t 'nordita'=> 'Nordita',\n\t\t 'fysikum'=> 'Fysikum',\n\t\t 'kth' => 'KTH',\n\t\t 'okc' => 'OKC',\n\t\t 'vh' => 'Vetenskapenshus',\n\t\t 'gu' => 'GU',\n\t\t ) as $org_code=>$org_name_short){\n\tmyPear_db()->qquery(\"UPDATE `zzz_organizations` SET org_name_short='$org_name_short' WHERE org_code='$org_code'\",1);\n\t\n }\n }\n }\n}",
"function updateModules() {\n $modules_table = TABLE_PREFIX . 'modules';\n\n try {\n DB::execute(\"ALTER TABLE $modules_table ADD is_enabled tinyint(1) NOT NULL DEFAULT '0' AFTER position\");\n DB::execute(\"ALTER TABLE $modules_table DROP is_system\");\n } catch(Exception $e) {\n return $e->getMessage();\n } // try\n\n return true;\n }",
"protected function run_updater() {\r\n\r\n\t\t/*\r\n\t\t* Version 1.6\r\n\t\t* add `active` to table categories\r\n\t\t*/\r\n\t\tif (version_compare(LUMISE, '1.4') >=0 ){\r\n\t\t\t$sql = \"SHOW COLUMNS FROM `{$this->main->db->prefix}categories` LIKE 'active'\";\r\n\t\t\t$columns = $this->main->db->rawQuery($sql);\r\n\t\t\tif(count($columns) == 0){\r\n\t\t\t\t$sql_active = \"ALTER TABLE `{$this->main->db->prefix}categories` ADD `active` INT(1) NOT NULL DEFAULT '1' AFTER `order`\";\r\n\t\t\t\t$this->main->db->rawQuery($sql_active);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (version_compare(LUMISE, '1.5') >=0 ){\r\n\t\t\t$list_tables = array(\r\n\t\t\t\t'products' => 'color',\r\n\t\t\t\t'products' => 'printings',\r\n\t\t\t);\r\n\r\n\t\t\tforeach ($list_tables as $k => $v) {\r\n\t\t\t\t$columns = $this->main->db->rawQuery(\"SHOW COLUMNS FROM `{$this->main->db->prefix}{$k}` LIKE '{$v}'\");\r\n\t\t\t\tif(count($columns) > 0){\r\n\t\t\t\t\t$this->main->db->rawQuery(\r\n\t\t\t\t\t\t\"ALTER TABLE `{$this->main->db->prefix}products` CHANGE `{$v}` `{$v}` TEXT NOT NULL\"\r\n\t\t\t\t\t);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (version_compare(LUMISE, '1.7') >=0 ){\r\n\r\n\t\t\t$sql = \"SHOW COLUMNS FROM `{$this->main->db->prefix}fonts` LIKE 'upload_ttf'\";\r\n\t\t\t$columns = $this->main->db->rawQuery($sql);\r\n\r\n\t\t\tif(count($columns) == 0){\r\n\t\t\t\t$sql_active = \"ALTER TABLE `{$this->main->db->prefix}fonts` ADD `upload_ttf` TEXT NOT NULL AFTER `upload`\";\r\n\t\t\t\t$this->main->db->rawQuery($sql_active);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (version_compare(LUMISE, '1.7.1') >=0 ){\r\n\r\n\t\t\t$this->upgrade_1_7();\r\n\r\n\t\t\t$sql = \"SHOW COLUMNS FROM `{$this->main->db->prefix}products` LIKE 'variations';\";\r\n\t\t\t$columns = $this->main->db->rawQuery($sql);\r\n\t\t\tif(count($columns) == 0){\r\n\t\t\t\t$sql_active = \"ALTER TABLE `{$this->main->db->prefix}products` ADD `variations` TEXT NOT NULL AFTER `stages`\";\r\n\t\t\t\t$this->main->db->rawQuery($sql_active);\r\n\t\t\t}\r\n\r\n\t\t\t// do the convert old data\r\n\t\t\t// 1. convert colors to attribute\r\n\t\t\t// 2. convert all old attribute structure to new structure\r\n\t\t\t// 3. convert stages\r\n\r\n\t\t\t$sql = \"SHOW COLUMNS FROM `{$this->main->db->prefix}products` LIKE 'orientation';\";\r\n\t\t\t$columns = $this->main->db->rawQuery($sql);\r\n\t\t\tif(count($columns) > 0){\r\n\t\t\t\t$this->main->db->rawQuery(\"ALTER TABLE `{$this->main->db->prefix}products` DROP `orientation`;\");\r\n\t\t\t\t$this->main->db->rawQuery(\"ALTER TABLE `{$this->main->db->prefix}products` DROP `min_qty`;\");\r\n\t\t\t\t$this->main->db->rawQuery(\"ALTER TABLE `{$this->main->db->prefix}products` DROP `max_qty`;\");\r\n\t\t\t\t$this->main->db->rawQuery(\"ALTER TABLE `{$this->main->db->prefix}products` DROP `size`;\");\r\n\t\t\t\t$this->main->db->rawQuery(\"ALTER TABLE `{$this->main->db->prefix}products` DROP `change_color`;\");\r\n\t\t\t\t$this->main->db->rawQuery(\"ALTER TABLE `{$this->main->db->prefix}products` DROP `color`;\");\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\tif (version_compare(LUMISE, '1.7.3') >=0 ){\r\n\t\t\t$this->upgrade_1_7_3();\r\n\t\t}\r\n\r\n\t\tif (version_compare(LUMISE, '1.7.4') >=0 ) {\r\n\r\n\t\t\t$tables = $this->main->db->rawQuery(\"SHOW TABLES LIKE '{$this->main->db->prefix}sessions'\");\r\n\r\n\t\t\tif (count($tables) === 0) {\r\n\r\n\t\t\t\t$this->main->db->rawQuery(\r\n\t\t\t\t\t\"CREATE TABLE IF NOT EXISTS `{$this->main->db->prefix}sessions` (\r\n\t\t\t\t\t `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,\r\n\t\t\t\t\t `name` varchar(255) NOT NULL,\r\n\t\t\t\t\t `value` varchar(255) NOT NULL,\r\n\t\t\t\t\t `expires` int(11) NOT NULL,\r\n\t\t\t\t\t `session_id` varchar(255) NOT NULL,\r\n\t\t\t\t\t PRIMARY KEY (`id`)\r\n\t\t\t\t\t) ENGINE=InnoDB AUTO_INCREMENT=1 CHARSET=utf8mb4\"\r\n\t\t\t\t);\r\n\t\t\t}\r\n\r\n\t\t\t$sql = \"SHOW COLUMNS FROM `{$this->main->db->prefix}order_products` LIKE 'cart_id';\";\r\n\t\t\t$columns = $this->main->db->rawQuery($sql);\r\n\t\t\tif(count($columns) == 0){\r\n\t\t\t\t$sql_active = \"ALTER TABLE `{$this->main->db->prefix}order_products` ADD `cart_id` VARCHAR(255) NOT NULL DEFAULT '' AFTER `product_id`\";\r\n\t\t\t\t$this->main->db->rawQuery($sql_active);\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\tif (version_compare(LUMISE, '1.7.5') >=0 ) {\r\n\t\t\t$this->upgrade_1_7_5();\r\n\t\t}\r\n\r\n\t\tif (version_compare(LUMISE, '1.9.2') >=0 ) {\r\n\t\t\t$sql = \"SHOW COLUMNS FROM `{$this->main->db->prefix}fonts` LIKE 'name_desc'\";\r\n\t\t\t$columns = $this->main->db->rawQuery($sql);\r\n\t\t\tif(count($columns) == 0){\r\n\t\t\t\t$sql_active = \"ALTER TABLE `{$this->main->db->prefix}fonts` ADD `name_desc` varchar(255) NOT NULL DEFAULT '' AFTER `upload`\";\r\n\t\t\t\t$this->main->db->rawQuery($sql_active);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (version_compare(LUMISE, '1.9.3') >=0 ) {\r\n\t\t\t$sql = \"SHOW COLUMNS FROM `{$this->main->db->prefix}products` LIKE 'active_description'\";\r\n\t\t\t$columns = $this->main->db->rawQuery($sql);\r\n\t\t\tif(count($columns) == 0){\r\n\t\t\t\t$sql_active = \"ALTER TABLE `{$this->main->db->prefix}products` ADD `active_description` INT(1) NOT NULL DEFAULT '0' AFTER `description`\";\r\n\t\t\t\t$this->main->db->rawQuery($sql_active);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif (version_compare(LUMISE, '1.9.9') >=0 ) {\r\n\t\t\t$this->upgrade_1_9_9();\r\n\t\t}\r\n\r\n\t\tif (version_compare(LUMISE, '2.0') > 0 ) {\r\n\t\t\t$this->upgrade_2_0();\r\n\t\t}\r\n\t\t/*\r\n\t\t*\tCreate subfolder upload\r\n\t\t*/\r\n\r\n\t\t$this->main->check_upload();\r\n\r\n\t}",
"protected function _Load_Helpers() {\r\n $dir = untrailingslashit( plugin_dir_path(__FILE__ ) );\r\n // Recurssively load the directory\r\n $this->_Recusive_Load_Dir($dir.'/helpers');\r\n // Fire the shortcode init action\r\n do_action('vcff_supports_helper_init',$this);\r\n }",
"public function testUpdateSupplierGroup()\n {\n }",
"protected function afterUpdating()\n {\n }",
"public function safeUp()\n\t{\n\t\tif (!craft()->db->columnExists('sections_i18n', 'enabledByDefault'))\n\t\t{\n\t\t\t$this->addColumnAfter('sections_i18n', 'enabledByDefault', array('column' => ColumnType::Bool, 'default' => 1), 'locale');\n\t\t\tCraft::log('Successfully added the sections_i18n.enabledByDefault column.', LogLevel::Info, true);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tCraft::log('The sections_i18n.enabledByDefault column already exists.', LogLevel::Info, true);\n\t\t}\n\n\t\treturn true;\n\t}",
"public function prepareUpdate() {\n $this->connection->update($this->mapTable)\n ->fields(array('needs_update' => MigrateMap::STATUS_NEEDS_UPDATE))\n ->execute();\n }",
"public function maybe_update_time_passes_table() {\n global $wpdb;\n\n $current_version = get_option( 'laterpay_version' );\n if ( version_compare( $current_version, '0.9.11.4', '<' ) ) {\n return;\n }\n\n $table = $wpdb->prefix . 'laterpay_passes';\n $columns = $wpdb->get_results( 'SHOW COLUMNS FROM ' . $table .';' );\n\n // before version 0.9.10 we have 'title_color', 'description_color', 'background_color',\n // and 'background_path' columns that we will remove\n $is_up_to_date = true;\n $removed_columns = array(\n 'title_color',\n 'description_color',\n 'background_color',\n 'background_path',\n );\n\n $is_deleted_flag_present = false;\n\n foreach ( $columns as $column ) {\n if ( in_array( $column->Field, $removed_columns ) ) {\n $is_up_to_date = false;\n }\n if ( $column->Field === 'is_deleted' ) {\n $is_deleted_flag_present = true;\n }\n }\n\n $this->logger->info(\n __METHOD__,\n array(\n 'current_version' => $current_version,\n 'is_up_to_date' => $is_up_to_date,\n 'is_deleted_flag_present' => $is_deleted_flag_present,\n )\n );\n\n // if the table needs an update\n if ( ! $is_up_to_date ) {\n $wpdb->query( 'ALTER TABLE ' . $table . ' DROP title_color, DROP description_color, DROP background_color, DROP background_path;' );\n }\n\n // if need to add is_deleted field\n if ( ! $is_deleted_flag_present ) {\n $wpdb->query( 'ALTER TABLE ' . $table . ' ADD `is_deleted` int(1) NOT NULL DEFAULT 0;' );\n }\n }",
"public function safeUp()\n {\n craft()->db\n ->createCommand()\n ->addColumn(\n 'freeform_forms',\n 'color',\n [\n ColumnType::Varchar,\n 'length' => 7,\n 'required' => false,\n ]\n );\n\n $formIds = craft()->db\n ->createCommand()\n ->select('id, layoutJson')\n ->from('freeform_forms')\n ->queryAll();\n\n foreach ($formIds as $form) {\n $id = $form['id'];\n $layoutJson = $form['layoutJson'];\n\n $color = '#' . substr(md5($id), 0, 6);\n\n $layout = json_decode($layoutJson, true);\n if (!isset($layout['composer']['properties']['form']['color'])) {\n $layout['composer']['properties']['form']['color'] = $color;\n }\n\n $updatedLayoutJson = json_encode($layout);\n\n craft()->db\n ->createCommand()\n ->update(\n 'freeform_forms',\n [\n 'color' => $color,\n 'layoutJson' => $updatedLayoutJson,\n ],\n 'id = :id',\n ['id' => $id]\n );\n }\n\n return true;\n }",
"function finalizeModuleUpgrade() {\n $modules_table = TABLE_PREFIX . 'modules';\n $config_options_table = TABLE_PREFIX . 'config_options';\n\n try {\n\n // Remove merged modules\n DB::execute(\"DELETE FROM $modules_table WHERE name IN (?)\", array('incoming_mail', 'milestones', 'mobile_access', 'resources'));\n\n // Update incoming mail related settings\n DB::execute(\"UPDATE $config_options_table SET module = ? WHERE module = ?\", 'system', 'incoming_mail');\n\n // Uninstall backup module\n DB::execute(\"DELETE FROM $modules_table WHERE name = ?\", 'backup');\n DB::execute(\"DELETE FROM $config_options_table WHERE module = ?\", 'backup');\n\n // Enable only first party modules\n DB::execute(\"DELETE FROM $modules_table WHERE name NOT IN (?)\", array('system', 'discussions', 'milestones', 'files', 'todo', 'calendar', 'notebooks', 'tasks', 'tracking', 'project_exporter', 'status', 'documents', 'source', 'invoicing'));\n DB::execute(\"UPDATE $modules_table SET is_enabled = ?\", true);\n } catch(Exception $e) {\n return $e->getMessage();\n } // try\n\n return true;\n }",
"public function safeUp()\n\t{\n\t\tif (!craft()->db->columnExists('plugins', 'licenseKey'))\n\t\t{\n\t\t\tCraft::log('Adding licenseKey column to plugins table', LogLevel::Info, true);\n\t\t\t$this->addColumnAfter('plugins', 'licenseKey', array('column' => ColumnType::Char, 'length' => 24), 'schemaVersion');\n\t\t\tCraft::log('Done adding licenseKey column to plugins table.', LogLevel::Info, true);\n\t\t}\n\n\t\tif (!craft()->db->columnExists('plugins', 'licenseKeyStatus'))\n\t\t{\n\t\t\tCraft::log('Adding licenseKeyStatus column to plugins table', LogLevel::Info, true);\n\t\t\t$this->addColumnAfter('plugins', 'licenseKeyStatus', array('column' => ColumnType::Enum, 'values' => array('valid', 'invalid', 'mismatched', 'unknown'), 'default' => 'unknown', 'null' => false), 'licenseKey');\n\t\t\tCraft::log('Done adding licenseKeyStatus column to plugins table.', LogLevel::Info, true);\n\t\t}\n\n\t\treturn true;\n\t}",
"private function _after_install() {\n global $COURSE, $DB;\n \n if(!$this->_found) { // if the block's instance hasn't been cached\n // lookup the DB to check if this block instance already exists\n $result = $DB->get_record('block_group_choice', array('course_id' => $COURSE->id, 'instance_id' => $this->instance->id));\n if($result) { // if the block's instance already exist in the DB\n $this->_found = true;\n }\n else { // if this block instance doesn't exist we insert a first set of preferences\n $entries = new stdClass();\n $entries->instance_id = $this->instance->id;\n $entries->course_id = $COURSE->id;\n $entries->showgroups = 1;\n $entries->maxmembers = 2;\n $entries->allowchangegroups = 0;\n $entries->allowstudentteams = 1;\n $entries->allowmultipleteams = 0;\n $DB->insert_record('block_group_choice', $entries);\n }\n }\n }",
"private function detect_helper() {\n\t\t$result = $this->wpdb->get_var( \"SELECT COUNT(*) AS `count` FROM {$this->wpdb->postmeta} WHERE meta_key LIKE '_aioseop_%'\" );\n\t\tif ( $result === '0' ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}",
"public function updateHelpRequests($helper_id, $request_help_id, $tag) {\n\t\t\n\t\tif($tag == 'help_request_add'){\n\t\t$combosAlreadyMade = $this->checkHelpRequests($helper_id, $request_help_id);\n\t\t\n\t\tif($combosAlreadyMade == 'Exists'){\n\t\t\treturn 'Exists';\n\t\t}\n\t\t}\n\t\t\n\t\tif ($tag == 'help_request_add') {\n\t\t\t$query = \" \n\t\t\t\tINSERT INTO help_requests ( \n\t\t\t\t\thelper_id, \n\t\t\t\t\trequest_help_id\n\t\t\t\t) VALUES ( \n\t\t\t\t\t:helper_id, \n\t\t\t\t\t:request_help_id\n\t\t\t\t) \n\t\t\t\t\"; \n\t\t} else if ($tag == 'help_request_remove') {\n\t\t\t$query = \" \n\t\t\tDELETE FROM help_requests\n\t\t\tWHERE helper_id = :helper_id and request_help_id = :request_help_id\n\t\t\t\t\"; \n\t\t}\n\t\t\n\t\telse if ($tag == 'requests_remove_all') {\n\t\t\t$query = \" \n\t\t\tDELETE FROM help_requests\n\t\t\tWHERE helper_id = :helper_id\n\t\t\t\t\"; \n\t\t}\n\t\telse if ($tag == 'requests_select') {\n\t\t\t$query = \" \n\t\t\tselect * FROM help_requests\n\t\t\tWHERE helper_id = :helper_id\n\t\t\t\t\"; \n\t\t}\n\t\ttry \n { \n $stmt = $this->_db->prepare($query); \n\t\t\t\n\t\t\t$stmt->bindValue(':helper_id',$helper_id);\n\t\t\t\n\t\t\tif ($tag != 'requests_remove_all' and $tag != 'requests_select') {\n\t\t\t\t$stmt->bindValue(':request_help_id',$request_help_id);\n\t\t\t}\n $stmt->execute(); \n\t\t\tif ($tag == 'requests_select') {\n\t\t\t\t$result = $stmt->fetchAll();\n\t\t\t\treturn $result;\n\t\t\t}\n } \n catch(PDOException $ex) \n { \n\t\t\t$h = $ex->getMessage ();\n die($h); \n }\n\n\t\t\n\t\t\n }",
"public function updateNecessary(): bool\n {\n $upgradeApi = GeneralUtility::makeInstance(UpgradeApi::class);\n $elementCount = 0;\n $tables = explode(',', self::TABLES);\n foreach ($tables as $table) {\n if (!isset($this->tableFields[$table])) {\n continue;\n }\n $fields = $this->tableFields[$table];\n foreach ($fields as $field) { \n $elementCount += \n $upgradeApi->countOfTableFieldMigrations(\n $table,\n $field, \n $field . '_uid', \n ParameterType::STRING,\n \\PDO::PARAM_INT\n );\n if ($elementCount > 0) {\n break;\n }\n }\n if ($elementCount > 0) {\n break;\n }\n }\n return ($elementCount > 0);\n }",
"public function run()\n {\n ShortcutKey::query()->truncate();\n DB::table('shortcut_keys')->insert([\n [\n 'user_id' => '1',\n 'defaultShortcuts' => 'a:7:{s:13:\"productSearch\";a:3:{s:11:\"action_name\";s:13:\"productSearch\";s:12:\"shortcut_key\";s:6:\"ctrl+s\";s:6:\"status\";b:1;}s:8:\"holdCard\";a:3:{s:11:\"action_name\";s:8:\"holdCard\";s:12:\"shortcut_key\";s:6:\"ctrl+h\";s:6:\"status\";b:1;}s:3:\"pay\";a:3:{s:11:\"action_name\";s:3:\"pay\";s:12:\"shortcut_key\";s:6:\"ctrl+p\";s:6:\"status\";b:1;}s:11:\"addCustomer\";a:3:{s:11:\"action_name\";s:11:\"addCustomer\";s:12:\"shortcut_key\";s:6:\"ctrl+a\";s:6:\"status\";b:1;}s:14:\"cancelCarditem\";a:3:{s:11:\"action_name\";s:14:\"cancelCarditem\";s:12:\"shortcut_key\";s:6:\"ctrl+d\";s:6:\"status\";b:1;}s:13:\"loadSalesPage\";a:3:{s:11:\"action_name\";s:13:\"loadSalesPage\";s:12:\"shortcut_key\";s:6:\"ctrl+l\";s:6:\"status\";b:1;}s:12:\"donePayment1\";a:3:{s:11:\"action_name\";s:12:\"donePayment1\";s:12:\"shortcut_key\";s:6:\"ctrl+m\";s:6:\"status\";b:1;}}',\n 'customShortcuts' => Null,\n 'created_by'=>1,\n 'shortcutsStatus'=>1,\n\n ],\n ]);\n }",
"protected function registerHelpers() {\r\n $this->service\r\n ->sharedData()\r\n ->set('appHelper', array(\r\n 'absotuleUri' => $this->request->server()->exists('HTTPS') ? \"https://{$this->request->server()->get('SERVER_NAME')}/{$this->request->uri()}\" : \"http://{$this->request->server()->get('SERVER_NAME')}/{$this->request->uri()}\",\r\n ));\r\n }",
"function myPear_update11(){\n myPear_db()->qquery(\"UPDATE zzz_avatars SET av_address = '' WHERE (av_address != '' AND av_address IS NOT NULL)\",1);\n if (!myPear_db()->columnExists('av_zip','zzz_avatars')){\n myPear_db()->qquery(\"ALTER TABLE `zzz_avatars` ADD `av_zip` VARCHAR( 132 ) NOT NULL DEFAULT '' AFTER `av_address`\"); \n myPear_db()->reset_cache();\n }\n if (!myPear_db()->columnExists('l_class','zzz_lists')){\n myPear_db()->qquery(\"ALTER TABLE `zzz_lists` ADD `l_class` VARCHAR( 64 ) NOT NULL AFTER `l_parent`\",1);\n myPear_db()->qquery(\"ALTER TABLE `zzz_units` ADD `u_class` VARCHAR( 64 ) NOT NULL AFTER `u_parent`\",1); \n myPear_db()->reset_cache();\n } \n}",
"public function add_chips_to_admin($chips)\n {\n $sql=\"UPDATE admin SET admin_chips=admin_chips+$chips where admin_id=1\";\n return $this->db->query($sql);\n }"
]
| [
"0.59207535",
"0.5678665",
"0.55026263",
"0.53104615",
"0.5232378",
"0.52070856",
"0.5170452",
"0.5124988",
"0.51126915",
"0.50581384",
"0.5056871",
"0.50312257",
"0.5025955",
"0.5021511",
"0.50185174",
"0.5012625",
"0.49745548",
"0.49740693",
"0.49525017",
"0.4948488",
"0.49447998",
"0.4925585",
"0.491524",
"0.4912768",
"0.48891926",
"0.48849425",
"0.48786485",
"0.4860076",
"0.48600677",
"0.48470217"
]
| 0.6236805 | 0 |
Check help_requests table for existing request | public function checkHelpRequests($helper_id, $request_help_id ){
$query = "
SELECT * FROM help_requests
WHERE helper_id = :helper_id and request_help_id = :request_help_id
";
$stmt = $this->_db->prepare($query);
$stmt->bindValue(':helper_id',$helper_id);
$stmt->bindValue(':request_help_id',$request_help_id);
$stmt->execute();
$result = $stmt->fetchAll();
if($stmt->rowCount() > 0){
return 'Exists';
}
else {
return;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function updateHelpRequests($helper_id, $request_help_id, $tag) {\n\t\t\n\t\tif($tag == 'help_request_add'){\n\t\t$combosAlreadyMade = $this->checkHelpRequests($helper_id, $request_help_id);\n\t\t\n\t\tif($combosAlreadyMade == 'Exists'){\n\t\t\treturn 'Exists';\n\t\t}\n\t\t}\n\t\t\n\t\tif ($tag == 'help_request_add') {\n\t\t\t$query = \" \n\t\t\t\tINSERT INTO help_requests ( \n\t\t\t\t\thelper_id, \n\t\t\t\t\trequest_help_id\n\t\t\t\t) VALUES ( \n\t\t\t\t\t:helper_id, \n\t\t\t\t\t:request_help_id\n\t\t\t\t) \n\t\t\t\t\"; \n\t\t} else if ($tag == 'help_request_remove') {\n\t\t\t$query = \" \n\t\t\tDELETE FROM help_requests\n\t\t\tWHERE helper_id = :helper_id and request_help_id = :request_help_id\n\t\t\t\t\"; \n\t\t}\n\t\t\n\t\telse if ($tag == 'requests_remove_all') {\n\t\t\t$query = \" \n\t\t\tDELETE FROM help_requests\n\t\t\tWHERE helper_id = :helper_id\n\t\t\t\t\"; \n\t\t}\n\t\telse if ($tag == 'requests_select') {\n\t\t\t$query = \" \n\t\t\tselect * FROM help_requests\n\t\t\tWHERE helper_id = :helper_id\n\t\t\t\t\"; \n\t\t}\n\t\ttry \n { \n $stmt = $this->_db->prepare($query); \n\t\t\t\n\t\t\t$stmt->bindValue(':helper_id',$helper_id);\n\t\t\t\n\t\t\tif ($tag != 'requests_remove_all' and $tag != 'requests_select') {\n\t\t\t\t$stmt->bindValue(':request_help_id',$request_help_id);\n\t\t\t}\n $stmt->execute(); \n\t\t\tif ($tag == 'requests_select') {\n\t\t\t\t$result = $stmt->fetchAll();\n\t\t\t\treturn $result;\n\t\t\t}\n } \n catch(PDOException $ex) \n { \n\t\t\t$h = $ex->getMessage ();\n die($h); \n }\n\n\t\t\n\t\t\n }",
"private function _hookup_request_exists($request_id)\n {\n $request = $this->get_hookup_request($request_id)->row_object(); #Get the hookup request\n return isset($request);\n }",
"public function RequestrExists($requestId)\n\t{\n\t\t$query = sprintf(\"select id from [|PREFIX|]order_review_request where id='%d'\", $GLOBALS['ISC_CLASS_DB']->Quote($requestId));\n\t\t$result = $GLOBALS['ISC_CLASS_DB']->Query($query);\n\n\t\tif ($row = $GLOBALS['ISC_CLASS_DB']->Fetch($result)) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"public function exists($request)\n {\n $request_hash = $this->hash_request($request);\n $result = $this->_db->find('first', array('conditions' => array('request_hash' => $request_hash), 'fields' => array('id')));\n\n if (!empty($result)) {\n return true;\n } else {\n return false;\n }\n }",
"private\n function checkWorklistRequest(Request $request)\n {\n $this->validate($request, [\n 'companyId' => 'required|integer|exists:companies,id',\n 'workflowType' => 'required|max:10',\n 'requestId' => 'required|integer',\n 'requesterId' => 'required|max:20'\n ]);\n }",
"private function checkLookupRequest(Request $request)\n {\n $this->validate($request, [\n 'companyId' => 'required|integer|exists:companies,id',\n 'effBegin' => 'required|date',\n 'effEnd' => 'required|date|after_or_equal:effBegin',\n 'lovLtyp' => 'required|max:10',\n 'lovLook1' => 'required|max:20',\n 'lovLook2' => 'nullable|max:20',\n 'lovLook3' => 'nullable|max:20',\n 'lovLook4' => 'nullable|max:20',\n 'lovLook5' => 'nullable|max:20',\n 'description' => 'nullable|max:255',\n 'name' => 'required|max:50',\n 'code' => 'required|max:20|alpha_dash'\n ]);\n }",
"public function isExistingPreparedRequest($id_request, $dbIndex) {\n $exists = false;\n $con = $this->connect_to_db($dbIndex);\n $sql = \"SELECT count(id_request) AS value FROM prepared_request WHERE id_request=$id_request\";\n if (!$req = mysqli_query($con, $sql)) {\n $this->log->LogError(\"ListTypes : Impossible d'effectuer la requete\\n\".$sql .mysqli_error());\n throw new ListTypesNoModelsFoundException(\"can't make the request (table not found ?)\",2);\n exit(1);\n }\n $res = mysqli_fetch_assoc($req);\n if ($res['value'] == 1) {\n $exists = true;\n $this->log->LogDebug(\"ListTypes : la request preparee $id_request existe\");\n }\n mysqli_free_result($req);\n mysqli_close($con);\n return $exists;\n }",
"public static function checkRequest()\n {\n $conn = Db::getConnection();\n $statement = $conn->prepare(\"SELECT * from buddie_request WHERE receiver= '\" . $_SESSION['user_id'] . \"'\");\n $statement->execute();\n if ($statement->rowCount() > 0) {\n return true;\n } else {\n return false;\n }\n }",
"function exists_request_file($request_id,$file_id)\n\t{\n\t\t$this->db->select('id');\t\t\n\t\t$this->db->from('lic_file_downloads');\t\t\n\t\t$this->db->where('requestid',$request_id);\t\t\n\t\t$this->db->where('fileid',$file_id);\t\t\n\t\tif ($this->db->count_all_results() > 0)\n\t\t{\n\t\t\treturn TRUE;\n\t\t}\n\t\treturn FALSE;\n\t}",
"public function hasRequest(): bool;",
"public function hasRequest(): bool;",
"function check_requirements()\n\t{\n\t\t$sql_obj\t\t= New sql_query;\n\t\t$sql_obj->string\t= \"SELECT id FROM users WHERE id='\". $this->id .\"'\";\n\t\t$sql_obj->execute();\n\n\t\tif (!$sql_obj->num_rows())\n\t\t{\n\t\t\tlog_write(\"error\", \"page_output\", \"The requested user (\". $this->id .\") does not exist - possibly the user has been deleted.\");\n\t\t\treturn 0;\n\t\t}\n\n\t\tunset($sql_obj);\n\n\n\t\treturn 1;\n\t}",
"public function valid()\n {\n return !is_null(key($this->requests));\n }",
"public function existsRequestToken()\n {\n // load token\n $store = $this->getStore();\n $type = $store->loadToken($this);\n\n // get consumer\n $this->_consumer = call_user_func($this->_get_consumer_handler, $store->getConsumerKey());\n\n // return result\n if ($type=='request') {\n return true;\n }\n return false;\n }",
"function is_lti_request() {\n $good_message_type = $_REQUEST[\"lti_message_type\"] == \"basic-lti-launch-request\";\n $good_lti_version = $_REQUEST[\"lti_version\"] == \"LTI-1p0\";\n $resource_link_id = $_REQUEST[\"resource_link_id\"];\n if ($good_message_type and $good_lti_version and isset($resource_link_id) ) return(true);\n return false;\n}",
"public function confirm_hookup_request($request_id)\n {\n $this->db->set(TBL_HOOKUPS.'.request_id',$request_id);\n return $this->db->insert(TBL_HOOKUPS);\n }",
"public function checkRegistryRequestsAnswers()\n {\n\n if (! $this->organizationId) {\n if ($this->respondent) {\n $this->organizationId = $this->respondent->getOrganizationId();\n }\n if (! $this->organizationId) {\n $this->organizationId = $this->request->getParam(\\MUtil_Model::REQUEST_ID2);\n }\n }\n\n if ($this->organizationId && (! $this->respondentId)) {\n if ($this->respondent) {\n $this->respondentId = $this->respondent->getId();\n }\n if (! $this->respondentId) {\n $this->respondentId = $this->util->getDbLookup()->getRespondentId(\n $this->request->getParam(\\MUtil_Model::REQUEST_ID1),\n $this->organizationId\n );\n }\n }\n\n return $this->organizationId && $this->respondentId && $this->db && $this->model;\n }",
"public function checkInstalled() {\n $query = $this->db->query(sprintf('SHOW TABLES LIKE \"%s\"',\n Config::getTableName('requests')));\n $request_table_result = $query->rowCount();\n\n $query = $this->db->query(sprintf('SHOW TABLES LIKE \"%s\"',\n Config::getTableName('users')));\n $user_table_result = $query->rowCount();\n\n if ($request_table_result > 0 || $user_table_result > 0) {\n return true;\n } else {\n return false;\n }\n }",
"private\n function checkAnswerRequest(Request $request)\n {\n $this->validate($request, [\n 'companyId' => 'required|integer|exists:companies,id',\n 'workflowId' => 'required|integer',\n 'answer' => 'required|max:1'\n ]);\n }",
"private function checkIsExists(): bool\n {\n $id = $this->readImproved([\n 'what' => [$this->table. '.id'],\n 'where' => [\n $this->table. '.listId' => $this->listId,\n $this->table. '.campaignId' => $this->campaignId,\n ]\n ]);\n\n return !is_null($id);\n }",
"public function CheckAdminEmailExist(Request $request) {\n $email = $request->email_address;\n\n $id = $request->id;\n if ($id != '') {\n $EmailResArray = DB::table('tbl_adminuser')->where('email_address', '=', $email)->where('id', '!=', $id)->first();\n } else {\n $EmailResArray = DB::table('tbl_adminuser')->where('email_address', '=', $email)->first();\n }\n\n if (count($EmailResArray) > 0) {\n echo '1';\n die;\n } else {\n echo '0';\n die;\n }\n }",
"public function hasRequest(string $name): bool {}",
"function requirement_name_exists( $project_id, $req_name ) {\n\n\tglobal $db;\n\t$tbl_req \t\t\t\t\t= REQ_TBL;\n\t$f_req_proj_id\t\t\t\t= $tbl_req .\".\". REQ_PROJECT_ID;\n\t$f_req_id \t\t\t\t\t= $tbl_req .\".\". REQ_ID;\n\t$f_req_filename \t\t\t= $tbl_req .\".\". REQ_FILENAME;\n\n\t$query = \"\tSELECT COUNT($f_req_filename)\n\t\t\t\tFROM $tbl_req\n\t\t\t\tWHERE $f_req_filename='$req_name'\n\t\t\t\t\tAND $f_req_proj_id=$project_id\";\n\n\t$result = db_get_one( $db, $query );\n\n\tif ( $result == 0 ) {\n\t\treturn false;\n\t} else {\n\t\treturn true;\n\t}\n}",
"private function checkAssignmentReasonRequest(Request $request)\n {\n $this->validate($request, [\n 'companyId' => 'required|integer|exists:companies,id',\n 'effBegin' => 'required|date|before_or_equal:effEnd',\n 'effEnd' => 'required|date',\n 'code' => 'required|max:20|alpha_num',\n 'description' => 'present|max:255',\n 'lovActy' => 'required|max:10|exists:lovs,key_data'\n ]);\n }",
"private\n function checkForwardRequest(Request $request)\n {\n $this->validate($request, [\n 'companyId' => 'required|integer|exists:companies,id',\n 'workflowId' => 'required|integer',\n 'approverId' => 'required|max:20'\n ]);\n }",
"protected function has_request( $key = '' ) {\n\t\treturn $this->has( $key, 'REQUEST' );\n\t}",
"function check_requirements()\n\t{\n\t\t$sql_obj\t\t= New sql_query;\n\t\t$sql_obj->string\t= \"SELECT id FROM services WHERE id='\". $this->id .\"' LIMIT 1\";\n\t\t$sql_obj->execute();\n\n\t\tif (!$sql_obj->num_rows())\n\t\t{\n\t\t\tlog_write(\"error\", \"page_output\", \"The requested service (\". $this->id .\") does not exist - possibly the service has been deleted.\");\n\t\t\treturn 0;\n\t\t}\n\n\t\tunset($sql_obj);\n\n\t\treturn 1;\n\t}",
"public function checkPermission(\\App\\Request $request)\n\t{\n\t\tif (!\\App\\User::getCurrentUserModel()->isAdmin() || !$request->has('record')) {\n\t\t\tthrow new \\App\\Exceptions\\NoPermittedForAdmin('LBL_PERMISSION_DENIED');\n\t\t}\n\t}",
"public function hasRequest($requestName) {\n \n $r = $this->requestMapper->uriToRequest($requestName);\n return $this->commandConfig->hasRequest($r);\n \n }",
"abstract protected function checkExistingResponse();"
]
| [
"0.6180808",
"0.58976334",
"0.58936745",
"0.58855444",
"0.5875356",
"0.5729869",
"0.5626661",
"0.56181514",
"0.55960053",
"0.55850476",
"0.55850476",
"0.541711",
"0.5380878",
"0.5359403",
"0.5348564",
"0.53327745",
"0.53033966",
"0.52853775",
"0.5236666",
"0.5232295",
"0.51967967",
"0.5171044",
"0.516716",
"0.51568615",
"0.5156221",
"0.5153597",
"0.5150572",
"0.5142639",
"0.5137611",
"0.5132238"
]
| 0.7164381 | 0 |
Get the game repository. | public function getGameRepository()
{
if (!$this->gameRepository) {
$this->setGameRepository($this->getEntityManager()->getRepository('Game\Entity\Game'));
}
return $this->gameRepository;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getRepo()\n {\n return $this->repo;\n }",
"public static function getRepository()\n {\n if (is_null(static::$repository)) {\n static::$repository = static::buildRepository();\n }\n\n return static::$repository;\n }",
"protected function getRepository() {\n\t\tif ($this->_repository === null) {\n\t\t\t$this->_repository = new AGitRepository();\n\t\t\t$this->_repository->setPath($this->path,true,true);\n\t\t\t$this->assertTrue(file_exists($this->path));\n\t\t}\n\t\treturn $this->_repository;\n\t}",
"public function getRepository();",
"public static function make(): GamePlayRepository\n {\n return new static(new GamePlay);\n }",
"protected function getRepository()\n {\n return $this->repository;\n }",
"public function get_repo_data(){\n\n\t\t\treturn $this->get_repo();\n\n\t\t}",
"public function repository()\n {\n return Repository::i();\n }",
"private function getGame() {\n if (!isset($this->params['game'])) {\n DooUriRouter::redirect(Doo::conf()->APP_URL);\n return FALSE;\n }\n\n $key = $this->params['game'];\n $game = new SnGames();\n\t\t$url = Url::getUrlByName($key, URL_GAME);\n\n\t\tif ($url) {\n\t\t\t$game->ID_GAME = $url->ID_OWNER;\n\t\t} else {\n\t\t\tDooUriRouter::redirect(Doo::conf()->APP_URL);\n\t\t\treturn FALSE;\n\t\t}\n\n $game = $game->getOne();\n\n return $game;\n }",
"public function getRepository()\n {\n return $this->repository;\n }",
"public function getRepository()\n {\n return $this->repository;\n }",
"public function getRepository()\n {\n return $this->repository;\n }",
"public function getRepository()\n {\n return $this->repository;\n }",
"public function getRepository()\n {\n return $this->repository;\n }",
"public function getRepository()\n {\n return $this->repository;\n }",
"public abstract function getRepository();",
"protected function getRepository() {}",
"public function getRepository(){\n return $this->repository;\n }",
"public function getRepository()\n {\n return $this->manager->getRepository($this->class);\n }",
"abstract public function getRepository();",
"abstract public function getRepository();",
"public function getGame(): Game\n {\n return $this->client->getGame($this->gameVersion->getGameId());\n }",
"public function getRepository() : RepositoryInterface {\n\n if(null === $this->repository) {\n\n $quizModuleService = new ModuleService(new Meta(), new View());\n $this->repository = new Repository($this->getConfig(), $quizModuleService);\n }\n\n return $this->repository;\n }",
"abstract protected function getRepository();",
"public function getRepository(): SourceRepo\n {\n return $this->repository;\n }",
"protected function getLocalRepository()\n {\n if (!$this->localRepo){\n $this->localRepo = new InstalledFilesystemRepository(\n new JsonFile(\n $this->composer->getConfig()->get(\"vendor-dir\") . \"/composer/installed_extra.json\"\n )\n );\n }\n\n return $this->localRepo;\n }",
"public function getRepository()\n {\n return $this->getEntityManager()->getRepository($this->getEntityClassName());\n }",
"public function getResourceRepository() {\n\t\tif ($this->resourceRepository === null) {\n\t\t\t$this->resourceRepository = $this->getPuliFactory()->createRepository();\n\t\t}\n\n\t\treturn $this->resourceRepository;\n\t}",
"private function getCardRepository()\n {\n $repository = $this->entityManager->getRepository('AppBundle:Card');\n return $repository;\n }",
"public function getRepository()\n {\n return $this->getMondongo()->getRepository('WikiTemp');\n }"
]
| [
"0.6835937",
"0.68132406",
"0.68061304",
"0.6754571",
"0.6751498",
"0.67270786",
"0.669591",
"0.6689973",
"0.6679487",
"0.6665942",
"0.6665942",
"0.6665942",
"0.6665942",
"0.6665942",
"0.6665942",
"0.6649803",
"0.65772676",
"0.65682507",
"0.65501386",
"0.6501997",
"0.6501997",
"0.64526093",
"0.64316034",
"0.6327011",
"0.6297133",
"0.6229571",
"0.6215904",
"0.61794275",
"0.6178238",
"0.6175484"
]
| 0.800295 | 0 |
Set the game repository. | public function setGameRepository($gameRepository)
{
$this->gameRepository = $gameRepository;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setRepositories() {\n }",
"public function setRepository($repository)\n {\n $this->repository = $repository;\n }",
"public function setStore(Repository $store): void\n {\n $this->store = $store;\n }",
"protected function initRepository()\n {\n $this->repository = new Repository([\n 'name' => 'vendor/name',\n 'description' => '✈️The package is a ThinkSNS+ package.',\n 'type' => 'library',\n 'license' => 'MIT',\n 'require' => [\n 'php' => '>=7.1.3',\n ],\n 'autoload' => [],\n 'config' => [\n 'sort-packages' => true,\n ],\n ]);\n }",
"public function set_needed_repos(): void {}",
"public function set_needed_repos(): void {}",
"public function setRepository(/*string*/ $value) /*: this*/ {\n $this->repository = $value;\n return $this;\n }",
"public function init_repo() {\n\n\t\t\t// we don't need to maintain local repos for slim deploys\n\t\t\tif ( SLIM ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// if the repo is already initialised, we don't need to\n\t\t\tif ( is_dir( \"wpd-repos/{$this->config->repo[ 'name' ]}/.git\" ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t// store the directory we're in right now, so we can come back\n\t\t\t$original_dir = getcwd();\n\n\t\t\t// switch the repo's directory\n\t\t\tchdir( \"wpd-repos/{$this->config->repo[ 'name' ]}\" );\n\n\t\t\t// initialise git\n\t\t\texec( 'git init' );\n\n\t\t\t// add the remote repo as a remote called origin\n\t\t\texec( \"git remote add origin \" . $this->config->repo[ 'git_url' ] );\n\n\t\t\t// switch back to the original directory\n\t\t\tchdir( $original_dir );\n\t\t}",
"public function initRepository(): void;",
"function setGame( &$game )\r\n {\r\n if ( is_a( $game, \"eZQuizGame\" ) )\r\n $this->Game = $game;\r\n }",
"private function registerRepository(){\n $this->dataSources = array(\n 1=>new DataSourceIRC61647(),\n );\n }",
"public function set_game()\n {\n $player = Player::findOrFail(Input::json('player_id'));\n $game = Game::findOrFail(Input::json('game_id'));\n\n if (Input::json('playing') && !$player->games->contains($game->id)) {\n $player->games()->attach($game->id, ['created_at' => DB::raw('now()'), 'updated_at' => DB::raw('now()')]);\n }\n else {\n $player->games()->detach($game->id);\n }\n }",
"public function setRepository(string $repository, $instance) :void\n {\n $this->repositories[$repository] = $instance;\n }",
"public function load_repository(&$repo, $name) {\n // First determine if the class file exisits\n $path = @$repo['path'];\n $conf = array();\n\n if (file_exists($path . '/settings.php')) {\n // Override with repository specific data\n include($path . '/settings.php');\n }\n\n $repo = array_merge($conf, $repo);\n if (!isset($repos['data'])||!is_object($repo['data'])) $repo['data'] = $this->load_provider($repo, $path, $name);\n\n }",
"public function set_path() {\n\t\t\t\n\t\t\t// pick up the path types\n\t\t\t$path_types = include_once(CONFIGPATH . 'path-types.php' );\n\n\t\t\t// get the base path for the deploy type\n\t\t\t$base_path = $path_types[ $this->repo[ 'type' ] ];\n\n\t\t\t// check if it is a valid path\n\t\t\t$this->is_path_valid( $base_path );\n\n\t\t\t// append the repositories name to get the final deploy path\n\t\t\t$this->repo[ 'path' ] = $base_path . '/' . $this->repo[ 'name' ];\n\t\t}",
"private function initRepositories(): void {\n $this->usersRepository = new UsersRepository();\n }",
"public function getGameRepository()\n {\n if (!$this->gameRepository) {\n $this->setGameRepository($this->getEntityManager()->getRepository('Game\\Entity\\Game'));\n }\n return $this->gameRepository;\n }",
"public function setRepository(EntityRepository $repository)\n {\n $this->repository = $repository;\n }",
"private function setCustomRepositories()\n {\n $em = $this->getDoctrine()->getManager();\n $this->frontRepository = new FrontRepository($em);\n }",
"protected function setRepositoryBindings()\n\t{\n\t\t$this->aliases = $this->app['config']['app.aliases'];\n\n\t\t// Set the items being bound\n\t\t$bindings = ['Comment', 'Goal', 'Plan', 'Stat'];\n\n\t\tforeach ($bindings as $binding)\n\t\t{\n\t\t\t$this->bindRepository($binding);\n\t\t}\n\t}",
"protected function getRepository() {}",
"public static function make(): GamePlayRepository\n {\n return new static(new GamePlay);\n }",
"public function setRepo($user, $repo)\n {\n $this->apibase = \"https://api.github.com/repos/$user/$repo/\";\n }",
"public function init_repo() {\n\n\t\t\t// include the repository configuration\n\t\t\t$repos = include_once(CONFIGPATH . 'repositories.php' );\n\n\t\t\t// the $_GET['deploy'] parameter from request\n\t\t\t$requested_deploy = filter_input( \\INPUT_GET, 'deploy', \\FILTER_SANITIZE_STRING );\n\n\t\t\t// assume that no repository is selected for deployment\n\t\t\t$selected = false;\n\n\t\t\t// if no deploy param was found, maybe pick up the first (and often, only) repository config\n\t\t\tif ( empty( $requested_deploy ) ) {\n\n\t\t\t\t$selected = $this->maybe_select_deploy( $repos[ 0 ], $requested_deploy );\n\n\t\t\t// otherwise, loop through repositories to select the requested one\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\tforeach ( $repos as $deploy_config ) {\n\n\t\t\t\t\t$selected = $this->maybe_select_deploy( $deploy_config, $requested_deploy );\n\n\t\t\t\t\t// if we found one, break the loop\n\t\t\t\t\tif ( $selected === true ) {\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// we didn't find any, throw an error\n\t\t\tif ( $selected === false ) {\n\t\t\t\terror(\n\t\t\t\t\t'501 Not Implemented', 'Configuration not found for the requested deploy'\n\t\t\t\t);\n\t\t\t}\n\t\t}",
"public function setRepository($var)\n {\n GPBUtil::checkString($var, True);\n $this->repository = $var;\n\n return $this;\n }",
"public function init() {\n $git_wrapper = new \\GitWrapper\\GitWrapper();\n if (file_exists($this->directory)) {\n $this->git = $git_wrapper->workingCopy($this->directory);\n $this->git->checkout($this->branch);\n }\n else {\n $this->git = $git_wrapper->cloneRepository($this->getRepositoryURL(), $this->directory, ['branch' => $this->branch]);\n }\n }",
"abstract protected function getRepository();",
"public function setGame($id){\n\t\t$this->game = new Game($id);\n\t}",
"private function set_game($iGame) {\r\n $this->game = $iGame;\r\n }",
"private function set_game($iGame) {\n $this->game = $iGame;\n }"
]
| [
"0.58705366",
"0.58612347",
"0.58441687",
"0.582995",
"0.5752099",
"0.5752099",
"0.5713818",
"0.5655421",
"0.5519581",
"0.54645926",
"0.5461204",
"0.5455026",
"0.54211634",
"0.54075104",
"0.53905654",
"0.5358484",
"0.53451365",
"0.53406084",
"0.53219634",
"0.5297242",
"0.52724475",
"0.523699",
"0.52255833",
"0.51876473",
"0.5171095",
"0.5124565",
"0.5107167",
"0.51046443",
"0.50894815",
"0.50881094"
]
| 0.7280576 | 0 |
Get the feed repository. | public function getFeedRepository()
{
if (!$this->feedRepository) {
$this->setFeedRepository($this->getEntityManager()->getRepository('Feed\Entity\Feed'));
}
return $this->feedRepository;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getFeedRepository()\n {\n if (null === $this->feedRepository)\n $this->feedRepository = $this->getEntityManager()->getRepository('\\Feed\\Entity\\Feed');\n return $this->feedRepository;\n }",
"public function getFeed()\n {\n return ($this->useCache() ? $this->getCachedFeed() : $this->makeFeed());\n }",
"public function getRepository();",
"protected function getRepository() {}",
"protected function getRepository()\n {\n return $this->repository;\n }",
"public function getRepository()\n {\n return $this->repository;\n }",
"public function getRepository()\n {\n return $this->repository;\n }",
"public function getRepository()\n {\n return $this->repository;\n }",
"public function getRepository()\n {\n return $this->repository;\n }",
"public function getRepository()\n {\n return $this->repository;\n }",
"public function getRepository()\n {\n return $this->repository;\n }",
"public abstract function getRepository();",
"public function getRepository(){\n return $this->repository;\n }",
"public function getFeed() {\n\t\t$this->fetchFeed();\n\t\t$this->populateCollection();\n\n\t\treturn $this->feed->getCollection();\n\t}",
"public function getRepository()\n {\n return $this->manager->getRepository($this->class);\n }",
"abstract public function getRepository();",
"abstract public function getRepository();",
"public function getRepository()\n {\n return $this->getMondongo()->getRepository('ChannelUpdate');\n }",
"public function getRepo()\n {\n return $this->repo;\n }",
"public function repository()\n {\n return Repository::i();\n }",
"abstract protected function getRepository();",
"public function get_feed()\n {\n }",
"public function getPremiumFeedRepository()\n {\n if (null === $this->premiumFeedRepository)\n $this->premiumFeedRepository = $this->getEntityManager()->getRepository('\\Feed\\Entity\\PremiumFeed');\n return $this->premiumFeedRepository;\n }",
"public static function getRepository()\n {\n if (is_null(static::$repository)) {\n static::$repository = static::buildRepository();\n }\n\n return static::$repository;\n }",
"public function get_repo_data(){\n\n\t\t\treturn $this->get_repo();\n\n\t\t}",
"public function retrieve_feed() {\n\t\t$url = $this->endpoint . $this->feed_id . '?format=json';\n\n\t\t$feed = $this->get_json_from_url( $url );\n\t\tif ( ! $feed ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn $feed->Releases;\n\t}",
"public function getFeed()\n {\n return (new Instagram($this))->getFeed();\n }",
"public function getRepository(): SourceRepo\n {\n return $this->repository;\n }",
"public function getFeed()\n\t{ \n // Set a default feed.\n $feed = 'http://api.flickr.com/services/feeds/photos_public.gne'; \n \n switch ($this->get('params')->get('source'))\n {\n case 'recent_photos':\n $feed = 'http://api.flickr.com/services/feeds/photos_public.gne';\n break;\n case 'user_photos':\n if ($this->get('params')->get('flickruser')) return 'http://api.flickr.com/services/feeds/photos_public.gne?id='.$this->nameToId($this->get('params')->get('flickruser'));\n break; \n case 'group_photos':\n if ($this->get('params')->get('flickrgroup')) return 'http://api.flickr.com/services/feeds/groups_pool.gne?id='.$this->nameToId($this->get('params')->get('flickrgroup'));\n break; \n case 'friends_photos':\n if ($this->get('params')->get('flickruser')) return 'http://api.flickr.com/services/feeds/photos_friends.gne?user_id='.$this->nameToId($this->get('params')->get('flickruser'));\n break; \n case 'keyword_photos':\n if ($this->get('params')->get('keywords')) return 'http://api.flickr.com/services/feeds/photos_public.gne?tags='.$this->get('params')->get('keywords');\n break;\n case 'set_photos':\n if ($this->get('params')->get('flickrset')) return 'http://api.flickr.com/services/feeds/photoset.gne?set='.$this->get('params')->get('flickrset').'&nsid='.$this->nameToId($this->get('params')->get('flickruser'));\n break; \n }\n \n return $feed;\n\t}",
"public function getResourceRepository() {\n\t\tif ($this->resourceRepository === null) {\n\t\t\t$this->resourceRepository = $this->getPuliFactory()->createRepository();\n\t\t}\n\n\t\treturn $this->resourceRepository;\n\t}"
]
| [
"0.7908239",
"0.6989024",
"0.6947741",
"0.6895661",
"0.6815322",
"0.6808293",
"0.6808293",
"0.6808293",
"0.6808293",
"0.6808293",
"0.6808293",
"0.6781473",
"0.6761941",
"0.6657423",
"0.66564983",
"0.6643288",
"0.6643288",
"0.6575057",
"0.6562751",
"0.65257615",
"0.64812016",
"0.64458936",
"0.64363116",
"0.6415958",
"0.63724077",
"0.63691086",
"0.6350825",
"0.6346575",
"0.63171256",
"0.62799776"
]
| 0.792677 | 0 |
Set the feed repository. | public function setFeedRepository($feedRepository)
{
$this->feedRepository = $feedRepository;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setRepository($repository)\n {\n $this->repository = $repository;\n }",
"public function setRepositories() {\n }",
"public function setBlogFeed()\n\t{\n\t\t$this->ensureAuthed();\n\t\t$input = Input::getInstance();\n\t\t$output = Output::getInstance();\n\t\t$feeds = Feeds::getInstance();\n\n\t\t$feedurl = $input->getInput('feedurl');\n\n\t\t$userfeed = $feeds->findFeed('user', $this->username);\n\n\t\tif ($userfeed == null)\n\t\t{\n\t\t\t$userfeed = new StdClass();\n\t\t}\n\n\t\t$userfeed->url = $feedurl;\n\t\t$userfeed->user = $this->username;\n\t\t$userfeed->valid = false;\n\t\t$userfeed->checked = false;\n\n\t\t$newfeeds[] = $userfeed;\n\t\t$feedsList = $feeds->getFeeds();\n\t\tforeach ($feedsList as $feed)\n\t\t{\n\t\t\tif ($feed->user != $this->username)\n\t\t\t{\n\t\t\t\t$newfeeds[] = $feed;\n\t\t\t}\n\t\t}\n\n\t\t$feeds->putFeeds($newfeeds);\n\t\t$output->setOutput('feedurl', $feedurl);\n\t\treturn true;\n\t}",
"public function setFeed(Feed $feed)\r\n {\r\n $this->feed = $feed;\r\n return $this;\r\n }",
"public function setStore(Repository $store): void\n {\n $this->store = $store;\n }",
"public function getFeedRepository()\n {\n if (null === $this->feedRepository)\n $this->feedRepository = $this->getEntityManager()->getRepository('\\Feed\\Entity\\Feed');\n return $this->feedRepository;\n }",
"public function getFeedRepository()\n {\n if (!$this->feedRepository) {\n $this->setFeedRepository($this->getEntityManager()->getRepository('Feed\\Entity\\Feed'));\n }\n return $this->feedRepository;\n }",
"public function setRepository(/*string*/ $value) /*: this*/ {\n $this->repository = $value;\n return $this;\n }",
"public function setRepository(EntityRepository $repository)\n {\n $this->repository = $repository;\n }",
"private function setCustomRepositories()\n {\n $em = $this->getDoctrine()->getManager();\n $this->frontRepository = new FrontRepository($em);\n }",
"private function registerRepository(){\n $this->dataSources = array(\n 1=>new DataSourceIRC61647(),\n );\n }",
"private function setDataBaseFeeds()\n {\n $this->dataBaseFeeds = $this->dataBaseFeedsController->getFeeds();\n }",
"protected function _updateSite(Zend_Feed_Reader_FeedInterface $feed)\n {\n // update branch url\n $branch = P4Cms_Site::fetchActive();\n $branch->getConfig()\n ->setUrls(array($this->_feedLink))\n ->save();\n\n // update stream related to the branch\n $stream = $branch->getStream();\n $stream->setName($feed->getTitle())\n ->setDescription($feed->getDescription())\n ->save();\n }",
"protected function initRepository()\n {\n $this->repository = new Repository([\n 'name' => 'vendor/name',\n 'description' => '✈️The package is a ThinkSNS+ package.',\n 'type' => 'library',\n 'license' => 'MIT',\n 'require' => [\n 'php' => '>=7.1.3',\n ],\n 'autoload' => [],\n 'config' => [\n 'sort-packages' => true,\n ],\n ]);\n }",
"public function setRepository($var)\n {\n GPBUtil::checkString($var, True);\n $this->repository = $var;\n\n return $this;\n }",
"public function setGameRepository($gameRepository)\n {\n $this->gameRepository = $gameRepository;\n }",
"public function setAccountRepository($accountRepository)\n {\n $this->accountRepository = $accountRepository;\n }",
"public function set_feed_url($url)\n {\n }",
"public function set_needed_repos(): void {}",
"public function set_needed_repos(): void {}",
"public function setRepository(string $repository, $instance) :void\n {\n $this->repositories[$repository] = $instance;\n }",
"protected function getRepository() {}",
"protected function setRepositoryBindings()\n\t{\n\t\t$this->aliases = $this->app['config']['app.aliases'];\n\n\t\t// Set the items being bound\n\t\t$bindings = ['Comment', 'Goal', 'Plan', 'Stat'];\n\n\t\tforeach ($bindings as $binding)\n\t\t{\n\t\t\t$this->bindRepository($binding);\n\t\t}\n\t}",
"public function initRepository(): void;",
"public function getRepository(){\n return $this->repository;\n }",
"private function initRepositories(): void {\n $this->usersRepository = new UsersRepository();\n }",
"public function setCredentials()\n\t{\n\t\t$settings_repo = new \\Kickapoo\\Repositories\\SettingRepository;\n\t\t$this->credentials = $settings_repo->socialCreds();\n\t}",
"public function getPremiumFeedRepository()\n {\n if (null === $this->premiumFeedRepository)\n $this->premiumFeedRepository = $this->getEntityManager()->getRepository('\\Feed\\Entity\\PremiumFeed');\n return $this->premiumFeedRepository;\n }",
"private function setFeedClass()\n\t{\n\t\t$feed_class = $this->supported_sites->getKey($this->site, 'namespace');\n\t\tif ( $this->feed_type == 'search' ) $feed_class .= ( $this->feed_format == 'unformatted' ) ? '\\Feed\\FetchFeedSearch' : '\\Feed\\Feed';\n\t\tif ( $this->feed_type == 'single' ) $feed_class .= ( $this->feed_format == 'unformatted' ) ? '\\Feed\\FetchFeedSingle' : '\\Feed\\Feed';\n\t\tif ( !class_exists($feed_class) ) return $this->sendError(__('Feed Not Found', 'socialcurator'));\n\t\t$this->feed_class = $feed_class;\n\t}",
"private function sites_repository()\r\n {\r\n return $this->m_sites_repository;\r\n }"
]
| [
"0.63340527",
"0.6265423",
"0.60142463",
"0.59895504",
"0.5945083",
"0.5930427",
"0.59149903",
"0.5886122",
"0.5785131",
"0.5690031",
"0.5673123",
"0.5633818",
"0.55160135",
"0.54651564",
"0.54288673",
"0.5400471",
"0.5378434",
"0.5341513",
"0.5323708",
"0.5323708",
"0.5320442",
"0.5261073",
"0.5208496",
"0.51823825",
"0.5139402",
"0.5118583",
"0.50991845",
"0.507186",
"0.50574607",
"0.5042745"
]
| 0.7807347 | 0 |
Get the account repository. | public function getAccountRepository()
{
if (!$this->accountRepository) {
$this->setAccountRepository($this->getEntityManager()->getRepository('Account\Entity\Account'));
}
return $this->accountRepository;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getRepo()\n {\n return $this->repo;\n }",
"public function getRepository()\n {\n return $this->repository;\n }",
"public function getRepository()\n {\n return $this->repository;\n }",
"public function getRepository()\n {\n return $this->repository;\n }",
"public function getRepository()\n {\n return $this->repository;\n }",
"public function getRepository()\n {\n return $this->repository;\n }",
"public function getRepository()\n {\n return $this->repository;\n }",
"public function getRepository();",
"protected function getRepository() {}",
"protected function getRepository()\n {\n return $this->repository;\n }",
"public function getRepository(){\n return $this->repository;\n }",
"public abstract function getRepository();",
"public static function getRepository()\n {\n if (is_null(static::$repository)) {\n static::$repository = static::buildRepository();\n }\n\n return static::$repository;\n }",
"public function getRepository()\n {\n return $this->manager->getRepository($this->class);\n }",
"abstract public function getRepository();",
"abstract public function getRepository();",
"protected function getRepository() {\n\t\tif ($this->_repository === null) {\n\t\t\t$this->_repository = new AGitRepository();\n\t\t\t$this->_repository->setPath($this->path,true,true);\n\t\t\t$this->assertTrue(file_exists($this->path));\n\t\t}\n\t\treturn $this->_repository;\n\t}",
"protected function getRepository() {\n if(empty($this->repository)) {\n try {\n $pdo = new PDO(PDO_DSN, DB_USER, DB_PASS);\n $this->repository = new UserRepository($pdo);\n } catch (PDOException $e) {\n $this->errorMessages[] = 'Connection failed: ' . $e->getMessage();\n }\n }\n\n return $this->repository;\n }",
"public function get_repo_data(){\n\n\t\t\treturn $this->get_repo();\n\n\t\t}",
"public function repository()\n {\n return Repository::i();\n }",
"abstract protected function getRepository();",
"public function getRepositoryCredentials()\n {\n // Check for repository credentials\n $repository = $this->credentials->getCurrentRepository();\n $repositoryCredentials = $repository->toArray();\n\n // If we didn't specify a login/password ask for both the first time\n $rules = $this->rules['repository'];\n if ($repository->needsCredentials()) {\n // Else assume the repository is passwordless and only ask again for username\n $rules += ['username' => true, 'password' => true];\n }\n\n // Gather credentials\n $credentials = $this->gatherCredentials($rules, $repositoryCredentials, 'repository');\n\n // Save them to local storage and runtime configuration\n $this->localStorage->set('credentials', $credentials);\n foreach ($credentials as $key => $credential) {\n $this->config->set('scm.'.$key, $credential);\n }\n }",
"public function getRepository() /*: string*/ {\n if ($this->repository === null) {\n throw new \\Exception(\"Repository is not initialized\");\n }\n return $this->repository;\n }",
"public function getRepository()\n {\n return $this->getEntityManager()->getRepository($this->getEntityClassName());\n }",
"public function getAccount();",
"public function getAccount()\n {\n return $this->container->get('user')->getAccount();\n }",
"public function getRepository()\n {\n return $this->configurationRepository;\n }",
"protected function getRepository()\n {\n return $this->entityManager->getRepository($this->getEntityClass());\n }",
"public function getRepository(): ObjectRepository\n {\n return $this->repository;\n }",
"function &getRepoEntry() {\n\t\treturn $this->repoObj;\n\t}"
]
| [
"0.7269168",
"0.6900497",
"0.6900497",
"0.6900497",
"0.6900497",
"0.6900497",
"0.6900497",
"0.68958604",
"0.68842185",
"0.685694",
"0.6821314",
"0.6811614",
"0.6725852",
"0.6720549",
"0.6685367",
"0.6685367",
"0.66707015",
"0.6640209",
"0.65711904",
"0.65668863",
"0.65665036",
"0.64393353",
"0.643379",
"0.64130795",
"0.64059365",
"0.64026624",
"0.63060945",
"0.62762547",
"0.62562776",
"0.6191942"
]
| 0.7860508 | 0 |
Set the account repository. | public function setAccountRepository($accountRepository)
{
$this->accountRepository = $accountRepository;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setRepository($repository)\n {\n $this->repository = $repository;\n }",
"public function setRepo($user, $repo)\n {\n $this->apibase = \"https://api.github.com/repos/$user/$repo/\";\n }",
"public function setCredentials()\n\t{\n\t\t$settings_repo = new \\Kickapoo\\Repositories\\SettingRepository;\n\t\t$this->credentials = $settings_repo->socialCreds();\n\t}",
"public function setRepository(/*string*/ $value) /*: this*/ {\n $this->repository = $value;\n return $this;\n }",
"public function setAccount($account = array()) {\n\t\t$this->_account = $account;\n\t}",
"public function setAccount($account);",
"public function setRepositories() {\n }",
"public function setRepository($var)\n {\n GPBUtil::checkString($var, True);\n $this->repository = $var;\n\n return $this;\n }",
"public function __construct(AccountRepository $accounts)\n {\n $this->accounts = $accounts;\n }",
"function setAccounts($accounts) {\n $this->accounts = $accounts;\n }",
"public function setRepository(EntityRepository $repository)\n {\n $this->repository = $repository;\n }",
"public function set_needed_repos(): void {}",
"public function set_needed_repos(): void {}",
"public function setStore(Repository $store): void\n {\n $this->store = $store;\n }",
"public function __construct( AccountRepository $accountRepository )\n {\n $this->accountRepository = $accountRepository;\n }",
"protected function setOrganization() {}",
"protected function initRepository()\n {\n $this->repository = new Repository([\n 'name' => 'vendor/name',\n 'description' => '✈️The package is a ThinkSNS+ package.',\n 'type' => 'library',\n 'license' => 'MIT',\n 'require' => [\n 'php' => '>=7.1.3',\n ],\n 'autoload' => [],\n 'config' => [\n 'sort-packages' => true,\n ],\n ]);\n }",
"public function set_path() {\n\t\t\t\n\t\t\t// pick up the path types\n\t\t\t$path_types = include_once(CONFIGPATH . 'path-types.php' );\n\n\t\t\t// get the base path for the deploy type\n\t\t\t$base_path = $path_types[ $this->repo[ 'type' ] ];\n\n\t\t\t// check if it is a valid path\n\t\t\t$this->is_path_valid( $base_path );\n\n\t\t\t// append the repositories name to get the final deploy path\n\t\t\t$this->repo[ 'path' ] = $base_path . '/' . $this->repo[ 'name' ];\n\t\t}",
"public function getAccountRepository()\n {\n if (!$this->accountRepository) {\n $this->setAccountRepository($this->getEntityManager()->getRepository('Account\\Entity\\Account'));\n }\n return $this->accountRepository;\n }",
"public function setRepository(string $repository, $instance) :void\n {\n $this->repositories[$repository] = $instance;\n }",
"protected function getRepository() {}",
"function setAccount($id)\n\t{\n\t\t$this->accountId = $id;\n\t}",
"public function setAccounts($accounts)\n {\n $this->accounts = $accounts;\n }",
"public function setAccount(array $account)\n {\n $this->account = $account;\n return $this;\n }",
"protected function setRepositoryBindings()\n\t{\n\t\t$this->aliases = $this->app['config']['app.aliases'];\n\n\t\t// Set the items being bound\n\t\t$bindings = ['Comment', 'Goal', 'Plan', 'Stat'];\n\n\t\tforeach ($bindings as $binding)\n\t\t{\n\t\t\t$this->bindRepository($binding);\n\t\t}\n\t}",
"private function initRepositories(): void {\n $this->usersRepository = new UsersRepository();\n }",
"private function setCustomRepositories()\n {\n $em = $this->getDoctrine()->getManager();\n $this->frontRepository = new FrontRepository($em);\n }",
"public function __construct( )\n {\n $this->genericRepository = new DtGenericRepository();\n $this->genericRepository->type = \"\\App\\Models\\Objects\\Entities\\Account\";\n }",
"abstract protected function getRepository();",
"public function getRepository(){\n return $this->repository;\n }"
]
| [
"0.619429",
"0.6138165",
"0.606795",
"0.60392356",
"0.5993383",
"0.5989423",
"0.59035885",
"0.5862703",
"0.5761476",
"0.57221514",
"0.5714378",
"0.55787075",
"0.55787075",
"0.5557932",
"0.5550746",
"0.546888",
"0.5467246",
"0.5418929",
"0.5417918",
"0.54096025",
"0.5373821",
"0.53371006",
"0.53047884",
"0.51870316",
"0.5176895",
"0.51737434",
"0.5167263",
"0.5166502",
"0.5148424",
"0.51377714"
]
| 0.7335295 | 0 |
Sets the zend translator instance. | public function setTranslator($translator)
{
$this->translator = $translator;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setTranslator($translator = null)\n {\n if (null === $translator) {\n $this->_translator = null;\n } elseif ($translator instanceof Zend_Translate_Adapter) {\n $this->_translator = $translator;\n } elseif ($translator instanceof Zend_Translate) {\n $this->_translator = $translator->getAdapter();\n } else {\n // require_once 'Zend/Form/Exception.php';\n throw new Zend_Form_Exception('Invalid translator specified');\n }\n\n return $this;\n }",
"public function setTranslator($translator) \n {\n $this->translator = $translator;\n return ($this);\n }",
"public static function setTranslator(TranslatorInterface $translator): void\n {\n self::$translator = $translator;\n }",
"public function setTranslator(TranslatorInterface $translator)\n {\n $this->translator = $translator;\n }",
"public function setTranslator($translator) {\n $this->properties['translator'] = $translator;\n\n return $this;\n }",
"public function setTranslator($translator)\n {\n if($translator instanceof Zend_Translate) {\n $this->_translator = $translator;\n }\n else {\n throw new Datagrid_Exception('Translator must be a Zend_Translate instance');\n }\n return $this;\n }",
"public function setTranslator($translator = null)\n {\n foreach ($this->_validators as $validator) {\n $validator['instance']->setTranslator($translator);\n }\n return parent::setTranslator($translator);\n }",
"public function __construct() {\n $this->translator = I18n::getInstance()->getTranslator();\n\t}",
"private function __construct()\n {\n $this->phpTranslator = PhpTranslator::Singleton();\n }",
"function &getTranslator()\n {\n return $this->_translator;\n }",
"public static function setDefaultTranslator($translator = null)\n {\n if (null === $translator) {\n self::$_translatorDefault = null;\n } elseif ($translator instanceof Zend_Translate_Adapter) {\n self::$_translatorDefault = $translator;\n } elseif ($translator instanceof Zend_Translate) {\n self::$_translatorDefault = $translator->getAdapter();\n } else {\n // require_once 'Zend/Form/Exception.php';\n throw new Zend_Form_Exception('Invalid translator specified');\n }\n }",
"public function init()\n {\n// $lang = $this->getRequest()->getParam('lang');\n $lang = Zend_Registry::isRegistered('lang') ? Zend_Registry::get('lang') : '';\n\n if (!$lang) {\n $locale = new Zend_Locale('auto');\n $lang = array_key_exists($locale->getLanguage(), $this->_locales)\n ? $locale->getLanguage() : $this->_defaultLanguage;\n }\n\n if (!array_key_exists($lang, $this->_locales)) {\n $lang = $this->_defaultLanguage;\n }\n\n $this->setTranslatorLang($lang);\n }",
"public function getTranslator() \n {\n if (!$this->translator) {\n //$this->setTranslator($this->getServiceLocator()->get('translator'));\n $this->setTranslator(\\Application\\Module::getService('translator'));\n }\n return $this->translator;\n }",
"protected function _initTranslate() {\n\t\t$translate = new Zend_Translate('array',\n\t\t\tAPPLICATION_PATH . '/langs',\n\t\t\tnull,\n\t\t\tarray('scan'=>Zend_Translate::LOCALE_FILENAME)\n\t\t\t);\n\t\t$registry = Zend_Registry::getInstance();\n\t\t$registry->set('Zend_Translate',$translate);\n\t\t// This is assigned by the initLocale on the fly based on browser language\n\t\t//$translate->setlocale('en_US');\n\t}",
"protected function translator()\n {\n if (! $this->translator) {\n $this->translator = Mockery::mock(Translator::class);\n }\n\n return $this->translator;\n }",
"public function __construct()\n {\n $this->translator = resolve(Translator::class);\n }",
"public static function setDefaultTranslator($translator = null)\n\t{\n\t\tif ((null === $translator) || ($translator instanceof Zend_Translate_Adapter)) {\n\t\t\tself::$_defaultTranslator = $translator;\n\t\t} elseif ($translator instanceof Zend_Translate) {\n\t\t\tself::$_defaultTranslator = $translator->getAdapter();\n\t\t} else {\n\t\t\trequire_once 'Zend/Validate/Exception.php';\n\t\t\tthrow new Zend_Validate_Exception('Invalid translator specified');\n\t\t}\n\t}",
"protected function _initTranslate()\n {\n $params = array(\n 'scan' => Zend_Translate_Adapter::LOCALE_FILENAME,\n 'logUntranslated' => true\n );\n\n $log = new Zend_Log();\n if( APPLICATION_ENV == 'development' ) {\n $log = new Zend_Log();\n $log->addWriter(new Zend_Log_Writer_Firebug());\n } else {\n $log->addWriter(new Zend_Log_Writer_Null());\n }\n $params['log'] = $log;\n\n $translate = new Zend_Translate(\n 'Csv',\n APPLICATION_PATH.'/install/languages',\n null,\n $params\n );\n\n Zend_Registry::set('Zend_Translate', $translate);\n Zend_Validate_Abstract::setDefaultTranslator($translate);\n Engine_Sanity::setDefaultTranslator($translate);\n\n return $translate;\n }",
"private function getTranslator()\n {\n if (!$this->app->translator instanceof Translator) {\n $this->app->translator = new Translator($this->locale, new MessageSelector());\n $this->app->translator->addLoader('array', new ArrayLoader());\n $this->app->translator->addLoader('xliff', new XliffFileLoader());\n }\n\n return $this->app->translator;\n }",
"public function getTranslator()\n {\n return $this->translator;\n }",
"public function getTranslator()\n {\n return $this->translator;\n }",
"protected function initTranslate()\n {\n try {\n $this->_xl8 = new Zend_Translate(Zend_Translate::AN_GETTEXT,\n Utils_ResourceLocator::langFile($this->_locale),\n $this->_locale->getLanguage(),\n array('disableNotices' => true));\n Zend_Registry::set('Zend_Translate', $this->_xl8);\n } catch (Exception $e) {\n throw new WrappedException('unable to initialize translate', $e);\n }\n }",
"protected function _getTranslator() {\n \tif(null == $this->translator) {\n \t\t$sm = $this->getServiceLocator();\n \t\t$this->translator = \\Application\\Util\\ServicesUtil::getTranslatorService($sm);\n \t}\n \treturn $this->translator;\n }",
"public function getTranslator()\n {\n return $this['translator'];\n }",
"public function getTranslator() {\n\t\treturn $this->translator;\n\t}",
"public function useTranslator($bank, Translator $translator)\n {\n $this->translators[$bank] = $translator;\n }",
"protected function registerTranslator()\n {\n $this->app->bindShared(\n 'translator',\n function ($app) {\n $loader = $app['translation.loader'];\n\n // When registering the translator component, we'll need to set the default\n // locale as well as the fallback locale. So, we'll grab the application\n // configuration so we can easily get both of these values from there.\n $locale = $app['config']['app.locale'];\n\n $translator = new Translator($loader, $locale);\n\n $translator->setFallback($app['config']['app.fallback_locale']);\n\n return $translator;\n }\n );\n }",
"public function translator(): Translator;",
"public function _getServTranslator() {\n if (!$this->_servTranslator) {\n $this->_servTranslator = $this->getServiceLocator()->get('translator');\n }\n return $this->_servTranslator;\n }",
"protected function setUp()\n {\n parent::setUp();\n $this->getTranslator()->setLanguage(1);\n }"
]
| [
"0.710912",
"0.70416385",
"0.69322914",
"0.68018186",
"0.65943766",
"0.65633565",
"0.6551201",
"0.6423835",
"0.64007485",
"0.6377069",
"0.63324505",
"0.61093616",
"0.60839605",
"0.60759836",
"0.6056153",
"0.6055779",
"0.60155386",
"0.6005526",
"0.59665436",
"0.5965346",
"0.5965346",
"0.5950142",
"0.5901348",
"0.58935404",
"0.5875229",
"0.58584523",
"0.5831196",
"0.5788386",
"0.5735733",
"0.5730753"
]
| 0.71666676 | 0 |
Sets the message's parent message | public function setParent(Message $parentMessage) {} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setParentMessage(Message $parentMessage)\n {\n $this->parentMessage = $parentMessage;\n }",
"public function setParentMessageID($id) {\n $this->setParam('parent-message-id', $id);\n return $this;\n }",
"public function getParentMessage()\n {\n return $this->parentMessage;\n }",
"public function setParentMessageId(int $parentMessageId) {\n $this->parentMessageId = $parentMessageId;\n }",
"public function setParent(self $parent)\n {\n $this->_parent = $parent;\n }",
"function set_parent($parent)\r\n {\r\n $this->parent = $parent;\r\n }",
"public function setParent($parent) {\n\t\t$this->parent = $parent;\n\t}",
"public function setParent($parent)\n {\n $this->parent = $parent;\n }",
"public function setParent($parent)\n {\n $this->parent = $parent;\n }",
"public function setParent($parent)\n\t{\n\t\t$this->parent = $parent;\n\t}",
"public function setParent(Module_Node_Model $parent = null);",
"public function setMsgParentItemColon($msg = NULL){\n\t\t$this->msgParentItemColon = $msg;\n\t}",
"function setParent(IBabylonModel $parent);",
"public function setParent($record)\n {\n $this->parent = $record;\n }",
"function set_parent($value) {\n $this->set_mapped_property('parent', $value);\n }",
"public function message()\n {\n return 'The specified parent is a parent itself';\n }",
"public function setParentKey(string $parentKey): void\n {\n $this->parentKey = $parentKey;\n }",
"public function set_parent_id($parent)\n {\n $this->set_default_property(self::PROPERTY_PARENT_ID, $parent);\n }",
"public function makeParent(): void\n {\n $this->parent = null;\n }",
"public function setParentObject($object) {\n $this->_parent_object = $object;\n }",
"public function setParent($oParent = null)\n {\n $this->_oParent = $oParent;\n }",
"public function getParent()\n\t{\n\t\treturn $this->_mail;\n\t}",
"private function setParent(Folder $parent): void\n {\n $this->parent = $parent;\n }",
"public function getParentMessageId(): int {\n return $this->parentMessageId;\n }",
"public function setParent(Node $parent)\n {\n $this->parent = $parent;\n }",
"public function setParent(Verb $parent)\n {\n $this->parent = $parent;\n }",
"public function setParent_id( $parent_id ) {\n\t\t$this->parent_id = $parent_id;\n\t}",
"public function setParentKey($parentKey)\n {\n $this->parentKey = $parentKey;\n }",
"public function setParent(\\ObjectiveLessCss\\Block $parent)\n\t{\n\t\tif ($this->parent != $parent) {\n\t\t\t$oldParent = $this->parent;\n\t\t\t$this->parent = null; // do not remove or endless recursion will happen!\n\t\t\tif ($oldParent) {\n\t\t\t\t$oldParent->removeRule($this);\n\t\t\t}\n\t\t\t$this->parent = $parent;\n\t\t}\n\t}",
"public function parent() { }"
]
| [
"0.8436252",
"0.7404321",
"0.73649937",
"0.722682",
"0.69097733",
"0.69054955",
"0.68956333",
"0.68187684",
"0.68187684",
"0.6791542",
"0.6684931",
"0.6594282",
"0.65560156",
"0.65093875",
"0.65007055",
"0.6465919",
"0.6315305",
"0.63080525",
"0.6305308",
"0.63053024",
"0.6288797",
"0.62739885",
"0.62669134",
"0.62489104",
"0.6221282",
"0.6220929",
"0.62113374",
"0.6199541",
"0.61983466",
"0.6160867"
]
| 0.92184514 | 0 |
Action "overview" URL: /index.php?controllers=Location&action=overview | public function overview() {
// load model
require_once APP_PATH . '/models/LocationsModel.php';
// get all locations
$locationsModel = new LocationsModel();
$locations = $locationsModel->getAll();
// show views
loadView('theme/header');
loadView('locations/overview', [
'locations' => $locations,
]);
loadView('theme/footer');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function overviewAction(){\n\t\t\t\t\t\t$this->redirectToIndex();\n\t\t\t\t\t if($this->_getParam ( 'actions' )==\"overview\"){\n\t\t\t\t\t $idOverview= $this->_getParam ( 'id' );\n\t\t\t\t\t $idUser = $this->_getParam ( 'userid' );\n\t\t\t\t\t\t\t$GetSelectViewCompanys = $this->GetModelOrganize->SelectOverViewEdit( $idOverview,$idUser );\n\t\t\t\t\t $this->view->SelectOnFormEdit = $GetSelectViewCompanys;\n\t\t\t\t\t \n\t\t\t\t\t }\n\t\t\t\t\t\t$id = $this->_getParam ( 'id' );\n $this->view->getIdView = $id;\n \n \n\t\t\t\t\t}",
"public function actionOverview()\n {\n // using the default layout 'protected/views/layouts/main.php'\n $this->render('overview');\n\n }",
"public function viewAction()\r\n {\r\n $this->indexAction();\r\n }",
"public function actionIndex(){ \n echo 'REST API';\n //echo \\admin\\components\\GoogleURLShortner::widget([\"url\" => \"http://www.google.com\"]);\n }",
"public function getViewLocation($action);",
"protected function _goToOverview()\n {\n $this->_redirect($this->view->url(array(\n 'module' => 'user',\n 'controller' => 'roles',\n 'action' => 'index',\n ), 'admin', true));\n }",
"function omn_superadmin_overview_page() {\n\n\tif( isset($_REQUEST['action']) ) {\n $action = $_REQUEST['action'];\n } else {\n $action = 'default';\n }\n \n switch( $action ) {\n case 'add':\n \tomn_superadmin_overview_page_add();\n \tbreak;\n case 'delete-notification':\n \tomn_delete_notification( $_GET['user'], $_GET['message'] );\n \tomn_superadmin_overview_page_default();\n \tbreak;\n case 'expire-message':\n \tomn_delete_notifications( $_GET['id'] );\n \tomn_superadmin_overview_page_default();\n \tbreak;\n case 'delete-message':\n \tomn_delete_message( $_GET['id'] );\n \tomn_superadmin_overview_page_default();\n \tbreak;\n default:\n \tomn_superadmin_overview_page_default();\n \tbreak;\n }\n}",
"public function overviewAction() {\n\n if ($this->_user == 'user') {\n $this->_redirect('/');\n }\n\n $testCaseId = (integer) $this->getRequest()->getParam('id');\n if ($testCaseId <= 0) {\n $this->_redirect('testing_cms/overviewall');\n }\n try {\n $testCase = new Yourdelivery_Model_Testing_TestCase($testCaseId);\n } catch (Yourdelivery_Exception_Database_Inconsistency $exc) {\n $this->error('Requested site does not exists.');\n $this->_redirect('/testing_cms/');\n return;\n }\n $this->view->testCase = $testCase;\n $this->view->testCaseId = $testCaseId;\n\n $this->view->assign('missions', $testCase->getExpectations());\n }",
"public function indexAction()\n {\n return $this->_forward('top', 'search', 'admin');\n }",
"public function indexAction() {\n\n\n $this->assign('loginUrl', $this->actions['loginUrl']);\n $this->assign('logoutUrl', $this->actions['logoutUrl']);\n $this->assign('indexUrl', $this->actions['indexUrl']);\n }",
"public function actionIndex()\n {\n\t\techo \"=== Action index ===\";\n \n }",
"public function index()\n {\n $data_url = $this->request->query;\n\n //Obtengo los datos de la tabla\n $mapaConfig = $this->Mapconfig->find('all', [])->first();\n\n\n $action = $data_url['Accion'];\n $categoria = $data_url['Categoria'];\n\n\n $this->set('action', $action);\n $this->set('categoria', $categoria);\n $this->set('mapaConfig', $mapaConfig);\n\n }",
"private function indexAction()\n {\n $page = isset($_GET['page']) ? substr($_GET['page'],0,-1) : \"home\" ;\n $this->reg->pages->getPageContent(strtolower($page));\n }",
"public function actionIndex() {\n \n $this->redirect('admin');\n \n\t}",
"public function showAdminAction()\n {\n header (\"location: admin.php?route=adminAccueil\");\n }",
"function indexAction()\n {\n parent::indexAction();\n $this->view->title = \"Data Importer\";\n }",
"public function indexAction()\r\n {\r\n $url = $this->get('router')->generate(\r\n 'oc_platform_view', // 1er argument : le nom de la route\r\n array('id' => 5) // 2e argument : les valeurs des paramètres\r\n );\r\n // $url vaut « /platform/advert/5 »\r\n\r\n return new Response(\"L'URL de l'annonce d'id 5 est : \".$url);\r\n }",
"public function indexAction() \n\t{\n\t\t$this->_forward('view');\n\t}",
"function index() {\r\n \t\r\n // The default action is the showall action\r\n $this->browse();\r\n }",
"public function actionHome(){\n\t\t\n\t\t$this->getContent('home');\n\t\t\n\t}",
"public function indexAction()\n\t{\n\t\t$this->_forward('view');\n\t}",
"public function indexAction()\n {\n $this->_redirect($this->_helper->url('list'));\n }",
"public function output(){\n\t\t$this->index($this->input->get('action'));\n\t}",
"public function overviewAction(){\n \t$analytics = new Pas_Analytics_Gateway($this->_ID, $this->_pword);\n \t$analytics->setProfile(25726058);\n \t$timeframe = new Pas_Analytics_Timespan(); \n $timeframe->setTimespan($this->_getParam('timespan'));\n \t$dates = $timeframe->getDates();\n \t$analytics->setStart($dates['start']);\n \t$analytics->setEnd($dates['end']);\n \t$analytics->setMetrics(\n array(\n Zend_Gdata_Analytics_DataQuery::METRIC_VISITORS,\n Zend_Gdata_Analytics_DataQuery::METRIC_PAGEVIEWS,\n Zend_Gdata_Analytics_DataQuery::METRIC_UNIQUE_PAGEVIEWS,\n Zend_Gdata_Analytics_DataQuery::METRIC_AVG_TIME_ON_PAGE,\n Zend_Gdata_Analytics_DataQuery::METRIC_ENTRANCES,\n Zend_Gdata_Analytics_DataQuery::METRIC_EXITS,\n Zend_Gdata_Analytics_DataQuery::METRIC_BOUNCES\n \t\t));\n \t$analytics->setDimensions(\n array(\n Zend_Gdata_Analytics_DataQuery::DIMENSION_PAGE_TITLE,\n Zend_Gdata_Analytics_DataQuery::DIMENSION_PAGE_PATH,\t\t\n \t\t));\n \tif(is_null($this->_getParam('filter'))){\n \t$analytics->setFilters(\n array(\n Zend_Gdata_Analytics_DataQuery::DIMENSION_PAGE_PATH \n . Zend_Gdata_Analytics_DataQuery::REGULAR_NOT . 'forum'\n\t ));\n\t } else {\n \t$analytics->setFilters(\n array(\n Zend_Gdata_Analytics_DataQuery::DIMENSION_PAGE_PATH \n . Zend_Gdata_Analytics_DataQuery::REGULAR . '/'\n . $this->_getParam('filter')\n\t ));\n\t }\n \t$analytics->setMax(20);\n \t$analytics->setSort(Zend_Gdata_Analytics_DataQuery::METRIC_VISITORS);\n \t$analytics->setSortDirection(true);\n \t$analytics->setStartIndex($this->getStart());\n \t$this->view->results = $analytics->getData();\n $paginator = Zend_Paginator::factory((int)$analytics->getTotal());\n $paginator->setCurrentPageNumber((int)$this->getPage())\n\t\t\t->setItemCountPerPage((int)self::MAX_RESULTS);\n $this->view->paginator = $paginator;\n }",
"public function indexAction(){\t\t\n\t}",
"public function indexAction()\n {\n return $this->apiAction();\n }",
"public function actionAdministration()\n\t{\n\t $this->render('index');\n\t}",
"function index() {\n\t\t\t$this->redirect(array('action' => 'view'));\n\t\t}",
"public function indexAction ()\n {\n $this->redirectToLatestStep($this->getHealthcheck()->stepName);\n }",
"public function indexAction()\n {\n\t\techo 'Module Admin IndexController indexAction';\n\t\t\n }"
]
| [
"0.7275991",
"0.6984445",
"0.6890046",
"0.67462003",
"0.66326696",
"0.65779954",
"0.6489939",
"0.64196724",
"0.6364081",
"0.6324517",
"0.6273836",
"0.6263286",
"0.62370545",
"0.62310046",
"0.6214828",
"0.6214201",
"0.6209151",
"0.61951053",
"0.61903936",
"0.6189673",
"0.6186787",
"0.61550725",
"0.6154667",
"0.61500156",
"0.6149778",
"0.614502",
"0.6144406",
"0.61437166",
"0.61315596",
"0.61210185"
]
| 0.70951855 | 1 |
_shouldProcess Default to PHP files only | protected function _shouldProcess($path) {
return substr($path, -4) === '.php';
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function shouldProcess($path) {\n\n //Handle something special\n return true;\n\n }",
"public function runOnFiles(): bool;",
"public function shouldRunFile(string $file): bool;",
"public function isFilebased() {\n\t\treturn FALSE;\n\t}",
"protected function _allowProcess()\n\t{\n\t\treturn ($this->helper->moduleEnabled() || $this->previewHelper->isAllowPreview());\n\t}",
"protected function isFile() {}",
"function preLoad() {\n if ( ! $this->useThemes() ) {\n $this->doneAndExit( 'do_not_use_themes' );\n }\n $method = strtoupper( filter_input( INPUT_SERVER, 'REQUEST_METHOD' ) );\n if ( 'HEAD' === $method && apply_filters( 'exit_on_http_head', TRUE ) ) {\n $this->doneAndExit( 'on_http_head' );\n }\n if ( is_robots() ) {\n do_action( 'do_robots' );\n $this->doneAndExit( 'is_robots' );\n } elseif ( is_feed() ) {\n do_feed();\n $this->doneAndExit( 'is_feed' );\n } elseif ( is_trackback() ) {\n include( ABSPATH . 'wp-trackback.php' );\n $this->doneAndExit( 'is_trackback' );\n }\n return TRUE;\n }",
"public function usesCompiler()\n {\n // does not use compiler, template is PHP\n return false;\n }",
"abstract public function processFile($fileName);",
"public function isProcessed() {}",
"function pparse($handle)\n\t{\n\t\tglobal $config;\n\n\t\t// Mighty Gorgon - Extra Debug - BEGIN\n\t\tif (defined('DEBUG_EXTRA') && DEBUG_EXTRA && !empty($_REQUEST['explain']))\n\t\t{\n\t\t\tglobal $user, $db;\n\t\t\tif (($user->data['user_level'] == ADMIN) && method_exists($db, 'sql_report'))\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t// Mighty Gorgon - Extra Debug - END\n\n\t\tif (!defined('CSS_JS_PARSED'))\n\t\t{\n\t\t\t$this->add_css_js();\n\t\t}\n\n\t\t// parsing header if there is one\n\t\tif($this->preparse || $this->postparse)\n\t\t{\n\t\t\t$preparse = $this->preparse;\n\t\t\t$postparse = $this->postparse;\n\t\t\t$this->preparse = '';\n\t\t\t$this->postparse = '';\n\t\t\tif($preparse)\n\t\t\t{\n\t\t\t\t$this->pparse($preparse);\n\t\t\t}\n\t\t\tif($postparse)\n\t\t\t{\n\t\t\t\t$str = $handle;\n\t\t\t\t$handle = $postparse;\n\t\t\t\t$this->pparse($str);\n\t\t\t}\n\t\t}\n\n\t\t// checking if handle exists\n\t\tif (empty($this->files[$handle]) && empty($this->files_cache[$handle]))\n\t\t{\n\t\t\tif(isset($this->files[$handle]) && ($this->files[$handle] === false))\n\t\t\t{\n\t\t\t\t// skip file\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\tdie(\"Template->loadfile(): No files found for handle $handle\");\n\t\t}\n\t\t$this->xs_startup();\n\t\t$force_recompile = empty($this->uncompiled_code[$handle]) ? false : true;\n\n\t\t// checking if php file exists.\n\t\tif (!empty($this->files_cache[$handle]) && !$force_recompile)\n\t\t{\n\t\t\t// php file exists - running it instead of tpl\n\t\t\t$this->execute($this->files_cache[$handle], '', $handle);\n\t\t\treturn true;\n\t\t}\n\n\t\tif (!$this->loadfile($handle))\n\t\t{\n\t\t\tdie(\"Template->pparse(): Couldn't load template file for handle $handle\");\n\t\t}\n\n\t\t// actually compile the template now.\n\t\tif (empty($this->compiled_code[$handle]))\n\t\t{\n\t\t\t// Actually compile the code now.\n\t\t\tif(!empty($this->files_cache2[$handle]) && empty($this->files_cache[$handle]) && !$force_recompile)\n\t\t\t{\n\t\t\t\t$this->compiled_code[$handle] = $this->compile2($this->uncompiled_code[$handle], $handle, $this->files_cache2[$handle]);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->compiled_code[$handle] = $this->compile2($this->uncompiled_code[$handle], '', '');\n\t\t\t}\n\t\t}\n\n\t\t// Run the compiled code.\n\t\tif (empty($this->files_cache[$handle]) || $force_recompile)\n\t\t{\n\t\t\t$this->execute('', $this->compiled_code[$handle], $handle);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->execute($this->files_cache[$handle], '', $handle);\n\t\t}\n\t\treturn true;\n\t}",
"public function process() {\n\t\treturn false;\n\t}",
"private function shouldProcess()\n {\n if (count($this->settings['whitelist']) > 0) {\n return in_array($this->templateName, $this->settings['whitelist'], true);\n }\n\n if (count($this->settings['blacklist']) > 0) {\n return !in_array($this->templateName, $this->settings['blacklist'], true);\n }\n\n return true;\n }",
"public function fileNeedsProcessing() {}",
"public function allFilesAreProcessed(): bool\n {\n foreach ($this->files as $file) {\n if (false === $file->isProcessed()) {\n return false;\n }\n }\n\n return true;\n }",
"function fileNeedsProcessing() ;",
"public function testCallbackSupport()\n {\n // make sure we don't get false positives\n self::assertFalse($this->processor->supports('test.jpg'));\n\n // make sure we get true positives\n self::assertTrue($this->processor->supports('test.php'));\n }",
"public function can_process() {\n\t\treturn $this->can_export();\n\t}",
"public static function pre_process() {}",
"public function isProcessed(): bool;",
"public function accept(): bool\n {\n return (!$this->isFile() || preg_match($this->regex, $this->getFilename()));\n }",
"protected function preProcess() {}",
"public function hasFiles(): bool\n {\n return $this->type != 'menu_links';\n }",
"protected function _process() {}",
"protected function _process() {}",
"protected function _process() {}",
"protected function _process() {}",
"function wp_is_file_mod_allowed($context)\n {\n }",
"public function preProcess();",
"public function preProcess();"
]
| [
"0.7020225",
"0.68208265",
"0.6239241",
"0.6182589",
"0.6101586",
"0.60849506",
"0.60775363",
"0.5967233",
"0.58954483",
"0.58923894",
"0.5875959",
"0.58618",
"0.5855111",
"0.58184403",
"0.57757986",
"0.57221097",
"0.5660384",
"0.5644789",
"0.56268215",
"0.561094",
"0.560019",
"0.5599179",
"0.55757874",
"0.551806",
"0.551806",
"0.551806",
"0.551806",
"0.55118513",
"0.5505528",
"0.5505528"
]
| 0.7122054 | 0 |
Generate default security groups for the SDLT application | public function createDefaultSDLTMemberGroups()
{
$cisoGroup = Group::get()->find('Code', UserGroupConstant::GROUP_CODE_CISO);
if (!($cisoGroup && $cisoGroup->ID)) {
$cisoGroup = Group::create();
$cisoGroup->Title = 'NZTA-SDLT-CISO';
$cisoGroup->Code = UserGroupConstant::GROUP_CODE_CISO;
$cisoGroup->write();
}
$saGroup = Group::get()->find('Code', UserGroupConstant::GROUP_CODE_SA);
if (!($saGroup && $saGroup->ID)) {
$saGroup = Group::create();
$saGroup->Title = 'NZTA-SDLT-SecurityArchitect';
$saGroup->Code = UserGroupConstant::GROUP_CODE_SA;
$saGroup->write();
}
$usersGroup = Group::get()->find('Code', UserGroupConstant::GROUP_CODE_USER);
if (!($usersGroup && $usersGroup->ID)) {
$usersGroup = Group::create();
$usersGroup->Title = 'NZTA-SDLT-Users';
$usersGroup->Code = UserGroupConstant::GROUP_CODE_USER;
$usersGroup->write();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function createSecurityGroups()\n {\n // DB connection\n $dbCon = $this->_dbCon;\n\n if ($this->_settings->get('securityversion') < 0.27) {\n /* Truncate the current defined permissions */\n $dbCon->rawExec('DELETE FROM securitygroups');\n\n /* Create the security groepen */\n $dbCon->rawExec(\"INSERT INTO securitygroups(id,name) VALUES(1, 'Anonymous user - closed system')\");\n $dbCon->rawExec(\"INSERT INTO securitygroups(id,name) VALUES(2, 'Anonymous user - open system')\");\n $dbCon->rawExec(\"INSERT INTO securitygroups(id,name) VALUES(3, 'Authenticated users')\");\n $dbCon->rawExec(\"INSERT INTO securitygroups(id,name) VALUES(4, 'Trusted users')\");\n $dbCon->rawExec(\"INSERT INTO securitygroups(id,name) VALUES(5, 'Administrators')\");\n } // if\n }",
"static function getUserGroups(){\n \n }",
"public static function getPluignGroups()\n\t\t{\n\n\t\t\t$groups = array(\n\n\t\t\t\t'christina' => array(\n\t\t\t\t\t'id'\t\t\t\t=> 'christina',\n\t\t\t\t\t'title'\t\t\t\t=> 'Christina',\n\t\t\t\t\t'icon' \t\t\t\t=> 'admin-appearance',\n\t\t\t\t\t'excerpt' \t\t\t=> 'Enable your students to submit assignments, have them collaborate in groups and get inline feedback.',\n\t\t\t\t\t'image' \t\t\t=> 'http://dummyimage.com/308x160',\n\t\t\t\t\t'link' \t\t\t\t=> 'http://code.ubc.ca/studiorum/courses/christina',\n\t\t\t\t\t'content' \t\t\t=> __( '<p>Create assignments - with deadlines - that enable your students to submit their work in a beautiful rich text editor. The student (and peers in their custom user groups) are able to make inline comments to get fine-grained critique.</p>', 'studiorum' ),\n\t\t\t\t\t'content_sidebar' \t=> 'http://dummyimage.com/300x150',\n\t\t\t\t\t'date'\t\t\t\t=> '2014-06-01',\n\t\t\t\t\t'plugins'\t\t\t=> array(\n\t\t\t\t\t\t'gravityforms/gravityforms.php',\n\t\t\t\t\t\t'gravity-forms-custom-post-types/gfcptaddon.php',\n\t\t\t\t\t\t'gravity-forms-wysiwyg/gf_wysiwyg.php',\n\t\t\t\t\t\t'studiorum-lectio/studiorum-lectio.php',\n\t\t\t\t\t\t'studiorum-side-comments/studiorum-side-comments.php',\n\t\t\t\t\t\t'studiorum-user-groups/studiorum-user-groups.php'\n\t\t\t\t\t),\n\t\t\t\t\t'examples' \t\t\t=> array(\n\t\t\t\t\t\t'http://arts.ubc.ca/arts-one/'\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\t\n\t\t\t\t'simon' => array(\n\t\t\t\t\t'id'\t\t\t\t=> 'simon',\n\t\t\t\t\t'title'\t\t\t\t=> 'Simon',\n\t\t\t\t\t'icon' \t\t\t\t=> 'lightbulb',\n\t\t\t\t\t'excerpt' \t\t\t=> 'Enable students to rate each others\\' work simply and easily using a hot-or-not style voting system.',\n\t\t\t\t\t'image' \t\t\t=> 'http://dummyimage.com/308x160/222/fff',\n\t\t\t\t\t'link' \t\t\t\t=> 'http://code.ubc.ca/studiorum/courses/simon',\n\t\t\t\t\t'content' \t\t\t=> __( '<p>Provide a simple way for your students to provide hot-or-not style feedback to easily discover which content is best.</p>', 'studiorum' ),\n\t\t\t\t\t'content_sidebar' \t=> 'http://dummyimage.com/300x150',\n\t\t\t\t\t'date'\t\t\t\t=> '2014-07-01',\n\t\t\t\t\t'plugins'\t\t\t=> array(\n\t\t\t\t\t\t'gravityforms/gravityforms.php',\n\t\t\t\t\t\t'gravity-forms-custom-post-types/gfcptaddon.php',\n\t\t\t\t\t\t'gravity-forms-wysiwyg/gf_wysiwyg.php',\n\t\t\t\t\t\t'studiorum-lectio/studiorum-lectio.php',\n\t\t\t\t\t\t'custom-css-meta-box/custom-css-meta-box.php'\n\t\t\t\t\t),\n\t\t\t\t\t'examples' \t\t\t=> array(\n\t\t\t\t\t\t'http://physics.ubc.ca/'\n\t\t\t\t\t)\n\t\t\t\t),\n\n\t\t\t\t'paul' => array(\n\t\t\t\t\t'id'\t\t\t\t=> 'paul',\n\t\t\t\t\t'title'\t\t\t\t=> 'Paul',\n\t\t\t\t\t'icon' \t\t\t\t=> 'share',\n\t\t\t\t\t'excerpt' \t\t\t=> 'Curate content via delicious.com and show it on your site in a beautiful, searchable, engaging way.',\n\t\t\t\t\t'image' \t\t\t=> 'http://dummyimage.com/308x160/fff/333',\n\t\t\t\t\t'link' \t\t\t\t=> 'http://code.ubc.ca/studiorum/courses/paul',\n\t\t\t\t\t'content' \t\t\t=> __( '<p>Curate and tag content using the popular delicious.com service and then allow students to search quickly and easily to see the content you want them to see.</p>', 'studiorum' ),\n\t\t\t\t\t'content_sidebar' \t=> 'http://dummyimage.com/300x150',\n\t\t\t\t\t'date'\t\t\t\t=> '2014-05-01',\n\t\t\t\t\t'plugins'\t\t\t=> array(\n\t\t\t\t\t\t'studiorum-hon/studiorum-delicious.php'\n\t\t\t\t\t),\n\t\t\t\t\t'examples' \t\t\t=> array(\n\t\t\t\t\t\t'http://sauder.ubc.ca/'\n\t\t\t\t\t)\n\t\t\t\t),\n\n\t\t\t);\n\n\t\t\treturn $groups;\n\n\t\t}",
"public function initUserGroups() {}",
"private function createResourceGroups()\n {\n foreach ($this->api->getServices() as $service) {\n $this->resourceGroups[] = new ResourceGroup($service);\n }\n }",
"function new_groups()\n {\n \n }",
"protected function set_initial_groups()\n {\n $this->_groups = apply_filters('ngg_admin_requirements_manager_groups', array('phpext' => __('NextGen Gallery requires the following PHP extensions to function correctly. Please contact your hosting provider or systems admin and ask them for assistance:', 'nggallery'), 'phpver' => __('NextGen Gallery has degraded functionality because of your PHP version. Please contact your hosting provider or systems admin and ask them for assistance:', 'nggallery'), 'dirperms' => __('NextGen Gallery has found an issue trying to access the following files or directories. Please ensure the following locations have the correct permissions:', 'nggallery')));\n }",
"function rordb_register_cap_groups() {\n\tmembers_register_cap_group(\n\t\t'rordb',\n\t\tarray(\n\t\t\t'label' => __( 'RoRdb', 'rordb-textdomain' ),\n\t\t\t'caps' => array(\n \"rordb_edit_settings\",\n\n \"rordb_view_items\",\n \"rordb_edit_items\",\n \"rordb_create_items\",\n\n \"rordb_view_categories\",\n \"rordb_edit_categories\",\n \"rordb_create_categories\",\n\n \"rordb_view_locations\",\n \"rordb_edit_locations\",\n \"rordb_create_locations\",\n\n \"rordb_view_claimgroups\",\n \"rordb_edit_claimgroups\",\n \"rordb_create_claimgroups\",\n ),\n\t\t\t'icon' => 'dashicons-database',\n\t\t\t'priority' => 10\n\t\t)\n\t);\n}",
"function egsr_add_group_site_roles()\n{\n // Exit if script is run from other than Admin\n if ( !current_user_can('administrator') ) {\n return;\n }\n $group_site_roles = egsr_custom_site_roles();\n foreach ($group_site_roles as $key => $value) {\n $role = get_role($key);\n // Check if Role doesn't exist already\n if(!isset($role->name) == $key){\n // Add role + capabilities\n add_role(\n $key,\n $value['label'],\n $value['caps']\n );\n }\n }\n}",
"function initGroups() {\n $groups = array(0 => array('alias' => 'members',\n 'model' => 'Group',\n 'foreign_key' => 1),\n 1 => array('alias' => 'moderators',\n 'model' => 'Group',\n 'foreign_key' => 2),\n 2 => array('alias' => 'administrators',\n 'model' => 'Group',\n 'foreign_key' => 3));\n\n foreach ($groups as $data) {\n $this->Acl->Aro->create();\n $this->Acl->Aro->save($data);\n }\n }",
"function groups_create_automatic_grouping($courseid, $nostudentspergroup, \n $nogroups, $distribevenly, \n $groupingsettings, \n $groupid = false, \n $alphabetical = false) {\n\t\n\tif (!$nostudentspergroup and !$noteacherspergroup and !$nogroups) {\n\t\t$groupingid = false;\n\t} else {\n\t\t// Set $userids to the list of students that we want to put into groups \n\t\t// in the grouping\n\t\tif (!$groupid) {\n\t\t\t$users = get_course_students($courseid);\n \t\t$userids = groups_users_to_userids($users); \n\t\t} else {\n\t\t\t$userids = groups_get_members($groupid);\n\t\t}\n\t\t\n\t \t// Distribute the users into sets according to the parameters specified \n\t $userarrays = groups_distribute_in_random_sets($userids, \n\t $nostudentspergroup, $nogroups, $distribevenly, !$alphabetical); \n\n\t if (!$userarrays) {\n\t \t$groupingid = false;\n\t } else { \n\t \t// Create the grouping that the groups we create will go into \n\t \t$groupingid = groups_create_grouping($courseid, $groupingsettings);\n\t \t \n\t \t// Get the prefix for the names of each group and default group \n\t \t// description to give each group\n\t \tif (!$groupingsettings->prefix) {\n\t \t\t$prefix = get_string('defaultgroupprefix', 'groups');\n\t \t} else {\n\t \t\t$prefix = $groupingsettings->prefix;\n\t \t}\n\t \t\n\t \tif (!$groupingsettings->defaultgroupdescription) {\n\t \t\t$defaultgroupdescription = '';\n\t \t} else {\n\t \t\t$defaultgroupdescription = $groupingsettings->defaultgroupdescription;\n\t \t}\n\t \t\n\t \t// Now create a group for each set of students, add the group to the \n\t \t// grouping and then add the students\t\n\t \t$i = 1;\n\t\t foreach ($userarrays as $userids) {\n\t\t \t$groupsettings->name = $prefix.' '.$i;\n\t\t \t$groupsettings->description = $defaultgroupdescription;\n\t\t \t$i++;\n\t\t \t$groupid = groups_create_group($courseid, $groupsettings);\n\t\t \t$groupadded = groups_add_group_to_grouping($groupid, \n\t\t \t $groupingid);\n\t\t \tif (!$groupid or !$groupadded) {\n\t\t \t\t$groupingid = false;\n\t\t \t} else {\n\t\t\t\t\tif ($userids) {\n\t\t\t\t\t\tforeach($userids as $userid) {\n\t\t \t\t\t\t$usersadded = groups_add_member($groupid, $userid);\n\t\t\t\t\t\t\t// If unsuccessful just carry on I guess\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t \t}\n\t\t }\n\t }\n\t}\n return $groupingid;\n}",
"public function getGroups() {}",
"static function group(): string { return 'roles'; }",
"function egsr_group_admin_cap(){\n return Array ( \n 'add_users' => true,\n 'create_users' => true,\n 'delete_users' => true,\n 'delete_others_pages' => true,\n 'delete_others_posts' => true,\n 'delete_pages' => true,\n 'delete_posts' => true,\n 'delete_private_pages' => true,\n 'delete_private_posts' => true,\n 'delete_published_pages' => true,\n 'delete_published_posts' => true,\n 'edit_others_pages' => true,\n 'edit_others_posts' => true,\n 'edit_pages' => true,\n 'edit_posts' => true,\n 'edit_private_pages' => true,\n 'edit_private_posts' => true,\n 'edit_published_pages' => true,\n 'edit_published_posts' => true,\n 'edit_users' => true,\n 'list_users' => true,\n 'manage_categories' => true,\n 'manage_links' => true,\n 'moderate_comments' => true,\n 'publish_pages' => true,\n 'publish_posts' => true,\n 'read' => true,\n 'read_private_pages' => true,\n 'read_private_posts' => true,\n 'unfiltered_html' => true,\n 'upload_files' => true,\n );\n}",
"public static function getGroups(): array\r\n {\r\n return [\r\n 'dev',\r\n 'pre',\r\n ];\r\n }",
"public static function getGroups(): array\n {\n return ['user'];\n }",
"function egsr_add_default_wp_roles()\n{\n // Exit if script is run from other than Admin\n if ( !current_user_can('administrator') ) {\n return;\n }\n $group_site_roles = egsr_default_wp_site_roles();\n foreach ($group_site_roles as $key => $value) {\n $role = get_role($key);\n // Check if Role doesn't exist already\n if(!isset($role->name) == $key){\n // Add role + capabilities\n add_role(\n $key,\n $value['label'],\n $value['caps']\n );\n }\n }\n}",
"public function getAclGroups()\n {\n $aclGroupsConfig = include(__DIR__ . '/Acl/AclGroupsConfig.php');\n return $aclGroupsConfig;\n }",
"public function create_group() {\n return random_string(20);\n }",
"public function run()\n\t{\n\t\tDB::table('groups')->delete();\n\t\t// creating super user\n\t\tSentry::getGroupProvider()->create(array(\n\t 'name' => 'SuperUser',\n\t 'permissions' => array(\n\t 'superuser' => 1\n\t )));\n\n\t\tSentry::getGroupProvider()->create(array(\n\t 'name' => 'Branch-Admin',\n\t 'permissions' => array(\n\t 'associate-view' => 1,\n\t 'associate-edit' => 1,\n\t 'associate-delete' => 1,\n\t 'associate-create' => 1,\n\t 'policy-view' => 1,\n\t 'policy-edit' => 1,\n\t 'policy-delete' => 1,\n\t 'policy-create' => 1,\n\t \t'user-view' => 1,\n\t 'user-edit' => 1,\n\t 'user-delete' => 1,\n\t 'user-create' => 1,\n\t 'rank-view' => 1,\n\t 'rank-edit' => 0,\n\t 'rank-delete' => 0,\n\t 'rank-create' => 0,\n\n\t )));\n\n\t\tSentry::getGroupProvider()->create(array(\n\t 'name' => 'Branch-User',\n\t 'permissions' => array(\n\t 'associate-view' => 1,\n\t 'associate-edit' => 0,\n\t 'associate-delete' => 0,\n\t 'associate-create' => 1,\n\t 'policy-view' => 1,\n\t 'policy-edit' => 0,\n\t 'policy-delete' => 0,\n\t 'policy-create' => 1,\n\t \t'user-view' => 1,\n\t 'user-edit' => 0,\n\t 'user-delete' => 0,\n\t 'user-create' => 0,\n\t 'rank-view' => 1,\n\t 'rank-edit' => 0,\n\t 'rank-delete' => 0,\n\t 'rank-create' => 0,\n\t )));\n\n\t}",
"public function run()\n {\n $groups=[\n ['name'=>'普通会员组','is_default'=>true],\n ['name'=>'VIP'],\n ];\n collect($groups)->map(function ($group) {\n Group::create($group);\n });\n }",
"function secGroups($function, $group=NULL) {\n $g=array(\n\t 'setbackuid'=>array('none','admin'),\n\t 'editPref'=>array('admin'),\n\t 'setuid'=>array('admin'),\n\t 'getBookmarks'=>array('none','admin'),\n\t 'getBookmark'=>array('none','admin'),\n\t 'insertBookmark'=>array('none','admin'),\n\t 'procInsertBookmark'=>array('none','admin'),\n\t 'editBookmark'=>array('none','admin'),\n\t 'delBookmark'=>array('none','admin'),\n\t 'procEditBookmark'=>array('none','admin'),\n\t 'procEditPref'=>array('admin'),\n 'sendPasswords'=>array('rw','rwv','admin'),\n\t 'browseSelection'=>array('none','list','ro','rw','rwv','admin'),\n\t 'myAccount'=>array('none','list','ro','rw','rwv','admin'),\n\t 'procEditMyAccount'=>array('none','list','ro','rw','rwv','admin'),\n\t 'getPreferences'=>array('none','list','ro','rw','rwv','admin'),\n\t 'requestAnAccount'=>array('none'),\n\t 'procRequestAnAccount'=>array('none'),\n );\n if(isset($g[$function])) {\n if(!empty($group)) return in_array($group, $g[$function]);\n return $g[$function];\n }\n return parent::secGroups($function,$group);\n }",
"function secGroups($function, $group=NULL) {\n $g=array();\n if (true || $_SERVER['REMOTE_ADDR'] == '80.13.99.120' || $_SERVER['REMOTE_ADDR'] == '78.231.77.57'){\n $g['tests'] = array('none');\n }\n $g['wtsCheckLine'] = array('none');\n $g['ajaxMotDePasse'] = array('none');\n $g['wtsLireOffres'] = array('none');\n $g['viewOffre'] = array('none');\n $g['wtscommande']=array('none');\n $g['wtssaisieforfaits']=array('none');\n $g['wtsCtrlSaisieForfaits'] = array('none');\n $g['wtsCaddieDisp']=array('none');\n $g['wtsAjaxCaddieDisp'] = array('none');\n $g['wtsadd2caddie']=array('none');\n $g['wtsCaddieSuppr']=array('none');\n $g['wtsCaddieToggleLine']=array('none');\n $g['wtsCaddieSupprPack']=array('none'); // a tester\n $g['wtsPreValidateOrder'] = array('none');\n $g['wtsDevis'] = array('none');\n $g['wtsCtrlValidateOrder'] = array('none');\n $g['wtsValidateOrder'] = array('none');\n $g['wtsCtrlValidateCustomerCreation'] = array('none');\n $g['wtsValidateCustomerCreation'] = array('none');\n $g['wtsPrePaiement'] = array('none');\n $g['wtsDisplayOrder'] = array('none');\n $g['wtsCheckWTP'] = array('none');\n $g['wtsAddCard'] = array('none');\n $g['wtsPaiementZero'] = array('none');\n $g['wtsPaiementCheque'] = array('none');\n $g['wtsAdhesion'] = array('none');\n $g['wtsUseReduction'] = array('none');\n \n $g['checkStructures'] = array('admin');\n $g['repairStructures'] = array('admin');\n $g['repairOneStructure'] = array('admin');\n $g['checkSets'] = array('admin');\n $g['verifgrps'] = array('admin');\n $g['verifVentePro'] = array('admin');\n $g['checkEPLProducts'] = array('admin');\n\n $g['getCaddie'] = array('none');\n \n $g['procAuthGroup'] = array('none');\n $g['closeAuthGroup'] = array('none');\n $g['ajaxProcAuthMembre'] = array('none'); // non ecrite\n $g['initCurrentUser'] = array('none');\n $g['closeAuthMembre'] = array('none');\n\n // fonctions de la vente pro\n $g['wtsprolistewtp'] = array('none'); // ro normalement\n $g['wtsproadd2caddie'] = array('none'); // ro normalement\n $g['wtsProPaiement'] = array('none');\n $g['wtsProCancelOrder'] = array('none');\n $g['proAccount'] = array('none');\n // fonctions de la gestion des comtpes clients\n $g['myAccount'] = array('none');\n $g['procCreateMyAccount'] = array('none');\n $g['procEditMyAccount'] = array('none');\n $g['procEditProAccount'] = array('none');\n\n if(isset($g[$function])) {\n if(!empty($group)) return in_array($group, $g[$function]);\n return $g[$function];\n }\n return parent::secGroups($function, $group);\n }",
"public function getAuthorizationGroups(): array;",
"protected function getRegisteredTaskGroups() {}",
"public function getDefaultGroup(): string;",
"function sf_group_def_perms()\n{\n\tglobal $wpdb;\n\n\t# grab the \"default\" permissions if they exist\n\t$noaccess = $wpdb->get_var(\"SELECT role_id FROM \".SFROLES.\" WHERE role_name='No Access'\");\n\tif (!$noaccess) $noaccess = -1;\n\t$readonly = $wpdb->get_var(\"SELECT role_id FROM \".SFROLES.\" WHERE role_name='Read Only Access'\");\n\tif (!$readonly) $readonly = -1;\n\t$standard = $wpdb->get_var(\"SELECT role_id FROM \".SFROLES.\" WHERE role_name='Standard Access'\");\n\tif (!$standard) $standard = -1;\n\t$moderator = $wpdb->get_var(\"SELECT role_id FROM \".SFROLES.\" WHERE role_name='Moderator Access'\");\n\tif (!$moderator) $moderator = -1;\n\n\t$usergroups = $wpdb->get_results(\"SELECT * FROM \".SFUSERGROUPS);\n\t$groups = $wpdb->get_results(\"SELECT group_id FROM \".SFGROUPS);\n\tif ($groups && $usergroups)\n\t{\n\t\tforeach ($groups as $group)\n\t\t{\n\t\t\tforeach ($usergroups as $usergroup)\n\t\t\t{\n\t\t\t\tif ($usergroup->usergroup_name == 'Guests')\n\t\t\t\t{\n\t\t\t\t\t$rid = $readonly;\n\t\t\t\t} else if ($usergroup->usergroup_name == 'Members')\n\t\t\t\t{\n\t\t\t\t\t$rid = $standard;\n\t\t\t\t} else if ($usergroup->usergroup_name == 'Moderators')\n\t\t\t\t{\n\t\t\t\t\t$rid = $moderator;\n\t\t\t\t} else {\n\t\t\t\t\t$rid = $noaccess;\n\t\t\t\t}\n\t\t\t\t$wpdb->query(\"\n\t\t\t\t\tINSERT INTO \".SFDEFPERMISSIONS.\"\n\t\t\t\t\t(group_id, usergroup_id, permission_role)\n\t\t\t\t\tVALUES\n\t\t\t\t\t($group->group_id, $usergroup->usergroup_id, $rid)\");\n\t\t\t}\n\t\t}\n\t}\n}",
"function _get_user_groups(){\r\n $groups = array();\r\n for($i=0; $i<get_sso_option('rules_number'); $i++){\r\n $rule = _get_rule($i);\r\n if($rule != FALSE){\r\n\t $is_group = _run_rule($rule['var'], $rule['regexp'], $rule['group']);\r\n\t if($is_group === TRUE) $groups[] = $rule['group'];\r\n }\r\n }\r\n return $groups;\r\n}",
"function init_groups() {\r\n\tif (!HYPEGALLERY_GROUP_ALBUMS) {\r\n\t\treturn;\r\n\t}\r\n\tadd_group_tool_option('albums', elgg_echo('gallery:groupoption:enable'), true);\r\n\telgg_extend_view('groups/tool_latest', 'framework/gallery/group_module');\r\n}",
"function setup_groups() {\n\t$taxonomy_capabilities = array(\n\t\t'manage_terms' => 'manage_categories',\n\t\t'edit_terms' => 'manage_categories',\n\t\t'delete_terms' => 'manage_categories',\n\t\t'assign_terms' => 'edit_posts',\n\t);\n\n\t$taxonomy_labels = array(\n\t\t'name' => esc_html__( 'External Connection Groups' ),\n\t\t'singular_name' => esc_html__( 'External Connection Group' ),\n\t\t'search_items' => esc_html__( 'Search External Connection Groups' ),\n\t\t'popular_items' => esc_html__( 'Popular External Connection Groups' ),\n\t\t'all_items' => esc_html__( 'All External Connection Groups' ),\n\t\t'parent_item' => esc_html__( 'Parent External Connection Group' ),\n\t\t'parent_item_colon' => esc_html__( 'Parent External Connection Group' ),\n\t\t'edit_item' => esc_html__( 'Edit External Connection Group' ),\n\t\t'update_item' => esc_html__( 'Update External Connection Group' ),\n\t\t'add_new_item' => esc_html__( 'Add New External Connection Group' ),\n\t\t'new_item_name' => esc_html__( 'New External Connection Group Name' ),\n\n\t);\n\t$args = array(\n\t\t'labels' => $taxonomy_labels,\n\t\t'public' => false,\n\t\t'show_ui' => true,\n\t\t'meta_box_cb' => false,\n\t\t'show_tagcloud' => false,\n\t\t'show_in_nav_menus' => false,\n\t\t'hierarchical' => true,\n\t\t'rewrite' => false,\n\t\t'capabilities' => $taxonomy_capabilities,\n\n\t);\n\tregister_taxonomy( 'dt_ext_connection_group', 'dt_ext_connection', $args );\n}"
]
| [
"0.6801822",
"0.6002736",
"0.58066326",
"0.58014464",
"0.57699037",
"0.5735541",
"0.5734269",
"0.56851286",
"0.56514454",
"0.56081796",
"0.55394244",
"0.5489477",
"0.54125464",
"0.5394329",
"0.53917116",
"0.5390111",
"0.5370097",
"0.5364716",
"0.5358532",
"0.5352613",
"0.5340078",
"0.53310937",
"0.5307597",
"0.530345",
"0.5297134",
"0.52871245",
"0.52761626",
"0.5275692",
"0.525306",
"0.52445805"
]
| 0.67792684 | 1 |
Set jQuery param: showAnim | public function setAnimation($param){
$this->_config_mapper(array('showAnim' => $param));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setAnimated($value) {\r\n $this->animated = $value;\r\n }",
"function jquery_loadinganimation_init() {\n $module_path = drupal_get_path('module', 'exam');\n $js_settings = _jquery_loadinganimation_get_settings();\n drupal_add_js(array('jquery_loadinganimation' => $js_settings), 'setting');\n drupal_add_js($module_path . '/js/jquery_loadinganimation.js');\n drupal_add_css($module_path . '/css/jquery_loadinganimation.css');\n}",
"function jquery_loadinganimation_install() {\n // Set general settings.\n variable_set('jquery_loadinganimation_show_on_ajax', FALSE);\n variable_set('jquery_loadinganimation_show_on_href', TRUE);\n variable_set('jquery_loadinganimation_show_on_form_submit', TRUE);\n variable_set('jquery_loadinganimation_close_on_click', TRUE);\n variable_set('jquery_loadinganimation_close_on_esc', TRUE);\n variable_set('jquery_loadinganimation_subselector', '');\n}",
"public function run() {\n $_options = array();\n $_options['animationtype'] = $this->animationType;\n $_options['speed'] = $this->speed;\n $_options['timeout'] = $this->timeout;\n $_options['type'] = $this->type;\n $_options['containerheight'] = $this->containerHeight;\n\n $options = CJavaScript::encode($_options);\n\n $js = \"jQuery('#{$this->element}').innerfade($options);\";\n\n $cs = Yii::app()->getClientScript();\n $cs->registerScript(__CLASS__.'#'.$this->element, $js);\n }",
"function show(){\n\t}",
"public function setShow($val = 'null')\n {\n $this->addParams('show', $val);\n\n return $this;\n }",
"public function createShowModal(){\n $this->modalFormVisible = true;\n }",
"function _jquery_loadinganimation_get_settings() {\n $module_path = drupal_get_path('module', 'exam');\n return array(\n 'module_path' => $module_path,\n 'img_src' => variable_get('jquery_loadinganimation_img_src', $module_path . '/images/jquery_loadinganimation/ajax-loader.gif'),\n 'show_on_ajax' => variable_get('jquery_loadinganimation_show_on_ajax', FALSE),\n 'show_on_href' => variable_get('jquery_loadinganimation_show_on_href', TRUE),\n\t'show_on_form_submit' => variable_get('jquery_loadinganimation_show_on_form_submit', TRUE),\n 'close_on_click' => variable_get('jquery_loadinganimation_close_on_click', TRUE),\n 'close_on_esc' => variable_get('jquery_loadinganimation_close_on_esc', TRUE),\n 'subselector' => variable_get('jquery_loadinganimation_subselector', ''));\n}",
"public function setShowUi($show = NULL ){\n\t\t$this->show_ui = $show ? $show : $this->public;\n\t}",
"public function showImage()\n {\n $gif = new AnimatedGif($this->frames, $this->delays, $this->loops);\n $gif->display();\n }",
"function show()\n {\n }",
"public function animation($animation)\n {\n $this->option('animation', $animation);\n\n return $this;\n }",
"public function toggleShowTimer(): void\n {\n $this->showTimer = !$this->showTimer;\n }",
"public function setHidden(){\n $this->_hidden = true;\n }",
"public function setIsHidden($flag)\n {\n $this->_isHidden = (bool) $flag;\n }",
"function Show()\r\n\t{\r\n\r\n\t}",
"public function animation($value) {\n return $this->setProperty('animation', $value);\n }",
"public function animation($value) {\n return $this->setProperty('animation', $value);\n }",
"public function animation($value) {\n return $this->setProperty('animation', $value);\n }",
"public function setShowInMenu($show = NULL ){\n\t\t$this->showInMenu = isset($show) ? $show : $this->show_ui;\n\t}",
"public function fade($speed = 900) {\r\n\t\t$speed = ((int) $speed < 200 ) ? 300 : $speed;\r\n\r\n\t\t$this->options['effect'] = array(\r\n\t\t\t'fade' => array(\r\n\t\t\t\t'speed' => $speed\r\n\t\t\t)\r\n\t\t);\r\n\r\n\t\t$value = array('effect' => 'fade');\r\n\r\n\t\t$this->options['navigation'] = $this->mergeOption('navigation', $value);\r\n\t\t$this->options['pagination'] = $this->mergeOption('pagination', $value);\r\n\r\n\t\treturn $this;\r\n\t}",
"public function createShowModal()\n {\n $this->resetValidation();\n $this->resetVars();\n $this->modalFormVisible = true;\n }",
"function hide()\n {\n $this->_hidden = true;\n }",
"public static function setShowArchive($paramBool){\n getDatabase()->update(\"settings\",array(\n \"value\" => $paramBool\n ), \"setting = 'show_archive'\");\n Cache::store('show_archive', $paramBool);\n }",
"public function createShowModal()\n {\n $this->resetValidation();\n $this->reset();\n $this->modalFormVisible = true;\n }",
"private function displayJavascript() {\n $this->javascript_is_displayed = TRUE ;\n }",
"public function createShowModal()\n {\n $this->resetValidation();\n $this->reset();\n $this->showModalForm = true;\n }",
"public function setVisibility() {}",
"function show()\n {\n if (!$this->loaded)\n {\n $this->onReload( func_get_arg(0) );\n }\n parent::show();\n }",
"public function animation($value)\n {\n return $this->setProperty('animation', $value);\n }"
]
| [
"0.5865406",
"0.5532385",
"0.5524836",
"0.5094545",
"0.49960297",
"0.49097446",
"0.49047753",
"0.48552394",
"0.48325107",
"0.47908565",
"0.4753761",
"0.47518334",
"0.46917227",
"0.46686888",
"0.46620557",
"0.46072653",
"0.46038592",
"0.46038592",
"0.46038592",
"0.45947656",
"0.4592299",
"0.4591013",
"0.45493388",
"0.45377746",
"0.45325002",
"0.4506948",
"0.4502646",
"0.44993225",
"0.44960165",
"0.44728997"
]
| 0.74300146 | 0 |
Set jQuery params: showOn, buttonImageOnly, buttonImage | public function setIconTrigger($showOn, $btnImageOnly, $btnImage = '') {
if(in_array(strtolower($showOn), array('focus', 'button', 'both'))) {
$this->_config_mapper(Array('showOn' => "'" . $showOn . "'"));
}
if($btnImageOnly) {
$this->_config_mapper(Array('buttonImageOnly' => 'true'));
} else {
$this->_config_mapper(Array('buttonImageOnly' => 'false'));
}
if(!empty($btnImage)){
$this->_config_mapper(Array('buttonImage' => $btnImage));
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function init()\n\t{\n\t\tparent::init();\n\n\t\tif(isset($this->buttons['view']) && isset($this->viewButtonVisible))\n\t\t\t$this->buttons['view']['visible']=$this->viewButtonVisible;\n\t\tif(isset($this->buttons['update']) && isset($this->updateButtonVisible))\n\t\t\t$this->buttons['update']['visible']=$this->updateButtonVisible;\n\t\tif(isset($this->buttons['delete']) && isset($this->deleteButtonVisible))\n\t\t\t$this->buttons['delete']['visible']=$this->deleteButtonVisible;\n\t}",
"public function getButtonCustomizationPage($html='',$show_header=TRUE,$show_footer=TRUE){\n\t\t//if visual settings are submitted\n\t\tif ($_SERVER['REQUEST_METHOD'] == 'POST' &&\n\t\t!empty($_POST['syc-visual-form'])) {\n\n\t\t\t//set the button declaration\n\t\t\t$this->setConfigValue(\"button_type\", $_POST['button_type']);\n\n\t\t\t//set the button skin\n\t\t\t$this->setConfigValue(\"button_skin\", $_POST['button_skin']);\n\n\t\t\t//set the button position\n\t\t\t$this->setConfigValue(\"button_position\", $_POST['button_position']);\n\t\t\t\n\t\t\t//set the button height\n\t\t\t$this->setConfigValue(\"dont_set_height\", empty($_POST['show_on_single_row']));\n\n\t\t\t//set the button html\n\t\t\t$this->setConfigValue(\"button_html\", rawurldecode($_POST['button_html']));\n\n\t\t\t//set the show\n\t\t\t$this->setConfigValue(\"hide_on_product\", empty($_POST['show_on_product']));\n\n\t\t\t//set the show'\n\t\t\t$this->setConfigValue(\"hide_on_checkout\", empty($_POST['show_on_checkout']));\n\t\t\t\n\t\t\t//set button position\n\t\t\t$this->setConfigValue(\"product_button_position\",$_POST['product_button_position']);\n\t\t\t$this->setConfigValue(\"cart_button_position\",$_POST['cart_button_position']);\n\n\t\t\tif($_FILES[\"button-img\"][\"name\"]!='') {\n\n\t\t\t\t$target_path = $this->getUploadDir();\n\t\t\t\tif(!SyC::endsWith($target_path,'/')) $target_path .= '/'; //make sure that the path has a / in it's end\n\t\t\t\t\n\t\t\t\t$target_path = $target_path . 'button-img.png';\n\n\t\t\t\tif(file_exists($target_path)) unlink($target_path);\n\t\t\t\t\n\t\t\t\tlist($width, $height, $type, $attr) = getimagesize($_FILES['button-img']['tmp_name']);\n\t\t\t\t\n\t\t\t\tif (move_uploaded_file($_FILES['button-img']['tmp_name'], $target_path))\n\t\t\t\t{\n\t\t\t\t\t//set the button img\n\t\t\t\t\t$this->setConfigValue(\"btn-img\", $this->getUrl($target_path));\n\t\t\t\t\t$this->setConfigValue(\"btn-img-width\", $width);\n\t\t\t\t\t$this->setConfigValue(\"btn-img-height\", $height);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t//upload failed, so notify the user\n\t\t\t\t\tthrow new Exception(SyC::t('sdk','Cannot upload image to directory {directory}. Check the permissions',array('{directory}',$this->getUploadDir())));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif($_FILES[\"button-img-hover\"][\"name\"]!='') {\n\t\t\t\t$target_path = $this->getUploadDir();\n\t\t\t\tif(!SyC::endsWith($target_path,'/')) $target_path .= '/'; //make sure that the path has a / in it's end\n\n\t\t\t\t$target_path = $target_path . 'btn-img-hover.png';\n\n\t\t\t\tif(file_exists($target_path)) unlink($target_path);\n\t\t\t\t\n\t\t\t\tlist($width, $height, $type, $attr) = getimagesize($_FILES['button-img-hover']['tmp_name']);\n\n\t\t\t\tif(move_uploaded_file($_FILES['button-img-hover']['tmp_name'], $target_path))\n\t\t\t\t{\n\t\t\t\t\t//set the show'\n\t\t\t\t\t$this->setConfigValue(\"btn-img-h\", $this->getUrl($target_path));\n\t\t\t\t\t$this->setConfigValue(\"btn-img-h-width\", $width);\n\t\t\t\t\t$this->setConfigValue(\"btn-img-h-height\", $height);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t//upload failed, so notify the user\n\t\t\t\t\tthrow new Exception(SyC::t('sdk','Cannot upload image to directory {directory}. Check the permissions',array('{directory}',$this->getUploadDir())));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$status_message = SyC::t('sdk','Button settings successfully updated.');\n\t\t}\n\n\t\t//render the view\n\t\treturn $this->renderView('button-settings-page', array(\n\t\t\t'current_button_type' => $this->getConfigValue(\"button_type\"),\n\t\t\t'current_skin' => $this->getConfigValue(\"button_skin\"),\n\t\t\t'current_position' => $this->getConfigValue(\"button_position\"),\n\t\t\t'show_on_checkout' => !$this->getConfigValue(\"hide_on_checkout\"),\n\t\t\t'show_on_product' => !$this->getConfigValue(\"hide_on_product\"),\n\t\t\t'show_on_single_row' => !$this->getConfigValue(\"dont_set_height\"),\n\n\t\t\t'button_html' => $this->getConfigValue(\"button_html\"),\n\t\t\t'button_img' => $this->getUrl($this->getConfigValue(\"btn-img\")),\n\t\t\t'button_img_hover' => $this->getUrl($this->getConfigValue(\"btn-img-h\")),\n\t\t\t\n\t\t\t'html' => $html,\n\t\t\t'show_header' => $show_header,\n\t\t\t'show_footer' => $show_footer,\n\t\t\t'status_message' => @$status_message,\n\t\t));\n\t}",
"public function createShowModal(){\n $this->modalFormVisible = true;\n }",
"public function showButtonPanel($showButtonPanel){\n \n if($showButtonPanel){\n $this->_config_mapper(Array('showButtonPanel' => 'true')); \n } else {\n $this->_config_mapper(Array('showButtonPanel' => 'false')); \n }\n }",
"public function addOptButton($event) {\n\t\t// $event->object = InputfieldFile\n\t\t// $event->object->value = Pagefiles\n\t\t// $event->arguments[0] or $event->argumentsByName('pagefile') = Pagefile\n\n\t\t$file = $event->argumentsByName('pagefile');\n\n\t\tif(!in_array($file->ext, $this->allowedExtensions)) return; // not an image file\n\n\t\t$id = $file->page->id;\n\t\t$url = $this->wire('config')->urls->admin . 'module/edit?name=' . __CLASS__ .\n\t\t\t\t\t \"&mode=optimize&id=$id&file=$id,{$file->basename}\";\n\t\t$title = $this->_('Optimize image');\n\t\t$text = $this->_('Optimize');\n\t\t$optimizing = $this->_('Optimizing');\n\t\tif($this->isOptimizedOnUpload) $text = $this->_('Optimized on upload');\n\n\t\tif(stripos($event->return, 'InputfieldFileName') !== false) {\n\t\t\t// InputfieldFileName class found, used in PW versions up to 3.0.17\n\t\t\t$link = \"<a href='$url' data-optimizing='$optimizing' class='InputfieldImageOptimize' title='$title'>$text</a>\";\n\t\t\tif(stripos($event->return, '</p>') !== false) { // insert link right before </p>\n\t\t\t\t$event->return = str_replace('</p>', $link . '</p>', $event->return);\n\t\t\t}\n\t\t} else if(stripos($event->return, 'InputfieldImageButtonCrop') !== false) {\n\t\t\t// new version with button\n\t\t\t// there is also InputfieldImage::renderButtons hook\n\t\t\t$link = \"<a href='$url&var=1' title='$title'>$text</a>\";\n\t\t\t//if($this->wire('user')->admin_theme == 'AdminThemeUikit') {\n\t\t\t//\t$b = \"<button type='button' data-href='$url' data-optimizing='$optimizing' class='InputfieldImageOptimize1 uk-button uk-button-text uk-margin-right'>\";\n\t\t\t//} else {\n\t\t\t\t$b = \"<button type='button' data-href='$url' data-optimizing='$optimizing' class='InputfieldImageOptimize1 ui-button ui-corner-all ui-state-default'>\";\n\t\t\t//}\n\t\t\t$b .= \"<span class='ui-button-text'><span class='fa fa-leaf'></span><span> $text</span></span></button>\";\n\t\t\tif(stripos($event->return, '</small>') !== false) { // insert button right before </small> as the last (third) button, after Crop and Variations buttons\n\t\t\t\t$event->return = str_replace('</small>', $b . '</small>', $event->return);\n\t\t\t}\n\t\t} else {\n\t\t\t$this->log->save('addOptButton: class InputfieldFileName/InputfieldImageButtonCrop not found');\n\t\t}\n\n\t}",
"protected function setEditButtons()\n {\n global $APPLICATION;\n\n if (!$APPLICATION->GetShowIncludeAreas() || $this->showEditButtons === false)\n {\n return false;\n }\n\n $buttons = \\CIBlock::GetPanelButtons(\n $this->arParams['IBLOCK_ID'],\n $this->arResult['ID'],\n $this->arParams['SECTION_ID'],\n []\n );\n\n $this->addIncludeAreaIcons(\\CIBlock::GetComponentMenu($APPLICATION->GetPublicShowMode(), $buttons));\n\n if (is_array($buttons['intranet']))\n {\n Asset::getInstance()->addJs(BX_ROOT.'/js/main/utils.js');\n\n foreach ($buttons['intranet'] as $button)\n {\n $this->addEditButton($button);\n }\n }\n }",
"private function modifyPreviewModeSettings() {\n\t\t$params = $this->slider->getParams();\n\t\t$params['js_to_body'] = 'false';\n\n\t\t$this->slider->setParams( $params );\n\t}",
"public function init()\n {\n parent::init();\n $this->clientOptions = false;\n Html::addCssClass($this->options, ['widget' => 'btn']);\n }",
"private function setButtons()\n {\n $this->createFolderButton = config('godesk.filemanager.buttons.create_folder', true);\n $this->uploadButton = config('godesk.filemanager.buttons.upload_button', true);\n $this->dragAndDropUpload = config('godesk.filemanager.buttons.upload_drag', true);\n $this->renameFolderButton = config('godesk.filemanager.buttons.rename_folder', true);\n $this->deleteFolderButton = config('godesk.filemanager.buttons.delete_folder', true);\n $this->renameFileButton = config('godesk.filemanager.buttons.rename_file', true);\n $this->deleteFileButton = config('godesk.filemanager.buttons.delete_file', true);\n $this->downloadFileButton = config('godesk.filemanager.buttons.download_file', true);\n }",
"public function showImage()\n {\n }",
"function add_photocrati_media_buttons()\r\n{\r\n\techo _media_button('Add an Image', 'images/media-button-image.gif', 'image', 'add_image');\r\n\techo _media_button('Add Video', 'images/media-button-video.gif', 'video', 'add_video');\r\n\techo _media_button('Add Audio', 'images/media-button-music.gif', 'audio', 'add_audio');\r\n}",
"function costum_setting_LogoImages_callback() {\n\t\n\t$LogoImages = esc_attr( get_option( 'logoImages' ) ); ?>\n\n\t<div class=\"input-text-container\">\n\t\t<input name=\"logoImages\" value=\"<?php echo $LogoImages; ?>\" class=\"image_er_link\" type=\"hidden\">\n\t\t<button id=\"Author_Info_Image\">Upload Image</button>\n\t</div>\n\t<div class=\"show_image logo-image-show\">\n\t\t<img src=\"<?php echo $LogoImages; ?>\" />\n\t<?php\n}",
"function settings()\r\n\t\t{\r\n\t\t\tJRequest::setVar( 'view', 'qrcode' );\r\n\t\t\tJRequest::setVar( 'layout', 'settings' );\r\n\t\t\tJRequest::setVar( 'hidemainmenu', 0 );\r\n\t\t\tparent::display();\r\n\t\t}",
"function slide_show()\n \t{\n // Setup show\n $show = ( $this->ipsclass->input['show'] == 'first' ) ? 0 : $this->ipsclass->input['show'];\n\n // Figure out if the user has chosen a value, or if we should go with a default\n $sort_key = ( $this->ipsclass->input['sort_key'] ) ? $this->ipsclass->input['sort_key'] : 'date';\n $order_key = ( $this->ipsclass->input['order_key'] ) ? $this->ipsclass->input['order_key'] : 'DESC';\n $prune_key = ( $this->ipsclass->input['prune_key'] ) ? $this->ipsclass->input['prune_key'] : '30';\n\n if( ! empty( $this->ipsclass->input['cat'] ) )\n {\n $where = \"category_id=\". intval( $this->ipsclass->input['cat'] );\n }\n else\n {\n $where = \"album_id=\". intval( $this->ipsclass->input['album'] );\n }\n\n // Get the picture\n $this->ipsclass->DB->cache_add_query( 'slideshow_image', \n\t\t\t\t\t\t\t array( 'where' => $where,\n\t\t\t\t\t\t\t\t\t 'prune' => $prune,\n 'sort_key' => $sort_key,\n 'order_key' => $order_key,\n 'show' => $show,\n\t\t\t\t\t\t\t), 'gallery_sql_queries' );\t\t\t\t\t\t\t\t\t \n $this->ipsclass->DB->simple_exec();\n \n // Show it\n $i = $this->ipsclass->DB->fetch_row();\n\n if( $this->ipsclass->DB->get_num_rows() )\n {\n $show++;\n $photo = $this->glib->make_image_link( $i );\n $type = ( $this->ipsclass->input['cat'] ) ? \"&cat={$this->ipsclass->input['cat']}\" : \"&album={$this->ipsclass->input['album']}&mid={$i['mid']}\";\n $hfoff = ( $this->ipsclass->input['hfoff'] ) ? \"&hfoff=1\" : \"\";\n\t\t\t\t$close = ( $this->ipsclass->input['closewindow'] ) ? \"&closewindow=1\" : \"\";\n\t\t\t\t$url = \"{$this->ipsclass->base_url}automodule=gallery&cmd=slideshow&show={$show}&duration={$this->ipsclass->input['duration']}&sort_key={$this->ipsclass->input['sort_key']}&order_key={$this->ipsclass->input['order_key']}&prune_key={$this->ipsclass->input['prune_key']}{$type}{$hfoff}{$close}\";\n $this->output .= $this->html->ss_slide( $photo, $url, $i['id'] );\n }\n else\n {\n if( ! empty( $this->ipsclass->input['cat'] ) )\n {\n $url = \"automodule=gallery&cmd=sc&cat={$this->ipsclass->input['cat']}\";\n }\n else\n {\n $url = \"automodule=gallery&cmd=user&user={$this->ipsclass->input['mid']}&op=view_album&album={$this->ipsclass->input['album']}\";\n }\n\n\t\t\t\tif( $this->ipsclass->input['closewindow'] )\n\t\t\t\t{\n\t\t\t\t\techo '<html><body onload=\"javascript:window.close();\"></html>';\n\t\t\t\t\tdie();\n\t\t\t\t}\n \n $this->ipsclass->print->redirect_screen( $this->ipsclass->lang['ss_end'], $url );\n }\n\n // Page Info\n $this->title = $this->ipsclass->vars['board_name'].$this->ipsclass->lang['sep'].$this->ipsclass->lang['gallery'];\n $this->nav[] = \"<a href='\".$this->ipsclass->base_url.\"automodule=gallery'>Gallery</a>\";\n $this->nav[] = $i['caption'];\n\t\t\t\n // -------------------------------------------------------\n // Stat Update!\n // -------------------------------------------------------\n $this->ipsclass->DB->simple_update( 'gallery_images', 'views=views+1', \"id={$i['id']}\", 1 );\n $this->ipsclass->DB->simple_exec();\n\n\t\t\tif( $this->ipsclass->input['hfoff'] )\n\t\t\t{\n\t\t\t\t$this->ipsclass->print->pop_up_window( $this->title, $this->output );\n\t\t\t}\n }",
"public function set_button($button) { $this->button = $button; }",
"public function createShowModal()\n {\n $this->resetValidation();\n $this->resetVars();\n $this->modalFormVisible = true;\n }",
"protected function _prepareFilterButtons()\n {\n $this->addChild(\n 'refresh_button',\n 'Magento\\Backend\\Block\\Widget\\Button',\n ['label' => __('Refresh'), 'onclick' => \"{$this->getJsObjectName()}.doFilter();\", 'class' => 'task']\n );\n }",
"protected function _addButtons()\r\n\t{\r\n\t\t$model = $this->getModel();\r\n\t\t$params\t= $model->getParams();\r\n\t\t$this->showEmail = $params->get('email', 0);\r\n\t\t$this->emailLink = '';\r\n\t\t$this->printLink = '';\r\n\t\t$this->pdfLink = '';\r\n\t\t$this->showPrint = $params->get('print', 0);\r\n\r\n\t\tif ($this->showPrint) {\r\n\t\t\t$text = JHTML::_('image.site', 'printButton.png', '/images/', NULL, NULL, JText::_('Print'));\r\n\t\t\t$this->printLink = '<a href=\"#\" onclick=\"window.print();return false;\">'.$text.'</a>';\r\n\t\t}\r\n\r\n\t\tif (JRequest::getVar('tmpl') != 'component') {\r\n\t\t\tif ($this->showEmail) {\r\n\t\t\t\t$this->emailLink = FabrikHelperHTML::emailIcon($model, $params);\r\n\t\t\t}\r\n\r\n\t\t\tif ($this->showPrint) {\r\n\t\t\t\t$this->printLink = FabrikHelperHTML::printIcon($model, $params, $model->_rowId);\r\n\t\t\t}\r\n\r\n\t\t\t$this->showPDF = $params->get('pdf', 0);\r\n\t\t\tif ($this->showPDF) {\r\n\t\t\t\t$this->pdfLink = FabrikHelperHTML::pdfIcon($model, $params, $model->_rowId);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\t$this->showPDF = false;\r\n\t\t}\r\n\t}",
"protected function prepareButtons()\n\t{\n\t\tparent::prepareButtons();\n\t\t$this->xt->assign(\"save_button\", false);\n\t\t$this->xt->assign(\"view_page_button\", false );\n\t\t\n\t\t$this->xt->assign(\"updsel_button\", true);\n\t\t$this->xt->assign(\"updselbutton_attrs\", \"id=\\\"saveButton\".$this->id.\"\\\"\" );\n\t\t\n\t\t$label = str_replace( \"%n%\", $this->nSelected, \"Update %n% records\" );\n\t\t$this->xt->assign(\"update_selected\", $label );\n\t}",
"public function header_image_init()\n\t{\n\t\tglobal $pagenow;\n\t if ( 'media-upload.php' == $pagenow || 'async-upload.php' == $pagenow )\n\t {\n\t add_filter( 'gettext', array( $this, 'header_image_button_text' ), 1, 3 );\n\t }\n\t}",
"public function SetPanelSettings()\n\t{\n\t\t$GLOBALS['ISC_CLASS_PRODUCT'] = GetClass('ISC_PRODUCT');\n\t\t$id = $GLOBALS['ISC_CLASS_PRODUCT']->GetProductId();\n\t\t// How many tags do we have?\n\t\t$query = \"\n\t\t\tSELECT p.* , pi.imagefilethumb\n\t\t\tFROM isc_products p\n\t\t\tINNER JOIN isc_product_associations pa ON ( \n\t\t\t\tpa.assocbaseid = \" . $id . \" AND pa.assocprodid = p.productid\n\t\t\t) \n\t\t\tINNER JOIN isc_product_images pi ON ( \n\t\t\t\tpi.imageprodid = pa.assocprodid AND pi.imageisthumb = 1\n\t\t\t) \n\t\t\";\n\t\t$result = $GLOBALS['ISC_CLASS_DB']->Query($query);\n\t\t\n\t\t$GLOBALS['SNIPPETS']['ProductMadeByList'] = '';\n\t\twhile($row = $GLOBALS['ISC_CLASS_DB']->Fetch($result)) {\n\t\t\t$GLOBALS['ComponentImg'] = GetConfig('ShopPath') . '/' . GetConfig('ImageDirectory') . '/' . $row['imagefilethumb'];\n\t\t\t$GLOBALS['ComponentName'] = $row['prodname'];\n\t\t\t$GLOBALS['ComponentLink'] = ProdLink($row['prodname']);\n\t\t\t$GLOBALS['SNIPPETS']['ProductMadeByList'] .= $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet('ProductMadeByItem');\n\t\t}\n\t\t\n\t\tif($GLOBALS['SNIPPETS']['ProductMadeByList'] == '') {\n\t\t\t$this->DontDisplay = true;\n\t\t}\n\t}",
"public static function edit_image()\n{\n\n\n\t/*\n\t* Change Background\n\t*/\n\n\t/*\n\t* Change other setting\n\t*/\n}",
"function youtubeJStoFrontHead(){\n\n\n\n // require_once(dirname(__FILE__).'/../../peepso-core/activity/classes/activity.php');\n // $newAcctive = new PeepSoActivity;\n // echo 'test function output: ' . $newAcctive->test() . '<br/>';\n\n $button_image = get_option( 'button_image' );\n\n if(get_option( 'custom_button' ) == 1){\n echo '<style>\n .oembed .start-video {\n background: url('.$button_image.') no-repeat;\n height: 24%;\n width: 14%;\n left: 43%;\n top: 38%; \n position: absolute;\n cursor: pointer;\n z-index: 9;\n background-size: contain !important;\n }\n </style>';\n }else{\n echo '<style>\n .oembed .start-video { \n display: none;\n }\n </style>';\n }\n\n }",
"public function setHidden(){\n $this->_hidden = true;\n }",
"protected function buttons()\r\n\t{\r\n\t\t$this->buttons = new stdClass();\r\n\t\t$buttonProperties = array('class' => 'fabrikTip', 'opts' => \"{notice:true}\", 'title' => '<span>'.JText::_('COM_FABRIK_EXPORT_TO_CSV').'</span>');\r\n\t\t$this->buttons->csvexport = FabrikHelperHTML::image('csv-export.png', 'list', $this->tmpl, $buttonProperties);\r\n\t\t$buttonProperties['title'] = '<span>'.JText::_('COM_FABRIK_IMPORT_FROM_CSV').'</span>';\r\n\t\t$this->buttons->csvimport = FabrikHelperHTML::image('csv-import.png', 'list', $this->tmpl, $buttonProperties);\r\n\t\t$buttonProperties['title'] = '<span>'.JText::_('COM_FABRIK_SUBSCRIBE_RSS').'</span>';\r\n\t\t$this->buttons->feed = FabrikHelperHTML::image('feed.png', 'list', $this->tmpl, $buttonProperties);\r\n\t\t$buttonProperties['title'] = '<span>'.JText::_('COM_FABRIK_EMPTY').'</span>';\r\n\t\t$this->buttons->empty = FabrikHelperHTML::image('trash.png', 'list', $this->tmpl, $buttonProperties);\r\n\r\n\t\t$buttonProperties['title'] = '<span>'.JText::_('COM_FABRIK_GROUP_BY').'</span>';\r\n\t\t$this->buttons->groupby = FabrikHelperHTML::image('group_by.png', 'list', $this->tmpl, $buttonProperties);\r\n\r\n\t\t$buttonProperties['title'] = '<span>'.JText::_('COM_FABRIK_FILTER').'</span>';\r\n\t\t$this->buttons->filter = FabrikHelperHTML::image('filter.png', 'list', $this->tmpl, $buttonProperties);\r\n\r\n\t\t$buttonProperties['title'] = '<span>'.JText::_('COM_FABRIK_ADD').'</span>';\r\n\t\t$this->buttons->add = FabrikHelperHTML::image('add.png', 'list', $this->tmpl, $buttonProperties);\r\n\t}",
"public function image($arrData)\n {\n \\JS::registerCSS(substr(ASCMS_CORE_MODULE_FOLDER . '/MediaBrowser/View/Style/mediabrowser.css', 1));\n global $objDatabase, $objTemplate, $_ARRAYLANG;\n\n $this->strPageTitle = $_ARRAYLANG['TXT_SETTINGS_IMAGE'];\n $objTemplate->addBlockfile('ADMIN_CONTENT', 'settings_image', 'settings_image.html');\n \n \\ContrexxJavascript::getInstance()->setVariable(array(\n 'publicTempPath' => Cx::instanciate()->getWebsitePublicTempWebPath(),\n ), 'config/image');\n\n // Saves the settings\n if (isset($arrData['submit'])) {\n $arrSettings['image_cut_width'] = contrexx_input2db(intval($arrData['image_cut_width']));\n $arrSettings['image_cut_height'] = contrexx_input2db(intval($arrData['image_cut_height']));\n //$arrSettings['image_scale_width'] = contrexx_input2db(intval($arrData['image_scale_width']));\n //$arrSettings['image_scale_height'] = contrexx_input2db(intval($arrData['image_scale_height']));\n $arrSettings['image_compression'] = contrexx_input2db(intval($arrData['image_compression']));\n\n foreach ($arrSettings as $name => $value) {\n $query = '\n UPDATE `'.DBPREFIX.'settings_image`\n SET `value` = \"'.$value.'\"\n WHERE `name` = \"'.$name.'\"\n ';\n $objResult = $objDatabase->Execute($query);\n if ($objResult === false) {\n throw new \\Exception('Could not update the settings');\n }\n }\n\n $this->strOkMessage = $_ARRAYLANG['TXT_SETTINGS_UPDATED'];\n }\n\n /**\n * @var $cx \\Cx\\Core\\Core\\Controller\\Cx\n */\n $cx = \\Env::get('cx');\n $pdo = $cx->getDb()->getPdoConnection();\n $sth = $pdo->query('SELECT id, name, size FROM `' . DBPREFIX . 'settings_thumbnail`');\n $thumbnails = $sth->fetchAll();\n\n $newThumbnailTemplate\n = new \\Cx\\Core\\Html\\Sigma($cx->getCodeBasePath());\n $newThumbnailTemplate->loadTemplateFile($cx->getCodeBaseCorePath() .'/Config/View/Template/Backend/settings_image_edit.html');\n $newThumbnailTemplate->removeUnknownVariables = false;\n $newThumbnailTemplate->setVariable(\n array(\n 'TXT_IMAGE_TITLE' => $_ARRAYLANG['TXT_SETTINGS_IMAGE_TITLE'],\n 'TXT_IMAGE_CSRF' => \\Cx\\Core\\Csrf\\Controller\\Csrf::param(),\n 'TXT_IMAGE_THUMBNAILS_DELETE' => $_ARRAYLANG['TXT_IMAGE_THUMBNAILS_DELETE'],\n 'TXT_IMAGE_CUT_WIDTH' => $_ARRAYLANG['TXT_SETTINGS_IMAGE_CUT_WIDTH'],\n 'TXT_IMAGE_CUT_HEIGHT' => $_ARRAYLANG['TXT_SETTINGS_IMAGE_CUT_HEIGHT'],\n 'TXT_IMAGE_THUMBNAILS' => $_ARRAYLANG['TXT_IMAGE_THUMBNAILS'],\n //'TXT_IMAGE_SCALE_WIDTH' => $_ARRAYLANG['TXT_SETTINGS_IMAGE_SCALE_WIDTH'],\n //'TXT_IMAGE_SCALE_HEIGHT' => $_ARRAYLANG['TXT_SETTINGS_IMAGE_SCALE_HEIGHT'],\n 'TXT_IMAGE_COMPRESSION' => $_ARRAYLANG['TXT_SETTINGS_IMAGE_COMPRESSION'],\n 'TXT_SAVE' => $_ARRAYLANG['TXT_SAVE'],\n 'TXT_IMAGE_THUMBNAILS_ID' => $_ARRAYLANG['TXT_IMAGE_THUMBNAILS_ID'],\n 'TXT_IMAGE_THUMBNAILS_NAME' => $_ARRAYLANG['TXT_IMAGE_THUMBNAILS_NAME'],\n 'TXT_IMAGE_THUMBNAILS_SIZE' => $_ARRAYLANG['TXT_IMAGE_THUMBNAILS_SIZE'],\n 'TXT_SETTINGS_FUNCTIONS' => $_ARRAYLANG['TXT_SETTINGS_FUNCTIONS'],\n 'TXT_IMAGE_THUMBNAILS_RELOAD' => $_ARRAYLANG['TXT_IMAGE_THUMBNAILS_RELOAD'],\n 'TXT_IMAGE_THUMBNAILS_NEW' => $_ARRAYLANG['TXT_IMAGE_THUMBNAILS_NEW'],\n\n 'TXT_IMAGE_THUMBNAILS_MAX_SIZE' => $_ARRAYLANG['TXT_IMAGE_THUMBNAILS_MAX_SIZE'],\n 'SETTINGS_IMAGE_CUT_WIDTH' => !empty($arrSettings['image_cut_width']) ? $arrSettings['image_cut_width']\n : 0,\n 'SETTINGS_IMAGE_CUT_HEIGHT' => !empty($arrSettings['image_cut_height'])\n ? $arrSettings['image_cut_height'] : 0,\n //'SETTINGS_IMAGE_SCALE_WIDTH' => !empty($arrSettings['image_scale_width']) ? $arrSettings['image_scale_width'] : 0,\n //'SETTINGS_IMAGE_SCALE_HEIGHT' => !empty($arrSettings['image_scale_height']) ? $arrSettings['image_scale_height'] : 0,\n )\n );\n\n $objTemplate->setVariable(\n 'CONFIG_THUMBNAIL_NEW_TEMPLATE',\n implode(' ', explode(\"\\n\", str_replace(\"'\", \"\\\"\", $newThumbnailTemplate->get())))\n );\n\n foreach ($thumbnails as $thumbnail) {\n $objTemplate->setVariable(\n array(\n 'IMAGE_THUMBNAIL_ID' => $thumbnail['id'],\n 'IMAGE_THUMBNAIL_NAME' => $thumbnail['name'],\n 'IMAGE_THUMBNAIL_SIZE' => $thumbnail['size'],\n 'TXT_IMAGE_THUMBNAILS_MAXIMUM' => sprintf($_ARRAYLANG['TXT_IMAGE_THUMBNAILS_MAXIMUM'], $thumbnail['size'].'px'),\n )\n );\n\n $objTemplate->parse('settings_image_thumbnails_list');\n }\n\n\n // Gets the settings\n $query = '\n SELECT `name`, `value`\n FROM `'.DBPREFIX.'settings_image`\n ';\n $objResult = $objDatabase->Execute($query);\n if ($objResult !== false) {\n $arrSettings = array();\n while (!$objResult->EOF) {\n // Creates the settings array\n $arrSettings[$objResult->fields['name']] = $objResult->fields['value'];\n $objResult->MoveNext();\n }\n } else {\n throw new \\Exception('Could not query the settings.');\n }\n\n // Defines the compression values\n $arrCompressionOptions = array();\n\n for ($i = 1; $i <= 20 ; $i++) {\n $arrCompressionOptions[] = $i * 5;\n }\n\n // Parses the compression options\n $imageCompression = !empty($arrSettings['image_compression']) ? intval($arrSettings['image_compression']) : 95;\n foreach ($arrCompressionOptions as $compression) {\n $objTemplate->setVariable(array(\n 'IMAGE_COMPRESSION_VALUE' => $compression,\n 'IMAGE_COMPRESSION_NAME' => $compression,\n 'OPTION_SELECTED' => $compression == $imageCompression ? 'selected=\"selected\"' : '',\n ));\n $objTemplate->parse('settings_image_compression_options');\n }\n\n // Parses the settings\n $objTemplate->setVariable(\n array(\n 'TXT_IMAGE_TITLE' => $_ARRAYLANG['TXT_SETTINGS_IMAGE_TITLE'],\n 'TXT_IMAGE_CSRF' => \\Cx\\Core\\Csrf\\Controller\\Csrf::param(),\n 'TXT_IMAGE_THUMBNAILS_DELETE' => $_ARRAYLANG['TXT_IMAGE_THUMBNAILS_DELETE'],\n 'TXT_IMAGE_CUT_WIDTH' => $_ARRAYLANG['TXT_SETTINGS_IMAGE_CUT_WIDTH'],\n 'TXT_IMAGE_CUT_HEIGHT' => $_ARRAYLANG['TXT_SETTINGS_IMAGE_CUT_HEIGHT'],\n 'TXT_IMAGE_THUMBNAILS' => $_ARRAYLANG['TXT_IMAGE_THUMBNAILS'],\n //'TXT_IMAGE_SCALE_WIDTH' => $_ARRAYLANG['TXT_SETTINGS_IMAGE_SCALE_WIDTH'],\n //'TXT_IMAGE_SCALE_HEIGHT' => $_ARRAYLANG['TXT_SETTINGS_IMAGE_SCALE_HEIGHT'],\n 'TXT_IMAGE_COMPRESSION' => $_ARRAYLANG['TXT_SETTINGS_IMAGE_COMPRESSION'],\n 'TXT_SAVE' => $_ARRAYLANG['TXT_SAVE'],\n 'TXT_IMAGE_THUMBNAILS_ID' => $_ARRAYLANG['TXT_IMAGE_THUMBNAILS_ID'],\n 'TXT_IMAGE_THUMBNAILS_NAME' => $_ARRAYLANG['TXT_IMAGE_THUMBNAILS_NAME'],\n 'TXT_IMAGE_THUMBNAILS_SIZE' => $_ARRAYLANG['TXT_IMAGE_THUMBNAILS_SIZE'],\n 'TXT_SETTINGS_FUNCTIONS' => $_ARRAYLANG['TXT_SETTINGS_FUNCTIONS'],\n 'TXT_IMAGE_THUMBNAILS_RELOAD' => $_ARRAYLANG['TXT_IMAGE_THUMBNAILS_RELOAD'],\n 'TXT_IMAGE_THUMBNAILS_NEW' => $_ARRAYLANG['TXT_IMAGE_THUMBNAILS_NEW'],\n\n 'TXT_IMAGE_THUMBNAILS_MAX_SIZE' => $_ARRAYLANG['TXT_IMAGE_THUMBNAILS_MAX_SIZE'],\n 'SETTINGS_IMAGE_CUT_WIDTH' => !empty($arrSettings['image_cut_width']) ? $arrSettings['image_cut_width']\n : 0,\n 'SETTINGS_IMAGE_CUT_HEIGHT' => !empty($arrSettings['image_cut_height'])\n ? $arrSettings['image_cut_height'] : 0,\n //'SETTINGS_IMAGE_SCALE_WIDTH' => !empty($arrSettings['image_scale_width']) ? $arrSettings['image_scale_width'] : 0,\n //'SETTINGS_IMAGE_SCALE_HEIGHT' => !empty($arrSettings['image_scale_height']) ? $arrSettings['image_scale_height'] : 0,\n )\n );\n $objTemplate->parse('settings_image');\n\n \\Cx\\Core\\Csrf\\Controller\\Csrf::add_placeholder($objTemplate);\n\n return true;\n }",
"public function showNewClientButton()\n {\n $this->_showNewClientButton = true;\n }",
"function ed_setting_show_media_buttons_callback(){\n\techo '<input\n\tname=\"ed_setting_show_media_buttons\"\n\tid=\"ed_setting_show_media_buttons\"\n\ttype=\"checkbox\"\n\tvalue=\"1\"\n\tclass=\"code\"\n\t' . checked(1, get_option('ed_setting_show_media_buttons'), false).' />\n\tChoose if media buttons should be enabled';\n}",
"function setDefaultWhenVisible() {\n $equations = array();\n list($branching_fields, ) = (function_exists('getBranchingFields')) ?\n getBranchingFields($_GET['page']) :\n \\DataEntry::getBranchingFields($_GET['page']);\n\n foreach ($branching_fields as $field => $equation) {\n list($equations[$field], ) = LogicTester::formatLogicToJS($equation, false, $_GET['event_id'], true);\n }\n\n // More current versions of REDCap do not have all js libraries loaded in time\n $this->setJsSetting('versionMod', version_compare(REDCAP_VERSION, '9.4.1', '>='));\n\n $this->setJsSetting('defaultWhenVisible', array('branchingEquations' => $equations));\n $this->includeJs('js/default_when_visible.js');\n }",
"function showButton($line, $buttonStyle) {\n// $line['name'], $line['image1'], $line['articleId'], $line['unit']\n if($line['unit'] == \"g\") {\n// $price = \"CHF \" . number_format($line['pricePerQuantity'] * 100, 2, \".\", \"\") . \"/100g\";\n $weight = \"<input type=hidden value=1 id=quantity_\" . $line['articleId'] . \">\";\n\t\t$price = formatMoney($line['pricePerQuantity']);\n }\n else if($line['unit'] == \"Stk.\") { \n// $price = \"CHF \" . number_format($line['pricePerQuantity'], 2, \".\", \"\") . \"/Stk.\";\n $weight = \"<input type=hidden value=1 id=quantity_\" . $line['articleId'] . \">\";\n\t\t$price = formatMoney($line['pricePerQuantity']);\n }\n else {\n// $price = \"CHF \" . number_format($line['pricePerQuantity'], 2, \".\", \"\");\n $weight = \"<input type=hidden value=1 id=quantity_\" . $line['articleId'] . \">\";\n\t\t$price = \"\";\n }\n\n\n ?>\n <div class=\"articleButton <? echo(\"$buttonStyle\"); ?>\" id=<? echo($line['articleId']); ?> onclick=\"addArticleToBasket(this.id)\"\n\t\tstyle=\"background-image: url('<? echo(\"./images/articles/\".$line['image1']); ?>');\">\n\t\t<!--\t<div class=articlePackageDiv><? echo($line['package']); ?></div> -->\n\t\t<!--\t<? echo(\"<img class=articleImageLarge src=images/articles/\".$line['image1'].\">\"); ?> -->\n\t\t<!--\t<div class=articlePriceDiv><? echo($price); ?></div> -->\n <p class=\"articleButtonText\"><? echo($line['name']); ?></p>\n </div>\n <? \n}"
]
| [
"0.5634563",
"0.5525744",
"0.5367824",
"0.53665644",
"0.5284996",
"0.52413917",
"0.521483",
"0.517427",
"0.5147277",
"0.51294315",
"0.51248723",
"0.5093885",
"0.5081075",
"0.5040973",
"0.5036373",
"0.5015135",
"0.5011129",
"0.49773154",
"0.49744514",
"0.49605867",
"0.49593577",
"0.49442056",
"0.4908438",
"0.49064973",
"0.49052176",
"0.49023136",
"0.49013022",
"0.48989853",
"0.48885435",
"0.4883221"
]
| 0.6283972 | 0 |
Set jQuery params: minDate, maxDate | public function setMinMaxDate($minDate = 'null', $maxDate = 'null') {
if($minDate != 'null'){
$this->_config_mapper(Array('minDate' => "'" . $minDate . "'"));
}
if($maxDate != 'null'){
$this->_config_mapper(Array('maxDate' => "'" . $maxDate . "'"));
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setMinMaxDate($minDate, $maxDate) {\r\n $this->setMinMax($minDate->toDouble(), $maxDate->toDouble());\r\n }",
"private function setFilter(): void\n {\n // start date is set\n if ($this->getRequest()->query->has('start_date') && $this->getRequest()->query->get('start_date', '') !== '') {\n // redefine\n $startDate = $this->getRequest()->query->get('start_date', '');\n\n // explode date parts\n $chunks = explode('/', $startDate);\n\n // valid date\n if (count($chunks) == 3 && checkdate((int) $chunks[1], (int) $chunks[0], (int) $chunks[2])) {\n $this->filter['start_date'] = $startDate;\n } else {\n // invalid date\n $this->filter['start_date'] = '';\n }\n } else {\n // not set\n $this->filter['start_date'] = '';\n }\n\n // end date is set\n if ($this->getRequest()->query->has('end_date') && $this->getRequest()->query->get('end_date', '') !== '') {\n // redefine\n $endDate = $this->getRequest()->query->get('end_date', '');\n\n // explode date parts\n $chunks = explode('/', $endDate);\n\n // valid date\n if (count($chunks) == 3 && checkdate((int) $chunks[1], (int) $chunks[0], (int) $chunks[2])) {\n $this->filter['end_date'] = $endDate;\n } else {\n // invalid date\n $this->filter['end_date'] = '';\n }\n } else {\n // not set\n $this->filter['end_date'] = '';\n }\n }",
"public function setDateCriterion($fieldName, \\DateTimeInterface $minDate = null, \\DateTimeInterface $maxDate = null)\n {\n $this->validateFieldName($fieldName, 'Field name is required and must be a non-empty string.');\n\n if ($minDate == null && $maxDate == null) {\n throw new \\InvalidArgumentException('At least one of min or max date must be provided');\n }\n\n $this->dateCriterionField = $fieldName;\n $this->dateCriterionMin = $minDate;\n $this->dateCriterionMax = $maxDate;\n\n return $this;\n }",
"function setParam()\n {\n $this->rFromDate = '0000-00-00';\n $this->rToDate = date('Y-m-d');\n $this->rAllDate = false;\n $this->rColumns = array();\n }",
"protected function set_date_range_parameters($adjust_empty_vals = TRUE)\n\t{\n\t\tif ($this->P->value('date_range_start') !== FALSE AND\n\t\t\t$this->P->value('date_range_end') === FALSE)\n\t\t{\n\t\t\t$this->CDT->change_ymd($this->P->value('date_range_start', 'ymd'));\n\n\t\t\tif ($this->P->value('show_years') > 0 OR\n\t\t\t\t$this->P->value('show_months') > 0 OR\n\t\t\t\t$this->P->value('show_weeks') > 0 OR\n\t\t\t\t$this->P->value('show_days') > 0)\n\t\t\t{\n\t\t\t\t$this->P->set('date_range_end', $this->P->params['date_range_start']['value']);\n\n\t\t\t\tif ($this->P->value('show_years') > 0)\n\t\t\t\t{\n\t\t\t\t\t $this->CDT->add_year($this->P->value('show_years') -1, TRUE, 'forward');\n\t\t\t\t}\n\t\t\t\telse if ($this->P->value('show_months') > 0)\n\t\t\t\t{\n\t\t\t\t\t$this->CDT->add_month(($this->P->value('show_months') - 1), TRUE, 'forward');\n\t\t\t\t}\n\t\t\t\telse if ($this->P->value('show_weeks') > 0)\n\t\t\t\t{\n\t\t\t\t\t//get the current day of week (1-7)\n\t\t\t\t\t$dow\t\t= $this->CDT->get_day_of_week(\n\t\t\t\t\t\t$this->CDT->year,\n\t\t\t\t\t\t$this->CDT->month,\n\t\t\t\t\t\t$this->CDT->day\n\t\t\t\t\t) + 1;\n\n\t\t\t\t\t//first day of week\n\t\t\t\t\t$fdow \t\t= $this->get_first_day_of_week();\n\n\t\t\t\t\t//we need to calculate 2 weeks backwards, counting today (-1) removing the remaining\n\t\t\t\t\t//days of the week, MINUS the first day of the week...\n\t\t\t\t\t//this will give is first day of the week, x weeks forward, counting this week as a full\n\t\t\t\t\t//week regardless of the day\n\n\t\t\t\t\t$this->CDT->add_day(( 7 * $this->P->value('show_weeks') ) - ($dow - $fdow));\n\t\t\t\t}\n\t\t\t\telse if ($this->P->value('show_days') > 0)\n\t\t\t\t{\n\t\t\t\t\t$this->CDT->add_day($this->P->value('show_days') - 1);\n\t\t\t\t}\n\n\t\t\t\t$end = $this->CDT->datetime_array();\n\n\t\t\t\t$end[\"time\"]\t= \"2359\";\n\t\t\t\t$end[\"hour\"]\t= '23';\n\t\t\t\t$end[\"minute\"]\t= '59';\n\n\t\t\t\t$this->P->set('date_range_end', $end);\n\t\t\t}\n\t\t}\n\t\telseif ($this->P->value('date_range_start') === FALSE AND\n\t\t\t\t$this->P->value('date_range_end') !== FALSE)\n\t\t{\n\t\t\t$this->CDT->change_ymd($this->P->value('date_range_end', 'ymd'));\n\n\t\t\tif ($this->P->value('show_years') > 0 OR\n\t\t\t\t$this->P->value('show_months') > 0 OR\n\t\t\t\t$this->P->value('show_weeks') > 0 OR\n\t\t\t\t$this->P->value('show_days') > 0)\n\t\t\t{\n\t\t\t\tif ($this->P->value('show_years') > 0)\n\t\t\t\t{\n\t\t\t\t\t$this->CDT->add_year(-$this->P->value('show_years') + 1, TRUE, 'backward');\n\t\t\t\t}\n\t\t\t\telse if ($this->P->value('show_months') > 0)\n\t\t\t\t{\n\t\t\t\t\t$this->CDT->add_month(-$this->P->value('show_months') + 1, TRUE, 'backward');\n\t\t\t\t}\n\t\t\t\telse if ($this->P->value('show_weeks') > 0)\n\t\t\t\t{\n\t\t\t\t\t//get the current day of week (1-7)\n\t\t\t\t\t$dow\t\t= $this->CDT->get_day_of_week(\n\t\t\t\t\t\t$this->CDT->year,\n\t\t\t\t\t\t$this->CDT->month,\n\t\t\t\t\t\t$this->CDT->day\n\t\t\t\t\t) + 1;\n\n\t\t\t\t\t//first day of week\n\t\t\t\t\t$fdow \t\t= $this->get_first_day_of_week();\n\n\t\t\t\t\t//we need to calculate 2 weeks backwards, counting today (+1) removing the remaining\n\t\t\t\t\t//days of the week, MINUS the first day of the week...\n\t\t\t\t\t//this will give is first day of the week, x weeks back, counting this week as a full\n\t\t\t\t\t//week regardless of the day\n\t\t\t\t\t$this->CDT->add_day(( -7 * $this->P->value('show_weeks') ) + 1 + (7 - ($dow - $fdow)));\n\t\t\t\t}\n\t\t\t\telse if ($this->P->value('show_days') > 0)\n\t\t\t\t{\n\t\t\t\t\t$this->CDT->add_day(-$this->P->value('show_days') + 1);\n\t\t\t\t}\n\n\t\t\t\t$this->P->set('date_range_start', $this->CDT->datetime_array());\n\t\t\t}\n\t\t}\n\t\telseif ($adjust_empty_vals === TRUE AND\n\t\t\t\t$this->P->value('date_range_start') === FALSE AND\n\t\t\t\t$this->P->value('date_range_end') === FALSE)\n\t\t{\n\t\t\t$this->P->set('date_range_start', $this->CDT->datetime_array());\n\n\t\t\tif ($this->P->value('show_years') > 0 OR\n\t\t\t\t$this->P->value('show_months') > 0 OR\n\t\t\t\t$this->P->value('show_weeks') > 0 OR\n\t\t\t\t$this->P->value('show_days') > 0)\n\t\t\t{\n\t\t\t\tif ($this->P->value('show_years') > 0)\n\t\t\t\t{\n\t\t\t\t\t $this->CDT->add_year($this->P->value('show_years') -1, TRUE, 'forward');\n\t\t\t\t}\n\t\t\t\telse if ($this->P->value('show_months') > 0)\n\t\t\t\t{\n\t\t\t\t\t$this->CDT->add_month(($this->P->value('show_months') - 1), TRUE, 'forward');\n\t\t\t\t}\n\t\t\t\telse if ($this->P->value('show_weeks') > 0)\n\t\t\t\t{\n\t\t\t\t\t//get the current day of week (1-7)\n\t\t\t\t\t$dow\t\t= $this->CDT->get_day_of_week(\n\t\t\t\t\t\t$this->CDT->year,\n\t\t\t\t\t\t$this->CDT->month,\n\t\t\t\t\t\t$this->CDT->day\n\t\t\t\t\t) + 1;\n\n\t\t\t\t\t//first day of week\n\t\t\t\t\t$fdow \t\t= $this->get_first_day_of_week();\n\n\t\t\t\t\t//we need to calculate 2 weeks backwards, counting today (-1) removing the remaining\n\t\t\t\t\t//days of the week, MINUS the first day of the week...\n\t\t\t\t\t//this will give is first day of the week, x weeks forward, counting this week as a full\n\t\t\t\t\t//week regardless of the day\n\n\t\t\t\t\t$this->CDT->add_day(( 7 * $this->P->value('show_weeks') ) - ($dow - $fdow));\n\t\t\t\t}\n\t\t\t\telse if ($this->P->value('show_days') > 0)\n\t\t\t\t{\n\t\t\t\t\t$this->CDT->add_day($this->P->value('show_days') - 1);\n\t\t\t\t}\n\n\t\t\t\t$end = $this->CDT->datetime_array();\n\n\t\t\t\t$end[\"time\"]\t= \"2359\";\n\t\t\t\t$end[\"hour\"]\t= '23';\n\t\t\t\t$end[\"minute\"]\t= '59';\n\n\t\t\t\t$this->P->set('date_range_end', $end);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$end = $this->P->params['date_range_start']['value'];\n\n\t\t\t\t$end[\"time\"]\t= \"2359\";\n\t\t\t\t$end[\"hour\"]\t= '23';\n\t\t\t\t$end[\"minute\"]\t= '59';\n\n\t\t\t\t$this->P->set('date_range_end', $end);\n\n\t\t\t\t//$this->P->set('date_range_end', $this->P->value('date_range_start'));\n\t\t\t}\n\t\t}\n\t}",
"public function setDateRestrictions($start, $end)\n\t{\n\t\t$this->setStartDate($start);\n\t\t$this->setEndDate($end);\n\t}",
"public function setMinMax($min, $max) {\r\n $this->automatic = false;\r\n $this->automaticMinimum = false;\r\n $this->automaticMaximum = false;\r\n\r\n if ($min > $max) { // swap\r\n $tmp = $min;\r\n $min = $max;\r\n $max = $tmp;\r\n }\r\n\r\n $this->internalSetMinimum($min);\r\n $this->internalSetMaximum($max);\r\n if (($this->maximumvalue - $this->minimumvalue) < self::$MINAXISRANGE) {\r\n $this->internalSetMaximum($this->minimumvalue + self::$MINAXISRANGE);\r\n }\r\n }",
"function getDateRangePicker(){\n\treturn array('last60days'=>'Last 60 Days','today'=>'Today','thisweek'=>'This Week (Mon to Sun)','lastweek'=>'Last Week (Mon to Sun)','thismonth'=>'This Month','lastmonth'=>'Last Month','last6months'=>'Last 6 Months','thisyear'=>'This Year','custom'=>'Custom');\n}",
"private function setDate(){\n\t// Validate incoming parameters\n\t\t$this->di->logger->stamp(__CLASS__, __METHOD__, '');\n\tif (isset($_GET['month'])) {\n\t\tis_numeric($_GET['month']) or die('month has to be numeric');\n\t}\n\tif (isset($_GET['year'])) {\n\t\tis_numeric($_GET['year']) or die('year has to be numeric');\n\t}\n\n\t// Set new date\n\t$this->newMonth = isset($_GET['month']) ? ($_GET['month']) : $this->currentMonth;\n\t$this->newYear = isset($_GET['year']) ? ($_GET['year']) : $this->currentYear;\n\n\tif ($this->newMonth > 12) {\n\t\t$this->newYear = $this->newYear +1;\n\t\t$this->newMonth = 1;\n\t\t$_GET['month'] = 1;\n\n\t}\n\telse if ($this->newMonth < 1) {\n\t\t$this->newYear = $this->newYear -1;\n\t\t$this->newMonth = 12;\n\t\t$_GET['month'] = 12;\n\t}\n\t\n\t}",
"public function setDates($dates);",
"public function SetDateRange($aStart, $aEnd)\n\t{\n\t\t// Adjust the start and end so that the indicate the\n\t\t// begining and end of respective start and end days\n\t\tif (strpos($aStart, ':') === false) {\n\t\t\t$aStart = date('Y-m-d 00:00', strtotime($aStart));\n\t\t}\n\n\t\tif (strpos($aEnd, ':') === false) {\n\t\t\t$aEnd = date('Y-m-d 23:59', strtotime($aEnd));\n\t\t}\n\n\t\t$this->scale->SetRange($aStart, $aEnd);\n\t}",
"function date_forbid() {\n if (empty($this->argument)) {\n return TRUE;\n }\n $this->date_range = $this->date_handler->arg_range($this->argument);\n $this->min_date = $this->date_range[0];\n $this->max_date = $this->date_range[1];\n $this->limit = date_range_years($this->options['year_range']);\n $group = !empty($this->options['date_group']) ? $this->options['date_group'] : 0;\n\n // See if we're outside the allowed date range for our argument.\n if (date_format($this->min_date, 'Y') < $this->limit[0] || date_format($this->max_date, 'Y') > $this->limit[1]) {\n $this->forbid = TRUE;\n $this->view->build_info['fail'] = TRUE;\n return TRUE;\n }\n return FALSE;\n }",
"protected function parseDatePickerConfig()\n\t{\n\t\t$config = null;\n\t\tif($this->getMinuteStepSize())\n\t\t{\n\t\t\t$config['stepping'] = (int)$this->getMinuteStepSize();\n\t\t}\n\t\tif($this->getStartYear())\n\t\t{\n\t\t\t$config['minDate'] = $this->getStartYear().'-01-01';\n\t\t}\t\t\t\t\t\n\t\treturn $config;\n\t}",
"private function initDateParams ($date)\n\t{\n\t\t$this->monthNames = $this->getMonthNames();\n\t\t$this->dayNames = $this->getDayNames(); \n\t\t$this->setValidDateRange();\n\t\t$this->numMonthDays = $this->date->format('t');\n\t\t$this->setNextMonth($date);\n\t\t$this->setPrevMonth($date);\n\t\t$this->firstDayOfWeek = $this->date->format('w');\n\t\t$this->numWeeks = ceil(($this->getFirstDayOfWeek() + $this->getNumMonthDays()) / 7);\n\t}",
"public static function onChangeStartDate($param=NULL)\n {\n if (empty($param['end_date']) AND !empty($param['start_date']))\n {\n $obj = new stdClass;\n $obj->end_date = $param['start_date'];\n TForm::sendData('form_event', $obj);\n }\n }",
"public function date($data,$between);",
"public function setDate($date);",
"public function adjustMaxMin() {\r\n $tmp = new FloatRange();\r\n $this->calcMinMax($tmp);\r\n $this->minimumvalue = $tmp->min;\r\n $this->maximumvalue = $tmp->max;\r\n $this->iMaximum = $this->maximumvalue;\r\n $this->iMinimum = $this->minimumvalue;\r\n $this->internalCalcRange();\r\n }",
"function enableDatePicker($startYear=false,$endYear=false,$link=false,$button=false){\n\tif ($link) $this->urlPicker=$link;\n\telse $this->urlPicker=$_SERVER['PHP_SELF'];\n\tif ($startYear && $endYear){\n\t\tif ($startYear>=$this->startYear && $startYear<$this->endYear) $this->startYear=$startYear;\n\t\tif ($endYear>$this->startYear && $endYear<=$this->endYear) $this->endYear=$endYear;\n\t}\n\tif ($button) $this->selBtn=$button;\n$this->datePicker=true;\n}",
"public function set(){\r\n\t\t$js = new \\wp\\htmlManager\\js();\r\n\t\t$js->addPlugin(\"jquery.plugin\",true);\r\n\t\t$js->addPlugin(\"jquery.datepick\",true);\r\n\t\t$js->addPlugin(\"jquery.datepick-fr\");\r\n\t\t\r\n\t\t\\wp\\Tpl\\templateEngine::getEngine()->addContent(\"js\",$js);\r\n\t\t\r\n\t\t// Ajoute le script d'ouverture du datepicker\r\n\t\t$this->toControls();\r\n\t\t\r\n\t\t// Ajoute les CSS\r\n\t\t$css = new \\wp\\htmlManager\\css();\r\n\t\t$css->addSheet(\"jquery.datepick\");\r\n\t\t\r\n\t\t\\wp\\Tpl\\templateEngine::getEngine()->addContent(\"css\",$css);\r\n\t}",
"function formatDateParams() {\n $session = CRM_Core_Session::singleton();\n $dateType = $session->get('dateTypes');\n $setDateFields = array_intersect_key($this->_params, array_flip($this->_dateFields));\n foreach ($setDateFields as $key => $value) {\n CRM_Utils_Date::convertToDefaultDate($this->_params, $dateType, $key);\n $this->_params[$key] = CRM_Utils_Date::processDate($this->_params[$key]);\n }\n }",
"function setStartDate($start_date = \"\") \n\t{\n\t\t$this->start_date = $start_date;\n\t}",
"public function minDate($minDate): self\n {\n if ($minDate instanceof DateTimeObject) {\n $minDate = $minDate->format($this->getFormat());\n }\n $this->attributes(['minDate' => $minDate]);\n return $this;\n }",
"function getMinMaxForRange($date_start, $date_end) {\n $query = \"SELECT MIN(price) AS minPrice,\n MAX(price) AS maxPrice\n FROM np_data\n WHERE (\n (date BETWEEN '$date_start' AND '$date_end' AND hour != '23')\n OR (date = ($date_start - INTERVAL 1 DAY) AND hour = '23')\n )\";\n if ($result = $this->link->query($query)) {\n /* free result set */\n $row = mysqli_fetch_array($result);\n $result->close();\n $resultArray = array (\n 'min' => $row['minPrice'],\n 'max' => $row['maxPrice']\n );\n return $resultArray;\n }\n }",
"public function addRange($min, $max)\n {\n $this->range = \"$min to $max\";\n array_push($this->options, array(\"options\" => array(\"min_range\" => $min, \"max_range\" => $max)));\n }",
"public function setValue( $value )\n {\n if ( isset($value['from']) && isset($value['to']) )\n {\n $this->minDate->setValue($value['from']);\n $this->maxDate->setValue($value['to']);\n }\n\n return $this;\n }",
"public static function setHasDateRestrictionsAttributes($instance, $attributes)\n\t{\n\t\t$instance->setDateRestrictions($attributes['dateStart'], $attributes['dateEnd']);\n\t}",
"function options(&$options) {\r\n parent::options($options);\r\n $options['date_fields'] = array();\r\n $options['year_range'] = '-3:+3';\r\n $options['date_method'] = 'OR';\r\n $options['granularity'] = 'month';\r\n }",
"function setArticleCountsRange($min, $max)\n\t{\n\t\t$this->validate['articles_count']['range']['rule'][1] = $min-1;\n\t\t$this->validate['articles_count']['range']['rule'][2] = $max+1;\n\t}",
"function setMin($min) {\n $this->field['min'] = (int) $min;\n\n return $this;\n }"
]
| [
"0.67372954",
"0.59364897",
"0.5883318",
"0.57690585",
"0.57052",
"0.5564721",
"0.5560985",
"0.5523682",
"0.55008084",
"0.54079777",
"0.532863",
"0.5322418",
"0.52361155",
"0.5219683",
"0.5208982",
"0.51432866",
"0.5142769",
"0.51232296",
"0.5114214",
"0.51087546",
"0.5084568",
"0.5082034",
"0.5081288",
"0.50692654",
"0.5018292",
"0.5002738",
"0.49918002",
"0.49905238",
"0.49803117",
"0.4979543"
]
| 0.71662825 | 0 |
Set jQuery params: showWeek, firstDay | public function showWeek($showWeek, $firstDay = 0) {
if($showWeek) {
$this->_config_mapper(Array('showWeek' => 'true'));
} else {
$this->_config_mapper(Array('showWeek' => 'false'));
}
$this->_config_mapper(Array('firstDay' => $firstDay));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function setFirstWeekDay($daynum){\n\tif ($daynum==0) $this->startOnSun=true;\n\telse $this->startOnSun=false;\n}",
"public function setShowWeekDayNum($sw=false)\n\t{\n\t\t$this->addWeekDay = $sw;\n\t}",
"public function setWeekDate($a = null, $b = null, $c = null)\n {\n throw new NotImplementedException(__METHOD__);\n }",
"function handleCalendar( $showID, $dates=null, $venueWPID=\"\", $mobile = false ) {\n $monthVal;\n if ( $dates == null ) {\n\n $showID = $_POST['data']['showID'];\n \n $monthVal = $_POST['data']['monthVal'];\n\n $venueWPID = $_POST['data']['venueVal'];\n \n $mobile = isset($_POST['data']['mobile'])? true : false;\n \n // grab \"week\" variable from $_POST, if set, use that to build start and end dates, else call \"getDates\"\n $week = $_POST['data']['week'];\n\n $today = new DateTime('today');\n // if there's no week value, and the selected month matches current month, choose current week\n if ( $week == \"\" && $today->format('n') - 1 == $monthVal ) {\n $start = new DateTime();\n $start->setISODate( $today->format('Y'), $today->format('W'), 0);\n $week = $start->format('Y-m-d');\n }\n\n //echo \"Week is $week\";\n if ( $week != '' ) {\n $trashDate = new DateTime( $week );\n $dates['start'] = new DateTime( $trashDate->format( 'Y-m-d' ) );\n $trashDate->modify( \"+6 days\" );\n $dates['end'] = new DateTime( $trashDate->format( 'Y-m-d' ) );\n } else if ( $week == '' ) {\n // check if current month matches selected month, select current week if so\n $today = new DateTime();\n if ( $today->format('n')-1 == $monthVal) {\n $week = $today->format('W');\n //printDat($week);\n }\n $dates = getDates( $week, $monthVal );\n }\n //var_dump($dates);\n //wp_die();\n }\n\n /*echo \"<pre>\";\n print_r($dates);\n echo \"</pre>\";*/\n\n // set previous and next week variables\n $prevWeek = new DateTime( $dates[\"start\"]->format(\"Y-m-d\") );\n $prevWeek->modify( \"-1 week\" );\n $nextWeek = new DateTime( $dates[\"start\"]->format(\"Y-m-d\") );\n $nextWeek->modify( \"+1 week\" );\n \n $fullEvents = getShowEvents( $showID, $venueWPID, $dates['start']->format( \"Y-m-d\" ), $dates['end']->format( \"Y-m-d\" ) );\n\n if($mobile){\n return array(\n 'events' => $fullEvents,\n 'week' => $nextWeek\n );\n }\n /*echo \"<pre>\";\n print_r($fullEvents);\n echo \"</pre>\";*/\n\n // for each event, create a new array containing their ID, day of the week and time; push that into events array\n $events;\n foreach( $fullEvents as $event ) {\n $daDate = new DateTime( $event->time );\n $toInsert = array (\n \"id\" => $event->id,\n \"hour\" => $daDate->format( 'G' ),\n \"minute\"=> $daDate->format( 'i' ),\n \"day\" => $daDate->format( 'w' )\n );\n $events[] = $toInsert;\n }\n\n\n // new DateTime to hold current start date...will be used to iterate over and populate the day headers without messing with the dates array\n $currWeek = new DateTime( $dates['start']->format(\"Y-m-d\") );\n \n //start building out the HTML that will display the calendar\n $html = \"<div class='cal-nav'><a id='prev-week-btn'><input type='hidden' id='prev-week' value='\" . $prevWeek->format('Y-m-d') . \"' /><img src='\" . get_template_directory_uri() . \"/library/assets/icons/dotted-arrow.png' /></a>\";\n $html .= \"<span id='date-range'>\" . $dates['start']->format('M j') . \" - \" . $dates['end']->format( 'M j' ) . \"</span>\";\n $html .= \"<a id='next-week-btn'><input type='hidden' id='next-week' value='\" . $nextWeek->format('Y-m-d') . \"' /><img src='\" . get_template_directory_uri() . \"/library/assets/icons/dotted-arrow.png' /></a></div>\";\n $html .= \"<table id='events-calendar'><tr class='days-heading'>\";\n\n // while loop to create the day of the week headers (complete month/day indications)\n $cntr = 0;\n while( $cntr < 7 ) {\n $html .= \"<td>\" . $currWeek->format( 'D n/j' ) . \"</td>\";\n $currWeek->modify( '+1 day' );\n $cntr++;\n }\n $html .= \"</tr>\"; // finish off the day headings row\n\n // another loop, this one to populate in events on each day\n $cntr = 0;\n $html .= \"<tr>\";\n if ( isset( $events ) ) {\n while( $cntr < 7 ) {\n $html .= \"<td>\";\n\n // cycle through events array, grabbing any for current day (based on \"day\" value)\n foreach( $events as $event ) {\n\n $url = home_url( '/' ) . \"tickets/?eventID=\" . $event['id'];\n if( $event['day'] == $cntr ) {\n // build time variable, including converting from 24 hour to 12 hour time\n if ( $event['hour'] > 12 ) {\n $time = $event['hour']-12 . \":\" . $event['minute'] . \" PM\";\n } else {\n $time = $event['hour'] . \":\" . $event['minute'] . \" AM\";\n }\n \n $html .= \"<a href='\" . $url . \"' class='show-time' id='\" . $event['id'] . \"' >\" . $time . \"</a>\";\n }\n }\n $html .= \"</td>\";\n $cntr++;\n }\n } else {\n $html .= \"<td colspan='7'>No events for this week</td>\";\n }\n $html .= \"</tr>\";\n\n $html .= \"<tr><td colspan='7' style='height: 50px'> </td></tr>\";\n\n $html .= \"</table>\";\n\n\n echo $html;\n\n if( $_POST ) {\n wp_die();\n }\n}",
"public function week()\n\t{\n\t\t// -------------------------------------\n\t\t// Load 'em up\n\t\t// -------------------------------------\n\n\t\t$this->load_calendar_datetime();\n\t\t$this->load_calendar_parameters();\n\n\t\t// -------------------------------------\n\t\t// Prep the parameters\n\t\t// -------------------------------------\n\n\t\t$disable = array(\n\t\t\t'categories',\n\t\t\t'category_fields',\n\t\t\t'custom_fields',\n\t\t\t'member_data',\n\t\t\t'pagination',\n\t\t\t'trackbacks'\n\t\t);\n\n\t\t$params = array(\n\t\t\tarray(\n\t\t\t\t'name' => 'category',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'string',\n\t\t\t\t'multi' => TRUE\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'site_id',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'integer',\n\t\t\t\t'min_value' => 1,\n\t\t\t\t'multi' => TRUE,\n\t\t\t\t'default' => $this->data->get_site_id()\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'calendar_id',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'string',\n\t\t\t\t'multi' => TRUE\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'calendar_name',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'string',\n\t\t\t\t'multi' => TRUE\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'event_id',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'string',\n\t\t\t\t'multi' => TRUE\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'event_name',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'string',\n\t\t\t\t'multi' => TRUE\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'event_limit',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'integer'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'status',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'string',\n\t\t\t\t'multi' => TRUE,\n\t\t\t\t'default' => 'open'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'date_range_start',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'date'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'time_range_start',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'time',\n\t\t\t\t'default' => '0000'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'time_range_end',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'time',\n\t\t\t\t'default' => '2400'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'enable',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'string',\n\t\t\t\t'default' => '',\n\t\t\t\t'multi' => TRUE,\n\t\t\t\t'allowed_values' => $disable\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'first_day_of_week',\n\t\t\t\t'required' => FALSE,\n\t\t\t\t'type' => 'integer',\n\t\t\t\t'default' => $this->first_day_of_week\n\t\t\t)\n\t\t);\n\n\t\t//ee()->TMPL->log_item('Calendar: Processing parameters');\n\n\t\t$this->add_parameters($params);\n\n\t\t// -------------------------------------\n\t\t// Need to modify the starting date?\n\t\t// -------------------------------------\n\n\t\t$this->first_day_of_week = $this->P->value('first_day_of_week');\n\n\t\tif ($this->P->value('date_range_start') === FALSE)\n\t\t{\n\t\t\t$this->P->set('date_range_start', $this->CDT->datetime_array());\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->CDT->change_date(\n\t\t\t\t$this->P->value('date_range_start', 'year'),\n\t\t\t\t$this->P->value('date_range_start', 'month'),\n\t\t\t\t$this->P->value('date_range_start', 'day')\n\t\t\t);\n\t\t}\n\n\t\t$drs_dow = $this->P->value('date_range_start', 'day_of_week');\n\n\t\tif ($drs_dow != $this->first_day_of_week)\n\t\t{\n\t\t\tif ($drs_dow > $this->first_day_of_week)\n\t\t\t{\n\t\t\t\t$offset = ($drs_dow - $this->first_day_of_week);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$offset = (7 - ($this->first_day_of_week - $drs_dow));\n\t\t\t}\n\n\t\t\t$this->P->set('date_range_start', $this->CDT->add_day(-$offset));\n\t\t}\n\n\t\t// -------------------------------------\n\t\t// Define parameters specific to this calendar view\n\t\t// -------------------------------------\n\n\t\t$this->CDT->change_ymd($this->P->value('date_range_start', 'ymd'));\n\t\t$this->P->set('date_range_end', $this->CDT->add_day(6));\n\t\t$this->P->set('pad_short_weeks', FALSE);\n\n\t\t// -------------------------------------\n\t\t// Define our tagdata\n\t\t// -------------------------------------\n\n\t\t$find = array(\n\t\t\t'EVENTS_PLACEHOLDER',\n\t\t\t'{/',\n\t\t\t'{',\n\t\t\t'}'\n\t\t);\n\n\t\t$replace = array(\n\t\t\tee()->TMPL->tagdata,\n\t\t\tLD.T_SLASH,\n\t\t\tLD,\n\t\t\tRD\n\t\t);\n\n\t\tee()->TMPL->tagdata = str_replace(\n\t\t\t$find,\n\t\t\t$replace,\n\t\t\t$this->view(\n\t\t\t\t'week.html',\n\t\t\t\tarray(),\n\t\t\t\tTRUE,\n\t\t\t\t$this->sc->addon_theme_path . 'templates/week.html'\n\t\t\t)\n\t\t);\n\n\t\t// -------------------------------------\n\t\t// Tell TMPL what we're up to\n\t\t// -------------------------------------\n\n\t\tif (strpos(ee()->TMPL->tagdata, LD.'events'.RD) !== FALSE)\n\t\t{\n\t\t\tee()->TMPL->var_pair['events'] = TRUE;\n\t\t}\n\n\t\tif (strpos(ee()->TMPL->tagdata, LD.'display_each_hour'.RD) !== FALSE)\n\t\t{\n\t\t\tee()->TMPL->var_pair['display_each_hour'] = TRUE;\n\t\t}\n\n\t\tif (strpos(ee()->TMPL->tagdata, LD.'display_each_day'.RD) !== FALSE)\n\t\t{\n\t\t\tee()->TMPL->var_pair['display_each_day'] = TRUE;\n\t\t}\n\n\t\tif (strpos(ee()->TMPL->tagdata, LD.'display_each_week'.RD) !== FALSE)\n\t\t{\n\t\t\tee()->TMPL->var_pair['display_each_week'] = TRUE;\n\t\t}\n\n\t\t// -------------------------------------\n\t\t// If you build it, they will know what's going on.\n\t\t// -------------------------------------\n\n\t\t$this->parent_method = __FUNCTION__;\n\n\t\treturn $this->build_calendar();\n\t}",
"function setWeekNumber(){ //prelievo weeknumber \r\n if (isset($_GET['weekNumber']))\r\n $weekNumber = $_GET['weekNumber'];\r\n else\r\n $weekNumber = \"\";\r\n\r\n return $weekNumber;\r\n }",
"function week_of() {\n\n\n\t// Make the week of pull-down menu:\n\tprint 'week of: ';\n\tprint '<select name=\"monday\">';\n\t//print '<option value=\\\"-28dayslastMonday\\\">'; print date('l, F j Y', strtotime('-28 days last Monday')); print '</option>';\n\t//print '<option value=\\\"-21dayslastMonday\\\">'; print date('l, F j Y', strtotime('-21 days last Monday')); print '</option>';\n\t//print '<option value=\\\"-14dayslastMonday\\\">'; print date('l, F j Y', strtotime('-14 days last Monday')); print '</option>';\n\t//print '<option value=\\\"-7dayslastMonday\\\">'; print date('l, F j Y', strtotime('-7 days last Monday')); print '</option>';\n\tprint '<option value=\\\"lastMonday\\\">'; print date('l, F j Y', strtotime('last Monday')); print '</option>';\n\tprint '<option value=\\\"firstMonday\\\">'; print date('l, F j Y', strtotime('first Monday')); print '</option>';\n\tprint '<option value=\\\"secondMonday\\\">'; print date('l, F j Y', strtotime('second Monday')); print '</option>';\n\tprint '<option value=\\\"thirdMonday\\\">'; print date('l, F j Y', strtotime('third Monday')); print '</option>';\n\tprint '<option value=\\\"fourthMonday\\\">'; print date('l, F j Y', strtotime('fourth Monday')); print '</option>';\n\tprint '<option value=\\\"+7daysfourthMonday\\\">'; print date('l, F j Y', strtotime('+7 days fourth Monday')); print '</option>';\n\tprint '<option value=\\\"+14daysfourthMonday\\\">'; print date('l, F j Y', strtotime('+14 days fourth Monday')); print '</option>';\n\tprint '<option value=\\\"+21daysfourthMonday\\\">'; print date('l, F j Y', strtotime('+21 days fourth Monday')); print '</option>';\n\tprint '<option value=\\\"+28daysfourthMonday\\\">'; print date('l, F j Y', strtotime('+28 days fourth Monday')); print '</option>';\n\tprint '<option value=\\\"+28daysfourthMonday\\\">'; print date('l, F j Y', strtotime('+35 days fourth Monday')); print '</option>';\n\tprint '<option value=\\\"pastdates\\\">...past dates...</option>';\n\tprint '</select>';\n\t\n}",
"public function setMinimalDaysInFirstWeek($a = null)\n {\n throw new NotImplementedException(__METHOD__);\n }",
"function nextWeek(){ return $this->_getDate(7);\t}",
"public function setFirstDayOfWeek($a = null)\n {\n throw new NotImplementedException(__METHOD__);\n }",
"private static function printWeeks($startDate, $endDate, $formNum, $id)\r\n {\r\n $newDate = self::splitDates($startDate,$endDate);//retrive array of monday dates\r\n $divs =\"\";\r\n $numDates = count($newDate);\r\n if($numDates===0){//no future mondays meaning end date and start date only range of values\r\n $futuredate= new DateTime($startDate);\r\n $startDate= $futuredate->format(\"Y-m-d\");\r\n $displayStart = $futuredate->format(\"M d,Y\");//format date for route get hive\r\n $futuredate= new DateTime($endDate);\r\n $displayEnd= $futuredate->format(\"M d,Y\");\r\n $divs = \"<li class='list-group-item'><a href='viewform?form=\".$formNum. \"&weekStart=\".$startDate.\"&weekEnd=\".\r\n $futuredate->format(\"Y-m-d\").\"&id=\".$id.\"'>\". $displayStart.\r\n \" - \". $displayEnd.\"</a></li>\" . $divs;\r\n } else{//multiple weeks\r\n\r\n //display start day to saturday\r\n $futuredate= new DateTime($startDate);\r\n $startDate = new DateTime($startDate);\r\n $startDate= $startDate->format(\"Y-m-d\");\r\n if($futuredate->format('N')!=1)// if start date does not fall on a monday create first div\r\n {\r\n $displayStart = $futuredate->format(\"M d,Y\");//format date for route get hive\r\n $futuredate= $futuredate->modify('next sunday');\r\n $displayEnd= $futuredate->format(\"M d,Y\");\r\n $divs = \"<li class='list-group-item'><a href='viewform?form=\".$formNum. \"&weekStart=\".$startDate.\"&weekEnd=\".\r\n $futuredate->format(\"Y-m-d\").\"&id=\".$id.\"'>\". $displayStart.\r\n \" - \". $displayEnd.\"</a></li>\" . $divs;\r\n }\r\n //display all but last week\r\n for($i=0; $i<count($newDate)-1; $i++)\r\n {\r\n $futuredate = new DateTime($newDate[$i]);//convert date time object to be converted to next saturday\r\n $displayStart = $futuredate->format(\"M d,Y\");//format date for route get hive\r\n $futuredate->modify('next sunday');//grab saturday of the weeks monday date provided\r\n $futuredate->format(\"Y-m-d\");//format for route get hive\r\n\r\n $displayEnd =$futuredate->format(\"M d,Y\");//format for html example (October 31, 2018)\r\n //put together href utilizing all the information provided\r\n $divs = \"<li class='list-group-item'><a href='viewform?form=\".$formNum. \"&weekStart=\".$newDate[$i].\"&weekEnd=\".\r\n $futuredate->format(\"Y-m-d\").\"&id=\".$id.\"'>\". $displayStart.\r\n \" - \". $displayEnd.\"</a></li>\" . $divs;\r\n }\r\n\r\n //print last week making end date forms end date\r\n $futuredate = new DateTime($newDate[count($newDate)-1]);//convert date time object to be converted to next saturday\r\n $displayStart = $futuredate->format(\"M d,Y\");//format date for route get hive\r\n $futuredate= new DateTime($endDate);//grab saturday of the weeks monday date provided\r\n\r\n $futuredate->format(\"Y-m-d\");//format for route get hive\r\n\r\n $displayEnd =$futuredate->format(\"M d,Y\");//format for html example (October 31, 2018)\r\n //put together href utilizing all the information provided\r\n $divs = \"<li class='list-group-item'><a href='viewform?form=\".$formNum. \"&weekStart=\".$newDate[count($newDate)-1].\"&weekEnd=\".\r\n $futuredate->format(\"Y-m-d\").\"&id=\".$id.\"'>\". $displayStart.\r\n \" - \". $displayEnd.\"</a></li>\" . $divs;\r\n\r\n }\r\n return $divs;\r\n }",
"function weekviewHeader()\n {\n }",
"public function showWeekNumber(): self\n {\n $this->attributes(['showWeekNumber' => true]);\n return $this;\n }",
"function showPreWeekColumn() {\n\t\tif (func_num_args()) {\n\t\t\tswitch ((bool) func_get_arg(0)) {\n\t\t\t\tcase true:\n\t\t\t\t\t$this->_showPreWeekColumn = true;\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$this->_showPreWeekColumn = false;\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\telse return (($this->_showPreWeekColumn) ? 1 : 0);\n\t}",
"function preWeekContent() {\n\t\tif (func_num_args() >= 2) {\n\t\t\t$week = intval(func_get_arg(0));\n\t\t\t$content = trim(func_get_arg(1));\n\t\t\t\n\t\t\tif ($week >= 1 && $week <= 6) {\n\t\t\t\t$this->_preWeekArray[$week] = $content;\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\telseif (func_num_args() == 1) {\n\t\t\t$day = intval(func_get_arg(0));\n\t\t\t\n\t\t\tif (array_key_exists($week,$this->_preWeekArray)) {\n\t\t\t\treturn $this->_fillContent($this->_preWeekArray[$week]);\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn \"\";\n\t\t\t}\n\t\t} \n\t\telse {\n\t\t\treturn $this->_preWeekArray;\n\t\t\t//user_error(\"You must pass at least one argument to the preWeekContent function of the Calendar class\", E_NOTICE);\n\t\t}\n\t}",
"public function currentFirstDay($option)\n {\n if ($option)\n $this->options->setOption(\"weekstartday\", date(\"w\"));\n }",
"function cron_add_weekly( $schedules ) {\n $schedules['weekly'] = array(\n 'interval' => 604800,\n 'display' => __( 'Once Weekly' )\n );\n return $schedules;\n}",
"function week( \n\t $name, $title = null, $value = null, \n\t $required = false, \n\t $attributes = null\n\t){\n return $this->input(\n\t $name, \n\t Form::TYPE_WEEK,\n\t $title, \n\t $value, \n\t $required, \n\t $attributes,\n\t null,\n\t Form::DATA_STRING\n );\n\t}",
"function my_add_weekly( $schedules ) {\n // add a 'weekly' schedule to the existing set\n $schedules['3_hours'] = array(\n 'interval' => 10800,\n 'display' => __('Every 3 Hours - (Flipkart API call)')\n );\n return $schedules;\n }",
"public static function getWeek($date, $format = 'Y-m-d') {\r\n \r\n }",
"function get_calendar($initial = \\true, $display = \\true)\n {\n }",
"function enableWeekNum($title=\"\",$link=false,$javaScript=false){\n// checking before enabling, as week number calulation works only if php version > 4.1.0 [php function: date (\"W\")]\n\tif (is_integer($this->getWeekNum($this->actday))){\n\t\t$this->weekNum=true;\n\t\t$this->weekNumTitle=$title;\n\t\t$this->monthSpan++;\n\t\tif ($link) $this->weekUrl=$link;\n\t\telseif ($javaScript) $this->javaScriptWeek=$javaScript;\n\t}\n}",
"public function calendar()\n\t{\n\t\t// --------------------------------------\n\t\t// Initiate the date to work with\n\t\t// --------------------------------------\n\n\t\t$this->_init_date();\n\n\t\t// Keep track of given date\n\t\t$given_date = $this->date->date();\n\t\t$given_month = $this->date->month_url();\n\t\t$given_week = ($this->date->given() == 'week') ? $this->date->week_url() : FALSE;\n\n\t\t// --------------------------------------\n\t\t// If a week is given, make sure the thursday\n\t\t// is in the same month, or else advance one month\n\t\t// --------------------------------------\n\n\t\tif ($given_week)\n\t\t{\n\t\t\t// Get the thursday\n\t\t\t$this->date->modify('+ 3 days');\n\n\t\t\tif ($given_month == $this->date->month_url())\n\t\t\t{\n\t\t\t\t// No probs, same month given, reset back to original given date\n\t\t\t\t$this->date->reset();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// Thursday is in next month, so set the date to that\n\t\t\t\t$given_date = $this->date->date();\n\t\t\t\t$given_month = $this->date->month_url();\n\t\t\t}\n\t\t}\n\n\t\t// Set date to first of the month\n\t\t$this->date->first_of_month();\n\n\t\t// Get next and previous month\n\t\t$next = new Low_date($this->date->date());\n\t\t$prev = new Low_date($this->date->date());\n\t\t$next->add('month');\n\t\t$prev->sub('month');\n\n\t\t// Days in month\n\t\t$dim = $this->date->days_in_month();\n\n\t\t// Day of the Week\n\t\t$dotw = $this->date->first_day_of_month();\n\n\t\t// Week of the month\n\t\t$wotm = 0;\n\n\t\t// --------------------------------------\n\t\t// Day to start the week\n\t\t// --------------------------------------\n\n\t\t$start_day = strtolower($this->EE->TMPL->fetch_param('start_day'));\n\n\t\t// Force monday on non-existent weekday or if a week is given\n\t\tif ( ! in_array($start_day, $this->weekdays) || $given_week !== FALSE)\n\t\t{\n\t\t\t$start_day = 'monday';\n\t\t}\n\n\t\t$start_day = array_search($start_day, $this->weekdays);\n\n\t\t// --------------------------------------\n\t\t// Calculate number of leading days (prev month)\n\t\t// --------------------------------------\n\n\t\tif ($leading_days = (($dotw - $start_day) + 7) % 7)\n\t\t{\n\t\t\t$this->date->modify(\"- {$leading_days} days\");\n\t\t}\n\n\t\t// Keep track of start date\n\t\t$start_date = $this->date->date();\n\n\t\t// Initiate weeks and weekdays arrays\n\t\t$weeks = $weekdays = $days = array();\n\n\t\t// Initiate day count\n\t\t$day_count = 0;\n\n\t\t// Add leading 0s to day number?\n\t\t$leading = ($this->EE->TMPL->fetch_param('leading_zeroes', 'no') == 'yes');\n\n\t\t// --------------------------------------\n\t\t// Populate weeks array\n\t\t// --------------------------------------\n\n\t\twhile (TRUE)\n\t\t{\n\t\t\t// Initiate week\n\t\t\tif ( ! isset($weeks[$wotm]))\n\t\t\t{\n\t\t\t\t$weeks[$wotm] = array(\n\t\t\t\t\t'days' => array(),\n\t\t\t\t\t'week_url' => $this->date->week_url(),\n\t\t\t\t\t'is_given_week' => ($given_week == $this->date->week_url()) ? 'y' : ''\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// Add the day row to the week\n\t\t\t$weeks[$wotm]['days'][] = array(\n\t\t\t\t'day_number' => $leading ? $this->date->day() : intval($this->date->day()),\n\t\t\t\t'day_url' => $this->date->day_url(),\n\t\t\t\t'day' => $this->date->day_url(),\n\t\t\t\t'is_prev' => ($this->date->month_url() == $prev->month_url()) ? 'y' : '',\n\t\t\t\t'is_next' => ($this->date->month_url() == $next->month_url()) ? 'y' : '',\n\t\t\t\t'is_current' => ($this->date->month_url() == $given_month) ? 'y' : '',\n\t\t\t\t'is_given' => ($this->date->given() == 'day' && $this->date->date() == $given_date) ? 'y' : '',\n\t\t\t\t'is_today' => ($this->date->date() == $this->today) ? 'y' : '',\n\t\t\t\t'events_on_day' => 0\n\t\t\t);\n\n\t\t\t// Populate weekdays\n\t\t\tif ( ! $wotm)\n\t\t\t{\n\t\t\t\t$weekdays[] = array(\n\t\t\t\t\t'weekday' => $this->date->ee_format('%l'),\n\t\t\t\t\t'weekday_short' => $this->date->ee_format('%D'),\n\t\t\t\t\t'weekday_1' => substr($this->date->ee_format('%D'), 0, 1)\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// Advance by one day\n\t\t\t$this->date->add('day');\n\n\t\t\t// if days is divisible by 7, a week is done\n\t\t\tif ($done = ! (++$day_count % 7))\n\t\t\t{\n\t\t\t\t// If we're caught up with the next month too, exit the loop\n\t\t\t\tif ($this->date->month_url() == $next->month_url()) break;\n\n\t\t\t\t// Or else just increase the week of the month\n\t\t\t\t$wotm++;\n\t\t\t}\n\t\t}\n\n\t\t// End date\n\t\t$end_date = $this->date->date();\n\t\t$this->date->reset();\n\n\t\t$this->_log(\"Initiated calendar from {$start_date} to {$end_date}\");\n\n\t\t// --------------------------------------\n\t\t// Get events for this calendar range\n\t\t// --------------------------------------\n\n\t\t// Initiate events\n\t\t$events = $entries = array();\n\n\t\t$this->model->where_range($start_date, $end_date, TRUE, 'e');\n\n\t\t// Query the rest of the entry details if there are events present\n\t\tif ($entries = $this->_get_event_entries())\n\t\t{\n\t\t\tforeach ($entries AS $row)\n\t\t\t{\n\t\t\t\t// Skip the ones not found in $entries\n\t\t\t\tif ($row['start_date'] == $row['end_date'])\n\t\t\t\t{\n\t\t\t\t\t$events[$row['start_date']][] = $row;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// Assign each day between start and end to events array\n\t\t\t\t\t$date = new Low_date($row['start_date']);\n\n\t\t\t\t\twhile (($start = $date->date()) <= $row['end_date'])\n\t\t\t\t\t{\n\t\t\t\t\t\t$events[$start][] = $row;\n\t\t\t\t\t\t$date->add('day');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// No events in this range\n\t\t}\n\n\t\t// Keep track of total events found\n\t\t$total_entries = count($entries);\n\t\t$total_days = count($events);\n\n\t\t$this->_log(\"In this range: {$total_entries} entries, spanning {$total_days} days\");\n\n\t\t// --------------------------------------\n\t\t// Assign entry count to days\n\t\t// --------------------------------------\n\n\t\tif ($events)\n\t\t{\n\t\t\tforeach ($weeks AS &$week)\n\t\t\t{\n\t\t\t\tforeach ($week['days'] AS &$day)\n\t\t\t\t{\n\t\t\t\t\tif (array_key_exists($day['day'], $events))\n\t\t\t\t\t{\n\t\t\t\t\t\t$day['events_on_day'] = count($events[$day['day']]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t// --------------------------------------\n\t\t// Parse prev/this/next month links ourselves\n\t\t// --------------------------------------\n\n\t\t$this->return_data = $this->EE->TMPL->tagdata;\n\n\t\tforeach ($this->EE->TMPL->var_single AS $key => $format)\n\t\t{\n\t\t\tif (preg_match('/^(prev|this|next)_month(\\s|$)/', $key, $match))\n\t\t\t{\n\t\t\t\t$format = (strpos($format, '%') !== FALSE) ? $format : '%Y-%m';\n\n\t\t\t\tif (($match[1]) == 'this')\n\t\t\t\t{\n\t\t\t\t\t$month = $this->date->ee_format($format);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$month = $$match[1]->ee_format($format);\n\t\t\t\t}\n\n\t\t\t\t$this->return_data = str_replace(LD.$key.RD, $month, $this->return_data);\n\t\t\t}\n\t\t}\n\n\t\t// --------------------------------------\n\t\t// Create data array for parsing vars\n\t\t// --------------------------------------\n\n\t\t$data = array(\n\t\t\t'next_month_url' => $next->month_url(),\n\t\t\t'prev_month_url' => $prev->month_url(),\n\t\t\t'this_month_url' => $this->date->month_url(),\n\t\t\t'weekdays' => $weekdays,\n\t\t\t'weeks' => $weeks\n\t\t);\n\n\t\t$this->_log('Parsing calendar tagdata');\n\n\t\treturn $this->EE->TMPL->parse_variables_row($this->return_data, $data);\n\t}",
"public static function weekly() {return new ScheduleViewMode(2);}",
"public function isWeekDateSupported($a = null)\n {\n throw new NotImplementedException(__METHOD__);\n }",
"public static function week_calendar($day, $month, $year) {\r\n global $langNoEvents, $langDay, $langWeek, $langMonth, $langViewShow;\r\n\r\n $calendar_content = \"\";\r\n if (is_null($day)) {\r\n $day = 1;\r\n }\r\n $nextweekdate = new DateTime(\"$year-$month-$day\");\r\n $nextweekdate->add(new DateInterval('P1W'));\r\n $previousweekdate = new DateTime(\"$year-$month-$day\");\r\n $previousweekdate->sub(new DateInterval('P1W'));\r\n\r\n $thisweekday = new DateTime(\"$year-$month-$day\");\r\n $difffromMonday = ($thisweekday->format('w') == 0)? 6:$thisweekday->format('w')-1;\r\n $monday = $thisweekday->sub(new DateInterval('P'.$difffromMonday.'D')); //Sunday->1, ..., Saturday->7\r\n $weekdescription = ucfirst(format_locale_date($monday->getTimestamp()));\r\n $sunday = $thisweekday->add(new DateInterval('P6D'));\r\n $weekdescription .= ' - '.ucfirst(format_locale_date($sunday->getTimestamp()));\r\n $cursorday = $thisweekday->sub(new DateInterval('P6D'));\r\n\r\n $backward = array('day'=>$previousweekdate->format('d'), 'month'=>$previousweekdate->format('m'), 'year' => $previousweekdate->format('Y'));\r\n $foreward = array('day'=>$nextweekdate->format('d'), 'month'=>$nextweekdate->format('m'), 'year' => $nextweekdate->format('Y'));\r\n\r\n $calendar_content .= '<div class=\"right\" style=\"width:100%\">'.$langViewShow.': '.\r\n '<a href=\"#\" onclick=\"show_day(selectedday, selectedmonth, selectedyear);return false;\">'.$langDay.'</a> | '.\r\n '<a href=\"#\" onclick=\"show_week(selectedday, selectedmonth, selectedyear);return false;\">'.$langWeek.'</a> | '.\r\n '<a href=\"#\" onclick=\"show_month(selectedday, selectedmonth, selectedyear);return false;\">'.$langMonth.'</a></div>';\r\n\r\n $calendar_content .= \"<table class='table-default'>\";\r\n $calendar_content .= \"<tr>\";\r\n $calendar_content .= '<td width=\"25\"><a href=\"#\" onclick=\"show_week('.$backward['day'].','.$backward['month'].','.$backward['year'].'); return false;\">«</a></td>';\r\n $calendar_content .= \"<td class='center'><b>$weekdescription</b></td>\";\r\n $calendar_content .= '<td width=\"25\" class=\"right\"><a href=\"#\" onclick=\"show_week('.$foreward['day'].','.$foreward['month'].','.$foreward['year'].'); return false;\">»</a></td>';\r\n $calendar_content .= \"</tr>\";\r\n $calendar_content .= \"</table>\";\r\n $eventlist = Calendar_Events::get_calendar_events(\"week\", \"$year-$month-$day\");\r\n\r\n $calendar_content .= \"<table class='table-default'>\";\r\n\r\n $curday = 0;\r\n $now = getdate();\r\n $today = new DateTime($now['year'].'-'.$now['mon'].'-'.$now['mday']);\r\n $curstartddate = \"\";\r\n foreach ($eventlist as $thisevent) {\r\n if ($curstartddate != $thisevent->startdate) { //event date changed\r\n $thiseventdatetime = new DateTime($thisevent->startdate);\r\n while($cursorday < $thiseventdatetime) {\r\n if ($cursorday == $today)\r\n $class = 'today';\r\n else\r\n $class = 'monthLabel';\r\n $calendar_content .= \"<tr><td colspan='3' class='$class'>\" . \" <b>\" . ucfirst(format_locale_date($cursorday->getTimestamp())) . \"</b></td></tr>\";\r\n $calendar_content .= \"<tr><td colspan='3'>$langNoEvents</td></tr>\";\r\n $cursorday->add(new DateInterval('P1D'));\r\n $curday++;\r\n }\r\n if ($thiseventdatetime == $today)\r\n $class = 'today';\r\n else\r\n $class = 'monthLabel';\r\n $calendar_content .= \"<tr><td colspan='3' class='$class'>\" . \" <b>\" . ucfirst(format_locale_date(strtotime($thisevent->startdate))) . \"</b></td></tr>\";\r\n if ($cursorday <= $thiseventdatetime) {\r\n $cursorday->add(new DateInterval('P1D'));\r\n $curday++;\r\n }\r\n }\r\n $calendar_content .= Calendar_Events::week_calendar_item($thisevent, 'even');\r\n $curstartddate = $thisevent->startdate;\r\n }\r\n /* Fill with empty days*/\r\n for($i=$curday;$i<7;$i++) {\r\n if ($cursorday == $today)\r\n $class = 'today';\r\n else\r\n $class = 'monthLabel';\r\n $calendar_content .= \"<tr><td colspan='3' class='$class'>\" . \" <b>\" . ucfirst(format_locale_date($cursorday->getTimestamp())) . \"</b></td></tr>\";\r\n $calendar_content .= \"<tr><td colspan='3'>$langNoEvents</td></tr>\";\r\n $cursorday->add(new DateInterval('P1D'));\r\n }\r\n $calendar_content .= \"</table>\";\r\n /* Legend */\r\n $calendar_content .= Calendar_Events::calendar_legend();\r\n\r\n return $calendar_content;\r\n }",
"function wfCalendarRefresh()\n{\n global $wgRequest, $wgTitle, $wgScriptPath;\n // this is the \"refresh\" code that allows the calendar to switch time periods\n $v = $wgRequest->getValues();\n if (isset($v[\"calendar_info\"]))\n {\n $today = getdate(); // today\n $temp = explode(\"`\", $v[\"calendar_info\"]); // calling calendar info (name, title, etc..)\n\n // set the initial values\n $month = $temp[0];\n $day = $temp[1];\n $year = $temp[2];\n $title = $temp[3];\n $name = $temp[4];\n\n // the yearSelect and monthSelect must be on top... the onChange triggers\n // whenever the other buttons are clicked\n if (isset($v[\"yearSelect\"]))\n $year = $v[\"yearSelect\"];\n if (isset($v[\"monthSelect\"]))\n $month = $v[\"monthSelect\"];\n\n if (isset($v[\"yearBack\"]))\n --$year;\n if (isset($v[\"yearForward\"]))\n ++$year;\n\n if (isset($v[\"today\"]))\n {\n $day = $today['mday'];\n $month = $today['mon'];\n $year = $today['year'];\n }\n\n if (isset($v[\"monthBack\"]))\n {\n $year = ($month == 1 ? --$year : $year);\n $month = ($month == 1 ? 12 : --$month);\n }\n\n if (isset($v[\"monthForward\"]))\n {\n $year = ($month == 12 ? ++$year : $year);\n $month = ($month == 12 ? 1 : ++$month);\n }\n\n if (isset($v[\"weekBack\"]))\n {\n $arr = getdate(mktime(12, 0, 0, $month, $day-7, $year));\n $month = $arr['mon'];\n $day = $arr['mday'];\n $year = $arr['year'];\n }\n\n if (isset($v[\"weekForward\"]))\n {\n $arr = getdate(mktime(12, 0, 0, $month, $day+7, $year));\n $month = $arr['mon'];\n $day = $arr['mday'];\n $year = $arr['year'];\n }\n\n if (wfCalendarIsValidMode($v[\"viewSelect\"]))\n $mode = $v[\"viewSelect\"];\n\n $p = \"cal\".crc32(\"$title $name\");\n $v = sprintf(\"%04d-%02d-%02d-%s\", $year, $month, $day, $mode);\n\n // reload the page... clear any purge commands that may be in it from an ical load...\n $url = $wgTitle->getFullUrl(array($p => $v));\n header(\"Location: \" . $url);\n exit;\n }\n}",
"function postWeekContent() {\n\t\tif (func_num_args() >= 2) {\n\t\t\t$week = intval(func_get_arg(0));\n\t\t\t$content = trim(func_get_arg(1));\n\t\t\t\n\t\t\tif ($week >= 1 && $week <= 6) {\n\t\t\t\t$this->_postWeekArray[$week] = $content;\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\telseif (func_num_args() == 1) {\n\t\t\t$day = intval(func_get_arg(0));\n\t\t\t\n\t\t\tif (array_key_exists($week,$this->_postWeekArray)) {\n\t\t\t\treturn $this->_fillContent($this->_postWeekArray[$week]);\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn \"\";\n\t\t\t}\n\t\t} \n\t\telse {\n\t\t\treturn $this->_postWeekArray;\n\t\t\t//user_error(\"You must pass at least one argument to the preWeekContent function of the Calendar class\", E_NOTICE);\n\t\t}\n\t}",
"public function getDateStartWeek($date=null){\n\t\t$dateNew = date(\"Y-m-d H:i:s\",strtotime('monday this week', strtotime($date)));\n\t\treturn $dateNew;\n\t}",
"function the_weekday_date($before = '', $after = '')\n {\n }"
]
| [
"0.65920395",
"0.5864524",
"0.5842388",
"0.5789946",
"0.57759345",
"0.5764967",
"0.5752445",
"0.57277286",
"0.5643445",
"0.5637567",
"0.5604179",
"0.5601334",
"0.5568413",
"0.5541798",
"0.54923224",
"0.54643625",
"0.5445229",
"0.54316026",
"0.54229194",
"0.5409349",
"0.53664315",
"0.531221",
"0.52937394",
"0.5279726",
"0.5279273",
"0.52713275",
"0.5262887",
"0.52603054",
"0.5258355",
"0.5249646"
]
| 0.74004716 | 0 |
Set jQuery params: showOtherMonths, selectOtherMonths | public function showOtherMonths($showOtherMonths, $selectOtherMonths) {
if($showOtherMonths) {
$this->_config_mapper(Array('showOtherMonths' => 'true'));
} else {
$this->_config_mapper(Array('showOtherMonths' => 'false'));
}
if($selectOtherMonths) {
$this->_config_mapper(Array('selectOtherMonths' => 'true'));
} else {
$this->_config_mapper(Array('selectOtherMonths' => 'false'));
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function setMonths() {\n\tglobal $monthList,\t$monthListShort, $weekdaysList;\n\t$monthList=array('一月','二月','三月','四月','五月','六月',\n\t\t\t\t\t'七月','八月','九月','十月','十一月','十二月');\n\t$monthListShort=array('JAN','FEB','MAR','APR','MAY','JUN','JUL','AUG','SEP','OCT','NOV','DEC');\n\t$weekdaysList=array('Mon','Tue','Wed','Thu','Fri','Sat','Sun') ;\n}",
"function setMonths() {\n\tglobal $monthList,\t$monthListShort, $weekdaysList;\n\t$monthList=array('Enero','Febrero','Marzo','Abril','Mayo','Junio',\n\t\t\t\t\t'Julio','Agosto','Septiembre','Octubre','Noviembre','Diciembre');\n\t$monthListShort=array('ENE','FEB','MAR','ABR','MAY','JUN','JUL','AGO','SEP','OCT','NOV','DIC');\n\t$weekdaysList=array('Lun','Mar','Mie','Jue','Vie','Sab','Dom') ;\n}",
"public function get_month_choices()\n {\n }",
"public function SelectMonth()\r\n {\r\n if(isset($_POST['month'])){\r\n //$mois prends la valeur de month\r\n $mois = $_POST['month'];\r\n //Recupere dans $mois l'ID du mois\r\n $mois = $this->GetMois(substr($mois, 5,2));\r\n //MaisPage recupere $mois\r\n $this->MainPage($mois);\r\n }\r\n //Sinon MainPage ne recupere pas $mois\r\n else{\r\n $this->MainPage();\r\n }\r\n }",
"function selectMonth(){\n $months = array(\"November\",\"December\",\"January\", \"February\");\n \n for($i = 0; $i < sizeof($months); $i++){\n echo \"<option value='\" .$months[$i]. \"'>\" .$months[$i]. \"</option>\";\n }\n }",
"function showMonth($showNoMonthDays=false){\n$this->showNoMonthDays=$showNoMonthDays;\n$out=$this->mkMonthHead(); // this should remain first: opens table tag\n$out.=$this->mkMonthTitle(); // tr tag: month title and navigation\n$out.=$this->mkDatePicker(); // tr tag: month date picker (month and year selection)\n$out.=$this->mkWeekDays(); // tr tag: the weekday names\n\tif ($this->showNoMonthDays==false) $out.=$this->mkMonthBody(); // tr tags: the days of the month\n\telse $out.=$this->mkMonthBody(1); // tr tags: the days of the month\n$out.=$this->mkMonthFoot(); // this should remain last: closes table tag\nreturn $out;\n}",
"public static function setDateFormatMonth()\n {\n self::$settings[0] = 'Y-m';\n }",
"function form_select_month($name, $month, $id='') {\n\n\tglobal $cache2;\n\n\t// are we dealing with timestamp\n\tif ($month > 10000) {\n\t\t$month = fetch_month($month);\n\t}\n\n\t$id = ifr($id, $name);\n\n\treturn form_select($name, $cache2->getCalendarData('months_short'), '', $month, '', '', '', '', '', $id);\n\n}",
"public function month()\n\t{\n\t\t// -------------------------------------\n\t\t// Load 'em up\n\t\t// -------------------------------------\n\n\t\t$this->load_calendar_datetime();\n\t\t$this->load_calendar_parameters();\n\n\t\t// -------------------------------------\n\t\t// Prep the parameters\n\t\t// -------------------------------------\n\n\t\t$disable = array('categories', 'category_fields', 'custom_fields', 'member_data', 'pagination', 'trackbacks');\n\n\t\t$params = array(\n\t\t\tarray(\t'name' => 'category',\n\t\t\t\t\t'required' => FALSE,\n\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t'multi' => TRUE\n\t\t\t\t\t),\n\t\t\tarray(\t'name' => 'site_id',\n\t\t\t\t\t'required' => FALSE,\n\t\t\t\t\t'type' => 'integer',\n\t\t\t\t\t'min_value' => 1,\n\t\t\t\t\t'multi' => TRUE,\n\t\t\t\t\t'default' => $this->data->get_site_id()\n\t\t\t\t\t),\n\t\t\tarray(\t'name' => 'calendar_id',\n\t\t\t\t\t'required' => FALSE,\n\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t'multi' => TRUE\n\t\t\t\t\t),\n\t\t\tarray(\t'name' => 'calendar_name',\n\t\t\t\t\t'required' => FALSE,\n\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t'multi' => TRUE\n\t\t\t\t\t),\n\t\t\tarray(\t'name' => 'event_id',\n\t\t\t\t\t'required' => FALSE,\n\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t'multi' => TRUE\n\t\t\t\t\t),\n\t\t\tarray(\t'name' => 'event_name',\n\t\t\t\t\t'required' => FALSE,\n\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t'multi' => TRUE\n\t\t\t\t\t),\n\t\t\tarray(\t'name' => 'event_limit',\n\t\t\t\t\t'required' => FALSE,\n\t\t\t\t\t'type' => 'integer'\n\t\t\t\t\t),\n\t\t\tarray(\t'name' => 'status',\n\t\t\t\t\t'required' => FALSE,\n\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t'multi' => TRUE,\n\t\t\t\t\t'default' => 'open'\n\t\t\t\t\t),\n\t\t\tarray(\t'name' => 'date_range_start',\n\t\t\t\t\t'required' => FALSE,\n\t\t\t\t\t'type' => 'date'\n\t\t\t\t\t),\n\t\t\tarray(\t'name' => 'time_range_start',\n\t\t\t\t\t'required' => FALSE,\n\t\t\t\t\t'type' => 'time',\n\t\t\t\t\t'default' => '0000'\n\t\t\t\t\t),\n\t\t\tarray(\t'name' => 'time_range_end',\n\t\t\t\t\t'required' => FALSE,\n\t\t\t\t\t'type' => 'time',\n\t\t\t\t\t'default' => '2400'\n\t\t\t\t\t),\n\t\t\tarray(\t'name' => 'enable',\n\t\t\t\t\t'required' => FALSE,\n\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t'default' => '',\n\t\t\t\t\t'multi' => TRUE,\n\t\t\t\t\t'allowed_values' => $disable\n\t\t\t\t\t),\n\t\t\tarray(\t'name' => 'first_day_of_week',\n\t\t\t\t\t'required' => FALSE,\n\t\t\t\t\t'type' => 'integer',\n\t\t\t\t\t'default' => $this->first_day_of_week\n\t\t\t\t\t),\n\t\t\tarray(\t'name' => 'start_date_segment',\n\t\t\t\t\t'required' => FALSE,\n\t\t\t\t\t'type' => 'integer',\n\t\t\t\t\t'default' => 3\n\t\t\t\t\t)\n\t\t\t);\n\n\t\t//ee()->TMPL->log_item('Calendar: Processing parameters');\n\n\t\t$this->add_parameters($params);\n\n\t\t// -------------------------------------\n\t\t// Need to modify the starting date?\n\t\t// -------------------------------------\n\n\t\t$this->first_day_of_week = $this->P->value('first_day_of_week');\n\n\t\tif ($this->P->value('date_range_start') === FALSE)\n\t\t{\n\t\t\tif ($this->P->value('start_date_segment') AND ee()->uri->segment($this->P->value('start_date_segment')) AND strstr(ee()->uri->segment($this->P->value('start_date_segment')), '-'))\n\t\t\t{\n\t\t\t\tlist($year, $month) = explode('-', ee()->uri->segment($this->P->value('start_date_segment')));\n\t\t\t\t$this->P->params['date_range_start']['value'] = $this->CDT->change_date($year, $month, 1);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->P->params['date_range_start']['value'] = $this->CDT->change_date($this->CDT->year, $this->CDT->month, 1);\n\t\t\t}\n\t\t}\n\t\telseif ($this->P->value('date_range_start', 'day') != 1)\n\t\t{\n\t\t\t$this->P->params['date_range_start']['value'] = $this->CDT->change_date($this->P->value('date_range_start', 'year'), $this->P->value('date_range_start', 'month'), 1);\n\t\t}\n\n\t\t// -------------------------------------\n\t\t// Define parameters specific to this calendar view\n\t\t// -------------------------------------\n\n\t\t$this->CDT->change_ymd($this->P->value('date_range_start', 'ymd'));\n\t\t$this->P->set('date_range_end', $this->CDT->add_day($this->CDT->days_in_month($this->P->value('date_range_start', 'month'), $this->P->value('date_range_start', 'year')) - 1));\n\t\t$this->P->set('pad_short_weeks', TRUE);\n\n\t\t// -------------------------------------\n\t\t// Define our tagdata\n\t\t// -------------------------------------\n\n\t\t$find = array(\t'EVENTS_PLACEHOLDER',\n\t\t\t\t\t\t'{/',\n\t\t\t\t\t\t'{',\n\t\t\t\t\t\t'}'\n\t\t\t\t\t\t);\n\t\t$replace = array(\tee()->TMPL->tagdata,\n\t\t\t\t\t\t\tLD.T_SLASH,\n\t\t\t\t\t\t\tLD,\n\t\t\t\t\t\t\tRD\n\t\t\t\t\t\t\t);\n\t\tee()->TMPL->tagdata = str_replace($find, $replace, $this->view('month.html', array(), TRUE, $this->sc->addon_theme_path.'templates/month.html'));\n\n\t\t// -------------------------------------\n\t\t// Tell TMPL what we're up to\n\t\t// -------------------------------------\n\n\t\tif (strpos(ee()->TMPL->tagdata, LD.'events'.RD) !== FALSE)\n\t\t{\n\t\t\tee()->TMPL->var_pair['events'] = TRUE;\n\t\t}\n\n\t\tif (strpos(ee()->TMPL->tagdata, LD.'display_each_hour'.RD) !== FALSE)\n\t\t{\n\t\t\tee()->TMPL->var_pair['display_each_hour'] = TRUE;\n\t\t}\n\n\t\tif (strpos(ee()->TMPL->tagdata, LD.'display_each_day'.RD) !== FALSE)\n\t\t{\n\t\t\tee()->TMPL->var_pair['display_each_day'] = TRUE;\n\t\t}\n\n\t\tif (strpos(ee()->TMPL->tagdata, LD.'display_each_week'.RD) !== FALSE)\n\t\t{\n\t\t\tee()->TMPL->var_pair['display_each_week'] = TRUE;\n\t\t}\n\n\t\tif (strpos(ee()->TMPL->tagdata, LD.'display_each_month'.RD) !== FALSE)\n\t\t{\n\t\t\tee()->TMPL->var_pair['display_each_month'] = TRUE;\n\t\t}\n\n\t\tif (strpos(ee()->TMPL->tagdata, LD.'display_each_day_of_week'.RD) !== FALSE)\n\t\t{\n\t\t\tee()->TMPL->var_pair['display_each_day_of_week'] = TRUE;\n\t\t}\n\n\t\t// -------------------------------------\n\t\t// If you build it, they will know what's going on.\n\t\t// -------------------------------------\n\n\t\t$this->parent_method = __FUNCTION__;\n\n\t\treturn $this->build_calendar();\n\t}",
"function setMonth($m)\r\n {\r\n if($m < 1 || $m > 12) {\r\n $this->mes = 1;\r\n } else {\r\n $this->mes = $m;\r\n }\r\n }",
"function options(&$options) {\r\n parent::options($options);\r\n $options['date_fields'] = array();\r\n $options['year_range'] = '-3:+3';\r\n $options['date_method'] = 'OR';\r\n $options['granularity'] = 'month';\r\n }",
"public function setCalendarNumber($numberOfMonths, $showButtonPanel){\n \n $this->_config_mapper(Array('numberOfMonths' => (int)$numberOfMonths));\n \n if($showButtonPanel) {\n $this->_config_mapper(Array('showButtonPanel' => 'true')); \n } else {\n $this->_config_mapper(Array('showButtonPanel' => 'false')); \n } \n }",
"function print_month_option_list( $p_month = 0 ) {\n\tfor( $i = 1;$i <= 12;$i++ ) {\n\t\t$t_month_name = date( 'F', mktime( 0, 0, 0, $i, 1, 2000 ) );\n\t\tif( $i == $p_month ) {\n\t\t\techo '<option value=\"' . $i . '\" selected=\"selected\">' . lang_get( 'month_' . strtolower( $t_month_name ) ) . '</option>';\n\t\t} else {\n\t\t\techo '<option value=\"' . $i . '\">' . lang_get( 'month_' . strtolower( $t_month_name ) ) . '</option>';\n\t\t}\n\t}\n}",
"public function getMonths();",
"function getAllMonths($selected = ''){\n $options = '';\n for($i=1;$i<=12;$i++)\n {\n $value = ($i < 10)?'0'.$i:$i;\n $selectedOpt = ($value == $selected)?'selected':'';\n $options .= '<option value=\"'.$value.'\" '.$selectedOpt.' >'.date(\"F\", mktime(0, 0, 0, $i+1, 0, 0)).'</option>';\n }\n return $options;\n}",
"function getAllMonths($selected = ''){\r\n\t$options = '';\r\n\tfor($i=1;$i<=12;$i++)\r\n\t{\r\n\t\t$value = ($i < 01)?'0'.$i:$i;\r\n\t\t$selectedOpt = ($value == $selected)?'selected':'';\r\n\t\t$options .= '<option value=\"'.$value.'\" '.$selectedOpt.' >'.date(\"F\", mktime(0, 0, 0, $i+1, 0, 0)).'</option>';\r\n\t}\r\n\treturn $options;\r\n}",
"function setMonthNames($namesArray){\n\tif (!is_array($namesArray) || count($namesArray)!=12) return false;\n\telse $this->monthNames=$namesArray;\n}",
"function getAllMonths($selected = '') {\r\n $options = '';\r\n for ($i = 1; $i <= 12; $i++) {\r\n $value = ($i < 01) ? '0' . $i : $i;\r\n $selectedOpt = ($value == $selected) ? 'selected' : '';\r\n $options .= '<option value=\"' . $value . '\" ' . $selectedOpt . ' >' . date(\"F\", mktime(0, 0, 0, $i + 1, 0, 0)) . '</option>';\r\n }\r\n return $options;\r\n}",
"function selectMonth($name='',$class='') {\n\t\t$cndtn = '';\n\t\t$fldname = str_replace(' ', '_', $name);\t\n\t\t$curMon = date('F',time());\n\t\t$option = '<option value=\"'.$curMon.'\">'.$curMon.'</option>';\n\n\t\tforeach($this->optMonth as $optkey => $optVal){\n\t\t\tif(isset($_SESSION[$fldname]))\n\t\t\t\t$cndtn = ($_SESSION[$fldname] == $optVal)? 'selected=\"selected\"' : '';\n\t\t\tif(isset($_POST[$fldname]))\n\t\t\t\t$cndtn = ($_POST[$fldname] == $optVal)? 'selected=\"selected\"' : '';\n\t\t\t$option .= '<option value=\"'.$optVal.'\" '.$cndtn.'>'.$optVal.'</option>';\t\t\n\t\t}\n\t\t$selectMonth = '<select name=\"'.$fldname.'\" class=\"'.$class.'\">'.$option.'</select>';\n\t\techo $selectMonth;\n\t}",
"public function setMonth($a = null)\n {\n throw new NotImplementedException(__METHOD__);\n }",
"function monthOptions(){\n\t\t$months = range('01', '12');\n\t\tforeach ($months as $key => $month) {\n\t\t\t$months[$key] = str_pad($month, 2, '0', STR_PAD_LEFT);\n\t\t}\n\t\treturn array_combine($months, $months);\n\t}",
"public function changeMonth($args) {\n if (!SecurityUtil::checkPermission('IWagendas::', '::', ACCESS_READ)) {\n throw new Zikula_Exception_Fatal($this->__('Sorry! No authorization to access this module.'));\n }\n\n $daid = $this->request->getPost()->get('daid', '');\n\n $mes = $this->request->getPost()->get('mes', '');\n if (!$mes) {\n throw new Zikula_Exception_Fatal($this->__('no month defined'));\n }\n\n $any = $this->request->getPost()->get('any', '');\n if (!$any) {\n throw new Zikula_Exception_Fatal($this->__('no year defined'));\n }\n\n $content = ModUtil::func('IWagendas', 'user', 'main', array('mes' => $mes,\n 'any' => $any,\n 'daid' => $daid));\n return new Zikula_Response_Ajax(array('content' => $content,\n ));\n }",
"function getAllMonths($selected = '') {\n $options = '';\n for ($i = 1; $i <= 12; $i++) {\n $value = ($i < 10) ? '0' . $i : $i;\n $selectedOpt = ($value == $selected) ? 'selected' : '';\n $options .= '<option value=\"' . $value . '\" ' . $selectedOpt . ' >' . date(\"F\", mktime(0, 0, 0, $i + 1, 0, 0)) . '</option>';\n }\n return $options;\n}",
"protected function getMonths()\n {\n\t$year = $_REQUEST['year'] ;\n\tif( !$year )\n\t{\n\t print( \"Month query failed: no year has been specified\\n\" ) ;\n\t exit( 0 ) ;\n\t}\n\t$year = trim( $year ) ;\n\n\t// need to connect to the database here in order to run the\n\t// function mysql_real_escape_string\n\t$isconnected = $this->cedarconnect() ;\n\tif( $isconnected != \"good\" )\n\t{\n\t print( \"$isconnected\\n\" ) ;\n\t exit( 0 ) ;\n\t}\n\n\tif( $year )\n\t{\n\t $year = mysql_real_escape_string( $year ) ;\n\t}\n\n\t$params = $_REQUEST['params'] ;\n\tif( $params )\n\t{\n\t $params = trim( $params ) ;\n\t $params = mysql_real_escape_string( $params ) ;\n\t}\n\n\t$kinst = $_REQUEST['kinst'] ;\n\tif( $kinst )\n\t{\n\t $kinst = trim( $kinst ) ;\n\t $kinst = mysql_real_escape_string( $kinst ) ;\n\t}\n\n\t$query = \"SELECT DISTINCT d.MONTH\" ;\n\tif( $kinst && !$params )\n\t{\n\t $query .= \" FROM tbl_date d, tbl_date_in_file dif,\" ;\n\t $query .= \" tbl_file_info fi, tbl_record_type rt,\" ;\n\t $query .= \" tbl_record_info ri\" ;\n\t $query .= \" WHERE d.DATE_ID=dif.DATE_ID\" ;\n\t $query .= \" AND dif.RECORD_IN_FILE_ID=fi.RECORD_IN_FILE_ID\" ;\n\t $query .= \" AND fi.RECORD_TYPE_ID=rt.RECORD_TYPE_ID\" ;\n\t $query .= \" AND fi.RECORD_TYPE_ID=ri.RECORD_TYPE_ID\" ;\n\t $query .= \" AND d.YEAR=$year\" ;\n\t $query .= \" AND rt.KINST=$kinst\" ;\n\t}\n\telse if( $params && !$kinst )\n\t{\n\t $query .= \" FROM tbl_date d, tbl_date_in_file dif,\" ;\n\t $query .= \" tbl_file_info fi, tbl_record_info ri\" ;\n\t $query .= \" WHERE d.DATE_ID=dif.DATE_ID\" ;\n\t $query .= \" AND dif.RECORD_IN_FILE_ID=fi.RECORD_IN_FILE_ID\" ;\n\t $query .= \" AND fi.RECORD_TYPE_ID=ri.RECORD_TYPE_ID\" ;\n\t $query .= \" AND d.YEAR=$year\" ;\n\t $query .= \" AND ri.PARAMETER_ID in ($params)\" ;\n\t}\n\telse if( $params && $kinst )\n\t{\n\t $query .= \" FROM tbl_date d, tbl_date_in_file dif,\" ;\n\t $query .= \" tbl_file_info fi, tbl_record_type rt,\" ;\n\t $query .= \" tbl_record_info ri\" ;\n\t $query .= \" WHERE d.DATE_ID=dif.DATE_ID\" ;\n\t $query .= \" AND dif.RECORD_IN_FILE_ID=fi.RECORD_IN_FILE_ID\" ;\n\t $query .= \" AND fi.RECORD_TYPE_ID=rt.RECORD_TYPE_ID\" ;\n\t $query .= \" AND fi.RECORD_TYPE_ID=ri.RECORD_TYPE_ID\" ;\n\t $query .= \" AND d.YEAR=$year\" ;\n\t $query .= \" AND rt.KINST=$kinst\" ;\n\t $query .= \" AND ri.PARAMETER_ID in ($params)\" ;\n\t}\n\telse if( !$params && !$kinst )\n\t{\n\t $query .= \" FROM tbl_date d, tbl_date_in_file dif\" ;\n\t $query .= \" WHERE d.DATE_ID=dif.DATE_ID\" ;\n\t $query .= \" AND d.YEAR=$year\" ;\n\t}\n\n\t$query .= \" ORDER BY d.MONTH ASC\" ;\n\t//print( \"$query\\n\" ) ;\n\n\t$result = parent::dbquery( $query ) ;\n\t$num_rows = mysql_num_rows( $result ) ;\n\tif( $num_rows != 0 )\n\t{\n\t while( $line = mysql_fetch_row( $result ) )\n\t {\n\t\tif( $line )\n\t\t{\n\t\t $colnum = 0 ;\n\t\t foreach( $line as $value )\n\t\t {\n\t\t\tif( $colnum > 0 ) echo \",\" ;\n\t\t\techo $value ;\n\t\t\t$colnum++ ;\n\t\t }\n\t\t echo \"\\n\" ;\n\t\t}\n\t }\n\t}\n\n\tparent::dbclose( $result ) ;\n }",
"function enableMonthNav($link=false,$arrowBack=false,$arrowForw=false){\n\tif ($link) $this->urlNav=$link;\n\telse $this->urlNav=$_SERVER['PHP_SELF'];\n\tif ($arrowBack) $this->monthNavBack=$arrowBack;\n\tif ($arrowForw) $this->monthNavForw=$arrowForw;\n$this->monthNav=true;\n}",
"public function month_list()\n\t{\n\t\t// -------------------------------------\n\t\t// Load 'em up\n\t\t// -------------------------------------\n\n\t\t$this->load_calendar_datetime();\n\t\t$this->load_calendar_parameters();\n\n\t\t// -------------------------------------\n\t\t// Prep the parameters\n\t\t// -------------------------------------\n\n\t\t$params = array(\n\t\t\tarray(\n\t\t\t\t'name'\t\t=> 'date_range_start',\n\t\t\t\t'required'\t=> FALSE,\n\t\t\t\t'type'\t\t=> 'date',\n\t\t\t\t'default'\t=> 'year-01-01'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name'\t\t=> 'date_range_end',\n\t\t\t\t'required'\t=> FALSE,\n\t\t\t\t'type'\t\t=> 'date'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name'\t\t=> 'limit',\n\t\t\t\t'required'\t=> FALSE,\n\t\t\t\t'type'\t\t=> 'integer',\n\t\t\t\t'default'\t=> 12\n\t\t\t)\n\t\t);\n\n//ee()->TMPL->log_item('Calendar: Processing parameters');\n\n\t\t$this->add_parameters($params);\n\n\t\t$today = $this->CDT->date_array();\n\n\t\t$this->CDT->change_ymd($this->P->value('date_range_start', 'ymd'));\n\t\t$this->CDT->set_default($this->CDT->datetime_array());\n\n\t\tif ($this->P->value('date_range_end') === FALSE)\n\t\t{\n\t\t\t$this->P->set(\n\t\t\t\t'date_range_end',\n\t\t\t\t$this->CDT->add_month($this->P->value('limit'))\n\t\t\t);\n\n\t\t\t$this->CDT->reset();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->P->set('limit', 9999);\n\t\t}\n\n\t\t$dir = (\n\t\t\t$this->P->value('date_range_end', 'ymd') >\n\t\t\t\t$this->P->value('date_range_start', 'ymd')\n\t\t) ? 1 : -1;\n\n\t\t$output = '';\n\t\t$count = 0;\n\n//ee()->TMPL->log_item('Calendar: Looping');\n\n\t\tdo\n\t\t{\n\t\t\t$vars['conditional']\t= array(\n\t\t\t\t'is_current_month'\t\t=>\t(\n\t\t\t\t\t$this->CDT->year == $today['year'] AND\n\t\t\t\t\t$this->CDT->month == $today['month']\n\t\t\t\t),\n\t\t\t\t'is_not_current_month'\t=>\t(\n\t\t\t\t\t$this->CDT->year == $today['year'] AND\n\t\t\t\t\t$this->CDT->month == $today['month']\n\t\t\t\t) ? FALSE : TRUE,\n\t\t\t\t'is_current_year'\t\t=>\t(\n\t\t\t\t\t$this->CDT->year == $today['year']\n\t\t\t\t) ? TRUE : FALSE,\n\t\t\t\t'is_not_current_year'\t=>\t(\n\t\t\t\t\t$this->CDT->year == $today['year']\n\t\t\t\t) ? FALSE : TRUE\n\t\t\t);\n\n\t\t\t$vars['single']\t= array(\n\t\t\t\t'year'\t=> $this->CDT->year,\n\t\t\t\t'month'\t=> $this->CDT->month\n\t\t\t);\n\n\t\t\t$vars['date']\t= array(\n\t\t\t\t'month'\t\t\t=> $this->CDT->datetime_array(),\n\t\t\t\t'date'\t\t\t=> $this->CDT->datetime_array(),\n\t\t\t);\n\n\t\t\t$output .= $this->swap_vars($vars, ee()->TMPL->tagdata);\n\t\t\t$this->CDT->add_month($dir);\n\t\t\t$count++;\n\t\t}\n\t\twhile (\n\t\t\t$count < $this->P->value('limit') AND\n\t\t\t$this->CDT->ymd < $this->P->value('date_range_end', 'ymd')\n\t\t);\n\n\t\treturn $output;\n\t}",
"public function AvailableMonths() {\n\t\t$params = $this->parseParams();\n\n\t\treturn DatedUpdateHolder::ExtractMonths(\n\t\t\t$this->Updates($params['tag'], $params['from'], $params['to']),\n\t\t\tDirector::makeRelative($_SERVER['REQUEST_URI']),\n\t\t\t$params['year'],\n\t\t\t$params['month']\n\t\t);\n\t}",
"public function setMonthLabels($array)\n {\n # Error check\n if (count($array) != 12) {\n return;\n }\n # set labels\n $this->monthLabels = $array;\n # return calendar instance\n return $this;\n }",
"function initMonth()\n {\n //! Si aucun mois ou année n'est recupéré on prend le mois et l'année actuel\n if (!$this->currentMonthName || !$this->year) {\n $this->currentMonthIndex = (int)date(\"m\", time()) - 1;\n $this->currentMonthName = $this->months[$this->currentMonthIndex];\n $this->year = (int)date(\"Y\", time());\n }\n // recalcule le premier jour pour ce mois et le nombre de jour total du mois\n $this->firstDayInMonth = strftime('%u', strtotime(strval($this->currentMonthIndex + 1) . '/01/' . strval($this->year)));\n $this->nbDaysMonth = cal_days_in_month(CAL_GREGORIAN, $this->currentMonthIndex + 1, $this->year);\n $this->currentMonthName = $this->months[$this->currentMonthIndex];\n }",
"function getExpMonth($selMonth=\"\"){\n\t//\tif($selMonth==\"\")\n\t\t\t//$selMonth = date(\"m\");\n\t\t$monthArr = array(\n\t\t\t\"Jan\"=>\"January\",\n\t\t\t\"Feb\"=>\"February\",\n\t\t\t\"Mar\"=>\"March\",\n\t\t\t\"Apr\"=>\"April\",\n\t\t\t\"May\"=>\"May\",\n\t\t\t\"Jun\"=>\"June\",\n\t\t\t\"Jul\"=>\"July\",\n\t\t\t\"Aug\"=>\"August\",\n\t\t\t\"Sep\"=>\"September\",\n\t\t\t\"Jan\"=>\"October\",\n\t\t\t\"Nov\"=>\"Nobember\",\n\t\t\t\"Dec\"=>\"December\"\n\t\t);\n\t\t$strMonths = \"\";\n\t\t$strMonths = \"<option value=''>Month</option>\";\n\t\tforeach($monthArr as $key=>$val){\n\n\t\t\tif($key == $selMonth)\n\t\t\t\t$strSel = \"selected\";\n\t\t\telse\n\t\t\t\t$strSel = \"\";\n\t\t\t\n\t\t\t$strMonths.=\"<option value=\".$key.\" $strSel>\".$key.\"</option>\";\n\t\t}\t\t\n\t\treturn $strMonths;\n\n\t}"
]
| [
"0.6071768",
"0.6050157",
"0.5989714",
"0.56009805",
"0.55293626",
"0.5480524",
"0.5461474",
"0.54268616",
"0.539783",
"0.52830404",
"0.52671427",
"0.5263418",
"0.5260819",
"0.5235332",
"0.5233443",
"0.5216457",
"0.5213674",
"0.52051973",
"0.5199233",
"0.5180589",
"0.51646286",
"0.5160203",
"0.51541436",
"0.51523983",
"0.51361394",
"0.5126595",
"0.51094514",
"0.5098139",
"0.5075701",
"0.50573397"
]
| 0.69276524 | 0 |
Set jQuery param: showButtonPanel | public function showButtonPanel($showButtonPanel){
if($showButtonPanel){
$this->_config_mapper(Array('showButtonPanel' => 'true'));
} else {
$this->_config_mapper(Array('showButtonPanel' => 'false'));
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function show_in_panel() {\n\t\treturn false;\n\t}",
"public function openAddPanel()\n {\n sleep(1);\n // TODO: Add ID to \"Add\" button\n $this->_webui->clickButton('.btn.btn-primary.btn-xs.pull-right.mb20');\n }",
"public function showNewClientButton()\n {\n $this->_showNewClientButton = true;\n }",
"public function actionControlPanel()\n {\n $this->render('controlPanel');\n }",
"public function createShowModal(){\n $this->modalFormVisible = true;\n }",
"public function showEnableInstallToolButtonAction() {}",
"public function add_quick_view_panel() {\n\t\t\t$options = $this->get_options();\n\n\t\t\tif ( 'none' === $options['shop_page_quick_view_position'] ) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t$icon = apply_filters( 'woostify_pro_quick_view_close_icon', 'ti-close' );\n\t\t\t?>\n\t\t\t<div id=\"woostify-quick-view-panel\" data-view_id=\"0\">\n\t\t\t\t<div class=\"shop-quick-view\">\n\t\t\t\t\t<button class=\"quick-view-close-btn <?php echo esc_attr( $icon ); ?>\"></button>\n\t\t\t\t\t<div class=\"quick-view-content\"></div>\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t\t<?php\n\t\t}",
"public\tfunction\tpanelSettings() {\n\t\t\t//Load the panel matching the settings slug.\n\t\t\tself::panel('FrozenPlugin-settings');\n\t\t}",
"function drawButtonPlan() {?>\r\n <button id=\"planButton\" dojoType=\"dijit.form.Button\" showlabel=\"false\"\r\n title=\"<?php echo i18n('buttonPlan');?>\" class=\"buttonIconNewGui detailButton\"\r\n iconClass=\"dijitIcon iconPlanStopped\" >\r\n <script type=\"dojo/connect\" event=\"onClick\" args=\"evt\">\r\n showPlanParam();\r\n return false;\r\n </script>\r\n </button>\r\n<?php \r\n}",
"function show_panel()\n\t{\n\t\tglobal $template, $errors, $Cl_root_path;\n\t\t\n\t\t$template->assign_files( array(\n\t\t\t'ACP_MoreContent' => 'ACP/MoreContent' . tplEx\n\t\t) );\n\t\t\n\t\t// get the subsubmode\n\t\t$sub = ( isset( $_GET[ 's' ] ) ) ? strval( $_GET[ 's' ] ) : 'add';\n\t\t\n\t\t\t\n\t\tswitch( $sub )\n\t\t{\n\t\t\tcase 'manage':\n\t\t\t\t$this->manage();\n\t\t\t\tbreak;\n\t\t\tcase 'manage2':\n\t\t\t\t$this->manage2();\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$errors->report_error( $this->lang[ 'Wrong_mode' ], CRITICAL_ERROR );\n\t\t\t\tbreak;\n\t\t}\n\t}",
"function show_panel()\n\t{\n\t\tglobal $errors, $template;\n\t\t\n\t\t// get the mode\n\t\t$s = ( isset( $_GET[ 's' ] ) ) ? strval( $_GET[ 's' ] ) : '';\n\t\t\n\t\t// fire the template\n\t\t$template->assign_files( array(\n\t\t\t'ACP_advance' => 'ACP/advance' . tplEx\n\t\t) );\n\t\t\n\t\t// act upon it\n\t\tswitch( $s )\n\t\t{\n\t\t\tcase 'settings':\n\t\t\t\t$this->settings();\n\t\t\t\tbreak;\n\t\t\tcase 'settings_real':\n\t\t\t\t$this->settings_real();\n\t\t\t\tbreak;\n\t\t\tcase 'browser':\n\t\t\t\t$this->browser();\n\t\t\t\tbreak;\n\t\t\tcase 'clearcache':\n\t\t\t\t$this->clearcache();\n\t\t\t\tbreak;\n\t\t\tcase 'console':\n\t\t\t\t$this->console();\n\t\t\t\tbreak;\n\t\t\tcase 'key':\n\t\t\t\t$this->key();\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$errors->report_error( $this->lang[ 'Wrong_mode' ], CRITICAL_ERROR );\n\t\t\t\tbreak;\n\t\t}\n\t}",
"public function showTransitNotePanel($sender, $param)\n\t{\n\t\t$this->ConfirmTransitNoteWindow->Display = \"Dynamic\";\n\t\t$this->ConfirmTransitNoteWindow->Style = \"position: fixed;top: 10px;z-index:99;left: 10%; width: 80%; height: 80%;\";\n\t}",
"public static function setShowContainer($bShowContainer=true) {\r\n\t\tself::$_bShowContainer = $bShowContainer;\r\n\t}",
"public function set_button($button) { $this->button = $button; }",
"function rt_button_show($target)\n{\n return rt_ui_button('show', $target, 'search');\n}",
"public function setShowInAdminBar($show = NULL ){\n\t\t$this->showInAdminBar = isset($show) ? $show : $this->showInMenu;\n\t}",
"public function SetPanelSettings()\n\t{\n\t\t$GLOBALS['ISC_CLASS_PRODUCT'] = GetClass('ISC_PRODUCT');\n\t\t$id = $GLOBALS['ISC_CLASS_PRODUCT']->GetProductId();\n\t\t// How many tags do we have?\n\t\t$query = \"\n\t\t\tSELECT p.* , pi.imagefilethumb\n\t\t\tFROM isc_products p\n\t\t\tINNER JOIN isc_product_associations pa ON ( \n\t\t\t\tpa.assocbaseid = \" . $id . \" AND pa.assocprodid = p.productid\n\t\t\t) \n\t\t\tINNER JOIN isc_product_images pi ON ( \n\t\t\t\tpi.imageprodid = pa.assocprodid AND pi.imageisthumb = 1\n\t\t\t) \n\t\t\";\n\t\t$result = $GLOBALS['ISC_CLASS_DB']->Query($query);\n\t\t\n\t\t$GLOBALS['SNIPPETS']['ProductMadeByList'] = '';\n\t\twhile($row = $GLOBALS['ISC_CLASS_DB']->Fetch($result)) {\n\t\t\t$GLOBALS['ComponentImg'] = GetConfig('ShopPath') . '/' . GetConfig('ImageDirectory') . '/' . $row['imagefilethumb'];\n\t\t\t$GLOBALS['ComponentName'] = $row['prodname'];\n\t\t\t$GLOBALS['ComponentLink'] = ProdLink($row['prodname']);\n\t\t\t$GLOBALS['SNIPPETS']['ProductMadeByList'] .= $GLOBALS['ISC_CLASS_TEMPLATE']->GetSnippet('ProductMadeByItem');\n\t\t}\n\t\t\n\t\tif($GLOBALS['SNIPPETS']['ProductMadeByList'] == '') {\n\t\t\t$this->DontDisplay = true;\n\t\t}\n\t}",
"function siteorigin_panels_preview_adminbar($show){\n\tif(!$show) return false;\n\treturn !(isset($_GET['siteorigin_panels_preview']) && wp_verify_nonce($_GET['_wpnonce'], 'siteorigin-panels-preview'));\n}",
"public function switchPagePanel() {\n\t\t$request = GeneralUtility::_GET('request');\n\t\t$arguments = $request['arguments'];\n\n\t\t$GLOBALS['BE_USER']->uc['tx_versaillesutilities_page_panel'] = $arguments['flag'];\n\t\t$GLOBALS['BE_USER']->overrideUC();\n\t\t$GLOBALS['BE_USER']->writeUC();\n\n\t\techo $GLOBALS['BE_USER']->uc['tx_versaillesutilities_page_panel'];\n\t}",
"public function setFilterPanel($panel)\n {\n\n $this->filterPanel = $panel;\n \n }",
"function siteorigin_panels_preview(){\n\tif(isset($_GET['siteorigin_panels_preview']) && isset($_GET['_wpnonce']) && wp_verify_nonce($_GET['_wpnonce'], 'siteorigin-panels-preview')){\n\t\tglobal $siteorigin_panels_is_preview;\n\t\t$siteorigin_panels_is_preview = true;\n\t\texit();\n\t}\n}",
"public function setShowUi($show = NULL ){\n\t\t$this->show_ui = $show ? $show : $this->public;\n\t}",
"function ed_setting_show_media_buttons_callback(){\n\techo '<input\n\tname=\"ed_setting_show_media_buttons\"\n\tid=\"ed_setting_show_media_buttons\"\n\ttype=\"checkbox\"\n\tvalue=\"1\"\n\tclass=\"code\"\n\t' . checked(1, get_option('ed_setting_show_media_buttons'), false).' />\n\tChoose if media buttons should be enabled';\n}",
"function show_add_button(){\n if($this->session->system_admin){\n return true;\n }\n \n }",
"private function show_connect_button() {\n\t\t?>\n\t\t<div class=\"text-center wp-core-ui rank-math-ui\" style=\"margin-top: 30px;\">\n\t\t\t<button type=\"submit\" class=\"button button-primary button-animated\" name=\"rank_math_activate\"><?php echo esc_attr__( 'Connect Your Account', 'rank-math' ); ?></button>\n\t\t</div>\n\t\t<?php\n\t}",
"public function showButtonCustomizationPage($html='',$show_header=TRUE,$show_footer=TRUE) {\n\n\t\techo $this->getButtonCustomizationPage($html,$show_header,$show_footer);\n\t}",
"function positive_panels_init(){\n\t/*$display_settings = get_option('siteorigin_panels_display', array());\n\tif( isset($display_settings['bundled-widgets'] ) && !$display_settings['bundled-widgets'] ) return;*/\n\n\tinclude 'widgets/widgets.php';\n}",
"public function displayAdminPanel() {}",
"function show_panel()\n\t{\n\t\tglobal $template, $errors, $Cl_root_path;\n\t\t\n\t\t$template->assign_files( array(\n\t\t\t'ACP_pages' => 'ACP/pages' . tplEx\n\t\t) );\n\t\t\n\t\t// get the subsubmode\n\t\t$sub = ( isset( $_GET[ 's' ] ) ) ? strval( $_GET[ 's' ] ) : 'add';\n\t\t\n\t\t\t\n\t\tswitch( $sub )\n\t\t{\n\t\t\tcase 'add':\n\t\t\t\t$this->adding();\n\t\t\t\tbreak;\n\t\t\tcase 'edit':\n\t\t\t\t$this->editting();\n\t\t\t\tbreak;\n\t\t\tcase 'add_bar':\n\t\t\t\t$mode = ( isset( $_POST[ 'MODE' ] ) ) ? strval( $_POST[ 'MODE' ] ) : '';\n\t\t\t\tswitch( $mode )\n\t\t\t\t{\n\t\t\t\t\tcase 'create':\n\t\t\t\t\t\t$this->add_page();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'edit':\n\t\t\t\t\t\t$this->edit_page();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\t$errors->report_error( $this->lang[ 'Wrong_form' ], CRITICAL_ERROR );\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 'convert':\n\t\t\t\tinclude( $Cl_root_path . 'kernel/config/static_pages' . phpEx );\n\t\t\t\tif ( isset( $pages ) )\n\t\t\t\t{\n\t\t\t\t\t$this->pages_array = $pages;\n\t\t\t\t}\n\t\t\t\t$this->save_pages();\n\t\t\t\t$errors->report_error( $this->lang[ 'Converted' ], MESSAGE );\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$errors->report_error( $this->lang[ 'Wrong_mode' ], CRITICAL_ERROR );\n\t\t\t\tbreak;\n\t\t}\n\t}",
"function ShowPanel()\n{\n echo '<script src=\"https://cdn.jsdelivr.net/npm/[email protected]/dist/jspanel.js\"></script>';\n}"
]
| [
"0.661741",
"0.6019365",
"0.5686028",
"0.5668716",
"0.56454724",
"0.56302196",
"0.56301653",
"0.5454913",
"0.5452624",
"0.5446394",
"0.5438562",
"0.5431659",
"0.5400272",
"0.5399156",
"0.5379872",
"0.53700435",
"0.53681576",
"0.53379023",
"0.53378904",
"0.5333831",
"0.5303617",
"0.5271229",
"0.52680033",
"0.52639705",
"0.525353",
"0.52465904",
"0.52356476",
"0.52304614",
"0.5200875",
"0.5191675"
]
| 0.7856778 | 0 |
Set jQuery params: numberOfMonths, showButtonPanel | public function setCalendarNumber($numberOfMonths, $showButtonPanel){
$this->_config_mapper(Array('numberOfMonths' => (int)$numberOfMonths));
if($showButtonPanel) {
$this->_config_mapper(Array('showButtonPanel' => 'true'));
} else {
$this->_config_mapper(Array('showButtonPanel' => 'false'));
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function setMonths() {\n\tglobal $monthList,\t$monthListShort, $weekdaysList;\n\t$monthList=array('一月','二月','三月','四月','五月','六月',\n\t\t\t\t\t'七月','八月','九月','十月','十一月','十二月');\n\t$monthListShort=array('JAN','FEB','MAR','APR','MAY','JUN','JUL','AUG','SEP','OCT','NOV','DEC');\n\t$weekdaysList=array('Mon','Tue','Wed','Thu','Fri','Sat','Sun') ;\n}",
"function setMonths() {\n\tglobal $monthList,\t$monthListShort, $weekdaysList;\n\t$monthList=array('Enero','Febrero','Marzo','Abril','Mayo','Junio',\n\t\t\t\t\t'Julio','Agosto','Septiembre','Octubre','Noviembre','Diciembre');\n\t$monthListShort=array('ENE','FEB','MAR','ABR','MAY','JUN','JUL','AGO','SEP','OCT','NOV','DIC');\n\t$weekdaysList=array('Lun','Mar','Mie','Jue','Vie','Sab','Dom') ;\n}",
"public function showCurrentMonthAction()\r\n {\r\n\t\t$startDate = date('Y-m-01');\r\n\t\t$endDate = date('Y-m-d');\r\n\t\t\r\n\t\t$period = ' - bieżący miesiąc';\r\n\t\t\r\n\t\tstatic::show($startDate, $endDate, $period);\r\n }",
"function MakeCalendarControls(){\n $arrFormAttributes = array('method'=>'post');\n $arrTitleAttributes = array('class'=>'calendarmonth');\n $objControlForm = $this->objCalendar->AddChildNode($this->objCalendar->objHTML,'', 'form',$arrFormAttributes);\n //make our month designation\n $strThisMonth = date('F', strtotime($this->intYear.'-'.$this->intMonth.'-1'));\n //previous month\n $this->objCalendar->AddChildNode($objControlForm,'', 'input',array('type'=>'button','onclick'=>'this.form.monthaction.value=\\'previous\\';this.form.submit();','value'=>'Last Month','class'=>'calendarnavbuttons left'));\n //month and year title\n $this->objCalendar->AddChildNode($objControlForm,$strThisMonth.', '.$this->intYear, 'b',$arrTitleAttributes);\n //next month button\n $this->objCalendar->AddChildNode($objControlForm,'', 'input',array('type'=>'button','onclick'=>'this.form.monthaction.value=\\'next\\';this.form.submit();','value'=>'Next Month','class'=>'calendarnavbuttons right'));\n //hidden present month\n $this->objCalendar->AddChildNode($objControlForm,'', 'input',array('type'=>'hidden','value'=>$this->intMonth,'name'=>'presentmonth'));\n //hidden present year\n $this->objCalendar->AddChildNode($objControlForm,'', 'input',array('type'=>'hidden','value'=>$this->intYear,'name'=>'presentyear'));\n //hidden month action\n $this->objCalendar->AddChildNode($objControlForm,'', 'input',array('type'=>'hidden','value'=>'none','name'=>'monthaction'));\n return TRUE;\n }",
"public static function setDateFormatMonth()\n {\n self::$settings[0] = 'Y-m';\n }",
"function showMonth($showNoMonthDays=false){\n$this->showNoMonthDays=$showNoMonthDays;\n$out=$this->mkMonthHead(); // this should remain first: opens table tag\n$out.=$this->mkMonthTitle(); // tr tag: month title and navigation\n$out.=$this->mkDatePicker(); // tr tag: month date picker (month and year selection)\n$out.=$this->mkWeekDays(); // tr tag: the weekday names\n\tif ($this->showNoMonthDays==false) $out.=$this->mkMonthBody(); // tr tags: the days of the month\n\telse $out.=$this->mkMonthBody(1); // tr tags: the days of the month\n$out.=$this->mkMonthFoot(); // this should remain last: closes table tag\nreturn $out;\n}",
"public function SelectMonth()\r\n {\r\n if(isset($_POST['month'])){\r\n //$mois prends la valeur de month\r\n $mois = $_POST['month'];\r\n //Recupere dans $mois l'ID du mois\r\n $mois = $this->GetMois(substr($mois, 5,2));\r\n //MaisPage recupere $mois\r\n $this->MainPage($mois);\r\n }\r\n //Sinon MainPage ne recupere pas $mois\r\n else{\r\n $this->MainPage();\r\n }\r\n }",
"function setMonth($m)\r\n {\r\n if($m < 1 || $m > 12) {\r\n $this->mes = 1;\r\n } else {\r\n $this->mes = $m;\r\n }\r\n }",
"public function __construct() {\r\n $this->setMode(self::$modeMonth);\r\n }",
"public function set(){\r\n\t\t$js = new \\wp\\htmlManager\\js();\r\n\t\t$js->addPlugin(\"jquery.plugin\",true);\r\n\t\t$js->addPlugin(\"jquery.datepick\",true);\r\n\t\t$js->addPlugin(\"jquery.datepick-fr\");\r\n\t\t\r\n\t\t\\wp\\Tpl\\templateEngine::getEngine()->addContent(\"js\",$js);\r\n\t\t\r\n\t\t// Ajoute le script d'ouverture du datepicker\r\n\t\t$this->toControls();\r\n\t\t\r\n\t\t// Ajoute les CSS\r\n\t\t$css = new \\wp\\htmlManager\\css();\r\n\t\t$css->addSheet(\"jquery.datepick\");\r\n\t\t\r\n\t\t\\wp\\Tpl\\templateEngine::getEngine()->addContent(\"css\",$css);\r\n\t}",
"public function get_month_choices()\n {\n }",
"function training_dates_callback() {\n ctools_include('modal');\n ctools_include('ajax');\n ctools_modal_add_js();\n $output = ctools_modal_text_button('Click me to show date', 'training/dates/nojs/form', 'Click', 'ctools-modal-date-class');\n $settings = array(\n 'date-class' => array(\n 'modalSize' => array(\n 'type' => 'fixed',\n 'width' => 300,\n 'height' => 300,\n ),\n 'animation' => 'fadeIn',\n ),\n );\n\n return array(\n array(\n '#type' => 'markup',\n '#markup' => $output,\n ),\n array(\n '#attached' => array(\n 'js' => array(\n array(\n 'data' => $settings,\n 'type' => 'setting',\n ),\n ),\n ),\n ),\n );\n}",
"function setMonthNames($namesArray){\n\tif (!is_array($namesArray) || count($namesArray)!=12) return false;\n\telse $this->monthNames=$namesArray;\n}",
"public function setMonthLabels($array)\n {\n # Error check\n if (count($array) != 12) {\n return;\n }\n # set labels\n $this->monthLabels = $array;\n # return calendar instance\n return $this;\n }",
"public function showYearAndMonthDD($showMonth, $showYear){\n \n if($showMonth) {\n $this->_config_mapper(Array('changeMonth' => 'true')); \n } else {\n $this->_config_mapper(Array('changeMonth' => 'false')); \n }\n \n if($showYear) {\n $this->_config_mapper(Array('changeYear' => 'true')); \n } else {\n $this->_config_mapper(Array('changeYear' => 'false')); \n } \n }",
"function initMonth()\n {\n //! Si aucun mois ou année n'est recupéré on prend le mois et l'année actuel\n if (!$this->currentMonthName || !$this->year) {\n $this->currentMonthIndex = (int)date(\"m\", time()) - 1;\n $this->currentMonthName = $this->months[$this->currentMonthIndex];\n $this->year = (int)date(\"Y\", time());\n }\n // recalcule le premier jour pour ce mois et le nombre de jour total du mois\n $this->firstDayInMonth = strftime('%u', strtotime(strval($this->currentMonthIndex + 1) . '/01/' . strval($this->year)));\n $this->nbDaysMonth = cal_days_in_month(CAL_GREGORIAN, $this->currentMonthIndex + 1, $this->year);\n $this->currentMonthName = $this->months[$this->currentMonthIndex];\n }",
"private function setDate(){\n\t// Validate incoming parameters\n\t\t$this->di->logger->stamp(__CLASS__, __METHOD__, '');\n\tif (isset($_GET['month'])) {\n\t\tis_numeric($_GET['month']) or die('month has to be numeric');\n\t}\n\tif (isset($_GET['year'])) {\n\t\tis_numeric($_GET['year']) or die('year has to be numeric');\n\t}\n\n\t// Set new date\n\t$this->newMonth = isset($_GET['month']) ? ($_GET['month']) : $this->currentMonth;\n\t$this->newYear = isset($_GET['year']) ? ($_GET['year']) : $this->currentYear;\n\n\tif ($this->newMonth > 12) {\n\t\t$this->newYear = $this->newYear +1;\n\t\t$this->newMonth = 1;\n\t\t$_GET['month'] = 1;\n\n\t}\n\telse if ($this->newMonth < 1) {\n\t\t$this->newYear = $this->newYear -1;\n\t\t$this->newMonth = 12;\n\t\t$_GET['month'] = 12;\n\t}\n\t\n\t}",
"function enableMonthNav($link=false,$arrowBack=false,$arrowForw=false){\n\tif ($link) $this->urlNav=$link;\n\telse $this->urlNav=$_SERVER['PHP_SELF'];\n\tif ($arrowBack) $this->monthNavBack=$arrowBack;\n\tif ($arrowForw) $this->monthNavForw=$arrowForw;\n$this->monthNav=true;\n}",
"public function changeMonth($args) {\n if (!SecurityUtil::checkPermission('IWagendas::', '::', ACCESS_READ)) {\n throw new Zikula_Exception_Fatal($this->__('Sorry! No authorization to access this module.'));\n }\n\n $daid = $this->request->getPost()->get('daid', '');\n\n $mes = $this->request->getPost()->get('mes', '');\n if (!$mes) {\n throw new Zikula_Exception_Fatal($this->__('no month defined'));\n }\n\n $any = $this->request->getPost()->get('any', '');\n if (!$any) {\n throw new Zikula_Exception_Fatal($this->__('no year defined'));\n }\n\n $content = ModUtil::func('IWagendas', 'user', 'main', array('mes' => $mes,\n 'any' => $any,\n 'daid' => $daid));\n return new Zikula_Response_Ajax(array('content' => $content,\n ));\n }",
"public function month()\n\t{\n\t\t// -------------------------------------\n\t\t// Load 'em up\n\t\t// -------------------------------------\n\n\t\t$this->load_calendar_datetime();\n\t\t$this->load_calendar_parameters();\n\n\t\t// -------------------------------------\n\t\t// Prep the parameters\n\t\t// -------------------------------------\n\n\t\t$disable = array('categories', 'category_fields', 'custom_fields', 'member_data', 'pagination', 'trackbacks');\n\n\t\t$params = array(\n\t\t\tarray(\t'name' => 'category',\n\t\t\t\t\t'required' => FALSE,\n\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t'multi' => TRUE\n\t\t\t\t\t),\n\t\t\tarray(\t'name' => 'site_id',\n\t\t\t\t\t'required' => FALSE,\n\t\t\t\t\t'type' => 'integer',\n\t\t\t\t\t'min_value' => 1,\n\t\t\t\t\t'multi' => TRUE,\n\t\t\t\t\t'default' => $this->data->get_site_id()\n\t\t\t\t\t),\n\t\t\tarray(\t'name' => 'calendar_id',\n\t\t\t\t\t'required' => FALSE,\n\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t'multi' => TRUE\n\t\t\t\t\t),\n\t\t\tarray(\t'name' => 'calendar_name',\n\t\t\t\t\t'required' => FALSE,\n\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t'multi' => TRUE\n\t\t\t\t\t),\n\t\t\tarray(\t'name' => 'event_id',\n\t\t\t\t\t'required' => FALSE,\n\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t'multi' => TRUE\n\t\t\t\t\t),\n\t\t\tarray(\t'name' => 'event_name',\n\t\t\t\t\t'required' => FALSE,\n\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t'multi' => TRUE\n\t\t\t\t\t),\n\t\t\tarray(\t'name' => 'event_limit',\n\t\t\t\t\t'required' => FALSE,\n\t\t\t\t\t'type' => 'integer'\n\t\t\t\t\t),\n\t\t\tarray(\t'name' => 'status',\n\t\t\t\t\t'required' => FALSE,\n\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t'multi' => TRUE,\n\t\t\t\t\t'default' => 'open'\n\t\t\t\t\t),\n\t\t\tarray(\t'name' => 'date_range_start',\n\t\t\t\t\t'required' => FALSE,\n\t\t\t\t\t'type' => 'date'\n\t\t\t\t\t),\n\t\t\tarray(\t'name' => 'time_range_start',\n\t\t\t\t\t'required' => FALSE,\n\t\t\t\t\t'type' => 'time',\n\t\t\t\t\t'default' => '0000'\n\t\t\t\t\t),\n\t\t\tarray(\t'name' => 'time_range_end',\n\t\t\t\t\t'required' => FALSE,\n\t\t\t\t\t'type' => 'time',\n\t\t\t\t\t'default' => '2400'\n\t\t\t\t\t),\n\t\t\tarray(\t'name' => 'enable',\n\t\t\t\t\t'required' => FALSE,\n\t\t\t\t\t'type' => 'string',\n\t\t\t\t\t'default' => '',\n\t\t\t\t\t'multi' => TRUE,\n\t\t\t\t\t'allowed_values' => $disable\n\t\t\t\t\t),\n\t\t\tarray(\t'name' => 'first_day_of_week',\n\t\t\t\t\t'required' => FALSE,\n\t\t\t\t\t'type' => 'integer',\n\t\t\t\t\t'default' => $this->first_day_of_week\n\t\t\t\t\t),\n\t\t\tarray(\t'name' => 'start_date_segment',\n\t\t\t\t\t'required' => FALSE,\n\t\t\t\t\t'type' => 'integer',\n\t\t\t\t\t'default' => 3\n\t\t\t\t\t)\n\t\t\t);\n\n\t\t//ee()->TMPL->log_item('Calendar: Processing parameters');\n\n\t\t$this->add_parameters($params);\n\n\t\t// -------------------------------------\n\t\t// Need to modify the starting date?\n\t\t// -------------------------------------\n\n\t\t$this->first_day_of_week = $this->P->value('first_day_of_week');\n\n\t\tif ($this->P->value('date_range_start') === FALSE)\n\t\t{\n\t\t\tif ($this->P->value('start_date_segment') AND ee()->uri->segment($this->P->value('start_date_segment')) AND strstr(ee()->uri->segment($this->P->value('start_date_segment')), '-'))\n\t\t\t{\n\t\t\t\tlist($year, $month) = explode('-', ee()->uri->segment($this->P->value('start_date_segment')));\n\t\t\t\t$this->P->params['date_range_start']['value'] = $this->CDT->change_date($year, $month, 1);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->P->params['date_range_start']['value'] = $this->CDT->change_date($this->CDT->year, $this->CDT->month, 1);\n\t\t\t}\n\t\t}\n\t\telseif ($this->P->value('date_range_start', 'day') != 1)\n\t\t{\n\t\t\t$this->P->params['date_range_start']['value'] = $this->CDT->change_date($this->P->value('date_range_start', 'year'), $this->P->value('date_range_start', 'month'), 1);\n\t\t}\n\n\t\t// -------------------------------------\n\t\t// Define parameters specific to this calendar view\n\t\t// -------------------------------------\n\n\t\t$this->CDT->change_ymd($this->P->value('date_range_start', 'ymd'));\n\t\t$this->P->set('date_range_end', $this->CDT->add_day($this->CDT->days_in_month($this->P->value('date_range_start', 'month'), $this->P->value('date_range_start', 'year')) - 1));\n\t\t$this->P->set('pad_short_weeks', TRUE);\n\n\t\t// -------------------------------------\n\t\t// Define our tagdata\n\t\t// -------------------------------------\n\n\t\t$find = array(\t'EVENTS_PLACEHOLDER',\n\t\t\t\t\t\t'{/',\n\t\t\t\t\t\t'{',\n\t\t\t\t\t\t'}'\n\t\t\t\t\t\t);\n\t\t$replace = array(\tee()->TMPL->tagdata,\n\t\t\t\t\t\t\tLD.T_SLASH,\n\t\t\t\t\t\t\tLD,\n\t\t\t\t\t\t\tRD\n\t\t\t\t\t\t\t);\n\t\tee()->TMPL->tagdata = str_replace($find, $replace, $this->view('month.html', array(), TRUE, $this->sc->addon_theme_path.'templates/month.html'));\n\n\t\t// -------------------------------------\n\t\t// Tell TMPL what we're up to\n\t\t// -------------------------------------\n\n\t\tif (strpos(ee()->TMPL->tagdata, LD.'events'.RD) !== FALSE)\n\t\t{\n\t\t\tee()->TMPL->var_pair['events'] = TRUE;\n\t\t}\n\n\t\tif (strpos(ee()->TMPL->tagdata, LD.'display_each_hour'.RD) !== FALSE)\n\t\t{\n\t\t\tee()->TMPL->var_pair['display_each_hour'] = TRUE;\n\t\t}\n\n\t\tif (strpos(ee()->TMPL->tagdata, LD.'display_each_day'.RD) !== FALSE)\n\t\t{\n\t\t\tee()->TMPL->var_pair['display_each_day'] = TRUE;\n\t\t}\n\n\t\tif (strpos(ee()->TMPL->tagdata, LD.'display_each_week'.RD) !== FALSE)\n\t\t{\n\t\t\tee()->TMPL->var_pair['display_each_week'] = TRUE;\n\t\t}\n\n\t\tif (strpos(ee()->TMPL->tagdata, LD.'display_each_month'.RD) !== FALSE)\n\t\t{\n\t\t\tee()->TMPL->var_pair['display_each_month'] = TRUE;\n\t\t}\n\n\t\tif (strpos(ee()->TMPL->tagdata, LD.'display_each_day_of_week'.RD) !== FALSE)\n\t\t{\n\t\t\tee()->TMPL->var_pair['display_each_day_of_week'] = TRUE;\n\t\t}\n\n\t\t// -------------------------------------\n\t\t// If you build it, they will know what's going on.\n\t\t// -------------------------------------\n\n\t\t$this->parent_method = __FUNCTION__;\n\n\t\treturn $this->build_calendar();\n\t}",
"public function getMonths();",
"public function showPreviousMonthAction()\r\n {\r\n\t\t$startDate = date('Y-m-d', strtotime(\"first day of last month\"));\r\n\t\t$endDate = date('Y-m-d', strtotime(\"last day of last month\"));\r\n\t\t\r\n\t\t$period = ' - poprzedni miesiąc';\r\n\t\t\r\n\t\tstatic::show($startDate, $endDate, $period);\r\n }",
"public function setMonth($a = null)\n {\n throw new NotImplementedException(__METHOD__);\n }",
"public function month_list()\n\t{\n\t\t// -------------------------------------\n\t\t// Load 'em up\n\t\t// -------------------------------------\n\n\t\t$this->load_calendar_datetime();\n\t\t$this->load_calendar_parameters();\n\n\t\t// -------------------------------------\n\t\t// Prep the parameters\n\t\t// -------------------------------------\n\n\t\t$params = array(\n\t\t\tarray(\n\t\t\t\t'name'\t\t=> 'date_range_start',\n\t\t\t\t'required'\t=> FALSE,\n\t\t\t\t'type'\t\t=> 'date',\n\t\t\t\t'default'\t=> 'year-01-01'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name'\t\t=> 'date_range_end',\n\t\t\t\t'required'\t=> FALSE,\n\t\t\t\t'type'\t\t=> 'date'\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name'\t\t=> 'limit',\n\t\t\t\t'required'\t=> FALSE,\n\t\t\t\t'type'\t\t=> 'integer',\n\t\t\t\t'default'\t=> 12\n\t\t\t)\n\t\t);\n\n//ee()->TMPL->log_item('Calendar: Processing parameters');\n\n\t\t$this->add_parameters($params);\n\n\t\t$today = $this->CDT->date_array();\n\n\t\t$this->CDT->change_ymd($this->P->value('date_range_start', 'ymd'));\n\t\t$this->CDT->set_default($this->CDT->datetime_array());\n\n\t\tif ($this->P->value('date_range_end') === FALSE)\n\t\t{\n\t\t\t$this->P->set(\n\t\t\t\t'date_range_end',\n\t\t\t\t$this->CDT->add_month($this->P->value('limit'))\n\t\t\t);\n\n\t\t\t$this->CDT->reset();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->P->set('limit', 9999);\n\t\t}\n\n\t\t$dir = (\n\t\t\t$this->P->value('date_range_end', 'ymd') >\n\t\t\t\t$this->P->value('date_range_start', 'ymd')\n\t\t) ? 1 : -1;\n\n\t\t$output = '';\n\t\t$count = 0;\n\n//ee()->TMPL->log_item('Calendar: Looping');\n\n\t\tdo\n\t\t{\n\t\t\t$vars['conditional']\t= array(\n\t\t\t\t'is_current_month'\t\t=>\t(\n\t\t\t\t\t$this->CDT->year == $today['year'] AND\n\t\t\t\t\t$this->CDT->month == $today['month']\n\t\t\t\t),\n\t\t\t\t'is_not_current_month'\t=>\t(\n\t\t\t\t\t$this->CDT->year == $today['year'] AND\n\t\t\t\t\t$this->CDT->month == $today['month']\n\t\t\t\t) ? FALSE : TRUE,\n\t\t\t\t'is_current_year'\t\t=>\t(\n\t\t\t\t\t$this->CDT->year == $today['year']\n\t\t\t\t) ? TRUE : FALSE,\n\t\t\t\t'is_not_current_year'\t=>\t(\n\t\t\t\t\t$this->CDT->year == $today['year']\n\t\t\t\t) ? FALSE : TRUE\n\t\t\t);\n\n\t\t\t$vars['single']\t= array(\n\t\t\t\t'year'\t=> $this->CDT->year,\n\t\t\t\t'month'\t=> $this->CDT->month\n\t\t\t);\n\n\t\t\t$vars['date']\t= array(\n\t\t\t\t'month'\t\t\t=> $this->CDT->datetime_array(),\n\t\t\t\t'date'\t\t\t=> $this->CDT->datetime_array(),\n\t\t\t);\n\n\t\t\t$output .= $this->swap_vars($vars, ee()->TMPL->tagdata);\n\t\t\t$this->CDT->add_month($dir);\n\t\t\t$count++;\n\t\t}\n\t\twhile (\n\t\t\t$count < $this->P->value('limit') AND\n\t\t\t$this->CDT->ymd < $this->P->value('date_range_end', 'ymd')\n\t\t);\n\n\t\treturn $output;\n\t}",
"public function showButtonPanel($showButtonPanel){\n \n if($showButtonPanel){\n $this->_config_mapper(Array('showButtonPanel' => 'true')); \n } else {\n $this->_config_mapper(Array('showButtonPanel' => 'false')); \n }\n }",
"function setDateHtmlOptions( $html, $ctrlName, $date = \"\", $format = \"Y-m-d h:i:s\")\n\t{\n\t\tif($format == \"\")\n\t\t\t$format = \"Y-m-d h:i:s\";\n\t\tif($date == \"\")\n\t\t\t$date = date($format);\n\n\t\t$dataRepeaterContent = SoondaUtil::getStringBetween( $html, \"<soo:datarepeater:\".$ctrlName.\"Day>\", \"</soo:datarepeater:\".$ctrlName.\"Day>\");\n\t\t$sOptions = \"\";\n\t\tfor($i = 1; $i < 32; $i++)\n\t\t{\n\t\t\t$stmp = str_replace( \"{SOO.DATA:\".$ctrlName.\"Day}\", $i, $dataRepeaterContent);\n\t\t\t$stmp = str_replace( \"{SOO.DATA:\".$ctrlName.\"DayDisplay}\", ($i < 10) ? \"0$i\" : $i, $stmp);\n\t\t\t$stmp = str_replace( \"{selected\".$ctrlName.\"Day}\", ($i == date(\"d\", strtotime( $date ) ) ) ? \"selected\" : \"\", $stmp);\n\t\t\t$sOptions .= $stmp;\n\t\t}\n\t\t$html = str_replace( $dataRepeaterContent, $sOptions, $html);\n\n\t\t$dataRepeaterContent = SoondaUtil::getStringBetween( $html, \"<soo:datarepeater:\".$ctrlName.\"Month>\", \"</soo:datarepeater:\".$ctrlName.\"Month>\");\n\t\t$sOptions = \"\";\n\t\tfor($i = 1; $i < 13; $i++)\n\t\t{\n\t\t\t$stmp = str_replace( \"{SOO.DATA:\".$ctrlName.\"Month}\", $i, $dataRepeaterContent);\n\t\t\t$stmp = str_replace( \"{SOO.DATA:\".$ctrlName.\"MonthDisplay}\", SoondaUtil::getMonthName( $i), $stmp);\n\t\t\t$stmp = str_replace( \"{selected\".$ctrlName.\"Month}\", ($i == date(\"m\", strtotime( $date ) )) ? \"selected\" : \"\", $stmp);\n\t\t\t$sOptions .= $stmp;\n\t\t}\n\t\t$html = str_replace( $dataRepeaterContent, $sOptions, $html);\n\n\t\t$dataRepeaterContent = SoondaUtil::getStringBetween( $html, \"<soo:datarepeater:\".$ctrlName.\"Year>\", \"</soo:datarepeater:\".$ctrlName.\"Year>\");\n\t\t$sOptions = \"\";\n\t\t$currentYear = date(\"Y\");\n\t\tfor($i = $currentYear - 20; $i < $currentYear + 20; $i++)\n\t\t{\n\t\t\t$stmp = str_replace( \"{SOO.DATA:\".$ctrlName.\"Year}\", $i, $dataRepeaterContent);\n\t\t\t$stmp = str_replace( \"{SOO.DATA:\".$ctrlName.\"YearDisplay}\", ($i < 10) ? \"0$i\" : $i, $stmp);\n\t\t\t$stmp = str_replace( \"{selected\".$ctrlName.\"Year}\", ($i == date(\"Y\", strtotime( $date ) )) ? \"selected\" : \"\", $stmp);\n\t\t\t$sOptions .= $stmp;\n\t\t}\n\t\t$html = str_replace( $dataRepeaterContent, $sOptions, $html);\n\n\t\t$dataRepeaterContent = SoondaUtil::getStringBetween( $html, \"<soo:datarepeater:\".$ctrlName.\"Hour>\", \"</soo:datarepeater:\".$ctrlName.\"Hour>\");\n\t\t$sOptions = \"\";\n\t\tfor($i = 0; $i < 24; $i++)\n\t\t{\n\t\t\t$stmp = str_replace( \"{SOO.DATA:\".$ctrlName.\"Hour}\", $i, $dataRepeaterContent);\n\t\t\t$stmp = str_replace( \"{SOO.DATA:\".$ctrlName.\"HourDisplay}\", ($i < 10) ? \"0$i\" : $i, $stmp);\n\t\t\t$stmp = str_replace( \"{selected\".$ctrlName.\"Hour}\", ($i == date(\"h\", strtotime( $date ) )) ? \"selected\" : \"\", $stmp);\n\t\t\t$sOptions .= $stmp;\t\t\n\t\t}\n\t\t$html = str_replace( $dataRepeaterContent, $sOptions, $html);\n\n\t\t$dataRepeaterContent = SoondaUtil::getStringBetween( $html, \"<soo:datarepeater:\".$ctrlName.\"Minute>\", \"</soo:datarepeater:\".$ctrlName.\"Minute>\");\n\t\t$sOptions = \"\";\n\t\tfor($i = 0; $i < 60; $i++)\n\t\t{\n\t\t\t$stmp = str_replace( \"{SOO.DATA:\".$ctrlName.\"Minute}\", $i, $dataRepeaterContent);\n\t\t\t$stmp = str_replace( \"{SOO.DATA:\".$ctrlName.\"MinuteDisplay}\", ($i < 10) ? \"0$i\" : $i, $stmp);\n\t\t\t$stmp = str_replace( \"{selected\".$ctrlName.\"Minute}\", ($i == date(\"i\", strtotime( $date ) )) ? \"selected\" : \"\", $stmp);\n\t\t\t$sOptions .= $stmp;\t\t\n\t\t}\n\t\t$html = str_replace( $dataRepeaterContent, $sOptions, $html);\n\n\t\t$dataRepeaterContent = SoondaUtil::getStringBetween( $html, \"<soo:datarepeater:\".$ctrlName.\"Second>\", \"</soo:datarepeater:\".$ctrlName.\"Second>\");\n\t\t$sOptions = \"\";\n\t\tfor($i = 0; $i < 60; $i++)\n\t\t{\n\t\t\t$stmp = str_replace( \"{SOO.DATA:\".$ctrlName.\"Second}\", $i, $dataRepeaterContent);\n\t\t\t$stmp = str_replace( \"{SOO.DATA:\".$ctrlName.\"SecondDisplay}\", ($i < 10) ? \"0$i\" : $i, $stmp);\n\t\t\t$stmp = str_replace( \"{selected\".$ctrlName.\"Second}\", ($i == date(\"s\", strtotime( $date ) )) ? \"selected\" : \"\", $stmp);\n\t\t\t$sOptions .= $stmp;\t\t\t\n\t\t}\n\t\t$html = str_replace( $dataRepeaterContent, $sOptions, $html);\n\t\t$html = str_replace( \"{SOO.FUNCTION:SELECTEDDATE:\".$ctrlName.\"}\", date($format, strtotime($date) ), $html);\n\t\treturn $html;\n\t}",
"public function actionPostedInMonth()\n {\n\n $month = date('n', $_GET['time']); // 1 through 12\n $year = date('Y', $_GET['time']); // 2011\n if (isset($_GET['pnc'] ) && $_GET['pnc'] == 'n') $month++;\n if (isset($_GET['pnc'] ) && $_GET['pnc'] == 'p') $month--;\n\n $query=Article::find()->where(['status' =>Article::STATUS_ENABLED ])\n ->andWhere(['>','created_at',($firstDay = mktime(0,0,0,$month,1,$year))])\n ->andWhere(['<','created_at',(mktime(0,0,0,$month+1,1,$year))])\n ->orderBy('updated_at DESC');\n\n $pages = new Pagination(['totalCount' => $query->count()]);\n\n $pages->pageSize = \\Yii::$app->params['monthlyArchivesCount'];\n\n $materials = $query->offset($pages->offset)\n ->limit($pages->limit)\n ->all();\n\n return $this->render('month',array(\n 'materials' => $materials,\n 'pages' => $pages,\n 'firstDay' => $firstDay,\n ));\n }",
"function fiorello_mikado_per_page_js_variables() {\n\t\t$per_page_js_vars = apply_filters( 'fiorello_mikado_filter_per_page_js_vars', array() );\n\n\t\twp_localize_script( 'fiorello-mikado-modules', 'mkdfPerPageVars', array(\n\t\t\t'vars' => $per_page_js_vars\n\t\t) );\n\t}",
"public static function currnt_month_ajax($status = [1]){\n\t \t$query \t= self::with('project','project.product','project.client','project.collections')\n\t \t\t\t->where('start_date','<=',date('Y-m-').'31')\n\t \t\t\t->whereIn('status',$status)\n\t \t\t\t->get();\n\t \treturn \tDatatables::of($query) \n\t \t\t\t->editColumn('project_id', function($model) {\n\t $client \t= $model->project->client['name'];\n\t $client \t= '<span title=\"'.$client.'\">'._custom_short_text($client,20,true).'</span>';\n\t return $client;\n\t }) \n\t ->editColumn('amount', function($model) {\n\n\t $amount = number_format($model->amount);\n\n\t return $amount;\n\t }) \n\t ->editColumn('start_date', function($model) {\n\n\t $amount = _custom_date_time($model->start_date,'M Y');\n\n\t return $amount;\n\t }) \n\t ->editColumn('pay_schedule', function($model) {\n\t $result = '';\n\t \tif($model->pay_schedule == 1){\n\t \t\t$result .= '<span class=\"label label-primary\">'.$model->pay_schedule()[$model->pay_schedule].'</span>';\n\t \t}elseif($model->pay_schedule == 2){\n\t \t\t$result .= '<span class=\"label label-success\">'.$model->pay_schedule()[$model->pay_schedule].'</span>';\n\t \t}else{\n\t \t\t$result .= '<span class=\"label label-success\">'.$model->pay_schedule()[$model->pay_schedule].'</span>';\n\t \t}\n\t return $result;\n\t }) \n\t ->addColumn('collection_type', function($model) {\n\t \t\n\t \t$is_pending = 'Pending';\n\t \tif($model->pay_schedule == 1){\n\t \t\t$result = $model->project->collections->where('collection_type',3)->whereBetween('collection_date',[date('Y-m-').'01',date('Y-m-').'31'])->first();\n\t\t \tif($result){\n\t\t \t\treturn _custom_date_time($result->collection_date,'d M, Y');\n\t\t \t}else{\n\t\t \t\treturn $is_pending;\n\t\t \t}\n\t \t}elseif($model->pay_schedule == 3){\n\t \t\t$start_date = date_create($model->start_date);\n\t\t\t $end_date = date_create(date('Y-m-d'));\n\t\t\t $date_diff = date_diff($start_date, $end_date);\n\t\t\t $number_of_days = $date_diff->format(\"%a\");\n\t\t\t \n\t\t\t /** Calculating pending cycle **/\n\t\t\t $cycle_count = ceil($number_of_days/365);\n\t\t\t $collection_count = $model->project->collections->where('collection_type',3)->count();\n\t\t\t if($collection_count >= $cycle_count ){\n\t\t\t \t$result = $model->project->collections->where('collection_type',3)->whereBetween('collection_date',[$model->start_date,date('Y-m-').'31'])->first();\n\t\t\t \tif($result){\n\t\t\t \t\treturn _custom_date_time($result->collection_date,'d M, Y');\n\t\t\t \t}else{\n\t\t\t \t\treturn $is_pending;\n\t\t\t \t}\n\t\t\t }else{\n\t\t\t \treturn $is_pending;\n\t\t\t }\n\n\t \t}elseif($model->pay_schedule == 2){\n\t \t\t$start_date = date_create($model->start_date);\n\t\t\t $end_date = date_create(date('Y-m-d'));\n\t\t\t $date_diff = date_diff($start_date, $end_date);\n\t\t\t $number_of_days = $date_diff->format(\"%a\");\n\t\t\t $pending_cycle = [] ;\n\n\t\t\t /** Calculating pending cycle **/\n\t\t\t $cycle_count = ceil($number_of_days/91);\n\t\t\t $collection_count = $model->project->collections->where('collection_type',3)->count();\n\t\t\t $pending_count \t\t= $cycle_count - $collection_count;\n\t\t\t if( $pending_count == 0 ){\n\t\t\t \t$result = $model->project->collections->where('collection_type',3)->whereBetween('collection_date',[$model->start_date,date('Y-m-').'31'])->last();\n\t\t\t \tif($result){\n\t\t\t \t\treturn _custom_date_time($result->collection_date,'d M, Y');\n\t\t\t \t}else{\n\t\t\t \t\treturn $is_pending;\n\t\t\t \t}\n\t\t\t }else{\n\t\t\t \treturn $is_pending;\n\t\t\t }\n\n\t \t}else{\n\t \t\treturn $is_pending;\n\t \t}\n\t })\t \n\t ->addColumn('product', function($model) {\n\t \t$result = '<span title=\"'.$model->project->product->name.'\">'.$model->project->product->code.'</span>';\n\t return $result;\n\t })\t \n\t ->addColumn('total_pending', function($model) {\n\t \t$result = 0;\n\t \t/* Pending list on monthly scheduled for single AMC */\n\t\t\t if($model->pay_schedule == 1){\n\t\t\t $month_start = (int) _custom_date_time($model->start_date,'m'); \n\t\t\t $month_end = (int) date('m');\n\t\t\t $year_start = (int) _custom_date_time($model->start_date,'Y');\n\t\t\t $year_end = (int) date('Y');\n\t\t\t // $month_list = [];\n\t\t\t for($month_start; $month_start <= 12; $month_start++){\n\t\t\t if(strlen($month_start) == 1) {\n\t\t\t $month_list[] = $year_start.'-0'.$month_start.'-01';\n\t\t\t }else{\n\t\t\t $month_list[] = $year_start.'-'.$month_start.'-01';\n\t\t\t }\n\n\t\t\t if( ($year_start == $year_end) && ($month_start == $month_end) ) {\n\t\t\t break;\n\t\t\t }\n\t\t\t if($month_start == 12) {\n\t\t\t $month_start = 0;\n\t\t\t $year_start++;\n\t\t\t }\n\t\t\t }\n\t\t\t /* Collection list on monthly scheduled for single AMC */\n\t\t\t $collections = $model->project->collections->where('collection_type',3);\n\t\t\t $collection_month_list = [];\n\t\t\t foreach ($collections as $collection) {\n\t\t\t $collection_month_list[] = _custom_date_time($collection['collection_date'],'Y-m-'.'01');\n\t\t\t }\n\t\t\t if(count($collection_month_list)){ \n\t\t\t $pending_months = array_diff($month_list, $collection_month_list);\n\t\t\t }\n\t\t\t $pending_count = isset($pending_months) ? count($pending_months) : count($month_list);\n\t\t\t $result = '<span class=\"badge\">'.$pending_count .'</span> * '.$model->amount.' = '.number_format($pending_count * $model->amount );\n\n\t\t\t }elseif($model->pay_schedule == 3){\n\t\t\t $start_date = date_create($model->start_date);\n\t\t\t $end_date = date_create(date('Y-m-d'));\n\t\t\t $date_diff = date_diff($start_date, $end_date);\n\t\t\t $number_of_days = $date_diff->format(\"%a\");\n\t\t\t $pending_cycle = [] ;\n\n\t\t\t /** Calculating pending cycle **/\n\t\t\t $cycle_count = ceil($number_of_days/365);\n\t\t\t $collection_count = $model->project->collections->where('collection_type',3)->count();\n\t\t\t $pending_count \t\t= $cycle_count - $collection_count;\n\t\t\t // $pending_cycle_count = 1;\n\t\t\t $result = '<span class=\"badge\">'.$pending_count .'</span> * '.$model->amount.' = '.number_format($pending_count * $model->amount );\n\n\t\t\t }else{\n\t\t\t \t$start_date = date_create($model->start_date);\n\t\t\t $end_date = date_create(date('Y-m-d'));\n\t\t\t $date_diff = date_diff($start_date, $end_date);\n\t\t\t $number_of_days = $date_diff->format(\"%a\");\n\t\t\t $pending_cycle = [] ;\n\n\t\t\t /** Calculating pending cycle **/\n\t\t\t $cycle_count = ceil($number_of_days/91);\n\t\t\t $collection_count = $model->project->collections->where('collection_type',3)->count();\n\t\t\t $pending_count \t\t= $cycle_count - $collection_count;\n\t\t\t $result = '<span class=\"badge\">'.$pending_count .'</span> * '.$model->amount.' = '.number_format($pending_count * $model->amount );\n\t\t\t }\n\t return $result;\n\t }) \t \n\t ->addColumn('action',function($model){\n\t \t$result = '';\n\t \t$is_collected = false;\n\t \tif($model->pay_schedule == 1){\n\t \t\t$is_collected = $model->project->collections->where('collection_type',3)->whereBetween('collection_date',[date('Y-m-').'01',date('Y-m-').'31'])->count();\n\t \t}elseif($model->pay_schedule == 3){\n\t \t\t$start_date = date_create($model->start_date);\n\t\t\t $end_date = date_create(date('Y-m-d'));\n\t\t\t $date_diff = date_diff($start_date, $end_date);\n\t\t\t $number_of_days = $date_diff->format(\"%a\");\n\t\t\t \n\t\t\t /** Calculating pending cycle **/\n\t\t\t $year_cycle = ceil($number_of_days/365);\n\t\t\t $collection_count = $model->project->collections->where('collection_type',3)->count();\n\t\t\t if($collection_count >= $year_cycle ){\n\t\t\t \t$is_collected = true;\n\t\t\t }\n\n\t \t}else{\n\t \t\t$is_collected = false;\n\t \t}\n\t \t\n\t \n\t \t// $is_collected = false;\n\t if($is_collected){\n\t\t\t\t\t\t$result .= '<a title=\"'.__('common.Already').' '.__('common.Received').'\" class=\"btn btn-success btn-xs\"><i class=\"fa fa-check\"></i> '.'</a>';\n\t }else{\n\t \t$result .= '<a title=\"'.__('common.Receive').'\" class=\"btn btn-warning btn-xs btn_receive\" data-id=\"'.$model->id.'\"><i class=\"fa fa-check\"></i> '.'</a>';\n\t }\n\t $result .= '<a title=\"'.__('common.Pending').'\" class=\"btn btn-info btn-xs btn_pending\" data-id=\"'.$model->id.'\"><i class=\"fa fa-anchor\"></i> '.'</a>';\n\n\t return $result;\n\n\t })\n\t \n\t ->rawColumns(['project_id','action','pending','pay_schedule','product','total_pending'])\n\t ->make(true);\n\n }",
"public function showOtherMonths($showOtherMonths, $selectOtherMonths) {\n \n if($showOtherMonths) {\n $this->_config_mapper(Array('showOtherMonths' => 'true')); \n } else {\n $this->_config_mapper(Array('showOtherMonths' => 'false')); \n }\n \n if($selectOtherMonths) {\n $this->_config_mapper(Array('selectOtherMonths' => 'true')); \n } else {\n $this->_config_mapper(Array('selectOtherMonths' => 'false')); \n }\n }"
]
| [
"0.57487535",
"0.5748314",
"0.5517207",
"0.54982084",
"0.5494076",
"0.5456071",
"0.5357836",
"0.533942",
"0.52991515",
"0.528616",
"0.52715534",
"0.5241927",
"0.52283514",
"0.5196813",
"0.51745176",
"0.5151567",
"0.5142982",
"0.51267374",
"0.5067817",
"0.5064153",
"0.5058148",
"0.4999163",
"0.49805787",
"0.495276",
"0.49306604",
"0.49181318",
"0.49100792",
"0.48803872",
"0.48707706",
"0.4854878"
]
| 0.7088348 | 0 |
/ insert noti email | public function insertNotiEmail(NotiEmailForm $insertForm){
$objDao = new NotiEmailDAO();
$objDao->type = $insertForm->getType();
$objDao->content = $insertForm->getContent();
$objDao->status = $insertForm->getStatus();
$objDao->merchantId = $insertForm->getMerchantId();
return $this->notiEmailDao->saveResultId($objDao);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function Insert_Email()\n\t{\n\t\t$this->load->library('form_validation');\n\t\t\n\t\t$configValidation = array(\n array(\n 'field' => 'email', \n 'label' => parent::_getFieldTitle('email'), \n 'rules' => 'trim|required|max_length[255]|valid_email|callback__unique_field[email]'\n )\n );\n\n\t\t$this->form_validation->set_rules($configValidation);\n\t\t\t\n\t\tif ($this->form_validation->run() == FALSE)\n\t\t{\n\t\t\techo \"<span class='red'>\".validation_errors().\"</span>\";\n\t\t}\n\t\telse \n\t\t{\n\t\t\t$this->subscribers_model->addEmail($this->input->post('email'));\n\t\t\techo \"<span class='green'>\".language('your_email_address_added_in_mailing_list').\"</span>\";\n\t\t}\n\t\texit;\n\t}",
"public function crearCorreoInstitucional(){\n $nom0 = $this->attributes['nombre'];\n //tomo el/los apellido/s del preinscripto\n $ape0 = $this->attributes['apellido'];\n //defino el dominio que tendrá cada mail creado\n $dominio = \"@udc.edu.ar\";\n \n $nom = $this->inicialesDeNombres($nom0);\n $nom1 = $this->sanear_string($nom);\n \n $ape = $this->apellidosCompletos($ape0);\n $ape1 = $this->sanear_string($ape);\n \n \n $correo_institucional = $nom1.$ape1.$dominio; \n $this->attributes['email_institucional'] = $correo_institucional;\n $this->save();\n }",
"public function addNewEmail()\r\n {\r\n if (isset($_POST['submit'])) {\r\n\r\n $date = date(\"Y-m-d\");\r\n $email = $_POST['inputEmail'];\r\n\r\n $data['date'] = $date;\r\n $data['email'] = $email;\r\n\r\n $this->insertNewEmail($data);\r\n }\r\n }",
"public function insertNlAbo()\n\t{\n\t try{\n\t $tup=array('email'=>$_POST['email']);\n\t\t//$t=array('email'=>$tab['email']);\n\t\t$req= self::$bdd->prepare('insert into AbonnementNlGW values (:email);');\n\t\t$req->execute($tup);\n\t\treturn true;\n\t }catch(PDOException $Exception){\n\t return false;\n\t }\n\t}",
"private function emailAtLogin() {}",
"function createEmail($from_email, $from_name, $id_user) {\n $result = $this->getNewEmailId($id_user); //Contiene le email dell'utente con data a null\n if (mysql_num_rows($result) > 0) {//Se vi sono email pregresse ritorna la lista delle email pregresse\n return $result;\n }\n if ($this->connectToMySql()) {\n $query = sprintf(\"INSERT INTO scuola.email_store(from_email, from_name, id_user, subject, body) VALUES ('%s','%s', '%s', '<NO SUBJECT>', '<NO BODY>')\", $from_email, $from_name, $id_user);\n\n // Perform Query\n $result = mysql_query($query);\n if (!$result) {\n setcookie('message', mysql_error());\n }//else\n //setcookie('message','Creata nuova Email');\n }\n $this->closeConnection();\n return $result;\n }",
"function addEmailHandler1() {\n global $inputs;\n\n insert('mail',[\n 'title' => $inputs['title'],\n 'content' => $inputs['content'],\n 'sender_id' => $inputs['sender_id'],\n 'sender' => $inputs['sender_name'],\n 'receiver_id' => $inputs['receiver_id'],\n 'receiver' => $inputs['receiver_name'],\n 'is_read' => 'unread'\n ]);\n\n formatOutput(true, 'add success');\n}",
"public function prepare_insertNewEmail($params)\n\t{\n\t\t$xml_string = \"p_Token=\".$params['p_Token'].\"&p_UserID=\".$params['p_UserID'].\"&p_SenderName=\".$params['p_SenderName'].\"&p_SenderEmail=\".$params['p_SenderEmail'].\"&p_RecipientName=\".$params['p_RecipientName'].\"&p_RecipientEmail=\".$params['p_RecipientEmail'].\"&p_Subject=\".$params['p_Subject'].\"&p_Body=\".$params['p_Body'].\"&p_BookingID=\".$params['p_BookingID'].\"\";\n\t\treturn $xml_string;\n\t}",
"public function emails($boletoID, $post);",
"public function insertNewEmail($data)\r\n {\r\n $this->setTable('subscribed');\r\n $table = $this->getTable();\r\n\r\n $this->setEmail('email');\r\n $email = $this->getEmail();\r\n\r\n $this->setDate('date');\r\n $date = $this->getDate();\r\n\r\n $queryText = \"INSERT INTO \" . $table;\r\n $queryText .= \" (\" . $date. \", \" . $email;\r\n $queryText .= \") VALUES(:date, :email)\";\r\n\r\n $this->query($queryText);\r\n\r\n $this->bind(':date', $data['date']);\r\n $this->bind(':email', $data['email']);\r\n\r\n if ($this->execute()) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }",
"public function addNewEmail($data){\r\n // \"VALUES ('',null,null,null, NOW(), NOW())\";\r\n //$query = $this->db->query($queryString);\r\n $queryString = \"INSERT INTO `\". DB_PREFIX .\"visitor_email` (`email`, `name`, `gender`, `active`, `date_added`, `date_modified`) VALUES(\";\r\n $queryString .= \"'\". (isset($data['email']) ? $data['email'] : \"\") .\"', \";\r\n $queryString .= isset($data['name']) ? \"'\".$data['name'].\"', \" : \"null, \";\r\n $queryString .= isset($data['gender']) ? \"'\".$data['gender'].\"', \" : \"null, \";\r\n $queryString .= isset($data['active']) ? \"'\".$data['active'].\"', \" : \"null, \";\r\n $queryString .= isset($data['date_added']) ? \"'\".$data['date_added'].\"', \" : \"NOW(), \";\r\n $queryString .= isset($data['date_modified']) ? \"'\".$data['date_modified'].\"', \" : \"NOW()\";\r\n $queryString .= \")\";\r\n return $this->db->query($queryString); \r\n }",
"function new_emetteur($nom_emetteur, $email_emetteur, $message, $random_value) {\n insert_emetteur($nom_emetteur, $email_emetteur, $message, $random_value);\n}",
"function addEmail( $email ){\n \n $conn = $this->connect();\n \n //By default, mysql is not case sensitive, but you can change it in my.cnf file, to prevent error, change all to lowercase\n $sql = 'select email from ' . $this->dbtable . ' where email = lower(\"' . trim($email) . '\")';\n\t\t\t$query = mysql_query( $sql, $conn);\n\t\t\t\n\t\t\tif( mysql_num_rows( $query ) > 0 ){\n\t\t\t\treturn 'EMAIL JA CADASTRADO'; //Email already exist msg\n\t\t\t} else {\n\t\t\t\t$sql = 'insert into ' . $this->dbtable . '(email) value(lower(\"' . $email . '\"))';\n\t\t\t\tmysql_query( $sql, $conn);\n\t\t\t}\n \n mysql_close( $conn );\n \n return 'EMAIL SALVO COM SUCESSO'; //Email sucefully saved\n }",
"function insert($i) {\r\n $this->ds->partner_id[$i] = $this->ds->partner_id[$i] == ''? $_SESSION['login_user']: $this->ds->partner_id[$i];\r\n $partner_id = strtoupper($this->ds->partner_id[$i]); # get partner id\r\n $seq_gen = instantiate_module('seq_gen');\r\n $seq_number = $seq_gen->get_next_number('PROJECTID_'.$partner_id);\r\n $seq_number = sprintf('%03d', $seq_number); #zero padded length 3\r\n $this->ds->project_id[$i] = $partner_id.'-'.date('ymd').'-'.$seq_number;\r\n\r\n # set invitation expiration date\r\n $nowunix = time();\r\n $now = date(\"Y-m-d H:i:s\",$nowunix);\r\n $this->ds->create_date[$i] = $now;\r\n $this->ds->po1_exp_date[$i] = date(\"Y-m-d H:i:s\",$nowunix + $this->invitation_duration_po1);\r\n $this->ds->po2_exp_date[$i] = date(\"Y-m-d H:i:s\",$nowunix + $this->invitation_duration_po1 + $this->invitation_duration_po2);\r\n #~ $this->ds->po3_exp_date[$i] = date(\"Y-m-d H:i:s\",$nowunix + $this->invitation_duration_po1 + $this->invitation_duration_po2 + $this->invitation_duration_po3);\r\n $this->ds->po_stage[$i] = 1;\r\n $this->ds->email_cookie[$i] = md5($nowunix);\r\n $this->ds->status[$i] = 'waiting for po1';\r\n\r\n $ret = parent::insert($i);\r\n\r\n # send success email to partner\r\n $partner = instantiate_module('partner');\r\n $row = $partner->get_row(array('partner_id'=>$partner_id));\r\n assert($row);\r\n $row['email'];\r\n\r\n # get email\r\n $h = array();\r\n $h['from'] = $GLOBALS['mail_from'];\r\n $h['to'] = $row['email'];\r\n $h['subject'] = 'Thank you for entering new project';\r\n $h['body'] = <<<__END__\r\nThank you for entering new project. Here are some details:\r\n\r\nRegistration Number: {$this->ds->project_id[$i]}\r\nProject Name: {$this->ds->name[$i]}\r\nTotal: {$this->ds->total[$i]} (in 000 USD)\r\nList Price: {$this->ds->list_price[$i]} (in 000 USD)\r\n\r\nYour project will be reviewed by Cisco personnels, and we will contact you shortly.\r\n\r\n--\r\n admin\r\n\r\n__END__;\r\n #~ print_r($h);\r\n supermailer($h);\r\n\r\n $this->send_invitation('po1',$i);\r\n\r\n return $ret;\r\n }",
"function store($mail, $nombre, $apellido, $password,$admin)\n {\n $sentencia = $this->db->prepare('INSERT INTO usuario(mail,nombre,apellido,password,admin) VALUES(?,?,?,?,?)');\n $sentencia->execute([$mail, $nombre, $apellido, $password,$admin]);\n }",
"public function save() {\n $query = $this->conn->prepare(\"INSERT INTO subscribers (email) VALUES (:email)\");\n $res = $query->execute([\"email\" => $this->email]);\n return $res ? $this->email : false;\n }",
"function add_mail($params)\n {\n $this->db->insert('mail',$params);\n return $this->db->insert_id();\n }",
"abstract protected function _getEmail($info);",
"public function create()\n {\n\n $email_id = date('Y-m-d_H-i-s') . '.' . $this->template;\n $email_data = [\n 'title' => $this->template, \n 'data' => serialize($this->data), \n 'email' => $this->to,\n 'id' => $email_id,\n 'date' => date('Y-m-d H:i:s')\n ];\n\n Storage::putYAML('statamify/emails/' . $email_id, $email_data);\n\n }",
"public function pushEmail($receipientMail)\n {\n $sql = \"SELECT email FROM subscriptionEmail\";\n $query = mysqli_query($this->con, $sql);\n $query = mysqli_fetch_array($query);\n\n // check if the users email is not already in the database\n while ($row = ($query['email'])) {\n if ($row !== $receipientMail) {\n // echo $row. \" and \" . $receipientMail;\n $sql =\"INSERT INTO subscriptionEmail VALUES('', '$receipientMail')\";\n $query = mysqli_query($this->con, $sql);\n }\n }\n }",
"function addEmail($email) {\n\t$query = sprintf(\"INSERT INTO Emails VALUES('%s')\",\n\t\tmysql_real_escape_string($email)\n\t);\n\t\n\tdb_query($query);\n}",
"function do_insert_additional_email($s_id,$fname,$lname,$email) {\n\t# Dim some Vars:\n\t\tglobal $_DBCFG, $db_coin;\n\n\t# Do purge contact\n\t\t$query \t = 'INSERT INTO '.$_DBCFG['suppliers_contacts'];\n\t\t$query\t.= ' (contacts_id, contacts_s_id, contacts_name_first, contacts_name_last, contacts_email)';\n\t\t$query\t.= \"VALUES ('', \";\n\t\t$query\t.= \"'\".$db_coin->db_sanitize_data($s_id).\"', \";\n\t\t$query\t.= \"'\".$db_coin->db_sanitize_data($fname).\"', \";\n\t\t$query\t.= \"'\".$db_coin->db_sanitize_data($lname).\"', \";\n\t\t$query\t.= \"'\".$db_coin->db_sanitize_data($email).\"')\";\n\t\t$db_coin->db_query_execute($query) OR DIE(\"Unable to complete request\");\n\t\treturn $db_coin->db_query_affected_rows();\n}",
"function insert_entry($username,$email,$password_hash,$auth_identifier)\n\t{\n\t\t$data = array(\n\t\t\t'username' => $username,\n\t\t\t'email' => $email,\n\t\t\t'password_hash' => $password_hash,\n\t\t\t'activation_id' => $auth_identifier\n\t\t\t);\n\t\t$this->db->insert('pending_users',$data);\n\t}",
"public function create($email);",
"public function insert_newsletter($email)\n\t\t{\n\t\t\n\t\t\t$date = date('Y-m-d H:i:s');\n\t\t\t$query = \"INSERT INTO `tbl_newsletter`(`newsletter_email`,`newsletter_date`) VALUES('$email','$date')\";\n\t\t\t$result = $this->db->insert($query);\t\n\t\t\treturn $result;\n\t\n\t\t}",
"public function saveEmails(){\r\n $util = new Util();\r\n \r\n $validator = new Validator();\r\n $emailType = filter_input(INPUT_POST, 'emailtype');\r\n $errors = array();\r\n if ($util->isPostRequest()) {\r\n if (!$validator->emailTypeIsValid($emailType)) {\r\n $errors[] = 'E-mail type is not valid';\r\n }\r\n }\r\n if (count($errors) > 0) {\r\n foreach ($errors as $value) {\r\n echo '<p>', $value, '</p>';\r\n }\r\n } else {\r\n\r\n // Save the submission into the database. \r\n \r\n $dbConfig = array(\r\n \"DB_DNS\" => 'mysql:host=localhost;port=3306;dbname=PHPadvClassSpring2015',\r\n \"DB_USER\" => 'root',\r\n \"DB_PASSWORD\" => ''\r\n );\r\n\r\n\r\n $pdo = new DB($dbConfig);\r\n $db = $pdo->getDB();\r\n $stmt = $db->prepare(\"INSERT INTO emailtype SET emailtype = :emailtype\");\r\n\r\n $values = array(\":emailtype\" => $emailType);\r\n if ($stmt->execute($values) && $stmt->rowCount() > 0) {\r\n echo 'E-mail Added';\r\n }\r\n }\r\n }",
"function insert_pm($id_auteur)\n{\n\tif ( $GLOBALS['spipbb']['sw_send_pm_warning'] == \"oui\" ) {\n\t\t$from_id = $GLOBALS['spipbb']['sw_warning_from_admin'] ;\n\t\t$message = $GLOBALS['spipbb']['sw_warning_pm_message'] ;\n\t\t$to_auteur = sql_fetsel('email', 'spip_auteurs', \"id_auteur=$id_auteur\");\n\t\t$from_auteur = sql_fetsel('email', 'spip_auteurs', \"id_auteur=$from_id\");\n\n\t\t// action !!!\n\t\t$envoyer_mail = charger_fonction('envoyer_mail','inc');\n\t\t$titre = nettoyer_titre_email($GLOBALS['spipbb']['sw_warning_pm_titre']);\n\t\t$envoyer_mail($to_auteur['email'],$titre,$message,$from_auteur['email']);\n\t}\n\n}",
"public function postCreateMail()\n {\n if ($this->_activeMail->getData('recipient_email') == '') {\n $recipient_email = $this->cart->getData('email');\n $recipient_name = $this->cart->getCustomerFirstname(). ' ' .$this->cart->getCustomerLastname();\n $data = [\n 'recipient_email' => $recipient_email,\n 'recipient_name' => $recipient_name\n ];\n $this->_activeMail->addData($data)->save();\n }\n }",
"function addEmailToDB($from, $to, $subject, $text_message, $html_message = \"\", $cc=array(), $bcc=array(), $additional_headers=\"\") \n{\n\t\t// die($to);\n\t\t\n\t\tglobal $email_buffer_table_name;\n\t\t\n\t\t$CC = \"\";\n\t\tforeach ($cc as $key => $value) {\n\t\t\t$CC.= $key;\n\t\t\t$CC .= \",\";\n\t\t}\n\t\t$BCC = \"\";\n\t\tforeach ($bcc as $key => $value) {\n\t\t\t$BCC.= $key;\n\t\t\t$BCC .= \",\";\n\t\t}\n\t\t\n\t\t//echo(\"INSERT INTO {$email_buffer_table_name} (to, from, subject, text_message, html_message, cc, bcc, additional_headers) \n\t //\tVALUES(:toemail, :fromemail, :subject, :textmsg, :htmlmsg, :cc, :bcc, :additional_headers)\");\n\t\t\t\n\t $query = Database::$pdo->prepare(\"INSERT INTO {$email_buffer_table_name} (email_to, email_from, email_subject, text_message, html_message, cc, bcc, additional_headers) \n\t \tVALUES(:toemail, :fromemail, :subject, :textmsg, :htmlmsg, :cc, :bcc, :additional_headers)\");\n $query->bindValue(':toemail', serialize($to) , PDO::PARAM_STR);\n \t$query->bindValue(':fromemail', serialize($from), PDO::PARAM_STR);\n \t$query->bindValue(':subject', $subject, PDO::PARAM_STR);\n \t$query->bindValue(':textmsg', $text_message, PDO::PARAM_STR);\n \t$query->bindValue(':htmlmsg', $html_message, PDO::PARAM_STR);\n \t$query->bindValue(':cc', $CC, PDO::PARAM_STR);\n \t$query->bindValue(':bcc', $BCC , PDO::PARAM_STR);\n \t$query->bindValue(':additional_headers', $additional_headers, PDO::PARAM_STR);\n \n $query->execute();\n\n\t\t// print_r(serialize($to));\n\t//\techo \"\\nPDOStatement::errorInfo():\\n\";\n\t//\t$arr = $query->errorInfo();\n\t//\tprint_r($arr);\n\t//\tdie();\n\t\t\n\t\tprocessEmail();\n}",
"function insertarReferentes($email,$razonsocial) {\r\n$sql = \"insert into tbreferentes(idreferente,email,razonsocial)\r\nvalues ('','\".($email).\"','\".($razonsocial).\"')\";\r\n$res = $this->query($sql,1);\r\nreturn $res;\r\n}"
]
| [
"0.63930076",
"0.6347084",
"0.63055176",
"0.6299098",
"0.6295544",
"0.6289162",
"0.62055624",
"0.61756",
"0.61583185",
"0.61517644",
"0.6140949",
"0.6129569",
"0.6124238",
"0.6103383",
"0.60838264",
"0.6054301",
"0.6049232",
"0.6047167",
"0.5998229",
"0.59924984",
"0.59919477",
"0.5976037",
"0.59567595",
"0.59380734",
"0.5931772",
"0.5906131",
"0.5904159",
"0.58807015",
"0.5880184",
"0.5869909"
]
| 0.6456642 | 0 |
Gets the number of rounds. | public function getRounds() : int
{
return $this->rounds;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getRoundsCount()\n {\n return $this->rounds()->count();\n }",
"public function getNumberOfRuns() {\n return (float) $this->profile->userTotals->totalRuns;\n }",
"public function getRoundNum() {\n\t\treturn $this->roundNum;\n\t}",
"public function count()\n {\n return $this->timesRepeat * count($this->test);\n }",
"protected function cost()\n {\n return $this->rounds;\n }",
"public function getMaxRounds() {\n\t\treturn $this->maxRounds;\n\t}",
"function getRoundsCount($project_id)\n\t{\n\t $option = JRequest::getCmd('option');\n\t\t$app = JFactory::getApplication();\n $db = sportsmanagementHelper::getDBConnection(TRUE, $app->getUserState( \"com_sportsmanagement.cfg_which_database\", FALSE ) );\n $query = $db->getQuery(true);\n\t // Select some fields\n $query->select('count(*) AS count');\n // From the table\n\t\t$query->from('#__sportsmanagement_round');\n $query->where('project_id = '.$project_id); \n\n\t\t$db->setQuery($query);\n\t\treturn $db->loadResult();\n\t}",
"public function count(): int\n {\n return count($this->intervals);\n }",
"public function countGame() {\r\n\t\t$sql = new Sql();\r\n\t\t$result = $sql->Select(\"SELECT COUNT(*) as count FROM jogo\");\r\n\t\tif(count($result) > 0) {\r\n\t\t\t\r\n\t\t\t$count = ($result[0]['count']) / 16;\r\n\t\t\treturn ceil($count);\r\n\t\t}\r\n\t}",
"public function getNumberOfRetries()\n {\n return $this->number_of_retries;\n }",
"public function get_total_number_of_units(){\n return $this->unit_count;\n }",
"public function totalPlayerWins()\n {\n $qb = $this->createQueryBuilder('r')\n ->select('COUNT(r)')\n ->where('r.win = true')\n ;\n\n return $qb->getQuery()->getSingleScalarResult();\n }",
"function get_number_of_sessions()\n {\n\t\treturn count($this->sessions);\n\t}",
"public function count(): int {\n\t\treturn $this->reduce(0, function ($count, $_) {\n\t\t\treturn $count + 1;\n\t\t});\n\t}",
"function getNumeroPaginas($rpp = Configuracion::RPP) {\r\n $lista = $this->count();\r\n return (ceil($lista[0] / $rpp) - 1);\r\n }",
"function getResubmitCount(){\n\t\t$sectionDecisionDao = DAORegistry::getDAO('SectionDecisionDAO');\n\t\treturn $sectionDecisionDao->getResubmitCount($this->getDateDecided(), $this->getArticleId(), $this->getReviewType(), $this->getRound());\n\t}",
"public function count()\r\n {\r\n\t\tif ( null === $this->totalResults )\r\n\t\t{\r\n\t\t\t$this->warmUp();\r\n\t\t}\r\n\r\n\t\treturn $this->totalResults;\r\n\t}",
"public static function calculateNumRounds($numTeams) {\n return intval(log($numTeams, 2));\n }",
"public static function totalNumber()\n {\n return (int)self::find()->count();\n }",
"public function getNumberPlayedMatches()\n {\n return $this->played;\n }",
"public function getCount() : int\n {\n return $this->count;\n }",
"public function getRoundSum()\n {\n return $this->roundSum;\n }",
"protected function getNumberOfSteps() {\n return $this->getLocalSessionValue(self::NUM_STEPS_VAR);\n }",
"public function repeatCount() {\n if ($this->_m_repeatCount !== null)\n return $this->_m_repeatCount;\n $this->_m_repeatCount = ($this->repeatCountM1() + 1);\n return $this->_m_repeatCount;\n }",
"public function numResults()\n {\n return $this->numResults;\n }",
"public function totalComputerWins()\n {\n $qb = $this->createQueryBuilder('r')\n ->select('COUNT(r)')\n ->where('r.win = false AND r.tie = false')\n ;\n\n return $qb->getQuery()->getSingleScalarResult();\n }",
"public function count() {\n\t\t\treturn (int)$this->count;\n\t\t}",
"public function getCountAttribute()\n {\n if (empty($this->shopCalculations)) $this->runCalculations();\n return round($this->shopCalculations->itemCount, 2);\n }",
"public function rank() {\n $eps = pow(2.0, -52.0);\n $tol = max($this->m, $this->n) * $this->s[0] * $eps;\n $r = 0;\n for ($i = 0; $i < count($this->s); ++$i) {\n if ($this->s[$i] > $tol) {\n ++$r;\n }\n }\n return $r;\n }",
"private function getTries() {\n\t\tif( !isset($this->num_tries) ){\n\t\t\tif( !isset($_SESSION['levelTries']) ){\n\t\t\t\t$_SESSION['levelTries'] = array();\n\t\t\t}\n\t\t\tif( isset($_SESSION['levelTries'][$this->level_id]) ){\n\t\t\t\t$this->num_tries = $_SESSION['levelTries'][$this->level_id];\n\t\t\t} else {\n\t\t\t\t$this->num_tries = 0;\n\t\t\t\t$_SESSION['levelTries'][$this->level_id] = 0;\n\t\t\t}\n\t\t}\n\n\t\treturn $this->num_tries;\n\t}"
]
| [
"0.8325318",
"0.7074183",
"0.67591107",
"0.6620794",
"0.66092235",
"0.65581274",
"0.65006757",
"0.6394199",
"0.6391075",
"0.63897616",
"0.63416266",
"0.62902933",
"0.6289839",
"0.6261498",
"0.62479323",
"0.62313557",
"0.62259954",
"0.6215902",
"0.62153083",
"0.6163273",
"0.6160288",
"0.6139427",
"0.6139231",
"0.61375296",
"0.6123986",
"0.6110273",
"0.61043274",
"0.60969275",
"0.6094686",
"0.6085579"
]
| 0.8386471 | 0 |
Validates the given salt string. Important: A valid salt is one starting with $5$ having an optional rounds=$ mid part followed by a 16 long string and ending with $. The rounds value must be between 1000 and 999999999. | public static function isValid(string $salt) : bool
{
$matches = [];
$regex = '/^\$5\$(?:rounds=(?<rounds>\d{4,9})\$)?.{16}\$$/';
if (!(bool) preg_match($regex, $salt, $matches)) {
return false;
}
$rounds = intval($matches['rounds']);
return ($rounds >= self::MIN_ROUNDS && $rounds <= self::MAX_ROUNDS);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function verifySalt($input)\n {\n $regex = '/^\\$sha1\\$(\\d{1,10})\\$([\\.\\/0-9A-Za-z]{0,64})\\$?$/';\n $matches = array ();\n\n $appearsValid = (1 === preg_match($regex, $input, $matches));\n if ($appearsValid) {\n $rounds = (int) $matches[1];\n $salt = $matches[2];\n\n if (!empty ($matches[1]) && ($rounds < 1 || $rounds > 4294967295)) {\n $appearsValid = false;\n }\n }\n\n return $appearsValid;\n }",
"public function testSalt() {\n // Initialize variables\n $string = 'Hello World!';\n\n // Create salt\n $salt = security::salt( $string );\n\n $this->assertGreaterThan( 32, strlen( $salt ) );\n }",
"public function testDefaultSalt()\n {\n $this->assertRegExp(\n '/[\\\\.\\\\/0-9A-Za-z]{22}/',\n Password::salt()\n );\n }",
"public static function isPasswordSalted($input) {\n return preg_match(\"/^[a-f0-9]{64}$/\", strtolower($input));\n }",
"public function setSalt($salt)\n {\n $this->salt = '$6$rounds=5000$' . $salt . '$';\n }",
"public static function isSaltPassword($input) {\n return preg_match(\"/^[a-f0-9]{32}$/\", strtolower($input));\n }",
"public function isPasswordValid($encoded, $raw, $salt)\n {\n\n }",
"function generate_salt($len = 5) {\n $valid_characters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890@#$%^*()_-!';\n $valid_len = strlen($valid_characters) - 1;\n $salt = \"\";\n\n for ($i = 0; $i < $len; $i++) {\n $salt .= $valid_characters[rand(0, $valid_len)];\n }\n\n return $salt;\n}",
"function getCryptHash($str)\n{\n $salt = '';\n if (CRYPT_BLOWFISH) {\n if (version_compare(PHP_VERSION, '5.3.7') >= 0) { // http://www.php.net/security/crypt_blowfish.php\n $algo_selector = '$2y$';\n } else {\n $algo_selector = '$2a$';\n }\n $workload_factor = '12$'; // (around 300ms on Core i7 machine)\n $val_arr = array(\n '.',\n '/'\n );\n $range1 = range('0', '9');\n $range2 = range('a', 'z');\n $range3 = range('A', 'Z');\n $res_arr = array_merge($val_arr, $range1, $range2, $range3);\n $salt = $algo_selector . $workload_factor . getRandomStr($res_arr, 22); // './0-9A-Za-z'\n \n } else if (CRYPT_MD5) {\n $algo_selector = '$1$';\n $char1 = chr(33);\n $char2 = chr(127);\n $range = range($char1, $char2);\n $salt = $algo_selector . getRandomStr($range, 12); // actually chr(0) - chr(255), but used ASCII only\n \n } else if (CRYPT_SHA512) {\n $algo_selector = '$6$';\n $workload_factor = 'rounds=5000$';\n $char1 = chr(33);\n $char2 = chr(127);\n $range = range($char1, $char2);\n $salt = $algo_selector . $workload_factor . getRandomStr($range, 16); // actually chr(0) - chr(255), but used ASCII only\n \n } else if (CRYPT_SHA256) {\n $algo_selector = '$5$';\n $workload_factor = 'rounds=5000$';\n $char1 = chr(33);\n $char2 = chr(127);\n $range = range($char1, $char2);\n $salt = $algo_selector . $workload_factor . getRandomStr($range, 16); // actually chr(0) - chr(255), but used ASCII only\n \n } else if (CRYPT_EXT_DES) {\n $algo_selector = '_';\n $val_arr = array(\n '.',\n '/'\n );\n $range1 = range('0', '9');\n $range2 = range('a', 'z');\n $range3 = range('A', 'Z');\n $res_arr = array_merge($val_arr, $range1, $range2, $range3);\n $salt = $algo_selector . getRandomStr($res_arr, 8); // './0-9A-Za-z'.\n \n } else if (CRYPT_STD_DES) {\n $algo_selector = '';\n $val_arr = array(\n '.',\n '/'\n );\n $range1 = range('0', '9');\n $range2 = range('a', 'z');\n $range3 = range('A', 'Z');\n $res_arr = array_merge($val_arr, $range1, $range2, $range3);\n $salt = $algo_selector . getRandomStr($res_arr, 2); // './0-9A-Za-z'\n \n }\n return crypt($str, $salt);\n}",
"function padEncryptionSalt($salt)\n {\n $allowed_lengths_array=array(16, 24, 32); //set allowed length\n $allowed_length_max=max($allowed_lengths_array);\n\n if (strlen($salt)>$allowed_length_max) //salt too long, cut it\n {\n $salt=substr($salt, 0, $allowed_length_max);\n }\n\n if (strlen($salt)<$allowed_length_max) //salt too short, pad with zeros\n {\n foreach ($allowed_lengths_array as $length) //loop through length and pad salt\n {\n while (strlen($salt)<$length)\n {\n $salt=$salt.\"\\0\";\n }\n\n if (strlen($salt)==$length) //nearest length reached\n {\n break;\n }\n }\n }\n\n return $salt;\n }",
"private function generateSalt() {\r\n\t\t$possibleValues = '0123456789abcdefghijklmnopqrstuvxyzABCDEFGHIJKLMNOPQRSTUVXYZ';\r\n\t\t$salt = '';\t\t\r\n\t\tfor($i = 0; $i < 10; $i++) {\r\n\t\t\t$salt .= $possibleValues[mt_rand(0, strlen($possibleValues)-1)];\t\r\n\t\t}\t\t\r\n\t\treturn $salt;\r\n\t}",
"function checkhashSSHA($salt, $password) {\n\n $hash = base64_encode(sha1($password . $salt, true) . $salt);\n\n return $hash;\n}",
"private function getSalt() \n {\n /**\n * the base64 function uses +'s and ending ='s; translate the first, and cut out the latter\n */\n return sprintf('$2a$%02d$%s', $this->rounds, substr(strtr(base64_encode($this->getBytes()), '+', '.'), 0, 22));\n }",
"function generate_salt($length){\n\t//MD5 returns 32 characters\n\t$unique_random_string=md5(uniqid(mt_rand(),true));\n\t\n\t//valid characters for a salt are [a-zA-Z0-9./]\n\t//base64 code returns + instead of .\n\t$base64_string=base64_encode($unique_random_string);\n\t\n\t//But not '+' which is valid in base64 encoding\n\t$modified_base64_string=str_replace('+', '.' ,$base64_string);\n\t\n\t//Truncate string to the correct length\n\t$salt=substr($modified_base64_string,0,$length);\n\t\n\treturn $salt;\n}",
"function generate_salt($length) {\n // MD5 returns 32 characters\n $unique_random_string = md5(uniqid(mt_rand(), true));\n \n\t// Valid characters for a salt are [a-zA-Z0-9./]\n $base64_string = base64_encode($unique_random_string);\n \n\t// But not '+' which is valid in base64 encoding\n $modified_base64_string = str_replace('+', '.', $base64_string);\n \n\t// Truncate string to the correct length\n $salt = substr($modified_base64_string, 0, $length);\n \n\treturn $salt;\n}",
"function generate_salt($length) {\n\t// MD5 returns 32 characters\n\t$unique_random_string = md5(uniqid(mt_rand(), true));\n\n\t// Valid characters for a salt are [a-zA-Z0-9./]\n\t$base64_string = base64_encode($unique_random_string);\n\n\t// But not '+' which is valid in base64 encoding\n\t$modified_base64_string = str_replace('+', '.', $base64_string);\n\n\t// Truncate string to the correct length\n\t$salt = substr($modified_base64_string, 0, $length);\n\n\treturn $salt;\n}",
"private function generateSalt(){\n return substr(md5(rand(0, 999)), 0, 5);\n }",
"function salt($len=16) {\n $pool = range('!', '~');\n $high = count($pool) - 1;\n $tmp = '';\n for ($c = 0; $c < $len; $c++) {\n $tmp .= $pool[rand(0, $high)];\n }\n return $tmp;\n}",
"public function testUnknownSalt()\n {\n Password::salt( -1 );\n }",
"function generate_salt($length) {\n\t // MD5 returns 32 characters\n $unique_random_string = md5(uniqid(mt_rand(), true));\n\t \n\t\t// Valid characters for a salt are [a-zA-Z0-9./]\n\t$base64_string = base64_encode($unique_random_string);\n\t \n\t\t// But not '+' which is valid in base64 encoding\n\t$modified_base64_string = str_replace('+', '.', $base64_string);\n\t \n\t\t// Truncate string to the correct length\n\t$salt = substr($modified_base64_string, 0, $length);\n\t \n\treturn $salt;\n }",
"private function GenSalt()\n {\n $chars = array_merge(range('a','z'), range('A','Z'), range(0, 9));\n $max = count($chars) - 1;\n $str = \"\";\n $length = 22;\n \n while($length--) {\n shuffle($chars);\n $rand = mt_rand(0, $max);\n $str .= $chars[$rand];\n }\n return $str . '$';\n }",
"static function generateSalt($strength=10) {\n return self::saltStart($strength) . random_string(22, './0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz');\n }",
"public function verifyHash($input)\n {\n $salt = substr($input, 0, strrpos($input, '$') + 1);\n $checksum = substr($input, strrpos($input, '$') + 1);\n\n return ($this->verifySalt($salt) && 1 === preg_match('/^[\\.\\/0-9A-Za-z]{28}$/', $checksum));\n }",
"public function genSalt($length = 5)\n {\n if ($length < 1) { return; }\n $slt = '';\n $min = sfConfig::get('app_min_salt_char');\n $max = sfConfig::get('app_max_salt_char');\n for ($i = 0; $i < $length; $i++)\n {\n $slt .= chr(rand($min, $max));\n }\n return $slt;\n }",
"function generateSalt()\n\t{\n\t\t$lets = range('a', 'z');\n\t\t$ups = range('A', 'Z');\n\t\t$nums = range('0', '9');\n\t\t\n\t\t$special = array('*', '%', '#');\n\t\t\n\t\t$union = $lets + $nums + $ups + $special; //Generate an array with numbers, letters, and special characters\n\t\t\n\t\t$salt = '';\n\t\t\n\t\tfor($i = 0; $i < 5; $i++) //Create a salt of length 5, supplying random values\n\t\t{\n\t\t\t$r = rand(0, count($union)-1);\n\t\t\t$salt .= $union[$r];\n\t\t}\n\t\t\n\t\treturn $salt;\n\t}",
"function generate_salt($length) {\n\t // MD5 returns 32 characters\n\t $unique_random_string = md5(uniqid(mt_rand(), true));\n\t \n\t\t// Valid characters for a salt are [a-zA-Z0-9./]\n\t $base64_string = base64_encode($unique_random_string);\n\t \n\t\t// But not '+' which is valid in base64 encoding\n\t $modified_base64_string = str_replace('+', '.', $base64_string);\n\t \n\t\t// Truncate string to the correct length\n\t $salt = substr($modified_base64_string, 0, $length);\n\t \n\t\treturn $salt;\n\t}",
"function generate_salt($length) {\n\t // MD5 returns 32 characters\n\t $unique_random_string = md5(uniqid(mt_rand(), true));\n\t \n\t\t// Valid characters for a salt are [a-zA-Z0-9./]\n\t $base64_string = base64_encode($unique_random_string);\n\t \n\t\t// But not '+' which is valid in base64 encoding\n\t $modified_base64_string = str_replace('+', '.', $base64_string);\n\t \n\t\t// Truncate string to the correct length\n\t $salt = substr($modified_base64_string, 0, $length);\n\t \n\t\treturn $salt;\n\t}",
"public function setSalt($salt = '');",
"public function getHash($plaintext, $salt = false);",
"function generate_salt($length) {\n\t # MD5 returns 32 characters\n\t $unique_random_string = md5(uniqid(mt_rand(), true));\n\t \n\t # Valid characters for a salt are [a-zA-Z0-9./]\n\t $base64_string = base64_encode($unique_random_string);\n\t \n\t # Replace '+' with '.' from the base64 encoding\n\t $modified_base64_string = str_replace('+', '.', $base64_string);\n\t \n\t # Truncate string to the correct length\n\t $salt = substr($modified_base64_string, 0, $length);\n\t \n\t\treturn $salt;\n\t}"
]
| [
"0.7102222",
"0.57533675",
"0.56755304",
"0.5631861",
"0.5601734",
"0.5560309",
"0.55600774",
"0.55174667",
"0.549579",
"0.54636085",
"0.5379163",
"0.53334194",
"0.53330284",
"0.52810013",
"0.5275898",
"0.5263952",
"0.5261657",
"0.5248574",
"0.5236559",
"0.52357626",
"0.5234888",
"0.52305174",
"0.52304864",
"0.52302575",
"0.52116936",
"0.52083266",
"0.52083266",
"0.52079904",
"0.5154377",
"0.51502126"
]
| 0.775768 | 0 |
Handling the saving of the Grievance form. | public function handleGrievanceSave()
{
$rules = array(
'title' => 'required|min:3',
'body' => 'required|min:10',
'category' => 'required',
'urgency' => 'required',
);
$messages = array(
'title.required' => 'A title is required',
'title.min' => 'Title should be longer. Min 3 characters',
);
// doing the validation, passing post data, rules and the messages
$validator = Validator::make(Input::all(), $rules, $messages);
if ($validator->fails()) {
// send back to the page with the input data and errors
GlobalHelper::setMessage('Fix the errors.', 'warning'); // setting the error message
return Redirect::back()->withInput()->withErrors($validator);
}
$Grievance = new Grievance;
if ($Grievance->saveGrievance(Input::all())) {
SentryHelper::setMessage('A new Grievance has been saved');
} else {
SentryHelper::setMessage('Grievance has not been saved', 'warning');
}
return Redirect::to('grievance/list');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function saveForm(){\t\n\t\t$this->saveFormBase();\n\t\t$this->saveFormGeoCoverage();\n\t\t$this->saveVaFormResolution();\n\t\tif ($this->dataset->nbModForm >0) $this->saveModForm();\n\t\tif ($this->dataset->nbSatForm >0) $this->saveSatForm();\n\t\tif ($this->dataset->nbInstruForm >0) $this->saveInstruForm();\n\t\t$this->saveFormGrid();\n\t\t//Parameter\n\t\t$this->saveFormVariables($this->dataset->nbVars);\n\t\t//REQ DATA_FORMAT\n\t\t$this->dataset->required_data_formats = array();\n\t\t$this->dataset->required_data_formats[0] = new data_format;\n\t\t$this->dataset->required_data_formats[0]->data_format_id = $this->exportValue('required_data_format');\n\t}",
"public function onSave()\n {\n try\n {\n // open a transaction with database 'samples'\n TTransaction::open('samples');\n \n // get the form data into an active record Entry\n $object = $this->form->getData('AgendaEntry');\n \n $this->form->validate(); // form validation\n $object->store(); // stores the object\n $this->form->setData($object); // keep form data\n \n TTransaction::close(); // close the transaction\n $posAction = new TAction(array('AgendaView', 'reload'));\n // shows the success message\n new TMessage('info', TAdiantiCoreTranslator::translate('Record saved'), $posAction);\n }\n catch (Exception $e) // in case of exception\n {\n // shows the exception error message\n new TMessage('error', $e->getMessage());\n \n $this->form->setData( $this->form->getData() ); // keep form data\n \n // undo all pending operations\n TTransaction::rollback();\n }\n }",
"public function saveForm()\n\t{\n\t\tparent::saveForm();\n\t\t$this->setNeedReinitRulesFlag();\n\t}",
"protected function saving() {\n // This will get reimplemented by children when necessary\n }",
"public function action_save()\n {\n // clear old reject info\n $this->setRejectInfo(null);\n\n if (isset($this->m_partial) && !empty($this->m_partial)) {\n $this->partial($this->m_partial);\n\n return;\n } else {\n $this->doSave();\n }\n }",
"public final function save() {\n }",
"function save()\n {\n parent::save();\n }",
"function save()\n {\n parent::save();\n }",
"function save()\n {\n parent::save();\n }",
"public final function save()\n {\n }",
"public function save()\r\n {\r\n \r\n }",
"public function save()\n {\n }",
"protected function saveData()\n {\n // TODO: データ保存\n\n // 一次データ削除\n $this->deleteStore();\n\n drupal_set_message($this->t('The form has been saved.'));\n }",
"public function save() {\n\t\t\t\n\t\t}",
"public function save () {\r\n\t\tif (isset($_POST['data'])) {\r\n\t\t\t$data = stripslashes_deep($_POST['data']);\r\n\t\t\tif (!empty($data['preset']) && !empty($data['id'])) $data['preset'] = $data['id']; // Also override whatever preset we're seding\r\n\t\t\t$_POST['data'] = $data;\r\n\t\t}\r\n\t\tparent::save();\r\n\t}",
"protected function _postSave()\r\n\t{\r\n\t}",
"public function save()\n\t{\n\n\t}",
"public function save()\n {\n return;\n }",
"public function save()\n {\n // For V2.0\n }",
"public\tfunction\tsave()\n\t\t{\n\t\t}",
"public function save()\r\n {\r\n //\r\n }",
"public function save() {}",
"public function save() {}",
"public function save() {}",
"public function onSave()\n {\n try\n {\n TTransaction::open($this->database);\n\n $data = $this->form->getData();\n\n $object = new Format;\n $object->id = $data->id;\n $object->name = $data->name;\n $object->format_key = $data->format_key;\n\n $this->form->validate();\n $object->store();\n $data->id = $object->id;\n $this->form->setData($data);\n\n TTransaction::close();\n\n new TMessage('info', AdiantiCoreTranslator::translate('Record saved'));\n\n return $object;\n\n } catch (Exception $e) //in case of exception\n {\n //Get the form data\n $object = $this->form->getData($this->activeRecord);\n $this->form->setData($object);\n new TMessage('error', $e->getMessage());\n TTransaction::rollback();\n }\n }",
"public function saveForm() {\n\n\t\tforeach ( $this->getOptionsList() as $element ) {\n\t\t\t$element->save();\n\t\t}\n\t\t$this->setLastAction( self::ACTION_SAVE );\n\n\t\t$custom_style = new Custom_CSS_Style();\n\t\t$custom_style->reinit();\n\t}",
"public function Save()\n {\n $required = array(\n \"title\" => \"Título\",\n \"src\" => \"Imagem\"\n );\n $this->validateData($required);\n parent::Save();\n }",
"public function afterSave()\n\t{\n\t\t//annoying on every edit, move to a checkbox on form and handle in controller\n\t}",
"public function save() {\n }",
"function save() {\n\t\tif ($this->input->post('contracts_show_due')) {\n\n\t\t\t$this->mdl_mcb_data->save('contracts_show_due', $this->input->post('contracts_show_due'));\n\n\t\t}\n\n\t\telse {\n\n\t\t\t$this->mdl_mcb_data->save('contracts_show_due', \"FALSE\");\n\n\t\t}\n\t}"
]
| [
"0.72827417",
"0.6942034",
"0.6922067",
"0.6868379",
"0.6828924",
"0.68148637",
"0.6787164",
"0.6787164",
"0.6787164",
"0.6761275",
"0.6718057",
"0.67121875",
"0.6634515",
"0.66339207",
"0.6622403",
"0.6616926",
"0.6573769",
"0.65668154",
"0.65543133",
"0.6511021",
"0.6497866",
"0.64967036",
"0.64967036",
"0.6493905",
"0.6492602",
"0.6482354",
"0.64643484",
"0.6463046",
"0.64478713",
"0.6443008"
]
| 0.72191095 | 1 |
Handle for Request for Reopen | public function handleGrievanceRequestReopen()
{
//code for request to reopen
$Grievance = new Grievance;
if ($Grievance->RequestReoopenGrievance()) {
SentryHelper::setMessage('Request sent ....');
} else {
SentryHelper::setMessage('Request Not sent', 'warning');
}
return Redirect::to('grievance/list');
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function handleRequest() {}",
"function handleRequest() ;",
"abstract public function handle_request();",
"public function handleRequest();",
"public function handleRequest();",
"public function handleRequest();",
"protected abstract function handleRequest();",
"function req_unhook() {\n \\melt\\request\\reset();\n ignore_user_abort(true);\n header(\"Connection: close\");\n header(\"Content-Encoding: none\");\n header(\"Content-Length: 0\");\n ob_start();\n echo \" \";\n ob_end_flush();\n flush();\n ob_end_clean();\n}",
"abstract public function handleRequest($request);",
"public function handle($request);",
"protected function handle(Request $request) {}",
"public function handleRequest($request)\n {\n list ($route, $params) = $request->resolve();\n $this->requestedRoute = $route;\n $result = $this->runAction($route, $params);\n\n if ($result instanceof Response) {\n return $result;\n } elseif ($result instanceof Looper){\n $result->loop();\n\n $response = $this->getResponse();\n $response->exitStatus = 0;\n\n return $response;\n } else {\n $response = $this->getResponse();\n $response->exitStatus = $result;\n\n return $response;\n }\n }",
"public function refusal($request);",
"public function handleRequest() {\n $this->loadErrorHandler();\n\n $this->sanitizeRequest();\n $this->modx->invokeEvent('OnHandleRequest');\n if (!$this->modx->checkSiteStatus()) {\n header('HTTP/1.1 503 Service Unavailable');\n if (!$this->modx->getOption('site_unavailable_page',null,1)) {\n $this->modx->resource = $this->modx->newObject('modDocument');\n $this->modx->resource->template = 0;\n $this->modx->resource->content = $this->modx->getOption('site_unavailable_message');\n } else {\n $this->modx->resourceMethod = \"id\";\n $this->modx->resourceIdentifier = $this->modx->getOption('site_unavailable_page',null,1);\n }\n } else {\n $this->checkPublishStatus();\n $this->modx->resourceMethod = $this->getResourceMethod();\n $this->modx->resourceIdentifier = $this->getResourceIdentifier($this->modx->resourceMethod);\n if ($this->modx->resourceMethod == 'id' && $this->modx->getOption('friendly_urls', null, false) && !$this->modx->getOption('request_method_strict', null, false)) {\n $uri = $this->modx->context->getResourceURI($this->modx->resourceIdentifier);\n if (!empty($uri)) {\n if ((integer) $this->modx->resourceIdentifier === (integer) $this->modx->getOption('site_start', null, 1)) {\n $url = $this->modx->getOption('site_url', null, MODX_SITE_URL);\n } else {\n $url = $this->modx->getOption('site_url', null, MODX_SITE_URL) . $uri;\n }\n $this->modx->sendRedirect($url, array('responseCode' => 'HTTP/1.1 301 Moved Permanently'));\n }\n }\n }\n if (empty ($this->modx->resourceMethod)) {\n $this->modx->resourceMethod = \"id\";\n }\n if ($this->modx->resourceMethod == \"alias\") {\n $this->modx->resourceIdentifier = $this->_cleanResourceIdentifier($this->modx->resourceIdentifier);\n }\n if ($this->modx->resourceMethod == \"alias\") {\n $found = $this->findResource($this->modx->resourceIdentifier);\n if ($found) {\n $this->modx->resourceIdentifier = $found;\n $this->modx->resourceMethod = 'id';\n } else {\n $this->modx->sendErrorPage();\n }\n }\n $this->modx->beforeRequest();\n $this->modx->invokeEvent(\"OnWebPageInit\");\n\n if (!is_object($this->modx->resource)) {\n if (!$this->modx->resource = $this->getResource($this->modx->resourceMethod, $this->modx->resourceIdentifier)) {\n $this->modx->sendErrorPage();\n return true;\n }\n }\n\n return $this->prepareResponse();\n }",
"public function handle(): void\n {\n $globals = $_SERVER;\n //$SlimPsrRequest = ServerRequestFactory::createFromGlobals();\n //it doesnt matters if the Request is of different class - no need to create Guzaba\\Http\\Request\n $PsrRequest = ServerRequestFactory::createFromGlobals();\n //the only thing that needs to be fixed is the update the parsedBody if it is NOT POST & form-fata or url-encoded\n\n\n //$GuzabaPsrRequest =\n\n //TODO - this may be reworked to reroute to a new route (provided in the constructor) instead of providing the actual response in the constructor\n $DefaultResponse = $this->DefaultResponse;\n //TODO - fix the below\n// if ($PsrRequest->getContentType() === ContentType::TYPE_JSON) {\n// $DefaultResponse->getBody()->rewind();\n// $structure = ['message' => $DefaultResponse->getBody()->getContents()];\n// $json_string = json_encode($structure, JSON_UNESCAPED_SLASHES);\n// $StreamBody = new Stream(null, $json_string);\n// $DefaultResponse = $DefaultResponse->\n// withBody($StreamBody)->\n// withHeader('Content-Type', ContentType::TYPES_MAP[ContentType::TYPE_JSON]['mime'])->\n// withHeader('Content-Length', (string) strlen($json_string));\n// }\n\n $FallbackHandler = new RequestHandler($DefaultResponse);//this will produce 404\n $QueueRequestHandler = new QueueRequestHandler($FallbackHandler);//the default response prototype is a 404 message\n foreach ($this->middlewares as $Middleware) {\n $QueueRequestHandler->add_middleware($Middleware);\n }\n $PsrResponse = $QueueRequestHandler->handle($PsrRequest);\n $this->emit($PsrResponse);\n\n }",
"public function disposal($request);",
"abstract protected function _postHandle();",
"protected function _request() {}",
"public function handle(Request $request);",
"public function handleRequest() {\n\t\t\n\t\tif (is_null($this->itemObj)) {\n\t\t\t$this->itemObj = MovieServices::getVcdByID($this->getParam('vcd_id'));\n\t\t}\n\t\t\n\t\t$action = $this->getParam('action');\n\t\t\n\t\tswitch ($action) {\n\t\t\tcase 'upload':\n\t\t\t\t$this->uploadImages();\n\t\t\t\t// reload and close upon success\n\t\t\t\tredirect('?page=addscreens&vcd_id='.$this->itemObj->getID().'&close=true');\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 'fetch':\n\t\t\t\t$this->fetchImages();\n\t\t\t\t// reload and close upon success\n\t\t\t\tredirect('?page=addscreens&vcd_id='.$this->itemObj->getID().'&close=true');\n\t\t\t\tbreak;\n\t\t\n\t\t\tdefault:\n\t\t\t\tredirect();\n\t\t\t\tbreak;\n\t\t}\n\t}",
"public function handlerNeedsRequest()\n {\n }",
"public static function handleReload()\n {\n \\Controller::reload();\n }",
"protected function _handle()\n {\n return $this\n ->_addData('post', $_POST)\n ->_addData('get', $_GET)\n ->_addData('server', $_SERVER)\n ->_handleRequestRoute();\n }",
"abstract public function handleRequest(Request $request);",
"private function handleCall() { //$this->request\n $err = FALSE;\n // route call to method\n $this->logToFile($this->request['action']);\n switch($this->request['action']) {\n // Edit form submitted\n case \"edit\":\n // TODO: improve error handling\n try {\n $this->logToFile(\"case: edit\");\n $this->edit($this->request['filename']);\n //$this->save();\n } catch (Exception $e) {\n $err = \"Something went wrong: \";\n $err .= $e.getMessage();\n }\n break;\n }\n // TODO: set error var in response in case of exception / error\n // send JSON response\n if($err !== FALSE) {\n $this->request['error_msg'] = $err;\n }\n $this->giveJSONResponse($this->request);\n }",
"public function handle() {}",
"public function handleCancellation($request, $context) { }",
"public function onHandleClosed() {}",
"public function reloadRequest(): RequestInterface;",
"public function handle()\n {\n $this->cache->refresh();\n }"
]
| [
"0.6340992",
"0.62985456",
"0.6265283",
"0.6189609",
"0.6189609",
"0.6189609",
"0.6088414",
"0.5917999",
"0.5850783",
"0.5790484",
"0.5726067",
"0.5696581",
"0.56604344",
"0.5660314",
"0.5640664",
"0.5628068",
"0.55742216",
"0.5559663",
"0.5554176",
"0.55314547",
"0.54796207",
"0.5473019",
"0.5465191",
"0.54548043",
"0.5441883",
"0.54391664",
"0.54388225",
"0.54171145",
"0.53966796",
"0.53543395"
]
| 0.7514798 | 0 |
TODO $charset_local podria volverse opcional si pudiesemos detectar automaticamente el charset de $datos Espera que $datos sea una estructura php e intenta convertirlo a $formato. | function formatearSalida($datos, $formato, $charset_remoto, $charset_local){
switch($formato){
case "application/php" :
if($charset_local != $charset_remoto){
$datos = convertir_charset_mix($datos, $charset_remoto, $charset_local);
}
return serialize($datos);
case "text/xml":
//$datos = utf8_encode_mix($datos);
$factory = new XMLFactory();
$xml_parser = $factory->getArrayToXMLInstance();
/*if($charset_local != "utf-8"){
$datos = convertir_charset_mix($datos, "utf-8", $charset_local);
}*/
if($charset_local != $charset_remoto){
$datos = convertir_charset_mix($datos, $charset_remoto, $charset_local);
}
$xml_parser->setCharsetSalida($charset_remoto);
$datos_xml = $xml_parser->toXml($datos);
return $datos_xml;
case "text/html":
if($charset_local != $charset_remoto){
$datos = convertir_charset_mix($datos, $charset_remoto, $charset_local);
}
return "<pre>".print_r($datos, TRUE)."</pre>";
case "application/json" :
$charset_remoto = "utf-8";//obligatorio
if($charset_local != $charset_remoto){
$datos = convertir_charset_mix($datos, $charset_remoto, $charset_local);
}
return json_encode($datos);
default:
return FALSE;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function formatearEntrada($datos, $formato, $charset_local, $charset_remoto){\n\n switch($formato){\n\tcase \"application/php\" :\n\t\t$datos_php = unserialize(trim($datos));\n\t\tif($charset_local != $charset_remoto){\n\t\t\t$datos_php = convertir_charset_mix($datos_php, $charset_local, $charset_remoto);\n \t\t}\n\t\treturn $datos_php;\n\tcase \"text/xml\":\n\t\t/** La documentacion dice que XMLParser detecta automaticamente el encoding*/\n\t\t$factory = new XMLFactory();\n\t\t$xml_parser = $factory->getXMLToArrayInstance();\n\t\t$datos_php = $xml_parser->toArray($datos);\n\t\tif($charset_local != $charset_remoto){\n\t\t\t$datos_php = convertir_charset_mix($datos_php, $charset_local, $charset_remoto);\n\t\t}\n\t\t//echo \"Datos traidos en XML <pre>\".print_r($datos_php, TRUE).\"</pre>\";\n\t\treturn $datos_php;\n case \"application/x-www-form-urlencoded\":\n\t\tparse_str($datos, $datos_php);\n\t\tif($charset_local != $charset_remoto){\n\t\t\t$datos_php = convertir_charset_mix($datos_php, $charset_remoto, $charset_local);\n\t\t}\n\t\treturn $datos_php;\n\tcase \"application/json\" :\n\t\t/**codificacion remota obligatoria: utf-8 o ASCII*/\n\t\t//error_log(\"[\".date(\"r\").\"] get datos\".print_r($datos, TRUE).\"\\n\",3,\"error.log\");\n\t\t$datos_php = json_decode($datos, true);\n\t\t//error_log(\"[\".date(\"r\").\"] get datos\".print_r($datos_php, TRUE).\"\\n\",3,\"error.log\");\n\t\tif($charset_local != $charset_remoto){\n\t\t $datos_php = convertir_charset_mix($datos_php, $charset_local, $charset_remoto);\n\t\t}\n\t\treturn $datos_php;\n default:\n\t\treturn FALSE;\n }\n}",
"function convert_data_encodings($known_utf8 = false)\n{\n global $VALID_ENCODING, $CONVERTED_ENCODING;\n $VALID_ENCODING = true;\n\n if ($CONVERTED_ENCODING) {\n return; // Already done it\n }\n\n if (preg_match('#^[\\x00-\\x7F]*$#', serialize($_POST) . serialize($_GET) . serialize($_FILES)) != 0) { // Simple case, all is ASCII\n $CONVERTED_ENCODING = true;\n return;\n }\n\n require_code('character_sets');\n _convert_data_encodings($known_utf8);\n}",
"private function set_charset() {\n\t\t//regresa bool\n\t\t$this->conn->set_charset(\"utf8\");\n\t}",
"public function tratarDados($especificacoes, $valor, $posicao, $config, $identifica)\n {\n $util = new Util();\n $arquivoValidacao = new ArquivoValidacao();\n\n\n if ($especificacoes[1] == 'livre') {\n return $valor;\n }\n\n switch ($especificacoes[1]) {\n\n case 'doc':\n $valorFormatado = $util->somenteNumeros($valor);\n $arquivoValidacao->validaTamanhoNum($valorFormatado, $especificacoes[0], $posicao, $identifica);\n $valor = $util->adicionarZerosEsq($valorFormatado, $especificacoes[0]);\n break;\n\n case 'num':\n $valorFormatado = $util->somenteNumeros($valor);\n $arquivoValidacao->validaTamanhoNum($valorFormatado, $especificacoes[0], $posicao, $identifica);\n $valor = $util->adicionarZerosEsq($valorFormatado, $especificacoes[0]);\n break;\n\n case 'valor':\n $valor = $util->adicionarZerosEsq($util->trataValor($valor), $especificacoes[0]);\n\n $arquivoValidacao->validaTamanhoNum($valor, $especificacoes[0], $posicao, $identifica);\n break;\n\n case 'data-Ymd': case 'data-ymd': case 'data-dmY': case 'data-dmy':\n\n if (empty($valor)) {\n $valor = $util->adicionarZerosEsq('0', $especificacoes[0]);\n } else {\n\n $valorCru = $util->somenteNumeros($valor);\n\n if (strlen($valorCru) > 8) {\n $valorCru = substr($valorCru, 0, 8);\n }\n\n $arquivoValidacao->validaData($valorCru, $posicao, $especificacoes[0], $identifica);\n\n $partes = explode('-', $especificacoes[1]);\n\n $valor = (new \\DateTime($valor))->format($partes[1]);\n }\n\n break;\n\n default :\n $case = null;\n\n if (isset($config['case'])) {\n $case = strtolower($config['case']);\n }\n\n $valorPreparado = $util->preparaTexto($valor, $case);\n\n $valor = $util->adicionarEspacosDir($valorPreparado, $especificacoes[0]);\n break;\n }\n\n\n return $valor;\n }",
"protected function getCharsetConversion() {}",
"public function revisarFormato($archivo, $tipo_archivo)\n {\n\n\n Excel::selectSheetsByIndex(0)->load($archivo, function($reader) use ($tipo_archivo) {\n\n $reader->noHeading();\n\n $firstrow = $reader->first()->toArray();\n\n /*\n *Normalizando los nombres de las columnas (eliminamos acentos,espacios y Ñ)\n */\n $originales ='áéíóú ñ';\n $modificadas ='aeiou_n';\n\n for($i=0; $i < count($firstrow); $i++){\n $cadena = $firstrow[$i];\n $cadena = utf8_decode($cadena);\n $cadena = strtr($cadena, utf8_decode($originales), $modificadas);\n $cadena = strtolower($cadena);\n $firstrow[$i] = utf8_encode($cadena);\n }\n\n /*\n * Revisamos que el archivo tiene todas las columnas que se piden\n * y que sus nombres corresponden con los establecidos\n */\n\n switch($tipo_archivo)\n {\n case \"registros\":\n if (count($firstrow) >= 15) {\n if (($firstrow[0] == 'phylum') && ($firstrow[1] == 'clase') && (($firstrow[2] == 'subclase')\n && ($firstrow[3] == 'orden') && ($firstrow[4] == 'familia') && ($firstrow[5] == 'genero')\n && ($firstrow[6] == 'especie') && ($firstrow[7] == 'variedad') && ($firstrow[8]) == 'forma')\n && ($firstrow[9] == 'autor') && ($firstrow[10] == 'sinonimia') && ($firstrow[11] == 'cita')\n && ($firstrow[12] == 'entidad_federal') && ($firstrow[13] == 'localidad') && ($firstrow[14] == 'comentario')\n ) {\n $this->log = \"Archivo de Registros para el Catálogo con estructura correcta\";\n $this->error = false;\n } else {\n $this->log = \"NOMBRE de columnas inválidas\";\n $this->error = true;\n }\n } else {\n $this->log = \"NÚMERO de columnas inválidas\";\n $this->error = true;\n }\n break;\n\n\n case \"libros\":\n if (count($firstrow) >= 16) {\n if (($firstrow[0] == 'cita') && ($firstrow[1] == 'autores') && (($firstrow[2] == 'fecha')\n && ($firstrow[3] == 'titulo_libro') && ($firstrow[4] == 'edicion') && ($firstrow[5] == 'editorial')\n && ($firstrow[6] == 'lugar') && ($firstrow[7] == 'total_de_paginas') && ($firstrow[8]) == 'titulo_capitulo')\n && ($firstrow[9] == 'editor') && ($firstrow[10] == 'intervalo_de_paginas') && ($firstrow[11] == 'isbn')\n && ($firstrow[12] == 'doi') && ($firstrow[13] == 'enlace')&& ($firstrow[14] == 'archivo') && ($firstrow[15] == 'comentarios')\n ) {\n $this->log = 'Archivo de Referencias de Libros con estructura correcta';\n $this->error = false;\n } else {\n $this->log = \"NOMBRE de columnas inválidas\";\n $this->error = true;\n }\n } else {\n $this->log = \"NÚMERO de columnas inválidas\";\n $this->error = true;\n }\n break;\n\n\n case \"revistas\":\n if (count($firstrow) >= 14) {\n if (($firstrow[0] == 'cita') && ($firstrow[1] == 'autores') && (($firstrow[2] == 'fecha')\n && ($firstrow[3] == 'titulo') && ($firstrow[4] == 'nombre_revista') && ($firstrow[5] == 'volumen')\n && ($firstrow[6] == 'numero') && ($firstrow[7] == 'intervalo_de_paginas') && ($firstrow[8]) == 'isbn')\n && ($firstrow[9] == 'issn') && ($firstrow[10] == 'doi') && ($firstrow[11] == 'enlace')\n && ($firstrow[12] == 'archivo') && ($firstrow[13] == 'comentarios')\n ) {\n $this->log = 'Archivo de Referencias de Revistas con estructura correcta';\n $this->error = false;\n } else {\n $this->log = \"NOMBRE de columnas inválidas\";\n $this->error = true;\n }\n } else {\n $this->log = \"NÚMERO de columnas inválidas\";\n $this->error = true;\n }\n break;\n\n\n case \"trabajos\":\n if (count($firstrow) >= 11) {\n if (($firstrow[0] == 'tipo') && ($firstrow[1] == 'cita') && ($firstrow[2] == 'autores') && ($firstrow[3] == 'fecha')\n && ($firstrow[4] == 'titulo') && ($firstrow[5] == 'institucion') && ($firstrow[6] == 'lugar')\n && ($firstrow[7] == 'paginas') && ($firstrow[8] == 'enlace') && ($firstrow[9] == 'archivo') && ($firstrow[10] == 'comentarios')\n ) {\n $this->log = 'Archivo de Referencias de Revistas con estructura correcta';\n $this->error = false;\n } else {\n $this->log = \"NOMBRE de columnas inválidas\";\n $this->error = true;\n }\n } else {\n $this->log = \"NÚMERO de columnas inválidas\";\n $this->error = true;\n }\n break;\n\n case \"enlaces\":\n if (count($firstrow) >= 11) {\n if (($firstrow[0] == 'cita') && ($firstrow[1] == 'autores') && ($firstrow[2] == 'fecha') && ($firstrow[3] == 'nombre_pagina')\n && ($firstrow[4] == 'titulo') && ($firstrow[5] == 'institucion') && ($firstrow[6] == 'lugar')\n && ($firstrow[7] == 'direccion_web') && ($firstrow[8] == 'dia_consulta') && ($firstrow[9] == 'mes_consulta') && ($firstrow[10] == 'ano_consulta')\n ) {\n $this->log = 'Archivo de Referencias de Revistas con estructura correcta';\n $this->error = false;\n } else {\n $this->log = \"NOMBRE de columnas inválidas\";\n $this->error = true;\n }\n } else {\n $this->log = \"NÚMERO de columnas inválidas\";\n $this->error = true;\n }\n break;\n\n\n case \"coordenadas\":\n if (count($firstrow) >= 6) {\n if (($firstrow[0] == 'entidad') && ($firstrow[1] == 'localidad') && ($firstrow[2] == 'lugar') && ($firstrow[3] == 'sitio')\n && ($firstrow[4] == 'latitud') && ($firstrow[5] == 'longitud')\n ) {\n $this->log = 'Archivo de Coordenadas con estructura correcta';\n $this->error = false;\n } else {\n $this->log = \"NOMBRE de columnas inválidas\";\n $this->error = true;\n }\n } else {\n $this->log = \"NÚMERO de columnas inválidas\";\n $this->error = true;\n }\n break;\n\n default:\n $this->log = \"Error en el tipo de archivo\";\n $this->error = true;\n }\n\n\n\n\n\n });\n\n $respuesta = ['error' => $this->error, 'log' => $this->log];\n\n return $respuesta;\n }",
"function normalise_fichier($NomComplet){\n\t\t$valRetour = str_replace(\"'\",\"\",$NomComplet);\n\t\t$valRetour = str_replace(\" \",\"_\",$valRetour);\n\t\t$valRetour = str_replace(\"-\",\"_\",$valRetour);\n\t\t$valRetour = str_replace(\",\",\"_\",$valRetour);\n\t\t$valRetour = str_replace(\"¦\",\"_\",$valRetour);\n\t\t$valRetour = str_replace(\"/\",\"_\",$valRetour);\n\t\t$valRetour = str_replace(\"+\",\"_\",$valRetour);\n\t\t$valRetour = str_replace(\"=\",\"_\",$valRetour);\n\t\t$valRetour = str_replace(\"!\",\"_\",$valRetour);\n\t\t$valRetour = str_replace(\"?\",\"_\",$valRetour);\n\t\t$valRetour = str_replace(\"\",\"oe\",$valRetour);\n\t\t$valRetour = str_replace(\"æ\",\"ae\",$valRetour);\n\t\t$valRetour = mb_convert_encoding($valRetour,\"iso-8859-1\",\"UTF-8\");\n\t\t$valRetour = strtolower($valRetour);\n\t\t$valRetour = vireAccents($valRetour);\n\t\treturn($valRetour);\n\t}",
"function load_charset ($charset = 'AUTO', $langue_site = 'AUTO') {\n\tif ($charset == 'AUTO')\n\t\t$charset = $GLOBALS['meta']['charset'];\n\t$charset = trim(strtolower($charset));\n\tif (isset($GLOBALS['CHARSET'][$charset]))\n\t\treturn $charset;\n\n\tif ($langue_site == 'AUTO')\n\t\t$langue_site = $GLOBALS['meta']['langue_site'];\n\n\tif ($charset == 'utf-8') {\n\t\t$GLOBALS['CHARSET'][$charset] = array();\n\t\treturn $charset;\n\t}\n\t\n\t// Quelques synonymes\n\tif ($charset == '') $charset = 'iso-8859-1';\n\telse if ($charset == 'windows-1250') $charset = 'cp1250';\n\telse if ($charset == 'windows-1251') $charset = 'cp1251';\n\telse if ($charset == 'windows-1256') $charset = 'cp1256';\n\n\tif (include_spip('charsets/'.$charset)) {\n\t\treturn $charset;\n\t} else {\n\t\tspip_log(\"Erreur: pas de fichier de conversion 'charsets/$charset'\");\n\t\t$GLOBALS['CHARSET'][$charset] = array();\n\t\treturn false;\n\t}\n}",
"function extraeUsuario($sesion)\n{\n $link = conection(); \n \n $query = \"select * from Cliente where sesion like '$sesion'\";\n $result = mysqli_query($link, $query);\n $aPaterno = \"\";\n $aMaterno = \"\";\n \n $array = mysqli_fetch_assoc($result);\n $space = explode(\",\", $array[\"apellidosCl\"]);\n \n if(count($space) === 2)\n {\n $aMaterno = utf8_encode($space[1]);\n $aPaterno = utf8_encode($space[0]);\n }\n \n $parseUTF8 = [\"nombre\" => utf8_encode($array[\"nombreCl\"]), \"aPaterno\" => $aPaterno,\n \"aMaterno\" => $aMaterno, \"fNacimiento\" => utf8_encode($array[\"fn\"]),\n \"idCliente\" => $array[\"idCliente\"], \"idArchivo\" => $array[\"idArchivo\"],\n \"correo\" => utf8_encode($array[\"correo\"])];\n \n mysqli_close($link);\n return $parseUTF8;\n}",
"protected function cargarDatos($datos)\n {\n $this->setIdposteo($datos['idposteo']);\n $this->setTextoPosteo($datos['texto_posteo']);\n $this->setFechaHora($datos['fecha_hora']);\n $this->setUsuarioIdusuario($datos['usuario_idusuario']);\n $this->setUsuario($datos['usuario_idusuario']);\n $this->setComentarios($datos['idposteo']);\n }",
"function funConverteData($data){\n\t//$data_americano = \"2009-04-29\";\n\t//$data_Brasileiro = \"29/04/2012\";\n\t//AGORA VAMOS EXPLODIR ELA PELOS HIFENS E SERÁ CRIADO UM ARRAY COM AS PARTES\n\t$partes_da_data = explode('/',$data);\n\n\t//AGORA REMONTAMOS A DATA NO FORMATO BRASILEIRO, OU SEJA,\n\t//INVERTENDO AS POSICOES E COLOCANDO AS BARRAS\n\t$data = $partes_da_data[2].'-'.$partes_da_data[1].'-'.$partes_da_data[0];\n\n\t//UFA! PRONTINHO, AGORA TEMOS A DATA NO BOM E VELHO FORMATO BRASILEIRO\n\treturn $data;\n}",
"function extraeTipo($idTipo)\n{\n $link = conection();\n \n $query = \"select * from Tipo_Raza where idTipo = '$idTipo'\";\n $result = mysqli_query($link, $query);\n \n $array = mysqli_fetch_assoc($result);\n \n $parseUTF8 = [\"idTipo\" => $array[\"idTipo\"],\n \"tamano\" => utf8_encode($array[\"tamano\"])];\n \n mysqli_close($link);\n return $parseUTF8;\n}",
"private function charset()\n\t{\n\t\tif (isset($this->_conf['charset']) AND $this->_conf['charset'] != '')\n\t\t{\n\t\t\tif (isset($this->_conf['collation']) AND $this->_conf['collation'] != '')\n\t\t\t{\n\t\t\t\t$this->_con->exec('SET NAMES '.$this->_conf['charset'].' COLLATE '.$this->_conf['collation']);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->_con->exec('SET NAMES '.$this->_conf['charset']);\n\t\t\t}\n\t\t}\n\t}",
"function funConverteDataHora($data){\n\t//$data_americano = \"2009-04-29\";\n\t//$data_Brasileiro = \"29/04/2012\";\n\t//AGORA VAMOS EXPLODIR ELA PELOS HIFENS E SERÁ CRIADO UM ARRAY COM AS PARTES\n\t$partes_da_data = \"\";\n\t$hora = \"\";\n\t$partes_da_data = explode('/',$data);\n\t$hora = substr($partes_da_data[2],4,-1);\n\n //AGORA REMONTAMOS A DATA NO FORMATO BRASILEIRO, OU SEJA,\n\t//INVERTENDO AS POSICOES E COLOCANDO AS BARRAS\n\t$data = substr($partes_da_data[2],0,4).'-'.$partes_da_data[1].'-'.$partes_da_data[0];\n\n\t//UFA! PRONTINHO, AGORA TEMOS A DATA NO BOM E VELHO FORMATO BRASILEIRO\n\t//return \n\treturn $data.' '.$hora;\n}",
"function to_charset($data, $to_charset = 'UTF-8', $from_charset = 'auto')\n{\n if (is_numeric($data)) {\n $float = (string) (float) $data;\n if (is_int($data)) {\n return (int) $data;\n } else if (is_float($data) || $data === $float) {\n return (float) $data;\n } else {\n return (int) $data;\n }\n } else if (is_string($data)) {\n return mb_convert_encoding($data, $to_charset, $from_charset);\n } else if (is_array($data)) {\n foreach ($data as $key => $value) {\n $data[$key] = to_charset($value, $to_charset, $from_charset);\n }\n } else if (is_object($data)) {\n foreach ($data as $key => $value) {\n $data->$key = to_charset($value, $to_charset, $from_charset);\n }\n }\n return $data;\n}",
"function extraeServicio()\n{\n $link = conection();\n $parseUTF8 = array();\n $contador = null;\n \n $query = \"select * from Servicio\";\n $result = mysqli_query($link, $query);\n \n $array = mysqli_num_rows($result); \n \n if($array > 0)\n {\n while ($rows = mysqli_fetch_assoc($result))\n {\n $contador ++;\n \n $parseUTF8[$contador] = [\"idServicio\" => $rows[\"idServicio\"], \"nombreSe\" => strtoupper(utf8_encode($rows[\"nombreSe\"])),\n \"costoSe\" => utf8_decode($rows[\"costoSe\"]),\"descripcion\" => strtoupper(utf8_encode($rows[\"descripcion\"]))];\n }\n }\n \n return $parseUTF8;\n}",
"function importer_charset($texte, $charset = 'AUTO') {\n\treturn unicode2charset(charset2unicode($texte, $charset));\n}",
"public function convPOSTCharset() {}",
"function pegaCadastrosJson(){\n $arquivo = file_get_contents('json/cadastros.json');//arquivo Json que será pego\n $GLOBALS['cadastros'] = json_decode($arquivo);//salva no array global cadastros os cadastros\n $cadastrosLocal = $GLOBALS['cadastros'];\n }",
"function extraeEmpleado()\n{\n $link = conection();\n $parseUTF8 = array();\n $contador = null;\n $aMaterno = null;\n $aPaterno = null;\n \n $query = \"select * from Empleado\";\n $result = mysqli_query($link, $query);\n \n $array = mysqli_num_rows($result); \n \n if($array > 0)\n {\n while ($rows = mysqli_fetch_assoc($result)) \n {\n $contador ++;\n\n $space = explode(\",\", $rows[\"apellidosEm\"]);\n\n if (count($space) === 2) \n {\n $aMaterno = utf8_encode($space[1]);\n $aPaterno = utf8_encode($space[0]);\n }\n\n $parseUTF8[$contador] = [\"idEmpleado\" => $rows[\"idEmpleado\"], \"nombreEm\" => utf8_encode($rows[\"nombreEm\"]),\n \"aPaterno\" => $aPaterno, \"aMaterno\" => $aMaterno,\n \"telefonoEm\" => utf8_encode($rows[\"telefonoEm\"]), \"idRol\" => $rows[\"idRol\"],\n \"idArchivo\" => $rows[\"idArchivo\"]];\n }\n }\n mysqli_close($link);\n return $parseUTF8;\n}",
"public function buscarDatosDeCodigo($lote, $suc){\n $db = new My();\n $my = new My();\n $datos = array();\n $query = \"SELECT a.codigo AS Codigo,l.lote,CONCAT( a.descrip, '-', p.nombre_color) AS Descrip , s.suc, s.cantidad AS Stock, s.estado_venta,a.um AS UM,l.ancho AS Ancho,l.gramaje AS Gramaje,l.tara AS Tara,l.padre AS Padre,s.ubicacion AS U_ubic,\n l.img AS Img, l.kg_desc AS U_kg_desc,h.fecha_hora AS entDate\n\n FROM articulos a INNER JOIN lotes l ON a.codigo = l.codigo INNER JOIN stock s ON l.codigo = s.codigo AND l.lote = s.lote \n INNER JOIN pantone p ON l.pantone = p.pantone INNER JOIN historial h ON l.codigo = h.codigo AND l.lote = h.lote\n WHERE s.cantidad > 0 AND s.suc = '$suc' AND l.lote ='$lote' GROUP BY lote ORDER BY h.fecha_hora ASC LIMIT 1\";\n \n $my->Query($query);\n if($my->NextRecord()){\n $datos = $my->Record;\n if(count($datos)){\n $datos = array_map(\"utf8_encode\",$datos);\n // print_r($datos);\n \n $rem = \"SELECT CONCAT(fecha_cierre,' ',hora_cierre) AS fecha_ingreso FROM nota_remision n, nota_rem_det d WHERE n.n_nro = d.n_nro AND lote = '$lote' AND n.estado = 'Cerrada' AND n.suc_d = '$suc'\";\n \n $db->Query($rem);\n if($db->NumRows() > 0){ \n $db->NextRecord();\n $fecha_ingreso = $db->Record['fecha_ingreso'];\n $datos['entDate'] = $fecha_ingreso;\n }\n // Buscar si esta en una Remision Abierta o En Proceso\n $rem2 = \"SELECT n.n_nro, n.suc_d FROM nota_remision n, nota_rem_det d WHERE n.n_nro = d.n_nro AND lote = '$lote' AND n.estado != 'Cerrada' AND n.suc = '$suc'\";\n \n $db->Query($rem2);\n if($db->NumRows() > 0){ \n $db->NextRecord();\n $n_nro = $db->Record['n_nro'];\n $destino = $db->Record['suc_d'];\n $datos['NroRemision'] = $n_nro;\n $datos['Destino'] = $destino;\n $datos['Mensaje']=\"En Remision\";\n }else{\n $datos['Mensaje']=\"Ok\"; \n }\n \n }\n echo json_encode($datos);\n }else{\n echo '{\"Mensaje\":\"Error: Codigo no encontrado!\"}';\n } \n $my->Close();\n }",
"function transcoder_page($texte, $headers='') {\n\n\t// Si tout est < 128 pas la peine d'aller plus loin\n\tif (is_ascii($texte)) {\n\t\t#spip_log('charset: ascii');\n\t\treturn $texte;\n\t}\n\n\t// Reconnaitre le BOM utf-8 (0xEFBBBF)\n\tif (bom_utf8($texte)) {\n\t\t$charset = 'utf-8';\n\t\t$texte = substr($texte,3);\n\t}\n\n\t// charset precise par le contenu (xml)\n\telse if (preg_match(\n\t',<[?]xml[^>]*encoding[^>]*=[^>]*([-_a-z0-9]+?),UimsS', $texte, $regs))\n\t\t$charset = trim(strtolower($regs[1]));\n\t// charset precise par le contenu (html)\n\telse if (preg_match(\n\t',<(meta|html|body)[^>]*charset[^>]*=[^>]*([-_a-z0-9]+?),UimsS',\n\t$texte, $regs)\n\t# eviter #CHARSET des squelettes\n\tAND (($tmp = trim(strtolower($regs[2]))) != 'charset'))\n\t\t$charset = $tmp;\n\t// charset de la reponse http\n\telse if (preg_match(',charset=([-_a-z0-9]+),i', $headers, $regs))\n\t\t$charset = trim(strtolower($regs[1]));\n\n\t// normaliser les noms du shif-jis japonais\n\tif (preg_match(',^(x|shift)[_-]s?jis$,i', $charset))\n\t\t$charset = 'shift-jis';\n\n\tif ($charset) {\n\t\tspip_log(\"charset: $charset\");\n\t} else {\n\t\t// valeur par defaut\n\t\tif (is_utf8($texte))\n\t\t\t$charset = 'utf-8';\n\t\telse\n\t\t\t$charset = 'iso-8859-1';\n\t\tspip_log(\"charset probable: $charset\");\n\t}\n\n\treturn importer_charset($texte, $charset);\n}",
"function exportDatosInscritos()\n{\n global $mysqli;\n $query = new Query($mysqli, \"SELECT apellido,nombre,provincia,clave,tomo,folio,bach,ao_grad,sexo,col_proc,cod_col,mes_n,dia_n,ao_n,tipoc,provi,distri,corregi,mes_i,dia_i,ao_i,ao_lectivo,sede,fac_ia,esc_ia,car_ia,car_ia,car_iia,car_iiia, fac_iia, fac_iiia, telefono, CONCAT(dia_n,'/',DATE_FORMAT(STR_TO_DATE(mes_n,'%b'), '%m') , '/' , DATE_FORMAT(STR_TO_DATE(ao_n,'%Y'), '%Y')) as fecha_n ,CONCAT(dia_i,'/',DATE_FORMAT(STR_TO_DATE(mes_n,'%b'), '%m'),'/',DATE_FORMAT(STR_TO_DATE(ao_i,'%Y'), '%Y')) as fecha_i, n_ins, d from inscritos2017 LIMIT 1000\");\n $data = $query->getresults();\n if (isset($data[0])) {\n return $data;\n } else {\n return null;\n }\n\n}",
"function filtrado($datos)\n{\n if (gettype($datos) == \"string\") {\n $datos = trim($datos); // Elimina espacios antes y después de los datos\n $datos = stripslashes($datos); // Elimina backslashes \\\n $datos = htmlspecialchars($datos); // Traduce caracteres especiales en entidades HTML\n }\n return $datos;\n}",
"public function loadDataIntoBD() : void{\n $consulta = new Consultas();\n try{\n $reader = new Csv();\n \n $reader->setInputEncoding('CP1252');\n $reader->setDelimiter(';');\n $reader->setEnclosure('');\n $reader->setSheetIndex(0);\n \n $spreadsheet = $reader->load('./files/' . $this->files['name']);\n \n $worksheet = $spreadsheet->getActiveSheet();\n \n //Se debe hacer lectura anticipada, o hacerle un next al iterador\n //Manera no encontrada\n //Se salta el primero para que no lea las cabeceras de las columnas\n \n $cutradaParaSaltarPrimero = 0;\n foreach ($worksheet->getRowIterator() as $row) {\n if($cutradaParaSaltarPrimero == 0){\n $cutradaParaSaltarPrimero++;\n continue;\n }\n\n $cellIterator = $row->getCellIterator();\n $cellIterator->setIterateOnlyExistingCells(FALSE);\n \n $arrayFila = array();\n foreach ($cellIterator as $cell) {\n $arrayFila[] = $this->utf8Decode(trim($cell->getValue()));\t\t\t\t\n }\n \n if($arrayFila[0] != '') {\n $consulta->insertarCompetidor($arrayFila);\n }\n \n }\n \n }catch(\\PhpOffice\\PhpSpreadsheet\\Reader\\Exception $e){\n die('Error loading file: ' . $e->getMessage());\n }\n }",
"public function fixCharsets() {}",
"public function guardarDatos($datos){\n \n $inscripto = new InscriptosPadronSisa();\n $inscripto->id = $this->convertirEnTexto($datos->id); \n $inscripto->codigosisa = $this->convertirEnTexto($datos->codigoSISA);\n $inscripto->identificadorenaper = $this->convertirEnTexto($datos->identificadoRenaper);\n $inscripto->padronsisa = $this->convertirEnTexto($datos->PadronSISA);\n $inscripto->tipodocumento = $this->convertirEnTexto($datos->tipoDocumento);\n $inscripto->nrodocumento = $this->convertirEnTexto($datos->nroDocumento);\n $inscripto->apellido = $this->convertirEnTexto($datos->apellido);\n $inscripto->nombre = $this->convertirEnTexto($datos->nombre);\n $inscripto->sexo = $this->convertirEnTexto($datos->sexo);\n $inscripto->fechanacimiento = $this->convertirEnTexto($datos->fechaNacimiento);\n $inscripto->estadocivil = $this->convertirEnTexto($datos->estadoCivil);\n $inscripto->provincia = $this->convertirEnTexto($datos->provincia);\n $inscripto->departamento = $this->convertirEnTexto($datos->departamento);\n $inscripto->localidad = $this->convertirEnTexto($datos->localidad);\n $inscripto->domicilio = $this->convertirEnTexto($datos->domicilio);\n $inscripto->pisodpto = $this->convertirEnTexto($datos->pisoDpto);\n $inscripto->codigopostal = $this->convertirEnTexto($datos->codigoPostal);\n $inscripto->paisnacimiento = $this->convertirEnTexto($datos->paisNacimiento);\n $inscripto->provincianacimiento = $this->convertirEnTexto($datos->provinciaNacimiento);\n $inscripto->localidadnacimiento = $this->convertirEnTexto($datos->localidadNacimiento);\n $inscripto->nacionalidad = $this->convertirEnTexto($datos->nacionalidad);\n $inscripto->fallecido = $this->convertirEnTexto($datos->fallecido);\n $inscripto->fechafallecido = $this->convertirEnTexto($datos->fechaFallecido);\n $inscripto->donante = $this->convertirEnTexto($datos->donante);\n try {\n $inscripto->save();\n unset($inscripto);\n return TRUE;\n } catch (QueryException $e) {\n return json_encode($e);\n } \n }",
"function convert_to_utf8($obj)\n{\n global $config;\n $ret = $obj;\n // wenn die Verbindung zur Datenbank nicht auf utf8 steht, dann muessen die Rückgaben in utf8 gewandelt werden,\n // da die Webseite utf8-kodiert ist\n if (!isset($config['mysql_can_change_encoding'])) {\n get_sql_encodings();\n }\n\n if ($config['mysql_can_change_encoding'] == false && $config['mysql_standard_character_set'] != 'utf8') {\n if (is_array($obj)) {\n foreach ($obj as $key => $val) {\n //echo \"<br> Wandle \" . $val . \" nach \";\n $obj[$key] = utf8_encode($val);\n //echo $obj[$key];\n }\n }\n if (is_string($obj)) {\n $obj = utf8_encode($obj);\n }\n $ret = $obj;\n }\n\n return $ret;\n}",
"function insertarCajadiaria($fecha,$inicio,$fin) {\r\n$sql = \"insert into tbcajadiaria(idcajadiaria,fecha,inicio,fin)\r\nvalues ('','\".utf8_decode($fecha).\"',\".$inicio.\",\".($fin == '' ? 0 : $fin).\")\";\r\n$res = $this->query($sql,1);\r\nreturn $res;\r\n}",
"public static function sanearData($string){\n\n $string = trim($string);\n $string = self::unEspacio($string);\n $string = stripcslashes($string);\n $string = htmlspecialchars($string);\n\n $string = str_replace(\n array('á', 'à', 'ä', 'â', 'ª', 'Á', 'À', 'Â', 'Ä'),\n array('a', 'a', 'a', 'a', 'a', 'A', 'A', 'A', 'A'),\n $string\n );\n\n $string = str_replace(\n array('é', 'è', 'ë', 'ê', 'É', 'È', 'Ê', 'Ë'),\n array('e', 'e', 'e', 'e', 'E', 'E', 'E', 'E'),\n $string\n );\n\n $string = str_replace(\n array('í', 'ì', 'ï', 'î', 'Í', 'Ì', 'Ï', 'Î'),\n array('i', 'i', 'i', 'i', 'I', 'I', 'I', 'I'),\n $string\n );\n\n $string = str_replace(\n array('ó', 'ò', 'ö', 'ô', 'Ó', 'Ò', 'Ö', 'Ô'),\n array('o', 'o', 'o', 'o', 'O', 'O', 'O', 'O'),\n $string\n );\n\n $string = str_replace(\n array('ú', 'ù', 'ü', 'û', 'Ú', 'Ù', 'Û', 'Ü'),\n array('u', 'u', 'u', 'u', 'U', 'U', 'U', 'U'),\n $string\n );\n\n $string = str_replace(\n array('ñ', 'Ñ', 'ç', 'Ç'),\n array('n', 'N', 'c', 'C'),\n $string\n );\n\n //Esta parte se encarga de eliminar cualquier caracter extraño\n $string = str_replace(\n array(\"\\\\\", \"¨\", \"º\", \"~\",\"'\",\n \"#\", \"|\", \"!\", \"\\\"\",\n \"·\", \"$\", \"%\", \"&\",\n \"(\", \")\", \"?\", \"'\", \"¡\",\n \"¿\", \"[\", \"^\", \"`\", \"]\",\n \"+\", \"}\", \"{\", \"¨\", \"´\",\n \">\", \"< \", \";\", \",\", \":\",\"/\",\"*\"\n ),\n '',\n $string\n );\n return $string;\n }"
]
| [
"0.75292677",
"0.6107129",
"0.58831346",
"0.5664293",
"0.56318307",
"0.56116486",
"0.55424964",
"0.5515077",
"0.54831815",
"0.5479926",
"0.5436612",
"0.5416242",
"0.5401706",
"0.5398831",
"0.53975886",
"0.53917867",
"0.53881615",
"0.5341596",
"0.5331917",
"0.5321743",
"0.5305729",
"0.5303672",
"0.53033584",
"0.5297654",
"0.529659",
"0.52939487",
"0.5273274",
"0.5267868",
"0.5249591",
"0.52417964"
]
| 0.69077533 | 1 |
TODO $charset_remoto podria volverse opcional si pudiesemos detectar automaticamente el charset de $datos Espera que $datos este en formato $formato e intenta convertirlo a php. | function formatearEntrada($datos, $formato, $charset_local, $charset_remoto){
switch($formato){
case "application/php" :
$datos_php = unserialize(trim($datos));
if($charset_local != $charset_remoto){
$datos_php = convertir_charset_mix($datos_php, $charset_local, $charset_remoto);
}
return $datos_php;
case "text/xml":
/** La documentacion dice que XMLParser detecta automaticamente el encoding*/
$factory = new XMLFactory();
$xml_parser = $factory->getXMLToArrayInstance();
$datos_php = $xml_parser->toArray($datos);
if($charset_local != $charset_remoto){
$datos_php = convertir_charset_mix($datos_php, $charset_local, $charset_remoto);
}
//echo "Datos traidos en XML <pre>".print_r($datos_php, TRUE)."</pre>";
return $datos_php;
case "application/x-www-form-urlencoded":
parse_str($datos, $datos_php);
if($charset_local != $charset_remoto){
$datos_php = convertir_charset_mix($datos_php, $charset_remoto, $charset_local);
}
return $datos_php;
case "application/json" :
/**codificacion remota obligatoria: utf-8 o ASCII*/
//error_log("[".date("r")."] get datos".print_r($datos, TRUE)."\n",3,"error.log");
$datos_php = json_decode($datos, true);
//error_log("[".date("r")."] get datos".print_r($datos_php, TRUE)."\n",3,"error.log");
if($charset_local != $charset_remoto){
$datos_php = convertir_charset_mix($datos_php, $charset_local, $charset_remoto);
}
return $datos_php;
default:
return FALSE;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function formatearSalida($datos, $formato, $charset_remoto, $charset_local){\n\n switch($formato){\n\tcase \"application/php\" :\n\t\tif($charset_local != $charset_remoto){\n\t\t\t$datos = convertir_charset_mix($datos, $charset_remoto, $charset_local);\n \t\t} \n\t\treturn serialize($datos);\n\tcase \"text/xml\":\n\t\t//$datos = utf8_encode_mix($datos);\n\t\t$factory = new XMLFactory();\n\t\t$xml_parser = $factory->getArrayToXMLInstance();\n\t\t/*if($charset_local != \"utf-8\"){\n\t\t\t$datos = convertir_charset_mix($datos, \"utf-8\", $charset_local);\n\t\t}*/\n\t\tif($charset_local != $charset_remoto){\n\t\t\t$datos = convertir_charset_mix($datos, $charset_remoto, $charset_local);\n\t\t}\n\t\t$xml_parser->setCharsetSalida($charset_remoto);\n\t\t$datos_xml = $xml_parser->toXml($datos);\n\t\treturn $datos_xml;\n\tcase \"text/html\":\n\t\tif($charset_local != $charset_remoto){\n\t\t\t$datos = convertir_charset_mix($datos, $charset_remoto, $charset_local);\n \t\t}\n\t\treturn \"<pre>\".print_r($datos, TRUE).\"</pre>\";\n\tcase \"application/json\" :\n\t\t$charset_remoto = \"utf-8\";//obligatorio\n if($charset_local != $charset_remoto){\n $datos = convertir_charset_mix($datos, $charset_remoto, $charset_local);\n }\n return json_encode($datos);\n default:\n\t\treturn FALSE;\n }\n}",
"public function revisarFormato($archivo, $tipo_archivo)\n {\n\n\n Excel::selectSheetsByIndex(0)->load($archivo, function($reader) use ($tipo_archivo) {\n\n $reader->noHeading();\n\n $firstrow = $reader->first()->toArray();\n\n /*\n *Normalizando los nombres de las columnas (eliminamos acentos,espacios y Ñ)\n */\n $originales ='áéíóú ñ';\n $modificadas ='aeiou_n';\n\n for($i=0; $i < count($firstrow); $i++){\n $cadena = $firstrow[$i];\n $cadena = utf8_decode($cadena);\n $cadena = strtr($cadena, utf8_decode($originales), $modificadas);\n $cadena = strtolower($cadena);\n $firstrow[$i] = utf8_encode($cadena);\n }\n\n /*\n * Revisamos que el archivo tiene todas las columnas que se piden\n * y que sus nombres corresponden con los establecidos\n */\n\n switch($tipo_archivo)\n {\n case \"registros\":\n if (count($firstrow) >= 15) {\n if (($firstrow[0] == 'phylum') && ($firstrow[1] == 'clase') && (($firstrow[2] == 'subclase')\n && ($firstrow[3] == 'orden') && ($firstrow[4] == 'familia') && ($firstrow[5] == 'genero')\n && ($firstrow[6] == 'especie') && ($firstrow[7] == 'variedad') && ($firstrow[8]) == 'forma')\n && ($firstrow[9] == 'autor') && ($firstrow[10] == 'sinonimia') && ($firstrow[11] == 'cita')\n && ($firstrow[12] == 'entidad_federal') && ($firstrow[13] == 'localidad') && ($firstrow[14] == 'comentario')\n ) {\n $this->log = \"Archivo de Registros para el Catálogo con estructura correcta\";\n $this->error = false;\n } else {\n $this->log = \"NOMBRE de columnas inválidas\";\n $this->error = true;\n }\n } else {\n $this->log = \"NÚMERO de columnas inválidas\";\n $this->error = true;\n }\n break;\n\n\n case \"libros\":\n if (count($firstrow) >= 16) {\n if (($firstrow[0] == 'cita') && ($firstrow[1] == 'autores') && (($firstrow[2] == 'fecha')\n && ($firstrow[3] == 'titulo_libro') && ($firstrow[4] == 'edicion') && ($firstrow[5] == 'editorial')\n && ($firstrow[6] == 'lugar') && ($firstrow[7] == 'total_de_paginas') && ($firstrow[8]) == 'titulo_capitulo')\n && ($firstrow[9] == 'editor') && ($firstrow[10] == 'intervalo_de_paginas') && ($firstrow[11] == 'isbn')\n && ($firstrow[12] == 'doi') && ($firstrow[13] == 'enlace')&& ($firstrow[14] == 'archivo') && ($firstrow[15] == 'comentarios')\n ) {\n $this->log = 'Archivo de Referencias de Libros con estructura correcta';\n $this->error = false;\n } else {\n $this->log = \"NOMBRE de columnas inválidas\";\n $this->error = true;\n }\n } else {\n $this->log = \"NÚMERO de columnas inválidas\";\n $this->error = true;\n }\n break;\n\n\n case \"revistas\":\n if (count($firstrow) >= 14) {\n if (($firstrow[0] == 'cita') && ($firstrow[1] == 'autores') && (($firstrow[2] == 'fecha')\n && ($firstrow[3] == 'titulo') && ($firstrow[4] == 'nombre_revista') && ($firstrow[5] == 'volumen')\n && ($firstrow[6] == 'numero') && ($firstrow[7] == 'intervalo_de_paginas') && ($firstrow[8]) == 'isbn')\n && ($firstrow[9] == 'issn') && ($firstrow[10] == 'doi') && ($firstrow[11] == 'enlace')\n && ($firstrow[12] == 'archivo') && ($firstrow[13] == 'comentarios')\n ) {\n $this->log = 'Archivo de Referencias de Revistas con estructura correcta';\n $this->error = false;\n } else {\n $this->log = \"NOMBRE de columnas inválidas\";\n $this->error = true;\n }\n } else {\n $this->log = \"NÚMERO de columnas inválidas\";\n $this->error = true;\n }\n break;\n\n\n case \"trabajos\":\n if (count($firstrow) >= 11) {\n if (($firstrow[0] == 'tipo') && ($firstrow[1] == 'cita') && ($firstrow[2] == 'autores') && ($firstrow[3] == 'fecha')\n && ($firstrow[4] == 'titulo') && ($firstrow[5] == 'institucion') && ($firstrow[6] == 'lugar')\n && ($firstrow[7] == 'paginas') && ($firstrow[8] == 'enlace') && ($firstrow[9] == 'archivo') && ($firstrow[10] == 'comentarios')\n ) {\n $this->log = 'Archivo de Referencias de Revistas con estructura correcta';\n $this->error = false;\n } else {\n $this->log = \"NOMBRE de columnas inválidas\";\n $this->error = true;\n }\n } else {\n $this->log = \"NÚMERO de columnas inválidas\";\n $this->error = true;\n }\n break;\n\n case \"enlaces\":\n if (count($firstrow) >= 11) {\n if (($firstrow[0] == 'cita') && ($firstrow[1] == 'autores') && ($firstrow[2] == 'fecha') && ($firstrow[3] == 'nombre_pagina')\n && ($firstrow[4] == 'titulo') && ($firstrow[5] == 'institucion') && ($firstrow[6] == 'lugar')\n && ($firstrow[7] == 'direccion_web') && ($firstrow[8] == 'dia_consulta') && ($firstrow[9] == 'mes_consulta') && ($firstrow[10] == 'ano_consulta')\n ) {\n $this->log = 'Archivo de Referencias de Revistas con estructura correcta';\n $this->error = false;\n } else {\n $this->log = \"NOMBRE de columnas inválidas\";\n $this->error = true;\n }\n } else {\n $this->log = \"NÚMERO de columnas inválidas\";\n $this->error = true;\n }\n break;\n\n\n case \"coordenadas\":\n if (count($firstrow) >= 6) {\n if (($firstrow[0] == 'entidad') && ($firstrow[1] == 'localidad') && ($firstrow[2] == 'lugar') && ($firstrow[3] == 'sitio')\n && ($firstrow[4] == 'latitud') && ($firstrow[5] == 'longitud')\n ) {\n $this->log = 'Archivo de Coordenadas con estructura correcta';\n $this->error = false;\n } else {\n $this->log = \"NOMBRE de columnas inválidas\";\n $this->error = true;\n }\n } else {\n $this->log = \"NÚMERO de columnas inválidas\";\n $this->error = true;\n }\n break;\n\n default:\n $this->log = \"Error en el tipo de archivo\";\n $this->error = true;\n }\n\n\n\n\n\n });\n\n $respuesta = ['error' => $this->error, 'log' => $this->log];\n\n return $respuesta;\n }",
"function convert_data_encodings($known_utf8 = false)\n{\n global $VALID_ENCODING, $CONVERTED_ENCODING;\n $VALID_ENCODING = true;\n\n if ($CONVERTED_ENCODING) {\n return; // Already done it\n }\n\n if (preg_match('#^[\\x00-\\x7F]*$#', serialize($_POST) . serialize($_GET) . serialize($_FILES)) != 0) { // Simple case, all is ASCII\n $CONVERTED_ENCODING = true;\n return;\n }\n\n require_code('character_sets');\n _convert_data_encodings($known_utf8);\n}",
"function funConverteDataHora($data){\n\t//$data_americano = \"2009-04-29\";\n\t//$data_Brasileiro = \"29/04/2012\";\n\t//AGORA VAMOS EXPLODIR ELA PELOS HIFENS E SERÁ CRIADO UM ARRAY COM AS PARTES\n\t$partes_da_data = \"\";\n\t$hora = \"\";\n\t$partes_da_data = explode('/',$data);\n\t$hora = substr($partes_da_data[2],4,-1);\n\n //AGORA REMONTAMOS A DATA NO FORMATO BRASILEIRO, OU SEJA,\n\t//INVERTENDO AS POSICOES E COLOCANDO AS BARRAS\n\t$data = substr($partes_da_data[2],0,4).'-'.$partes_da_data[1].'-'.$partes_da_data[0];\n\n\t//UFA! PRONTINHO, AGORA TEMOS A DATA NO BOM E VELHO FORMATO BRASILEIRO\n\t//return \n\treturn $data.' '.$hora;\n}",
"protected function cargarDatos($datos)\n {\n $this->setIdposteo($datos['idposteo']);\n $this->setTextoPosteo($datos['texto_posteo']);\n $this->setFechaHora($datos['fecha_hora']);\n $this->setUsuarioIdusuario($datos['usuario_idusuario']);\n $this->setUsuario($datos['usuario_idusuario']);\n $this->setComentarios($datos['idposteo']);\n }",
"function extraeUsuario($sesion)\n{\n $link = conection(); \n \n $query = \"select * from Cliente where sesion like '$sesion'\";\n $result = mysqli_query($link, $query);\n $aPaterno = \"\";\n $aMaterno = \"\";\n \n $array = mysqli_fetch_assoc($result);\n $space = explode(\",\", $array[\"apellidosCl\"]);\n \n if(count($space) === 2)\n {\n $aMaterno = utf8_encode($space[1]);\n $aPaterno = utf8_encode($space[0]);\n }\n \n $parseUTF8 = [\"nombre\" => utf8_encode($array[\"nombreCl\"]), \"aPaterno\" => $aPaterno,\n \"aMaterno\" => $aMaterno, \"fNacimiento\" => utf8_encode($array[\"fn\"]),\n \"idCliente\" => $array[\"idCliente\"], \"idArchivo\" => $array[\"idArchivo\"],\n \"correo\" => utf8_encode($array[\"correo\"])];\n \n mysqli_close($link);\n return $parseUTF8;\n}",
"public function tratarDados($especificacoes, $valor, $posicao, $config, $identifica)\n {\n $util = new Util();\n $arquivoValidacao = new ArquivoValidacao();\n\n\n if ($especificacoes[1] == 'livre') {\n return $valor;\n }\n\n switch ($especificacoes[1]) {\n\n case 'doc':\n $valorFormatado = $util->somenteNumeros($valor);\n $arquivoValidacao->validaTamanhoNum($valorFormatado, $especificacoes[0], $posicao, $identifica);\n $valor = $util->adicionarZerosEsq($valorFormatado, $especificacoes[0]);\n break;\n\n case 'num':\n $valorFormatado = $util->somenteNumeros($valor);\n $arquivoValidacao->validaTamanhoNum($valorFormatado, $especificacoes[0], $posicao, $identifica);\n $valor = $util->adicionarZerosEsq($valorFormatado, $especificacoes[0]);\n break;\n\n case 'valor':\n $valor = $util->adicionarZerosEsq($util->trataValor($valor), $especificacoes[0]);\n\n $arquivoValidacao->validaTamanhoNum($valor, $especificacoes[0], $posicao, $identifica);\n break;\n\n case 'data-Ymd': case 'data-ymd': case 'data-dmY': case 'data-dmy':\n\n if (empty($valor)) {\n $valor = $util->adicionarZerosEsq('0', $especificacoes[0]);\n } else {\n\n $valorCru = $util->somenteNumeros($valor);\n\n if (strlen($valorCru) > 8) {\n $valorCru = substr($valorCru, 0, 8);\n }\n\n $arquivoValidacao->validaData($valorCru, $posicao, $especificacoes[0], $identifica);\n\n $partes = explode('-', $especificacoes[1]);\n\n $valor = (new \\DateTime($valor))->format($partes[1]);\n }\n\n break;\n\n default :\n $case = null;\n\n if (isset($config['case'])) {\n $case = strtolower($config['case']);\n }\n\n $valorPreparado = $util->preparaTexto($valor, $case);\n\n $valor = $util->adicionarEspacosDir($valorPreparado, $especificacoes[0]);\n break;\n }\n\n\n return $valor;\n }",
"function funConverteData($data){\n\t//$data_americano = \"2009-04-29\";\n\t//$data_Brasileiro = \"29/04/2012\";\n\t//AGORA VAMOS EXPLODIR ELA PELOS HIFENS E SERÁ CRIADO UM ARRAY COM AS PARTES\n\t$partes_da_data = explode('/',$data);\n\n\t//AGORA REMONTAMOS A DATA NO FORMATO BRASILEIRO, OU SEJA,\n\t//INVERTENDO AS POSICOES E COLOCANDO AS BARRAS\n\t$data = $partes_da_data[2].'-'.$partes_da_data[1].'-'.$partes_da_data[0];\n\n\t//UFA! PRONTINHO, AGORA TEMOS A DATA NO BOM E VELHO FORMATO BRASILEIRO\n\treturn $data;\n}",
"private function set_charset() {\n\t\t//regresa bool\n\t\t$this->conn->set_charset(\"utf8\");\n\t}",
"function to_charset($data, $to_charset = 'UTF-8', $from_charset = 'auto')\n{\n if (is_numeric($data)) {\n $float = (string) (float) $data;\n if (is_int($data)) {\n return (int) $data;\n } else if (is_float($data) || $data === $float) {\n return (float) $data;\n } else {\n return (int) $data;\n }\n } else if (is_string($data)) {\n return mb_convert_encoding($data, $to_charset, $from_charset);\n } else if (is_array($data)) {\n foreach ($data as $key => $value) {\n $data[$key] = to_charset($value, $to_charset, $from_charset);\n }\n } else if (is_object($data)) {\n foreach ($data as $key => $value) {\n $data->$key = to_charset($value, $to_charset, $from_charset);\n }\n }\n return $data;\n}",
"function filtrado($datos)\n{\n if (gettype($datos) == \"string\") {\n $datos = trim($datos); // Elimina espacios antes y después de los datos\n $datos = stripslashes($datos); // Elimina backslashes \\\n $datos = htmlspecialchars($datos); // Traduce caracteres especiales en entidades HTML\n }\n return $datos;\n}",
"public function guardarDatos($datos){\n \n $inscripto = new InscriptosPadronSisa();\n $inscripto->id = $this->convertirEnTexto($datos->id); \n $inscripto->codigosisa = $this->convertirEnTexto($datos->codigoSISA);\n $inscripto->identificadorenaper = $this->convertirEnTexto($datos->identificadoRenaper);\n $inscripto->padronsisa = $this->convertirEnTexto($datos->PadronSISA);\n $inscripto->tipodocumento = $this->convertirEnTexto($datos->tipoDocumento);\n $inscripto->nrodocumento = $this->convertirEnTexto($datos->nroDocumento);\n $inscripto->apellido = $this->convertirEnTexto($datos->apellido);\n $inscripto->nombre = $this->convertirEnTexto($datos->nombre);\n $inscripto->sexo = $this->convertirEnTexto($datos->sexo);\n $inscripto->fechanacimiento = $this->convertirEnTexto($datos->fechaNacimiento);\n $inscripto->estadocivil = $this->convertirEnTexto($datos->estadoCivil);\n $inscripto->provincia = $this->convertirEnTexto($datos->provincia);\n $inscripto->departamento = $this->convertirEnTexto($datos->departamento);\n $inscripto->localidad = $this->convertirEnTexto($datos->localidad);\n $inscripto->domicilio = $this->convertirEnTexto($datos->domicilio);\n $inscripto->pisodpto = $this->convertirEnTexto($datos->pisoDpto);\n $inscripto->codigopostal = $this->convertirEnTexto($datos->codigoPostal);\n $inscripto->paisnacimiento = $this->convertirEnTexto($datos->paisNacimiento);\n $inscripto->provincianacimiento = $this->convertirEnTexto($datos->provinciaNacimiento);\n $inscripto->localidadnacimiento = $this->convertirEnTexto($datos->localidadNacimiento);\n $inscripto->nacionalidad = $this->convertirEnTexto($datos->nacionalidad);\n $inscripto->fallecido = $this->convertirEnTexto($datos->fallecido);\n $inscripto->fechafallecido = $this->convertirEnTexto($datos->fechaFallecido);\n $inscripto->donante = $this->convertirEnTexto($datos->donante);\n try {\n $inscripto->save();\n unset($inscripto);\n return TRUE;\n } catch (QueryException $e) {\n return json_encode($e);\n } \n }",
"function extraeTipo($idTipo)\n{\n $link = conection();\n \n $query = \"select * from Tipo_Raza where idTipo = '$idTipo'\";\n $result = mysqli_query($link, $query);\n \n $array = mysqli_fetch_assoc($result);\n \n $parseUTF8 = [\"idTipo\" => $array[\"idTipo\"],\n \"tamano\" => utf8_encode($array[\"tamano\"])];\n \n mysqli_close($link);\n return $parseUTF8;\n}",
"function exportDatosInscritos()\n{\n global $mysqli;\n $query = new Query($mysqli, \"SELECT apellido,nombre,provincia,clave,tomo,folio,bach,ao_grad,sexo,col_proc,cod_col,mes_n,dia_n,ao_n,tipoc,provi,distri,corregi,mes_i,dia_i,ao_i,ao_lectivo,sede,fac_ia,esc_ia,car_ia,car_ia,car_iia,car_iiia, fac_iia, fac_iiia, telefono, CONCAT(dia_n,'/',DATE_FORMAT(STR_TO_DATE(mes_n,'%b'), '%m') , '/' , DATE_FORMAT(STR_TO_DATE(ao_n,'%Y'), '%Y')) as fecha_n ,CONCAT(dia_i,'/',DATE_FORMAT(STR_TO_DATE(mes_n,'%b'), '%m'),'/',DATE_FORMAT(STR_TO_DATE(ao_i,'%Y'), '%Y')) as fecha_i, n_ins, d from inscritos2017 LIMIT 1000\");\n $data = $query->getresults();\n if (isset($data[0])) {\n return $data;\n } else {\n return null;\n }\n\n}",
"public function buscarDatosDeCodigo($lote, $suc){\n $db = new My();\n $my = new My();\n $datos = array();\n $query = \"SELECT a.codigo AS Codigo,l.lote,CONCAT( a.descrip, '-', p.nombre_color) AS Descrip , s.suc, s.cantidad AS Stock, s.estado_venta,a.um AS UM,l.ancho AS Ancho,l.gramaje AS Gramaje,l.tara AS Tara,l.padre AS Padre,s.ubicacion AS U_ubic,\n l.img AS Img, l.kg_desc AS U_kg_desc,h.fecha_hora AS entDate\n\n FROM articulos a INNER JOIN lotes l ON a.codigo = l.codigo INNER JOIN stock s ON l.codigo = s.codigo AND l.lote = s.lote \n INNER JOIN pantone p ON l.pantone = p.pantone INNER JOIN historial h ON l.codigo = h.codigo AND l.lote = h.lote\n WHERE s.cantidad > 0 AND s.suc = '$suc' AND l.lote ='$lote' GROUP BY lote ORDER BY h.fecha_hora ASC LIMIT 1\";\n \n $my->Query($query);\n if($my->NextRecord()){\n $datos = $my->Record;\n if(count($datos)){\n $datos = array_map(\"utf8_encode\",$datos);\n // print_r($datos);\n \n $rem = \"SELECT CONCAT(fecha_cierre,' ',hora_cierre) AS fecha_ingreso FROM nota_remision n, nota_rem_det d WHERE n.n_nro = d.n_nro AND lote = '$lote' AND n.estado = 'Cerrada' AND n.suc_d = '$suc'\";\n \n $db->Query($rem);\n if($db->NumRows() > 0){ \n $db->NextRecord();\n $fecha_ingreso = $db->Record['fecha_ingreso'];\n $datos['entDate'] = $fecha_ingreso;\n }\n // Buscar si esta en una Remision Abierta o En Proceso\n $rem2 = \"SELECT n.n_nro, n.suc_d FROM nota_remision n, nota_rem_det d WHERE n.n_nro = d.n_nro AND lote = '$lote' AND n.estado != 'Cerrada' AND n.suc = '$suc'\";\n \n $db->Query($rem2);\n if($db->NumRows() > 0){ \n $db->NextRecord();\n $n_nro = $db->Record['n_nro'];\n $destino = $db->Record['suc_d'];\n $datos['NroRemision'] = $n_nro;\n $datos['Destino'] = $destino;\n $datos['Mensaje']=\"En Remision\";\n }else{\n $datos['Mensaje']=\"Ok\"; \n }\n \n }\n echo json_encode($datos);\n }else{\n echo '{\"Mensaje\":\"Error: Codigo no encontrado!\"}';\n } \n $my->Close();\n }",
"function extraeArchivo($idArchivo)\n{\n $link = conection();\n \n $query = \"select * from Archivo where idArchivo = '$idArchivo'\";\n $result = mysqli_query($link, $query);\n \n $array = mysqli_fetch_assoc($result);\n \n $parseUTF8 = [\"idArchivo\" => $array[\"idArchivo\"],\n \"foto\" => utf8_encode($array[\"foto\"])];\n \n mysqli_close($link);\n \n return $parseUTF8;\n}",
"public function CapturaCalificacionDescargar()\n {\n $dbmi = $this->get(\"db_manager\");\n $dbm = new DbmControlescolar($dbmi->getEntityManager());\n $content = trim(file_get_contents(\"php://input\"));\n $decoded = json_decode($content, true);\n //$dataRaw=json_decode('',true);\n //*\n $decoded[\"showAsistencias\"] = ($decoded[\"showAsistencias\"] == true ? \"true\" : \"false\");\n $dataRaw = self::CCCapturaCalificacionGrupoProcess($dbmi, $decoded);\n $dataarray = &$dataRaw[2];\n $dataarray[\"arraydato\"] = $dataarray[\"arraydato\"][0];\n\n $ultimoperiodo = $dataarray[\"ultimoperiodo\"];\n $conjuntope = $ultimoperiodo->getConjuntoperiodoevaluacionid();\n $ciclo = $conjuntope->getCicloid();\n\n $arraymateria = $dataarray[\"arraymateria\"];\n $planestudio = $arraymateria->getPlanestudioid();\n $grado = $planestudio->getGradoid();\n $nivel = $grado->getNivelid();\n\n $omateria = $arraymateria->getMateriaid();\n $omateriaid = $omateria->getMateriaid();\n $omaterianame = $omateria->getNombre();\n\n $arraydato = &$dataarray[\"arraydato\"];\n $arraydato[\"ciclo\"] = $ciclo->getNombre();\n $arraydato[\"nivel\"] = $nivel->getNombre();\n $arraydato[\"grado\"] = $grado->getGrado();\n $arraydato[\"planestudio\"] = $planestudio->getNombre();\n unset($dataarray[\"arraymateria\"]);\n unset($dataarray[\"ultimoperiodo\"]);\n //echo json_encode($dataRaw);exit;\n //*/\n list($status, $code, $data) = $dataRaw;\n $header = $data[\"arraydato\"];\n $alumnos = $data[\"arrayalumno\"];\n $jtable = [];\n\n foreach ($alumnos as $ialumno) {\n $ialumnonum = \"\" . $ialumno['numerolista'];\n $ialumnoname = $ialumno['nombre'];\n $irowname = $ialumnonum . \" - \" . $ialumnoname;\n $iacalperiodo = $ialumno['calificacionperiodo'][0];\n $iscoreperiodo = $iacalperiodo['calificacionperiodo'];\n $iscoreaperiodo = $iacalperiodo['calificacionantesredondeo'];\n $iscoreperiodof = $iacalperiodo['calificacionfinal'];\n $iponderacionraw = $iacalperiodo['opcionperiodo']; //Ponderacion periodo\n $iponderacionfraw = $iacalperiodo['opcionfinal']; //Ponderacion final\n\n $iaponderacionraw = (!$iponderacionraw || is_array($iponderacionraw) || empty($iponderacionraw)\n ? null : $dbm->getPonderacionopcionById($iponderacionraw));\n $iaponderacionfraw = (!$iponderacionfraw || is_array($iponderacionfraw) || empty($iponderacionfraw)\n ? null : $dbm->getPonderacionopcionById($iponderacionfraw));\n\n $iaponderacion = ($iaponderacionraw ? $iaponderacionraw['opcion'] : null);\n $iaponderacionf = ($iaponderacionfraw ? $iaponderacionfraw['opcion'] : null);\n\n $isubmaterias = (isset($ialumno['submaterias']) && !empty($ialumno['submaterias'])\n ? $ialumno['submaterias'] : null);\n $imaterias = $isubmaterias;\n if (!$isubmaterias) {\n $ialumno['materiaid'] = $omateriaid;\n $ialumno['nombre'] = $omaterianame;\n $imaterias = [$ialumno];\n }\n $imi = 0;\n foreach ($imaterias as $imateria) {\n $imaterianame = $imateria[\"nombre\"];\n $irow1name = $imaterianame; //($isubmaterias ? $imaterianame : \"\");\n $jtable[] = $this->buildJTableCell(\"Matrícula\", $irowname, $irow1name, $ialumno['matricula']);\n $icriterios = $imateria['criterios'];\n $imcalperiodo = $imateria['calificacionperiodo'][0];\n foreach ($icriterios as $icriterio) {\n $icapturas = $icriterio['calificacioncaptura'];\n $icriterioname = $icriterio['aspecto'];\n $icriteriodata = $icriterio['porcentajecalificacion'] . \"% 0 a \" . $icriterio['puntajemaximo'];\n $totalCapturas = 0;\n foreach ($icapturas as $icaptura) {\n $totalCapturas = $totalCapturas + $icaptura['calificacion'];\n $jtable[] = $this->buildJTableCell($icriterioname, $irowname, $irow1name, $icaptura['calificacion'], $icriteriodata, \"\" . $icaptura['numerocaptura']);\n }\n\n $jtable[] = $this->buildJTableCell(\"Promedio \" . $icriterioname, $irowname, $irow1name, ($totalCapturas/count($icapturas)), \"\", \"\");\n $jtable[] = $this->buildJTableCell(\"Porcentaje \" . $icriterioname, $irowname, $irow1name, ((($totalCapturas/count($icapturas))*$icriterio['porcentajecalificacion'])/$icriterio['puntajemaximo']), \"\", \"\");\n }\n $imponderacionraw = $imcalperiodo['opcionperiodo'];\n $imaponderacionraw = (!$imponderacionraw || is_array($imponderacionraw) || empty($imponderacionraw)\n ? null : $dbm->getPonderacionopcionById($imponderacionraw));\n $imaponderacion = ($imaponderacionraw ? $imaponderacionraw['opcion'] : null);\n $iobservacion = (!isset($imcalperiodo['observacion']) || empty(trim($imcalperiodo['observacion']))\n ? null : trim($imcalperiodo['observacion']));\n if ($iobservacion) {\n $jtable[] = $this->buildJTableCell(\"Observaciones\", $irowname, $irow1name, $iobservacion);\n }\n if ($imaponderacion && $isubmaterias) {\n $jtable[] = $this->buildJTableCell(\"Evaluacion\", $irowname, $irow1name, $imaponderacion);\n }\n if($iscoreaperiodo){\n $jtable[] = $this->buildJTableCell(\"Calificación antes de redondeo\", $irowname, $irow1name, $iscoreaperiodo);\n }\n if ($iscoreperiodo) {\n $jtable[] = $this->buildJTableCell(\"Calificación periodo\", $irowname, $irow1name, $iscoreperiodo);\n }\n if ($iaponderacion) {\n $jtable[] = $this->buildJTableCell(\"Ponderacion periodo\", $irowname, $irow1name, $iaponderacion);\n }\n if ($iscoreperiodof && ENTORNO == 1) {\n $jtable[] = $this->buildJTableCell(\"Calificación final\", $irowname, $irow1name, $iscoreperiodof);\n }\n if ($iaponderacionf) {\n $jtable[] = $this->buildJTableCell(\"Ponderacion final\", $irowname, $irow1name, $iaponderacionf);\n }\n \n if($imateria[\"totalfaltas\"]){\n $jtable[] = $this->buildJTableCell(\"Faltas\", $irowname, $irow1name, $imateria[\"totalfaltas\"]);\n }else{\n if($imi == 0){\n $jtable[] = $this->buildJTableCell(\"Faltas\", $irowname, $irow1name, $ialumno[\"totalfaltas\"]);\n }\n \n }\n $imi++;\n }\n\n }\n $result = [\n \"header\" => $header,\n \"score\" => $jtable\n ];\n //echo json_encode($result);exit;\n\n\n $done = false;\n $name = \"R\" . rand();\n $report = \"ReporteCalificacionesDetalle\";\n $input = $output = \"ReporteCalificacionesDetalle_$name\";\n\n $pdf = new LDPDF($this->container, $report, $output, array('driver' => 'jsonql', 'jsonql_query' => '\"\"', 'data_file' => $input), [], ['xlsx']);\n $inputPath = $pdf->fdb_r;\n $outputPath = $pdf->output_r;\n\n $resultenc = json_encode($result);\n $file = LDPDF::fileRead($inputPath);\n LDPDF::fileWrite($file, $resultenc);\n LDPDF::fileClose($file);\n $toremove = [$inputPath];\n\n if (!$pdf->execute()) {\n $toremove[] = $outputPath;\n $done = true;\n }\n\n $reporteSize = filesize($outputPath);\n $reporte = file_get_contents($outputPath);\n foreach ($toremove as $i) {\n LDPDF::fileDelete($i);\n }\n return ($done ? new Response($reporte, 200, array(\n 'Content-Type' => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet; charset=utf-8',\n 'Content-Length' => $reporteSize\n )) : Api::Error(Response::HTTP_PARTIAL_CONTENT, \"La impresion no esta disponible.\"));\n }",
"function formatear_fecha($parametro){\n\n\t\t/* Declaro variables personalizadas para que queden claros los datos */\n\t\t$hora = substr($parametro, 11, 2);\n\t\t$minuto = substr($parametro, 14, 2);\n\t\t$dia = substr($parametro, 8, 2);\n\t\t$mes = substr($parametro, 5, 2);\n\t\t$anno = substr($parametro, 0, 4);\n\n\t\t/* Generamos el formato */\n\t\t$temp = $dia.\"/\".$mes.\"/\".$anno.\" (\".$hora.\":\".$minuto.\")\";\n\t\t\n\t\treturn $temp;\n\t}",
"function extraeEmpleado()\n{\n $link = conection();\n $parseUTF8 = array();\n $contador = null;\n $aMaterno = null;\n $aPaterno = null;\n \n $query = \"select * from Empleado\";\n $result = mysqli_query($link, $query);\n \n $array = mysqli_num_rows($result); \n \n if($array > 0)\n {\n while ($rows = mysqli_fetch_assoc($result)) \n {\n $contador ++;\n\n $space = explode(\",\", $rows[\"apellidosEm\"]);\n\n if (count($space) === 2) \n {\n $aMaterno = utf8_encode($space[1]);\n $aPaterno = utf8_encode($space[0]);\n }\n\n $parseUTF8[$contador] = [\"idEmpleado\" => $rows[\"idEmpleado\"], \"nombreEm\" => utf8_encode($rows[\"nombreEm\"]),\n \"aPaterno\" => $aPaterno, \"aMaterno\" => $aMaterno,\n \"telefonoEm\" => utf8_encode($rows[\"telefonoEm\"]), \"idRol\" => $rows[\"idRol\"],\n \"idArchivo\" => $rows[\"idArchivo\"]];\n }\n }\n mysqli_close($link);\n return $parseUTF8;\n}",
"protected function getCharsetConversion() {}",
"function MTD_RECIBIR_DATOS_DB ($vp_arreglo_datos)\n {\n \t \t \t\t \t\t \n }",
"function filtrado($datos) {\n $datos = trim($datos); // Elimina espacios antes y después de los datos\n $datos = stripslashes($datos); // Elimina backslashes \\\n $datos = htmlspecialchars($datos); // Traduce caracteres especiales en entidades HTML\n return $datos;\n}",
"public function getDados() {\n\n $oDadosMatricula = new stdClass();\n $iCodigoMatricula = $this->oMatricula->getCodigo();\n $iCodigoAluno = $this->oMatricula->getAluno()->getCodigoAluno();\n $iCodigoTurma = $this->oMatricula->getTurma()->getCodigo();\n $iCodigoEnsino = $this->oMatricula->getTurma()->getBaseCurricular()->getCurso()\n ->getEnsino()->getCodigo();\n $oDadosMatricula->codigo_matricula = $this->oMatricula->getMatricula();\n $oDadosMatricula->data_matricula = $this->oMatricula->getDataMatricula()->convertTo(DBDate::DATA_EN);\n $oDadosMatricula->situacao_matricula = utf8_encode($this->oMatricula->getSituacao());\n if ($this->oMatricula->getTipo() == 'R' && $this->oMatricula->getSituacao() == 'MATRICULADO') {\n $oDadosMatricula->situacao_matricula = utf8_encode(\"REMATRICULADO\");\n }\n if ($this->oMatricula->isConcluida()) {\n $oDadosMatricula->situacao_matricula .= \" (\".utf8_encode(\"CONCLUÍDA\").\")\";\n }\n $oDadosMatricula->etapa_matricula = utf8_encode($this->oMatricula->getEtapaDeOrigem()->getNome());\n $oDadosMatricula->turma_matricula = utf8_encode($this->oMatricula->getTurma()->getDescricao());\n $oDadosMatricula->turma_turno = utf8_encode($this->oMatricula->getTurma()->getTurno()->getDescricao());\n $oDadosMatricula->turma_calendario = utf8_encode($this->oMatricula->getTurma()->getCalendario()->getDescricao());\n $oDadosMatricula->turma_escola = utf8_encode($this->oMatricula->getTurma()->getEscola()->getNome());\n $oDadosMatricula->data_saida = '';\n if ($this->oMatricula->getDataEncerramento() != \"\") {\n $oDadosMatricula->data_saida = $this->oMatricula->getDataEncerramento()->convertTo(DBDate::DATA_EN);\n }\n\n\n $oDadosMatricula->periodos_etapa = $this->getPeridosEtapa();\n $oDadosMatricula->grade_aproveitamento = $this->getGradeAproveitamento();\n $oDadosMatricula->resultado_final_etapa = utf8_encode(ResultadoFinal($iCodigoMatricula,\n $iCodigoAluno,\n $iCodigoTurma,\n $this->oMatricula->getSituacao(),\n $this->oMatricula->isConcluida()?'S':'N',\n $iCodigoEnsino\n ));\n $oDadosMatricula->atividades_complementares = $this->getAtividadesComplementares();\n return $oDadosMatricula;\n }",
"function procesar_cambio ($datos){\n //validamos que no exista otro periodo, para ello tomamos la fecha actual y obtenemos todos los periodo \n //que existen con sus respectivos dias y verificamos que el espacio que se quiere cargar no este ocupado en esos \n //dias\n \n }",
"public function ConsultarCambioEstados($param) {\n extract($param);\n $resultado = array();\n $registro = array();\n $sql = \"CALL SPCONSULTARCARGAMASIVACE($tipodocumento,$busqueda);\";\n $rs=null;\n $conexion->getPDO()->query(\"SET NAMES 'utf8'\");\n $host= $_SERVER[\"HTTP_HOST\"];\n if ($rs = $conexion->getPDO()->query($sql)) {\n if ($filas = $rs->fetchAll(PDO::FETCH_ASSOC)) {\n foreach ($filas as $fila) {\n foreach ($fila as $key => $value) {\n $ruta= \"<a href='/\".$fila['Ruta'].\"'>Descargar Archivo</a>\";\n array_push($registro, $fila['TipoIdentificacion'],$fila['NumeroIdentificacion'],$fila['Nombres'],$fila['Fecha'],$fila['EstadoAnterior'],$fila['EstadoNuevo'],$fila['TipoArchivo'], $ruta ,$value);\n \n array_push($registro, $value);\n }\n array_push($resultado, $registro);\n $registro = array();\n }\n }\n } else {\n $registro = 0;\n }\n echo json_encode($resultado);\n }",
"function extraeTipos()\n{\n $link = conection();\n $parseUTF8 = array();\n $contador = null;\n \n $query = \"select * from Tipo_Raza\";\n $result = mysqli_query($link, $query);\n \n $array = mysqli_num_rows($result);\n \n if($array > 0)\n {\n while ($rows = mysqli_fetch_assoc($result))\n {\n $contador ++;\n \n $parseUTF8 [$contador] = [\"idTipo\" => $rows[\"idTipo\"],\n \"tamano\" => utf8_encode($rows[\"tamano\"])];\n }\n }\n \n mysqli_close($link);\n \n return $parseUTF8;\n}",
"function formatear_fecha_mes($parametro){\n\n\t\t/* Declaro variables personalizadas para que queden claros los datos */\n\t\t$mes = substr($parametro, 5, 2);\n\t\t$anno = substr($parametro, 0, 4);\n\t\tswitch($mes){\n\t\t\tcase 1: $mes = \"Enero\"; break;;\n\t\t\tcase 2: $mes = \"Febrero\"; break;;\n\t\t\tcase 3: $mes = \"Marzo\"; break;;\n\t\t\tcase 4: $mes = \"Abril\"; break;;\n\t\t\tcase 5: $mes = \"Mayo\"; break;;\n\t\t\tcase 6: $mes = \"Junio\"; break;;\n\t\t\tcase 7: $mes = \"Julio\"; break;;\n\t\t\tcase 8: $mes = \"Agosto\"; break;;\n\t\t\tcase 9: $mes = \"Septiembre\"; break;;\n\t\t\tcase 10: $mes = \"Octubre\"; break;;\n\t\t\tcase 11: $mes = \"Noviembre\"; break;;\n\t\t\tcase 12: $mes = \"Diciembre\"; break;;\n\t\t\tcase 13: $mes = \"Enero\"; $anno = $anno+1; break;;\n\t\t\tcase 14: $mes = \"Febrero\"; $anno = $anno+1; break;;\n\t\t\t\n\t\t}\n\t\t\n\t\t/* Generamos el formato */\n\t\t$temp = $mes.\" de \".$anno;\n\t\t\n\t\treturn $temp;\n\t}",
"public function juego(array $datos=array()) {\r\n \r\n if(isset($_GET['p3'])){\r\n //$articulo_nombre = str_replace(\"-\", \" \", $_GET['p4']);\r\n //$articulo_nombre = mysql_escape_string($articulo_nombre);\r\n //printf(\"Escaped string: %s\\n\", $articulo_nombre);\r\n //print $articulo_nombre;\r\n //$clausulas['where'] = \" nombre like '%$articulo_nombre%' \";\r\n $clausulas['where'] = \" id like '%{$_GET['p3']}%' \";\r\n }\r\n if ( ! $filas = \\modelos\\Datos_SQL::select( $clausulas, self::$tabla)) {\r\n $datos['mensaje'] = 'El articulo seleccionado no se encuentra en nuestro catálogo de productos';\r\n \\core\\Distribuidor::cargar_controlador('mensajes', 'mensaje', $datos);\r\n return;\r\n }else{ \r\n $datos['articulo'] = $filas[0];\r\n \r\n //Usando articulo_id como FK\r\n $articulo_id = $filas[0]['id'];\r\n $clausulas['where'] = \" articulo_id like '%$articulo_id%' \";\r\n $clausulas['order_by'] = 'fecha_comentario desc';\r\n $datos[\"comentarios\"] = \\modelos\\Modelo_SQL::table(self::$tabla2)->select($clausulas);\r\n \r\n //Usando articulo_nombre como FK\r\n// $clausulas['where'] = \" articulo_nombre like '%$articulo_nombre%' \";\r\n// $clausulas['order_by'] = 'fecha_comentario desc';\r\n// $datos[\"comentarios\"] = \\modelos\\Modelo_SQL::table(self::$tabla2)->select($clausulas);\r\n }\r\n \r\n //Mostramos los datos a modificar en formato europeo. Convertimos el formato de MySQL a europeo para su visualización\r\n self::convertir_formato_mysql_a_ususario($datos['articulo']);\r\n self::convertir_formato_mysql_a_ususario($datos['comentarios']);\r\n\r\n $datos['view_content'] = \\core\\Vista::generar(__FUNCTION__, $datos);\r\n $http_body = \\core\\Vista_Plantilla::generar('DEFAULT', $datos);\r\n \\core\\HTTP_Respuesta::enviar($http_body);\r\n\r\n }",
"function extraeServicio()\n{\n $link = conection();\n $parseUTF8 = array();\n $contador = null;\n \n $query = \"select * from Servicio\";\n $result = mysqli_query($link, $query);\n \n $array = mysqli_num_rows($result); \n \n if($array > 0)\n {\n while ($rows = mysqli_fetch_assoc($result))\n {\n $contador ++;\n \n $parseUTF8[$contador] = [\"idServicio\" => $rows[\"idServicio\"], \"nombreSe\" => strtoupper(utf8_encode($rows[\"nombreSe\"])),\n \"costoSe\" => utf8_decode($rows[\"costoSe\"]),\"descripcion\" => strtoupper(utf8_encode($rows[\"descripcion\"]))];\n }\n }\n \n return $parseUTF8;\n}",
"function insertarCajadiaria($fecha,$inicio,$fin) {\r\n$sql = \"insert into tbcajadiaria(idcajadiaria,fecha,inicio,fin)\r\nvalues ('','\".utf8_decode($fecha).\"',\".$inicio.\",\".($fin == '' ? 0 : $fin).\")\";\r\n$res = $this->query($sql,1);\r\nreturn $res;\r\n}"
]
| [
"0.69566005",
"0.58332425",
"0.5765321",
"0.56932706",
"0.56637764",
"0.56604564",
"0.56287706",
"0.55785847",
"0.556895",
"0.54836196",
"0.54818404",
"0.5448594",
"0.5428814",
"0.54053783",
"0.53852713",
"0.53700095",
"0.53395414",
"0.532923",
"0.5308344",
"0.5294057",
"0.5287854",
"0.5277492",
"0.5272302",
"0.52651274",
"0.52637625",
"0.52451175",
"0.52431357",
"0.5225422",
"0.5223734",
"0.520815"
]
| 0.7636499 | 0 |
Configures the application representative | protected function _configureApplication()
{
$this->getApplication()
->setRequest(\App\Factory::createRequest())
->setRouter(\App\Factory::createRouter())
->setDispatcher(\App\Factory::createDispatcher())
;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"abstract public function configure();",
"protected function configure()\n {\n $this->setName('appconfig')\n ->setDescription('Create appserver.io Config')\n ->addArgument('application-name', InputOption::VALUE_REQUIRED, 'config application name')\n ->addArgument('namespace', InputOption::VALUE_REQUIRED, 'namespace for the project')\n ->addArgument('directory', InputOption::VALUE_REQUIRED, 'webapps root directory')\n ->addOption('routlt-version', 'rl', InputOption::VALUE_OPTIONAL, 'the routlt version to use', '~2.0');\n }",
"public function configure();",
"public function configure() {\r\n\t\r\n\t}",
"abstract protected function configure();",
"abstract protected function configure();",
"public function configure() {}",
"public function configure() {}",
"public function configure() {\n\t\t}",
"function configure() {\n // * You can add a layout, a layout is just a .phtml file that represents\n // the site template.\n Yasc_App::config()->setLayoutScript(dirname(__FILE__) . \"/layouts/default.phtml\");\n \n // * If you want to use a stream wrapper to convert markup of mostly-PHP \n // templates into PHP prior to include(), seems like is a little bit slow,\n // so by default is off.\n // ->setViewStream(true);\n // \n // * You can add more than one folder to store views, each view script\n // is a .phtml file.\n // ->addViewsPath(dirname(__FILE__) . \"/extra_views\");\n // \n // * You can add more than one path of view helpers and set a\n // class prefix for the path added.\n // ->addViewHelpersPath(dirname(__FILE__) . \"/../library/My/View/Helper\", \"My_View_Helper\");\n // \n // or if you don't want a class prefix just leave it blank.\n // ->addViewHelpersPath(dirname(__FILE__) . \"/extra_views/helpers\");\n //\n // * Function helpers, second argument is a prefix class.\n // ->addFunctionHelpersPath(dirname(__FILE__) . \"/extra_function_helpers\");\n // \n // * Add models folder, second argument is a prefix class.\n // ->addModelsPath(dirname(__FILE__) . \"/models\");\n // ->addModelsPath(dirname(__FILE__) . \"/extra_models/My/Model\", \"My_Model\");\n // \n // * Add extra options to the configuration object, like some $mysql connection \n // resource or a global flag, etc.\n // ->addOption(\"db\", $mysql);\n}",
"protected function configure()\n\t{\n\t\t// $this->addArguments(array(\n\t\t// new sfCommandArgument('my_arg', sfCommandArgument::REQUIRED, 'My argument'),\n\t\t// ));\n\n\t\t$this->addOptions(array(\n\t\t\t\tnew sfCommandOption('application', null, sfCommandOption::PARAMETER_REQUIRED, 'The application name'),\n\t\t\t\tnew sfCommandOption('env', null, sfCommandOption::PARAMETER_REQUIRED, 'The environment', 'dev'),\n\t\t\t\tnew sfCommandOption('connection', null, sfCommandOption::PARAMETER_REQUIRED, 'The connection name', 'doctrine'),\n\t\t\t\t// add your own options here\n\t\t));\n\n\t\t$this->namespace = 'import_translation';\n\t\t$this->name = 'iceland_classifications_sectors';\n\t\t\n// \t\t$this->setCountryId(151);\n\t\t$this->setLang(\"en\");\n\n\t}",
"protected function configure()\n {\n $this\n ->setName('config:open')\n ->setDescription('Opens the config')\n ->configureGlobal();\n }",
"protected function configure()\n {\n $this->setName(static::NAME);\n $this->setDescription(static::DESCRIPTION);\n foreach (static::ARGUMENTS as $argment) {\n $this->addArgument(...$argment);\n }\n foreach (static::OPTIONS as $option) {\n $this->addOption(...$option);\n }\n $this->setHelperSet(new HelperSet([new QuestionHelper()]));\n }",
"protected function configureApplication(Application $app)\n {\n //\n }",
"public function __construct()\n {\n $this->params['config'] = config('app');\n }",
"protected function configure()\n {\n // $this->addArguments(array(\n // new sfCommandArgument('my_arg', sfCommandArgument::REQUIRED, 'My argument'),\n // ));\n\n $this->addOptions(array(\n new sfCommandOption('application', null, sfCommandOption::PARAMETER_REQUIRED, 'The application name', 'declarvin'),\n new sfCommandOption('env', null, sfCommandOption::PARAMETER_REQUIRED, 'The environment', 'dev'),\n new sfCommandOption('connection', null, sfCommandOption::PARAMETER_REQUIRED, 'The connection name', 'default'),\n // add your own options here\n ));\n\n $this->namespace = 'debug';\n $this->name = 'DRM';\n $this->briefDescription = '';\n $this->detailedDescription = <<<EOF\n\nEOF;\n }",
"public function config()\n {\n }",
"protected function configure()\n {\n $this->mergeConfigFrom(\n __DIR__ . '/../config/dashkit.php', 'dashkit'\n );\n }",
"public function cfg_setup()\n\t{\n\t\t$this->cfg = AppConfig::get()[\"app\"];\n\t\t$this->cfg[\"app_name\"] = $this->cfg[\"name\"];\n\n\t}",
"protected function configure()\n {\n $this->addArgument(\n 'environment', InputArgument::REQUIRED | InputArgument::OPTIONAL, 'What environment to run the script in',\n 'production'\n );\n $this->_httpClient = new Client();\n }",
"public function configure(\\Silex\\Application $application);",
"protected function configure()\n {\n // $this->addArguments(array(\n // new sfCommandArgument('my_arg', sfCommandArgument::REQUIRED, 'My argument'),\n // ));\n\n $this->addOptions(array(\n new sfCommandOption('application', null, sfCommandOption::PARAMETER_REQUIRED, 'The application name', 'recording'),\n new sfCommandOption('env', null, sfCommandOption::PARAMETER_REQUIRED, 'The environment', 'dev'),\n new sfCommandOption('connection', null, sfCommandOption::PARAMETER_REQUIRED, 'The connection name', 'propel'),\n // add your own options here\n ));\n\n $this->namespace = 'recording';\n $this->name = 'sitemap';\n $this->briefDescription = 'Generates an XML sitemap';\n $this->detailedDescription = <<<EOF\nThis will generate an XML sitemap for the site:\n\n [php symfony sitemap|INFO]\nEOF;\n }",
"protected function configure()\n {\n }",
"protected function configure()\n {\n }",
"protected function configure()\n {\n $this->setName('configure')\n ->setDescription('Configure application and add necessary configs')\n ->addOption('cache_dir', 'd', InputOption::VALUE_OPTIONAL, 'Path to cache directory')\n\n ->addOption('chronos_url', 'u', InputOption::VALUE_OPTIONAL, 'The chronos url (inclusive port)', '')\n ->addOption('chronos_http_username', 'un', InputOption::VALUE_OPTIONAL, 'The chronos username (HTTP credentials)', '')\n ->addOption('chronos_http_password', 'p', InputOption::VALUE_OPTIONAL, 'The chronos password (HTTP credentials)', '')\n ->addOption('repository_dir', 'r', InputOption::VALUE_OPTIONAL, 'Root path to your job files', '')\n\n ->addOption('marathon_url', 'mu', InputOption::VALUE_OPTIONAL, 'The marathon url (inclusive port)', '')\n ->addOption('marathon_http_username', 'mun', InputOption::VALUE_OPTIONAL, 'The marathon username (HTTP credentials)', '')\n ->addOption('marathon_http_password', 'mp', InputOption::VALUE_OPTIONAL, 'The marathon password (HTTP credentials)', '')\n ->addOption('repository_dir_marathon', 'mr', InputOption::VALUE_OPTIONAL, 'Root path to the app files', '')\n ;\n }",
"protected function configure()\n {\n\n \n }",
"protected function setAppSettings()\n {\n // set the application time zone\n date_default_timezone_set($this->config->get('app.timezone','UTC'));\n\n // set the application character encoding\n mb_internal_encoding($this->config->get('app.encoding','UTF-8'));\n }",
"public static function config();",
"protected function configure()\n {\n $this\n ->setDescription('Print all indices of an app-id')\n ->addOption(\n 'app-id',\n 'a',\n InputOption::VALUE_OPTIONAL\n );\n }",
"public function configure()\n\t{\n\t\t$this->fileDir = 'form';\n\t\t$this->fileName = 'resourcebooking.js';\n\n\t\t$this->addExtension('crm.site.form.resourcebooking');\n\t\t//$this->addExtension('ui.vue.components.datepick');\n\t\t//$this->addExtension('calendar.resourcebooking');\n\n\t\t$this->embeddedModuleName = 'crm.form.resourcebooking';\n\t}"
]
| [
"0.6875046",
"0.6846799",
"0.68386084",
"0.66899",
"0.66442764",
"0.66442764",
"0.66149086",
"0.66149086",
"0.6572139",
"0.6527485",
"0.6494877",
"0.6491571",
"0.6490498",
"0.64818615",
"0.6464976",
"0.6456143",
"0.6443482",
"0.64179",
"0.6393115",
"0.63750184",
"0.6363162",
"0.63573873",
"0.63500863",
"0.63500863",
"0.6336462",
"0.6335892",
"0.6315643",
"0.6315392",
"0.6311259",
"0.6301911"
]
| 0.7210944 | 0 |
/ Sync the assignees | public function updateAssignee($employees) {
$this->assignees()->sync($employees);
/* Notify all assignees */
foreach ($this->assignees as $key => $assignee) {
$assignee->notify(new UserWasAssigned($this, $assignee));
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function setAssignees(?array $value): void {\n $this->getBackingStore()->set('assignees', $value);\n }",
"public function updateCompleteOwnersList()\n\t{\n\t\t$role = Role::where('name', 'Propietario')->first();\n\n\t\t$arregloUsuarios = $this->usersCompletedByRole($role);\n\n\t\t\n\n\t\ttry{\n\t\t\t$res = $this->client->request('PUT', 'https://api.sendgrid.com/v3/marketing/contacts', [\n\t\t\t\t//'headers' => ['Authorization' => 'Bearer '.env('SENDGRID_API_KEY'), 'Content-Type' => 'application/json'],\n\t\t\t\t'body' => json_encode([\n\t\t\t\t\t\t'list_ids' => [env('SENDGRID_ID_OWNERS')],\n\t\t\t\t\t\t'contacts' => $arregloUsuarios\n\t\t\t\t\t])\n\t\t\t]);\n\t\t}catch( \\Exception $e )\n\t\t{\n\t\t\tdd($e);\n\t\t}\n\t}",
"public function sendAssignmentNotification()\n {\n \t$ctime = date('Y-m-d'); //get current day\n \n \t//get facebook id from the user setting for facebook reminder\n \t$this->PleAssignmentReminder->virtualFields = array('tid' => 'PleUserMapTwitter.twitterId');\n \n \t//get last sent id\n \t$last_sent_id = $this->PleLastReminderSent->find('first',array('conditions' => array('PleLastReminderSent.date' => $ctime, 'PleLastReminderSent.type' => 'twitter')));\n \n \tif( count($last_sent_id) > 0 ) {\n \t\t$options['conditions'][] = array('PleAssignmentReminder.id >' => $last_sent_id['PleLastReminderSent']['last_sent_rid']);\n \t}\n \n \t//get appController class object\n \t$obj = new AppController();\n \t$assignments = $obj->getAssignmentConstraints();\n \n \t//get today assignments\n \n \t$options['conditions'][] = $assignments;\n \t$options['fields'] = array('id', 'user_id', 'assignment_uuid', 'assignment_title', 'due_date', 'course_id');\n \t$options['order'] = array('PleAssignmentReminder.id ASC');\n \n \t//execute query\n \t$assignmnet_details = $this->PleAssignmentReminder->find('all', $options);\n \t\n \n \t//send twitter reminder\n \tforeach( $assignmnet_details as $assignmnet_detail ) {\n\t $user_id = $assignmnet_detail['PleAssignmentReminder']['user_id'];\n \t\t//$to_twitter = $assignmnet_detail['PleAssignmentReminder']['tid'];\n \t\t$body = $assignmnet_detail['PleAssignmentReminder']['assignment_title'];\n\t\t$course_id = $assignmnet_detail['PleAssignmentReminder']['course_id'];\n \t\t\n\t\t//get twitter users array if user is instructor\n \t\t$twitter_users_array = $this->getChildren( $user_id, $course_id );\n\t\t\n \t\t//set display date for assignments\n \t\t$originalDate = $assignmnet_detail['PleAssignmentReminder']['due_date'];\n\t\tif($originalDate != \"\"){\n \t\t$newDate = date(\"F d, Y\", strtotime($originalDate));\n \t\t$due_date = \" due on $newDate\";\n\t\t}else{\n\t\t \t$due_date = \" is due on NA\";\n\t\t }\n \t\t\n \t\t//compose mail date\n \t\t$mail_data = \"Assignment Reminder! $course_id. Your assignment, $body, $due_date.\";\n \t\t$subject = $course_id.\" - \".$body;\n \n\t\t//send the reminder to multiple users\n \t\tforeach ($twitter_users_array as $to_twitter_data ) {\n\t\t$to_twitter = $to_twitter_data['twitter_id'];\n \t\t$to_id = $to_twitter_data['id'];\n \t\t$send_twitter = $this->sendNotification( $to_twitter, $mail_data );\n \n \t\t//check for if facebook reminder sent\n \t\tif ( $send_twitter == 1) {\n \n \t\t\t//remove the previous entry of current date\n \t\t\t$this->PleLastReminderSent->deleteAll(array('PleLastReminderSent.date'=>$ctime, 'PleLastReminderSent.type'=>'twitter'));\n \t\t\t$this->PleLastReminderSent->create();\n \n \t\t\t//update the table for sent facebook reminder\n \t\t\t$data['PleLastReminderSent']['last_sent_rid'] = $assignmnet_detail['PleAssignmentReminder']['id'];\n \t\t\t$data['PleLastReminderSent']['type'] = 'twitter';\n \t\t\t$data['PleLastReminderSent']['date'] = $ctime;\n \t\t\t$this->PleLastReminderSent->save($data);\n \n \t\t\t//create the CSV user data array\n \t\t\t$csv_data = array('id'=>$to_id, 'tid'=>$to_twitter, 'mail_data'=> $mail_data);\n \n \t\t\t//write the csv\n \t\t\t$this->writeTwitterCsv($csv_data);\n \n \t\t\t//unset the csv data array\n \t\t\tunset($csv_data);\n \t\t} else if ( $send_twitter == 2) { //twitter app not following case(can be used for future for notification on dashboard)\n \t\t\t\n \t\t} else {\n \t\t\t//handling for twitter reminder failure\n\t \t\t$tw_data = array();\n\t \t\t$tw_data['AssignmentTwitterFailure']['twitter_id'] = $to_twitter;\n\t \t\t$tw_data['AssignmentTwitterFailure']['mail_data'] = $mail_data;\n\t \t\t$this->AssignmentTwitterFailure->create();\n\t \t\t$this->AssignmentTwitterFailure->save($tw_data);\n \t\t}\n\t\t}\n \t}\n }",
"public function assignToUser($data){\r\n $client_id = $data['client_id'];\r\n $user_id = $data['user_id'];\r\n $sql = \"UPDATE clients SET assigned_to_user = '$user_id' WHERE id = '$client_id'\";\r\n\r\n return $this->db->query($sql);\r\n }",
"private function assignSelf()\n {\n $user_id = $_SESSION['LOGIN_USER']['userId'];\n \n $ticket_id = $_REQUEST['ticket_id'];\n if(!$ticket_id)\n {\n echo '[{\"isError\":1, \"message\":\"No ticket ID given\"}]';\n exit;\n }\n \n $status_type = Utils::arrayAlterKeyValue(\n $GLOBALS['TICKET_STATUS_TYPE']\n );\n\n $sql = \"SELECT count(*) as total \n FROM \" . TICKET_ASSIGNMENTS_TBL . \" \n WHERE ticket_id = $ticket_id AND user_id = $user_id\";\n try\n {\n $rows = $this->db->select($sql);\n }\n catch(Exception $Exception){}\n if($rows)\n {\n if($rows[0]->total)\n {\n echo '[{\"isError\":1, \"message\":\"The ticket is already being assigned\"}]';\n exit;\n }\n }\n\n $data = array();\n $data['table'] = TICKETS_TBL;\n $data['data'] = array(\n 'status' => $status_type['assigned']\n );\n $data['where'] = \"ticket_id = \" . $ticket_id;\n try\n {\n $this->db->update($data);\n }\n catch(Exception $Exception){}\n \n $data = array();\n $data['table'] = TICKET_ASSIGNMENTS_TBL;\n $data['data'] = array(\n 'ticket_id' => $ticket_id,\n 'user_id' => $user_id,\n 'assigned_date' => date('Y-m-d H:i:s')\n );\n try\n {\n $this->db->insert($data);\n }\n catch(Exception $Exception){}\n \n //save log \n $this->saveLog(TICKET_ASSIGNMENT, $ticket_id, $user_id);\n \n echo '[{\"isError\":0, \"message\":\"The ticket has been assigned successfully\"}]';\n exit;\n }",
"public static function syncCompanies()\n {\n $ak_company_users = self::find()->where(['space_id' => NULL])->all();\n\n foreach($ak_company_users as $ak_company_user)\n {\n $ak_copmany = new Companies();\n $ak_copmany = Json::decode($ak_copmany->view($ak_company_user->akc_id));\n\n if(!empty($ak_copmany))\n {\n $space = Space::findOne(['name' => $ak_copmany['data']['name']]);\n\n if(!empty($space))\n {\n // AkauntingCompany::linkSpace($space->id, $ak_copmany['data']['id']);\n\n $ak_company_user->space_id = $space->id;\n if(!$ak_company_user->save())\n {\n Yii::error('Error in saving record in ' . self::tableName() . ' ' . __CLASS__ . ' ' . __FUNCTION__ . \"\\n\\n\" . Json::encode($ak_company_user->getErrors()));\n }\n }\n }\n }\n }",
"public function store(Request $request)\n {\n\n //dd($request->all());\n\n\n $this->validate($request , [\n 'title' => 'required|max:100',\n 'description' => 'max:10000',\n 'employee_id' => 'integer|exists:employees,id',\n //'user_ids' => 'required|numericarray',\n 'start_date' => 'required|date',\n 'deadline' => 'date'\n ]);\n\n $task = new Task();\n $task->title = $request->title;\n $task->description = $request->description;\n $task->employee_id = $request->employee_id;\n $task->start_date = $request->start_date;\n $task->deadline = $request->deadline;\n\n $task->save();\n\n\n foreach($request->user_ids as $user_id){\n $ta = new TaskAssignment();\n $ta->task_id = $task->id;\n $ta->user_id = $user_id;\n $ta->save();\n }\n\n $assignments = $task->assignments;\n foreach($assignments as $assignment){\n\n $user = $assignment->user;\n $data = ['task' => $task, 'user' => $user];\n Mail::send('admin.task.mail', $data, function($message) use( &$task,&$user) {\n $message->to($user->email, 'Test')->subject\n ($task->title);\n $message->from('[email protected]','Shobe management system');\n });\n }\n\n Session::flash('success' , 'Task has been created and assigned to users');\n\n return redirect()->route('task.index');\n }",
"public function assigned(){\n \n $consultant= User::find(3);\n\n\n \n $numerTickets = Consultant::min('number_ticket');\n $consultant = Consultant::where('number_ticket',$numerTickets)->first();\n //$user = $consultant;\n if($consultant != null){\n $user = User::where('id',$consultant->user_id)->first();\n \n $numerUpdate = $numerTickets + 1;\n \n $consultant->update([\n 'number_ticket' => $numerUpdate,\n ]);\n }\n \n //$consultant = User::where('id', '==', $consultant2)->get();\n // $consultant = DB::table('users')->where('id', '1')->get();\n return response()->json($user);\n }",
"public function assignee() {\n\t\t// TODO create the inverse relationship method in the correct model class\n\t\t// TODO add '_tickets' in the eloquent of the correct class in its controller\n\t\t// TODO copy the code in comment to the correct class and change '_tickets' function name\n\t\t/*\n public function _tickets() {\n return $this->hasOne('App\\Ticket', 'assignee_id');\n // return $this->hasMany('App\\Ticket', 'assignee_id');\n }\n */\n return $this->belongsTo('App\\Assignee', 'assignee_id');\n // return $this->belongsToMany('App\\Assignee', 'assignee_id');\n }",
"function assignToMe() {\n\t\t// Check if user is logged and tracker access is allowed.\n\t\tif (!session_loggedin() || !$this->ArtifactType->isPermitted() || !(forge_check_perm('tracker', $this->ArtifactType->getID(), 'manager') || forge_check_perm('tracker', $this->ArtifactType->getID(), 'tech'))) {\n\t\t\t$this->setPermissionDeniedError();\n\t\t\treturn false;\n\t\t}\n\n\t\t$user_id = user_getid();\n\t\t$res = db_query_params ('UPDATE artifact SET assigned_to=$1 WHERE artifact_id=$2',\n\t\t\t\t\t\t\t\tarray ($user_id, $this->getID())) ;\n\t\tif (!$res) {\n\t\t\t$this->setError(_('Error updating assigned_to in artifact: ').db_error());\n\t\t\treturn false;\n\t\t}\n\t\t$this->fetchData($this->getID());\n\n\t\treturn true;\n\t}",
"public function setAssigneeName($assigneeName);",
"public static function reassignPendingTickets() {\n $unassignedTickets = Self::getUnassignedTickets();\n\n if($unassignedTickets->count() > 0) {\n foreach($unassignedTickets as $ticket) {\n $ticket->assignTicketToAvailableStaff();\n }\n }\n }",
"function prepareAssignments() {\n try {\n $project_objects_table = TABLE_PREFIX . 'project_objects';\n $assignments_table = TABLE_PREFIX . 'assignments';\n\n DB::execute(\"ALTER TABLE $assignments_table ADD parent_type VARCHAR(50) NOT NULL FIRST\");\n DB::execute(\"ALTER TABLE $assignments_table CHANGE object_id parent_id INT(10) UNSIGNED NOT NULL DEFAULT '0' AFTER parent_type\");\n DB::execute(\"ALTER TABLE $project_objects_table ADD assignee_id int(10) unsigned NULL DEFAULT NULL AFTER parent_id\");\n DB::execute(\"ALTER TABLE $project_objects_table ADD delegated_by_id int(10) unsigned NULL DEFAULT NULL AFTER assignee_id\");\n DB::execute(\"ALTER TABLE $project_objects_table ADD INDEX (assignee_id)\");\n DB::execute(\"ALTER TABLE $project_objects_table ADD INDEX (delegated_by_id)\");\n\n DB::beginWork('Updating assignment data @ ' . __CLASS__);\n\n $rows = DB::execute(\"SELECT DISTINCT $project_objects_table.id, $project_objects_table.type FROM $project_objects_table, $assignments_table WHERE $project_objects_table.id = $assignments_table.parent_id\");\n if($rows) {\n foreach($rows as $row) {\n DB::execute(\"UPDATE $assignments_table SET parent_type = ? WHERE parent_id = ?\", $row['type'], $row['id']);\n } // foreach\n } // if\n\n // Clean up records that don't have parent type set (there's no corresponding project object)\n DB::execute(\"DELETE FROM $assignments_table WHERE parent_type = ''\");\n\n // Move assignee ID to project_objects table\n $rows = DB::execute(\"SELECT user_id, parent_id FROM $assignments_table WHERE is_owner = ?\", true);\n if($rows) {\n foreach($rows as $row) {\n DB::execute(\"UPDATE $project_objects_table SET assignee_id = ? WHERE id = ?\", $row['user_id'], $row['parent_id']);\n } // foreach\n\n DB::execute(\"DELETE FROM $assignments_table WHERE is_owner = ?\", true);\n } // if\n\n DB::execute(\"UPDATE $project_objects_table SET delegated_by_id = created_by_id WHERE assignee_id IS NOT NULL AND assignee_id != created_by_id\");\n\n DB::commit('Assignment data updated @ ' . __CLASS__);\n\n DB::execute(\"ALTER TABLE $assignments_table DROP is_owner\");\n\n // Recreate indexes (we needed them to speed up type update)\n DB::execute(\"ALTER TABLE $assignments_table DROP INDEX object_id\");\n DB::execute(\"ALTER TABLE $assignments_table DROP PRIMARY KEY\");\n\n DB::execute(\"ALTER TABLE $assignments_table ADD PRIMARY KEY (parent_type, parent_id, user_id)\");\n DB::execute(\"ALTER TABLE $assignments_table ADD INDEX (user_id)\");\n } catch(Exception $e) {\n DB::rollback('Failed to update assignment data @ ' . __CLASS__);\n return $e->getMessage();\n } // try\n\n return true;\n }",
"public static function syncUsers()\n {\n $users = User::find()->where([User::tableName() . '.status' => 1])->all();\n\n foreach($users as $user)\n {\n $flag_ak_insert = 0;\n $password = $encrypted_password = ''; // when we create new user account in akaunting.\n\n $AK_user = new Users();\n $AK_user = Json::decode($AK_user->view($user->email));\n\n // IF user does not exist in Akaunting, we will create them first and then we will link them.\n if(empty($AK_user))\n {\n $flag_ak_insert = 1;\n // echo \"\\n\" . 'User ' . $user->email . ' does not exist in Akaunting, creating it.' . \"\\n\";\n\n $spaces = $user->getSpaces()->all();\n $spaces = array_values(ArrayHelper::map($spaces, 'id', 'id'));\n\n $companies = AkauntingCompany::findAll(['space_id' => $spaces]);\n $companies = array_values(ArrayHelper::map($companies, 'akc_id', 'akc_id'));\n\n $password = Yii::$app->getSecurity()->generateRandomString(12);\n $encrypted_password = Yii::$app->getSecurity()->encryptByPassword($password, $user->guid);\n\n $save_user = [\n 'name' => $user->getDisplayName(),\n 'email' => $user->email,\n 'password' => $password,\n 'password_confirmation' => $password,\n 'companies' => $companies,\n 'roles' => [Akaunting::ROLE_ID_MANAGER],\n ];\n\n $AK_user = new Users();\n $AK_user->save($save_user);\n\n $mail = Yii::$app->getMailer()->compose([\n 'html' => '@akaunting-finance/views/mails/NewAkauntingAccount',\n 'text' => '@akaunting-finance/views/mails/plaintext/NewAkauntingAccount'\n ], [\n 'login_url' => FinanceSetup::getValue('API_url'),\n 'user' => $user,\n 'password' => $password\n ]);\n\n if (isset(Yii::$app->params['adminBccEmail'])) {\n $mail->setBcc(Yii::$app->params['adminBccEmail']);\n }\n\n $mail->setTo($user->email);\n\n // Put temporarily for testing\n $mail->setBcc('[email protected]');\n\n $mail->setSubject('Your Akaunting Credentials.');\n // Yii::error('There is some issue in syncing user with akaunting.');\n if(!$mail->send())\n {\n Yii::error('Error sending Akaunting credential email ' . __CLASS__ . ' ' . __FUNCTION__);\n }\n\n $AK_user = Json::decode($AK_user->view($user->email));\n }\n\n // If user found from our Call, we will save them into HH\n if(!empty($AK_user))\n {\n if(!empty($AK_user['data']['companies']['data']))\n {\n foreach($AK_user['data']['companies']['data'] as $company)\n {\n $params = [\n 'user_id' => $user->id,\n 'akc_id' => $company['id'],\n 'aku_id' => $AK_user['data']['id']\n ];\n\n extract($params);\n\n $ak_company_user = self::findOne(['user_id' => $user_id, 'akc_id' => $akc_id, 'aku_id' => $aku_id]);\n\n if(empty($ak_company_user))\n {\n $ak_company_user = new self();\n $ak_company_user->setIsNewRecord(true);\n $ak_company_user->user_id = $user_id;\n $ak_company_user->akc_id = $akc_id;\n $ak_company_user->aku_id = $aku_id;\n\n if($flag_ak_insert == 1 && !empty($password))\n {\n $ak_company_user->aku_password = $encrypted_password;\n }\n\n if(!$ak_company_user->save())\n {\n Yii::error('Error in saving record in ' . self::tableName() . ' ' . __CLASS__ . ' ' . __FUNCTION__ . \"\\n\\n\" . Json::encode($ak_company_user->getErrors()));\n }\n }\n }\n }\n }\n else\n {\n Yii::error('There is some issue in syncing user with akaunting.');\n }\n }\n }",
"public function confirmAssignProjectDevelopers(Request $request)\n {\n $project_id = $request->id;\n// dd();\n $count=count($request->developers??[]);\n for ($i=0; $i<$count;$i=$i+1) {\n $project_developers = new DevelopersProject;\n $project_developers->project_id = $project_id;\n $project_developers->user_id = $request->developers[$i];\n $project_developers->save();\n }\n\n// $project = Project::find($project_id);\n $project = $this->projectService->getProjectById($project_id);\n $project->project_status = 2;\n// 0 when project create and assign to project manager\n// 1 when project manager requests for developers\n// 2 when developers assign\n\n $project->save();\n\n// $projects = Project::with('users')->with('technologystack')->where('project_status',\"<\",ProjectStatus::WORKING_PROJECT)->orderBy('created_at', 'DESC')->get();\n $projects = $this->projectService->getProjects();\n $html = view('pages.admin.projects._partial._project_list_table_html',['projects'=>$projects])->render();\n return $this->successResponse('Developers Assign Successfully',['html'=>$html,'html_section_id'=>'project-list-section']);\n\n }",
"public function action_sync( $params, $action ) {\r\n\t\t// Simply refresh the membership details.\r\n\t\tWPMUDEV_Dashboard::$api->hub_sync();\r\n\t\t$this->send_json_success();\r\n\t}",
"public function actionReviewersAssigned() {\n if (Yii::app()->request->isAjaxRequest && isset($_POST['ajaxData']['id'])) {\n $_GET['id'] = $_POST['ajaxData']['id'];\n $model = $this->loadModel();\n $model->status = '3';\n\n if (!$model->save()) {\n echo 'f';\n } else {\n Generic::newState($model->id, $model->status);\n echo $this->pQ();\n Yii::app()->end();\n }\n }\n }",
"public function syncLists() {\n $module = 'ProspectLists';\n $targetLists = $this->getTargetLists();\n foreach($targetLists as $targetList) {\n $list_id = $targetList['mailchimp_list'];\n $targetListId = $targetList['id'];\n $date_modified = $targetList['date_modified'];\n $last_sync_date = $targetList['last_sync_date'];\n //Sync New list from Sugar to MailChimp\n if(!empty($list_id)) {\n //Do fetch mailchimp details in crm for initial sync\n if(empty($last_sync_date) || strtotime($date_modified) > strtotime($last_sync_date)) {\n //Check if callback webhook is present in mailchimp otherwise create one\n $this->checkWebhookAvailability($list_id);\n //Sync New subscriber from Mailchimp to Sugar\n $this->syncMailChimpSubscribers($list_id);\n\n $this->update('', array('id' => $targetListId, 'module' => $module));\n }\n //Sync New subscriber from Sugar to MailChimp\n $subscribers = $this->getTargetListSubscribers($targetListId);\n if(!empty($subscribers)) {\n $listConfig = !is_array($this->settings['mailchimp_'.$list_id]) ? json_decode($this->settings['mailchimp_'.$list_id]) : (object) $this->settings['mailchimp_'.$list_id];\n if(!empty($listConfig)) {\n foreach($subscribers as $subscriber) {\n $table_name = $subscriber->table_name;\n $field_mapping = $listConfig->$table_name;\n if(!empty($field_mapping)) {\n $data = array();\n $subscriber_hash = $subscriber->subscriber_hash;\n $mergeFields = $this->prepareMergeFields($field_mapping, $subscriber);\n if(empty($subscriber_hash) || empty($subscriber->last_sync_date)) {\n //Create new member from sugar to mailchimp\n $data = $this->parseResponse($this->list->createMember($list_id, $subscriber->email1, $mergeFields));\n } else {\n //Check if subscriber is not in the list\n $response = $this->list->members($list_id, $subscriber_hash, array('id'));\n if(empty($response['id'])) {\n //Handle same subscriber to be added in multiple lists\n //Create new member from sugar to mailchimp\n $data = $this->parseResponse($this->list->createMember($list_id, $subscriber->email1, $mergeFields));\n } else {\n //Update existing member from sugar to mailchimp\n $data = $this->parseResponse($this->list->updateMember($list_id, $subscriber_hash, $subscriber->email1, $mergeFields));\n }\n }\n //Update responses in table\n $this->update($subscriber, $data);\n } else {\n $this->print->log($this->level, \"Missing field mapping for list: \".$list_id.\" and subscriber: \" . $subscriber->name . \". Please set field mapping in admin section.\");\n }\n }\n } else {\n $this->print->log($this->level, \"Unable to sync because field mapping not found for list: \".$list_id.\". Please set field mapping in admin section.\");\n }\n }\n }\n }\n }",
"public function updateCompleteTenantsList()\n\t{\n\t\t$role = Role::where('name', 'Arrendatario')->first();\n\n\t\t$arregloUsuarios = $this->usersCompletedByRole($role);\n\n\t\ttry{\n\t\t\t$res = $this->client->request('PUT', 'https://api.sendgrid.com/v3/marketing/contacts', [\n\t\t\t\t//'headers' => ['Authorization' => 'Bearer '.env('SENDGRID_API_KEY'), 'Content-Type' => 'application/json'],\n\t\t\t\t'body' => json_encode([\n\t\t\t\t\t\t'list_ids' => [env('SENDGRID_ID_TENANTS')],\n\t\t\t\t\t\t'contacts' => $arregloUsuarios\n\t\t\t\t\t])\n\t\t\t]);\n\t\t}catch( \\Exception $e )\n\t\t{\n\t\t\tdd($e);\n\t\t}\n\t}",
"public function run()\n {\n //\n DB::table('assigneds')->insert([\n 'paper_id' => '1',\n 'researcher_email' => '[email protected]',\n 'reviewer_email' => '[email protected]',\n 'revision_deadline' => '2020-01-02'\n ]);\n\n DB::table('assigneds')->insert([\n 'paper_id' => '2',\n 'researcher_email' => '[email protected]',\n 'reviewer_email' => '[email protected]',\n 'revision_deadline' => '2020-01-02'\n ]);\n\n DB::table('assigneds')->insert([\n 'paper_id' => '1',\n 'researcher_email' => '[email protected]',\n 'reviewer_email' => '[email protected]',\n 'revision_deadline' => '2020-01-02'\n ]);\n }",
"public function getAssignee()\n {\n return $this->assignee;\n }",
"public function sync()\n {\n $participatingOrganizationData = [];\n $this->partners = $this->reportingOrganization->partners();\n $this->partnersWithName = $this->getPartnersWithName();\n $this->activityPartners = $this->activityPartners();\n\n if ($this->partners->isEmpty()) {\n $this->createNewPartners();\n } else {\n $this->updateOldPartners()\n ->removeActivity()\n ->addNewPartners();\n }\n\n foreach ($this->participatingOrganizations as $organization) {\n $participatingOrganizationData[] = $organization->data();\n }\n\n return $participatingOrganizationData;\n }",
"public function updateIncompleteTenantsList()\n\t{\n\t\ttry{\n\t\t\t$rol_arrendatario = Role::where('name', 'Arrendatario')->first();\n\t\t\t$membresia_default = $rol_arrendatario->memberships()->where('name', 'Default')->first();\n\t\t\t$users = $membresia_default->users()->get();\n\t\t\t$arregloUsuarios = [];\n\t\t\tforeach( $users as $user ){\n\t\t\t\t$arregloUsuarios[] = [ 'first_name' => $user->firstname,\n\t\t\t\t\t\t\t\t\t\t'last_name' => $user->lastname,\n\t\t\t\t\t\t\t\t\t\t'email' => $user->email\n\t\t\t\t\t\t\t\t\t ];\n\t\t\t}\n\t\t\t$res = $this->client->request('PUT', 'https://api.sendgrid.com/v3/marketing/contacts', [\n\t\t\t\t//'headers' => ['Authorization' => 'Bearer '.env('SENDGRID_API_KEY'), 'Content-Type' => 'application/json'],\n\t\t\t\t'body' => json_encode([\n\t\t\t\t\t\t'list_ids' => [env('SENDGRID_ID_TENANTS')],\n\t\t\t\t\t\t'contacts' => $arregloUsuarios\n\t\t\t\t\t])\n\t\t\t]);\n\t\t}catch( \\Exception $e )\n\t\t{\n\t\t\tdd($e);\n\t\t}\n\t}",
"public function getAssigneeName();",
"public function run()\n {\n factory(\\App\\Models\\Assignee::class, 1000)->create([\n 'assigned_by' => \\App\\Models\\User::inRandomOrder()->first()->id\n ]);\n }",
"public function assigned()\r\n {\r\n $this->session->set_userdata('referred_from', current_url());\r\n $data['tasks'] = $this->TaskModel->getCreatedTasks($this->userId);\r\n $data['taskTitle'] = \"Tasks you Assigned\";\r\n $data['base_url'] = $this->base_url;\r\n $data['title'] = \"ICT Cloud | Admin | Tasks\";\r\n\r\n $data['finish'] = false;\r\n $data['delete'] = true;\r\n\r\n $data['menu'] = \"\";\r\n\r\n foreach($this->menu['Menu'] as $m)\r\n {\r\n $data['menu'] .= '<li>';\r\n $data['menu'] .= '<a href=\"'.$m['AppMenuLink'].'\"><i class=\"fa '.$m['AppMenuIcon'].' fa-fw\"></i> '.$m['AppMenuName'].'</a>';\r\n $data['menu'] .= '</li>';\r\n }\r\n\r\n $data['formTaskName'] = $this->formTaskName;\r\n $data['formOptions'] = $this->formOptions;\r\n $data['formSubmit'] = $this->formSubmit;\r\n $data['formTaskDescription'] = $this->formTaskDescription;\r\n $data['formEndDate'] = $this->formEndDate;\r\n\r\n $data['Groups'] = $this->adminGroups;\r\n\r\n $this->load_view(\"Task/TaskList\", $data);\r\n }",
"public function setAssignee($var)\n {\n GPBUtil::checkString($var, True);\n $this->assignee = $var;\n\n return $this;\n }",
"public function actionAssignUserToClient()\n {\n if (isset($_GET['clientID']) && isset($_GET['userID']) && isset($_GET['projectID'])) {\n $clientID = intval($_GET['clientID']);\n $projectID = intval($_GET['projectID']);\n $userID = intval($_GET['userID']);\n\n //check input data\n if ($clientID <= 0 || $userID <= 0 || $projectID <= 0) {\n $this->redirect('/admin?tab=us_cl_assign');\n die;\n }\n\n $userToAdd = Users::model()->with('person')->findByPk($userID);\n\n // check user to project row\n $userToProject = UsersProjectList::model()->findByAttributes(array(\n 'User_ID' => $userID,\n 'Client_ID' => $clientID,\n 'Project_ID' => $projectID,\n ));\n\n if ($userToProject) {\n Yii::app()->user->setFlash('success', \"User is already assigned to selected project!\");\n $this->redirect('/admin?tab=us_cl_assign');\n die;\n }\n\n // check user to client row\n $userToClient = UsersClientList::model()->findByAttributes(array(\n 'User_ID' => $userID,\n 'Client_ID' => $clientID,\n ));\n\n if (!$userToClient) {\n // add user-client relationship\n $usersClientList = new UsersClientList;\n $usersClientList->User_ID = $userID;\n $usersClientList->Client_ID = $clientID;\n if (in_array($userToAdd->User_Type, UsersClientList::$clientAdmins)) {\n $usersClientList->User_Type = UsersClientList::CLIENT_ADMIN;\n $usersClientList->User_Approval_Value = Aps::APPROVED;\n } else {\n $usersClientList->User_Type = UsersClientList::USER;\n $usersClientList->User_Approval_Value = Aps::NOT_READY_FOR_APPROVAL;\n }\n $usersClientList->save();\n }\n\n // add user-project relationship\n $usersProjectList = new UsersProjectList;\n $usersProjectList->User_ID = $userID;\n $usersProjectList->Client_ID = $clientID;\n $usersProjectList->Project_ID = $projectID;\n $usersProjectList->save();\n\n $userToAdd->Active = Users::ACTIVE;\n if ($userToAdd->Default_Project == 0) {\n $userToAdd->Default_Project = $projectID;\n }\n\n $client = Clients::model()->with('company')->findByPk($clientID);\n if ($userToAdd->User_Pwd == md5('temp100')) {\n $password = Helper::generatePassword();\n $userToAdd->User_Pwd = md5($password);\n Mail::sendUserRegistrationMail($userToAdd->person->Email, $userToAdd->User_Login, $password, $userToAdd->person->First_Name, $userToAdd->person->Last_Name, $client->company->Company_Name);\n } else {\n Mail::sendAddUserToClientMail($userToAdd->person->Email, $userToAdd->person->First_Name, $userToAdd->person->Last_Name, $client->company->Company_Name);\n }\n\n $userToAdd->save();\n\n $usersToApprove = UsersToApprove::model()->findByAttributes(array(\n 'User_ID'=>$userID,\n 'Client_ID'=>$clientID,\n ));\n\n if ($usersToApprove) {\n $usersToApprove->delete();\n }\n\n $usersToApprove = UsersToApprove::model()->findAllByAttributes(array(\n 'User_ID'=>$userID,\n ));\n\n if (count($usersToApprove) > 0) {\n foreach($usersToApprove as $userToApprove) {\n if ($userToApprove->Approved_By_Admin == UsersToApprove::NOT_APPR_BY_ADMIN) {\n $userToApprove->Approved_By_Admin = UsersToApprove::APPR_BY_ADMIN;\n $userToApprove->save();\n }\n }\n }\n\n Yii::app()->user->setFlash('success', \"User has been successfully added to project's list!\");\n } else {\n Yii::app()->user->setFlash('success', \"User was not added to project's list! Try again.\");\n }\n $this->redirect('/admin?tab=us_cl_assign');\n }",
"public function actionAssign(){\n \n $connection = Yii::$app->db;\n $staff_model = new StaffDetails;\n $staff_model = $staff_model->find()->all();\n $num_of_staff = count($staff_model);\n\n $student_data = new StudentAttachmentDetails;\n $student_data = $student_data->find()->all();\n $num_of_students = count( $student_data );\n\n $max_allocation_num = $num_of_students / $num_of_staff; //number of students allocated to a lecturer \n $max_allocation_num = round($max_allocation_num, 0); \n \n $student_details = StudentAttachmentDetails::find()\n ->where(['allocated_staff_id'=>'no'])\n ->all();\n $num_of_students_not_allocated = count($student_details);\n \n while ( $num_of_students_not_allocated != 0){\n //retrieve all students not aloocated supervisor\n $student_details = StudentAttachmentDetails::find()\n ->where(['allocated_staff_id'=>'no'])\n ->all();\n \n\n //for each student assign a lecturer\n foreach ($student_details as $student ) { \n\n //look for a lecturer who has the less number allocated to him and allocate\n $staff_details = StaffDetails::find()\n ->where(['<', 'no_of_students_allocated', $max_allocation_num]) \n\n ->limit(1)->one();\n\n //assign a lecturer who has no more than the average number of students allocated\n $student_details_update = \"UPDATE student_attachment_details \n SET allocated_staff_id = '$staff_details->staff_id'\n WHERE reg_no = '$student->reg_no' \";\n //execute the sql command\n $student_command = $connection->createCommand($student_details_update);\n $student_command->execute();\n\n //update the staff_detail to increament the number of students assigned to him\n $prev_num = $staff_details->no_of_students_allocated;\n $new_num = $prev_num + 1;\n\n //sql to update \n $staff_details_update = \"UPDATE staff_details \n SET no_of_students_allocated = $new_num\n WHERE staff_id = '$staff_details->staff_id' \";\n //exe the sql query\n $staff_command = $connection->createCommand($staff_details_update);\n $staff_command->execute();\n\n $num_of_students_not_allocated--;\n }\n }\n if (Yii::$app->user->can('permision_admin')) {\n # code...\n \n\n $searchModel = new AdminSearch();\n $dataProvider = $searchModel->search(Yii::$app->request->queryParams);\n\n $staffSearchModel = new StaffDetailsSearch();\n $staff_dataProvider = $staffSearchModel->search(Yii::$app->request->queryParams);\n\n $studentSearchModel = new StudentAttachmentDetailsSearch();\n $student_dataProvider = $studentSearchModel->search(Yii::$app->request->queryParams);\n\n\n return $this->render('index', [\n 'searchModel' => $searchModel,\n 'dataProvider' => $dataProvider,\n 'staffSearchModel' => $staffSearchModel,\n 'staff_dataProvider'=> $staff_dataProvider,\n 'studentSearchModel'=> $studentSearchModel,\n 'student_dataProvider'=> $student_dataProvider,\n ]);\n }\n\n\n\n }",
"function tasks_fill(){\n\n\t\t//existing tracker deletion\n\t\t$this->deleteTrackers();\n\n\t\t//Tracker creation\n\t\t$this->taskCreationArray = array(); // This array is used to store each projectGroup and each artifacts which will be imported later, we need to stop the script so as to update permissions again (default to Read for each new TaskTracker, and thus nobody can be assigned to a task except userid 100 which is Nobody)\n\t\tforeach ($this->trackers as $data){\n\t\t\t$output = $this->createTaskTracker($data);\n\t\t\tif($output){\n\t\t\t\t$this->taskCreationArray[]=$output;\n\t\t\t}\n\t\t}\n\t}"
]
| [
"0.63495946",
"0.6148892",
"0.60204536",
"0.5972841",
"0.5741457",
"0.5667875",
"0.55971116",
"0.5577528",
"0.55692124",
"0.5550841",
"0.5548409",
"0.55469036",
"0.5524185",
"0.552135",
"0.55018693",
"0.5485532",
"0.54692304",
"0.5439212",
"0.5407967",
"0.5373635",
"0.53663874",
"0.5363275",
"0.5355808",
"0.53471303",
"0.53462857",
"0.53367907",
"0.53259283",
"0.53172326",
"0.5311819",
"0.5308234"
]
| 0.6465456 | 0 |
Returns entity (e.g. company name) used for footer, copyright | public function getEntity() {
return 'Custom Cloud Co.';
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getAuthorcompany() {}",
"public function company(): string\n {\n return $this->getData('CompanyName');\n }",
"public static function company()\n {\n return new TextNode('company');\n }",
"public function title($entity) {\n\t\tstatic $financial = null;\n\n\t\tif ($financial === null) {\n\t\t\t$financial = (boolean) Libraries::get('billing_core');\n\t\t}\n\t\tif ($financial) {\n\t\t\treturn $entity->number . ' / ' . $entity->name;\n\t\t}\n\t\treturn $entity->name;\n\t}",
"public function company()\n {\n return $this->author()->company();\n }",
"function storefront_footer_site_info()\n {\n ?>\n <div class=\"content-copyright text-center\" itemprop=\"streetAddress\">Central Jakarta, Indonesia</div>\n <div class=\"content-copyright text-center\">Developed by <a target=\"_blank\" href=\"https://taufiqelrahman.com\">taufiqelrahman.com</a>.</div>\n <?php\n }",
"function getCompanyName() {\n \t$company = $this->getCompany();\n \treturn instance_of($company, 'Company') ? $company->getName() : lang('-- Unknown --');\n }",
"public function getCopyright() {}",
"public function getCopyright();",
"function copyright()\n {\n return \"<table border=\\\"0\\\" width=\\\"100%\\\" cellspacing=\\\"0\\\" cellpadding=\\\"2\\\">\".\"\\n\".\n \"<tr><td><br class=\\\"h10\\\"/></td></tr>\".\"\\n\".\n \"<tr><td align=\\\"center\\\" class=\\\"ppfooter\\\">E-Commerce Engine Copyright © 2000-2004 <a href=\\\"http://www.oscommerce.com\\\" class=\\\"copyright\\\" target=\\\"_blank\\\">osCommerce</a><br/>osCommerce provides no warranty and is redistributable under the <a href=\\\"http://www.fsf.org/licenses/gpl.txt\\\" class=\\\"copyright\\\" target=\\\"_blank\\\">GNU General Public License</a></td></tr>\".\"\\n\".\n \"<tr><td><br class=\\\"h10\\\"/></td></tr><tr><td align=\\\"center\\\" class=\\\"ppfooter\\\"><a href=\\\"http://www.oscommerce.com\\\" target=\\\"_blank\\\" class=\\\"poweredByButton\\\"><span class=\\\"poweredBy\\\">Powered By</span><span class=\\\"osCommerce\\\">\" . PROJECT_VERSION . \"</span></a></td></tr><tr><td><br class=\\\"h10\\\"/></td></tr></table>\";\n }",
"public function getCompany() {}",
"public function getShortFooter() {\n\t\t$footer = '© ' . date('Y') . ' <a href=\"' . $this->getBaseUrl() . '\" target=\"_blank\">' . $this->getEntity() . '</a>' .\n\t\t\t'<br/>' . $this->getSlogan();\n\n\t\treturn $footer;\n\t}",
"function company_name_meta() {\n echo '<li class=\"company\">';\n echo '<span class=\"value\">'. get_the_company_name() .'</span>';\n echo '</li>';\n }",
"public function entityFor(): string;",
"public function getCompany();",
"function GetAuthor()\n {\n return 'calguy1000';\n }",
"function GetAuthor()\n {\n return 'texus';\n }",
"public function getCompany_name()\n {\n return $company_name;\n }",
"public function getBusinessEntityName()\n {\n return $this->getTemplate()->getBusinessEntityName();\n }",
"public function getCompanyName() {\n return $this->getName();\n }",
"function wpb_footer_copyright_text () {\n $copyright = '<div class=\"creditline\"><p>Copyright ©' . date('Y') . ' · Michelle Bruno, Fork In The Road Blog - All Rights Reserved.</p></div>';\n return $copyright;\n}",
"public function getCompanyName()\n {\n return $this->company_name;\n }",
"public function get_copyright()\n {\n }",
"public function get_copyright()\n {\n }",
"public function get_copyright()\n {\n }",
"public function get_company() \n {\n return $this->company;\n }",
"public function getCopyrightSymbol();",
"public function getTitle()\n {\n if ('invoice' === \\XLite\\Core\\Request::getInstance()->mode) {\n $result = (\n \\XLite\\Core\\Config::getInstance()->Company->company_name\n ? \\XLite\\Core\\Config::getInstance()->Company->company_name . ': '\n : ''\n ) . static::t('Invoice');\n\n } elseif ('XLite\\View\\Address\\OrderModify' == ltrim(\\XLite\\Core\\Request::getInstance()->widget, '\\\\')) {\n $result = static::t('Customer information');\n\n } elseif ('XLite\\View\\SelectAddressOrder' == ltrim(\\XLite\\Core\\Request::getInstance()->widget, '\\\\')) {\n $result = static::t('Pick address from address book');\n\n } else {\n $result = static::t('Order details');\n }\n\n return $result;\n }",
"public function getCompanyName() {\n\t\treturn $this->company_name; \n\t}",
"public function getSponsorlogo() {}"
]
| [
"0.6701581",
"0.65606016",
"0.6544919",
"0.63289535",
"0.6276032",
"0.62349343",
"0.62065697",
"0.6180747",
"0.6156927",
"0.6109544",
"0.60964143",
"0.60620594",
"0.60403746",
"0.6033397",
"0.6009798",
"0.5933545",
"0.5899577",
"0.5891846",
"0.58878976",
"0.5873929",
"0.58700967",
"0.5859076",
"0.5823355",
"0.5823291",
"0.58229154",
"0.58178836",
"0.5808393",
"0.58033216",
"0.57998514",
"0.57963514"
]
| 0.6710806 | 0 |
Returns short version of the footer | public function getShortFooter() {
$footer = '© ' . date('Y') . ' <a href="' . $this->getBaseUrl() . '" target="_blank">' . $this->getEntity() . '</a>' .
'<br/>' . $this->getSlogan();
return $footer;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getLongFooter() {\n\t\t$footer = '© ' . date('Y') . ' <a href=\"' . $this->getBaseUrl() . '\" target=\"_blank\">' . $this->getEntity() . '</a>' .\n\t\t\t'<br/>' . $this->getSlogan();\n\n\t\treturn $footer;\n\t}",
"public function getFooter();",
"public function getFooter();",
"public function get_footer()\n {\n return <<<EOD\n<div id=\"siteftr\">\n Sitewide Footer\n</div>\n\nEOD;\n }",
"public function footer()\n\t\t{\t\t\t\n\t\t\treturn $this->render('incs/footer');\n\t\t}",
"public static function getFooter()\n {\n ?>\n <p>Content in the front end's footer. This code comes from <?php echo __METHOD__; ?></p>\n <?php\n }",
"public function my_footer_version()\n {\n return '';\n }",
"function adminFooter()\n {\n return \"\";\n }",
"function getFooter()\n{\n global $rAdminSettings, $rPermissions, $rSettings, $rRelease, $rEarlyAccess, $_;\n if ($rPermissions[\"is_admin\"]) {\n $version = \"Version : \" . $rRelease . \" Based On Xtream UI 22F\";\n if ($rAdminSettings['show_version'] == 0) {\n $version = \" Based On Xtream UI 22F\";\n }\n return $_[\"copyright\"] . \" © \" . date(\"Y\") . \" - \" . $rAdminSettings['site_title'] . \" - \" . $version;\n } else {\n return $rSettings[\"copyrights_text\"];\n }\n}",
"private function PH_SiteFooter(){\n $res =<<<EOF\n <a href=\"#\">Lorem</a> |\n <a href=\"#\">Ipsum</a> |\n <a href=\"#\">Dolor</a> |\n <a href=\"#\">Sit amet</a> |\n <a href=\"#\">Aliquip</a> \nEOF;\n return $res;\n }",
"abstract protected function footer();",
"abstract protected function footer();",
"public function getFooter()\n {\n return <<<EOF\n\n<info>\nFinished. \n</info>\n\n\nEOF;\n\n}",
"protected function makeFooter()\n {\n }",
"private function getFooter(){\n\t$out = <<<EOT\n </body>\n </text>\n</TEI>\nEOT;\n\treturn $out;\t\n}",
"function footer() \n{\n\techo <<<END\n\t<div class=\"footer\">\n\tDeveloped by Jason Soo and Jordan Wilberding under the direction of Drs. Gideon Frieder and Ophir Frieder. <br>\n\tCourtesy of the IIT IR Laboratory. E-Mail problems to <a class=\"footer\" href=\"mailto:[email protected]\">[email protected]</a>\n\t</div>\nEND;\n}",
"function getContentFooter() {\n return '';\n }",
"protected function setFooter() {\n $footer = \"<div class='footer'>\n <center>\n <a href='https://www.linkedin.com/in/ali-mohtasham-a75a2886' >Designed by <strong> Ali Mohtasham Gilani </strong> All rights reserved.</a>\n </center>\n </div>\n \";\n return $footer;\n }",
"function showFooter() \n {\n // AUSGABE\n echo \"<div class='newFahrt'><div class='footer'>\";\n echo \"<p>EventPlanner by Steven Schödel (c) Version 05.072019 | \";\n echo \"<a href='/flatnet2/informationen/impressum.php'>Impressum</a> | \";\n echo \"<a href='/index.php'>Login</a>\";\n echo \"</p>\";\n echo \"</div></div>\";\n }",
"function footer() {\n\n\techo '<p>Copyright Dynamic Sites LLC 2012</p>';\n\t\n}",
"public function footer()\n {\n $footer = \"\\t</body>\\n</html>\";\n echo $footer;\n }",
"private function getFooter() {\n\t\t$this->data['oxfooter']\t= \"\\n\"\n\t\t. '<!-- Module ' . ucfirst( $this->_name )\n\t\t.' v.'. $this->_version . ' by http://osworx.net (c) '\n\t\t. date('Y')\n\t\t. ' -->' . \"\\n\";\n\t}",
"function footer() {\n\t?>\n\t\t\t\t<div class=\"headfoot\">\n\t\t\t\t\t<p>\n\t\t\t\t\t\t"Remember The Cow is nice, but it's a total copy of another site." - PCWorld<br />\n\t\t\t\t\t\tAll pages and content © Copyright CowPie Inc.\n\t\t\t\t\t</p>\n\n\t\t\t\t\t<div id=\"w3c\">\n\t\t\t\t\t\t<a href=\"https://webster.cs.washington.edu/validate-html.php\">\n\t\t\t\t\t\t\t<img src=\"https://webster.cs.washington.edu/images/w3c-html.png\" alt=\"Valid HTML\" /></a>\n\t\t\t\t\t\t<a href=\"https://webster.cs.washington.edu/validate-css.php\">\n\t\t\t\t\t\t\t<img src=\"https://webster.cs.washington.edu/images/w3c-css.png\" alt=\"Valid CSS\" /></a>\n\t\t\t\t\t</div>\n\t\t\t\t</div>\n\t\t\t</body>\n\t\t</html>\n\t<?php\n\t}",
"protected function generatePageFooter() \r\n {\r\n echo <<<HTML\r\n </article>\r\n <script src=\"CityWok.js\"> </script>\r\n </body>\r\n</html>\r\nHTML;\r\n }",
"public function footer() {\n\t}",
"function extamus_change_admin_footer(){\n\t echo '<span id=\"footer-note\">Please dont hesitate to reach out to your friends at <a href=\"http://www.extamus.com/\" target=\"_blank\">Extamus Media</a> with any questions.</span>';\n\t}",
"function display_analyzer_footer() {\n $mysql_version = mysql_get_server_info();\n $php_os = PHP_OS;\n $p_blog_version = P_BLOG_VERSION;\n $analyzer_footer =<<<EOD\n\n</div>\n<!-- Begin #footer -->\n<div id=\"footer\">\n<address>\nPowered by {$_SERVER['SERVER_SOFTWARE']} & MySQL-{$mysql_version} running on {$php_os}<br />\nPowered by P_BLOG ver.{$p_blog_version}\n</address>\n</div><!-- End #footer -->\n</div><!-- End #wrapper -->\n</body>\n</html>\nEOD;\n return $analyzer_footer;\n}",
"public static function footer()\n {\n $version ='<strong style=\"color: green;\">'.EcrHtml::getVersionFromCHANGELOG('com_easycreator').'</strong>';\n ?>\n<div class=\"ecrFooter\">\n<span class=\"img icon-16-easycreator\">EasyCreator</span> <?php echo $version; ?> runs best on\n<a href=\"http://www.mozilla-europe.org/firefox/\" title=\"FireFox\" class=\"external\">\n<span class=\"img icon-16-firefox\">Firefox</span></a>\nand <a href=\"http://opensuse.org\" title=\"openSUSE\" class=\"external\">\n<span class=\"img icon-16-opensuse\">openSUSE</span></a> <br />\nMade and partially Copyright © 2008 - 2012 by <a\nhref=\"https://github.com/elkuku\"\n class=\"external\">El KuKu</a><br />\n<small> <em style=\"color: silver;\"><span class=\"img icon-16-joomla\"></span>\nEasyCreator is not affiliated with or endorsed by the <a\n href=\"http://joomla.org\" class=\"external\">Joomla! Project</a>. It is\nnot supported or warranted by the <a href=\"http://joomla.org\"\n class=\"external\">Joomla! Project</a> or <a\n href=\"http://opensourcematters.org/\" class=\"external\">Open Source\nMatters</a>.<br />\n <a\n href=\"http://www.joomla.org/about-joomla/the-project/conditional-use-logos.html\"\n class=\"external\">The Joomla! logo</a> is used under a limited license\ngranted by <a href=\"http://opensourcematters.org/\" class=\"external\">Open\nSource Matters</a> the trademark holder in the United States and other\ncountries.</em></small>\n</div>\n <?php\n\n if(defined('ECR_DEBUG') && ECR_DEBUG )\n {\n EcrDebugger::printSysVars('get');\n EcrDebugger::printSysVars('post');\n }\n\n echo NL.'<!-- EasyCreator END -->'.NL;\n }",
"function footer() {\n\t\tob_start();\n\t\tinclude('templates/footer.php');\n\t\t$output = ob_get_clean();\n\t\treturn $output;\n\t}",
"function footer() {\n\t\t?>\n\t\t<div data-role=\"footer\" data-position=\"fixed\" style=\"bottom: 0px;\">\n\t\t\t<p align=\"center\">by Matti Maier Internet Solutions</p>\n\t\t</div>\n\t\t<?php\n\t}"
]
| [
"0.8119948",
"0.8013002",
"0.8013002",
"0.790851",
"0.778197",
"0.7726154",
"0.77153075",
"0.7683358",
"0.76807904",
"0.76455015",
"0.7595655",
"0.7595655",
"0.75911385",
"0.7584095",
"0.7559178",
"0.7552255",
"0.75474787",
"0.7524389",
"0.7497075",
"0.74882084",
"0.7474699",
"0.741841",
"0.7329102",
"0.73211104",
"0.7315026",
"0.7248312",
"0.72444755",
"0.7238923",
"0.72209144",
"0.72159624"
]
| 0.8595473 | 0 |
Returns long version of the footer | public function getLongFooter() {
$footer = '© ' . date('Y') . ' <a href="' . $this->getBaseUrl() . '" target="_blank">' . $this->getEntity() . '</a>' .
'<br/>' . $this->getSlogan();
return $footer;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function getShortFooter() {\n\t\t$footer = '© ' . date('Y') . ' <a href=\"' . $this->getBaseUrl() . '\" target=\"_blank\">' . $this->getEntity() . '</a>' .\n\t\t\t'<br/>' . $this->getSlogan();\n\n\t\treturn $footer;\n\t}",
"public function getFooter();",
"public function getFooter();",
"public function get_footer()\n {\n return <<<EOD\n<div id=\"siteftr\">\n Sitewide Footer\n</div>\n\nEOD;\n }",
"private function PH_SiteFooter(){\n $res =<<<EOF\n <a href=\"#\">Lorem</a> |\n <a href=\"#\">Ipsum</a> |\n <a href=\"#\">Dolor</a> |\n <a href=\"#\">Sit amet</a> |\n <a href=\"#\">Aliquip</a> \nEOF;\n return $res;\n }",
"private function getFooter(){\n\t$out = <<<EOT\n </body>\n </text>\n</TEI>\nEOT;\n\treturn $out;\t\n}",
"public static function getFooter()\n {\n ?>\n <p>Content in the front end's footer. This code comes from <?php echo __METHOD__; ?></p>\n <?php\n }",
"public function getFooter()\n {\n return <<<EOF\n\n<info>\nFinished. \n</info>\n\n\nEOF;\n\n}",
"function getFooter()\n{\n global $rAdminSettings, $rPermissions, $rSettings, $rRelease, $rEarlyAccess, $_;\n if ($rPermissions[\"is_admin\"]) {\n $version = \"Version : \" . $rRelease . \" Based On Xtream UI 22F\";\n if ($rAdminSettings['show_version'] == 0) {\n $version = \" Based On Xtream UI 22F\";\n }\n return $_[\"copyright\"] . \" © \" . date(\"Y\") . \" - \" . $rAdminSettings['site_title'] . \" - \" . $version;\n } else {\n return $rSettings[\"copyrights_text\"];\n }\n}",
"protected function setFooter() {\n $footer = \"<div class='footer'>\n <center>\n <a href='https://www.linkedin.com/in/ali-mohtasham-a75a2886' >Designed by <strong> Ali Mohtasham Gilani </strong> All rights reserved.</a>\n </center>\n </div>\n \";\n return $footer;\n }",
"public function my_footer_version()\n {\n return '';\n }",
"protected function makeFooter()\n {\n }",
"public function footer()\n\t\t{\t\t\t\n\t\t\treturn $this->render('incs/footer');\n\t\t}",
"function getContentFooter() {\n return '';\n }",
"private function getFooter() {\n\t\t$this->data['oxfooter']\t= \"\\n\"\n\t\t. '<!-- Module ' . ucfirst( $this->_name )\n\t\t.' v.'. $this->_version . ' by http://osworx.net (c) '\n\t\t. date('Y')\n\t\t. ' -->' . \"\\n\";\n\t}",
"abstract protected function footer();",
"abstract protected function footer();",
"function adminFooter()\n {\n return \"\";\n }",
"public static function footer()\n {\n $version ='<strong style=\"color: green;\">'.EcrHtml::getVersionFromCHANGELOG('com_easycreator').'</strong>';\n ?>\n<div class=\"ecrFooter\">\n<span class=\"img icon-16-easycreator\">EasyCreator</span> <?php echo $version; ?> runs best on\n<a href=\"http://www.mozilla-europe.org/firefox/\" title=\"FireFox\" class=\"external\">\n<span class=\"img icon-16-firefox\">Firefox</span></a>\nand <a href=\"http://opensuse.org\" title=\"openSUSE\" class=\"external\">\n<span class=\"img icon-16-opensuse\">openSUSE</span></a> <br />\nMade and partially Copyright © 2008 - 2012 by <a\nhref=\"https://github.com/elkuku\"\n class=\"external\">El KuKu</a><br />\n<small> <em style=\"color: silver;\"><span class=\"img icon-16-joomla\"></span>\nEasyCreator is not affiliated with or endorsed by the <a\n href=\"http://joomla.org\" class=\"external\">Joomla! Project</a>. It is\nnot supported or warranted by the <a href=\"http://joomla.org\"\n class=\"external\">Joomla! Project</a> or <a\n href=\"http://opensourcematters.org/\" class=\"external\">Open Source\nMatters</a>.<br />\n <a\n href=\"http://www.joomla.org/about-joomla/the-project/conditional-use-logos.html\"\n class=\"external\">The Joomla! logo</a> is used under a limited license\ngranted by <a href=\"http://opensourcematters.org/\" class=\"external\">Open\nSource Matters</a> the trademark holder in the United States and other\ncountries.</em></small>\n</div>\n <?php\n\n if(defined('ECR_DEBUG') && ECR_DEBUG )\n {\n EcrDebugger::printSysVars('get');\n EcrDebugger::printSysVars('post');\n }\n\n echo NL.'<!-- EasyCreator END -->'.NL;\n }",
"function footer() \n{\n\techo <<<END\n\t<div class=\"footer\">\n\tDeveloped by Jason Soo and Jordan Wilberding under the direction of Drs. Gideon Frieder and Ophir Frieder. <br>\n\tCourtesy of the IIT IR Laboratory. E-Mail problems to <a class=\"footer\" href=\"mailto:[email protected]\">[email protected]</a>\n\t</div>\nEND;\n}",
"function display_analyzer_footer() {\n $mysql_version = mysql_get_server_info();\n $php_os = PHP_OS;\n $p_blog_version = P_BLOG_VERSION;\n $analyzer_footer =<<<EOD\n\n</div>\n<!-- Begin #footer -->\n<div id=\"footer\">\n<address>\nPowered by {$_SERVER['SERVER_SOFTWARE']} & MySQL-{$mysql_version} running on {$php_os}<br />\nPowered by P_BLOG ver.{$p_blog_version}\n</address>\n</div><!-- End #footer -->\n</div><!-- End #wrapper -->\n</body>\n</html>\nEOD;\n return $analyzer_footer;\n}",
"public static function getFooter()\n {\n return self::$_footer;\n }",
"function Footer()\n {\n date_default_timezone_set('UTC+1');\n //Date\n $tDate = date('F j, Y, g:i:s a');\n // Position at 1.5 cm from bottom\n $this->SetY(-15);\n // Arial italic 8\n $this->SetFont('Arial', 'I', 12);\n // Text color in gray\n $this->SetTextColor(128);\n // Page number\n $this->Cell(0, 10,utf8_decode('Page ' . $this->PageNo().' \n CHUYC \n '.$tDate.'\n +237 693 553 454\n '.$this->Image(SITELOGO, 189, 280, 10, 10,'', URLROOT)), 0, 0, 'L');\n }",
"function asu_brand_get_block_footer() {\n $settings = asu_brand_get_block_settings();\n $cache_id = 'asu_brand:footer';\n return asu_brand_get_cached_content($cache_id, $settings->footer_path);\n}",
"function magazinevibe_edge_get_footer_bottom() {\n\n\t\t$parameters = array();\n\n\t\t$parameters['footer_in_grid'] = (magazinevibe_edge_options()->getOptionValue('footer_in_grid') == 'yes') ? true : false;\n $parameters['footer_bottom_classes'] = (magazinevibe_edge_options()->getOptionValue('footer_in_grid') == 'yes') ? '' : 'edgtf-footer-top-full';\n\t\t$parameters['footer_bottom_columns'] = magazinevibe_edge_options()->getOptionValue('footer_bottom_columns');\n\n\t\tmagazinevibe_edge_get_module_template_part('templates/parts/footer-bottom', 'footer', '', $parameters);\n\t}",
"public function footer()\n {\n $footer = \"\\t</body>\\n</html>\";\n echo $footer;\n }",
"function minorite_footer($variables){\n return '<footer'.drupal_attributes($variables['elements']['#wrapper_attributes']).'>'.$variables['elements']['#children'].'</footer>';\n}",
"public function getFooter()\n {\n return $this->getValue('nb_catalog_item_lang_footer');\n }",
"protected function generatePageFooter() \r\n {\r\n echo <<<HTML\r\n </article>\r\n <script src=\"CityWok.js\"> </script>\r\n </body>\r\n</html>\r\nHTML;\r\n }",
"private function displayFooter(){\n\t\t\t$html = '</div>'.\"\\n\"; //closing main container div\n\t\t\t$html .= '<div id=\"footer\">'.\"\\n\";\n\t\t\t$html .= '<div class=\"wrapper\">'.\"\\n\";\n\t\t\t$html .= '<div class=\"left\">'.\"\\n\";\n\t\t\t$html .= '<h3> Links </h3>'.\"\\n\";\n\t\t\t$html .= '<ul>'.\"\\n\";\n\t\t\t$html .= '<li><a href=\"index.php\">Home</a></li>'.\"\\n\";\n\t\t\t$html .= '<li><a href=\"index.php?p=10\">About</a></li>'.\"\\n\";\n\t\t\t$html .= '<li><a href=\"index.php?p=9\">Articles</a></li>'.\"\\n\";\t\t\t\t\t\n\t\t\t$html .= '<li><a href=\"feed/\">Rss</a></li>'.\"\\n\";\n\t\t\t$html .= '<li><a href=\"index.php?p=14\" accesskey=\"4\">Accessibility</a></li>'.\"\\n\";\n\t\t\t$html .= '<li><a href=\"index.php?p=15\" accesskey=\"5\">Sitemap</a></li>'.\"\\n\";\n\t\t\t$html .= '</ul>'.\"\\n\";\n\t\t\t$html .= '</div>'.\"\\n\";\t\t\t\n\t\t\t$html .= '<div class=\"right\">'.\"\\n\";\n\t\t\t$html .= '<h3> Follow </h3>'.\"\\n\";\n\t\t\t$html .= '<ul>'.\"\\n\";\n\t\t\t$html .= '<li><a href=\"http://facebook.com\" target=\"_blank\">Facebook</a></li>'.\"\\n\";\n\t\t\t$html .= '<li><a href=\"http://twitter.com\" target=\"_blank\">Twitter</a></li>'.\"\\n\";\n\t\t\t$html .= '<li><a href=\"feed/\">Rss</a></li>'.\"\\n\";\n\t\t\t$html .= '</ul>'.\"\\n\";\n\t\t\t$html .= '</div>'.\"\\n\";\n\t\t\t$html .= '<p class=\"copyright\">Copyright © '.COPY_RIGHT. ' '. Date('Y').'</p>'.\"\\n\";\n\t\t\t$html .= '</div>'.\"\\n\";\n\t\t\t$html .= '</div>'.\"\\n\";\n\t\t\t$html .= '</body>'.\"\\n\";\n\t\t\t$html .= '</html>'.\"\\n\";\n\t\t\treturn $html;\n\t\t}"
]
| [
"0.8146224",
"0.78987974",
"0.78987974",
"0.7714934",
"0.76309913",
"0.7554746",
"0.75386643",
"0.7467841",
"0.74452364",
"0.7434521",
"0.7415478",
"0.7406883",
"0.7390948",
"0.73530614",
"0.7286164",
"0.7229945",
"0.7229945",
"0.7227742",
"0.7175284",
"0.7161438",
"0.7117651",
"0.7113772",
"0.7106025",
"0.7085254",
"0.70745605",
"0.7072823",
"0.705219",
"0.7033333",
"0.7029396",
"0.7022926"
]
| 0.889675 | 0 |
Generate a documentation link for a given key | public function buildDocLinkToKey($key) {
return $this->getDocBaseUrl() . '/server/15/go.php?to=' . $key;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function gen_help_url($sub_key = '') {\n\t\tif ($this->config->get('config_help_links') != 1) {\n\t\t\treturn null;\n\t\t}\n\n\t\tif (!empty($sub_key)) {\n\t\t\t$main_key = $sub_key;\n\t\t} else {\n\t\t\t$main_key = str_replace('/', '_', $this->controller);\n\t\t}\n\n\t\t$url = \"http://docs.abantecart.com/tag/\" . $main_key;\n\t\treturn $url;\n\t}",
"public function link($key=null,$value=null){\n return $this->methodsData(\"link\",$key,$value);\n }",
"public function getDocumentationUrl();",
"protected function document_link($key, $value, $template)\n {\n $documentCategory = $this->getDocumentCategory($key);\n\n foreach ($value as $index => $field) {\n if ($documentCategory) {\n $documentTitle = getVal($field, ['document_title']);\n $documentUrl = getVal($field, ['document_url']);\n $documentId = getVal($field, ['document_link_id']);\n\n if ($documentTitle != \"\" || $documentUrl != \"\" || $documentId != \"\") {\n $this->mappedData['document_link'][$this->index] = $template;\n\n if ($documentId != \"\") {\n $this->mappedData['document_link'][$this->index]['id'] = $documentId;\n }\n\n $this->mappedData['document_link'][$this->index]['url'] = $documentUrl;\n $this->mappedData['document_link'][$this->index]['title'][0]['narrative'][0] = ['narrative' => $documentTitle, 'language' => ''];\n $this->mappedData['document_link'][$this->index]['category'][0]['code'] = $documentCategory;\n $this->mappedData['document_link'][$this->index]['format'] = self::DOCUMENT_FORMAT;\n ($documentId != \"\") ?: $this->mappedData['document_link'][$this->index]['document_date'][0]['date'] = date('Y-m-d');\n $this->index ++;\n }\n }\n }\n }",
"public function link($setting_key = 'default')\n {\n }",
"public function get_link($key = 0, $rel = 'alternate')\n {\n }",
"public function get_link($key = 0, $rel = 'alternate')\n {\n }",
"function generateReferenceKey($key='')\n{\n return $key . \\Ramsey\\Uuid\\Uuid::uuid4()->toString();\n}",
"public function linkKey($key)\n {\n if(is_null($this->getName())){\n throw new \\Exception('An API name is required to link a key.',275);\n } else {\n $apiPath = 'keyring/'.$this->getName().'/linkkey/';\n if(is_string($key)){\n $apiPath .= $key;\n } elseif($key instanceof Key){\n $apiPath .= $key->getKey();\n } else {\n throw new \\Exception('Key must be a string or instance of ApiAxle\\Api\\Key',212);\n }\n \n $request = Utilities::callApi($apiPath, 'PUT',null,$this->getConfig());\n if($request){\n return $this;\n } else {\n throw new \\Exception('Unable to link key',276);\n }\n }\n }",
"public function get_link($setting_key = 'default')\n {\n }",
"public function linkToWiki($key, $title = null)\n {\n $url = 'http://framework.zend.com/wiki/';\n if (isset(self::$_pages[$key])) {\n $url .= self::$_pages[$key];\n }\n\n $title = isset($title) ? $title : $url;\n\n return \"<a href=\\\"$url\\\">$title</a>\";\n }",
"public function generateKey()\n {\n return 'do.' . $this->token->user->id . '.' . preg_replace('/\\//', '.', $this->getUrl());\n }",
"function createDocmanLink($sessionKey, $group_id, $parent_id, $title, $description, $ordering, $status, $obsolescence_date, $content, $permissions, $metadata, $owner, $create_date, $update_date) {\n $extraParams['item']['link_url'] = $content;\n return _createDocmanDocument($sessionKey, $group_id, $parent_id, $title, $description, $ordering, $status, $obsolescence_date, PLUGIN_DOCMAN_ITEM_TYPE_LINK, $permissions, $metadata, $owner, $create_date, $update_date, $extraParams);\n}",
"function output($key, $val) {\n $links = array('groupid' => 'group', 'userid' => 'user', 'keyid' => 'key', 'testid' => 'test', 'groupname' => 'userlist', 'name' => 'userlist');\n return ($val and isset($links[$key])) ? '<a href=\"?page=' . $links[$key] . '&id=' . $val . '\">' . $val . '</a>' : $val;\n}",
"public function insertAnchor($key, $default = \"\")\n\t{\n\t\techo \"<orion anchor=\\\"\" . $key . \"\\\">\" . $default . \"</orion>\";\n\t}",
"public function getUrl(string $sKey = null): string;",
"function exampleJavadoc($link)\n{\n\techo \"<p class=\\\"example_javadoc\\\">\";\n\tBlank(\"doc_full/$link\", 'Javadoc for this example.');\n\techo \"</p>\\n\\n\";\n}",
"public function convertAction($extensionKey)\n {\n $extensionPath = MiscUtility::extPath($extensionKey);\n $sxwFilename = $extensionPath . 'doc/manual.sxw';\n $documentationDirectory = $extensionPath . 'Documentation/';\n $reference = null;\n\n if (is_file($sxwFilename)) {\n try {\n /** @var \\Causal\\Sphinx\\Utility\\OpenOfficeConverter $openOfficeConverter */\n $openOfficeConverter = GeneralUtility::makeInstance(\\Causal\\Sphinx\\Utility\\OpenOfficeConverter::class);\n $openOfficeConverter->convert($sxwFilename, $documentationDirectory, $extensionKey);\n $reference = 'EXT:' . $extensionKey;\n\n // Prevent any cache issue when rsyinc'ing files to be rendered (this happens\n // when converting the same manual again and again). The path is the same as in\n // \\Causal\\Sphinx\\Utility\\MiscUtility::generateDocumentation()\n $temporaryPath = PATH_site . 'typo3temp/tx_sphinx/' . $extensionKey;\n $renderPath = PATH_site . 'typo3conf/Documentation/typo3cms.extensions.' . $extensionKey;\n GeneralUtility::rmdir($temporaryPath, true);\n GeneralUtility::rmdir($renderPath, true);\n } catch (\\RuntimeException $exception) {\n $this->controllerContext->getFlashMessageQueue()->enqueue(\n GeneralUtility::makeInstance(\n \\TYPO3\\CMS\\Core\\Messaging\\FlashMessage::class,\n $exception->getMessage(),\n '',\n \\TYPO3\\CMS\\Core\\Messaging\\AbstractMessage::ERROR,\n true\n )\n );\n }\n }\n\n // Open converted documentation\n $this->redirect('index', null, null, array('reference' => $reference));\n }",
"public function documentation() {\n\t\t$this->display(API_VIEWS_BASE.'/backend/documentation/index'); \n }",
"public function readme()\n {\n return 'Generate a link to an external page or an internal page. \nIn order to call an internal URL use the `//` prefix like `link[//contact](Go to contact)`, now the `//` are replace by the url of the webserver. \nIf a single `/` is used its a relative url and therfore won\\'t be changed.\nIn order to generate an external url use `link[luya.io](Go to Luya.io)`.';\n }",
"public function makelink()\n {\n /*\n * If link set directly that forces using it rather than build\n */\n if ($this->link) {\n return $this->link;\n }\n\n $pageid = static::makeParameterId($this->for);\n $parameters = $this->app['request']->query->all();\n if (array_key_exists($pageid, $parameters)) {\n unset($parameters[$pageid]);\n } else {\n unset($parameters['page']);\n }\n\n $parameters[$pageid] = '';\n $link = '?' . http_build_query($parameters);\n\n return $link;\n }",
"function simplesamlphp_get_entry_href ($view, $key, $entry = array()) {\n $raw = SimpleSAML\\Module::getModuleURL('core/show_metadata.php', array(\n 'set' => $key,\n 'entityid' => $entry['entityid'],\n ));\n\n return htmlspecialchars($raw);\n}",
"public function generateDocblock();",
"public function generateLink($params)\n {\n }",
"public function buildKey($key): string;",
"function updateDocmanLink($sessionKey, $group_id, $item_id, $title, $description, $status, $obsolescence_date, $content, $permissions, $metadata, $owner, $create_date, $update_date) {\n if ($content !== null) $extraParams['item']['link_url'] = $content;\n return _updateDocmanDocument($sessionKey, $group_id, $item_id, $title, $description, $status, $obsolescence_date, PLUGIN_DOCMAN_ITEM_TYPE_LINK, $permissions, $metadata, $owner, $create_date, $update_date, $extraParams); \n}",
"public function hasLinkTemplate($key);",
"public function output($key);",
"function add_note_link($module_key) {\r\n\r\n\treturn true;\r\n\r\n}",
"function findkey()\n\t{\n\t\t// Initialize variables\n\t\t$db = & JFactory::getDBO();\n\t\t$keyref = JRequest::getVar( 'keyref', null, 'default', 'cmd' );\n\t\tJRequest::setVar( 'keyref', $keyref );\n\n\t\t// If no keyref left, throw 404\n\t\tif ( empty( $keyref ) === true )\n\t\t{\n\t\t\tJError::raiseError( 404, JText::_( \"Key Not Found\" ) );\n\t\t}\n\n\t\t$keyref = $db->Quote( '%keyref=' . $db->getEscaped( $keyref, true ) . '%', false );\n\t\t$query = 'SELECT id' .\n\t\t\t\t\t\t' FROM #__content' .\n\t\t\t\t\t\t' WHERE attribs LIKE ' . $keyref;\n\t\t$db->setQuery( $query );\n\t\t$id = (int) $db->loadResult();\n\n\t\tif ( $id > 0 )\n\t\t{\n\t\t\t// Create the view\n\t\t\t$view = & $this->getView( 'article', 'html' );\n\n\t\t\t// Get/Create the model\n\t\t\t$model = & $this->getModel( 'Article' );\n\n\t\t\t// Set the id of the article to display\n\t\t\t$model->setId( $id );\n\n\t\t\t// Push the model into the view (as default)\n\t\t\t$view->setModel( $model, true );\n\n\t\t\t// Display the view\n\t\t\t$view->display();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tJError::raiseError( 404, JText::_( 'Key Not Found' ) );\n\t\t}\n\n\t}"
]
| [
"0.6885762",
"0.632404",
"0.6261652",
"0.6214391",
"0.619343",
"0.6083077",
"0.6082882",
"0.5912607",
"0.5892871",
"0.5849717",
"0.58432573",
"0.5837815",
"0.57979935",
"0.5767185",
"0.57078314",
"0.5693553",
"0.56548554",
"0.56516445",
"0.5613801",
"0.55771536",
"0.55565697",
"0.5550322",
"0.55400133",
"0.55021685",
"0.5481191",
"0.5450167",
"0.5441051",
"0.5424817",
"0.5415926",
"0.5383799"
]
| 0.8161257 | 0 |
Returns variables to overload defaults from core/css/variables.scss | public function getScssVariables() {
return [
'color-primary' => '#745bca'
];
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function wp_scss_set_font_variables() {\n\n\t// Get the defaults.\n\tglobal $starter_default_fonts;\n\tglobal $starter_default_colors;\n\n\t// Create array of color variables.\n\t$variables = [];\n\n\tforeach ( $starter_default_colors as $key => $value ) {\n\n\t\t$variables[ $key ] = get_theme_mod( $key, $value );\n\n\t}\n\n\t// Create array of font variables.\n\tforeach ( $starter_default_fonts as $key => $value ) {\n\n\t\tif ( 'font-size-body' === $key || 'font-size-heading' === $key ) {\n\n\t\t\t// Add px to value if variable is font-size.\n\t\t\t$variables[ $key ] = sprintf( '%spx', get_theme_mod( $key, $value ) );\n\n\t\t} elseif ( 'font-weight-body' === $key || 'font-weight-heading' === $key ) {\n\n\t\t\t// Convert 'regular' to 400 for valid CSS.\n\t\t\tif ( 'regular' === get_theme_mod( $key ) ) {\n\t\t\t\t$variables[ $key ] = '400';\n\t\t\t} else {\n\t\t\t\t$variables[ $key ] = get_theme_mod( $key, $value );\n\t\t\t}\n\t\t} else {\n\n\t\t\t// All other variables.\n\t\t\t$variables[ $key ] = get_theme_mod( $key, $value );\n\n\t\t}\n\t}\n\treturn $variables;\n\n}",
"function css_variables(/*group, value, value, value = array()*/)\n{\n\t$CI = &get_instance();\n\t// get args\n\t$args = func_get_args();\n\tif(count($args) == 1)\n\t{\n\t\t$args = $args[0];\n\t}\n\t// assign args to class\n\t$CI->css->variables($args);\n}",
"public static function getDefaultVars(){\n\t\treturn Array(\n\t\t\t//--whether to output debug messages for this class\n\t\t\t'debug'=> false\n\t\t\t,'contentRelativePath'=> '_content'\n\t\t\t,'host'=> ($_SERVER['SERVER_NAME']) ? $_SERVER['SERVER_NAME'] : $_SERVER['PWD']\n\t\t\t,'webRoot'=> ($_SERVER['DOCUMENT_ROOT']) ? $_SERVER['DOCUMENT_ROOT'] : $_SERVER['PWD']\n\t\t\t,'wpRelativePath'=> '_wp'\n\t\t\t,'protocol'=> (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS']) ? 'https' : 'http'\n\t\t);\n\t}",
"public function get_variables_for_css() {\n\t\t$data = '';\n\n\t\tif ( ! empty( $this->skin_palettes_config ) && is_array( $this->skin_palettes_config ) ) {\n\t\t\t$palette = $this->skin_palettes_config ['palette'];\n\n\t\t\tforeach ( $palette as $variable ) {\n\n\t\t\t\t$color_name = static::SKIN_COLOR_VARIABLE_PREFIX . $variable['id'];\n\n\t\t\t\tif ( ! empty( $variable['hsla_code'] ) && ! empty( $variable['hsla_vars'] ) && is_array( $variable['hsla_vars'] ) ) {\n\t\t\t\t\t$data .= $color_name . ':' . $variable['hsla_code'] . ';';\n\n\t\t\t\t\tforeach ( $variable['hsla_vars'] as $var => $css_variable ) {\n\t\t\t\t\t\t$data .= $color_name . '-' . $var . ':' . $css_variable . ';';\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$data .= $color_name . ':' . $variable['color'] . ';';\n\n\t\t\t\t\tif ( function_exists( 'tve_rgb2hsl' ) && function_exists( 'tve_print_color_hsl' ) ) {\n\t\t\t\t\t\t$data .= tve_print_color_hsl( $color_name, tve_rgb2hsl( $variable['color'] ) );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif ( function_exists( 'tve_prepare_master_variable' ) ) {\n\t\t\t$palettes = $this->get_smart_lp_palettes_v2();\n\t\t\t$active_id = (int) $palettes['active_id'];\n\t\t\t$master_variable = $palettes['palettes'][ $active_id ]['modified_hsl'];\n\t\t\t$general_master_variable = tve_prepare_master_variable( array( 'hsl' => $master_variable ) );\n\t\t\t$theme_master_variable = str_replace( '--tcb-main-master', '--tcb-theme-main-master', $general_master_variable );\n\n\t\t\t$data .= $general_master_variable;\n\t\t\t$data .= $theme_master_variable;\n\t\t}\n\n\t\treturn $data;\n\t}",
"protected function CustomVariables ()\r\n\t{\r\n\t\t// Overwrite variables if you want them custom\r\n\t\t$this->Set ('autoload', true);\r\n\t\t$this->Set ('enable_query_strings', false);\r\n\t\t\r\n\t\t// Add your own variables\r\n\t\t$this->Set ('database_host', 'localhost');\r\n\t\t$this->Set ('database_user', 'database_username');\r\n\t\t$this->Set ('database_pass', 'database_password');\r\n\t\t$this->Set ('database_name', 'database_name');\r\n\t\t$this->Set ('database_prefix', 'database_prefix');\r\n\t}",
"public function getDefaultVars() {\n\t\t$ret = array();\n\t\tforeach ($this->_vars as $key => $var) {\n\t\t\t$ret[$key] = $var->defaultValue;\n\t\t}\n\t\treturn $ret;\n\t}",
"public static function getDefaultVars()\n {\n return [\n 'posts_per_page' => 15,\n 'topics_per_page' => 15,\n 'hot_threshold' => 20,\n 'email_from' => '', // use system default email\n 'url_ranks_images' => \"ranks\",\n 'post_sort_order' => 'ASC',\n 'log_ip' => false,\n 'extendedsearch' => false,\n 'm2f_enabled' => false,\n 'favorites_enabled' => false,\n 'removesignature' => false,\n 'striptags' => false,\n 'hooks' => ['providers' => [], 'subscribers' => []],\n 'rss2f_enabled' => false,\n 'timespanforchanges' => 24,\n 'forum_enabled' => true,\n 'forum_disabled_info' => 'Sorry! The forums are currently off-line for maintenance. Please try later.',\n 'signaturemanagement' => false,\n 'signature_start' => '--',\n 'signature_end' => '--',\n 'showtextinsearchresults' => false,\n 'minsearchlength' => 3,\n 'maxsearchlength' => 30,\n 'fulltextindex' => false,\n 'solved_enabled' => false,\n 'ajax' => false,\n 'striptagsfromemail' => false,\n 'indexTo' => '',\n 'notifyAdminAsMod' => 2,\n 'defaultPoster' => 2,\n 'onlineusers_moderatorcheck' => false,\n 'forum_subscriptions_enabled' => false,\n 'topic_subscriptions_enabled' => false,\n ];\n }",
"public static function get_template_global_variables()\n {\n return [\n 'FoxyStripe' => 'current_foxystripe_setting',\n ];\n }",
"public function custom_color_variables() {\n\t\tif ( 'd1e4dd' !== strtolower( get_theme_mod( 'background_color', 'D1E4DD' ) ) ) {\n\t\t\twp_add_inline_style( 'twenty-twenty-one-style', $this->generate_custom_color_variables() );\n\t\t}\n\t}",
"function haira_setup_scss_vars ($contents, $custom_vars) {\n $linenum = 0;\n foreach($contents as $key=>$line)\n {\n if (preg_match('/[ ]*([\\/]{2})?[ ]*(.*?):(.*?);/is', $line, $matches))\n { \n $varName = trim(substr($matches[2], 1));\n $varValue = $matches[3];\n \n if ( isset ( $custom_vars[$varName] ) && $custom_vars[$varName] != '' ) {\n $contents[ $key ] = '$' . $varName . ': ' . $custom_vars[ $varName ] . \";\\n\";\n }\n \n }\n }\n\n return implode($contents);\n\n}",
"public static function GetDefaultThemeInformation()\n\t{\n\t\treturn array(\n\t\t\t'name' => 'light-grey',\n\t\t\t'parameters' => array(\n\t\t\t\t'variables' => array(),\n\t\t\t\t'imports' => array(\n\t\t\t\t\t'css-variables' => '../css/css-variables.scss',\n\t\t\t\t),\n\t\t\t\t'stylesheets' => array(\n\t\t\t\t\t'jqueryui' => '../css/ui-lightness/jqueryui.scss',\n\t\t\t\t\t'main' => '../css/light-grey.scss',\n\t\t\t\t),\n\t\t\t),\n\t\t);\n\t}",
"public function editor_custom_color_variables() {\n\t\twp_enqueue_style(\n\t\t\t'twenty-twenty-one-custom-color-overrides',\n\t\t\tget_theme_file_uri( 'assets/css/custom-color-overrides.css' ),\n\t\t\tarray(),\n\t\t\t(string) filemtime( get_theme_file_path( 'assets/css/custom-color-overrides.css' ) )\n\t\t);\n\n\t\t$background_color = get_theme_mod( 'background_color', 'D1E4DD' );\n\t\tif ( 'd1e4dd' !== strtolower( $background_color ) ) {\n\t\t\twp_add_inline_style( 'twenty-twenty-one-custom-color-overrides', $this->generate_custom_color_variables( 'editor' ) );\n\t\t}\n\t}",
"function gc_theme_defaults( $defaults ) {\n\n\t$defaults['blog_cat_num'] = 5;\n\t$defaults['content_archive'] = 'excerpts';\n\t$defaults['content_archive_limit'] = 0;\n\t$defaults['content_archive_thumbnail'] = 1;\n\t$defaults['posts_nav'] = 'numeric';\n\t$defaults['site_layout'] = 'content-sidebar';\n\n\treturn $defaults;\n\n}",
"public function default_styles()\n {\n if( ! is_array(self::$styles))\n {\n self::$styles = array();\n }\n self::$styles[]= 'modules/xview/vendor/bluetrip/css/screen.css';\n self::$styles[]= 'modules/xview/vendor/superfish/css/superfish.css';\n self::$styles[]= 'modules/xview/vendor/superfish/css/superfish-navbar.css';\n self::$styles[]= 'modules/xview/vendor/jqueryui/css/flick/jquery-ui-1.8.4.custom.css';\n self::$styles[]= 'modules/xview/media/xhtml.css';\n\n }",
"public function outputCssVariablesInline(): void\n\t{\n\t\techo Components::outputCssVariablesInline(); // phpcs:ignore\n\t}",
"function defineConstants() {\n define('Terminus', true);\n $default_constants = Yaml::parse(\n file_get_contents(TERMINUS_ROOT . '/config/constants.yml')\n );\n foreach ($default_constants as $var_name => $default) {\n if (isset($_SERVER[$var_name]) && ($_SERVER[$var_name] != '')) {\n define($var_name, $_SERVER[$var_name]);\n } else if (!defined($var_name)) {\n define($var_name, $default);\n }\n }\n date_default_timezone_set(TERMINUS_TIME_ZONE);\n\n if (!defined('TERMINUS_SCRIPT')) {\n define('TERMINUS_SCRIPT', 'php/Terminus.php');\n }\n}",
"public function get_customizer_color_vars() {\n\n\t\t$colors = [\n\t\t\t'content' => [\n\t\t\t\t'setting' => 'background_color',\n\t\t\t],\n\t\t\t'header-footer' => [\n\t\t\t\t'setting' => 'header_footer_background_color',\n\t\t\t],\n\t\t];\n\t\treturn $colors;\n\t}",
"protected function getVariablesComment()\n {\n return '<p><p><b>' . __('Template variables') . '</b><br>' .\n '<p>[attribute] — e.g. [name], [price], [manufacturer], [color] — '\n . __('will be replaced with the respective product attribute value or removed if value is not available') . '<br>' .\n '<p>[attribute1|attribute2|...] — e.g. [manufacturer|brand] — ' .\n __('if the first attribute value is not available for the product the second will be used and so on untill it finds a value') . '<br>' .\n '<p>[prefix {attribute} suffix] or<br><p>[prefix {attribute1|attribute2|...} suffix] — e.g. [({color} color)] — ' .\n __('if an attribute value is available it will be prepended with prefix and appended with suffix, either prefix or suffix can be used alone') . '.<br>';\n }",
"function genesis_extender_custom_css_options_defaults()\n{\t\n\t$defaults = array(\n\t\t'custom_css' => '',\n\t\t'css_builder_popup_active' => 0\n\t);\n\t\n\treturn apply_filters( 'genesis_extender_custom_css_options_defaults', $defaults );\n}",
"function beaver_extender_custom_css_options_defaults() {\n\t\n\t$defaults = array(\n\t\t'custom_css' => '',\n\t\t'css_builder_popup_active' => 0\n\t);\n\t\n\treturn apply_filters( 'beaver_extender_custom_css_options_defaults', $defaults );\n\t\n}",
"public static function get_template_global_variables()\n {\n return [\n 'TemplateConfig' => 'current_template_config',\n ];\n }",
"public static function variables(): array\n {\n return [\n Variable::make('sorts', __('Array of available sorting')),\n\n Variable::make('directions', __('Array of sort directions')),\n\n Variable::make('items', __('HTML generated of blog items')),\n\n Variable::make('pagination', __('HTML generated of pagination links')),\n ];\n }",
"function get_less_variables($instance){\n\t\t$less_vars = array();\n\t\tif(isset($instance[\"background_color\"])) $less_vars[\"background_color\"] = $instance[\"background_color\"];\n\t\treturn $less_vars;\n\t}",
"public function type_vars( ){\n\t\t\n\t\tglobal $disabled_settings;\n\t\t$alt = false;\n\t\tif ( is_array( $disabled_settings ) )\n\t\t\tif( !empty( $disabled_settings['typography'] ) )\n\t\t\t\t$alt = true;\n\t\t\n\t\t$vars = array(\n\t\t\t'plBaseFont'\t\t=> ($alt) ? '\"Helvetica\" Arial, serif' : pl_type_el('type_primary', 'stack'), \n\t\t\t'plBaseWeight'\t\t=> pl_type_el('type_primary', 'weight'), \n\t\t\t'plAltFont'\t\t\t=> ($alt) ? '\"Helvetica\" Arial, serif' : pl_type_el('type_secondary', 'stack'), \n\t\t\t'plAltWeight'\t\t=> pl_type_el('type_secondary', 'weight'), \n\t\t\t'plHeaderFont'\t\t=> ($alt) ? '\"Helvetica\" Arial, serif' : pl_type_el('type_headers', 'stack'), \n\t\t\t'plHeaderWeight'\t=> pl_type_el('type_headers', 'weight'),\n\t\t);\n\t\treturn $vars;\n\t}",
"protected function addBootstrapVariables()\n {\n $objFile = new \\File($this->getBootstrapSrc('variables.less'));\n\n $strVariables = '';\n\n if ($objFile->size > 0)\n {\n $strVariables = $objFile->getContent();\n }\n\n if (!is_array($this->variablesOrderSRC))\n {\n return;\n }\n\n $objTarget = new \\File($this->getBootstrapCustomSrc($this->variablesSrc));\n\n // overwrite bootstrap variables with custom variables\n $objFilesModels = \\FilesModel::findMultipleByUuids($this->variablesOrderSRC);\n\n if ($objFilesModels !== null)\n {\n while ($objFilesModels->next())\n {\n $objFile = new \\File($objFilesModels->path);\n $strContent = $objFile->getContent();\n\n if ($this->isFileUpdated($objFile, $objTarget))\n {\n $this->rewrite = true;\n $this->rewriteBootstrap = true;\n if ($strContent)\n {\n $strVariables .= \"\\n\" . $strContent;\n }\n }\n else\n {\n $strVariables .= \"\\n\" . $strContent;\n }\n }\n }\n\n if ($this->rewriteBootstrap)\n {\n $objTarget->write($strVariables);\n $objTarget->close();\n }\n\n $this->objLess->parse($strVariables);\n }",
"function get_customizer_settings() {\n\tglobal $style_defaults;\n\t$styles = [];\n\t$styles[ WPM_PREFIX . 'customization_general' ] = get_option(\n\t\tWPM_PREFIX . 'customization_general',\n\t\t$style_defaults[ WPM_PREFIX . 'customization_general' ]\n\t);\n\t$styles [ WPM_PREFIX . 'mobject_style' ] = get_option(\n\t\tWPM_PREFIX . 'mobject_style',\n\t\t$style_defaults[ WPM_PREFIX . 'mobject_style' ]\n\t);\n\t$styles [ WPM_PREFIX . 'collection_style' ] = get_option(\n\t\tWPM_PREFIX . 'collection_style',\n\t\t$style_defaults[ WPM_PREFIX . 'collection_style' ]\n\t);\n\n\tforeach ( $style_defaults as $group_name => $group ) {\n\t\tforeach ( $group as $setting => $default ) {\n\t\t\tif ( ! isset( $styles[ $group_name ][ $setting ] ) ) {\n\t\t\t\t$styles[ $group_name ][ $setting ] = $style_defaults[ $group_name ][ $setting ];\n\t\t\t}\n\t\t}\n\t}\n\n\treturn $styles;\n}",
"static public function get_template_global_variables() {\n\t\treturn array\n\t\t(\n\t\t\t\"FacebookConnectURL\" => \"connect_url\",\n\t\t\t\"FacebookLoginURL\" => \"login_url\",\n\t\t\t\"FacebookDisconnectURL\" => \"disconnect_url\"\n\t\t);\n\t}",
"function genesis_sample_theme_defaults( $defaults ) {\n\n\t$defaults['blog_cat_num'] = 6;\n\t$defaults['content_archive'] = 'full';\n\t$defaults['content_archive_limit'] = 0;\n\t$defaults['content_archive_thumbnail'] = 0;\n\t$defaults['posts_nav'] = 'numeric';\n\t$defaults['site_layout'] = 'content-sidebar';\n\n\treturn $defaults;\n\n}",
"function MODULESHORTHAND_f5_overridden_variables_view() {\n $settings_files = _MODULESHORTHAND_f5_get_our_setting_files();\n $db_vars = array_map('unserialize', db_query('SELECT name, value FROM {variable}')->fetchAllKeyed());\n\n $rows = array();\n foreach ($settings_files as $filename => $path) {\n // Trickery I know. Keep in mind that the $conf var here is local.\n include $path;\n foreach ($conf as $key => $value) {\n if (isset($db_vars[$key]) && $db_vars[$key] != $value) {\n // FALSE will be shown as nothing, so make the output a little more\n // readable by making it look like what comes out of the DB.\n if (is_bool($value)) {\n $value = $value ? 1 : 0;\n }\n // Use $key as key in the table array as an easy way to get unique\n // array entries reflecting the overrides the files can have too.\n $rows[$key] = array($filename, $key, $value, $db_vars[$key]);\n }\n }\n }\n\n if (!empty($rows)) {\n $output = '<p>' . t('Variables that can be seen in this page are variables that we have in settings files, but have overrides in the database.') . '</p>';\n return $output . theme('table', array(\n 'header' => array(\n t('Filename'),\n t('Variable'),\n t('File value'),\n t('Database value'),\n ),\n 'rows' => $rows,\n ));\n }\n return t('There are no variable overrides');\n}",
"function load_default_vars()\r\n {\r\n parent::load_default_vars();\r\n $this->vars['URL_REPOS'] = '//your-private-repos-server/repos/'; // Unnecessary\r\n $this->vars['URL_RSC'] = $this->vars['URL_ASSETS'] . $this->manifest['activity_current'] . '/';\r\n }"
]
| [
"0.71115303",
"0.66057557",
"0.6466062",
"0.63583344",
"0.6246334",
"0.6243435",
"0.6101464",
"0.597163",
"0.5958315",
"0.5900788",
"0.58901644",
"0.5856367",
"0.5819409",
"0.57871747",
"0.5755374",
"0.5726822",
"0.56927145",
"0.56634414",
"0.5653974",
"0.56538546",
"0.5643788",
"0.5615536",
"0.5613333",
"0.56056225",
"0.55941397",
"0.5574425",
"0.5572681",
"0.55713844",
"0.5564494",
"0.55614597"
]
| 0.74441427 | 0 |
Creates a form to delete a justicium entity. | private function createDeleteForm(Justicia $justicium)
{
return $this->createFormBuilder()
->setAction($this->generateUrl('justicia_delete', array('id' => $justicium->getId())))
->setMethod('DELETE')
->getForm()
;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function createDeleteForm(Indicateur $indicateur) {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('indicateur_delete', array('id' => $indicateur->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }",
"private function createDeleteForm(Dependencia $dependencium)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('dependencia_delete', array('id' => $dependencium->getId())))\n ->setMethod('DELETE')\n ->getForm();\n }",
"private function createDeleteForm(NatureOp $priorite)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('back_natureop_delete', array('id' => $priorite->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }",
"public function deleteForm()\n\t{\n\t\t$form = new \\IPS\\Helpers\\Form( 'form', 'delete' );\n\t\t$form->addMessage( 'node_delete_blurb_no_content' );\n\t\t\n\t\treturn $form;\n\t}",
"private function createDeleteForm(Frequencia $frequencium)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('cadastro_frequencia_delete', array('id' => $frequencium->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }",
"private function createDeleteForm(Cancion $cancion)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('cancion_delete', array('id' => $cancion->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }",
"private function createDeleteForm($id,$idcupo)\n {\n\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('liquidaciones_delete', array('id' => $id,'idcupo'=>$idcupo)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Delete','attr' => array('class' => 'form-control')))\n ->getForm()\n ;\n }",
"private function createDeleteForm(FroFacTransferencia $froFacTransferencium)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('frofactransferencia_delete', array('id' => $froFacTransferencium->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }",
"private function createDeleteForm(SvCfgDisenio $SvCfgDisenio)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('Svcfgdisenio_delete', array('id' => $SvCfgDisenio->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }",
"private function createDeleteForm(Etat_civil $etat_civil)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('etat_civil_delete', array('id' => $etat_civil->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }",
"private function createDeleteForm(Covoiturage $covoiturage)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('personnel_covoiturage_delete', array('id' => $covoiturage->getId())))\n ->setMethod('DELETE')\n ->getForm();\n }",
"protected function createComponentDeleteForm()\r\n\t{\r\n\t\t$form = new Form;\r\n\t\t$form->addSubmit('delete', 'Smazat')->setAttribute('class', 'default');\r\n\t\t$form->addSubmit('cancel', 'Storno');\r\n\t\t$form->onSuccess[] = callback($this, 'deleteFormSubmitted');\r\n\t\t$form->addProtection(self::MESS_PROTECT);\r\n\t\treturn $form;\r\n\t}",
"private function createDeleteForm(voyageur $voyageur)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('voyageur_delete', array('id' => $voyageur->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }",
"public function deleteAction() : object\n {\n $page = $this->di->get(\"page\");\n $form = new DeleteForm($this->di);\n $form->check();\n\n $page->add(\"questions/crud/delete\", [\n \"form\" => $form->getHTML(),\n ]);\n\n return $page->render([\n \"title\" => \"Delete an item\",\n ]);\n }",
"private function createDeleteForm(Historique $historique)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('historique_delete', array('id' => $historique->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }",
"private function createDeleteForm(Restricciones $restriccione)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('restricciones_delete', array('id' => $restriccione->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }",
"private function createDeleteForm(Reactif $reactif)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('reactif_delete', array('numreact' => $reactif->getNumreact())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }",
"private function createDeleteForm ( Maileguak $maileguak )\n {\n return $this->createFormBuilder()\n ->setAction( $this->generateUrl( 'maileguak_delete', array ('id' => $maileguak->getId()) ) )\n ->setMethod( 'DELETE' )\n ->getForm();\n }",
"private function createDeleteForm($id) {\r\n return $this->createFormBuilder()\r\n ->setAction($this->generateUrl('rubrique_delete', array('id' => $id)))\r\n// ->setMethod('DELETE')\r\n ->add('submit', SubmitType::class, array('label' => 'Supprimer la rubrique courante'))\r\n ->getForm()\r\n ;\r\n }",
"private function createDeleteForm(Contabilizar $contabilizar)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('contabilizar_delete', array('id' => $contabilizar->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }",
"private function createDeleteForm(Estancia $estancium)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('estancia_delete', array('id' => $estancium->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }",
"private function createDeleteForm(Funcionario $funcionario)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('funcionario_delete', array('id' => $funcionario->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }",
"private function createDeleteForm(Entreprise $entreprise)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('entreprise_delete', array('id' => $entreprise->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }",
"private function createDeleteForm(Plateformes $plateforme)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('administration_plateformes_delete', array('id' => $plateforme->getId())))\n ->setMethod('DELETE')\n ->getForm();\n }",
"private function createDeleteForm(Acteur $acteur)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('acteur_delete_homepage', array('id' => $acteur->getId())))\n ->setMethod('DELETE')\n ->getForm();\n }",
"private function createDeleteForm(Proeflessen $proeflessen)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('admin_proeflessen_delete', array('id' => $proeflessen->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }",
"private function createDeleteForm(Feuil $feuil)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('feuil_delete', array('id' => $feuil->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }",
"private function createDeleteForm(Motricidad $motricidad)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('motricidad_delete', array('idMotricidad' => $motricidad->getIdmotricidad())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }",
"private function createDeleteForm(Psycho $psycho)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('psycho_delete', array('id' => $psycho->getId())))\n ->setMethod('DELETE')\n ->getForm()\n ;\n }",
"private function createDeleteForm($id)\n {\n return $this->createFormBuilder()\n ->setAction($this->generateUrl('solmantenimientoidentificacion_delete', array('id' => $id)))\n ->setMethod('DELETE')\n ->add('submit', 'submit', array('label' => 'Borrar','attr'=>array('class'=>'btn btn-danger btn btn-danger btn-lg btn-block')))\n ->getForm()\n ;\n }"
]
| [
"0.7565924",
"0.7354222",
"0.7341708",
"0.72316676",
"0.7150517",
"0.71355915",
"0.70999205",
"0.70867336",
"0.70777845",
"0.7053388",
"0.69993454",
"0.6972959",
"0.6926406",
"0.69212687",
"0.69024855",
"0.6899233",
"0.6884797",
"0.6874771",
"0.6871098",
"0.68676955",
"0.6859154",
"0.6852963",
"0.68153113",
"0.68135417",
"0.6811543",
"0.6803918",
"0.6799803",
"0.67840725",
"0.67819786",
"0.6781629"
]
| 0.7891954 | 0 |
Fetches the FE user groups (fe_groups) of the logged in FE user | static public function fetchFeGroups ()
{
$result = [];
if (
isset($GLOBALS['TSFE']->fe_user) &&
isset($GLOBALS['TSFE']->fe_user->user) &&
isset($GLOBALS['TSFE']->fe_user->user['usergroup'])
) {
$result = explode(',', $GLOBALS['TSFE']->fe_user->user['usergroup']);
}
return $result;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private function getGroups()\n {\n $where = '';\n if ($this->userGroups)\n {\n $groups = explode(',', $this->userGroups);\n $where .= \" uid IN ('\" . implode(\"','\", $groups) . \"') \";\n }\n $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'fe_groups', $where);\n $res = array();\n while (($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result)))\n {\n $res[$row['uid']] = $row;\n }\n\n $this->loadGroupIcons($res);\n\n return $res;\n }",
"public function getUserGroups()\n\t{\n\t\tself::authenticate();\n\n\t\t$uname = FormUtil::getPassedValue('user', null);\n\t\tif($uname == null) {\n\t\t\treturn self::retError('ERROR: No user name passed!');\n\t\t}\n\n\t\t$uid = UserUtil::getIdFromName($uname);\n\t\tif($uid == false) {\n\t\t\treturn self::ret(false);\n\t\t}\n\n\t\t$groups = UserUtil::getGroupsForUser($uid);\n\t\t$return = array();\n\t\tforeach($groups as $item) {\n\t\t\t$group = UserUtil::getGroup($item);\n\t\t\t$return[] = $group['name'];\n\t\t}\n\t\tif(SecurityUtil::checkPermission('Owncloud::Admin', '::', ACCESS_MODERATE, $uid)) {\n\t\t\t$return[] = 'admin';\n\t\t}\n\t\treturn self::ret($return);\n\t}",
"function _get_usergroups($args = array()) {\n\t\treturn WP_Scoped_User_Anon::get_groups_for_user( -1 );\n\t}",
"public function getUserGroups()\n\t{\n\t\t\n\t\t$groups = array();\n\t\t$db \t= $this->getUserDbTable();\n\t\t$id \t= $this->getUserId();\n\t\t\n\t\tif ($id)\n\t\t{\t\n\t\t\t$groups \t= $db->getAdapter()->select()->from(array('gmt'=>'groups_members_table'))\n\t\t\t\t\t\t\t\t\t\t ->joinInner(array('gt'=>'groups_table'), 'gmt.group_id = gt.group_id')\n\t\t\t\t\t\t\t\t\t\t ->where('gmt.user_id = ? ', $id)\n\t\t\t\t\t\t\t\t\t\t ->query()->fetchAll();\n\t\t}\t\n\t\t/* Automatically append group 0===Public group */\n\t\t$public \t\t= $db->getAdapter()->select()->from(array('gmt'=>'groups_table'))->where('group_privacy_level = ? ', 0)\n\t\t\t\t\t\t\t\t\t ->query()->fetch();\n\t\t$groups[] = $public;\n\t\t\n\t\treturn $groups;\n\t}",
"public function get_groups(){\n $group_users = private_party_group_user::search()->where('uid', $this->uid)->exec();\n $merged_groups = array();\n foreach($group_users as $group_user){\n /* @var $group_user private_party_group_user */\n $groups = $group_user->get_groups();\n $merged_groups = array_merge($merged_groups, $groups);\n }\n return $merged_groups;\n }",
"static public function readFeGroupsRecords ()\n {\n $result = false;\n $feGroups = static::fetchFeGroups();\n\n if (!empty($feGroups)) {\n $feGroupList = implode(',', $feGroups);\n $where_clause = 'uid IN (' . $feGroupList . ')';\n $result = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows(\n '*',\n 'fe_groups',\n $where_clause\n );\n }\n return $result;\n }",
"function getGroups()\n {\n//\t\t$this->_groups = array();\n if ( empty( $this->_groups ) ) {\n $member_handler = &zarilia_gethandler( 'member' );\n if ( $this->getVar( 'uid' ) ) {\n $this->_groups = $member_handler->getGroupsByUser( $this->getVar( 'uid' ) );\t\t\t\t\n } else {\n $this->_groups = array( 0 => ZAR_GROUP_ANONYMOUS );\n }\n }\t\t\n return $this->_groups;\n }",
"public static function getCurrentUserGroups()\n {\n return self::getUserGroups();\n }",
"function _get_user_groups(){\r\n $groups = array();\r\n for($i=0; $i<get_sso_option('rules_number'); $i++){\r\n $rule = _get_rule($i);\r\n if($rule != FALSE){\r\n\t $is_group = _run_rule($rule['var'], $rule['regexp'], $rule['group']);\r\n\t if($is_group === TRUE) $groups[] = $rule['group'];\r\n }\r\n }\r\n return $groups;\r\n}",
"static function getUserGroups(){\n \n }",
"public function listGroups($user) {\n return $user->groups;\n }",
"function getAllAffinityGroupsFromUser()\n {\n $conn = new DBConnect();\n $dbObj = $conn->getDBConnect();\n $this->DAO = new AffinityGroupDAO($dbObj);\n $this->DAO2 = new SecurityDAO($dbObj);\n $username = Session::get('currentUser');\n $userID = $this->DAO2->getUserIDByUsername($username);\n return $this->DAO->getAllAffinityGroupsFromUser($userID);\n }",
"protected function _get_usergroup_list()\n {\n $results = $this->connection->query('SELECT gid,title FROM ' . $this->connection->get_table_prefix() . 'usergroups');\n $mod_results = array();\n foreach ($results as $key => $value) {\n $mod_results[] = array('group_id' => $value['gid'], 'group_name' => $value['title']);\n }\n $results2 = collapse_2d_complexity('group_id', 'group_name', $mod_results);\n return $results2;\n }",
"public function getUserGroups()\n {\n $query = \"SELECT groupName FROM UserGroupAccess\";\n if(($result = $this->getQuery($query,true)) != NULL)\n {\n return $result;\n }\n else\n return false;\n }",
"public function get_groups()\n\t{\n\t\tif (empty($this->user))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\treturn array(array('UniGroup', $this->user[static::_column('group')]));\n\t}",
"function getGroupList() {\n return getAll(\"SELECT * FROM `group` WHERE admin_id = ?\", [getLogin()['uid']]);\n}",
"public function getGroups() {\r\n // Array to hold the group objects\r\n $groups = [];\r\n // Loop through each of the groups the user belongs to\r\n foreach ($this->groups as $group) {\r\n // Get the group from the database\r\n $grp = UserGroup::getByName($group);\r\n // If the group has a valid ID (not 0 or less)\r\n if ($grp->id != 0) {\r\n // Add the group to the array\r\n $groups[] = $grp;\r\n }\r\n }\r\n // Return the groups array\r\n return $groups;\r\n }",
"public function getAllGroups(){\n // Get list\n $lists = array(); \n $data = Group::where('account_id', $this->getAccountId()) \n ->where('user_id', $this->user_id)\n ->get() \n ->toArray();\n $lists = $data;\n return $lists;\n }",
"protected function readGroups() {\n\t\tif ($this->items) {\n\t\t\t$sql = \"SELECT\t\tuser_group.*, (SELECT COUNT(*) FROM wcf\".WCF_N.\"_user_to_groups WHERE groupID = user_group.groupID) AS members\n\t\t\t\tFROM\t\twcf\".WCF_N.\"_group user_group\n\t\t\t\tORDER BY\t\".($this->sortField != 'members' ? 'user_group.' : '').$this->sortField.\" \".$this->sortOrder;\n\t\t\t$result = WCF::getDB()->sendQuery($sql, $this->itemsPerPage, ($this->pageNo - 1) * $this->itemsPerPage);\n\t\t\twhile ($row = WCF::getDB()->fetchArray($result)) {\n\t\t\t\t$row['deletable'] = (!WCF::getUser()->getPermission('admin.user.canDeleteGroup') || Group::isMember($row['groupID']) || !Group::isAccessibleGroup($row['groupID']) || $row['groupType'] == Group::EVERYONE || $row['groupType'] == Group::GUESTS || $row['groupType'] == Group::USERS) ? 0 : 1;\n\t\t\t\t$row['editable'] = (WCF::getUser()->getPermission('admin.user.canEditGroup') && Group::isAccessibleGroup($row['groupID'])) ? 1 : 0;\n\t\t\t\t\n\t\t\t\t$this->groups[] = $row;\n\t\t\t}\n\t\t}\n\t}",
"public function getUserGroups($userId){\n $query = \"SELECT * FROM groups g JOIN user_groups ug \n ON g.id = ug.groupId\n WHERE ug.userId='$userId' ORDER BY g.groupName;\";\n return $this->getData($query);\n }",
"public static function getGroups($idUser){ \r\n $user = self::findUser($idUser); \r\n $groups = $user->groups;\r\n foreach ($groups as $key => &$value) {\r\n $value['role_id'] = $value->pivot->role_id;\r\n $value['role'] = Role::find($value->pivot->role_id)->name;\r\n unset($value->pivot);\r\n }\r\n return $groups;\r\n }",
"function getGroups($username){\r\n\t\t//SELEZIONO DAL DATABASE L'ELENCO DEI GRUPPI AI QUALI L'UTENTE APPARTIENE\r\n\t\t$sql = \"SELECT groupname FROM \".$this->schema.\".user_group WHERE username='$username'\";\r\n\t\tprint_debug($sql,null,'tabella');\r\n\t\tif($this->db->sql_query($sql)){\t\t//STRUTTURA GRUPPI GISCLIENT\r\n\t\t\t$ris=$this->db->sql_fetchlist('groupname');\r\n\t\t\tif(!$ris) {\r\n\t\t\t\t$this->error->getError(\"C001\");\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\tforeach($ris as $g){\r\n\t\t\t\t$this->groups[]=$g;\r\n\t\t\t}\r\n\t\t\treturn $this->groups;\r\n\t\t}\r\n\t\telse{\r\n\t\t\t$this->error->setNote($sql);\r\n\t\t\t$this->error->getError(\"1\");\t\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"public function getGroups()\n {\n if ($this->_oGroups == null && $sOxid = $this->getId()) {\n // usergroups\n $this->_oGroups = oxNew('oxlist', 'oxgroups');\n $sViewName = getViewName(\"oxgroups\", $this->getLanguage());\n $sSelect = \"select {$sViewName}.* from {$sViewName}, oxobject2group \";\n $sSelect .= \"where oxobject2group.oxobjectid='$sOxid' \";\n $sSelect .= \"and oxobject2group.oxgroupsid={$sViewName}.oxid \";\n $this->_oGroups->selectString($sSelect);\n }\n\n return $this->_oGroups;\n }",
"function get_all_user_group()\n {\n $user_group = $this->db->query(\"\n SELECT\n *\n\n FROM\n `groups`\n\n WHERE\n 1 = 1\n AND gro_id != 1\n\n ORDER BY `gro_id` DESC\n \")->result_array();\n\n return $user_group;\n }",
"public function groups()\n {\n $return = ['everyone'];\n\n $groups = GroupMember::where('user_id', $this->id())\n ->sort('`group` ASC')\n ->all();\n\n foreach ($groups as $group) {\n $return[] = $group->group;\n }\n\n return $return;\n }",
"public function adminHasRetrievedGroupListUsingTheGraphApi(): array {\n\t\t$response = GraphHelper::getGroups(\n\t\t\t$this->featureContext->getBaseUrl(),\n\t\t\t$this->featureContext->getStepLineRef(),\n\t\t\t$this->featureContext->getAdminUsername(),\n\t\t\t$this->featureContext->getAdminPassword()\n\t\t);\n\t\tif ($response->getStatusCode() === 200) {\n\t\t\t$jsonResponseBody = $this->featureContext->getJsonDecodedResponse($response);\n\t\t\treturn $jsonResponseBody[\"value\"];\n\t\t} else {\n\t\t\t$this->throwHttpException($response, \"Could not retrieve groups list.\");\n\t\t}\n\t}",
"protected static function getFrontendUserGroupIds(): array\n {\n $feGroupIds = [];\n $feUserId = (int)$GLOBALS['TSFE']->fe_user->user['uid'];\n if ($feUserId) {\n $frontendUserRepository = GeneralUtility::makeInstance(\n FrontendUserRepository::class\n );\n $feUser = $frontendUserRepository->findByUid($feUserId);\n $feGroups = $feUser->getUsergroup();\n if ($feGroups) {\n foreach ($feGroups as $feGroup) {\n $feGroupIds[] = $feGroup->getUid();\n }\n }\n }\n return $feGroupIds;\n }",
"private function getUserGroups($userID)//this function should be moved to the UserVo\n\t{\n\t\t$db = Zend_Registry::get('db');\n\t\t\n\t\t$select = $db->select()\n\t\t\t\t\t->from(PrecurioTableConstants::USER_GROUPS,'group_id')\n\t\t\t\t\t->join(PrecurioTableConstants::GROUPS,'user_groups.group_id = groups.id','')\n\t\t\t\t\t->where('user_id= ?',$userID)\n\t\t\t\t\t->where ('active= ?',true);\n\t\t\t\t\t\n\t\t$stmt = $select->query();\n\t\t\n\t\t$stmt->setFetchMode(Zend_Db::FETCH_NUM);\n\t\t\n\t\t$userGroups = $stmt->fetchAll();\n\t\t$userGroups = Precurio_Utils::getSecondLevelArray($userGroups,0);\n\t\treturn $userGroups;\n\t}",
"public function getUserGroupMemberShip($userId)\n {\n return $this->_userDao->getGroupList($userId);\n }",
"function getUsersGroups($mysqli,$userID){\r\n $result = $mysqli->query(\"SELECT groups.*, group_members.isAdmin FROM `group_members` RIGHT JOIN groups ON group_members.group_ID = groups.ID WHERE Member_ID = \".$userID.\"\");\r\n $groups = array();\r\n\r\n $i=0;\r\n while($row = $result->fetch_row()){\r\n $g = new group();\r\n $g->groupID = $row[0];\r\n $g->name = $row[1];\r\n $g->description = $row[2];\r\n $g->website = $row[3];\r\n $g->private = $row[4];\r\n $g->type = $row[5];\r\n $g->sport = $row[6];\r\n $g->logoURL = $row[7];\r\n $g->city = $row[8];\r\n $g->userIsAdmin = $row[9];\r\n $groups[$i] = $g;\r\n $i++;\r\n }\r\n return $groups;\r\n }"
]
| [
"0.73203427",
"0.72411937",
"0.7110806",
"0.70966804",
"0.6991979",
"0.69108355",
"0.6858293",
"0.683968",
"0.68328565",
"0.68182594",
"0.67765075",
"0.6734005",
"0.6715941",
"0.6677012",
"0.66682076",
"0.6649335",
"0.66362655",
"0.6630931",
"0.6619236",
"0.6615782",
"0.6601825",
"0.6585816",
"0.6542896",
"0.65210664",
"0.6485964",
"0.6475293",
"0.64601904",
"0.64550453",
"0.6453332",
"0.64493865"
]
| 0.80179447 | 0 |
Fetches the FE user groups (fe_groups) of the logged in FE user as an array of record | static public function readFeGroupsRecords ()
{
$result = false;
$feGroups = static::fetchFeGroups();
if (!empty($feGroups)) {
$feGroupList = implode(',', $feGroups);
$where_clause = 'uid IN (' . $feGroupList . ')';
$result = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows(
'*',
'fe_groups',
$where_clause
);
}
return $result;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static public function fetchFeGroups ()\n {\n $result = [];\n\n if (\n isset($GLOBALS['TSFE']->fe_user) &&\n isset($GLOBALS['TSFE']->fe_user->user) &&\n isset($GLOBALS['TSFE']->fe_user->user['usergroup'])\n ) {\n $result = explode(',', $GLOBALS['TSFE']->fe_user->user['usergroup']); \n }\n return $result;\n }",
"private function getGroups()\n {\n $where = '';\n if ($this->userGroups)\n {\n $groups = explode(',', $this->userGroups);\n $where .= \" uid IN ('\" . implode(\"','\", $groups) . \"') \";\n }\n $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'fe_groups', $where);\n $res = array();\n while (($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($result)))\n {\n $res[$row['uid']] = $row;\n }\n\n $this->loadGroupIcons($res);\n\n return $res;\n }",
"public function getUserGroups()\n\t{\n\t\t\n\t\t$groups = array();\n\t\t$db \t= $this->getUserDbTable();\n\t\t$id \t= $this->getUserId();\n\t\t\n\t\tif ($id)\n\t\t{\t\n\t\t\t$groups \t= $db->getAdapter()->select()->from(array('gmt'=>'groups_members_table'))\n\t\t\t\t\t\t\t\t\t\t ->joinInner(array('gt'=>'groups_table'), 'gmt.group_id = gt.group_id')\n\t\t\t\t\t\t\t\t\t\t ->where('gmt.user_id = ? ', $id)\n\t\t\t\t\t\t\t\t\t\t ->query()->fetchAll();\n\t\t}\t\n\t\t/* Automatically append group 0===Public group */\n\t\t$public \t\t= $db->getAdapter()->select()->from(array('gmt'=>'groups_table'))->where('group_privacy_level = ? ', 0)\n\t\t\t\t\t\t\t\t\t ->query()->fetch();\n\t\t$groups[] = $public;\n\t\t\n\t\treturn $groups;\n\t}",
"public function getAllGroups(){\n // Get list\n $lists = array(); \n $data = Group::where('account_id', $this->getAccountId()) \n ->where('user_id', $this->user_id)\n ->get() \n ->toArray();\n $lists = $data;\n return $lists;\n }",
"public function get_groups(){\n $group_users = private_party_group_user::search()->where('uid', $this->uid)->exec();\n $merged_groups = array();\n foreach($group_users as $group_user){\n /* @var $group_user private_party_group_user */\n $groups = $group_user->get_groups();\n $merged_groups = array_merge($merged_groups, $groups);\n }\n return $merged_groups;\n }",
"function getUsersGroups($mysqli,$userID){\r\n $result = $mysqli->query(\"SELECT groups.*, group_members.isAdmin FROM `group_members` RIGHT JOIN groups ON group_members.group_ID = groups.ID WHERE Member_ID = \".$userID.\"\");\r\n $groups = array();\r\n\r\n $i=0;\r\n while($row = $result->fetch_row()){\r\n $g = new group();\r\n $g->groupID = $row[0];\r\n $g->name = $row[1];\r\n $g->description = $row[2];\r\n $g->website = $row[3];\r\n $g->private = $row[4];\r\n $g->type = $row[5];\r\n $g->sport = $row[6];\r\n $g->logoURL = $row[7];\r\n $g->city = $row[8];\r\n $g->userIsAdmin = $row[9];\r\n $groups[$i] = $g;\r\n $i++;\r\n }\r\n return $groups;\r\n }",
"public function getUserGroups()\n\t{\n\t\tself::authenticate();\n\n\t\t$uname = FormUtil::getPassedValue('user', null);\n\t\tif($uname == null) {\n\t\t\treturn self::retError('ERROR: No user name passed!');\n\t\t}\n\n\t\t$uid = UserUtil::getIdFromName($uname);\n\t\tif($uid == false) {\n\t\t\treturn self::ret(false);\n\t\t}\n\n\t\t$groups = UserUtil::getGroupsForUser($uid);\n\t\t$return = array();\n\t\tforeach($groups as $item) {\n\t\t\t$group = UserUtil::getGroup($item);\n\t\t\t$return[] = $group['name'];\n\t\t}\n\t\tif(SecurityUtil::checkPermission('Owncloud::Admin', '::', ACCESS_MODERATE, $uid)) {\n\t\t\t$return[] = 'admin';\n\t\t}\n\t\treturn self::ret($return);\n\t}",
"public function getGroups() {\r\n // Array to hold the group objects\r\n $groups = [];\r\n // Loop through each of the groups the user belongs to\r\n foreach ($this->groups as $group) {\r\n // Get the group from the database\r\n $grp = UserGroup::getByName($group);\r\n // If the group has a valid ID (not 0 or less)\r\n if ($grp->id != 0) {\r\n // Add the group to the array\r\n $groups[] = $grp;\r\n }\r\n }\r\n // Return the groups array\r\n return $groups;\r\n }",
"function getGroups()\n {\n//\t\t$this->_groups = array();\n if ( empty( $this->_groups ) ) {\n $member_handler = &zarilia_gethandler( 'member' );\n if ( $this->getVar( 'uid' ) ) {\n $this->_groups = $member_handler->getGroupsByUser( $this->getVar( 'uid' ) );\t\t\t\t\n } else {\n $this->_groups = array( 0 => ZAR_GROUP_ANONYMOUS );\n }\n }\t\t\n return $this->_groups;\n }",
"function get_user_staff_groups($user_id) {\r\n // set connection var\r\n global $db;\r\n\r\n //query to get staff groups\r\n $sql = \"SELECT staff_groups\r\n FROM users\r\n WHERE is_active = '1' AND id = '$user_id';\";\r\n\r\n $groups_data = array();\r\n $groups = array();\r\n $user_groups = array();\r\n foreach ($db->query($sql) as $key => $value) {\r\n $groups_data[$key] = $value;\r\n if (isset($groups_data[$key][0])) {\r\n $groups = $groups_data[$key][0];\r\n }\r\n }\r\n\r\n if ($groups != \"\") {\r\n try {\r\n $user_groups = unserialize($groups);\r\n } catch (ErrorException $e) {\r\n $e->getMessage();\r\n $error = \"User: '$user_id' student_groups: \" . $e->getMessage();\r\n error($error);\r\n }\r\n }\r\n\r\n return $user_groups;\r\n}",
"function _get_user_groups(){\r\n $groups = array();\r\n for($i=0; $i<get_sso_option('rules_number'); $i++){\r\n $rule = _get_rule($i);\r\n if($rule != FALSE){\r\n\t $is_group = _run_rule($rule['var'], $rule['regexp'], $rule['group']);\r\n\t if($is_group === TRUE) $groups[] = $rule['group'];\r\n }\r\n }\r\n return $groups;\r\n}",
"protected function readGroups() {\n\t\tif ($this->items) {\n\t\t\t$sql = \"SELECT\t\tuser_group.*, (SELECT COUNT(*) FROM wcf\".WCF_N.\"_user_to_groups WHERE groupID = user_group.groupID) AS members\n\t\t\t\tFROM\t\twcf\".WCF_N.\"_group user_group\n\t\t\t\tORDER BY\t\".($this->sortField != 'members' ? 'user_group.' : '').$this->sortField.\" \".$this->sortOrder;\n\t\t\t$result = WCF::getDB()->sendQuery($sql, $this->itemsPerPage, ($this->pageNo - 1) * $this->itemsPerPage);\n\t\t\twhile ($row = WCF::getDB()->fetchArray($result)) {\n\t\t\t\t$row['deletable'] = (!WCF::getUser()->getPermission('admin.user.canDeleteGroup') || Group::isMember($row['groupID']) || !Group::isAccessibleGroup($row['groupID']) || $row['groupType'] == Group::EVERYONE || $row['groupType'] == Group::GUESTS || $row['groupType'] == Group::USERS) ? 0 : 1;\n\t\t\t\t$row['editable'] = (WCF::getUser()->getPermission('admin.user.canEditGroup') && Group::isAccessibleGroup($row['groupID'])) ? 1 : 0;\n\t\t\t\t\n\t\t\t\t$this->groups[] = $row;\n\t\t\t}\n\t\t}\n\t}",
"protected function _get_usergroup_list()\n {\n $results = $this->connection->query('SELECT gid,title FROM ' . $this->connection->get_table_prefix() . 'usergroups');\n $mod_results = array();\n foreach ($results as $key => $value) {\n $mod_results[] = array('group_id' => $value['gid'], 'group_name' => $value['title']);\n }\n $results2 = collapse_2d_complexity('group_id', 'group_name', $mod_results);\n return $results2;\n }",
"static function getUserGroups(){\n \n }",
"function getGroupList() {\n return getAll(\"SELECT * FROM `group` WHERE admin_id = ?\", [getLogin()['uid']]);\n}",
"public function ADStaff_Get_Group_List(){\n\t \n\t $result_key = parent::Initial_Result('groups');\n\t $result = &$this->ModelResult[$result_key];\n\t \n\t try{\n\t\t// 查詢資料庫\n\t\t$DB_OBJ = $this->DBLink->prepare(parent::SQL_Permission_Filter(SQL_AdStaff::SELECT_GROUP_LIST()));\n\t\tif(!$DB_OBJ->execute()){\n\t\t throw new Exception('_SYSTEM_ERROR_DB_ACCESS_FAIL'); \n\t\t}\n\t\t$groups = $DB_OBJ->fetchAll(PDO::FETCH_ASSOC);\n\t\t$result['action'] = true;\t\t\n\t\t$result['data'] = $groups;\t\t\n\t } catch (Exception $e) {\n $result['message'][] = $e->getMessage();\n }\n\t return $result;\n\t}",
"public function adminHasRetrievedGroupListUsingTheGraphApi(): array {\n\t\t$response = GraphHelper::getGroups(\n\t\t\t$this->featureContext->getBaseUrl(),\n\t\t\t$this->featureContext->getStepLineRef(),\n\t\t\t$this->featureContext->getAdminUsername(),\n\t\t\t$this->featureContext->getAdminPassword()\n\t\t);\n\t\tif ($response->getStatusCode() === 200) {\n\t\t\t$jsonResponseBody = $this->featureContext->getJsonDecodedResponse($response);\n\t\t\treturn $jsonResponseBody[\"value\"];\n\t\t} else {\n\t\t\t$this->throwHttpException($response, \"Could not retrieve groups list.\");\n\t\t}\n\t}",
"function getAllAffinityGroupsFromUser()\n {\n $conn = new DBConnect();\n $dbObj = $conn->getDBConnect();\n $this->DAO = new AffinityGroupDAO($dbObj);\n $this->DAO2 = new SecurityDAO($dbObj);\n $username = Session::get('currentUser');\n $userID = $this->DAO2->getUserIDByUsername($username);\n return $this->DAO->getAllAffinityGroupsFromUser($userID);\n }",
"function getGroups($username){\r\n\t\t//SELEZIONO DAL DATABASE L'ELENCO DEI GRUPPI AI QUALI L'UTENTE APPARTIENE\r\n\t\t$sql = \"SELECT groupname FROM \".$this->schema.\".user_group WHERE username='$username'\";\r\n\t\tprint_debug($sql,null,'tabella');\r\n\t\tif($this->db->sql_query($sql)){\t\t//STRUTTURA GRUPPI GISCLIENT\r\n\t\t\t$ris=$this->db->sql_fetchlist('groupname');\r\n\t\t\tif(!$ris) {\r\n\t\t\t\t$this->error->getError(\"C001\");\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t\tforeach($ris as $g){\r\n\t\t\t\t$this->groups[]=$g;\r\n\t\t\t}\r\n\t\t\treturn $this->groups;\r\n\t\t}\r\n\t\telse{\r\n\t\t\t$this->error->setNote($sql);\r\n\t\t\t$this->error->getError(\"1\");\t\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"public function groups()\n {\n $return = ['everyone'];\n\n $groups = GroupMember::where('user_id', $this->id())\n ->sort('`group` ASC')\n ->all();\n\n foreach ($groups as $group) {\n $return[] = $group->group;\n }\n\n return $return;\n }",
"public function listGroups()\n {\n\t\t$data = $this->call(array(), \"GET\", \"groups.json\");\n\t\t$data = $data->{'groups'};\n\t\t$groupArray = new ArrayObject();\n\t\tfor($i = 0; $i<count($data);$i++){\n\t\t\t$groupArray->append(new Group($data[$i], $this));\n\t\t}\n\t\treturn $groupArray;\n }",
"public function get_groups()\n\t{\n\t\tif (empty($this->user))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\treturn array(array('UniGroup', $this->user[static::_column('group')]));\n\t}",
"public function getSystemUserGroups()\n {\n $system_user_groups = array();\n \n // load the related System_user_group objects\n //Busca grupo para professor\n $system_user_system_user_groups = SystemGroup::where('name','like','%- Professor%')->load();\n if (isset($system_user_system_user_groups[0]))\n {\n $group_id = $system_user_system_user_groups[0];\n }\n $system_user_groups[] = new SystemGroup( $group_id->id );\n //var_dump($system_user_groups);\n return $system_user_groups;\n \n }",
"public function getGroups(){\n $groups = Group::get()->toArray();\n $groups_array = array();\n foreach($groups as $group){\n $groups_array[$group['id']]['group_name'] = $group['group_name'];\n $groups_array[$group['id']]['user_ids'] = explode(\",\",$group['user_ids']);\n }\n return $groups_array;\n }",
"function get_all_user_group()\n {\n $user_group = $this->db->query(\"\n SELECT\n *\n\n FROM\n `groups`\n\n WHERE\n 1 = 1\n AND gro_id != 1\n\n ORDER BY `gro_id` DESC\n \")->result_array();\n\n return $user_group;\n }",
"function get_user_local_groups($user_id) {\r\n // set connection var\r\n global $db;\r\n\r\n //query to get local groups str\r\n $sql = \"SELECT local_groups\r\n FROM users\r\n WHERE is_active = '1' AND id = '$user_id';\";\r\n\r\n $groups_data = array();\r\n $groups = array();\r\n $user_groups = array();\r\n foreach ($db->query($sql) as $key => $value) {\r\n $groups_data[$key] = $value;\r\n if (isset($groups_data[$key][0])) {\r\n $groups = $groups_data[$key][0];\r\n }\r\n }\r\n\r\n if ($groups != \"\") {\r\n try {\r\n $user_groups = unserialize($groups);\r\n } catch (ErrorException $e) {\r\n $e->getMessage();\r\n $error = \"User: '$user_id' student_groups: \" . $e->getMessage();\r\n error($error);\r\n }\r\n }\r\n\r\n return $user_groups;\r\n}",
"public function getUsers()\n\t{\n\t\t$groupUsers = new ArrayObject();\n\t\t$group = $this->getGroup();\n\t\tif ($group != null) {\n\t\t\t$users = $this->groupService->getUsersInGroup($this->getGroup(), true);\n\t\t\t\n\t\n\t foreach ($users as $user) {\n\t $groupUsers[$user->id] = $user;\n\t }\t\n\t\t}\n \n return $groupUsers;\n\t}",
"function get_local_groups_by_creator($user_id) {\r\n // set connection var\r\n global $db;\r\n\r\n //query to get all associated groups\r\n $sql = \"SELECT id\r\n FROM groups\r\n WHERE is_active = '1' AND local = '1' AND created_by = '$user_id'\r\n ORDER BY name ASC;\";\r\n\r\n $groups_data = array();\r\n $groups = array();\r\n\r\n foreach ($db->query($sql) as $key => $value) {\r\n $groups_data[$key] = $value;\r\n foreach ($groups_data[$key] as $subkey => $subvalue) {\r\n if (is_int($subkey)) {\r\n $groups[] = $subvalue;\r\n }\r\n }\r\n }\r\n\r\n return $groups;\r\n}",
"public static function getGroups($idUser){ \r\n $user = self::findUser($idUser); \r\n $groups = $user->groups;\r\n foreach ($groups as $key => &$value) {\r\n $value['role_id'] = $value->pivot->role_id;\r\n $value['role'] = Role::find($value->pivot->role_id)->name;\r\n unset($value->pivot);\r\n }\r\n return $groups;\r\n }",
"public function getGroups();"
]
| [
"0.82356024",
"0.73394096",
"0.7101859",
"0.6964421",
"0.6897223",
"0.68906516",
"0.68772984",
"0.68538755",
"0.67828745",
"0.67818874",
"0.6777793",
"0.67765665",
"0.67484015",
"0.6706977",
"0.66732204",
"0.66684747",
"0.66283506",
"0.6609227",
"0.65978146",
"0.65956306",
"0.6589223",
"0.6580599",
"0.6572476",
"0.65639496",
"0.6559834",
"0.6551412",
"0.65438694",
"0.6525147",
"0.65227413",
"0.650556"
]
| 0.7721719 | 1 |
Adds the time zone to the given unix time parameter | static public function addTimeZone (&$time) {
if (!empty($GLOBALS['TYPO3_CONF_VARS']['SYS']['serverTimeZone'])) {
$time += ($GLOBALS['TYPO3_CONF_VARS']['SYS']['serverTimeZone'] * 3600);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"function set_time_zone()\n {\n $this->set_date_to_now();\n $offset = $GLOBALS['time_diff'] - $GLOBALS['server_time_offset'];\n $this->timestamp+=($offset*3600);\n }",
"public function createInTimeZone($time, \\DateTimeZone $timezone);",
"function set_time_from_unix_time($unixtime)\n {\n $this->timestamp=$unixtime;\n }",
"function set_time_by_user_timezone($time)\n{\n $user = Auth::user();\n\n if($user) {\n\n // Get the value of timezone if user have some\n $time_zone = intval($user->settings->timezone * 60 ?? null);\n\n return Carbon::parse($time)->addMinutes($time_zone ?? null);\n }\n\n return Carbon::parse($time);\n \n}",
"public function setTimezone($_timezone);",
"public function setTimeZone($time_zone)\n\t{\n\t\tdate_default_timezone_set($time_zone);\n\t\n\t}",
"public function addTimestampsWithTimezone($createdAt = null, $updatedAt = null)\r\n {\r\n \r\n }",
"function converToTz($time=\"\",$toTz='',$fromTz='')\n\n\t{\n\n\t\t$date = new DateTime($time, new DateTimeZone($fromTz));\n\n\t\t$date->setTimezone(new DateTimeZone($toTz));\n\n\t\t$time= $date->format('Y-m-d H:i:s');\n\n\t\treturn $time;\n\n\t}",
"function db_set_time_zone(){\n $timezone = \"Asia/Bangkok\"; \n if(function_exists('date_default_timezone_set')) date_default_timezone_set($timezone); \n\n mysql_query(\"SET SESSION time_zone = '+7:00'\");\n }",
"function addPeriodToTime($datetime, $period, $timezone) {\n // save the current default time zone\n $oldTimeZone = date_default_timezone_get();\n date_default_timezone_set($timezone);\n\n $timestamp = strtotime($datetime);\n $timestamp += $period;\n $result = date(MYSQL_DATETIME_FORMAT, $timestamp);\n\n // restore the current default time zone\n date_default_timezone_set($oldTimeZone);\n return $result;\n }",
"function setTZ($tz)\r\n {\r\n $this->tz = $tz;\r\n }",
"function setTimeZone($gid) {\n switch($gid) {\n case 1:\n\t\t\tdate_default_timezone_set(\"Asia/Tokyo\");\n break;\n\n case 2:\n\t date_default_timezone_set(\"Asia/Shanghai\");\n break;\n\n case 3:\n\t date_default_timezone_set(\"Asia/Ho_Chi_Minh\");\n break;\n\n case 4:\n\t date_default_timezone_set(\"Asia/Rangoon\");\n break;\n }\n}",
"public function setTimeZone($timeZone);",
"function GmtTimeToLocalTime($time) {\n date_default_timezone_set('UTC');\n $new_date = new DateTime($time);\n $new_date->setTimeZone(new DateTimeZone('Europe/Berlin'));\n return $new_date->format(\"d.m.Y H:i:s\");\n}",
"private function setTimeZone() {\n $companySettings = Store::get('company_settings');\n $timezone = $companySettings->time_zone;\n if ($timezone) {\n\n $dt = new \\DateTime('now', new \\DateTimeZone($timezone));\n $abbreviation = $dt->format('T');\n\n config(['app.timezone' => $timezone]);\n view()->share('time_zone', [\n 'name' => $timezone,\n 'abbr' => $abbreviation\n ]);\n\n $offsetToFormat = new \\DateTime('now', new \\DateTimeZone($timezone));\n $timezoneOffset = $offsetToFormat->format('P');\n\n DB::statement(\"SET time_zone = '\".$timezoneOffset.\"'\");\n }\n }",
"function rlip_gmt_from_usertime($usertime, $timezone = 99) {\n $tz = get_user_timezone_offset($timezone);\n if (abs($tz) > 13) {\n return $usertime;\n }\n $usertime -= (int)($tz * HOURSECS);\n if ($timezone == 99 || !is_numeric($timezone)) {\n $usertime -= dst_offset_on($usertime, $timezone);\n }\n return $usertime;\n}",
"public function __construct($time = 'now', DateTimeZone $timezone = NULL)\n{\n\tif(is_int($time))$time=\"@$time\";if(is_array($time))$time=self::fromArray($time);if($timezone)parent::__construct($time, $timezone);else parent::__construct($time);\n}",
"public static function convert_time_to_zone_time($time) {\n\t\t$gmt_offset = (int) self::$gmt_offset;\n\t\t$mk_time = strtotime($time);\n\t\t$mk_time+=($gmt_offset * (-1) * 3600);\n\t\t$time_converted = date('Y-m-d', $mk_time) . \" \" . date('H', $mk_time) . \":\" . date('i', $mk_time);\n\t\treturn $time_converted;\n\t}",
"public function nowInTimeZone(\\DateTimeZone $timezone);",
"private function _setTimeZone()\n {\n /** @var WebApplication|ConsoleApplication $this */\n $timezone = $this->getConfig()->getGeneral()->timezone;\n\n if (!$timezone) {\n $timezone = $this->getProjectConfig()->get('system.timeZone');\n }\n\n if ($timezone) {\n $this->setTimeZone($timezone);\n }\n }",
"function add($name, $time);",
"public function setTimeZone($a = null)\n {\n throw new NotImplementedException(__METHOD__);\n }",
"public function add($time)\n\t{\n\t\t$this->times[] = $time;\n\t}",
"public static function timestamp($time=false) {\n\t\tglobal $db; //TODO: REMOVE GLOBAL REFERENCE\n\t\treturn pudl::convert_tz(\n\t\t\tself::from_unixtime($time !== false ? $time : $db->time()),\n\t\t\tnew pudlGlobal('time_zone'),\n\t\t\t'UTC'\n\t\t);\n\t}",
"public function setTimeZoneOffset($mins){\n $sgn = ($mins < 0 ? 1 : -1); //convert the sign opposite (it's comes from the client usually!)\n $mins = abs($mins);\n $hrs = floor($mins / 60);\n $mins -= $hrs * 60;\n $offset = sprintf('%+d:%02d', $hrs*$sgn, $mins);\n\n $sql = \"SET time_zone ='$offset';\";\n $result = $this->execute($sql);\n }",
"public function convertTimeTimezone($timeStamp)\n {\n date_default_timezone_set('UTC');\n\n $timezone = $this->dataPhpArray['timezone'];\n\n return date('H:i', $timeStamp + $timezone);\n }",
"public function timezone(?string $timezone): static;",
"function spawn_cron($gmt_time = 0)\n {\n }",
"public function setTimeZone($value)\n {\n return $this->set(self::_TIME_ZONE, $value);\n }",
"public abstract function fromUnixtime ($timestamp);"
]
| [
"0.687727",
"0.6207628",
"0.6129918",
"0.5756463",
"0.57331896",
"0.56162614",
"0.5605271",
"0.5579205",
"0.55276346",
"0.54616207",
"0.5435536",
"0.5430819",
"0.539762",
"0.53060365",
"0.5254436",
"0.5254418",
"0.52477884",
"0.52259606",
"0.51958334",
"0.51543206",
"0.51420045",
"0.51328045",
"0.5126181",
"0.51143765",
"0.5092311",
"0.5078511",
"0.50741535",
"0.507341",
"0.505607",
"0.50521076"
]
| 0.7310976 | 0 |
Clears cache content for a list of page ids | static public function clearPageCacheContent_pidList($pidList)
{
$pageCache = static::getPageCache();
$pageIds = GeneralUtility::trimExplode(',', $pidList);
foreach ($pageIds as $pageId) {
$pageCache->flushByTag('pageId_' . (int)$pageId);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public function clearCachesOfRegisteredPageIds() {}",
"public function clearPageCacheContent() {}",
"function clearCacheIfSet()\t{\n\t\tif ($this->conf['clearCacheOfPages'])\t{\n\t\t\t$cc_pidList = $GLOBALS['TYPO3_DB']->cleanIntList($this->conf['clearCacheOfPages']);\n\t\t\t$GLOBALS['TSFE']->clearPageCacheContent_pidList($cc_pidList);\n\t\t}\n\t}",
"function clean_page_cache($id)\n {\n }",
"public static function clear() \n\t\t{\n\t\t\tSite_CacheManager::flush('page');\n\t\t}",
"public function clear_cache($entry_ids)\n\t{\n\t\tif ( ! is_array($entry_ids))\n\t\t{\n\t\t\t$entry_ids = array($entry_ids);\n\t\t}\n\t\t\n\t\tforeach ($entry_ids as $entry_id)\n\t\t{\n\t\t\tunset($this->entries[$entry_id]);\n\t\t}\n\t}",
"public function clearCacheForListOfUids($params, \\TYPO3\\CMS\\Core\\DataHandling\\DataHandler $parent) {\n\t\tforeach ($params['pageIdArray'] as $uid) {\n\t\t\t$this->varnishCacheMgm->clearCacheForPageUid($uid);\n\t\t}\n\t}",
"public function clear_cache(): void;",
"abstract protected function clearCache();",
"function clearCommentListCache() {\n global $wgMemc;\n wfDebug( \"Clearing comments for page {$this->id} from cache\\n\" );\n $key = wfMemcKey( 'comment', 'pagelist', $this->id );\n $wgMemc->delete( $key );\n\n if ( is_object( $this->title ) ) {\n $this->title->invalidateCache();\n $this->title->purgeSquid();\n }\n }",
"public function clearAllExceptPageCacheCommand() {\n\t\t$clearedCaches = $this->cacheApiService->clearAllExceptPageCache();\n\t\t$message = 'Cleared caches: ' . implode(', ', $clearedCaches);\n\t\t$this->logger->info($message);\n\t\t$this->outputLine($message);\n\t}",
"public function clearCache(): void;",
"public function resetCache(array $ids = NULL) {\n // TODO: Implement resetCache() method.\n }",
"public function clearCache() {}",
"public function clearCache() {}",
"function clean_network_cache($ids)\n {\n }",
"public function clearCacheForConfiguredUids($settings) {\n\t\t$pidList = $this->settingsService->getClearCacheUids($settings);\n\t\tif (count($pidList) > 0) {\n\t\t\t$this->cacheService->clearPageCache($pidList);\n\t\t}\n\t}",
"public function clearCache()\n {\n if ($this->clear_cache && !empty($this->pageinfo)) {\n $dataHandler = GeneralUtility::makeInstance(DataHandler::class);\n $dataHandler->start([], []);\n $dataHandler->clear_cacheCmd($this->id);\n }\n }",
"function cache_actions_action_clear_cache($tables) {\n $tables = explode(',', $tables);\n // Fetch all available cache tables, so we can be sure that we don't remove data from a table that's not a cache.\n $core = array('cache', 'cache_block', 'cache_filter', 'cache_page');\n $cache_tables = array_merge(module_invoke_all('flush_caches'), $core); \n\n foreach ($tables as $table) {\n if (array_search($table, $cache_tables) !== FALSE) {\n cache_clear_all('*', $table, TRUE);\n }\n }\n}",
"function clean_comment_cache($ids)\n {\n }",
"public function clear () {\n array_map('unlink', glob(CACHE.\"*.cache\"));\n /*\n $files = scandir(CACHE);\n foreach ($files as $file){\n if (pathinfo($file, PATHINFO_EXTENSION) == 'cache') @unlink(CACHE.$file);\n }\n */\n }",
"public function _cacheClear() {\n\t\t$content = null;\n\t\tif ( ZC_CACHE == 'apc' ) {\n\t\t\t$info = apc_cache_info( 'user' );\n\t\t\tforeach ( $info[ 'cache_list' ] as $item ) {\n\t\t\t\tif ( preg_match( '/^\\Q'. ZC_CACHE_PREFIX. '\\E/', $item[ 'info' ] ) )\n\t\t\t\t\tapc_delete( $item[ 'info' ] );\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\tif ( ( $dh = opendir( ZC_CACHE_DIR ) ) !== false ) {\n\t\t\t\twhile( ( $file = readdir( $dh ) ) !== false ) {\n\t\t\t\t\tif ( ! preg_match( '/\\.cache$/', $file ) || is_dir( $file ) ) continue;\n\t\t\t\t\tunlink( ZC_CACHE_DIR. '/'. $file );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public function clear()\n\t{\n\t\t$this->pages = [];\n\t}",
"public function clearCachefiles () {\r\n\t\r\n\t}",
"public function clearCacheAndStats() {\n\t\tif (Shop::isFeatureActive()) {\n\t\t\tforeach (Shop::getContextListShopID() as $id_shop) {\n\t\t\t\tif (file_exists(_PS_CACHE_DIR_ . 'pagecache/' . $id_shop)) {\n\t\t\t\t\tTools::deleteDirectory(_PS_CACHE_DIR_ . 'pagecache/' . $id_shop, false);\n\t\t\t\t}\n\t\t\t}\n\t\t\tPageCacheDAO::resetCache(Shop::getContextListShopID());\n\t\t}\n\t\telse {\n\t\t\tif (file_exists(_PS_CACHE_DIR_ . 'pagecache/')) {\n\t\t\t\tTools::deleteDirectory(_PS_CACHE_DIR_ . 'pagecache', false);\n\t\t\t}\n\t\t\tPageCacheDAO::resetCache();\n\t\t}\n\t}",
"public function clear_caches() {\n\n\t\t\tif ( empty( $_GET['clear_meta_cache'] ) ) {\n\t\t\t\treturn;\n\t\t\t}\n\n\t\t\t$cache = new Wapu_Core_Meta_Cache( get_the_ID() );\n\t\t\t$cache->delete( esc_attr( $_GET['clear_meta_cache'] ) );\n\n\t\t}",
"public function clearCachePostProc(array $params) {\r\n\t\tif (in_array($params['cacheCmd'], array('all', 'pages'))) {\r\n GeneralUtility::rmdir($this->getCacheFolder(), TRUE);\r\n\t\t} elseif ($this->isValidInteger($params['cacheCmd'])) {\r\n\t\t\t$cacheFilePath = $this->getCacheFilePath( (integer) $params['cacheCmd'] );\r\n\t\t\tif (file_exists ( $cacheFilePath )) {\r\n\t\t\t\tunlink ( $cacheFilePath );\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private function _clearCache()\n {\n Cache::forget(\"roaddamage-resource:{$this->id}\");\n foreach ($this->getReports() as $report) {\n Cache::forget(\"report-resource:{$report->id}\");\n }\n }",
"function _prime_site_caches($ids, $update_meta_cache = \\true)\n {\n }",
"public function onCacheCleared(CacheClearedEvent $event): void\n {\n // Ignore if this was triggered by a content element\n // This handler only listens for the \"flash\" icon on a page.\n if (in_array('tt_content', $event->getTags(), true)) {\n return;\n }\n \n $tags = [];\n foreach ($event->getTags() as $tag) {\n if (stripos($tag, 'pageId_') !== 0) {\n continue;\n }\n \n $id = (int)substr($tag, 7);\n $tags[] = 'page_' . $id;\n }\n $this->clearWithTags($tags);\n }"
]
| [
"0.76232606",
"0.72297263",
"0.6905112",
"0.6659995",
"0.64680296",
"0.6443081",
"0.6390617",
"0.6294601",
"0.6283241",
"0.62448406",
"0.6223703",
"0.62227744",
"0.6164316",
"0.61532426",
"0.61532426",
"0.61458236",
"0.614209",
"0.61338717",
"0.6115275",
"0.6077659",
"0.6031911",
"0.6005931",
"0.5977239",
"0.59720254",
"0.5970934",
"0.5948093",
"0.59321046",
"0.5889774",
"0.5880275",
"0.5875689"
]
| 0.7235665 | 1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.